diff --git a/.gitattributes b/.gitattributes index dd2127a229..1bf1a07832 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,14 +2,17 @@ * text eol=lf # Denote all files that are truly binary and should not be modified +*.7z binary *.bz2 binary *.gz binary *.xz binary *.exe binary *.dll binary *.lzma binary +*.msi binary *.tgz binary *.zip binary *.rar binary +*.so binary *.lib binary *.a binary \ No newline at end of file diff --git a/.gitignore b/.gitignore index c1c5c8ed07..1878e0d5fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ *.tar.xz *.tar.gz *.tar.bz2 +*.tgz +*.zip +*.rar +*.sig */src/ */pkg/ \ No newline at end of file diff --git a/FAIL_LIST.md b/FAIL_LIST.md new file mode 100644 index 0000000000..484b2ce8c5 --- /dev/null +++ b/FAIL_LIST.md @@ -0,0 +1,48 @@ +List of packages that currently fail to build +============================================= + +- blender + +- cegui (waiting for 0.8.5 release) + +- cling - need maintainer to it + +- cocos2dx-git + +- coq (OCAML issue) + +- freerdp-git + +- gprbuild-gpl + +- gtkada + +- itk + +- ldns + +- librocket-git + +- nim + +- nimble + +- ocaml-lablgtk + +- octave-hg + +- ogre3d + +- openshadinglanguage (Needs a legacy LLVM < 3.6 package due to JIT changes) + +- perl (still not building for 32-bit) : ..\perl.h:3551:38: error: static assertion failed: "sizeof(PADOP) <= sizeof(SVOP)" + +- plplot + +- pitivi-git + +- python-binwalk + +- python-h5py + +- xmlada-gpl diff --git a/TODO.md b/TODO.md index f8887764c5..8bd500f949 100644 --- a/TODO.md +++ b/TODO.md @@ -37,3 +37,10 @@ What we need to do: fontconfig gcrypt speex theora matroska openal32 openjpeg theoradec theoraenc libopus libopencore-amrnb libopencore-amrwb libcelt0 libgnutls libgme libembl libspeexdsp + +* Bison: Add path relocation when locating m4 + +* Add the Oyrol, Urho3D and Godot engines + +* CMake Library Packages (all): Relocate find_package()-called scripts as + was done for CGAL in https://github.com/Alexpux/MINGW-packages/commit/34ea54 diff --git a/mingw-w64-FreeImage/FreeImage-3.16.0_disable-some-plugins.patch b/mingw-w64-FreeImage/FreeImage-3.16.0_disable-some-plugins.patch deleted file mode 100644 index 831ba5b321..0000000000 --- a/mingw-w64-FreeImage/FreeImage-3.16.0_disable-some-plugins.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -rupN FreeImage/FreeImage.2008.vcproj FreeImage-new/FreeImage.2008.vcproj ---- FreeImage/FreeImage.2008.vcproj 2014-01-16 00:27:04.000000000 +0100 -+++ FreeImage-new/FreeImage.2008.vcproj 2014-01-16 00:49:42.334523250 +0100 -@@ -832,10 +828,6 @@ - > - - -- -- - -diff -rupN FreeImage/Source/FreeImage.h FreeImage-new/Source/FreeImage.h ---- FreeImage/Source/FreeImage.h 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage.h 2014-01-16 00:49:42.338523316 +0100 -@@ -456,6 +461,10 @@ FI_ENUM(FREE_IMAGE_DITHER) { - FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix) - }; - -+/* The FreeImage_JPEGTransform functions are deliberately disabled in the -+ Fedora build of FreeImage as they require that FreeImage uses a private copy -+ of libjpeg which is a no no because of security reasons. */ -+#if 0 - /** Lossless JPEG transformations - Constants used in FreeImage_JPEGTransform - */ -@@ -469,6 +478,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { - FIJPEG_OP_ROTATE_180 = 6, // 180-degree rotation - FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw) - }; -+#endif - - /** Tone mapping operators. - Constants used in FreeImage_ToneMapping. -@@ -704,7 +714,6 @@ typedef void (DLL_CALLCONV *FI_InitProc) - #define PNG_DEFAULT 0 - #define PNG_IGNOREGAMMA 1 //! loading: avoid gamma correction - #define PNG_Z_BEST_SPEED 0x0001 //! save using ZLib level 1 compression flag (default value is 6) --#define PNG_Z_DEFAULT_COMPRESSION 0x0006 //! save using ZLib level 6 compression flag (default recommended value) - #define PNG_Z_BEST_COMPRESSION 0x0009 //! save using ZLib level 9 compression flag (default value is 6) - #define PNG_Z_NO_COMPRESSION 0x0100 //! save without ZLib compression - #define PNG_INTERLACED 0x0200 //! save using Adam7 interlacing (use | to combine with other save flags) -@@ -1048,14 +1057,19 @@ DLL_API FIBITMAP *DLL_CALLCONV FreeImage - // JPEG lossless transformation routines - // -------------------------------------------------------------------------- - -+/* The FreeImage_JPEGTransform functions are deliberately disabled in the -+ Fedora build of FreeImage as they require that FreeImage uses a private copy -+ of libjpeg which is a no no because of security reasons. */ -+#if 0 - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); - DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); -+#endif - - - // -------------------------------------------------------------------------- diff --git a/mingw-w64-FreeImage/FreeImage-3.16.0_mingw-makefiles.patch b/mingw-w64-FreeImage/FreeImage-3.16.0_mingw-makefiles.patch deleted file mode 100644 index 9946754fa7..0000000000 --- a/mingw-w64-FreeImage/FreeImage-3.16.0_mingw-makefiles.patch +++ /dev/null @@ -1,405 +0,0 @@ ---- FreeImage/Makefile.fip.orig 2014-04-16 18:58:24.825800000 +0400 -+++ FreeImage/Makefile.fip 2014-04-16 19:12:58.956000000 +0400 -@@ -1,81 +1,97 @@ --# Linux makefile for FreeImagePlus -+# Mingw makefile for FreeImagePlus - - # This file can be generated by ./genfipsrclist.sh - include fipMakefile.srcs - --# General configuration variables: --DESTDIR ?= / --INCDIR ?= $(DESTDIR)/usr/include --INSTALLDIR ?= $(DESTDIR)/usr/lib -- --# Converts cr/lf to just lf --DOS2UNIX = dos2unix -- --LIBRARIES = -lstdc++ -- --MODULES = $(SRCS:.c=.o) --MODULES := $(MODULES:.cpp=.o) --CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden --# OpenJPEG --CFLAGS += -DOPJ_STATIC --# LibRaw --CFLAGS += -DNO_LCMS --# LibJXR --CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ --CFLAGS += $(INCLUDE) --CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy --# LibJXR --CXXFLAGS += -D__ANSI__ --CXXFLAGS += $(INCLUDE) -- --ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) -- CFLAGS += -fPIC -- CXXFLAGS += -fPIC --endif -+CC = $(MINGW_TARGET)-gcc -+CXX = $(MINGW_TARGET)-g++ -+LD = $(MINGW_TARGET)-g++ -+AR = ar -+DLLTOOL = dlltool -+RC = windres -+PKGCONFIG = pkg-config -+ -+CP = cp -+MD = mkdir -+RM = rm -+ -+# General configuration variables. -+DESTDIR ?= $(SystemRoot) -+INSTALLDIR ?= $(DESTDIR)/system32 -+DISTDIR ?= Dist -+SRCDIR ?= Wrapper/FreeImagePlus/ -+HEADER = FreeImagePlus.h -+RCFILE = Wrapper/FreeImagePlus/FreeImagePlus.rc -+ -+# Uncomment this variable to make a static library. This may -+# also be specified as an environment variable and can hold -+# any of STATIC and SHARED and must be in uppercase letters. -+# The FreeImage library type defaults to SHARED. -+FREEIMAGE_LIBRARY_TYPE ?= SHARED -+ -+WIN32_STATIC_FLAGS = -DFREEIMAGE_LIB -+WIN32_SHARED_FLAGS = -DFIP_EXPORTS -+ -+# Converts cr/lf to just lf -+DOS2UNIX = dos2unix -+ -+LIBRARIES = -lstdc++ -lfreeimage-$(VER_MAJOR).$(VER_MINOR) -L. -+MODULES = $(SRCS:.c=.o) -+MODULES := $(MODULES:.cpp=.o) -+RESOURCE = $(RCFILE:.rc=.coff) -+CFLAGS += -ISource $(INCLUDE) -DDISABLE_PERF_MEASUREMENT $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS) -+CXXFLAGS += -ISource $(INCLUDE) $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS) -+LDFLAGS += -shared -Wl,-soname,$(SOLIBNAME) -+LDFLAGS += -LDist -lfreeimage -lgdi32 - --TARGET = freeimageplus -+TARGET = freeimageplus - STATICLIB = lib$(TARGET).a --SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so --LIBNAME = lib$(TARGET).so --VERLIBNAME = $(LIBNAME).$(VER_MAJOR) --HEADER = Source/FreeImage.h --HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h -+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll -+IMPORTLIB = lib$(TARGET).dll.a -+EXPORTLIB = $(TARGET).exp -+SOLIBNAME = $(SHAREDLIB) - -+DISTSHARED = $(addprefix $(DISTDIR)/, $(SHAREDLIB) $(IMPORTLIB) $(HEADER)) -+DISTSTATIC = $(addprefix $(DISTDIR)/, $(STATICLIB) $(HEADER)) - --default: all -- --all: dist -+TARGETLIB = $($(FREEIMAGE_LIBRARY_TYPE)LIB) -+TARGETDIST = $(DIST$(FREEIMAGE_LIBRARY_TYPE)) - --dist: FreeImage -- cp *.a Dist -- cp *.so Dist -- cp Source/FreeImage.h Dist -- cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist -+default: all - --dos2unix: -- @$(DOS2UNIX) $(SRCS) -+all: $(TARGETLIB) $(TARGETDIST) - --FreeImage: $(STATICLIB) $(SHAREDLIB) -+rebuild: clean all - --.c.o: -+%.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ - --.cpp.o: -+%.o: %.cpp - $(CXX) $(CXXFLAGS) -c $< -o $@ - -+%.coff: %.rc -+ $(RC) $(RCFLAGS) -o $@ $< -+ -+$(DISTDIR)/%: % -+ $(CP) $< $@ -+ -+$(DISTDIR)/%: $(SRCDIR)/% -+ $(CP) $< $@ -+ - $(STATICLIB): $(MODULES) -- $(AR) r $@ $(MODULES) -+ $(AR) rs $@ $(MODULES) -+ -+$(IMPORTLIB) $(EXPORTLIB): $(MODULES) -+ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES) -+ -+$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE) -+ $(LD) -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS) - --$(SHAREDLIB): $(MODULES) -- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) -+$(DISTDIR): -+ $(MD) $(DISTDIR) - --install: -- install -d $(INCDIR) $(INSTALLDIR) -- install -m 644 -o root -g root $(HEADER) $(INCDIR) -- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) -- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) -- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) -+$(TARGETDIST): $(DISTDIR) - - clean: -- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME) -+ $(RM) -f core $(DISTDIR)/*.* $(MODULES) $(RESOURCE) $(STATICLIB) $(SHAREDLIB) $(IMPORTLIB) $(EXPORTLIB) - -diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu ---- FreeImage/Makefile.gnu 2014-01-16 00:27:04.000000000 +0100 -+++ FreeImage-new/Makefile.gnu 2014-01-16 00:49:42.335523267 +0100 -@@ -11,7 +11,8 @@ INSTALLDIR ?= $(DESTDIR)/usr/lib - # Converts cr/lf to just lf - DOS2UNIX = dos2unix - --LIBRARIES = -lstdc++ -+INCLUDE += $(shell pkg-config --cflags libopenjp2 libpng libraw OpenEXR zlib libtiff-4 libwebp) -+LIBRARIES = -lstdc++ $(shell pkg-config --libs libopenjp2 libpng libraw OpenEXR zlib libtiff-4 libwebp libwebpdecoder libwebpdemux libwebpmux) -ljpeg -lwebp - - MODULES = $(SRCS:.c=.o) - MODULES := $(MODULES:.cpp=.o) ---- FreeImage/Makefile.mingw.orig 2014-03-15 22:52:28.000000000 +0400 -+++ FreeImage/Makefile.mingw 2014-04-16 19:12:32.030400000 +0400 -@@ -1,136 +1,94 @@ --# MinGW makefile for FreeImage -- --# This file can be generated by ./gensrclist.sh --include Makefile.srcs -- --# General configuration variables. --DESTDIR ?= $(SystemRoot) --INSTALLDIR ?= $(DESTDIR)/system32 --DISTDIR ?= Dist --SRCDIR ?= Source --HEADER = FreeImage.h --RCFILE = FreeImage.rc -- --# Uncomment this variable to make a static library. This may --# also be specified as an environment variable and can hold --# any of STATIC and SHARED and must be in uppercase letters. --# Default: SHARED --#FREEIMAGE_LIBRARY_TYPE = STATIC -- --# Redefine the compiler (CC defaults to ´cc´ for MinGW's make, --# however there's only ´gcc´ available with MinGW). --CC = gcc -- --# Redefine the linker (we use ´g++´ for linking, since MinGW's --# command ´ld´ comes with wrong (Linux) standard library search --# paths). --LD = g++ -- --#Define the ´dlltool´ command. --DLLTOOL = dlltool -- --#Define the resource compiler. --RC = windres -- --# Define the ´copy´ command. --CP = cp -- --# Define the ´mkdir´ command. --MD = mkdir -- --# Define the ´remove´ command. --RM = rm -- --# Define additional libraries needed. --# libstdc++ is included by default with MinGW, however for --# WIN32 based builds, LibRawLite needs the winsock libraries. --LIBRARIES = -lws2_32 -- --# Define some additional symboles needed for WIN32 based builds. --WIN32_CFLAGS = -DWINVER=0x0500 $(LIB_TYPE_FLAGS) -DOPJ_STATIC --WIN32_CXXFLAGS = $(WIN32_CFLAGS) -DLIBRAW_NODLL -- --# Workaround for LibRawLite, which does not include C++ header --# file stdexcept, which is casually included with MSVC but not --# with MinGW. This can be removed after LibRawLite got control --# over its includes again. --WIN32_CXXFLAGS += -include stdexcept -- --# Define DLL image header information flags for the linker. --WIN32_LDFLAGS = -Wl,--subsystem,windows:5.0,--major-os-version,5 -- --WIN32_STATIC_FLAGS = -DFREEIMAGE_LIB --WIN32_SHARED_FLAGS = -DFREEIMAGE_EXPORTS -- --MODULES = $(SRCS:.c=.o) --MODULES := $(MODULES:.cpp=.o) --RESOURCE = $(RCFILE:.rc=.coff) --CFLAGS ?= -O3 -fexceptions -DNDEBUG -DDISABLE_PERF_MEASUREMENT $(WIN32_CFLAGS) --CFLAGS += $(INCLUDE) --CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -DNDEBUG $(WIN32_CXXFLAGS) --CXXFLAGS += $(INCLUDE) --RCFLAGS ?= -DNDEBUG --LDFLAGS ?= -s -shared -static -Wl,-soname,$(SOLIBNAME) $(WIN32_LDFLAGS) --DLLTOOLFLAGS ?= --add-stdcall-underscore -- --TARGET = FreeImage --STATICLIB = lib$(TARGET).a --SHAREDLIB = $(TARGET).dll --IMPORTLIB = $(TARGET).lib --EXPORTLIB = $(TARGET).exp --SOLIBNAME = $(SHAREDLIB).$(VER_MAJOR) -- --DISTSHARED = $(addprefix $(DISTDIR)/, $(SHAREDLIB) $(IMPORTLIB) $(HEADER)) --DISTSTATIC = $(addprefix $(DISTDIR)/, $(STATICLIB) $(HEADER)) -- --# The FreeImage library type defaults to SHARED. --FREEIMAGE_LIBRARY_TYPE ?= SHARED -- --TARGETLIB = $($(FREEIMAGE_LIBRARY_TYPE)LIB) --TARGETDIST = $(DIST$(FREEIMAGE_LIBRARY_TYPE)) --LIB_TYPE_FLAGS = $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS) -- --default: all -- --all: mkdist -- --rebuild: clean all -- --mkdist: FreeImage $(TARGETDIST) -- --FreeImage: $(TARGETLIB) -- --%.o: %.c -- $(CC) $(CFLAGS) -c $< -o $@ -- --%.o: %.cpp -- $(CXX) $(CXXFLAGS) -c $< -o $@ -- --%.coff: %.rc -- $(RC) $(RCFLAGS) -o $@ $< -- --$(DISTDIR)/%: % -- $(CP) $< $@ -- --$(DISTDIR)/%: $(SRCDIR)/% -- $(CP) $< $@ -- --$(STATICLIB): $(MODULES) -- $(AR) rs $@ $(MODULES) -- --$(IMPORTLIB) $(EXPORTLIB): $(MODULES) -- $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES) -- --$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE) -- $(LD) $(LDFLAGS) -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LIBRARIES) -- --$(DISTDIR): -- $(MD) $(DISTDIR) -- --$(TARGETDIST): $(DISTDIR) -- --install: -- $(CP) $(SHAREDLIB) $(INSTALLDIR) -- --clean: -- $(RM) -f core $(DISTDIR)/*.* $(MODULES) $(RESOURCE) $(STATICLIB) $(SHAREDLIB) $(IMPORTLIB) $(EXPORTLIB) -+# MinGW makefile for FreeImage -+ -+# This file can be generated by ./gensrclist.sh -+include Makefile.srcs -+ -+CC = gcc -+CXX = g++ -+LD = g++ -+AR = ar -+DLLTOOL = dlltool -+RC = windres -+PKGCONFIG = pkg-config -+ -+CP = cp -+MD = mkdir -+RM = rm -+ -+# General configuration variables. -+DESTDIR ?= $(SystemRoot) -+INSTALLDIR ?= $(DESTDIR)/system32 -+DISTDIR ?= Dist -+SRCDIR ?= Source -+HEADER = FreeImage.h -+RCFILE = FreeImage.rc -+ -+# Uncomment this variable to make a static library. This may -+# also be specified as an environment variable and can hold -+# any of STATIC and SHARED and must be in uppercase letters. -+# The FreeImage library type defaults to SHARED. -+FREEIMAGE_LIBRARY_TYPE ?= SHARED -+ -+WIN32_STATIC_FLAGS = -DFREEIMAGE_LIB -+WIN32_SHARED_FLAGS = -DFREEIMAGE_EXPORTS -+ -+MODULES = $(SRCS:.c=.o) -+MODULES := $(MODULES:.cpp=.o) -+RESOURCE = $(RCFILE:.rc=.coff) -+CFLAGS += $(INCLUDE) -DDISABLE_PERF_MEASUREMENT $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS) -+CFLAGS += $(shell $(PKGCONFIG) --cflags libopenjp2 OpenEXR libpng libraw zlib libtiff-4 libwebp) -+CXXFLAGS += $(INCLUDE) $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS) -+CXXFLAGS += $(shell $(PKGCONFIG) --cflags libopenjp2 OpenEXR libpng libraw zlib libtiff-4 libwebp) -+LDFLAGS += -shared -Wl,-soname,$(SOLIBNAME) -+LDFLAGS += $(shell $(PKGCONFIG) --libs libopenjp2 OpenEXR libpng libraw zlib libtiff-4 libwebp libwebpdecoder libwebpdemux libwebpmux) -ljpeg -+ -+TARGET = freeimage -+STATICLIB = lib$(TARGET).a -+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll -+IMPORTLIB = lib$(TARGET).dll.a -+EXPORTLIB = $(TARGET).exp -+SOLIBNAME = $(SHAREDLIB) -+ -+DISTSHARED = $(addprefix $(DISTDIR)/, $(SHAREDLIB) $(IMPORTLIB) $(HEADER)) -+DISTSTATIC = $(addprefix $(DISTDIR)/, $(STATICLIB) $(HEADER)) -+ -+TARGETLIB = $($(FREEIMAGE_LIBRARY_TYPE)LIB) -+TARGETDIST = $(DIST$(FREEIMAGE_LIBRARY_TYPE)) -+ -+default: all -+ -+all: $(TARGETLIB) $(TARGETDIST) -+ -+rebuild: clean all -+ -+%.o: %.c -+ $(CC) $(CFLAGS) -c $< -o $@ -+ -+%.o: %.cpp -+ $(CXX) $(CXXFLAGS) -c $< -o $@ -+ -+%.coff: %.rc -+ $(RC) $(RCFLAGS) -o $@ $< -+ -+$(DISTDIR)/%: % -+ $(CP) $< $@ -+ -+$(DISTDIR)/%: $(SRCDIR)/% -+ $(CP) $< $@ -+ -+$(STATICLIB): $(MODULES) -+ $(AR) rs $@ $(MODULES) -+ -+$(IMPORTLIB) $(EXPORTLIB): $(MODULES) -+ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES) -+ -+$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE) -+ $(LD) -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS) -+ -+$(DISTDIR): -+ $(MD) $(DISTDIR) -+ -+$(TARGETDIST): $(DISTDIR) -+ -+clean: -+ $(RM) -f core $(DISTDIR)/*.* $(MODULES) $(RESOURCE) $(STATICLIB) $(SHAREDLIB) $(IMPORTLIB) $(EXPORTLIB) diff --git a/mingw-w64-FreeImage/FreeImage-3.16.0_unbundle.patch b/mingw-w64-FreeImage/FreeImage-3.16.0_unbundle.patch deleted file mode 100644 index 3e47c5e075..0000000000 --- a/mingw-w64-FreeImage/FreeImage-3.16.0_unbundle.patch +++ /dev/null @@ -1,594 +0,0 @@ -diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh ---- FreeImage/genfipsrclist.sh 2014-01-16 00:27:04.000000000 +0100 -+++ FreeImage-new/genfipsrclist.sh 2014-01-16 00:49:42.334523250 +0100 -@@ -1,6 +1,6 @@ - #!/bin/sh - --DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib Wrapper/FreeImagePlus" -+DIRLIST=" Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib Wrapper/FreeImagePlus" - - - echo "VER_MAJOR = 3" > fipMakefile.srcs -diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh ---- FreeImage/gensrclist.sh 2014-01-16 00:27:04.000000000 +0100 -+++ FreeImage-new/gensrclist.sh 2014-01-16 00:49:42.335523267 +0100 -@@ -1,6 +1,6 @@ - #!/bin/sh - --DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" -+DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" - - echo "VER_MAJOR = 3" > Makefile.srcs - echo "VER_MINOR = 16.0" >> Makefile.srcs -diff -rupN FreeImage/Source/FreeImage/J2KHelper.cpp FreeImage-new/Source/FreeImage/J2KHelper.cpp ---- FreeImage/Source/FreeImage/J2KHelper.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/J2KHelper.cpp 2014-01-16 00:49:42.335523267 +0100 -@@ -21,7 +21,7 @@ - - #include "FreeImage.h" - #include "Utilities.h" --#include "../LibOpenJPEG/openjpeg.h" -+#include - #include "J2KHelper.h" - - // -------------------------------------------------------------------------- -diff -rupN FreeImage/Source/FreeImage/PluginEXR.cpp FreeImage-new/Source/FreeImage/PluginEXR.cpp ---- FreeImage/Source/FreeImage/PluginEXR.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginEXR.cpp 2014-01-16 00:49:42.336523283 +0100 -@@ -22,16 +22,16 @@ - - #include "FreeImage.h" - #include "Utilities.h" --#include "../OpenEXR/IlmImf/ImfIO.h" --#include "../OpenEXR/Iex/Iex.h" --#include "../OpenEXR/IlmImf/ImfOutputFile.h" --#include "../OpenEXR/IlmImf/ImfInputFile.h" --#include "../OpenEXR/IlmImf/ImfRgbaFile.h" --#include "../OpenEXR/IlmImf/ImfChannelList.h" --#include "../OpenEXR/IlmImf/ImfRgba.h" --#include "../OpenEXR/IlmImf/ImfArray.h" --#include "../OpenEXR/IlmImf/ImfPreviewImage.h" --#include "../OpenEXR/Half/half.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - - // ========================================================== -diff -rupN FreeImage/Source/FreeImage/PluginJ2K.cpp FreeImage-new/Source/FreeImage/PluginJ2K.cpp ---- FreeImage/Source/FreeImage/PluginJ2K.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginJ2K.cpp 2014-01-16 00:49:42.336523283 +0100 -@@ -21,7 +21,7 @@ - - #include "FreeImage.h" - #include "Utilities.h" --#include "../LibOpenJPEG/openjpeg.h" -+#include - #include "J2KHelper.h" - - // ========================================================== -diff -rupN FreeImage/Source/FreeImage/PluginJP2.cpp FreeImage-new/Source/FreeImage/PluginJP2.cpp ---- FreeImage/Source/FreeImage/PluginJP2.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginJP2.cpp 2014-01-16 00:49:42.336523283 +0100 -@@ -21,7 +21,7 @@ - - #include "FreeImage.h" - #include "Utilities.h" --#include "../LibOpenJPEG/openjpeg.h" -+#include - #include "J2KHelper.h" - - // ========================================================== -diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeImage/PluginJPEG.cpp ---- FreeImage/Source/FreeImage/PluginJPEG.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginJPEG.cpp 2014-01-16 00:49:42.336523283 +0100 -@@ -35,9 +35,9 @@ extern "C" { - #undef FAR - #include - --#include "../LibJPEG/jinclude.h" --#include "../LibJPEG/jpeglib.h" --#include "../LibJPEG/jerror.h" -+#include -+#include -+#include - } - - #include "FreeImage.h" -diff -rupN FreeImage/Source/FreeImage/PluginPNG.cpp FreeImage-new/Source/FreeImage/PluginPNG.cpp ---- FreeImage/Source/FreeImage/PluginPNG.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginPNG.cpp 2014-01-16 00:49:42.337523300 +0100 -@@ -37,8 +37,8 @@ - - // ---------------------------------------------------------- - --#include "../ZLib/zlib.h" --#include "../LibPNG/png.h" -+#include -+#include - - // ---------------------------------------------------------- - -@@ -106,7 +106,11 @@ ReadMetadata(png_structp png_ptr, png_in - tag = FreeImage_CreateTag(); - if(!tag) return FALSE; - -+#ifdef PNG_iTXt_SUPPORTED - DWORD tag_length = (DWORD) MAX(text_ptr[i].text_length, text_ptr[i].itxt_length); -+#else -+ DWORD tag_length = text_ptr[i].text_length; -+#endif - - FreeImage_SetTagLength(tag, tag_length); - FreeImage_SetTagCount(tag, tag_length); -@@ -153,10 +157,11 @@ WriteMetadata(png_structp png_ptr, png_i - text_metadata.key = (char*)FreeImage_GetTagKey(tag); // keyword, 1-79 character description of "text" - text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "") - text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string -+#ifdef PNG_iTXt_SUPPORTED - text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string - text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer - text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer -- -+#endif - // set the tag - png_set_text(png_ptr, info_ptr, &text_metadata, 1); - -@@ -175,10 +180,11 @@ WriteMetadata(png_structp png_ptr, png_i - text_metadata.key = (char*)g_png_xmp_keyword; // keyword, 1-79 character description of "text" - text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "") - text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string -+#ifdef PNG_iTXt_SUPPORTED - text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string - text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer - text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer -- -+#endif - // set the tag - png_set_text(png_ptr, info_ptr, &text_metadata, 1); - bResult &= TRUE; -diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeImage/PluginRAW.cpp ---- FreeImage/Source/FreeImage/PluginRAW.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginRAW.cpp 2014-01-16 00:55:13.692904877 +0100 -@@ -19,7 +19,7 @@ - // Use at your own risk! - // ========================================================== - --#include "../LibRawLite/libraw/libraw.h" -+#include - - #include "FreeImage.h" - #include "Utilities.h" -diff -rupN FreeImage/Source/FreeImage/PluginTIFF.cpp FreeImage-new/Source/FreeImage/PluginTIFF.cpp ---- FreeImage/Source/FreeImage/PluginTIFF.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginTIFF.cpp 2014-01-16 00:49:42.337523300 +0100 -@@ -37,9 +37,9 @@ - - #include "FreeImage.h" - #include "Utilities.h" --#include "../LibTIFF4/tiffiop.h" -+#include - #include "../Metadata/FreeImageTag.h" --#include "../OpenEXR/Half/half.h" -+#include - - #include "FreeImageIO.h" - #include "PSDParser.h" -@@ -202,27 +202,9 @@ TIFFFdOpen(thandle_t handle, const char - _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, - _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); - -- // Warning: tif_fd is declared as 'int' currently (see libTIFF), -- // may result in incorrect file pointers inside libTIFF on -- // 64bit machines (sizeof(int) != sizeof(long)). -- // Needs to be fixed within libTIFF. -- if (tif) { -- tif->tif_fd = (long)handle; -- } -- - return tif; - } - --/** --Open a TIFF file for reading or writing --@param name --@param mode --*/ --TIFF* --TIFFOpen(const char* name, const char* mode) { -- return 0; --} -- - // ---------------------------------------------------------- - // TIFF library FreeImage-specific routines. - // ---------------------------------------------------------- -diff -rupN FreeImage/Source/FreeImage/PluginG3.cpp FreeImage-new/Source/FreeImage/PluginG3.cpp ---- FreeImage/Source/FreeImage/PluginG3.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginG3.cpp 2014-01-16 00:49:42.336523283 +0100 -@@ -20,7 +20,7 @@ - // Use at your own risk! - // ========================================================== - --#include "../LibTIFF4/tiffiop.h" -+#include - - #include "FreeImage.h" - #include "Utilities.h" -diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeImage/PluginWebP.cpp ---- FreeImage/Source/FreeImage/PluginWebP.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginWebP.cpp 2014-01-16 00:49:42.337523300 +0100 -@@ -37,10 +37,10 @@ - - #include "../Metadata/FreeImageTag.h" - --#include "../LibWebP/src/webp/decode.h" --#include "../LibWebP/src/webp/encode.h" --#include "../LibWebP/src/enc/vp8enci.h" --#include "../LibWebP/src/webp/mux.h" -+#include -+#include -+//#include "../LibWebP/src/enc/vp8enci.h" -+#include - - // ========================================================== - // Plugin Interface -diff -rupN FreeImage/Source/FreeImage/ZLibInterface.cpp FreeImage-new/Source/FreeImage/ZLibInterface.cpp ---- FreeImage/Source/FreeImage/ZLibInterface.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/ZLibInterface.cpp 2014-01-16 00:49:42.338523316 +0100 -@@ -19,10 +19,9 @@ - // Use at your own risk! - // ========================================================== - --#include "../ZLib/zlib.h" -+#include - #include "FreeImage.h" - #include "Utilities.h" --#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ - - /** - Compresses a source buffer into a target buffer, using the ZLib library. -@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD t - return 0; - case Z_OK: { - // patch header, setup crc and length (stolen from mod_trace_output) -- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code -+ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code (unix) - crc = crc32(crc, source, source_size); - memcpy(target + 4 + dest_len, &crc, 4); - memcpy(target + 8 + dest_len, &source_size, 4); -diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTIFF.cpp ---- FreeImage/Source/Metadata/XTIFF.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/Metadata/XTIFF.cpp 2014-01-16 00:49:42.338523316 +0100 -@@ -29,13 +29,22 @@ - #pragma warning (disable : 4786) // identifier was truncated to 'number' characters - #endif - --#include "../LibTIFF4/tiffiop.h" -+#include - - #include "FreeImage.h" - #include "Utilities.h" - #include "FreeImageTag.h" - #include "FIRational.h" - -+/* -+ * Caveat emperor this is a private libtiff functions which we need, -+ * there is no better solution I'm afraid. -+ */ -+extern "C" -+{ -+ int _TIFFDataSize(TIFFDataType type); -+} -+ - // ---------------------------------------------------------- - // Extended TIFF Directory GEO Tag Support - // ---------------------------------------------------------- -@@ -205,7 +214,7 @@ tiff_write_geotiff_profile(TIFF *tif, FI - Read a single exif tag - */ - static BOOL --tiff_read_exif_tag(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib, TagLib& tagLib, TIFFDirectory *td, uint32 tag) { -+tiff_read_exif_tag(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib, TagLib& tagLib, uint32 tag) { - const TIFFField *fip; - uint32 value_count; - int mem_alloc = 0; -@@ -226,8 +235,8 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - return TRUE; - } - -- if(fip->field_passcount) { //<- "passcount" means "returns count" -- if (fip->field_readcount != TIFF_VARIABLE2) { //<- TIFF_VARIABLE2 means "uses LONG count" -+ if(TIFFFieldPassCount(fip)) { //<- "passcount" means "returns count" -+ if (TIFFFieldReadCount(fip) != TIFF_VARIABLE2) { //<- TIFF_VARIABLE2 means "uses LONG count" - - // assume TIFF_VARIABLE (uses SHORT count) - uint16 value_count16; -@@ -244,35 +253,37 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - - // determine count - -- if (fip->field_readcount == TIFF_VARIABLE || fip->field_readcount == TIFF_VARIABLE2) { -+ if (TIFFFieldReadCount(fip) == TIFF_VARIABLE || TIFFFieldReadCount(fip) == TIFF_VARIABLE2) { - value_count = 1; -- } else if (fip->field_readcount == TIFF_SPP) { -- value_count = td->td_samplesperpixel; -+ } else if (TIFFFieldReadCount(fip) == TIFF_SPP) { -+ uint16 spp; -+ TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &spp); -+ value_count = spp; - } else { -- value_count = fip->field_readcount; -+ value_count = TIFFFieldReadCount(fip); - } - - // access fields as pointers to data - // (### determining this is NOT robust... and hardly can be. It is implemented looking the _TIFFVGetField code) - -- if(fip->field_tag == TIFFTAG_TRANSFERFUNCTION) { -+ if(TIFFFieldTag(fip) == TIFFTAG_TRANSFERFUNCTION) { - // reading this tag cause a bug probably located somewhere inside libtiff - return TRUE; - } - -- if ((fip->field_type == TIFF_ASCII -- || fip->field_readcount == TIFF_VARIABLE -- || fip->field_readcount == TIFF_VARIABLE2 -- || fip->field_readcount == TIFF_SPP -+ if ((TIFFFieldDataType(fip) == TIFF_ASCII -+ || TIFFFieldReadCount(fip) == TIFF_VARIABLE -+ || TIFFFieldReadCount(fip) == TIFF_VARIABLE2 -+ || TIFFFieldReadCount(fip) == TIFF_SPP - || value_count > 1) - -- && fip->field_tag != TIFFTAG_PAGENUMBER -- && fip->field_tag != TIFFTAG_HALFTONEHINTS -- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING -- && fip->field_tag != TIFFTAG_DOTRANGE -+ && TIFFFieldTag(fip) != TIFFTAG_PAGENUMBER -+ && TIFFFieldTag(fip) != TIFFTAG_HALFTONEHINTS -+ && TIFFFieldTag(fip) != TIFFTAG_YCBCRSUBSAMPLING -+ && TIFFFieldTag(fip) != TIFFTAG_DOTRANGE - -- && fip->field_tag != TIFFTAG_BITSPERSAMPLE //<- these two are tricky - -- && fip->field_tag != TIFFTAG_COMPRESSION //<- they are defined as TIFF_VARIABLE but in reality return a single value -+ && TIFFFieldTag(fip) != TIFFTAG_BITSPERSAMPLE //<- these two are tricky: -+ && TIFFFieldTag(fip) != TIFFTAG_COMPRESSION //<- they are defined as TIFF_VARIABLE but in reality return a single value - ) { - if(TIFFGetField(tif, tag, &raw_data) != 1) { - return TRUE; -@@ -281,7 +292,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - - // access fields as values - -- const int value_size = _TIFFDataSize(fip->field_type); -+ const int value_size = _TIFFDataSize((TIFFFieldDataType(fip))); - raw_data = _TIFFmalloc(value_size * value_count); - mem_alloc = 1; - int ok = FALSE; -@@ -302,7 +313,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - break; - */ - default: -- FreeImage_OutputMessageProc(FIF_TIFF, "Unimplemented variable number of parameters for Tiff Tag %s", fip->field_name); -+ FreeImage_OutputMessageProc(FIF_TIFF, "Unimplemented variable number of parameters for Tiff Tag %s", TIFFFieldName(fip)); - break; - } - if(ok != 1) { -@@ -325,59 +336,59 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - FreeImage_SetTagID(fitag, (WORD)tag); - FreeImage_SetTagKey(fitag, key); - -- switch(fip->field_type) { -+ switch(TIFFFieldDataType(fip)) { - case TIFF_BYTE: - FreeImage_SetTagType(fitag, FIDT_BYTE); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_UNDEFINED: - FreeImage_SetTagType(fitag, FIDT_UNDEFINED); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SBYTE: - FreeImage_SetTagType(fitag, FIDT_SBYTE); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SHORT: - FreeImage_SetTagType(fitag, FIDT_SHORT); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SSHORT: - FreeImage_SetTagType(fitag, FIDT_SSHORT); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_LONG: - FreeImage_SetTagType(fitag, FIDT_LONG); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_IFD: - FreeImage_SetTagType(fitag, FIDT_IFD); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SLONG: - FreeImage_SetTagType(fitag, FIDT_SLONG); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; -@@ -392,7 +403,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - rvalue[2*i+1] = rational.getDenominator(); - } - FreeImage_SetTagType(fitag, FIDT_RATIONAL); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, rvalue); - free(rvalue); -@@ -409,7 +420,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - rvalue[2*i+1] = rational.getDenominator(); - } - FreeImage_SetTagType(fitag, FIDT_RATIONAL); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, rvalue); - free(rvalue); -@@ -418,35 +429,35 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD - - case TIFF_FLOAT: - FreeImage_SetTagType(fitag, FIDT_FLOAT); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_DOUBLE: - FreeImage_SetTagType(fitag, FIDT_DOUBLE); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_LONG8: // BigTIFF 64-bit unsigned integer - FreeImage_SetTagType(fitag, FIDT_LONG8); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_IFD8: // BigTIFF 64-bit unsigned integer (offset) - FreeImage_SetTagType(fitag, FIDT_IFD8); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SLONG8: // BigTIFF 64-bit signed integer - FreeImage_SetTagType(fitag, FIDT_SLONG8); -- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count); -+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; -@@ -489,16 +500,16 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M - - TagLib& tagLib = TagLib::instance(); - -- TIFFDirectory *td = &tif->tif_dir; -- - count = (short) TIFFGetTagListCount(tif); - for(i = 0; i < count; i++) { - uint32 tag = TIFFGetTagListEntry(tif, i); - // read the tag -- if (!tiff_read_exif_tag(tif, md_model, dib, tagLib, td, tag)) -+ if (!tiff_read_exif_tag(tif, md_model, dib, tagLib, tag)) - return FALSE; - } - -+/* Disabled for Fedora as it is using internal library structures. */ -+#if 0 - // we want to know values of standard tags too!! - - // loop over all Core Directory Tags -@@ -533,13 +544,14 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M - - // process *all* other tags (some will be ignored) - -- tiff_read_exif_tag(tif, md_model, dib, tagLib, td, fld->field_tag); -+ tiff_read_exif_tag(tif, md_model, dib, tagLib, fld->field_tag); - - - lastTag = fld->field_tag; - } - - } -+#endif - - return TRUE; - -@@ -611,6 +623,10 @@ Write all known exif tags - */ - BOOL - tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { -+/* Disabled for Fedora as it is using internal library structures. Siberia -+ * winter on upstream developer! :-) */ -+ return FALSE; -+#if 0 - char defaultKey[16]; - - // only EXIF_MAIN so far -@@ -662,4 +678,5 @@ tiff_write_exif_tags(TIFF *tif, TagLib:: - } - - return TRUE; -+#endif - } -diff -rupN FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp ---- FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp 2014-01-16 00:49:42.338523316 +0100 -@@ -26,10 +26,10 @@ - #undef FAR - #include - --#include "../LibJPEG/jinclude.h" --#include "../LibJPEG/jpeglib.h" --#include "../LibJPEG/jerror.h" --#include "../LibJPEG/transupp.h" -+#include -+#include -+#include -+#include - } - - #include "FreeImage.h" -diff -rupN FreeImage/Source/LibJXR/image/sys/strcodec.c FreeImage-new/Source/LibJXR/image/sys/strcodec.c ---- FreeImage/Source/LibJXR/image/sys/strcodec.c 2014-01-16 00:27:03.000000000 +0100 -+++ FreeImage-new/Source/LibJXR/image/sys/strcodec.c 2014-01-16 00:49:42.338523316 +0100 -@@ -664,7 +664,7 @@ - //================================================================ - // Memory access functions - //================================================================ --#if (defined(WIN32) && !defined(UNDER_CE) && !defined(__MINGW32__)) || (defined(UNDER_CE) && defined(_ARM_)) -+#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_)) - // WinCE ARM and Desktop x86 - #else - // other platform diff --git a/mingw-w64-FreeImage/FreeImage-3.17.0_CVE-2015-0852.patch b/mingw-w64-FreeImage/FreeImage-3.17.0_CVE-2015-0852.patch new file mode 100644 index 0000000000..19ec93a10e --- /dev/null +++ b/mingw-w64-FreeImage/FreeImage-3.17.0_CVE-2015-0852.patch @@ -0,0 +1,216 @@ +diff -rupN FreeImage/Source/FreeImage/PluginPCX.cpp FreeImage-new/Source/FreeImage/PluginPCX.cpp +--- FreeImage/Source/FreeImage/PluginPCX.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginPCX.cpp 2015-09-05 02:44:55.429436425 +0200 +@@ -30,7 +30,7 @@ + // Constants + headers + // ---------------------------------------------------------- + +-#define IO_BUF_SIZE 2048 ++#define PCX_IO_BUF_SIZE 2048 + + // ---------------------------------------------------------- + +@@ -120,17 +120,17 @@ readline(FreeImageIO &io, fi_handle hand + + while (length--) { + if (count == 0) { +- if (*ReadPos >= IO_BUF_SIZE - 1 ) { +- if (*ReadPos == IO_BUF_SIZE - 1) { ++ if (*ReadPos >= PCX_IO_BUF_SIZE - 1 ) { ++ if (*ReadPos == PCX_IO_BUF_SIZE - 1) { + // we still have one BYTE, copy it to the start pos + +- *ReadBuf = ReadBuf[IO_BUF_SIZE - 1]; ++ *ReadBuf = ReadBuf[PCX_IO_BUF_SIZE - 1]; + +- io.read_proc(ReadBuf + 1, 1, IO_BUF_SIZE - 1, handle); ++ io.read_proc(ReadBuf + 1, 1, PCX_IO_BUF_SIZE - 1, handle); + } else { + // read the complete buffer + +- io.read_proc(ReadBuf, 1, IO_BUF_SIZE, handle); ++ io.read_proc(ReadBuf, 1, PCX_IO_BUF_SIZE, handle); + } + + *ReadPos = 0; +@@ -346,19 +346,9 @@ Load(FreeImageIO *io, fi_handle handle, + BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; + + try { +- // check PCX identifier +- +- long start_pos = io->tell_proc(handle); +- BOOL validated = pcx_validate(io, handle); +- io->seek_proc(handle, start_pos, SEEK_SET); +- if(!validated) { +- throw FI_MSG_ERROR_MAGIC_NUMBER; +- } +- +- // process the header +- + PCXHEADER header; + ++ // process the header + if(io->read_proc(&header, sizeof(PCXHEADER), 1, handle) != 1) { + throw FI_MSG_ERROR_PARSING; + } +@@ -366,20 +356,38 @@ Load(FreeImageIO *io, fi_handle handle, + SwapHeader(&header); + #endif + +- // allocate a new DIB ++ // process the window ++ const WORD *window = header.window; // left, upper, right,lower pixel coord. ++ const int left = window[0]; ++ const int top = window[1]; ++ const int right = window[2]; ++ const int bottom = window[3]; + +- unsigned width = header.window[2] - header.window[0] + 1; +- unsigned height = header.window[3] - header.window[1] + 1; +- unsigned bitcount = header.bpp * header.planes; +- +- if (bitcount == 24) { +- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); +- } else { +- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); ++ // check image size ++ if((left >= right) || (top >= bottom)) { ++ throw FI_MSG_ERROR_PARSING; + } + +- // if the dib couldn't be allocated, throw an error ++ const unsigned width = right - left + 1; ++ const unsigned height = bottom - top + 1; ++ const unsigned bitcount = header.bpp * header.planes; + ++ // allocate a new dib ++ switch(bitcount) { ++ case 1: ++ case 4: ++ case 8: ++ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); ++ break; ++ case 24: ++ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); ++ break; ++ default: ++ throw FI_MSG_ERROR_DIB_MEMORY; ++ break; ++ } ++ ++ // if the dib couldn't be allocated, throw an error + if (!dib) { + throw FI_MSG_ERROR_DIB_MEMORY; + } +@@ -426,19 +434,23 @@ Load(FreeImageIO *io, fi_handle handle, + + if (palette_id == 0x0C) { + BYTE *cmap = (BYTE*)malloc(768 * sizeof(BYTE)); +- io->read_proc(cmap, 768, 1, handle); + +- pal = FreeImage_GetPalette(dib); +- BYTE *pColormap = &cmap[0]; ++ if(cmap) { ++ io->read_proc(cmap, 768, 1, handle); + +- for(int i = 0; i < 256; i++) { +- pal[i].rgbRed = pColormap[0]; +- pal[i].rgbGreen = pColormap[1]; +- pal[i].rgbBlue = pColormap[2]; +- pColormap += 3; ++ pal = FreeImage_GetPalette(dib); ++ BYTE *pColormap = &cmap[0]; ++ ++ for(int i = 0; i < 256; i++) { ++ pal[i].rgbRed = pColormap[0]; ++ pal[i].rgbGreen = pColormap[1]; ++ pal[i].rgbBlue = pColormap[2]; ++ pColormap += 3; ++ } ++ ++ free(cmap); + } + +- free(cmap); + } + + // wrong palette ID, perhaps a gray scale is needed ? +@@ -463,12 +475,12 @@ Load(FreeImageIO *io, fi_handle handle, + return dib; + } + +- // calculate the line length for the PCX and the DIB ++ // calculate the line length for the PCX and the dib + + // length of raster line in bytes +- unsigned linelength = header.bytes_per_line * header.planes; +- // length of DIB line (rounded to DWORD) in bytes +- unsigned pitch = FreeImage_GetPitch(dib); ++ const unsigned linelength = header.bytes_per_line * header.planes; ++ // length of dib line (rounded to DWORD) in bytes ++ const unsigned pitch = FreeImage_GetPitch(dib); + + // run-length encoding ? + +@@ -478,14 +490,18 @@ Load(FreeImageIO *io, fi_handle handle, + // --------------- + + line = (BYTE*)malloc(linelength * sizeof(BYTE)); +- if(!line) throw FI_MSG_ERROR_MEMORY; ++ if(!line) { ++ throw FI_MSG_ERROR_MEMORY; ++ } + +- ReadBuf = (BYTE*)malloc(IO_BUF_SIZE * sizeof(BYTE)); +- if(!ReadBuf) throw FI_MSG_ERROR_MEMORY; ++ ReadBuf = (BYTE*)malloc(PCX_IO_BUF_SIZE * sizeof(BYTE)); ++ if(!ReadBuf) { ++ throw FI_MSG_ERROR_MEMORY; ++ } + + bits = FreeImage_GetScanLine(dib, height - 1); + +- int ReadPos = IO_BUF_SIZE; ++ int ReadPos = PCX_IO_BUF_SIZE; + + if ((header.planes == 1) && ((header.bpp == 1) || (header.bpp == 8))) { + BYTE skip; +@@ -497,7 +513,7 @@ Load(FreeImageIO *io, fi_handle handle, + // skip trailing garbage at the end of the scanline + + for (unsigned count = written; count < linelength; count++) { +- if (ReadPos < IO_BUF_SIZE) { ++ if (ReadPos < PCX_IO_BUF_SIZE) { + ReadPos++; + } else { + io->read_proc(&skip, sizeof(BYTE), 1, handle); +@@ -513,7 +529,9 @@ Load(FreeImageIO *io, fi_handle handle, + unsigned x, y, written; + + buffer = (BYTE*)malloc(width * sizeof(BYTE)); +- if(!buffer) throw FI_MSG_ERROR_MEMORY; ++ if(!buffer) { ++ throw FI_MSG_ERROR_MEMORY; ++ } + + for (y = 0; y < height; y++) { + written = readline(*io, handle, line, linelength, bIsRLE, ReadBuf, &ReadPos); +@@ -532,7 +550,7 @@ Load(FreeImageIO *io, fi_handle handle, + } + } + +- // then write the DIB row ++ // then write the dib row + + for (x = 0; x < width / 2; x++) { + bits[x] = (buffer[2*x] << 4) | buffer[2*x+1]; +@@ -541,7 +559,7 @@ Load(FreeImageIO *io, fi_handle handle, + // skip trailing garbage at the end of the scanline + + for (unsigned count = written; count < linelength; count++) { +- if (ReadPos < IO_BUF_SIZE) { ++ if (ReadPos < PCX_IO_BUF_SIZE) { + ReadPos++; + } else { + io->read_proc(&skip, sizeof(BYTE), 1, handle); diff --git a/mingw-w64-FreeImage/FreeImage-3.17.0_mingw-makefiles.patch b/mingw-w64-FreeImage/FreeImage-3.17.0_mingw-makefiles.patch new file mode 100644 index 0000000000..ab125eee76 --- /dev/null +++ b/mingw-w64-FreeImage/FreeImage-3.17.0_mingw-makefiles.patch @@ -0,0 +1,167 @@ +diff -rupN FreeImage/Makefile.fip FreeImage-new/Makefile.fip +--- FreeImage/Makefile.fip 2015-09-17 22:51:21.797196208 +0200 ++++ FreeImage-new/Makefile.fip 2015-09-24 01:18:01.576395215 +0200 +@@ -3,6 +3,14 @@ + # This file can be generated by ./genfipsrclist.sh + include fipMakefile.srcs + ++CC = gcc ++CXX = g++ ++LD = g++ ++AR = ar ++DLLTOOL = dlltool ++RC = windres ++PKGCONFIG = pkg-config ++ + # General configuration variables: + DESTDIR ?= / + INCDIR ?= $(DESTDIR)/usr/include +@@ -24,24 +32,21 @@ override CFLAGS += -DNO_LCMS + override CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ + override CFLAGS += $(INCLUDE) + CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy ++override CXXFLAGS += -DFIP_EXPORTS + # LibJXR + override CXXFLAGS += -D__ANSI__ + override CXXFLAGS += $(INCLUDE) + LDFLAGS ?= +-override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR).$(VER_MINOR) +- +-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- override CFLAGS += -fPIC +- override CXXFLAGS += -fPIC +-endif ++override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR) -lgdi32 + + TARGET = freeimageplus + STATICLIB = lib$(TARGET).a +-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so +-LIBNAME = lib$(TARGET).so +-VERLIBNAME = $(LIBNAME).$(VER_MAJOR) ++SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll ++IMPORTLIB = lib$(TARGET).dll.a ++EXPORTLIB = lib$(TARGET).exp + HEADER = Source/FreeImage.h + HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h ++RCFILE = Wrapper/FreeImagePlus/FreeImagePlus.rc + + + default: all +@@ -51,7 +56,8 @@ all: dist + dist: FreeImage + mkdir -p Dist + cp *.a Dist/ +- cp *.so Dist/ ++ cp *.dll Dist/ ++ cp *.dll.a Dist/ + cp Source/FreeImage.h Dist/ + cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist/ + +@@ -66,21 +72,14 @@ FreeImage: $(STATICLIB) $(SHAREDLIB) + .cpp.o: + $(CXX) $(CXXFLAGS) -c $< -o $@ + +-$(STATICLIB): $(MODULES) +- $(AR) r $@ $(MODULES) ++%.coff: %.rc ++ $(RC) $(RCFLAGS) -o $@ $< + +-$(SHAREDLIB): $(MODULES) +- $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) +- +-install: +- install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) +- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) +- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) ++$(STATICLIB): $(MODULES) ++ $(AR) rs $@ $(MODULES) + +-clean: +- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME) ++$(IMPORTLIB) $(EXPORTLIB): $(MODULES) ++ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES) + ++$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE) ++ $(LD) -shared -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS) +diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu +--- FreeImage/Makefile.gnu 2015-09-17 22:51:21.798196232 +0200 ++++ FreeImage-new/Makefile.gnu 2015-09-24 01:24:52.381788259 +0200 +@@ -3,6 +3,14 @@ + # This file can be generated by ./gensrclist.sh + include Makefile.srcs + ++CC = gcc ++CXX = g++ ++LD = g++ ++AR = ar ++DLLTOOL = dlltool ++RC = windres ++PKGCONFIG = pkg-config ++ + # General configuration variables: + DESTDIR ?= / + INCDIR ?= $(DESTDIR)/usr/include +@@ -16,18 +24,14 @@ LIBRARIES = -lstdc++ + MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden +-override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib) +-override LDFLAGS += -ljpeg -ljpegxr $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib) +- +-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- override CFLAGS += -fPIC +-endif ++override CFLAGS += $(INCLUDE) -D__ANSI__ -DFREEIMAGE_EXPORTS -I/mingw32/include/jxrlib -I/mingw64/include/jxrlib $(shell ${PKGCONFIG} --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override LDFLAGS += -ljpeg -ljpegxr -ljxrglue $(shell ${PKGCONFIG} --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) + + TARGET = freeimage + STATICLIB = lib$(TARGET).a +-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so +-LIBNAME = lib$(TARGET).so +-VERLIBNAME = $(LIBNAME).$(VER_MAJOR) ++SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll ++IMPORTLIB = lib$(TARGET).dll.a ++EXPORTLIB = lib$(TARGET).exp + HEADER = Source/FreeImage.h + + +@@ -39,7 +43,8 @@ all: dist + dist: FreeImage + mkdir -p Dist + cp *.a Dist/ +- cp *.so Dist/ ++ cp *.dll Dist/ ++ cp *.dll.a Dist/ + cp Source/FreeImage.h Dist/ + + dos2unix: +@@ -54,20 +59,10 @@ FreeImage: $(STATICLIB) $(SHAREDLIB) + $(CXX) $(CFLAGS) -c $< -o $@ + + $(STATICLIB): $(MODULES) +- $(AR) r $@ $(MODULES) +- +-$(SHAREDLIB): $(MODULES) +- $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) +- +-install: +- install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) +- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) +- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) +-# ldconfig ++ $(AR) rs $@ $(MODULES) + +-clean: +- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME) ++$(IMPORTLIB) $(EXPORTLIB): $(MODULES) ++ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES) + ++$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE) ++ $(LD) -shared -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS) diff --git a/mingw-w64-FreeImage/FreeImage-3.17.0_unbundle.patch b/mingw-w64-FreeImage/FreeImage-3.17.0_unbundle.patch new file mode 100644 index 0000000000..d5729bc108 --- /dev/null +++ b/mingw-w64-FreeImage/FreeImage-3.17.0_unbundle.patch @@ -0,0 +1,548 @@ +diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh +--- FreeImage/genfipsrclist.sh 2015-02-20 10:52:16.000000000 +0100 ++++ FreeImage-new/genfipsrclist.sh 2015-09-05 02:13:52.041353305 +0200 +@@ -1,6 +1,6 @@ + #!/bin/sh + +-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/OpenEXR/IexMath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib Wrapper/FreeImagePlus" ++DIRLIST="Wrapper/FreeImagePlus" + + + echo "VER_MAJOR = 3" > fipMakefile.srcs +@@ -19,5 +19,6 @@ echo -n "INCLUDE =" >> fipMakefile.srcs + for DIR in $DIRLIST; do + echo -n " -I$DIR" >> fipMakefile.srcs + done ++echo -n " -IDist" >> fipMakefile.srcs + echo >> fipMakefile.srcs + +diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh +--- FreeImage/gensrclist.sh 2015-02-20 10:51:50.000000000 +0100 ++++ FreeImage-new/gensrclist.sh 2015-09-05 02:13:52.041353305 +0200 +@@ -1,6 +1,6 @@ + #!/bin/sh + +-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/OpenEXR/IexMath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" ++DIRLIST=". Source Source/Metadata Source/FreeImageToolkit" + + echo "VER_MAJOR = 3" > Makefile.srcs + echo "VER_MINOR = 17.0" >> Makefile.srcs +diff -rupN FreeImage/Makefile.fip FreeImage-new/Makefile.fip +--- FreeImage/Makefile.fip 2015-03-08 18:03:56.000000000 +0100 ++++ FreeImage-new/Makefile.fip 2015-09-05 02:14:09.212684028 +0200 +@@ -17,20 +17,22 @@ MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden + # OpenJPEG +-CFLAGS += -DOPJ_STATIC ++override CFLAGS += -DOPJ_STATIC + # LibRaw +-CFLAGS += -DNO_LCMS ++override CFLAGS += -DNO_LCMS + # LibJXR +-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ +-CFLAGS += $(INCLUDE) ++override CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ ++override CFLAGS += $(INCLUDE) + CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy + # LibJXR +-CXXFLAGS += -D__ANSI__ +-CXXFLAGS += $(INCLUDE) ++override CXXFLAGS += -D__ANSI__ ++override CXXFLAGS += $(INCLUDE) ++LDFLAGS ?= ++override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR).$(VER_MINOR) + + ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- CFLAGS += -fPIC +- CXXFLAGS += -fPIC ++ override CFLAGS += -fPIC ++ override CXXFLAGS += -fPIC + endif + + TARGET = freeimageplus +@@ -68,7 +70,7 @@ $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu +--- FreeImage/Makefile.gnu 2015-03-08 18:04:00.000000000 +0100 ++++ FreeImage-new/Makefile.gnu 2015-09-05 02:14:04.810599259 +0200 +@@ -16,21 +16,11 @@ LIBRARIES = -lstdc++ + MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden +-# OpenJPEG +-CFLAGS += -DOPJ_STATIC +-# LibRaw +-CFLAGS += -DNO_LCMS +-# LibJXR +-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ +-CFLAGS += $(INCLUDE) +-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy +-# LibJXR +-CXXFLAGS += -D__ANSI__ +-CXXFLAGS += $(INCLUDE) ++override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib) ++override LDFLAGS += -ljpeg -ljpegxr $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib) + + ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- CFLAGS += -fPIC +- CXXFLAGS += -fPIC ++ override CFLAGS += -fPIC + endif + + TARGET = freeimage +@@ -61,13 +51,13 @@ FreeImage: $(STATICLIB) $(SHAREDLIB) + $(CC) $(CFLAGS) -c $< -o $@ + + .cpp.o: +- $(CXX) $(CXXFLAGS) -c $< -o $@ ++ $(CXX) $(CFLAGS) -c $< -o $@ + + $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +diff -rupN FreeImage/Source/FreeImage/J2KHelper.cpp FreeImage-new/Source/FreeImage/J2KHelper.cpp +--- FreeImage/Source/FreeImage/J2KHelper.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/J2KHelper.cpp 2015-09-05 02:13:52.042353324 +0200 +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // -------------------------------------------------------------------------- +diff -rupN FreeImage/Source/FreeImage/Plugin.cpp FreeImage-new/Source/FreeImage/Plugin.cpp +--- FreeImage/Source/FreeImage/Plugin.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/Plugin.cpp 2015-09-05 02:13:52.042353324 +0200 +@@ -263,7 +263,12 @@ FreeImage_Initialise(BOOL load_local_plu + s_plugins->AddNode(InitDDS); + s_plugins->AddNode(InitGIF); + s_plugins->AddNode(InitHDR); +- s_plugins->AddNode(InitG3); ++/* The G3 fax format plugin is deliberately disabled in the Fedora build of ++ FreeImage as it requires that FreeImage uses a private copy of libtiff ++ which is a no no because of security reasons. */ ++#if 0 ++ s_plugins->AddNode(InitG3); ++#endif + s_plugins->AddNode(InitSGI); + s_plugins->AddNode(InitEXR); + s_plugins->AddNode(InitJ2K); +diff -rupN FreeImage/Source/FreeImage/PluginEXR.cpp FreeImage-new/Source/FreeImage/PluginEXR.cpp +--- FreeImage/Source/FreeImage/PluginEXR.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginEXR.cpp 2015-09-05 02:13:52.042353324 +0200 +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + // ========================================================== +diff -rupN FreeImage/Source/FreeImage/PluginJ2K.cpp FreeImage-new/Source/FreeImage/PluginJ2K.cpp +--- FreeImage/Source/FreeImage/PluginJ2K.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJ2K.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== +diff -rupN FreeImage/Source/FreeImage/PluginJP2.cpp FreeImage-new/Source/FreeImage/PluginJP2.cpp +--- FreeImage/Source/FreeImage/PluginJP2.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJP2.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== +diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeImage/PluginJPEG.cpp +--- FreeImage/Source/FreeImage/PluginJPEG.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJPEG.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -35,9 +35,9 @@ extern "C" { + #undef FAR + #include + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" ++#include ++#include ++#include + } + + #include "FreeImage.h" +diff -rupN FreeImage/Source/FreeImage/PluginJXR.cpp FreeImage-new/Source/FreeImage/PluginJXR.cpp +--- FreeImage/Source/FreeImage/PluginJXR.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJXR.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -23,7 +23,7 @@ + #include "Utilities.h" + #include "../Metadata/FreeImageTag.h" + +-#include "../LibJXR/jxrgluelib/JXRGlue.h" ++#include + + // ========================================================== + // Plugin Interface +diff -rupN FreeImage/Source/FreeImage/PluginPNG.cpp FreeImage-new/Source/FreeImage/PluginPNG.cpp +--- FreeImage/Source/FreeImage/PluginPNG.cpp 2015-03-10 20:16:12.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginPNG.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -40,8 +40,8 @@ + + // ---------------------------------------------------------- + +-#include "../ZLib/zlib.h" +-#include "../LibPNG/png.h" ++#include ++#include + + // ---------------------------------------------------------- + +diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeImage/PluginRAW.cpp +--- FreeImage/Source/FreeImage/PluginRAW.cpp 2015-03-08 20:12:04.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginRAW.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -19,7 +19,7 @@ + // Use at your own risk! + // ========================================================== + +-#include "../LibRawLite/libraw/libraw.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" +diff -rupN FreeImage/Source/FreeImage/PluginTIFF.cpp FreeImage-new/Source/FreeImage/PluginTIFF.cpp +--- FreeImage/Source/FreeImage/PluginTIFF.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginTIFF.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -37,9 +37,9 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -194,16 +194,6 @@ TIFFFdOpen(thandle_t handle, const char + return tif; + } + +-/** +-Open a TIFF file for reading or writing +-@param name +-@param mode +-*/ +-TIFF* +-TIFFOpen(const char* name, const char* mode) { +- return 0; +-} +- + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- +diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeImage/PluginWebP.cpp +--- FreeImage/Source/FreeImage/PluginWebP.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginWebP.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -24,10 +24,10 @@ + + #include "../Metadata/FreeImageTag.h" + +-#include "../LibWebP/src/webp/decode.h" +-#include "../LibWebP/src/webp/encode.h" +-#include "../LibWebP/src/enc/vp8enci.h" +-#include "../LibWebP/src/webp/mux.h" ++#include ++#include ++// #include "../LibWebP/src/enc/vp8enci.h" ++#include + + // ========================================================== + // Plugin Interface +diff -rupN FreeImage/Source/FreeImage/ZLibInterface.cpp FreeImage-new/Source/FreeImage/ZLibInterface.cpp +--- FreeImage/Source/FreeImage/ZLibInterface.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/ZLibInterface.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -19,10 +19,9 @@ + // Use at your own risk! + // ========================================================== + +-#include "../ZLib/zlib.h" ++#include + #include "FreeImage.h" + #include "Utilities.h" +-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ + + /** + Compresses a source buffer into a target buffer, using the ZLib library. +@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD t + return 0; + case Z_OK: { + // patch header, setup crc and length (stolen from mod_trace_output) +- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code ++ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code (unix) + crc = crc32(crc, source, source_size); + memcpy(target + 4 + dest_len, &crc, 4); + memcpy(target + 8 + dest_len, &source_size, 4); +diff -rupN FreeImage/Source/FreeImage.h FreeImage-new/Source/FreeImage.h +--- FreeImage/Source/FreeImage.h 2015-03-04 02:17:54.000000000 +0100 ++++ FreeImage-new/Source/FreeImage.h 2015-09-05 02:13:52.045353382 +0200 +@@ -155,8 +155,11 @@ typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; + typedef int32_t LONG; ++// Disable these, they conflict with the (wrong) ones of libraw ++#if 0 + typedef int64_t INT64; + typedef uint64_t UINT64; ++#endif + #else + // MS is not C99 ISO compliant + typedef long BOOL; +@@ -410,7 +413,12 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, +- FIF_FAXG3 = 27, ++/* The G3 fax format plugin is deliberately disabled in the Fedora build of ++ FreeImage as it requires that FreeImage uses a private copy of libtiff ++ which is a no no because of security reasons. */ ++#if 0 ++ FIF_FAXG3 = 27, ++#endif + FIF_SGI = 28, + FIF_EXR = 29, + FIF_J2K = 30, +@@ -473,6 +481,10 @@ FI_ENUM(FREE_IMAGE_DITHER) { + FID_BAYER16x16 = 6 //! Bayer ordered dispersed dot dithering (order 4 dithering matrix) + }; + ++/* The FreeImage_JPEGTransform functions are deliberately disabled in the ++ Fedora build of FreeImage as they require that FreeImage uses a private copy ++ of libjpeg which is a no no because of security reasons. */ ++#if 0 + /** Lossless JPEG transformations + Constants used in FreeImage_JPEGTransform + */ +@@ -486,6 +498,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) + }; ++#endif + + /** Tone mapping operators. + Constants used in FreeImage_ToneMapping. +@@ -1076,7 +1089,10 @@ DLL_API const char* DLL_CALLCONV FreeIma + // -------------------------------------------------------------------------- + // JPEG lossless transformation routines + // -------------------------------------------------------------------------- +- ++/* The FreeImage_JPEGTransform functions are deliberately disabled in the +++ Fedora build of FreeImage as they require that FreeImage uses a private copy +++ of libjpeg which is a no no because of security reasons. */ ++#if 0 + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +@@ -1085,6 +1101,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEG + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); ++#endif + + + // -------------------------------------------------------------------------- +diff -rupN FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp +--- FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp 2015-09-05 02:13:52.045353382 +0200 +@@ -26,10 +26,10 @@ extern "C" { + #undef FAR + #include + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" +-#include "../LibJPEG/transupp.h" ++#include ++#include ++#include ++#include + } + + #include "FreeImage.h" +diff -rupN FreeImage/Source/Metadata/TagConversion.cpp FreeImage-new/Source/Metadata/TagConversion.cpp +--- FreeImage/Source/Metadata/TagConversion.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/Metadata/TagConversion.cpp 2015-09-05 02:13:52.045353382 +0200 +@@ -30,6 +30,11 @@ + + #define MAX_TEXT_EXTENT 512 + ++// These were in FreeImage.h, but are moved here to avoid conflicts (see note in FreeImage.h) ++typedef int64_t INT64; ++typedef uint64_t UINT64; ++ ++ + /** + Convert a tag to a C string + */ +diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTIFF.cpp +--- FreeImage/Source/Metadata/XTIFF.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/Metadata/XTIFF.cpp 2015-09-05 02:13:52.045353382 +0200 +@@ -29,13 +29,18 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + +-#include "../LibTIFF4/tiffiop.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" + #include "FreeImageTag.h" + #include "FIRational.h" + ++extern "C" ++{ ++ int _TIFFDataSize(TIFFDataType type); ++} ++ + // ---------------------------------------------------------- + // Extended TIFF Directory GEO Tag Support + // ---------------------------------------------------------- +@@ -224,6 +229,33 @@ tiff_write_geotiff_profile(TIFF *tif, FI + // TIFF EXIF tag reading & writing + // ---------------------------------------------------------- + ++static uint32 exif_tag_ids[] = { ++ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM, ++ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF, ++ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED, ++ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL, ++ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE, ++ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE, ++ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE, ++ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH, ++ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT, ++ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL, ++ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE, ++ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION, ++ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY, ++ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION, ++ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT, ++ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD, ++ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN, ++ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE, ++ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM, ++ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST, ++ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION, ++ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL, ++ EXIFTAG_IMAGEUNIQUEID ++}; ++static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]); ++ + /** + Read a single Exif tag + +@@ -575,45 +607,11 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M + + // loop over all Core Directory Tags + // ### uses private data, but there is no other way ++ // -> Fedora: Best we can do without private headers is to hard-code a list of known EXIF tags and read those + if(md_model == TagLib::EXIF_MAIN) { +- const TIFFDirectory *td = &tif->tif_dir; +- +- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) +- +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); +- +- if(tag_id == lastTag) { +- continue; +- } +- +- // test if tag value is set +- // (lifted directly from LibTiff _TIFFWriteDirectory) +- +- if( fld->field_bit == FIELD_CUSTOM ) { +- int is_set = FALSE; +- +- for(int ci = 0; ci < td->td_customValueCount; ci++ ) { +- is_set |= (td->td_customValues[ci].info == fld); +- } +- +- if( !is_set ) { +- continue; +- } +- +- } else if(!TIFFFieldSet(tif, fld->field_bit)) { +- continue; +- } +- +- // process *all* other tags (some will be ignored) +- +- tiff_read_exif_tag(tif, tag_id, dib, md_model); +- +- lastTag = tag_id; ++ for (int i = 0; i < nExifTags; ++i) { ++ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model); + } +- + } + + return TRUE; +@@ -723,10 +721,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib:: + + TagLib& tag_lib = TagLib::instance(); + +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); ++ for (int fi = 0; fi < nExifTags; fi++) { ++ const uint32 tag_id = exif_tag_ids[fi]; ++ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id); + + if(skip_write_field(tif, tag_id)) { + // skip tags that are already handled by the LibTIFF writing process diff --git a/mingw-w64-FreeImage/PKGBUILD b/mingw-w64-FreeImage/PKGBUILD index 1ad0dd9f4c..811d4ecc5b 100644 --- a/mingw-w64-FreeImage/PKGBUILD +++ b/mingw-w64-FreeImage/PKGBUILD @@ -1,67 +1,61 @@ # Maintainer: Alexey Pavlov _realname=FreeImage +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.16.0 -pkgrel=5 +pkgver=3.17.0 +pkgrel=1 pkgdesc="Library project for developers who would like to support popular graphics image formats (mingw-w64)." arch=('any') license=('GPL' 'custom:FIPL') url="http://freeimage.sourceforge.net/" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-LibRaw" - "${MINGW_PACKAGE_PREFIX}-openjpeg2" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-libwebp") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") + "${MINGW_PACKAGE_PREFIX}-jxrlib" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-LibRaw" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-openjpeg2" + "${MINGW_PACKAGE_PREFIX}-openexr") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-iconv" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "dos2unix" "make") options=('strip' 'staticlibs' '!buildflags') source=("http://downloads.sourceforge.net/sourceforge/freeimage/FreeImage${pkgver//./}.zip" - 'FreeImage-3.16.0_mingw-makefiles.patch' - 'FreeImage-3.16.0_unbundle.patch' - 'FreeImage-3.16.0_disable-some-plugins.patch') -md5sums=('1a2d1fff6204adbd479cc98818892fc1' - '20a0a9f7257df79bbcbdec62ed2446d9' - '824115841c4a5be8aa98a7b31ce07d79' - 'ffd4a31d2d1c2cf19af3a1e6232f8fd6') + 'FreeImage-3.17.0_mingw-makefiles.patch' + 'FreeImage-3.17.0_unbundle.patch' + 'FreeImage-3.17.0_CVE-2015-0852.patch') +md5sums=('459e15f0ec75d6efa3c7bd63277ead86' + '6510a7f7c715acf7bd182cd888d4787d' + 'b81acf43a202d03573932e1f98d63a60' + 'b21385e2da5dcdf4aa4e98d11150115d') prepare() { cd ${srcdir}/FreeImage - # Convert to utf-8 - #iconv -f ISO-8859-15 -t UTF-8 Whatsnew.txt - #iconv -f WINDOWS-1252 -t UTF-8 license-gplv3.txt - #iconv -f ISO-8859-15 -t UTF-8 -o Whatsnew.txt.new Whatsnew.txt && \ - # touch -r Whatsnew.txt Whatsnew.txt.new && \ - # mv Whatsnew.txt.new Whatsnew.txt + patch -p1 -i ${srcdir}/FreeImage-3.17.0_unbundle.patch + patch -p1 -i ${srcdir}/FreeImage-3.17.0_mingw-makefiles.patch + patch -p1 -i ${srcdir}/FreeImage-3.17.0_CVE-2015-0852.patch - #iconv -f WINDOWS-1252 -t UTF-8 -o license-gplv3.txt.new license-gplv3.txt && \ - # touch -r license-gplv3.txt license-gplv3.txt.new && \ - # mv license-gplv3.txt.new license-gplv3.txt - - patch -p1 -i ${srcdir}/FreeImage-3.16.0_mingw-makefiles.patch - patch -p1 -i ${srcdir}/FreeImage-3.16.0_unbundle.patch - patch -p1 -i ${srcdir}/FreeImage-3.16.0_disable-some-plugins.patch - - # Remove bundled libraries - rm -rf Source/OpenEXR - rm -rf Source/LibMNG - rm -rf Source/LibOpenJPEG - rm -rf Source/LibPNG - rm -rf Source/LibRawLite - rm -rf Source/LibTIFF - rm -rf Source/LibJPEG - rm -rf Source/LibTIFF4 - rm -rf Source/ZLib - rm -rf Source/LibWebP - - # Mingw-w64 has its own header - rm -rf Source/LibJXR/common/include/guiddef.h + # remove all included libs to make sure these don't get used during compile + rm -r Source/Lib* Source/ZLib Source/OpenEXR + + # clear files which cannot be built due to dependencies on private headers + # (see also unbundle patch) + > Source/FreeImage/PluginG3.cpp + > Source/FreeImageToolkit/JPEGTransform.cpp + + # sanitize encodings / line endings + for file in `find . -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' -or -name '*.txt' -or -name Makefile`; do + ${MINGW_PREFIX}/bin/iconv -f ISO-8859-15 -t UTF-8 ${file} > ${file}.new && \ + sed -i 's|\r||g' ${file}.new && \ + touch -r ${file} ${file}.new && mv ${file}.new ${file} + done #cp -f ${srcdir}/Makefile.mingw-w64 ${srcdir}/FreeImage/Makefile.mingw-w64 - + # Generate source list sh ./gensrclist.sh sh ./genfipsrclist.sh @@ -70,32 +64,17 @@ prepare() { build() { cd ${srcdir}/FreeImage - mkdir -p ${srcdir}/build-{shared,static}-${CARCH} - lndir ${srcdir}/FreeImage ${srcdir}/build-shared-${CARCH} - lndir ${srcdir}/FreeImage ${srcdir}/build-static-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} + lndir ${srcdir}/FreeImage ${srcdir}/build-${CARCH} plain "Build shared version..." - cd ${srcdir}/build-shared-${CARCH} + cd ${srcdir}/build-${CARCH} make \ MINGW_TARGET=${MINGW_CHOST} \ - FREEIMAGE_LIBRARY_TYPE="SHARED" \ - -f Makefile.mingw + -f Makefile.gnu make \ MINGW_TARGET=${MINGW_CHOST} \ - FREEIMAGE_LIBRARY_TYPE="SHARED" \ - -f Makefile.fip - - plain "Build static version..." - cd ${srcdir}/build-static-${CARCH} - make \ - MINGW_TARGET=${MINGW_CHOST} \ - FREEIMAGE_LIBRARY_TYPE="STATIC" \ - -f Makefile.mingw - - make \ - MINGW_TARGET=${MINGW_CHOST} \ - FREEIMAGE_LIBRARY_TYPE="STATIC" \ -f Makefile.fip } @@ -105,20 +84,19 @@ package() { install -d "${pkgdir}${MINGW_PREFIX}"/include install -d "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage - cd ${srcdir}/build-shared-${CARCH} + cd ${srcdir}/build-${CARCH} install -m755 Dist/libfreeimage-*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ install -m644 Dist/libfreeimage.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/ install -m755 Dist/libfreeimageplus-*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ install -m644 Dist/libfreeimageplus.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/ install -m644 Dist/FreeImage.h "${pkgdir}${MINGW_PREFIX}"/include/ install -m644 Dist/FreeImagePlus.h "${pkgdir}${MINGW_PREFIX}"/include/ - + install -m644 Whatsnew.txt "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage/ install -m644 license-fi.txt "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage/ install -m644 license-gplv2.txt "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage/ install -m644 license-gplv3.txt "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage/ - cd ${srcdir}/build-static-${CARCH} install -m644 Dist/libfreeimage.a "${pkgdir}${MINGW_PREFIX}"/lib/ install -m644 Dist/libfreeimageplus.a "${pkgdir}${MINGW_PREFIX}"/lib/ } diff --git a/mingw-w64-LibRaw/PKGBUILD b/mingw-w64-LibRaw/PKGBUILD index 559d23a8ee..b883e99487 100644 --- a/mingw-w64-LibRaw/PKGBUILD +++ b/mingw-w64-LibRaw/PKGBUILD @@ -1,58 +1,57 @@ # Maintainer: Alexey Pavlov _realname=LibRaw - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.16.0 -pkgrel=1 +pkgver=0.16.2 +pkgrel=2 pkgdesc="Library for reading RAW files obtained from digital photo cameras (mingw-w64)" arch=(any) url="http://www.libraw.org" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-jasper") + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-jasper") options=('staticlibs' 'strip') source=("http://www.libraw.org/data/${_realname}-${pkgver}.tar.gz" - "http://www.libraw.org/data/${_realname}-demosaic-pack-GPL2-${pkgver}.tar.gz" - "http://www.libraw.org/data/${_realname}-demosaic-pack-GPL3-${pkgver}.tar.gz" - "LibRaw_wsock32.patch" - "LibRaw_obsolete-macros.patch") -sha256sums=('71f43871ec2535345c5c9b748f07813e49915170f9510b721a2be6478426cf96' - '749d49694ce729166ec7a1faf7580780687ef190c756931bb075455ee8ed6697' - 'f2e904f9baa7d173b5ade163c795f26e110255a758e31bd213086a5a61500b5c' + "http://www.libraw.org/data/${_realname}-demosaic-pack-GPL2-${pkgver}.tar.gz" + "http://www.libraw.org/data/${_realname}-demosaic-pack-GPL3-${pkgver}.tar.gz" + "LibRaw_wsock32.patch" + "LibRaw_obsolete-macros.patch") +sha256sums=('6344e355f7c23f13e266844b36265d5f624237ba5a62dc901c7b91b510a84187' + '2218f08d59866e7852938356c197b96a6f47d0b9221a261280e010540477e77b' + '749b5baa3a4f1f5c4ea4169b9293b02b0d2a0714aa01729327f23f82621c9735' '4bd077917fb8f37fa736e3a8bf32fabe3df3ff5438b684acbb5adff8a6c2a73b' '4a31c0ee066f43915beff6f7959b6b2cd246d390720df379bfc047d4cedb6a8f') prepare() { - mv $srcdir/${_realname}-demosaic-pack-GPL2-${pkgver} $srcdir/${_realname}-$pkgver/ - mv $srcdir/${_realname}-demosaic-pack-GPL3-${pkgver} $srcdir/${_realname}-$pkgver/ - cd "$srcdir/${_realname}-$pkgver" - patch -Np1 -i "$srcdir/LibRaw_wsock32.patch" - patch -Np1 -i "$srcdir/LibRaw_obsolete-macros.patch" - + mv ${srcdir}/${_realname}-demosaic-pack-GPL2-${pkgver} $srcdir/${_realname}-$}pkgver}/ + mv ${srcdir}/${_realname}-demosaic-pack-GPL3-${pkgver} $srcdir/${_realname}-${pkgver}/ + cd "${srcdir}/${_realname}-${pkgver}" + patch -Np1 -i "${srcdir}/LibRaw_wsock32.patch" + patch -Np1 -i "${srcdir}/LibRaw_obsolete-macros.patch" + autoreconf -ifv } build() { CPPFLAGS+=" -DLIBRAW_NODLL" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-$pkgver/configure \ + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-$pkgver/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-jasper \ - --enable-lcms \ - --enable-demosaic-pack-gpl2 \ - --enable-demosaic-pack-gpl3 + --enable-lcms \ + --enable-demosaic-pack-gpl2 \ + --enable-demosaic-pack-gpl3 - make + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-OpenBLAS-git/PKGBUILD b/mingw-w64-OpenBLAS-git/PKGBUILD index 5ccaef810d..ed9707d3dc 100644 --- a/mingw-w64-OpenBLAS-git/PKGBUILD +++ b/mingw-w64-OpenBLAS-git/PKGBUILD @@ -10,7 +10,6 @@ provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") arch=('any') url="http://www.openblas.net/" license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-openblas") conflicts=("${MINGW_PACKAGE_PREFIX}-openblas") @@ -20,10 +19,10 @@ options=('strip' 'staticlibs') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran" "${MINGW_PACKAGE_PREFIX}-libwinpthread") -makedepends=("git" +makedepends=("git" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gcc-fortran") -source=("$_realname"::"git://github.com/xianyi/${_realname}") +source=("${_realname}"::"git://github.com/xianyi/${_realname}") sha1sums=('SKIP') pkgver() { @@ -84,7 +83,7 @@ package() { fi # Copy Licencse - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname cp -f ${srcdir}/${_realname}/LICENSE \ ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname cp -f ${srcdir}/${_realname}/lapack-netlib/LICENSE \ diff --git a/mingw-w64-PKGBUILD-common/build-kf5-shared b/mingw-w64-PKGBUILD-common/build-kf5-shared new file mode 100644 index 0000000000..9954ccfb9c --- /dev/null +++ b/mingw-w64-PKGBUILD-common/build-kf5-shared @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +THISDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Listed in tier-order +declare -a pkgs=( +extra-cmake-modules +attica-qt5 +karchive-qt5 +kcodecs-qt5 +kconfig-qt5 +kcoreaddons-qt5 +kdbusaddons-qt5 +kguiaddons-qt5 +ki18n-qt5 +kwindowsystem-qt5 +kcrash-qt5 +kglobalaccel-qt5 +kidletime-qt5 +kimageformats-qt5 +kitemmodels-qt5 +kitemviews-qt5 +kjs-qt5 +kplotting-qt5 +kwidgetsaddons-qt5 +solid-qt5 +) + +for pkg in "${pkgs[@]}"; do + pushd ${THISDIR}/../mingw-w64-${pkg} + export KF5_VARIANT=shared + rm -rf *pkg*xz src pkg + makepkg-mingw -siLf || exit 1 + popd +done diff --git a/mingw-w64-PKGBUILD-common/kde-frameworks5 b/mingw-w64-PKGBUILD-common/kde-frameworks5 index 5161686ef2..282d8be024 100644 --- a/mingw-w64-PKGBUILD-common/kde-frameworks5 +++ b/mingw-w64-PKGBUILD-common/kde-frameworks5 @@ -8,8 +8,9 @@ _kde_f5_init_package() { fi _basename=${_PKG} _realname=${_PKG}-qt5${_namesuff} + pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" - url="https://projects.kde.org/projects/frameworks/${_PKG}" + url=https://projects.kde.org/projects/frameworks/${_PKG} } _kde_f5_add_depends() { @@ -31,4 +32,3 @@ _kde_f5_CMAKE_BUILD_TYPE() { echo "Release" fi } - diff --git a/mingw-w64-PKGBUILD-templates/PKGBUILD.CMake-github-git b/mingw-w64-PKGBUILD-templates/PKGBUILD.CMake-github-git new file mode 100644 index 0000000000..b7da52c7a6 --- /dev/null +++ b/mingw-w64-PKGBUILD-templates/PKGBUILD.CMake-github-git @@ -0,0 +1,61 @@ +# Maintainer: Some One + +_realname=somepackage +pkgbase=mingw-w64-${_realname}-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides="${MINGW_PACKAGE_PREFIX}-${_realname}" +replaces="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=100.77777777 +pkgrel=1 +pkgdesc="Some package (git) (mingw-w64)" +arch=('any') +url="https://github.com/someproject/somepackage" +license=('LICENSE') +validpgpkeys=('gpg_KEY') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + 'git') +options=('strip' 'staticlibs') +source=("${_realname}"::"git+https://github.com/someproject/somepackage.git#branch=master" + 0001-An-important-fix.patch + 0002-A-less-important-fix.patch) +md5sums=('SKIP' + 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb') + +pkgver() { + cd "${srcdir}"/${_realname} + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_realname} + git am "${srcdir}"/0001-A-really-important-fix.patch + git am "${srcdir}"/0002-A-less-important-fix.patch +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G'MSYS Makefiles' \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + "${extra_config[@]}" \ + -DBUILD_{SHARED,STATIC}_LIBS=ON \ + ../${_realname} + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-PKGBUILD-templates/PKGBUILD.autotools-tarball b/mingw-w64-PKGBUILD-templates/PKGBUILD.autotools-tarball index 5be959c042..9162c8bc73 100644 --- a/mingw-w64-PKGBUILD-templates/PKGBUILD.autotools-tarball +++ b/mingw-w64-PKGBUILD-templates/PKGBUILD.autotools-tarball @@ -1,14 +1,15 @@ # Maintainer: Some One _realname=somepackage +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.0 pkgrel=1 -pkgdesc='Some package' -groups=("${MINGW_PACKAGE_PREFIX}") +pkgdesc="Some package (mingw-w64)" arch=('any') url='http://www.somepackage.org/' license=('LICENSE') +validpgpkeys=('gpg_KEY') source=("http://www.somepackage.org/${_realname}/${_realname}-${pkgver}.tar.gz" "0001-A-fix.patch") sha1sums=("SKIP" @@ -21,7 +22,7 @@ prepare() { build() { cd "$srcdir"/${_realname}-${pkgver} - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ @@ -30,6 +31,7 @@ build() { --target=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } diff --git a/mingw-w64-Pillow/PKGBUILD b/mingw-w64-Pillow/PKGBUILD index 0f7e3d2fed..a71fc06f9d 100644 --- a/mingw-w64-Pillow/PKGBUILD +++ b/mingw-w64-Pillow/PKGBUILD @@ -1,14 +1,13 @@ # Maintainer: Alexey Pavlov _realname=Pillow +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=2.6.0 +pkgver=3.0.0 _py2basever=2.7 -_py3basever=3.4m -pkgrel=1 -pkgdesc="Python Imaging Library (PIL) fork. Python3 version (mingw-w64)" +_py3basever=3.5m +pkgrel=2 arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('custom') url="https://github.com/python-pillow/Pillow/" depends=("${MINGW_PACKAGE_PREFIX}-freetype" @@ -19,33 +18,34 @@ depends=("${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-openjpeg2" "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-tk") + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-tk") options=('staticlibs') -source=("http://pypi.python.org/packages/source/P/$_realname/$_realname-$pkgver.tar.gz" +source=("http://pypi.python.org/packages/source/P/${_realname}/${_realname}-${pkgver}.tar.gz" freeze-support.patch) -md5sums=('dd57c00352dcec1953b7790e1efabf23' - '91fac3184fff48841738ce838abc6fdf') +md5sums=('fc8ac44e93da09678eac7e30c9b7377d' + 'cff4ba2f6541c7ab2ab2e27a4d53df61') prepare() { - cd ${srcdir}/$_realname-$pkgver + cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/freeze-support.patch cd ${srcdir} - cp -r "$_realname-$pkgver" "python2-build-${CARCH}" - cp -r "$_realname-$pkgver" "python3-build-${CARCH}" + cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}" + cp -r "${_realname}-${pkgver}" "python3-build-${CARCH}" } package_python3-Pillow() { + pkgdesc="Python Imaging Library (PIL) fork Python3 version (mingw-w64)" depends+=("${MINGW_PACKAGE_PREFIX}-python3") optdepends=("${MINGW_PACKAGE_PREFIX}-tk: for the ImageTK module") - - cd "$srcdir/python3-build-${CARCH}" - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX#\/} --root="$pkgdir/" --optimize=0 - install -Dm644 docs/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-$_realname/LICENSE" - install -dm755 "${pkgdir}${MINGW_PREFIX}/include/python$_py3basever/" - install -m644 -t "${pkgdir}${MINGW_PREFIX}/include/python$_py3basever/" libImaging/*.h + cd "${srcdir}/python3-build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}/" --optimize=0 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + install -dm755 "${pkgdir}${MINGW_PREFIX}/include/python${_py3basever}/" + install -m644 -t "${pkgdir}${MINGW_PREFIX}/include/python${_py3basever}/" libImaging/*.h # clean up bins cd "${pkgdir}${MINGW_PREFIX}/bin" @@ -55,26 +55,26 @@ package_python3-Pillow() { } package_python2-Pillow() { - pkgdesc="Python Imaging Library (PIL) fork. Python2 version." + pkgdesc="Python Imaging Library (PIL) fork. Python2 version (mingw-w64)" depends+=("${MINGW_PACKAGE_PREFIX}-python2") optdepends=("${MINGW_PACKAGE_PREFIX}-tk: for the ImageTK module") - - cd "$srcdir/python2-build-${CARCH}" + + cd "${srcdir}/python2-build-${CARCH}" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="$pkgdir/" --optimize=0 + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}/" --optimize=0 sed -i 's|/usr/local/bin/python$|/usr/bin/env python2|' \ - "$pkgdir${MINGW_PREFIX}/lib/python$_py2basever/site-packages/PIL/OleFileIO.py" + "${pkgdir}${MINGW_PREFIX}/lib/python${_py2basever}/site-packages/PIL/OleFileIO.py" - install -Dm644 docs/LICENSE "$pkgdir${MINGW_PREFIX}/share/licenses/python2-$_realname/LICENSE" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" - install -dm755 "$pkgdir${MINGW_PREFIX}/include/python$_py2basever/" - install -m644 -t "$pkgdir${MINGW_PREFIX}/include/python$_py2basever/" libImaging/*.h + install -dm755 "${pkgdir}${MINGW_PREFIX}/include/python${_py2basever}/" + install -m644 -t "${pkgdir}${MINGW_PREFIX}/include/python${_py2basever}/" libImaging/*.h # clean up bins - cd "$pkgdir${MINGW_PREFIX}/bin" + cd "${pkgdir}${MINGW_PREFIX}/bin" for f in *.py; do - mv "$f" "${f%.py}2" + mv "${f}" "${f%.py}2" done } diff --git a/mingw-w64-Pillow/freeze-support.patch b/mingw-w64-Pillow/freeze-support.patch index db17f0aeda..530689445e 100644 --- a/mingw-w64-Pillow/freeze-support.patch +++ b/mingw-w64-Pillow/freeze-support.patch @@ -1,24 +1,24 @@ ---- Pillow-2.5.1/mp_compile.py.orig 2014-07-10 17:52:44.000000000 +0400 -+++ Pillow-2.5.1/mp_compile.py 2014-07-12 01:13:13.373200000 +0400 -@@ -1,7 +1,7 @@ - # A monkey patch of the base distutils.ccompiler to use parallel builds +--- Pillow-3.0.0/mp_compile.py.orig 2015-10-01 16:27:09.000000000 +0100 ++++ Pillow-3.0.0/mp_compile.py 2015-10-05 23:34:17.226557000 +0100 +@@ -2,7 +2,7 @@ # Tested on 2.7, looks to be identical to 3.3. + from __future__ import print_function -from multiprocessing import Pool, cpu_count +from multiprocessing import Pool, cpu_count, freeze_support from distutils.ccompiler import CCompiler import os - -@@ -54,8 +54,10 @@ - try: - # bug, only enable if we can make a Pool. see issue #790 and - # http://stackoverflow.com/questions/6033599/oserror-38-errno-38-with-multiprocessing -- pool = Pool(2) -- CCompiler.compile = _mp_compile -+ if __name__ == '__main__': -+ freeze_support() -+ pool = Pool(2) -+ CCompiler.compile = _mp_compile - except Exception as msg: - print("Exception installing mp_compile, proceeding without: %s" %msg) - else: + import sys +@@ -72,8 +72,10 @@ + try: + # bug, only enable if we can make a Pool. see issue #790 and + # http://stackoverflow.com/questions/6033599/oserror-38-errno-38-with-multiprocessing +- pool = Pool(2) +- CCompiler.compile = _mp_compile ++ if __name__ == '__main__': ++ freeze_support() ++ pool = Pool(2) ++ CCompiler.compile = _mp_compile + except Exception as msg: + print("Exception installing mp_compile, proceeding without:" + "%s" % msg) diff --git a/mingw-w64-SDL/PKGBUILD b/mingw-w64-SDL/PKGBUILD index eedfda423c..2d842884d3 100644 --- a/mingw-w64-SDL/PKGBUILD +++ b/mingw-w64-SDL/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=SDL - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.2.15 -pkgrel=3 +pkgrel=7 pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (mingw-w64)" arch=('any') url="http://libsdl.org" @@ -12,23 +12,26 @@ license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libiconv") options=('staticlibs' 'strip') -source=("$url/release/SDL-$pkgver.tar.gz") +source=("${url}/release/SDL-${pkgver}.tar.gz") md5sums=('9d96df8417572a2afb781a7c4c811a85') build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/SDL-${pkgver}/configure \ + ../SDL-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} + --host=${MINGW_CHOST} \ + --disable-assembly \ + --enable-shared \ + --enable-static + make } package() { - mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install sed -e "s|-mwindows||g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/sdl.pc } diff --git a/mingw-w64-SDL2/PKGBUILD b/mingw-w64-SDL2/PKGBUILD index 8cac88121c..2b1462947d 100644 --- a/mingw-w64-SDL2/PKGBUILD +++ b/mingw-w64-SDL2/PKGBUILD @@ -3,7 +3,7 @@ _realname=SDL2 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.3 -pkgrel=2 +pkgrel=3 pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2) (mingw-w64)" arch=('any') url="http://libsdl.org" @@ -11,30 +11,37 @@ license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libiconv") options=('staticlibs' 'strip') -source=("http://libsdl.org/release/SDL2-$pkgver.tar.gz" - fix-linker-flags.patch) +source=("http://libsdl.org/release/SDL2-${pkgver}.tar.gz" + fix-linker-flags.patch + SDL2-prevent-duplicate-d3d11-declarations.patch + SDL2-fix-gcc-compatibility.patch) md5sums=('fe6c61d2e9df9ef570e7e80c6e822537' - '932a4c42f068a9117c3c02efead14b29') + '932a4c42f068a9117c3c02efead14b29' + 'a70714d69deaea9e4f0cbfb17e9f4acf' + 'abbdbc90d737c8296b58d6af462b68b7') prepare() { cd "${srcdir}"/${_realname}-${pkgver} patch -p1 -i ${srcdir}/fix-linker-flags.patch - + patch -p1 -i ${srcdir}/SDL2-prevent-duplicate-d3d11-declarations.patch + patch -p1 -i ${srcdir}/SDL2-fix-gcc-compatibility.patch + ./autogen.sh } build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install sed -e "s|-mwindows||g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/sdl2.pc } diff --git a/mingw-w64-SDL2/SDL2-fix-gcc-compatibility.patch b/mingw-w64-SDL2/SDL2-fix-gcc-compatibility.patch new file mode 100644 index 0000000000..a17e037e4a --- /dev/null +++ b/mingw-w64-SDL2/SDL2-fix-gcc-compatibility.patch @@ -0,0 +1,413 @@ +--- a/src/render/direct3d11/SDL_render_d3d11.c.orig 2015-03-21 20:17:57.816864185 +0100 ++++ b/src/render/direct3d11/SDL_render_d3d11.c 2015-03-21 22:21:30.123045735 +0100 +@@ -46,6 +46,9 @@ + #endif /* __WINRT__ */ + + ++#define SDL_DEBUG_STRINGIFY_ARG(str) #str ++#define SDL_DEBUG(str) SDL_DEBUG_STRINGIFY_ARG(__FUNCTION__) str ++ + #define SAFE_RELEASE(X) if ((X)) { IUnknown_Release(SDL_static_cast(IUnknown*, X)); X = NULL; } + + +@@ -910,7 +925,7 @@ + blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; + result = ID3D11Device_CreateBlendState(data->d3dDevice, &blendDesc, blendStateOutput); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateBlendState", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateBlendState"), result); + return result; + } + +@@ -992,14 +1007,14 @@ + + result = CreateDXGIFactoryFunc(&IID_IDXGIFactory2, &data->dxgiFactory); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", CreateDXGIFactory", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", CreateDXGIFactory"), result); + goto done; + } + + /* FIXME: Should we use the default adapter? */ + result = IDXGIFactory2_EnumAdapters(data->dxgiFactory, 0, &data->dxgiAdapter); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", D3D11CreateDevice", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", D3D11CreateDevice"), result); + goto done; + } + +@@ -1028,25 +1043,25 @@ + &d3dContext /* Returns the device immediate context. */ + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", D3D11CreateDevice", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", D3D11CreateDevice"), result); + goto done; + } + + result = ID3D11Device_QueryInterface(d3dDevice, &IID_ID3D11Device1, &data->d3dDevice); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to ID3D11Device1", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device to ID3D11Device1"), result); + goto done; + } + + result = ID3D11DeviceContext_QueryInterface(d3dContext, &IID_ID3D11DeviceContext1, &data->d3dContext); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext to ID3D11DeviceContext1", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11DeviceContext to ID3D11DeviceContext1"), result); + goto done; + } + + result = ID3D11Device_QueryInterface(d3dDevice, &IID_IDXGIDevice1, &dxgiDevice); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to IDXGIDevice1", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device to IDXGIDevice1"), result); + goto done; + } + +@@ -1055,7 +1070,7 @@ + */ + result = IDXGIDevice1_SetMaximumFrameLatency(dxgiDevice, 1); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIDevice1::SetMaximumFrameLatency", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGIDevice1::SetMaximumFrameLatency"), result); + goto done; + } + +@@ -1084,7 +1099,7 @@ + break; + + default: +- SDL_SetError(__FUNCTION__ ", Unexpected feature level: %d", data->featureLevel); ++ SDL_SetError("%s, Unexpected feature level: %d", __FUNCTION__, data->featureLevel); + result = E_FAIL; + goto done; + } +@@ -1097,7 +1112,7 @@ + &data->vertexShader + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateVertexShader", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateVertexShader"), result); + goto done; + } + +@@ -1110,7 +1125,7 @@ + &data->inputLayout + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateInputLayout", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateInputLayout"), result); + goto done; + } + +@@ -1122,7 +1137,7 @@ + &data->colorPixelShader + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['color' shader]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreatePixelShader ['color' shader]"), result); + goto done; + } + +@@ -1133,7 +1148,7 @@ + &data->texturePixelShader + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['textures' shader]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreatePixelShader ['textures' shader]"), result); + goto done; + } + +@@ -1144,7 +1159,7 @@ + &data->yuvPixelShader + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['yuv' shader]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreatePixelShader ['yuv' shader]"), result); + goto done; + } + +@@ -1159,7 +1174,7 @@ + &data->vertexShaderConstants + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateBuffer [vertex shader constants]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateBuffer [vertex shader constants]"), result); + goto done; + } + +@@ -1179,7 +1194,7 @@ + &data->nearestPixelSampler + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateSamplerState [nearest-pixel filter]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateSamplerState [nearest-pixel filter]"), result); + goto done; + } + +@@ -1189,7 +1204,7 @@ + &data->linearSampler + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateSamplerState [linear filter]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateSamplerState [linear filter]"), result); + goto done; + } + +@@ -1207,14 +1222,14 @@ + rasterDesc.SlopeScaledDepthBias = 0.0f; + result = ID3D11Device_CreateRasterizerState(data->d3dDevice, &rasterDesc, &data->mainRasterizer); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateRasterizerState [main rasterizer]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateRasterizerState [main rasterizer]"), result); + goto done; + } + + rasterDesc.ScissorEnable = TRUE; + result = ID3D11Device_CreateRasterizerState(data->d3dDevice, &rasterDesc, &data->clippedRasterizer); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateRasterizerState [clipped rasterizer]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateRasterizerState [clipped rasterizer]"), result); + goto done; + } + +@@ -1374,7 +1389,7 @@ + &data->swapChain + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIFactory2::CreateSwapChainForCoreWindow", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGIFactory2::CreateSwapChainForCoreWindow"), result); + goto done; + } + } else if (usingXAML) { +@@ -1384,18 +1399,18 @@ + NULL, + &data->swapChain); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIFactory2::CreateSwapChainForComposition", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGIFactory2::CreateSwapChainForComposition"), result); + goto done; + } + + #if WINAPI_FAMILY == WINAPI_FAMILY_APP + result = ISwapChainBackgroundPanelNative_SetSwapChain(WINRT_GlobalSwapChainBackgroundPanelNative, (IDXGISwapChain *) data->swapChain); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ISwapChainBackgroundPanelNative::SetSwapChain", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ISwapChainBackgroundPanelNative::SetSwapChain"), result); + goto done; + } + #else +- SDL_SetError(__FUNCTION__ ", XAML support is not yet available for Windows Phone"); ++ SDL_SetError(SDL_DEBUG(", XAML support is not yet available for Windows Phone")); + result = E_FAIL; + goto done; + #endif +@@ -1414,7 +1429,7 @@ + &data->swapChain + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIFactory2::CreateSwapChainForHwnd", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGIFactory2::CreateSwapChainForHwnd"), result); + goto done; + } + #else +@@ -1464,7 +1479,7 @@ + 0 + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::ResizeBuffers", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGISwapChain::ResizeBuffers"), result); + goto done; + } + #endif +@@ -1485,7 +1500,7 @@ + if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) { + result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain1::SetRotation", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGISwapChain1::SetRotation"), result); + goto done; + } + } +@@ -1497,7 +1512,7 @@ + &backBuffer + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::GetBuffer [back-buffer]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGISwapChain::GetBuffer [back-buffer]"), result); + goto done; + } + +@@ -1508,7 +1523,7 @@ + &data->mainRenderTargetView + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device::CreateRenderTargetView", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device::CreateRenderTargetView"), result); + goto done; + } + +@@ -1628,7 +1643,7 @@ + ); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateTexture2D"), result); + return -1; + } + +@@ -1646,7 +1661,7 @@ + ); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateTexture2D"), result); + return -1; + } + +@@ -1657,7 +1672,7 @@ + ); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateTexture2D"), result); + return -1; + } + } +@@ -1673,7 +1688,7 @@ + ); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ "ID3D11Device1::CreateShaderResourceView", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG("ID3D11Device1::CreateShaderResourceView"), result); + return -1; + } + +@@ -1685,7 +1700,7 @@ + ); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ "ID3D11Device1::CreateShaderResourceView", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG("ID3D11Device1::CreateShaderResourceView"), result); + return -1; + } + result = ID3D11Device_CreateShaderResourceView(rendererData->d3dDevice, +@@ -1695,7 +1710,7 @@ + ); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ "ID3D11Device1::CreateShaderResourceView", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG("ID3D11Device1::CreateShaderResourceView"), result); + return -1; + } + } +@@ -1712,7 +1727,7 @@ + &textureData->mainTextureRenderTargetView); + if (FAILED(result)) { + D3D11_DestroyTexture(renderer, texture); +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateRenderTargetView", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateRenderTargetView"), result); + return -1; + } + } +@@ -1768,7 +1783,7 @@ + NULL, + &stagingTexture); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D [create staging texture]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateTexture2D [create staging texture]"), result); + return -1; + } + +@@ -1781,7 +1796,7 @@ + &textureMemory + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [map staging texture]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11DeviceContext1::Map [map staging texture]"), result); + SAFE_RELEASE(stagingTexture); + return -1; + } +@@ -1943,7 +1958,7 @@ + NULL, + &textureData->stagingTexture); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D [create staging texture]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateTexture2D [create staging texture]"), result); + return -1; + } + +@@ -1956,7 +1971,7 @@ + &textureMemory + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [map staging texture]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11DeviceContext1::Map [map staging texture]"), result); + SAFE_RELEASE(textureData->stagingTexture); + return -1; + } +@@ -2238,7 +2253,7 @@ + &mappedResource + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [vertex buffer]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11DeviceContext1::Map [vertex buffer]"), result); + return -1; + } + SDL_memcpy(mappedResource.pData, vertexData, dataSizeInBytes); +@@ -2262,7 +2277,7 @@ + &rendererData->vertexBuffer + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateBuffer [vertex buffer]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateBuffer [vertex buffer]"), result); + return -1; + } + +@@ -2732,7 +2747,7 @@ + &backBuffer + ); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain1::GetBuffer [get back buffer]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGISwapChain1::GetBuffer [get back buffer]"), result); + goto done; + } + +@@ -2749,7 +2764,7 @@ + NULL, + &stagingTexture); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D [create staging texture]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11Device1::CreateTexture2D [create staging texture]"), result); + goto done; + } + +@@ -2781,7 +2796,7 @@ + 0, + &textureMemory); + if (FAILED(result)) { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [map staging texture]", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", ID3D11DeviceContext1::Map [map staging texture]"), result); + goto done; + } + +@@ -2800,7 +2815,7 @@ + * Get the error message, and attach some extra data to it. + */ + char errorMessage[1024]; +- SDL_snprintf(errorMessage, sizeof(errorMessage), __FUNCTION__ ", Convert Pixels failed: %s", SDL_GetError()); ++ SDL_snprintf(errorMessage, sizeof(errorMessage), "%s, Convert Pixels failed: %s", __FUNCTION__, SDL_GetError()); + SDL_SetError(errorMessage); + goto done; + } +@@ -2869,7 +2884,7 @@ + /* We probably went through a fullscreen <-> windowed transition */ + D3D11_CreateWindowSizeDependentResources(renderer); + } else { +- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::Present", result); ++ WIN_SetErrorFromHRESULT(SDL_DEBUG(", IDXGISwapChain::Present"), result); + } + } + } diff --git a/mingw-w64-SDL2/SDL2-prevent-duplicate-d3d11-declarations.patch b/mingw-w64-SDL2/SDL2-prevent-duplicate-d3d11-declarations.patch new file mode 100644 index 0000000000..32670831d0 --- /dev/null +++ b/mingw-w64-SDL2/SDL2-prevent-duplicate-d3d11-declarations.patch @@ -0,0 +1,27 @@ +--- a/src/render/direct3d11/SDL_render_d3d11.c.orig 2015-03-21 20:17:57.816864185 +0100 ++++ b/src/render/direct3d11/SDL_render_d3d11.c 2015-03-21 22:16:38.285858676 +0100 +@@ -132,12 +132,24 @@ + + + /* Defined here so we don't have to include uuid.lib */ ++#ifndef __IDXGIFactory2_INTERFACE_DEFINED__ + static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; ++#endif ++#ifndef __IDXGIDevice1_INTERFACE_DEFINED__ + static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; ++#endif ++#ifndef __ID3D11Texture2D_INTERFACE_DEFINED__ + static const GUID IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } }; ++#endif ++#ifndef __ID3D11Device1_INTERFACE_DEFINED__ + static const GUID IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } }; ++#endif ++#ifndef __ID3D11DeviceContext1_INTERFACE_DEFINED__ + static const GUID IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, { 0x8e, 0x6b, 0x38, 0x8b, 0x8c, 0xfa, 0x90, 0xe1 } }; ++#endif ++#ifndef __ID3D11Debug_INTERFACE_DEFINED__ + static const GUID IID_ID3D11Debug = { 0x79cf2233, 0x7536, 0x4948, { 0x9d, 0x36, 0x1e, 0x46, 0x92, 0xdc, 0x57, 0x60 } }; ++#endif + + /* Direct3D 11.x shaders + diff --git a/mingw-w64-SDL2_gfx/PKGBUILD b/mingw-w64-SDL2_gfx/PKGBUILD index 592508260b..ffae4ff7db 100644 --- a/mingw-w64-SDL2_gfx/PKGBUILD +++ b/mingw-w64-SDL2_gfx/PKGBUILD @@ -3,29 +3,37 @@ _realname=SDL2_gfx pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.1 -pkgrel=1 -pkgdesc="SDL graphics drawing primitives and other support functions wrapped up in an addon library for the Simple Direct Media (SDL) cross-platform API layer." +pkgrel=2 +pkgdesc="SDL graphics drawing primitives and other support functions wrapped up in an addon library for the Simple Direct Media (SDL) cross-platform API layer" arch=('any') url="http://cms.ferzkopp.net/index.php/software/13-sdl-gfx" license=("zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-SDL2") options=('staticlibs' 'strip') -source=("http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-$pkgver.tar.gz") +source=("http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-${pkgver}.tar.gz") md5sums=('9c96816618e3e086d885d1d214e59d87') +prepare() { + cd ${_realname}-${pkgver} + autoreconf -fiv +} + build() { + export lt_cv_deplibs_check_method='pass_all' + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-SDL2_image/PKGBUILD b/mingw-w64-SDL2_image/PKGBUILD index 29d20f83f0..d91bac0712 100644 --- a/mingw-w64-SDL2_image/PKGBUILD +++ b/mingw-w64-SDL2_image/PKGBUILD @@ -1,38 +1,40 @@ # Maintainer: Marty Plummer (The_NetZ) _realname=SDL2_image - pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgver=2.0.0 -pkgrel=2 +pkgrel=4 pkgdesc=("A simple library to load images of various formats as SDL surfaces (Version 2)") arch=('any') url="http://www.libsdl.org/projects/SDL_image" license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-SDL2" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libwebp") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libwebp") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") source=("${url}/release/${_realname}-${pkgver}.tar.gz") sha1sums=('20b1b0db9dd540d6d5e40c7da8a39c6a81248865') build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}/" - "${srcdir}"/${_realname}-${pkgver}/configure \ - --disable-static \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} + --host=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + make } package() { cd "${srcdir}/build-${MINGW_CHOST}/" + make DESTDIR="${pkgdir}" install - make DESTDIR="${pkgdir}/" install install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.txt" \ "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-SDL2_mixer/PKGBUILD b/mingw-w64-SDL2_mixer/PKGBUILD index e7e3050ff6..f8c5fc291a 100644 --- a/mingw-w64-SDL2_mixer/PKGBUILD +++ b/mingw-w64-SDL2_mixer/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=SDL2_mixer +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.0 -pkgrel=4 +pkgrel=6 pkgdesc="A simple multi-channel audio mixer (Version 2) (mingw-w64)" arch=('any') url="http://www.libsdl.org/projects/SDL_mixer" @@ -13,38 +14,46 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-SDL2" "${MINGW_PACKAGE_PREFIX}-libvorbis" "${MINGW_PACKAGE_PREFIX}-libmodplug" - "${MINGW_PACKAGE_PREFIX}-smpeg2" + "${MINGW_PACKAGE_PREFIX}-libmad" "${MINGW_PACKAGE_PREFIX}-flac" "${MINGW_PACKAGE_PREFIX}-fluidsynth") options=('staticlibs' 'strip') noextract=(${_realname}-${pkgver}.tar.gz) -source=("$url/release/${_realname}-${pkgver}.tar.gz") -md5sums=('65f6d80df073a1fb3bb537fbda031b50') +source=("$url/release/${_realname}-${pkgver}.tar.gz" + SDL2_mixer-find_lib.mingw.patch) +md5sums=('65f6d80df073a1fb3bb537fbda031b50' + 'c891fc5d73238c85ff42cfe31213da7b') prepare() { - cd $startdir/ - [ -d $srcdir/${_realname}-$pkgver ] || tar -xzvf ${_realname}-${pkgver}.tar.gz -C $srcdir || true + [[ -d ${srcdir}/${_realname}-${pkgver} ]] || tar -xzvf ${_realname}-${pkgver}.tar.gz -C ${srcdir} || true cd "${srcdir}"/${_realname}-${pkgver} + patch -Np1 -i ${srcdir}/SDL2_mixer-find_lib.mingw.patch + sed -i "s|/etc/timidity|/etc/timidity++|g" timidity/config.h sed -i "s|/etc/timidity++.cfg|/etc/timidity++/timidity.cfg|g" timidity/config.h } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + cd "${srcdir}/build-${MINGW_CHOST}/" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --enable-static + --enable-static \ + --enable-music-mp3 \ + --disable-music-mp3-smpeg \ + --enable-music-mp3-mad-gpl + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-SDL2_mixer/SDL2_mixer-find_lib.mingw.patch b/mingw-w64-SDL2_mixer/SDL2_mixer-find_lib.mingw.patch new file mode 100644 index 0000000000..355aa263d0 --- /dev/null +++ b/mingw-w64-SDL2_mixer/SDL2_mixer-find_lib.mingw.patch @@ -0,0 +1,101 @@ +diff --git a/configure b/configure +index 878381b..be39a38 100755 +--- a/configure ++++ b/configure +@@ -11143,13 +11143,14 @@ find_lib() + gcc_bin_path=`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` + gcc_lib_path=`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` + env_lib_path=`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'` ++ env_path=`echo $PATH | sed 's/:/ /g'` + if test "$cross_compiling" = yes; then + host_lib_path="" + else + host_lib_path="/usr/$base_libdir /usr/local/$base_libdir" + fi +- for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do +- lib=`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1` ++ for path in $gcc_bin_path $gcc_lib_path $env_lib_path $env_path $host_lib_path; do ++ lib=`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'` + if test x$lib != x; then + echo $lib + return +@@ -11938,7 +11939,7 @@ fi + *-*-darwin*) + modplug_lib=`find_lib libmodplug.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + modplug_lib=`find_lib "libmodplug*.dll"` + ;; + *) +@@ -12070,7 +12071,7 @@ fi + *-*-darwin*) + mikmod_lib=`find_lib libmikmod.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + mikmod_lib=`find_lib "libmikmod*.dll"` + ;; + *) +@@ -12132,7 +12133,7 @@ fi + *mingw32ce*) + use_music_midi_native=no + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + use_music_midi_native=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm" + ;; +@@ -12221,8 +12222,11 @@ fi + *-*-darwin*) + fluidsynth_lib=`find_lib libfluidsynth.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + fluidsynth_lib=`find_lib "fluidsynth*.dll"` ++ if test x$fluidsynth_lib = x; then ++ fluidsynth_lib=`find_lib "libfluidsynth*.dll"` ++ fi + ;; + *) + fluidsynth_lib=`find_lib "libfluidsynth[0-9]*.so.*"` +@@ -12331,8 +12335,11 @@ fi + *-*-darwin*) + ogg_lib=`find_lib libvorbisidec.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + ogg_lib=`find_lib "vorbisidec*.dll"` ++ if test x$ogg_lib = x; then ++ ogg_lib=`find_lib "libvorbisidec*.dll"` ++ fi + ;; + *) + ogg_lib=`find_lib "libvorbisidec[0-9]*.so.*"` +@@ -12409,7 +12416,7 @@ fi + *-*-darwin*) + ogg_lib=`find_lib libvorbisfile.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + ogg_lib=`find_lib "libvorbisfile*.dll"` + ;; + *) +@@ -12545,7 +12552,7 @@ fi + *-*-darwin*) + flac_lib=`find_lib libFLAC.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + flac_lib=`find_lib "libFLAC-*.dll"` + ;; + *) +@@ -12841,7 +12848,7 @@ rm -f core conftest.err conftest.$ac_objext \ + *-*-darwin*) + smpeg_lib=`find_lib libsmpeg2.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + smpeg_lib=`find_lib "smpeg2*.dll"` + ;; + *) diff --git a/mingw-w64-SDL2_net/PKGBUILD b/mingw-w64-SDL2_net/PKGBUILD index e284e0e37b..5256723433 100644 --- a/mingw-w64-SDL2_net/PKGBUILD +++ b/mingw-w64-SDL2_net/PKGBUILD @@ -3,7 +3,7 @@ _realname=SDL2_net pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.0 -pkgrel=2 +pkgrel=3 pkgdesc="A small sample cross-platform networking library (Version 2) (mingw-w64)" arch=('any') url="http://www.libsdl.org/projects/SDL_net" @@ -11,23 +11,24 @@ license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-SDL2") options=('staticlibs' 'strip') -source=("$url/release/${_realname}-${pkgver}.tar.gz") +source=("${url}/release/${_realname}-${pkgver}.tar.gz") md5sums=('83bcd0e67796b81b35b08a014c677200') build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-SDL2_sound-hg/PKGBUILD b/mingw-w64-SDL2_sound-hg/PKGBUILD index acdedd39d9..9ee67ce8c2 100644 --- a/mingw-w64-SDL2_sound-hg/PKGBUILD +++ b/mingw-w64-SDL2_sound-hg/PKGBUILD @@ -18,10 +18,11 @@ depends=("${MINGW_PACKAGE_PREFIX}-SDL2" "${MINGW_PACKAGE_PREFIX}-flac" "${MINGW_PACKAGE_PREFIX}-speex" "${MINGW_PACKAGE_PREFIX}-physfs-hg") +makedepends=('mercurial') conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('strip' 'staticlibs') -source=($_realname::"hg+http://hg.icculus.org/icculus/SDL_sound" +source=(${_realname}::"hg+http://hg.icculus.org/icculus/SDL_sound" 'pkgconfig.patch' 'physfs-renamed-export.patch' 'no-undefined.patch' @@ -52,7 +53,7 @@ build() { export lt_cv_deplibs_check_method='pass_all' mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}/configure \ + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -60,11 +61,11 @@ build() { --enable-shared \ --enable-static \ --disable-mikmod + make } package() { cd ${srcdir}/build-${MINGW_CHOST} - - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}/" install } diff --git a/mingw-w64-SDL2_ttf/PKGBUILD b/mingw-w64-SDL2_ttf/PKGBUILD index 9d0877af63..cdda89a06b 100644 --- a/mingw-w64-SDL2_ttf/PKGBUILD +++ b/mingw-w64-SDL2_ttf/PKGBUILD @@ -2,10 +2,9 @@ # Contributor: Sven-Hendrik Haase _realname=SDL2_ttf - pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgver=2.0.12 -pkgrel=1 +pkgrel=3 pkgdesc="A library that allows you to use TrueType fonts in your SDL applications (Version 2)" arch=('any') url="http://www.libsdl.org/projects/SDL_ttf" @@ -17,15 +16,18 @@ source=("$url/release/${_realname}-${pkgver}.tar.gz") md5sums=('79787216b56cb4707f39d538f2225e00') build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}-${pkgver}/configure \ - --disable-static \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } diff --git a/mingw-w64-SDL_gfx/PKGBUILD b/mingw-w64-SDL_gfx/PKGBUILD new file mode 100644 index 0000000000..c7e451ff59 --- /dev/null +++ b/mingw-w64-SDL_gfx/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Marty Plummer (The_NetZ) + +_realname=SDL_gfx +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=2.0.25 +pkgrel=3 +pkgdesc="SDL Graphic Primitives (mingw-w64)" +arch=('any') +url="http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx" +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-SDL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=("http://www.ferzkopp.net/Software/SDL_gfx-2.0/${_realname}-${pkgver}.tar.gz") +sha1sums=('20a89d0b71b7b790b830c70f17ed2c44100bc0f4') + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-SDL_image/PKGBUILD b/mingw-w64-SDL_image/PKGBUILD new file mode 100644 index 0000000000..3c5d60fe43 --- /dev/null +++ b/mingw-w64-SDL_image/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Marty Plummer (The_NetZ) + +_realname=SDL_image +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=1.2.12 +pkgrel=4 +pkgdesc="A simple library to load images of various formats as SDL surfaces (mingw-w64)" +arch=('any') +url="http://www.libsdl.org/projects/SDL_image" +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-SDL" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=("${url}/release/${_realname}-${pkgver}.tar.gz") +sha1sums=('5e3e393d4e366638048bbb10d6a269ea3f4e4cf2') + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}/" + + make DESTDIR="${pkgdir}/" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-SDL_mixer/PKGBUILD b/mingw-w64-SDL_mixer/PKGBUILD new file mode 100644 index 0000000000..d7288084e3 --- /dev/null +++ b/mingw-w64-SDL_mixer/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: Alexey Pavlov + +_realname=SDL_mixer +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=1.2.12 +pkgrel=2 +pkgdesc="A simple multi-channel audio mixer (mingw-w64)" +arch=('any') +url="http://www.libsdl.org/projects/SDL_mixer/" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-SDL" + "${MINGW_PACKAGE_PREFIX}-libvorbis" + "${MINGW_PACKAGE_PREFIX}-libmikmod" + "${MINGW_PACKAGE_PREFIX}-libmad" + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-fluidsynth") +optdepends=("${MINGW_PACKAGE_PREFIX}-fluidsynth: MIDI software synth, replaces built-in timidity") +source=(http://www.libsdl.org/projects/SDL_mixer/release/${_realname}-${pkgver}.tar.gz + mikmod1.patch + mikmod2.patch + fluidsynth-volume.patch + double-free-crash.patch + SDL_mixer-find_lib.mingw.patch) +md5sums=('e03ff73d77a55e3572ad0217131dc4a1' + 'c335d4ff1fe86950d1fc730745c9c96d' + 'd13d98fef8ec51167a370fa7976a7a7f' + 'eceb06e3a8b31fee300d7f33478401d4' + 'b38c1b23751ca95631badeb9327d085e' + 'a116f6c880aae14d2a1657447bdbd81e') +noextract=(${_realname}-${pkgver}.tar.gz) + +prepare() { + [[ -d ${srcdir}/${_realname}-${pkgver} ]] && rm -rf ${srcdir}/${_realname}-${pkgver} + tar -xzf ${srcdir}/${_realname}-${pkgver}.tar.gz -C ${srcdir} || true + + cd "${srcdir}/${_realname}-${pkgver}" + + patch -Np1 -i ${srcdir}/mikmod1.patch + patch -Np1 -i ${srcdir}/mikmod2.patch + patch -Np1 -i ${srcdir}/fluidsynth-volume.patch + patch -Np1 -i ${srcdir}/double-free-crash.patch + patch -Np1 -i ${srcdir}/SDL_mixer-find_lib.mingw.patch + + #sed -e "/CONFIG_FILE_ETC/s|/etc/timidity.cfg|/etc/timidity++/timidity.cfg|" \ + # -e "/DEFAULT_PATH/s|/etc/timidity|/etc/timidity++|" \ + # -e "/DEFAULT_PATH2/s|/usr/local/lib/timidity|/usr/lib/timidity|" \ + # -i timidity/config.h +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --disable-music-mp3 \ + --enable-music-mp3-mad-gpl + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}/" + + make DESTDIR="${pkgdir}/" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-SDL_mixer/SDL_mixer-find_lib.mingw.patch b/mingw-w64-SDL_mixer/SDL_mixer-find_lib.mingw.patch new file mode 100644 index 0000000000..84c163f5d1 --- /dev/null +++ b/mingw-w64-SDL_mixer/SDL_mixer-find_lib.mingw.patch @@ -0,0 +1,90 @@ +diff --git a/configure b/configure +index e7c8c97..f6b9ad1 100755 +--- a/configure ++++ b/configure +@@ -11850,12 +11850,13 @@ find_lib() + gcc_bin_path=`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` + gcc_lib_path=`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` + env_lib_path=`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'` ++ env_path=`echo $PATH | sed 's/:/ /g'` + if test "$cross_compiling" = yes; then + host_lib_path="" + else + host_lib_path="/usr/$base_libdir /usr/local/$base_libdir" + fi +- for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do ++ for path in $gcc_bin_path $gcc_lib_path $env_lib_path $env_path $host_lib_path; do + lib=`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'` + if test x$lib != x; then + echo $lib +@@ -12727,7 +12728,7 @@ fi + *-*-darwin*) + mikmod_lib=`find_lib libmikmod.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + mikmod_lib=`find_lib "libmikmod*.dll"` + ;; + *) +@@ -12916,7 +12917,7 @@ fi + *mingw32ce*) + use_music_native_midi=no + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + use_music_native_midi=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm" + ;; +@@ -13159,8 +13160,11 @@ fi + fluidsynth_lib=`find_lib libfluidsynth.[0-9]*` + fi + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + fluidsynth_lib=`find_lib "fluidsynth*.dll"` ++ if test x$fluidsynth_lib = x; then ++ fluidsynth_lib=`find_lib "libfluidsynth*.dll"` ++ fi + ;; + *) + fluidsynth_lib=`find_lib "libfluidsynth.so.[0-9]"` +@@ -13415,8 +13419,11 @@ fi + ogg_lib=`find_lib libvorbisidec.[0-9]*` + fi + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + ogg_lib=`find_lib "vorbisidec*.dll"` ++ if test x$ogg_lib = x; then ++ ogg_lib=`find_lib "libvorbisidec*.dll"` ++ fi + ;; + *) + ogg_lib=`find_lib "libvorbisidec.so.[0-9]"` +@@ -13640,7 +13647,7 @@ fi + *-*-darwin*) + ogg_lib=`find_lib libvorbisfile.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + ogg_lib=`find_lib "libvorbisfile*.dll"` + ;; + *) +@@ -14073,7 +14080,7 @@ fi + *-*-darwin*) + flac_lib=`find_lib libFLAC.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + flac_lib=`find_lib "libFLAC*.dll"` + ;; + *) +@@ -14649,7 +14656,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + *-*-darwin*) + smpeg_lib=`find_lib libsmpeg.dylib` + ;; +- *-*-cygwin* | *-*-mingw32*) ++ *-*-cygwin* | *-*-mingw*) + smpeg_lib=`find_lib "smpeg*.dll"` + ;; + *) diff --git a/mingw-w64-SDL_mixer/double-free-crash.patch b/mingw-w64-SDL_mixer/double-free-crash.patch new file mode 100644 index 0000000000..d1ee21147d --- /dev/null +++ b/mingw-w64-SDL_mixer/double-free-crash.patch @@ -0,0 +1,31 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1329087437 18000 +# Node ID 2d713670db9b832b0c5aa700824900bc1fc3c3cd +# Parent df72f22b4b411ad4b08f924329678aabd5ac97d6 +Fixed 1418 - crash on double free if loading WAV file failed + +diff -r df72f22b4b41 -r 2d713670db9b mixer.c +--- a/mixer.c Mon Jan 30 21:41:45 2012 -0500 ++++ b/mixer.c Sun Feb 12 17:57:17 2012 -0500 +@@ -610,13 +610,15 @@ + break; + default: + SDL_SetError("Unrecognized sound file type"); +- return(0); ++ if ( freesrc ) { ++ SDL_RWclose(src); ++ } ++ loaded = NULL; ++ break; + } + if ( !loaded ) { ++ /* The individual loaders have closed src if needed */ + SDL_free(chunk); +- if ( freesrc ) { +- SDL_RWclose(src); +- } + return(NULL); + } + diff --git a/mingw-w64-SDL_mixer/fluidsynth-volume.patch b/mingw-w64-SDL_mixer/fluidsynth-volume.patch new file mode 100644 index 0000000000..a29be70801 --- /dev/null +++ b/mingw-w64-SDL_mixer/fluidsynth-volume.patch @@ -0,0 +1,22 @@ + +# HG changeset patch +# User James Le Cuirot +# Date 1330896767 0 +# Node ID c92001a2c18f628698c58aa4e05a7335d10d0e9e +# Parent 2d713670db9b832b0c5aa700824900bc1fc3c3cd +Raise the maximum FluidSynth gain from 0.8 to 1.2 because apparently the former is too quiet in some cases. + +diff -r 2d713670db9b -r c92001a2c18f fluidsynth.c +--- a/fluidsynth.c Sun Feb 12 17:57:17 2012 -0500 ++++ b/fluidsynth.c Sun Mar 04 21:32:47 2012 +0000 +@@ -176,8 +176,8 @@ + + void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume) + { +- /* FluidSynth's default is 0.2. Make 0.8 the maximum. */ +- fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 0.00625)); ++ /* FluidSynth's default is 0.2. Make 1.2 the maximum. */ ++ fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 1.2 / MIX_MAX_VOLUME)); + } + + int fluidsynth_playsome(FluidSynthMidiSong *song, void *dest, int dest_len) diff --git a/mingw-w64-SDL_mixer/mikmod1.patch b/mingw-w64-SDL_mixer/mikmod1.patch new file mode 100644 index 0000000000..21c9ea0aea --- /dev/null +++ b/mingw-w64-SDL_mixer/mikmod1.patch @@ -0,0 +1,66 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1342998807 25200 +# Node ID 56cad6484b04f83c8d42428c755a046678506436 +# Parent c92001a2c18f628698c58aa4e05a7335d10d0e9e +Paul P Komkoff Jr fixed malloc/free mismatch in the MikMod driver + +diff -r c92001a2c18f -r 56cad6484b04 CHANGES +--- a/CHANGES Sun Mar 04 21:32:47 2012 +0000 ++++ b/CHANGES Sun Jul 22 16:13:27 2012 -0700 +@@ -1,3 +1,7 @@ ++1.2.13: ++Paul P Komkoff Jr - Sun Jul 22 16:12:28 PDT 2012 ++ * Fixed malloc/free mismatch in the MikMod driver ++ + 1.2.12: + Sam Lantinga - Sat Jan 14 22:00:29 2012 -0500 + * Fixed seek offset with SMPEG (was relative, should be absolute) +diff -r c92001a2c18f -r 56cad6484b04 dynamic_mod.c +--- a/dynamic_mod.c Sun Mar 04 21:32:47 2012 +0000 ++++ b/dynamic_mod.c Sun Jul 22 16:13:27 2012 -0700 +@@ -93,6 +93,13 @@ + SDL_UnloadObject(mikmod.handle); + return -1; + } ++ mikmod.MikMod_free = ++ (void (*)(void*)) ++ SDL_LoadFunction(mikmod.handle, "MikMod_free"); ++ if ( mikmod.MikMod_free == NULL ) { ++ SDL_UnloadObject(mikmod.handle); ++ return -1; ++ } + mikmod.Player_Active = + (BOOL (*)(void)) + SDL_LoadFunction(mikmod.handle, "Player_Active"); +diff -r c92001a2c18f -r 56cad6484b04 dynamic_mod.h +--- a/dynamic_mod.h Sun Mar 04 21:32:47 2012 +0000 ++++ b/dynamic_mod.h Sun Jul 22 16:13:27 2012 -0700 +@@ -35,6 +35,7 @@ + void (*MikMod_RegisterDriver)(struct MDRIVER*); + int* MikMod_errno; + char* (*MikMod_strerror)(int); ++ void (*MikMod_free)(void*); + BOOL (*Player_Active)(void); + void (*Player_Free)(MODULE*); + MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL); +diff -r c92001a2c18f -r 56cad6484b04 music_mod.c +--- a/music_mod.c Sun Mar 04 21:32:47 2012 +0000 ++++ b/music_mod.c Sun Jul 22 16:13:27 2012 -0700 +@@ -109,13 +109,13 @@ + + list = mikmod.MikMod_InfoDriver(); + if ( list ) +- free(list); ++ mikmod.MikMod_free(list); + else + mikmod.MikMod_RegisterDriver(mikmod.drv_nos); + + list = mikmod.MikMod_InfoLoader(); + if ( list ) +- free(list); ++ mikmod.MikMod_free(list); + else + mikmod.MikMod_RegisterAllLoaders(); + diff --git a/mingw-w64-SDL_mixer/mikmod2.patch b/mingw-w64-SDL_mixer/mikmod2.patch new file mode 100644 index 0000000000..32a0d6af22 --- /dev/null +++ b/mingw-w64-SDL_mixer/mikmod2.patch @@ -0,0 +1,34 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1343000017 25200 +# Node ID 2ebb0d016f277f7f643d8a66ed0e1099e10d1fba +# Parent 56cad6484b04f83c8d42428c755a046678506436 +Fixed normal linking with libmikmod and linking with earlier versions of libmikmod. + +diff -r 56cad6484b04 -r 2ebb0d016f27 dynamic_mod.c +--- a/dynamic_mod.c Sun Jul 22 16:13:27 2012 -0700 ++++ b/dynamic_mod.c Sun Jul 22 16:33:37 2012 -0700 +@@ -97,8 +97,8 @@ + (void (*)(void*)) + SDL_LoadFunction(mikmod.handle, "MikMod_free"); + if ( mikmod.MikMod_free == NULL ) { +- SDL_UnloadObject(mikmod.handle); +- return -1; ++ /* libmikmod 3.1 and earlier doesn't have it */ ++ mikmod.MikMod_free = free; + } + mikmod.Player_Active = + (BOOL (*)(void)) +@@ -246,6 +246,11 @@ + mikmod.MikMod_RegisterDriver = MikMod_RegisterDriver; + mikmod.MikMod_errno = &MikMod_errno; + mikmod.MikMod_strerror = MikMod_strerror; ++#if LIBMIKMOD_VERSION < ((3<<16)|(2<<8)) ++ mikmod.MikMod_free = free; ++#else ++ mikmod.MikMod_free = MikMod_free; ++#endif + mikmod.Player_Active = Player_Active; + mikmod.Player_Free = Player_Free; + mikmod.Player_LoadGeneric = Player_LoadGeneric; diff --git a/mingw-w64-SDL_net/PKGBUILD b/mingw-w64-SDL_net/PKGBUILD new file mode 100644 index 0000000000..ede3dabb94 --- /dev/null +++ b/mingw-w64-SDL_net/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexey Pavlov + +_realname=SDL_net +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=1.2.8 +pkgrel=1 +pkgdesc="A small sample cross-platform networking library (mingw-w64)" +arch=('any') +url="http://www.libsdl.org/projects/SDL_net" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-SDL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=(http://www.libsdl.org/projects/SDL_net/release/${_realname}-${pkgver}.tar.gz) +md5sums=('20e64e61d65662db66c379034f11f718') + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}/" + + make DESTDIR="${pkgdir}/" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-SDL_ttf/PKGBUILD b/mingw-w64-SDL_ttf/PKGBUILD new file mode 100644 index 0000000000..27129ba533 --- /dev/null +++ b/mingw-w64-SDL_ttf/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Alexey Pavlov + +_realname=SDL_ttf +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.0.11 +pkgrel=4 +pkgdesc="A library that allows you to use TrueType fonts in your SDL applications (mingw-w64)" +arch=('any') +url="http://www.libsdl.org/projects/SDL_ttf/" +license=("custom") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-SDL" "${MINGW_PACKAGE_PREFIX}-freetype") +options=('staticlibs' 'strip') +source=(http://www.libsdl.org/projects/SDL_ttf/release/${_realname}-${pkgver}.tar.gz) +md5sums=('61e29bd9da8d245bc2471d1b2ce591aa') + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-a52dec/a52dec-0.7.4-build.patch b/mingw-w64-a52dec/0001-a52dec-0.7.4-build.patch similarity index 100% rename from mingw-w64-a52dec/a52dec-0.7.4-build.patch rename to mingw-w64-a52dec/0001-a52dec-0.7.4-build.patch diff --git a/mingw-w64-a52dec/0002-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch b/mingw-w64-a52dec/0002-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch new file mode 100644 index 0000000000..fd8b5e3a6a --- /dev/null +++ b/mingw-w64-a52dec/0002-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch @@ -0,0 +1,11 @@ +diff -urN a52dec-0.7.4-orig/configure.in a52dec-0.7.4/configure.in +--- a52dec-0.7.4-orig/configure.in 2015-07-12 13:15:51.803347900 +0100 ++++ a52dec-0.7.4/configure.in 2015-07-12 13:16:11.160455100 +0100 +@@ -85,7 +85,6 @@ + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +-AC_C_ALWAYS_INLINE + AC_C_RESTRICT + AC_TYPE_SIZE_T + AC_C_BIGENDIAN diff --git a/mingw-w64-a52dec/PKGBUILD b/mingw-w64-a52dec/PKGBUILD index c82fa05046..e3a2103ed2 100644 --- a/mingw-w64-a52dec/PKGBUILD +++ b/mingw-w64-a52dec/PKGBUILD @@ -1,41 +1,45 @@ # Maintainer: Alexey Pavlov # Contributor: AlexWMF - + _realname=a52dec pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.7.4 -pkgrel=1 -pkgdesc="A free library for decoding ATSC A/52 streams" +pkgrel=3 +pkgdesc="A free library for decoding ATSC A/52 streams (mingw-w64)" url="http://liba52.sourceforge.net/" arch=('any') license=('GPL2') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") source=("http://liba52.sourceforge.net/files/${_realname}-${pkgver}.tar.gz" - 'a52dec-0.7.4-build.patch') + '0001-a52dec-0.7.4-build.patch' + '0002-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch') md5sums=('caa9f5bc44232dc8aeea773fea56be80' - 'fa16f224a7dceb7613824380abef0052') + 'fa16f224a7dceb7613824380abef0052' + 'f3e200f41ecd682c6675d1b9c621c23b') prepare() { cd "${_realname}-${pkgver}" - patch -Np1 -i "${srcdir}/a52dec-0.7.4-build.patch" + patch -Np1 -i "${srcdir}/0001-a52dec-0.7.4-build.patch" + patch -Np1 -i "${srcdir}/0002-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch" sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in mv configure.in configure.ac - ./bootstrap \ - --prefix=${MINGW_PREFIX} + ./bootstrap } build() { - cd ${_realname}-${pkgver} - ./configure \ + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared + make } package() { - cd "${srcdir}/${_realname}-${pkgver}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install - install -m644 liba52/a52_internal.h "${pkgdir}${MINGW_PREFIX}/include/a52dec/" + install -m644 ${srcdir}/${_realname}-${pkgver}/liba52/a52_internal.h "${pkgdir}${MINGW_PREFIX}/include/a52dec/" } diff --git a/mingw-w64-adwaita-icon-theme/PKGBUILD b/mingw-w64-adwaita-icon-theme/PKGBUILD index a941fd5dc9..5805d3c20d 100644 --- a/mingw-w64-adwaita-icon-theme/PKGBUILD +++ b/mingw-w64-adwaita-icon-theme/PKGBUILD @@ -1,41 +1,35 @@ # Maintainer: Alexey Pavlov _realname=adwaita-icon-theme +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.18.0 pkgrel=1 pkgdesc="GNOME icon theme (mingw-w64)" arch=('any') url="http://www.gnome.org" license=("GPL") -makedepends=("intltool") +makedepends=("intltool" "icon-naming-utils") depends=("${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" - "${MINGW_PACKAGE_PREFIX}-icon-naming-utils" - "${MINGW_PACKAGE_PREFIX}-gtk2" - "${MINGW_PACKAGE_PREFIX}-librsvg" - ) -groups=("${MINGW_PACKAGE_PREFIX}-gnome") + "${MINGW_PACKAGE_PREFIX}-librsvg") options=(!libtool strip staticlibs) install=theme-${CARCH}.install -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz - 0001-localedir-fix.patch) -sha256sums=('afacb6025a18be007e33a9663b92cee9d2745279bb00107a68e09b2806f9541f' - '35b66334d0856bc44ef202c8df1bfa11f0be658b31b946ca49afe1c357c61adb') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:4}/${_realname}-${pkgver}.tar.xz) +sha256sums=('5e9ce726001fdd8ee93c394fdc3cdb9e1603bbed5b7c62df453ccf521ec50e58') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0001-localedir-fix.patch - autoreconf -fvi } build() { - [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } @@ -44,4 +38,8 @@ package() { make DESTDIR="$pkgdir" install mkdir -p ${pkgdir}${MINGW_PREFIX}/lib mv ${pkgdir}${MINGW_PREFIX}/share/pkgconfig ${pkgdir}${MINGW_PREFIX}/lib/ + + install -Dm644 "${srcdir}/${_realname}-${pkgver}"/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + install -Dm644 "${srcdir}/${_realname}-${pkgver}"/COPYING_LGPL ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING_LGPL + install -Dm644 "${srcdir}/${_realname}-${pkgver}"/COPYING_CCBYSA3 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING_CCBYSA3 } diff --git a/mingw-w64-adwaita-icon-theme/theme-i686.install b/mingw-w64-adwaita-icon-theme/theme-i686.install index cd7e21db13..ff105002aa 100644 --- a/mingw-w64-adwaita-icon-theme/theme-i686.install +++ b/mingw-w64-adwaita-icon-theme/theme-i686.install @@ -1,6 +1,13 @@ post_install() { - mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/Adwaita - mingw32/bin/gdk-pixbuf-query-loaders.exe --update-cache + [[ -f mingw32/bin/gtk-update-icon-cache.exe ]] && { + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/Adwaita + } + [[ -f mingw32/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/Adwaita + } + [[ -f mingw32/bin/gdk-pixbuf-query-loaders.exe ]] && { + mingw32/bin/gdk-pixbuf-query-loaders.exe --update-cache + } } post_upgrade() { diff --git a/mingw-w64-adwaita-icon-theme/theme-x86_64.install b/mingw-w64-adwaita-icon-theme/theme-x86_64.install index e4196332bd..5eb144e664 100644 --- a/mingw-w64-adwaita-icon-theme/theme-x86_64.install +++ b/mingw-w64-adwaita-icon-theme/theme-x86_64.install @@ -1,6 +1,13 @@ post_install() { - mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/Adwaita - mingw64/bin/gdk-pixbuf-query-loaders.exe --update-cache + [[ -f mingw64/bin/gtk-update-icon-cache.exe ]] && { + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/Adwaita + } + [[ -f mingw64/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/Adwaita + } + [[ -f mingw64/bin/gdk-pixbuf-query-loaders.exe ]] && { + mingw64/bin/gdk-pixbuf-query-loaders.exe --update-cache + } } post_upgrade() { diff --git a/mingw-w64-ag/0001-lang-Allow-both-extensions-and-full-filenames.patch b/mingw-w64-ag/0001-lang-Allow-both-extensions-and-full-filenames.patch new file mode 100644 index 0000000000..accb200c4c --- /dev/null +++ b/mingw-w64-ag/0001-lang-Allow-both-extensions-and-full-filenames.patch @@ -0,0 +1,240 @@ +From 8ef5dc35835c271e955979af7ccc660a9996debd Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 23 Feb 2015 21:46:45 +0000 +Subject: [PATCH 1/6] lang: Allow both extensions and full filenames + +Because many filetypes (e.g. make) are not indicated by the +file extension but instead by the full filename (Makefile). + +Renames extension to pattern, but retains the existing format +where each pattern is treated as an extension. Full filenames +are indicated by prefixing the pattern with a '^'. +--- + src/lang.c | 57 ++++++++++++++++++++++++++++++++++----------------------- + src/lang.h | 24 +++++++++++++----------- + src/options.c | 28 ++++++++++++++-------------- + 3 files changed, 61 insertions(+), 48 deletions(-) + +diff --git a/src/lang.c b/src/lang.c +index 87cdcec..54f51ca 100644 +--- a/src/lang.c ++++ b/src/lang.c +@@ -101,20 +101,27 @@ size_t get_lang_count() { + return sizeof(langs) / sizeof(lang_spec_t); + } + +-char *make_lang_regex(char *ext_array, size_t num_exts) { ++char *make_lang_regex(char *pat_array, size_t num_pats) { + int regex_capacity = 100; + char *regex = ag_malloc(regex_capacity); +- int regex_length = 3; ++ int regex_length = 1; + int subsequent = 0; +- char *extension; ++ char *pattern; ++ const char *dot = "\\."; ++ size_t strlen_dot = strlen(dot); + size_t i; + +- strcpy(regex, "\\.("); ++ strcpy(regex, "("); + +- for (i = 0; i < num_exts; ++i) { +- extension = ext_array + i * SINGLE_EXT_LEN; +- int extension_length = strlen(extension); +- while (regex_length + extension_length + 3 + subsequent > regex_capacity) { ++ for (i = 0; i < num_pats; ++i) { ++ pattern = pat_array + i * SINGLE_PAT_LEN; ++ int is_extension = (*pattern == '^') ? 0 : 1; ++ int length = strlen(pattern); ++ if (is_extension == 0) { ++ pattern += 1; ++ length -= 1; ++ } ++ while (regex_length + length + 3 + subsequent > regex_capacity) { + regex_capacity *= 2; + regex = ag_realloc(regex, regex_capacity); + } +@@ -123,8 +130,12 @@ char *make_lang_regex(char *ext_array, size_t num_exts) { + } else { + subsequent = 1; + } +- strcpy(regex + regex_length, extension); +- regex_length += extension_length; ++ if (is_extension == 1) { ++ strcpy(regex + regex_length, dot); ++ regex_length += strlen_dot; ++ } ++ strcpy(regex + regex_length, pattern); ++ regex_length += length; + } + + regex[regex_length++] = ')'; +@@ -133,29 +144,29 @@ char *make_lang_regex(char *ext_array, size_t num_exts) { + return regex; + } + +-size_t combine_file_extensions(size_t *extension_index, size_t len, char **exts) { ++size_t combine_file_patterns(size_t *pattern_index, size_t len, char **pats) { + /* Keep it fixed as 100 for the reason that if you have more than 100 + * file types to search, you'd better search all the files. + * */ +- size_t ext_capacity = 100; +- (*exts) = (char *)ag_malloc(ext_capacity * SINGLE_EXT_LEN); +- memset((*exts), 0, ext_capacity * SINGLE_EXT_LEN); +- size_t num_of_extensions = 0; ++ size_t pat_capacity = 100; ++ (*pats) = (char *)ag_malloc(pat_capacity * SINGLE_PAT_LEN); ++ memset((*pats), 0, pat_capacity * SINGLE_PAT_LEN); ++ size_t num_of_patterns = 0; + + size_t i; + for (i = 0; i < len; ++i) { + size_t j = 0; +- const char *ext = langs[extension_index[i]].extensions[j]; ++ const char *pat = langs[pattern_index[i]].patterns[j]; + do { +- if (num_of_extensions == ext_capacity) { ++ if (num_of_patterns == pat_capacity) { + break; + } +- char *pos = (*exts) + num_of_extensions * SINGLE_EXT_LEN; +- strncpy(pos, ext, strlen(ext)); +- ++num_of_extensions; +- ext = langs[extension_index[i]].extensions[++j]; +- } while (ext); ++ char *pos = (*pats) + num_of_patterns * SINGLE_PAT_LEN; ++ strncpy(pos, pat, strlen(pat)); ++ ++num_of_patterns; ++ pat = langs[pattern_index[i]].patterns[++j]; ++ } while (pat); + } + +- return num_of_extensions; ++ return num_of_patterns; + } +diff --git a/src/lang.h b/src/lang.h +index d0007f9..202da4b 100644 +--- a/src/lang.h ++++ b/src/lang.h +@@ -1,12 +1,12 @@ + #ifndef LANG_H + #define LANG_H + +-#define MAX_EXTENSIONS 12 +-#define SINGLE_EXT_LEN 20 ++#define MAX_PATTERNS 12 ++#define SINGLE_PAT_LEN 20 + + typedef struct { + const char *name; +- const char *extensions[MAX_EXTENSIONS]; ++ const char *patterns[MAX_PATTERNS]; + } lang_spec_t; + + extern lang_spec_t langs[]; +@@ -17,20 +17,22 @@ extern lang_spec_t langs[]; + size_t get_lang_count(void); + + /** +-Convert a NULL-terminated array of language extensions +-into a regular expression of the form \.(extension1|extension2...)$ ++Convert a NULL-terminated array of language patterns ++into a regular expression of the form (\.?pattern1|\.?pattern2...)$ ++Patterns that begin with ^ are interpreted as full names, those ++without are interpreted as file extensions. + + Caller is responsible for freeing the returned string. + */ +-char *make_lang_regex(char *ext_array, size_t num_exts); ++char *make_lang_regex(char *pat_array, size_t num_pats); + + + /** +-Combine multiple file type extensions into one array. ++Combine multiple file type patterns into one array. + +-The combined result is returned through *exts*; +-*exts* is one-dimension array, which can contain up to 100 extensions; +-The number of extensions that *exts* actually contain is returned. ++The combined result is returned through *pats*; ++*pats* is one-dimension array, which can contain up to 100 patterns; ++The number of patterns that *pats* actually contain is returned. + */ +-size_t combine_file_extensions(size_t *extension_index, size_t len, char **exts); ++size_t combine_file_patterns(size_t *pattern_index, size_t len, char **pats); + #endif +diff --git a/src/options.c b/src/options.c +index 88ad65b..bafb1ea 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -210,9 +210,9 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + size_t longopts_len, full_len; + option_t *longopts; + char *lang_regex = NULL; +- size_t *ext_index = NULL; +- char *extensions = NULL; +- size_t num_exts = 0; ++ size_t *pat_index = NULL; ++ char *patterns = NULL; ++ size_t num_pats = 0; + + init_options(); + +@@ -304,8 +304,8 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + full_len = (longopts_len + lang_count + 1); + longopts = ag_malloc(full_len * sizeof(option_t)); + memcpy(longopts, base_longopts, sizeof(base_longopts)); +- ext_index = (size_t *)ag_malloc(sizeof(size_t) * lang_count); +- memset(ext_index, 0, sizeof(size_t) * lang_count); ++ pat_index = (size_t *)ag_malloc(sizeof(size_t) * lang_count); ++ memset(pat_index, 0, sizeof(size_t) * lang_count); + + for (i = 0; i < lang_count; i++) { + option_t opt = { langs[i].name, no_argument, NULL, 0 }; +@@ -544,7 +544,7 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + + for (i = 0; i < lang_count; i++) { + if (strcmp(longopts[opt_index].name, langs[i].name) == 0) { +- ext_index[lang_num++] = i; ++ pat_index[lang_num++] = i; + break; + } + } +@@ -572,16 +572,16 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + free(file_search_regex); + } + +- if (ext_index[0]) { +- num_exts = combine_file_extensions(ext_index, lang_num, &extensions); +- lang_regex = make_lang_regex(extensions, num_exts); ++ if (pat_index[0]) { ++ num_pats = combine_file_patterns(pat_index, lang_num, &patterns); ++ lang_regex = make_lang_regex(patterns, num_pats); + compile_study(&opts.file_search_regex, &opts.file_search_regex_extra, lang_regex, 0, 0); + } + +- if (extensions) { +- free(extensions); ++ if (patterns) { ++ free(patterns); + } +- free(ext_index); ++ free(pat_index); + if (lang_regex) { + free(lang_regex); + } +@@ -614,8 +614,8 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + for (lang_index = 0; lang_index < lang_count; lang_index++) { + printf(" --%s\n ", langs[lang_index].name); + int j; +- for (j = 0; j < MAX_EXTENSIONS && langs[lang_index].extensions[j]; j++) { +- printf(" .%s", langs[lang_index].extensions[j]); ++ for (j = 0; j < MAX_PATTERNS && langs[lang_index].patterns[j]; j++) { ++ printf(" .%s", langs[lang_index].patterns[j]); + } + printf("\n\n"); + } +-- +2.6.3 + diff --git a/mingw-w64-ag/0002-options-Fix-ordering-problems-with-color.patch b/mingw-w64-ag/0002-options-Fix-ordering-problems-with-color.patch new file mode 100644 index 0000000000..ff870af51a --- /dev/null +++ b/mingw-w64-ag/0002-options-Fix-ordering-problems-with-color.patch @@ -0,0 +1,259 @@ +From 8560a5b4e4a3c984265c767f7b6fcc5aa787c654 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 23 Feb 2015 22:12:15 +0000 +Subject: [PATCH 2/6] options: Fix ordering problems with --color + +Moved around the logic of setting opts.color so that: + +1. If the user explicitly requests or disables it, then + that is respected. + +2. Automatic disabling of color doesn't happen for FIFOs + on Windows since mintty.exe console handles are pipes. + +3. The old location of the isatty check meant that if the + user specified --color, then group would get set to 0, + color would be TRUE and the output would not show any + filenames at all. + +4. Default color to TRUE if MSYSCON env. var = mintty.exe +--- + configure.ac | 2 +- + src/options.c | 148 ++++++++++++++++++++++++++++++++++++---------------------- + src/options.h | 10 ++++ + 3 files changed, 102 insertions(+), 58 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 42aaf79..9e6b778 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,7 +24,7 @@ AX_PTHREAD( + ) + + # Run CFLAGS="-pg" ./configure if you want debug symbols +-CFLAGS="$CFLAGS $PTHREAD_CFLAGS $PCRE_CFLAGS -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -Wno-missing-braces -std=gnu89 -D_GNU_SOURCE -O2" ++CFLAGS="$CFLAGS $PTHREAD_CFLAGS $PCRE_CFLAGS -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -Wno-missing-braces -std=gnu89 -D_GNU_SOURCE -O0" + LDFLAGS="$LDFLAGS" + + case $host in +diff --git a/src/options.c b/src/options.c +index bafb1ea..f329887 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -140,8 +140,16 @@ void print_version(void) { + void init_options(void) { + memset(&opts, 0, sizeof(opts)); + opts.casing = CASE_DEFAULT; +- opts.color = TRUE; +- opts.color_win_ansi = FALSE; ++ opts.color = COLOR_DEFAULT_TRUE; ++#ifdef _WIN32 ++ const char* env_MSYSCON = getenv("MSYSCON"); ++ opts.color_win_ansi = ((getenv("ANSICON") || getenv("CMDER_ROOT") ++ || (env_MSYSCON && !strcmp(env_MSYSCON, "mintty.exe")))) ++ ? COLOR_DEFAULT_TRUE : COLOR_DEFAULT_FALSE; ++#else ++ opts.color_win_ansi = COLOR_DEFAULT_FALSE; ++#endif ++ + opts.max_matches_per_file = 0; + opts.max_search_depth = DEFAULT_MAX_SEARCH_DEPTH; + opts.multiline = TRUE; +@@ -226,11 +234,11 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + { "before", optional_argument, NULL, 'B' }, + { "break", no_argument, &opts.print_break, 1 }, + { "case-sensitive", no_argument, NULL, 's' }, +- { "color", no_argument, &opts.color, 1 }, ++ { "color", no_argument, &opts.color, COLOR_EXPLICIT_TRUE }, + { "color-line-number", required_argument, NULL, 0 }, + { "color-match", required_argument, NULL, 0 }, + { "color-path", required_argument, NULL, 0 }, +- { "color-win-ansi", no_argument, &opts.color_win_ansi, TRUE }, ++ { "color-win-ansi", no_argument, &opts.color_win_ansi, COLOR_EXPLICIT_TRUE }, + { "column", no_argument, &opts.column, 1 }, + { "context", optional_argument, NULL, 'C' }, + { "count", no_argument, NULL, 'c' }, +@@ -262,7 +270,7 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + { "no-recurse", no_argument, NULL, 'n' }, + { "noaffinity", no_argument, &opts.use_thread_affinity, 0 }, + { "nobreak", no_argument, &opts.print_break, 0 }, +- { "nocolor", no_argument, &opts.color, 0 }, ++ { "nocolor", no_argument, &opts.color, COLOR_EXPLICIT_FALSE }, + { "nofilename", no_argument, NULL, 0 }, + { "nofollow", no_argument, &opts.follow_symlinks, 0 }, + { "nogroup", no_argument, &group, 0 }, +@@ -327,22 +335,6 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + } + } + +- /* If we're not outputting to a terminal. change output to: +- * turn off colors +- * print filenames on every line +- */ +- if (!isatty(fileno(stdout))) { +- opts.color = 0; +- group = 0; +- +- /* Don't search the file that stdout is redirected to */ +- rv = fstat(fileno(stdout), &statbuf); +- if (rv != 0) { +- die("Error fstat()ing stdout"); +- } +- opts.stdout_inode = statbuf.st_ino; +- } +- + char *file_search_regex = NULL; + while ((ch = getopt_long(argc, argv, "A:aB:C:cDG:g:FfHhiLlm:nop:QRrSsvVtuUwW:z0", longopts, &opt_index)) != -1) { + switch (ch) { +@@ -662,42 +654,6 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + opts.after = opts.context; + } + +- if (opts.ackmate) { +- opts.color = 0; +- opts.print_break = 1; +- group = 1; +- opts.search_stream = 0; +- } +- +- if (opts.vimgrep) { +- opts.color = 0; +- opts.print_break = 0; +- group = 1; +- opts.search_stream = 0; +- opts.print_path = PATH_PRINT_NOTHING; +- } +- +- if (opts.parallel) { +- opts.search_stream = 0; +- } +- +- if (!(opts.print_path != PATH_PRINT_DEFAULT || opts.print_break == 0)) { +- if (group) { +- opts.print_break = 1; +- } else { +- opts.print_path = PATH_PRINT_DEFAULT_EACH_LINE; +- opts.print_break = 0; +- } +- } +- +- if (opts.search_stream) { +- opts.print_break = 0; +- opts.print_path = PATH_PRINT_NOTHING; +- if (opts.print_line_numbers != 2) { +- opts.print_line_numbers = 0; +- } +- } +- + if (accepts_query && argc > 0) { + // use the provided query + opts.query = ag_strdup(argv[0]); +@@ -761,6 +717,84 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) { + (*paths)[i] = NULL; + (*base_paths)[i] = NULL; + ++ /* If we're not outputting to a terminal. change output to: ++ * turn off colors ++ * print filenames on every line ++ */ ++ if (!isatty(fileno(stdout))) { ++ /* Don't search the file that stdout is redirected to */ ++ rv = fstat(fileno(stdout), &statbuf); ++ if (rv != 0) { ++ die("Error fstat()ing stdout"); ++ } ++ opts.stdout_inode = statbuf.st_ino; ++ /* Assume the user knows best */ ++ if (opts.color != COLOR_EXPLICIT_TRUE) { ++ /* On Windows redirection to regular file *can* br detected via ++ statbuf.st_mode & S_IFREG (while statbuf.st_ino is always 0) */ ++ if (statbuf.st_ino != 0 ++ || statbuf.st_mode & S_IFREG ++#if !defined(_WIN32) ++ /* On Windows bash.exe pipes cannot be distinguished from cmd.exe ++ pipes or mintty.exe console output (statbuf.st_mode & S_IFIFO) ++ so its best not to disable color output here. */ ++ || statbuf.st_mode & S_IFIFO ++#endif ++ ) { ++ opts.color = COLOR_DEFAULT_FALSE; ++ group = 0; ++ } ++ } ++ } ++ ++ if (opts.ackmate) { ++ opts.color = COLOR_EMULATION_FALSE; ++ opts.print_break = 1; ++ group = 1; ++ opts.search_stream = 0; ++ } ++ ++ if (opts.vimgrep) { ++ opts.color = COLOR_EMULATION_FALSE; ++ opts.print_break = 0; ++ group = 1; ++ opts.search_stream = 0; ++ opts.print_path = PATH_PRINT_NOTHING; ++ } ++ ++ if (opts.parallel) { ++ opts.search_stream = 0; ++ } ++ ++ if (!(opts.print_path != PATH_PRINT_DEFAULT || opts.print_break == 0)) { ++ if (group) { ++ opts.print_break = 1; ++ } else { ++ opts.print_path = PATH_PRINT_DEFAULT_EACH_LINE; ++ opts.print_break = 0; ++ } ++ } ++ ++ if (opts.search_stream) { ++ opts.print_break = 0; ++ opts.print_path = PATH_PRINT_NOTHING; ++ if (opts.print_line_numbers != 2) { ++ opts.print_line_numbers = 0; ++ } ++ } ++ ++ if (opts.color == COLOR_DEFAULT_FALSE || opts.color == COLOR_EXPLICIT_FALSE || ++ opts.color == COLOR_EMULATION_FALSE) { ++ opts.color = COLOR_FALSE; ++ } else { ++ opts.color = COLOR_TRUE; ++ } ++ if (opts.color_win_ansi == COLOR_DEFAULT_FALSE) { ++ opts.color_win_ansi = COLOR_FALSE; ++ } else { ++ opts.color_win_ansi = COLOR_TRUE; ++ } ++ + #ifdef _WIN32 + windows_use_ansi(opts.color_win_ansi); + #endif +diff --git a/src/options.h b/src/options.h +index ac213f2..2cf8c68 100644 +--- a/src/options.h ++++ b/src/options.h +@@ -26,6 +26,16 @@ enum path_print_behavior { + PATH_PRINT_NOTHING + }; + ++enum color_behaviour { ++ COLOR_FALSE = 0, ++ COLOR_TRUE = 1, ++ COLOR_DEFAULT_FALSE, ++ COLOR_DEFAULT_TRUE, ++ COLOR_EXPLICIT_FALSE, ++ COLOR_EXPLICIT_TRUE, ++ COLOR_EMULATION_FALSE, ++}; ++ + typedef struct { + int ackmate; + pcre *ackmate_dir_filter; +-- +2.6.3 + diff --git a/mingw-w64-ag/0003-lang-Add-autotools-ac-am-in-m4-pc.patch b/mingw-w64-ag/0003-lang-Add-autotools-ac-am-in-m4-pc.patch new file mode 100644 index 0000000000..03b0d2e379 --- /dev/null +++ b/mingw-w64-ag/0003-lang-Add-autotools-ac-am-in-m4-pc.patch @@ -0,0 +1,24 @@ +From 8a1495dce46227097c73adfbeb55cc4dea9c1a3d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 23 Feb 2015 22:16:54 +0000 +Subject: [PATCH 3/6] lang: Add autotools (ac, am, in, m4, pc) + +--- + src/lang.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lang.c b/src/lang.c +index 54f51ca..b5b2a2b 100644 +--- a/src/lang.c ++++ b/src/lang.c +@@ -8,6 +8,7 @@ lang_spec_t langs[] = { + { "actionscript", { "as", "mxml" } }, + { "ada", { "ada", "adb", "ads" } }, + { "asm", { "asm", "s" } }, ++ { "autotools", { "ac", "am", "in", "m4", "pc" } }, + { "batch", { "bat", "cmd" } }, + { "bitbake", { "bb", "bbappend", "bbclass", "inc" } }, + { "bro", { "bro", "bif" } }, +-- +2.6.3 + diff --git a/mingw-w64-ag/0004-lang-Add-to-make-Makefile-Makefile.Debug-Makefile.Re.patch b/mingw-w64-ag/0004-lang-Add-to-make-Makefile-Makefile.Debug-Makefile.Re.patch new file mode 100644 index 0000000000..0db6537af6 --- /dev/null +++ b/mingw-w64-ag/0004-lang-Add-to-make-Makefile-Makefile.Debug-Makefile.Re.patch @@ -0,0 +1,29 @@ +From 778583071e6b237db7e80f08b63e62a6f1dc5d98 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 23 Feb 2015 22:18:27 +0000 +Subject: [PATCH 4/6] lang: Add to make (^Makefile, ^Makefile.Debug, + ^Makefile.Release, *.make) + +All but one addition are full filename patterns. The +Makefile.Debug and Makefile.Release ones are used by Qt, the *.make +one is used by CMake. +--- + src/lang.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lang.c b/src/lang.c +index b5b2a2b..ede3b85 100644 +--- a/src/lang.c ++++ b/src/lang.c +@@ -45,7 +45,7 @@ lang_spec_t langs[] = { + { "lisp", { "lisp", "lsp" } }, + { "lua", { "lua" } }, + { "m4", { "m4" } }, +- { "make", { "Makefiles", "mk", "mak" } }, ++ { "make", { "^Makefile", "^Makefile.Debug", "^Makefile.Release", "Makefiles", "mk", "mak", "make" } }, + { "mako", { "mako" } }, + { "markdown", { "markdown", "mdown", "mdwn", "mkdn", "mkd", "md" } }, + { "mason", { "mas", "mhtml", "mpl", "mtxt" } }, +-- +2.6.3 + diff --git a/mingw-w64-ag/0005-lang-Add-makepkg-PKGBUILD-diff-patch-in-install.patch b/mingw-w64-ag/0005-lang-Add-makepkg-PKGBUILD-diff-patch-in-install.patch new file mode 100644 index 0000000000..8327541a6d --- /dev/null +++ b/mingw-w64-ag/0005-lang-Add-makepkg-PKGBUILD-diff-patch-in-install.patch @@ -0,0 +1,25 @@ +From 7faacc6b0552fb87e34f6b4ff7afc6b37edcfb68 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 23 Feb 2015 22:21:26 +0000 +Subject: [PATCH 5/6] lang: Add makepkg (^PKGBUILD, diff, patch, in, install) + +Used by the makepkg build system of ArchLinux and MSYS2 +--- + src/lang.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lang.c b/src/lang.c +index ede3b85..fc4ae6b 100644 +--- a/src/lang.c ++++ b/src/lang.c +@@ -46,6 +46,7 @@ lang_spec_t langs[] = { + { "lua", { "lua" } }, + { "m4", { "m4" } }, + { "make", { "^Makefile", "^Makefile.Debug", "^Makefile.Release", "Makefiles", "mk", "mak", "make" } }, ++ { "makepkg", { "^PKGBUILD", "diff", "patch", "in", "install" } }, + { "mako", { "mako" } }, + { "markdown", { "markdown", "mdown", "mdwn", "mkdn", "mkd", "md" } }, + { "mason", { "mas", "mhtml", "mpl", "mtxt" } }, +-- +2.6.3 + diff --git a/mingw-w64-ag/0006-lang-Add-cmake-CMakeLists.txt-CMakeCache.txt.patch b/mingw-w64-ag/0006-lang-Add-cmake-CMakeLists.txt-CMakeCache.txt.patch new file mode 100644 index 0000000000..bb59a9c468 --- /dev/null +++ b/mingw-w64-ag/0006-lang-Add-cmake-CMakeLists.txt-CMakeCache.txt.patch @@ -0,0 +1,25 @@ +From 10d70a323b34491746fc2e563c7765b54ab7f0e9 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 12 Dec 2015 19:55:47 +0000 +Subject: [PATCH 6/6] lang: Add cmake (^CMakeLists.txt, ^CMakeCache.txt .. + +.. ^CMakeError.log, ^CMakeOutput.log, cmake) +--- + src/lang.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lang.c b/src/lang.c +index fc4ae6b..77a32dd 100644 +--- a/src/lang.c ++++ b/src/lang.c +@@ -15,6 +15,7 @@ lang_spec_t langs[] = { + { "cc", { "c", "h", "xs" } }, + { "cfmx", { "cfc", "cfm", "cfml" } }, + { "clojure", { "clj", "cljs", "cljc", "cljx" } }, ++ { "cmake", { "^CMakeLists.txt", "^CMakeCache.txt", "^CMakeError.log", "^CMakeOutput.log", "cmake" } }, + { "coffee", { "coffee", "cjsx" } }, + { "cpp", { "cpp", "cc", "C", "cxx", "m", "hpp", "hh", "h", "H", "hxx" } }, + { "crystal", { "cr", "ecr" } }, +-- +2.6.3 + diff --git a/mingw-w64-ag/PKGBUILD b/mingw-w64-ag/PKGBUILD new file mode 100644 index 0000000000..170786013d --- /dev/null +++ b/mingw-w64-ag/PKGBUILD @@ -0,0 +1,74 @@ +# Maintainer: Ray Donnelly +# Maintainer: Martell Malone + +_realname=ag +_longname=the_silver_searcher +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.31.0.r1666.0e577cc +pkgrel=1 +pkgdesc="The Silver Searcher: An attempt to make something better than ack, which itself is better than grep (mingw-w64)" +arch=('any') +url="http://geoff.greer.fm/ag" +license=("Apache") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") +depends=("${MINGW_PACKAGE_PREFIX}-pcre" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib") +options=('staticlibs') # '!strip' 'debug') +source=("${_realname}"::"git+https://github.com/ggreer/the_silver_searcher.git" + "0001-lang-Allow-both-extensions-and-full-filenames.patch" + "0002-options-Fix-ordering-problems-with-color.patch" + "0003-lang-Add-autotools-ac-am-in-m4-pc.patch" + "0004-lang-Add-to-make-Makefile-Makefile.Debug-Makefile.Re.patch" + "0005-lang-Add-makepkg-PKGBUILD-diff-patch-in-install.patch" + "0006-lang-Add-cmake-CMakeLists.txt-CMakeCache.txt.patch") +md5sums=('SKIP' + '73e60af8e8f0eb12e69797a6377b3ba9' + '8364f2765d95d3a550cd7698c3540ab6' + '6dc9b48f11616f2392935d3297bdabbc' + 'e40bea74e7b32da3543d635e1984be64' + '40ef6ecb9db4c7b8ae6e8a13b5ecafb8' + '75e55c3d88d435994e8562d29ada825e') + +pkgver() { + cd ${srcdir}/${_realname} + local AC_INIT_VER=$(grep AC_INIT configure.ac -A5 | tr '\n' ' ' | sed -e 's/AC_INIT([^,]\+,\s*\[\?\([0-9.a-z]\+\).*/\1/') + printf "%s.r%s.%s" "${AC_INIT_VER}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_realname} + git am "${srcdir}"/0001-lang-Allow-both-extensions-and-full-filenames.patch + git am "${srcdir}"/0002-options-Fix-ordering-problems-with-color.patch + git am "${srcdir}"/0003-lang-Add-autotools-ac-am-in-m4-pc.patch + git am "${srcdir}"/0004-lang-Add-to-make-Makefile-Makefile.Debug-Makefile.Re.patch + git am "${srcdir}"/0005-lang-Add-makepkg-PKGBUILD-diff-patch-in-install.patch + git am "${srcdir}"/0006-lang-Add-cmake-CMakeLists.txt-CMakeCache.txt.patch + + # configure.ac forces -O2, so force it to -O0 if debugging. + if check_option "debug" "y"; then + sed -i "s#-O2#-O0#g" configure.ac + fi + + autoreconf -fi +} + +build() { + + mkdir -p "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" + + "${srcdir}"/${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --{build,host}=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-allegro/PKGBUILD b/mingw-w64-allegro/PKGBUILD index f2d6019aea..5243b13809 100644 --- a/mingw-w64-allegro/PKGBUILD +++ b/mingw-w64-allegro/PKGBUILD @@ -1,70 +1,62 @@ # Maintainer: Alexey Pavlov _realname=allegro +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.0.10 -pkgrel=2 +pkgver=5.1.12.0 +pkgrel=1 pkgdesc="Portable library mainly aimed at video game and multimedia programming (mingw-w64)" arch=(any) -url="http://alleg.sourceforge.net" -license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-physfs" - "${MINGW_PACKAGE_PREFIX}-libvorbis" - "${MINGW_PACKAGE_PREFIX}-flac" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-openal" - "${MINGW_PACKAGE_PREFIX}-dumb" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo") +url="http://liballeg.org/" +license=("ZLIB") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-dumb" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-flac" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libvorbis" + "${MINGW_PACKAGE_PREFIX}-openal" + "${MINGW_PACKAGE_PREFIX}-physfs" + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -optdepends=( - "${MINGW_PACKAGE_PREFIX}-dumb: allegro_audio" - "${MINGW_PACKAGE_PREFIX}-flac: allegro_audio" - "${MINGW_PACKAGE_PREFIX}-freetype: allegro_font" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo: allegro_image" - "${MINGW_PACKAGE_PREFIX}-libpng: allegro_image" - "${MINGW_PACKAGE_PREFIX}-libvorbis: allegro_audio" - "${MINGW_PACKAGE_PREFIX}-openal: allegro_audio" - "${MINGW_PACKAGE_PREFIX}-physfs: allegro_physfs") +optdepends=("${MINGW_PACKAGE_PREFIX}-dumb: allegro_audio" + "${MINGW_PACKAGE_PREFIX}-flac: allegro_audio" + "${MINGW_PACKAGE_PREFIX}-freetype: allegro_font" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo: allegro_image" + "${MINGW_PACKAGE_PREFIX}-libpng: allegro_image" + "${MINGW_PACKAGE_PREFIX}-libvorbis: allegro_audio" + "${MINGW_PACKAGE_PREFIX}-openal: allegro_audio" + "${MINGW_PACKAGE_PREFIX}-physfs: allegro_physfs") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/alleg/allegro-$pkgver.tar.gz") +source=(${_realname}-${pkgver}.tar.gz::https://github.com/liballeg/allegro5/archive/${pkgver}.tar.gz) conflicts=("${MINGW_PACKAGE_PREFIX}-allegro-static") provides=("${MINGW_PACKAGE_PREFIX}-allegro-static") -sha256sums=('71b81080f34f6e485edd0c51f22923c18ff967d5db438e591e6f3885d5bdcda1') +sha256sums=('4d9aa8a4cc83fd0887f00969aa5ce8d141a3838fa31cd937d019b4319a73a793') prepare() { - cd "$srcdir/allegro-$pkgver" + cd "${srcdir}/${_realname}5-${pkgver}" sed -i "s,DS3DALG_DEFAULT,GUID_NULL,g" "addons/audio/dsound.cpp" } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - - export DXSDK_DIR=${PREFIX_DEPS}/${MINGW_CHOST} - mkdir "$srcdir/build-${MINGW_CHOST}" && cd "$srcdir/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DWANT_DEMO=OFF \ -DWANT_DOCS=OFF \ -DWANT_EXAMPLES=OFF \ -DINSTALL_PKG_CONFIG_FILES=ON \ - ../${_realname}-${pkgver} + ../${_realname}5-${pkgver} make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install - find "${pkgdir}${MINGW_PREFIX}" -name '*.bat' -o -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-angleproject-git/0000-build-fix.patch b/mingw-w64-angleproject-git/0000-build-fix.patch new file mode 100644 index 0000000000..ca8359d139 --- /dev/null +++ b/mingw-w64-angleproject-git/0000-build-fix.patch @@ -0,0 +1,77 @@ +diff --git a/src/angle.gyp b/src/angle.gyp +index 4095547..3db4840 100644 +--- a/src/angle.gyp ++++ b/src/angle.gyp +@@ -76,7 +76,7 @@ + [ + { + 'destination': '<(angle_gen_path)', +- 'files': [ 'copy_compiler_dll.bat', '<(angle_id_script_base)' ], ++ 'files': [ '<(angle_id_script_base)' ], + }, + ], + 'conditions': +@@ -206,10 +206,10 @@ + 'outputs': [ '<(PRODUCT_DIR)/d3dcompiler_47.dll' ], + 'action': + [ +- "<(angle_gen_path)/copy_compiler_dll.bat", +- "$(PlatformName)", +- "<(windows_sdk_path)", +- "<(PRODUCT_DIR)" ++# "<(angle_gen_path)/copy_compiler_dll.bat", ++# "$(PlatformName)", ++# "<(windows_sdk_path)", ++# "<(PRODUCT_DIR)" + ], + }, + ], #actions +diff --git a/src/common/mathutil.h b/src/common/mathutil.h +index e096b1a..716aeb6 100644 +--- a/src/common/mathutil.h ++++ b/src/common/mathutil.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + namespace gl + { +diff --git a/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp b/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp +index cdf3b8e..59aacb8 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp +@@ -55,6 +55,7 @@ + #include "libANGLE/renderer/d3d/d3d11/shaders/compiled/swizzlef2darrayps.h" + #include "libANGLE/renderer/d3d/d3d11/shaders/compiled/swizzlei2darrayps.h" + #include "libANGLE/renderer/d3d/d3d11/shaders/compiled/swizzleui2darrayps.h" ++#include + + namespace rx + { +diff --git a/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp b/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp +index ae42f36..0f1fed8 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp +@@ -16,6 +16,7 @@ + #include "libANGLE/renderer/d3d/d3d11/renderer11_utils.h" + #include "libANGLE/renderer/d3d/d3d11/Renderer11.h" + #include "third_party/murmurhash/MurmurHash3.h" ++#include + + namespace rx + { +diff --git a/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h b/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h +index c4b79ee..f22609b 100644 +--- a/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h ++++ b/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h +@@ -23,7 +23,7 @@ typedef HGLRC(WINAPI *PFNWGLCREATELAYERCONTEXTPROC)(HDC, int); + typedef BOOL(WINAPI *PFNWGLDELETECONTEXTPROC)(HGLRC); + typedef HGLRC(WINAPI *PFNWGLGETCURRENTCONTEXTPROC)(VOID); + typedef HDC(WINAPI *PFNWGLGETCURRENTDCPROC)(VOID); +-typedef PROC(WINAPI *PFNWGLGETPROCADDRESSPROC)(LPCSTR); ++typedef void*(WINAPI *PFNWGLGETPROCADDRESSPROC)(LPCSTR); + typedef BOOL(WINAPI *PFNWGLMAKECURRENTPROC)(HDC, HGLRC); + typedef BOOL(WINAPI *PFNWGLSHARELISTSPROC)(HGLRC, HGLRC); + typedef BOOL(WINAPI *PFNWGLUSEFONTBITMAPSAPROC)(HDC, DWORD, DWORD, DWORD); diff --git a/mingw-w64-angleproject-git/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch b/mingw-w64-angleproject-git/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch deleted file mode 100644 index 06ab16abdb..0000000000 --- a/mingw-w64-angleproject-git/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 88297d02fd1aed6cac258b72d9d0a8baabad6203 Mon Sep 17 00:00:00 2001 -From: Thomas Hartmann -Date: Mon, 17 Feb 2014 16:56:51 +0200 -Subject: [PATCH] Fix compilation for MSVC 2008 and std::tuple - -For MSVC 2008 make_tuple is in the tr1 namespace. - -Change-Id: I4a51f6cabdf068993869b404b12ed1484a21a9d4 ---- - src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp -index 610a5ef..51d7f0b 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp -@@ -81,7 +81,11 @@ IndexRangeCache::IndexRange::IndexRange(GLenum typ, intptr_t off, GLsizei c) - - bool IndexRangeCache::IndexRange::operator<(const IndexRange& rhs) const - { -+#if defined(_MSC_VER) && _MSC_VER < 1600 -+ return std::tr1::make_tuple(type, offset, count) < std::tr1::make_tuple(rhs.type, rhs.offset, rhs.count); -+#else - return std::make_tuple(type, offset, count) < std::make_tuple(rhs.type, rhs.offset, rhs.count); -+#endif - } - - IndexRangeCache::IndexBounds::IndexBounds() --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch b/mingw-w64-angleproject-git/0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch deleted file mode 100644 index 8b91d4b8ea..0000000000 --- a/mingw-w64-angleproject-git/0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 95e3ca47772ef0552662b1d04b7ee08d9d1d2338 Mon Sep 17 00:00:00 2001 -From: Kai Koehne -Date: Mon, 17 Feb 2014 16:59:19 +0200 -Subject: [PATCH] Fix compilation of ANGLE with mingw-tdm64 gcc 4.8.1 - -Do not rely on sprintf_s being declared/defined. This also fixes -deployment to Windows XP. - -See https://chromium-review.googlesource.com/#/c/182975/ for a similar -commit proposed upstream. - -Task-number: QTBUG-36242 -Change-Id: I520e2f61aeab34963e7a57baafd413c7db93f110 ---- - src/3rdparty/angle/src/libEGL/Display.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp -index a382c3b..13ef701 100644 ---- a/src/3rdparty/angle/src/libEGL/Display.cpp -+++ b/src/3rdparty/angle/src/libEGL/Display.cpp -@@ -523,7 +523,7 @@ void Display::initVendorString() - if (mRenderer && mRenderer->getLUID(&adapterLuid)) - { - char adapterLuidString[64]; -- sprintf_s(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08x%08x)", adapterLuid.HighPart, adapterLuid.LowPart); -+ snprintf(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08x%08x)", adapterLuid.HighPart, adapterLuid.LowPart); - - mVendorString += adapterLuidString; - } --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0003-Fix-compilation-with-MinGW-gcc-64-bit.patch b/mingw-w64-angleproject-git/0003-Fix-compilation-with-MinGW-gcc-64-bit.patch deleted file mode 100644 index 7d70057a9a..0000000000 --- a/mingw-w64-angleproject-git/0003-Fix-compilation-with-MinGW-gcc-64-bit.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a03d8f647816767525489a2b26663d897f0264a0 Mon Sep 17 00:00:00 2001 -From: Kai Koehne -Date: Tue, 18 Feb 2014 09:34:39 +0200 -Subject: [PATCH] Fix compilation with MinGW gcc 64 bit - -Fix compilation of ANGLE with gcc 4.8.0 64 bit: The - - reinterpret_cast(void*) - -was causing - - error: cast from 'const void*' to 'long unsigned int' loses precision - -Task-number: QTBUG-34395 -Change-Id: Ibde75dd4b5536f3827bdf0ab02a15e93a1a8a4f0 ---- - src/3rdparty/angle/src/third_party/trace_event/trace_event.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/3rdparty/angle/src/third_party/trace_event/trace_event.h b/src/3rdparty/angle/src/third_party/trace_event/trace_event.h -index 1880056..637cf9a 100644 ---- a/src/3rdparty/angle/src/third_party/trace_event/trace_event.h -+++ b/src/3rdparty/angle/src/third_party/trace_event/trace_event.h -@@ -587,7 +587,7 @@ const unsigned long long noEventId = 0; - class TraceID { - public: - explicit TraceID(const void* id, unsigned char* flags) : -- m_data(static_cast(reinterpret_cast(id))) -+ m_data(reinterpret_cast(id)) - { - *flags |= TRACE_EVENT_FLAG_MANGLE_ID; - } --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch b/mingw-w64-angleproject-git/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch deleted file mode 100644 index 2c95c5bcfa..0000000000 --- a/mingw-w64-angleproject-git/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9b24b25eeb5ca97d7978c6840fdb1e903bf63a55 Mon Sep 17 00:00:00 2001 -From: Friedemann Kleint -Date: Tue, 18 Feb 2014 09:52:52 +0200 -Subject: [PATCH] Make it possible to link ANGLE statically for - single-thread use. - -Fix exports and provide static instances of thread-local -data depending on QT_OPENGL_ES_2_ANGLE_STATIC. - -Change-Id: Ifab25a820adf5953bb3b09036de53dbf7f1a7fd5 ---- - src/3rdparty/angle/include/KHR/khrplatform.h | 2 +- - src/3rdparty/angle/src/libEGL/main.cpp | 6 ++++++ - src/3rdparty/angle/src/libGLESv2/main.cpp | 6 ++++++ - 3 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h -index c9e6f17..1ac2d3f 100644 ---- a/src/3rdparty/angle/include/KHR/khrplatform.h -+++ b/src/3rdparty/angle/include/KHR/khrplatform.h -@@ -97,7 +97,7 @@ - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ --#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -+#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(QT_OPENGL_ES_2_ANGLE_STATIC) - # define KHRONOS_APICALL __declspec(dllimport) - #elif defined (__SYMBIAN32__) - # define KHRONOS_APICALL IMPORT_C -diff --git a/src/3rdparty/angle/src/libEGL/main.cpp b/src/3rdparty/angle/src/libEGL/main.cpp -index 80dcc34..772b8eb 100644 ---- a/src/3rdparty/angle/src/libEGL/main.cpp -+++ b/src/3rdparty/angle/src/libEGL/main.cpp -@@ -106,7 +106,13 @@ namespace egl - - Current *GetCurrentData() - { -+#ifndef QT_OPENGL_ES_2_ANGLE_STATIC - Current *current = (Current*)TlsGetValue(currentTLS); -+#else -+ // No precautions for thread safety taken as ANGLE is used single-threaded in Qt. -+ static Current s_current = { EGL_SUCCESS, EGL_OPENGL_ES_API, EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE }; -+ Current *current = &s_current; -+#endif - - // ANGLE issue 488: when the dll is loaded after thread initialization, - // thread local storage (current) might not exist yet. -diff --git a/src/3rdparty/angle/src/libGLESv2/main.cpp b/src/3rdparty/angle/src/libGLESv2/main.cpp -index 50e2593..6b459d3 100644 ---- a/src/3rdparty/angle/src/libGLESv2/main.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/main.cpp -@@ -89,7 +89,13 @@ namespace gl - - Current *GetCurrentData() - { -+#ifndef QT_OPENGL_ES_2_ANGLE_STATIC - Current *current = (Current*)TlsGetValue(currentTLS); -+#else -+ // No precautions for thread safety taken as ANGLE is used single-threaded in Qt. -+ static Current s_current = { 0, 0 }; -+ Current *current = &s_current; -+#endif - - // ANGLE issue 488: when the dll is loaded after thread initialization, - // thread local storage (current) might not exist yet. --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0005-Fix-build-when-SSE2-is-not-available.patch b/mingw-w64-angleproject-git/0005-Fix-build-when-SSE2-is-not-available.patch deleted file mode 100644 index 475ec55b0e..0000000000 --- a/mingw-w64-angleproject-git/0005-Fix-build-when-SSE2-is-not-available.patch +++ /dev/null @@ -1,77 +0,0 @@ -From cebc37237a74a130dffaefad0a10da17abc42981 Mon Sep 17 00:00:00 2001 -From: Andy Shaw -Date: Tue, 18 Feb 2014 09:59:17 +0200 -Subject: [PATCH] Fix build when SSE2 is not available. - -Although SSE2 support is detected at runtime it still may not be -available at build time, so we have to ensure it only uses SSE2 -when it is available at build time too. - -Change-Id: I86c45a6466ab4cec79aa0f62b0d5230a78ad825a ---- - src/3rdparty/angle/src/libGLESv2/mathutil.h | 2 ++ - src/3rdparty/angle/src/libGLESv2/renderer/d3d9/Image9.cpp | 6 +++++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/src/3rdparty/angle/src/libGLESv2/mathutil.h b/src/3rdparty/angle/src/libGLESv2/mathutil.h -index f902131..6474b66 100644 ---- a/src/3rdparty/angle/src/libGLESv2/mathutil.h -+++ b/src/3rdparty/angle/src/libGLESv2/mathutil.h -@@ -92,6 +92,7 @@ inline bool supportsSSE2() - return supports; - } - -+#if defined(_M_IX86) || defined(_M_AMD64) // ARM doesn't provide __cpuid() - int info[4]; - __cpuid(info, 0); - -@@ -101,6 +102,7 @@ inline bool supportsSSE2() - - supports = (info[3] >> 26) & 1; - } -+#endif - - checked = true; - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d9/Image9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d9/Image9.cpp -index 8511946..cd12d8c 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d9/Image9.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d9/Image9.cpp -@@ -373,11 +373,13 @@ void Image9::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heigh - switch (mInternalFormat) - { - case GL_ALPHA8_EXT: -+#if defined(__SSE2__) - if (gl::supportsSSE2()) - { - loadAlphaDataToBGRASSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits); - } - else -+#endif - { - loadAlphaDataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits); - } -@@ -413,11 +415,13 @@ void Image9::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heigh - loadRGB565DataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits); - break; - case GL_RGBA8_OES: -+#if defined(__SSE2__) - if (gl::supportsSSE2()) - { - loadRGBAUByteDataToBGRASSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits); - } - else -+#endif - { - loadRGBAUByteDataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits); - } -@@ -729,4 +733,4 @@ void Image9::copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, - mDirty = true; - } - --} -\ No newline at end of file -+} --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch b/mingw-w64-angleproject-git/0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch deleted file mode 100644 index cf31245b95..0000000000 --- a/mingw-w64-angleproject-git/0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 68ba96d224a84389567f506661a78c32b307e84d Mon Sep 17 00:00:00 2001 -From: Kai Koehne -Date: Tue, 18 Feb 2014 10:29:14 +0200 -Subject: [PATCH] Fix compilation of libGLESv2 with older MinGW-w64 - headers - -Fix compilation of libGLESv2 for mingw-headers predating MinGW-w64 -svn commit 5567 (like MinGW-builds gcc 4.7.2-rev8, the toolchain -we officially support). - -Commit 5567 added the D3DCOMPILER_DLL define to d3dcompiler.h, but with -a trailing semicolon that has then fixed in commit 5783. Any toolchain -that ships MinGW-w64 headers from a version in between (like -MinGW-builds gcc 4.7.2-rev11) will unfortunately remain broken. - -Change-Id: I31272a1a991c4fc0f1611f8fb7510be51d6bb925 ---- - .../angle/src/libGLESv2/renderer/Renderer.cpp | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -index 3407353..e74120d 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -@@ -24,6 +24,25 @@ - #define D3DERR_OUTOFVIDEOMEMORY MAKE_HRESULT(1, 0x876, 380) - #endif - -+#ifdef __MINGW32__ -+ -+#ifndef D3DCOMPILER_DLL -+ -+// Add define + typedefs for older MinGW-w64 headers (pre 5783) -+ -+#define D3DCOMPILER_DLL L"d3dcompiler_43.dll" -+ -+HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename, -+ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, -+ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); -+typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const char *filename, -+ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, -+ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); -+ -+#endif // D3DCOMPILER_DLL -+ -+#endif // __MINGW32__ -+ - namespace rx - { - --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0007-Make-DX9-DX11-mutually-exclusive.patch b/mingw-w64-angleproject-git/0007-Make-DX9-DX11-mutually-exclusive.patch deleted file mode 100644 index 62a88d42c7..0000000000 --- a/mingw-w64-angleproject-git/0007-Make-DX9-DX11-mutually-exclusive.patch +++ /dev/null @@ -1,143 +0,0 @@ -From e1b26c6669cafb5c1298d6e5476c24686fccf1bd Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Thu, 20 Feb 2014 16:46:15 +0200 -Subject: [PATCH] Make DX9/DX11 support configurable - -ANGLE supports selecting the renderer on creation, choosing between -D3D11 and D3D9 backends. This patch improves upon this by enabling the -D3D backend(s) at compile time. This can make the binary size smaller -(no extra render is built) and ensures compatibility with Windows Runtime -when building only the D3D11 renderer. - -Change-Id: Id9473e0e631721083fe4026d475e37603a144c37 ---- - src/3rdparty/angle/src/libEGL/Display.cpp | 4 +++- - src/3rdparty/angle/src/libGLESv2/Texture.cpp | 6 +++++- - src/3rdparty/angle/src/libGLESv2/precompiled.h | 10 +++++++--- - .../angle/src/libGLESv2/renderer/Renderer.cpp | 19 +++++++++++++------ - 4 files changed, 28 insertions(+), 11 deletions(-) - -diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp -index 13ef701..a7f5f5a 100644 ---- a/src/3rdparty/angle/src/libEGL/Display.cpp -+++ b/src/3rdparty/angle/src/libEGL/Display.cpp -@@ -471,7 +471,6 @@ bool Display::hasExistingWindowSurface(HWND window) - - void Display::initExtensionString() - { -- HMODULE swiftShader = GetModuleHandle(TEXT("swiftshader_d3d9.dll")); - bool shareHandleSupported = mRenderer->getShareHandleSupport(); - - mExtensionString = ""; -@@ -487,10 +486,13 @@ void Display::initExtensionString() - - mExtensionString += "EGL_ANGLE_query_surface_pointer "; - -+#if defined(ANGLE_ENABLE_D3D9) -+ HMODULE swiftShader = GetModuleHandle(TEXT("swiftshader_d3d9.dll")); - if (swiftShader) - { - mExtensionString += "EGL_ANGLE_software_display "; - } -+#endif - - if (shareHandleSupported) - { -diff --git a/src/3rdparty/angle/src/libGLESv2/Texture.cpp b/src/3rdparty/angle/src/libGLESv2/Texture.cpp -index 3deecaf..3257d05 100644 ---- a/src/3rdparty/angle/src/libGLESv2/Texture.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/Texture.cpp -@@ -14,7 +14,11 @@ - #include "libGLESv2/main.h" - #include "libGLESv2/mathutil.h" - #include "libGLESv2/utilities.h" --#include "libGLESv2/renderer/d3d9/Blit.h" -+#if defined(ANGLE_ENABLE_D3D9) -+# include "libGLESv2/renderer/d3d9/Blit.h" -+#else -+# define D3DFMT_UNKNOWN DXGI_FORMAT_UNKNOWN -+#endif - #include "libGLESv2/Renderbuffer.h" - #include "libGLESv2/renderer/Image.h" - #include "libGLESv2/renderer/Renderer.h" -diff --git a/src/3rdparty/angle/src/libGLESv2/precompiled.h b/src/3rdparty/angle/src/libGLESv2/precompiled.h -index 58ad181..79490b1 100644 ---- a/src/3rdparty/angle/src/libGLESv2/precompiled.h -+++ b/src/3rdparty/angle/src/libGLESv2/precompiled.h -@@ -32,10 +32,14 @@ - #include - #include - --#include --#include --#include --#include -+#if defined(ANGLE_ENABLE_D3D9) -+# include -+#endif -+#if defined(ANGLE_ENABLE_D3D11) -+# include -+# include -+# include -+#endif - #include - - #ifdef _MSC_VER -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -index 86be93f..3407353 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -@@ -11,14 +11,17 @@ - #include "libGLESv2/main.h" - #include "libGLESv2/Program.h" - #include "libGLESv2/renderer/Renderer.h" --#include "libGLESv2/renderer/d3d9/Renderer9.h" --#include "libGLESv2/renderer/d3d11/Renderer11.h" -+#if defined(ANGLE_ENABLE_D3D9) -+# include "libGLESv2/renderer/d3d9/Renderer9.h" -+#endif -+#if defined(ANGLE_ENABLE_D3D11) -+# include "libGLESv2/renderer/d3d11/Renderer11.h" -+#endif - #include "libGLESv2/utilities.h" - #include "third_party/trace_event/trace_event.h" - --#if !defined(ANGLE_ENABLE_D3D11) --// Enables use of the Direct3D 11 API for a default display, when available --#define ANGLE_ENABLE_D3D11 0 -+#ifndef D3DERR_OUTOFVIDEOMEMORY -+#define D3DERR_OUTOFVIDEOMEMORY MAKE_HRESULT(1, 0x876, 380) - #endif - - namespace rx -@@ -177,7 +180,8 @@ rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayT - rx::Renderer *renderer = NULL; - EGLint status = EGL_BAD_ALLOC; - -- if (ANGLE_ENABLE_D3D11 || -+#if defined(ANGLE_ENABLE_D3D11) -+ if (displayId == EGL_DEFAULT_DISPLAY || - displayId == EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE || - displayId == EGL_D3D11_ONLY_DISPLAY_ANGLE) - { -@@ -200,7 +204,9 @@ rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayT - // Failed to create a D3D11 renderer, try creating a D3D9 renderer - delete renderer; - } -+#endif // ANGLE_ENABLE_D3D11 - -+#if defined(ANGLE_ENABLE_D3D9) - bool softwareDevice = (displayId == EGL_SOFTWARE_DISPLAY_ANGLE); - renderer = new rx::Renderer9(display, hDc, softwareDevice); - -@@ -213,6 +219,7 @@ rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayT - { - return renderer; - } -+#endif // ANGLE_ENABLE_D3D9 - - return NULL; - } --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch b/mingw-w64-angleproject-git/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch deleted file mode 100644 index c7cfafc246..0000000000 --- a/mingw-w64-angleproject-git/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 0fede57f6fc052942b910995fdfa4cd76a32f586 Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Tue, 18 Feb 2014 12:11:45 +0200 -Subject: [PATCH] ANGLE: Dynamically load D3D compiler from a list or the - environment - -If the default compiler cannot be found, load it from a list of DLL names, -including a non-versioned proxy DLL provided by Qt. On Desktop Windows, -the default compiler can also be specified by an environment variable, -QT_D3DCOMPILER_DLL. - -Change-Id: I0d7a8a8a36cc571836f8fa59ea14513b9b19c19b ---- - .../angle/src/libGLESv2/renderer/Renderer.cpp | 34 ++++++++++++++++++++-- - 1 file changed, 32 insertions(+), 2 deletions(-) - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -index e74120d..94cbc0e 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -@@ -43,6 +43,10 @@ typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const - - #endif // __MINGW32__ - -+#ifndef QT_D3DCOMPILER_DLL -+#define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL -+#endif -+ - namespace rx - { - -@@ -77,10 +81,36 @@ bool Renderer::initializeCompiler() - } - #endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES - -- if (!mD3dCompilerModule) -+ // Load the compiler DLL specified by the environment, or default to QT_D3DCOMPILER_DLL -+#if !defined(ANGLE_OS_WINRT) -+ const wchar_t *defaultCompiler = _wgetenv(L"QT_D3DCOMPILER_DLL"); -+ if (!defaultCompiler) -+ defaultCompiler = QT_D3DCOMPILER_DLL; -+#else // !ANGLE_OS_WINRT -+# ifdef _DEBUG -+ const wchar_t *defaultCompiler = L"d3dcompiler_qtd.dll"; -+# else -+ const wchar_t *defaultCompiler = L"d3dcompiler_qt.dll"; -+# endif -+#endif // ANGLE_OS_WINRT -+ -+ const wchar_t *compilerDlls[] = { -+ defaultCompiler, -+ L"d3dcompiler_47.dll", -+ L"d3dcompiler_46.dll", -+ L"d3dcompiler_45.dll", -+ L"d3dcompiler_44.dll", -+ L"d3dcompiler_43.dll", -+ 0 -+ }; -+ -+ // Load the first available known compiler DLL -+ for (int i = 0; compilerDlls[i]; ++i) - { - // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with. -- mD3dCompilerModule = LoadLibrary(D3DCOMPILER_DLL); -+ mD3dCompilerModule = LoadLibrary(compilerDlls[i]); -+ if (mD3dCompilerModule) -+ break; - } - - if (!mD3dCompilerModule) --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0009-ANGLE-Support-WinRT.patch b/mingw-w64-angleproject-git/0009-ANGLE-Support-WinRT.patch deleted file mode 100644 index d40748ae75..0000000000 --- a/mingw-w64-angleproject-git/0009-ANGLE-Support-WinRT.patch +++ /dev/null @@ -1,1181 +0,0 @@ -From 46b8b123ada1787c68525cd07dcdbfdbc003bcc5 Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Thu, 20 Feb 2014 16:49:13 +0200 -Subject: [PATCH] ANGLE: Support WinRT - -This enables EGL for WinRT's native types, and adjusts some codepaths -to accommodate differences between desktop Windows and WinRT. - -- WinRT native handles added to eglplatform.h -- References to native handles in libEGL/libGLESv2 follow eglplatform.h -- D3D 11.1 structures and methods used when necessary -- TLS replaced with thread attribute -- LocalAlloc/Free replaced with Heap API - -Change-Id: Ia90377e700d335a1c569c2145008dd4b0dfd84d3 -Reviewed-by: Friedemann Kleint ---- - src/3rdparty/angle/include/EGL/eglplatform.h | 10 ++- - .../angle/src/compiler/translator/osinclude.h | 20 +++--- - .../src/compiler/translator/ossource_posix.cpp | 8 +++ - .../angle/src/compiler/translator/ossource_win.cpp | 8 +++ - .../src/compiler/translator/ossource_winrt.cpp | 75 ++++++++++++++++++++++ - src/3rdparty/angle/src/libEGL/Display.cpp | 11 ++-- - src/3rdparty/angle/src/libEGL/Display.h | 7 +- - src/3rdparty/angle/src/libEGL/Surface.cpp | 42 +++++++++++- - src/3rdparty/angle/src/libEGL/Surface.h | 6 +- - src/3rdparty/angle/src/libEGL/libEGL.cpp | 4 +- - src/3rdparty/angle/src/libEGL/main.cpp | 29 ++++++++- - src/3rdparty/angle/src/libGLESv2/Context.cpp | 1 + - src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp | 1 + - src/3rdparty/angle/src/libGLESv2/main.cpp | 27 ++++++++ - src/3rdparty/angle/src/libGLESv2/main.h | 2 +- - src/3rdparty/angle/src/libGLESv2/precompiled.h | 45 ++++++++++++- - .../angle/src/libGLESv2/renderer/Renderer.cpp | 15 +++-- - .../angle/src/libGLESv2/renderer/Renderer.h | 3 +- - .../angle/src/libGLESv2/renderer/SwapChain.h | 5 +- - .../src/libGLESv2/renderer/d3d11/Renderer11.cpp | 13 +++- - .../src/libGLESv2/renderer/d3d11/Renderer11.h | 5 +- - .../src/libGLESv2/renderer/d3d11/SwapChain11.cpp | 37 +++++++++-- - .../src/libGLESv2/renderer/d3d11/SwapChain11.h | 2 +- - .../libGLESv2/renderer/d3d11/shaders/Clear11.hlsl | 4 ++ - src/3rdparty/angle/src/libGLESv2/utilities.cpp | 48 ++++++++++++++ - 25 files changed, 378 insertions(+), 50 deletions(-) - create mode 100644 src/3rdparty/angle/src/compiler/translator/ossource_winrt.cpp - -diff --git a/src/3rdparty/angle/include/EGL/eglplatform.h b/src/3rdparty/angle/include/EGL/eglplatform.h -index 34283f2..eb15ae5 100644 ---- a/src/3rdparty/angle/include/EGL/eglplatform.h -+++ b/src/3rdparty/angle/include/EGL/eglplatform.h -@@ -67,7 +67,15 @@ - * implementations. - */ - --#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) /* Windows Runtime */ -+ -+struct IUnknown; -+ -+typedef int EGLNativeDisplayType; -+typedef void *EGLNativePixmapType; -+typedef IUnknown *EGLNativeWindowType; -+ -+#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN 1 - #endif -diff --git a/src/3rdparty/angle/src/compiler/translator/osinclude.h b/src/3rdparty/angle/src/compiler/translator/osinclude.h -index c3063d6..cccfa63 100644 ---- a/src/3rdparty/angle/src/compiler/translator/osinclude.h -+++ b/src/3rdparty/angle/src/compiler/translator/osinclude.h -@@ -13,7 +13,11 @@ - // - - #if defined(_WIN32) || defined(_WIN64) -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) -+#define ANGLE_OS_WINRT -+#else - #define ANGLE_OS_WIN -+#endif - #elif defined(__APPLE__) || defined(__linux__) || \ - defined(__FreeBSD__) || defined(__OpenBSD__) || \ - defined(__NetBSD__) || defined(__DragonFly__) || \ -@@ -25,7 +29,7 @@ - #error Unsupported platform. - #endif - --#if defined(ANGLE_OS_WIN) -+#if defined(ANGLE_OS_WIN) || defined(ANGLE_OS_WINRT) - #define STRICT - #define VC_EXTRALEAN 1 - #include -@@ -44,23 +48,17 @@ - #if defined(ANGLE_OS_WIN) - typedef DWORD OS_TLSIndex; - #define OS_INVALID_TLS_INDEX (TLS_OUT_OF_INDEXES) -+#elif defined(ANGLE_OS_WINRT) -+typedef size_t OS_TLSIndex; -+#define OS_INVALID_TLS_INDEX ((DWORD)0xFFFFFF) - #elif defined(ANGLE_OS_POSIX) - typedef pthread_key_t OS_TLSIndex; - #define OS_INVALID_TLS_INDEX (static_cast(-1)) - #endif // ANGLE_OS_WIN - - OS_TLSIndex OS_AllocTLSIndex(); -+void *OS_GetTLSValue(OS_TLSIndex nIndex); - bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue); - bool OS_FreeTLSIndex(OS_TLSIndex nIndex); - --inline void* OS_GetTLSValue(OS_TLSIndex nIndex) --{ -- ASSERT(nIndex != OS_INVALID_TLS_INDEX); --#if defined(ANGLE_OS_WIN) -- return TlsGetValue(nIndex); --#elif defined(ANGLE_OS_POSIX) -- return pthread_getspecific(nIndex); --#endif // ANGLE_OS_WIN --} -- - #endif // __OSINCLUDE_H -diff --git a/src/3rdparty/angle/src/compiler/translator/ossource_posix.cpp b/src/3rdparty/angle/src/compiler/translator/ossource_posix.cpp -index 90a3757..d4bba4c 100644 ---- a/src/3rdparty/angle/src/compiler/translator/ossource_posix.cpp -+++ b/src/3rdparty/angle/src/compiler/translator/ossource_posix.cpp -@@ -33,6 +33,14 @@ OS_TLSIndex OS_AllocTLSIndex() - } - - -+void *OS_GetTLSValue(OS_TLSIndex nIndex) -+{ -+ ASSERT(nIndex != OS_INVALID_TLS_INDEX); -+ -+ return pthread_getspecific(nIndex); -+} -+ -+ - bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) - { - if (nIndex == OS_INVALID_TLS_INDEX) { -diff --git a/src/3rdparty/angle/src/compiler/translator/ossource_win.cpp b/src/3rdparty/angle/src/compiler/translator/ossource_win.cpp -index 2cc5871..abd8bc7 100644 ---- a/src/3rdparty/angle/src/compiler/translator/ossource_win.cpp -+++ b/src/3rdparty/angle/src/compiler/translator/ossource_win.cpp -@@ -29,6 +29,14 @@ OS_TLSIndex OS_AllocTLSIndex() - } - - -+void *OS_GetTLSValue(OS_TLSIndex nIndex) -+{ -+ ASSERT(nIndex != OS_INVALID_TLS_INDEX); -+ -+ return TlsGetValue(nIndex); -+} -+ -+ - bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) - { - if (nIndex == OS_INVALID_TLS_INDEX) { -diff --git a/src/3rdparty/angle/src/compiler/translator/ossource_winrt.cpp b/src/3rdparty/angle/src/compiler/translator/ossource_winrt.cpp -new file mode 100644 -index 0000000..bb061ca ---- /dev/null -+++ b/src/3rdparty/angle/src/compiler/translator/ossource_winrt.cpp -@@ -0,0 +1,75 @@ -+// -+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+// -+ -+#include "compiler/translator/osinclude.h" -+// -+// This file contains contains Windows Runtime specific functions -+// -+ -+#if !defined(ANGLE_OS_WINRT) -+#error Trying to build a WinRT specific file in a non-WinRT build. -+#endif -+ -+#include -+ -+ -+// -+// Thread Local Storage Operations -+// -+__declspec(thread) std::vector *tls = nullptr; -+__declspec(thread) std::vector *freeIndices = nullptr; -+ -+OS_TLSIndex OS_AllocTLSIndex() -+{ -+ if (!tls) -+ tls = new std::vector; -+ -+ if (freeIndices && !freeIndices->empty()) { -+ OS_TLSIndex index = freeIndices->back(); -+ freeIndices->pop_back(); -+ return index; -+ } else { -+ tls->push_back(nullptr); -+ return tls->size() - 1; -+ } -+} -+ -+ -+void *OS_GetTLSValue(OS_TLSIndex nIndex) -+{ -+ ASSERT(nIndex != OS_INVALID_TLS_INDEX); -+ ASSERT(tls); -+ -+ return tls->at(nIndex); -+} -+ -+ -+bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -+{ -+ if (!tls || nIndex >= tls->size() || nIndex == OS_INVALID_TLS_INDEX) { -+ ASSERT(0 && "OS_SetTLSValue(): Invalid TLS Index"); -+ return false; -+ } -+ -+ tls->at(nIndex) = lpvValue; -+ return true; -+} -+ -+ -+bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -+{ -+ if (!tls || nIndex >= tls->size() || nIndex == OS_INVALID_TLS_INDEX) { -+ ASSERT(0 && "OS_SetTLSValue(): Invalid TLS Index"); -+ return false; -+ } -+ -+ if (!freeIndices) -+ freeIndices = new std::vector; -+ -+ freeIndices->push_back(nIndex); -+ -+ return true; -+} -diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp -index a7f5f5a..e75a4b6 100644 ---- a/src/3rdparty/angle/src/libEGL/Display.cpp -+++ b/src/3rdparty/angle/src/libEGL/Display.cpp -@@ -1,3 +1,4 @@ -+#include "../libGLESv2/precompiled.h" - // - // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be -@@ -40,13 +41,13 @@ egl::Display *Display::getDisplay(EGLNativeDisplayType displayId) - - // FIXME: Check if displayId is a valid display device context - -- egl::Display *display = new egl::Display(displayId, (HDC)displayId); -+ egl::Display *display = new egl::Display(displayId); - - displays[displayId] = display; - return display; - } - --Display::Display(EGLNativeDisplayType displayId, HDC deviceContext) : mDc(deviceContext) -+Display::Display(EGLNativeDisplayType displayId) - { - mDisplayId = displayId; - mRenderer = NULL; -@@ -71,7 +72,7 @@ bool Display::initialize() - return true; - } - -- mRenderer = glCreateRenderer(this, mDc, mDisplayId); -+ mRenderer = glCreateRenderer(this, mDisplayId); - - if (!mRenderer) - { -@@ -186,7 +187,7 @@ bool Display::getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value) - - - --EGLSurface Display::createWindowSurface(HWND window, EGLConfig config, const EGLint *attribList) -+EGLSurface Display::createWindowSurface(EGLNativeWindowType window, EGLConfig config, const EGLint *attribList) - { - const Config *configuration = mConfigSet.get(config); - EGLint postSubBufferSupported = EGL_FALSE; -@@ -456,7 +457,7 @@ bool Display::isValidSurface(egl::Surface *surface) - return mSurfaceSet.find(surface) != mSurfaceSet.end(); - } - --bool Display::hasExistingWindowSurface(HWND window) -+bool Display::hasExistingWindowSurface(EGLNativeWindowType window) - { - for (SurfaceSet::iterator surface = mSurfaceSet.begin(); surface != mSurfaceSet.end(); surface++) - { -diff --git a/src/3rdparty/angle/src/libEGL/Display.h b/src/3rdparty/angle/src/libEGL/Display.h -index c816e4e..cd07bb3 100644 ---- a/src/3rdparty/angle/src/libEGL/Display.h -+++ b/src/3rdparty/angle/src/libEGL/Display.h -@@ -38,7 +38,7 @@ class Display - bool getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint configSize, EGLint *numConfig); - bool getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value); - -- EGLSurface createWindowSurface(HWND window, EGLConfig config, const EGLint *attribList); -+ EGLSurface createWindowSurface(EGLNativeWindowType window, EGLConfig config, const EGLint *attribList); - EGLSurface createOffscreenSurface(EGLConfig config, HANDLE shareHandle, const EGLint *attribList); - EGLContext createContext(EGLConfig configHandle, const gl::Context *shareContext, bool notifyResets, bool robustAccess); - -@@ -49,7 +49,7 @@ class Display - bool isValidConfig(EGLConfig config); - bool isValidContext(gl::Context *context); - bool isValidSurface(egl::Surface *surface); -- bool hasExistingWindowSurface(HWND window); -+ bool hasExistingWindowSurface(EGLNativeWindowType window); - - rx::Renderer *getRenderer() { return mRenderer; }; - -@@ -63,12 +63,11 @@ class Display - private: - DISALLOW_COPY_AND_ASSIGN(Display); - -- Display(EGLNativeDisplayType displayId, HDC deviceContext); -+ Display(EGLNativeDisplayType displayId); - - bool restoreLostDevice(); - - EGLNativeDisplayType mDisplayId; -- const HDC mDc; - - bool mSoftwareDevice; - -diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp -index 12f8dfd..3443355 100644 ---- a/src/3rdparty/angle/src/libEGL/Surface.cpp -+++ b/src/3rdparty/angle/src/libEGL/Surface.cpp -@@ -1,3 +1,4 @@ -+#include "../libGLESv2/precompiled.h" - // - // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be -@@ -22,10 +23,15 @@ - #include "libEGL/main.h" - #include "libEGL/Display.h" - -+#if defined(ANGLE_OS_WINRT) -+#include -+#include -+#endif -+ - namespace egl - { - --Surface::Surface(Display *display, const Config *config, HWND window, EGLint fixedSize, EGLint width, EGLint height, EGLint postSubBufferSupported) -+Surface::Surface(Display *display, const Config *config, EGLNativeWindowType window, EGLint fixedSize, EGLint width, EGLint height, EGLint postSubBufferSupported) - : mDisplay(display), mConfig(config), mWindow(window), mPostSubBufferSupported(postSubBufferSupported) - { - mRenderer = mDisplay->getRenderer(); -@@ -98,6 +104,7 @@ bool Surface::resetSwapChain() - - if (mWindow) - { -+#if !defined(ANGLE_OS_WINRT) - RECT windowRect; - if (!GetClientRect(getWindowHandle(), &windowRect)) - { -@@ -109,6 +116,16 @@ bool Surface::resetSwapChain() - - width = windowRect.right - windowRect.left; - height = windowRect.bottom - windowRect.top; -+#else -+ ABI::Windows::Foundation::Rect windowRect; -+ ABI::Windows::UI::Core::ICoreWindow *window; -+ HRESULT hr = mWindow->QueryInterface(IID_PPV_ARGS(&window)); -+ if (FAILED(hr)) -+ return false; -+ window->get_Bounds(&windowRect); -+ width = windowRect.Width; -+ height = windowRect.Height; -+#endif - } - else - { -@@ -221,7 +238,7 @@ bool Surface::swapRect(EGLint x, EGLint y, EGLint width, EGLint height) - return true; - } - --HWND Surface::getWindowHandle() -+EGLNativeWindowType Surface::getWindowHandle() - { - return mWindow; - } -@@ -230,6 +247,7 @@ HWND Surface::getWindowHandle() - #define kSurfaceProperty _TEXT("Egl::SurfaceOwner") - #define kParentWndProc _TEXT("Egl::SurfaceParentWndProc") - -+#if !defined(ANGLE_OS_WINRT) - static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) - { - if (message == WM_SIZE) -@@ -243,9 +261,13 @@ static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam - WNDPROC prevWndFunc = reinterpret_cast(GetProp(hwnd, kParentWndProc)); - return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam); - } -+#endif - - void Surface::subclassWindow() - { -+#if defined(ANGLE_OS_WINRT) -+ mWindowSubclassed = false; -+#else - if (!mWindow) - { - return; -@@ -269,10 +291,12 @@ void Surface::subclassWindow() - SetProp(mWindow, kSurfaceProperty, reinterpret_cast(this)); - SetProp(mWindow, kParentWndProc, reinterpret_cast(oldWndProc)); - mWindowSubclassed = true; -+#endif - } - - void Surface::unsubclassWindow() - { -+#if !defined(ANGLE_OS_WINRT) - if(!mWindowSubclassed) - { - return; -@@ -295,10 +319,12 @@ void Surface::unsubclassWindow() - RemoveProp(mWindow, kSurfaceProperty); - RemoveProp(mWindow, kParentWndProc); - mWindowSubclassed = false; -+#endif - } - - bool Surface::checkForOutOfDateSwapChain() - { -+#if !defined(ANGLE_OS_WINRT) - RECT client; - if (!GetClientRect(getWindowHandle(), &client)) - { -@@ -309,6 +335,16 @@ bool Surface::checkForOutOfDateSwapChain() - // Grow the buffer now, if the window has grown. We need to grow now to avoid losing information. - clientWidth = client.right - client.left; - clientHeight = client.bottom - client.top; -+#else -+ ABI::Windows::Foundation::Rect windowRect; -+ ABI::Windows::UI::Core::ICoreWindow *window; -+ HRESULT hr = mWindow->QueryInterface(IID_PPV_ARGS(&window)); -+ if (FAILED(hr)) -+ return false; -+ window->get_Bounds(&windowRect); -+ int clientWidth = windowRect.Width; -+ int clientHeight = windowRect.Height; -+#endif - sizeDirty = clientWidth != getWidth() || clientHeight != getHeight(); - } - -diff --git a/src/3rdparty/angle/src/libEGL/Surface.h b/src/3rdparty/angle/src/libEGL/Surface.h -index 938b800..1d2303c 100644 ---- a/src/3rdparty/angle/src/libEGL/Surface.h -+++ b/src/3rdparty/angle/src/libEGL/Surface.h -@@ -34,7 +34,7 @@ class Config; - class Surface - { - public: -- Surface(Display *display, const egl::Config *config, HWND window, EGLint fixedSize, EGLint width, EGLint height, EGLint postSubBufferSupported); -+ Surface(Display *display, const egl::Config *config, EGLNativeWindowType window, EGLint fixedSize, EGLint width, EGLint height, EGLint postSubBufferSupported); - Surface(Display *display, const egl::Config *config, HANDLE shareHandle, EGLint width, EGLint height, EGLenum textureFormat, EGLenum textureTarget); - - ~Surface(); -@@ -43,7 +43,7 @@ class Surface - void release(); - bool resetSwapChain(); - -- HWND getWindowHandle(); -+ EGLNativeWindowType getWindowHandle(); - bool swap(); - bool postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height); - -@@ -79,7 +79,7 @@ private: - bool resetSwapChain(int backbufferWidth, int backbufferHeight); - bool swapRect(EGLint x, EGLint y, EGLint width, EGLint height); - -- const HWND mWindow; // Window that the surface is created for. -+ const EGLNativeWindowType mWindow; // Window that the surface is created for. - bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking - const egl::Config *mConfig; // EGL config surface was created with - EGLint mHeight; // Height of surface -diff --git a/src/3rdparty/angle/src/libEGL/libEGL.cpp b/src/3rdparty/angle/src/libEGL/libEGL.cpp -index 0ea46d4..b2944d5 100644 ---- a/src/3rdparty/angle/src/libEGL/libEGL.cpp -+++ b/src/3rdparty/angle/src/libEGL/libEGL.cpp -@@ -308,14 +308,16 @@ EGLSurface __stdcall eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EG - return EGL_NO_SURFACE; - } - -+#if !defined(ANGLE_OS_WINRT) - HWND window = (HWND)win; - - if (!IsWindow(window)) - { - return egl::error(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); - } -+#endif - -- return display->createWindowSurface(window, config, attrib_list); -+ return display->createWindowSurface(win, config, attrib_list); - } - catch(std::bad_alloc&) - { -diff --git a/src/3rdparty/angle/src/libEGL/main.cpp b/src/3rdparty/angle/src/libEGL/main.cpp -index 772b8eb..e972691 100644 ---- a/src/3rdparty/angle/src/libEGL/main.cpp -+++ b/src/3rdparty/angle/src/libEGL/main.cpp -@@ -1,3 +1,4 @@ -+#include "../libGLESv2/precompiled.h" - // - // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be -@@ -10,14 +11,23 @@ - - #include "common/debug.h" - -+#if !defined(ANGLE_OS_WINRT) - static DWORD currentTLS = TLS_OUT_OF_INDEXES; -+#else -+static __declspec(thread) void *currentTLS = 0; -+#endif - - namespace egl - { - - Current *AllocateCurrent() - { -+#if !defined(ANGLE_OS_WINRT) - Current *current = (egl::Current*)LocalAlloc(LPTR, sizeof(egl::Current)); -+#else -+ currentTLS = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Current)); -+ Current *current = (egl::Current*)currentTLS; -+#endif - - if (!current) - { -@@ -25,8 +35,10 @@ Current *AllocateCurrent() - return NULL; - } - -+#if !defined(ANGLE_OS_WINRT) - ASSERT(currentTLS != TLS_OUT_OF_INDEXES); - TlsSetValue(currentTLS, current); -+#endif - - current->error = EGL_SUCCESS; - current->API = EGL_OPENGL_ES_API; -@@ -39,12 +51,20 @@ Current *AllocateCurrent() - - void DeallocateCurrent() - { -+#if !defined(ANGLE_OS_WINRT) - void *current = TlsGetValue(currentTLS); - - if (current) - { - LocalFree((HLOCAL)current); - } -+#else -+ if (currentTLS) -+ { -+ HeapFree(GetProcessHeap(), 0, currentTLS); -+ currentTLS = 0; -+ } -+#endif - } - - } -@@ -69,13 +89,14 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved - } - } - #endif -- -+#if !defined(ANGLE_OS_WINRT) - currentTLS = TlsAlloc(); - - if (currentTLS == TLS_OUT_OF_INDEXES) - { - return FALSE; - } -+#endif - } - // Fall throught to initialize index - case DLL_THREAD_ATTACH: -@@ -91,7 +112,9 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved - case DLL_PROCESS_DETACH: - { - egl::DeallocateCurrent(); -+#if !defined(ANGLE_OS_WINRT) - TlsFree(currentTLS); -+#endif - } - break; - default: -@@ -107,7 +130,11 @@ namespace egl - - Current *GetCurrentData() - { -+#if !defined(ANGLE_OS_WINRT) - Current *current = (Current*)TlsGetValue(currentTLS); -+#else -+ Current *current = (Current*)currentTLS; -+#endif - - // ANGLE issue 488: when the dll is loaded after thread initialization, - // thread local storage (current) might not exist yet. -diff --git a/src/3rdparty/angle/src/libGLESv2/Context.cpp b/src/3rdparty/angle/src/libGLESv2/Context.cpp -index 1a058b6..e651785 100644 ---- a/src/3rdparty/angle/src/libGLESv2/Context.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/Context.cpp -@@ -1076,6 +1076,7 @@ void Context::setRenderbufferStorage(GLsizei width, GLsizei height, GLenum inter - case GL_RGB565: - case GL_RGB8_OES: - case GL_RGBA8_OES: -+ case GL_BGRA8_EXT: - renderbuffer = new gl::Colorbuffer(mRenderer,width, height, internalformat, samples); - break; - case GL_STENCIL_INDEX8: -diff --git a/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp b/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp -index a33481e..814dfbf 100644 ---- a/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp -@@ -4895,6 +4895,7 @@ void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samp - case GL_RGBA8_OES: - case GL_STENCIL_INDEX8: - case GL_DEPTH24_STENCIL8_OES: -+ case GL_BGRA8_EXT: - context->setRenderbufferStorage(width, height, internalformat, samples); - break; - default: -diff --git a/src/3rdparty/angle/src/libGLESv2/main.cpp b/src/3rdparty/angle/src/libGLESv2/main.cpp -index 6b459d3..95f4b8d 100644 ---- a/src/3rdparty/angle/src/libGLESv2/main.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/main.cpp -@@ -11,14 +11,23 @@ - - #include "libGLESv2/Context.h" - -+#if !defined(ANGLE_OS_WINRT) - static DWORD currentTLS = TLS_OUT_OF_INDEXES; -+#else -+static __declspec(thread) void *currentTLS = 0; -+#endif - - namespace gl - { - - Current *AllocateCurrent() - { -+#if !defined(ANGLE_OS_WINRT) - Current *current = (Current*)LocalAlloc(LPTR, sizeof(Current)); -+#else -+ currentTLS = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Current)); -+ Current *current = (Current*)currentTLS; -+#endif - - if (!current) - { -@@ -26,8 +35,10 @@ Current *AllocateCurrent() - return NULL; - } - -+#if !defined(ANGLE_OS_WINRT) - ASSERT(currentTLS != TLS_OUT_OF_INDEXES); - TlsSetValue(currentTLS, current); -+#endif - - current->context = NULL; - current->display = NULL; -@@ -37,12 +48,20 @@ Current *AllocateCurrent() - - void DeallocateCurrent() - { -+#if !defined(ANGLE_OS_WINRT) - void *current = TlsGetValue(currentTLS); - - if (current) - { - LocalFree((HLOCAL)current); - } -+#else -+ if (currentTLS) -+ { -+ HeapFree(GetProcessHeap(), 0, currentTLS); -+ currentTLS = 0; -+ } -+#endif - } - - } -@@ -53,12 +72,14 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved - { - case DLL_PROCESS_ATTACH: - { -+#if !defined(ANGLE_OS_WINRT) - currentTLS = TlsAlloc(); - - if (currentTLS == TLS_OUT_OF_INDEXES) - { - return FALSE; - } -+#endif - } - // Fall throught to initialize index - case DLL_THREAD_ATTACH: -@@ -74,7 +95,9 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved - case DLL_PROCESS_DETACH: - { - gl::DeallocateCurrent(); -+#if !defined(ANGLE_OS_WINRT) - TlsFree(currentTLS); -+#endif - } - break; - default: -@@ -90,7 +113,11 @@ namespace gl - - Current *GetCurrentData() - { -+#if !defined(ANGLE_OS_WINRT) - Current *current = (Current*)TlsGetValue(currentTLS); -+#else -+ Current *current = (Current*)currentTLS; -+#endif - - // ANGLE issue 488: when the dll is loaded after thread initialization, - // thread local storage (current) might not exist yet. -diff --git a/src/3rdparty/angle/src/libGLESv2/main.h b/src/3rdparty/angle/src/libGLESv2/main.h -index b413f23..69465c9 100644 ---- a/src/3rdparty/angle/src/libGLESv2/main.h -+++ b/src/3rdparty/angle/src/libGLESv2/main.h -@@ -57,7 +57,7 @@ gl::Context *glCreateContext(const gl::Context *shareContext, rx::Renderer *rend - void glDestroyContext(gl::Context *context); - void glMakeCurrent(gl::Context *context, egl::Display *display, egl::Surface *surface); - gl::Context *glGetCurrentContext(); --rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayType displayId); -+rx::Renderer *glCreateRenderer(egl::Display *display, EGLNativeDisplayType displayId); - void glDestroyRenderer(rx::Renderer *renderer); - - __eglMustCastToProperFunctionPointerType __stdcall glGetProcAddress(const char *procname); -diff --git a/src/3rdparty/angle/src/libGLESv2/precompiled.h b/src/3rdparty/angle/src/libGLESv2/precompiled.h -index 79490b1..2ff09f5 100644 ---- a/src/3rdparty/angle/src/libGLESv2/precompiled.h -+++ b/src/3rdparty/angle/src/libGLESv2/precompiled.h -@@ -32,15 +32,56 @@ - #include - #include - -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) -+# define ANGLE_OS_WINRT -+# if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP -+# define ANGLE_OS_WINPHONE -+# endif -+#endif -+ - #if defined(ANGLE_ENABLE_D3D9) - # include - #endif - #if defined(ANGLE_ENABLE_D3D11) --# include -+# if !defined(ANGLE_OS_WINRT) -+# include -+# else -+# include -+# define Sleep(x) WaitForSingleObjectEx(GetCurrentThread(), x, FALSE) -+# define GetVersion() WINVER -+# define LoadLibrary(x) LoadPackagedLibrary(x, NULL) -+# endif - # include - # include - #endif --#include -+#if !defined(ANGLE_OS_WINPHONE) -+# include -+#endif -+ -+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL0 -+#define D3DCOMPILE_OPTIMIZATION_LEVEL0 (1 << 14) -+#endif -+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL1 -+#define D3DCOMPILE_OPTIMIZATION_LEVEL1 0 -+#endif -+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL2 -+#define D3DCOMPILE_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15)) -+#endif -+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL3 -+#define D3DCOMPILE_OPTIMIZATION_LEVEL3 (1 << 15) -+#endif -+#ifndef D3DCOMPILE_DEBUG -+#define D3DCOMPILE_DEBUG (1 << 0) -+#endif -+#ifndef D3DCOMPILE_SKIP_OPTIMIZATION -+#define D3DCOMPILE_SKIP_OPTIMIZATION (1 << 2) -+#endif -+#ifndef D3DCOMPILE_AVOID_FLOW_CONTROL -+#define D3DCOMPILE_AVOID_FLOW_CONTROL (1 << 9) -+#endif -+#ifndef D3DCOMPILE_PREFER_FLOW_CONTROL -+#define D3DCOMPILE_PREFER_FLOW_CONTROL (1 << 10) -+#endif - - #ifdef _MSC_VER - #include -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -index 94cbc0e..5278113 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp -@@ -224,17 +224,22 @@ ShaderBlob *Renderer::compileToBinary(gl::InfoLog &infoLog, const char *hlsl, co - extern "C" - { - --rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayType displayId) -+rx::Renderer *glCreateRenderer(egl::Display *display, EGLNativeDisplayType displayId) - { - rx::Renderer *renderer = NULL; - EGLint status = EGL_BAD_ALLOC; - -+#if defined(ANGLE_OS_WINRT) -+ if (displayId == EGL_DEFAULT_DISPLAY) -+ displayId = EGL_D3D11_ONLY_DISPLAY_ANGLE; -+#endif -+ - #if defined(ANGLE_ENABLE_D3D11) - if (displayId == EGL_DEFAULT_DISPLAY || - displayId == EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE || - displayId == EGL_D3D11_ONLY_DISPLAY_ANGLE) - { -- renderer = new rx::Renderer11(display, hDc); -+ renderer = new rx::Renderer11(display); - - if (renderer) - { -@@ -257,7 +262,7 @@ rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayT - - #if defined(ANGLE_ENABLE_D3D9) - bool softwareDevice = (displayId == EGL_SOFTWARE_DISPLAY_ANGLE); -- renderer = new rx::Renderer9(display, hDc, softwareDevice); -+ renderer = new rx::Renderer9(display, displayId, softwareDevice); - - if (renderer) - { -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h -index 7244a0a..79578b2 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h -@@ -1,3 +1,4 @@ -+#include "../precompiled.h" - // - // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be -@@ -113,7 +114,7 @@ class Renderer - - virtual void sync(bool block) = 0; - -- virtual SwapChain *createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) = 0; -+ virtual SwapChain *createSwapChain(EGLNativeWindowType window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) = 0; - - virtual void setSamplerState(gl::SamplerType type, int index, const gl::SamplerState &sampler) = 0; - virtual void setTexture(gl::SamplerType type, int index, gl::Texture *texture) = 0; -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain.h b/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain.h -index f09f19b..8231fbc 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain.h -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain.h -@@ -1,3 +1,4 @@ -+#include "../precompiled.h" - // - // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be -@@ -22,7 +23,7 @@ namespace rx - class SwapChain - { - public: -- SwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) -+ SwapChain(EGLNativeWindowType window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) - : mWindow(window), mShareHandle(shareHandle), mBackBufferFormat(backBufferFormat), mDepthBufferFormat(depthBufferFormat) - { - } -@@ -37,7 +38,7 @@ class SwapChain - virtual HANDLE getShareHandle() {return mShareHandle;}; - - protected: -- const HWND mWindow; // Window that the surface is created for. -+ const EGLNativeWindowType mWindow; // Window that the surface is created for. - const GLenum mBackBufferFormat; - const GLenum mDepthBufferFormat; - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -index d9fcb7a..7f166fd 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -@@ -66,7 +66,7 @@ enum - MAX_TEXTURE_IMAGE_UNITS_VTF_SM4 = 16 - }; - --Renderer11::Renderer11(egl::Display *display, HDC hDc) : Renderer(display), mDc(hDc) -+Renderer11::Renderer11(egl::Display *display) : Renderer(display) - { - mVertexDataManager = NULL; - mIndexDataManager = NULL; -@@ -137,6 +137,7 @@ EGLint Renderer11::initialize() - return EGL_NOT_INITIALIZED; - } - -+#if !defined(ANGLE_OS_WINRT) - mDxgiModule = LoadLibrary(TEXT("dxgi.dll")); - mD3d11Module = LoadLibrary(TEXT("d3d11.dll")); - -@@ -146,6 +147,7 @@ EGLint Renderer11::initialize() - return EGL_NOT_INITIALIZED; - } - -+ - // create the D3D11 device - ASSERT(mDevice == NULL); - PFN_D3D11_CREATE_DEVICE D3D11CreateDevice = (PFN_D3D11_CREATE_DEVICE)GetProcAddress(mD3d11Module, "D3D11CreateDevice"); -@@ -155,6 +157,7 @@ EGLint Renderer11::initialize() - ERR("Could not retrieve D3D11CreateDevice address - aborting!\n"); - return EGL_NOT_INITIALIZED; - } -+#endif - - D3D_FEATURE_LEVEL featureLevels[] = - { -@@ -203,8 +206,12 @@ EGLint Renderer11::initialize() - } - } - -+#if !defined(ANGLE_OS_WINRT) - IDXGIDevice *dxgiDevice = NULL; -- result = mDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice); -+#else -+ IDXGIDevice1 *dxgiDevice = NULL; -+#endif -+ result = mDevice->QueryInterface(IID_PPV_ARGS(&dxgiDevice)); - - if (FAILED(result)) - { -@@ -522,7 +529,7 @@ void Renderer11::sync(bool block) - } - } - --SwapChain *Renderer11::createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) -+SwapChain *Renderer11::createSwapChain(EGLNativeWindowType window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) - { - return new rx::SwapChain11(this, window, shareHandle, backBufferFormat, depthBufferFormat); - } -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h -index 1b6760b..ba3f0c6 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h -@@ -39,7 +39,7 @@ enum - class Renderer11 : public Renderer - { - public: -- Renderer11(egl::Display *display, HDC hDc); -+ Renderer11(egl::Display *display); - virtual ~Renderer11(); - - static Renderer11 *makeRenderer11(Renderer *renderer); -@@ -52,7 +52,7 @@ class Renderer11 : public Renderer - - virtual void sync(bool block); - -- virtual SwapChain *createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat); -+ virtual SwapChain *createSwapChain(EGLNativeWindowType window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat); - - virtual void setSamplerState(gl::SamplerType type, int index, const gl::SamplerState &sampler); - virtual void setTexture(gl::SamplerType type, int index, gl::Texture *texture); -@@ -203,7 +203,6 @@ class Renderer11 : public Renderer - - HMODULE mD3d11Module; - HMODULE mDxgiModule; -- HDC mDc; - - bool mDeviceLost; - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.cpp -index d2b53a7..bd97d5c 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.cpp -@@ -18,7 +18,7 @@ - namespace rx - { - --SwapChain11::SwapChain11(Renderer11 *renderer, HWND window, HANDLE shareHandle, -+SwapChain11::SwapChain11(Renderer11 *renderer, EGLNativeWindowType window, HANDLE shareHandle, - GLenum backBufferFormat, GLenum depthBufferFormat) - : mRenderer(renderer), SwapChain(window, shareHandle, backBufferFormat, depthBufferFormat) - { -@@ -361,25 +361,50 @@ EGLint SwapChain11::reset(int backbufferWidth, int backbufferHeight, EGLint swap - - if (mWindow) - { -+#if !defined(ANGLE_OS_WINRT) - IDXGIFactory *factory = mRenderer->getDxgiFactory(); - - DXGI_SWAP_CHAIN_DESC swapChainDesc = {0}; -- swapChainDesc.BufferCount = 2; - swapChainDesc.BufferDesc.Format = gl_d3d11::ConvertRenderbufferFormat(mBackBufferFormat); - swapChainDesc.BufferDesc.Width = backbufferWidth; - swapChainDesc.BufferDesc.Height = backbufferHeight; -+ swapChainDesc.BufferCount = 2; - swapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; - swapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; - swapChainDesc.BufferDesc.RefreshRate.Numerator = 0; - swapChainDesc.BufferDesc.RefreshRate.Denominator = 1; -+ swapChainDesc.Windowed = TRUE; -+ swapChainDesc.OutputWindow = mWindow; -+#else -+ IDXGIFactory2 *factory; -+ HRESULT result = mRenderer->getDxgiFactory()->QueryInterface(IID_PPV_ARGS(&factory)); -+ ASSERT(SUCCEEDED(result)); -+ -+ DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0}; -+ swapChainDesc.Format = gl_d3d11::ConvertRenderbufferFormat(mBackBufferFormat); -+ swapChainDesc.Width = backbufferWidth; -+ swapChainDesc.Height = backbufferHeight; -+ swapChainDesc.Stereo = FALSE; -+#if !defined(ANGLE_OS_WINPHONE) -+ swapChainDesc.BufferCount = 2; -+ swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; -+#else -+ swapChainDesc.BufferCount = 1; -+ swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; -+#endif -+#endif - swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - swapChainDesc.Flags = 0; -- swapChainDesc.OutputWindow = mWindow; - swapChainDesc.SampleDesc.Count = 1; - swapChainDesc.SampleDesc.Quality = 0; -- swapChainDesc.Windowed = TRUE; - -+#if !defined(ANGLE_OS_WINRT) - HRESULT result = factory->CreateSwapChain(device, &swapChainDesc, &mSwapChain); -+#else -+ IDXGISwapChain1 *swapChain; -+ result = factory->CreateSwapChainForCoreWindow(device, mWindow, &swapChainDesc, NULL, &swapChain); -+ mSwapChain = swapChain; -+#endif - - if (FAILED(result)) - { -@@ -390,6 +415,7 @@ EGLint SwapChain11::reset(int backbufferWidth, int backbufferHeight, EGLint swap - { - return EGL_CONTEXT_LOST; - } -+#if !defined(ANGLE_OS_WINRT) - else - { - // We cannot create a swap chain for an HWND that is owned by a different process on some versions of -@@ -408,6 +434,9 @@ EGLint SwapChain11::reset(int backbufferWidth, int backbufferHeight, EGLint swap - return EGL_BAD_ALLOC; - } - } -+#else -+ return EGL_BAD_ALLOC; -+#endif - } - - result = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&mBackBufferTexture); -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.h -index 8001046..2a030c8 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.h -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/SwapChain11.h -@@ -19,7 +19,7 @@ class Renderer11; - class SwapChain11 : public SwapChain - { - public: -- SwapChain11(Renderer11 *renderer, HWND window, HANDLE shareHandle, -+ SwapChain11(Renderer11 *renderer, EGLNativeWindowType window, HANDLE shareHandle, - GLenum backBufferFormat, GLenum depthBufferFormat); - virtual ~SwapChain11(); - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/shaders/Clear11.hlsl b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/shaders/Clear11.hlsl -index 042ac69..cb132dc 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/shaders/Clear11.hlsl -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/shaders/Clear11.hlsl -@@ -12,10 +12,12 @@ struct PS_OutputMultiple - float4 color1 : SV_TARGET1; - float4 color2 : SV_TARGET2; - float4 color3 : SV_TARGET3; -+#ifdef SM4 - float4 color4 : SV_TARGET4; - float4 color5 : SV_TARGET5; - float4 color6 : SV_TARGET6; - float4 color7 : SV_TARGET7; -+#endif - }; - - PS_OutputMultiple PS_ClearMultiple(in float4 inPosition : SV_POSITION, in float4 inColor : COLOR) -@@ -25,10 +27,12 @@ PS_OutputMultiple PS_ClearMultiple(in float4 inPosition : SV_POSITION, in float4 - outColor.color1 = inColor; - outColor.color2 = inColor; - outColor.color3 = inColor; -+#ifdef SM4 - outColor.color4 = inColor; - outColor.color5 = inColor; - outColor.color6 = inColor; - outColor.color7 = inColor; -+#endif - return outColor; - } - -diff --git a/src/3rdparty/angle/src/libGLESv2/utilities.cpp b/src/3rdparty/angle/src/libGLESv2/utilities.cpp -index 32df49e..30765ff 100644 ---- a/src/3rdparty/angle/src/libGLESv2/utilities.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/utilities.cpp -@@ -9,6 +9,14 @@ - - #include "libGLESv2/utilities.h" - #include "libGLESv2/mathutil.h" -+#if defined(ANGLE_OS_WINRT) -+# include -+# include -+# include -+# include -+ using namespace Microsoft::WRL; -+ using namespace ABI::Windows::Storage; -+#endif - - namespace gl - { -@@ -737,6 +745,7 @@ bool IsTriangleMode(GLenum drawMode) - - std::string getTempPath() - { -+#if !defined(ANGLE_OS_WINRT) - char path[MAX_PATH]; - DWORD pathLen = GetTempPathA(sizeof(path) / sizeof(path[0]), path); - if (pathLen == 0) -@@ -751,6 +760,45 @@ std::string getTempPath() - UNREACHABLE(); - return std::string(); - } -+#else -+ static std::string path; -+ -+ while (path.empty()) { -+ ComPtr factory; -+ Wrappers::HStringReference classId(RuntimeClass_Windows_Storage_ApplicationData); -+ HRESULT result = RoGetActivationFactory(classId.Get(), IID_PPV_ARGS(&factory)); -+ if (FAILED(result)) -+ break; -+ -+ ComPtr applicationData; -+ result = factory->get_Current(&applicationData); -+ if (FAILED(result)) -+ break; -+ -+ ComPtr storageFolder; -+ result = applicationData->get_LocalFolder(&storageFolder); -+ if (FAILED(result)) -+ break; -+ -+ ComPtr localFolder; -+ result = storageFolder.As(&localFolder); -+ if (FAILED(result)) -+ break; -+ -+ HSTRING localFolderPath; -+ result = localFolder->get_Path(&localFolderPath); -+ if (FAILED(result)) -+ break; -+ -+ std::wstring_convert< std::codecvt_utf8 > converter; -+ path = converter.to_bytes(WindowsGetStringRawBuffer(localFolderPath, NULL)); -+ if (path.empty()) -+ { -+ UNREACHABLE(); -+ break; -+ } -+ } -+#endif - - return path; - } --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch b/mingw-w64-angleproject-git/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch deleted file mode 100644 index 34c881ba21..0000000000 --- a/mingw-w64-angleproject-git/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch +++ /dev/null @@ -1,426 +0,0 @@ -From e84f947df4ae095eae600550749b3a4e8de5ee8b Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Thu, 20 Feb 2014 16:51:36 +0200 -Subject: [PATCH] ANGLE: Enable D3D11 for feature level 9 cards - -Enable use of ANGLE on lower-end hardware, such as Surface RT and -Windows Phone 8. - -Based on https://codereview.appspot.com/12917046/ - -Change-Id: Ice536802e4eedc1d264abd0dd65960638fce59e4 ---- - .../angle/src/libGLESv2/renderer/d3d11/Image11.cpp | 7 +- - .../libGLESv2/renderer/d3d11/RenderStateCache.cpp | 5 +- - .../src/libGLESv2/renderer/d3d11/Renderer11.cpp | 90 ++++++++++++++++++++-- - .../src/libGLESv2/renderer/d3d11/Renderer11.h | 1 + - .../libGLESv2/renderer/d3d11/TextureStorage11.cpp | 10 +-- - .../libGLESv2/renderer/d3d11/renderer11_utils.cpp | 4 +- - .../libGLESv2/renderer/d3d11/renderer11_utils.h | 2 +- - 7 files changed, 100 insertions(+), 19 deletions(-) - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Image11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Image11.cpp -index 2b07b9d..5d039a3 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Image11.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Image11.cpp -@@ -142,7 +142,7 @@ bool Image11::redefine(Renderer *renderer, GLint internalformat, GLsizei width, - mHeight = height; - mInternalFormat = internalformat; - // compute the d3d format that will be used -- mDXGIFormat = gl_d3d11::ConvertTextureFormat(internalformat); -+ mDXGIFormat = gl_d3d11::ConvertTextureFormat(internalformat, mRenderer->getFeatureLevel()); - mActualFormat = d3d11_gl::ConvertTextureInternalFormat(mDXGIFormat); - - if (mStagingTexture) -@@ -191,7 +191,10 @@ void Image11::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heig - switch (mInternalFormat) - { - case GL_ALPHA8_EXT: -- loadAlphaDataToNative(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); -+ if (mRenderer->getFeatureLevel() >= D3D_FEATURE_LEVEL_10_0) -+ loadAlphaDataToNative(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); -+ else -+ loadAlphaDataToBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); - break; - case GL_LUMINANCE8_EXT: - loadLuminanceDataToNativeOrBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData, false); -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp -index 0047e04..a1c324c 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp -@@ -419,7 +419,8 @@ ID3D11SamplerState *RenderStateCache::getSamplerState(const gl::SamplerState &sa - samplerDesc.BorderColor[2] = 0.0f; - samplerDesc.BorderColor[3] = 0.0f; - samplerDesc.MinLOD = gl_d3d11::ConvertMinLOD(samplerState.minFilter, samplerState.lodOffset); -- samplerDesc.MaxLOD = gl_d3d11::ConvertMaxLOD(samplerState.minFilter, samplerState.lodOffset); -+ samplerDesc.MaxLOD = mDevice->GetFeatureLevel() >= D3D_FEATURE_LEVEL_10_0 -+ ? gl_d3d11::ConvertMaxLOD(samplerState.minFilter, samplerState.lodOffset) : FLT_MAX; - - ID3D11SamplerState *dx11SamplerState = NULL; - HRESULT result = mDevice->CreateSamplerState(&samplerDesc, &dx11SamplerState); -@@ -435,4 +436,4 @@ ID3D11SamplerState *RenderStateCache::getSamplerState(const gl::SamplerState &sa - } - } - --} -\ No newline at end of file -+} -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -index 7f166fd..31d976d 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -@@ -164,6 +164,11 @@ EGLint Renderer11::initialize() - D3D_FEATURE_LEVEL_11_0, - D3D_FEATURE_LEVEL_10_1, - D3D_FEATURE_LEVEL_10_0, -+#if !defined(ANGLE_ENABLE_D3D9) -+ D3D_FEATURE_LEVEL_9_3, -+ D3D_FEATURE_LEVEL_9_2, -+ D3D_FEATURE_LEVEL_9_1, -+#endif - }; - - HRESULT result = S_OK; -@@ -1533,7 +1538,7 @@ void Renderer11::applyUniforms(gl::ProgramBinary *programBinary, gl::UniformArra - } - - // needed for the point sprite geometry shader -- if (mCurrentGeometryConstantBuffer != mDriverConstantBufferPS) -+ if (mFeatureLevel >= D3D_FEATURE_LEVEL_10_0 && mCurrentGeometryConstantBuffer != mDriverConstantBufferPS) - { - mDeviceContext->GSSetConstantBuffers(0, 1, &mDriverConstantBufferPS); - mCurrentGeometryConstantBuffer = mDriverConstantBufferPS; -@@ -1956,6 +1961,11 @@ bool Renderer11::testDeviceResettable() - D3D_FEATURE_LEVEL_11_0, - D3D_FEATURE_LEVEL_10_1, - D3D_FEATURE_LEVEL_10_0, -+#if !defined(ANGLE_ENABLE_D3D9) -+ D3D_FEATURE_LEVEL_9_3, -+ D3D_FEATURE_LEVEL_9_2, -+ D3D_FEATURE_LEVEL_9_1, -+#endif - }; - - ID3D11Device* dummyDevice; -@@ -2139,6 +2149,11 @@ float Renderer11::getTextureMaxAnisotropy() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_MAX_MAXANISOTROPY; -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ return 16; -+ case D3D_FEATURE_LEVEL_9_1: -+ return D3D_FL9_1_DEFAULT_MAX_ANISOTROPY; - default: UNREACHABLE(); - return 0; - } -@@ -2158,6 +2173,11 @@ Range Renderer11::getViewportBounds() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return Range(D3D10_VIEWPORT_BOUNDS_MIN, D3D10_VIEWPORT_BOUNDS_MAX); -+ case D3D_FEATURE_LEVEL_9_3: -+ return Range(D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION * -2, D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION * 2); -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return Range(D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION * -2, D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION * 2); - default: UNREACHABLE(); - return Range(0, 0); - } -@@ -2172,6 +2192,10 @@ unsigned int Renderer11::getMaxVertexTextureImageUnits() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return MAX_TEXTURE_IMAGE_UNITS_VTF_SM4; -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return 0; - default: UNREACHABLE(); - return 0; - } -@@ -2195,14 +2219,14 @@ unsigned int Renderer11::getReservedFragmentUniformVectors() const - unsigned int Renderer11::getMaxVertexUniformVectors() const - { - META_ASSERT(MAX_VERTEX_UNIFORM_VECTORS_D3D11 <= D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT); -- ASSERT(mFeatureLevel >= D3D_FEATURE_LEVEL_10_0); -+ ASSERT(mFeatureLevel >= D3D_FEATURE_LEVEL_9_1); - return MAX_VERTEX_UNIFORM_VECTORS_D3D11; - } - - unsigned int Renderer11::getMaxFragmentUniformVectors() const - { - META_ASSERT(MAX_FRAGMENT_UNIFORM_VECTORS_D3D11 <= D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT); -- ASSERT(mFeatureLevel >= D3D_FEATURE_LEVEL_10_0); -+ ASSERT(mFeatureLevel >= D3D_FEATURE_LEVEL_9_1); - return MAX_FRAGMENT_UNIFORM_VECTORS_D3D11; - } - -@@ -2216,6 +2240,10 @@ unsigned int Renderer11::getMaxVaryingVectors() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_VS_OUTPUT_REGISTER_COUNT; -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return 8; - default: UNREACHABLE(); - return 0; - } -@@ -2229,6 +2257,10 @@ bool Renderer11::getNonPower2TextureSupport() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return false; - default: UNREACHABLE(); - return false; - } -@@ -2242,6 +2274,11 @@ bool Renderer11::getOcclusionQuerySupport() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ return true; -+ case D3D_FEATURE_LEVEL_9_1: -+ return false; - default: UNREACHABLE(); - return false; - } -@@ -2254,7 +2291,11 @@ bool Renderer11::getInstancingSupport() const - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: -- return true; -+ case D3D_FEATURE_LEVEL_9_3: -+ return true; -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return false; - default: UNREACHABLE(); - return false; - } -@@ -2276,6 +2317,11 @@ bool Renderer11::getDerivativeInstructionSupport() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; -+ case D3D_FEATURE_LEVEL_9_3: -+ return true; -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return false; - default: UNREACHABLE(); - return false; - } -@@ -2294,6 +2340,9 @@ int Renderer11::getMajorShaderModel() const - case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MAJOR_VERSION; // 5 - case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MAJOR_VERSION; // 4 - case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MAJOR_VERSION; // 4 -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: return D3D10_SHADER_MAJOR_VERSION; // 4 (level 9) - default: UNREACHABLE(); return 0; - } - } -@@ -2305,6 +2354,9 @@ int Renderer11::getMinorShaderModel() const - case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MINOR_VERSION; // 0 - case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MINOR_VERSION; // 1 - case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MINOR_VERSION; // 0 -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: return D3D10_SHADER_MINOR_VERSION; // 0 (level 9) - default: UNREACHABLE(); return 0; - } - } -@@ -2330,6 +2382,11 @@ int Renderer11::getMaxViewportDimension() const - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192 -+ case D3D_FEATURE_LEVEL_9_3: -+ return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 4096 -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: -+ return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 2048 - default: UNREACHABLE(); - return 0; - } -@@ -2342,6 +2399,9 @@ int Renderer11::getMaxTextureWidth() const - case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384 - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192 -+ case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 4096 -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 2048 - default: UNREACHABLE(); return 0; - } - } -@@ -2353,6 +2413,9 @@ int Renderer11::getMaxTextureHeight() const - case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384 - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192 -+ case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 4096 -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 2048 - default: UNREACHABLE(); return 0; - } - } -@@ -2364,6 +2427,9 @@ bool Renderer11::get32BitIndexSupport() const - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP >= 32; // true -+ case D3D_FEATURE_LEVEL_9_3: -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: return false; - default: UNREACHABLE(); return false; - } - } -@@ -2410,6 +2476,8 @@ unsigned int Renderer11::getMaxRenderTargets() const - { - META_ASSERT(D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS); - META_ASSERT(D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS); -+ META_ASSERT(D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS); -+ META_ASSERT(D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS); - - switch (mFeatureLevel) - { -@@ -2417,6 +2485,9 @@ unsigned int Renderer11::getMaxRenderTargets() const - return D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; // 8 - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: -+ case D3D_FEATURE_LEVEL_9_3: // return D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT; // 4 -+ case D3D_FEATURE_LEVEL_9_2: -+ case D3D_FEATURE_LEVEL_9_1: // return D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT; // 1 - // Feature level 10.0 and 10.1 cards perform very poorly when the pixel shader - // outputs to multiple RTs that are not bound. - // TODO: Remove pixel shader outputs for render targets that are not bound. -@@ -2603,7 +2674,7 @@ bool Renderer11::copyTexture(ID3D11ShaderResourceView *source, const gl::Rectang - samplerDesc.BorderColor[2] = 0.0f; - samplerDesc.BorderColor[3] = 0.0f; - samplerDesc.MinLOD = 0.0f; -- samplerDesc.MaxLOD = 0.0f; -+ samplerDesc.MaxLOD = mDevice->GetFeatureLevel() >= D3D_FEATURE_LEVEL_10_0 ? 0.0f : FLT_MAX; - - result = mDevice->CreateSamplerState(&samplerDesc, &mCopySampler); - ASSERT(SUCCEEDED(result)); -@@ -2848,7 +2919,7 @@ ShaderExecutable *Renderer11::loadExecutable(const void *function, size_t length - - ShaderExecutable *Renderer11::compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type, D3DWorkaroundType workaround) - { -- const char *profile = NULL; -+ std::string profile; - - switch (type) - { -@@ -2866,7 +2937,12 @@ ShaderExecutable *Renderer11::compileToExecutable(gl::InfoLog &infoLog, const ch - return NULL; - } - -- ID3DBlob *binary = (ID3DBlob*)compileToBinary(infoLog, shaderHLSL, profile, D3DCOMPILE_OPTIMIZATION_LEVEL0, false); -+ if (mFeatureLevel == D3D_FEATURE_LEVEL_9_3) -+ profile += "_level_9_3"; -+ else if (mFeatureLevel == D3D_FEATURE_LEVEL_9_2 || mFeatureLevel == D3D_FEATURE_LEVEL_9_1) -+ profile += "_level_9_1"; -+ -+ ID3DBlob *binary = (ID3DBlob*)compileToBinary(infoLog, shaderHLSL, profile.c_str(), D3DCOMPILE_OPTIMIZATION_LEVEL0, false); - if (!binary) - return NULL; - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h -index ba3f0c6..a8a722c 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.h -@@ -177,6 +177,7 @@ class Renderer11 : public Renderer - ID3D11Device *getDevice() { return mDevice; } - ID3D11DeviceContext *getDeviceContext() { return mDeviceContext; }; - IDXGIFactory *getDxgiFactory() { return mDxgiFactory; }; -+ D3D_FEATURE_LEVEL getFeatureLevel() { return mFeatureLevel; } - - bool getRenderTargetResource(gl::Renderbuffer *colorbuffer, unsigned int *subresourceIndex, ID3D11Texture2D **resource); - void unapplyRenderTargets(); -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/TextureStorage11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/TextureStorage11.cpp -index 5f6ea21..fdfbe52 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/TextureStorage11.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/TextureStorage11.cpp -@@ -222,14 +222,14 @@ TextureStorage11_2D::TextureStorage11_2D(Renderer *renderer, SwapChain11 *swapch - } - - TextureStorage11_2D::TextureStorage11_2D(Renderer *renderer, int levels, GLenum internalformat, GLenum usage, bool forceRenderable, GLsizei width, GLsizei height) -- : TextureStorage11(renderer, GetTextureBindFlags(gl_d3d11::ConvertTextureFormat(internalformat), usage, forceRenderable)) -+ : TextureStorage11(renderer, GetTextureBindFlags(gl_d3d11::ConvertTextureFormat(internalformat, Renderer11::makeRenderer11(renderer)->getFeatureLevel()), usage, forceRenderable)) - { - for (unsigned int i = 0; i < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++) - { - mRenderTarget[i] = NULL; - } - -- DXGI_FORMAT convertedFormat = gl_d3d11::ConvertTextureFormat(internalformat); -+ DXGI_FORMAT convertedFormat = gl_d3d11::ConvertTextureFormat(internalformat, mRenderer->getFeatureLevel()); - if (d3d11::IsDepthStencilFormat(convertedFormat)) - { - mTextureFormat = d3d11::GetDepthTextureFormat(convertedFormat); -@@ -331,7 +331,7 @@ RenderTarget *TextureStorage11_2D::getRenderTarget(int level) - srvDesc.Format = mShaderResourceFormat; - srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; - srvDesc.Texture2D.MostDetailedMip = level; -- srvDesc.Texture2D.MipLevels = 1; -+ srvDesc.Texture2D.MipLevels = level ? 1 : -1; - - ID3D11ShaderResourceView *srv; - result = device->CreateShaderResourceView(mTexture, &srvDesc, &srv); -@@ -440,7 +440,7 @@ void TextureStorage11_2D::generateMipmap(int level) - } - - TextureStorage11_Cube::TextureStorage11_Cube(Renderer *renderer, int levels, GLenum internalformat, GLenum usage, bool forceRenderable, int size) -- : TextureStorage11(renderer, GetTextureBindFlags(gl_d3d11::ConvertTextureFormat(internalformat), usage, forceRenderable)) -+ : TextureStorage11(renderer, GetTextureBindFlags(gl_d3d11::ConvertTextureFormat(internalformat, Renderer11::makeRenderer11(renderer)->getFeatureLevel()), usage, forceRenderable)) - { - for (unsigned int i = 0; i < 6; i++) - { -@@ -450,7 +450,7 @@ TextureStorage11_Cube::TextureStorage11_Cube(Renderer *renderer, int levels, GLe - } - } - -- DXGI_FORMAT convertedFormat = gl_d3d11::ConvertTextureFormat(internalformat); -+ DXGI_FORMAT convertedFormat = gl_d3d11::ConvertTextureFormat(internalformat, mRenderer->getFeatureLevel()); - if (d3d11::IsDepthStencilFormat(convertedFormat)) - { - mTextureFormat = d3d11::GetDepthTextureFormat(convertedFormat); -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.cpp -index 6f06024..34b8259 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.cpp -@@ -329,7 +329,7 @@ DXGI_FORMAT ConvertRenderbufferFormat(GLenum format) - return DXGI_FORMAT_R8G8B8A8_UNORM; - } - --DXGI_FORMAT ConvertTextureFormat(GLenum internalformat) -+DXGI_FORMAT ConvertTextureFormat(GLenum internalformat, D3D_FEATURE_LEVEL featureLevel) - { - switch (internalformat) - { -@@ -342,7 +342,7 @@ DXGI_FORMAT ConvertTextureFormat(GLenum internalformat) - case GL_LUMINANCE8_ALPHA8_EXT: - return DXGI_FORMAT_R8G8B8A8_UNORM; - case GL_ALPHA8_EXT: -- return DXGI_FORMAT_A8_UNORM; -+ return featureLevel >= D3D_FEATURE_LEVEL_10_0 ? DXGI_FORMAT_A8_UNORM : DXGI_FORMAT_B8G8R8A8_UNORM; - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - return DXGI_FORMAT_BC1_UNORM; -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.h -index 1bc48c1..70ad4fe 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.h -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.h -@@ -32,7 +32,7 @@ FLOAT ConvertMinLOD(GLenum minFilter, unsigned int lodOffset); - FLOAT ConvertMaxLOD(GLenum minFilter, unsigned int lodOffset); - - DXGI_FORMAT ConvertRenderbufferFormat(GLenum format); --DXGI_FORMAT ConvertTextureFormat(GLenum format); -+DXGI_FORMAT ConvertTextureFormat(GLenum format, D3D_FEATURE_LEVEL featureLevel); - } - - namespace d3d11_gl --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch b/mingw-w64-angleproject-git/0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch deleted file mode 100644 index fdee11d324..0000000000 --- a/mingw-w64-angleproject-git/0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8ea24fcce69900f42299fd01772714a566f9111e Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Mon, 24 Feb 2014 11:08:23 +0200 -Subject: [PATCH] ANGLE: Fix compilation error on MinGW caused by trace_event.h - -The event trace header in ANGLE's third_party directory has an unused -template which causes a compilation error on MinGW. Disable this part -of the code. - -Change-Id: I167eac56507fafba34e3eb5ce6071d8f136a4e41 ---- - src/3rdparty/angle/src/third_party/trace_event/trace_event.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/3rdparty/angle/src/third_party/trace_event/trace_event.h b/src/3rdparty/angle/src/third_party/trace_event/trace_event.h -index 637cf9a..96ac910 100644 ---- a/src/3rdparty/angle/src/third_party/trace_event/trace_event.h -+++ b/src/3rdparty/angle/src/third_party/trace_event/trace_event.h -@@ -791,6 +791,7 @@ private: - // TraceEventSamplingStateScope records the current sampling state - // and sets a new sampling state. When the scope exists, it restores - // the sampling state having recorded. -+#if 0 // This is not used by ANGLE and causes a compilation error on MinGW - template - class SamplingStateScope { - public: -@@ -818,6 +819,7 @@ public: - private: - const char* m_previousState; - }; -+#endif - - } // namespace TraceEvent - --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0012-ANGLE-fix-semantic-index-lookup.patch b/mingw-w64-angleproject-git/0012-ANGLE-fix-semantic-index-lookup.patch deleted file mode 100644 index fe16d1d7b2..0000000000 --- a/mingw-w64-angleproject-git/0012-ANGLE-fix-semantic-index-lookup.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 15b694fa33cf76f93de62b8106972083f5fb3114 Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Fri, 21 Feb 2014 13:34:21 +0200 -Subject: [PATCH] ANGLE: fix semantic index lookup - -The sorted semantic index table was returning a direct mapping to the -new indices, instead of the old indices. This caused a mismatch in the -GL type lookup for the translated attribute. - -Change-Id: I75d05ed707f56c45210e3dcbc277f894e3dc5a48 ---- - src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp | 2 +- - src/3rdparty/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp b/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp -index 41a83b6..13c515a 100644 ---- a/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp -@@ -2643,7 +2643,7 @@ void ProgramBinary::sortAttributesByLayout(rx::TranslatedAttribute attributes[MA - for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) - { - int oldIndex = mAttributesByLayout[i]; -- sortedSemanticIndices[i] = mSemanticIndex[oldIndex]; -+ sortedSemanticIndices[i] = oldIndex; - attributes[i] = oldTranslatedAttributes[oldIndex]; - } - } -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp -index 3418e89..4940b8c 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp -@@ -103,10 +103,10 @@ GLenum InputLayoutCache::applyVertexBuffers(TranslatedAttribute attributes[gl::M - // Record the type of the associated vertex shader vector in our key - // This will prevent mismatched vertex shaders from using the same input layout - GLint attributeSize; -- programBinary->getActiveAttribute(ilKey.elementCount, 0, NULL, &attributeSize, &ilKey.elements[ilKey.elementCount].glslElementType, NULL); -+ programBinary->getActiveAttribute(sortedSemanticIndices[i], 0, NULL, &attributeSize, &ilKey.elements[ilKey.elementCount].glslElementType, NULL); - - ilKey.elements[ilKey.elementCount].desc.SemanticName = semanticName; -- ilKey.elements[ilKey.elementCount].desc.SemanticIndex = sortedSemanticIndices[i]; -+ ilKey.elements[ilKey.elementCount].desc.SemanticIndex = i; - ilKey.elements[ilKey.elementCount].desc.Format = attributes[i].attribute->mArrayEnabled ? vertexBuffer->getDXGIFormat(*attributes[i].attribute) : DXGI_FORMAT_R32G32B32A32_FLOAT; - ilKey.elements[ilKey.elementCount].desc.InputSlot = i; - ilKey.elements[ilKey.elementCount].desc.AlignedByteOffset = 0; --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0013-ANGLE-Allow-for-universal-program-binaries.patch b/mingw-w64-angleproject-git/0013-ANGLE-Allow-for-universal-program-binaries.patch deleted file mode 100644 index 11c32880df..0000000000 --- a/mingw-w64-angleproject-git/0013-ANGLE-Allow-for-universal-program-binaries.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 5eeb4a06f182b4fc0e3dcb82f47fcf4286890f94 Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Fri, 21 Feb 2014 08:35:01 +0200 -Subject: [PATCH] ANGLE: Allow for universal program binaries - -As a safety precaution, ANGLE writes the commit hash, optimization level, -and adapter ID to its binary format. However, this hurts portability -between systems by making shader pre-compilation/caching artificially -system-specific. - -The shader compiler doesn't take the target adapter into account, and the -optimization level information discarded by ANGLE anyway. So, allow ANGLE -to bypass these checks on systems where precompilation is required (i.e. -WinRT). The default mechanism still applies unless -ANGLE_ENABLE_UNIVERSAL_BINARY is passed as a define. - -Change-Id: Iec6d833fd7010ed163978557238f00e7ac6ae416 ---- - src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp b/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp -index 8896665..41a83b6 100644 ---- a/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp -@@ -1637,6 +1637,7 @@ bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) - return false; - } - -+#if !defined(ANGLE_ENABLE_UNIVERSAL_BINARY) - unsigned char commitString[ANGLE_COMMIT_HASH_SIZE]; - stream.read(commitString, ANGLE_COMMIT_HASH_SIZE); - if (memcmp(commitString, ANGLE_COMMIT_HASH, sizeof(unsigned char) * ANGLE_COMMIT_HASH_SIZE) != 0) -@@ -1652,6 +1653,7 @@ bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) - infoLog.append("Mismatched compilation flags."); - return false; - } -+#endif - - for (int i = 0; i < MAX_VERTEX_ATTRIBS; ++i) - { -@@ -1742,6 +1744,7 @@ bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) - - const char *ptr = (const char*) binary + stream.offset(); - -+#if !defined(ANGLE_ENABLE_UNIVERSAL_BINARY) - const GUID *binaryIdentifier = (const GUID *) ptr; - ptr += sizeof(GUID); - -@@ -1751,6 +1754,7 @@ bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) - infoLog.append("Invalid program binary."); - return false; - } -+#endif - - const char *pixelShaderFunction = ptr; - ptr += pixelShaderSize; -@@ -1808,9 +1812,10 @@ bool ProgramBinary::save(void* binary, GLsizei bufSize, GLsizei *length) - stream.write(GL_PROGRAM_BINARY_ANGLE); - stream.write(ANGLE_MAJOR_VERSION); - stream.write(ANGLE_MINOR_VERSION); -+#if !defined(ANGLE_ENABLE_UNIVERSAL_BINARY) - stream.write(ANGLE_COMMIT_HASH, ANGLE_COMMIT_HASH_SIZE); - stream.write(ANGLE_COMPILE_OPTIMIZATION_LEVEL); -- -+#endif - for (unsigned int i = 0; i < MAX_VERTEX_ATTRIBS; ++i) - { - stream.write(mLinkedAttribute[i].type); -@@ -1866,7 +1871,9 @@ bool ProgramBinary::save(void* binary, GLsizei bufSize, GLsizei *length) - UINT geometryShaderSize = (mGeometryExecutable != NULL) ? mGeometryExecutable->getLength() : 0; - stream.write(geometryShaderSize); - -+#if !defined(ANGLE_ENABLE_UNIVERSAL_BINARY) - GUID identifier = mRenderer->getAdapterIdentifier(); -+#endif - - GLsizei streamLength = stream.length(); - const void *streamData = stream.data(); -@@ -1889,8 +1896,10 @@ bool ProgramBinary::save(void* binary, GLsizei bufSize, GLsizei *length) - memcpy(ptr, streamData, streamLength); - ptr += streamLength; - -+#if !defined(ANGLE_ENABLE_UNIVERSAL_BINARY) - memcpy(ptr, &identifier, sizeof(GUID)); - ptr += sizeof(GUID); -+#endif - - memcpy(ptr, mPixelExecutable->getFunction(), pixelShaderSize); - ptr += pixelShaderSize; --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch b/mingw-w64-angleproject-git/0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch deleted file mode 100644 index 52dfcd6da2..0000000000 --- a/mingw-w64-angleproject-git/0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch +++ /dev/null @@ -1,256 +0,0 @@ -From d7eb7ea643f00d47447d755b4a2125922d69a3b3 Mon Sep 17 00:00:00 2001 -From: Andrew Knight -Date: Thu, 20 Mar 2014 13:21:29 +0200 -Subject: [PATCH] ANGLE D3D11: Fix internal index buffer for level 9 hardware - -Some level 9 hardware does not support 32-bit indices, and in most -places this is already checked. It would appear that most phone -hardware actually does support 32-bit indices, and so this bug wasn't -caught until testing on the Surface RT. This is not surprising, as some -level 9 resources are only a minimum for the hardware spec, not the -true limit of the device/driver. - -This patch provides the general fix to use 16-bit indices on such -hardware, but a whitelist of known good GPUs should be added to enable -32-bit indices where available. - -Change-Id: I282ede5dd4a323037ade6c44b7cfac2c6445b491 ---- - .../src/libGLESv2/renderer/d3d11/Renderer11.cpp | 169 ++++++++++++--------- - 1 file changed, 94 insertions(+), 75 deletions(-) - -diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -index 31d976d..2de477b 100644 ---- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -+++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp -@@ -1137,6 +1137,84 @@ void Renderer11::drawElements(GLenum mode, GLsizei count, GLenum type, const GLv - } - } - -+template -+static void fillLineLoopIndices(GLenum type, GLsizei count, const GLvoid *indices, T *data) -+{ -+ switch (type) -+ { -+ case GL_NONE: // Non-indexed draw -+ for (int i = 0; i < count; i++) -+ { -+ data[i] = i; -+ } -+ data[count] = 0; -+ break; -+ case GL_UNSIGNED_BYTE: -+ for (int i = 0; i < count; i++) -+ { -+ data[i] = static_cast(indices)[i]; -+ } -+ data[count] = static_cast(indices)[0]; -+ break; -+ case GL_UNSIGNED_SHORT: -+ for (int i = 0; i < count; i++) -+ { -+ data[i] = static_cast(indices)[i]; -+ } -+ data[count] = static_cast(indices)[0]; -+ break; -+ case GL_UNSIGNED_INT: -+ for (int i = 0; i < count; i++) -+ { -+ data[i] = static_cast(indices)[i]; -+ } -+ data[count] = static_cast(indices)[0]; -+ break; -+ default: UNREACHABLE(); -+ } -+} -+ -+template -+static void fillTriangleFanIndices(GLenum type, unsigned int numTris, const GLvoid *indices, T *data) -+{ -+ switch (type) -+ { -+ case GL_NONE: // Non-indexed draw -+ for (unsigned int i = 0; i < numTris; i++) -+ { -+ data[i*3 + 0] = 0; -+ data[i*3 + 1] = i + 1; -+ data[i*3 + 2] = i + 2; -+ } -+ break; -+ case GL_UNSIGNED_BYTE: -+ for (unsigned int i = 0; i < numTris; i++) -+ { -+ data[i*3 + 0] = static_cast(indices)[0]; -+ data[i*3 + 1] = static_cast(indices)[i + 1]; -+ data[i*3 + 2] = static_cast(indices)[i + 2]; -+ } -+ break; -+ case GL_UNSIGNED_SHORT: -+ for (unsigned int i = 0; i < numTris; i++) -+ { -+ data[i*3 + 0] = static_cast(indices)[0]; -+ data[i*3 + 1] = static_cast(indices)[i + 1]; -+ data[i*3 + 2] = static_cast(indices)[i + 2]; -+ } -+ break; -+ case GL_UNSIGNED_INT: -+ for (unsigned int i = 0; i < numTris; i++) -+ { -+ data[i*3 + 0] = static_cast(indices)[0]; -+ data[i*3 + 1] = static_cast(indices)[i + 1]; -+ data[i*3 + 2] = static_cast(indices)[i + 2]; -+ } -+ break; -+ default: UNREACHABLE(); -+ } -+} -+ - void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, int minIndex, gl::Buffer *elementArrayBuffer) - { - // Get the raw indices for an indexed draw -@@ -1148,10 +1226,12 @@ void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, - indices = static_cast(storage->getData()) + offset; - } - -+ const int indexType = get32BitIndexSupport() ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT; -+ - if (!mLineLoopIB) - { - mLineLoopIB = new StreamingIndexBufferInterface(this); -- if (!mLineLoopIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT)) -+ if (!mLineLoopIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, indexType)) - { - delete mLineLoopIB; - mLineLoopIB = NULL; -@@ -1171,7 +1251,7 @@ void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, - } - - const unsigned int spaceNeeded = (static_cast(count) + 1) * sizeof(unsigned int); -- if (!mLineLoopIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT)) -+ if (!mLineLoopIB->reserveBufferSpace(spaceNeeded, indexType)) - { - ERR("Could not reserve enough space in looping index buffer for GL_LINE_LOOP."); - return gl::error(GL_OUT_OF_MEMORY); -@@ -1185,42 +1265,12 @@ void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, - return gl::error(GL_OUT_OF_MEMORY); - } - -- unsigned int *data = reinterpret_cast(mappedMemory); -+ if (indexType == GL_UNSIGNED_SHORT) -+ fillLineLoopIndices(type, count, indices, reinterpret_cast(mappedMemory)); -+ else -+ fillLineLoopIndices(type, count, indices, reinterpret_cast(mappedMemory)); - unsigned int indexBufferOffset = offset; - -- switch (type) -- { -- case GL_NONE: // Non-indexed draw -- for (int i = 0; i < count; i++) -- { -- data[i] = i; -- } -- data[count] = 0; -- break; -- case GL_UNSIGNED_BYTE: -- for (int i = 0; i < count; i++) -- { -- data[i] = static_cast(indices)[i]; -- } -- data[count] = static_cast(indices)[0]; -- break; -- case GL_UNSIGNED_SHORT: -- for (int i = 0; i < count; i++) -- { -- data[i] = static_cast(indices)[i]; -- } -- data[count] = static_cast(indices)[0]; -- break; -- case GL_UNSIGNED_INT: -- for (int i = 0; i < count; i++) -- { -- data[i] = static_cast(indices)[i]; -- } -- data[count] = static_cast(indices)[0]; -- break; -- default: UNREACHABLE(); -- } -- - if (!mLineLoopIB->unmapBuffer()) - { - ERR("Could not unmap index buffer for GL_LINE_LOOP."); -@@ -1251,10 +1301,12 @@ void Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *indic - indices = static_cast(storage->getData()) + offset; - } - -+ const int indexType = get32BitIndexSupport() ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT; -+ - if (!mTriangleFanIB) - { - mTriangleFanIB = new StreamingIndexBufferInterface(this); -- if (!mTriangleFanIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT)) -+ if (!mTriangleFanIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, indexType)) - { - delete mTriangleFanIB; - mTriangleFanIB = NULL; -@@ -1276,7 +1328,7 @@ void Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *indic - } - - const unsigned int spaceNeeded = (numTris * 3) * sizeof(unsigned int); -- if (!mTriangleFanIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT)) -+ if (!mTriangleFanIB->reserveBufferSpace(spaceNeeded, indexType)) - { - ERR("Could not reserve enough space in scratch index buffer for GL_TRIANGLE_FAN."); - return gl::error(GL_OUT_OF_MEMORY); -@@ -1290,45 +1342,12 @@ void Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *indic - return gl::error(GL_OUT_OF_MEMORY); - } - -- unsigned int *data = reinterpret_cast(mappedMemory); -+ if (indexType == GL_UNSIGNED_SHORT) -+ fillTriangleFanIndices(type, numTris, indices, reinterpret_cast(mappedMemory)); -+ else -+ fillTriangleFanIndices(type, numTris, indices, reinterpret_cast(mappedMemory)); - unsigned int indexBufferOffset = offset; - -- switch (type) -- { -- case GL_NONE: // Non-indexed draw -- for (unsigned int i = 0; i < numTris; i++) -- { -- data[i*3 + 0] = 0; -- data[i*3 + 1] = i + 1; -- data[i*3 + 2] = i + 2; -- } -- break; -- case GL_UNSIGNED_BYTE: -- for (unsigned int i = 0; i < numTris; i++) -- { -- data[i*3 + 0] = static_cast(indices)[0]; -- data[i*3 + 1] = static_cast(indices)[i + 1]; -- data[i*3 + 2] = static_cast(indices)[i + 2]; -- } -- break; -- case GL_UNSIGNED_SHORT: -- for (unsigned int i = 0; i < numTris; i++) -- { -- data[i*3 + 0] = static_cast(indices)[0]; -- data[i*3 + 1] = static_cast(indices)[i + 1]; -- data[i*3 + 2] = static_cast(indices)[i + 2]; -- } -- break; -- case GL_UNSIGNED_INT: -- for (unsigned int i = 0; i < numTris; i++) -- { -- data[i*3 + 0] = static_cast(indices)[0]; -- data[i*3 + 1] = static_cast(indices)[i + 1]; -- data[i*3 + 2] = static_cast(indices)[i + 2]; -- } -- break; -- default: UNREACHABLE(); -- } - - if (!mTriangleFanIB->unmapBuffer()) - { --- -1.8.4.msysgit.0 - diff --git a/mingw-w64-angleproject-git/0050-Untangle-OS-from-GENERATOR-a-bit-for-MSYS2.patch b/mingw-w64-angleproject-git/0050-Untangle-OS-from-GENERATOR-a-bit-for-MSYS2.patch deleted file mode 100644 index 8a717cf0dd..0000000000 --- a/mingw-w64-angleproject-git/0050-Untangle-OS-from-GENERATOR-a-bit-for-MSYS2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b4275810a50e298b4d8b038f6842a56ee7711471 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 7 Feb 2014 12:58:41 +0000 -Subject: [PATCH 1/2] Untangle OS from GENERATOR a bit for MSYS2 - ---- - build/common.gypi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/common.gypi b/build/common.gypi -index b0a497f..db85e04 100644 ---- a/build/common.gypi -+++ b/build/common.gypi -@@ -228,7 +228,7 @@ - }, - 'conditions': - [ -- [ 'OS == "win" and MSVS_VERSION != "2010e" and MSVS_VERSION != "2012e"', -+ [ 'OS == "win" and GENERATOR == "msvs" and MSVS_VERSION != "2010e" and MSVS_VERSION != "2012e"', - { - 'Debug_x64': - { --- -1.8.5.3 - diff --git a/mingw-w64-angleproject-git/0051-Move-event_tracer-.cpp-.h-to-libGLESv2-instead-of-co.patch b/mingw-w64-angleproject-git/0051-Move-event_tracer-.cpp-.h-to-libGLESv2-instead-of-co.patch deleted file mode 100644 index 089ac20089..0000000000 --- a/mingw-w64-angleproject-git/0051-Move-event_tracer-.cpp-.h-to-libGLESv2-instead-of-co.patch +++ /dev/null @@ -1,237 +0,0 @@ -From 873f5103485641cda5bff523edcd417e28840532 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 7 Feb 2014 17:15:51 +0000 -Subject: [PATCH 2/2] Move event_tracer{.cpp,.h} to libGLESv2 instead of common - ---- - src/common/event_tracer.cpp | 49 ------------------------------- - src/common/event_tracer.h | 41 -------------------------- - src/libGLESv2/event_tracer.cpp | 49 +++++++++++++++++++++++++++++++ - src/libGLESv2/event_tracer.h | 41 ++++++++++++++++++++++++++ - src/third_party/trace_event/trace_event.h | 2 +- - 5 files changed, 91 insertions(+), 91 deletions(-) - delete mode 100644 src/common/event_tracer.cpp - delete mode 100644 src/common/event_tracer.h - create mode 100644 src/libGLESv2/event_tracer.cpp - create mode 100644 src/libGLESv2/event_tracer.h - -diff --git a/src/common/event_tracer.cpp b/src/common/event_tracer.cpp -deleted file mode 100644 -index 142373d..0000000 ---- a/src/common/event_tracer.cpp -+++ /dev/null -@@ -1,49 +0,0 @@ --// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#include "common/event_tracer.h" -- --namespace gl --{ -- --GetCategoryEnabledFlagFunc g_getCategoryEnabledFlag; --AddTraceEventFunc g_addTraceEvent; -- --} // namespace gl -- --extern "C" { -- --void TRACE_ENTRY SetTraceFunctionPointers(GetCategoryEnabledFlagFunc getCategoryEnabledFlag, -- AddTraceEventFunc addTraceEvent) --{ -- gl::g_getCategoryEnabledFlag = getCategoryEnabledFlag; -- gl::g_addTraceEvent = addTraceEvent; --} -- --} // extern "C" -- --namespace gl --{ -- --const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name) --{ -- if (g_getCategoryEnabledFlag) -- { -- return g_getCategoryEnabledFlag(name); -- } -- static unsigned char disabled = 0; -- return &disabled; --} -- --void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id, -- int numArgs, const char** argNames, const unsigned char* argTypes, -- const unsigned long long* argValues, unsigned char flags) --{ -- if (g_addTraceEvent) -- { -- g_addTraceEvent(phase, categoryGroupEnabled, name, id, numArgs, argNames, argTypes, argValues, flags); -- } --} -- --} // namespace gl -diff --git a/src/common/event_tracer.h b/src/common/event_tracer.h -deleted file mode 100644 -index 14b7b29..0000000 ---- a/src/common/event_tracer.h -+++ /dev/null -@@ -1,41 +0,0 @@ --// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef COMMON_EVENT_TRACER_H_ --#define COMMON_EVENT_TRACER_H_ -- --#if !defined(TRACE_ENTRY) --#if defined(_WIN32) --#define TRACE_ENTRY __stdcall --#else --#define TRACE_ENTRY --#endif // // _WIN32 --#endif //TRACE_ENTRY -- --extern "C" { -- --typedef const unsigned char* (*GetCategoryEnabledFlagFunc)(const char* name); --typedef void (*AddTraceEventFunc)(char phase, const unsigned char* categoryGroupEnabled, const char* name, -- unsigned long long id, int numArgs, const char** argNames, -- const unsigned char* argTypes, const unsigned long long* argValues, -- unsigned char flags); -- --// extern "C" so that it has a reasonable name for GetProcAddress. --void TRACE_ENTRY SetTraceFunctionPointers(GetCategoryEnabledFlagFunc get_category_enabled_flag, -- AddTraceEventFunc add_trace_event_func); -- --} -- --namespace gl --{ -- --const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name); -- --void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id, -- int numArgs, const char** argNames, const unsigned char* argTypes, -- const unsigned long long* argValues, unsigned char flags); -- --} -- --#endif // COMMON_EVENT_TRACER_H_ -diff --git a/src/libGLESv2/event_tracer.cpp b/src/libGLESv2/event_tracer.cpp -new file mode 100644 -index 0000000..b38e7c3 ---- /dev/null -+++ b/src/libGLESv2/event_tracer.cpp -@@ -0,0 +1,49 @@ -+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "event_tracer.h" -+ -+namespace gl -+{ -+ -+GetCategoryEnabledFlagFunc g_getCategoryEnabledFlag; -+AddTraceEventFunc g_addTraceEvent; -+ -+} // namespace gl -+ -+extern "C" { -+ -+void TRACE_ENTRY SetTraceFunctionPointers(GetCategoryEnabledFlagFunc getCategoryEnabledFlag, -+ AddTraceEventFunc addTraceEvent) -+{ -+ gl::g_getCategoryEnabledFlag = getCategoryEnabledFlag; -+ gl::g_addTraceEvent = addTraceEvent; -+} -+ -+} // extern "C" -+ -+namespace gl -+{ -+ -+const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name) -+{ -+ if (g_getCategoryEnabledFlag) -+ { -+ return g_getCategoryEnabledFlag(name); -+ } -+ static unsigned char disabled = 0; -+ return &disabled; -+} -+ -+void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id, -+ int numArgs, const char** argNames, const unsigned char* argTypes, -+ const unsigned long long* argValues, unsigned char flags) -+{ -+ if (g_addTraceEvent) -+ { -+ g_addTraceEvent(phase, categoryGroupEnabled, name, id, numArgs, argNames, argTypes, argValues, flags); -+ } -+} -+ -+} // namespace gl -diff --git a/src/libGLESv2/event_tracer.h b/src/libGLESv2/event_tracer.h -new file mode 100644 -index 0000000..14b7b29 ---- /dev/null -+++ b/src/libGLESv2/event_tracer.h -@@ -0,0 +1,41 @@ -+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef COMMON_EVENT_TRACER_H_ -+#define COMMON_EVENT_TRACER_H_ -+ -+#if !defined(TRACE_ENTRY) -+#if defined(_WIN32) -+#define TRACE_ENTRY __stdcall -+#else -+#define TRACE_ENTRY -+#endif // // _WIN32 -+#endif //TRACE_ENTRY -+ -+extern "C" { -+ -+typedef const unsigned char* (*GetCategoryEnabledFlagFunc)(const char* name); -+typedef void (*AddTraceEventFunc)(char phase, const unsigned char* categoryGroupEnabled, const char* name, -+ unsigned long long id, int numArgs, const char** argNames, -+ const unsigned char* argTypes, const unsigned long long* argValues, -+ unsigned char flags); -+ -+// extern "C" so that it has a reasonable name for GetProcAddress. -+void TRACE_ENTRY SetTraceFunctionPointers(GetCategoryEnabledFlagFunc get_category_enabled_flag, -+ AddTraceEventFunc add_trace_event_func); -+ -+} -+ -+namespace gl -+{ -+ -+const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name); -+ -+void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id, -+ int numArgs, const char** argNames, const unsigned char* argTypes, -+ const unsigned long long* argValues, unsigned char flags); -+ -+} -+ -+#endif // COMMON_EVENT_TRACER_H_ -diff --git a/src/third_party/trace_event/trace_event.h b/src/third_party/trace_event/trace_event.h -index 1880056..ebd5a1e 100644 ---- a/src/third_party/trace_event/trace_event.h -+++ b/src/third_party/trace_event/trace_event.h -@@ -144,7 +144,7 @@ - - #include - --#include "common/event_tracer.h" -+#include "libGLESv2/event_tracer.h" - - // By default, const char* argument values are assumed to have long-lived scope - // and will not be copied. Use this macro to force a const char* to be copied. --- -1.8.5.3 - diff --git a/mingw-w64-angleproject-git/D3DCompiler_43-i686.dll b/mingw-w64-angleproject-git/D3DCompiler_43-i686.dll deleted file mode 100644 index ab9616191f..0000000000 Binary files a/mingw-w64-angleproject-git/D3DCompiler_43-i686.dll and /dev/null differ diff --git a/mingw-w64-angleproject-git/D3DCompiler_43-x86_64.dll b/mingw-w64-angleproject-git/D3DCompiler_43-x86_64.dll deleted file mode 100644 index 1539d83c2a..0000000000 Binary files a/mingw-w64-angleproject-git/D3DCompiler_43-x86_64.dll and /dev/null differ diff --git a/mingw-w64-angleproject-git/PKGBUILD b/mingw-w64-angleproject-git/PKGBUILD index d6286804fc..139de5f772 100644 --- a/mingw-w64-angleproject-git/PKGBUILD +++ b/mingw-w64-angleproject-git/PKGBUILD @@ -2,125 +2,70 @@ # Contributor: Ray Donnelly _realname=angleproject +pkgabse=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=1.3.r2070 +pkgver=2.1.r5408 pkgrel=1 pkgdesc='Angle project built from git source (mingw-w64)' arch=('any') url='http://code.google.com/p/angleproject/' license=('LGPLv2+') -groups=('mingw-w64') depends=() makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" 'gyp-svn' 'git') provides=("${MINGW_PACKAGE_PREFIX}-angleproject") conflicts=("${MINGW_PACKAGE_PREFIX}-angleproject") options=('!strip' 'staticlibs') -source=('angleproject::git+https://chromium.googlesource.com/angle/angle' - D3DCompiler_43-i686.dll - D3DCompiler_43-x86_64.dll - 'angleproject-include-import-library-and-use-def-file.patch' - 'angleproject-fix-mingw-compatibility.patch' - 'angleproject-export-shader-symbols.patch' - 'angleproject-fix-trace_event.patch' - 'angleproject-fix-renderer9-stencilformat.patch' - '0050-Untangle-OS-from-GENERATOR-a-bit-for-MSYS2.patch' - '0051-Move-event_tracer-.cpp-.h-to-libGLESv2-instead-of-co.patch' - 0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch - 0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch - 0003-Fix-compilation-with-MinGW-gcc-64-bit.patch - 0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch - 0005-Fix-build-when-SSE2-is-not-available.patch - 0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch - 0007-Make-DX9-DX11-mutually-exclusive.patch - 0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch - 0009-ANGLE-Support-WinRT.patch - 0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch - 0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch - 0012-ANGLE-fix-semantic-index-lookup.patch - 0013-ANGLE-Allow-for-universal-program-binaries.patch - 0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch) +source=("angleproject"::git+https://chromium.googlesource.com/angle/angle + 0000-build-fix.patch + angleproject-export-shader-symbols.patch + angleproject-include-import-library-and-use-def-file.patch + libEGL_mingw32.def + libGLESv2_mingw32.def) md5sums=('SKIP' - '1c9b45e87528b8bb8cfa884ea0099a85' - 'ada0c39d4eacdc81fd84163a95d62079' - '4bf401fa460cc60802106fa6646b10df' - '10b197b483a543fcf7e1ae5ec379848f' - 'be79402d4cf03e26f467d9f738823d3a' - '59a3d60f5b1b6676056444db8a7883fe' - '5f30f3a3c668e4a76920a71e0dddc87d' - 'd680608c3826af8ed61292ed693a6776' - '992b68a3e691467e8f067d2a01cc5e8a' - 'c690dcdc1940cdba4a10f5509bbdbde5' - '743518f9c30ce102bf9db07ff4b04c5b' - 'a9a3412a013f792a170181a370807ce0' - '53b6de972d6827dced411ced3a748980' - '701479de7b6c9e5e6261d795d989996d' - '671f29fa7abd9eadd2bcc8d7e0e34b5d' - 'b49eb1e053587dd356a67c8c7318ef1e' - 'b08b19bb0a562cb16442412d5d664277' - '45cc38b7271bfed011dd40999dd8d12b' - '8d80596af43f645be9d5114435c4706e' - '4d7b3d22a71973b2dd552367ffb483b0' - 'e103408c432bde88659b8f4618db32d1' - '357849298a8b1ebfa73a9fa6648a12b5' - '5faf59851fda5052282dbaf34602f778') + '3caf19560f2b8cac70f4a27b23093775' + '70615a5e327a53fd60cc4dec916842c0' + '2ca332d9c13bae82300d417595e1d48d' + '232a2f50c3b55247f95fecfab1bec60e' + 'f5519fd7fc7f654c0805fbd802a5722d') pkgver() { cd "$srcdir/angleproject" - local _major=$(head -n 4 src/common/version.h | grep 'ANGLE_MAJOR_VERSION' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') - local _minor=$(head -n 4 src/common/version.h | grep 'ANGLE_MINOR_VERSION' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _major=$(head -n 14 src/common/version.h | grep 'ANGLE_MAJOR_VERSION' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _minor=$(head -n 14 src/common/version.h | grep 'ANGLE_MINOR_VERSION' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') printf "%s.%s.r%s" "$_major" "$_minor" "$(git rev-list --count HEAD)" } +prepare() { + cd "${srcdir}"/${_realname} + + cp ${srcdir}/libEGL_mingw32.def src/libEGL/ + cp ${srcdir}/libGLESv2_mingw32.def src/libGLESv2/ + + ### Fedora team patches ### + patch -p1 -i ${srcdir}/0000-build-fix.patch + + # Make sure an import library is created and the correct .def file is used during the build + patch -p1 -i ${srcdir}/angleproject-include-import-library-and-use-def-file.patch + + # WebKit depends on symbols which are used in the static library called translator_hlsl + # This static library is linked into the libGLESv2 shared library + # To allow building WebKit export the required symbols in the libGLESv2 shared library + patch -p1 -i ${srcdir}/angleproject-export-shader-symbols.patch + + #echo "" > src/copy_compiler_dll.bat + #chmod +x src/copy_compiler_dll.bat +} + build() { cd "${srcdir}"/angleproject export PYTHON=/usr/bin/python2 - # Make sure an import library is created and the correct .def file is used during the build - patch -p0 -i "${srcdir}"/angleproject-include-import-library-and-use-def-file.patch - # .def pieces taken from http://qt.gitorious.org/qt/qtbase/commit/b2c44985e740d0a0ea86b7b9f4cc849258ac2340 - patch -p0 -i "${srcdir}"/angleproject-fix-mingw-compatibility.patch + #export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" + #export CXXFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" - # WebKit depends on symbols which are used in the static library called translator - # This static library is linked into the libGLESv2 shared library - # To allow building WebKit export the required symbols in the libGLESv2 shared library - patch -p0 -i "${srcdir}"/angleproject-export-shader-symbols.patch - - # Fix missing methods in trace_event.h - patch -p0 -i "${srcdir}"/angleproject-fix-trace_event.patch - - # Fix stencil format method in renderer9_utils.cpp - patch -p0 -i "${srcdir}"/angleproject-fix-renderer9-stencilformat.patch - - # Untangle OS and GENERATOR some. - patch -p1 -i "${srcdir}"/0050-Untangle-OS-from-GENERATOR-a-bit-for-MSYS2.patch - - # Fix multiply defined 'SetTraceFunctionPointers' - patch -p1 -i "${srcdir}"/0051-Move-event_tracer-.cpp-.h-to-libGLESv2-instead-of-co.patch - - # Patches from Qt5 - patch -p4 -i "${srcdir}"/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch - patch -p4 -i "${srcdir}"/0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch - #patch -p4 -i "${srcdir}"/0003-Fix-compilation-with-MinGW-gcc-64-bit.patch - #patch -p4 -i "${srcdir}"/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch - patch -p4 -i "${srcdir}"/0005-Fix-build-when-SSE2-is-not-available.patch - #patch -p4 -i "${srcdir}"/0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch - #patch -p4 -i "${srcdir}"/0007-Make-DX9-DX11-mutually-exclusive.patch - #patch -p4 -i "${srcdir}"/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch - #patch -p4 -i "${srcdir}"/0009-ANGLE-Support-WinRT.patch - patch -p4 -i "${srcdir}"/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch - #patch -p4 -i "${srcdir}"/0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch - patch -p4 -i "${srcdir}"/0012-ANGLE-fix-semantic-index-lookup.patch - #patch -p4 -i "${srcdir}"/0013-ANGLE-Allow-for-universal-program-binaries.patch - #patch -p4 -i "${srcdir}"/0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch - - export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" - export CXXFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" - sed -i -e 's_python _python2 _g' -e 's_"python"_"python2"_g' -e "s_'python'_'python2'_g" -e 's_/usr/bin/python_/usr/bin/python2_g' $(find -type f) sed -i -e 's|vsprintf_s|vsprintf|g' $(find . \( -name '*.h' -or -name '*.cpp' \) -and -type f) - mkdir -p build-${MINGW_CHOST} && pushd build-${MINGW_CHOST} - if [ "${MINGW_CHOST}" = "i686-w64-mingw32" ] then _target="win32" @@ -128,55 +73,65 @@ build() { _target="win64" fi - gyp -D OS=win --format make -D TARGET=$_target --depth . -I ../build/common.gypi ../src/build_angle.gyp + gyp -D OS=win -D MSVS_VERSION="" -D TARGET=${_target} --format make --depth . -I build/common.gypi src/angle.gyp - # Fix linking of libtranslator.a - sed -i \ - -e s@'$(obj).target/$(TARGET)/../src/common/event_tracer.o'@@g \ - -e s@'$(obj).target/$(TARGET)/../src/common/RefCountObject.o'@@g \ - -e s@'$(obj).target/$(TARGET)/../src/common/debug.o'@@g \ - "${srcdir}"/angleproject/src/translator{,_static}.target.mk + # Make sure the correct libraries are linked in + #sed -i s@'^LIBS :='@'LIBS := -ld3d9 -ldxguid'@ ../src/libGLESv2.target.mk + #sed -i s@'^LIBS :='@'LIBS := -ld3d9 -ldxguid -L. -lGLESv2'@ ../src/libEGL.target.mk # LINK=g++ is to prevent using flock to serialize linking. LINK=g++ make -j1 V=1 CXXFLAGS="-std=c++11 -msse2 -DUNICODE -D_UNICODE" - ${MINGW_PREFIX}/bin/ar rcs libGLESv2.a \ - out/Debug/obj.target/libGLESv2/../src/common/*.o \ - out/Debug/obj.target/libGLESv2/../src/libGLESv2/renderer/*.o \ - out/Debug/obj.target/libGLESv2/../src/libGLESv2/renderer/d3d9/*.o \ - out/Debug/obj.target/libGLESv2/../src/libGLESv2/renderer/d3d11/*.o \ - out/Debug/obj.target/libGLESv2/../src/libGLESv2/*.o \ - #out/Debug/obj.target/../src/libtranslator.a \ - #out/Debug/obj.target/../src/libpreprocessor.a - ${MINGW_PREFIX}/bin/ar rcs libEGL.a \ - out/Debug/obj.target/libEGL/../src/common/*.o \ - out/Debug/obj.target/libEGL/../src/libEGL/*.o + # ${MINGW_PREFIX}/bin/ar rcs libGLESv2.a \ + # out/Debug/obj.target/src/common/*.o \ + # out/Debug/obj.target/src/common/win32/*.o \ + # out/Debug/obj.target/src/compiler/translator/*.o \ + # out/Debug/obj.target/src/compiler/translator/depgraph/*.o \ + # out/Debug/obj.target/src/compiler/translator/timing/*.o \ + # out/Debug/obj.target/src/compiler/preprocessor/*.o \ + # out/Debug/obj.target/src/third_party/compiler/*.o \ + # out/Debug/obj.target/src/third_party/murmurhash/*.o \ + # out/Debug/obj.target/src/third_party/systeminfo/*.o \ + # out/Debug/obj.target/src/libGLESv2/*.o \ + # out/Debug/obj.target/src/libANGLE/renderer/*.o \ + # out/Debug/obj.target/src/libANGLE/renderer/d3d/*.o \ + # out/Debug/obj.target/src/libANGLE/renderer/d3d/d3d9/*.o \ + # out/Debug/obj.target/src/libANGLE/renderer/d3d/d3d11/*.o - popd + # ${MINGW_PREFIX}/bin/ar rcs libEGL.a \ + # out/Debug/obj.target/libEGL/../src/common/RefCountObject.o \ + # out/Debug/obj.target/libEGL/../src/common/angleutils.o \ + # out/Debug/obj.target/libEGL/../src/common/debug.o \ + # out/Debug/obj.target/libEGL/../src/common/event_tracer.o \ + # out/Debug/obj.target/libEGL/../src/common/mathutil.o \ + # out/Debug/obj.target/libEGL/../src/common/tls.o \ + # out/Debug/obj.target/libEGL/../src/common/utilities.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/AttributeMap.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/Config.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/Display.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/Error.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/Surface.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/libEGL.o \ + # out/Debug/obj.target/libEGL/../src/libEGL/main.o \ + # out/Debug/obj.target/libEGL/../src/common/win32/NativeWindow.o } package() { cd "${srcdir}"/angleproject - pushd build-${MINGW_CHOST} mkdir -p "${pkgdir}${MINGW_PREFIX}"/{bin,lib,include} - install out/Debug/src/libGLESv2.dll "${pkgdir}${MINGW_PREFIX}"/bin/libGLESv2.dll - install out/Debug/src/libEGL.dll "${pkgdir}${MINGW_PREFIX}"/bin/libEGL.dll + install out/Debug/lib.target/libGLESv2.dll "${pkgdir}${MINGW_PREFIX}"/bin/libGLESv2.dll + install out/Debug/lib.target/libEGL.dll "${pkgdir}${MINGW_PREFIX}"/bin/libEGL.dll ${MINGW_PREFIX}/bin/strip --strip-unneeded "${pkgdir}${MINGW_PREFIX}"/bin/*.dll - install libGLESv2.a "${pkgdir}${MINGW_PREFIX}"/lib/ - install libEGL.a "${pkgdir}${MINGW_PREFIX}"/lib/ + #install libGLESv2.a "${pkgdir}${MINGW_PREFIX}"/lib/ + #install libEGL.a "${pkgdir}${MINGW_PREFIX}"/lib/ - ${MINGW_PREFIX}/bin/strip --strip-debug "${pkgdir}${MINGW_PREFIX}"/lib/libEGL.a install libEGL.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/ install libGLESv2.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/ ${MINGW_PREFIX}/bin/strip --strip-unneeded "${pkgdir}${MINGW_PREFIX}"/lib/*.dll.a - cp -Rv ../include/* "${pkgdir}${MINGW_PREFIX}"/include/ - - popd - - install -Dm755 ${srcdir}/D3DCompiler_43-${CARCH}.dll "${pkgdir}${MINGW_PREFIX}"/bin/D3DCompiler_43.dll + cp -Rv include/* "${pkgdir}${MINGW_PREFIX}"/include/ } diff --git a/mingw-w64-angleproject-git/angleproject-export-shader-symbols.patch b/mingw-w64-angleproject-git/angleproject-export-shader-symbols.patch index dabb859311..2d94a9a921 100644 --- a/mingw-w64-angleproject-git/angleproject-export-shader-symbols.patch +++ b/mingw-w64-angleproject-git/angleproject-export-shader-symbols.patch @@ -1,37 +1,54 @@ ---- src/libGLESv2/libGLESv2.def.orig 2014-01-06 11:49:13.494061976 +0100 -+++ src/libGLESv2/libGLESv2.def 2014-01-06 11:49:15.984075067 +0100 -@@ -186,3 +186,14 @@ EXPORTS +--- angle/src/libGLESv2/libGLESv2.def.orig 2014-12-30 12:59:07.560620988 +0100 ++++ angle/src/libGLESv2/libGLESv2.def 2014-12-30 13:00:22.381399755 +0100 +@@ -144,6 +144,7 @@ + glViewport @142 - ; Setting up TRACE macro callbacks - SetTraceFunctionPointers @180 -+ -+ ; WebKit dependencies.. -+ ShInitBuiltInResources @200 NONAME -+ ShInitialize @201 NONAME -+ ShDestruct @202 NONAME -+ ShGetInfo @203 NONAME -+ ShGetInfoLog @204 NONAME -+ ShGetObjectCode @207 NONAME -+ ShCompile @208 NONAME -+ ShConstructCompiler @209 NONAME -+ ShGetVariableInfo @210 NONAME ---- src/libGLESv2/libGLESv2_mingw32.def.orig 2014-01-06 13:17:51.686441162 +0100 -+++ src/libGLESv2/libGLESv2_mingw32.def 2014-01-06 13:17:21.853045374 +0100 -@@ -180,3 +180,17 @@ EXPORTS - glGetCurrentContext @147 NONAME - glGetProcAddress@4 @148 NONAME - glBindTexImage@4 @158 NONAME -+ glCreateRenderer @177 NONAME -+ glDestroyRenderer @178 NONAME -+ glDrawBuffersEXT@8 @179 NONAME + ; Extensions ++ glTexImage3DOES @143 + glBlitFramebufferANGLE @149 + glRenderbufferStorageMultisampleANGLE @150 + glDeleteFencesNV @151 +@@ -291,3 +292,25 @@ + ANGLEPlatformCurrent @290 + ANGLEPlatformInitialize @291 + ANGLEPlatformShutdown @292 ++ ++ ; EGL dependencies ++ glCreateContext @144 NONAME ++ glDestroyContext @145 NONAME ++ glMakeCurrent @146 NONAME ++ glGetCurrentContext @147 NONAME ++ glGetProcAddress @148 NONAME ++ glBindTexImage @158 NONAME ++ glCreateRenderer @177 NONAME ++ glDestroyRenderer @178 NONAME ++ ++ ; WebKit dependencies ++ ShInitBuiltInResources @300 NONAME ++ ShInitialize @301 NONAME ++ ShDestruct @302 NONAME ++ ShGetInfo @303 NONAME ++ ShGetInfoLog @304 NONAME ++ ShGetVariableInfo @305 NONAME ++ ShGetObjectCode @306 NONAME ++ ShCompile @307 NONAME ++ ShConstructCompiler @308 NONAME ++ +--- angle/src/libGLESv2/libGLESv2_mingw32.def.orig 2014-12-30 12:59:07.561620998 +0100 ++++ angle/src/libGLESv2/libGLESv2_mingw32.def 2014-12-30 13:01:37.782182097 +0100 +@@ -294,3 +294,15 @@ + glBindTexImage@4 @158 NONAME + glCreateRenderer @177 NONAME + glDestroyRenderer @178 NONAME ++ ++ ; WebKit dependencies ++ ShInitBuiltInResources @300 NONAME ++ ShInitialize @301 NONAME ++ ShDestruct @302 NONAME ++ ShGetInfo @303 NONAME ++ ShGetInfoLog @304 NONAME ++ ShGetVariableInfo @305 NONAME ++ ShGetObjectCode @306 NONAME ++ ShCompile @307 NONAME ++ ShConstructCompiler @308 NONAME + -+ ; WebKit dependencies.. -+ ShInitBuiltInResources @200 NONAME -+ ShInitialize @201 NONAME -+ ShDestruct @202 NONAME -+ ShGetInfo @203 NONAME -+ ShGetInfoLog @204 NONAME -+ ShGetObjectCode @207 NONAME -+ ShCompile @208 NONAME -+ ShConstructCompiler @209 NONAME -+ ShGetVariableInfo @210 NONAME diff --git a/mingw-w64-angleproject-git/angleproject-fix-mingw-compatibility.patch b/mingw-w64-angleproject-git/angleproject-fix-mingw-compatibility.patch deleted file mode 100644 index a0444194d8..0000000000 --- a/mingw-w64-angleproject-git/angleproject-fix-mingw-compatibility.patch +++ /dev/null @@ -1,224 +0,0 @@ ---- /dev/null -+++ src/libEGL/libEGL_mingw32.def -@@ -0,0 +1,36 @@ -+LIBRARY libEGL -+EXPORTS -+ eglBindAPI@4 @14 -+ eglBindTexImage@12 @20 -+ eglChooseConfig@20 @7 -+ eglCopyBuffers@12 @33 -+ eglCreateContext@16 @23 -+ eglCreatePbufferFromClientBuffer@20 @18 -+ eglCreatePbufferSurface@12 @10 -+ eglCreatePixmapSurface@16 @11 -+ eglCreateWindowSurface@16 @9 -+ eglDestroyContext@8 @24 -+ eglDestroySurface@8 @12 -+ eglGetConfigAttrib@16 @8 -+ eglGetConfigs@16 @6 -+ eglGetCurrentContext@0 @26 -+ eglGetCurrentDisplay@0 @28 -+ eglGetCurrentSurface@4 @27 -+ eglGetDisplay@4 @2 -+ eglGetError@0 @1 -+ eglGetProcAddress@4 @34 -+ eglInitialize@12 @3 -+ eglMakeCurrent@16 @25 -+ eglQueryAPI@0 @15 -+ eglQueryContext@16 @29 -+ eglQueryString@8 @5 -+ eglQuerySurface@16 @13 -+ eglReleaseTexImage@12 @21 -+ eglReleaseThread@0 @17 -+ eglSurfaceAttrib@16 @19 -+ eglSwapBuffers@8 @32 -+ eglSwapInterval@8 @22 -+ eglTerminate@4 @4 -+ eglWaitClient@0 @16 -+ eglWaitGL@0 @30 -+ eglWaitNative@4 @31 ---- /dev/null -+++ src/libGLESv2/libGLESv2_mingw32.def -@@ -0,0 +1,182 @@ -+LIBRARY libGLESv2 -+EXPORTS -+ glActiveTexture@4 @1 -+ glAttachShader@8 @2 -+ glBindAttribLocation@12 @3 -+ glBindBuffer@8 @4 -+ glBindFramebuffer@8 @5 -+ glBindRenderbuffer@8 @6 -+ glBindTexture@8 @7 -+ glBlendColor@16 @8 -+ glBlendEquation@4 @9 -+ glBlendEquationSeparate@8 @10 -+ glBlendFunc@8 @11 -+ glBlendFuncSeparate@16 @12 -+ glBufferData@16 @13 -+ glBufferSubData@16 @14 -+ glCheckFramebufferStatus@4 @15 -+ glClear@4 @16 -+ glClearColor@16 @17 -+ glClearDepthf@4 @18 -+ glClearStencil@4 @19 -+ glColorMask@16 @20 -+ glCompileShader@4 @21 -+ glCompressedTexImage2D@32 @22 -+ glCompressedTexSubImage2D@36 @23 -+ glCopyTexImage2D@32 @24 -+ glCopyTexSubImage2D@32 @25 -+ glCreateProgram@0 @26 -+ glCreateShader@4 @27 -+ glCullFace@4 @28 -+ glDeleteBuffers@8 @29 -+ glDeleteFramebuffers@8 @30 -+ glDeleteProgram@4 @32 -+ glDeleteRenderbuffers@8 @33 -+ glDeleteShader@4 @34 -+ glDeleteTextures@8 @31 -+ glDepthFunc@4 @36 -+ glDepthMask@4 @37 -+ glDepthRangef@8 @38 -+ glDetachShader@8 @35 -+ glDisable@4 @39 -+ glDisableVertexAttribArray@4 @40 -+ glDrawArrays@12 @41 -+ glDrawElements@16 @42 -+ glEnable@4 @43 -+ glEnableVertexAttribArray@4 @44 -+ glFinish@0 @45 -+ glFlush@0 @46 -+ glFramebufferRenderbuffer@16 @47 -+ glFramebufferTexture2D@20 @48 -+ glFrontFace@4 @49 -+ glGenBuffers@8 @50 -+ glGenFramebuffers@8 @52 -+ glGenRenderbuffers@8 @53 -+ glGenTextures@8 @54 -+ glGenerateMipmap@4 @51 -+ glGetActiveAttrib@28 @55 -+ glGetActiveUniform@28 @56 -+ glGetAttachedShaders@16 @57 -+ glGetAttribLocation@8 @58 -+ glGetBooleanv@8 @59 -+ glGetBufferParameteriv@12 @60 -+ glGetError@0 @61 -+ glGetFloatv@8 @62 -+ glGetFramebufferAttachmentParameteriv@16 @63 -+ glGetIntegerv@8 @64 -+ glGetProgramInfoLog@16 @66 -+ glGetProgramiv@12 @65 -+ glGetRenderbufferParameteriv@12 @67 -+ glGetShaderInfoLog@16 @69 -+ glGetShaderPrecisionFormat@16 @70 -+ glGetShaderSource@16 @71 -+ glGetShaderiv@12 @68 -+ glGetString@4 @72 -+ glGetTexParameterfv@12 @73 -+ glGetTexParameteriv@12 @74 -+ glGetUniformLocation@8 @77 -+ glGetUniformfv@12 @75 -+ glGetUniformiv@12 @76 -+ glGetVertexAttribPointerv@12 @80 -+ glGetVertexAttribfv@12 @78 -+ glGetVertexAttribiv@12 @79 -+ glHint@8 @81 -+ glIsBuffer@4 @82 -+ glIsEnabled@4 @83 -+ glIsFramebuffer@4 @84 -+ glIsProgram@4 @85 -+ glIsRenderbuffer@4 @86 -+ glIsShader@4 @87 -+ glIsTexture@4 @88 -+ glLineWidth@4 @89 -+ glLinkProgram@4 @90 -+ glPixelStorei@8 @91 -+ glPolygonOffset@8 @92 -+ glReadPixels@28 @93 -+ glReleaseShaderCompiler@0 @94 -+ glRenderbufferStorage@16 @95 -+ glSampleCoverage@8 @96 -+ glScissor@16 @97 -+ glShaderBinary@20 @98 -+ glShaderSource@16 @99 -+ glStencilFunc@12 @100 -+ glStencilFuncSeparate@16 @101 -+ glStencilMask@4 @102 -+ glStencilMaskSeparate@8 @103 -+ glStencilOp@12 @104 -+ glStencilOpSeparate@16 @105 -+ glTexImage2D@36 @106 -+ glTexParameterf@12 @107 -+ glTexParameterfv@12 @108 -+ glTexParameteri@12 @109 -+ glTexParameteriv@12 @110 -+ glTexSubImage2D@36 @111 -+ glUniform1f@8 @112 -+ glUniform1fv@12 @113 -+ glUniform1i@8 @114 -+ glUniform1iv@12 @115 -+ glUniform2f@12 @116 -+ glUniform2fv@12 @117 -+ glUniform2i@12 @118 -+ glUniform2iv@12 @119 -+ glUniform3f@16 @120 -+ glUniform3fv@12 @121 -+ glUniform3i@16 @122 -+ glUniform3iv@12 @123 -+ glUniform4f@20 @124 -+ glUniform4fv@12 @125 -+ glUniform4i@20 @126 -+ glUniform4iv@12 @127 -+ glUniformMatrix2fv@16 @128 -+ glUniformMatrix3fv@16 @129 -+ glUniformMatrix4fv@16 @130 -+ glUseProgram@4 @131 -+ glValidateProgram@4 @132 -+ glVertexAttrib1f@8 @133 -+ glVertexAttrib1fv@8 @134 -+ glVertexAttrib2f@12 @135 -+ glVertexAttrib2fv@8 @136 -+ glVertexAttrib3f@16 @137 -+ glVertexAttrib3fv@8 @138 -+ glVertexAttrib4f@20 @139 -+ glVertexAttrib4fv@8 @140 -+ glVertexAttribPointer@24 @141 -+ glViewport@16 @142 -+ -+ ; Extensions -+ glTexImage3DOES@40 @143 -+ glBlitFramebufferANGLE@40 @149 -+ glRenderbufferStorageMultisampleANGLE@20 @150 -+ glDeleteFencesNV@8 @151 -+ glFinishFenceNV@4 @152 -+ glGenFencesNV@8 @153 -+ glGetFenceivNV@12 @154 -+ glIsFenceNV@4 @155 -+ glSetFenceNV@8 @156 -+ glTestFenceNV@4 @157 -+ glGetTranslatedShaderSourceANGLE@16 @159 -+ glTexStorage2DEXT@20 @160 -+ glGetGraphicsResetStatusEXT@0 @161 -+ glReadnPixelsEXT@32 @162 -+ glGetnUniformfvEXT@16 @163 -+ glGetnUniformivEXT@16 @164 -+ glGenQueriesEXT@8 @165 -+ glDeleteQueriesEXT@8 @166 -+ glIsQueryEXT@4 @167 -+ glBeginQueryEXT@8 @168 -+ glEndQueryEXT@4 @169 -+ glGetQueryivEXT@12 @170 -+ glGetQueryObjectuivEXT@12 @171 -+ glVertexAttribDivisorANGLE@8 @172 -+ glDrawArraysInstancedANGLE@16 @173 -+ glDrawElementsInstancedANGLE@20 @174 -+ glProgramBinaryOES@16 @175 -+ glGetProgramBinaryOES@20 @176 -+ -+ ; EGL dependencies -+ glCreateContext @144 NONAME -+ glDestroyContext @145 NONAME -+ glMakeCurrent @146 NONAME -+ glGetCurrentContext @147 NONAME -+ glGetProcAddress@4 @148 NONAME -+ glBindTexImage@4 @158 NONAME diff --git a/mingw-w64-angleproject-git/angleproject-fix-renderer9-stencilformat.patch b/mingw-w64-angleproject-git/angleproject-fix-renderer9-stencilformat.patch deleted file mode 100644 index a0b931767c..0000000000 --- a/mingw-w64-angleproject-git/angleproject-fix-renderer9-stencilformat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- src.orig/libGLESv2/renderer/d3d9/renderer9_utils.cpp 2014-01-17 22:54:45.401522829 +0100 -+++ src/libGLESv2/renderer/d3d9/renderer9_utils.cpp 2014-01-17 22:54:52.004935151 +0100 -@@ -13,6 +13,7 @@ - #include "libGLESv2/Context.h" - - #include "common/debug.h" -+#include - - namespace gl_d3d9 - { -@@ -381,9 +382,12 @@ GLenum ConvertDepthStencilFormat(D3DFORM - return GL_DEPTH_COMPONENT16; - case D3DFMT_D24S8: - return GL_DEPTH24_STENCIL8_OES; -+ case D3DFMT_D32: -+ return GL_DEPTH_COMPONENT16; - case D3DFMT_UNKNOWN: - return GL_NONE; - default: -+ printf("unknown D3DFORMAT (stencil format): %d\n", (int)format); - UNREACHABLE(); - } - diff --git a/mingw-w64-angleproject-git/angleproject-fix-trace_event.patch b/mingw-w64-angleproject-git/angleproject-fix-trace_event.patch deleted file mode 100644 index fd04d82fb3..0000000000 --- a/mingw-w64-angleproject-git/angleproject-fix-trace_event.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- src/third_party/trace_event/trace_event.h.orig 2014-01-06 10:40:41.106093009 +0100 -+++ src/third_party/trace_event/trace_event.h 2014-01-06 10:40:09.310989874 +0100 -@@ -587,7 +587,7 @@ const unsigned long long noEventId = 0; - class TraceID { - public: - explicit TraceID(const void* id, unsigned char* flags) : -- m_data(static_cast(reinterpret_cast(id))) -+ m_data((unsigned long long)id) - { - *flags |= TRACE_EVENT_FLAG_MANGLE_ID; - } -@@ -806,14 +806,14 @@ public: - } - - // FIXME: Make load/store to traceSamplingState[] thread-safe and atomic. -- static inline const char* current() -+ /*static inline const char* current() - { - return reinterpret_cast(*gl::traceSamplingState[BucketNumber]); - } - static inline void set(const char* categoryAndName) - { - *gl::traceSamplingState[BucketNumber] = reinterpret_cast(const_cast(categoryAndName)); -- } -+ }*/ - - private: - const char* m_previousState; diff --git a/mingw-w64-angleproject-git/angleproject-include-import-library-and-use-def-file.patch b/mingw-w64-angleproject-git/angleproject-include-import-library-and-use-def-file.patch index e32d436113..95166f138d 100644 --- a/mingw-w64-angleproject-git/angleproject-include-import-library-and-use-def-file.patch +++ b/mingw-w64-angleproject-git/angleproject-include-import-library-and-use-def-file.patch @@ -1,45 +1,38 @@ ---- src.orig/libEGL.gypi 2014-01-11 12:17:37.971020837 +0100 -+++ src/libEGL.gypi 2014-01-11 12:20:05.406870084 +0100 -@@ -13,6 +13,14 @@ - 'target_name': 'libEGL', - 'type': 'shared_library', - 'dependencies': [ 'libGLESv2', 'commit_id' ], -+ 'conditions': [ -+ ['TARGET=="win32" and GENERATOR == "make"', { -+ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a ../src/libEGL/libEGL_mingw32.def -Wl,--whole-archive -L. -lGLESv2 -ld3d9 -ldxguid -Wl,--no-whole-archive' ], -+ }], -+ ['TARGET=="win64" and GENERATOR == "make"', { -+ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a ../src/libEGL/libEGL.def -Wl,--whole-archive -L. -lGLESv2 -ld3d9 -ldxguid -Wl,--no-whole-archive' ], -+ }], -+ ], - 'include_dirs': - [ - '.', ---- src.orig/libGLESv2.gypi 2014-01-11 12:17:37.971020837 +0100 -+++ src/libGLESv2.gypi 2014-01-11 12:19:22.916166993 +0100 -@@ -23,6 +23,14 @@ - 'target_name': 'libGLESv2', - 'type': 'shared_library', - 'dependencies': [ 'translator', 'commit_id', 'copy_compiler_dll' ], -+ 'conditions': [ -+ ['TARGET=="win32" and GENERATOR == "make"', { -+ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a ../src/libGLESv2/libGLESv2_mingw32.def -Wl,--whole-archive -ld3d9 -ldxguid -Wl,--no-whole-archive' ], -+ }], -+ ['TARGET=="win64" and GENERATOR == "make"', { -+ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a ../src/libGLESv2/libGLESv2.def -Wl,--whole-archive -ld3d9 -ldxguid -Wl,--no-whole-archive' ], -+ }], -+ ], - 'include_dirs': - [ - '.', ---- src.orig/angle.gypi 2014-01-11 12:28:41.414124056 +0100 -+++ src/angle.gypi 2014-01-11 12:31:06.065777743 +0100 -@@ -38,7 +38,7 @@ - 'message': 'Copying D3D Compiler DLL...', - 'inputs': [ 'copy_compiler_dll.bat' ], - 'outputs': [ '<(PRODUCT_DIR)/D3DCompiler_46.dll' ], -- 'action': ["<(angle_relative_src_path)/copy_compiler_dll.bat", "$(PlatformName)", "<(windows_sdk_path)", "<(PRODUCT_DIR)" ], -+ 'action': ["touch", '<(PRODUCT_DIR)/D3DCompiler_46.dll' ], - } - ] #actions - }, +--- angleproject/src/libEGL.gypi.orig 2015-07-10 11:42:08.230786800 +0300 ++++ angleproject/src/libEGL.gypi 2015-07-10 11:44:01.168491900 +0300 +@@ -48,7 +48,16 @@ + { + 'msvs_enable_winphone' : '1', + }], ++ ['TARGET=="win32"', { ++ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a' ], ++ }], ++ ['TARGET=="win64"', { ++ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a' ], ++ }], + ], ++ 'libraries': [ ++ '-ldxguid -ld3d9 -lgdi32' ++ ] + }, + ], + } +--- angleproject/src/libGLESv2.gypi.orig 2015-07-10 11:41:58.223787600 +0300 ++++ angleproject/src/libGLESv2.gypi 2015-07-10 11:44:36.585949800 +0300 +@@ -826,7 +826,16 @@ + { + 'msvs_enable_winphone' : '1', + }], ++ ['TARGET=="win32"', { ++ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a' ], ++ }], ++ ['TARGET=="win64"', { ++ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a' ], ++ }], + ], ++ 'libraries': [ ++ '-ldxguid -ld3d9 -lgdi32' ++ ] + }, + ], + } diff --git a/mingw-w64-angleproject-git/libEGL_mingw32.def b/mingw-w64-angleproject-git/libEGL_mingw32.def new file mode 100644 index 0000000000..dde91748ed --- /dev/null +++ b/mingw-w64-angleproject-git/libEGL_mingw32.def @@ -0,0 +1,53 @@ +LIBRARY libEGL +EXPORTS + eglBindAPI@4 @14 + eglBindTexImage@12 @20 + eglChooseConfig@20 @7 + eglCopyBuffers@12 @33 + eglCreateContext@16 @23 + eglCreatePbufferFromClientBuffer@20 @18 + eglCreatePbufferSurface@12 @10 + eglCreatePixmapSurface@16 @11 + eglCreateWindowSurface@16 @9 + eglDestroyContext@8 @24 + eglDestroySurface@8 @12 + eglGetConfigAttrib@16 @8 + eglGetConfigs@16 @6 + eglGetCurrentContext@0 @26 + eglGetCurrentDisplay@0 @28 + eglGetCurrentSurface@4 @27 + eglGetDisplay@4 @2 + eglGetError@0 @1 + eglGetProcAddress@4 @34 + eglInitialize@12 @3 + eglMakeCurrent@16 @25 + eglQueryAPI@0 @15 + eglQueryContext@16 @29 + eglQueryString@8 @5 + eglQuerySurface@16 @13 + eglReleaseTexImage@12 @21 + eglReleaseThread@0 @17 + eglSurfaceAttrib@16 @19 + eglSwapBuffers@8 @32 + eglSwapInterval@8 @22 + eglTerminate@4 @4 + eglWaitClient@0 @16 + eglWaitGL@0 @30 + eglWaitNative@4 @31 + + ; Extensions + eglGetPlatformDisplayEXT@12 @35 + eglQuerySurfacePointerANGLE@16 @36 + eglPostSubBufferNV@24 @37 + + ; 1.5 entry points + eglCreateSync@12 @38 + eglDestroySyn@8 @39 + eglClientWaitSync@16 @40 + eglGetSyncAttrib@16 @41 + eglCreateImage@20 @42 + eglDestroyImage@8 @43 + eglGetPlatformDisplay@12 @44 + eglCreatePlatformWindowSurface@16 @45 + eglCreatePlatformPixmapSurface@16 @46 + eglWaitSync@12 @47 diff --git a/mingw-w64-angleproject-git/libGLESv2_mingw32.def b/mingw-w64-angleproject-git/libGLESv2_mingw32.def new file mode 100644 index 0000000000..c5b015ff6e --- /dev/null +++ b/mingw-w64-angleproject-git/libGLESv2_mingw32.def @@ -0,0 +1,304 @@ +LIBRARY libGLESv2 +EXPORTS + glActiveTexture@4 @1 + glAttachShader@8 @2 + glBindAttribLocation@12 @3 + glBindBuffer@8 @4 + glBindFramebuffer@8 @5 + glBindRenderbuffer@8 @6 + glBindTexture@8 @7 + glBlendColor@16 @8 + glBlendEquation@4 @9 + glBlendEquationSeparate@8 @10 + glBlendFunc@8 @11 + glBlendFuncSeparate@16 @12 + glBufferData@16 @13 + glBufferSubData@16 @14 + glCheckFramebufferStatus@4 @15 + glClear@4 @16 + glClearColor@16 @17 + glClearDepthf@4 @18 + glClearStencil@4 @19 + glColorMask@16 @20 + glCompileShader@4 @21 + glCompressedTexImage2D@32 @22 + glCompressedTexSubImage2D@36 @23 + glCopyTexImage2D@32 @24 + glCopyTexSubImage2D@32 @25 + glCreateProgram@0 @26 + glCreateShader@4 @27 + glCullFace@4 @28 + glDeleteBuffers@8 @29 + glDeleteFramebuffers@8 @30 + glDeleteProgram@4 @32 + glDeleteRenderbuffers@8 @33 + glDeleteShader@4 @34 + glDeleteTextures@8 @31 + glDepthFunc@4 @36 + glDepthMask@4 @37 + glDepthRangef@8 @38 + glDetachShader@8 @35 + glDisable@4 @39 + glDisableVertexAttribArray@4 @40 + glDrawArrays@12 @41 + glDrawElements@16 @42 + glEnable@4 @43 + glEnableVertexAttribArray@4 @44 + glFinish@0 @45 + glFlush@0 @46 + glFramebufferRenderbuffer@16 @47 + glFramebufferTexture2D@20 @48 + glFrontFace@4 @49 + glGenBuffers@8 @50 + glGenFramebuffers@8 @52 + glGenRenderbuffers@8 @53 + glGenTextures@8 @54 + glGenerateMipmap@4 @51 + glGetActiveAttrib@28 @55 + glGetActiveUniform@28 @56 + glGetAttachedShaders@16 @57 + glGetAttribLocation@8 @58 + glGetBooleanv@8 @59 + glGetBufferParameteriv@12 @60 + glGetError@0 @61 + glGetFloatv@8 @62 + glGetFramebufferAttachmentParameteriv@16 @63 + glGetIntegerv@8 @64 + glGetProgramInfoLog@16 @66 + glGetProgramiv@12 @65 + glGetRenderbufferParameteriv@12 @67 + glGetShaderInfoLog@16 @69 + glGetShaderPrecisionFormat@16 @70 + glGetShaderSource@16 @71 + glGetShaderiv@12 @68 + glGetString@4 @72 + glGetTexParameterfv@12 @73 + glGetTexParameteriv@12 @74 + glGetUniformLocation@8 @77 + glGetUniformfv@12 @75 + glGetUniformiv@12 @76 + glGetVertexAttribPointerv@12 @80 + glGetVertexAttribfv@12 @78 + glGetVertexAttribiv@12 @79 + glHint@8 @81 + glIsBuffer@4 @82 + glIsEnabled@4 @83 + glIsFramebuffer@4 @84 + glIsProgram@4 @85 + glIsRenderbuffer@4 @86 + glIsShader@4 @87 + glIsTexture@4 @88 + glLineWidth@4 @89 + glLinkProgram@4 @90 + glPixelStorei@8 @91 + glPolygonOffset@8 @92 + glReadPixels@28 @93 + glReleaseShaderCompiler@0 @94 + glRenderbufferStorage@16 @95 + glSampleCoverage@8 @96 + glScissor@16 @97 + glShaderBinary@20 @98 + glShaderSource@16 @99 + glStencilFunc@12 @100 + glStencilFuncSeparate@16 @101 + glStencilMask@4 @102 + glStencilMaskSeparate@8 @103 + glStencilOp@12 @104 + glStencilOpSeparate@16 @105 + glTexImage2D@36 @106 + glTexParameterf@12 @107 + glTexParameterfv@12 @108 + glTexParameteri@12 @109 + glTexParameteriv@12 @110 + glTexSubImage2D@36 @111 + glUniform1f@8 @112 + glUniform1fv@12 @113 + glUniform1i@8 @114 + glUniform1iv@12 @115 + glUniform2f@12 @116 + glUniform2fv@12 @117 + glUniform2i@12 @118 + glUniform2iv@12 @119 + glUniform3f@16 @120 + glUniform3fv@12 @121 + glUniform3i@16 @122 + glUniform3iv@12 @123 + glUniform4f@20 @124 + glUniform4fv@12 @125 + glUniform4i@20 @126 + glUniform4iv@12 @127 + glUniformMatrix2fv@16 @128 + glUniformMatrix3fv@16 @129 + glUniformMatrix4fv@16 @130 + glUseProgram@4 @131 + glValidateProgram@4 @132 + glVertexAttrib1f@8 @133 + glVertexAttrib1fv@8 @134 + glVertexAttrib2f@12 @135 + glVertexAttrib2fv@8 @136 + glVertexAttrib3f@16 @137 + glVertexAttrib3fv@8 @138 + glVertexAttrib4f@20 @139 + glVertexAttrib4fv@8 @140 + glVertexAttribPointer@24 @141 + glViewport@16 @142 + + ; Extensions + glTexImage3DOES@40 @143 + glBlitFramebufferANGLE@40 @149 + glRenderbufferStorageMultisampleANGLE@20 @150 + glDeleteFencesNV@8 @151 + glFinishFenceNV@4 @152 + glGenFencesNV@8 @153 + glGetFenceivNV@12 @154 + glIsFenceNV@4 @155 + glSetFenceNV@8 @156 + glTestFenceNV@4 @157 + glGetTranslatedShaderSourceANGLE@16 @159 + glTexStorage2DEXT@20 @160 + glGetGraphicsResetStatusEXT@0 @161 + glReadnPixelsEXT@32 @162 + glGetnUniformfvEXT@16 @163 + glGetnUniformivEXT@16 @164 + glGenQueriesEXT@8 @165 + glDeleteQueriesEXT@8 @166 + glIsQueryEXT@4 @167 + glBeginQueryEXT@8 @168 + glEndQueryEXT@4 @169 + glGetQueryivEXT@12 @170 + glGetQueryObjectuivEXT@12 @171 + glVertexAttribDivisorANGLE@8 @172 + glDrawArraysInstancedANGLE@16 @173 + glDrawElementsInstancedANGLE@20 @174 + glProgramBinaryOES@16 @175 + glGetProgramBinaryOES@20 @176 + glDrawBuffersEXT@8 @179 + glMapBufferOES@8 @285 + glUnmapBufferOES@4 @286 + glGetBufferPointervOES@12 @287 + glMapBufferRangeEXT@16 @288 + glFlushMappedBufferRangeEXT@12 @289 + + ; GLES 3.0 Functions + glReadBuffer@4 @180 + glDrawRangeElements@24 @181 + glTexImage3D@40 @182 + glTexSubImage3D@44 @183 + glCopyTexSubImage3D@36 @184 + glCompressedTexImage3D@36 @185 + glCompressedTexSubImage3D@44 @186 + glGenQueries@8 @187 + glDeleteQueries@8 @188 + glIsQuery@4 @189 + glBeginQuery@8 @190 + glEndQuery@4 @191 + glGetQueryiv@12 @192 + glGetQueryObjectuiv@12 @193 + glUnmapBuffer@4 @194 + glGetBufferPointerv@12 @195 + glDrawBuffers@8 @196 + glUniformMatrix2x3fv@16 @197 + glUniformMatrix3x2fv@16 @198 + glUniformMatrix2x4fv@16 @199 + glUniformMatrix4x2fv@16 @200 + glUniformMatrix3x4fv@16 @201 + glUniformMatrix4x3fv@16 @202 + glBlitFramebuffer@40 @203 + glRenderbufferStorageMultisample@20 @204 + glFramebufferTextureLayer@20 @205 + glMapBufferRange@16 @206 + glFlushMappedBufferRange@12 @207 + glBindVertexArray@4 @208 + glDeleteVertexArrays@8 @209 + glGenVertexArrays@8 @210 + glIsVertexArray@4 @211 + glGetIntegeri_v@12 @212 + glBeginTransformFeedback@4 @213 + glEndTransformFeedback@0 @214 + glBindBufferRange@20 @215 + glBindBufferBase@12 @216 + glTransformFeedbackVaryings@16 @217 + glGetTransformFeedbackVarying@28 @218 + glVertexAttribIPointer@20 @219 + glGetVertexAttribIiv@12 @220 + glGetVertexAttribIuiv@12 @221 + glVertexAttribI4i@20 @222 + glVertexAttribI4ui@20 @223 + glVertexAttribI4iv@8 @224 + glVertexAttribI4uiv@8 @225 + glGetUniformuiv@12 @226 + glGetFragDataLocation@8 @227 + glUniform1ui@8 @228 + glUniform2ui@12 @229 + glUniform3ui@16 @230 + glUniform4ui@20 @231 + glUniform1uiv@12 @232 + glUniform2uiv@12 @233 + glUniform3uiv@12 @234 + glUniform4uiv@12 @235 + glClearBufferiv@12 @236 + glClearBufferuiv@12 @237 + glClearBufferfv@12 @238 + glClearBufferfi@16 @239 + glGetStringi@8 @240 + glCopyBufferSubData@20 @241 + glGetUniformIndices@16 @242 + glGetActiveUniformsiv@20 @243 + glGetUniformBlockIndex@8 @244 + glGetActiveUniformBlockiv@16 @245 + glGetActiveUniformBlockName@20 @246 + glUniformBlockBinding@12 @247 + glDrawArraysInstanced@16 @248 + glDrawElementsInstanced@20 @249 + glFenceSync@8 @250 + glIsSync@4 @251 + glDeleteSync@4 @252 + glClientWaitSync@16 @253 + glWaitSync@16 @254 + glGetInteger64v@8 @255 + glGetSynciv@20 @256 + glGetInteger64i_v@12 @257 + glGetBufferParameteri64v@12 @258 + glGenSamplers@8 @259 + glDeleteSamplers@8 @260 + glIsSampler@4 @261 + glBindSampler@8 @262 + glSamplerParameteri@12 @263 + glSamplerParameteriv@12 @264 + glSamplerParameterf@12 @265 + glSamplerParameterfv@12 @266 + glGetSamplerParameteriv@12 @267 + glGetSamplerParameterfv@12 @268 + glVertexAttribDivisor@8 @269 + glBindTransformFeedback@8 @270 + glDeleteTransformFeedbacks@8 @271 + glGenTransformFeedbacks@8 @272 + glIsTransformFeedback@4 @273 + glPauseTransformFeedback@0 @274 + glResumeTransformFeedback@0 @275 + glGetProgramBinary@20 @276 + glProgramBinary@16 @277 + glProgramParameteri@12 @278 + glInvalidateFramebuffer@12 @279 + glInvalidateSubFramebuffer@28 @280 + glTexStorage2D@20 @281 + glTexStorage3D@24 @282 + glGetInternalformativ@20 @283 + + ; Setting up TRACE macro callbacks + SetTraceFunctionPointers @284 + + ; ANGLE Platform Implementation + ANGLEPlatformCurrent @290 + ANGLEPlatformInitialize @291 + ANGLEPlatformShutdown @292 + + ; EGL dependencies + glCreateContext @144 NONAME + glDestroyContext @145 NONAME + glMakeCurrent @146 NONAME + glGetCurrentContext @147 NONAME + glGetProcAddress@4 @148 NONAME + glBindTexImage@4 @158 NONAME + glCreateRenderer @177 NONAME + glDestroyRenderer @178 NONAME diff --git a/mingw-w64-ansicon-git/0001-Do-not-invoke-cmd-in-makefile.patch b/mingw-w64-ansicon-git/0001-Do-not-invoke-cmd-in-makefile.patch new file mode 100644 index 0000000000..c0fe83b85c --- /dev/null +++ b/mingw-w64-ansicon-git/0001-Do-not-invoke-cmd-in-makefile.patch @@ -0,0 +1,42 @@ +From ba0444146c35848917101b28f3463cd0df08a02d Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Tue, 10 Mar 2015 00:22:35 +0100 +Subject: [PATCH] Do not invoke cmd in makefile + +--- + makefile.gcc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/makefile.gcc b/makefile.gcc +index 7000335..281cbe7 100644 +--- a/makefile.gcc ++++ b/makefile.gcc +@@ -90,7 +90,7 @@ ansicon32: x86 x86/ansicon.exe x86/ANSI32.dll x64 x64/ANSI32.dll + ansicon64: x64 x64/ansicon.exe x64/ANSI64.dll + + x86: +- cmd /c "mkdir x86" ++ mkdir x86 + + x86/ansicon.exe: x86/ansicon.o $(X86OBJS) x86/procrva.o x86/ansiconv.o + $(LDmsg)$(CC) -m32 $+ -s -o $@ $(IVER) +@@ -99,7 +99,7 @@ x86/ANSI32.dll: x86/ANSI.o $(X86OBJS) x86/ansiv.o + $(LDmsg)$(CC) -m32 $+ -s -o $@ -mdll -Wl,-shared,--image-base,0xAC0000 + + x64: +- cmd /c "mkdir x64" ++ mkdir x64 + + x64/ansicon.exe: x64/ansicon.o $(X64OBJS) x64/ansiconv.o + $(LDmsg)$(CC) -m64 $+ -s -o $@ $(IVER) +@@ -121,5 +121,5 @@ x64/util.o: version.h + # Need two commands, because if the directory doesn't exist, it won't delete + # anything at all. + clean: +- -cmd /c "del x86\*.o 2>nul" +- -cmd /c "del x64\*.o 2>nul" ++ rm -f x86\*.o ++ rm -f x64\*.o +-- +2.3.1 + diff --git a/mingw-w64-ansicon-git/PKGBUILD b/mingw-w64-ansicon-git/PKGBUILD new file mode 100644 index 0000000000..4280a0b160 --- /dev/null +++ b/mingw-w64-ansicon-git/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: David Macek + +_realname=ansicon +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=1.70.r65.3acc7a9 +pkgrel=2 +pkgdesc="Process ANSI escape sequences for Windows console programs (mingw-w64)" +arch=('any') +url="http://adoxa.altervista.org/ansicon/" +license=("zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "git") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +source=("git+https://github.com/adoxa/ansicon.git" + "0001-Do-not-invoke-cmd-in-makefile.patch" + "ansicon.bat") +md5sums=('SKIP' + '50d56e1bb2591b895305e0070b96699a' + 'f1d2f1358bf4a2140383a1327b8882ef') + +pkgver() { + cd ${srcdir}/${_realname} + printf "%s.r%s.%s" "$(grep PVERSA version.h | sed -r 's/.*"(.+)".*/\1/')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_realname}" + patch -p1 -i "${srcdir}/0001-Do-not-invoke-cmd-in-makefile.patch" +} + +build() { + local _bit + case ${CARCH} in + x86_64) _bit=64 ;; + i686) _bit=32 ;; + esac + + cd "${srcdir}/${_realname}" + ARCH=${_bit} make -f makefile.gcc +} + +package() { + local _arch _bit + case ${CARCH} in + x86_64) _arch=64; _bit=64 ;; + i686) _arch=86; _bit=32 ;; + esac + + cd "${srcdir}/${_realname}" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" + cp "${srcdir}/ansicon.bat" "${pkgdir}${MINGW_PREFIX}/bin" + cp "x${_arch}/ansicon.exe" "${pkgdir}${MINGW_PREFIX}/bin/ansicon_x${_arch}.exe" + cp "x${_arch}/ansi${_bit}.dll" "${pkgdir}${MINGW_PREFIX}/bin/ansi${_bit}.dll" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + cp readme.* sequences.txt G1.* "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" + cp LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" +} diff --git a/mingw-w64-ansicon-git/ansicon.bat b/mingw-w64-ansicon-git/ansicon.bat new file mode 100644 index 0000000000..b46c40d2cd --- /dev/null +++ b/mingw-w64-ansicon-git/ansicon.bat @@ -0,0 +1,56 @@ +:: +:: Copyright (c) 2012 Martin Ridgers +:: +:: +:: Permission is hereby granted, free of charge, to any person obtaining a copy +:: of this software and associated documentation files (the "Software"), to deal +:: in the Software without restriction, including without limitation the rights +:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +:: copies of the Software, and to permit persons to whom the Software is +:: furnished to do so, subject to the following conditions: +:: +:: The above copyright notice and this permission notice shall be included in +:: all copies or substantial portions of the Software. +:: +:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +:: SOFTWARE. +:: + +@echo off + +:: Pass through to appropriate loader. +:: +if /i "%PROCESSOR_ARCHITECTURE%"=="x86" ( + call :loader_x86 %* +) else if /i "%PROCESSOR_ARCHITECTURE%"=="amd64" ( + call :loader_x64 %* +) + +:end +goto :eof + +:: Helper functions to avoid cmd.exe's issues with brackets. +:loader_x86 +if exist "%~dp0../../mingw32/bin/%~n0_x86.exe" ( + "%~dp0../../mingw32/bin/%~n0_x86.exe" %* + exit /b 0 +) else ( + echo Cannot find "%~dp0../../mingw32/bin/%~n0_x86.exe" >&2 + exit /b 1 +) + +:loader_x64 +if exist "%~dp0../../mingw64/bin/%~n0_x64.exe" ( + "%~dp0../../mingw64/bin/%~n0_x64.exe" %* + exit /b 0 +) else ( + echo Cannot find "%~dp0../../mingw64/bin/%~n0_x64.exe" >&2 + exit /b 1 +) + +exit /b 0 diff --git a/mingw-w64-antiword/0001-Make-antiword.exe-relocatable-on-Windows.patch b/mingw-w64-antiword/0001-Make-antiword.exe-relocatable-on-Windows.patch new file mode 100644 index 0000000000..3a66e4b23c --- /dev/null +++ b/mingw-w64-antiword/0001-Make-antiword.exe-relocatable-on-Windows.patch @@ -0,0 +1,144 @@ +From 80bde3fbfa74a884b71e6900b9b0be79fbbce35b Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Thu, 1 Oct 2015 14:59:12 +0200 +Subject: [PATCH] Make antiword.exe relocatable on Windows + +This change allows antiword to find its resource files relative to the +executable file: it is expected to live in `/bin/antiword.exe` +and the resource files will be found in `/share/antiword/`. + +Signed-off-by: Johannes Schindelin +--- + antiword.h | 1 + + fonts_u.c | 2 +- + misc.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + options.c | 17 +++-------------- + 4 files changed, 68 insertions(+), 15 deletions(-) + +diff --git a/antiword.h b/antiword.h +index 3f4aad5..d24b640 100644 +--- a/antiword.h ++++ b/antiword.h +@@ -454,6 +454,7 @@ extern BOOL bAllZero(const UCHAR *, size_t); + extern BOOL bGetNormalizedCodeset(char *, size_t, BOOL *); + extern const char *szGetDefaultMappingFile(void); + extern time_t tConvertDTTM(ULONG); ++extern FILE *fOpenResource(const char *szFilename, const char *szSuffix); + /* notes.c */ + extern void vDestroyNotesInfoLists(void); + extern void vGetNotesInfo(FILE *, const pps_info_type *, +diff --git a/fonts_u.c b/fonts_u.c +index a99f7d2..280a7f2 100644 +--- a/fonts_u.c ++++ b/fonts_u.c +@@ -78,7 +78,7 @@ pOpenFontTableFile(void) + szGlobalFile = GLOBAL_ANTIWORD_DIR FILE_SEPARATOR FONTNAMES_FILE; + DBG_MSG(szGlobalFile); + +- pFile = fopen(szGlobalFile, "r"); ++ pFile = fOpenResource(FONTNAMES_FILE, "r"); + if (pFile != NULL) { + return pFile; + } +diff --git a/misc.c b/misc.c +index 609a2f0..a9610d0 100644 +--- a/misc.c ++++ b/misc.c +@@ -892,3 +892,66 @@ tConvertDTTM(ULONG ulDTTM) + NO_DBG_MSG(ctime(&tResult)); + return tResult; + } /* end of tConvertDTTM */ ++ ++#ifdef __MINGW64_VERSION_MAJOR ++#define WIN32_LEAN_AND_MEAN ++#include ++#endif ++ ++/* ++ * Opens an Antiword resource file ++ * ++ * returns the handle for the file, or NULL ++ */ ++FILE ++*fOpenResource(const char *szFilename, const char *szSuffix) ++{ ++#ifndef __MINGW64_VERSION_MAJOR ++ static char szPath[PATH_MAX+1]; ++ ++ snprintf(szPath, sizeof(szPath), ++ GLOBAL_ANTIWORD_DIR FILE_SEPARATOR "%s%s", ++ szFilename, szSuffix ? szSuffix : ""); ++#else ++ static char szPath[32768]; ++ static size_t tPrefixLen = (size_t)-1; ++ ++ if (tPrefixLen == (size_t)-1) { ++ tPrefixLen = (size_t) ++ GetModuleFileName(NULL, szPath, sizeof(szPath)); ++ if (tPrefixLen && tPrefixLen < sizeof(szPath)) { ++ const char *dir = GLOBAL_ANTIWORD_DIR; ++ ++ /* Strip suffix `antiword.exe` */ ++ while (tPrefixLen > 0 && szPath[tPrefixLen-1] != '\\') { ++ tPrefixLen--; ++ } ++ /* Strip `bin/` directory */ ++ if (tPrefixLen > 5 && !memcmp(szPath+(tPrefixLen-5), ++ "\\bin\\",5)) { ++ tPrefixLen -= 4; ++ } ++ /* Append GLOBAL_ANTIWORD_DIR, skipping /usr/ or / */ ++ if (*dir && *dir == '/') { ++ dir++; ++ if (!memcmp(dir, "usr/", 4)) ++ dir += 4; ++ } ++ while (*dir && tPrefixLen < sizeof(szPath)-1) { ++ char c = *(dir++); ++ szPath[tPrefixLen++] = c == '/' ? '\\' : c; ++ } ++ /* Make sure the prefix ends in a file separator */ ++ if (tPrefixLen && tPrefixLen < sizeof(szPath)-1 && ++ szPath[tPrefixLen-1] != '\\') { ++ szPath[tPrefixLen++] = '\\'; ++ } ++ szPath[tPrefixLen]='\0'; ++ } ++ } ++ ++ snprintf(szPath + tPrefixLen, sizeof(szPath) - tPrefixLen, ++ "%s%s", szFilename, szSuffix ? szSuffix : ""); ++#endif ++ return fopen(szPath, "r"); ++} /* end of fOpenResource */ +diff --git a/options.c b/options.c +index 8379fef..dd6ced9 100644 +--- a/options.c ++++ b/options.c +@@ -236,20 +236,9 @@ pOpenCharacterMappingFile(const char *szLeafname) + } + + /* Try the global version of the mapping file */ +- if (tFilenameLen < +- sizeof(szMappingFile) - +- sizeof(GLOBAL_ANTIWORD_DIR) - +- sizeof(FILE_SEPARATOR)) { +- sprintf(szMappingFile, +- GLOBAL_ANTIWORD_DIR FILE_SEPARATOR "%s%s", +- szLeafname, szSuffix); +- DBG_MSG(szMappingFile); +- pFile = fopen(szMappingFile, "r"); +- if (pFile != NULL) { +- return pFile; +- } +- } else { +- werr(0, "Global mappingfilename too long, ignored"); ++ pFile = fOpenResource(szLeafname, szSuffix); ++ if (pFile != NULL) { ++ return pFile; + } + werr(0, "I can't open your mapping file (%s%s)\n" + "It is not in '%s" FILE_SEPARATOR ANTIWORD_DIR "' nor in '" +-- +2.5.3.windows.1 + diff --git a/mingw-w64-antiword/PKGBUILD b/mingw-w64-antiword/PKGBUILD new file mode 100644 index 0000000000..eb745d6848 --- /dev/null +++ b/mingw-w64-antiword/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Matthias Aßhauer + +_realname=antiword +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.37 +pkgrel=2 +pkgdesc="Convert MS Word 2.0-2003 documents to plain text or PostScript (mingw-w64)" +arch=('any') +license=('GPL3+') +url="http://www.winfield.demon.nl/" +options=('strip') +source=("http://www.winfield.demon.nl/linux/${_realname}-${pkgver}.tar.gz" + "0001-Make-antiword.exe-relocatable-on-Windows.patch") +md5sums=('f868e2a269edcbc06bf77e89a55898d1' + 'db9a6ceb7df5b16bcfe00fe856205d86') +provides=("${_realname}") +noextract=("${_realname}-${pkgver}.tar.gz") + +prepare(){ + tar xzf "${_realname}-${pkgver}.tar.gz" || tar xzf "${_realname}-${pkgver}.tar.gz" + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}/0001-Make-antiword.exe-relocatable-on-Windows.patch" +} + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + make -f Makefile.Linux clean + make -f Makefile.Linux ${_realname} +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" + install -D -m755 ${_realname}.exe ${pkgdir}${MINGW_PREFIX}/bin/${_realname}.exe + install -D -m755 Resources/8859-1.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-1.txt + install -D -m755 Resources/8859-2.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-2.txt + install -D -m755 Resources/8859-3.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-3.txt + install -D -m755 Resources/8859-4.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-4.txt + install -D -m755 Resources/8859-5.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-5.txt + install -D -m755 Resources/8859-6.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-6.txt + install -D -m755 Resources/8859-7.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-7.txt + install -D -m755 Resources/8859-8.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-8.txt + install -D -m755 Resources/8859-9.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-9.txt + install -D -m755 Resources/8859-10.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-10.txt + install -D -m755 Resources/8859-11.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-11.txt + install -D -m755 Resources/8859-13.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-13.txt + install -D -m755 Resources/8859-14.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-14.txt + install -D -m755 Resources/8859-15.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-15.txt + install -D -m755 Resources/8859-16.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/8859-16.txt + install -D -m755 Resources/cp437.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp437.txt + install -D -m755 Resources/cp850.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp850.txt + install -D -m755 Resources/cp852.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp852.txt + install -D -m755 Resources/cp862.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp862.txt + install -D -m755 Resources/cp864.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp864.txt + install -D -m755 Resources/cp866.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp866.txt + install -D -m755 Resources/cp1250.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp1250.txt + install -D -m755 Resources/cp1251.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp1251.txt + install -D -m755 Resources/cp1252.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/cp1252.txt + install -D -m755 Resources/koi8-r.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/koi8-r.txt + install -D -m755 Resources/koi8-u.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/koi8-u.txt + install -D -m755 Resources/MacCyrillic.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/MacCyrillic.txt + install -D -m755 Resources/MacRoman.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/MacRoman.txt + install -D -m755 Resources/roman.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/roman.txt + install -D -m755 Resources/UTF-8.txt ${pkgdir}${MINGW_PREFIX}/share/${_realname}/UTF-8.txt + install -D -m755 Resources/fontnames ${pkgdir}${MINGW_PREFIX}/share/${_realname}/fontnames +} diff --git a/mingw-w64-apr-util/PKGBUILD b/mingw-w64-apr-util/PKGBUILD new file mode 100644 index 0000000000..dbdab3f7c4 --- /dev/null +++ b/mingw-w64-apr-util/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Alexey Pavlov + +_realname=apr-util +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.5.4 +pkgrel=2 +pkgdesc="The Apache Portable Runtime (mingw-w64)" +arch=('any') +url="http://apr.apache.org/" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libtool") +depends=("${MINGW_PACKAGE_PREFIX}-apr" + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-sqlite3") +options=('!libtool') +license=('APACHE') +source=(http://www.apache.org/dist/apr/${_realname}-${pkgver}.tar.bz2{,.asc} + plugins.patch) +md5sums=('2202b18f269ad606d70e1864857ed93c' + 'SKIP' + '9db9f3c4b14749988e9133aaa0658fcd') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/plugins.patch + #./buildconf --with-apr=${MINGW_PREFIX} + autoreconf -fi +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --with-apr=${MINGW_PREFIX} \ + --with-expat=${MINGW_PREFIX} \ + --without-gdbm \ + --without-ldap \ + --without-pgsql \ + --with-sqlite3=${MINGW_PREFIX} + + make -j1 +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-apr-util/plugins.patch b/mingw-w64-apr-util/plugins.patch new file mode 100644 index 0000000000..8024bf79ce --- /dev/null +++ b/mingw-w64-apr-util/plugins.patch @@ -0,0 +1,36 @@ + + +From: David Rothenberger + + +--- + Makefile.in | 2 +- + ldap/apr_ldap_stub.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 963fead..c9827de 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -23,7 +23,7 @@ INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + + APU_MODULES = @APU_MODULES@ +-LINK_MODULE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(APRUTIL_LDFLAGS) -release $(APRUTIL_MAJOR_VERSION) -module -rpath $(APU_DSO_LIBDIR) ++LINK_MODULE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(APRUTIL_LDFLAGS) -release $(APRUTIL_MAJOR_VERSION) -module -no-undefined -rpath $(APU_DSO_LIBDIR) @abs_builddir@/lib@APRUTIL_LIBNAME@.la $(APRUTIL_LIBS) + APU_DSO_LIBDIR = @APU_DSO_LIBDIR@ + + LT_VERSION = @APU_LTVERSION@ +diff --git a/ldap/apr_ldap_stub.c b/ldap/apr_ldap_stub.c +index 97c1551..9df76b7 100644 +--- a/ldap/apr_ldap_stub.c ++++ b/ldap/apr_ldap_stub.c +@@ -45,7 +45,7 @@ static apr_status_t load_ldap(apr_pool_t *pool) + return rv; + } + +-#if defined(WIN32) ++#if defined(WIN32) || defined(__CYGWIN__) + modname = "apr_ldap-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll"; + #else + modname = "apr_ldap-" APU_STRINGIFY(APU_MAJOR_VERSION) ".so"; diff --git a/mingw-w64-apr/PKGBUILD b/mingw-w64-apr/PKGBUILD new file mode 100644 index 0000000000..7dc0c6b3c1 --- /dev/null +++ b/mingw-w64-apr/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Drew Waranis + +_realname=apr +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.5.2 +pkgrel=2 +pkgdesc="The Apache Portable Runtime (mingw-w64)" +arch=('any') +url="https://apr.apache.org/" +license=('APACHE') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libtool") +source=(http://www.apache.org/dist/apr/${_realname}-${pkgver}.tar.bz2{,.asc} + 'apr_ssize_t.patch' + 'apr_wtypes.patch') +md5sums=('4e9769f3349fe11fc0a5e1b224c236aa' + 'SKIP' + 'b91081b97f838246446c5795371faf6a' + '0326d335f035f8f13dea4296efb1faab') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + patch -p0 -i ${srcdir}/apr_ssize_t.patch + patch -p0 -i ${srcdir}/apr_wtypes.patch + + ./buildconf + # autoreconf -fi +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + # Disable IPv6. + ../${_realname}-${pkgver}/configure \ + --prefix="${MINGW_PREFIX}" \ + --includedir="${MINGW_PREFIX}/include/apr-1" \ + --with-installbuilddir="${MINGW_PREFIX}/share/apr-1/build" \ + --enable-nonportable-atomics \ + --with-devrandom=/dev/urandom \ + --disable-ipv6 + + make +} + +#check() { +# cd "${srcdir}/build-${MINGW_CHOST}" +# make -j1 check +#} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-apr/apr_ssize_t.patch b/mingw-w64-apr/apr_ssize_t.patch new file mode 100644 index 0000000000..5cb261b909 --- /dev/null +++ b/mingw-w64-apr/apr_ssize_t.patch @@ -0,0 +1,24 @@ +Index: configure.in +=================================================================== +--- configure.in (revision 1161414) ++++ configure.in (working copy) +@@ -1643,6 +1643,9 @@ + elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long"; then + ssize_t_fmt="ld" + AC_MSG_RESULT(%ld) ++elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long_long"; then ++ ssize_t_fmt="lld" ++ AC_MSG_RESULT(%lld) + else + AC_ERROR([could not determine the proper format for apr_ssize_t]) + fi +@@ -1660,6 +1663,9 @@ + elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long"; then + size_t_fmt="ld" + AC_MSG_RESULT(%ld) ++elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long_long"; then ++ size_t_fmt="lld" ++ AC_MSG_RESULT(%lld) + else + AC_ERROR([could not determine the proper format for apr_size_t]) + fi diff --git a/mingw-w64-apr/apr_wtypes.patch b/mingw-w64-apr/apr_wtypes.patch new file mode 100644 index 0000000000..6024b55fd8 --- /dev/null +++ b/mingw-w64-apr/apr_wtypes.patch @@ -0,0 +1,30 @@ +--- include/arch/win32/apr_private.h.orig 2014-07-03 14:34:47 -0500 ++++ include/arch/win32/apr_private.h 2014-07-03 14:35:51 -0500 +@@ -45,13 +45,9 @@ + */ + #ifndef _WIN32_WCE + #define HAVE_ACLAPI 1 +-#ifdef __wtypes_h__ ++#define COM_NO_WINDOWS_H + #include +-#else +-#define __wtypes_h__ +-#include +-#undef __wtypes_h__ +-#endif ++#undef COM_NO_WINDOWS_H + #else + #define HAVE_ACLAPI 0 + #endif +--- file_io/win32/filestat.c.orig 2014-07-03 14:42:41 -0500 ++++ file_io/win32/filestat.c 2014-07-03 14:43:09 -0500 +@@ -15,7 +15,9 @@ + */ + + #include "apr.h" ++#define COM_NO_WINDOWS_H + #include ++#undef COM_NO_WINDOWS_H + #include "apr_private.h" + #include "apr_arch_file_io.h" + #include "apr_file_io.h" diff --git a/mingw-w64-aria2/0001-libintl-vprintf.patch b/mingw-w64-aria2/0001-libintl-vprintf.patch deleted file mode 100644 index 09a0c08956..0000000000 --- a/mingw-w64-aria2/0001-libintl-vprintf.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- src/OutputFile.h.orig 2014-09-11 18:24:10.000000000 +0200 -+++ src/OutputFile.h 2014-10-05 03:19:06.818377800 +0200 -@@ -40,6 +40,9 @@ - #include - #include - -+// include just to cancel libintl's #define vprintf libintl_vprintf -+#include -+ - namespace aria2 { - - class OutputFile { diff --git a/mingw-w64-aria2/PKGBUILD b/mingw-w64-aria2/PKGBUILD index e38867a4c4..6f08c1aae6 100644 --- a/mingw-w64-aria2/PKGBUILD +++ b/mingw-w64-aria2/PKGBUILD @@ -1,50 +1,46 @@ # Maintainer: David Macek _realname=aria2 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.18.8 -pkgrel=2 +pkgver=1.19.2 +pkgrel=1 pkgdesc="A multi-protocol & multi-source, cross platform download utility (mingw-w64)" arch=('any') url="http://aria2.sourceforge.net/" license=('GPL2') -makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gcc") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-c-ares" + "${MINGW_PACKAGE_PREFIX}-cppunit" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-libssh2" + "${MINGW_PACKAGE_PREFIX}-libuv" + "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-gmp" - "${MINGW_PACKAGE_PREFIX}-nettle" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libgcrypt" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-libuv") -optdepends=( - "${MINGW_PACKAGE_PREFIX}-ruby: aria2rpc and aria2mon") -source=("http://sourceforge.net/projects/aria2/files/stable/$_realname-$pkgver/$_realname-$pkgver.tar.xz" - '0001-libintl-vprintf.patch') -md5sums=('3e03b8a6faf36fd76e6ffb58b5d6f6a5' - '67473d1562bce194b78e64f67adff650') + ) +optdepends=("${MINGW_PACKAGE_PREFIX}-ruby: aria2rpc and aria2mon") +source=(${_realname}-${pkgver}.tar.gz::https://github.com/tatsuhiro-t/aria2/archive/release-${pkgver}.tar.gz) +md5sums=('38e18cb9856bc592c5fc8c2dd687bf38') prepare() { - cd "${srcdir}"/${_realname}-${pkgver} - patch -p0 -i "${srcdir}"/0001-libintl-vprintf.patch + cd "${_realname}-release-${pkgver}" + autoreconf -fiv } build() { - mkdir -p "${srcdir}"/build-${CARCH} - cd "${srcdir}"/build-${CARCH} - - # add missing library - export LIBS=-lintl + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} # disabling gnutls and wintls so we will fall back to openssl - ../${_realname}-${pkgver}/configure \ + ../${_realname}-release-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ + --with-bashcompletiondir=${MINGW_PREFIX}/share/bash-completion/completions \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ @@ -52,15 +48,19 @@ build() { --without-gnutls \ --without-wintls \ --enable-libaria2 + make } package() { - cd "${srcdir}"/build-${CARCH} + cd "build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install - cd "${srcdir}"/${_realname}-${pkgver} + + cd "../${_realname}-release-${pkgver}" + install -Dm0755 doc/xmlrpc/aria2rpc "${pkgdir}"${MINGW_PREFIX}/bin/aria2rpc install -Dm0755 doc/xmlrpc/aria2mon "${pkgdir}"${MINGW_PREFIX}/bin/aria2mon echo '@ruby -- "%~dp0aria2rpc" %*' > "${pkgdir}"${MINGW_PREFIX}/bin/aria2rpc.cmd echo '@ruby -- "%~dp0aria2mon" %*' > "${pkgdir}"${MINGW_PREFIX}/bin/aria2mon.cmd + rm ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/xmlrpc/aria2{rpc,mon} } diff --git a/mingw-w64-aribb24/PKGBUILD b/mingw-w64-aribb24/PKGBUILD index e4a0268477..a730279f7d 100644 --- a/mingw-w64-aribb24/PKGBUILD +++ b/mingw-w64-aribb24/PKGBUILD @@ -3,7 +3,7 @@ _realname=aribb24 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.3 -pkgrel=1 +pkgrel=2 pkgdesc="A library for ARIB STD-B24, decoding JIS 8 bit characters and parsing MPEG-TS stream (mingw-w64)" arch=('any') url="https://github.com/nkoriyama/aribb24" @@ -25,16 +25,17 @@ prepare() { build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-arm-none-eabi-newlib/PKGBUILD b/mingw-w64-arm-none-eabi-newlib/PKGBUILD index da1630dd04..dc6476d5f0 100644 --- a/mingw-w64-arm-none-eabi-newlib/PKGBUILD +++ b/mingw-w64-arm-none-eabi-newlib/PKGBUILD @@ -123,7 +123,7 @@ build() { --disable-nls \ CFLAGS="${NEWLIB_CFLAGS}" \ PATH="${armgccpath}:${PATH}" - make PATH="${armgccpath}:${PATH}" + make PATH="${armgccpath}:${PATH}" } package() { diff --git a/mingw-w64-armadillo/0001-mingw-config-fix.patch b/mingw-w64-armadillo/0001-mingw-config-fix.patch new file mode 100644 index 0000000000..1243ef002d --- /dev/null +++ b/mingw-w64-armadillo/0001-mingw-config-fix.patch @@ -0,0 +1,23 @@ +diff -Naur a/include/armadillo_bits/config.hpp.cmake b/include/armadillo_bits/config.hpp.cmake +--- a/include/armadillo_bits/config.hpp.cmake 2015-04-10 11:54:47.000000000 +0600 ++++ b/include/armadillo_bits/config.hpp.cmake 2015-05-17 14:14:07.119929900 +0600 +@@ -6,7 +6,18 @@ + // License, v. 2.0. If a copy of the MPL was not distributed with this + // file, You can obtain one at http://mozilla.org/MPL/2.0/. + +- ++#if defined(_WIN64) ++ #if !defined(ARMA_BLAS_LONG) && !defined(ARMA_BLAS_LONG_LONG) ++ #define ARMA_BLAS_LONG_LONG ++ #endif ++ #if !defined(ARMA_64BIT_WORD) ++ #define ARMA_64BIT_WORD ++ #endif ++#elif defined(_WIN32) ++ #if !defined(ARMA_32BIT_WORD) ++ #define ARMA_32BIT_WORD ++ #endif ++#endif + + #if !defined(ARMA_USE_LAPACK) + #cmakedefine ARMA_USE_LAPACK diff --git a/mingw-w64-armadillo/PKGBUILD b/mingw-w64-armadillo/PKGBUILD new file mode 100644 index 0000000000..01dc2120e3 --- /dev/null +++ b/mingw-w64-armadillo/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Hurcan Solter + +_realname=armadillo +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=6.200.4 +pkgrel=1 +pkgdesc="C++ linear algebra library (mingw-w64)" +arch=('any') +url="http://arma.sourceforge.net/" +license=(MPL2) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-openblas") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake") +install=${_realname}-${CARCH}.install +source=(http://sourceforge.net/projects/arma/files/${_realname}-${pkgver}.tar.gz + 0001-mingw-config-fix.patch) +md5sums=('20c9de6ad06b4339a7fd3f67d78922e4' + '5ce663ba53e15ee85fcd7a0b01006672') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -Np1 -i "${srcdir}/0001-mingw-config-fix.patch" +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DLAPACK_NAMES=openblas \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + #local _INSTALL_PREFIX_WIN="$(cygpath -am "${pkgdir}${MINGW_PREFIX}")" + #local _MINGW_PREFIX_WIN="$(cygpath -am "${MINGW_PREFIX}")" + + #sed -s -e "s|${_INSTALL_PREFIX_WIN}|${MINGW_PREFIX}|g" \ + # -e "s|${_MINGW_PREFIX_WIN}|${MINGW_PREFIX}|g" -i "${pkgdir}${MINGW_PREFIX}/share/Armadillo/CMake/"*.cmake + + install -d ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname} + install -m644 "${srcdir}/${_realname}-${pkgver}/"*{.html,.png,.pdf,README.txt} \ + "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.txt" +} diff --git a/mingw-w64-armadillo/armadillo-i686.install b/mingw-w64-armadillo/armadillo-i686.install new file mode 100644 index 0000000000..5d8ea57482 --- /dev/null +++ b/mingw-w64-armadillo/armadillo-i686.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/mingw32" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/Armadillo/CMake/"*.cmake +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-armadillo/armadillo-x86_64.install b/mingw-w64-armadillo/armadillo-x86_64.install new file mode 100644 index 0000000000..d91d264725 --- /dev/null +++ b/mingw-w64-armadillo/armadillo-x86_64.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/mingw64" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/Armadillo/CMake/"*.cmake +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-arpack/PKGBUILD b/mingw-w64-arpack/PKGBUILD new file mode 100644 index 0000000000..92304d5676 --- /dev/null +++ b/mingw-w64-arpack/PKGBUILD @@ -0,0 +1,42 @@ +# $Id$ +# Maintainer (ArchLinux): Alexander Rødseth +# Contributor (ArchLinux): William Rea +# Contributor (ArchLinux): Stefan Husmann +# Maintainer (MSYS2): Ray Donnelly + +_realname=arpack +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.2.0 +pkgrel=1 +arch=('any') +pkgdesc='Fortran77 subroutines designed to solve large scale eigenvalue problems (mingw-w64)' +url='http://forge.scilab.org/index.php/p/arpack-ng/' +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-openblas") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-fortran") +provides=("${MINGW_PACKAGE_PREFIX}-arpack-ng") +source=(#"http://forge.scilab.org/upload/$_realname-ng/files/$_realname-ng_${pkgver}.tar.gz" + ${_realname}-${pkgver}.tar.gz::https://github.com/opencollab/arpack-ng/archive/${pkgver}.tar.gz) +sha256sums=('ce6de85d8de6ae3a741fb9d6169c194ff1b2ffdab289f7af8e41d71bb7818cbb') + +build() { + [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + mkdir "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + ../${_realname}-ng-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --with-blas=openblas \ + --disable-mpi + + make F77="gfortran" +} + +package() { + cd "${srcdir}"/build-${CARCH} + + make DESTDIR="${pkgdir}"/ install + install -Dm644 ${srcdir}/${_realname}-ng-${pkgver}/COPYING \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING +} + +# vim:set ts=2 sw=2 et: diff --git a/mingw-w64-aspell-de/001-unixy-dirs.patch b/mingw-w64-aspell-de/001-unixy-dirs.patch new file mode 100644 index 0000000000..c37d462182 --- /dev/null +++ b/mingw-w64-aspell-de/001-unixy-dirs.patch @@ -0,0 +1,15 @@ +--- aspell6-de-20030222-1/configure.orig 2015-08-21 17:45:17.008196500 +0200 ++++ aspell6-de-20030222-1/configure 2015-08-21 17:46:06.620617000 +0200 +@@ -73,10 +73,12 @@ if test x = "x$PREZIP" + + echo $ECHO_N "Finding Dictionary file location ... $ECHO_C" + dictdir=`$ASPELL dump config dict-dir` ++dictdir=`cygpath -u $dictdir` + echo $dictdir + + echo $ECHO_N "Finding Data file location ... $ECHO_C" + datadir=`$ASPELL dump config data-dir` ++datadir=`cygpath -u $datadir` + echo $datadir + + echo "ASPELL = `which $ASPELL`" > Makefile diff --git a/mingw-w64-aspell-de/PKGBUILD b/mingw-w64-aspell-de/PKGBUILD new file mode 100644 index 0000000000..cf52d3f9c9 --- /dev/null +++ b/mingw-w64-aspell-de/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexey Pavlov + +_realname=aspell-de +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=20030222 +pkgrel=1 +pkgdesc="German dictionary for aspell (mingw-w64)" +arch=('any') +url="http://aspell.net/" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-aspell") +source=(ftp://ftp.gnu.org/gnu/aspell/dict/de/aspell6-de-${pkgver}-1.tar.bz2 + 001-unixy-dirs.patch) +md5sums=('5950c5c8a36fc93d4d7616591bace6a6' + '71e32e4d2c2eeb14f3f358bb13dab1e1') +sha1sums=('a06b1153404f6d1f9bd8aa03d596c14093e561c7' + 'ffdb6ab423aa5772a411ec7c997d2472f72e8448') + +prepare() { + cd "${srcdir}/aspell6-de-${pkgver}-1" + patch -p1 -i ${srcdir}/001-unixy-dirs.patch +} + +build() { + cd "${srcdir}/aspell6-de-${pkgver}-1" + ./configure + sed -i 's/C\:\\msys64\\/\//' Makefile + make +} + +package() { + cd "${srcdir}/aspell6-de-${pkgver}-1" + make DESTDIR="${pkgdir}" install + + install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-aspell-en/001-unixy-dirs.patch b/mingw-w64-aspell-en/001-unixy-dirs.patch new file mode 100644 index 0000000000..7aca3e04db --- /dev/null +++ b/mingw-w64-aspell-en/001-unixy-dirs.patch @@ -0,0 +1,15 @@ +--- aspell6-en-7.1-0/configure.orig 2015-07-27 12:03:47.683663100 +0300 ++++ aspell6-en-7.1-0/configure 2015-07-27 12:05:05.653865300 +0300 +@@ -73,10 +73,12 @@ + + echo $ECHO_N "Finding Dictionary file location ... $ECHO_C" + dictdir=`$ASPELL dump config dict-dir` ++dictdir=`cygpath -u $dictdir` + echo $dictdir + + echo $ECHO_N "Finding Data file location ... $ECHO_C" + datadir=`$ASPELL dump config data-dir` ++datadir=`cygpath -u $datadir` + echo $datadir + + echo "ASPELL = `which $ASPELL`" > Makefile diff --git a/mingw-w64-aspell-en/PKGBUILD b/mingw-w64-aspell-en/PKGBUILD new file mode 100644 index 0000000000..5700043fea --- /dev/null +++ b/mingw-w64-aspell-en/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexey Pavlov + +_realname=aspell-en +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=7.1 +pkgrel=1 +pkgdesc="English dictionary for aspell (mingw-w64)" +arch=('any') +url="http://aspell.net/" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-aspell") +source=(ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-${pkgver}-0.tar.bz2 + 001-unixy-dirs.patch) +md5sums=('beba5e8f3afd3ed1644653bb685b2dfb' + '59759a5f0047312a49f5817a83a8a2f9') +sha1sums=('d45ccda0c03e2a679c2936487ec851a1896b8150' + 'a624663ef98117b62f45cab4ade44cce3105ef4d') + +prepare() { + cd "${srcdir}/aspell6-en-${pkgver}-0" + patch -p1 -i ${srcdir}/001-unixy-dirs.patch +} + +build() { + cd "${srcdir}/aspell6-en-${pkgver}-0" + ./configure + sed -i 's/C\:\\msys64\\/\//' Makefile + make +} + +package() { + cd "${srcdir}/aspell6-en-${pkgver}-0" + make DESTDIR="${pkgdir}" install + + install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-aspell-es/001-unixy-dirs.patch b/mingw-w64-aspell-es/001-unixy-dirs.patch new file mode 100644 index 0000000000..7aca3e04db --- /dev/null +++ b/mingw-w64-aspell-es/001-unixy-dirs.patch @@ -0,0 +1,15 @@ +--- aspell6-en-7.1-0/configure.orig 2015-07-27 12:03:47.683663100 +0300 ++++ aspell6-en-7.1-0/configure 2015-07-27 12:05:05.653865300 +0300 +@@ -73,10 +73,12 @@ + + echo $ECHO_N "Finding Dictionary file location ... $ECHO_C" + dictdir=`$ASPELL dump config dict-dir` ++dictdir=`cygpath -u $dictdir` + echo $dictdir + + echo $ECHO_N "Finding Data file location ... $ECHO_C" + datadir=`$ASPELL dump config data-dir` ++datadir=`cygpath -u $datadir` + echo $datadir + + echo "ASPELL = `which $ASPELL`" > Makefile diff --git a/mingw-w64-aspell-es/PKGBUILD b/mingw-w64-aspell-es/PKGBUILD new file mode 100644 index 0000000000..833c45db74 --- /dev/null +++ b/mingw-w64-aspell-es/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Oscar Fuentes + +_realname=aspell-es +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +_pkgver=1.11-2 +pkgver=${_pkgver//-/.} +pkgrel=1 +pkgdesc="Spanish dictionary for aspell (mingw-w64)" +arch=('any') +url="http://aspell.net/" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-aspell") +source=(ftp://ftp.gnu.org/gnu/aspell/dict/es/aspell6-es-${_pkgver}.tar.bz2 + 001-unixy-dirs.patch) +md5sums=('8406336a89c64e47e96f4153d0af70c4' + '59759a5f0047312a49f5817a83a8a2f9') +sha1sums=('18acfa4bc08433e920bb015b158e43643e5125cf' + 'a624663ef98117b62f45cab4ade44cce3105ef4d') + +prepare() { + cd "${srcdir}/aspell6-es-${_pkgver}" + patch -p1 -i ${srcdir}/001-unixy-dirs.patch +} + +build() { + cd "${srcdir}/aspell6-es-${_pkgver}" + ./configure + sed -i 's/C\:\\msys64\\/\//' Makefile + make +} + +package() { + cd "${srcdir}/aspell6-es-${_pkgver}" + make DESTDIR="${pkgdir}" install + + install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-aspell-fr/001-unixy-dirs.patch b/mingw-w64-aspell-fr/001-unixy-dirs.patch new file mode 100644 index 0000000000..27817e4aab --- /dev/null +++ b/mingw-w64-aspell-fr/001-unixy-dirs.patch @@ -0,0 +1,15 @@ +--- aspell-fr-0.50-3/configure.orig 2015-08-24 15:25:37.040164200 +0200 ++++ aspell-fr-0.50-3/configure 2015-08-24 15:26:51.598072800 +0200 +@@ -69,10 +69,12 @@ if test x = "x$WORD_LIST_COMPRESS" + + echo $ECHO_N "Finding Dictionary file location ... $ECHO_C" + dictdir=`$ASPELL dump config dict-dir` ++dictdir=`cygpath -u $dictdir` + echo $dictdir + + echo $ECHO_N "Finding Data file location ... $ECHO_C" + datadir=`$ASPELL dump config data-dir` ++datadir=`cygpath -u $datadir` + echo $datadir + + echo "ASPELL = $ASPELL" > Makefile diff --git a/mingw-w64-aspell-fr/PKGBUILD b/mingw-w64-aspell-fr/PKGBUILD new file mode 100644 index 0000000000..275a2d1647 --- /dev/null +++ b/mingw-w64-aspell-fr/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexey Pavlov + +_realname=aspell-fr +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.50 +pkgrel=1 +pkgdesc="French dictionary for aspell (mingw-w64)" +arch=('any') +url="http://aspell.net/" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-aspell") +source=(ftp://ftp.gnu.org/gnu/aspell/dict/fr/aspell-fr-${pkgver}-3.tar.bz2 + 001-unixy-dirs.patch) +md5sums=('53a2d05c4e8f7fabd3cefe24db977be7' + '2bdec16a2dc204a49378609f90fb436f') +sha1sums=('4712f81069eb20763aaf855f73b2819f4805f132' + 'f386c73e7bb57563850e980d723f2711608fd7ea') + +prepare() { + cd "${srcdir}/aspell-fr-${pkgver}-3" + patch -p1 -i ${srcdir}/001-unixy-dirs.patch +} + +build() { + cd "${srcdir}/aspell-fr-${pkgver}-3" + ./configure + sed -i 's/C\:\\msys64\\/\//' Makefile + make +} + +package() { + cd "${srcdir}/aspell-fr-${pkgver}-3" + make DESTDIR="${pkgdir}" install + + install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-aspell-ru/001-unixy-dirs.patch b/mingw-w64-aspell-ru/001-unixy-dirs.patch new file mode 100644 index 0000000000..7aca3e04db --- /dev/null +++ b/mingw-w64-aspell-ru/001-unixy-dirs.patch @@ -0,0 +1,15 @@ +--- aspell6-en-7.1-0/configure.orig 2015-07-27 12:03:47.683663100 +0300 ++++ aspell6-en-7.1-0/configure 2015-07-27 12:05:05.653865300 +0300 +@@ -73,10 +73,12 @@ + + echo $ECHO_N "Finding Dictionary file location ... $ECHO_C" + dictdir=`$ASPELL dump config dict-dir` ++dictdir=`cygpath -u $dictdir` + echo $dictdir + + echo $ECHO_N "Finding Data file location ... $ECHO_C" + datadir=`$ASPELL dump config data-dir` ++datadir=`cygpath -u $datadir` + echo $datadir + + echo "ASPELL = `which $ASPELL`" > Makefile diff --git a/mingw-w64-aspell-ru/PKGBUILD b/mingw-w64-aspell-ru/PKGBUILD new file mode 100644 index 0000000000..bec2a004ed --- /dev/null +++ b/mingw-w64-aspell-ru/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Alexey Pavlov + +_realname=aspell-ru +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +_pkgver=0.99f7-1 +pkgver=${_pkgver//-/.} +pkgrel=1 +pkgdesc="Russian dictionary for aspell (mingw-w64)" +arch=('any') +url="http://aspell.net/" +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-aspell") +source=(ftp://ftp.gnu.org/gnu/aspell/dict/ru/aspell6-ru-${_pkgver}.tar.bz2 + 001-unixy-dirs.patch) +md5sums=('c4c98eaa5e77ad3adccbc5c96cb57cb3' + '59759a5f0047312a49f5817a83a8a2f9') +sha1sums=('e012fa03645f4ff1f5ba9df6b215ea4ffc6fd9cf' + 'a624663ef98117b62f45cab4ade44cce3105ef4d') + +prepare() { + cd "${srcdir}/aspell6-ru-${_pkgver}" + patch -p1 -i ${srcdir}/001-unixy-dirs.patch +} + +build() { + cd "${srcdir}/aspell6-ru-${_pkgver}" + ./configure + sed -i 's/C\:\\msys64\\/\//' Makefile + make +} + +package() { + cd "${srcdir}/aspell6-ru-${_pkgver}" + make DESTDIR="${pkgdir}" install + + install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-aspell/0001-use-namespace.mingw.patch b/mingw-w64-aspell/0001-use-namespace.mingw.patch new file mode 100644 index 0000000000..bb1f411d64 --- /dev/null +++ b/mingw-w64-aspell/0001-use-namespace.mingw.patch @@ -0,0 +1,18 @@ +--- aspell-0.60.7-20110707/common/file_util.cpp.orig 2004-11-15 12:29:53.000000000 +0000 ++++ aspell-0.60.7-20110707/common/file_util.cpp 2014-02-19 11:11:58.100765300 +0000 +@@ -30,6 +30,7 @@ + # define ACCESS _access + # include + # include ++# include "asc_ctype.hpp" + + #else + +@@ -38,6 +39,7 @@ + + #endif + ++using namespace acommon; + + namespace acommon { + diff --git a/mingw-w64-aspell/0002-printf.mingw.patch b/mingw-w64-aspell/0002-printf.mingw.patch new file mode 100644 index 0000000000..3b808a2983 --- /dev/null +++ b/mingw-w64-aspell/0002-printf.mingw.patch @@ -0,0 +1,36 @@ +--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-02-19 11:24:42.255300600 +0000 ++++ aspell-0.60.7-20110707/common/config.cpp 2014-02-19 11:23:47.492846700 +0000 +@@ -39,6 +39,9 @@ + #include "vararray.hpp" + #include "string_list.hpp" + ++#define printf printf ++#include "libintl.h" ++#undef printf + #include "gettext.h" + + #include "iostream.hpp" +--- aspell-0.60.7-20110707/modules/speller/default/language.cpp.orig 2011-07-05 00:28:44.000000000 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/language.cpp 2014-02-19 11:25:32.094629400 +0000 +@@ -24,6 +24,9 @@ + # include + #endif + ++#define printf printf ++#include "libintl.h" ++#undef printf + #include "gettext.h" + + namespace aspeller { +--- aspell-0.60.7-20110707/prog/aspell.cpp.orig 2011-07-04 14:36:05.000000000 +0000 ++++ aspell-0.60.7-20110707/prog/aspell.cpp 2014-02-19 11:26:37.049377600 +0000 +@@ -59,6 +59,9 @@ + #include "hash-t.hpp" + #include "hash_fun.hpp" + ++#define printf printf ++#include "libintl.h" ++#undef printf + #include "gettext.h" + + using namespace acommon; diff --git a/mingw-w64-aspell/0003-no-undefined-on.mingw.patch b/mingw-w64-aspell/0003-no-undefined-on.mingw.patch new file mode 100644 index 0000000000..80c7960051 --- /dev/null +++ b/mingw-w64-aspell/0003-no-undefined-on.mingw.patch @@ -0,0 +1,11 @@ +--- aspell-0.60.7-20110707/Makefile.am.orig 2011-07-07 01:01:39.000000000 +0000 ++++ aspell-0.60.7-20110707/Makefile.am 2014-02-19 11:56:42.396127500 +0000 +@@ -203,7 +203,7 @@ + else # not COMPILE_IN_FILTERS + + dynamic_optfiles += ${optfiles} +-filter_ldflags = -module -avoid-version ++filter_ldflags = -module -avoid-version -no-undefined + + ### Add name of filter library containing your filter. Name always + ### must look like lib-filter.la see development manual diff --git a/mingw-w64-aspell/0004-reloc.mingw.patch b/mingw-w64-aspell/0004-reloc.mingw.patch new file mode 100644 index 0000000000..706f2b0223 --- /dev/null +++ b/mingw-w64-aspell/0004-reloc.mingw.patch @@ -0,0 +1,123 @@ +--- aspell-0.60.7-20110707/common/info.cpp.orig 2004-11-10 06:18:45.000000000 +0000 ++++ aspell-0.60.7-20110707/common/info.cpp 2014-03-20 14:46:13.395537900 +0000 +@@ -39,6 +39,19 @@ + + #include "gettext.h" + ++#ifdef ENABLE_W32_PREFIX ++extern "C" { ++static HINSTANCE dll_hinstance; ++ ++BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ++{ ++ if (fdwReason == DLL_PROCESS_ATTACH) ++ dll_hinstance = hinstDLL; ++ return TRUE; ++} ++} ++#endif ++ + namespace acommon { + + class Dir { +@@ -778,4 +789,60 @@ + return data; + } + ++#ifdef ENABLE_W32_PREFIX ++ ++const char * ++get_w32_prefix () ++{ ++ ++ static char *wprefix = NULL; ++ ++/* ++ Entry * next; ++ String key; ++ String value; ++ String file; ++*/ ++ if (wprefix == NULL) ++ { ++ DWORD bsize = MAX_PATH; ++ DWORD l = bsize; ++ char *bslash, *slash; ++ char *buf = (char *) malloc (bsize); ++ while (l == bsize) ++ { ++ l = GetModuleFileNameA (dll_hinstance, buf, bsize); ++ if (l == 0) ++ { ++ DebugBreak (); ++ abort (); ++ } ++ if (l == bsize) ++ { ++ buf = (char *) realloc ((void *) buf, bsize * 2); ++ bsize *= 2; ++ l = bsize; ++ } ++ } ++ bslash = strrchr (buf, '\\'); ++ slash = strrchr (buf, '/'); ++ if (bslash > slash) ++ slash = bslash; ++ slash[0] = '\0'; ++ l = strlen (buf); ++ if (l > 3 && strcmp (&buf[l - 3], "bin") == 0) ++ { ++ bslash = strrchr (buf, '\\'); ++ slash = strrchr (buf, '/'); ++ if (bslash > slash) ++ slash = bslash; ++ slash[0] = '\0'; ++ } ++ wprefix = buf; ++ ++ } ++ return wprefix; ++} ++#endif ++ + } +--- aspell-0.60.7-20110707/common/info.hpp.orig 2004-05-30 10:49:17.000000000 +0000 ++++ aspell-0.60.7-20110707/common/info.hpp 2014-03-20 14:45:24.476325900 +0000 +@@ -140,8 +140,7 @@ + }; + + +- +- ++ const char * get_w32_prefix (); + } + + #endif /* ASPELL_INFO__HPP */ +--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 13:52:58.851882300 +0000 ++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 14:17:49.116621900 +0000 +@@ -310,6 +310,14 @@ + const Entry * res = 0; + const Entry * cur = first_; + ++#ifdef ENABLE_W32_PREFIX ++ if (key == "prefix") ++ { ++ Entry *e = new Config::Entry(); ++ e->value = get_w32_prefix (); ++ return e; ++ } ++#endif + while (cur) { + if (cur->key == key && cur->action != NoOp) res = cur; + cur = cur->next; +--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 15:11:29.935614000 +0000 ++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 15:22:47.619168900 +0000 +@@ -22,6 +22,8 @@ + # include + #endif + ++#include "info.hpp" ++#include + #include "cache.hpp" + #include "asc_ctype.hpp" + #include "config.hpp" diff --git a/mingw-w64-aspell/0005-w32-home.all.patch b/mingw-w64-aspell/0005-w32-home.all.patch new file mode 100644 index 0000000000..588997f63c --- /dev/null +++ b/mingw-w64-aspell/0005-w32-home.all.patch @@ -0,0 +1,24 @@ +--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 19:51:08.756753700 +0000 ++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 20:15:54.984480600 +0000 +@@ -664,6 +664,21 @@ + } else { // sep == '|' + assert(replace[0] == '$'); + const char * env = getenv(replace.c_str()+1); ++ if (NULL == env && strcmp (replace.c_str() + 1, "HOME") == 0) ++ { ++ const char *hd, *hp; ++ hd = getenv("HOMEDRIVE"); ++ hp = getenv("HOMEPATH"); ++ if (hd && hp) ++ { ++ char tmpbuf[strlen ("HOME=") + strlen (hd) + strlen (hp) + 1]; ++ strcpy (tmpbuf, "HOME="); ++ strcpy (&tmpbuf[strlen ("HOME=")], hd); ++ strcpy (&tmpbuf[strlen ("HOME=") + strlen (hd)], hp); ++ putenv (tmpbuf); ++ env = getenv(replace.c_str()+1); ++ } ++ } + final_str += env ? env : second; + } + replace = ""; diff --git a/mingw-w64-aspell/0006-abort.mingw.patch b/mingw-w64-aspell/0006-abort.mingw.patch new file mode 100644 index 0000000000..26c4722729 --- /dev/null +++ b/mingw-w64-aspell/0006-abort.mingw.patch @@ -0,0 +1,236 @@ +diff -ur aspell-0.60.7-20110707.orig/common/config.cpp aspell-0.60.7-20110707/common/config.cpp +--- aspell-0.60.7-20110707.orig/common/config.cpp 2014-03-20 22:31:38.359557900 +0000 ++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 22:39:19.296089400 +0000 +@@ -623,7 +623,7 @@ + + } else { + +- abort(); // this should not happen ++ DebugBreak(); // this should not happen + + } + +@@ -857,7 +857,7 @@ + case ListClear: + return make_err(no_value_clear, entry->key); + default: +- abort(); // this shouldn't happen ++ DebugBreak(); // this shouldn't happen + } + } else { + entry->place_holder = -1; +diff -ur aspell-0.60.7-20110707.orig/common/itemize.cpp aspell-0.60.7-20110707/common/itemize.cpp +--- aspell-0.60.7-20110707.orig/common/itemize.cpp 2004-01-03 12:06:24.000000000 +0000 ++++ aspell-0.60.7-20110707/common/itemize.cpp 2014-03-20 22:39:22.191457100 +0000 +@@ -97,7 +97,7 @@ + RET_ON_ERR(d.clear()); + break; + default: +- abort(); ++ DebugBreak(); + } + } + return no_err; +diff -ur aspell-0.60.7-20110707.orig/common/posib_err.cpp aspell-0.60.7-20110707/common/posib_err.cpp +--- aspell-0.60.7-20110707.orig/common/posib_err.cpp 2004-11-21 02:52:22.000000000 +0000 ++++ aspell-0.60.7-20110707/common/posib_err.cpp 2014-03-20 22:39:24.232716300 +0000 +@@ -100,7 +100,7 @@ + fputs(_("Unhandled Error: "), stderr); + fputs(err_->err->mesg, stderr); + fputs("\n", stderr); +- abort(); ++ DebugBreak(); + } + #endif + +diff -ur aspell-0.60.7-20110707.orig/common/string_list.hpp aspell-0.60.7-20110707/common/string_list.hpp +--- aspell-0.60.7-20110707.orig/common/string_list.hpp 2004-06-17 12:41:47.000000000 +0000 ++++ aspell-0.60.7-20110707/common/string_list.hpp 2014-03-20 22:39:26.609018100 +0000 +@@ -90,7 +90,7 @@ + } + + bool empty() const { return first == 0; } +- unsigned int size() const { abort(); return 0; } ++ unsigned int size() const { DebugBreak(); return 0; } + + }; + +diff -ur aspell-0.60.7-20110707.orig/lib/find_speller.cpp aspell-0.60.7-20110707/lib/find_speller.cpp +--- aspell-0.60.7-20110707.orig/lib/find_speller.cpp 2005-08-30 08:34:03.000000000 +0000 ++++ aspell-0.60.7-20110707/lib/find_speller.cpp 2014-03-20 22:39:30.995575100 +0000 +@@ -384,7 +384,7 @@ + b_size.req_type = '+'; + } + if (!asc_isdigit(p[0]) || !asc_isdigit(p[1]) || p[2] != '\0') +- abort(); //FIXME: create an error condition here ++ DebugBreak(); //FIXME: create an error condition here + b_size.requested = atoi(p); + b_size.init(); + +diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/data.cpp aspell-0.60.7-20110707/modules/speller/default/data.cpp +--- aspell-0.60.7-20110707.orig/modules/speller/default/data.cpp 2011-07-04 14:30:16.000000000 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/data.cpp 2014-03-20 22:39:33.647911900 +0000 +@@ -439,7 +439,7 @@ + w = new_default_replacement_dict(); + break; + default: +- abort(); ++ DebugBreak(); + } + + RET_ON_ERR(w->load(true_file_name, config, new_dicts, speller)); +diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/phonetic.cpp aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp +--- aspell-0.60.7-20110707.orig/modules/speller/default/phonetic.cpp 2004-05-21 00:15:58.000000000 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp 2014-03-20 22:39:36.033214800 +0000 +@@ -194,7 +194,7 @@ + } else if (name == lang->name()) { + sl = new PhonetSoundslike(lang); + } else { +- abort(); // FIXME ++ DebugBreak(); // FIXME + } + PosibErrBase pe = sl->setup(iconv); + if (pe.has_err()) { +diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/readonly_ws.cpp aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp +--- aspell-0.60.7-20110707.orig/modules/speller/default/readonly_ws.cpp 2011-07-04 22:00:38.000000000 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp 2014-03-20 22:39:39.614669600 +0000 +@@ -108,7 +108,7 @@ + + static inline void mmap_free(char *, unsigned int) + { +- abort(); ++ DebugBreak(); + } + + #endif +@@ -210,7 +210,7 @@ + InsensitiveHash hash; + InsensitiveEqual equal; + bool is_nonexistent(Value v) const {return v == u32int_max;} +- void make_nonexistent(const Value & v) const {abort();} ++ void make_nonexistent(const Value & v) const {DebugBreak();} + }; + typedef VectorHashTable WordLookup; + +diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/speller_impl.cpp aspell-0.60.7-20110707/modules/speller/default/speller_impl.cpp +--- aspell-0.60.7-20110707.orig/modules/speller/default/speller_impl.cpp 2011-07-04 14:30:16.000000000 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/speller_impl.cpp 2014-03-20 22:39:43.524666100 +0000 +@@ -380,7 +380,7 @@ + static PosibErr save_repl(SpellerImpl * m, bool value) { + // FIXME + // m->save_on_saveall(DataSet::Id(&m->personal_repl()), value); +- abort(); return no_err; ++ DebugBreak(); return no_err; + } + static PosibErr sug_mode(SpellerImpl * m, const char * mode) { + RET_ON_ERR(m->suggest_->set_mode(mode)); +@@ -683,7 +683,7 @@ + case Dict::multi_dict: + break; + default: +- abort(); ++ DebugBreak(); + } + save_on_saveall = false; + } +@@ -709,7 +709,7 @@ + + } else { + +- abort(); ++ DebugBreak(); + + } + break; +diff -ur aspell-0.60.7-20110707.orig/prog/aspell.cpp aspell-0.60.7-20110707/prog/aspell.cpp +--- aspell-0.60.7-20110707.orig/prog/aspell.cpp 2014-03-20 22:31:38.247543700 +0000 ++++ aspell-0.60.7-20110707/prog/aspell.cpp 2014-03-20 22:39:47.708697400 +0000 +@@ -448,7 +448,7 @@ + else if (action_str == "merge") + action = do_merge; + else +- abort(); // this should not happen ++ DebugBreak(); // this should not happen + + if (action != do_other) { + if (args.empty()) { +@@ -1498,7 +1498,7 @@ + } + break; + default: +- abort(); ++ DebugBreak(); + } + } + +--- aspell-0.60.7-20110707/modules/filter/tex.cpp.orig 2011-06-26 00:30:51.000000000 +0000 ++++ aspell-0.60.7-20110707/modules/filter/tex.cpp 2014-03-21 00:05:17.545103900 +0000 +@@ -24,6 +24,7 @@ + #include "string_enumeration.hpp" + + #include "gettext.h" ++#include + + namespace { + +--- aspell-0.60.7-20110707/common/itemize.cpp.orig 2014-03-20 22:41:17.483097300 +0000 ++++ aspell-0.60.7-20110707/common/itemize.cpp 2014-03-21 00:05:47.254376500 +0000 +@@ -12,6 +12,7 @@ + #include "mutable_container.hpp" + #include + #include ++#include + + //FIXME: it should be possible to escape ',' '+' '-' '!' so that they can + // appear in values +--- aspell-0.60.7-20110707/common/string_list.hpp.orig 2014-03-20 22:41:17.485097500 +0000 ++++ aspell-0.60.7-20110707/common/string_list.hpp 2014-03-21 00:06:43.069964200 +0000 +@@ -12,6 +12,7 @@ + #include "posib_err.hpp" + #include + #include ++#include + + namespace acommon { + +--- aspell-0.60.7-20110707/common/posib_err.cpp.orig 2014-03-20 22:41:17.484097400 +0000 ++++ aspell-0.60.7-20110707/common/posib_err.cpp 2014-03-21 00:07:22.355452800 +0000 +@@ -13,7 +13,7 @@ + #include "posib_err.hpp" + + #include "gettext.h" +- ++#include + + namespace acommon { + +--- aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp.orig 2014-03-20 22:41:17.489598100 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp 2014-03-21 00:08:00.899347200 +0000 +@@ -55,6 +55,7 @@ + #include "iostream.hpp" + + #include "gettext.h" ++#include + + typedef unsigned int u32int; + static const u32int u32int_max = (u32int)-1; +--- aspell-0.60.7-20110707/modules/speller/default/data.cpp.orig 2014-03-20 22:41:17.487097800 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/data.cpp 2014-03-21 00:12:01.247367600 +0000 +@@ -17,6 +17,7 @@ + #include "vararray.hpp" + + #include "gettext.h" ++#include + + namespace aspeller { + +--- aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp.orig 2014-03-20 22:41:17.488097900 +0000 ++++ aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp 2014-03-21 00:12:31.846253100 +0000 +@@ -7,6 +7,7 @@ + #include "file_util.hpp" + #include "file_data_util.hpp" + #include "clone_ptr-t.hpp" ++#include + + namespace aspeller { + diff --git a/mingw-w64-aspell/0007-fix-including-langinfo.patch b/mingw-w64-aspell/0007-fix-including-langinfo.patch new file mode 100644 index 0000000000..24af2e0df1 --- /dev/null +++ b/mingw-w64-aspell/0007-fix-including-langinfo.patch @@ -0,0 +1,12 @@ +diff -Naur aspell-0.60.7-20131207-orig/modules/speller/default/language.cpp aspell-0.60.7-20131207/modules/speller/default/language.cpp +--- aspell-0.60.7-20131207-orig/modules/speller/default/language.cpp 2011-07-05 03:46:03.000000000 +0300 ++++ aspell-0.60.7-20131207/modules/speller/default/language.cpp 2014-12-13 21:19:22.924600000 +0300 +@@ -20,7 +20,7 @@ + #include "getdata.hpp" + #include "file_util.hpp" + +-#ifdef ENABLE_NLS ++#ifdef HAVE_LANGINFO_CODESET + # include + #endif + diff --git a/mingw-w64-aspell/PKGBUILD b/mingw-w64-aspell/PKGBUILD new file mode 100644 index 0000000000..e3ece81093 --- /dev/null +++ b/mingw-w64-aspell/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Alexey Pavlov + +_realname=aspell +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +_date_ver=20131207 +_ver_base=0.60.7 +pkgver=${_ver_base}.${_date_ver} +pkgrel=2 +pkgdesc="A spell checker designed to eventually replace Ispell (mingw-w64)" +arch=('any') +url="http://aspell.net/" +license=("LGPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-gettext") +options=('strip' 'staticlibs') +source=("ftp://alpha.gnu.org/gnu/${_realname}/${_realname}-${_ver_base}-${_date_ver}.tar.gz" + 0001-use-namespace.mingw.patch + 0002-printf.mingw.patch + 0003-no-undefined-on.mingw.patch + 0004-reloc.mingw.patch + 0005-w32-home.all.patch + 0006-abort.mingw.patch + 0007-fix-including-langinfo.patch) +md5sums=('fd87c9cceb4cc8aff06822c109b9dca3' + 'ee6e262260e11bc285ce6a242fec3aeb' + '9f799391cc00cf9e0d5ffee88d103a97' + '4aa79ac556d2cd42b1d736e031acdbac' + '102bacf0b0c041f9d04aeb6bb0adb865' + '3830ee14ff5b704a4e21b2c76f153217' + '5ed7ead83958a39719242221c3669311' + '50a79bb773b73cb3a69ec38cb086ca27') + +prepare() { + cd "${srcdir}"/${_realname}-${_ver_base}-${_date_ver} + patch -p1 -i ${srcdir}/0001-use-namespace.mingw.patch + patch -p1 -i ${srcdir}/0002-printf.mingw.patch + patch -p1 -i ${srcdir}/0003-no-undefined-on.mingw.patch + patch -p1 -i ${srcdir}/0004-reloc.mingw.patch + patch -p1 -i ${srcdir}/0005-w32-home.all.patch + patch -p1 -i ${srcdir}/0006-abort.mingw.patch + patch -p1 -i ${srcdir}/0007-fix-including-langinfo.patch + + autoreconf -fi +} + +build() { + CPPFLAGS+=" -DENABLE_W32_PREFIX=1" + mv ${_realname}-${_ver_base}-${_date_ver} build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-static \ + --enable-shared \ + --disable-curses + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-assimp-git/PKGBUILD b/mingw-w64-assimp-git/PKGBUILD index f558eb9fbb..391a6121e4 100644 --- a/mingw-w64-assimp-git/PKGBUILD +++ b/mingw-w64-assimp-git/PKGBUILD @@ -2,13 +2,18 @@ _realname=assimp pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r2029.bd0c283 +pkgver=r2740.71cc642 pkgrel=1 pkgdesc="Portable Open Source library to import various well-known 3D model formats in an uniform manner (mingw-w64)" arch=('any') license=('BSD') -depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-zlib") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc" 'unzip') +depends=("${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-zziplib" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") url=('http://assimp.sourceforge.net/index.html') @@ -16,10 +21,10 @@ source=("${_realname}"::"git+https://github.com/assimp/assimp.git" 'build-fixes.patch') options=(!strip staticlibs) md5sums=('SKIP' - '8627cd14b63ff5ea524c1a9ba62ebbce') + 'eb7991c3764c438801238e3dbb125d54') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } @@ -31,10 +36,11 @@ prepare() { build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DASSIMP_BUILD_ASSIMP_TOOLS=YES \ -DASSIMP_ENABLE_BOOST_WORKAROUND=OFF \ -DASSIMP_BUILD_STATIC_LIB=OFF \ @@ -47,7 +53,7 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 install + make DESTDIR=${pkgdir} -j1 install install -Dm644 "${srcdir}/${_realname}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-assimp-git/build-fixes.patch b/mingw-w64-assimp-git/build-fixes.patch index 95bcb13a36..9df1e4b1ba 100644 --- a/mingw-w64-assimp-git/build-fixes.patch +++ b/mingw-w64-assimp-git/build-fixes.patch @@ -9,18 +9,3 @@ #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// ---- assimp/test/unit/Main.cpp.orig 2014-06-12 22:00:03.635600000 +0400 -+++ assimp/test/unit/Main.cpp 2014-06-12 22:00:14.150000000 +0400 -@@ -25,10 +25,9 @@ - aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE); - - // .. and C. They should smoothly work together -+ aiLogStream logS = aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.txt"); - aiEnableVerboseLogging(AI_TRUE); -- aiAttachLogStream(&aiGetPredefinedLogStream( -- aiDefaultLogStream_FILE, -- "AssimpLog_C.txt")); -+ aiAttachLogStream(&logS); - - - // ............................................................................ diff --git a/mingw-w64-assimp/PKGBUILD b/mingw-w64-assimp/PKGBUILD index c14c7bd48e..1c6987b1bd 100644 --- a/mingw-w64-assimp/PKGBUILD +++ b/mingw-w64-assimp/PKGBUILD @@ -3,14 +3,18 @@ _realname=assimp pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.1.1 -pkgrel=1 +pkgrel=2 pkgdesc="Portable Open Source library to import various well-known 3D model formats in an uniform manner (mingw-w64)" arch=('any') license=('BSD') -depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-zlib") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-zziplib" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") url=('http://assimp.sourceforge.net/index.html') -source=(https://github.com/assimp/assimp/archive/v${pkgver}.tar.gz +source=(${_realname}-${pkgver}.tar.gz::https://github.com/assimp/assimp/archive/v${pkgver}.tar.gz build-fixes.patch) options=('!strip' 'staticlibs') sha1sums=('e8c54a31d16aae77901d4f51c0d09e7148dcba0d' @@ -24,10 +28,11 @@ prepare() { build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=RELEASE \ -DASSIMP_BUILD_ASSIMP_TOOLS=YES \ -DASSIMP_ENABLE_BOOST_WORKAROUND=OFF \ @@ -40,12 +45,6 @@ build() { package() { cd "${srcdir}//build-${MINGW_CHOST}" - make -j1 install + make DESTDIR=${pkgdir} -j1 install install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/assimp.pc } diff --git a/mingw-w64-astyle/PKGBUILD b/mingw-w64-astyle/PKGBUILD new file mode 100644 index 0000000000..758323a985 --- /dev/null +++ b/mingw-w64-astyle/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Ray Donnelly + +_realname=astyle +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.05.1 +pkgrel=2 +pkgdesc='A free, fast and small automatic formatter for C, C++, C#, and Java source code (mingw-w64)' +arch=('any') +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +source=("http://sourceforge.net/projects/${_realname}/files/${_realname}/${_realname}%202.05.1/${_realname}_${pkgver}_linux.tar.gz" + "mingw-w64-fix-install.patch") +sha1sums=('b2ccedbb49f7f892afd6a9a59a67b57c36c41df3' + 'd36a9cb920c52d36fe9e53decfad5049f7c44324') + +prepare() { + cd "${srcdir}"/${_realname} + patch -p1 -i "${srcdir}"/mingw-w64-fix-install.patch +} + +build() { + [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + mv "${srcdir}"/${_realname} "${srcdir}"/build-${CARCH} + cd "${srcdir}"/build-${CARCH}/build/gcc + make +} + +package() { + cd "${srcdir}"/build-${CARCH}/build/gcc + make install prefix=${pkgdir}${MINGW_PREFIX} +} diff --git a/mingw-w64-astyle/mingw-w64-fix-install.patch b/mingw-w64-astyle/mingw-w64-fix-install.patch new file mode 100644 index 0000000000..bf969c1787 --- /dev/null +++ b/mingw-w64-astyle/mingw-w64-fix-install.patch @@ -0,0 +1,11 @@ +--- build-x86_64/build/gcc/Makefile.orig 2014-12-11 14:42:25.000000000 +0000 ++++ build-x86_64/build/gcc/Makefile 2015-03-07 00:05:08.142425600 +0000 +@@ -35,7 +35,7 @@ + CBASEFLAGS = -W -Wall -fno-rtti -fno-exceptions + JAVAINCS = -I$(JAVA_HOME)/include + CXX = g++ +-INSTALL=install -o $(USER) -g $(USER) ++INSTALL=install + + ################################################## + diff --git a/mingw-w64-atk/PKGBUILD b/mingw-w64-atk/PKGBUILD index 658e8846fa..0dc08569be 100644 --- a/mingw-w64-atk/PKGBUILD +++ b/mingw-w64-atk/PKGBUILD @@ -1,22 +1,24 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=atk +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.14.0 +pkgver=2.18.0 pkgrel=1 pkgdesc="A library providing a set of interfaces for accessibility (mingw-w64)" arch=('any') url="http://www.gtk.org" -license=("LGPL") +license=(LGPL2) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gnome-common" - "${MINGW_PACKAGE_PREFIX}-glib2>=2.41.0") + "${MINGW_PACKAGE_PREFIX}-gnome-common" + "${MINGW_PACKAGE_PREFIX}-glib2>=2.46.0") options=('strip' 'staticlibs') -source=("http://ftp.gnome.org/pub/gnome/sources/atk/${pkgver%.*}/${_realname}-$pkgver.tar.xz") -md5sums=('ecb7ca8469a5650581b1227d78051b8b') +source=("http://ftp.gnome.org/pub/gnome/sources/atk/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +md5sums=('fd3678f35004b4c92e3da39356996054') prepare() { cd "${srcdir}"/${_realname}-${pkgver} @@ -34,6 +36,7 @@ build() { --enable-shared \ --enable-introspection \ --disable-glibtest + make } @@ -41,4 +44,5 @@ package() { cd "${srcdir}/build-${MINGW_CHOST}" make -j1 DESTDIR="$pkgdir" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-atkmm/PKGBUILD b/mingw-w64-atkmm/PKGBUILD index 3a989d29a5..ea16354c07 100644 --- a/mingw-w64-atkmm/PKGBUILD +++ b/mingw-w64-atkmm/PKGBUILD @@ -1,22 +1,22 @@ # Maintainer: Alexey Pavlov _realname=atkmm +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.22.7 -pkgrel=2 +pkgver=2.24.1 +pkgrel=1 pkgdesc="C++ bindings for atk (mingw-w64)" arch=('any') url="http://gtkmm.sourceforge.net" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libsigc++" - "${MINGW_PACKAGE_PREFIX}-glibmm>=2.36.0" - "${MINGW_PACKAGE_PREFIX}-atk" - ) +depends=("${MINGW_PACKAGE_PREFIX}-atk" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-glibmm" + "${MINGW_PACKAGE_PREFIX}-libsigc++") options=(strip staticlibs) -source=("http://ftp.gnome.org/pub/GNOME/sources/atkmm/${pkgver%.*}/atkmm-$pkgver.tar.xz") -md5sums=('fec7db3fc47ba2e0c95d130ec865a236') +source=("http://ftp.gnome.org/pub/GNOME/sources/atkmm/${pkgver%.*}/atkmm-${pkgver}.tar.xz") +md5sums=('279f32c23b74e5d25bce2b941294cdc8') build() { CPPFLAGS+=" -D_REENTRANT" @@ -34,6 +34,6 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-atom-editor/PKGBUILD b/mingw-w64-atom-editor/PKGBUILD index faf2129a48..aaf5c690ed 100644 --- a/mingw-w64-atom-editor/PKGBUILD +++ b/mingw-w64-atom-editor/PKGBUILD @@ -3,7 +3,7 @@ _realname=atom-editor pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" pkgver=r18372.d4f7e71 -pkgrel=1 +pkgrel=2 pkgdesc='Cross-platform desktop application shell (mingw-w64)' source=("${_realname}-${CARCH}"::"git://github.com/atom/atom#branch=master") arch=('any') @@ -12,7 +12,8 @@ license=('MIT') options=() shasums=('SKIP') makedepends=("${MINGW_PACKAGE_PREFIX}-ninja" - "${MINGW_PACKAGE_PREFIX}-python2") + "${MINGW_PACKAGE_PREFIX}-python2" + "git") pkgver() { cd "$srcdir"/${_realname}-${CARCH} @@ -56,7 +57,7 @@ package() { install -Dm644 resources/linux/Atom.desktop "${INSTALL_PREFIX}/share/applications/Atom.desktop" install -Dm644 resources/atom.png "${INSTALL_PREFIX}/share/pixmaps/atom.png" - install -Dm644 LICENSE.md "${INSTALL_PREFIX}/share/licenses/$pkgname/LICENSE.md" + install -Dm644 LICENSE.md "${INSTALL_PREFIX}/share/licenses/${_realname}/LICENSE.md" } md5sums=('SKIP') diff --git a/mingw-w64-atom-shell/0001-python-python2.patch b/mingw-w64-atom-shell/0001-python-python2.patch index cd8a9d265c..17a45382d3 100644 --- a/mingw-w64-atom-shell/0001-python-python2.patch +++ b/mingw-w64-atom-shell/0001-python-python2.patch @@ -224,7 +224,7 @@ index 770f5b0..c9abbb0 100755 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 - # Copyright (c) 2013 GitHub, Inc. All rights reserved. + # Copyright (c) 2013 GitHub, Inc. # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/win/generate_breakpad_symbols.py b/tools/win/generate_breakpad_symbols.py @@ -234,7 +234,7 @@ index d5d0a8f..a8076ea 100644 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 - # Copyright (c) 2013 GitHub, Inc. All rights reserved. + # Copyright (c) 2013 GitHub, Inc. # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be -- diff --git a/mingw-w64-atom-shell/PKGBUILD b/mingw-w64-atom-shell/PKGBUILD index f220aa6266..17c0cbdc8b 100644 --- a/mingw-w64-atom-shell/PKGBUILD +++ b/mingw-w64-atom-shell/PKGBUILD @@ -2,7 +2,7 @@ _realname=atom-shell pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r2246.50ea0f0 +pkgver=r2873.1a80bc7 pkgrel=1 pkgdesc='Cross-platform desktop application shell (mingw-w64)' source=("${_realname}-${CARCH}"::"git://github.com/atom/atom-shell.git#branch=master" @@ -14,7 +14,8 @@ license=('MIT') options=() shasums=('SKIP') makedepends=("${MINGW_PACKAGE_PREFIX}-ninja" - "${MINGW_PACKAGE_PREFIX}-python2") + "${MINGW_PACKAGE_PREFIX}-python2" + "git") pkgver() { cd "$srcdir"/${_realname}-${CARCH} @@ -31,10 +32,11 @@ build() { cd "$srcdir"/${_realname}-${CARCH} export GYP_GENERATORS=ninja # Downloads atl, directxsdk, vs2012_crt. -# ./script/update.py + ./script/bootstrap.py + mkdir -p out/Release ./script/build.py \ --ninja ${MINGW_PREFIX}/bin/ninja.exe \ - --install-dir="${pkgdir}${MINGW_PREFIX}" + --configuration Release } package() { @@ -42,5 +44,5 @@ package() { } md5sums=('SKIP' - 'b320fc8b8ec791f0a884e7169fa7e5d7' + 'da295e232eea4219fd026a7f400e8158' '41cc04603347974168369f16181293ab') diff --git a/mingw-w64-attica-qt5/PKGBUILD b/mingw-w64-attica-qt5/PKGBUILD index 9572f925e4..ce5cab7273 100644 --- a/mingw-w64-attica-qt5/PKGBUILD +++ b/mingw-w64-attica-qt5/PKGBUILD @@ -2,28 +2,25 @@ # Maintainer (ArchLinux): Andrea Scarpino # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared - -if [ "${_variant}" = "-static" ]; then - _namesuff="-static" +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} else - _namesuff= + _variant=-shared fi -_realname=attica-qt5${_namesuff} -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.3.0 +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "attica" +pkgver=5.12.0 pkgrel=1 arch=('any') -url='https://projects.kde.org/projects/kdesupport/attica' pkgdesc="A Qt5 library that implements the Open Collaboration Services API (mingw-w64-qt5${_namesuff})" license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}") makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/attica-${pkgver}.tar.xz") -md5sums=('194b9a2141a2a4e23f2bc6dde92178f5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('f12d5f866690b0954dfaa963e971eb27') prepare() { mkdir -p build-${CARCH}${_variant} @@ -33,23 +30,23 @@ build() { local -a extra_config cd build-${CARCH}${_variant} if [ "${_variant}" = "-static" ]; then - extra_config+=("-DATTICA_STATIC_BUILD=NO") + extra_config+=( -DATTICA_STATIC_BUILD=YES ) QT5_PREFIX=${MINGW_PREFIX}/qt5-static export PATH=${QT5_PREFIX}/bin:"$PATH" else QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../attica-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' make } diff --git a/mingw-w64-avrdude/01-libtool.patch b/mingw-w64-avrdude/01-libtool.patch new file mode 100644 index 0000000000..8ae650a570 --- /dev/null +++ b/mingw-w64-avrdude/01-libtool.patch @@ -0,0 +1,20 @@ +--- avrdude-6.2-orig/configure.ac ++++ avrdude-6.2/configure.ac +@@ -34,7 +34,7 @@ + AC_CONFIG_HEADERS(ac_cfg.h) + AC_CONFIG_MACRO_DIR([m4]) + +-LT_INIT() ++LT_INIT([win32-dll]) + + # Checks for programs. + AC_PROG_CC +--- avrdude-6.2-orig/Makefile.am ++++ avrdude-6.2/Makefile.am +@@ -178,5 +178,5 @@ + libavrdude_la_SOURCES = $(libavrdude_a_SOURCES) +-libavrdude_la_LDFLAGS = -version-info 1:0 ++libavrdude_la_LDFLAGS = -no-undefined -version-info 1:0 + + include_HEADERS = libavrdude.h + diff --git a/mingw-w64-avrdude/02-ddk-headers.patch b/mingw-w64-avrdude/02-ddk-headers.patch new file mode 100644 index 0000000000..086a47ab23 --- /dev/null +++ b/mingw-w64-avrdude/02-ddk-headers.patch @@ -0,0 +1,63 @@ +--- avrdude-6.2-orig/configure.ac ++++ avrdude-6.2/configure.ac +@@ -185,6 +185,8 @@ + AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h]) + AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include + #include ]) ++AC_CHECK_HEADERS([hidsdi.h],,,[#include ++#include ]) + + + # Checks for typedefs, structures, and compiler characteristics. +@@ -202,9 +204,12 @@ + case $target in + *-*-mingw32* | *-*-cygwin* | *-*-windows*) + LIBHID="-lhid -lsetupapi" +- if test $ac_cv_header_ddk_hidsdi_h = yes ++ if test x$ac_cv_header_ddk_hidsdi_h = xyes + then + HIDINCLUDE="#include " ++ elif test x$ac_cv_header_hidsdi_h = xyes ++ then ++ HIDINCLUDE="#include " + else + HIDINCLUDE="#include \"my_ddk_hidsdi.h\"" + fi +--- avrdude-6.2-orig/pickit2.c ++++ avrdude-6.2/pickit2.c +@@ -60,6 +60,8 @@ + #include + #if defined(HAVE_DDK_HIDSDI_H) + # include ++#elif defined(HAVE_HIDSDI_H) ++# include + #else + # include "my_ddk_hidsdi.h" + #endif +--- avrdude-6.2-orig/ser_avrdoper.c ++++ avrdude-6.2/ser_avrdoper.c +@@ -71,10 +71,13 @@ + + #if defined(HAVE_DDK_HIDSDI_H) + # include ++# include ++#elif defined (HAVE_HIDSDI_H) ++# include ++# include + #else + # include "my_ddk_hidsdi.h" + #endif +-#include + + #ifdef USB_DEBUG + #define DEBUG_PRINT(arg) printf arg +--- avrdude-6.2-orig/Makefile.am ++++ avrdude-6.2/Makefile.am +@@ -138,7 +138,6 @@ + linuxgpio.h \ + linux_ppdev.h \ + lists.c \ +- my_ddk_hidsdi.h \ + par.c \ + par.h \ + pgm.c \ diff --git a/mingw-w64-avrdude/03-handle-printing.patch b/mingw-w64-avrdude/03-handle-printing.patch new file mode 100644 index 0000000000..ac83d24ac6 --- /dev/null +++ b/mingw-w64-avrdude/03-handle-printing.patch @@ -0,0 +1,24 @@ +--- avrdude-6.2-orig/serbb_win32.c ++++ avrdude-6.2/serbb_win32.c +@@ -308,8 +308,8 @@ + progname, port); + return -1; + } +- avrdude_message(MSG_DEBUG, "%s: ser_open(): opened comm port \"%s\", handle 0x%x\n", +- progname, port, (int)hComPort); ++ avrdude_message(MSG_DEBUG, "%s: ser_open(): opened comm port \"%s\", handle 0x%p\n", ++ progname, port, hComPort); + + pgm->fd.pfd = (void *)hComPort; + +@@ -326,8 +326,8 @@ + pgm->setpin(pgm, PIN_AVR_RESET, 1); + CloseHandle (hComPort); + } +- avrdude_message(MSG_DEBUG, "%s: ser_close(): closed comm port handle 0x%x\n", +- progname, (int)hComPort); ++ avrdude_message(MSG_DEBUG, "%s: ser_close(): closed comm port handle 0x%p\n", ++ progname, hComPort); + + hComPort = INVALID_HANDLE_VALUE; + } diff --git a/mingw-w64-avrdude/04-no-giveio.patch b/mingw-w64-avrdude/04-no-giveio.patch new file mode 100644 index 0000000000..74ca4fa77c --- /dev/null +++ b/mingw-w64-avrdude/04-no-giveio.patch @@ -0,0 +1,15 @@ +--- avrdude-6.2-orig/windows/Makefile.am ++++ avrdude-6.2/windows/Makefile.am +@@ -24,11 +24,7 @@ + # This Makefile will only be used on windows based systems. + # + +-local_install_list = \ +- giveio.sys \ +- install_giveio.bat \ +- remove_giveio.bat \ +- status_giveio.bat ++local_install_list = + + EXTRA_DIST = \ + giveio.c \ diff --git a/mingw-w64-avrdude/PKGBUILD b/mingw-w64-avrdude/PKGBUILD new file mode 100644 index 0000000000..521d53f97b --- /dev/null +++ b/mingw-w64-avrdude/PKGBUILD @@ -0,0 +1,98 @@ +# Maintainer: David Grayson + +_realname=avrdude +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=6.2 +pkgrel=1 +pkgdesc='Software for programming Atmel AVR Microcontrollers (mingw-w64)' +arch=('any') +url="http://www.nongnu.org/avrdude/" +license=('GPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "grep" + "bison" + "flex") +depends=("${MINGW_PACKAGE_PREFIX}-libftdi" + "${MINGW_PACKAGE_PREFIX}-libusb" + "${MINGW_PACKAGE_PREFIX}-libelf") +options=('staticlibs' 'strip') +source=(#http://download.savannah.gnu.org/releases/avrdude/avrdude-${pkgver}.tar.gz{,.sig} + https://ftp.yzu.edu.tw/nongnu/avrdude/avrdude-${pkgver}.tar.gz{,.sig} + '01-libtool.patch' + '02-ddk-headers.patch' + '03-handle-printing.patch' + '04-no-giveio.patch') + +sha256sums=('e65f833493b7d63a4436c7056694a0f04ae5b437b72cc084e32c58bc543b0f91' + 'SKIP' + '3a5c041f97e8fcd6706b08ae24fe21337fd1df13319479e2d49c3f82529ba054' + '7b52523834e492281347bc92a064ca924dc5d09e2d653e7076c5a966d03f7768' + '159fb7d3253931c00a019c43f343f533d4e67c3a9859b7bcdb51878b8dc26451' + 'c52f01656cfece50da9513170549fa5f0c8240544e10e77f67eea7a3ad8d1b50') + +prepare() +{ + cd "${srcdir}/${_realname}-${pkgver}" + + # Delete binaries. + rm windows/giveio.sys + + # Let's use mingw-w64's hidsdi.h instead of AVRDUDE's. + rm my_ddk_hidsdi.h + + # Fixes a warning from libtool. However, a DLL still does not generated. + patch -p1 -i ../01-libtool.patch + + # Look for headers like hidsdi.h and hidpi.h at the top level, + # (do not assume they are inside the "ddk" directory). + patch -p1 -i ../02-ddk-headers.patch + + # Proper printing of 64-bit HANDLE pointers. The upstream code results + # in a compiler warning on x86_64 and wouldn't print the whole pointer. + patch -p1 -i ../03-handle-printing.patch + + # Don't install giveio.sys or the batch scripts associated with it since it is + # a precompiled binary and unlikely to work on modern versions of Windows + # anyway due to driver signing requirements. + patch -p1 -i ../04-no-giveio.patch + + ./bootstrap +} + +build() { + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + "../${_realname}-${pkgver}/configure" \ + --prefix="${MINGW_PREFIX}" \ + --build="${MINGW_CHOST}" \ + --host="${MINGW_CHOST}" + + make +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + make check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + cd "${pkgdir}${MINGW_PREFIX}" + + # Remove loaddrv.exe because we aren't distributing any drivers one could use + # with it and driver signing requirements in modern versions of Windows mean + # it is unlikely to work (it only claims to support Windows NT/2000/XP). + # Also, with a generic name like loaddrv, it could cause a name collision. + rm bin/loaddrv.exe + + # As we can see from confwin.c, AVRDUDE searches for avrdude.conf + # using the PATH; it does not find it in /etc. + mv etc/avrdude.conf bin + + cd "${srcdir}/${_realname}-${pkgver}" + install -D COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-babl-git/PKGBUILD b/mingw-w64-babl/PKGBUILD similarity index 56% rename from mingw-w64-babl-git/PKGBUILD rename to mingw-w64-babl/PKGBUILD index d59c07f9f2..6b1324a925 100644 --- a/mingw-w64-babl-git/PKGBUILD +++ b/mingw-w64-babl/PKGBUILD @@ -1,47 +1,50 @@ # Maintainer: Alexey Pavlov _realname=babl -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=r745.21571c7 +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}"-git) +pkgver=0.1.14 pkgrel=1 pkgdesc="Dynamic Pixel Format Translation Library (mingw-w64)" arch=('any') url="http://gegl.org/babl/" license=("GPL-3.0+" "LGPL-3.0+") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-librsvg") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' 'staticlibs') -source=("${_realname}"::"git://git.gnome.org/babl") -sha1sums=('SKIP') - -pkgver() { - cd "$srcdir/$_realname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} +source=(#"${_realname}"::"git://git.gnome.org/babl" + #https://git.gnome.org/browse/babl/snapshot/BABL_${pkgver//./_}.tar.xz + http://ftp.gtk.org/pub/babl/${pkgver%.*}/${_realname}-${pkgver}.tar.bz2) +sha1sums=('1e1e27a9a07da95e905d07816701b2efaf5611af') prepare() { - cd ${srcdir}/${_realname} + cd ${srcdir}/${_realname}-${pkgver} autoreconf --force --install --verbose } build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ --disable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm rm "${pkgdir}${MINGW_PREFIX}"/lib/babl-*/*.dll.a } diff --git a/mingw-w64-badvpn/PKGBUILD b/mingw-w64-badvpn/PKGBUILD index a563e9de0b..fae3f49b42 100644 --- a/mingw-w64-badvpn/PKGBUILD +++ b/mingw-w64-badvpn/PKGBUILD @@ -1,40 +1,42 @@ # Maintainer: David Macek # todo -DBUILD_SHARED_LIBS=ON - _realname=badvpn pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.999.129 -pkgrel=1 +pkgver=1.999.130 +pkgrel=2 pkgdesc="NCD scripting language, tun2socks proxifier, P2P VPN (mingw-w64)" arch=('any') url="https://github.com/ambrop72/badvpn" license=('BSD') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") -depends=("${MINGW_PACKAGE_PREFIX}-nss" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-nspr") -source=("https://github.com/ambrop72/badvpn/archive/${pkgver}.tar.gz") -md5sums=('e42f9c22fcef5a44498e80f23ceee0b3') +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-nspr" + "${MINGW_PACKAGE_PREFIX}-nss" + "${MINGW_PACKAGE_PREFIX}-openssl") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/ambrop72/badvpn/archive/${pkgver}.tar.gz") +md5sums=('e65d8d298fc82eb9a6c12a9425a97e6d') build() { mkdir -p "${srcdir}"/build-${CARCH} cd "${srcdir}"/build-${CARCH} - cmake ../${_realname}-${pkgver} \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ -G "MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX="${pkgdir}${MINGW_PREFIX}" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INCLUDE_PATH="${MINGW_PREFIX}"/include/nspr:"${MINGW_PREFIX}"/include/nss3 \ + -DCMAKE_INCLUDE_PATH="${MINGW_PREFIX}/include/nspr:${MINGW_PREFIX}/include/nss3" \ -DBUILD_EXAMPLES=OFF \ - -DBUILD_TESTS=OFF + -DBUILD_TESTS=OFF \ + ../${_realname}-${pkgver} + make } package() { cd "${srcdir}"/build-${CARCH} - make install - install -Dm644 "${srcdir}"/$_realname-$pkgver/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + make DESTDIR=${pkgdir} install + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/COPYING } diff --git a/mingw-w64-bc/PKGBUILD b/mingw-w64-bc/PKGBUILD new file mode 100644 index 0000000000..351d0be932 --- /dev/null +++ b/mingw-w64-bc/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexey Pavlov +# Contributor: Paul Moore + +_realname=bc +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.06 +pkgrel=2 +pkgdesc='bc is an arbitrary precision numeric processing language (mingw-w64)' +arch=('any') +url='http://www.gnu.org/software/bc/' +license=('GPL3') +options=('strip' '!libtool' 'staticlibs') +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('d44b5dddebd8a7a7309aea6c36fda117') + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd $srcdir/${_realname}-${pkgver} + ./configure --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make install DESTDIR="${pkgdir}" + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-binutils-git/0001-MinGW-w64-Two-fixes-for-unusual-files.patch b/mingw-w64-binutils-git/0001-MinGW-w64-Two-fixes-for-unusual-files.patch new file mode 100644 index 0000000000..0c3857dd67 --- /dev/null +++ b/mingw-w64-binutils-git/0001-MinGW-w64-Two-fixes-for-unusual-files.patch @@ -0,0 +1,123 @@ +From 038bd9f82b5ff41d945edd0ad93a571663ef4ce2 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:39:35 +0000 +Subject: [PATCH 1/5] MinGW-w64: Two fixes for 'unusual' files. + +Handle isatty() files better. +Pretend 'nul' is '/dev/null' which is necessary for libtool. +--- + binutils/bucomm.c | 21 ++++++++++++++++++--- + binutils/elfedit.c | 15 ++++++++++++++- + binutils/readelf.c | 15 ++++++++++++++- + 3 files changed, 46 insertions(+), 5 deletions(-) + +diff --git a/binutils/bucomm.c b/binutils/bucomm.c +index b8deff5..864ab96 100644 +--- a/binutils/bucomm.c ++++ b/binutils/bucomm.c +@@ -570,7 +570,15 @@ off_t + get_file_size (const char * file_name) + { + struct stat statbuf; +- ++ int f, t; ++ t = -1; ++ f = open (file_name, O_RDONLY | O_BINARY); ++ if (f != 0) ++ { ++ t = isatty (f); ++ close (f); ++ } ++ + if (stat (file_name, &statbuf) < 0) + { + if (errno == ENOENT) +@@ -579,8 +587,15 @@ get_file_size (const char * file_name) + non_fatal (_("Warning: could not locate '%s'. reason: %s"), + file_name, strerror (errno)); + } +- else if (! S_ISREG (statbuf.st_mode)) +- non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); ++ else if (! S_ISREG (statbuf.st_mode) || t > 0) ++ { ++#ifdef _WIN32 ++ /* libtool passes /dev/null and checks for /dev/null in the output */ ++ if (stricmp (file_name, "nul") == 0) ++ file_name = "/dev/null"; ++#endif ++ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); ++ } + else if (statbuf.st_size < 0) + non_fatal (_("Warning: '%s' has negative size, probably it is too large"), + file_name); +diff --git a/binutils/elfedit.c b/binutils/elfedit.c +index 5f21382..553d634 100644 +--- a/binutils/elfedit.c ++++ b/binutils/elfedit.c +@@ -441,6 +441,14 @@ static int + check_file (const char *file_name, struct stat *statbuf_p) + { + struct stat statbuf; ++ int f, t; ++ t = -1; ++ f = open (file_name, O_RDONLY | O_BINARY); ++ if (f != 0) ++ { ++ t = isatty (f); ++ close (f); ++ } + + if (statbuf_p == NULL) + statbuf_p = &statbuf; +@@ -455,8 +463,13 @@ check_file (const char *file_name, struct stat *statbuf_p) + return 1; + } + +- if (! S_ISREG (statbuf_p->st_mode)) ++ if (! S_ISREG (statbuf_p->st_mode) || t > 0) + { ++#ifdef _WIN32 ++ /* libtool passes /dev/null and checks for /dev/null in the output */ ++ if (stricmp (file_name, "nul") == 0) ++ file_name = "/dev/null"; ++#endif + error (_("'%s' is not an ordinary file\n"), file_name); + return 1; + } +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 59d3381..af92d5b 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -15561,6 +15561,14 @@ process_file (char * file_name) + struct stat statbuf; + char armag[SARMAG]; + int ret; ++ int f, t; ++ t = -1; ++ f = open (file_name, O_RDONLY | O_BINARY); ++ if (f != 0) ++ { ++ t = isatty (f); ++ close (f); ++ } + + if (stat (file_name, &statbuf) < 0) + { +@@ -15572,8 +15580,13 @@ process_file (char * file_name) + return 1; + } + +- if (! S_ISREG (statbuf.st_mode)) ++ if (! S_ISREG (statbuf.st_mode) || t > 0) + { ++#ifdef _WIN32 ++ /* libtool passes /dev/null and checks for /dev/null in the output */ ++ if (stricmp (file_name, "nul") == 0) ++ file_name = "/dev/null"; ++#endif + error (_("'%s' is not an ordinary file\n"), file_name); + return 1; + } +-- +2.6.3 + diff --git a/mingw-w64-binutils-git/0002-MinGW-w64-Fix-libiberty-makefile.patch b/mingw-w64-binutils-git/0002-MinGW-w64-Fix-libiberty-makefile.patch new file mode 100644 index 0000000000..f098a94c25 --- /dev/null +++ b/mingw-w64-binutils-git/0002-MinGW-w64-Fix-libiberty-makefile.patch @@ -0,0 +1,57 @@ +From 2a073ff20e2232a54adf1ea1afd6bd78af83bd50 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:39:48 +0000 +Subject: [PATCH 2/5] MinGW-w64: Fix libiberty makefile + +--- + libiberty/Makefile.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 9b87720..eddde49 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -130,7 +130,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \ + d-demangle.c dwarfnames.c dyn-string.c \ + fdmatch.c ffs.c fibheap.c filename_cmp.c floatformat.c \ + fnmatch.c fopen_unlocked.c \ +- getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \ ++ getcwd.c getpagesize.c getpwd.c getruntime.c \ + gettimeofday.c \ + hashtab.c hex.c \ + index.c insque.c \ +@@ -155,8 +155,8 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \ + strtoul.c strndup.c strnlen.c strverscmp.c \ + timeval-utils.c tmpnam.c \ + unlink-if-ordinary.c \ +- vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \ +- waitpid.c \ ++ vasprintf.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \ ++ msdos.c \ + xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c \ + xstrndup.c + +@@ -172,7 +172,7 @@ REQUIRED_OFILES = \ + ./fdmatch.$(objext) ./fibheap.$(objext) \ + ./filename_cmp.$(objext) ./floatformat.$(objext) \ + ./fnmatch.$(objext) ./fopen_unlocked.$(objext) \ +- ./getopt.$(objext) ./getopt1.$(objext) ./getpwd.$(objext) \ ++ ./getpwd.$(objext) \ + ./getruntime.$(objext) ./hashtab.$(objext) ./hex.$(objext) \ + ./lbasename.$(objext) ./lrealpath.$(objext) \ + ./make-relative-prefix.$(objext) ./make-temp-file.$(objext) \ +@@ -221,9 +221,9 @@ CONFIGURED_OFILES = ./asprintf.$(objext) ./atexit.$(objext) \ + ./strrchr.$(objext) ./strstr.$(objext) ./strtod.$(objext) \ + ./strtol.$(objext) ./strtoul.$(objext) ./strverscmp.$(objext) \ + ./tmpnam.$(objext) \ +- ./vasprintf.$(objext) ./vfork.$(objext) ./vfprintf.$(objext) \ ++ ./vasprintf.$(objext) ./vfprintf.$(objext) \ + ./vprintf.$(objext) ./vsnprintf.$(objext) ./vsprintf.$(objext) \ +- ./waitpid.$(objext) ++ ./msdos.$(objext) + + # These files are installed if the library has been configured to do so. + INSTALLED_HEADERS = \ +-- +2.6.3 + diff --git a/mingw-w64-binutils-git/0003-MinGW-w64-Fix-libibery-configure.patch b/mingw-w64-binutils-git/0003-MinGW-w64-Fix-libibery-configure.patch new file mode 100644 index 0000000000..667f6b5f21 --- /dev/null +++ b/mingw-w64-binutils-git/0003-MinGW-w64-Fix-libibery-configure.patch @@ -0,0 +1,99 @@ +From 592bdfbc3eb61cf5dec3b040784ab392e06d226e Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:40:03 +0000 +Subject: [PATCH 3/5] MinGW-w64: Fix libibery configure + +--- + libiberty/configure | 16 +--------------- + libiberty/configure.ac | 6 +----- + 2 files changed, 2 insertions(+), 20 deletions(-) + +diff --git a/libiberty/configure b/libiberty/configure +index 96feaed..fc78353 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5394,7 +5394,6 @@ funcs="$funcs vfprintf" + funcs="$funcs vprintf" + funcs="$funcs vsnprintf" + funcs="$funcs vsprintf" +-funcs="$funcs waitpid" + funcs="$funcs setproctitle" + + # Also in the old function.def file: alloca, vfork, getopt. +@@ -5721,13 +5720,6 @@ esac + ;; + esac + +- case " $LIBOBJS " in +- *" waitpid.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" +- ;; +-esac +- +- + for f in $funcs; do + case "$f" in + asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid) +@@ -5868,12 +5860,6 @@ esac + esac + + case " $LIBOBJS " in +- *" vfork.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS vfork.$ac_objext" +- ;; +-esac +- +- case " $LIBOBJS " in + *" waitpid.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" + ;; +@@ -6335,7 +6321,7 @@ fi + if test $ac_cv_func_vfork_works = no; then + case " $LIBOBJS " in + *" vfork.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ++ *) + ;; + esac + +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 3380819..fc57948 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -372,7 +372,6 @@ funcs="$funcs vfprintf" + funcs="$funcs vprintf" + funcs="$funcs vsnprintf" + funcs="$funcs vsprintf" +-funcs="$funcs waitpid" + funcs="$funcs setproctitle" + + # Also in the old function.def file: alloca, vfork, getopt. +@@ -473,6 +472,7 @@ if test -n "${with_target_subdir}"; then + AC_LIBOBJ([insque]) + AC_LIBOBJ([mempcpy]) + AC_LIBOBJ([mkstemps]) ++ AC_LIBOBJ([msdos]) + AC_LIBOBJ([random]) + AC_LIBOBJ([rindex]) + AC_LIBOBJ([sigsetmask]) +@@ -482,7 +482,6 @@ if test -n "${with_target_subdir}"; then + AC_LIBOBJ([strnlen]) + AC_LIBOBJ([strverscmp]) + AC_LIBOBJ([vasprintf]) +- AC_LIBOBJ([waitpid]) + + for f in $funcs; do + case "$f" in +@@ -630,9 +629,6 @@ if test -z "${setobjs}"; then + AC_REPLACE_FUNCS($funcs) + libiberty_AC_FUNC_C_ALLOCA + AC_FUNC_FORK +- if test $ac_cv_func_vfork_works = no; then +- AC_LIBOBJ([vfork]) +- fi + # We only need _doprnt if we might use it to implement v*printf. + if test $ac_cv_func_vprintf != yes \ + || test $ac_cv_func_vfprintf != yes \ +-- +2.6.3 + diff --git a/mingw-w64-binutils-git/0004-MinGW-w64-Use-gnu-printf.patch b/mingw-w64-binutils-git/0004-MinGW-w64-Use-gnu-printf.patch new file mode 100644 index 0000000000..4ddbec96dd --- /dev/null +++ b/mingw-w64-binutils-git/0004-MinGW-w64-Use-gnu-printf.patch @@ -0,0 +1,182 @@ +From ca890339d26efeb33f611a6a18e44907b49bd5e6 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:40:15 +0000 +Subject: [PATCH 4/5] MinGW-w64: Use gnu-printf + +--- + bfd/bfd-in.h | 2 +- + bfd/bfd-in2.h | 2 +- + binutils/nm.c | 4 ++-- + binutils/prdbg.c | 2 +- + binutils/readelf.c | 4 ++-- + gas/as.h | 4 ++-- + gas/read.c | 2 +- + gold/configure | 2 +- + gold/configure.ac | 2 +- + include/ansidecl.h | 4 ++-- + 10 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h +index 1607872..b5a9432 100644 +--- a/bfd/bfd-in.h ++++ b/bfd/bfd-in.h +@@ -137,7 +137,7 @@ typedef BFD_HOST_U_64_BIT symvalue; + + #if BFD_HOST_64BIT_LONG + #define BFD_VMA_FMT "l" +-#elif defined (__MSVCRT__) ++#elif defined(__MSVCRT__) && !defined( __USE_MINGW_ANSI_STDIO) + #define BFD_VMA_FMT "I64" + #else + #define BFD_VMA_FMT "ll" +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index bca5181..9d493ae 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -144,7 +144,7 @@ typedef BFD_HOST_U_64_BIT symvalue; + + #if BFD_HOST_64BIT_LONG + #define BFD_VMA_FMT "l" +-#elif defined (__MSVCRT__) ++#elif defined (__MSVCRT__) && !defined(__USE_MINGW_ANSI_STDIO) + #define BFD_VMA_FMT "I64" + #else + #define BFD_VMA_FMT "ll" +diff --git a/binutils/nm.c b/binutils/nm.c +index ed1ed12..9c4d25c 100644 +--- a/binutils/nm.c ++++ b/binutils/nm.c +@@ -162,7 +162,7 @@ static char value_format_32bit[] = "%08lx"; + #if BFD_HOST_64BIT_LONG + static char value_format_64bit[] = "%016lx"; + #elif BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + static char value_format_64bit[] = "%016llx"; + #else + static char value_format_64bit[] = "%016I64x"; +@@ -292,7 +292,7 @@ set_print_radix (char *radix) + #if BFD_HOST_64BIT_LONG + value_format_64bit[5] = *radix; + #elif BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + value_format_64bit[6] = *radix; + #else + value_format_64bit[7] = *radix; +diff --git a/binutils/prdbg.c b/binutils/prdbg.c +index b43030b..24ce976 100644 +--- a/binutils/prdbg.c ++++ b/binutils/prdbg.c +@@ -502,7 +502,7 @@ print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp) + #if BFD_HOST_64BIT_LONG_LONG + else if (sizeof (vma) <= sizeof (unsigned long long)) + { +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + if (hexp) + sprintf (buf, "0x%llx", (unsigned long long) vma); + else if (unsignedp) +diff --git a/binutils/readelf.c b/binutils/readelf.c +index af92d5b..ad31d93 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -1123,7 +1123,7 @@ dump_relocations (FILE * file, + : "%12.12lx %12.12lx ", + offset, inf); + #elif BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + printf (do_wide + ? "%16.16llx %16.16llx " + : "%12.12llx %12.12llx ", +@@ -11552,7 +11552,7 @@ dump_section_as_strings (Elf_Internal_Shdr * section, FILE * file) + { + size_t maxlen = end - data; + +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + /* PR 11128: Use two separate invocations in order to work + around bugs in the Solaris 8 implementation of printf. */ + printf (" [%6tx] ", data - start); +diff --git a/gas/as.h b/gas/as.h +index df04dce..c3e5e07 100644 +--- a/gas/as.h ++++ b/gas/as.h +@@ -451,10 +451,10 @@ typedef struct _pseudo_type pseudo_typeS; + + #define PRINTF_LIKE(FCN) \ + void FCN (const char *format, ...) \ +- __attribute__ ((__format__ (__printf__, 1, 2))) ++ __attribute__ ((__format__ (gnu_printf, 1, 2))) + #define PRINTF_WHERE_LIKE(FCN) \ + void FCN (char *file, unsigned int line, const char *format, ...) \ +- __attribute__ ((__format__ (__printf__, 3, 4))) ++ __attribute__ ((__format__ (gnu_printf, 3, 4))) + + #else /* __GNUC__ < 2 || defined(VMS) */ + +diff --git a/gas/read.c b/gas/read.c +index 6e441da..2fa9137 100644 +--- a/gas/read.c ++++ b/gas/read.c +@@ -4322,7 +4322,7 @@ emit_expr_with_reloc (expressionS *exp, + || (get & hibit) == 0)) + { /* Leading bits contain both 0s & 1s. */ + #if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + as_warn (_("value 0x%llx truncated to 0x%llx"), + (unsigned long long) get, (unsigned long long) use); + #else +diff --git a/gold/configure b/gold/configure +index 3427074..4eefa14 100755 +--- a/gold/configure ++++ b/gold/configure +@@ -7553,7 +7553,7 @@ else + /* end confdefs.h. */ + + template extern void foo(const char*, ...) +- __attribute__ ((__format__ (__printf__, 1, 2))); ++ __attribute__ ((__format__ (gnu_printf, 1, 2))); + template void foo(const char* format, ...) {} + void bar() { foo("%s\n", "foo"); } + +diff --git a/gold/configure.ac b/gold/configure.ac +index e0ac1df..f87efe17 100644 +--- a/gold/configure.ac ++++ b/gold/configure.ac +@@ -615,7 +615,7 @@ AC_CACHE_CHECK([whether we can use attributes with template functions], + [gold_cv_template_attribute], + [AC_COMPILE_IFELSE([ + template extern void foo(const char*, ...) +- __attribute__ ((__format__ (__printf__, 1, 2))); ++ __attribute__ ((__format__ (gnu_printf, 1, 2))); + template void foo(const char* format, ...) {} + void bar() { foo("%s\n", "foo"); } + ], [gold_cv_template_attribute=yes], [gold_cv_template_attribute=no])]) +diff --git a/include/ansidecl.h b/include/ansidecl.h +index 0fb23bb..6adf802 100644 +--- a/include/ansidecl.h ++++ b/include/ansidecl.h +@@ -197,7 +197,7 @@ So instead we use the macro below and test it against specific values. */ + before GCC 3.3, but as of 3.3 we need to add the `nonnull' + attribute to retain this behavior. */ + #ifndef ATTRIBUTE_PRINTF +-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m) ++#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) ATTRIBUTE_NONNULL(m) + #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) + #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) + #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) +@@ -225,7 +225,7 @@ So instead we use the macro below and test it against specific values. */ + NULL format specifier was allowed as of gcc 3.3. */ + #ifndef ATTRIBUTE_NULL_PRINTF + # if (GCC_VERSION >= 3003) +-# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ++# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) + # else + # define ATTRIBUTE_NULL_PRINTF(m, n) + # endif /* GNUC >= 3.3 */ +-- +2.6.3 + diff --git a/mingw-w64-binutils-git/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch b/mingw-w64-binutils-git/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch new file mode 100644 index 0000000000..f07fa05ca6 --- /dev/null +++ b/mingw-w64-binutils-git/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch @@ -0,0 +1,83 @@ +From 1316395a096fd327efe88c171a08ba077f6f02df Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 23 Nov 2015 22:42:53 +0000 +Subject: [PATCH 5/5] bfd: Increase _bfd_coff_max_nscns to 65279 + +.. from 32768. This is the value that llvm uses. There's no +indication in the PECOFF specs that 32768 is the limit. +--- + bfd/coff-alpha.c | 2 +- + bfd/coff-mips.c | 2 +- + bfd/coff-rs6000.c | 2 +- + bfd/coff-sh.c | 2 +- + bfd/coffcode.h | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c +index 0e78088..f414c32 100644 +--- a/bfd/coff-alpha.c ++++ b/bfd/coff-alpha.c +@@ -2241,7 +2241,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = + alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, + alpha_ecoff_swap_scnhdr_out, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, +- ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, ++ ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 65279, + alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, + alpha_ecoff_swap_scnhdr_in, NULL, + alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, +diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c +index 298671c..40d8298 100644 +--- a/bfd/coff-mips.c ++++ b/bfd/coff-mips.c +@@ -1254,7 +1254,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = + mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out, + mips_ecoff_swap_scnhdr_out, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, +- ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, ++ ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 65279, + mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in, + mips_ecoff_swap_scnhdr_in, NULL, + mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, +diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c +index fea5f3b..9753dfe 100644 +--- a/bfd/coff-rs6000.c ++++ b/bfd/coff-rs6000.c +@@ -4071,7 +4071,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = + 3, /* _bfd_coff_default_section_alignment_power */ + FALSE, /* _bfd_coff_force_symnames_in_strings */ + 2, /* _bfd_coff_debug_string_prefix_length */ +- 32768, /* _bfd_coff_max_nscns */ ++ 65279, /* _bfd_coff_max_nscns */ + coff_swap_filehdr_in, + coff_swap_aouthdr_in, + coff_swap_scnhdr_in, +diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c +index 23e32ec..39dde21 100644 +--- a/bfd/coff-sh.c ++++ b/bfd/coff-sh.c +@@ -3090,7 +3090,7 @@ static bfd_coff_backend_data bfd_coff_small_swap_table = + #else + 2, + #endif +- 32768, ++ 65279, + coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, + coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, + coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, +diff --git a/bfd/coffcode.h b/bfd/coffcode.h +index 2b1c3d0..c72f296 100644 +--- a/bfd/coffcode.h ++++ b/bfd/coffcode.h +@@ -5574,7 +5574,7 @@ static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = + #else + 2, + #endif +- 32768, ++ 65279, + coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, + coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, + coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, +-- +2.6.3 + diff --git a/mingw-w64-binutils-git/0016-fix-w32-lto-bug-13557.all.patch b/mingw-w64-binutils-git/0016-fix-w32-lto-bug-13557.all.patch deleted file mode 100644 index 671091aea7..0000000000 --- a/mingw-w64-binutils-git/0016-fix-w32-lto-bug-13557.all.patch +++ /dev/null @@ -1,998 +0,0 @@ ---- a/bfd/aoutx.h -+++ a/bfd/aoutx.h -@@ -3404,6 +3404,8 @@ aout_link_check_ar_symbols (bfd *abfd, - static bfd_boolean - aout_link_check_archive_element (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, -+ const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) - { - bfd *oldbfd; ---- a/bfd/cofflink.c -+++ a/bfd/cofflink.c -@@ -29,9 +29,11 @@ - #include "libcoff.h" - #include "safe-ctype.h" - --static bfd_boolean coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info); --static bfd_boolean coff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded); --static bfd_boolean coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info); -+static bfd_boolean coff_link_add_object_symbols (bfd *, struct bfd_link_info *); -+static bfd_boolean coff_link_check_archive_element -+ (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *); -+static bfd_boolean coff_link_add_symbols (bfd *, struct bfd_link_info *); - - /* Return TRUE if SYM is a weak, external symbol. */ - #define IS_WEAK_EXTERNAL(abfd, sym) \ -@@ -190,74 +192,6 @@ coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) - return TRUE; - } - --/* Look through the symbols to see if this object file should be -- included in the link. */ -- --static bfd_boolean --coff_link_check_ar_symbols (bfd *abfd, -- struct bfd_link_info *info, -- bfd_boolean *pneeded, -- bfd **subsbfd) --{ -- bfd_size_type symesz; -- bfd_byte *esym; -- bfd_byte *esym_end; -- -- *pneeded = FALSE; -- -- symesz = bfd_coff_symesz (abfd); -- esym = (bfd_byte *) obj_coff_external_syms (abfd); -- esym_end = esym + obj_raw_syment_count (abfd) * symesz; -- while (esym < esym_end) -- { -- struct internal_syment sym; -- enum coff_symbol_classification classification; -- -- bfd_coff_swap_sym_in (abfd, esym, &sym); -- -- classification = bfd_coff_classify_symbol (abfd, &sym); -- if (classification == COFF_SYMBOL_GLOBAL -- || classification == COFF_SYMBOL_COMMON) -- { -- const char *name; -- char buf[SYMNMLEN + 1]; -- struct bfd_link_hash_entry *h; -- -- /* This symbol is externally visible, and is defined by this -- object file. */ -- name = _bfd_coff_internal_syment_name (abfd, &sym, buf); -- if (name == NULL) -- return FALSE; -- h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); -- -- /* Auto import. */ -- if (!h -- && info->pei386_auto_import -- && CONST_STRNEQ (name, "__imp_")) -- h = bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE, TRUE); -- -- /* We are only interested in symbols that are currently -- undefined. If a symbol is currently known to be common, -- COFF linkers do not bring in an object file which defines -- it. */ -- if (h != (struct bfd_link_hash_entry *) NULL -- && h->type == bfd_link_hash_undefined) -- { -- if (!(*info->callbacks -- ->add_archive_element) (info, abfd, name, subsbfd)) -- return FALSE; -- *pneeded = TRUE; -- return TRUE; -- } -- } -- -- esym += (sym.n_numaux + 1) * symesz; -- } -- -- /* We do not need this object file. */ -- return TRUE; --} -- - /* Check a single archive element to see if we need to include it in - the link. *PNEEDED is set according to whether this element is - needed in the link or not. This is called via -@@ -266,41 +200,23 @@ coff_link_check_ar_symbols (bfd *abfd, - static bfd_boolean - coff_link_check_archive_element (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h, -+ const char *name, - bfd_boolean *pneeded) - { -- bfd *oldbfd; -- bfd_boolean needed; -+ *pneeded = FALSE; - -- if (!_bfd_coff_get_external_symbols (abfd)) -- return FALSE; -+ /* We are only interested in symbols that are currently undefined. -+ If a symbol is currently known to be common, COFF linkers do not -+ bring in an object file which defines it. */ -+ if (h->type != bfd_link_hash_undefined) -+ return TRUE; - -- oldbfd = abfd; -- if (!coff_link_check_ar_symbols (abfd, info, pneeded, &abfd)) -+ if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd)) - return FALSE; -+ *pneeded = TRUE; - -- needed = *pneeded; -- if (needed) -- { -- /* Potentially, the add_archive_element hook may have set a -- substitute BFD for us. */ -- if (abfd != oldbfd) -- { -- if (!info->keep_memory -- && !_bfd_coff_free_symbols (oldbfd)) -- return FALSE; -- if (!_bfd_coff_get_external_symbols (abfd)) -- return FALSE; -- } -- if (!coff_link_add_symbols (abfd, info)) -- return FALSE; -- } -- -- if (!info->keep_memory || !needed) -- { -- if (!_bfd_coff_free_symbols (abfd)) -- return FALSE; -- } -- return TRUE; -+ return coff_link_add_object_symbols (abfd, info); - } - - /* Add all the symbols from an object file to the hash table. */ ---- a/bfd/ecoff.c -+++ a/bfd/ecoff.c -@@ -3497,171 +3497,29 @@ ecoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) - return FALSE; - } - --/* Factored out from ecoff_link_check_archive_element. */ -- --static bfd_boolean --read_ext_syms_and_strs (HDRR **symhdr, bfd_size_type *external_ext_size, -- bfd_size_type *esize, void **external_ext, char **ssext, bfd *abfd, -- const struct ecoff_backend_data * const backend) --{ -- if (! ecoff_slurp_symbolic_header (abfd)) -- return FALSE; -- -- /* If there are no symbols, we don't want it. */ -- if (bfd_get_symcount (abfd) == 0) -- return TRUE; -- -- *symhdr = &ecoff_data (abfd)->debug_info.symbolic_header; -- -- *external_ext_size = backend->debug_swap.external_ext_size; -- *esize = (*symhdr)->iextMax * *external_ext_size; -- *external_ext = bfd_malloc (*esize); -- if (*external_ext == NULL && *esize != 0) -- return FALSE; -- -- if (bfd_seek (abfd, (file_ptr) (*symhdr)->cbExtOffset, SEEK_SET) != 0 -- || bfd_bread (*external_ext, *esize, abfd) != *esize) -- return FALSE; -- -- *ssext = (char *) bfd_malloc ((bfd_size_type) (*symhdr)->issExtMax); -- if (*ssext == NULL && (*symhdr)->issExtMax != 0) -- return FALSE; -- -- if (bfd_seek (abfd, (file_ptr) (*symhdr)->cbSsExtOffset, SEEK_SET) != 0 -- || (bfd_bread (*ssext, (bfd_size_type) (*symhdr)->issExtMax, abfd) -- != (bfd_size_type) (*symhdr)->issExtMax)) -- return FALSE; -- return TRUE; --} -- --static bfd_boolean --reread_ext_syms_and_strs (HDRR **symhdr, bfd_size_type *external_ext_size, -- bfd_size_type *esize, void **external_ext, char **ssext, bfd *abfd, -- const struct ecoff_backend_data * const backend) --{ -- if (*external_ext != NULL) -- free (*external_ext); -- *external_ext = NULL; -- if (*ssext != NULL) -- free (*ssext); -- *ssext = NULL; -- return read_ext_syms_and_strs (symhdr, external_ext_size, esize, -- external_ext, ssext, abfd, backend); --} -- - /* This is called if we used _bfd_generic_link_add_archive_symbols - because we were not dealing with an ECOFF archive. */ - - static bfd_boolean - ecoff_link_check_archive_element (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h, -+ const char *name, - bfd_boolean *pneeded) - { -- const struct ecoff_backend_data * const backend = ecoff_backend (abfd); -- void (* const swap_ext_in) (bfd *, void *, EXTR *) -- = backend->debug_swap.swap_ext_in; -- HDRR *symhdr; -- bfd_size_type external_ext_size = 0; -- void * external_ext = NULL; -- bfd_size_type esize = 0; -- char *ssext = NULL; -- char *ext_ptr; -- char *ext_end; -- - *pneeded = FALSE; - -- /* Read in the external symbols and external strings. */ -- if (!read_ext_syms_and_strs (&symhdr, &external_ext_size, &esize, -- &external_ext, &ssext, abfd, backend)) -- goto error_return; -- -- /* If there are no symbols, we don't want it. */ -- if (bfd_get_symcount (abfd) == 0) -- goto successful_return; -- -- /* Look through the external symbols to see if they define some -- symbol that is currently undefined. */ -- ext_ptr = (char *) external_ext; -- ext_end = ext_ptr + esize; -- for (; ext_ptr < ext_end; ext_ptr += external_ext_size) -- { -- EXTR esym; -- bfd_boolean def; -- const char *name; -- bfd *oldbfd; -- struct bfd_link_hash_entry *h; -- -- (*swap_ext_in) (abfd, (void *) ext_ptr, &esym); -- -- /* See if this symbol defines something. */ -- if (esym.asym.st != stGlobal -- && esym.asym.st != stLabel -- && esym.asym.st != stProc) -- continue; -- -- switch (esym.asym.sc) -- { -- case scText: -- case scData: -- case scBss: -- case scAbs: -- case scSData: -- case scSBss: -- case scRData: -- case scCommon: -- case scSCommon: -- case scInit: -- case scFini: -- case scRConst: -- def = TRUE; -- break; -- default: -- def = FALSE; -- break; -- } -- -- if (! def) -- continue; -- -- name = ssext + esym.asym.iss; -- h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); -- -- /* Unlike the generic linker, we do not pull in elements because -- of common symbols. */ -- if (h == NULL -- || h->type != bfd_link_hash_undefined) -- continue; -- -- /* Include this element. */ -- oldbfd = abfd; -- if (!(*info->callbacks -- ->add_archive_element) (info, abfd, name, &abfd)) -- goto error_return; -- /* Potentially, the add_archive_element hook may have set a -- substitute BFD for us. */ -- if (abfd != oldbfd -- && !reread_ext_syms_and_strs (&symhdr, &external_ext_size, &esize, -- &external_ext, &ssext, abfd, backend)) -- goto error_return; -- if (! ecoff_link_add_externals (abfd, info, external_ext, ssext)) -- goto error_return; -+ /* Unlike the generic linker, we do not pull in elements because -+ of common symbols. */ -+ if (h->type != bfd_link_hash_undefined) -+ return TRUE; - -- *pneeded = TRUE; -- goto successful_return; -- } -+ /* Include this element. */ -+ if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd)) -+ return FALSE; -+ *pneeded = TRUE; - -- successful_return: -- if (external_ext != NULL) -- free (external_ext); -- if (ssext != NULL) -- free (ssext); -- return TRUE; -- error_return: -- if (external_ext != NULL) -- free (external_ext); -- if (ssext != NULL) -- free (ssext); -- return FALSE; -+ return ecoff_link_add_object_symbols (abfd, info); - } - - /* Add the symbols from an archive file to the global hash table. ---- a/bfd/elflink.c -+++ a/bfd/elflink.c -@@ -2931,13 +2931,6 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef) - if (! bfd_check_format (abfd, bfd_object)) - return FALSE; - -- /* If we have already included the element containing this symbol in the -- link then we do not need to include it again. Just claim that any symbol -- it contains is not a definition, so that our caller will not decide to -- (re)include this element. */ -- if (abfd->archive_pass) -- return FALSE; -- - /* Select the appropriate symbol table. */ - if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0) - hdr = &elf_tdata (abfd)->symtab_hdr; -@@ -4928,20 +4921,8 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, - } - - /* Add symbols from an ELF archive file to the linker hash table. We -- don't use _bfd_generic_link_add_archive_symbols because of a -- problem which arises on UnixWare. The UnixWare libc.so is an -- archive which includes an entry libc.so.1 which defines a bunch of -- symbols. The libc.so archive also includes a number of other -- object files, which also define symbols, some of which are the same -- as those defined in libc.so.1. Correct linking requires that we -- consider each object file in turn, and include it if it defines any -- symbols we need. _bfd_generic_link_add_archive_symbols does not do -- this; it looks through the list of undefined symbols, and includes -- any object file which defines them. When this algorithm is used on -- UnixWare, it winds up pulling in libc.so.1 early and defining a -- bunch of symbols. This means that some of the other objects in the -- archive are not included in the link, which is incorrect since they -- precede libc.so.1 in the archive. -+ don't use _bfd_generic_link_add_archive_symbols because we need to -+ handle versioned symbols. - - Fortunately, ELF archive handling is simpler than that done by - _bfd_generic_link_add_archive_symbols, which has to allow for a.out -@@ -4956,8 +4937,7 @@ static bfd_boolean - elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - { - symindex c; -- bfd_boolean *defined = NULL; -- bfd_boolean *included = NULL; -+ unsigned char *included = NULL; - carsym *symdefs; - bfd_boolean loop; - bfd_size_type amt; -@@ -4981,11 +4961,10 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - if (c == 0) - return TRUE; - amt = c; -- amt *= sizeof (bfd_boolean); -- defined = (bfd_boolean *) bfd_zmalloc (amt); -- included = (bfd_boolean *) bfd_zmalloc (amt); -- if (defined == NULL || included == NULL) -- goto error_return; -+ amt *= sizeof (*included); -+ included = (unsigned char *) bfd_zmalloc (amt); -+ if (included == NULL) -+ return FALSE; - - symdefs = bfd_ardata (abfd)->symdefs; - bed = get_elf_backend_data (abfd); -@@ -5010,7 +4989,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - struct bfd_link_hash_entry *undefs_tail; - symindex mark; - -- if (defined[i] || included[i]) -+ if (included[i]) - continue; - if (symdef->file_offset == last) - { -@@ -5045,7 +5024,8 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - else if (h->root.type != bfd_link_hash_undefined) - { - if (h->root.type != bfd_link_hash_undefweak) -- defined[i] = TRUE; -+ /* Symbol must be defined. Don't check it again. */ -+ included[i] = TRUE; - continue; - } - -@@ -5057,16 +5037,6 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - if (! bfd_check_format (element, bfd_object)) - goto error_return; - -- /* Doublecheck that we have not included this object -- already--it should be impossible, but there may be -- something wrong with the archive. */ -- if (element->archive_pass != 0) -- { -- bfd_set_error (bfd_error_bad_value); -- goto error_return; -- } -- element->archive_pass = 1; -- - undefs_tail = info->hash->undefs_tail; - - if (!(*info->callbacks -@@ -5104,14 +5074,11 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - } - while (loop); - -- free (defined); - free (included); - - return TRUE; - - error_return: -- if (defined != NULL) -- free (defined); - if (included != NULL) - free (included); - return FALSE; ---- a/bfd/libbfd-in.h -+++ a/bfd/libbfd-in.h -@@ -603,7 +603,9 @@ extern bfd_boolean _bfd_generic_link_add_symbols_collect - /* Generic archive add symbol routine. */ - extern bfd_boolean _bfd_generic_link_add_archive_symbols - (bfd *, struct bfd_link_info *, -- bfd_boolean (*) (bfd *, struct bfd_link_info *, bfd_boolean *)); -+ bfd_boolean (*) (bfd *, struct bfd_link_info *, -+ struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *)); - - /* Forward declaration to avoid prototype errors. */ - typedef struct bfd_link_hash_entry _bfd_link_hash_entry; ---- a/bfd/libbfd.h -+++ a/bfd/libbfd.h -@@ -608,7 +608,9 @@ extern bfd_boolean _bfd_generic_link_add_symbols_collect - /* Generic archive add symbol routine. */ - extern bfd_boolean _bfd_generic_link_add_archive_symbols - (bfd *, struct bfd_link_info *, -- bfd_boolean (*) (bfd *, struct bfd_link_info *, bfd_boolean *)); -+ bfd_boolean (*) (bfd *, struct bfd_link_info *, -+ struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *)); - - /* Forward declaration to avoid prototype errors. */ - typedef struct bfd_link_hash_entry _bfd_link_hash_entry; ---- a/bfd/linker.c -+++ a/bfd/linker.c -@@ -229,28 +229,16 @@ SUBSUBSECTION - @findex _bfd_generic_link_add_archive_symbols - In most cases the work of looking through the symbols in the - archive should be done by the -- <<_bfd_generic_link_add_archive_symbols>> function. This -- function builds a hash table from the archive symbol table and -- looks through the list of undefined symbols to see which -- elements should be included. -+ <<_bfd_generic_link_add_archive_symbols>> function. - <<_bfd_generic_link_add_archive_symbols>> is passed a function - to call to make the final decision about adding an archive - element to the link and to do the actual work of adding the -- symbols to the linker hash table. -- -- The function passed to -- <<_bfd_generic_link_add_archive_symbols>> must read the -- symbols of the archive element and decide whether the archive -- element should be included in the link. If the element is to -+ symbols to the linker hash table. If the element is to - be included, the <> linker callback - routine must be called with the element as an argument, and - the element's symbols must be added to the linker hash table - just as though the element had itself been passed to the -- <<_bfd_link_add_symbols>> function. The <> -- callback has the option to indicate that it would like to -- replace the element archive with a substitute BFD, in which -- case it is the symbols of that substitute BFD that must be -- added to the linker hash table instead. -+ <<_bfd_link_add_symbols>> function. - - When the a.out <<_bfd_link_add_symbols>> function receives an - archive, it calls <<_bfd_generic_link_add_archive_symbols>> -@@ -419,11 +407,14 @@ static bfd_boolean generic_link_add_object_symbols - static bfd_boolean generic_link_add_symbols - (bfd *, struct bfd_link_info *, bfd_boolean); - static bfd_boolean generic_link_check_archive_element_no_collect -- (bfd *, struct bfd_link_info *, bfd_boolean *); -+ (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *); - static bfd_boolean generic_link_check_archive_element_collect -- (bfd *, struct bfd_link_info *, bfd_boolean *); -+ (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *); - static bfd_boolean generic_link_check_archive_element -- (bfd *, struct bfd_link_info *, bfd_boolean *, bfd_boolean); -+ (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *, bfd_boolean); - static bfd_boolean generic_link_add_symbol_list - (bfd *, struct bfd_link_info *, bfd_size_type count, asymbol **, - bfd_boolean); -@@ -917,138 +908,32 @@ generic_link_add_object_symbols (bfd *abfd, - return generic_link_add_symbol_list (abfd, info, symcount, outsyms, collect); - } - --/* We build a hash table of all symbols defined in an archive. */ -- --/* An archive symbol may be defined by multiple archive elements. -- This linked list is used to hold the elements. */ -- --struct archive_list --{ -- struct archive_list *next; -- unsigned int indx; --}; -- --/* An entry in an archive hash table. */ -- --struct archive_hash_entry --{ -- struct bfd_hash_entry root; -- /* Where the symbol is defined. */ -- struct archive_list *defs; --}; -- --/* An archive hash table itself. */ -- --struct archive_hash_table --{ -- struct bfd_hash_table table; --}; -- --/* Create a new entry for an archive hash table. */ -- --static struct bfd_hash_entry * --archive_hash_newfunc (struct bfd_hash_entry *entry, -- struct bfd_hash_table *table, -- const char *string) --{ -- struct archive_hash_entry *ret = (struct archive_hash_entry *) entry; -- -- /* Allocate the structure if it has not already been allocated by a -- subclass. */ -- if (ret == NULL) -- ret = (struct archive_hash_entry *) -- bfd_hash_allocate (table, sizeof (struct archive_hash_entry)); -- if (ret == NULL) -- return NULL; -- -- /* Call the allocation method of the superclass. */ -- ret = ((struct archive_hash_entry *) -- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); -- -- if (ret) -- { -- /* Initialize the local fields. */ -- ret->defs = NULL; -- } -- -- return &ret->root; --} -- --/* Initialize an archive hash table. */ -- --static bfd_boolean --archive_hash_table_init -- (struct archive_hash_table *table, -- struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *, -- struct bfd_hash_table *, -- const char *), -- unsigned int entsize) --{ -- return bfd_hash_table_init (&table->table, newfunc, entsize); --} -- --/* Look up an entry in an archive hash table. */ -- --#define archive_hash_lookup(t, string, create, copy) \ -- ((struct archive_hash_entry *) \ -- bfd_hash_lookup (&(t)->table, (string), (create), (copy))) -- --/* Allocate space in an archive hash table. */ -- --#define archive_hash_allocate(t, size) bfd_hash_allocate (&(t)->table, (size)) -- --/* Free an archive hash table. */ -- --#define archive_hash_table_free(t) bfd_hash_table_free (&(t)->table) -- - /* Generic function to add symbols from an archive file to the global - hash file. This function presumes that the archive symbol table - has already been read in (this is normally done by the -- bfd_check_format entry point). It looks through the undefined and -- common symbols and searches the archive symbol table for them. If -- it finds an entry, it includes the associated object file in the -- link. -- -- The old linker looked through the archive symbol table for -- undefined symbols. We do it the other way around, looking through -- undefined symbols for symbols defined in the archive. The -- advantage of the newer scheme is that we only have to look through -- the list of undefined symbols once, whereas the old method had to -- re-search the symbol table each time a new object file was added. -- -- The CHECKFN argument is used to see if an object file should be -- included. CHECKFN should set *PNEEDED to TRUE if the object file -- should be included, and must also call the bfd_link_info -- add_archive_element callback function and handle adding the symbols -- to the global hash table. CHECKFN must notice if the callback -- indicates a substitute BFD, and arrange to add those symbols instead -- if it does so. CHECKFN should only return FALSE if some sort of -- error occurs. -- -- For some formats, such as a.out, it is possible to look through an -- object file but not actually include it in the link. The -- archive_pass field in a BFD is used to avoid checking the symbols -- of an object files too many times. When an object is included in -- the link, archive_pass is set to -1. If an object is scanned but -- not included, archive_pass is set to the pass number. The pass -- number is incremented each time a new object file is included. The -- pass number is used because when a new object file is included it -- may create new undefined symbols which cause a previously examined -- object file to be included. */ -+ bfd_check_format entry point). It looks through the archive symbol -+ table for symbols that are undefined or common in the linker global -+ symbol hash table. When one is found, the CHECKFN argument is used -+ to see if an object file should be included. This allows targets -+ to customize common symbol behaviour. CHECKFN should set *PNEEDED -+ to TRUE if the object file should be included, and must also call -+ the bfd_link_info add_archive_element callback function and handle -+ adding the symbols to the global hash table. CHECKFN must notice -+ if the callback indicates a substitute BFD, and arrange to add -+ those symbols instead if it does so. CHECKFN should only return -+ FALSE if some sort of error occurs. */ - - bfd_boolean - _bfd_generic_link_add_archive_symbols - (bfd *abfd, - struct bfd_link_info *info, -- bfd_boolean (*checkfn) (bfd *, struct bfd_link_info *, bfd_boolean *)) -+ bfd_boolean (*checkfn) (bfd *, struct bfd_link_info *, -+ struct bfd_link_hash_entry *, const char *, -+ bfd_boolean *)) - { -- carsym *arsyms; -- carsym *arsym_end; -- register carsym *arsym; -- int pass; -- struct archive_hash_table arsym_hash; -- unsigned int indx; -- struct bfd_link_hash_entry **pundef; -+ bfd_boolean loop; -+ bfd_size_type amt; -+ unsigned char *included; - - if (! bfd_has_map (abfd)) - { -@@ -1059,148 +944,103 @@ _bfd_generic_link_add_archive_symbols - return FALSE; - } - -- arsyms = bfd_ardata (abfd)->symdefs; -- arsym_end = arsyms + bfd_ardata (abfd)->symdef_count; -- -- /* In order to quickly determine whether an symbol is defined in -- this archive, we build a hash table of the symbols. */ -- if (! archive_hash_table_init (&arsym_hash, archive_hash_newfunc, -- sizeof (struct archive_hash_entry))) -+ amt = bfd_ardata (abfd)->symdef_count; -+ if (amt == 0) -+ return TRUE; -+ amt *= sizeof (*included); -+ included = (unsigned char *) bfd_zmalloc (amt); -+ if (included == NULL) - return FALSE; -- for (arsym = arsyms, indx = 0; arsym < arsym_end; arsym++, indx++) -- { -- struct archive_hash_entry *arh; -- struct archive_list *l, **pp; -- -- arh = archive_hash_lookup (&arsym_hash, arsym->name, TRUE, FALSE); -- if (arh == NULL) -- goto error_return; -- l = ((struct archive_list *) -- archive_hash_allocate (&arsym_hash, sizeof (struct archive_list))); -- if (l == NULL) -- goto error_return; -- l->indx = indx; -- for (pp = &arh->defs; *pp != NULL; pp = &(*pp)->next) -- ; -- *pp = l; -- l->next = NULL; -- } -- -- /* The archive_pass field in the archive itself is used to -- initialize PASS, sine we may search the same archive multiple -- times. */ -- pass = abfd->archive_pass + 1; - -- /* New undefined symbols are added to the end of the list, so we -- only need to look through it once. */ -- pundef = &info->hash->undefs; -- while (*pundef != NULL) -+ do - { -- struct bfd_link_hash_entry *h; -- struct archive_hash_entry *arh; -- struct archive_list *l; -- -- h = *pundef; -- -- /* When a symbol is defined, it is not necessarily removed from -- the list. */ -- if (h->type != bfd_link_hash_undefined -- && h->type != bfd_link_hash_common) -+ carsym *arsyms; -+ carsym *arsym_end; -+ carsym *arsym; -+ unsigned int indx; -+ file_ptr last_ar_offset = -1; -+ bfd_boolean needed = FALSE; -+ bfd *element = NULL; -+ -+ loop = FALSE; -+ arsyms = bfd_ardata (abfd)->symdefs; -+ arsym_end = arsyms + bfd_ardata (abfd)->symdef_count; -+ for (arsym = arsyms, indx = 0; arsym < arsym_end; arsym++, indx++) - { -- /* Remove this entry from the list, for general cleanliness -- and because we are going to look through the list again -- if we search any more libraries. We can't remove the -- entry if it is the tail, because that would lose any -- entries we add to the list later on (it would also cause -- us to lose track of whether the symbol has been -- referenced). */ -- if (*pundef != info->hash->undefs_tail) -- *pundef = (*pundef)->u.undef.next; -- else -- pundef = &(*pundef)->u.undef.next; -- continue; -- } -- -- /* Look for this symbol in the archive symbol map. */ -- arh = archive_hash_lookup (&arsym_hash, h->root.string, FALSE, FALSE); -- if (arh == NULL) -- { -- /* If we haven't found the exact symbol we're looking for, -- let's look for its import thunk */ -- if (info->pei386_auto_import) -- { -- bfd_size_type amt = strlen (h->root.string) + 10; -- char *buf = (char *) bfd_malloc (amt); -- if (buf == NULL) -- return FALSE; -+ struct bfd_link_hash_entry *h; -+ struct bfd_link_hash_entry *undefs_tail; - -- sprintf (buf, "__imp_%s", h->root.string); -- arh = archive_hash_lookup (&arsym_hash, buf, FALSE, FALSE); -- free(buf); -- } -- if (arh == NULL) -+ if (included[indx]) -+ continue; -+ if (needed && arsym->file_offset == last_ar_offset) - { -- pundef = &(*pundef)->u.undef.next; -+ included[indx] = 1; - continue; - } -- } -- /* Look at all the objects which define this symbol. */ -- for (l = arh->defs; l != NULL; l = l->next) -- { -- bfd *element; -- bfd_boolean needed; -- -- /* If the symbol has gotten defined along the way, quit. */ -- if (h->type != bfd_link_hash_undefined -- && h->type != bfd_link_hash_common) -- break; - -- element = bfd_get_elt_at_index (abfd, l->indx); -- if (element == NULL) -- goto error_return; -+ h = bfd_link_hash_lookup (info->hash, arsym->name, -+ FALSE, FALSE, TRUE); - -- /* If we've already included this element, or if we've -- already checked it on this pass, continue. */ -- if (element->archive_pass == -1 -- || element->archive_pass == pass) -+ if (h == NULL -+ && info->pei386_auto_import -+ && CONST_STRNEQ (arsym->name, "__imp_")) -+ h = bfd_link_hash_lookup (info->hash, arsym->name + 6, -+ FALSE, FALSE, TRUE); -+ if (h == NULL) - continue; - -- /* If we can't figure this element out, just ignore it. */ -- if (! bfd_check_format (element, bfd_object)) -+ if (h->type != bfd_link_hash_undefined -+ && h->type != bfd_link_hash_common) - { -- element->archive_pass = -1; -+ if (h->type != bfd_link_hash_undefweak) -+ /* Symbol must be defined. Don't check it again. */ -+ included[indx] = 1; - continue; - } - -+ if (last_ar_offset != arsym->file_offset) -+ { -+ last_ar_offset = arsym->file_offset; -+ element = _bfd_get_elt_at_filepos (abfd, last_ar_offset); -+ if (element == NULL -+ || !bfd_check_format (element, bfd_object)) -+ goto error_return; -+ } -+ -+ undefs_tail = info->hash->undefs_tail; -+ - /* CHECKFN will see if this element should be included, and - go ahead and include it if appropriate. */ -- if (! (*checkfn) (element, info, &needed)) -+ if (! (*checkfn) (element, info, h, arsym->name, &needed)) - goto error_return; - -- if (! needed) -- element->archive_pass = pass; -- else -+ if (needed) - { -- element->archive_pass = -1; -+ unsigned int mark; - -- /* Increment the pass count to show that we may need to -- recheck object files which were already checked. */ -- ++pass; -+ /* Look backward to mark all symbols from this object file -+ which we have already seen in this pass. */ -+ mark = indx; -+ do -+ { -+ included[mark] = 1; -+ if (mark == 0) -+ break; -+ --mark; -+ } -+ while (arsyms[mark].file_offset == last_ar_offset); -+ -+ if (undefs_tail != info->hash->undefs_tail) -+ loop = TRUE; - } - } -+ } while (loop); - -- pundef = &(*pundef)->u.undef.next; -- } -- -- archive_hash_table_free (&arsym_hash); -- -- /* Save PASS in case we are called again. */ -- abfd->archive_pass = pass; -- -+ free (included); - return TRUE; - - error_return: -- archive_hash_table_free (&arsym_hash); -+ free (included); - return FALSE; - } - -@@ -1210,12 +1050,14 @@ _bfd_generic_link_add_archive_symbols - for finding them. */ - - static bfd_boolean --generic_link_check_archive_element_no_collect ( -- bfd *abfd, -+generic_link_check_archive_element_no_collect (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h, -+ const char *name, - bfd_boolean *pneeded) - { -- return generic_link_check_archive_element (abfd, info, pneeded, FALSE); -+ return generic_link_check_archive_element (abfd, info, h, name, pneeded, -+ FALSE); - } - - /* See if we should include an archive element. This version is used -@@ -1225,9 +1067,12 @@ generic_link_check_archive_element_no_collect ( - static bfd_boolean - generic_link_check_archive_element_collect (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h, -+ const char *name, - bfd_boolean *pneeded) - { -- return generic_link_check_archive_element (abfd, info, pneeded, TRUE); -+ return generic_link_check_archive_element (abfd, info, h, name, pneeded, -+ TRUE); - } - - /* See if we should include an archive element. Optionally collect -@@ -1236,6 +1081,8 @@ generic_link_check_archive_element_collect (bfd *abfd, - static bfd_boolean - generic_link_check_archive_element (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h, -+ const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded, - bfd_boolean collect) - { -@@ -1251,7 +1098,6 @@ generic_link_check_archive_element (bfd *abfd, - for (; pp < ppend; pp++) - { - asymbol *p; -- struct bfd_link_hash_entry *h; - - p = *pp; - ---- a/bfd/pdp11.c -+++ a/bfd/pdp11.c -@@ -251,7 +251,7 @@ HOWTO( 1, 0, 1, 16, TRUE, 0, complain_overflow_signed,0,"DISP16", TRU - #define TABLE_SIZE(TABLE) (sizeof(TABLE)/sizeof(TABLE[0])) - - --static bfd_boolean aout_link_check_archive_element (bfd *, struct bfd_link_info *, bfd_boolean *); -+static bfd_boolean aout_link_check_archive_element (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, bfd_boolean *); - static bfd_boolean aout_link_add_object_symbols (bfd *, struct bfd_link_info *); - static bfd_boolean aout_link_add_symbols (bfd *, struct bfd_link_info *); - static bfd_boolean aout_link_write_symbols (struct aout_final_link_info *, bfd *); -@@ -2679,6 +2679,8 @@ aout_link_check_ar_symbols (bfd *abfd, - static bfd_boolean - aout_link_check_archive_element (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, -+ const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) - { - bfd *oldbfd; ---- a/bfd/xcofflink.c -+++ a/bfd/xcofflink.c -@@ -2384,6 +2384,8 @@ xcoff_link_check_ar_symbols (bfd *abfd, - static bfd_boolean - xcoff_link_check_archive_element (bfd *abfd, - struct bfd_link_info *info, -+ struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, -+ const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) - { - bfd_boolean keep_syms_p; -@@ -2463,7 +2465,7 @@ _bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) - bfd_boolean needed; - - if (! xcoff_link_check_archive_element (member, info, -- &needed)) -+ NULL, NULL, &needed)) - return FALSE; - if (needed) - member->archive_pass = -1; diff --git a/mingw-w64-binutils-git/0100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch b/mingw-w64-binutils-git/0100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch deleted file mode 100644 index 642ff58d4e..0000000000 --- a/mingw-w64-binutils-git/0100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -urN binutils-2.24.orig/libiberty/pex-win32.c binutils-2.24libiberty/pex-win32.c ---- binutils-2.24.orig/libiberty/pex-win32.c 2013-12-21 20:21:26.446076700 +0000 -+++ binutils-2.24/libiberty/pex-win32.c 2013-12-22 02:56:54.800559500 +0000 -@@ -340,17 +340,26 @@ - char *p; - size_t cmdline_len; - int i, j, k; -+ int needs_quotes; - - cmdline_len = 0; - for (i = 0; argv[i]; i++) - { -- /* We quote every last argument. This simplifies the problem; -- we need only escape embedded double-quotes and immediately -+ /* We only quote arguments that contain spaces, \n \t \v or " characters -+ to prevent wasting 2 chars per argument of the CreateProcess 32k char limit -+ We need only escape embedded double-quotes and immediately - preceeding backslash characters. A sequence of backslach characters - that is not follwed by a double quote character will not be - escaped. */ -+ needs_quotes = 0; - for (j = 0; argv[i][j]; j++) - { -+ if (argv[i][j] == ' ' || argv[i][j] == '\n' || -+ argv[i][j] == '\t' || argv[i][j] == '"' ) -+ { -+ needs_quotes = 1; -+ } -+ - if (argv[i][j] == '"') - { - /* Escape preceeding backslashes. */ -@@ -362,16 +371,33 @@ - } - /* Trailing backslashes also need to be escaped because they will be - followed by the terminating quote. */ -- for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -- cmdline_len++; -+ if (needs_quotes) -+ { -+ for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -+ cmdline_len++; -+ } - cmdline_len += j; -- cmdline_len += 3; /* for leading and trailing quotes and space */ -+ cmdline_len += 1 + (needs_quotes<<1); /* for leading and trailing quotes and space */ - } - cmdline = XNEWVEC (char, cmdline_len); - p = cmdline; - for (i = 0; argv[i]; i++) - { -- *p++ = '"'; -+ needs_quotes = 0; -+ for (j = 0; argv[i][j]; j++) -+ { -+ if (argv[i][j] == ' ' || argv[i][j] == '\n' || -+ argv[i][j] == '\t' || argv[i][j] == '"' ) -+ { -+ needs_quotes = 1; -+ break; -+ } -+ } -+ -+ if (needs_quotes) -+ { -+ *p++ = '"'; -+ } - for (j = 0; argv[i][j]; j++) - { - if (argv[i][j] == '"') -@@ -382,9 +408,12 @@ - } - *p++ = argv[i][j]; - } -- for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -- *p++ = '\\'; -- *p++ = '"'; -+ if (needs_quotes) -+ { -+ for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -+ *p++ = '\\'; -+ *p++ = '"'; -+ } - *p++ = ' '; - } - p[-1] = '\0'; diff --git a/mingw-w64-binutils-git/0120-This-fixes-a-compile-time-warning.patch b/mingw-w64-binutils-git/0120-This-fixes-a-compile-time-warning.patch deleted file mode 100644 index 34496a39e6..0000000000 --- a/mingw-w64-binutils-git/0120-This-fixes-a-compile-time-warning.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 88667baf24e71481f0002c0452b94a1d53116725 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 25 Apr 2014 17:00:20 +0100 -Subject: [PATCH] This fixes a compile time warning which is being treated as an error. Older - versions of gcc complain about part of a conditional expression always - evaluating to false because of the size of the operands involved, even when - the entire expression is already known to be false. - - * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on - a 342-bit host. This time for older versions of gcc. ---- - bfd/ChangeLog | 6 ++++++ - bfd/peXXigen.c | 10 +++++++++- - 2 files changed, 15 insertions(+), 1 deletions(-) - -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index f22dc90..ccff4ce 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2014-04-25 Nick Clifton -+ -+ PR ld/16821 -+ * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on -+ a 342-bit host. This time for older versions of gcc. -+ - 2014-04-24 Nick Clifton - - * peXXigen.c (rsrc_print_section): Fix compile time warning for -diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c -index d462753..dc45daf 100644 ---- a/bfd/peXXigen.c -+++ b/bfd/peXXigen.c -@@ -236,7 +236,15 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp) - reduce the absolute value to < 1^32, and then transforming the - symbol into a section relative symbol. This of course is a hack. */ - if (sizeof (in->n_value) > 4 -+ /* GCC 4.6.x erroneously complains about the next test always being -+ false when compiled on a 32-bit host. (The sizeof test above -+ should have made the warning unnecessary). Hence we have to -+ predicate the test. It should not matter if the test is omitted -+ since the worst that can happen is that some absolute symbols -+ are needlessly converted to equivalent section relative symbols. */ -+#if defined BFD64 || ! defined __GNUC__ || __GNUC__ > 4 || __GNUC_MINOR__ > 6 - && in->n_value > ((1ULL << 32) - 1) -+#endif - && in->n_scnum == -1) - { - asection * sec; -@@ -248,7 +256,7 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp) - in->n_scnum = sec->target_index; - } - /* else: FIXME: The value is outside the range of any section. This -- happens for __image_base__ and __ImageBase__ and maybe some other -+ happens for __image_base__ and __ImageBase and maybe some other - symbols as well. We should find a way to handle these values. */ - } - --- -1.7.1 - diff --git a/mingw-w64-binutils-git/0130-Bug-16858-weak-external-reference-has-wrong-value.patch b/mingw-w64-binutils-git/0130-Bug-16858-weak-external-reference-has-wrong-value.patch deleted file mode 100644 index 98a25966c1..0000000000 --- a/mingw-w64-binutils-git/0130-Bug-16858-weak-external-reference-has-wrong-value.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gas/config/tc-i386.c -+++ a/gas/config/tc-i386.c -@@ -9145,12 +9145,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) - value += md_pcrel_from (fixP); - #endif - } --#if defined (OBJ_COFF) && defined (TE_PE) -- if (fixP->fx_addsy != NULL && S_IS_WEAK (fixP->fx_addsy)) -- { -- value -= S_GET_VALUE (fixP->fx_addsy); -- } --#endif - - /* Fix a few things - the dynamic linker expects certain values here, - and we must not disappoint it. */ diff --git a/mingw-w64-binutils-git/0140-make-relocbase-unsigned.patch b/mingw-w64-binutils-git/0140-make-relocbase-unsigned.patch deleted file mode 100644 index e68076ba49..0000000000 --- a/mingw-w64-binutils-git/0140-make-relocbase-unsigned.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN binutils-2.24.orig/bfd/libcoff.h binutils-2.24/bfd/libcoff.h ---- binutils-2.24.orig/bfd/libcoff.h 2014-05-24 16:03:12.983980200 +0100 -+++ binutils-2.24/bfd/libcoff.h 2014-05-24 16:04:45.239695200 +0100 -@@ -57,7 +57,7 @@ - unsigned long raw_syment_count; - - /* These are only valid once writing has begun. */ -- long int relocbase; -+ unsigned long int relocbase; - - /* These members communicate important constants about the symbol table - to GDB's symbol-reading code. These `constants' unfortunately vary -diff -urN binutils-2.24.orig/bfd/libcoff-in.h binutils-2.24/bfd/libcoff-in.h ---- binutils-2.24.orig/bfd/libcoff-in.h 2014-05-24 16:03:12.983480200 +0100 -+++ binutils-2.24/bfd/libcoff-in.h 2014-05-24 16:04:27.654962200 +0100 -@@ -53,7 +53,7 @@ - unsigned long raw_syment_count; - - /* These are only valid once writing has begun. */ -- long int relocbase; -+ unsigned long int relocbase; - - /* These members communicate important constants about the symbol table - to GDB's symbol-reading code. These `constants' unfortunately vary diff --git a/mingw-w64-binutils-git/PKGBUILD b/mingw-w64-binutils-git/PKGBUILD index 7729603e23..7c569322d4 100644 --- a/mingw-w64-binutils-git/PKGBUILD +++ b/mingw-w64-binutils-git/PKGBUILD @@ -2,94 +2,49 @@ # Contributor: Ray Donnelly _realname=binutils -_base_ver=2.24 +_base_ver=2.25 pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -replaces="${MINGW_PACKAGE_PREFIX}-${_realname}=${_base_ver}" -pkgver=2.24.78559.d43808f +# replaces="${MINGW_PACKAGE_PREFIX}-${_realname}=${_base_ver}" +pkgver=2.25.r82131.aae60b2 pkgrel=1 +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgdesc="A set of programs to assemble and manipulate binary and object files" arch=('any') url="http://www.gnu.org/software/binutils/" license=('GPL') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +#groups=("${MINGW_PACKAGE_PREFIX}-toolchain") depends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-zlib") #checkdepends=('dejagnu' 'bc') -makedepends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-zlib") -options=('staticlibs' '!distcc' '!ccache') # 'debug' '!strip') +makedepends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-zlib" "git") +options=('staticlibs' '!distcc' '!ccache' 'debug' '!strip') #install=binutils.install source=("${_realname}"::"git://sourceware.org/git/binutils-gdb.git#branch=${_realname}-${_base_ver//./_}-branch" - 0001-enable-gold-on.mingw32.patch - 0002-check-for-unusual-file-harder.patch - 0003-enable-shared-bfd.all.patch - 0003-link-to-libibtl-and-libiberty.mingw.patch - 0004-libiberty-la.mingw.patch - 0005-shared-opcodes.mingw.patch - 0008-fix-libiberty-makefile.mingw.patch - 0009-fix-libiberty-configure.mingw.patch - 0013-dont-link-gas-to-libiberty.mingw.patch - 0014-dont-link-binutils-to-libiberty.mingw.patch - 0015-dont-link-ld-to-libiberty.mingw.patch - 0016-fix-w32-lto-bug-13557.all.patch - 0017-fix-iconv-linking.all.patch - '0100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch' - '0110-binutils-mingw-gnu-print.patch' - '0120-This-fixes-a-compile-time-warning.patch' - '0130-Bug-16858-weak-external-reference-has-wrong-value.patch' - '0140-make-relocbase-unsigned.patch') + 0001-MinGW-w64-Two-fixes-for-unusual-files.patch + 0002-MinGW-w64-Fix-libiberty-makefile.patch + 0003-MinGW-w64-Fix-libibery-configure.patch + 0004-MinGW-w64-Use-gnu-printf.patch + 0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch) md5sums=('SKIP' - 'f3be04ed70b9d352a2c0e2a80b0706b2' - '2cc89a3c09cafa30c91ac890d3c68932' - 'b3580923675b22a78a66788fd70b99b9' - 'bea93b7621fcdf54e91a38cebf9ac68f' - 'a91bbb38f462c26247f317e4004a99fd' - 'bcd56ce925ca7f85e30b42c28af539d1' - 'df13a2462c24d14376a09ec1d1609519' - '9cd71d49b765932a9701b66dfde00775' - '1d439afee5cbcc952719ae40021e6cec' - '6d3610000f041f66ada0a956101faeec' - '33b5eda35272e88b1c308e66484db958' - 'c89eb68fa2ea578f5c0fb6ddaaca7d48' - '66eeb2af697f5f1d0f372185aa2fb737' - 'cc15baf6f7939980c7f406416736baa8' - '6e8b708d437bccbfa46ba56421dabb40' - '10fcfbca65c6939840dd0f4a575b8a99' - '7b0d532ba0419ed2bdae746b1a4f42b6' - '0513245c067162fa9f79b7e0befd201d') + 'e93bc2e2d77d7a9f24c1319ca665276a' + '6bbd2527a3ffb4e3c50ec58d921fbae7' + '182164c2e7109ff3869e7d54bd522561' + '238ba310c7b30eedf19c81088c15fbd4' + '1b907766aebe66585cd14ae4f8ce0e97') pkgver() { cd "$srcdir/$_realname" - printf "%s.%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + printf "%s.r%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd ${srcdir}/${_realname} - - patch -p1 -i "${srcdir}"/0001-enable-gold-on.mingw32.patch - patch -p1 -i "${srcdir}"/0002-check-for-unusual-file-harder.patch - #patch -p1 -i "${srcdir}"/0003-enable-shared-bfd.all.patch - #patch -p1 -i "${srcdir}"/0003-link-to-libibtl-and-libiberty.mingw.patch - #patch -p1 -i "${srcdir}"/0004-libiberty-la.mingw.patch - #patch -p1 -i "${srcdir}"/0005-shared-opcodes.mingw.patch - patch -p1 -i "${srcdir}"/0008-fix-libiberty-makefile.mingw.patch - patch -p1 -i "${srcdir}"/0009-fix-libiberty-configure.mingw.patch - #patch -p1 -i "${srcdir}"/0013-dont-link-gas-to-libiberty.mingw.patch - #patch -p1 -i "${srcdir}"/0014-dont-link-binutils-to-libiberty.mingw.patch - #patch -p1 -i "${srcdir}"/0015-dont-link-ld-to-libiberty.mingw.patch - patch -p1 -i "${srcdir}"/0016-fix-w32-lto-bug-13557.all.patch - #patch -p1 -i "${srcdir}"/0017-fix-iconv-linking.all.patch - patch -p1 -i "${srcdir}"/0100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch - patch -p1 -i "${srcdir}"/0110-binutils-mingw-gnu-print.patch - patch -p1 -i "${srcdir}"/0130-Bug-16858-weak-external-reference-has-wrong-value.patch - -# I ran into a bug building Qt5Webkitd.dll -# "final link failed: File truncated" -# was due to a negative offset ending up in rel_filepos in _bfd_coff_final_link, this -# attempts to double the amount of room we have. - patch -p1 -i "${srcdir}"/0140-make-relocbase-unsigned.patch - - + git am "${srcdir}"/0001-MinGW-w64-Two-fixes-for-unusual-files.patch + git am "${srcdir}"/0002-MinGW-w64-Fix-libiberty-makefile.patch + git am "${srcdir}"/0003-MinGW-w64-Fix-libibery-configure.patch + git am "${srcdir}"/0004-MinGW-w64-Use-gnu-printf.patch + git am "${srcdir}"/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch + rm -rf gdb readline libdecnumber sim } build() { @@ -153,4 +108,6 @@ package() { # Add some useful headers #install -m644 ${srcdir}/${_realname}-${pkgver}/include/libiberty.h ${pkgdir}${MINGW_PREFIX}/include #install -m644 ${srcdir}/${_realname}-${pkgver}/include/demangle.h ${pkgdir}${MINGW_PREFIX}/include + + find ${pkgdir}${MINGW_PREFIX}/share -type f -iname "opcodes.mo" -o -iname "bfd.mo" | xargs -rtl1 rm } diff --git a/mingw-w64-binutils-git/0001-enable-gold-on.mingw32.patch b/mingw-w64-binutils/0001-enable-gold-on.mingw32.patch similarity index 100% rename from mingw-w64-binutils-git/0001-enable-gold-on.mingw32.patch rename to mingw-w64-binutils/0001-enable-gold-on.mingw32.patch diff --git a/mingw-w64-binutils-git/0002-check-for-unusual-file-harder.patch b/mingw-w64-binutils/0002-check-for-unusual-file-harder.patch similarity index 100% rename from mingw-w64-binutils-git/0002-check-for-unusual-file-harder.patch rename to mingw-w64-binutils/0002-check-for-unusual-file-harder.patch diff --git a/mingw-w64-binutils-git/0003-enable-shared-bfd.all.patch b/mingw-w64-binutils/0003-enable-shared-bfd.all.patch similarity index 100% rename from mingw-w64-binutils-git/0003-enable-shared-bfd.all.patch rename to mingw-w64-binutils/0003-enable-shared-bfd.all.patch diff --git a/mingw-w64-binutils-git/0003-link-to-libibtl-and-libiberty.mingw.patch b/mingw-w64-binutils/0003-link-to-libibtl-and-libiberty.mingw.patch similarity index 92% rename from mingw-w64-binutils-git/0003-link-to-libibtl-and-libiberty.mingw.patch rename to mingw-w64-binutils/0003-link-to-libibtl-and-libiberty.mingw.patch index aa0f88f7bf..8060f62568 100644 --- a/mingw-w64-binutils-git/0003-link-to-libibtl-and-libiberty.mingw.patch +++ b/mingw-w64-binutils/0003-link-to-libibtl-and-libiberty.mingw.patch @@ -9,12 +9,10 @@ # Since BFD64_LIBS is optional and we can't have substitution in # libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead. # However, list all sources in EXTRA_libbfd_la_SOURCES so the -@@ -833,7 +835,7 @@ - libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) +@@ -833,6 +835,6 @@ EXTRA_libbfd_la_SOURCES = $(CFILES) libbfd_la_DEPENDENCIES = $(OFILES) ofiles --libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) -+libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) + libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) -libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ +libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ -Wl,--whole-archive -Wl,$(LIBIBERTY) -Wl,$(LIBINTL) -Wl,--no-whole-archive diff --git a/mingw-w64-binutils-git/0004-libiberty-la.mingw.patch b/mingw-w64-binutils/0004-libiberty-la.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0004-libiberty-la.mingw.patch rename to mingw-w64-binutils/0004-libiberty-la.mingw.patch diff --git a/mingw-w64-binutils-git/0005-shared-opcodes.mingw.patch b/mingw-w64-binutils/0005-shared-opcodes.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0005-shared-opcodes.mingw.patch rename to mingw-w64-binutils/0005-shared-opcodes.mingw.patch diff --git a/mingw-w64-binutils-git/0008-fix-libiberty-makefile.mingw.patch b/mingw-w64-binutils/0008-fix-libiberty-makefile.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0008-fix-libiberty-makefile.mingw.patch rename to mingw-w64-binutils/0008-fix-libiberty-makefile.mingw.patch diff --git a/mingw-w64-binutils-git/0009-fix-libiberty-configure.mingw.patch b/mingw-w64-binutils/0009-fix-libiberty-configure.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0009-fix-libiberty-configure.mingw.patch rename to mingw-w64-binutils/0009-fix-libiberty-configure.mingw.patch diff --git a/mingw-w64-binutils-git/0013-dont-link-gas-to-libiberty.mingw.patch b/mingw-w64-binutils/0013-dont-link-gas-to-libiberty.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0013-dont-link-gas-to-libiberty.mingw.patch rename to mingw-w64-binutils/0013-dont-link-gas-to-libiberty.mingw.patch diff --git a/mingw-w64-binutils-git/0014-dont-link-binutils-to-libiberty.mingw.patch b/mingw-w64-binutils/0014-dont-link-binutils-to-libiberty.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0014-dont-link-binutils-to-libiberty.mingw.patch rename to mingw-w64-binutils/0014-dont-link-binutils-to-libiberty.mingw.patch diff --git a/mingw-w64-binutils-git/0015-dont-link-ld-to-libiberty.mingw.patch b/mingw-w64-binutils/0015-dont-link-ld-to-libiberty.mingw.patch similarity index 100% rename from mingw-w64-binutils-git/0015-dont-link-ld-to-libiberty.mingw.patch rename to mingw-w64-binutils/0015-dont-link-ld-to-libiberty.mingw.patch diff --git a/mingw-w64-binutils-git/0017-fix-iconv-linking.all.patch b/mingw-w64-binutils/0017-fix-iconv-linking.all.patch similarity index 100% rename from mingw-w64-binutils-git/0017-fix-iconv-linking.all.patch rename to mingw-w64-binutils/0017-fix-iconv-linking.all.patch diff --git a/mingw-w64-binutils/010-2.23.52-install-libiberty.patch b/mingw-w64-binutils/010-2.23.52-install-libiberty.patch deleted file mode 100644 index f77dba2d7b..0000000000 --- a/mingw-w64-binutils/010-2.23.52-install-libiberty.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- binutils-2.23.52-orig/libiberty/configure 2013-05-31 20:01:43.000000000 -0500 -+++ binutils-2.23.52/libiberty/configure 2013-06-04 15:04:57.162176000 -0500 -@@ -5507,7 +5507,6 @@ fi - - setobjs= - CHECK= --target_header_dir= - if test -n "${with_target_subdir}"; then - - # We are being configured as a target library. AC_REPLACE_FUNCS ---- binutils-2.23.52-orig/libiberty/configure.ac 2013-05-31 20:01:44.000000000 -0500 -+++ binutils-2.23.52/libiberty/configure.ac 2013-06-04 15:04:48.269667400 -0500 -@@ -405,7 +405,6 @@ fi - - setobjs= - CHECK= --target_header_dir= - if test -n "${with_target_subdir}"; then - - # We are being configured as a target library. AC_REPLACE_FUNCS diff --git a/mingw-w64-binutils-git/0110-binutils-mingw-gnu-print.patch b/mingw-w64-binutils/0110-binutils-mingw-gnu-print.patch similarity index 61% rename from mingw-w64-binutils-git/0110-binutils-mingw-gnu-print.patch rename to mingw-w64-binutils/0110-binutils-mingw-gnu-print.patch index 419fd524f3..1a2534ed90 100644 --- a/mingw-w64-binutils-git/0110-binutils-mingw-gnu-print.patch +++ b/mingw-w64-binutils/0110-binutils-mingw-gnu-print.patch @@ -28,12 +28,12 @@ diff -Naur binutils-2.24/binutils/dwarf.c binutils-2.24-mingw/binutils/dwarf.c @@ -140,7 +140,7 @@ } - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) --#ifndef __MINGW32__ + #if defined HAVE_LONG_LONG && SIZEOF_LONG_LONG > SIZEOF_LONG +-# ifndef __MINGW32__ +#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - #define DWARF_VMA_FMT "ll" - #define DWARF_VMA_FMT_LONG "%16.16llx" - #else + # define DWARF_VMA_FMT "ll" + # define DWARF_VMA_FMT_LONG "%16.16llx" + # else diff -Naur binutils-2.24/binutils/nm.c binutils-2.24-mingw/binutils/nm.c --- binutils-2.24/binutils/nm.c 2013-11-08 14:13:48.000000000 +0400 +++ binutils-2.24-mingw/binutils/nm.c 2014-03-13 22:18:43.452800000 +0400 @@ -80,9 +80,9 @@ diff -Naur binutils-2.24/binutils/readelf.c binutils-2.24-mingw/binutils/readelf ? "%16.16llx %16.16llx " : "%12.12llx %12.12llx ", @@ -10836,7 +10836,7 @@ - - if (data < end) { + size_t maxlen = end - data; + -#ifndef __MSVCRT__ +#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) /* PR 11128: Use two separate invocations in order to work @@ -91,32 +91,32 @@ diff -Naur binutils-2.24/binutils/readelf.c binutils-2.24-mingw/binutils/readelf diff -Naur binutils-2.24/binutils/strings.c binutils-2.24-mingw/binutils/strings.c --- binutils-2.24/binutils/strings.c 2013-11-04 19:33:37.000000000 +0400 +++ binutils-2.24-mingw/binutils/strings.c 2014-03-13 22:21:29.140400000 +0400 -@@ -557,7 +557,7 @@ - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +@@ -582,7 +582,7 @@ + #ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { --#ifndef __MSVCRT__ +-# ifndef __MSVCRT__ +#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) printf ("%7llo ", (unsigned long long) start); - #else + # else printf ("%7I64o ", (unsigned long long) start); -@@ -576,7 +576,7 @@ - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +@@ -601,7 +601,7 @@ + #ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { --#ifndef __MSVCRT__ +-# ifndef __MSVCRT__ +#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) printf ("%7lld ", (unsigned long long) start); - #else + # else printf ("%7I64d ", (unsigned long long) start); -@@ -595,7 +595,7 @@ - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +@@ -620,7 +620,7 @@ + #ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { --#ifndef __MSVCRT__ +-# ifndef __MSVCRT__ +#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) printf ("%7llx ", (unsigned long long) start); - #else + # else printf ("%7I64x ", (unsigned long long) start); diff -Naur binutils-2.24/gas/read.c binutils-2.24-mingw/gas/read.c --- binutils-2.24/gas/read.c 2013-11-08 14:13:48.000000000 +0400 @@ -130,3 +130,60 @@ diff -Naur binutils-2.24/gas/read.c binutils-2.24-mingw/gas/read.c as_warn (_("value 0x%llx truncated to 0x%llx"), (unsigned long long) get, (unsigned long long) use); #else +--- binutils-2.25/gas/as.h.orig 2014-12-26 08:20:07.506000000 +0300 ++++ binutils-2.25/gas/as.h 2014-12-26 08:21:13.350000000 +0300 +@@ -451,10 +451,10 @@ + + #define PRINTF_LIKE(FCN) \ + void FCN (const char *format, ...) \ +- __attribute__ ((__format__ (__printf__, 1, 2))) ++ __attribute__ ((__format__ (gnu_printf, 1, 2))) + #define PRINTF_WHERE_LIKE(FCN) \ + void FCN (char *file, unsigned int line, const char *format, ...) \ +- __attribute__ ((__format__ (__printf__, 3, 4))) ++ __attribute__ ((__format__ (gnu_printf, 3, 4))) + + #else /* __GNUC__ < 2 || defined(VMS) */ + +--- binutils-2.25/gold/configure.orig 2014-12-26 08:22:19.978000000 +0300 ++++ binutils-2.25/gold/configure 2014-12-26 08:22:23.697000000 +0300 +@@ -7530,7 +7530,7 @@ + /* end confdefs.h. */ + + template extern void foo(const char*, ...) +- __attribute__ ((__format__ (__printf__, 1, 2))); ++ __attribute__ ((__format__ (gnu_printf, 1, 2))); + template void foo(const char* format, ...) {} + void bar() { foo("%s\n", "foo"); } + +--- binutils-2.25/gold/configure.ac.orig 2014-12-26 08:22:49.521000000 +0300 ++++ binutils-2.25/gold/configure.ac 2014-12-26 08:23:05.556000000 +0300 +@@ -601,7 +601,7 @@ + [gold_cv_template_attribute], + [AC_COMPILE_IFELSE([ + template extern void foo(const char*, ...) +- __attribute__ ((__format__ (__printf__, 1, 2))); ++ __attribute__ ((__format__ (gnu_printf, 1, 2))); + template void foo(const char* format, ...) {} + void bar() { foo("%s\n", "foo"); } + ], [gold_cv_template_attribute=yes], [gold_cv_template_attribute=no])]) +--- binutils-2.25/include/ansidecl.h.orig 2014-12-26 08:23:33.513000000 +0300 ++++ binutils-2.25/include/ansidecl.h 2014-12-26 08:24:16.479000000 +0300 +@@ -197,7 +197,7 @@ + before GCC 3.3, but as of 3.3 we need to add the `nonnull' + attribute to retain this behavior. */ + #ifndef ATTRIBUTE_PRINTF +-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m) ++#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) ATTRIBUTE_NONNULL(m) + #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) + #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) + #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) +@@ -225,7 +225,7 @@ + NULL format specifier was allowed as of gcc 3.3. */ + #ifndef ATTRIBUTE_NULL_PRINTF + # if (GCC_VERSION >= 3003) +-# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ++# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) + # else + # define ATTRIBUTE_NULL_PRINTF(m, n) + # endif /* GNUC >= 3.3 */ diff --git a/mingw-w64-binutils/020-add-bigobj-format.patch b/mingw-w64-binutils/020-add-bigobj-format.patch deleted file mode 100644 index 8591969578..0000000000 --- a/mingw-w64-binutils/020-add-bigobj-format.patch +++ /dev/null @@ -1,942 +0,0 @@ -From 167ad85bf06582759e8dfe021aac9da79b81340d Mon Sep 17 00:00:00 2001 -From: Tristan Gingold -Date: Mon, 2 Dec 2013 14:30:32 +0100 -Subject: [PATCH] Add pe/x86_64 bigobj file format. - -bfd/ - * peicode.h (pe_ILF_object_p): Adjust, as the version number - has been read. - (pe_bfd_object_p): Also read version number to detect ILF. - * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define. - (x86_64pe_bigobj_vec): Define - * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field. - (bfd_coff_max_nscns): New macro. - (coff_compute_section_file_positions): Use unsigned int for - target_index. Compare with bfd_coff_max_nscns. - (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table): - Set a value for _bfd_coff_max_nscns. - (header_bigobj_classid): New constant. - (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out) - (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out) - (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New - functions. - (bigobj_swap_table): New table. - * libcoff.h: Regenerate. - * coff-sh.c (bfd_coff_small_swap_table): Likewise. - * coff-alpha.c (alpha_ecoff_backend_data): Add value for - _bfd_coff_max_nscns. - * coff-mips.c (mips_ecoff_backend_data): Likewise. - * coff-rs6000.c (bfd_xcoff_backend_data) - (bfd_pmac_xcoff_backend_data): Likewise. - * coff64-rs6000.c (bfd_xcoff_backend_data) - (bfd_xcoff_aix5_backend_data): Likewise. - * targets.c (x86_64pe_bigobj_vec): Declare. - * configure.in (x86_64pe_bigobj_vec): New vector. - * configure: Regenerate. - * config.bfd: Add bigobj object format for Windows targets. - -gas/ - * config/tc-i386.c (use_big_obj): Declare. - (OPTION_MBIG_OBJ): Define. - (md_longopts): Add -mbig-obj option. - (md_parse_option): Handle it. - (md_show_usage): Display help for this option. - (i386_target_format): Use bigobj for x86-64 if -mbig-obj. - * doc/c-i386.texi: Document the option. - -gas/testsuite/ - * gas/pe/big-obj.d, gas/pe/big-obj.s: Add test. - * gas/pe/pe.exp: Add test. - -include/coff/ - * pe.h (struct external_ANON_OBJECT_HEADER_BIGOBJ): Declare. - (FILHSZ_BIGOBJ): Define. - (struct external_SYMBOL_EX): Declare. - (SYMENT_BIGOBJ, SYMESZ_BIGOBJ): Define. - (union external_AUX_SYMBOL_EX): Declare. - (AUXENT_BIGOBJ, AUXESZ_BIGOBJ): Define. - * internal.h (struct internal_filehdr): Change type - of f_nscns. ---- - bfd/ChangeLog | 33 ++++++ - bfd/coff-alpha.c | 2 +- - bfd/coff-mips.c | 2 +- - bfd/coff-rs6000.c | 2 + - bfd/coff-sh.c | 1 + - bfd/coff64-rs6000.c | 2 + - bfd/coffcode.h | 258 ++++++++++++++++++++++++++++++++++++++++- - bfd/config.bfd | 2 +- - bfd/configure | 1 + - bfd/configure.in | 1 + - bfd/libcoff.h | 4 + - bfd/pe-x86_64.c | 54 +++++++++ - bfd/peicode.h | 19 ++- - bfd/targets.c | 2 + - gas/ChangeLog | 10 ++ - gas/config/tc-i386.c | 24 +++- - gas/doc/c-i386.texi | 5 + - gas/testsuite/ChangeLog | 5 + - gas/testsuite/gas/pe/big-obj.d | 11 ++ - gas/testsuite/gas/pe/big-obj.s | 16 +++ - gas/testsuite/gas/pe/pe.exp | 8 ++ - include/coff/ChangeLog | 11 ++ - include/coff/internal.h | 2 +- - include/coff/pe.h | 79 +++++++++++++ - 24 files changed, 537 insertions(+), 17 deletions(-) - create mode 100644 gas/testsuite/gas/pe/big-obj.d - create mode 100644 gas/testsuite/gas/pe/big-obj.s - -diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c -index a7a977c..8c68b56 100644 ---- a/bfd/coff-alpha.c -+++ b/bfd/coff-alpha.c -@@ -2241,7 +2241,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = - alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, - alpha_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, -- ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, -+ ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, - alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, - alpha_ecoff_swap_scnhdr_in, NULL, - alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, -diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c -index 454f89a..3a30d83 100644 ---- a/bfd/coff-mips.c -+++ b/bfd/coff-mips.c -@@ -1254,7 +1254,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = - mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out, - mips_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, -- ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, -+ ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, - mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in, - mips_ecoff_swap_scnhdr_in, NULL, - mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, -diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c -index 06ee721..d0b8eaf 100644 ---- a/bfd/coff-rs6000.c -+++ b/bfd/coff-rs6000.c -@@ -4105,6 +4105,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = - 3, /* _bfd_coff_default_section_alignment_power */ - FALSE, /* _bfd_coff_force_symnames_in_strings */ - 2, /* _bfd_coff_debug_string_prefix_length */ -+ 32768, /* _bfd_coff_max_nscns */ - coff_swap_filehdr_in, - coff_swap_aouthdr_in, - coff_swap_scnhdr_in, -@@ -4285,6 +4286,7 @@ static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data = - 3, /* _bfd_coff_default_section_alignment_power */ - FALSE, /* _bfd_coff_force_symnames_in_strings */ - 2, /* _bfd_coff_debug_string_prefix_length */ -+ 32768, /* _bfd_coff_max_nscns */ - coff_swap_filehdr_in, - coff_swap_aouthdr_in, - coff_swap_scnhdr_in, -diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c -index aca2b8b..1bf3f21 100644 ---- a/bfd/coff-sh.c -+++ b/bfd/coff-sh.c -@@ -3090,6 +3090,7 @@ static bfd_coff_backend_data bfd_coff_small_swap_table = - #else - 2, - #endif -+ 32768, - coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, - coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, - coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, -diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c -index 4bc7ea8..d660e3a5 100644 ---- a/bfd/coff64-rs6000.c -+++ b/bfd/coff64-rs6000.c -@@ -2542,6 +2542,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = - 3, /* _bfd_coff_default_section_alignment_power */ - TRUE, /* _bfd_coff_force_symnames_in_strings */ - 4, /* _bfd_coff_debug_string_prefix_length */ -+ 32768, /* _bfd_coff_max_nscns */ - coff_swap_filehdr_in, - coff_swap_aouthdr_in, - coff_swap_scnhdr_in, -@@ -2801,6 +2802,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data = - 3, /* _bfd_coff_default_section_alignment_power */ - TRUE, /* _bfd_coff_force_symnames_in_strings */ - 4, /* _bfd_coff_debug_string_prefix_length */ -+ 32768, /* _bfd_coff_max_nscns */ - coff_swap_filehdr_in, - coff_swap_aouthdr_in, - coff_swap_scnhdr_in, -diff --git a/bfd/coffcode.h b/bfd/coffcode.h -index 11e70a5..d6fe39f 100644 ---- a/bfd/coffcode.h -+++ b/bfd/coffcode.h -@@ -1393,6 +1393,7 @@ Special entry points for gdb to swap in coff symbol table parts: - . unsigned int _bfd_coff_default_section_alignment_power; - . bfd_boolean _bfd_coff_force_symnames_in_strings; - . unsigned int _bfd_coff_debug_string_prefix_length; -+. unsigned int _bfd_coff_max_nscns; - . - . void (*_bfd_coff_swap_filehdr_in) - . (bfd *, void *, void *); -@@ -1530,6 +1531,9 @@ Special entry points for gdb to swap in coff symbol table parts: - . ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) - .#define bfd_coff_default_section_alignment_power(abfd) \ - . (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) -+.#define bfd_coff_max_nscns(abfd) \ -+. (coff_backend_info (abfd)->_bfd_coff_max_nscns) -+. - .#define bfd_coff_swap_filehdr_in(abfd, i,o) \ - . ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) - . -@@ -3136,7 +3140,7 @@ coff_compute_section_file_positions (bfd * abfd) - asection *current; - file_ptr sofar = bfd_coff_filhsz (abfd); - bfd_boolean align_adjust; -- int target_index; -+ unsigned int target_index; - #ifdef ALIGN_SECTIONS_IN_FILE - asection *previous = NULL; - file_ptr old_sofar; -@@ -3304,7 +3308,7 @@ coff_compute_section_file_positions (bfd * abfd) - } - #endif /* ! COFF_IMAGE_WITH_PE */ - -- if (target_index >= 32768) -+ if (target_index >= bfd_coff_max_nscns (abfd)) - { - bfd_set_error (bfd_error_file_too_big); - (*_bfd_error_handler) -@@ -5497,6 +5501,7 @@ static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = - #else - 2, - #endif -+ 32768, - coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, - coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, - coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, -@@ -5537,6 +5542,7 @@ static bfd_coff_backend_data ticoff0_swap_table = - #else - 2, - #endif -+ 32768, - coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, - coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook, - coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, -@@ -5578,6 +5584,7 @@ static bfd_coff_backend_data ticoff1_swap_table = - #else - 2, - #endif -+ 32768, - coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, - coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook, - coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, -@@ -5591,6 +5598,253 @@ static bfd_coff_backend_data ticoff1_swap_table = - }; - #endif - -+#ifdef COFF_WITH_PE_BIGOBJ -+/* The UUID for bigobj files. */ -+ -+static const char header_bigobj_classid[16] = -+{ -+ 0xC7, 0xA1, 0xBA, 0xD1, -+ 0xEE, 0xBA, -+ 0xa9, 0x4b, -+ 0xAF, 0x20, -+ 0xFA, 0xF6, 0x6A, 0xA4, 0xDC, 0xB8 -+}; -+ -+/* Swap routines. */ -+ -+static void -+coff_bigobj_swap_filehdr_in (bfd * abfd, void * src, void * dst) -+{ -+ struct external_ANON_OBJECT_HEADER_BIGOBJ *filehdr_src = -+ (struct external_ANON_OBJECT_HEADER_BIGOBJ *) src; -+ struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; -+ -+ filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->Machine); -+ filehdr_dst->f_nscns = H_GET_32 (abfd, filehdr_src->NumberOfSections); -+ filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->TimeDateStamp); -+ filehdr_dst->f_symptr = -+ GET_FILEHDR_SYMPTR (abfd, filehdr_src->PointerToSymbolTable); -+ filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->NumberOfSymbols); -+ filehdr_dst->f_opthdr = 0; -+ filehdr_dst->f_flags = 0; -+ -+ /* Check other magic numbers. */ -+ if (H_GET_16 (abfd, filehdr_src->Sig1) != IMAGE_FILE_MACHINE_UNKNOWN -+ || H_GET_16 (abfd, filehdr_src->Sig2) != 0xffff -+ || H_GET_16 (abfd, filehdr_src->Version) != 2 -+ || memcmp (filehdr_src->ClassID, header_bigobj_classid, 16) != 0) -+ filehdr_dst->f_opthdr = 0xffff; -+ -+ /* Note that CLR metadata are ignored. */ -+} -+ -+static unsigned int -+coff_bigobj_swap_filehdr_out (bfd *abfd, void * in, void * out) -+{ -+ struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; -+ struct external_ANON_OBJECT_HEADER_BIGOBJ *filehdr_out = -+ (struct external_ANON_OBJECT_HEADER_BIGOBJ *) out; -+ -+ memset (filehdr_out, 0, sizeof (*filehdr_out)); -+ -+ H_PUT_16 (abfd, IMAGE_FILE_MACHINE_UNKNOWN, filehdr_out->Sig1); -+ H_PUT_16 (abfd, 0xffff, filehdr_out->Sig2); -+ H_PUT_16 (abfd, 2, filehdr_out->Version); -+ memcpy (filehdr_out->ClassID, header_bigobj_classid, 16); -+ H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->Machine); -+ H_PUT_32 (abfd, filehdr_in->f_nscns, filehdr_out->NumberOfSections); -+ H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->TimeDateStamp); -+ PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, -+ filehdr_out->PointerToSymbolTable); -+ H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->NumberOfSymbols); -+ -+ return bfd_coff_filhsz (abfd); -+} -+ -+static void -+coff_bigobj_swap_sym_in (bfd * abfd, void * ext1, void * in1) -+{ -+ SYMENT_BIGOBJ *ext = (SYMENT_BIGOBJ *) ext1; -+ struct internal_syment *in = (struct internal_syment *) in1; -+ -+ if (ext->e.e_name[0] == 0) -+ { -+ in->_n._n_n._n_zeroes = 0; -+ in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); -+ } -+ else -+ { -+#if SYMNMLEN != E_SYMNMLEN -+#error we need to cope with truncating or extending SYMNMLEN -+#else -+ memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); -+#endif -+ } -+ -+ in->n_value = H_GET_32 (abfd, ext->e_value); -+ in->n_scnum = H_GET_32 (abfd, ext->e_scnum); -+ in->n_type = H_GET_16 (abfd, ext->e_type); -+ in->n_sclass = H_GET_8 (abfd, ext->e_sclass); -+ in->n_numaux = H_GET_8 (abfd, ext->e_numaux); -+} -+ -+static unsigned int -+coff_bigobj_swap_sym_out (bfd * abfd, void * inp, void * extp) -+{ -+ struct internal_syment *in = (struct internal_syment *) inp; -+ SYMENT_BIGOBJ *ext = (SYMENT_BIGOBJ *) extp; -+ -+ if (in->_n._n_name[0] == 0) -+ { -+ H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); -+ H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); -+ } -+ else -+ { -+#if SYMNMLEN != E_SYMNMLEN -+#error we need to cope with truncating or extending SYMNMLEN -+#else -+ memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); -+#endif -+ } -+ -+ H_PUT_32 (abfd, in->n_value, ext->e_value); -+ H_PUT_32 (abfd, in->n_scnum, ext->e_scnum); -+ -+ H_PUT_16 (abfd, in->n_type, ext->e_type); -+ H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); -+ H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); -+ -+ return SYMESZ_BIGOBJ; -+} -+ -+static void -+coff_bigobj_swap_aux_in (bfd *abfd, -+ void * ext1, -+ int type, -+ int in_class, -+ int indx, -+ int numaux, -+ void * in1) -+{ -+ AUXENT_BIGOBJ *ext = (AUXENT_BIGOBJ *) ext1; -+ union internal_auxent *in = (union internal_auxent *) in1; -+ -+ switch (in_class) -+ { -+ case C_FILE: -+ if (numaux > 1) -+ { -+ if (indx == 0) -+ memcpy (in->x_file.x_fname, ext->File.Name, -+ numaux * sizeof (AUXENT_BIGOBJ)); -+ } -+ else -+ memcpy (in->x_file.x_fname, ext->File.Name, sizeof (ext->File.Name)); -+ break; -+ -+ case C_STAT: -+ case C_LEAFSTAT: -+ case C_HIDDEN: -+ if (type == T_NULL) -+ { -+ in->x_scn.x_scnlen = H_GET_32 (abfd, ext->Section.Length); -+ in->x_scn.x_nreloc = -+ H_GET_16 (abfd, ext->Section.NumberOfRelocations); -+ in->x_scn.x_nlinno = -+ H_GET_16 (abfd, ext->Section.NumberOfLinenumbers); -+ in->x_scn.x_checksum = H_GET_32 (abfd, ext->Section.Checksum); -+ in->x_scn.x_associated = H_GET_16 (abfd, ext->Section.Number) -+ | (H_GET_16 (abfd, ext->Section.HighNumber) << 16); -+ in->x_scn.x_comdat = H_GET_8 (abfd, ext->Section.Selection); -+ return; -+ } -+ break; -+ -+ default: -+ in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->Sym.WeakDefaultSymIndex); -+ /* Characteristics is ignored. */ -+ break; -+ } -+} -+ -+static unsigned int -+coff_bigobj_swap_aux_out (bfd * abfd, -+ void * inp, -+ int type, -+ int in_class, -+ int indx ATTRIBUTE_UNUSED, -+ int numaux ATTRIBUTE_UNUSED, -+ void * extp) -+{ -+ union internal_auxent * in = (union internal_auxent *) inp; -+ AUXENT_BIGOBJ *ext = (AUXENT_BIGOBJ *) extp; -+ -+ memset (ext, 0, AUXESZ); -+ -+ switch (in_class) -+ { -+ case C_FILE: -+ memcpy (ext->File.Name, in->x_file.x_fname, sizeof (ext->File.Name)); -+ -+ return AUXESZ; -+ -+ case C_STAT: -+ case C_LEAFSTAT: -+ case C_HIDDEN: -+ if (type == T_NULL) -+ { -+ H_PUT_32 (abfd, in->x_scn.x_scnlen, ext->Section.Length); -+ H_PUT_16 (abfd, in->x_scn.x_nreloc, -+ ext->Section.NumberOfRelocations); -+ H_PUT_16 (abfd, in->x_scn.x_nlinno, -+ ext->Section.NumberOfLinenumbers); -+ H_PUT_32 (abfd, in->x_scn.x_checksum, ext->Section.Checksum); -+ H_PUT_16 (abfd, in->x_scn.x_associated & 0xffff, -+ ext->Section.Number); -+ H_PUT_16 (abfd, (in->x_scn.x_associated >> 16), -+ ext->Section.HighNumber); -+ H_PUT_8 (abfd, in->x_scn.x_comdat, ext->Section.Selection); -+ return AUXESZ; -+ } -+ break; -+ } -+ -+ H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->Sym.WeakDefaultSymIndex); -+ H_PUT_32 (abfd, 1, ext->Sym.WeakSearchType); -+ -+ return AUXESZ; -+} -+ -+static bfd_coff_backend_data bigobj_swap_table = -+{ -+ coff_bigobj_swap_aux_in, coff_bigobj_swap_sym_in, coff_SWAP_lineno_in, -+ coff_bigobj_swap_aux_out, coff_bigobj_swap_sym_out, -+ coff_SWAP_lineno_out, coff_SWAP_reloc_out, -+ coff_bigobj_swap_filehdr_out, coff_SWAP_aouthdr_out, -+ coff_SWAP_scnhdr_out, -+ FILHSZ_BIGOBJ, AOUTSZ, SCNHSZ, SYMESZ_BIGOBJ, AUXESZ_BIGOBJ, -+ RELSZ, LINESZ, FILNMLEN_BIGOBJ, -+ TRUE, -+ COFF_DEFAULT_LONG_SECTION_NAMES, -+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER, -+ FALSE, -+ 2, -+ 1U << 31, -+ coff_bigobj_swap_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, -+ coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, -+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, -+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook, -+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate, -+ coff_classify_symbol, coff_compute_section_file_positions, -+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto, -+ coff_adjust_symndx, coff_link_add_one_symbol, -+ coff_link_output_has_begun, coff_final_link_postscript, -+ bfd_pe_print_pdata /* huh */ -+}; -+ -+#endif /* COFF_WITH_PE_BIGOBJ */ -+ - #ifndef coff_close_and_cleanup - #define coff_close_and_cleanup _bfd_generic_close_and_cleanup - #endif -diff --git a/bfd/config.bfd b/bfd/config.bfd -index 59b9f64..147954a 100644 ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -676,7 +676,7 @@ case "${targ}" in - ;; - x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin) - targ_defvec=x86_64pe_vec -- targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386pe_vec i386pei_vec bfd_elf32_i386_vec" -+ targ_selvecs="x86_64pe_vec x86_64pei_vec x86_64pe_bigobj_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386pe_vec i386pei_vec bfd_elf32_i386_vec" - want64=true - targ_underscore=no - ;; -diff --git a/bfd/configure b/bfd/configure -index bef7295..fbf5f44 100755 ---- a/bfd/configure -+++ b/bfd/configure -@@ -15453,6 +15453,7 @@ do - i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; - x86_64pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - x86_64pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; -+ x86_64pe_bigobj_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; - icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; - icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; -diff --git a/bfd/configure.in b/bfd/configure.in -index da8c6dc..f1ec965 100644 ---- a/bfd/configure.in -+++ b/bfd/configure.in -@@ -942,6 +942,7 @@ do - i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; - x86_64pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - x86_64pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; -+ x86_64pe_bigobj_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; - icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; - icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; -diff --git a/bfd/libcoff.h b/bfd/libcoff.h -index b5a9852..36c9829 100644 ---- a/bfd/libcoff.h -+++ b/bfd/libcoff.h -@@ -736,6 +736,7 @@ typedef struct - unsigned int _bfd_coff_default_section_alignment_power; - bfd_boolean _bfd_coff_force_symnames_in_strings; - unsigned int _bfd_coff_debug_string_prefix_length; -+ unsigned int _bfd_coff_max_nscns; - - void (*_bfd_coff_swap_filehdr_in) - (bfd *, void *, void *); -@@ -873,6 +874,9 @@ typedef struct - ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) - #define bfd_coff_default_section_alignment_power(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) -+#define bfd_coff_max_nscns(abfd) \ -+ (coff_backend_info (abfd)->_bfd_coff_max_nscns) -+ - #define bfd_coff_swap_filehdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) - -diff --git a/bfd/pe-x86_64.c b/bfd/pe-x86_64.c -index 26bb99d..16b13ec 100644 ---- a/bfd/pe-x86_64.c -+++ b/bfd/pe-x86_64.c -@@ -27,6 +27,7 @@ - #define TARGET_NAME "pe-x86-64" - #define COFF_WITH_PE - #define COFF_WITH_pex64 -+#define COFF_WITH_PE_BIGOBJ - #define PCRELOFFSET TRUE - #if defined (USE_MINGW64_LEADING_UNDERSCORES) - #define TARGET_UNDERSCORE '_' -@@ -58,3 +59,56 @@ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } - - #include "coff-x86_64.c" -+ -+/* Entry for big object files. */ -+ -+const bfd_target -+x86_64pe_bigobj_vec = -+{ -+ "pe-bigobj-x86-64", /* Name. */ -+ bfd_target_coff_flavour, -+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */ -+ BFD_ENDIAN_LITTLE, /* Header byte order is little. */ -+ -+ (HAS_RELOC | EXEC_P | /* Object flags. */ -+ HAS_LINENO | HAS_DEBUG | -+ HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS), -+ -+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */ -+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY | SEC_DEBUGGING -+ | SEC_CODE | SEC_DATA | SEC_EXCLUDE ), -+ -+ TARGET_UNDERSCORE, /* Leading underscore. */ -+ '/', /* Ar_pad_char. */ -+ 15, /* Ar_max_namelen. */ -+ 0, /* match priority. */ -+ -+ bfd_getl64, bfd_getl_signed_64, bfd_putl64, -+ bfd_getl32, bfd_getl_signed_32, bfd_putl32, -+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */ -+ bfd_getl64, bfd_getl_signed_64, bfd_putl64, -+ bfd_getl32, bfd_getl_signed_32, bfd_putl32, -+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Hdrs. */ -+ -+ /* Note that we allow an object file to be treated as a core file as well. */ -+ { _bfd_dummy_target, amd64coff_object_p, /* BFD_check_format. */ -+ bfd_generic_archive_p, amd64coff_object_p }, -+ { bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format. */ -+ bfd_false }, -+ { bfd_false, coff_write_object_contents, /* bfd_write_contents. */ -+ _bfd_write_archive_contents, bfd_false }, -+ -+ BFD_JUMP_TABLE_GENERIC (coff), -+ BFD_JUMP_TABLE_COPY (coff), -+ BFD_JUMP_TABLE_CORE (_bfd_nocore), -+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), -+ BFD_JUMP_TABLE_SYMBOLS (coff), -+ BFD_JUMP_TABLE_RELOCS (coff), -+ BFD_JUMP_TABLE_WRITE (coff), -+ BFD_JUMP_TABLE_LINK (coff), -+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), -+ -+ NULL, -+ -+ &bigobj_swap_table -+}; -diff --git a/bfd/peicode.h b/bfd/peicode.h -index 8fd689c..157879b 100644 ---- a/bfd/peicode.h -+++ b/bfd/peicode.h -@@ -1077,7 +1077,7 @@ pe_ILF_build_a_bfd (bfd * abfd, - static const bfd_target * - pe_ILF_object_p (bfd * abfd) - { -- bfd_byte buffer[16]; -+ bfd_byte buffer[14]; - bfd_byte * ptr; - char * symbol_name; - char * source_dll; -@@ -1087,17 +1087,13 @@ pe_ILF_object_p (bfd * abfd) - unsigned int types; - unsigned int magic; - -- /* Upon entry the first four buyes of the ILF header have -+ /* Upon entry the first six bytes of the ILF header have - already been read. Now read the rest of the header. */ -- if (bfd_bread (buffer, (bfd_size_type) 16, abfd) != 16) -+ if (bfd_bread (buffer, (bfd_size_type) 14, abfd) != 14) - return NULL; - - ptr = buffer; - -- /* We do not bother to check the version number. -- version = H_GET_16 (abfd, ptr); */ -- ptr += 2; -- - machine = H_GET_16 (abfd, ptr); - ptr += 2; - -@@ -1251,7 +1247,7 @@ pe_ILF_object_p (bfd * abfd) - static const bfd_target * - pe_bfd_object_p (bfd * abfd) - { -- bfd_byte buffer[4]; -+ bfd_byte buffer[6]; - struct external_PEI_DOS_hdr dos_hdr; - struct external_PEI_IMAGE_hdr image_hdr; - struct internal_filehdr internal_f; -@@ -1260,15 +1256,18 @@ pe_bfd_object_p (bfd * abfd) - file_ptr offset; - - /* Detect if this a Microsoft Import Library Format element. */ -+ /* First read the beginning of the header. */ - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 -- || bfd_bread (buffer, (bfd_size_type) 4, abfd) != 4) -+ || bfd_bread (buffer, (bfd_size_type) 6, abfd) != 6) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - -- if (H_GET_32 (abfd, buffer) == 0xffff0000) -+ /* Then check the magic and the version (only 0 is supported). */ -+ if (H_GET_32 (abfd, buffer) == 0xffff0000 -+ && H_GET_16 (abfd, buffer + 4) == 0) - return pe_ILF_object_p (abfd); - - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 -diff --git a/bfd/targets.c b/bfd/targets.c -index f502eec..058ab77 100644 ---- a/bfd/targets.c -+++ b/bfd/targets.c -@@ -896,6 +896,7 @@ extern const bfd_target w65_vec; - extern const bfd_target we32kcoff_vec; - extern const bfd_target x86_64pe_vec; - extern const bfd_target x86_64pei_vec; -+extern const bfd_target x86_64pe_bigobj_vec; - extern const bfd_target x86_64coff_vec; - extern const bfd_target z80coff_vec; - extern const bfd_target z8kcoff_vec; -@@ -1231,6 +1232,7 @@ static const bfd_target * const _bfd_target_vector[] = - &x86_64coff_vec, - &x86_64pe_vec, - &x86_64pei_vec, -+ &x86_64pe_bigobj_vec, - #endif - &i860coff_vec, - &icoff_big_vec, -diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c -index f6283a6..734935a 100644 ---- a/gas/config/tc-i386.c -+++ b/gas/config/tc-i386.c -@@ -513,6 +513,11 @@ enum x86_elf_abi - static enum x86_elf_abi x86_elf_abi = I386_ABI; - #endif - -+#if defined (TE_PE) || defined (TE_PEP) -+/* Use big object file format. */ -+static int use_big_obj = 0; -+#endif -+ - /* 1 for intel syntax, - 0 if att syntax. */ - static int intel_syntax = 0; -@@ -9497,6 +9502,7 @@ const char *md_shortopts = "qn"; - #define OPTION_MADD_BND_PREFIX (OPTION_MD_BASE + 15) - #define OPTION_MEVEXLIG (OPTION_MD_BASE + 16) - #define OPTION_MEVEXWIG (OPTION_MD_BASE + 17) -+#define OPTION_MBIG_OBJ (OPTION_MD_BASE + 18) - - struct option md_longopts[] = - { -@@ -9523,6 +9529,9 @@ struct option md_longopts[] = - {"madd-bnd-prefix", no_argument, NULL, OPTION_MADD_BND_PREFIX}, - {"mevexlig", required_argument, NULL, OPTION_MEVEXLIG}, - {"mevexwig", required_argument, NULL, OPTION_MEVEXWIG}, -+# if defined (TE_PE) || defined (TE_PEP) -+ {"mbig-obj", no_argument, NULL, OPTION_MBIG_OBJ}, -+#endif - {NULL, no_argument, NULL, 0} - }; - size_t md_longopts_size = sizeof (md_longopts); -@@ -9804,6 +9813,12 @@ md_parse_option (int c, char *arg) - as_fatal (_("invalid -mevexwig= option: `%s'"), arg); - break; - -+# if defined (TE_PE) || defined (TE_PEP) -+ case OPTION_MBIG_OBJ: -+ use_big_obj = 1; -+ break; -+#endif -+ - default: - return 0; - } -@@ -9956,6 +9971,10 @@ md_show_usage (FILE *stream) - -mold-gcc support old (<= 2.8.1) versions of gcc\n")); - fprintf (stream, _("\ - -madd-bnd-prefix add BND prefix for all valid branches\n")); -+# if defined (TE_PE) || defined (TE_PEP) -+ fprintf (stream, _("\ -+ -mbig-obj generate big object files\n")); -+#endif - } - - #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ -@@ -9994,7 +10013,10 @@ i386_target_format (void) - #if defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF) - # if defined (TE_PE) || defined (TE_PEP) - case bfd_target_coff_flavour: -- return flag_code == CODE_64BIT ? "pe-x86-64" : "pe-i386"; -+ if (flag_code == CODE_64BIT) -+ return use_big_obj ? "pe-bigobj-x86-64" : "pe-x86-64"; -+ else -+ return "pe-i386"; - # elif defined (TE_GO32) - case bfd_target_coff_flavour: - return "coff-go32"; -diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi -index 18bd96a..1952cee 100644 ---- a/gas/doc/c-i386.texi -+++ b/gas/doc/c-i386.texi -@@ -283,6 +283,11 @@ The @code{.att_syntax} and @code{.intel_syntax} directives will take precedent. - This option forces the assembler to add BND prefix to all branches, even - if such prefix was not explicitly specified in the source code. - -+@cindex @samp{-mbig-obj} option, x86-64 -+@item -mbig-obj -+On x86-64 PE/COFF target this option forces the use of big object file -+format, which allows more than 32768 sections. -+ - @end table - @c man end - -diff --git a/gas/testsuite/gas/pe/big-obj.d b/gas/testsuite/gas/pe/big-obj.d -new file mode 100644 -index 0000000..95ff1d8 ---- /dev/null -+++ b/gas/testsuite/gas/pe/big-obj.d -@@ -0,0 +1,11 @@ -+#as: -mbig-obj -+#objdump: -h -+#name: PE x64 big obj -+ -+.*: *file format pe-bigobj-.* -+ -+Sections: -+#... -+5000. \.data\$a49999 .* -+ CONTENTS, ALLOC, LOAD, DATA -+ -diff --git a/gas/testsuite/gas/pe/big-obj.s b/gas/testsuite/gas/pe/big-obj.s -new file mode 100644 -index 0000000..07edc91 ---- /dev/null -+++ b/gas/testsuite/gas/pe/big-obj.s -@@ -0,0 +1,16 @@ -+ .file "big-obj.s" -+ -+ .irp n,0,1,2,3,4 -+ .irp m,0,1,2,3,4,5,6,7,8,9 -+ .irp c,0,1,2,3,4,5,6,7,8,9 -+ .irp d,0,1,2,3,4,5,6,7,8,9 -+ .irp u,0,1,2,3,4,5,6,7,8,9 -+ .globl a\n\m\c\d\u -+ .section .data$a\n\m\c\d\u,"w" -+a\n\m\c\d\u : -+ .byte 1 -+ .endr -+ .endr -+ .endr -+ .endr -+ .endr -diff --git a/gas/testsuite/gas/pe/pe.exp b/gas/testsuite/gas/pe/pe.exp -index 0b70ee6..c1c5f49 100644 ---- a/gas/testsuite/gas/pe/pe.exp -+++ b/gas/testsuite/gas/pe/pe.exp -@@ -48,3 +48,11 @@ if ([istarget "x86_64-*-mingw*"]) then { - run_dump_test "peseh-x64-5" - run_dump_test "peseh-x64-6" - } -+ -+# Big obj -+ -+ -+if ([istarget "x86_64-*-mingw*"]) then { -+ # Currently only supported on x86_64 -+ run_dump_test "big-obj" -+} -diff --git a/include/coff/internal.h b/include/coff/internal.h -index 4f99f2f..b34e5c6 100644 ---- a/include/coff/internal.h -+++ b/include/coff/internal.h -@@ -73,7 +73,7 @@ struct internal_filehdr - - /* Standard coff internal info. */ - unsigned short f_magic; /* magic number */ -- unsigned short f_nscns; /* number of sections */ -+ unsigned int f_nscns; /* number of sections */ - long f_timdat; /* time & date stamp */ - bfd_vma f_symptr; /* file pointer to symtab */ - long f_nsyms; /* number of symtab entries */ -diff --git a/include/coff/pe.h b/include/coff/pe.h -index 0093398..3166531 100644 ---- a/include/coff/pe.h -+++ b/include/coff/pe.h -@@ -358,6 +358,85 @@ typedef struct - #define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2 - #define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3 - -+/* Bigobj header. */ -+struct external_ANON_OBJECT_HEADER_BIGOBJ -+{ -+ /* ANON_OBJECT_HEADER_V2 header. */ -+ char Sig1[2]; -+ char Sig2[2]; -+ char Version[2]; -+ char Machine[2]; -+ char TimeDateStamp[4]; -+ char ClassID[16]; -+ char SizeOfData[4]; -+ char Flags[4]; -+ char MetaDataSize[4]; -+ char MetaDataOffset[4]; -+ -+ /* BIGOBJ specific. */ -+ char NumberOfSections[4]; -+ char PointerToSymbolTable[4]; -+ char NumberOfSymbols[4]; -+}; -+ -+#define FILHSZ_BIGOBJ (14 * 4) -+ -+struct external_SYMBOL_EX -+{ -+ union -+ { -+ char e_name[E_SYMNMLEN]; -+ -+ struct -+ { -+ char e_zeroes[4]; -+ char e_offset[4]; -+ } e; -+ } e; -+ -+ char e_value[4]; -+ char e_scnum[4]; -+ char e_type[2]; -+ char e_sclass[1]; -+ char e_numaux[1]; -+} ATTRIBUTE_PACKED ; -+ -+#define SYMENT_BIGOBJ struct external_SYMBOL_EX -+#define SYMESZ_BIGOBJ 20 -+ -+#define FILNMLEN_BIGOBJ 20 -+ -+union external_AUX_SYMBOL_EX -+{ -+ struct -+ { -+ char WeakDefaultSymIndex[4]; -+ char WeakSearchType[4]; -+ char rgbReserved[12]; -+ } Sym; -+ -+ struct -+ { -+ char Name[FILNMLEN_BIGOBJ]; -+ } File; -+ -+ struct -+ { -+ char Length[4]; /* section length */ -+ char NumberOfRelocations[2]; /* # relocation entries */ -+ char NumberOfLinenumbers[2]; /* # line numbers */ -+ char Checksum[4]; /* section COMDAT checksum */ -+ char Number[2]; /* COMDAT associated section index */ -+ char Selection[1]; /* COMDAT selection number */ -+ char bReserved[1]; -+ char HighNumber[2]; /* High bits of COMDAT associated sec. */ -+ char rgbReserved[2]; -+ } Section; -+} ATTRIBUTE_PACKED; -+ -+#define AUXENT_BIGOBJ union external_AUX_SYMBOL_EX -+#define AUXESZ_BIGOBJ 20 -+ - /* .pdata/.xdata defines and structures for x64 PE+ for exception handling. */ - - /* .pdata in exception directory. */ --- -1.8.5.5 - diff --git a/mingw-w64-binutils/030-binutils-mingw-gnu-print.patch b/mingw-w64-binutils/030-binutils-mingw-gnu-print.patch deleted file mode 100644 index 419fd524f3..0000000000 --- a/mingw-w64-binutils/030-binutils-mingw-gnu-print.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff -Naur binutils-2.24/bfd/bfd-in.h binutils-2.24-mingw/bfd/bfd-in.h ---- binutils-2.24/bfd/bfd-in.h 2013-11-04 19:33:37.000000000 +0400 -+++ binutils-2.24-mingw/bfd/bfd-in.h 2014-03-13 22:24:26.512400000 +0400 -@@ -137,7 +137,7 @@ - - #if BFD_HOST_64BIT_LONG - #define BFD_VMA_FMT "l" --#elif defined (__MSVCRT__) -+#elif defined(__MSVCRT__) && !defined( __USE_MINGW_ANSI_STDIO) - #define BFD_VMA_FMT "I64" - #else - #define BFD_VMA_FMT "ll" -diff -Naur binutils-2.24/bfd/bfd-in2.h binutils-2.24-mingw/bfd/bfd-in2.h ---- binutils-2.24/bfd/bfd-in2.h 2013-11-18 12:40:15.000000000 +0400 -+++ binutils-2.24-mingw/bfd/bfd-in2.h 2014-03-13 22:24:03.580400000 +0400 -@@ -144,7 +144,7 @@ - - #if BFD_HOST_64BIT_LONG - #define BFD_VMA_FMT "l" --#elif defined (__MSVCRT__) -+#elif defined (__MSVCRT__) && !defined(__USE_MINGW_ANSI_STDIO) - #define BFD_VMA_FMT "I64" - #else - #define BFD_VMA_FMT "ll" -diff -Naur binutils-2.24/binutils/dwarf.c binutils-2.24-mingw/binutils/dwarf.c ---- binutils-2.24/binutils/dwarf.c 2013-11-08 14:13:48.000000000 +0400 -+++ binutils-2.24-mingw/binutils/dwarf.c 2014-03-13 22:58:50.101400000 +0400 -@@ -140,7 +140,7 @@ - } - - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) --#ifndef __MINGW32__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - #define DWARF_VMA_FMT "ll" - #define DWARF_VMA_FMT_LONG "%16.16llx" - #else -diff -Naur binutils-2.24/binutils/nm.c binutils-2.24-mingw/binutils/nm.c ---- binutils-2.24/binutils/nm.c 2013-11-08 14:13:48.000000000 +0400 -+++ binutils-2.24-mingw/binutils/nm.c 2014-03-13 22:18:43.452800000 +0400 -@@ -164,7 +164,7 @@ - #if BFD_HOST_64BIT_LONG - static char value_format_64bit[] = "%016lx"; - #elif BFD_HOST_64BIT_LONG_LONG --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - static char value_format_64bit[] = "%016llx"; - #else - static char value_format_64bit[] = "%016I64x"; -@@ -290,7 +290,7 @@ - #if BFD_HOST_64BIT_LONG - value_format_64bit[5] = *radix; - #elif BFD_HOST_64BIT_LONG_LONG --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - value_format_64bit[6] = *radix; - #else - value_format_64bit[7] = *radix; -diff -Naur binutils-2.24/binutils/prdbg.c binutils-2.24-mingw/binutils/prdbg.c ---- binutils-2.24/binutils/prdbg.c 2013-11-04 19:33:37.000000000 +0400 -+++ binutils-2.24-mingw/binutils/prdbg.c 2014-03-13 22:19:45.603200000 +0400 -@@ -502,7 +502,7 @@ - #if BFD_HOST_64BIT_LONG_LONG - else if (sizeof (vma) <= sizeof (unsigned long long)) - { --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - if (hexp) - sprintf (buf, "0x%llx", (unsigned long long) vma); - else if (unsignedp) -diff -Naur binutils-2.24/binutils/readelf.c binutils-2.24-mingw/binutils/readelf.c ---- binutils-2.24/binutils/readelf.c 2013-11-18 12:40:15.000000000 +0400 -+++ binutils-2.24-mingw/binutils/readelf.c 2014-03-13 22:20:53.494400000 +0400 -@@ -1006,7 +1006,7 @@ - : "%12.12lx %12.12lx ", - offset, inf); - #elif BFD_HOST_64BIT_LONG_LONG --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - printf (do_wide - ? "%16.16llx %16.16llx " - : "%12.12llx %12.12llx ", -@@ -10836,7 +10836,7 @@ - - if (data < end) - { --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - /* PR 11128: Use two separate invocations in order to work - around bugs in the Solaris 8 implementation of printf. */ - printf (" [%6tx] ", data - start); -diff -Naur binutils-2.24/binutils/strings.c binutils-2.24-mingw/binutils/strings.c ---- binutils-2.24/binutils/strings.c 2013-11-04 19:33:37.000000000 +0400 -+++ binutils-2.24-mingw/binutils/strings.c 2014-03-13 22:21:29.140400000 +0400 -@@ -557,7 +557,7 @@ - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) - if (sizeof (start) > sizeof (long)) - { --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - printf ("%7llo ", (unsigned long long) start); - #else - printf ("%7I64o ", (unsigned long long) start); -@@ -576,7 +576,7 @@ - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) - if (sizeof (start) > sizeof (long)) - { --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - printf ("%7lld ", (unsigned long long) start); - #else - printf ("%7I64d ", (unsigned long long) start); -@@ -595,7 +595,7 @@ - #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) - if (sizeof (start) > sizeof (long)) - { --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - printf ("%7llx ", (unsigned long long) start); - #else - printf ("%7I64x ", (unsigned long long) start); -diff -Naur binutils-2.24/gas/read.c binutils-2.24-mingw/gas/read.c ---- binutils-2.24/gas/read.c 2013-11-08 14:13:48.000000000 +0400 -+++ binutils-2.24-mingw/gas/read.c 2014-03-13 22:22:11.806400000 +0400 -@@ -4293,7 +4293,7 @@ - || (get & hibit) == 0)) - { /* Leading bits contain both 0s & 1s. */ - #if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG --#ifndef __MSVCRT__ -+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) - as_warn (_("value 0x%llx truncated to 0x%llx"), - (unsigned long long) get, (unsigned long long) use); - #else diff --git a/mingw-w64-binutils/100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch b/mingw-w64-binutils/100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch deleted file mode 100644 index 642ff58d4e..0000000000 --- a/mingw-w64-binutils/100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -urN binutils-2.24.orig/libiberty/pex-win32.c binutils-2.24libiberty/pex-win32.c ---- binutils-2.24.orig/libiberty/pex-win32.c 2013-12-21 20:21:26.446076700 +0000 -+++ binutils-2.24/libiberty/pex-win32.c 2013-12-22 02:56:54.800559500 +0000 -@@ -340,17 +340,26 @@ - char *p; - size_t cmdline_len; - int i, j, k; -+ int needs_quotes; - - cmdline_len = 0; - for (i = 0; argv[i]; i++) - { -- /* We quote every last argument. This simplifies the problem; -- we need only escape embedded double-quotes and immediately -+ /* We only quote arguments that contain spaces, \n \t \v or " characters -+ to prevent wasting 2 chars per argument of the CreateProcess 32k char limit -+ We need only escape embedded double-quotes and immediately - preceeding backslash characters. A sequence of backslach characters - that is not follwed by a double quote character will not be - escaped. */ -+ needs_quotes = 0; - for (j = 0; argv[i][j]; j++) - { -+ if (argv[i][j] == ' ' || argv[i][j] == '\n' || -+ argv[i][j] == '\t' || argv[i][j] == '"' ) -+ { -+ needs_quotes = 1; -+ } -+ - if (argv[i][j] == '"') - { - /* Escape preceeding backslashes. */ -@@ -362,16 +371,33 @@ - } - /* Trailing backslashes also need to be escaped because they will be - followed by the terminating quote. */ -- for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -- cmdline_len++; -+ if (needs_quotes) -+ { -+ for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -+ cmdline_len++; -+ } - cmdline_len += j; -- cmdline_len += 3; /* for leading and trailing quotes and space */ -+ cmdline_len += 1 + (needs_quotes<<1); /* for leading and trailing quotes and space */ - } - cmdline = XNEWVEC (char, cmdline_len); - p = cmdline; - for (i = 0; argv[i]; i++) - { -- *p++ = '"'; -+ needs_quotes = 0; -+ for (j = 0; argv[i][j]; j++) -+ { -+ if (argv[i][j] == ' ' || argv[i][j] == '\n' || -+ argv[i][j] == '\t' || argv[i][j] == '"' ) -+ { -+ needs_quotes = 1; -+ break; -+ } -+ } -+ -+ if (needs_quotes) -+ { -+ *p++ = '"'; -+ } - for (j = 0; argv[i][j]; j++) - { - if (argv[i][j] == '"') -@@ -382,9 +408,12 @@ - } - *p++ = argv[i][j]; - } -- for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -- *p++ = '\\'; -- *p++ = '"'; -+ if (needs_quotes) -+ { -+ for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -+ *p++ = '\\'; -+ *p++ = '"'; -+ } - *p++ = ' '; - } - p[-1] = '\0'; diff --git a/mingw-w64-binutils/110-This-fixes-a-compile-time-warning.patch b/mingw-w64-binutils/110-This-fixes-a-compile-time-warning.patch deleted file mode 100644 index 34496a39e6..0000000000 --- a/mingw-w64-binutils/110-This-fixes-a-compile-time-warning.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 88667baf24e71481f0002c0452b94a1d53116725 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 25 Apr 2014 17:00:20 +0100 -Subject: [PATCH] This fixes a compile time warning which is being treated as an error. Older - versions of gcc complain about part of a conditional expression always - evaluating to false because of the size of the operands involved, even when - the entire expression is already known to be false. - - * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on - a 342-bit host. This time for older versions of gcc. ---- - bfd/ChangeLog | 6 ++++++ - bfd/peXXigen.c | 10 +++++++++- - 2 files changed, 15 insertions(+), 1 deletions(-) - -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index f22dc90..ccff4ce 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2014-04-25 Nick Clifton -+ -+ PR ld/16821 -+ * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on -+ a 342-bit host. This time for older versions of gcc. -+ - 2014-04-24 Nick Clifton - - * peXXigen.c (rsrc_print_section): Fix compile time warning for -diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c -index d462753..dc45daf 100644 ---- a/bfd/peXXigen.c -+++ b/bfd/peXXigen.c -@@ -236,7 +236,15 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp) - reduce the absolute value to < 1^32, and then transforming the - symbol into a section relative symbol. This of course is a hack. */ - if (sizeof (in->n_value) > 4 -+ /* GCC 4.6.x erroneously complains about the next test always being -+ false when compiled on a 32-bit host. (The sizeof test above -+ should have made the warning unnecessary). Hence we have to -+ predicate the test. It should not matter if the test is omitted -+ since the worst that can happen is that some absolute symbols -+ are needlessly converted to equivalent section relative symbols. */ -+#if defined BFD64 || ! defined __GNUC__ || __GNUC__ > 4 || __GNUC_MINOR__ > 6 - && in->n_value > ((1ULL << 32) - 1) -+#endif - && in->n_scnum == -1) - { - asection * sec; -@@ -248,7 +256,7 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp) - in->n_scnum = sec->target_index; - } - /* else: FIXME: The value is outside the range of any section. This -- happens for __image_base__ and __ImageBase__ and maybe some other -+ happens for __image_base__ and __ImageBase and maybe some other - symbols as well. We should find a way to handle these values. */ - } - --- -1.7.1 - diff --git a/mingw-w64-binutils/120-Bug-16858-weak-external-reference-has-wrong-value.patch b/mingw-w64-binutils/120-Bug-16858-weak-external-reference-has-wrong-value.patch deleted file mode 100644 index 98a25966c1..0000000000 --- a/mingw-w64-binutils/120-Bug-16858-weak-external-reference-has-wrong-value.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gas/config/tc-i386.c -+++ a/gas/config/tc-i386.c -@@ -9145,12 +9145,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) - value += md_pcrel_from (fixP); - #endif - } --#if defined (OBJ_COFF) && defined (TE_PE) -- if (fixP->fx_addsy != NULL && S_IS_WEAK (fixP->fx_addsy)) -- { -- value -= S_GET_VALUE (fixP->fx_addsy); -- } --#endif - - /* Fix a few things - the dynamic linker expects certain values here, - and we must not disappoint it. */ diff --git a/mingw-w64-binutils/130-make-relocbase-unsigned.patch b/mingw-w64-binutils/130-make-relocbase-unsigned.patch deleted file mode 100644 index e68076ba49..0000000000 --- a/mingw-w64-binutils/130-make-relocbase-unsigned.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN binutils-2.24.orig/bfd/libcoff.h binutils-2.24/bfd/libcoff.h ---- binutils-2.24.orig/bfd/libcoff.h 2014-05-24 16:03:12.983980200 +0100 -+++ binutils-2.24/bfd/libcoff.h 2014-05-24 16:04:45.239695200 +0100 -@@ -57,7 +57,7 @@ - unsigned long raw_syment_count; - - /* These are only valid once writing has begun. */ -- long int relocbase; -+ unsigned long int relocbase; - - /* These members communicate important constants about the symbol table - to GDB's symbol-reading code. These `constants' unfortunately vary -diff -urN binutils-2.24.orig/bfd/libcoff-in.h binutils-2.24/bfd/libcoff-in.h ---- binutils-2.24.orig/bfd/libcoff-in.h 2014-05-24 16:03:12.983480200 +0100 -+++ binutils-2.24/bfd/libcoff-in.h 2014-05-24 16:04:27.654962200 +0100 -@@ -53,7 +53,7 @@ - unsigned long raw_syment_count; - - /* These are only valid once writing has begun. */ -- long int relocbase; -+ unsigned long int relocbase; - - /* These members communicate important constants about the symbol table - to GDB's symbol-reading code. These `constants' unfortunately vary diff --git a/mingw-w64-binutils/27aaeda.diff b/mingw-w64-binutils/27aaeda.diff new file mode 100644 index 0000000000..29ca87ee9d --- /dev/null +++ b/mingw-w64-binutils/27aaeda.diff @@ -0,0 +1,36 @@ +From 27aaeda0cdf9f69625b96e3abdb25c8fdbbb3435 Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Wed, 18 Mar 2015 16:19:59 +0000 +Subject: [PATCH] Fixes a problem generating relocs for import libraries + created by Microsoft tools for the x86_64 architecture. + + PR ld/16598 + * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs + suitable for the AMD64. +--- + bfd/peicode.h | 9 +++++++++ + 1 files changed, 9 insertions(+) + +diff --git a/bfd/peicode.h b/bfd/peicode.h +index e36568a..200ef5e 100644 +--- a/bfd/peicode.h ++++ b/bfd/peicode.h +@@ -973,6 +973,15 @@ pe_ILF_build_a_bfd (bfd * abfd, + } + else + #endif ++#ifdef AMD64MAGIC ++ if (magic == AMD64MAGIC) ++ { ++ pe_ILF_make_a_symbol_reloc (&vars, (bfd_vma) jtab[i].offset, ++ BFD_RELOC_32_PCREL, (asymbol **) imp_sym, ++ imp_index); ++ } ++ else ++#endif + pe_ILF_make_a_symbol_reloc (&vars, (bfd_vma) jtab[i].offset, + BFD_RELOC_32, (asymbol **) imp_sym, + imp_index); +-- +2.4.0 + diff --git a/mingw-w64-binutils/9ac47a4.diff b/mingw-w64-binutils/9ac47a4.diff new file mode 100644 index 0000000000..91687bb53c --- /dev/null +++ b/mingw-w64-binutils/9ac47a4.diff @@ -0,0 +1,30 @@ +From 9ac47a43ffc8e3c73867b9953145a8e7a227132d Mon Sep 17 00:00:00 2001 +From: Toni Spets +Date: Wed, 6 May 2015 14:18:34 +0100 +Subject: [PATCH] Skip discarded resource sections when building a PE resource + table. + + PR ld/18372 + * peXXigen.c (rsrc_process_section): Skip discarded resource + sections. +--- + bfd/peXXigen.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c +index 6aa18ca..c897c64 100644 +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -4160,7 +4160,8 @@ rsrc_process_section (bfd * abfd, + { + asection * rsrc_sec = bfd_get_section_by_name (input, ".rsrc"); + +- if (rsrc_sec != NULL) ++ /* PR 18372 - skip discarded .rsrc sections. */ ++ if (rsrc_sec != NULL && !discarded_section (rsrc_sec)) + { + if (num_input_rsrc == max_num_input_rsrc) + { +-- +2.4.0 + diff --git a/mingw-w64-binutils/PKGBUILD b/mingw-w64-binutils/PKGBUILD index 4483a11b00..de835d7fbc 100644 --- a/mingw-w64-binutils/PKGBUILD +++ b/mingw-w64-binutils/PKGBUILD @@ -2,10 +2,9 @@ # Contributor: Ray Donnelly _realname=binutils - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.24 -pkgrel=9 +pkgver=2.25.1 +pkgrel=1 pkgdesc="A set of programs to assemble and manipulate binary and object files" arch=('any') url="http://www.gnu.org/software/binutils/" @@ -16,47 +15,63 @@ depends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' '!distcc' '!ccache') # 'debug' '!strip') #install=binutils.install -source=("ftp://mirrors.kernel.org/sources.redhat.com/${_realname}/releases/${_realname}-${pkgver}.tar.bz2" - '010-2.23.52-install-libiberty.patch' - '100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch' - '020-add-bigobj-format.patch' - '030-binutils-mingw-gnu-print.patch' - '110-This-fixes-a-compile-time-warning.patch' - '120-Bug-16858-weak-external-reference-has-wrong-value.patch' - '130-make-relocbase-unsigned.patch') -md5sums=('e0f71a7b2ddab0f8612336ac81d9636b' - '01590d2835f6eda9932f78f84718a1d9' - 'cc15baf6f7939980c7f406416736baa8' - '62c646e3f8c4cb08d0916ab34faa8254' - '6e8b708d437bccbfa46ba56421dabb40' - '10fcfbca65c6939840dd0f4a575b8a99' - '7b0d532ba0419ed2bdae746b1a4f42b6' - '0513245c067162fa9f79b7e0befd201d') +source=(ftp://ftp.gnu.org/gnu/binutils/${_realname}-${pkgver}.tar.bz2{,.sig} + 0001-enable-gold-on.mingw32.patch + 0002-check-for-unusual-file-harder.patch + 0003-enable-shared-bfd.all.patch + 0003-link-to-libibtl-and-libiberty.mingw.patch + 0004-libiberty-la.mingw.patch + 0005-shared-opcodes.mingw.patch + 0008-fix-libiberty-makefile.mingw.patch + 0009-fix-libiberty-configure.mingw.patch + 0013-dont-link-gas-to-libiberty.mingw.patch + 0014-dont-link-binutils-to-libiberty.mingw.patch + 0015-dont-link-ld-to-libiberty.mingw.patch + 0017-fix-iconv-linking.all.patch + 0110-binutils-mingw-gnu-print.patch + 27aaeda.diff + a93d5cb.diff + 9ac47a4.diff) +md5sums=('ac493a78de4fee895961d025b7905be4' + 'SKIP' + 'f3be04ed70b9d352a2c0e2a80b0706b2' + '2cc89a3c09cafa30c91ac890d3c68932' + 'b3580923675b22a78a66788fd70b99b9' + '700066e478edd9bbb82c9d967bf90a4a' + 'a91bbb38f462c26247f317e4004a99fd' + 'bcd56ce925ca7f85e30b42c28af539d1' + 'df13a2462c24d14376a09ec1d1609519' + '9cd71d49b765932a9701b66dfde00775' + '1d439afee5cbcc952719ae40021e6cec' + '6d3610000f041f66ada0a956101faeec' + '33b5eda35272e88b1c308e66484db958' + '66eeb2af697f5f1d0f372185aa2fb737' + 'a882407a47e7c77dc1d8ed7d9ba44904' + '83e26439fa877c6407fe3b84cdb01e76' + 'c0eaa32bbc4239ebb9bdd95c129ca56a' + 'ac0c62e2653558f7aab8c32ffa23dd4a') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i "${srcdir}"/010-2.23.52-install-libiberty.patch - [ -f gas/testsuite/gas/pe/big-obj.d ] && rm gas/testsuite/gas/pe/big-obj.d - [ -f gas/testsuite/gas/pe/big-obj.s ] && rm gas/testsuite/gas/pe/big-obj.s - patch -p1 -i "${srcdir}"/020-add-bigobj-format.patch - patch -p1 -i "${srcdir}"/030-binutils-mingw-gnu-print.patch - patch -p1 -i "${srcdir}"/100-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch -# 110-This-fixes-a-compile-time-warning.patch isn't needed for 2.24 and may not -# be needed after either; depending on what gets included in the next release. -# patch -p1 -i "${srcdir}"/110-This-fixes-a-compile-time-warning.patch -# Fixes bug https://sourceware.org/bugzilla/show_bug.cgi?id=16858#c3 - patch -p1 -i "${srcdir}"/120-Bug-16858-weak-external-reference-has-wrong-value.patch + patch -p1 -i "${srcdir}"/0001-enable-gold-on.mingw32.patch + patch -p1 -i "${srcdir}"/0002-check-for-unusual-file-harder.patch + #patch -p1 -i "${srcdir}"/0003-enable-shared-bfd.all.patch + #patch -p1 -i "${srcdir}"/0003-link-to-libibtl-and-libiberty.mingw.patch + #patch -p1 -i "${srcdir}"/0004-libiberty-la.mingw.patch + #patch -p1 -i "${srcdir}"/0005-shared-opcodes.mingw.patch + patch -p1 -i "${srcdir}"/0008-fix-libiberty-makefile.mingw.patch + patch -p1 -i "${srcdir}"/0009-fix-libiberty-configure.mingw.patch + #patch -p1 -i "${srcdir}"/0013-dont-link-gas-to-libiberty.mingw.patch + #patch -p1 -i "${srcdir}"/0014-dont-link-binutils-to-libiberty.mingw.patch + #patch -p1 -i "${srcdir}"/0015-dont-link-ld-to-libiberty.mingw.patch + #patch -p1 -i "${srcdir}"/0017-fix-iconv-linking.all.patch + patch -p1 -i "${srcdir}"/0110-binutils-mingw-gnu-print.patch + + # Upstream patches + patch -p1 -i "${srcdir}"/27aaeda.diff + patch -p1 -i "${srcdir}"/a93d5cb.diff + patch -p1 -i "${srcdir}"/9ac47a4.diff -# I ran into a bug building Qt5Webkitd.dll -# "final link failed: File truncated" -# was due to a negative offset ending up in rel_filepos in _bfd_coff_final_link, this -# attempts to double the amount of room we have. - patch -p1 -i "${srcdir}"/130-make-relocbase-unsigned.patch - - #do not install libiberty - #sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS" - #sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure } build() { @@ -71,8 +86,7 @@ build() { CFLAGS+=" -O0" fi - cd $srcdir - rm -rf build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ @@ -84,10 +98,13 @@ build() { --with-sysroot=${MINGW_PREFIX} \ --with-libiconv-prefix=${MINGW_PREFIX} \ $_conf \ - --disable-nls \ + --enable-nls \ --disable-rpath \ --disable-multilib \ - --enable-install-libiberty + --enable-install-libiberty \ + --enable-plugins \ + --enable-gold \ + --disable-shared make } @@ -110,10 +127,9 @@ package() { mv ${pkgdir}${MINGW_PREFIX}/include/*.h ${pkgdir}${MINGW_PREFIX}/include/${_realname} mv ${pkgdir}${MINGW_PREFIX}/lib/*.a ${pkgdir}${MINGW_PREFIX}/lib/${_realname} - # Remove unwanted files - # rm -rf ${pkgdir}${MINGW_PREFIX}/share - # Add some useful headers #install -m644 ${srcdir}/${_realname}-${pkgver}/include/libiberty.h ${pkgdir}${MINGW_PREFIX}/include #install -m644 ${srcdir}/${_realname}-${pkgver}/include/demangle.h ${pkgdir}${MINGW_PREFIX}/include + + find ${pkgdir}${MINGW_PREFIX}/share -type f -iname "opcodes.mo" -o -iname "bfd.mo" | xargs -rtl1 rm } diff --git a/mingw-w64-binutils/a93d5cb.diff b/mingw-w64-binutils/a93d5cb.diff new file mode 100644 index 0000000000..4fb3526871 --- /dev/null +++ b/mingw-w64-binutils/a93d5cb.diff @@ -0,0 +1,33 @@ +From a93d5cb1976818c8d34133fd8798b3df76269f80 Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Wed, 29 Apr 2015 12:26:46 +0100 +Subject: [PATCH] Add support for absolute PE/x86 relocations. + + PR 17099 + * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG + relocs. +--- + bfd/coff-i386.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c +index 20d2402..b185b81 100644 +--- a/bfd/coff-i386.c ++++ b/bfd/coff-i386.c +@@ -509,7 +509,12 @@ coff_i386_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, + *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase; + } + +- BFD_ASSERT (sym != NULL); ++ /* PR 17099 - Absolute R_PCRLONG relocations do not need a symbol. */ ++ if (rel->r_type == R_PCRLONG && sym == NULL) ++ *addendp -= rel->r_vaddr; ++ else ++ BFD_ASSERT (sym != NULL); ++ + if (rel->r_type == R_SECREL32 && sym != NULL) + { + bfd_vma osect_vma; +-- +2.4.0 + diff --git a/mingw-w64-bison/0001-use-gnu_printf.patch b/mingw-w64-bison/0001-use-gnu_printf.patch index c350755db1..2e50aed627 100644 --- a/mingw-w64-bison/0001-use-gnu_printf.patch +++ b/mingw-w64-bison/0001-use-gnu_printf.patch @@ -10,8 +10,8 @@ diff -Naur bison-3.0.2-orig/lib/error.c bison-3.0.2/lib/error.c extern void __error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) -- __attribute__ ((__format__ (__printf__, 5, 6)));; -+ __attribute__ ((__format__ (gnu_printf, 5, 6)));; +- __attribute__ ((__format__ (__printf__, 5, 6))); ++ __attribute__ ((__format__ (gnu_printf, 5, 6))); # define error __error # define error_at_line __error_at_line diff --git a/mingw-w64-bison/0002-add-relocation-support.patch b/mingw-w64-bison/0002-add-relocation-support.patch index efeae76af2..235e54b1b5 100644 --- a/mingw-w64-bison/0002-add-relocation-support.patch +++ b/mingw-w64-bison/0002-add-relocation-support.patch @@ -1,18 +1,86 @@ -diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c ---- bison-3.0.2.orig/src/files.c 2014-08-03 21:05:59.361540700 +0100 -+++ bison-3.0.2/src/files.c 2014-08-03 21:07:19.351115800 +0100 -@@ -18,6 +18,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ +diff -Naur bison-3.0.3/Makefile.in bison-3.0.3-mingw/Makefile.in +--- bison-3.0.3/Makefile.in 2015-01-15 12:05:52.000000000 +0300 ++++ bison-3.0.3-mingw/Makefile.in 2015-01-16 11:10:29.700600000 +0300 +@@ -2546,6 +2546,8 @@ + src/nullable.h \ + src/output.c \ + src/output.h \ ++ src/pathtools.c \ ++ src/pathtools.h \ + src/parse-gram.y \ + src/print-xml.c \ + src/print-xml.h \ +diff -Naur bison-3.0.3/src/local.mk bison-3.0.3-mingw/src/local.mk +--- bison-3.0.3/src/local.mk 2015-01-07 18:46:27.000000000 +0300 ++++ bison-3.0.3-mingw/src/local.mk 2015-01-16 11:22:09.559200000 +0300 +@@ -63,6 +63,8 @@ + src/nullable.h \ + src/output.c \ + src/output.h \ ++ src/pathtools.c \ ++ src/pathtools.h \ + src/parse-gram.y \ + src/print-xml.c \ + src/print-xml.h \ +diff -Naur bison-3.0.3/src/output.c bison-3.0.3-mingw/src/output.c +--- bison-3.0.3/src/output.c 2015-01-15 11:35:58.000000000 +0300 ++++ bison-3.0.3-mingw/src/output.c 2015-01-16 10:57:28.134800000 +0300 +@@ -41,6 +41,7 @@ + #include "scan-skel.h" + #include "symtab.h" + #include "tables.h" ++#include "pathtools.h" + static struct obstack format_obstack; + +@@ -547,7 +548,7 @@ + pid_t pid; + + /* Compute the names of the package data dir and skeleton files. */ +- char const *m4 = (m4 = getenv ("M4")) ? m4 : M4; ++ char const *m4 = (m4 = getenv ("M4")) ? m4 : single_path_relocation(BINDIR, M4); + char const *datadir = pkgdatadir (); + char *m4sugar = xconcatenated_filename (datadir, "m4sugar/m4sugar.m4", NULL); + char *m4bison = xconcatenated_filename (datadir, "bison.m4", NULL); +@@ -716,5 +717,9 @@ + pkgdatadir (void) + { + char const *cp = getenv ("BISON_PKGDATADIR"); +- return cp ? cp : PKGDATADIR; ++ if (cp) ++ return cp; ++ ++ char * _dir = single_path_relocation(BINDIR, PKGDATADIR); ++ return _dir; + } +diff -Naur bison-3.0.3/src/pathtools.c bison-3.0.3-mingw/src/pathtools.c +--- bison-3.0.3/src/pathtools.c 1970-01-01 03:00:00.000000000 +0300 ++++ bison-3.0.3-mingw/src/pathtools.c 1970-01-01 03:00:00.000000000 +0300 +@@ -0,0 +1,539 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#include "config.h" ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include + - #include - #include "system.h" - -@@ -34,6 +35,22 @@ - #include "getargs.h" - #include "gram.h" - +/* If you don't define this, then get_executable_path() + can only use argv[0] which will often not work well */ +#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH @@ -23,24 +91,18 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c +#elif defined(__APPLE__) +#include +#elif defined(_WIN32) -+#define WIN32_LEAN_AND_MEAN ++#define WIN32_MEAN_AND_LEAN +#include +#include +#endif +#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ + - /* Initializing some values below (such SPEC_NAME_PREFIX to 'yy') is - tempting, but don't do that: for the time being our handling of the - %directive vs --option leaves precedence to the options by deciding -@@ -425,3 +442,274 @@ - } - free (generated_files); - } ++#include "pathtools.h" + +char * -+malloc_copy_string (char const * original) ++malloc_copy_string(char const * original) +{ -+ char * result = (char *) malloc (sizeof(char*) * strlen(original)+1); ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); + if (result != NULL) + { + strcpy (result, original); @@ -48,139 +110,61 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c + return result; +} + -+static char * ++void +sanitise_path(char * path) +{ -+ size_t path_size = strlen(path); ++ size_t path_size = strlen (path); + + /* Replace any '\' with '/' */ + char * path_p = path; -+ while ((path_p = strchr(path_p, '\\')) != NULL) ++ while ((path_p = strchr (path_p, '\\')) != NULL) + { + *path_p = '/'; + } + /* Replace any '//' with '/' */ + path_p = path; -+ while ((path_p = strstr(path_p, "//")) != NULL) ++ while ((path_p = strstr (path_p, "//")) != NULL) + { -+ memmove(path_p, path_p + 1, path_size--); ++ memmove (path_p, path_p + 1, path_size--); + } -+ return path; -+} -+ -+void -+simplify_path (char * path) -+{ -+ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ -+ ssize_t i, j; -+ size_t tok_size; -+ size_t in_size = strlen (path); -+ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; -+ char * result = path; -+ char * result_p = sanitise_path(result); -+ -+ do -+ { -+ ++n_toks; -+ ++result_p; -+ } while ((result_p = strchr(result_p, '/')) != NULL); -+ -+ result_p = result; -+ char const ** toks = (char const **) alloca (sizeof(char const*) * n_toks); -+ n_toks = 0; -+ do -+ { -+ if (result_p > result) -+ { -+ *result_p++ = '\0'; -+ } -+ else if (*result_p == '/') -+ { -+ /* A leading / creates an empty initial token. */ -+ toks[n_toks++] = result_p; -+ *result_p++ = '\0'; -+ } -+ toks[n_toks++] = result_p; -+ } while ((result_p = strchr(result_p, '/')) != NULL); -+ -+ /* Remove all non-leading '.' and any '..' we can match -+ with an earlier forward path (i.e. neither '.' nor '..') */ -+ for (i = 1; i < n_toks; ++i) -+ { -+ int removals[2] = { -1, -1 }; -+ if ( strcmp (toks[i], "." ) == 0) -+ { -+ removals[0] = i; -+ } -+ else if ( strcmp (toks[i], ".." ) == 0) -+ { -+ /* Search backwards for a forward path to collapse. -+ If none are found then the .. also stays. */ -+ for (j = i - 1; j > -1; --j) -+ { -+ if ( strcmp (toks[j], "." ) -+ && strcmp (toks[j], ".." ) ) -+ { -+ removals[0] = j; -+ removals[1] = i; -+ break; -+ } -+ } -+ } -+ for (j = 0; j < 2; ++j) -+ { -+ if (removals[j] >= 0) /* Can become -2 */ -+ { -+ --n_toks; -+ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof(char*)); -+ --i; -+ if (!j) -+ { -+ --removals[1]; -+ } -+ } -+ } -+ } -+ result_p = result; -+ for (i = 0; i < n_toks; ++i) -+ { -+ tok_size = strlen(toks[i]); -+ memcpy (result_p, toks[i], tok_size); -+ result_p += tok_size; -+ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) -+ { -+ *result_p = '/'; -+ ++result_p; -+ } -+ } -+ *result_p = '\0'; ++ return; +} + +char * -+get_relative_path (char const * from, char const * to) ++get_relative_path(char const * from_in, char const * to_in) +{ -+ size_t from_size = strlen (from); -+ size_t to_size = strlen (to); ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); + size_t max_size = (from_size + to_size) * 2 + 4; -+ char * common_part = (char *) alloca (max_size); -+ char * result = (char *) alloca (max_size); ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; + size_t count; + -+ /* If either alloca failed, no from was given, from is not absolute -+ or either to or from contains '.' then return a copy of to; it's -+ the best we can do in this instance (though we could call a path -+ normalization function for some of these conditions). -+ */ -+ if (common_part == NULL -+ || result == NULL -+ || from == NULL -+ || from[0] != '/' -+ || strchr(to, '.') != NULL -+ || strchr(from, '.') != NULL) ++ /* No to, return "./" */ ++ if (to_in == NULL) + { -+ return malloc_copy_string (to); ++ return malloc_copy_string ("./"); + } + ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ + result[0] = '\0'; + + size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ @@ -214,7 +198,7 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c + to += match_size; + size_t ndotdots = 0; + char const* from_last = from + strlen(from) - 1; -+ while ((from = strchr(from, '/')) && from != from_last) ++ while ((from = strchr (from, '/')) && from != from_last) + { + ++ndotdots; + ++from; @@ -244,6 +228,106 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c + return malloc_copy_string (result); +} + ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ +int +get_executable_path(char const * argv0, char * result, ssize_t max_size) +{ @@ -265,7 +349,7 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c +#elif defined(_WIN32) + unsigned long bufsize = (unsigned long)max_size; + system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); -+ if (system_result_size == 0 || system_result_size == bufsize) ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) + { + /* Error, possibly not enough space. */ + system_result_size = -1; @@ -284,7 +368,7 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c +#else +#warning "Don't know how to get executable path on this system" +#endif -+#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ + } + /* Use argv0 as a default in-case of failure */ + if (system_result_size != -1) @@ -307,50 +391,265 @@ diff -urN bison-3.0.2.orig/src/files.c bison-3.0.2/src/files.c + result_size = strlen (result); + return result_size; +} -diff -urN bison-3.0.2.orig/src/files.h bison-3.0.2/src/files.h ---- bison-3.0.2.orig/src/files.h 2014-08-03 21:05:59.367541000 +0100 -+++ bison-3.0.2/src/files.h 2014-08-03 21:06:17.520579300 +0100 -@@ -77,4 +77,20 @@ - void xfclose (FILE *ptr); - FILE *xfdopen (int fd, char const *mode); - -+/* These functions are used to support relocation. On MSYS2, the native -+ bison port needs this. */ + -+/* Returns the malloc'ed string. Caller should free using free(void*) */ -+extern char * malloc_copy_string (char const * original); ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } + -+/* Uses a host OS specific function to determine the path of the executable, -+ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ -+extern int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ if (path[0] != '/') ++ { ++ return path; ++ } + -+/* Where possible, removes occourances of '.' and 'path/..' */ -+extern void simplify_path (char * path); ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} + -+/* mallocs and returns the path to get from from to to. Caller should free using free(void*) */ -+extern char * get_relative_path (char const * from, char const * to); ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} + - #endif /* !FILES_H_ */ -diff -urN bison-3.0.2.orig/src/output.c bison-3.0.2/src/output.c ---- bison-3.0.2.orig/src/output.c 2014-08-03 21:05:59.363540800 +0100 -+++ bison-3.0.2/src/output.c 2014-08-03 21:06:17.521579400 +0100 -@@ -716,5 +716,18 @@ - pkgdatadir (void) - { - char const *cp = getenv ("BISON_PKGDATADIR"); -- return cp ? cp : PKGDATADIR; -+ if (cp) -+ return cp; ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; + -+ /* Relocation support. */ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) + char exe_path[PATH_MAX]; + get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); + if (strrchr (exe_path, '/') != NULL) + { + strrchr (exe_path, '/')[1] = '\0'; + } -+ char * rel_to_datadir = get_relative_path (BINDIR, PKGDATADIR); ++ char * rel_to_datadir = get_relative_path (from, to); + strcat (exe_path, rel_to_datadir); + simplify_path (&exe_path[0]); -+ return malloc_copy_string (exe_path); - } ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff -Naur bison-3.0.3/src/pathtools.h bison-3.0.3-mingw/src/pathtools.h +--- bison-3.0.3/src/pathtools.h 1970-01-01 03:00:00.000000000 +0300 ++++ bison-3.0.3-mingw/src/pathtools.h 1970-01-01 03:00:00.000000000 +0300 +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ diff --git a/mingw-w64-bison/PKGBUILD b/mingw-w64-bison/PKGBUILD index b5641b1558..be81dbe651 100644 --- a/mingw-w64-bison/PKGBUILD +++ b/mingw-w64-bison/PKGBUILD @@ -3,8 +3,8 @@ _realname=bison pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.0.2 -pkgrel=1 +pkgver=3.0.4 +pkgrel=2 pkgdesc="The GNU general-purpose parser generator" arch=('any') license=('GPL3') @@ -16,25 +16,30 @@ source=(http://ftp.gnu.org/gnu/bison/${_realname}-${pkgver}.tar.xz 0002-add-relocation-support.patch 0003-create_pipe-uses-O_TEXT-not-O_BINARY-mode.patch 0004-open-source-file-in-binary-mode-MS-ftell-bug-ks-68337.patch) -md5sums=('146be9ff9fbd27497f0bf2286a5a2082' - '817bbd1f0de3d7f2ab1287b67b267895' - '7bb3dac2a01d7f78bb6038f953a42b39' +md5sums=('c342201de104cc9ce0a21e0ad10d4021' + 'b1979ec2cb325b0ecbd3b331a52792a9' + '86c4c47f3ddec258ccd8a4751a02494f' 'cc720e2a9fc8f7849b0cfb165caf80fa' '3819970ae26449fb6e19c155401f4013') prepare() { cd ${srcdir}/${_realname}-${pkgver} + [ -f src/pathtools.h ] && rm -rf src/pathtools.h + [ -f src/pathtools.c ] && rm -rf src/pathtools.c + patch -p1 -i "${srcdir}"/0001-use-gnu_printf.patch patch -p1 -i "${srcdir}"/0002-add-relocation-support.patch patch -p1 -i "${srcdir}"/0003-create_pipe-uses-O_TEXT-not-O_BINARY-mode.patch patch -p1 -i "${srcdir}"/0004-open-source-file-in-binary-mode-MS-ftell-bug-ks-68337.patch + + autoreconf -fiv } build() { mkdir -p "${srcdir}"/build-${CARCH} cd "${srcdir}"/build-${CARCH} - M4=$(cygpath -wm ${MINGW_PREFIX})/bin/m4.exe \ + M4=${MINGW_PREFIX}/bin/m4.exe \ ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ diff --git a/mingw-w64-blender-git/PKGBUILD b/mingw-w64-blender-git/PKGBUILD index e734982ef3..777a595d3f 100644 --- a/mingw-w64-blender-git/PKGBUILD +++ b/mingw-w64-blender-git/PKGBUILD @@ -5,33 +5,37 @@ _realname=blender pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -blender_version=2.71 -pkgver=r55792.1e948b2 +blender_version=2.74 +pkgver=r58316.c32ded3 +_pyver=3.5 pkgrel=1 pkgdesc="A fully integrated 3D graphics creation suite (mingw-w64)" arch=('any') license=('GPL') url="http://www.blender.org" depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-ffmpeg" - "${MINGW_PACKAGE_PREFIX}-fftw" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libsndfile" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-openal" - "${MINGW_PACKAGE_PREFIX}-opencollada" - "${MINGW_PACKAGE_PREFIX}-opencolorio" - "${MINGW_PACKAGE_PREFIX}-openimageio" - "${MINGW_PACKAGE_PREFIX}-openshadinglanguage" - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-wintab-sdk") -makedepends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-clang" "${MINGW_PACKAGE_PREFIX}-cmake") + "${MINGW_PACKAGE_PREFIX}-glew" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libsndfile" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-openal" + "${MINGW_PACKAGE_PREFIX}-opencollada" + "${MINGW_PACKAGE_PREFIX}-opencolorio" + "${MINGW_PACKAGE_PREFIX}-openimageio" + "${MINGW_PACKAGE_PREFIX}-openshadinglanguage-git" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-wintab-sdk") +makedepends=("${MINGW_PACKAGE_PREFIX}-clang" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "git") #[[ $CARCH == x86_64 ]] && makedepends+=('cuda') -optdepends=('cuda: cycles renderer cuda support') +#optdepends=('cuda: cycles renderer cuda support') options=(!strip staticlibs !buildflags) #install=blender.install source=("${_realname}"::"git://git.blender.org/blender.git" @@ -41,15 +45,25 @@ source=("${_realname}"::"git://git.blender.org/blender.git" "mingw-w64-cmake.patch" "fix-mingw-w64-definitions.patch" "mingw-dont-install-3rdparty.patch" - "fix-finding-glew.patch") + "fix-finding-glew.patch" + "fix-define-syntax.patch" + "mingw-DEBUG-libmv-avoid-too-many-sections.patch" + "mingw-DEBUG-dont-suffix-libs-with-_d.patch" + "mingw-use-X11-like-path-layout.patch" + "osl-deprecate-api.patch") md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - '7e051acedaf998ac12406c4b1fc70104' - '696a364118b5b9adbde81f2d871febfa' + 'c3426eb608350bdedb89c531b72cff36' + '545eaf9f3268b96d1cb2764c51ec063d' '1969914e11d0a4f74dbfeddad742c9da' - 'b11e3fe76c4433abb53c12e723dfbe4f') + 'b11e3fe76c4433abb53c12e723dfbe4f' + '9c5a4e230d1c9081096d53d206cc03b4' + 'e8dbeac11a43dc307fe826cd41100b8e' + '4d104bac37e549eb32cffd473550412e' + 'bdac7b47c5886bbcede99516a67de0c2' + '407dd78ee33dd9ab1212ba93af396d6c') pkgver() { cd "$srcdir/$_realname" @@ -58,34 +72,41 @@ pkgver() { prepare() { cd "$srcdir/$_realname" - patch -p1 -i ${srcdir}/mingw-w64-cmake.patch - patch -p1 -i ${srcdir}/fix-mingw-w64-definitions.patch - patch -p1 -i ${srcdir}/mingw-dont-install-3rdparty.patch - patch -p1 -i ${srcdir}/fix-finding-glew.patch - + patch -p1 -i "${srcdir}"/mingw-w64-cmake.patch + patch -p1 -i "${srcdir}"/fix-mingw-w64-definitions.patch + patch -p1 -i "${srcdir}"/mingw-dont-install-3rdparty.patch + patch -p1 -i "${srcdir}"/fix-finding-glew.patch + patch -p1 -i "${srcdir}"/fix-define-syntax.patch + patch -p1 -i "${srcdir}"/mingw-DEBUG-libmv-avoid-too-many-sections.patch + patch -p1 -i "${srcdir}"/mingw-DEBUG-dont-suffix-libs-with-_d.patch + patch -p1 -i "${srcdir}"/mingw-use-X11-like-path-layout.patch + patch -p1 -i "${srcdir}"/osl-deprecate-api.patch + cp -rf $srcdir/translations/* $srcdir/$_realname/release/datafiles/locale/ cp -rf $srcdir/addons/* $srcdir/$_realname/release/scripts/addons/ cp -rf $srcdir/addons-contrib/* $srcdir/$_realname/release/scripts/addons_contrib/ } build() { - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - mkdir $srcdir/build-${MINGW_CHOST} cd $srcdir/build-${MINGW_CHOST} [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD=OFF" [[ $CARCH == i686 ]] && BUILDCUDA="OFF" || BUILDCUDA="ON" #[[ $CARCH == i686 ]] && PMARCH="i686" || PMARCH="x86-64" - #CFLAGS="-O2 -pipe -march=${PMARCH} -mtune=generic -D__USE_MINGW_ANSI_STDIO=1" - #CXXFLAGS="$CFLAGS" + + declare -a _btype + if check_option "debug" "y"; then + _btype=Debug + else + _btype=Release + fi + ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DMINGW_LIBS=${PREFIX_DEPS} \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DMINGW_LIBS=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=${_btype} \ -DWITH_SYSTEM_GLEW=ON \ -DWITH_SYSTEM_OPENJPEG=ON \ -DWITH_INSTALL_PORTABLE=OFF \ @@ -101,35 +122,35 @@ build() { -DWITH_CYCLES_OSL=ON \ -DWITH_FFTW3=ON \ -DWITH_MOD_OCEANSIM=ON \ - -DPYTHON_VERSION=3.4 \ - -DPYTHON_LIBPATH=${PREFIX_DEPS}/lib \ - -DPYTHON_LIBRARY=python3.4m \ - -DPYTHON_INCLUDE_DIRS=${PREFIX_DEPS}/include/python3.4m \ + -DPYTHON_VERSION=${_pyver} \ + -DPYTHON_LIBPATH=${MINGW_PREFIX}/lib \ + -DPYTHON_LIBRARY=python${_pyver}m \ + -DPYTHON_INCLUDE_DIRS=${MINGW_PREFIX}/include/python${_pyver}m \ -DWITH_PYTHON_INSTALL=OFF \ -DWITH_PYTHON_INSTALL_NUMPY=OFF \ - -DPYTHON_NUMPY_PATH=${PREFIX_DEPS}/lib/python3.4/site-packages \ - -DCYCLES_OSL=${PREFIX_DEPS} \ + -DPYTHON_NUMPY_PATH=${MINGW_PREFIX}/lib/python${_pyver}/site-packages \ + -DCYCLES_OSL=${MINGW_PREFIX} \ -DWITH_IMAGE_REDCODE=ON \ -DWITH_OPENMP=ON \ -DWITH_LLVM=ON \ -DLLVM_STATIC=ON \ ../${_realname} - # Remove the openjpeg line once blender accepts my patch - make # -j1 VERBOSE=1 + make } -package() { +package() { cd "$srcdir/build-${MINGW_CHOST}" make install + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib cp -r bin ${pkgdir}${MINGW_PREFIX}/ rm ${pkgdir}${MINGW_PREFIX}/bin/msgfmt.exe mv ${pkgdir}${MINGW_PREFIX}/bin/*.a ${pkgdir}${MINGW_PREFIX}/lib/ - ${MINGW_PREFIX}/bin/python3 -m compileall "${pkgdir}${MINGW_PREFIX}/bin/$blender_version" + ${MINGW_PREFIX}/bin/python3 -m compileall "${pkgdir}${MINGW_PREFIX}/share/blender/$blender_version" ${MINGW_PREFIX}/bin/python3 -m compileall \ - ${pkgdir}${MINGW_PREFIX}/bin/$blender_version/scripts/startup \ - ${pkgdir}${MINGW_PREFIX}/bin/$blender_version/scripts/modules \ - ${pkgdir}${MINGW_PREFIX}/bin/$blender_version/scripts/addons + ${pkgdir}${MINGW_PREFIX}/share/blender/$blender_version/scripts/startup \ + ${pkgdir}${MINGW_PREFIX}/share/blender/$blender_version/scripts/modules \ + ${pkgdir}${MINGW_PREFIX}/share/blender/$blender_version/scripts/addons } diff --git a/mingw-w64-blender-git/fix-define-syntax.patch b/mingw-w64-blender-git/fix-define-syntax.patch new file mode 100644 index 0000000000..ba0e9e068e --- /dev/null +++ b/mingw-w64-blender-git/fix-define-syntax.patch @@ -0,0 +1,11 @@ +--- blender-2.72/extern/clew/include/clew.h.orig 2014-09-24 19:29:54.000000000 +0400 ++++ blender-2.72/extern/clew/include/clew.h 2014-10-06 13:41:38.711800000 +0400 +@@ -493,7 +493,7 @@ + /* Define alignment keys */ + #if defined( __GNUC__ ) + #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) +-#elif defined( _WIN32) && (_MSC_VER) ++#elif defined( _WIN32) && defined(_MSC_VER) + /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ + /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ + /* #include */ diff --git a/mingw-w64-blender-git/fix-mingw-w64-definitions.patch b/mingw-w64-blender-git/fix-mingw-w64-definitions.patch index a367ee1bb5..629e384343 100644 --- a/mingw-w64-blender-git/fix-mingw-w64-definitions.patch +++ b/mingw-w64-blender-git/fix-mingw-w64-definitions.patch @@ -90,23 +90,26 @@ diff -Naur blender/extern/libmv/third_party/glog/src/windows/port.h blender-pp/e /* SSE intrinsics headers */ -#ifndef FREE_WINDOWS64 - #ifdef __KERNEL_SSE2__ - #include /* SSE 1 */ -@@ -95,14 +94,6 @@ - #include /* SSE 4.1 */ + #ifdef _MSC_VER + #include +@@ -95,17 +94,6 @@ + #endif -#else - -/* MinGW64 has conflicting declarations for these SSE headers in . - * Since we can't avoid including , better only include that */ +-#define NOGDI +-#define NOMINMAX +-#define WIN32_LEAN_AND_MEAN -#include - -#endif - #endif - #endif /* __UTIL_OPTIMIZATION_H__ */ + #endif diff -Naur blender/intern/cycles/util/util_types.h blender-pp/intern/cycles/util/util_types.h --- blender/intern/cycles/util/util_types.h 2014-01-14 08:17:57.658600000 +0400 +++ blender-pp/intern/cycles/util/util_types.h 2014-01-14 08:47:39.800000000 +0400 @@ -158,42 +161,32 @@ diff -Naur blender/intern/ghost/intern/GHOST_TaskbarWin32.h blender-pp/intern/gh diff -Naur blender/intern/ghost/intern/GHOST_WindowWin32.cpp blender-pp/intern/ghost/intern/GHOST_WindowWin32.cpp --- blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2014-01-14 08:17:57.783400000 +0400 +++ blender-pp/intern/ghost/intern/GHOST_WindowWin32.cpp 2014-01-14 07:08:38.456800000 +0400 -@@ -29,6 +29,11 @@ - * \ingroup GHOST +@@ -29,6 +29,12 @@ */ -+// Need glew for some defines -+#include -+#include -+#include + #define _USE_MATH_DEFINES + - #include ++#if defined(WITH_GL_EGL) ++# include "GHOST_ContextEGL.h" ++#else ++# include "GHOST_ContextWGL.h" ++#endif + #include "GHOST_WindowWin32.h" #include "GHOST_SystemWin32.h" -@@ -36,11 +41,6 @@ +@@ -36,12 +41,6 @@ + #include "GHOST_ContextNone.h" #include "utfconv.h" #include "utf_winfunc.h" - --// Need glew for some defines --#include --#include --#include - - // MSVC6 still doesn't define M_PI - #ifndef M_PI - # define M_PI 3.1415926536 -diff -Naur blender/intern/ghost/intern/GHOST_WindowWin32.h blender-pp/intern/ghost/intern/GHOST_WindowWin32.h ---- blender/intern/ghost/intern/GHOST_WindowWin32.h 2014-01-14 08:17:57.783400000 +0400 -+++ blender-pp/intern/ghost/intern/GHOST_WindowWin32.h 2014-01-14 07:08:38.456800000 +0400 -@@ -40,7 +40,7 @@ - #include "GHOST_Window.h" - #include "GHOST_TaskbarWin32.h" +-#if defined(WITH_GL_EGL) +-# include "GHOST_ContextEGL.h" +-#else +-# include "GHOST_ContextWGL.h" +-#endif --#ifndef __MINGW64__ -+#ifndef __MINGW64_VERSION_MAJOR - #define _WIN32_WINNT 0x501 // require Windows XP or newer - #endif - #define WIN32_LEAN_AND_MEAN + + #include diff -Naur blender/source/blender/blenlib/BLI_winstuff.h blender-pp/source/blender/blenlib/BLI_winstuff.h --- blender/source/blender/blenlib/BLI_winstuff.h 2014-01-14 08:18:15.661000000 +0400 +++ blender-pp/source/blender/blenlib/BLI_winstuff.h 2014-01-14 07:08:38.456800000 +0400 diff --git a/mingw-w64-blender-git/mingw-DEBUG-dont-suffix-libs-with-_d.patch b/mingw-w64-blender-git/mingw-DEBUG-dont-suffix-libs-with-_d.patch new file mode 100644 index 0000000000..1c1cf2026e --- /dev/null +++ b/mingw-w64-blender-git/mingw-DEBUG-dont-suffix-libs-with-_d.patch @@ -0,0 +1,20 @@ +--- blender-2.72/build_files/cmake/macros.cmake.orig 2014-10-07 11:53:48.545534700 +0100 ++++ blender-2.72/build_files/cmake/macros.cmake 2014-10-07 11:55:10.141534700 +0100 +@@ -294,7 +294,7 @@ + if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs + target_link_libraries(${target} ${PYTHON_LINKFLAGS}) + +- if(WIN32 AND NOT UNIX) ++ if(WIN32 AND NOT UNIX AND NOT MINGW) + file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d") + target_link_libraries_debug(${target} "${PYTHON_LIBRARIES_DEBUG}") + target_link_libraries_optimized(${target} "${PYTHON_LIBRARIES}") +@@ -366,7 +366,7 @@ + target_link_libraries(${target} ${FFMPEG_LIBRARIES}) + endif() + if(WITH_OPENCOLLADA) +- if(WIN32 AND NOT UNIX) ++ if(WIN32 AND NOT UNIX AND NOT MINGW) + file_list_suffix(OPENCOLLADA_LIBRARIES_DEBUG "${OPENCOLLADA_LIBRARIES}" "_d") + target_link_libraries_debug(${target} "${OPENCOLLADA_LIBRARIES_DEBUG}") + target_link_libraries_optimized(${target} "${OPENCOLLADA_LIBRARIES}") diff --git a/mingw-w64-blender-git/mingw-DEBUG-libmv-avoid-too-many-sections.patch b/mingw-w64-blender-git/mingw-DEBUG-libmv-avoid-too-many-sections.patch new file mode 100644 index 0000000000..811cf0f13b --- /dev/null +++ b/mingw-w64-blender-git/mingw-DEBUG-libmv-avoid-too-many-sections.patch @@ -0,0 +1,12 @@ +--- blender-2.72/extern/libmv/CMakeLists.txt.orig 2014-10-07 11:57:07.942534700 +0100 ++++ blender-2.72/extern/libmv/CMakeLists.txt 2014-10-07 11:36:50.624534700 +0100 +@@ -170,6 +170,9 @@ + ) + + if(WIN32) ++ # To avoid ..\fundamental.cc.obj: too many sections (35985) ++ set_source_files_properties(libmv/multiview/fundamental.cc PROPERTIES COMPILE_FLAGS "-g0") ++ set_source_files_properties(libmv/simple_pipeline/resect.cc PROPERTIES COMPILE_FLAGS "-g0") + list(APPEND INC + third_party/glog/src/windows + ) diff --git a/mingw-w64-blender-git/mingw-use-X11-like-path-layout.patch b/mingw-w64-blender-git/mingw-use-X11-like-path-layout.patch new file mode 100644 index 0000000000..6d354539d9 --- /dev/null +++ b/mingw-w64-blender-git/mingw-use-X11-like-path-layout.patch @@ -0,0 +1,106 @@ +diff -Naur blender-2.72-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp blender-2.72/intern/ghost/intern/GHOST_SystemPathsWin32.cpp +--- blender-2.72-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2014-10-08 00:07:23.583905600 +0100 ++++ blender-2.72/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2014-10-08 00:08:46.678658400 +0100 +@@ -69,6 +69,44 @@ + { + } + ++#if defined(__MINGW32__) ++ ++const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const ++{ ++ static char knownpath[MAX_PATH * 3 + 128] = {0}; ++ ++ char temppath[MAX_PATH + 1]; ++ char temppath2[MAX_PATH + 1]; ++ const GHOST_TUns8 *binary_dir = getBinaryDir(); ++ strcpy(temppath2, reinterpret_cast(binary_dir)); ++ char* lastslash = strrchr(temppath2, '\\'); ++ if (lastslash != NULL) { ++ *lastslash = '\0'; ++ } ++ snprintf(temppath, sizeof(temppath), "%s\\..\\share\\blender\\%s", temppath2, versionstr); ++ temppath[MAX_PATH] = '\0'; ++ GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL); ++ return (GHOST_TUns8*)knownpath; ++} ++ ++const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionstr) const ++{ ++ static char knownpath[MAX_PATH * 3 + 128] = {0}; ++ ++ char temppath[MAX_PATH + 1]; ++ char temppath2[MAX_PATH + 1]; ++ const GHOST_TUns8 *binary_dir = getBinaryDir(); ++ strcpy(temppath2, reinterpret_cast(binary_dir)); ++ char* lastslash = strrchr(temppath2, '\\'); ++ if (lastslash != NULL) { ++ *lastslash = '\0'; ++ } ++ snprintf(temppath, sizeof(temppath), "%s\\..\\..\\home\\%s\\.blender\\%s", temppath2, getenv("USERNAME") ?: "unknown", versionstr); ++ temppath[MAX_PATH] = '\0'; ++ GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL); ++ return (GHOST_TUns8*)knownpath; ++} ++#else + const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const + { + static char knownpath[MAX_PATH * 3 + 128] = {0}; /* 1 utf-16 might translante into 3 utf-8. 2 utf-16 translates into 4 utf-8*/ +@@ -105,6 +143,8 @@ + return NULL; + } + ++#endif ++ + const GHOST_TUns8 *GHOST_SystemPathsWin32::getBinaryDir() const + { + static char fullname[MAX_PATH * 3] = {0}; +diff -Naur blender-2.72-orig/source/creator/CMakeLists.txt blender-2.72/source/creator/CMakeLists.txt +--- blender-2.72-orig/source/creator/CMakeLists.txt 2014-09-24 19:29:55.000000000 +0400 ++++ blender-2.72/source/creator/CMakeLists.txt 2014-10-07 09:16:00.095600000 +0400 +@@ -256,7 +256,7 @@ + # ----------------------------------------------------------------------------- + # Platform Specific Var: TARGETDIR_VER + +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) + if(WITH_INSTALL_PORTABLE) + set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION}) + else() +@@ -393,13 +393,13 @@ + # ----------------------------------------------------------------------------- + # Install Targets (Platform Specific) + +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) + + if(NOT WITH_PYTHON_MODULE) + if(WITH_DOC_MANPAGE) + add_custom_target( + blender_man_page ALL +- COMMAND ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py ++ COMMAND python3 ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py + ${EXECUTABLE_OUTPUT_PATH}/blender + ${CMAKE_CURRENT_BINARY_DIR}/blender.1) + add_dependencies(blender_man_page blender) +@@ -1003,7 +1003,7 @@ + + install(TARGETS blender blender-launcher + COMPONENT Blender +- DESTINATION ".") ++ DESTINATION bin) + + if(MSVC12_REDIST_DIR) + if(CMAKE_CL_64) +diff -Naur blender-2.72-orig/source/blenderplayer/CMakeLists.txt blender-2.72/source/blenderplayer/CMakeLists.txt +--- blender-2.72-orig/source/blenderplayer/CMakeLists.txt 2014-09-24 19:29:55.000000000 +0400 ++++ blender-2.72/source/blenderplayer/CMakeLists.txt 2014-10-07 09:16:00.095600000 +0400 +@@ -58,7 +58,7 @@ + + install(TARGETS blenderplayer + COMPONENT Blenderplayer +- DESTINATION ".") ++ DESTINATION bin) + + elseif(APPLE) + add_executable(blenderplayer ${EXETYPE} bad_level_call_stubs/stubs.c) diff --git a/mingw-w64-blender-git/mingw-w64-cmake.patch b/mingw-w64-blender-git/mingw-w64-cmake.patch index c9588ad9d1..762f67fc19 100644 --- a/mingw-w64-blender-git/mingw-w64-cmake.patch +++ b/mingw-w64-blender-git/mingw-w64-cmake.patch @@ -1,33 +1,24 @@ ---- blender/CMakeLists.txt.orig 2014-04-08 00:22:36.736800000 +0400 -+++ blender/CMakeLists.txt 2014-04-08 06:51:03.051600000 +0400 -@@ -171,6 +171,8 @@ +--- blender-2.73/CMakeLists.txt.orig 2015-01-07 18:32:07.000000000 +0300 ++++ blender-2.73/CMakeLists.txt 2015-01-10 20:57:50.362800000 +0300 +@@ -251,6 +251,8 @@ + if(UNIX AND NOT APPLE) option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON) - - option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON) + option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON) +elseif(MINGW) + option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON) else() # not an option for other OS's set(WITH_SYSTEM_GLEW OFF) -@@ -178,7 +180,7 @@ +@@ -781,7 +781,7 @@ - - # (unix defaults to System OpenJPEG On) --if(UNIX AND NOT APPLE) -+if((UNIX AND NOT APPLE) OR MINGW) - set(PLATFORM_DEFAULT ON) - else() - set(PLATFORM_DEFAULT OFF) -@@ -579,7 +581,7 @@ - #----------------------------------------------------------------------------- - #Platform specifics + endif() -if(UNIX AND NOT APPLE) +if((UNIX AND NOT APPLE) OR MINGW) macro(find_package_wrapper) - string(TOUPPER ${ARGV0} _NAME_UPPER) if(WITH_STATIC_LIBS) -@@ -598,15 +600,29 @@ + set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES}) +@@ -799,15 +799,29 @@ find_package_wrapper(ZLIB REQUIRED) find_package_wrapper(Freetype REQUIRED) @@ -57,7 +48,7 @@ endif() if(WITH_IMAGE_OPENEXR) -@@ -670,7 +686,11 @@ +@@ -896,7 +896,11 @@ endif() if(WITH_CODEC_FFMPEG) @@ -69,7 +60,7 @@ set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries") mark_as_advanced(FFMPEG) -@@ -699,6 +719,9 @@ +@@ -928,6 +928,9 @@ if(OPENCOLLADA_FOUND) find_package_wrapper(XML2) find_package_wrapper(PCRE) @@ -79,10 +70,26 @@ else() set(WITH_OPENCOLLADA OFF) endif() -@@ -855,8 +878,13 @@ - message(FATAL_ERROR "LLVM not found.") +@@ -940,11 +940,15 @@ endif() + find_package_wrapper(OpenShadingLanguage) + if(OSL_FOUND) ++ if(MINGW) ++ list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY}) ++ else() + if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6") + # Note: --whole-archive is needed to force loading of all symbols in liboslexec, + # otherwise LLVM is missing the osl_allocate_closure_component function + set(OSL_LIBRARIES ${OSL_OSLCOMP_LIBRARY} -Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY} -Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}) + endif() ++ endif() + else() + message(STATUS "OSL not found, disabling it from Cycles") + set(WITH_CYCLES_OSL OFF) +@@ -1121,8 +1121,13 @@ + endif() + if(WITH_LLVM OR WITH_SDL_DYNLOAD) + if(MINGW) + # imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc + list(APPEND PLATFORM_LINKLIBS -limagehlp) @@ -93,21 +100,7 @@ endif() if(WITH_CYCLES_OSL) -@@ -867,9 +895,13 @@ - find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib) - find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib) - find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib) -+ if(MINGW) -+ list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY}) -+ else() - # Note: --whole-archive is needed to force loading of all symbols in liboslexec, - # otherwise LLVM is missing the osl_allocate_closure_component function - list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -Wl,--whole-archive ${OSL_LIB_EXEC} -Wl,--no-whole-archive ${OSL_LIB_QUERY}) -+ endif() - find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include) - find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin) - -@@ -883,6 +915,45 @@ +@@ -1130,6 +1130,50 @@ endif() endif() @@ -132,7 +125,12 @@ + else() + message(STATUS "Compiling with MinGW-w32.") + endif() -+ list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi) ++ list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp) ++ ++ if(WITH_INPUT_IME) ++ list(APPEND PLATFORM_LINKLIBS imm32) ++ endif() ++ + set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") + if(WITH_MINGW64) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") @@ -151,9 +149,9 @@ + endif() + else() # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed - set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread") + list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm) -@@ -958,12 +1031,12 @@ +@@ -1229,12 +1229,12 @@ set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel") endif() @@ -166,13 +164,12 @@ - if(MSVC) - set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi) - -@@ -1329,229 +1402,6 @@ - + # needed for some MSVC installations + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") +@@ -1585,247 +1585,6 @@ # used in many places so include globally, like OpenGL blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}") -- + - elseif(CMAKE_COMPILER_IS_GNUCC) - # keep GCC specific stuff here - include(CheckCSourceCompiles) @@ -187,7 +184,12 @@ - - if(WITH_MINGW64) - message(STATUS "Compiling for 64 bit with MinGW-w64.") -- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64) +- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) +- if(GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9) +- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64_gcc49) +- else() +- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64) +- endif() - else() - message(STATUS "Compiling for 32 bit with MinGW-w32.") - set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32) @@ -197,7 +199,12 @@ - endif() - endif() - -- list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi) +- list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp) +- +- if(WITH_INPUT_IME) +- list(APPEND PLATFORM_LINKLIBS -limm32) +- endif() +- - set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") - - if(WITH_MINGW64) @@ -351,11 +358,12 @@ - set(OPENIMAGEIO_LIBRARIES OpenImageIO) - set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib) - set(OPENIMAGEIO_DEFINITIONS "") +- set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe") - endif() - - if(WITH_LLVM) -- set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation") -- set(LLVM_LIBPATH ${LLVM_DIRECTORY}/lib) +- set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation") +- set(LLVM_LIBPATH ${LLVM_ROOT_DIR}/lib) - # Explicitly set llvm lib order. - #---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! --------- - set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive @@ -388,6 +396,13 @@ - set(OPENCOLORIO_DEFINITIONS) - endif() - +- if(WITH_SDL) +- set(SDL ${LIBDIR}/sdl) +- set(SDL_INCLUDE_DIR ${SDL}/include) +- set(SDL_LIBRARY SDL) +- set(SDL_LIBPATH ${SDL}/lib) +- endif() +- - set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152") - - ## DISABLE - causes linking errors @@ -395,6 +410,7 @@ - # set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-libgcc -static-libstdc++") - - endif() - +- # Things common to both mingw and MSVC should go here + set(WINTAB_INC ${LIBDIR}/wintab/include) diff --git a/mingw-w64-blender-git/osl-deprecate-api.patch b/mingw-w64-blender-git/osl-deprecate-api.patch new file mode 100644 index 0000000000..ff8d1edd6e --- /dev/null +++ b/mingw-w64-blender-git/osl-deprecate-api.patch @@ -0,0 +1,11 @@ +--- blender-2.73/intern/cycles/kernel/osl/osl_closures.cpp.orig 2015-01-11 15:22:14.583200000 +0300 ++++ blender-2.73/intern/cycles/kernel/osl/osl_closures.cpp 2015-01-11 15:22:23.334800000 +0300 +@@ -189,7 +189,7 @@ + /* optimization: it's possible to not use a prepare function at all and + * only initialize the actual class when accessing the closure component + * data, but then we need to map the id to the class somehow */ +- ss->register_closure(name, id, params, prepare, NULL, 16); ++ ss->register_closure(name, id, params, prepare, NULL/*, 16*/); + } + + void OSLShader::register_closures(OSLShadingSystem *ss_) diff --git a/mingw-w64-blender/PKGBUILD b/mingw-w64-blender/PKGBUILD index 2c39caad0a..8a54c3f848 100644 --- a/mingw-w64-blender/PKGBUILD +++ b/mingw-w64-blender/PKGBUILD @@ -6,13 +6,19 @@ # set "PKG_CONFIG_PATH=%MINGW_PREFIX%/lib/pkgconfig" # set "PATH=%MINGW_PREFIX%/bin;%PATH%" # 2. Specify the following as the CMake arguments: -# -DMINGW_LIBS=%MINGW_PREFIX% -DCMAKE_BUILD_TYPE=Debug -DWITH_SYSTEM_GLEW=ON -DWITH_SYSTEM_OPENJPEG=ON -DWITH_INSTALL_PORTABLE=OFF -DWITH_OPENCOLLADA=ON -DWITH_GAMEENGINE=ON -DWITH_RAYOPTIMIZATION=ON -DWITH_JACK=OFF -DWITH_PLAYER=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_CYCLES=ON -DWITH_CYCLES_CUDA_BINARIES=OFF -DWITH_CYCLES_OSL=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DPYTHON_VERSION=3.4 -DPYTHON_LIBPATH=%MINGW_PREFIX%/lib -DPYTHON_LIBRARY="python3.4m" -DPYTHON_INCLUDE_DIRS=/msys64/mingw64/include/python3.4m -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_INSTALL_NUMPY=OFF -DPYTHON_NUMPY_PATH=%MINGW_PREFIX%/lib/python3.4/site-packages -DCYCLES_OSL=%MINGW_PREFIX% -DWITH_IMAGE_REDCODE=ON -DWITH_OPENMP=ON -DWITH_LLVM=ON -DLLVM_STATIC=ON +# -DMINGW_LIBS=%MINGW_PREFIX% -DCMAKE_BUILD_TYPE=Debug -DWITH_SYSTEM_GLEW=ON -DWITH_SYSTEM_OPENJPEG=ON -DWITH_INSTALL_PORTABLE=OFF -DWITH_OPENCOLLADA=ON -DWITH_GAMEENGINE=ON -DWITH_RAYOPTIMIZATION=ON -DWITH_JACK=OFF -DWITH_PLAYER=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_CYCLES=ON -DWITH_CYCLES_CUDA_BINARIES=OFF -DWITH_CYCLES_OSL=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DPYTHON_VERSION=3.5 -DPYTHON_LIBPATH=%MINGW_PREFIX%/lib -DPYTHON_LIBRARY="python3.5m" -DPYTHON_INCLUDE_DIRS=/msys64/mingw64/include/python3.5m -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_INSTALL_NUMPY=OFF -DPYTHON_NUMPY_PATH=%MINGW_PREFIX%/lib/python3.5/site-packages -DCYCLES_OSL=%MINGW_PREFIX% -DWITH_IMAGE_REDCODE=ON -DWITH_OPENMP=ON -DWITH_LLVM=ON -DLLVM_STATIC=ON _realname=blender pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.72b -_pyver=3.4 -pkgrel=1 +_basever=2.74 +_minorchar= +[[ -z ${_minorchar} ]] && { + pkgver=${_basever} +} || { + pkgver=${_basever}.${_minorchar} +} +_pyver=3.5 +pkgrel=2 pkgdesc="A fully integrated 3D graphics creation suite (mingw-w64)" arch=('any') license=('GPL') @@ -30,17 +36,18 @@ depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-opencollada" "${MINGW_PACKAGE_PREFIX}-opencolorio" "${MINGW_PACKAGE_PREFIX}-openimageio" - "${MINGW_PACKAGE_PREFIX}-openshadinglanguage" + "${MINGW_PACKAGE_PREFIX}-openshadinglanguage-git" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-SDL2" "${MINGW_PACKAGE_PREFIX}-wintab-sdk") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-llvm") #[[ $CARCH == x86_64 ]] && makedepends+=('cuda') #optdepends=('cuda: cycles renderer cuda support') options=(!strip staticlibs !debug) install=blender-${CARCH}.install -source=(#http://mirror.cs.umn.edu/blender.org/source/$_realname-$pkgver.tar.gz - http://download.blender.org/source/$_realname-$pkgver.tar.gz +source=(#http://mirror.cs.umn.edu/blender.org/source/$_realname-${_basever}${_minorchar}.tar.gz + http://download.blender.org/source/$_realname-${_basever}${_minorchar}.tar.gz "mingw-w64-cmake.patch" "fix-mingw-w64-definitions.patch" "mingw-dont-install-3rdparty.patch" @@ -48,19 +55,21 @@ source=(#http://mirror.cs.umn.edu/blender.org/source/$_realname-$pkgver.tar.gz "fix-define-syntax.patch" "mingw-DEBUG-libmv-avoid-too-many-sections.patch" "mingw-DEBUG-dont-suffix-libs-with-_d.patch" - "mingw-use-X11-like-path-layout.patch") -md5sums=('5542766199dd101de79670e437d1ef19' - '7e051acedaf998ac12406c4b1fc70104' - '0b6e0df941c26d0716dbd00454de96a1' + "mingw-use-X11-like-path-layout.patch" + "osl-deprecate-api.patch") +md5sums=('488151953d69d63bedd8ed59f92daf3b' + 'c3426eb608350bdedb89c531b72cff36' + '545eaf9f3268b96d1cb2764c51ec063d' '1969914e11d0a4f74dbfeddad742c9da' 'b11e3fe76c4433abb53c12e723dfbe4f' '9c5a4e230d1c9081096d53d206cc03b4' 'e8dbeac11a43dc307fe826cd41100b8e' '4d104bac37e549eb32cffd473550412e' - '44fdccd19c563dbfc9a49fb7cab1e261') + 'bdac7b47c5886bbcede99516a67de0c2' + '407dd78ee33dd9ab1212ba93af396d6c') prepare() { - cd "$srcdir"/$_realname-$pkgver + cd "$srcdir"/$_realname-${_basever}${_minorchar} patch -p1 -i "${srcdir}"/mingw-w64-cmake.patch patch -p1 -i "${srcdir}"/fix-mingw-w64-definitions.patch patch -p1 -i "${srcdir}"/mingw-dont-install-3rdparty.patch @@ -69,6 +78,7 @@ prepare() { patch -p1 -i "${srcdir}"/mingw-DEBUG-libmv-avoid-too-many-sections.patch patch -p1 -i "${srcdir}"/mingw-DEBUG-dont-suffix-libs-with-_d.patch patch -p1 -i "${srcdir}"/mingw-use-X11-like-path-layout.patch + patch -p1 -i "${srcdir}"/osl-deprecate-api.patch } build() { @@ -86,7 +96,7 @@ build() { else _btype=Release fi - + ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ @@ -119,10 +129,10 @@ build() { -DWITH_OPENMP=ON \ -DWITH_LLVM=ON \ -DLLVM_STATIC=ON \ - ../${_realname}-${pkgver} + ../${_realname}-${_basever}${_minorchar} # Remove the openjpeg line once blender accepts my patch - make # -j1 VERBOSE=1 + make #-j1 VERBOSE=1 } package() { @@ -133,9 +143,9 @@ package() { rm ${pkgdir}${MINGW_PREFIX}/bin/msgfmt.exe mv ${pkgdir}${MINGW_PREFIX}/bin/*.a ${pkgdir}${MINGW_PREFIX}/lib/ - ${MINGW_PREFIX}/bin/python3 -m compileall "${pkgdir}${MINGW_PREFIX}/share/blender/${pkgver}" + ${MINGW_PREFIX}/bin/python3 -m compileall "${pkgdir}${MINGW_PREFIX}/share/blender/${_basever}" ${MINGW_PREFIX}/bin/python3 -m compileall \ - ${pkgdir}${MINGW_PREFIX}/share/blender/${pkgver}/scripts/startup \ - ${pkgdir}${MINGW_PREFIX}/share/blender/${pkgver}/scripts/modules \ - ${pkgdir}${MINGW_PREFIX}/share/blender/${pkgver}/scripts/addons + ${pkgdir}${MINGW_PREFIX}/share/blender/${_basever}/scripts/startup \ + ${pkgdir}${MINGW_PREFIX}/share/blender/${_basever}/scripts/modules \ + ${pkgdir}${MINGW_PREFIX}/share/blender/${_basever}/scripts/addons } diff --git a/mingw-w64-blender/fix-mingw-w64-definitions.patch b/mingw-w64-blender/fix-mingw-w64-definitions.patch index af3ef548b0..629e384343 100644 --- a/mingw-w64-blender/fix-mingw-w64-definitions.patch +++ b/mingw-w64-blender/fix-mingw-w64-definitions.patch @@ -56,29 +56,29 @@ diff -Naur blender/extern/libmv/third_party/glog/src/windows/port.h blender-pp/e #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #ifndef __MINGW32__ enum { STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2 }; -@@ -126,7 +128,9 @@ +@@ -126,7 +128,9 @@ extern int safe_vsnprintf(char *str, size_t size, #define DEFAULT_TEMPLATE_ROOTDIR ".." // ----------------------------------- SYSTEM/PROCESS +#ifndef __MINGW64_VERSION_MAJOR typedef int pid_t; -+#endif //__MINGW64_VERSION_MAJOR ++#endif #define getpid _getpid #include -@@ -135,6 +139,7 @@ +@@ -135,6 +139,7 @@ typedef SSIZE_T ssize_t; #endif // _MSC_VER // ----------------------------------- THREADS -+#ifndef __MINGW64_VERSION_MAJOR ++#if !defined(WIN_PTHREADS_H) typedef DWORD pthread_t; typedef DWORD pthread_key_t; typedef LONG pthread_once_t; -@@ -158,6 +163,7 @@ +@@ -158,6 +163,7 @@ inline struct tm* localtime_r(const time_t* timep, struct tm* result) { return result; #endif } -+#endif //__MINGW64_VERSION_MAJOR ++#endif inline char* strerror_r(int errnum, char* buf, size_t buflen) { #if __MINGW32__ @@ -90,23 +90,26 @@ diff -Naur blender/extern/libmv/third_party/glog/src/windows/port.h blender-pp/e /* SSE intrinsics headers */ -#ifndef FREE_WINDOWS64 - #ifdef __KERNEL_SSE2__ - #include /* SSE 1 */ -@@ -95,14 +94,6 @@ - #include /* SSE 4.1 */ + #ifdef _MSC_VER + #include +@@ -95,17 +94,6 @@ + #endif -#else - -/* MinGW64 has conflicting declarations for these SSE headers in . - * Since we can't avoid including , better only include that */ +-#define NOGDI +-#define NOMINMAX +-#define WIN32_LEAN_AND_MEAN -#include - -#endif - #endif - #endif /* __UTIL_OPTIMIZATION_H__ */ + #endif diff -Naur blender/intern/cycles/util/util_types.h blender-pp/intern/cycles/util/util_types.h --- blender/intern/cycles/util/util_types.h 2014-01-14 08:17:57.658600000 +0400 +++ blender-pp/intern/cycles/util/util_types.h 2014-01-14 08:47:39.800000000 +0400 @@ -158,42 +161,32 @@ diff -Naur blender/intern/ghost/intern/GHOST_TaskbarWin32.h blender-pp/intern/gh diff -Naur blender/intern/ghost/intern/GHOST_WindowWin32.cpp blender-pp/intern/ghost/intern/GHOST_WindowWin32.cpp --- blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2014-01-14 08:17:57.783400000 +0400 +++ blender-pp/intern/ghost/intern/GHOST_WindowWin32.cpp 2014-01-14 07:08:38.456800000 +0400 -@@ -29,6 +29,11 @@ - * \ingroup GHOST +@@ -29,6 +29,12 @@ */ -+// Need glew for some defines -+#include -+#include -+#include + #define _USE_MATH_DEFINES + - #include ++#if defined(WITH_GL_EGL) ++# include "GHOST_ContextEGL.h" ++#else ++# include "GHOST_ContextWGL.h" ++#endif + #include "GHOST_WindowWin32.h" #include "GHOST_SystemWin32.h" -@@ -36,11 +41,6 @@ +@@ -36,12 +41,6 @@ + #include "GHOST_ContextNone.h" #include "utfconv.h" #include "utf_winfunc.h" - --// Need glew for some defines --#include --#include --#include - - // MSVC6 still doesn't define M_PI - #ifndef M_PI - # define M_PI 3.1415926536 -diff -Naur blender/intern/ghost/intern/GHOST_WindowWin32.h blender-pp/intern/ghost/intern/GHOST_WindowWin32.h ---- blender/intern/ghost/intern/GHOST_WindowWin32.h 2014-01-14 08:17:57.783400000 +0400 -+++ blender-pp/intern/ghost/intern/GHOST_WindowWin32.h 2014-01-14 07:08:38.456800000 +0400 -@@ -40,7 +40,7 @@ - #include "GHOST_Window.h" - #include "GHOST_TaskbarWin32.h" +-#if defined(WITH_GL_EGL) +-# include "GHOST_ContextEGL.h" +-#else +-# include "GHOST_ContextWGL.h" +-#endif --#ifndef __MINGW64__ -+#ifndef __MINGW64_VERSION_MAJOR - #define _WIN32_WINNT 0x501 // require Windows XP or newer - #endif - #define WIN32_LEAN_AND_MEAN + + #include diff -Naur blender/source/blender/blenlib/BLI_winstuff.h blender-pp/source/blender/blenlib/BLI_winstuff.h --- blender/source/blender/blenlib/BLI_winstuff.h 2014-01-14 08:18:15.661000000 +0400 +++ blender-pp/source/blender/blenlib/BLI_winstuff.h 2014-01-14 07:08:38.456800000 +0400 diff --git a/mingw-w64-blender/mingw-use-X11-like-path-layout.patch b/mingw-w64-blender/mingw-use-X11-like-path-layout.patch index 95a642f353..6d354539d9 100644 --- a/mingw-w64-blender/mingw-use-X11-like-path-layout.patch +++ b/mingw-w64-blender/mingw-use-X11-like-path-layout.patch @@ -67,24 +67,40 @@ diff -Naur blender-2.72-orig/source/creator/CMakeLists.txt blender-2.72/source/c if(WITH_INSTALL_PORTABLE) set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION}) else() -@@ -396,6 +396,7 @@ - CODE - " - execute_process(COMMAND -+ python3 - ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py - ${TARGETDIR}/blender - ${TARGETDIR}/blender.1) -@@ -598,10 +599,10 @@ +@@ -393,13 +393,13 @@ + # ----------------------------------------------------------------------------- + # Install Targets (Platform Specific) - install( - FILES ${BLENDER_TEXT_FILES} -- DESTINATION ${TARGETDIR} -+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender - ) +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) -- if(WITH_PYTHON) -+ if(WITH_PYTHON AND NOT MINGW) - string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) + if(NOT WITH_PYTHON_MODULE) + if(WITH_DOC_MANPAGE) + add_custom_target( + blender_man_page ALL +- COMMAND ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py ++ COMMAND python3 ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py + ${EXECUTABLE_OUTPUT_PATH}/blender + ${CMAKE_CURRENT_BINARY_DIR}/blender.1) + add_dependencies(blender_man_page blender) +@@ -1003,7 +1003,7 @@ - install( + install(TARGETS blender blender-launcher + COMPONENT Blender +- DESTINATION ".") ++ DESTINATION bin) + + if(MSVC12_REDIST_DIR) + if(CMAKE_CL_64) +diff -Naur blender-2.72-orig/source/blenderplayer/CMakeLists.txt blender-2.72/source/blenderplayer/CMakeLists.txt +--- blender-2.72-orig/source/blenderplayer/CMakeLists.txt 2014-09-24 19:29:55.000000000 +0400 ++++ blender-2.72/source/blenderplayer/CMakeLists.txt 2014-10-07 09:16:00.095600000 +0400 +@@ -58,7 +58,7 @@ + + install(TARGETS blenderplayer + COMPONENT Blenderplayer +- DESTINATION ".") ++ DESTINATION bin) + + elseif(APPLE) + add_executable(blenderplayer ${EXETYPE} bad_level_call_stubs/stubs.c) diff --git a/mingw-w64-blender/mingw-w64-cmake.patch b/mingw-w64-blender/mingw-w64-cmake.patch index c9588ad9d1..e73b45f576 100644 --- a/mingw-w64-blender/mingw-w64-cmake.patch +++ b/mingw-w64-blender/mingw-w64-cmake.patch @@ -1,33 +1,24 @@ ---- blender/CMakeLists.txt.orig 2014-04-08 00:22:36.736800000 +0400 -+++ blender/CMakeLists.txt 2014-04-08 06:51:03.051600000 +0400 -@@ -171,6 +171,8 @@ +--- blender-2.73/CMakeLists.txt.orig 2015-01-07 18:32:07.000000000 +0300 ++++ blender-2.73/CMakeLists.txt 2015-01-10 20:57:50.362800000 +0300 +@@ -251,6 +251,8 @@ + if(UNIX AND NOT APPLE) option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON) - - option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON) + option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON) +elseif(MINGW) + option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON) else() # not an option for other OS's set(WITH_SYSTEM_GLEW OFF) -@@ -178,7 +180,7 @@ +@@ -781,7 +781,7 @@ - - # (unix defaults to System OpenJPEG On) --if(UNIX AND NOT APPLE) -+if((UNIX AND NOT APPLE) OR MINGW) - set(PLATFORM_DEFAULT ON) - else() - set(PLATFORM_DEFAULT OFF) -@@ -579,7 +581,7 @@ - #----------------------------------------------------------------------------- - #Platform specifics + endif() -if(UNIX AND NOT APPLE) +if((UNIX AND NOT APPLE) OR MINGW) macro(find_package_wrapper) - string(TOUPPER ${ARGV0} _NAME_UPPER) if(WITH_STATIC_LIBS) -@@ -598,15 +600,29 @@ + set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES}) +@@ -799,15 +799,29 @@ find_package_wrapper(ZLIB REQUIRED) find_package_wrapper(Freetype REQUIRED) @@ -40,7 +31,7 @@ # find_package(PythonLibs) + if(MINGW) + # normally cached but not since we include them with blender -+ set(PYTHON_VERSION 3.4) # CACHE STRING) ++ set(PYTHON_VERSION 3.5) # CACHE STRING) + set(PYTHON_INCLUDE_DIR "${LIBDIR}/include/python${PYTHON_VERSION}m") # CACHE PATH) + set(PYTHON_LIBRARY "${LIBDIR}/lib/libpython${PYTHON_VERSION}m.dll.a") # CACHE FILEPATH) + # uncached vars @@ -57,7 +48,7 @@ endif() if(WITH_IMAGE_OPENEXR) -@@ -670,7 +686,11 @@ +@@ -896,7 +896,11 @@ endif() if(WITH_CODEC_FFMPEG) @@ -69,7 +60,7 @@ set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries") mark_as_advanced(FFMPEG) -@@ -699,6 +719,9 @@ +@@ -928,6 +928,9 @@ if(OPENCOLLADA_FOUND) find_package_wrapper(XML2) find_package_wrapper(PCRE) @@ -79,10 +70,26 @@ else() set(WITH_OPENCOLLADA OFF) endif() -@@ -855,8 +878,13 @@ - message(FATAL_ERROR "LLVM not found.") +@@ -940,11 +940,15 @@ endif() + find_package_wrapper(OpenShadingLanguage) + if(OSL_FOUND) ++ if(MINGW) ++ list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY}) ++ else() + if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6") + # Note: --whole-archive is needed to force loading of all symbols in liboslexec, + # otherwise LLVM is missing the osl_allocate_closure_component function + set(OSL_LIBRARIES ${OSL_OSLCOMP_LIBRARY} -Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY} -Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}) + endif() ++ endif() + else() + message(STATUS "OSL not found, disabling it from Cycles") + set(WITH_CYCLES_OSL OFF) +@@ -1121,8 +1121,13 @@ + endif() + if(WITH_LLVM OR WITH_SDL_DYNLOAD) + if(MINGW) + # imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc + list(APPEND PLATFORM_LINKLIBS -limagehlp) @@ -93,21 +100,7 @@ endif() if(WITH_CYCLES_OSL) -@@ -867,9 +895,13 @@ - find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib) - find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib) - find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib) -+ if(MINGW) -+ list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY}) -+ else() - # Note: --whole-archive is needed to force loading of all symbols in liboslexec, - # otherwise LLVM is missing the osl_allocate_closure_component function - list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -Wl,--whole-archive ${OSL_LIB_EXEC} -Wl,--no-whole-archive ${OSL_LIB_QUERY}) -+ endif() - find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include) - find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin) - -@@ -883,6 +915,45 @@ +@@ -1130,6 +1130,50 @@ endif() endif() @@ -132,7 +125,12 @@ + else() + message(STATUS "Compiling with MinGW-w32.") + endif() -+ list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi) ++ list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp) ++ ++ if(WITH_INPUT_IME) ++ list(APPEND PLATFORM_LINKLIBS imm32) ++ endif() ++ + set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") + if(WITH_MINGW64) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") @@ -151,9 +149,9 @@ + endif() + else() # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed - set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread") + list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm) -@@ -958,12 +1031,12 @@ +@@ -1229,12 +1229,12 @@ set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel") endif() @@ -166,13 +164,12 @@ - if(MSVC) - set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi) - -@@ -1329,229 +1402,6 @@ - + # needed for some MSVC installations + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") +@@ -1585,247 +1585,6 @@ # used in many places so include globally, like OpenGL blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}") -- + - elseif(CMAKE_COMPILER_IS_GNUCC) - # keep GCC specific stuff here - include(CheckCSourceCompiles) @@ -187,7 +184,12 @@ - - if(WITH_MINGW64) - message(STATUS "Compiling for 64 bit with MinGW-w64.") -- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64) +- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) +- if(GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9) +- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64_gcc49) +- else() +- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64) +- endif() - else() - message(STATUS "Compiling for 32 bit with MinGW-w32.") - set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32) @@ -197,7 +199,12 @@ - endif() - endif() - -- list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi) +- list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp) +- +- if(WITH_INPUT_IME) +- list(APPEND PLATFORM_LINKLIBS -limm32) +- endif() +- - set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") - - if(WITH_MINGW64) @@ -351,11 +358,12 @@ - set(OPENIMAGEIO_LIBRARIES OpenImageIO) - set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib) - set(OPENIMAGEIO_DEFINITIONS "") +- set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe") - endif() - - if(WITH_LLVM) -- set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation") -- set(LLVM_LIBPATH ${LLVM_DIRECTORY}/lib) +- set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation") +- set(LLVM_LIBPATH ${LLVM_ROOT_DIR}/lib) - # Explicitly set llvm lib order. - #---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! --------- - set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive @@ -388,6 +396,13 @@ - set(OPENCOLORIO_DEFINITIONS) - endif() - +- if(WITH_SDL) +- set(SDL ${LIBDIR}/sdl) +- set(SDL_INCLUDE_DIR ${SDL}/include) +- set(SDL_LIBRARY SDL) +- set(SDL_LIBPATH ${SDL}/lib) +- endif() +- - set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152") - - ## DISABLE - causes linking errors @@ -395,6 +410,7 @@ - # set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-libgcc -static-libstdc++") - - endif() - +- # Things common to both mingw and MSVC should go here + set(WINTAB_INC ${LIBDIR}/wintab/include) diff --git a/mingw-w64-blender/osl-deprecate-api.patch b/mingw-w64-blender/osl-deprecate-api.patch new file mode 100644 index 0000000000..ff8d1edd6e --- /dev/null +++ b/mingw-w64-blender/osl-deprecate-api.patch @@ -0,0 +1,11 @@ +--- blender-2.73/intern/cycles/kernel/osl/osl_closures.cpp.orig 2015-01-11 15:22:14.583200000 +0300 ++++ blender-2.73/intern/cycles/kernel/osl/osl_closures.cpp 2015-01-11 15:22:23.334800000 +0300 +@@ -189,7 +189,7 @@ + /* optimization: it's possible to not use a prepare function at all and + * only initialize the actual class when accessing the closure component + * data, but then we need to map the id to the class somehow */ +- ss->register_closure(name, id, params, prepare, NULL, 16); ++ ss->register_closure(name, id, params, prepare, NULL/*, 16*/); + } + + void OSLShader::register_closures(OSLShadingSystem *ss_) diff --git a/mingw-w64-boost/PKGBUILD b/mingw-w64-boost/PKGBUILD index ab5cce1e15..e95463b0d6 100644 --- a/mingw-w64-boost/PKGBUILD +++ b/mingw-w64-boost/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=boost +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.57.0 +pkgver=1.60.0 _boostver=${pkgver//./_} pkgrel=1 pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64)" @@ -10,9 +11,9 @@ arch=('any') url="http://www.boost.org/" license=('custom') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-icu") + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3") @@ -20,48 +21,101 @@ options=('strip' 'buildflags' 'staticlibs') source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.bz2 boost-1.48.0-add-bjam-man-page.patch boost-1.50.0-fix-non-utf8-files.patch - boost-1.50.0-pool.patch + boost-1.58.0-pool.patch boost-1.54.0-bootstrap.patch - boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch - boost-1.56-mingw-context.patch + boost-1.55.0-python-test-PyImport_AppendInittab.patch + boost-1.57.0-build-optflags.patch + boost-1.57.0-mpl-print.patch + boost-1.58.0-pool-test_linking.patch + boost-1.57.0-python-abi_letters.patch + boost-1.57.0-python-libpython_dep.patch + boost-1.57.0-spirit-unused_typedef.patch + boost-1.58.0-address-model.patch + boost-1.60.0-mingw-context.patch + boost-include-intrin-h-on-mingw-w64.patch using-mingw-w64-python.patch - ) -md5sums=('1be49befbdd9a5ce9def2983ba3e7b76' + msys2-mingw-folders-bootstrap.patch) +md5sums=('65a840e1a0b13a558ff19eeb2c4f0cbe' 'dff8166486150121bf89d7050c7e5c49' 'ef427ef3a47f8fdeeb6b4ae3246aa84f' - 'a69f826fd911dcf34189aaaacf16853f' + '014e142fca7f1b534c38eb83ffc1f138' '45dbfa0c971c8625c5cb985e6ed71b5d' - '26a97a0abc51efb7e87853d4d1030d48' - '2c65a8915b70b9de25ac37a73a74d84d' - 'c2aac61b370b321552b5240b9ee7248e') + 'a08837900284c677cf1cff21636ecbe7' + '2f7eaf049a7ab916008806beaf3eea0b' + 'e6631765436f87e90c16778a25d2129c' + 'f9c08fb74e8c7376a0376f60452f24db' + 'a128f4a4e371bdde469f055c7a045db7' + 'ff8ee6c27cc2f4d912f1c028d4f2d91d' + 'd8fb4b4bb69e225ff076513dfd756db9' + 'b70fb38cdfa7f86397162e332c9d1ab3' + '3f3fd3bfbc33808fdf69e682f3e3365b' + '7f2942e46b6aa6eec02bdde157b8b132' + 'c2aac61b370b321552b5240b9ee7248e' + '29ffd4b1636e31678fa8e1afa77305eb') prepare() { cd "${srcdir}/boost_${_boostver}" - patch -p1 -i ${srcdir}/boost-1.50.0-fix-non-utf8-files.patch - patch -p1 -i ${srcdir}/boost-1.48.0-add-bjam-man-page.patch - patch -p1 -i ${srcdir}/boost-1.50.0-pool.patch - patch -p1 -i ${srcdir}/boost-1.56-mingw-context.patch patch -p1 -i ${srcdir}/boost-1.54.0-bootstrap.patch - patch -p1 -i ${srcdir}/boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch - + + # https://svn.boost.org/trac/boost/ticket/6150 + patch -p1 -i ${srcdir}/boost-1.50.0-fix-non-utf8-files.patch + + # Add a manual page for bjam, based on the on-line documentation: + # http://www.boost.org/boost-build2/doc/html/bbv2/overview.html + patch -p1 -i ${srcdir}/boost-1.48.0-add-bjam-man-page.patch + + # https://bugzilla.redhat.com/show_bug.cgi?id=828856 + # https://bugzilla.redhat.com/show_bug.cgi?id=828857 + # https://svn.boost.org/trac/boost/ticket/6701 + patch -p0 -i ${srcdir}/boost-1.58.0-pool.patch + + # https://svn.boost.org/trac/boost/ticket/5637 + patch -p1 -i ${srcdir}/boost-1.57.0-mpl-print.patch + + # https://svn.boost.org/trac/boost/ticket/8870 + patch -p1 -i ${srcdir}/boost-1.57.0-spirit-unused_typedef.patch + + # https://svn.boost.org/trac/boost/ticket/9038 + patch -p1 -i ${srcdir}/boost-1.58.0-pool-test_linking.patch + + # https://bugzilla.redhat.com/show_bug.cgi?id=1102667 + patch -p1 -i ${srcdir}/boost-1.57.0-python-libpython_dep.patch + patch -p1 -i ${srcdir}/boost-1.57.0-python-abi_letters.patch + patch -p1 -i ${srcdir}/boost-1.55.0-python-test-PyImport_AppendInittab.patch + + # https://bugzilla.redhat.com/show_bug.cgi?id=1190039 + patch -p1 -i ${srcdir}/boost-1.57.0-build-optflags.patch + + # Prevent gcc.jam from setting -m32 or -m64. + patch -p1 -i ${srcdir}/boost-1.58.0-address-model.patch + + # https://svn.boost.org/trac/boost/ticket/7262 + patch -p0 -i ${srcdir}/boost-1.60.0-mingw-context.patch + + # Fix FTBFS on recent mingw-w64 and also use intrinsics based + # versions of the Interlocked symbols which are better optimized + patch -p0 -i ${srcdir}/boost-include-intrin-h-on-mingw-w64.patch + # Use out own build Python patch -p1 -i ${srcdir}/using-mingw-w64-python.patch - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - - echo "using python : 2.7 : ${PREFIX_DEPS}/bin/python2.exe : ${PREFIX_DEPS}/include/python2.7 ;" >> ./tools/build/src/user-config.jam - echo "using python : 3.4 : ${PREFIX_DEPS}/bin/python3.exe : ${PREFIX_DEPS}/include/python3.4m : ${PREFIX_DEPS}/lib/python3.4/config-3.4m ;" >> ./tools/build/src/user-config.jam - - mkdir -p "${srcdir}/boost-${MINGW_CHOST}" - lndir "${srcdir}/boost_${_boostver}" "${srcdir}/boost-${MINGW_CHOST}" + patch -p1 -i ${srcdir}/msys2-mingw-folders-bootstrap.patch } build() { - cd "${srcdir}/boost-${MINGW_CHOST}" - ./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX} + local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX}) + + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + lndir "${srcdir}/boost_${_boostver}" "${srcdir}/build-${MINGW_CHOST}" + + cd "${srcdir}/build-${MINGW_CHOST}" + + echo "using python : 2.7 : ${PREFIX_DEPS}/bin/python2.exe : ${PREFIX_DEPS}/include/python2.7 ;" >> ./tools/build/src/user-config.jam + echo "using python : 3.5 : ${PREFIX_DEPS}/bin/python3.exe : ${PREFIX_DEPS}/include/python3.5m : ${PREFIX_DEPS}/lib/python3.5/config-3.5m ;" >> ./tools/build/src/user-config.jam + #echo "using gcc : : ${PREFIX_DEPS}/bin/g++.exe : ${PREFIX_DEPS}/bin/windres.exe ;" >> ./tools/build/src/user-config.jam + + ./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX} --with-toolset=gcc case ${CARCH} in i686) @@ -80,13 +134,17 @@ build() { ./b2 \ toolset=gcc \ - variant=$variant \ + link=shared,static \ + address-model=${_model} \ + pch=off \ + runtime-link=shared \ threading=multi \ threadapi=win32 \ - link=shared,static \ - runtime-link=shared \ + variant=${variant} \ --debug-configuration \ --prefix=${pkgdir}${MINGW_PREFIX} \ + --layout=tagged \ + --without-mpi \ -sHAVE_ICU=1 \ -sICU_PATH=${MINGW_PREFIX} \ -sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \ @@ -100,15 +158,11 @@ build() { -sZLIB_BINARY=z \ -sZLIB_INCLUDE=${MINGW_PREFIX}/include \ -sZLIB_LIBPATH=${MINGW_PREFIX}/zlib \ - pch=off \ - -d2 \ - address-model=${_model} \ - --layout=tagged \ - --without-mpi + -d2 } package() { - cd "${srcdir}/boost-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" case ${CARCH} in i686) local _model=32 @@ -126,7 +180,7 @@ package() { ./b2 \ toolset=gcc \ - variant=$variant \ + variant=${variant} \ threading=multi \ threadapi=win32 \ link=shared,static \ diff --git a/mingw-w64-boost/boost-1.55.0-python-test-PyImport_AppendInittab.patch b/mingw-w64-boost/boost-1.55.0-python-test-PyImport_AppendInittab.patch new file mode 100644 index 0000000000..1d2ee5c382 --- /dev/null +++ b/mingw-w64-boost/boost-1.55.0-python-test-PyImport_AppendInittab.patch @@ -0,0 +1,98 @@ +diff -up boost_1_55_0/libs/python/test/exec.cpp\~ boost_1_55_0/libs/python/test/exec.cpp +--- boost_1_55_0/libs/python/test/exec.cpp~ 2010-07-05 00:38:38.000000000 +0200 ++++ boost_1_55_0/libs/python/test/exec.cpp 2015-01-09 21:31:12.903218280 +0100 +@@ -56,6 +56,20 @@ void eval_test() + BOOST_TEST(value == "ABCDEFG"); + } + ++struct PyCtx ++{ ++ PyCtx() { ++ Py_Initialize(); ++ } ++ ++ ~PyCtx() { ++ // N.B. certain problems may arise when Py_Finalize is called when ++ // using Boost.Python. However in this test suite it all seems to ++ // work fine. ++ Py_Finalize(); ++ } ++}; ++ + void exec_test() + { + // Register the module with the interpreter +@@ -68,6 +82,8 @@ void exec_test() + ) == -1) + throw std::runtime_error("Failed to add embedded_hello to the interpreter's " + "builtin modules"); ++ ++ PyCtx ctx; + // Retrieve the main module + python::object main = python::import("__main__"); + +@@ -148,41 +164,43 @@ void check_pyerr(bool pyerr_expected=fal + } + } + ++template ++bool ++run_and_handle_exception(Cb cb, bool pyerr_expected = false) ++{ ++ PyCtx ctx; ++ if (python::handle_exception(cb)) { ++ check_pyerr(pyerr_expected); ++ return true; ++ } else { ++ return false; ++ } ++} ++ + int main(int argc, char **argv) + { + BOOST_TEST(argc == 2 || argc == 3); + std::string script = argv[1]; +- // Initialize the interpreter +- Py_Initialize(); + +- if (python::handle_exception(eval_test)) { +- check_pyerr(); +- } +- else if(python::handle_exception(exec_test)) { +- check_pyerr(); +- } +- else if (python::handle_exception(boost::bind(exec_file_test, script))) { ++ // N.B. exec_test mustn't be called through run_and_handle_exception ++ // as it needs to handles the python context by itself. ++ if (run_and_handle_exception(eval_test) ++ || python::handle_exception(exec_test)) + check_pyerr(); +- } +- +- if (python::handle_exception(exec_test_error)) +- { +- check_pyerr(/*pyerr_expected*/ true); +- } + else +- { ++ run_and_handle_exception(boost::bind(exec_file_test, script)); ++ ++ if (!run_and_handle_exception(exec_test_error, true)) + BOOST_ERROR("Python exception expected, but not seen."); +- } + + if (argc > 2) { ++ PyCtx ctx; + // The main purpose is to test compilation. Since this test generates + // a file and I (rwgk) am uncertain about the side-effects, run it only + // if explicitly requested. + exercise_embedding_html(); + } + +- // Boost.Python doesn't support Py_Finalize yet. +- // Py_Finalize(); + return boost::report_errors(); + } + + +Diff finished. Fri Jan 9 21:31:13 2015 diff --git a/mingw-w64-boost/boost-1.56-mingw-context.patch b/mingw-w64-boost/boost-1.56-mingw-context.patch deleted file mode 100644 index 248f9dac32..0000000000 --- a/mingw-w64-boost/boost-1.56-mingw-context.patch +++ /dev/null @@ -1,884 +0,0 @@ -diff -rcN boost-1.56-vanilla/libs/context/build/Jamfile.v2 boost-1.56-patched/libs/context/build/Jamfile.v2 -*** boost-1.56-vanilla/libs/context/build/Jamfile.v2 2014-07-21 07:59:27.000000000 +0200 ---- boost-1.56-patched/libs/context/build/Jamfile.v2 2014-10-01 19:02:57.719800549 +0200 -*************** -*** 27,35 **** - local rule default_binary_format ( ) - { - local tmp = elf ; -! if [ os.name ] = "MACOSX" { tmp = mach-o ; } -! if [ os.name ] = "NT" { tmp = pe ; } -! if [ os.name ] = "AIX" { tmp = xcoff ; } - return $(tmp) ; - } - ---- 27,36 ---- - local rule default_binary_format ( ) - { - local tmp = elf ; -! # if [ os.name ] = "MACOSX" { tmp = mach-o ; } -! # if [ os.name ] = "NT" { tmp = pe ; } -! # if [ os.name ] = "AIX" { tmp = xcoff ; } -! tmp = pe ; - return $(tmp) ; - } - -*************** -*** 46,54 **** - local rule default_abi ( ) - { - local tmp = sysv ; -! if [ os.name ] = "NT" { tmp = ms ; } -! else if [ os.platform ] = "ARM" { tmp = aapcs ; } -! else if [ os.platform ] = "MIPS" { tmp = o32 ; } - return $(tmp) ; - } - ---- 47,56 ---- - local rule default_abi ( ) - { - local tmp = sysv ; -! # if [ os.name ] = "NT" { tmp = ms ; } -! # else if [ os.platform ] = "ARM" { tmp = aapcs ; } -! # else if [ os.platform ] = "MIPS" { tmp = o32 ; } -! tmp = ms ; - return $(tmp) ; - } - -*************** -*** 587,592 **** ---- 589,605 ---- - ; - - alias asm_context_sources -+ : asm/make_i386_ms_pe_gas.S -+ asm/jump_i386_ms_pe_gas.S -+ dummy.cpp -+ : ms -+ 32 -+ x86 -+ pe -+ gcc -+ ; -+ -+ alias asm_context_sources - : asm/make_i386_ms_pe_masm.asm - asm/jump_i386_ms_pe_masm.asm - dummy.cpp -*************** -*** 721,726 **** ---- 734,750 ---- - ; - - alias asm_context_sources -+ : asm/make_x86_64_ms_pe_gas.S -+ asm/jump_x86_64_ms_pe_gas.S -+ dummy.cpp -+ : ms -+ 64 -+ x86 -+ pe -+ gcc -+ ; -+ -+ alias asm_context_sources - : asm/make_x86_64_ms_pe_masm.asm - asm/jump_x86_64_ms_pe_masm.asm - dummy.cpp -diff -rcN boost-1.56-vanilla/libs/context/src/asm/jump_i386_ms_pe_gas.S boost-1.56-patched/libs/context/src/asm/jump_i386_ms_pe_gas.S -*** boost-1.56-vanilla/libs/context/src/asm/jump_i386_ms_pe_gas.S 1970-01-01 01:00:00.000000000 +0100 ---- boost-1.56-patched/libs/context/src/asm/jump_i386_ms_pe_gas.S 2014-10-06 12:57:06.000000000 +0200 -*************** -*** 0 **** ---- 1,141 ---- -+ /* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+ */ -+ -+ /* -+ --------------------------------------------------------------------------------- -+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | -+ --------------------------------------------------------------------------------- -+ | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | -+ --------------------------------------------------------------------------------- -+ | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | -+ --------------------------------------------------------------------------------- -+ --------------------------------------------------------------------------------- -+ | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -+ --------------------------------------------------------------------------------- -+ | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | -+ --------------------------------------------------------------------------------- -+ | ESI | EBX | EBP | EIP | EXIT | | SEH NXT |SEH HNDLR| -+ --------------------------------------------------------------------------------- -+ */ -+ -+ .file "jump_i386_ms_pe_gas.S" -+ .text -+ .p2align 4,,15 -+ .globl _jump_fcontext -+ .def _jump_fcontext; .scl 2; .type 32; .endef -+ _jump_fcontext: -+ -+ /* fourth arg of jump_fcontext() == flag indicating preserving FPU */ -+ movl 0x10(%esp),%ecx -+ pushl %ebp -+ pushl %ebx -+ pushl %esi -+ pushl %edi -+ -+ /* load NT_TIB into ECX */ -+ movl %fs:0x18,%EDX -+ -+ /* load current SEH exception list */ -+ movl (%edx),%eax -+ pushl %eax -+ -+ /* load current stack base */ -+ movl 0x4(%edx),%eax -+ pushl %eax -+ -+ /* load current stack limit */ -+ movl 0x8(%edx),%eax -+ pushl %eax -+ -+ /* load current deallocation stack */ -+ movl 0xe0c(%edx),%eax -+ pushl %eax -+ -+ /* load fiber local storage */ -+ movl 0x10(%edx),%eax -+ pushl %eax -+ -+ /* prepare stack for FPU */ -+ leal -0x8(%esp),%esp -+ -+ /* test for flag preserve_fpu */ -+ testl %ecx,%ecx -+ je nxt1 -+ -+ /* save MMX control- and status-word */ -+ stmxcsr (%esp) -+ -+ /* save x87 control-word */ -+ fnstcw 0x4(%esp) -+ -+ nxt1: -+ /* first arg of jump_fcontext() == context jumping from */ -+ movl 0x30(%esp),%eax -+ -+ /* store ESP (pointing to context-data) in EAX */ -+ movl %esp,(%eax) -+ -+ /* second arg of jump_fcontext() == context jumping to */ -+ movl 0x34(%esp),%edx -+ -+ /* third arg of jump_fcontext() == value to be returned after jump */ -+ movl 0x38(%esp),%eax -+ -+ /* restore ESP (pointing to context-data) from EDX */ -+ movl %edx,%esp -+ -+ /* test for flag preserve_fpu */ -+ testl %ecx,%ecx -+ je nxt2 -+ -+ /* restore MMX control- and status-word */ -+ ldmxcsr (%esp) -+ -+ /* restore x87 control-word */ -+ fldcw 0x4(%esp) -+ -+ nxt2: -+ /* prepare stack for FPU */ -+ leal 0x8(%esp),%esp -+ -+ /* load NT_TIB into ECX */ -+ movl %fs:0x18,%edx -+ -+ /* restore fiber local storage */ -+ popl %ecx -+ movl %ecx,0x10(%edx) -+ -+ /* restore current deallocation stack */ -+ popl %ecx -+ movl %ecx,0xe0c(%edx) -+ -+ /* restore current stack limit */ -+ popl %ecx -+ movl %ecx,0x8(%edx) -+ -+ /* restore current stack base */ -+ popl %ecx -+ movl %ecx,0x4(%edx) -+ -+ /* restore current SEH exception list */ -+ popl %ecx -+ movl %ecx,(%edx) -+ popl %edi -+ popl %esi -+ popl %ebx -+ popl %ebp -+ -+ /* restore return-address */ -+ popl %edx -+ -+ /* use value in EAX as return-value after jump */ -+ /* use value in EAX as first arg in context function */ -+ movl %eax,0x4(%esp) -+ -+ /* indirect jump to context */ -+ jmpl *%edx -diff -rcN boost-1.56-vanilla/libs/context/src/asm/jump_x86_64_ms_pe_gas.S boost-1.56-patched/libs/context/src/asm/jump_x86_64_ms_pe_gas.S -*** boost-1.56-vanilla/libs/context/src/asm/jump_x86_64_ms_pe_gas.S 1970-01-01 01:00:00.000000000 +0100 ---- boost-1.56-patched/libs/context/src/asm/jump_x86_64_ms_pe_gas.S 2014-10-06 12:45:38.000000000 +0200 -*************** -*** 0 **** ---- 1,212 ---- -+ /* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+ */ -+ -+ /* -+ ---------------------------------------------------------------------------------- -+ | 0 | 1 | | -+ ---------------------------------------------------------------------------------- -+ | 0x0 | 0x4 | | -+ ---------------------------------------------------------------------------------- -+ | | | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -+ ---------------------------------------------------------------------------------- -+ | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | 0x20 | 0x24 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -+ ---------------------------------------------------------------------------------- -+ | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | 0x40 | 0x44 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -+ ---------------------------------------------------------------------------------- -+ | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | 0x60 | 0x64 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -+ ---------------------------------------------------------------------------------- -+ | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | 0x80 | 0x84 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -+ ---------------------------------------------------------------------------------- -+ | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | 0xa0 | 0xa4 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -+ ---------------------------------------------------------------------------------- -+ | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | 0xc0 | 0xc4 | -+ ---------------------------------------------------------------------------------- -+ | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -+ ---------------------------------------------------------------------------------- -+ | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | 0xe0 | 0xe4 | -+ ---------------------------------------------------------------------------------- -+ | limit | base | R12 | R13 | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -+ ---------------------------------------------------------------------------------- -+ | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | -+ ---------------------------------------------------------------------------------- -+ | R14 | R15 | RDI | RSI | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -+ ---------------------------------------------------------------------------------- -+ | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | -+ ---------------------------------------------------------------------------------- -+ | RBX | RBP | RIP | EXIT | -+ ---------------------------------------------------------------------------------- -+ */ -+ -+ .file "jump_x86_64_ms_pe_gas.S" -+ .text -+ .p2align 4,,15 -+ .globl jump_fcontext -+ .def jump_fcontext; .scl 2; .type 32; .endef -+ .seh_proc jump_fcontext -+ jump_fcontext: -+ .seh_endprologue -+ push %rbp -+ push %rbx -+ push %rsi -+ push %rdi -+ push %r15 -+ push %r14 -+ push %r13 -+ push %r12 -+ /* load NT_TIB */ -+ mov %gs:0x30,%r10 -+ /* save current stack base */ -+ mov 0x8(%r10),%rax -+ push %rax -+ /* save current stack limit */ -+ mov 0x10(%r10),%rax -+ push %rax -+ /* save current deallocation stack */ -+ mov 0x1478(%r10),%rax -+ push %rax -+ /* save fiber local storage */ -+ mov 0x18(%r10),%rax -+ push %rax -+ /* prepare stack for FPU */ -+ lea -0xa8(%rsp),%rsp -+ /* test for flag preserve_fpu */ -+ test %r9,%r9 -+ je nxt1 -+ -+ /* save MMX control- and status-word */ -+ stmxcsr 0xa0(%rsp) -+ /* save x87 control-word */ -+ fnstcw 0xa4(%rsp) -+ -+ /* save XMM storage */ -+ movaps %xmm6,(%rsp) -+ movaps %xmm7,0x10(%rsp) -+ movaps %xmm8,0x20(%rsp) -+ movaps %xmm9,0x30(%rsp) -+ movaps %xmm10,0x40(%rsp) -+ movaps %xmm11,0x50(%rsp) -+ movaps %xmm12,0x60(%rsp) -+ movaps %xmm13,0x70(%rsp) -+ movaps %xmm14,0x80(%rsp) -+ movaps %xmm15,0x90(%rsp) -+ -+ nxt1: -+ /* set R10 to zero */ -+ xor %r10,%r10 -+ /* set indicator */ -+ push %r10 -+ /* store RSP (pointing to context-data) in RCX */ -+ mov %rsp,(%rcx) -+ /* restore RSP (pointing to context-data) from RDX */ -+ mov %rdx,%rsp -+ /* load indicator */ -+ pop %r10 -+ /* test for flag preserve_fpu */ -+ test %r9,%r9 -+ je nxt2 -+ -+ /* restore MMX control- and status-word */ -+ ldmxcsr 0xa0(%rsp) -+ /* save x87 control-word */ -+ fldcw 0xa4(%rsp) -+ -+ /* restore XMM storage */ -+ movaps (%rsp),%xmm6 -+ movaps 0x10(%rsp),%xmm7 -+ movaps 0x20(%rsp),%xmm8 -+ movaps 0x30(%rsp),%xmm9 -+ movaps 0x40(%rsp),%xmm10 -+ movaps 0x50(%rsp),%xmm11 -+ movaps 0x60(%rsp),%xmm12 -+ movaps 0x70(%rsp),%xmm13 -+ movaps 0x80(%rsp),%xmm14 -+ movaps 0x90(%rsp),%xmm15 -+ -+ nxt2: -+ /* set offset of stack */ -+ mov $0xa8,%rcx -+ /* test for indicator */ -+ test %r10,%r10 -+ je nxt3 -+ add $0x8,%rcx -+ -+ nxt3: -+ /* prepare stack for FPU */ -+ lea (%rsp,%rcx,1),%rsp -+ -+ /* load NT_TIB */ -+ mov %gs:0x30,%r10 -+ -+ /* restore fiber local storage */ -+ pop %rax -+ /* restore deallocation stack */ -+ mov %rax,0x18(%r10) -+ pop %rax -+ /* restore stack limit */ -+ mov %rax,0x1478(%r10) -+ pop %rax -+ /* restore stack base */ -+ mov %rax,0x10(%r10) -+ pop %rax -+ mov %rax,0x8(%r10) -+ pop %r12 -+ pop %r13 -+ pop %r14 -+ pop %r15 -+ pop %rdi -+ pop %rsi -+ pop %rbx -+ pop %rbp -+ -+ /* restore return-address */ -+ pop %r10 -+ /* use third arg as return-value after jump */ -+ mov %r8,%rax -+ /* use third arg as first arg in context function */ -+ mov %r8,%rcx -+ -+ /* indirect jump to context */ -+ jmpq *%r10 -+ .seh_endproc -diff -rcN boost-1.56-vanilla/libs/context/src/asm/make_i386_ms_pe_gas.S boost-1.56-patched/libs/context/src/asm/make_i386_ms_pe_gas.S -*** boost-1.56-vanilla/libs/context/src/asm/make_i386_ms_pe_gas.S 1970-01-01 01:00:00.000000000 +0100 ---- boost-1.56-patched/libs/context/src/asm/make_i386_ms_pe_gas.S 2014-10-01 18:54:55.000000000 +0200 -*************** -*** 0 **** ---- 1,126 ---- -+ /* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+ */ -+ -+ /* -+ --------------------------------------------------------------------------------- -+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | -+ --------------------------------------------------------------------------------- -+ | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | -+ --------------------------------------------------------------------------------- -+ | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | -+ --------------------------------------------------------------------------------- -+ --------------------------------------------------------------------------------- -+ | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -+ --------------------------------------------------------------------------------- -+ | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | -+ --------------------------------------------------------------------------------- -+ | ESI | EBX | EBP | EIP | EXIT | | SEH NXT |SEH HNDLR| -+ --------------------------------------------------------------------------------- -+ */ -+ -+ .file "make_i386_ms_pe_gas.S" -+ .text -+ .p2align 4,,15 -+ .globl _make_fcontext -+ .def _make_fcontext; .scl 2; .type 32; .endef -+ _make_fcontext: -+ .def __exit; .scl 2; .type 32; .endef /* standard C library function */ -+ /* first arg of make_fcontext() == top of context-stack */ -+ movl 0x4(%esp),%eax -+ /* reserve space for first argument of context-function */ -+ /* eax might already point to a 16byte border */ -+ leal -0x8(%eax),%eax -+ /* shift address in EAX to lower 16 byte boundary */ -+ -+ andl $0xfffffff0,%eax -+ /* reserve space for context-data on context-stack */ -+ /* size for fc_mxcsr .. EIP + return-address for context-function */ -+ /* on context-function entry: (ESP -0x4) % 8 == 0 */ -+ /* additional space is required for SEH */ -+ leal -0x3c(%eax),%eax -+ -+ /* first arg of make_fcontext() == top of context-stack */ -+ movl 0x4(%esp),%ecx -+ -+ /* save top address of context stack as 'base' */ -+ movl %ecx,0x14(%eax) -+ -+ /* second arg of make_fcontext() == size of context-stack */ -+ movl 0x8(%esp),%edx -+ -+ /* negate stack size for LEA instruction (== substraction) */ -+ negl %edx -+ -+ /* compute bottom address of context stack (limit) */ -+ leal (%edx,%ecx,1),%ecx -+ -+ /* save bottom address of context-stack as 'limit' */ -+ movl %ecx,0x10(%eax) -+ -+ /* save bottom address of context-stack as 'dealloction stack' */ -+ movl %ecx,0xc(%eax) -+ -+ /* third arg of make_fcontext() == address of context-function */ -+ movl 0xc(%esp),%ecx -+ movl %ecx,0x2c(%eax) -+ -+ /* save MMX control- and status-word */ -+ stmxcsr (%eax) -+ -+ /* save x87 control-word */ -+ fnstcw 0x4(%eax) -+ -+ /* compute abs address of label finish */ -+ movl $finish,%ecx -+ -+ /* save address of finish as return-address for context-function */ -+ /* will be entered after context-function returns */ -+ movl %ecx,0x30(%eax) -+ -+ /* load NT_TIB into ECX */ -+ movl %fs:0x0,%ecx -+ -+ /* traverse current seh chain to get the last exception handler installed by Windows */ -+ /* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */ -+ /* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */ -+ /* at its end by RaiseException all seh-handlers are disregarded if not present and the */ -+ /* program is aborted */ -+ walk: -+ /* load 'next' member of current SEH into EDX */ -+ movl (%ecx),%edx -+ /* test if 'next' of current SEH is last (== 0xffffffff) */ -+ incl %edx -+ je found -+ decl %edx -+ /* exchange content; ECX contains address of next SEH */ -+ xchgl %edx,%ecx -+ /* inspect next SEH */ -+ jmp walk -+ found: -+ /* load 'handler' member of SEH == address of last SEH handler installed by Windows */ -+ movl 0x4(%ecx),%ecx -+ /* save address in ECX as SEH handler for context */ -+ movl %ecx,0x3c(%eax) -+ /* set ECX to -1 */ -+ movl $0xffffffff,%ecx -+ /* save ECX as next SEH item */ -+ movl %ecx,0x38(%eax) -+ /* load address of next SEH item */ -+ leal 0x38(%eax),%ecx -+ /* save next SEH */ -+ movl %ecx,0x18(%eax) -+ /* return pointer to context-data */ -+ ret -+ -+ finish: -+ /* exit code is zero */ -+ xorl %eax,%eax -+ movl %eax,(%esp) -+ /* exit application */ -+ call _exit -+ hlt -diff -rcN boost-1.56-vanilla/libs/context/src/asm/make_x86_64_ms_pe_gas.S boost-1.56-patched/libs/context/src/asm/make_x86_64_ms_pe_gas.S -*** boost-1.56-vanilla/libs/context/src/asm/make_x86_64_ms_pe_gas.S 1970-01-01 01:00:00.000000000 +0100 ---- boost-1.56-patched/libs/context/src/asm/make_x86_64_ms_pe_gas.S 2014-10-06 12:46:39.000000000 +0200 -*************** -*** 0 **** ---- 1,159 ---- -+ /* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+ */ -+ -+ /* -+ ---------------------------------------------------------------------------------- -+ | 0 | 1 | | -+ ---------------------------------------------------------------------------------- -+ | 0x0 | 0x4 | | -+ ---------------------------------------------------------------------------------- -+ | | | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -+ ---------------------------------------------------------------------------------- -+ | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | 0x20 | 0x24 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -+ ---------------------------------------------------------------------------------- -+ | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | 0x40 | 0x44 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -+ ---------------------------------------------------------------------------------- -+ | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | 0x60 | 0x64 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -+ ---------------------------------------------------------------------------------- -+ | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | 0x80 | 0x84 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -+ ---------------------------------------------------------------------------------- -+ | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | 0xa0 | 0xa4 | -+ ---------------------------------------------------------------------------------- -+ | SEE registers (XMM6-XMM15) | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -+ ---------------------------------------------------------------------------------- -+ | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | 0xc0 | 0xc4 | -+ ---------------------------------------------------------------------------------- -+ | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -+ ---------------------------------------------------------------------------------- -+ | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | 0xe0 | 0xe4 | -+ ---------------------------------------------------------------------------------- -+ | limit | base | R12 | R13 | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -+ ---------------------------------------------------------------------------------- -+ | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | -+ ---------------------------------------------------------------------------------- -+ | R14 | R15 | RDI | RSI | -+ ---------------------------------------------------------------------------------- -+ ---------------------------------------------------------------------------------- -+ | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -+ ---------------------------------------------------------------------------------- -+ | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | -+ ---------------------------------------------------------------------------------- -+ | RBX | RBP | RIP | EXIT | -+ ---------------------------------------------------------------------------------- -+ */ -+ -+ -+ .file "make_x86_64_ms_pe_gas.S" -+ .text -+ .p2align 4,,15 -+ .globl make_fcontext -+ -+ .def make_fcontext; .scl 2; .type 32; .endef -+ /* generate function table entry in .pdata and unwind information in */ -+ /* .xdata for a function's structured exception handling unwind behavior */ -+ .seh_proc make_fcontext -+ make_fcontext: -+ .seh_endprologue -+ -+ /* first arg of make_fcontext() == top of context-stack */ -+ mov %rcx,%rax -+ -+ /* reserve 32byte shadow-space for context-function */ -+ sub $0x28,%rax -+ -+ /* shift address in RAX to lower 16 byte boundary */ -+ /* == pointer to fcontext_t and address of context stack */ -+ and $0xfffffffffffffff0,%rax -+ -+ /* reserve space for context-data on context-stack */ -+ /* size for fc_mxcsr .. RIP + return-address for context-function */ -+ /* on context-function entry: (RSP -0x8) % 16 == 0 */ -+ sub $0x128,%rax -+ -+ /* third arg of make_fcontext() == address of context-function */ -+ mov %r8,0x118(%rax) -+ -+ /* first arg of make_fcontext() == top of context-stack */ -+ /* save top address of context stack as 'base' */ -+ mov %rcx,0xd0(%rax) -+ -+ /* second arg of make_fcontext() == size of context-stack */ -+ /* negate stack size for LEA instruction (== substraction) */ -+ neg %rdx -+ -+ /* compute bottom address of context stack (limit) */ -+ lea (%rdx,%rcx,1),%rcx -+ -+ /* save bottom address of context stack as 'limit' */ -+ mov %rcx,0xc8(%rax) -+ /* save address of context stack limit as 'dealloction stack' */ -+ mov %rcx,0xc0(%rax) -+ -+ /* save MMX control- and status-word */ -+ stmxcsr 0xa8(%rax) -+ /* save x87 control-word */ -+ fnstcw 0xac(%rax) -+ -+ /* compute abs address of label finish */ -+ leaq finish(%rip), %rcx -+ -+ /* save address of finish as return-address for context-function */ -+ /* will be entered after context-function returns */ -+ mov %rcx,0x120(%rax) -+ -+ /* set indicator */ -+ mov $0x1,%rcx -+ mov %rcx,(%rax) -+ -+ /* return pointer to context-data */ -+ retq -+ finish: -+ -+ /* 32byte shadow-space for _exit() are */ -+ /* already reserved by make_fcontext() */ -+ /* exit code is zero */ -+ xor %rcx,%rcx -+ -+ /* exit application */ -+ callq _exit -+ hlt -+ .seh_endproc -+ -+ .def _exit; .scl 2; .type 32; .endef /* standard C library function */ -diff -rcN boost-1.56-vanilla/libs/thread/build/Jamfile.v2 boost-1.56-patched/libs/thread/build/Jamfile.v2 -*** boost-1.56-vanilla/libs/thread/build/Jamfile.v2 2014-08-03 20:58:54.000000000 +0200 ---- boost-1.56-patched/libs/thread/build/Jamfile.v2 2014-10-01 19:02:57.719800549 +0200 -*************** -*** 134,140 **** - local rule default_threadapi ( ) - { - local api = pthread ; -! if [ os.name ] = "NT" { api = win32 ; } - return $(api) ; - } - ---- 134,141 ---- - local rule default_threadapi ( ) - { - local api = pthread ; -! #if [ os.name ] = "NT" { api = win32 ; } -! api = win32 ; - return $(api) ; - } - -------------------------- * -+ * | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | 0x108 | 0x10c | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | 0x128 | 0x12c | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * * -+ * *************************************************************************************/ -+ -+.file "jump_x86_64_ms_pe_gas.S" -+.text -+.p2align 4,,15 -+.globl jump_fcontext -+.def jump_fcontext; .scl 2; .type 32; .endef -+.seh_proc jump_fcontext -+jump_fcontext: -+.seh_endprologue -+ movq %r12, (%rcx) /* save R12 */ -+ movq %r13, 0x08(%rcx) /* save R13 */ -+ movq %r14, 0x10(%rcx) /* save R14 */ -+ movq %r15, 0x18(%rcx) /* save R15 */ -+ movq %rdi, 0x20(%rcx) /* save RDI */ -+ movq %rsi, 0x28(%rcx) /* save RSI */ -+ movq %rbx, 0x30(%rcx) /* save RBX */ -+ movq %rbp, 0x38(%rcx) /* save RBP */ -+ -+ movq %gs:(0x30), %r10 /* load NT_TIB */ -+ movq 0x08(%r10), %rax /* load current stack base */ -+ movq %rax, 0x50(%rcx) /* save current stack base */ -+ movq 0x10(%r10), %rax /* load current stack limit */ -+ movq %rax, 0x60(%rcx) /* save current stack limit */ -+ movq 0x18(%r10), %rax /* load fiber local storage */ -+ movq %rax, 0x68(%rcx) /* save fiber local storage */ -+ -+ testq %r9, %r9 -+ je 1f -+ -+ stmxcsr 0x70(%rcx) /* save MMX control and status word */ -+ fnstcw 0x74(%rcx) /* save x87 control word */ -+ /* save XMM storage */ -+ /* save start address of SSE register block in R10 */ -+ leaq 0x90(%rcx), %r10 -+ /* shift address in R10 to lower 16 byte boundary */ -+ /* == pointer to SEE register block */ -+ andq $-16, %r10 -+ -+ movaps %xmm6, (%r10) -+ movaps %xmm7, 0x10(%r10) -+ movaps %xmm8, 0x20(%r10) -+ movaps %xmm9, 0x30(%r10) -+ movaps %xmm10, 0x40(%r10) -+ movaps %xmm11, 0x50(%r10) -+ movaps %xmm12, 0x60(%r10) -+ movaps %xmm13, 0x70(%r10) -+ movaps %xmm14, 0x80(%r10) -+ movaps %xmm15, 0x90(%r10) -+ -+ ldmxcsr 0x70(%rdx) /* restore MMX control and status word */ -+ fldcw 0x74(%rdx) /* restore x87 control word */ -+ /* restore XMM storage */ -+ /* save start address of SSE register block in R10 */ -+ leaq 0x90(%rdx), %r10 -+ /* shift address in R10 to lower 16 byte boundary */ -+ /* == pointer to SEE register block */ -+ andq $-16, %r10 -+ -+ movaps (%r10), %xmm6 -+ movaps 0x10(%r10), %xmm7 -+ movaps 0x20(%r10), %xmm8 -+ movaps 0x30(%r10), %xmm9 -+ movaps 0x40(%r10), %xmm10 -+ movaps 0x50(%r10), %xmm11 -+ movaps 0x60(%r10), %xmm12 -+ movaps 0x70(%r10), %xmm13 -+ movaps 0x80(%r10), %xmm14 -+ movaps 0x90(%r10), %xmm15 -+ -+1: -+ leaq 0x08(%rsp), %rax /* exclude the return address */ -+ movq %rax, 0x40(%rcx) /* save as stack pointer */ -+ movq (%rsp), %rax /* load return address */ -+ movq %rax, 0x48(%rcx) /* save return address */ -+ -+ movq (%rdx), %r12 /* restore R12 */ -+ movq 0x08(%rdx), %r13 /* restore R13 */ -+ movq 0x10(%rdx), %r14 /* restore R14 */ -+ movq 0x18(%rdx), %r15 /* restore R15 */ -+ movq 0x20(%rdx), %rdi /* restore RDI */ -+ movq 0x28(%rdx), %rsi /* restore RSI */ -+ movq 0x30(%rdx), %rbx /* restore RBX */ -+ movq 0x38(%rdx), %rbp /* restore RBP */ -+ -+ movq %gs:(0x30), %r10 /* load NT_TIB */ -+ movq 0x50(%rdx), %rax /* load stack base */ -+ movq %rax, 0x08(%r10) /* restore stack base */ -+ movq 0x60(%rdx), %rax /* load stack limit */ -+ movq %rax, 0x10(%r10) /* restore stack limit */ -+ movq 0x68(%rdx), %rax /* load fiber local storage */ -+ movq %rax, 0x18(%r10) /* restore fiber local storage */ -+ -+ movq 0x40(%rdx), %rsp /* restore RSP */ -+ movq 0x48(%rdx), %r10 /* fetch the address to returned to */ -+ -+ movq %r8, %rax /* use third arg as return value after jump */ -+ movq %r8, %rcx /* use third arg as first arg in context function */ -+ -+ jmp *%r10 /* indirect jump to caller */ -+.seh_endproc diff --git a/mingw-w64-boost/boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch b/mingw-w64-boost/boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch deleted file mode 100644 index 7ecd749eb2..0000000000 --- a/mingw-w64-boost/boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 06ccdfee76fe487a141b95848d1c866890f15d88 Mon Sep 17 00:00:00 2001 -From: Evangelos Foutras -Date: Thu, 6 Nov 2014 09:19:26 +0200 -Subject: [PATCH] Add missing include to signals2/trackable.hpp - -boost::weak_ptr started being used in commit a0bf2d1 (Disconnect slots -associated with signals2::trackable immediately) but the matching header -wasn't included. - -https://svn.boost.org/trac/boost/ticket/10100#comment:7 ---- - boost/signals2/trackable.hpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/boost/signals2/trackable.hpp b/boost/signals2/trackable.hpp -index dba001d..64e8489 100644 ---- a/boost/signals2/trackable.hpp -+++ b/boost/signals2/trackable.hpp -@@ -18,6 +18,7 @@ - - #include - #include -+#include - - namespace boost { - namespace signals2 { --- -2.1.3 - diff --git a/mingw-w64-boost/boost-1.57.0-build-optflags.patch b/mingw-w64-boost/boost-1.57.0-build-optflags.patch new file mode 100644 index 0000000000..d0b925fbbc --- /dev/null +++ b/mingw-w64-boost/boost-1.57.0-build-optflags.patch @@ -0,0 +1,48 @@ +diff -up ./tools/build/src/tools/gcc.jam~ ./tools/build/src/tools/gcc.jam +--- ./tools/build/src/tools/gcc.jam~ 2015-02-09 15:01:04.850331626 +0100 ++++ ./tools/build/src/tools/gcc.jam 2015-02-09 15:44:29.122307134 +0100 +@@ -366,17 +366,17 @@ generators.override gcc.compile.c++.pch + toolset.flags gcc.compile PCH_FILE on : ; + + # Declare flags and action for compilation. +-toolset.flags gcc.compile OPTIONS off : -O0 ; +-toolset.flags gcc.compile OPTIONS speed : -O3 ; +-toolset.flags gcc.compile OPTIONS space : -Os ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS speed : ; ++toolset.flags gcc.compile OPTIONS space : ; + +-toolset.flags gcc.compile OPTIONS off : -fno-inline ; +-toolset.flags gcc.compile OPTIONS on : -Wno-inline ; +-toolset.flags gcc.compile OPTIONS full : -finline-functions -Wno-inline ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS full : ; + +-toolset.flags gcc.compile OPTIONS off : -w ; +-toolset.flags gcc.compile OPTIONS on : -Wall ; +-toolset.flags gcc.compile OPTIONS all : -Wall -pedantic ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS all : ; + toolset.flags gcc.compile OPTIONS on : -Werror ; + + toolset.flags gcc.compile OPTIONS on : -g ; +@@ -603,7 +603,7 @@ rule compile.fortran ( targets * : sourc + + actions compile.c++ bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<:W)" "$(>:W)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<:W)" "$(>:W)" + } + + actions compile.c bind PCH_FILE +@@ -613,7 +613,7 @@ actions compile.c bind PCH_FILE + + actions compile.c++.preprocess bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>:W)" -E >"$(<:W)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>:W)" -E >"$(<:W)" + } + + actions compile.c.preprocess bind PCH_FILE diff --git a/mingw-w64-boost/boost-1.57.0-mpl-print.patch b/mingw-w64-boost/boost-1.57.0-mpl-print.patch new file mode 100644 index 0000000000..561cef19eb --- /dev/null +++ b/mingw-w64-boost/boost-1.57.0-mpl-print.patch @@ -0,0 +1,31 @@ +diff -up boost_1_57_0/boost/mpl/print.hpp\~ boost_1_57_0/boost/mpl/print.hpp +--- boost_1_57_0/boost/mpl/print.hpp~ 2014-07-09 23:12:31.000000000 +0200 ++++ boost_1_57_0/boost/mpl/print.hpp 2015-01-20 12:44:59.621400948 +0100 +@@ -52,16 +52,15 @@ struct print + enum { n = sizeof(T) + -1 }; + #elif defined(__MWERKS__) + void f(int); +-#else +- enum { +- n = +-# if defined(__EDG_VERSION__) +- aux::dependent_unsigned::value > -1 +-# else +- sizeof(T) > -1 +-# endif +- }; +-#endif ++#elif defined(__EDG_VERSION__) ++ enum { n = aux::dependent_unsigned::value > -1 }; ++#elif defined(BOOST_GCC) ++ enum { n1 }; ++ enum { n2 }; ++ enum { n = n1 != n2 }; ++#else ++ enum { n = sizeof(T) > -1 }; ++#endif + }; + + #if defined(BOOST_MSVC) + +Diff finished. Tue Jan 20 12:45:03 2015 diff --git a/mingw-w64-boost/boost-1.57.0-python-abi_letters.patch b/mingw-w64-boost/boost-1.57.0-python-abi_letters.patch new file mode 100644 index 0000000000..7df3ee7047 --- /dev/null +++ b/mingw-w64-boost/boost-1.57.0-python-abi_letters.patch @@ -0,0 +1,62 @@ +--- boost_1_57_0/tools/build/src/tools/python.jam 2013-05-21 06:14:18.000000000 +0200 ++++ boost_1_55_0/tools/build/src/tools/python.jam 2014-05-29 19:09:12.115413877 +0200 +@@ -94,7 +94,7 @@ feature.feature pythonpath : : free opti + # using python : 2.3 : /usr/local/bin/python ; + # + rule init ( version ? : cmd-or-prefix ? : includes * : libraries ? +- : condition * : extension-suffix ? ) ++ : condition * : extension-suffix ? : abi-letters ? ) + { + project.push-current $(.project) ; + +@@ -107,7 +107,7 @@ rule init ( version ? : cmd-or-prefix ? + } + } + +- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ; ++ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ; + + project.pop-current ; + } +@@ -653,7 +653,7 @@ local rule system-library-dependencies ( + + # Declare a target to represent Python's library. + # +-local rule declare-libpython-target ( version ? : requirements * ) ++local rule declare-libpython-target ( version ? : requirements * : abi-letters ? ) + { + # Compute the representation of Python version in the name of Python's + # library file. +@@ -677,13 +677,13 @@ local rule declare-libpython-target ( ve + } + + # Declare it. +- lib python.lib : : python$(lib-version) $(requirements) ; ++ lib python.lib : : python$(lib-version)$(abi-letters) $(requirements) ; + } + + + # Implementation of init. + local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : +- condition * : extension-suffix ? ) ++ condition * : extension-suffix ? : abi-letters ? ) + { + local prefix ; + local exec-prefix ; +@@ -699,6 +699,7 @@ local rule configure ( version ? : cmd-o + extension-suffix ?= _d ; + } + extension-suffix ?= "" ; ++ abi-letters ?= "" ; + + # Normalize and dissect any version number. + local major-minor ; +@@ -922,7 +923,7 @@ local rule configure ( version ? : cmd-o + } + else + { +- declare-libpython-target $(version) : $(target-requirements) ; ++ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ; + + # This is an evil hack. On, Windows, when Python is embedded, nothing + # seems to set up sys.path to include Python's standard library diff --git a/mingw-w64-boost/boost-1.57.0-python-libpython_dep.patch b/mingw-w64-boost/boost-1.57.0-python-libpython_dep.patch new file mode 100644 index 0000000000..57bfc26774 --- /dev/null +++ b/mingw-w64-boost/boost-1.57.0-python-libpython_dep.patch @@ -0,0 +1,13 @@ +Index: boost_1_57_0/tools/build/src/tools/python.jam +=================================================================== +--- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406) ++++ boost_1_57_0/tools/build/src/tools/python.jam (working copy) +@@ -994,7 +994,7 @@ + else + { + alias python_for_extensions +- : ++ : python + : $(target-requirements) + : + : $(usage-requirements) diff --git a/mingw-w64-boost/boost-1.57.0-spirit-unused_typedef.patch b/mingw-w64-boost/boost-1.57.0-spirit-unused_typedef.patch new file mode 100644 index 0000000000..282962987c --- /dev/null +++ b/mingw-w64-boost/boost-1.57.0-spirit-unused_typedef.patch @@ -0,0 +1,19 @@ +diff -up boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp\~ boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp +--- boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp~ 2014-10-13 12:21:40.000000000 +0200 ++++ boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp 2015-01-20 13:25:50.069710766 +0100 +@@ -282,12 +282,12 @@ struct grammar_definition + #if !defined(BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE) + typedef impl::grammar_helper_base helper_base_t; + typedef grammar_helper_list helper_list_t; +- typedef typename helper_list_t::vector_t::reverse_iterator iterator_t; + + helper_list_t& helpers = + grammartract_helper_list::do_(self); + + # if defined(BOOST_INTEL_CXX_VERSION) ++ typedef typename helper_list_t::vector_t::reverse_iterator iterator_t; + for (iterator_t i = helpers.rbegin(); i != helpers.rend(); ++i) + (*i)->undefine(self); + # else + +Diff finished. Tue Jan 20 13:25:53 2015 diff --git a/mingw-w64-boost/boost-1.58.0-address-model.patch b/mingw-w64-boost/boost-1.58.0-address-model.patch new file mode 100644 index 0000000000..3582737b91 --- /dev/null +++ b/mingw-w64-boost/boost-1.58.0-address-model.patch @@ -0,0 +1,13 @@ +--- boost_1_58_0/tools/build/src/tools/gcc.jam~ 2015-07-17 15:14:57.381636224 +0100 ++++ boost_1_58_0/tools/build/src/tools/gcc.jam 2015-07-27 17:35:29.122264048 +0100 +@@ -421,7 +421,9 @@ + + rule setup-address-model ( targets * : sources * : properties * ) + { +- local model = [ feature.get-values address-model : $(properties) ] ; ++ # For RPM builds the address model flag is passed in %{optflags}. ++ # local model = [ feature.get-values address-model : $(properties) ] ; ++ local model ; + if $(model) + { + local option ; diff --git a/mingw-w64-boost/boost-1.58.0-pool-test_linking.patch b/mingw-w64-boost/boost-1.58.0-pool-test_linking.patch new file mode 100644 index 0000000000..a3813707c2 --- /dev/null +++ b/mingw-w64-boost/boost-1.58.0-pool-test_linking.patch @@ -0,0 +1,31 @@ +diff -up boost_1_58_0/libs/pool/test/Jamfile.v2\~ boost_1_58_0/libs/pool/test/Jamfile.v2 +--- boost_1_57_0/libs/pool/test/Jamfile.v2~ 2015-07-17 11:36:16.362519826 +0100 ++++ boost_1_57_0/libs/pool/test/Jamfile.v2 2015-07-17 11:37:38.858847388 +0100 +@@ -28,17 +28,17 @@ + local Werr = gcc:on msvc:on ; + + test-suite pool : +- [ run test_simple_seg_storage.cpp : : : $(Werr) msvc:-wd4267 ] +- [ run test_pool_alloc.cpp : : : $(Werr) ] +- [ run pool_msvc_compiler_bug_test.cpp : : : $(Werr) msvc:-wd4512 ] +- [ run test_msvc_mem_leak_detect.cpp : : : $(Werr) ] +- [ run test_bug_3349.cpp : : : $(Werr) ] +- [ run test_bug_4960.cpp : : : $(Werr) ] +- [ run test_bug_1252.cpp : : : $(Werr) ] +- [ run test_bug_2696.cpp : : : $(Werr) ] +- [ run test_bug_5526.cpp : : : $(Werr) ] ++ [ run test_simple_seg_storage.cpp : : : $(Werr) msvc:-wd4267 /boost/system//boost_system ] ++ [ run test_pool_alloc.cpp : : : $(Werr) /boost/system//boost_system ] ++ [ run pool_msvc_compiler_bug_test.cpp : : : $(Werr) msvc:-wd4512 /boost/system//boost_system ] ++ [ run test_msvc_mem_leak_detect.cpp : : : $(Werr) /boost/system//boost_system ] ++ [ run test_bug_3349.cpp : : : $(Werr) /boost/system//boost_system ] ++ [ run test_bug_4960.cpp : : : $(Werr) /boost/system//boost_system ] ++ [ run test_bug_1252.cpp : : : $(Werr) /boost/system//boost_system ] ++ [ run test_bug_2696.cpp : : : $(Werr) /boost/system//boost_system ] ++ [ run test_bug_5526.cpp : : : $(Werr) /boost/system//boost_system ] + [ run test_threading.cpp : : : multi /boost/thread//boost_thread ] +- [ run ../example/time_pool_alloc.cpp : : : $(Werr) ] ++ [ run ../example/time_pool_alloc.cpp : : : $(Werr) /boost/system//boost_system ] + [ compile test_poisoned_macros.cpp : $(Werr) ] + + # diff --git a/mingw-w64-boost/boost-1.50.0-pool.patch b/mingw-w64-boost/boost-1.58.0-pool.patch similarity index 89% rename from mingw-w64-boost/boost-1.50.0-pool.patch rename to mingw-w64-boost/boost-1.58.0-pool.patch index 15ce400767..ed8449ef0f 100644 --- a/mingw-w64-boost/boost-1.50.0-pool.patch +++ b/mingw-w64-boost/boost-1.58.0-pool.patch @@ -1,24 +1,22 @@ Index: boost/pool/pool.hpp =================================================================== ---- a/boost/pool/pool.hpp (revision 78317) -+++ b/boost/pool/pool.hpp (revision 78326) +--- boost/pool/pool.hpp (revision 78317) ++++ boost/pool/pool.hpp (revision 78326) @@ -27,4 +27,6 @@ #include +// std::numeric_limits +#include - // boost::math::static_lcm - #include -@@ -358,4 +360,13 @@ + // boost::integer::static_lcm + #include +@@ -358,4 +360,11 @@ } + size_type max_chunks() const + { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool. + size_type partition_size = alloc_size(); -+ size_type POD_size = math::static_lcm::value + sizeof(size_type); -+ size_type max_chunks = (std::numeric_limits::max() - POD_size) / alloc_size(); -+ -+ return max_chunks; ++ size_type POD_size = integer::static_lcm::value + sizeof(size_type); ++ return (std::numeric_limits::max() - POD_size) / alloc_size(); + } + static void * & nextof(void * const ptr) @@ -90,8 +88,8 @@ Index: boost/pool/pool.hpp // insert it into the list, Index: libs/pool/test/test_bug_6701.cpp =================================================================== ---- a/libs/pool/test/test_bug_6701.cpp (revision 78326) -+++ b/libs/pool/test/test_bug_6701.cpp (revision 78326) +--- libs/pool/test/test_bug_6701.cpp (revision 78326) ++++ libs/pool/test/test_bug_6701.cpp (revision 78326) @@ -0,0 +1,27 @@ +/* Copyright (C) 2012 Étienne Dupuis +* diff --git a/mingw-w64-boost/boost-1.60.0-mingw-context.patch b/mingw-w64-boost/boost-1.60.0-mingw-context.patch new file mode 100644 index 0000000000..96e7e0cba6 --- /dev/null +++ b/mingw-w64-boost/boost-1.60.0-mingw-context.patch @@ -0,0 +1,82 @@ +--- libs/thread/build/Jamfile.v2.mingw 2012-12-04 15:05:00.027057650 +0100 ++++ libs/thread/build/Jamfile.v2 2012-12-04 15:05:22.488292220 +0100 +@@ -101,7 +101,8 @@ + local rule default_threadapi ( ) + { + local api = pthread ; +- if [ os.name ] = "NT" { api = win32 ; } ++ #if [ os.name ] = "NT" { api = win32 ; } ++ api = win32 ; + return $(api) ; + } + +--- libs/context/build/Jamfile.v2.orig 2013-03-03 13:39:59.684868916 +0100 ++++ libs/context/build/Jamfile.v2 2013-03-03 15:09:09.893232829 +0100 +@@ -45,10 +45,11 @@ + local rule default_binary_format ( ) + { + local tmp = elf ; +- if [ os.name ] = "NT" { tmp = pe ; } +- else if [ os.name ] = "CYGWIN" { tmp = pe ; } +- else if [ os.name ] = "AIX" { tmp = xcoff ; } +- else if [ os.name ] = "MACOSX" { tmp = mach-o ; } ++# if [ os.name ] = "NT" { tmp = pe ; } ++# else if [ os.name ] = "CYGWIN" { tmp = pe ; } ++# else if [ os.name ] = "AIX" { tmp = xcoff ; } ++# else if [ os.name ] = "MACOSX" { tmp = mach-o ; } ++ tmp = pe ; + return $(tmp) ; + } + +@@ -65,10 +65,11 @@ + local rule default_abi ( ) + { + local tmp = sysv ; +- if [ os.name ] = "NT" { tmp = ms ; } +- else if [ os.name ] = "CYGWIN" { tmp = ms ; } +- else if [ os.platform ] = "ARM" { tmp = aapcs ; } +- else if [ os.platform ] = "MIPS" { tmp = o32 ; } ++# if [ os.name ] = "NT" { tmp = ms ; } ++# else if [ os.name ] = "CYGWIN" { tmp = ms ; } ++# else if [ os.platform ] = "ARM" { tmp = aapcs ; } ++# else if [ os.platform ] = "MIPS" { tmp = o32 ; } ++ tmp = ms ; + return $(tmp) ; + } + +--- libs/context/src/asm/jump_i386_ms_pe_gas.asm.mingw 2015-09-02 16:03:06.406321632 +0200 ++++ libs/context/src/asm/jump_i386_ms_pe_gas.asm 2015-09-02 16:04:17.632915315 +0200 +@@ -138,3 +138,6 @@ + + /* indirect jump to context */ + jmp *%edx ++ ++.section .drectve ++.ascii " -export:\"jump_fcontext\"" +--- libs/context/src/asm/jump_x86_64_ms_pe_gas.asm.mingw 2015-09-02 16:03:13.495380721 +0200 ++++ libs/context/src/asm/jump_x86_64_ms_pe_gas.asm 2015-09-02 16:04:12.488872439 +0200 +@@ -223,3 +223,6 @@ + /* indirect jump to context */ + jmp *%r10 + .seh_endproc ++ ++.section .drectve ++.ascii " -export:\"jump_fcontext\"" +--- libs/context/src/asm/make_i386_ms_pe_gas.asm.mingw 2015-09-02 16:03:22.486455662 +0200 ++++ libs/context/src/asm/make_i386_ms_pe_gas.asm 2015-09-02 16:04:32.409038476 +0200 +@@ -122,3 +122,6 @@ + hlt + + .def __exit; .scl 2; .type 32; .endef /* standard C library function */ ++ ++.section .drectve ++.ascii " -export:\"make_fcontext\"" +--- libs/context/src/asm/make_x86_64_ms_pe_gas.asm.mingw 2015-09-02 16:03:30.631523552 +0200 ++++ libs/context/src/asm/make_x86_64_ms_pe_gas.asm 2015-09-02 16:04:27.433997008 +0200 +@@ -149,3 +149,6 @@ + .seh_endproc + + .def _exit; .scl 2; .type 32; .endef /* standard C library function */ ++ ++.section .drectve ++.ascii " -export:\"make_fcontext\"" diff --git a/mingw-w64-boost/boost-include-intrin-h-on-mingw-w64.patch b/mingw-w64-boost/boost-include-intrin-h-on-mingw-w64.patch new file mode 100644 index 0000000000..5c7ef88615 --- /dev/null +++ b/mingw-w64-boost/boost-include-intrin-h-on-mingw-w64.patch @@ -0,0 +1,14 @@ +--- boost/detail/interlocked.hpp.interlocked 2012-12-11 15:42:26.000000000 +0100 ++++ boost/detail/interlocked.hpp 2013-07-21 15:22:56.082346444 +0200 +@@ -92,9 +92,9 @@ + # define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ + ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange))) + +-#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) ++#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) || defined( __MINGW64_VERSION_MAJOR ) + +-#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1400 ++#if ( defined( BOOST_MSVC ) && BOOST_MSVC >= 1400 ) || defined( __MINGW64_VERSION_MAJOR ) + + #include + diff --git a/mingw-w64-boost/msys2-mingw-folders-bootstrap.patch b/mingw-w64-boost/msys2-mingw-folders-bootstrap.patch new file mode 100644 index 0000000000..e94744573b --- /dev/null +++ b/mingw-w64-boost/msys2-mingw-folders-bootstrap.patch @@ -0,0 +1,29 @@ +--- a/tools/build/src/engine/build.sh 2015-07-07 09:46:25.813659600 +0300 ++++ b/tools/build/src/engine/build.sh 2015-07-07 09:47:50.111229000 +0300 +@@ -58,13 +58,26 @@ + test `uname` = $* + fi + } ++ ++test_msystem () ++{ ++ if [ -n $MSYSTEM ]; then ++ test "$MSYSTEM" = "$*" ++ fi ++} + + # Try and guess the toolset to bootstrap the build with... + Guess_Toolset () + { + if test -r /mingw/bin/gcc ; then + BOOST_JAM_TOOLSET=mingw + BOOST_JAM_TOOLSET_ROOT=/mingw/ ++ elif test_msystem MINGW32 ; then ++ BOOST_JAM_TOOLSET=mingw ++ BOOST_JAM_TOOLSET_ROOT=/mingw32/ ++ elif test_msystem MINGW64 ; then ++ BOOST_JAM_TOOLSET=mingw ++ BOOST_JAM_TOOLSET_ROOT=/mingw64/ + elif test_uname Darwin ; then BOOST_JAM_TOOLSET=darwin + elif test_uname IRIX ; then BOOST_JAM_TOOLSET=mipspro + elif test_uname IRIX64 ; then BOOST_JAM_TOOLSET=mipspro diff --git a/mingw-w64-box2d/PKGBUILD b/mingw-w64-box2d/PKGBUILD index 54bf6a66c7..052e520c2c 100644 --- a/mingw-w64-box2d/PKGBUILD +++ b/mingw-w64-box2d/PKGBUILD @@ -2,35 +2,37 @@ _realname=box2d pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.3.0 +pkgver=2.3.1 pkgrel=1 pkgdesc="2D rigid body simulation library for games (mingw-w64)" arch=('any') url="http://www.box2d.org/" license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") -source=(http://box2d.googlecode.com/files/Box2D_v${pkgver}.7z) -md5sums=('696a457fc6260a9bb6d2c380b9100279') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/erincatto/Box2D/archive/v${pkgver}.tar.gz) +md5sums=('9ee551c9089b9d1c5ceecbd3d7df5156') options=(staticlibs !buildflags !strip) build() { mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="${pkgdir}${MINGW_PREFIX}" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBOX2D_INSTALL=ON \ -DBOX2D_BUILD_SHARED=ON \ -DBOX2D_BUILD_STATIC=ON \ -DBOX2D_BUILD_EXAMPLES=OFF \ - ../Box2D_v${pkgver}/Box2D + ../Box2D-${pkgver}/Box2D + make } package() { cd "${srcdir}/build-${CARCH}" - make install + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-breakpad-svn/0003-Build-minidump_upload-sym_upload-for-all-targets.patch b/mingw-w64-breakpad-svn/0003-Build-minidump_upload-sym_upload-for-all-targets.patch new file mode 100644 index 0000000000..7bf344311f --- /dev/null +++ b/mingw-w64-breakpad-svn/0003-Build-minidump_upload-sym_upload-for-all-targets.patch @@ -0,0 +1,293 @@ +From 1ffcd61fc7d6ba537faa40641d0422574672b12f Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Mon, 3 Feb 2014 23:57:22 +0000 +Subject: [PATCH 03/24] Build minidump_upload, sym_upload for all targets + +Rather than duplicating these tools for any target which has libcurl +- Introduce src/tools/common/ and move minidump_upload, sym_upload there from src/tools/linux/ +- Move linux/http_upload.cc,.h up to src/common/ from src/common/linux/ + +Don't link with -ldl and use dlopen to use libcurl.so, but just link with +libcurl. + +XXX: Perhaps retaining linking with -dl and just teaching it the name of curl +shared object on Cygwin would be more upstreamable, although the reasons for not +linking with libcurl are obscure... + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 30 ++++--- + src/common/{linux => }/http_upload.cc | 94 +++++----------------- + src/common/{linux => }/http_upload.h | 0 + .../{linux => common}/symupload/minidump_upload.cc | 2 +- + .../{linux => common}/symupload/sym_upload.cc | 2 +- + 5 files changed, 39 insertions(+), 89 deletions(-) + rename src/common/{linux => }/http_upload.cc (60%) + rename src/common/{linux => }/http_upload.h (100%) + rename src/tools/{linux => common}/symupload/minidump_upload.cc (99%) + rename src/tools/{linux => common}/symupload/sym_upload.cc (99%) + +diff --git a/Makefile.am b/Makefile.am +index 1e3279f..6246c9c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -303,6 +303,12 @@ bin_PROGRAMS += \ + src/processor/minidump_stackwalk + endif !DISABLE_PROCESSOR + ++if !DISABLE_TOOLS ++bin_PROGRAMS += \ ++ src/tools/common/symupload/minidump_upload \ ++ src/tools/common/symupload/sym_upload ++endif ++ + if LINUX_HOST + bin_PROGRAMS += \ + src/client/linux/linux_dumper_unittest_helper +@@ -311,9 +317,7 @@ if !DISABLE_TOOLS + bin_PROGRAMS += \ + src/tools/linux/core2md/core2md \ + src/tools/linux/dump_syms/dump_syms \ +- src/tools/linux/md2core/minidump-2-core \ +- src/tools/linux/symupload/minidump_upload \ +- src/tools/linux/symupload/sym_upload ++ src/tools/linux/md2core/minidump-2-core + endif + endif LINUX_HOST + +@@ -391,6 +395,16 @@ else + LOG_DRIVER = $(top_srcdir)/autotools/test-driver + endif + ++src_tools_common_symupload_minidump_upload_SOURCES = \ ++ src/common/http_upload.cc \ ++ src/tools/common/symupload/minidump_upload.cc ++src_tools_common_symupload_minidump_upload_LDADD = -lcurl ++ ++src_tools_common_symupload_sym_upload_SOURCES = \ ++ src/common/http_upload.cc \ ++ src/tools/common/symupload/sym_upload.cc ++src_tools_common_symupload_sym_upload_LDADD = -lcurl ++ + if LINUX_HOST + src_client_linux_linux_dumper_unittest_helper_SOURCES = \ + src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +@@ -526,16 +540,6 @@ src_tools_linux_md2core_minidump_2_core_SOURCES = \ + src/common/linux/memory_mapped_file.cc \ + src/tools/linux/md2core/minidump-2-core.cc + +-src_tools_linux_symupload_minidump_upload_SOURCES = \ +- src/common/linux/http_upload.cc \ +- src/tools/linux/symupload/minidump_upload.cc +-src_tools_linux_symupload_minidump_upload_LDADD = -ldl +- +-src_tools_linux_symupload_sym_upload_SOURCES = \ +- src/common/linux/http_upload.cc \ +- src/tools/linux/symupload/sym_upload.cc +-src_tools_linux_symupload_sym_upload_LDADD = -ldl +- + src_common_dumper_unittest_SOURCES = \ + src/common/byte_cursor_unittest.cc \ + src/common/dwarf_cfi_to_module.cc \ +diff --git a/src/common/linux/http_upload.cc b/src/common/http_upload.cc +similarity index 60% +rename from src/common/linux/http_upload.cc +rename to src/common/http_upload.cc +index d49f227..47dcf80 100644 +--- a/src/common/linux/http_upload.cc ++++ b/src/common/http_upload.cc +@@ -27,10 +27,9 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "common/linux/http_upload.h" ++#include "common/http_upload.h" + + #include +-#include + #include "third_party/curl/curl.h" + + namespace { +@@ -70,50 +69,13 @@ bool HTTPUpload::SendRequest(const string &url, + if (!CheckParameters(parameters)) + return false; + +- // We may have been linked statically; if curl_easy_init is in the +- // current binary, no need to search for a dynamic version. +- void* curl_lib = dlopen(NULL, RTLD_NOW); +- if (!curl_lib || dlsym(curl_lib, "curl_easy_init") == NULL) { +- dlerror(); // Clear dlerror before attempting to open libraries. +- dlclose(curl_lib); +- curl_lib = NULL; +- } +- if (!curl_lib) { +- curl_lib = dlopen("libcurl.so", RTLD_NOW); +- } +- if (!curl_lib) { +- if (error_description != NULL) +- *error_description = dlerror(); +- curl_lib = dlopen("libcurl.so.4", RTLD_NOW); +- } +- if (!curl_lib) { +- // Debian gives libcurl a different name when it is built against GnuTLS +- // instead of OpenSSL. +- curl_lib = dlopen("libcurl-gnutls.so.4", RTLD_NOW); +- } +- if (!curl_lib) { +- curl_lib = dlopen("libcurl.so.3", RTLD_NOW); +- } +- if (!curl_lib) { +- return false; +- } +- +- CURL* (*curl_easy_init)(void); +- *(void**) (&curl_easy_init) = dlsym(curl_lib, "curl_easy_init"); +- CURL *curl = (*curl_easy_init)(); ++ CURL *curl = curl_easy_init(); + if (error_description != NULL) + *error_description = "No Error"; + +- if (!curl) { +- dlclose(curl_lib); +- return false; +- } +- + CURLcode err_code = CURLE_OK; +- CURLcode (*curl_easy_setopt)(CURL *, CURLoption, ...); +- *(void**) (&curl_easy_setopt) = dlsym(curl_lib, "curl_easy_setopt"); +- (*curl_easy_setopt)(curl, CURLOPT_URL, url.c_str()); +- (*curl_easy_setopt)(curl, CURLOPT_USERAGENT, kUserAgent); ++ curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); ++ curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent); + // Set proxy information if necessary. + if (!proxy.empty()) + (*curl_easy_setopt)(curl, CURLOPT_PROXY, proxy.c_str()); +@@ -126,73 +88,57 @@ bool HTTPUpload::SendRequest(const string &url, + struct curl_httppost *formpost = NULL; + struct curl_httppost *lastptr = NULL; + // Add form data. +- CURLFORMcode (*curl_formadd)(struct curl_httppost **, struct curl_httppost **, ...); +- *(void**) (&curl_formadd) = dlsym(curl_lib, "curl_formadd"); + map::const_iterator iter = parameters.begin(); + for (; iter != parameters.end(); ++iter) +- (*curl_formadd)(&formpost, &lastptr, ++ curl_formadd(&formpost, &lastptr, + CURLFORM_COPYNAME, iter->first.c_str(), + CURLFORM_COPYCONTENTS, iter->second.c_str(), + CURLFORM_END); + + // Add form file. +- (*curl_formadd)(&formpost, &lastptr, ++ curl_formadd(&formpost, &lastptr, + CURLFORM_COPYNAME, file_part_name.c_str(), + CURLFORM_FILE, upload_file.c_str(), + CURLFORM_END); + +- (*curl_easy_setopt)(curl, CURLOPT_HTTPPOST, formpost); ++ curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + + // Disable 100-continue header. + struct curl_slist *headerlist = NULL; + char buf[] = "Expect:"; +- struct curl_slist* (*curl_slist_append)(struct curl_slist *, const char *); +- *(void**) (&curl_slist_append) = dlsym(curl_lib, "curl_slist_append"); +- headerlist = (*curl_slist_append)(headerlist, buf); +- (*curl_easy_setopt)(curl, CURLOPT_HTTPHEADER, headerlist); ++ headerlist = curl_slist_append(headerlist, buf); ++ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); + + if (response_body != NULL) { +- (*curl_easy_setopt)(curl, CURLOPT_WRITEFUNCTION, WriteCallback); +- (*curl_easy_setopt)(curl, CURLOPT_WRITEDATA, ++ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); ++ curl_easy_setopt(curl, CURLOPT_WRITEDATA, + reinterpret_cast(response_body)); + } + + // Fail if 400+ is returned from the web server. +- (*curl_easy_setopt)(curl, CURLOPT_FAILONERROR, 1); ++ curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); + +- CURLcode (*curl_easy_perform)(CURL *); +- *(void**) (&curl_easy_perform) = dlsym(curl_lib, "curl_easy_perform"); +- err_code = (*curl_easy_perform)(curl); ++ err_code = curl_easy_perform(curl); + if (response_code != NULL) { +- CURLcode (*curl_easy_getinfo)(CURL *, CURLINFO, ...); +- *(void**) (&curl_easy_getinfo) = dlsym(curl_lib, "curl_easy_getinfo"); +- (*curl_easy_getinfo)(curl, CURLINFO_RESPONSE_CODE, response_code); ++ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, response_code); + } +- const char* (*curl_easy_strerror)(CURLcode); +- *(void**) (&curl_easy_strerror) = dlsym(curl_lib, "curl_easy_strerror"); + #ifndef NDEBUG + if (err_code != CURLE_OK) + fprintf(stderr, "Failed to send http request to %s, error: %s\n", + url.c_str(), +- (*curl_easy_strerror)(err_code)); ++ curl_easy_strerror(err_code)); + #endif + if (error_description != NULL) +- *error_description = (*curl_easy_strerror)(err_code); ++ *error_description = curl_easy_strerror(err_code); + +- void (*curl_easy_cleanup)(CURL *); +- *(void**) (&curl_easy_cleanup) = dlsym(curl_lib, "curl_easy_cleanup"); +- (*curl_easy_cleanup)(curl); ++ curl_easy_cleanup(curl); + if (formpost != NULL) { +- void (*curl_formfree)(struct curl_httppost *); +- *(void**) (&curl_formfree) = dlsym(curl_lib, "curl_formfree"); +- (*curl_formfree)(formpost); ++ curl_formfree(formpost); + } + if (headerlist != NULL) { +- void (*curl_slist_free_all)(struct curl_slist *); +- *(void**) (&curl_slist_free_all) = dlsym(curl_lib, "curl_slist_free_all"); +- (*curl_slist_free_all)(headerlist); ++ curl_slist_free_all(headerlist); + } +- dlclose(curl_lib); ++ + return err_code == CURLE_OK; + } + +diff --git a/src/common/linux/http_upload.h b/src/common/http_upload.h +similarity index 100% +rename from src/common/linux/http_upload.h +rename to src/common/http_upload.h +diff --git a/src/tools/linux/symupload/minidump_upload.cc b/src/tools/common/symupload/minidump_upload.cc +similarity index 99% +rename from src/tools/linux/symupload/minidump_upload.cc +rename to src/tools/common/symupload/minidump_upload.cc +index 94c3492..f1146ac 100644 +--- a/src/tools/linux/symupload/minidump_upload.cc ++++ b/src/tools/common/symupload/minidump_upload.cc +@@ -40,7 +40,7 @@ + + #include + +-#include "common/linux/http_upload.h" ++#include "common/http_upload.h" + #include "common/using_std_string.h" + + using google_breakpad::HTTPUpload; +diff --git a/src/tools/linux/symupload/sym_upload.cc b/src/tools/common/symupload/sym_upload.cc +similarity index 99% +rename from src/tools/linux/symupload/sym_upload.cc +rename to src/tools/common/symupload/sym_upload.cc +index 09e82ca..bc2693e 100644 +--- a/src/tools/linux/symupload/sym_upload.cc ++++ b/src/tools/common/symupload/sym_upload.cc +@@ -49,7 +49,7 @@ + #include + #include + +-#include "common/linux/http_upload.h" ++#include "common/http_upload.h" + #include "common/using_std_string.h" + + using google_breakpad::HTTPUpload; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0004-Remove-local-copy-of-curl-headers.patch b/mingw-w64-breakpad-svn/0004-Remove-local-copy-of-curl-headers.patch new file mode 100644 index 0000000000..be8c6d0d0d --- /dev/null +++ b/mingw-w64-breakpad-svn/0004-Remove-local-copy-of-curl-headers.patch @@ -0,0 +1,3718 @@ +From fbd8f186f4bdee73f2f086a9c8bae28829109e99 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Sat, 12 Jul 2014 14:09:03 +0100 +Subject: [PATCH 04/24] Remove local copy of curl headers + +This reverts commit d9d863e153d12532fc85bd8b44bc47f079ed064c. +This reverts commit 68e380d5a73a0d657693f166fbcb1dd77027766b. + +Signed-off-by: Jon TURNEY +--- + src/common/http_upload.cc | 3 +- + src/common/linux/libcurl_wrapper.cc | 3 + + src/common/linux/libcurl_wrapper.h | 2 +- + src/third_party/curl/curl.h | 1936 ---------------------------------- + src/third_party/curl/curlbuild.h | 202 ---- + src/third_party/curl/curlrules.h | 249 ----- + src/third_party/curl/curlver.h | 70 -- + src/third_party/curl/easy.h | 103 -- + src/third_party/curl/mprintf.h | 82 -- + src/third_party/curl/multi.h | 346 ------ + src/third_party/curl/stdcheaders.h | 34 - + src/third_party/curl/typecheck-gcc.h | 551 ---------- + src/third_party/curl/types.h | 1 - + 13 files changed, 6 insertions(+), 3576 deletions(-) + delete mode 100644 src/third_party/curl/curl.h + delete mode 100644 src/third_party/curl/curlbuild.h + delete mode 100644 src/third_party/curl/curlrules.h + delete mode 100644 src/third_party/curl/curlver.h + delete mode 100644 src/third_party/curl/easy.h + delete mode 100644 src/third_party/curl/mprintf.h + delete mode 100644 src/third_party/curl/multi.h + delete mode 100644 src/third_party/curl/stdcheaders.h + delete mode 100644 src/third_party/curl/typecheck-gcc.h + delete mode 100644 src/third_party/curl/types.h + +diff --git a/src/common/http_upload.cc b/src/common/http_upload.cc +index 47dcf80..91fedf2 100644 +--- a/src/common/http_upload.cc ++++ b/src/common/http_upload.cc +@@ -30,7 +30,8 @@ + #include "common/http_upload.h" + + #include +-#include "third_party/curl/curl.h" ++#include ++#include + + namespace { + +diff --git a/src/common/linux/libcurl_wrapper.cc b/src/common/linux/libcurl_wrapper.cc +index fd4e34c..3acc111 100644 +--- a/src/common/linux/libcurl_wrapper.cc ++++ b/src/common/linux/libcurl_wrapper.cc +@@ -27,6 +27,9 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ++#include ++#include ++#include + #include + + #include +diff --git a/src/common/linux/libcurl_wrapper.h b/src/common/linux/libcurl_wrapper.h +index de84a63..23fe44f 100644 +--- a/src/common/linux/libcurl_wrapper.h ++++ b/src/common/linux/libcurl_wrapper.h +@@ -32,12 +32,12 @@ + + #ifndef COMMON_LINUX_LIBCURL_WRAPPER_H_ + #define COMMON_LINUX_LIBCURL_WRAPPER_H_ ++#include + + #include + #include + + #include "common/using_std_string.h" +-#include "third_party/curl/curl.h" + + namespace google_breakpad { + class LibcurlWrapper { +diff --git a/src/third_party/curl/curl.h b/src/third_party/curl/curl.h +deleted file mode 100644 +index 160cd98..0000000 +--- a/src/third_party/curl/curl.h ++++ /dev/null +@@ -1,1936 +0,0 @@ +-#ifndef __CURL_CURL_H +-#define __CURL_CURL_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: curl.h,v 1.396 2009-10-16 13:30:31 yangtse Exp $ +- ***************************************************************************/ +- +-/* +- * If you have libcurl problems, all docs and details are found here: +- * http://curl.haxx.se/libcurl/ +- * +- * curl-library mailing list subscription and unsubscription web interface: +- * http://cool.haxx.se/mailman/listinfo/curl-library/ +- */ +- +-/* +- * Leading 'curl' path on the 'curlbuild.h' include statement is +- * required to properly allow building outside of the source tree, +- * due to the fact that in this case 'curlbuild.h' is generated in +- * a subdirectory of the build tree while 'curl.h actually remains +- * in a subdirectory of the source tree. +- */ +- +-#include "third_party/curl/curlver.h" /* libcurl version defines */ +-#include "third_party/curl/curlbuild.h" /* libcurl build definitions */ +-#include "third_party/curl/curlrules.h" /* libcurl rules enforcement */ +- +-/* +- * Define WIN32 when build target is Win32 API +- */ +- +-#if (defined(_WIN32) || defined(__WIN32__)) && \ +- !defined(WIN32) && !defined(__SYMBIAN32__) +-#define WIN32 +-#endif +- +-#include +-#include +- +-/* The include stuff here below is mainly for time_t! */ +-#include +-#include +- +-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ +- !defined(__CYGWIN__) || defined(__MINGW32__) +-#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +-/* The check above prevents the winsock2 inclusion if winsock.h already was +- included, since they can't co-exist without problems */ +-#include +-#include +-#endif +-#else +- +-/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish +- libc5-based Linux systems. Only include it on system that are known to +- require it! */ +-#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ +- defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ +- defined(__ANDROID__) +-#include +-#endif +- +-#ifndef _WIN32_WCE +-#include +-#endif +-#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) +-#include +-#endif +-#include +-#endif +- +-#ifdef __BEOS__ +-#include +-#endif +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-typedef void CURL; +- +-/* +- * Decorate exportable functions for Win32 and Symbian OS DLL linking. +- * This avoids using a .def file for building libcurl.dll. +- */ +-#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ +- !defined(CURL_STATICLIB) +-#if defined(BUILDING_LIBCURL) +-#define CURL_EXTERN __declspec(dllexport) +-#else +-#define CURL_EXTERN __declspec(dllimport) +-#endif +-#else +- +-#ifdef CURL_HIDDEN_SYMBOLS +-/* +- * This definition is used to make external definitions visible in the +- * shared library when symbols are hidden by default. It makes no +- * difference when compiling applications whether this is set or not, +- * only when compiling the library. +- */ +-#define CURL_EXTERN CURL_EXTERN_SYMBOL +-#else +-#define CURL_EXTERN +-#endif +-#endif +- +-#ifndef curl_socket_typedef +-/* socket typedef */ +-#ifdef WIN32 +-typedef SOCKET curl_socket_t; +-#define CURL_SOCKET_BAD INVALID_SOCKET +-#else +-typedef int curl_socket_t; +-#define CURL_SOCKET_BAD -1 +-#endif +-#define curl_socket_typedef +-#endif /* curl_socket_typedef */ +- +-struct curl_httppost { +- struct curl_httppost *next; /* next entry in the list */ +- char *name; /* pointer to allocated name */ +- long namelength; /* length of name length */ +- char *contents; /* pointer to allocated data contents */ +- long contentslength; /* length of contents field */ +- char *buffer; /* pointer to allocated buffer contents */ +- long bufferlength; /* length of buffer field */ +- char *contenttype; /* Content-Type */ +- struct curl_slist* contentheader; /* list of extra headers for this form */ +- struct curl_httppost *more; /* if one field name has more than one +- file, this link should link to following +- files */ +- long flags; /* as defined below */ +-#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ +-#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ +-#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer +- do not free in formfree */ +-#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer +- do not free in formfree */ +-#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ +-#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ +-#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the +- regular read callback to get the data +- and pass the given pointer as custom +- pointer */ +- +- char *showfilename; /* The file name to show. If not set, the +- actual file name will be used (if this +- is a file part) */ +- void *userp; /* custom pointer used for +- HTTPPOST_CALLBACK posts */ +-}; +- +-typedef int (*curl_progress_callback)(void *clientp, +- double dltotal, +- double dlnow, +- double ultotal, +- double ulnow); +- +-#ifndef CURL_MAX_WRITE_SIZE +- /* Tests have proven that 20K is a very bad buffer size for uploads on +- Windows, while 16K for some odd reason performed a lot better. +- We do the ifndef check to allow this value to easier be changed at build +- time for those who feel adventurous. */ +-#define CURL_MAX_WRITE_SIZE 16384 +-#endif +- +-#ifndef CURL_MAX_HTTP_HEADER +-/* The only reason to have a max limit for this is to avoid the risk of a bad +- server feeding libcurl with a never-ending header that will cause reallocs +- infinitely */ +-#define CURL_MAX_HTTP_HEADER (100*1024) +-#endif +- +- +-/* This is a magic return code for the write callback that, when returned, +- will signal libcurl to pause receiving on the current transfer. */ +-#define CURL_WRITEFUNC_PAUSE 0x10000001 +-typedef size_t (*curl_write_callback)(char *buffer, +- size_t size, +- size_t nitems, +- void *outstream); +- +-/* These are the return codes for the seek callbacks */ +-#define CURL_SEEKFUNC_OK 0 +-#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ +-#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so +- libcurl might try other means instead */ +-typedef int (*curl_seek_callback)(void *instream, +- curl_off_t offset, +- int origin); /* 'whence' */ +- +-/* This is a return code for the read callback that, when returned, will +- signal libcurl to immediately abort the current transfer. */ +-#define CURL_READFUNC_ABORT 0x10000000 +-/* This is a return code for the read callback that, when returned, will +- signal libcurl to pause sending data on the current transfer. */ +-#define CURL_READFUNC_PAUSE 0x10000001 +- +-typedef size_t (*curl_read_callback)(char *buffer, +- size_t size, +- size_t nitems, +- void *instream); +- +-typedef enum { +- CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ +- CURLSOCKTYPE_LAST /* never use */ +-} curlsocktype; +- +-typedef int (*curl_sockopt_callback)(void *clientp, +- curl_socket_t curlfd, +- curlsocktype purpose); +- +-struct curl_sockaddr { +- int family; +- int socktype; +- int protocol; +- unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it +- turned really ugly and painful on the systems that +- lack this type */ +- struct sockaddr addr; +-}; +- +-typedef curl_socket_t +-(*curl_opensocket_callback)(void *clientp, +- curlsocktype purpose, +- struct curl_sockaddr *address); +- +-#ifndef CURL_NO_OLDIES +- /* not used since 7.10.8, will be removed in a future release */ +-typedef int (*curl_passwd_callback)(void *clientp, +- const char *prompt, +- char *buffer, +- int buflen); +-#endif +- +-typedef enum { +- CURLIOE_OK, /* I/O operation successful */ +- CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ +- CURLIOE_FAILRESTART, /* failed to restart the read */ +- CURLIOE_LAST /* never use */ +-} curlioerr; +- +-typedef enum { +- CURLIOCMD_NOP, /* no operation */ +- CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ +- CURLIOCMD_LAST /* never use */ +-} curliocmd; +- +-typedef curlioerr (*curl_ioctl_callback)(CURL *handle, +- int cmd, +- void *clientp); +- +-/* +- * The following typedef's are signatures of malloc, free, realloc, strdup and +- * calloc respectively. Function pointers of these types can be passed to the +- * curl_global_init_mem() function to set user defined memory management +- * callback routines. +- */ +-typedef void *(*curl_malloc_callback)(size_t size); +-typedef void (*curl_free_callback)(void *ptr); +-typedef void *(*curl_realloc_callback)(void *ptr, size_t size); +-typedef char *(*curl_strdup_callback)(const char *str); +-typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); +- +-/* the kind of data that is passed to information_callback*/ +-typedef enum { +- CURLINFO_TEXT = 0, +- CURLINFO_HEADER_IN, /* 1 */ +- CURLINFO_HEADER_OUT, /* 2 */ +- CURLINFO_DATA_IN, /* 3 */ +- CURLINFO_DATA_OUT, /* 4 */ +- CURLINFO_SSL_DATA_IN, /* 5 */ +- CURLINFO_SSL_DATA_OUT, /* 6 */ +- CURLINFO_END +-} curl_infotype; +- +-typedef int (*curl_debug_callback) +- (CURL *handle, /* the handle/transfer this concerns */ +- curl_infotype type, /* what kind of data */ +- char *data, /* points to the data */ +- size_t size, /* size of the data pointed to */ +- void *userptr); /* whatever the user please */ +- +-/* All possible error codes from all sorts of curl functions. Future versions +- may return other values, stay prepared. +- +- Always add new return codes last. Never *EVER* remove any. The return +- codes must remain the same! +- */ +- +-typedef enum { +- CURLE_OK = 0, +- CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ +- CURLE_FAILED_INIT, /* 2 */ +- CURLE_URL_MALFORMAT, /* 3 */ +- CURLE_OBSOLETE4, /* 4 - NOT USED */ +- CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ +- CURLE_COULDNT_RESOLVE_HOST, /* 6 */ +- CURLE_COULDNT_CONNECT, /* 7 */ +- CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ +- CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server +- due to lack of access - when login fails +- this is not returned. */ +- CURLE_OBSOLETE10, /* 10 - NOT USED */ +- CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ +- CURLE_OBSOLETE12, /* 12 - NOT USED */ +- CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ +- CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ +- CURLE_FTP_CANT_GET_HOST, /* 15 */ +- CURLE_OBSOLETE16, /* 16 - NOT USED */ +- CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ +- CURLE_PARTIAL_FILE, /* 18 */ +- CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ +- CURLE_OBSOLETE20, /* 20 - NOT USED */ +- CURLE_QUOTE_ERROR, /* 21 - quote command failure */ +- CURLE_HTTP_RETURNED_ERROR, /* 22 */ +- CURLE_WRITE_ERROR, /* 23 */ +- CURLE_OBSOLETE24, /* 24 - NOT USED */ +- CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ +- CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ +- CURLE_OUT_OF_MEMORY, /* 27 */ +- /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error +- instead of a memory allocation error if CURL_DOES_CONVERSIONS +- is defined +- */ +- CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ +- CURLE_OBSOLETE29, /* 29 - NOT USED */ +- CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ +- CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ +- CURLE_OBSOLETE32, /* 32 - NOT USED */ +- CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ +- CURLE_HTTP_POST_ERROR, /* 34 */ +- CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ +- CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ +- CURLE_FILE_COULDNT_READ_FILE, /* 37 */ +- CURLE_LDAP_CANNOT_BIND, /* 38 */ +- CURLE_LDAP_SEARCH_FAILED, /* 39 */ +- CURLE_OBSOLETE40, /* 40 - NOT USED */ +- CURLE_FUNCTION_NOT_FOUND, /* 41 */ +- CURLE_ABORTED_BY_CALLBACK, /* 42 */ +- CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ +- CURLE_OBSOLETE44, /* 44 - NOT USED */ +- CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ +- CURLE_OBSOLETE46, /* 46 - NOT USED */ +- CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ +- CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ +- CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ +- CURLE_OBSOLETE50, /* 50 - NOT USED */ +- CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint +- wasn't verified fine */ +- CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ +- CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ +- CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as +- default */ +- CURLE_SEND_ERROR, /* 55 - failed sending network data */ +- CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ +- CURLE_OBSOLETE57, /* 57 - NOT IN USE */ +- CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ +- CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ +- CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ +- CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ +- CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ +- CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ +- CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ +- CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind +- that failed */ +- CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ +- CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not +- accepted and we failed to login */ +- CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ +- CURLE_TFTP_PERM, /* 69 - permission problem on server */ +- CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ +- CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ +- CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ +- CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ +- CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ +- CURLE_CONV_FAILED, /* 75 - conversion failed */ +- CURLE_CONV_REQD, /* 76 - caller must register conversion +- callbacks using curl_easy_setopt options +- CURLOPT_CONV_FROM_NETWORK_FUNCTION, +- CURLOPT_CONV_TO_NETWORK_FUNCTION, and +- CURLOPT_CONV_FROM_UTF8_FUNCTION */ +- CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing +- or wrong format */ +- CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ +- CURLE_SSH, /* 79 - error from the SSH layer, somewhat +- generic so the error message will be of +- interest when this has happened */ +- +- CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL +- connection */ +- CURLE_AGAIN, /* 81 - socket is not ready for send/recv, +- wait till it's ready and try again (Added +- in 7.18.2) */ +- CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or +- wrong format (Added in 7.19.0) */ +- CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in +- 7.19.0) */ +- CURL_LAST /* never use! */ +-} CURLcode; +- +-#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all +- the obsolete stuff removed! */ +- +-/* Backwards compatibility with older names */ +- +-/* The following were added in 7.17.1 */ +-/* These are scheduled to disappear by 2009 */ +-#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION +- +-/* The following were added in 7.17.0 */ +-/* These are scheduled to disappear by 2009 */ +-#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ +-#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 +-#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 +-#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 +-#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 +-#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 +-#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 +-#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 +-#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 +-#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 +-#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 +-#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 +-#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 +- +-#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED +-#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE +-#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR +-#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL +-#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS +-#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR +-#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED +- +-/* The following were added earlier */ +- +-#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT +- +-#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR +-#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +-#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED +- +-#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE +-#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME +- +-/* This was the error code 50 in 7.7.3 and a few earlier versions, this +- is no longer used by libcurl but is instead #defined here only to not +- make programs break */ +-#define CURLE_ALREADY_COMPLETE 99999 +- +-#endif /*!CURL_NO_OLDIES*/ +- +-/* This prototype applies to all conversion callbacks */ +-typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); +- +-typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ +- void *ssl_ctx, /* actually an +- OpenSSL SSL_CTX */ +- void *userptr); +- +-typedef enum { +- CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use +- CONNECT HTTP/1.1 */ +- CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT +- HTTP/1.0 */ +- CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already +- in 7.10 */ +- CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ +- CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ +- CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the +- host name rather than the IP address. added +- in 7.18.0 */ +-} curl_proxytype; /* this enum was added in 7.10 */ +- +-#define CURLAUTH_NONE 0 /* nothing */ +-#define CURLAUTH_BASIC (1<<0) /* Basic (default) */ +-#define CURLAUTH_DIGEST (1<<1) /* Digest */ +-#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ +-#define CURLAUTH_NTLM (1<<3) /* NTLM */ +-#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ +-#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ +-#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) +- +-#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ +-#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ +-#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ +-#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ +-#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ +-#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +-#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY +- +-#define CURL_ERROR_SIZE 256 +- +-struct curl_khkey { +- const char *key; /* points to a zero-terminated string encoded with base64 +- if len is zero, otherwise to the "raw" data */ +- size_t len; +- enum type { +- CURLKHTYPE_UNKNOWN, +- CURLKHTYPE_RSA1, +- CURLKHTYPE_RSA, +- CURLKHTYPE_DSS +- } keytype; +-}; +- +-/* this is the set of return values expected from the curl_sshkeycallback +- callback */ +-enum curl_khstat { +- CURLKHSTAT_FINE_ADD_TO_FILE, +- CURLKHSTAT_FINE, +- CURLKHSTAT_REJECT, /* reject the connection, return an error */ +- CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so +- this causes a CURLE_DEFER error but otherwise the +- connection will be left intact etc */ +- CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ +-}; +- +-/* this is the set of status codes pass in to the callback */ +-enum curl_khmatch { +- CURLKHMATCH_OK, /* match */ +- CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ +- CURLKHMATCH_MISSING, /* no matching host/key found */ +- CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ +-}; +- +-typedef int +- (*curl_sshkeycallback) (CURL *easy, /* easy handle */ +- const struct curl_khkey *knownkey, /* known */ +- const struct curl_khkey *foundkey, /* found */ +- enum curl_khmatch, /* libcurl's view on the keys */ +- void *clientp); /* custom pointer passed from app */ +- +-/* parameter for the CURLOPT_USE_SSL option */ +-typedef enum { +- CURLUSESSL_NONE, /* do not attempt to use SSL */ +- CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ +- CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ +- CURLUSESSL_ALL, /* SSL for all communication or fail */ +- CURLUSESSL_LAST /* not an option, never use */ +-} curl_usessl; +- +-#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all +- the obsolete stuff removed! */ +- +-/* Backwards compatibility with older names */ +-/* These are scheduled to disappear by 2009 */ +- +-#define CURLFTPSSL_NONE CURLUSESSL_NONE +-#define CURLFTPSSL_TRY CURLUSESSL_TRY +-#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL +-#define CURLFTPSSL_ALL CURLUSESSL_ALL +-#define CURLFTPSSL_LAST CURLUSESSL_LAST +-#define curl_ftpssl curl_usessl +-#endif /*!CURL_NO_OLDIES*/ +- +-/* parameter for the CURLOPT_FTP_SSL_CCC option */ +-typedef enum { +- CURLFTPSSL_CCC_NONE, /* do not send CCC */ +- CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ +- CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ +- CURLFTPSSL_CCC_LAST /* not an option, never use */ +-} curl_ftpccc; +- +-/* parameter for the CURLOPT_FTPSSLAUTH option */ +-typedef enum { +- CURLFTPAUTH_DEFAULT, /* let libcurl decide */ +- CURLFTPAUTH_SSL, /* use "AUTH SSL" */ +- CURLFTPAUTH_TLS, /* use "AUTH TLS" */ +- CURLFTPAUTH_LAST /* not an option, never use */ +-} curl_ftpauth; +- +-/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ +-typedef enum { +- CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ +- CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD +- again if MKD succeeded, for SFTP this does +- similar magic */ +- CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD +- again even if MKD failed! */ +- CURLFTP_CREATE_DIR_LAST /* not an option, never use */ +-} curl_ftpcreatedir; +- +-/* parameter for the CURLOPT_FTP_FILEMETHOD option */ +-typedef enum { +- CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ +- CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ +- CURLFTPMETHOD_NOCWD, /* no CWD at all */ +- CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ +- CURLFTPMETHOD_LAST /* not an option, never use */ +-} curl_ftpmethod; +- +-/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ +-#define CURLPROTO_HTTP (1<<0) +-#define CURLPROTO_HTTPS (1<<1) +-#define CURLPROTO_FTP (1<<2) +-#define CURLPROTO_FTPS (1<<3) +-#define CURLPROTO_SCP (1<<4) +-#define CURLPROTO_SFTP (1<<5) +-#define CURLPROTO_TELNET (1<<6) +-#define CURLPROTO_LDAP (1<<7) +-#define CURLPROTO_LDAPS (1<<8) +-#define CURLPROTO_DICT (1<<9) +-#define CURLPROTO_FILE (1<<10) +-#define CURLPROTO_TFTP (1<<11) +-#define CURLPROTO_ALL (~0) /* enable everything */ +- +-/* long may be 32 or 64 bits, but we should never depend on anything else +- but 32 */ +-#define CURLOPTTYPE_LONG 0 +-#define CURLOPTTYPE_OBJECTPOINT 10000 +-#define CURLOPTTYPE_FUNCTIONPOINT 20000 +-#define CURLOPTTYPE_OFF_T 30000 +- +-/* name is uppercase CURLOPT_, +- type is one of the defined CURLOPTTYPE_ +- number is unique identifier */ +-#ifdef CINIT +-#undef CINIT +-#endif +- +-#ifdef CURL_ISOCPP +-#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number +-#else +-/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +-#define LONG CURLOPTTYPE_LONG +-#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +-#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +-#define OFF_T CURLOPTTYPE_OFF_T +-#define CINIT(name,type,number) CURLOPT_/**/name = type + number +-#endif +- +-/* +- * This macro-mania below setups the CURLOPT_[what] enum, to be used with +- * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] +- * word. +- */ +- +-typedef enum { +- /* This is the FILE * or void * the regular output should be written to. */ +- CINIT(FILE, OBJECTPOINT, 1), +- +- /* The full URL to get/put */ +- CINIT(URL, OBJECTPOINT, 2), +- +- /* Port number to connect to, if other than default. */ +- CINIT(PORT, LONG, 3), +- +- /* Name of proxy to use. */ +- CINIT(PROXY, OBJECTPOINT, 4), +- +- /* "name:password" to use when fetching. */ +- CINIT(USERPWD, OBJECTPOINT, 5), +- +- /* "name:password" to use with proxy. */ +- CINIT(PROXYUSERPWD, OBJECTPOINT, 6), +- +- /* Range to get, specified as an ASCII string. */ +- CINIT(RANGE, OBJECTPOINT, 7), +- +- /* not used */ +- +- /* Specified file stream to upload from (use as input): */ +- CINIT(INFILE, OBJECTPOINT, 9), +- +- /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE +- * bytes big. If this is not used, error messages go to stderr instead: */ +- CINIT(ERRORBUFFER, OBJECTPOINT, 10), +- +- /* Function that will be called to store the output (instead of fwrite). The +- * parameters will use fwrite() syntax, make sure to follow them. */ +- CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), +- +- /* Function that will be called to read the input (instead of fread). The +- * parameters will use fread() syntax, make sure to follow them. */ +- CINIT(READFUNCTION, FUNCTIONPOINT, 12), +- +- /* Time-out the read operation after this amount of seconds */ +- CINIT(TIMEOUT, LONG, 13), +- +- /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about +- * how large the file being sent really is. That allows better error +- * checking and better verifies that the upload was successful. -1 means +- * unknown size. +- * +- * For large file support, there is also a _LARGE version of the key +- * which takes an off_t type, allowing platforms with larger off_t +- * sizes to handle larger files. See below for INFILESIZE_LARGE. +- */ +- CINIT(INFILESIZE, LONG, 14), +- +- /* POST static input fields. */ +- CINIT(POSTFIELDS, OBJECTPOINT, 15), +- +- /* Set the referrer page (needed by some CGIs) */ +- CINIT(REFERER, OBJECTPOINT, 16), +- +- /* Set the FTP PORT string (interface name, named or numerical IP address) +- Use i.e '-' to use default address. */ +- CINIT(FTPPORT, OBJECTPOINT, 17), +- +- /* Set the User-Agent string (examined by some CGIs) */ +- CINIT(USERAGENT, OBJECTPOINT, 18), +- +- /* If the download receives less than "low speed limit" bytes/second +- * during "low speed time" seconds, the operations is aborted. +- * You could i.e if you have a pretty high speed connection, abort if +- * it is less than 2000 bytes/sec during 20 seconds. +- */ +- +- /* Set the "low speed limit" */ +- CINIT(LOW_SPEED_LIMIT, LONG, 19), +- +- /* Set the "low speed time" */ +- CINIT(LOW_SPEED_TIME, LONG, 20), +- +- /* Set the continuation offset. +- * +- * Note there is also a _LARGE version of this key which uses +- * off_t types, allowing for large file offsets on platforms which +- * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. +- */ +- CINIT(RESUME_FROM, LONG, 21), +- +- /* Set cookie in request: */ +- CINIT(COOKIE, OBJECTPOINT, 22), +- +- /* This points to a linked list of headers, struct curl_slist kind */ +- CINIT(HTTPHEADER, OBJECTPOINT, 23), +- +- /* This points to a linked list of post entries, struct curl_httppost */ +- CINIT(HTTPPOST, OBJECTPOINT, 24), +- +- /* name of the file keeping your private SSL-certificate */ +- CINIT(SSLCERT, OBJECTPOINT, 25), +- +- /* password for the SSL or SSH private key */ +- CINIT(KEYPASSWD, OBJECTPOINT, 26), +- +- /* send TYPE parameter? */ +- CINIT(CRLF, LONG, 27), +- +- /* send linked-list of QUOTE commands */ +- CINIT(QUOTE, OBJECTPOINT, 28), +- +- /* send FILE * or void * to store headers to, if you use a callback it +- is simply passed to the callback unmodified */ +- CINIT(WRITEHEADER, OBJECTPOINT, 29), +- +- /* point to a file to read the initial cookies from, also enables +- "cookie awareness" */ +- CINIT(COOKIEFILE, OBJECTPOINT, 31), +- +- /* What version to specifically try to use. +- See CURL_SSLVERSION defines below. */ +- CINIT(SSLVERSION, LONG, 32), +- +- /* What kind of HTTP time condition to use, see defines */ +- CINIT(TIMECONDITION, LONG, 33), +- +- /* Time to use with the above condition. Specified in number of seconds +- since 1 Jan 1970 */ +- CINIT(TIMEVALUE, LONG, 34), +- +- /* 35 = OBSOLETE */ +- +- /* Custom request, for customizing the get command like +- HTTP: DELETE, TRACE and others +- FTP: to use a different list command +- */ +- CINIT(CUSTOMREQUEST, OBJECTPOINT, 36), +- +- /* HTTP request, for odd commands like DELETE, TRACE and others */ +- CINIT(STDERR, OBJECTPOINT, 37), +- +- /* 38 is not used */ +- +- /* send linked-list of post-transfer QUOTE commands */ +- CINIT(POSTQUOTE, OBJECTPOINT, 39), +- +- /* Pass a pointer to string of the output using full variable-replacement +- as described elsewhere. */ +- CINIT(WRITEINFO, OBJECTPOINT, 40), +- +- CINIT(VERBOSE, LONG, 41), /* talk a lot */ +- CINIT(HEADER, LONG, 42), /* throw the header out too */ +- CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ +- CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ +- CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ +- CINIT(UPLOAD, LONG, 46), /* this is an upload */ +- CINIT(POST, LONG, 47), /* HTTP POST method */ +- CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ +- +- CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ +- +- /* Specify whether to read the user+password from the .netrc or the URL. +- * This must be one of the CURL_NETRC_* enums below. */ +- CINIT(NETRC, LONG, 51), +- +- CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ +- +- CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ +- CINIT(PUT, LONG, 54), /* HTTP PUT */ +- +- /* 55 = OBSOLETE */ +- +- /* Function that will be called instead of the internal progress display +- * function. This function should be defined as the curl_progress_callback +- * prototype defines. */ +- CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), +- +- /* Data passed to the progress callback */ +- CINIT(PROGRESSDATA, OBJECTPOINT, 57), +- +- /* We want the referrer field set automatically when following locations */ +- CINIT(AUTOREFERER, LONG, 58), +- +- /* Port of the proxy, can be set in the proxy string as well with: +- "[host]:[port]" */ +- CINIT(PROXYPORT, LONG, 59), +- +- /* size of the POST input data, if strlen() is not good to use */ +- CINIT(POSTFIELDSIZE, LONG, 60), +- +- /* tunnel non-http operations through a HTTP proxy */ +- CINIT(HTTPPROXYTUNNEL, LONG, 61), +- +- /* Set the interface string to use as outgoing network interface */ +- CINIT(INTERFACE, OBJECTPOINT, 62), +- +- /* Set the krb4/5 security level, this also enables krb4/5 awareness. This +- * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string +- * is set but doesn't match one of these, 'private' will be used. */ +- CINIT(KRBLEVEL, OBJECTPOINT, 63), +- +- /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ +- CINIT(SSL_VERIFYPEER, LONG, 64), +- +- /* The CApath or CAfile used to validate the peer certificate +- this option is used only if SSL_VERIFYPEER is true */ +- CINIT(CAINFO, OBJECTPOINT, 65), +- +- /* 66 = OBSOLETE */ +- /* 67 = OBSOLETE */ +- +- /* Maximum number of http redirects to follow */ +- CINIT(MAXREDIRS, LONG, 68), +- +- /* Pass a long set to 1 to get the date of the requested document (if +- possible)! Pass a zero to shut it off. */ +- CINIT(FILETIME, LONG, 69), +- +- /* This points to a linked list of telnet options */ +- CINIT(TELNETOPTIONS, OBJECTPOINT, 70), +- +- /* Max amount of cached alive connections */ +- CINIT(MAXCONNECTS, LONG, 71), +- +- /* What policy to use when closing connections when the cache is filled +- up */ +- CINIT(CLOSEPOLICY, LONG, 72), +- +- /* 73 = OBSOLETE */ +- +- /* Set to explicitly use a new connection for the upcoming transfer. +- Do not use this unless you're absolutely sure of this, as it makes the +- operation slower and is less friendly for the network. */ +- CINIT(FRESH_CONNECT, LONG, 74), +- +- /* Set to explicitly forbid the upcoming transfer's connection to be re-used +- when done. Do not use this unless you're absolutely sure of this, as it +- makes the operation slower and is less friendly for the network. */ +- CINIT(FORBID_REUSE, LONG, 75), +- +- /* Set to a file name that contains random data for libcurl to use to +- seed the random engine when doing SSL connects. */ +- CINIT(RANDOM_FILE, OBJECTPOINT, 76), +- +- /* Set to the Entropy Gathering Daemon socket pathname */ +- CINIT(EGDSOCKET, OBJECTPOINT, 77), +- +- /* Time-out connect operations after this amount of seconds, if connects +- are OK within this time, then fine... This only aborts the connect +- phase. [Only works on unix-style/SIGALRM operating systems] */ +- CINIT(CONNECTTIMEOUT, LONG, 78), +- +- /* Function that will be called to store headers (instead of fwrite). The +- * parameters will use fwrite() syntax, make sure to follow them. */ +- CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), +- +- /* Set this to force the HTTP request to get back to GET. Only really usable +- if POST, PUT or a custom request have been used first. +- */ +- CINIT(HTTPGET, LONG, 80), +- +- /* Set if we should verify the Common name from the peer certificate in ssl +- * handshake, set 1 to check existence, 2 to ensure that it matches the +- * provided hostname. */ +- CINIT(SSL_VERIFYHOST, LONG, 81), +- +- /* Specify which file name to write all known cookies in after completed +- operation. Set file name to "-" (dash) to make it go to stdout. */ +- CINIT(COOKIEJAR, OBJECTPOINT, 82), +- +- /* Specify which SSL ciphers to use */ +- CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), +- +- /* Specify which HTTP version to use! This must be set to one of the +- CURL_HTTP_VERSION* enums set below. */ +- CINIT(HTTP_VERSION, LONG, 84), +- +- /* Specifically switch on or off the FTP engine's use of the EPSV command. By +- default, that one will always be attempted before the more traditional +- PASV command. */ +- CINIT(FTP_USE_EPSV, LONG, 85), +- +- /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ +- CINIT(SSLCERTTYPE, OBJECTPOINT, 86), +- +- /* name of the file keeping your private SSL-key */ +- CINIT(SSLKEY, OBJECTPOINT, 87), +- +- /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ +- CINIT(SSLKEYTYPE, OBJECTPOINT, 88), +- +- /* crypto engine for the SSL-sub system */ +- CINIT(SSLENGINE, OBJECTPOINT, 89), +- +- /* set the crypto engine for the SSL-sub system as default +- the param has no meaning... +- */ +- CINIT(SSLENGINE_DEFAULT, LONG, 90), +- +- /* Non-zero value means to use the global dns cache */ +- CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ +- +- /* DNS cache timeout */ +- CINIT(DNS_CACHE_TIMEOUT, LONG, 92), +- +- /* send linked-list of pre-transfer QUOTE commands */ +- CINIT(PREQUOTE, OBJECTPOINT, 93), +- +- /* set the debug function */ +- CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), +- +- /* set the data for the debug function */ +- CINIT(DEBUGDATA, OBJECTPOINT, 95), +- +- /* mark this as start of a cookie session */ +- CINIT(COOKIESESSION, LONG, 96), +- +- /* The CApath directory used to validate the peer certificate +- this option is used only if SSL_VERIFYPEER is true */ +- CINIT(CAPATH, OBJECTPOINT, 97), +- +- /* Instruct libcurl to use a smaller receive buffer */ +- CINIT(BUFFERSIZE, LONG, 98), +- +- /* Instruct libcurl to not use any signal/alarm handlers, even when using +- timeouts. This option is useful for multi-threaded applications. +- See libcurl-the-guide for more background information. */ +- CINIT(NOSIGNAL, LONG, 99), +- +- /* Provide a CURLShare for mutexing non-ts data */ +- CINIT(SHARE, OBJECTPOINT, 100), +- +- /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), +- CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ +- CINIT(PROXYTYPE, LONG, 101), +- +- /* Set the Accept-Encoding string. Use this to tell a server you would like +- the response to be compressed. */ +- CINIT(ENCODING, OBJECTPOINT, 102), +- +- /* Set pointer to private data */ +- CINIT(PRIVATE, OBJECTPOINT, 103), +- +- /* Set aliases for HTTP 200 in the HTTP Response header */ +- CINIT(HTTP200ALIASES, OBJECTPOINT, 104), +- +- /* Continue to send authentication (user+password) when following locations, +- even when hostname changed. This can potentially send off the name +- and password to whatever host the server decides. */ +- CINIT(UNRESTRICTED_AUTH, LONG, 105), +- +- /* Specifically switch on or off the FTP engine's use of the EPRT command ( it +- also disables the LPRT attempt). By default, those ones will always be +- attempted before the good old traditional PORT command. */ +- CINIT(FTP_USE_EPRT, LONG, 106), +- +- /* Set this to a bitmask value to enable the particular authentications +- methods you like. Use this in combination with CURLOPT_USERPWD. +- Note that setting multiple bits may cause extra network round-trips. */ +- CINIT(HTTPAUTH, LONG, 107), +- +- /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx +- in second argument. The function must be matching the +- curl_ssl_ctx_callback proto. */ +- CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), +- +- /* Set the userdata for the ssl context callback function's third +- argument */ +- CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), +- +- /* FTP Option that causes missing dirs to be created on the remote server. +- In 7.19.4 we introduced the convenience enums for this option using the +- CURLFTP_CREATE_DIR prefix. +- */ +- CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), +- +- /* Set this to a bitmask value to enable the particular authentications +- methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. +- Note that setting multiple bits may cause extra network round-trips. */ +- CINIT(PROXYAUTH, LONG, 111), +- +- /* FTP option that changes the timeout, in seconds, associated with +- getting a response. This is different from transfer timeout time and +- essentially places a demand on the FTP server to acknowledge commands +- in a timely manner. */ +- CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), +- +- /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to +- tell libcurl to resolve names to those IP versions only. This only has +- affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ +- CINIT(IPRESOLVE, LONG, 113), +- +- /* Set this option to limit the size of a file that will be downloaded from +- an HTTP or FTP server. +- +- Note there is also _LARGE version which adds large file support for +- platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ +- CINIT(MAXFILESIZE, LONG, 114), +- +- /* See the comment for INFILESIZE above, but in short, specifies +- * the size of the file being uploaded. -1 means unknown. +- */ +- CINIT(INFILESIZE_LARGE, OFF_T, 115), +- +- /* Sets the continuation offset. There is also a LONG version of this; +- * look above for RESUME_FROM. +- */ +- CINIT(RESUME_FROM_LARGE, OFF_T, 116), +- +- /* Sets the maximum size of data that will be downloaded from +- * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. +- */ +- CINIT(MAXFILESIZE_LARGE, OFF_T, 117), +- +- /* Set this option to the file name of your .netrc file you want libcurl +- to parse (using the CURLOPT_NETRC option). If not set, libcurl will do +- a poor attempt to find the user's home directory and check for a .netrc +- file in there. */ +- CINIT(NETRC_FILE, OBJECTPOINT, 118), +- +- /* Enable SSL/TLS for FTP, pick one of: +- CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise +- CURLFTPSSL_CONTROL - SSL for the control connection or fail +- CURLFTPSSL_ALL - SSL for all communication or fail +- */ +- CINIT(USE_SSL, LONG, 119), +- +- /* The _LARGE version of the standard POSTFIELDSIZE option */ +- CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), +- +- /* Enable/disable the TCP Nagle algorithm */ +- CINIT(TCP_NODELAY, LONG, 121), +- +- /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ +- /* 123 OBSOLETE. Gone in 7.16.0 */ +- /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ +- /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ +- /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ +- /* 127 OBSOLETE. Gone in 7.16.0 */ +- /* 128 OBSOLETE. Gone in 7.16.0 */ +- +- /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option +- can be used to change libcurl's default action which is to first try +- "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK +- response has been received. +- +- Available parameters are: +- CURLFTPAUTH_DEFAULT - let libcurl decide +- CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS +- CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL +- */ +- CINIT(FTPSSLAUTH, LONG, 129), +- +- CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), +- CINIT(IOCTLDATA, OBJECTPOINT, 131), +- +- /* 132 OBSOLETE. Gone in 7.16.0 */ +- /* 133 OBSOLETE. Gone in 7.16.0 */ +- +- /* zero terminated string for pass on to the FTP server when asked for +- "account" info */ +- CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), +- +- /* feed cookies into cookie engine */ +- CINIT(COOKIELIST, OBJECTPOINT, 135), +- +- /* ignore Content-Length */ +- CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), +- +- /* Set to non-zero to skip the IP address received in a 227 PASV FTP server +- response. Typically used for FTP-SSL purposes but is not restricted to +- that. libcurl will then instead use the same IP address it used for the +- control connection. */ +- CINIT(FTP_SKIP_PASV_IP, LONG, 137), +- +- /* Select "file method" to use when doing FTP, see the curl_ftpmethod +- above. */ +- CINIT(FTP_FILEMETHOD, LONG, 138), +- +- /* Local port number to bind the socket to */ +- CINIT(LOCALPORT, LONG, 139), +- +- /* Number of ports to try, including the first one set with LOCALPORT. +- Thus, setting it to 1 will make no additional attempts but the first. +- */ +- CINIT(LOCALPORTRANGE, LONG, 140), +- +- /* no transfer, set up connection and let application use the socket by +- extracting it with CURLINFO_LASTSOCKET */ +- CINIT(CONNECT_ONLY, LONG, 141), +- +- /* Function that will be called to convert from the +- network encoding (instead of using the iconv calls in libcurl) */ +- CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), +- +- /* Function that will be called to convert to the +- network encoding (instead of using the iconv calls in libcurl) */ +- CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), +- +- /* Function that will be called to convert from UTF8 +- (instead of using the iconv calls in libcurl) +- Note that this is used only for SSL certificate processing */ +- CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), +- +- /* if the connection proceeds too quickly then need to slow it down */ +- /* limit-rate: maximum number of bytes per second to send or receive */ +- CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), +- CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), +- +- /* Pointer to command string to send if USER/PASS fails. */ +- CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), +- +- /* callback function for setting socket options */ +- CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), +- CINIT(SOCKOPTDATA, OBJECTPOINT, 149), +- +- /* set to 0 to disable session ID re-use for this transfer, default is +- enabled (== 1) */ +- CINIT(SSL_SESSIONID_CACHE, LONG, 150), +- +- /* allowed SSH authentication methods */ +- CINIT(SSH_AUTH_TYPES, LONG, 151), +- +- /* Used by scp/sftp to do public/private key authentication */ +- CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), +- CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), +- +- /* Send CCC (Clear Command Channel) after authentication */ +- CINIT(FTP_SSL_CCC, LONG, 154), +- +- /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ +- CINIT(TIMEOUT_MS, LONG, 155), +- CINIT(CONNECTTIMEOUT_MS, LONG, 156), +- +- /* set to zero to disable the libcurl's decoding and thus pass the raw body +- data to the application even when it is encoded/compressed */ +- CINIT(HTTP_TRANSFER_DECODING, LONG, 157), +- CINIT(HTTP_CONTENT_DECODING, LONG, 158), +- +- /* Permission used when creating new files and directories on the remote +- server for protocols that support it, SFTP/SCP/FILE */ +- CINIT(NEW_FILE_PERMS, LONG, 159), +- CINIT(NEW_DIRECTORY_PERMS, LONG, 160), +- +- /* Set the behaviour of POST when redirecting. Values must be set to one +- of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ +- CINIT(POSTREDIR, LONG, 161), +- +- /* used by scp/sftp to verify the host's public key */ +- CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), +- +- /* Callback function for opening socket (instead of socket(2)). Optionally, +- callback is able change the address or refuse to connect returning +- CURL_SOCKET_BAD. The callback should have type +- curl_opensocket_callback */ +- CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), +- CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), +- +- /* POST volatile input fields. */ +- CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), +- +- /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ +- CINIT(PROXY_TRANSFER_MODE, LONG, 166), +- +- /* Callback function for seeking in the input stream */ +- CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), +- CINIT(SEEKDATA, OBJECTPOINT, 168), +- +- /* CRL file */ +- CINIT(CRLFILE, OBJECTPOINT, 169), +- +- /* Issuer certificate */ +- CINIT(ISSUERCERT, OBJECTPOINT, 170), +- +- /* (IPv6) Address scope */ +- CINIT(ADDRESS_SCOPE, LONG, 171), +- +- /* Collect certificate chain info and allow it to get retrievable with +- CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only +- working with OpenSSL-powered builds. */ +- CINIT(CERTINFO, LONG, 172), +- +- /* "name" and "pwd" to use when fetching. */ +- CINIT(USERNAME, OBJECTPOINT, 173), +- CINIT(PASSWORD, OBJECTPOINT, 174), +- +- /* "name" and "pwd" to use with Proxy when fetching. */ +- CINIT(PROXYUSERNAME, OBJECTPOINT, 175), +- CINIT(PROXYPASSWORD, OBJECTPOINT, 176), +- +- /* Comma separated list of hostnames defining no-proxy zones. These should +- match both hostnames directly, and hostnames within a domain. For +- example, local.com will match local.com and www.local.com, but NOT +- notlocal.com or www.notlocal.com. For compatibility with other +- implementations of this, .local.com will be considered to be the same as +- local.com. A single * is the only valid wildcard, and effectively +- disables the use of proxy. */ +- CINIT(NOPROXY, OBJECTPOINT, 177), +- +- /* block size for TFTP transfers */ +- CINIT(TFTP_BLKSIZE, LONG, 178), +- +- /* Socks Service */ +- CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179), +- +- /* Socks Service */ +- CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), +- +- /* set the bitmask for the protocols that are allowed to be used for the +- transfer, which thus helps the app which takes URLs from users or other +- external inputs and want to restrict what protocol(s) to deal +- with. Defaults to CURLPROTO_ALL. */ +- CINIT(PROTOCOLS, LONG, 181), +- +- /* set the bitmask for the protocols that libcurl is allowed to follow to, +- as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs +- to be set in both bitmasks to be allowed to get redirected to. Defaults +- to all protocols except FILE and SCP. */ +- CINIT(REDIR_PROTOCOLS, LONG, 182), +- +- /* set the SSH knownhost file name to use */ +- CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183), +- +- /* set the SSH host key callback, must point to a curl_sshkeycallback +- function */ +- CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), +- +- /* set the SSH host key callback custom pointer */ +- CINIT(SSH_KEYDATA, OBJECTPOINT, 185), +- +- CURLOPT_LASTENTRY /* the last unused */ +-} CURLoption; +- +-#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all +- the obsolete stuff removed! */ +- +-/* Backwards compatibility with older names */ +-/* These are scheduled to disappear by 2011 */ +- +-/* This was added in version 7.19.1 */ +-#define CURLOPT_POST301 CURLOPT_POSTREDIR +- +-/* These are scheduled to disappear by 2009 */ +- +-/* The following were added in 7.17.0 */ +-#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD +-#define CURLOPT_FTPAPPEND CURLOPT_APPEND +-#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY +-#define CURLOPT_FTP_SSL CURLOPT_USE_SSL +- +-/* The following were added earlier */ +- +-#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD +-#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL +- +-#else +-/* This is set if CURL_NO_OLDIES is defined at compile-time */ +-#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ +-#endif +- +- +- /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host +- name resolves addresses using more than one IP protocol version, this +- option might be handy to force libcurl to use a specific IP version. */ +-#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP +- versions that your system allows */ +-#define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ +-#define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ +- +- /* three convenient "aliases" that follow the name scheme better */ +-#define CURLOPT_WRITEDATA CURLOPT_FILE +-#define CURLOPT_READDATA CURLOPT_INFILE +-#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER +- +- /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ +-enum { +- CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd +- like the library to choose the best possible +- for us! */ +- CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ +- CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ +- +- CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ +-}; +- +- /* These enums are for use with the CURLOPT_NETRC option. */ +-enum CURL_NETRC_OPTION { +- CURL_NETRC_IGNORED, /* The .netrc will never be read. +- * This is the default. */ +- CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred +- * to one in the .netrc. */ +- CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. +- * Unless one is set programmatically, the .netrc +- * will be queried. */ +- CURL_NETRC_LAST +-}; +- +-enum { +- CURL_SSLVERSION_DEFAULT, +- CURL_SSLVERSION_TLSv1, +- CURL_SSLVERSION_SSLv2, +- CURL_SSLVERSION_SSLv3, +- +- CURL_SSLVERSION_LAST /* never use, keep last */ +-}; +- +-/* symbols to use with CURLOPT_POSTREDIR. +- CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that +- CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ +- +-#define CURL_REDIR_GET_ALL 0 +-#define CURL_REDIR_POST_301 1 +-#define CURL_REDIR_POST_302 2 +-#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) +- +-typedef enum { +- CURL_TIMECOND_NONE, +- +- CURL_TIMECOND_IFMODSINCE, +- CURL_TIMECOND_IFUNMODSINCE, +- CURL_TIMECOND_LASTMOD, +- +- CURL_TIMECOND_LAST +-} curl_TimeCond; +- +- +-/* curl_strequal() and curl_strnequal() are subject for removal in a future +- libcurl, see lib/README.curlx for details */ +-CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); +-CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); +- +-/* name is uppercase CURLFORM_ */ +-#ifdef CFINIT +-#undef CFINIT +-#endif +- +-#ifdef CURL_ISOCPP +-#define CFINIT(name) CURLFORM_ ## name +-#else +-/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +-#define CFINIT(name) CURLFORM_/**/name +-#endif +- +-typedef enum { +- CFINIT(NOTHING), /********* the first one is unused ************/ +- +- /* */ +- CFINIT(COPYNAME), +- CFINIT(PTRNAME), +- CFINIT(NAMELENGTH), +- CFINIT(COPYCONTENTS), +- CFINIT(PTRCONTENTS), +- CFINIT(CONTENTSLENGTH), +- CFINIT(FILECONTENT), +- CFINIT(ARRAY), +- CFINIT(OBSOLETE), +- CFINIT(FILE), +- +- CFINIT(BUFFER), +- CFINIT(BUFFERPTR), +- CFINIT(BUFFERLENGTH), +- +- CFINIT(CONTENTTYPE), +- CFINIT(CONTENTHEADER), +- CFINIT(FILENAME), +- CFINIT(END), +- CFINIT(OBSOLETE2), +- +- CFINIT(STREAM), +- +- CURLFORM_LASTENTRY /* the last unused */ +-} CURLformoption; +- +-#undef CFINIT /* done */ +- +-/* structure to be used as parameter for CURLFORM_ARRAY */ +-struct curl_forms { +- CURLformoption option; +- const char *value; +-}; +- +-/* use this for multipart formpost building */ +-/* Returns code for curl_formadd() +- * +- * Returns: +- * CURL_FORMADD_OK on success +- * CURL_FORMADD_MEMORY if the FormInfo allocation fails +- * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form +- * CURL_FORMADD_NULL if a null pointer was given for a char +- * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed +- * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used +- * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) +- * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated +- * CURL_FORMADD_MEMORY if some allocation for string copying failed. +- * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array +- * +- ***************************************************************************/ +-typedef enum { +- CURL_FORMADD_OK, /* first, no error */ +- +- CURL_FORMADD_MEMORY, +- CURL_FORMADD_OPTION_TWICE, +- CURL_FORMADD_NULL, +- CURL_FORMADD_UNKNOWN_OPTION, +- CURL_FORMADD_INCOMPLETE, +- CURL_FORMADD_ILLEGAL_ARRAY, +- CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ +- +- CURL_FORMADD_LAST /* last */ +-} CURLFORMcode; +- +-/* +- * NAME curl_formadd() +- * +- * DESCRIPTION +- * +- * Pretty advanced function for building multi-part formposts. Each invoke +- * adds one part that together construct a full post. Then use +- * CURLOPT_HTTPPOST to send it off to libcurl. +- */ +-CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, +- struct curl_httppost **last_post, +- ...); +- +-/* +- * callback function for curl_formget() +- * The void *arg pointer will be the one passed as second argument to +- * curl_formget(). +- * The character buffer passed to it must not be freed. +- * Should return the buffer length passed to it as the argument "len" on +- * success. +- */ +-typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); +- +-/* +- * NAME curl_formget() +- * +- * DESCRIPTION +- * +- * Serialize a curl_httppost struct built with curl_formadd(). +- * Accepts a void pointer as second argument which will be passed to +- * the curl_formget_callback function. +- * Returns 0 on success. +- */ +-CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, +- curl_formget_callback append); +-/* +- * NAME curl_formfree() +- * +- * DESCRIPTION +- * +- * Free a multipart formpost previously built with curl_formadd(). +- */ +-CURL_EXTERN void curl_formfree(struct curl_httppost *form); +- +-/* +- * NAME curl_getenv() +- * +- * DESCRIPTION +- * +- * Returns a malloc()'ed string that MUST be curl_free()ed after usage is +- * complete. DEPRECATED - see lib/README.curlx +- */ +-CURL_EXTERN char *curl_getenv(const char *variable); +- +-/* +- * NAME curl_version() +- * +- * DESCRIPTION +- * +- * Returns a static ascii string of the libcurl version. +- */ +-CURL_EXTERN char *curl_version(void); +- +-/* +- * NAME curl_easy_escape() +- * +- * DESCRIPTION +- * +- * Escapes URL strings (converts all letters consider illegal in URLs to their +- * %XX versions). This function returns a new allocated string or NULL if an +- * error occurred. +- */ +-CURL_EXTERN char *curl_easy_escape(CURL *handle, +- const char *string, +- int length); +- +-/* the previous version: */ +-CURL_EXTERN char *curl_escape(const char *string, +- int length); +- +- +-/* +- * NAME curl_easy_unescape() +- * +- * DESCRIPTION +- * +- * Unescapes URL encoding in strings (converts all %XX codes to their 8bit +- * versions). This function returns a new allocated string or NULL if an error +- * occurred. +- * Conversion Note: On non-ASCII platforms the ASCII %XX codes are +- * converted into the host encoding. +- */ +-CURL_EXTERN char *curl_easy_unescape(CURL *handle, +- const char *string, +- int length, +- int *outlength); +- +-/* the previous version */ +-CURL_EXTERN char *curl_unescape(const char *string, +- int length); +- +-/* +- * NAME curl_free() +- * +- * DESCRIPTION +- * +- * Provided for de-allocation in the same translation unit that did the +- * allocation. Added in libcurl 7.10 +- */ +-CURL_EXTERN void curl_free(void *p); +- +-/* +- * NAME curl_global_init() +- * +- * DESCRIPTION +- * +- * curl_global_init() should be invoked exactly once for each application that +- * uses libcurl and before any call of other libcurl functions. +- * +- * This function is not thread-safe! +- */ +-CURL_EXTERN CURLcode curl_global_init(long flags); +- +-/* +- * NAME curl_global_init_mem() +- * +- * DESCRIPTION +- * +- * curl_global_init() or curl_global_init_mem() should be invoked exactly once +- * for each application that uses libcurl. This function can be used to +- * initialize libcurl and set user defined memory management callback +- * functions. Users can implement memory management routines to check for +- * memory leaks, check for mis-use of the curl library etc. User registered +- * callback routines with be invoked by this library instead of the system +- * memory management routines like malloc, free etc. +- */ +-CURL_EXTERN CURLcode curl_global_init_mem(long flags, +- curl_malloc_callback m, +- curl_free_callback f, +- curl_realloc_callback r, +- curl_strdup_callback s, +- curl_calloc_callback c); +- +-/* +- * NAME curl_global_cleanup() +- * +- * DESCRIPTION +- * +- * curl_global_cleanup() should be invoked exactly once for each application +- * that uses libcurl +- */ +-CURL_EXTERN void curl_global_cleanup(void); +- +-/* linked-list structure for the CURLOPT_QUOTE option (and other) */ +-struct curl_slist { +- char *data; +- struct curl_slist *next; +-}; +- +-/* +- * NAME curl_slist_append() +- * +- * DESCRIPTION +- * +- * Appends a string to a linked list. If no list exists, it will be created +- * first. Returns the new list, after appending. +- */ +-CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, +- const char *); +- +-/* +- * NAME curl_slist_free_all() +- * +- * DESCRIPTION +- * +- * free a previously built curl_slist. +- */ +-CURL_EXTERN void curl_slist_free_all(struct curl_slist *); +- +-/* +- * NAME curl_getdate() +- * +- * DESCRIPTION +- * +- * Returns the time, in seconds since 1 Jan 1970 of the time string given in +- * the first argument. The time argument in the second parameter is unused +- * and should be set to NULL. +- */ +-CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); +- +-/* info about the certificate chain, only for OpenSSL builds. Asked +- for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ +-struct curl_certinfo { +- int num_of_certs; /* number of certificates with information */ +- struct curl_slist **certinfo; /* for each index in this array, there's a +- linked list with textual information in the +- format "name: value" */ +-}; +- +-#define CURLINFO_STRING 0x100000 +-#define CURLINFO_LONG 0x200000 +-#define CURLINFO_DOUBLE 0x300000 +-#define CURLINFO_SLIST 0x400000 +-#define CURLINFO_MASK 0x0fffff +-#define CURLINFO_TYPEMASK 0xf00000 +- +-typedef enum { +- CURLINFO_NONE, /* first, never use this */ +- CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, +- CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, +- CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, +- CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, +- CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, +- CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, +- CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, +- CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, +- CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, +- CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, +- CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, +- CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, +- CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, +- CURLINFO_FILETIME = CURLINFO_LONG + 14, +- CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, +- CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, +- CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, +- CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, +- CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, +- CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, +- CURLINFO_PRIVATE = CURLINFO_STRING + 21, +- CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, +- CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, +- CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, +- CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, +- CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, +- CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, +- CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, +- CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, +- CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, +- CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, +- CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, +- CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, +- CURLINFO_CERTINFO = CURLINFO_SLIST + 34, +- CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, +- /* Fill in new entries below here! */ +- +- CURLINFO_LASTONE = 35 +-} CURLINFO; +- +-/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as +- CURLINFO_HTTP_CODE */ +-#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE +- +-typedef enum { +- CURLCLOSEPOLICY_NONE, /* first, never use this */ +- +- CURLCLOSEPOLICY_OLDEST, +- CURLCLOSEPOLICY_LEAST_RECENTLY_USED, +- CURLCLOSEPOLICY_LEAST_TRAFFIC, +- CURLCLOSEPOLICY_SLOWEST, +- CURLCLOSEPOLICY_CALLBACK, +- +- CURLCLOSEPOLICY_LAST /* last, never use this */ +-} curl_closepolicy; +- +-#define CURL_GLOBAL_SSL (1<<0) +-#define CURL_GLOBAL_WIN32 (1<<1) +-#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) +-#define CURL_GLOBAL_NOTHING 0 +-#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL +- +- +-/***************************************************************************** +- * Setup defines, protos etc for the sharing stuff. +- */ +- +-/* Different data locks for a single share */ +-typedef enum { +- CURL_LOCK_DATA_NONE = 0, +- /* CURL_LOCK_DATA_SHARE is used internally to say that +- * the locking is just made to change the internal state of the share +- * itself. +- */ +- CURL_LOCK_DATA_SHARE, +- CURL_LOCK_DATA_COOKIE, +- CURL_LOCK_DATA_DNS, +- CURL_LOCK_DATA_SSL_SESSION, +- CURL_LOCK_DATA_CONNECT, +- CURL_LOCK_DATA_LAST +-} curl_lock_data; +- +-/* Different lock access types */ +-typedef enum { +- CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ +- CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ +- CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ +- CURL_LOCK_ACCESS_LAST /* never use */ +-} curl_lock_access; +- +-typedef void (*curl_lock_function)(CURL *handle, +- curl_lock_data data, +- curl_lock_access locktype, +- void *userptr); +-typedef void (*curl_unlock_function)(CURL *handle, +- curl_lock_data data, +- void *userptr); +- +-typedef void CURLSH; +- +-typedef enum { +- CURLSHE_OK, /* all is fine */ +- CURLSHE_BAD_OPTION, /* 1 */ +- CURLSHE_IN_USE, /* 2 */ +- CURLSHE_INVALID, /* 3 */ +- CURLSHE_NOMEM, /* out of memory */ +- CURLSHE_LAST /* never use */ +-} CURLSHcode; +- +-typedef enum { +- CURLSHOPT_NONE, /* don't use */ +- CURLSHOPT_SHARE, /* specify a data type to share */ +- CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ +- CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ +- CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ +- CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock +- callback functions */ +- CURLSHOPT_LAST /* never use */ +-} CURLSHoption; +- +-CURL_EXTERN CURLSH *curl_share_init(void); +-CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); +-CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); +- +-/**************************************************************************** +- * Structures for querying information about the curl library at runtime. +- */ +- +-typedef enum { +- CURLVERSION_FIRST, +- CURLVERSION_SECOND, +- CURLVERSION_THIRD, +- CURLVERSION_FOURTH, +- CURLVERSION_LAST /* never actually use this */ +-} CURLversion; +- +-/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by +- basically all programs ever that want to get version information. It is +- meant to be a built-in version number for what kind of struct the caller +- expects. If the struct ever changes, we redefine the NOW to another enum +- from above. */ +-#define CURLVERSION_NOW CURLVERSION_FOURTH +- +-typedef struct { +- CURLversion age; /* age of the returned struct */ +- const char *version; /* LIBCURL_VERSION */ +- unsigned int version_num; /* LIBCURL_VERSION_NUM */ +- const char *host; /* OS/host/cpu/machine when configured */ +- int features; /* bitmask, see defines below */ +- const char *ssl_version; /* human readable string */ +- long ssl_version_num; /* not used anymore, always 0 */ +- const char *libz_version; /* human readable string */ +- /* protocols is terminated by an entry with a NULL protoname */ +- const char * const *protocols; +- +- /* The fields below this were added in CURLVERSION_SECOND */ +- const char *ares; +- int ares_num; +- +- /* This field was added in CURLVERSION_THIRD */ +- const char *libidn; +- +- /* These field were added in CURLVERSION_FOURTH */ +- +- /* Same as '_libiconv_version' if built with HAVE_ICONV */ +- int iconv_ver_num; +- +- const char *libssh_version; /* human readable string */ +- +-} curl_version_info_data; +- +-#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ +-#define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */ +-#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ +-#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ +-#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ +-#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */ +-#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ +-#define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */ +-#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ +-#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ +-#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ +-#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ +-#define CURL_VERSION_CONV (1<<12) /* character conversions supported */ +-#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ +- +-/* +- * NAME curl_version_info() +- * +- * DESCRIPTION +- * +- * This function returns a pointer to a static copy of the version info +- * struct. See above. +- */ +-CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); +- +-/* +- * NAME curl_easy_strerror() +- * +- * DESCRIPTION +- * +- * The curl_easy_strerror function may be used to turn a CURLcode value +- * into the equivalent human readable error string. This is useful +- * for printing meaningful error messages. +- */ +-CURL_EXTERN const char *curl_easy_strerror(CURLcode); +- +-/* +- * NAME curl_share_strerror() +- * +- * DESCRIPTION +- * +- * The curl_share_strerror function may be used to turn a CURLSHcode value +- * into the equivalent human readable error string. This is useful +- * for printing meaningful error messages. +- */ +-CURL_EXTERN const char *curl_share_strerror(CURLSHcode); +- +-/* +- * NAME curl_easy_pause() +- * +- * DESCRIPTION +- * +- * The curl_easy_pause function pauses or unpauses transfers. Select the new +- * state by setting the bitmask, use the convenience defines below. +- * +- */ +-CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); +- +-#define CURLPAUSE_RECV (1<<0) +-#define CURLPAUSE_RECV_CONT (0) +- +-#define CURLPAUSE_SEND (1<<2) +-#define CURLPAUSE_SEND_CONT (0) +- +-#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) +-#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) +- +-#ifdef __cplusplus +-} +-#endif +- +-/* unfortunately, the easy.h and multi.h include files need options and info +- stuff before they can be included! */ +-#include "easy.h" /* nothing in curl is fun without the easy stuff */ +-#include "multi.h" +- +-/* the typechecker doesn't work in C++ (yet) */ +-#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ +- ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ +- !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) +-#include "typecheck-gcc.h" +-#else +-#if defined(__STDC__) && (__STDC__ >= 1) +-/* This preprocessor magic that replaces a call with the exact same call is +- only done to make sure application authors pass exactly three arguments +- to these functions. */ +-#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) +-#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) +-#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +-#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) +-#endif /* __STDC__ >= 1 */ +-#endif /* gcc >= 4.3 && !__cplusplus */ +- +-#endif /* __CURL_CURL_H */ +diff --git a/src/third_party/curl/curlbuild.h b/src/third_party/curl/curlbuild.h +deleted file mode 100644 +index 87d0c7b..0000000 +--- a/src/third_party/curl/curlbuild.h ++++ /dev/null +@@ -1,202 +0,0 @@ +-/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ +-#ifndef __CURL_CURLBUILD_H +-#define __CURL_CURLBUILD_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: curlbuild.h.in,v 1.8 2009-04-29 15:15:38 yangtse Exp $ +- ***************************************************************************/ +- +-/* ================================================================ */ +-/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +-/* ================================================================ */ +- +-/* +- * NOTE 1: +- * ------- +- * +- * Nothing in this file is intended to be modified or adjusted by the +- * curl library user nor by the curl library builder. +- * +- * If you think that something actually needs to be changed, adjusted +- * or fixed in this file, then, report it on the libcurl development +- * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ +- * +- * This header file shall only export symbols which are 'curl' or 'CURL' +- * prefixed, otherwise public name space would be polluted. +- * +- * NOTE 2: +- * ------- +- * +- * Right now you might be staring at file include/curl/curlbuild.h.in or +- * at file include/curl/curlbuild.h, this is due to the following reason: +- * +- * On systems capable of running the configure script, the configure process +- * will overwrite the distributed include/curl/curlbuild.h file with one that +- * is suitable and specific to the library being configured and built, which +- * is generated from the include/curl/curlbuild.h.in template file. +- * +- */ +- +-/* ================================================================ */ +-/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +-/* ================================================================ */ +- +-#ifdef CURL_SIZEOF_LONG +-# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +-#endif +- +-#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +-# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +-#endif +- +-#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +-# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +-#endif +- +-#ifdef CURL_TYPEOF_CURL_OFF_T +-# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined +-#endif +- +-#ifdef CURL_FORMAT_CURL_OFF_T +-# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined +-#endif +- +-#ifdef CURL_FORMAT_CURL_OFF_TU +-# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined +-#endif +- +-#ifdef CURL_FORMAT_OFF_T +-# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +-#endif +- +-#ifdef CURL_SIZEOF_CURL_OFF_T +-# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +-#endif +- +-#ifdef CURL_SUFFIX_CURL_OFF_T +-# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +-#endif +- +-#ifdef CURL_SUFFIX_CURL_OFF_TU +-# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" +- Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +-#endif +- +-/* ================================================================ */ +-/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ +-/* ================================================================ */ +- +-/* Configure process defines this to 1 when it finds out that system */ +-/* header file ws2tcpip.h must be included by the external interface. */ +-/* #undef CURL_PULL_WS2TCPIP_H */ +-#ifdef CURL_PULL_WS2TCPIP_H +-# ifndef WIN32_LEAN_AND_MEAN +-# define WIN32_LEAN_AND_MEAN +-# endif +-# include +-# include +-# include +-#endif +- +-/* Configure process defines this to 1 when it finds out that system */ +-/* header file sys/types.h must be included by the external interface. */ +-#define CURL_PULL_SYS_TYPES_H 1 +-#ifdef CURL_PULL_SYS_TYPES_H +-# include +-#endif +- +-/* Configure process defines this to 1 when it finds out that system */ +-/* header file stdint.h must be included by the external interface. */ +-/* #undef CURL_PULL_STDINT_H */ +-#ifdef CURL_PULL_STDINT_H +-# include +-#endif +- +-/* Configure process defines this to 1 when it finds out that system */ +-/* header file inttypes.h must be included by the external interface. */ +-/* #undef CURL_PULL_INTTYPES_H */ +-#ifdef CURL_PULL_INTTYPES_H +-# include +-#endif +- +-/* Configure process defines this to 1 when it finds out that system */ +-/* header file sys/socket.h must be included by the external interface. */ +-#define CURL_PULL_SYS_SOCKET_H 1 +-#ifdef CURL_PULL_SYS_SOCKET_H +-# include +-#endif +- +-/* The size of `long', as computed by sizeof. */ +-#if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \ +- defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64) +-#define CURL_SIZEOF_LONG 8 +-#else +-#define CURL_SIZEOF_LONG 4 +-#endif +- +-/* Integral data type used for curl_socklen_t. */ +-#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +- +-/* The size of `curl_socklen_t', as computed by sizeof. */ +-#define CURL_SIZEOF_CURL_SOCKLEN_T 4 +- +-/* Data type definition of curl_socklen_t. */ +-typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; +- +-/* Signed integral data type used for curl_off_t. */ +-#if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \ +- defined(__aarch64__) +-#define CURL_TYPEOF_CURL_OFF_T long +-#else +-#define CURL_TYPEOF_CURL_OFF_T int64_t +-#endif +- +-/* Data type definition of curl_off_t. */ +-typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; +- +-/* curl_off_t formatting string directive without "%" conversion specifier. */ +-#define CURL_FORMAT_CURL_OFF_T "ld" +- +-/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +-#define CURL_FORMAT_CURL_OFF_TU "lu" +- +-/* curl_off_t formatting string directive with "%" conversion specifier. */ +-#define CURL_FORMAT_OFF_T "%ld" +- +-/* The size of `curl_off_t', as computed by sizeof. */ +-#define CURL_SIZEOF_CURL_OFF_T 8 +- +-/* curl_off_t constant suffix. */ +-#define CURL_SUFFIX_CURL_OFF_T L +- +-/* unsigned curl_off_t constant suffix. */ +-#define CURL_SUFFIX_CURL_OFF_TU UL +- +-#endif /* __CURL_CURLBUILD_H */ +diff --git a/src/third_party/curl/curlrules.h b/src/third_party/curl/curlrules.h +deleted file mode 100644 +index abac439..0000000 +--- a/src/third_party/curl/curlrules.h ++++ /dev/null +@@ -1,249 +0,0 @@ +-#ifndef __CURL_CURLRULES_H +-#define __CURL_CURLRULES_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: curlrules.h,v 1.7 2009-10-27 16:56:20 yangtse Exp $ +- ***************************************************************************/ +- +-/* ================================================================ */ +-/* COMPILE TIME SANITY CHECKS */ +-/* ================================================================ */ +- +-/* +- * NOTE 1: +- * ------- +- * +- * All checks done in this file are intentionally placed in a public +- * header file which is pulled by curl/curl.h when an application is +- * being built using an already built libcurl library. Additionally +- * this file is also included and used when building the library. +- * +- * If compilation fails on this file it is certainly sure that the +- * problem is elsewhere. It could be a problem in the curlbuild.h +- * header file, or simply that you are using different compilation +- * settings than those used to build the library. +- * +- * Nothing in this file is intended to be modified or adjusted by the +- * curl library user nor by the curl library builder. +- * +- * Do not deactivate any check, these are done to make sure that the +- * library is properly built and used. +- * +- * You can find further help on the libcurl development mailing list: +- * http://cool.haxx.se/mailman/listinfo/curl-library/ +- * +- * NOTE 2 +- * ------ +- * +- * Some of the following compile time checks are based on the fact +- * that the dimension of a constant array can not be a negative one. +- * In this way if the compile time verification fails, the compilation +- * will fail issuing an error. The error description wording is compiler +- * dependent but it will be quite similar to one of the following: +- * +- * "negative subscript or subscript is too large" +- * "array must have at least one element" +- * "-1 is an illegal array size" +- * "size of array is negative" +- * +- * If you are building an application which tries to use an already +- * built libcurl library and you are getting this kind of errors on +- * this file, it is a clear indication that there is a mismatch between +- * how the library was built and how you are trying to use it for your +- * application. Your already compiled or binary library provider is the +- * only one who can give you the details you need to properly use it. +- */ +- +-/* +- * Verify that some macros are actually defined. +- */ +- +-#ifndef CURL_SIZEOF_LONG +-# error "CURL_SIZEOF_LONG definition is missing!" +- Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing +-#endif +- +-#ifndef CURL_TYPEOF_CURL_SOCKLEN_T +-# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" +- Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing +-#endif +- +-#ifndef CURL_SIZEOF_CURL_SOCKLEN_T +-# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" +- Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing +-#endif +- +-#ifndef CURL_TYPEOF_CURL_OFF_T +-# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" +- Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing +-#endif +- +-#ifndef CURL_FORMAT_CURL_OFF_T +-# error "CURL_FORMAT_CURL_OFF_T definition is missing!" +- Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing +-#endif +- +-#ifndef CURL_FORMAT_CURL_OFF_TU +-# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" +- Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing +-#endif +- +-#ifndef CURL_FORMAT_OFF_T +-# error "CURL_FORMAT_OFF_T definition is missing!" +- Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing +-#endif +- +-#ifndef CURL_SIZEOF_CURL_OFF_T +-# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" +- Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing +-#endif +- +-#ifndef CURL_SUFFIX_CURL_OFF_T +-# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" +- Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing +-#endif +- +-#ifndef CURL_SUFFIX_CURL_OFF_TU +-# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" +- Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing +-#endif +- +-/* +- * Macros private to this header file. +- */ +- +-#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 +- +-#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 +- +-/* +- * Verify that the size previously defined and expected for long +- * is the same as the one reported by sizeof() at compile time. +- */ +- +-typedef char +- __curl_rule_01__ +- [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; +- +-/* +- * Verify that the size previously defined and expected for +- * curl_off_t is actually the the same as the one reported +- * by sizeof() at compile time. +- */ +- +-typedef char +- __curl_rule_02__ +- [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; +- +-/* +- * Verify at compile time that the size of curl_off_t as reported +- * by sizeof() is greater or equal than the one reported for long +- * for the current compilation. +- */ +- +-typedef char +- __curl_rule_03__ +- [CurlchkszGE(curl_off_t, long)]; +- +-/* +- * Verify that the size previously defined and expected for +- * curl_socklen_t is actually the the same as the one reported +- * by sizeof() at compile time. +- */ +- +-typedef char +- __curl_rule_04__ +- [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; +- +-/* +- * Verify at compile time that the size of curl_socklen_t as reported +- * by sizeof() is greater or equal than the one reported for int for +- * the current compilation. +- */ +- +-typedef char +- __curl_rule_05__ +- [CurlchkszGE(curl_socklen_t, int)]; +- +-/* ================================================================ */ +-/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ +-/* ================================================================ */ +- +-/* +- * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow +- * these to be visible and exported by the external libcurl interface API, +- * while also making them visible to the library internals, simply including +- * setup.h, without actually needing to include curl.h internally. +- * If some day this section would grow big enough, all this should be moved +- * to its own header file. +- */ +- +-/* +- * Figure out if we can use the ## preprocessor operator, which is supported +- * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ +- * or __cplusplus so we need to carefully check for them too. +- */ +- +-#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ +- defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ +- defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ +- defined(__ILEC400__) +- /* This compiler is believed to have an ISO compatible preprocessor */ +-#define CURL_ISOCPP +-#else +- /* This compiler is believed NOT to have an ISO compatible preprocessor */ +-#undef CURL_ISOCPP +-#endif +- +-/* +- * Macros for minimum-width signed and unsigned curl_off_t integer constants. +- */ +- +-#ifdef CURL_ISOCPP +-# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix +-#else +-# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix +-#endif +-#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix) +-#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T) +-#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU) +- +-/* +- * Get rid of macros private to this header file. +- */ +- +-#undef CurlchkszEQ +-#undef CurlchkszGE +- +-/* +- * Get rid of macros not intended to exist beyond this point. +- */ +- +-#undef CURL_PULL_WS2TCPIP_H +-#undef CURL_PULL_SYS_TYPES_H +-#undef CURL_PULL_SYS_SOCKET_H +-#undef CURL_PULL_STDINT_H +-#undef CURL_PULL_INTTYPES_H +- +-#undef CURL_TYPEOF_CURL_SOCKLEN_T +-#undef CURL_TYPEOF_CURL_OFF_T +- +-#endif /* __CURL_CURLRULES_H */ +diff --git a/src/third_party/curl/curlver.h b/src/third_party/curl/curlver.h +deleted file mode 100644 +index afa85c1..0000000 +--- a/src/third_party/curl/curlver.h ++++ /dev/null +@@ -1,70 +0,0 @@ +-#ifndef __CURL_CURLVER_H +-#define __CURL_CURLVER_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: curlver.h,v 1.48 2009-08-12 11:24:52 bagder Exp $ +- ***************************************************************************/ +- +-/* This header file contains nothing but libcurl version info, generated by +- a script at release-time. This was made its own header file in 7.11.2 */ +- +-/* This is the global package copyright */ +-#define LIBCURL_COPYRIGHT "1996 - 2009 Daniel Stenberg, ." +- +-/* This is the version number of the libcurl package from which this header +- file origins: */ +-#define LIBCURL_VERSION "7.19.7" +- +-/* The numeric version number is also available "in parts" by using these +- defines: */ +-#define LIBCURL_VERSION_MAJOR 7 +-#define LIBCURL_VERSION_MINOR 19 +-#define LIBCURL_VERSION_PATCH 7 +- +-/* This is the numeric version of the libcurl version number, meant for easier +- parsing and comparions by programs. The LIBCURL_VERSION_NUM define will +- always follow this syntax: +- +- 0xXXYYZZ +- +- Where XX, YY and ZZ are the main version, release and patch numbers in +- hexadecimal (using 8 bits each). All three numbers are always represented +- using two digits. 1.2 would appear as "0x010200" while version 9.11.7 +- appears as "0x090b07". +- +- This 6-digit (24 bits) hexadecimal number does not show pre-release number, +- and it is always a greater number in a more recent release. It makes +- comparisons with greater than and less than work. +-*/ +-#define LIBCURL_VERSION_NUM 0x071307 +- +-/* +- * This is the date and time when the full source package was created. The +- * timestamp is not stored in CVS, as the timestamp is properly set in the +- * tarballs by the maketgz script. +- * +- * The format of the date should follow this template: +- * +- * "Mon Feb 12 11:35:33 UTC 2007" +- */ +-#define LIBCURL_TIMESTAMP "Wed Nov 4 12:34:59 UTC 2009" +- +-#endif /* __CURL_CURLVER_H */ +diff --git a/src/third_party/curl/easy.h b/src/third_party/curl/easy.h +deleted file mode 100644 +index 40449c3..0000000 +--- a/src/third_party/curl/easy.h ++++ /dev/null +@@ -1,103 +0,0 @@ +-#ifndef __CURL_EASY_H +-#define __CURL_EASY_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: easy.h,v 1.14 2008-05-12 21:43:28 bagder Exp $ +- ***************************************************************************/ +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-CURL_EXTERN CURL *curl_easy_init(void); +-CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); +-CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); +-CURL_EXTERN void curl_easy_cleanup(CURL *curl); +- +-/* +- * NAME curl_easy_getinfo() +- * +- * DESCRIPTION +- * +- * Request internal information from the curl session with this function. The +- * third argument MUST be a pointer to a long, a pointer to a char * or a +- * pointer to a double (as the documentation describes elsewhere). The data +- * pointed to will be filled in accordingly and can be relied upon only if the +- * function returns CURLE_OK. This function is intended to get used *AFTER* a +- * performed transfer, all results from this function are undefined until the +- * transfer is completed. +- */ +-CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); +- +- +-/* +- * NAME curl_easy_duphandle() +- * +- * DESCRIPTION +- * +- * Creates a new curl session handle with the same options set for the handle +- * passed in. Duplicating a handle could only be a matter of cloning data and +- * options, internal state info and things like persistant connections cannot +- * be transfered. It is useful in multithreaded applications when you can run +- * curl_easy_duphandle() for each new thread to avoid a series of identical +- * curl_easy_setopt() invokes in every thread. +- */ +-CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); +- +-/* +- * NAME curl_easy_reset() +- * +- * DESCRIPTION +- * +- * Re-initializes a CURL handle to the default values. This puts back the +- * handle to the same state as it was in when it was just created. +- * +- * It does keep: live connections, the Session ID cache, the DNS cache and the +- * cookies. +- */ +-CURL_EXTERN void curl_easy_reset(CURL *curl); +- +-/* +- * NAME curl_easy_recv() +- * +- * DESCRIPTION +- * +- * Receives data from the connected socket. Use after successful +- * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. +- */ +-CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, +- size_t *n); +- +-/* +- * NAME curl_easy_send() +- * +- * DESCRIPTION +- * +- * Sends data over the connected socket. Use after successful +- * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. +- */ +-CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, +- size_t buflen, size_t *n); +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif +diff --git a/src/third_party/curl/mprintf.h b/src/third_party/curl/mprintf.h +deleted file mode 100644 +index d7202de..0000000 +--- a/src/third_party/curl/mprintf.h ++++ /dev/null +@@ -1,82 +0,0 @@ +-#ifndef __CURL_MPRINTF_H +-#define __CURL_MPRINTF_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: mprintf.h,v 1.16 2008-05-20 10:21:50 patrickm Exp $ +- ***************************************************************************/ +- +-#include +-#include /* needed for FILE */ +- +-#include "curl.h" +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-CURL_EXTERN int curl_mprintf(const char *format, ...); +-CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); +-CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); +-CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, +- const char *format, ...); +-CURL_EXTERN int curl_mvprintf(const char *format, va_list args); +-CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); +-CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); +-CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, +- const char *format, va_list args); +-CURL_EXTERN char *curl_maprintf(const char *format, ...); +-CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); +- +-#ifdef _MPRINTF_REPLACE +-# undef printf +-# undef fprintf +-# undef sprintf +-# undef vsprintf +-# undef snprintf +-# undef vprintf +-# undef vfprintf +-# undef vsnprintf +-# undef aprintf +-# undef vaprintf +-# define printf curl_mprintf +-# define fprintf curl_mfprintf +-#ifdef CURLDEBUG +-/* When built with CURLDEBUG we define away the sprintf() functions since we +- don't want internal code to be using them */ +-# define sprintf sprintf_was_used +-# define vsprintf vsprintf_was_used +-#else +-# define sprintf curl_msprintf +-# define vsprintf curl_mvsprintf +-#endif +-# define snprintf curl_msnprintf +-# define vprintf curl_mvprintf +-# define vfprintf curl_mvfprintf +-# define vsnprintf curl_mvsnprintf +-# define aprintf curl_maprintf +-# define vaprintf curl_mvaprintf +-#endif +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* __CURL_MPRINTF_H */ +diff --git a/src/third_party/curl/multi.h b/src/third_party/curl/multi.h +deleted file mode 100644 +index 153f772..0000000 +--- a/src/third_party/curl/multi.h ++++ /dev/null +@@ -1,346 +0,0 @@ +-#ifndef __CURL_MULTI_H +-#define __CURL_MULTI_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: multi.h,v 1.45 2008-05-20 10:21:50 patrickm Exp $ +- ***************************************************************************/ +-/* +- This is an "external" header file. Don't give away any internals here! +- +- GOALS +- +- o Enable a "pull" interface. The application that uses libcurl decides where +- and when to ask libcurl to get/send data. +- +- o Enable multiple simultaneous transfers in the same thread without making it +- complicated for the application. +- +- o Enable the application to select() on its own file descriptors and curl's +- file descriptors simultaneous easily. +- +-*/ +- +-/* +- * This header file should not really need to include "curl.h" since curl.h +- * itself includes this file and we expect user applications to do #include +- * without the need for especially including multi.h. +- * +- * For some reason we added this include here at one point, and rather than to +- * break existing (wrongly written) libcurl applications, we leave it as-is +- * but with this warning attached. +- */ +-#include "curl.h" +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-typedef void CURLM; +- +-typedef enum { +- CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or +- curl_multi_socket*() soon */ +- CURLM_OK, +- CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ +- CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ +- CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ +- CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ +- CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ +- CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ +- CURLM_LAST +-} CURLMcode; +- +-/* just to make code nicer when using curl_multi_socket() you can now check +- for CURLM_CALL_MULTI_SOCKET too in the same style it works for +- curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ +-#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM +- +-typedef enum { +- CURLMSG_NONE, /* first, not used */ +- CURLMSG_DONE, /* This easy handle has completed. 'result' contains +- the CURLcode of the transfer */ +- CURLMSG_LAST /* last, not used */ +-} CURLMSG; +- +-struct CURLMsg { +- CURLMSG msg; /* what this message means */ +- CURL *easy_handle; /* the handle it concerns */ +- union { +- void *whatever; /* message-specific data */ +- CURLcode result; /* return code for transfer */ +- } data; +-}; +-typedef struct CURLMsg CURLMsg; +- +-/* +- * Name: curl_multi_init() +- * +- * Desc: inititalize multi-style curl usage +- * +- * Returns: a new CURLM handle to use in all 'curl_multi' functions. +- */ +-CURL_EXTERN CURLM *curl_multi_init(void); +- +-/* +- * Name: curl_multi_add_handle() +- * +- * Desc: add a standard curl handle to the multi stack +- * +- * Returns: CURLMcode type, general multi error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, +- CURL *curl_handle); +- +- /* +- * Name: curl_multi_remove_handle() +- * +- * Desc: removes a curl handle from the multi stack again +- * +- * Returns: CURLMcode type, general multi error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, +- CURL *curl_handle); +- +- /* +- * Name: curl_multi_fdset() +- * +- * Desc: Ask curl for its fd_set sets. The app can use these to select() or +- * poll() on. We want curl_multi_perform() called as soon as one of +- * them are ready. +- * +- * Returns: CURLMcode type, general multi error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, +- fd_set *read_fd_set, +- fd_set *write_fd_set, +- fd_set *exc_fd_set, +- int *max_fd); +- +- /* +- * Name: curl_multi_perform() +- * +- * Desc: When the app thinks there's data available for curl it calls this +- * function to read/write whatever there is right now. This returns +- * as soon as the reads and writes are done. This function does not +- * require that there actually is data available for reading or that +- * data can be written, it can be called just in case. It returns +- * the number of handles that still transfer data in the second +- * argument's integer-pointer. +- * +- * Returns: CURLMcode type, general multi error code. *NOTE* that this only +- * returns errors etc regarding the whole multi stack. There might +- * still have occurred problems on invidual transfers even when this +- * returns OK. +- */ +-CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, +- int *running_handles); +- +- /* +- * Name: curl_multi_cleanup() +- * +- * Desc: Cleans up and removes a whole multi stack. It does not free or +- * touch any individual easy handles in any way. We need to define +- * in what state those handles will be if this function is called +- * in the middle of a transfer. +- * +- * Returns: CURLMcode type, general multi error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); +- +-/* +- * Name: curl_multi_info_read() +- * +- * Desc: Ask the multi handle if there's any messages/informationals from +- * the individual transfers. Messages include informationals such as +- * error code from the transfer or just the fact that a transfer is +- * completed. More details on these should be written down as well. +- * +- * Repeated calls to this function will return a new struct each +- * time, until a special "end of msgs" struct is returned as a signal +- * that there is no more to get at this point. +- * +- * The data the returned pointer points to will not survive calling +- * curl_multi_cleanup(). +- * +- * The 'CURLMsg' struct is meant to be very simple and only contain +- * very basic informations. If more involved information is wanted, +- * we will provide the particular "transfer handle" in that struct +- * and that should/could/would be used in subsequent +- * curl_easy_getinfo() calls (or similar). The point being that we +- * must never expose complex structs to applications, as then we'll +- * undoubtably get backwards compatibility problems in the future. +- * +- * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out +- * of structs. It also writes the number of messages left in the +- * queue (after this read) in the integer the second argument points +- * to. +- */ +-CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, +- int *msgs_in_queue); +- +-/* +- * Name: curl_multi_strerror() +- * +- * Desc: The curl_multi_strerror function may be used to turn a CURLMcode +- * value into the equivalent human readable error string. This is +- * useful for printing meaningful error messages. +- * +- * Returns: A pointer to a zero-terminated error message. +- */ +-CURL_EXTERN const char *curl_multi_strerror(CURLMcode); +- +-/* +- * Name: curl_multi_socket() and +- * curl_multi_socket_all() +- * +- * Desc: An alternative version of curl_multi_perform() that allows the +- * application to pass in one of the file descriptors that have been +- * detected to have "action" on them and let libcurl perform. +- * See man page for details. +- */ +-#define CURL_POLL_NONE 0 +-#define CURL_POLL_IN 1 +-#define CURL_POLL_OUT 2 +-#define CURL_POLL_INOUT 3 +-#define CURL_POLL_REMOVE 4 +- +-#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD +- +-#define CURL_CSELECT_IN 0x01 +-#define CURL_CSELECT_OUT 0x02 +-#define CURL_CSELECT_ERR 0x04 +- +-typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ +- curl_socket_t s, /* socket */ +- int what, /* see above */ +- void *userp, /* private callback +- pointer */ +- void *socketp); /* private socket +- pointer */ +-/* +- * Name: curl_multi_timer_callback +- * +- * Desc: Called by libcurl whenever the library detects a change in the +- * maximum number of milliseconds the app is allowed to wait before +- * curl_multi_socket() or curl_multi_perform() must be called +- * (to allow libcurl's timed events to take place). +- * +- * Returns: The callback should return zero. +- */ +-typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ +- long timeout_ms, /* see above */ +- void *userp); /* private callback +- pointer */ +- +-CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, +- int *running_handles); +- +-CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, +- curl_socket_t s, +- int ev_bitmask, +- int *running_handles); +- +-CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, +- int *running_handles); +- +-#ifndef CURL_ALLOW_OLD_MULTI_SOCKET +-/* This macro below was added in 7.16.3 to push users who recompile to use +- the new curl_multi_socket_action() instead of the old curl_multi_socket() +-*/ +-#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) +-#endif +- +-/* +- * Name: curl_multi_timeout() +- * +- * Desc: Returns the maximum number of milliseconds the app is allowed to +- * wait before curl_multi_socket() or curl_multi_perform() must be +- * called (to allow libcurl's timed events to take place). +- * +- * Returns: CURLM error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, +- long *milliseconds); +- +-#undef CINIT /* re-using the same name as in curl.h */ +- +-#ifdef CURL_ISOCPP +-#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num +-#else +-/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +-#define LONG CURLOPTTYPE_LONG +-#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +-#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +-#define OFF_T CURLOPTTYPE_OFF_T +-#define CINIT(name,type,number) CURLMOPT_/**/name = type + number +-#endif +- +-typedef enum { +- /* This is the socket callback function pointer */ +- CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), +- +- /* This is the argument passed to the socket callback */ +- CINIT(SOCKETDATA, OBJECTPOINT, 2), +- +- /* set to 1 to enable pipelining for this multi handle */ +- CINIT(PIPELINING, LONG, 3), +- +- /* This is the timer callback function pointer */ +- CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), +- +- /* This is the argument passed to the timer callback */ +- CINIT(TIMERDATA, OBJECTPOINT, 5), +- +- /* maximum number of entries in the connection cache */ +- CINIT(MAXCONNECTS, LONG, 6), +- +- CURLMOPT_LASTENTRY /* the last unused */ +-} CURLMoption; +- +- +-/* +- * Name: curl_multi_setopt() +- * +- * Desc: Sets options for the multi handle. +- * +- * Returns: CURLM error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, +- CURLMoption option, ...); +- +- +-/* +- * Name: curl_multi_assign() +- * +- * Desc: This function sets an association in the multi handle between the +- * given socket and a private pointer of the application. This is +- * (only) useful for curl_multi_socket uses. +- * +- * Returns: CURLM error code. +- */ +-CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, +- curl_socket_t sockfd, void *sockp); +- +-#ifdef __cplusplus +-} /* end of extern "C" */ +-#endif +- +-#endif +diff --git a/src/third_party/curl/stdcheaders.h b/src/third_party/curl/stdcheaders.h +deleted file mode 100644 +index f739d7f..0000000 +--- a/src/third_party/curl/stdcheaders.h ++++ /dev/null +@@ -1,34 +0,0 @@ +-#ifndef __STDC_HEADERS_H +-#define __STDC_HEADERS_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: stdcheaders.h,v 1.9 2009-05-18 12:25:45 yangtse Exp $ +- ***************************************************************************/ +- +-#include +- +-size_t fread (void *, size_t, size_t, FILE *); +-size_t fwrite (const void *, size_t, size_t, FILE *); +- +-int strcasecmp(const char *, const char *); +-int strncasecmp(const char *, const char *, size_t); +- +-#endif +diff --git a/src/third_party/curl/typecheck-gcc.h b/src/third_party/curl/typecheck-gcc.h +deleted file mode 100644 +index 9788305..0000000 +--- a/src/third_party/curl/typecheck-gcc.h ++++ /dev/null +@@ -1,551 +0,0 @@ +-#ifndef __CURL_TYPECHECK_GCC_H +-#define __CURL_TYPECHECK_GCC_H +-/*************************************************************************** +- * _ _ ____ _ +- * Project ___| | | | _ \| | +- * / __| | | | |_) | | +- * | (__| |_| | _ <| |___ +- * \___|\___/|_| \_\_____| +- * +- * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. +- * +- * This software is licensed as described in the file COPYING, which +- * you should have received as part of this distribution. The terms +- * are also available at http://curl.haxx.se/docs/copyright.html. +- * +- * You may opt to use, copy, modify, merge, publish, distribute and/or sell +- * copies of the Software, and permit persons to whom the Software is +- * furnished to do so, under the terms of the COPYING file. +- * +- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +- * KIND, either express or implied. +- * +- * $Id: typecheck-gcc.h,v 1.9 2009-01-25 23:26:31 bagder Exp $ +- ***************************************************************************/ +- +-/* wraps curl_easy_setopt() with typechecking */ +- +-/* To add a new kind of warning, add an +- * if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value)) +- * _curl_easy_setopt_err_sometype(); +- * block and define _curl_is_sometype_option, _curl_is_sometype and +- * _curl_easy_setopt_err_sometype below +- * +- * To add an option that uses the same type as an existing option, you'll just +- * need to extend the appropriate _curl_*_option macro +- */ +-#define curl_easy_setopt(handle, option, value) \ +-__extension__ ({ \ +- __typeof__ (option) _curl_opt = option; \ +- if (__builtin_constant_p(_curl_opt)) { \ +- if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \ +- _curl_easy_setopt_err_long(); \ +- if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \ +- _curl_easy_setopt_err_curl_off_t(); \ +- if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \ +- _curl_easy_setopt_err_string(); \ +- if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \ +- _curl_easy_setopt_err_write_callback(); \ +- if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \ +- _curl_easy_setopt_err_read_cb(); \ +- if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \ +- _curl_easy_setopt_err_ioctl_cb(); \ +- if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\ +- _curl_easy_setopt_err_sockopt_cb(); \ +- if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \ +- !_curl_is_opensocket_cb(value)) \ +- _curl_easy_setopt_err_opensocket_cb(); \ +- if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \ +- !_curl_is_progress_cb(value)) \ +- _curl_easy_setopt_err_progress_cb(); \ +- if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \ +- _curl_easy_setopt_err_debug_cb(); \ +- if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \ +- !_curl_is_ssl_ctx_cb(value)) \ +- _curl_easy_setopt_err_ssl_ctx_cb(); \ +- if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \ +- _curl_easy_setopt_err_conv_cb(); \ +- if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \ +- _curl_easy_setopt_err_seek_cb(); \ +- if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \ +- _curl_easy_setopt_err_cb_data(); \ +- if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \ +- _curl_easy_setopt_err_error_buffer(); \ +- if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \ +- _curl_easy_setopt_err_FILE(); \ +- if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \ +- _curl_easy_setopt_err_postfields(); \ +- if ((_curl_opt) == CURLOPT_HTTPPOST && \ +- !_curl_is_arr((value), struct curl_httppost)) \ +- _curl_easy_setopt_err_curl_httpost(); \ +- if (_curl_is_slist_option(_curl_opt) && \ +- !_curl_is_arr((value), struct curl_slist)) \ +- _curl_easy_setopt_err_curl_slist(); \ +- if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \ +- _curl_easy_setopt_err_CURLSH(); \ +- } \ +- curl_easy_setopt(handle, _curl_opt, value); \ +-}) +- +-/* wraps curl_easy_getinfo() with typechecking */ +-/* FIXME: don't allow const pointers */ +-#define curl_easy_getinfo(handle, info, arg) \ +-__extension__ ({ \ +- __typeof__ (info) _curl_info = info; \ +- if (__builtin_constant_p(_curl_info)) { \ +- if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \ +- _curl_easy_getinfo_err_string(); \ +- if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \ +- _curl_easy_getinfo_err_long(); \ +- if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \ +- _curl_easy_getinfo_err_double(); \ +- if (_curl_is_slist_info(_curl_info) && \ +- !_curl_is_arr((arg), struct curl_slist *)) \ +- _curl_easy_getinfo_err_curl_slist(); \ +- } \ +- curl_easy_getinfo(handle, _curl_info, arg); \ +-}) +- +-/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), +- * for now just make sure that the functions are called with three +- * arguments +- */ +-#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +-#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) +- +- +-/* the actual warnings, triggered by calling the _curl_easy_setopt_err* +- * functions */ +- +-/* To define a new warning, use _CURL_WARNING(identifier, "message") */ +-#define _CURL_WARNING(id, message) \ +- static void __attribute__((warning(message))) __attribute__((unused)) \ +- __attribute__((noinline)) id(void) { __asm__(""); } +- +-_CURL_WARNING(_curl_easy_setopt_err_long, +- "curl_easy_setopt expects a long argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, +- "curl_easy_setopt expects a curl_off_t argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_string, +- "curl_easy_setopt expects a string (char* or char[]) argument for this option" +- ) +-_CURL_WARNING(_curl_easy_setopt_err_write_callback, +- "curl_easy_setopt expects a curl_write_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_read_cb, +- "curl_easy_setopt expects a curl_read_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, +- "curl_easy_setopt expects a curl_ioctl_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, +- "curl_easy_setopt expects a curl_sockopt_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, +- "curl_easy_setopt expects a curl_opensocket_callback argument for this option" +- ) +-_CURL_WARNING(_curl_easy_setopt_err_progress_cb, +- "curl_easy_setopt expects a curl_progress_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_debug_cb, +- "curl_easy_setopt expects a curl_debug_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, +- "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_conv_cb, +- "curl_easy_setopt expects a curl_conv_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_seek_cb, +- "curl_easy_setopt expects a curl_seek_callback argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_cb_data, +- "curl_easy_setopt expects a private data pointer as argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_error_buffer, +- "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_FILE, +- "curl_easy_setopt expects a FILE* argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_postfields, +- "curl_easy_setopt expects a void* or char* argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, +- "curl_easy_setopt expects a struct curl_httppost* argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_curl_slist, +- "curl_easy_setopt expects a struct curl_slist* argument for this option") +-_CURL_WARNING(_curl_easy_setopt_err_CURLSH, +- "curl_easy_setopt expects a CURLSH* argument for this option") +- +-_CURL_WARNING(_curl_easy_getinfo_err_string, +- "curl_easy_getinfo expects a pointer to char * for this info") +-_CURL_WARNING(_curl_easy_getinfo_err_long, +- "curl_easy_getinfo expects a pointer to long for this info") +-_CURL_WARNING(_curl_easy_getinfo_err_double, +- "curl_easy_getinfo expects a pointer to double for this info") +-_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, +- "curl_easy_getinfo expects a pointer to struct curl_slist * for this info") +- +-/* groups of curl_easy_setops options that take the same type of argument */ +- +-/* To add a new option to one of the groups, just add +- * (option) == CURLOPT_SOMETHING +- * to the or-expression. If the option takes a long or curl_off_t, you don't +- * have to do anything +- */ +- +-/* evaluates to true if option takes a long argument */ +-#define _curl_is_long_option(option) \ +- (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) +- +-#define _curl_is_off_t_option(option) \ +- ((option) > CURLOPTTYPE_OFF_T) +- +-/* evaluates to true if option takes a char* argument */ +-#define _curl_is_string_option(option) \ +- ((option) == CURLOPT_URL || \ +- (option) == CURLOPT_PROXY || \ +- (option) == CURLOPT_INTERFACE || \ +- (option) == CURLOPT_NETRC_FILE || \ +- (option) == CURLOPT_USERPWD || \ +- (option) == CURLOPT_USERNAME || \ +- (option) == CURLOPT_PASSWORD || \ +- (option) == CURLOPT_PROXYUSERPWD || \ +- (option) == CURLOPT_PROXYUSERNAME || \ +- (option) == CURLOPT_PROXYPASSWORD || \ +- (option) == CURLOPT_NOPROXY || \ +- (option) == CURLOPT_ENCODING || \ +- (option) == CURLOPT_REFERER || \ +- (option) == CURLOPT_USERAGENT || \ +- (option) == CURLOPT_COOKIE || \ +- (option) == CURLOPT_COOKIEFILE || \ +- (option) == CURLOPT_COOKIEJAR || \ +- (option) == CURLOPT_COOKIELIST || \ +- (option) == CURLOPT_FTPPORT || \ +- (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ +- (option) == CURLOPT_FTP_ACCOUNT || \ +- (option) == CURLOPT_RANGE || \ +- (option) == CURLOPT_CUSTOMREQUEST || \ +- (option) == CURLOPT_SSLCERT || \ +- (option) == CURLOPT_SSLCERTTYPE || \ +- (option) == CURLOPT_SSLKEY || \ +- (option) == CURLOPT_SSLKEYTYPE || \ +- (option) == CURLOPT_KEYPASSWD || \ +- (option) == CURLOPT_SSLENGINE || \ +- (option) == CURLOPT_CAINFO || \ +- (option) == CURLOPT_CAPATH || \ +- (option) == CURLOPT_RANDOM_FILE || \ +- (option) == CURLOPT_EGDSOCKET || \ +- (option) == CURLOPT_SSL_CIPHER_LIST || \ +- (option) == CURLOPT_KRBLEVEL || \ +- (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ +- (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ +- (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ +- (option) == CURLOPT_CRLFILE || \ +- (option) == CURLOPT_ISSUERCERT || \ +- 0) +- +-/* evaluates to true if option takes a curl_write_callback argument */ +-#define _curl_is_write_cb_option(option) \ +- ((option) == CURLOPT_HEADERFUNCTION || \ +- (option) == CURLOPT_WRITEFUNCTION) +- +-/* evaluates to true if option takes a curl_conv_callback argument */ +-#define _curl_is_conv_cb_option(option) \ +- ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ +- (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ +- (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) +- +-/* evaluates to true if option takes a data argument to pass to a callback */ +-#define _curl_is_cb_data_option(option) \ +- ((option) == CURLOPT_WRITEDATA || \ +- (option) == CURLOPT_READDATA || \ +- (option) == CURLOPT_IOCTLDATA || \ +- (option) == CURLOPT_SOCKOPTDATA || \ +- (option) == CURLOPT_OPENSOCKETDATA || \ +- (option) == CURLOPT_PROGRESSDATA || \ +- (option) == CURLOPT_WRITEHEADER || \ +- (option) == CURLOPT_DEBUGDATA || \ +- (option) == CURLOPT_SSL_CTX_DATA || \ +- (option) == CURLOPT_SEEKDATA || \ +- (option) == CURLOPT_PRIVATE || \ +- 0) +- +-/* evaluates to true if option takes a POST data argument (void* or char*) */ +-#define _curl_is_postfields_option(option) \ +- ((option) == CURLOPT_POSTFIELDS || \ +- (option) == CURLOPT_COPYPOSTFIELDS || \ +- 0) +- +-/* evaluates to true if option takes a struct curl_slist * argument */ +-#define _curl_is_slist_option(option) \ +- ((option) == CURLOPT_HTTPHEADER || \ +- (option) == CURLOPT_HTTP200ALIASES || \ +- (option) == CURLOPT_QUOTE || \ +- (option) == CURLOPT_POSTQUOTE || \ +- (option) == CURLOPT_PREQUOTE || \ +- (option) == CURLOPT_TELNETOPTIONS || \ +- 0) +- +-/* groups of curl_easy_getinfo infos that take the same type of argument */ +- +-/* evaluates to true if info expects a pointer to char * argument */ +-#define _curl_is_string_info(info) \ +- (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) +- +-/* evaluates to true if info expects a pointer to long argument */ +-#define _curl_is_long_info(info) \ +- (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) +- +-/* evaluates to true if info expects a pointer to double argument */ +-#define _curl_is_double_info(info) \ +- (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) +- +-/* true if info expects a pointer to struct curl_slist * argument */ +-#define _curl_is_slist_info(info) \ +- (CURLINFO_SLIST < (info)) +- +- +-/* typecheck helpers -- check whether given expression has requested type*/ +- +-/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, +- * otherwise define a new macro. Search for __builtin_types_compatible_p +- * in the GCC manual. +- * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is +- * the actual expression passed to the curl_easy_setopt macro. This +- * means that you can only apply the sizeof and __typeof__ operators, no +- * == or whatsoever. +- */ +- +-/* XXX: should evaluate to true iff expr is a pointer */ +-#define _curl_is_any_ptr(expr) \ +- (sizeof(expr) == sizeof(void*)) +- +-/* evaluates to true if expr is NULL */ +-/* XXX: must not evaluate expr, so this check is not accurate */ +-#define _curl_is_NULL(expr) \ +- (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) +- +-/* evaluates to true if expr is type*, const type* or NULL */ +-#define _curl_is_ptr(expr, type) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), type *) || \ +- __builtin_types_compatible_p(__typeof__(expr), const type *)) +- +-/* evaluates to true if expr is one of type[], type*, NULL or const type* */ +-#define _curl_is_arr(expr, type) \ +- (_curl_is_ptr((expr), type) || \ +- __builtin_types_compatible_p(__typeof__(expr), type [])) +- +-/* evaluates to true if expr is a string */ +-#define _curl_is_string(expr) \ +- (_curl_is_arr((expr), char) || \ +- _curl_is_arr((expr), signed char) || \ +- _curl_is_arr((expr), unsigned char)) +- +-/* evaluates to true if expr is a long (no matter the signedness) +- * XXX: for now, int is also accepted (and therefore short and char, which +- * are promoted to int when passed to a variadic function) */ +-#define _curl_is_long(expr) \ +- (__builtin_types_compatible_p(__typeof__(expr), long) || \ +- __builtin_types_compatible_p(__typeof__(expr), signed long) || \ +- __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ +- __builtin_types_compatible_p(__typeof__(expr), int) || \ +- __builtin_types_compatible_p(__typeof__(expr), signed int) || \ +- __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ +- __builtin_types_compatible_p(__typeof__(expr), short) || \ +- __builtin_types_compatible_p(__typeof__(expr), signed short) || \ +- __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ +- __builtin_types_compatible_p(__typeof__(expr), char) || \ +- __builtin_types_compatible_p(__typeof__(expr), signed char) || \ +- __builtin_types_compatible_p(__typeof__(expr), unsigned char)) +- +-/* evaluates to true if expr is of type curl_off_t */ +-#define _curl_is_off_t(expr) \ +- (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) +- +-/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ +-/* XXX: also check size of an char[] array? */ +-#define _curl_is_error_buffer(expr) \ +- (__builtin_types_compatible_p(__typeof__(expr), char *) || \ +- __builtin_types_compatible_p(__typeof__(expr), char[])) +- +-/* evaluates to true if expr is of type (const) void* or (const) FILE* */ +-#if 0 +-#define _curl_is_cb_data(expr) \ +- (_curl_is_ptr((expr), void) || \ +- _curl_is_ptr((expr), FILE)) +-#else /* be less strict */ +-#define _curl_is_cb_data(expr) \ +- _curl_is_any_ptr(expr) +-#endif +- +-/* evaluates to true if expr is of type FILE* */ +-#define _curl_is_FILE(expr) \ +- (__builtin_types_compatible_p(__typeof__(expr), FILE *)) +- +-/* evaluates to true if expr can be passed as POST data (void* or char*) */ +-#define _curl_is_postfields(expr) \ +- (_curl_is_ptr((expr), void) || \ +- _curl_is_arr((expr), char)) +- +-/* FIXME: the whole callback checking is messy... +- * The idea is to tolerate char vs. void and const vs. not const +- * pointers in arguments at least +- */ +-/* helper: __builtin_types_compatible_p distinguishes between functions and +- * function pointers, hide it */ +-#define _curl_callback_compatible(func, type) \ +- (__builtin_types_compatible_p(__typeof__(func), type) || \ +- __builtin_types_compatible_p(__typeof__(func), type*)) +- +-/* evaluates to true if expr is of type curl_read_callback or "similar" */ +-#define _curl_is_read_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ +- _curl_callback_compatible((expr), _curl_read_callback1) || \ +- _curl_callback_compatible((expr), _curl_read_callback2) || \ +- _curl_callback_compatible((expr), _curl_read_callback3) || \ +- _curl_callback_compatible((expr), _curl_read_callback4) || \ +- _curl_callback_compatible((expr), _curl_read_callback5) || \ +- _curl_callback_compatible((expr), _curl_read_callback6)) +-typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*); +-typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*); +-typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*); +-typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*); +-typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*); +-typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*); +- +-/* evaluates to true if expr is of type curl_write_callback or "similar" */ +-#define _curl_is_write_cb(expr) \ +- (_curl_is_read_cb(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ +- _curl_callback_compatible((expr), _curl_write_callback1) || \ +- _curl_callback_compatible((expr), _curl_write_callback2) || \ +- _curl_callback_compatible((expr), _curl_write_callback3) || \ +- _curl_callback_compatible((expr), _curl_write_callback4) || \ +- _curl_callback_compatible((expr), _curl_write_callback5) || \ +- _curl_callback_compatible((expr), _curl_write_callback6)) +-typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*); +-typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, +- const void*); +-typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*); +-typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*); +-typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, +- const void*); +-typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*); +- +-/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ +-#define _curl_is_ioctl_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ +- _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ +- _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ +- _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ +- _curl_callback_compatible((expr), _curl_ioctl_callback4)) +-typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*); +-typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*); +-typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*); +-typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*); +- +-/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ +-#define _curl_is_sockopt_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ +- _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ +- _curl_callback_compatible((expr), _curl_sockopt_callback2)) +-typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); +-typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, +- curlsocktype); +- +-/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ +-#define _curl_is_opensocket_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ +- _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ +- _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ +- _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ +- _curl_callback_compatible((expr), _curl_opensocket_callback4)) +-typedef curl_socket_t (_curl_opensocket_callback1) +- (void *, curlsocktype, struct curl_sockaddr *); +-typedef curl_socket_t (_curl_opensocket_callback2) +- (void *, curlsocktype, const struct curl_sockaddr *); +-typedef curl_socket_t (_curl_opensocket_callback3) +- (const void *, curlsocktype, struct curl_sockaddr *); +-typedef curl_socket_t (_curl_opensocket_callback4) +- (const void *, curlsocktype, const struct curl_sockaddr *); +- +-/* evaluates to true if expr is of type curl_progress_callback or "similar" */ +-#define _curl_is_progress_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ +- _curl_callback_compatible((expr), _curl_progress_callback1) || \ +- _curl_callback_compatible((expr), _curl_progress_callback2)) +-typedef int (_curl_progress_callback1)(void *, +- double, double, double, double); +-typedef int (_curl_progress_callback2)(const void *, +- double, double, double, double); +- +-/* evaluates to true if expr is of type curl_debug_callback or "similar" */ +-#define _curl_is_debug_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ +- _curl_callback_compatible((expr), _curl_debug_callback1) || \ +- _curl_callback_compatible((expr), _curl_debug_callback2) || \ +- _curl_callback_compatible((expr), _curl_debug_callback3) || \ +- _curl_callback_compatible((expr), _curl_debug_callback4)) +-typedef int (_curl_debug_callback1) (CURL *, +- curl_infotype, char *, size_t, void *); +-typedef int (_curl_debug_callback2) (CURL *, +- curl_infotype, char *, size_t, const void *); +-typedef int (_curl_debug_callback3) (CURL *, +- curl_infotype, const char *, size_t, void *); +-typedef int (_curl_debug_callback4) (CURL *, +- curl_infotype, const char *, size_t, const void *); +- +-/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ +-/* this is getting even messier... */ +-#define _curl_is_ssl_ctx_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ +- _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) +-typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); +-typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); +-typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); +-typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); +-#ifdef HEADER_SSL_H +-/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX +- * this will of course break if we're included before OpenSSL headers... +- */ +-typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); +-typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); +-typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); +-typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); +-#else +-typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; +-typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; +-typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; +-typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; +-#endif +- +-/* evaluates to true if expr is of type curl_conv_callback or "similar" */ +-#define _curl_is_conv_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ +- _curl_callback_compatible((expr), _curl_conv_callback1) || \ +- _curl_callback_compatible((expr), _curl_conv_callback2) || \ +- _curl_callback_compatible((expr), _curl_conv_callback3) || \ +- _curl_callback_compatible((expr), _curl_conv_callback4)) +-typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); +-typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); +-typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); +-typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); +- +-/* evaluates to true if expr is of type curl_seek_callback or "similar" */ +-#define _curl_is_seek_cb(expr) \ +- (_curl_is_NULL(expr) || \ +- __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ +- _curl_callback_compatible((expr), _curl_seek_callback1) || \ +- _curl_callback_compatible((expr), _curl_seek_callback2)) +-typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); +-typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); +- +- +-#endif /* __CURL_TYPECHECK_GCC_H */ +diff --git a/src/third_party/curl/types.h b/src/third_party/curl/types.h +deleted file mode 100644 +index d37d6ae..0000000 +--- a/src/third_party/curl/types.h ++++ /dev/null +@@ -1 +0,0 @@ +-/* not used */ +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0005-Add-support-for-DWARF-in-PECOFF-as-used-by-Cygwin-an.patch b/mingw-w64-breakpad-svn/0005-Add-support-for-DWARF-in-PECOFF-as-used-by-Cygwin-an.patch new file mode 100644 index 0000000000..435723ef21 --- /dev/null +++ b/mingw-w64-breakpad-svn/0005-Add-support-for-DWARF-in-PECOFF-as-used-by-Cygwin-an.patch @@ -0,0 +1,2195 @@ +From cac6e48f7c280b1c269136568168ffcad2cf304d Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Tue, 4 Feb 2014 00:57:13 +0000 +Subject: [PATCH 05/24] Add support for DWARF in PECOFF as used by Cygwin and + MinGW + +For cygwin and mingw targets, build a dump_syms tool which can read DWARF +symbols contained in a PE/COFF executable. + +I felt bad about making another copy of dump_symbols.cc, so this one has the +beginnings of being parameterized by an image file reader class, so we can apply +it to a pecoff-format image file reading class + +Write pecoff format image file reading class which +- knows how to read PE32 and PE32+ image files +- makes PECOFF file id by fetching from a CV record or by hashing +- can read PECOFF exports as a fallback if there is no DWARF information + +v2: +Don't include arpa/inet.h on MinGW + +v3: +Use AM_CPPFLAGS for NO_STABS_SUPPORT + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 29 + + configure.ac | 5 + + src/common/pecoff/dump_symbols-inl.h | 706 +++++++++++++++++++++++++ + src/common/pecoff/dump_symbols.cc | 90 ++++ + src/common/pecoff/dump_symbols.h | 80 +++ + src/common/pecoff/pecoff.h | 262 +++++++++ + src/common/pecoff/pecoff_file_id.cc | 83 +++ + src/common/pecoff/pecoff_file_id.h | 52 ++ + src/common/pecoff/pecoffutils.cc | 490 +++++++++++++++++ + src/common/pecoff/pecoffutils.h | 167 ++++++ + src/tools/windows/dump_syms_dwarf/dump_syms.cc | 88 +++ + 11 files changed, 2052 insertions(+) + create mode 100644 src/common/pecoff/dump_symbols-inl.h + create mode 100644 src/common/pecoff/dump_symbols.cc + create mode 100644 src/common/pecoff/dump_symbols.h + create mode 100644 src/common/pecoff/pecoff.h + create mode 100644 src/common/pecoff/pecoff_file_id.cc + create mode 100644 src/common/pecoff/pecoff_file_id.h + create mode 100644 src/common/pecoff/pecoffutils.cc + create mode 100644 src/common/pecoff/pecoffutils.h + create mode 100644 src/tools/windows/dump_syms_dwarf/dump_syms.cc + +diff --git a/Makefile.am b/Makefile.am +index 6246c9c..c802304 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -61,6 +61,11 @@ AM_CFLAGS += -fPIC + AM_CXXFLAGS += -fPIC + endif + ++if WINDOWS_HOST ++# don't have stab.h, don't build stabs support ++AM_CPPFLAGS += -DNO_STABS_SUPPORT ++endif ++ + # Specify include paths for ac macros + ACLOCAL_AMFLAGS = -I m4 + +@@ -321,6 +326,12 @@ bin_PROGRAMS += \ + endif + endif LINUX_HOST + ++if WINDOWS_HOST ++if !DISABLE_TOOLS ++bin_PROGRAMS += \ ++ src/tools/windows/dump_syms_dwarf/dump_syms ++endif ++endif + + ## Tests + if !DISABLE_PROCESSOR +@@ -613,6 +624,24 @@ src_tools_linux_md2core_minidump_2_core_unittest_LDADD = \ + + endif LINUX_HOST + ++if WINDOWS_HOST ++if !DISABLE_TOOLS ++src_tools_windows_dump_syms_dwarf_dump_syms_SOURCES = \ ++ src/common/dwarf_cfi_to_module.cc \ ++ src/common/dwarf_cu_to_module.cc \ ++ src/common/dwarf_line_to_module.cc \ ++ src/common/language.cc \ ++ src/common/module.cc \ ++ src/common/dwarf/bytereader.cc \ ++ src/common/dwarf/dwarf2diehandler.cc \ ++ src/common/dwarf/dwarf2reader.cc \ ++ src/common/pecoff/dump_symbols.cc \ ++ src/common/pecoff/pecoffutils.cc \ ++ src/common/pecoff/pecoff_file_id.cc \ ++ src/tools/windows/dump_syms_dwarf/dump_syms.cc ++endif ++endif ++ + if !DISABLE_PROCESSOR + src_processor_address_map_unittest_SOURCES = \ + src/processor/address_map_unittest.cc +diff --git a/configure.ac b/configure.ac +index 8c02f51..aeccf19 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,8 +80,13 @@ case $host in + *-*-linux* | *-android* ) + LINUX_HOST=true + ;; ++ *-*-cygwin* ) ++ WINDOWS_HOST=true ++ ;; + esac ++ + AM_CONDITIONAL(LINUX_HOST, test x$LINUX_HOST = xtrue) ++AM_CONDITIONAL(WINDOWS_HOST, test x$WINDOWS_HOST = xtrue) + + # Only use Android support headers when compiling for Android + case $host in +diff --git a/src/common/pecoff/dump_symbols-inl.h b/src/common/pecoff/dump_symbols-inl.h +new file mode 100644 +index 0000000..6ec2059 +--- /dev/null ++++ b/src/common/pecoff/dump_symbols-inl.h +@@ -0,0 +1,706 @@ ++// Copyright (c) 2011 Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// dump_symbols-inl.h: implement google_breakpad::WriteSymbolFile: ++// Find all the debugging info in a file and dump it as a Breakpad symbol file. ++ ++#ifndef COMMON_PECOFF_DUMP_SYMBOLS_INL_H ++#define COMMON_PECOFF_DUMP_SYMBOLS_INL_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "common/dwarf/bytereader-inl.h" ++#include "common/dwarf/dwarf2diehandler.h" ++#include "common/dwarf_cfi_to_module.h" ++#include "common/dwarf_cu_to_module.h" ++#include "common/dwarf_line_to_module.h" ++#include "common/module.h" ++#include "common/scoped_ptr.h" ++#ifndef NO_STABS_SUPPORT ++#include "common/stabs_reader.h" ++#include "common/stabs_to_module.h" ++#endif ++#include "common/using_std_string.h" ++ ++// This namespace contains helper functions. ++namespace { ++ ++using google_breakpad::DumpOptions; ++using google_breakpad::DwarfCFIToModule; ++using google_breakpad::DwarfCUToModule; ++using google_breakpad::DwarfLineToModule; ++using google_breakpad::Module; ++#ifndef NO_STABS_SUPPORT ++using google_breakpad::StabsToModule; ++#endif ++using google_breakpad::scoped_ptr; ++ ++// ++// FDWrapper ++// ++// Wrapper class to make sure opened file is closed. ++// ++class FDWrapper { ++ public: ++ explicit FDWrapper(int fd) : ++ fd_(fd) {} ++ ~FDWrapper() { ++ if (fd_ != -1) ++ close(fd_); ++ } ++ int get() { ++ return fd_; ++ } ++ int release() { ++ int fd = fd_; ++ fd_ = -1; ++ return fd; ++ } ++ private: ++ int fd_; ++}; ++ ++// ++// MmapWrapper ++// ++// Wrapper class to make sure mapped regions are unmapped. ++// ++class MmapWrapper { ++ public: ++ MmapWrapper() : is_set_(false) {} ++ ~MmapWrapper() { ++ if (is_set_ && base_ != NULL) { ++ assert(size_ > 0); ++ munmap(base_, size_); ++ } ++ } ++ void set(void *mapped_address, size_t mapped_size) { ++ is_set_ = true; ++ base_ = mapped_address; ++ size_ = mapped_size; ++ } ++ void release() { ++ assert(is_set_); ++ is_set_ = false; ++ base_ = NULL; ++ size_ = 0; ++ } ++ ++ private: ++ bool is_set_; ++ void *base_; ++ size_t size_; ++}; ++ ++#ifndef NO_STABS_SUPPORT ++template ++bool LoadStabs(const typename ObjectFileReader::ObjectFileBase header, ++ const typename ObjectFileReader::Section stab_section, ++ const typename ObjectFileReader::Section stabstr_section, ++ const bool big_endian, ++ Module* module) { ++ // A callback object to handle data from the STABS reader. ++ StabsToModule handler(module); ++ // Find the addresses of the STABS data, and create a STABS reader object. ++ // On Linux, STABS entries always have 32-bit values, regardless of the ++ // address size of the architecture whose code they're describing, and ++ // the strings are always "unitized". ++ const uint8_t* stabs = ObjectFileReader::GetSectionPointer(header, ++ stab_section); ++ const uint8_t* stabstr = ObjectFileReader::GetSectionPointer(header, ++ stabstr_section); ++ google_breakpad::StabsReader reader(stabs, ++ ObjectFileReader::GetSectionSize(header, stab_section), ++ stabstr, ++ ObjectFileReader::GetSectionSize(header, stabstr_section), ++ big_endian, 4, true, &handler); ++ // Read the STABS data, and do post-processing. ++ if (!reader.Process()) ++ return false; ++ handler.Finalize(); ++ return true; ++} ++#endif // NO_STABS_SUPPORT ++ ++// A line-to-module loader that accepts line number info parsed by ++// dwarf2reader::LineInfo and populates a Module and a line vector ++// with the results. ++class DumperLineToModule: public DwarfCUToModule::LineToModuleHandler { ++ public: ++ // Create a line-to-module converter using BYTE_READER. ++ explicit DumperLineToModule(dwarf2reader::ByteReader *byte_reader) ++ : byte_reader_(byte_reader) { } ++ void StartCompilationUnit(const string& compilation_dir) { ++ compilation_dir_ = compilation_dir; ++ } ++ void ReadProgram(const char *program, uint64 length, ++ Module *module, std::vector *lines) { ++ DwarfLineToModule handler(module, compilation_dir_, lines); ++ dwarf2reader::LineInfo parser(program, length, byte_reader_, &handler); ++ parser.Start(); ++ } ++ private: ++ string compilation_dir_; ++ dwarf2reader::ByteReader *byte_reader_; ++}; ++ ++template ++bool LoadDwarf(const string& dwarf_filename, ++ const typename ObjectFileReader::ObjectFileBase header, ++ const bool big_endian, ++ bool handle_inter_cu_refs, ++ Module* module) { ++ typedef typename ObjectFileReader::Section Shdr; ++ ++ const dwarf2reader::Endianness endianness = big_endian ? ++ dwarf2reader::ENDIANNESS_BIG : dwarf2reader::ENDIANNESS_LITTLE; ++ dwarf2reader::ByteReader byte_reader(endianness); ++ ++ // Construct a context for this file. ++ DwarfCUToModule::FileContext file_context(dwarf_filename, ++ module, ++ handle_inter_cu_refs); ++ ++ // Build a map of the file's sections. ++ int num_sections = ObjectFileReader::GetNumberOfSections(header); ++ for (int i = 0; i < num_sections; ++i) { ++ const Shdr section = ObjectFileReader::FindSectionByIndex(header, i); ++ string name = ObjectFileReader::GetSectionName(header, section); ++ const char* contents = reinterpret_cast(ObjectFileReader::GetSectionPointer(header, section)); ++ file_context.AddSectionToSectionMap(name, contents, ++ ObjectFileReader::GetSectionSize(header, section)); ++ } ++ ++ // Parse all the compilation units in the .debug_info section. ++ DumperLineToModule line_to_module(&byte_reader); ++ dwarf2reader::SectionMap::const_iterator debug_info_entry = ++ file_context.section_map().find(".debug_info"); ++ assert(debug_info_entry != file_context.section_map().end()); ++ const std::pair& debug_info_section = ++ debug_info_entry->second; ++ // This should never have been called if the file doesn't have a ++ // .debug_info section. ++ assert(debug_info_section.first); ++ uint64 debug_info_length = debug_info_section.second; ++ for (uint64 offset = 0; offset < debug_info_length;) { ++ // Make a handler for the root DIE that populates MODULE with the ++ // data that was found. ++ DwarfCUToModule::WarningReporter reporter(dwarf_filename, offset); ++ DwarfCUToModule root_handler(&file_context, &line_to_module, &reporter); ++ // Make a Dwarf2Handler that drives the DIEHandler. ++ dwarf2reader::DIEDispatcher die_dispatcher(&root_handler); ++ // Make a DWARF parser for the compilation unit at OFFSET. ++ dwarf2reader::CompilationUnit reader(file_context.section_map(), ++ offset, ++ &byte_reader, ++ &die_dispatcher); ++ // Process the entire compilation unit; get the offset of the next. ++ offset += reader.Start(); ++ } ++ return true; ++} ++ ++// Fill REGISTER_NAMES with the register names appropriate to the ++// machine architecture, indexed by the register ++// numbers used in DWARF call frame information. Return true on ++// success, or false if HEADER's machine architecture is not ++// supported. ++bool DwarfCFIRegisterNames(const char *architecture, ++ std::vector* register_names) { ++ if (strcmp(architecture, "x86" ) == 0) ++ *register_names = DwarfCFIToModule::RegisterNames::I386(); ++ else if (strcmp(architecture, "arm" ) == 0) ++ *register_names = DwarfCFIToModule::RegisterNames::ARM(); ++ else if (strcmp(architecture, "mips" ) == 0) ++ *register_names = DwarfCFIToModule::RegisterNames::MIPS(); ++ else if (strcmp(architecture, "x86_64" ) == 0) ++ *register_names = DwarfCFIToModule::RegisterNames::X86_64(); ++ else ++ return false; ++ ++ return true; ++} ++ ++template ++bool LoadDwarfCFI(const string& dwarf_filename, ++ const typename ObjectFileReader::ObjectFileBase header, ++ const char* section_name, ++ const typename ObjectFileReader::Section section, ++ const bool eh_frame, ++ const typename ObjectFileReader::Section got_section, ++ const typename ObjectFileReader::Section text_section, ++ const bool big_endian, ++ Module* module) { ++ // Find the appropriate set of register names for this file's ++ // architecture. ++ const char *architecture = ObjectFileReader::Architecture(header); ++ std::vector register_names; ++ if (!DwarfCFIRegisterNames(architecture, ®ister_names)) { ++ return false; ++ } ++ ++ const dwarf2reader::Endianness endianness = big_endian ? ++ dwarf2reader::ENDIANNESS_BIG : dwarf2reader::ENDIANNESS_LITTLE; ++ ++ // Find the call frame information and its size. ++ const char* cfi = reinterpret_cast(ObjectFileReader::GetSectionPointer(header, section)); ++ size_t cfi_size = ObjectFileReader::GetSectionSize(header, section); ++ ++ // Plug together the parser, handler, and their entourages. ++ DwarfCFIToModule::Reporter module_reporter(dwarf_filename, section_name); ++ DwarfCFIToModule handler(module, register_names, &module_reporter); ++ dwarf2reader::ByteReader byte_reader(endianness); ++ ++ byte_reader.SetAddressSize(ObjectFileReader::kAddrSize); ++ ++ // Provide the base addresses for .eh_frame encoded pointers, if ++ // possible. ++ byte_reader.SetCFIDataBase(ObjectFileReader::GetSectionRVA(header, section) + ++ ObjectFileReader::GetLoadingAddress(header), ++ cfi); ++ if (got_section) ++ byte_reader.SetDataBase(ObjectFileReader::GetSectionRVA(header, got_section) + ++ ObjectFileReader::GetLoadingAddress(header)); ++ if (text_section) ++ byte_reader.SetTextBase(ObjectFileReader::GetSectionRVA(header, text_section) + ++ ObjectFileReader::GetLoadingAddress(header)); ++ ++ dwarf2reader::CallFrameInfo::Reporter dwarf_reporter(dwarf_filename, ++ section_name); ++ dwarf2reader::CallFrameInfo parser(cfi, cfi_size, ++ &byte_reader, &handler, &dwarf_reporter, ++ eh_frame); ++ parser.Start(); ++ return true; ++} ++ ++bool LoadFile(const string& obj_file, MmapWrapper* map_wrapper, ++ const void** header) { ++ int obj_fd = open(obj_file.c_str(), O_RDONLY); ++ if (obj_fd < 0) { ++ fprintf(stderr, "Failed to open file '%s': %s\n", ++ obj_file.c_str(), strerror(errno)); ++ return false; ++ } ++ FDWrapper obj_fd_wrapper(obj_fd); ++ struct stat st; ++ if (fstat(obj_fd, &st) != 0 && st.st_size <= 0) { ++ fprintf(stderr, "Unable to fstat file '%s': %s\n", ++ obj_file.c_str(), strerror(errno)); ++ return false; ++ } ++ void *obj_base = mmap(NULL, st.st_size, ++ PROT_READ | PROT_WRITE, MAP_PRIVATE, obj_fd, 0); ++ if (obj_base == MAP_FAILED) { ++ fprintf(stderr, "Failed to mmap file '%s': %s\n", ++ obj_file.c_str(), strerror(errno)); ++ return false; ++ } ++ map_wrapper->set(obj_base, st.st_size); ++ *header = obj_base; ++ return true; ++} ++ ++// Read the .gnu_debuglink and get the debug file name. If anything goes ++// wrong, return an empty string. ++template ++string ReadDebugLink(const char* debuglink, ++ size_t debuglink_size, ++ const string& obj_file, ++ const std::vector& debug_dirs) { ++ size_t debuglink_len = strlen(debuglink) + 5; // '\0' + CRC32. ++ debuglink_len = 4 * ((debuglink_len + 3) / 4); // Round to nearest 4 bytes. ++ ++ // Sanity check. ++ if (debuglink_len != debuglink_size) { ++ fprintf(stderr, "Mismatched .gnu_debuglink string / section size: " ++ "%zx %zx\n", debuglink_len, debuglink_size); ++ return ""; ++ } ++ ++ bool found = false; ++ int debuglink_fd = -1; ++ string debuglink_path; ++ std::vector::const_iterator it; ++ for (it = debug_dirs.begin(); it < debug_dirs.end(); ++it) { ++ const string& debug_dir = *it; ++ debuglink_path = debug_dir + "/" + debuglink; ++ debuglink_fd = open(debuglink_path.c_str(), O_RDONLY); ++ if (debuglink_fd >= 0) { ++ found = true; ++ break; ++ } ++ } ++ ++ if (!found) { ++ fprintf(stderr, "Failed to find debug file for '%s' after trying:\n", ++ obj_file.c_str()); ++ for (it = debug_dirs.begin(); it < debug_dirs.end(); ++it) { ++ const string debug_dir = *it; ++ fprintf(stderr, " %s/%s\n", debug_dir.c_str(), debuglink); ++ } ++ return ""; ++ } ++ ++ FDWrapper debuglink_fd_wrapper(debuglink_fd); ++ // TODO(thestig) check the CRC-32 at the end of the .gnu_debuglink ++ // section. ++ ++ return debuglink_path; ++} ++ ++// ++// LoadSymbolsInfo ++// ++// Holds the state between the two calls to LoadSymbols() in case it's necessary ++// to follow the .gnu_debuglink section and load debug information from a ++// different file. ++// ++template ++class LoadSymbolsInfo { ++ public: ++ typedef typename ObjectFileReader::Addr Addr; ++ ++ explicit LoadSymbolsInfo(const std::vector& dbg_dirs) : ++ debug_dirs_(dbg_dirs), ++ has_loading_addr_(false) {} ++ ++ // Keeps track of which sections have been loaded so sections don't ++ // accidentally get loaded twice from two different files. ++ void LoadedSection(const string §ion) { ++ if (loaded_sections_.count(section) == 0) { ++ loaded_sections_.insert(section); ++ } else { ++ fprintf(stderr, "Section %s has already been loaded.\n", ++ section.c_str()); ++ } ++ } ++ ++ // The file and linked debug file are expected to have the same preferred ++ // loading address. ++ void set_loading_addr(Addr addr, const string &filename) { ++ if (!has_loading_addr_) { ++ loading_addr_ = addr; ++ loaded_file_ = filename; ++ return; ++ } ++ ++ if (addr != loading_addr_) { ++ fprintf(stderr, ++ "file '%s' and debug file '%s' " ++ "have different load addresses.\n", ++ loaded_file_.c_str(), filename.c_str()); ++ assert(false); ++ } ++ } ++ ++ // Setters and getters ++ const std::vector& debug_dirs() const { ++ return debug_dirs_; ++ } ++ ++ string debuglink_file() const { ++ return debuglink_file_; ++ } ++ void set_debuglink_file(string file) { ++ debuglink_file_ = file; ++ } ++ ++ private: ++ const std::vector& debug_dirs_; // Directories in which to ++ // search for the debug file. ++ ++ string debuglink_file_; // Full path to the debug file. ++ ++ bool has_loading_addr_; // Indicate if LOADING_ADDR_ is valid. ++ ++ Addr loading_addr_; // Saves the preferred loading address from the ++ // first call to LoadSymbols(). ++ ++ string loaded_file_; // Name of the file loaded from the first call to ++ // LoadSymbols(). ++ ++ std::set loaded_sections_; // Tracks the Loaded sections ++ // between calls to LoadSymbols(). ++}; ++ ++template ++bool LoadSymbols(const string& obj_file, ++ const bool big_endian, ++ const typename ObjectFileReader::ObjectFileBase header, ++ const bool read_gnu_debug_link, ++ LoadSymbolsInfo* info, ++ const DumpOptions& options, ++ Module* module) { ++ typedef typename ObjectFileReader::Addr Addr; ++ typedef typename ObjectFileReader::Section Shdr; ++ ++ Addr loading_addr = ObjectFileReader::GetLoadingAddress(header); ++ module->SetLoadAddress(loading_addr); ++ info->set_loading_addr(loading_addr, obj_file); ++ ++ bool found_debug_info_section = false; ++ bool found_usable_info = false; ++ ++ if (options.symbol_data != ONLY_CFI) { ++#ifndef NO_STABS_SUPPORT ++ // Look for STABS debugging information, and load it if present. ++ const Shdr stab_section = ++ ObjectFileReader::FindSectionByName(".stab", header); ++ if (stab_section) { ++ const Shdr stabstr_section = ObjectFileReader::FindLinkedSection(header, stab_section); ++ if (stabstr_section) { ++ found_debug_info_section = true; ++ found_usable_info = true; ++ info->LoadedSection(".stab"); ++ if (!LoadStabs(header, stab_section, stabstr_section, ++ big_endian, module)) { ++ fprintf(stderr, "%s: \".stab\" section found, but failed to load" ++ " STABS debugging information\n", obj_file.c_str()); ++ } ++ } ++ } ++#endif // NO_STABS_SUPPORT ++ ++ // Look for DWARF debugging information, and load it if present. ++ const Shdr dwarf_section = ++ ObjectFileReader::FindSectionByName(".debug_info", header); ++ if (dwarf_section) { ++ found_debug_info_section = true; ++ found_usable_info = true; ++ info->LoadedSection(".debug_info"); ++ if (!LoadDwarf(obj_file, header, big_endian, ++ options.handle_inter_cu_refs, module)) { ++ fprintf(stderr, "%s: \".debug_info\" section found, but failed to load " ++ "DWARF debugging information\n", obj_file.c_str()); ++ } ++ } ++ } ++ ++ if (options.symbol_data != NO_CFI) { ++ // Dwarf Call Frame Information (CFI) is actually independent from ++ // the other DWARF debugging information, and can be used alone. ++ const Shdr dwarf_cfi_section = ++ ObjectFileReader::FindSectionByName(".debug_frame", header); ++ if (dwarf_cfi_section) { ++ // Ignore the return value of this function; even without call frame ++ // information, the other debugging information could be perfectly ++ // useful. ++ info->LoadedSection(".debug_frame"); ++ bool result = ++ LoadDwarfCFI(obj_file, header, ".debug_frame", ++ dwarf_cfi_section, false, 0, 0, big_endian, ++ module); ++ found_usable_info = found_usable_info || result; ++ } ++ ++ // Linux C++ exception handling information can also provide ++ // unwinding data. ++ const Shdr eh_frame_section = ++ ObjectFileReader::FindSectionByName(".eh_frame", header); ++ if (eh_frame_section) { ++ // Pointers in .eh_frame data may be relative to the base addresses of ++ // certain sections. Provide those sections if present. ++ const Shdr got_section = ++ ObjectFileReader::FindSectionByName(".got", header); ++ const Shdr text_section = ++ ObjectFileReader::FindSectionByName(".text", header); ++ info->LoadedSection(".eh_frame"); ++ // As above, ignore the return value of this function. ++ bool result = ++ LoadDwarfCFI(obj_file, header, ".eh_frame", ++ eh_frame_section, true, ++ got_section, text_section, big_endian, module); ++ found_usable_info = found_usable_info || result; ++ } ++ } ++ ++ if (!found_debug_info_section) { ++ fprintf(stderr, "%s: file contains no debugging information" ++ " (no \".stab\" or \".debug_info\" sections)\n", ++ obj_file.c_str()); ++ ++ // Failed, but maybe there's a .gnu_debuglink section? ++ if (read_gnu_debug_link) { ++ const Shdr gnu_debuglink_section ++ = ObjectFileReader::FindSectionByName(".gnu_debuglink", header); ++ if (gnu_debuglink_section) { ++ if (!info->debug_dirs().empty()) { ++ const char* debuglink_contents = reinterpret_cast ++ (ObjectFileReader::GetSectionPointer(header, gnu_debuglink_section)); ++ string debuglink_file ++ = ReadDebugLink(debuglink_contents, ++ ObjectFileReader::GetSectionSize(header, gnu_debuglink_section), ++ obj_file, info->debug_dirs()); ++ info->set_debuglink_file(debuglink_file); ++ } else { ++ fprintf(stderr, ".gnu_debuglink section found in '%s', " ++ "but no debug path specified.\n", obj_file.c_str()); ++ } ++ } else { ++ fprintf(stderr, "%s does not contain a .gnu_debuglink section.\n", ++ obj_file.c_str()); ++ } ++ } else { ++ if (options.symbol_data != ONLY_CFI) { ++ // The caller doesn't want to consult .gnu_debuglink. ++ // See if there are export symbols available. ++ bool result = ObjectFileReader::ExportedSymbolsToModule(header, module); ++ found_usable_info = found_usable_info || result; ++ } ++ ++ // Return true if some usable information was found, since ++ // the caller doesn't want to use .gnu_debuglink. ++ return found_usable_info; ++ } ++ ++ // No debug info was found, let the user try again with .gnu_debuglink ++ // if present. ++ return false; ++ } ++ ++ return true; ++} ++ ++// Return the non-directory portion of FILENAME: the portion after the ++// last slash, or the whole filename if there are no slashes. ++string BaseFileName(const string &filename) { ++ // Lots of copies! basename's behavior is less than ideal. ++ char *c_filename = strdup(filename.c_str()); ++ string base = basename(c_filename); ++ free(c_filename); ++ return base; ++} ++ ++template ++bool ReadSymbolDataFromObjectFile( ++ const typename ObjectFileReader::ObjectFileBase header, ++ const string& obj_filename, ++ const std::vector& debug_dirs, ++ const DumpOptions& options, ++ Module** out_module) { ++ ++ typedef typename ObjectFileReader::Section Shdr; ++ ++ *out_module = NULL; ++ ++ string identifier = ObjectFileReader::FileIdentifierFromMappedFile(header); ++ if (identifier.empty()) { ++ fprintf(stderr, "%s: unable to generate file identifier\n", ++ obj_filename.c_str()); ++ return false; ++ } ++ ++ const char *architecture = ObjectFileReader::Architecture(header); ++ if (!architecture) { ++ return false; ++ } ++ ++ // Figure out what endianness this file is. ++ bool big_endian; ++ if (!ObjectFileReader::Endianness(header, &big_endian)) ++ return false; ++ ++ string name = BaseFileName(obj_filename); ++ string os = "windows"; ++ string id = identifier; ++ ++ LoadSymbolsInfo info(debug_dirs); ++ scoped_ptr module(new Module(name, os, architecture, id)); ++ if (!LoadSymbols(obj_filename, big_endian, header, ++ !debug_dirs.empty(), &info, ++ options, module.get())) { ++ const string debuglink_file = info.debuglink_file(); ++ if (debuglink_file.empty()) ++ return false; ++ ++ // Load debuglink file. ++ fprintf(stderr, "Found debugging info in %s\n", debuglink_file.c_str()); ++ MmapWrapper debug_map_wrapper; ++ typename ObjectFileReader::ObjectFileBase debug_header = NULL; ++ if (!LoadFile(debuglink_file, &debug_map_wrapper, ++ reinterpret_cast(&debug_header))) ++ return false; ++ ++ if (!ObjectFileReader::IsValid(debug_header)) { ++ fprintf(stderr, "Not a valid file: %s\n", debuglink_file.c_str()); ++ return false; ++ } ++ ++ // Sanity checks to make sure everything matches up. ++ const char *debug_architecture = ++ ObjectFileReader::Architecture(debug_header); ++ if (!debug_architecture) { ++ return false; ++ } ++ if (strcmp(architecture, debug_architecture)) { ++ fprintf(stderr, "%s with machine architecture %s does not match " ++ "%s with architecture %s\n", ++ debuglink_file.c_str(), debug_architecture, ++ obj_filename.c_str(), architecture); ++ return false; ++ } ++ ++ bool debug_big_endian; ++ if (!ObjectFileReader::Endianness(debug_header, &debug_big_endian)) ++ return false; ++ if (debug_big_endian != big_endian) { ++ fprintf(stderr, "%s and %s does not match in endianness\n", ++ obj_filename.c_str(), debuglink_file.c_str()); ++ return false; ++ } ++ ++ if (!LoadSymbols(debuglink_file, debug_big_endian, ++ debug_header, false, &info, ++ options, module.get())) { ++ return false; ++ } ++ } ++ ++ *out_module = module.release(); ++ return true; ++} ++ ++} // namespace ++ ++#endif // COMMON_PECOFF_DUMP_SYMBOLS_INL_H +diff --git a/src/common/pecoff/dump_symbols.cc b/src/common/pecoff/dump_symbols.cc +new file mode 100644 +index 0000000..47be940 +--- /dev/null ++++ b/src/common/pecoff/dump_symbols.cc +@@ -0,0 +1,90 @@ ++// Copyright (c) 2011 Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++#include "common/pecoff/dump_symbols.h" ++ ++#include "common/pecoff/pecoffutils.h" ++#include "common/pecoff/dump_symbols-inl.h" ++ ++namespace google_breakpad { ++ ++// Not explicitly exported, but not static so it can be used in unit tests. ++bool ReadSymbolDataInternal(const uint8_t* obj_file, ++ const string& obj_filename, ++ const std::vector& debug_dirs, ++ const DumpOptions& options, ++ Module** module) { ++ if (!IsValidPeCoff(obj_file)) { ++ fprintf(stderr, "Not a valid PE/COFF file: %s\n", obj_filename.c_str()); ++ return false; ++ } ++ ++ int peclass = PeCoffClass(obj_file); ++ if (peclass == PE32) { ++ return ReadSymbolDataFromObjectFile( ++ reinterpret_cast(obj_file), obj_filename, debug_dirs, ++ options, module); ++ } ++ if (peclass == PE32PLUS) { ++ return ReadSymbolDataFromObjectFile( ++ reinterpret_cast(obj_file), obj_filename, debug_dirs, ++ options, module); ++ } ++ ++ return false; ++} ++ ++bool WriteSymbolFile(const string &obj_file, ++ const std::vector& debug_dirs, ++ const DumpOptions& options, ++ std::ostream &sym_stream) { ++ Module* module; ++ if (!ReadSymbolData(obj_file, debug_dirs, options, &module)) ++ return false; ++ ++ bool result = module->Write(sym_stream, options.symbol_data); ++ delete module; ++ return result; ++} ++ ++bool ReadSymbolData(const string& obj_file, ++ const std::vector& debug_dirs, ++ const DumpOptions& options, ++ Module** module) { ++ MmapWrapper map_wrapper; ++ const void* pe_header = NULL; ++ ++ if (!LoadFile(obj_file, &map_wrapper, &pe_header)) ++ return false; ++ ++ return ReadSymbolDataInternal(reinterpret_cast(pe_header), ++ obj_file, debug_dirs, options, module); ++} ++ ++} // namespace google_breakpad +diff --git a/src/common/pecoff/dump_symbols.h b/src/common/pecoff/dump_symbols.h +new file mode 100644 +index 0000000..675a489 +--- /dev/null ++++ b/src/common/pecoff/dump_symbols.h +@@ -0,0 +1,80 @@ ++// -*- mode: c++ -*- ++ ++// Copyright (c) 2011, Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// dump_symbols.h: Read debugging information from a PECOFF file, and write ++// it out as a Breakpad symbol file. ++ ++#ifndef COMMON_PECOFF_DUMP_SYMBOLS_H__ ++#define COMMON_PECOFF_DUMP_SYMBOLS_H__ ++ ++#include ++#include ++#include ++ ++#include "common/symbol_data.h" ++#include "common/using_std_string.h" ++ ++namespace google_breakpad { ++ ++class Module; ++ ++struct DumpOptions { ++ DumpOptions(SymbolData symbol_data, bool handle_inter_cu_refs) ++ : symbol_data(symbol_data), ++ handle_inter_cu_refs(handle_inter_cu_refs) { ++ } ++ ++ SymbolData symbol_data; ++ bool handle_inter_cu_refs; ++}; ++ ++// Find all the debugging information in OBJ_FILE, an PECOFF executable ++// or shared library, and write it to SYM_STREAM in the Breakpad symbol ++// file format. ++// If OBJ_FILE has been stripped but contains a .gnu_debuglink section, ++// then look for the debug file in DEBUG_DIRS. ++// SYMBOL_DATA allows limiting the type of symbol data written. ++bool WriteSymbolFile(const string &obj_file, ++ const std::vector& debug_dirs, ++ const DumpOptions& options, ++ std::ostream &sym_stream); ++ ++// As above, but simply return the debugging information in MODULE ++// instead of writing it to a stream. The caller owns the resulting ++// Module object and must delete it when finished. ++bool ReadSymbolData(const string& obj_file, ++ const std::vector& debug_dirs, ++ const DumpOptions& options, ++ Module** module); ++ ++} // namespace google_breakpad ++ ++#endif // COMMON_PECOFF_DUMP_SYMBOLS_H__ +diff --git a/src/common/pecoff/pecoff.h b/src/common/pecoff/pecoff.h +new file mode 100644 +index 0000000..9ac32ef +--- /dev/null ++++ b/src/common/pecoff/pecoff.h +@@ -0,0 +1,262 @@ ++// Copyright (c) 2014 Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// pecoff.h: PECOFF file format ++// ++ ++#ifndef COMMON_PECOFF_PECOFF_H__ ++#define COMMON_PECOFF_PECOFF_H__ ++ ++#include ++ ++#define IMAGE_FILE_HEADER_OFFSET 0x3c ++ ++#define IMAGE_FILE_MAGIC 0x00004550 // "PE\0\0" ++ ++#define IMAGE_FILE_MACHINE_UNKNOWN 0x0000 ++#define IMAGE_FILE_MACHINE_ALPHA 0x0184 ++#define IMAGE_FILE_MACHINE_ALPHA64 0x0284 ++#define IMAGE_FILE_MACHINE_AM33 0x01d3 ++#define IMAGE_FILE_MACHINE_AMD64 0x8664 ++#define IMAGE_FILE_MACHINE_ARM 0x01c0 ++#define IMAGE_FILE_MACHINE_ARMV7 0x01c4 ++#define IMAGE_FILE_MACHINE_CEE 0xc0ee ++#define IMAGE_FILE_MACHINE_CEF 0x0cef ++#define IMAGE_FILE_MACHINE_EBC 0x0ebc ++#define IMAGE_FILE_MACHINE_I386 0x014c ++#define IMAGE_FILE_MACHINE_IA64 0x0200 ++#define IMAGE_FILE_MACHINE_M32R 0x9041 ++#define IMAGE_FILE_MACHINE_M68K 0x0268 ++#define IMAGE_FILE_MACHINE_MIPS16 0x0266 ++#define IMAGE_FILE_MACHINE_MIPSFPU 0x0366 ++#define IMAGE_FILE_MACHINE_MIPSFPU16 0x0466 ++#define IMAGE_FILE_MACHINE_POWERPC 0x01f0 ++#define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1 ++#define IMAGE_FILE_MACHINE_R10000 0x0168 ++#define IMAGE_FILE_MACHINE_R3000 0x0162 ++#define IMAGE_FILE_MACHINE_R4000 0x0166 ++#define IMAGE_FILE_MACHINE_SH3 0x01a2 ++#define IMAGE_FILE_MACHINE_SH3DSP 0x01a3 ++#define IMAGE_FILE_MACHINE_SH3E 0x01a4 ++#define IMAGE_FILE_MACHINE_SH4 0x01a6 ++#define IMAGE_FILE_MACHINE_SH5 0x01a8 ++#define IMAGE_FILE_MACHINE_THUMB 0x01c2 ++#define IMAGE_FILE_MACHINE_TRICORE 0x0520 ++#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169 ++#define IMAGE_FILE_MACHINE_AMD64 0x8664 ++ ++struct PeHeader { ++ uint32_t mMagic; // IMAGE_FILE_MAGIC ++ uint16_t mMachine; // IMAGE_FILE_MACHINE_* values ++ uint16_t mNumberOfSections; ++ uint32_t mTimeDateStamp; ++ uint32_t mPointerToSymbolTable; ++ uint32_t mNumberOfSymbols; ++ uint16_t mSizeOfOptionalHeader; ++ uint16_t mCharacteristics; ++}; ++ ++enum PeMagic { ++ PE32 = 0x010b, // 32 bit ++ PE32PLUS = 0x020b, // 64 bit address space, 2GB image size limit ++}; ++ ++struct PeDataDirectory { ++ uint32_t mVirtualAddress; ++ uint32_t mSize; ++}; ++ ++struct Pe32OptionalHeader { ++ uint16_t mMagic; // PeMagic ++ uint8_t mMajorLinkerVersion; ++ uint8_t mMinorLinkerVersion; ++ uint32_t mSizeOfCode; ++ uint32_t mSizeOfInitializedData; ++ uint32_t mSizeOfUninitializedData; ++ uint32_t mAddressOfEntryPoint; ++ uint32_t mBaseOfCode; ++ uint32_t mBaseOfData; ++ uint32_t mImageBase; ++ uint32_t mSectionAlignment; ++ uint32_t mFileAlignment; ++ uint16_t mMajorOperatingSystemVersion; ++ uint16_t mMinorOperatingSystemVersion; ++ uint16_t mMajorImageVersion; ++ uint16_t mMinorImageVersion; ++ uint16_t mMajorSubsystemVersion; ++ uint16_t mMinorSubsystemVersion; ++ uint32_t mWin32VersionValue; ++ uint32_t mSizeOfImage; ++ uint32_t mSizeOfHeaders; ++ uint32_t mCheckSum; ++ uint16_t mSubsystem; ++ uint16_t mDllCharacteristics; ++ uint32_t mSizeOfStackReserve; ++ uint32_t mSizeOfStackCommit; ++ uint32_t mSizeOfHeapReserve; ++ uint32_t mSizeOfHeapCommit; ++ uint32_t mLoaderFlags; ++ uint32_t mNumberOfRvaAndSizes; ++ PeDataDirectory mDataDirectory[0]; ++}; ++ ++struct Pe32PlusOptionalHeader { ++ uint16_t mMagic; // PeMagic ++ uint8_t mMajorLinkerVersion; ++ uint8_t mMinorLinkerVersion; ++ uint32_t mSizeOfCode; ++ uint32_t mSizeOfInitializedData; ++ uint32_t mSizeOfUninitializedData; ++ uint32_t mAddressOfEntryPoint; ++ uint32_t mBaseOfCode; ++ uint64_t mImageBase; ++ uint32_t mSectionAlignment; ++ uint32_t mFileAlignment; ++ uint16_t mMajorOperatingSystemVersion; ++ uint16_t mMinorOperatingSystemVersion; ++ uint16_t mMajorImageVersion; ++ uint16_t mMinorImageVersion; ++ uint16_t mMajorSubsystemVersion; ++ uint16_t mMinorSubsystemVersion; ++ uint32_t mWin32VersionValue; ++ uint32_t mSizeOfImage; ++ uint32_t mSizeOfHeaders; ++ uint32_t mCheckSum; ++ uint16_t mSubsystem; ++ uint16_t mDllCharacteristics; ++ uint64_t mSizeOfStackReserve; ++ uint64_t mSizeOfStackCommit; ++ uint64_t mSizeOfHeapReserve; ++ uint64_t mSizeOfHeapCommit; ++ uint32_t mLoaderFlags; ++ uint32_t mNumberOfRvaAndSizes; ++ PeDataDirectory mDataDirectory[0]; ++}; ++ ++#define PE_EXPORT_TABLE 0 ++#define PE_IMPORT_TABLE 1 ++#define PE_RESOURCE_TABLE 2 ++#define PE_EXCEPTION_TABLE 3 ++#define PE_CERTIFICATE_TABLE 4 ++#define PE_BASE_RELOCATION_TABLE 5 ++#define PE_DEBUG_DATA 6 ++#define PE_ARCHITECTURE 7 ++#define PE_GLOBAL_PTR 8 ++#define PE_TLS_TABLE 9 ++#define PE_LOAD_CONFIG_TABLE 10 ++#define PE_BOUND_IMPORT_TABLE 11 ++#define PE_IMPORT_ADDRESS_TABLE 12 ++#define PE_DELAY_IMPORT_DESCRIPTOR 13 ++#define PE_CLR_RUNTIME_HEADER 14 ++ ++struct PeDebugDirectory { ++ uint32_t mCharacteristics; ++ uint32_t mTimeDateStamp; ++ uint16_t mMajorVersion; ++ uint16_t mMinorVersion; ++ uint32_t mType; ++ uint32_t mSizeOfData; ++ uint32_t mAddressOfRawData; ++ uint32_t mPointerToRawData; ++}; ++ ++#define IMAGE_DEBUG_TYPE_UNKNOWN 0 ++#define IMAGE_DEBUG_TYPE_COFF 1 ++#define IMAGE_DEBUG_TYPE_CODEVIEW 2 ++#define IMAGE_DEBUG_TYPE_FPO 3 ++#define IMAGE_DEBUG_TYPE_MISC 4 ++#define IMAGE_DEBUG_TYPE_EXCEPTION 5 ++#define IMAGE_DEBUG_TYPE_FIXUP 6 ++#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7 ++#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8 ++#define IMAGE_DEBUG_TYPE_BORLAND 9 ++#define IMAGE_DEBUG_TYPE_RESERVED10 10 ++#define IMAGE_DEBUG_TYPE_CLSID 11 ++ ++struct CvInfoPbd70 ++{ ++ uint32_t mCvSignature; ++ uint8_t mSignature[16]; ++ uint32_t mAge; ++ uint8_t mPdbFileName[]; ++}; ++ ++#define CODEVIEW_PDB70_CVSIGNATURE 0x53445352 // "RSDS" ++#define CODEVIEW_PDB20_CVSIGNATURE 0x3031424e // "NB10" ++#define CODEVIEW_CV50_CVSIGNATURE 0x3131424e // "NB11" ++#define CODEVIEW_CV41_CVSIGNATURE 0x3930424e // “NB09" ++ ++struct PeSectionHeader { ++ char mName[8]; ++ union { ++ uint32_t mPhysicalAddress; ++ uint32_t mVirtualSize; ++ } ; ++ uint32_t mVirtualAddress; ++ uint32_t mSizeOfRawData; ++ uint32_t mPointerToRawData; ++ uint32_t mPointerToRelocations; ++ uint32_t mPointerToLinenumbers; ++ uint16_t mNumberOfRelocations; ++ uint16_t mNumberOfLinenumbers; ++ uint32_t mCharacteristics; ++}; ++ ++struct __attribute__ ((__packed__)) PeSymbol ++{ ++ union { ++ char mName[8]; // Symbol Name ++ struct { ++ uint32_t mFirst4Bytes; ++ uint32_t mSecond4Bytes; ++ }; ++ }; ++ ++ uint32_t mValue; // Value of Symbol ++ uint16_t mScNum; // Section Number ++ uint16_t mType; // Symbol Type ++ uint8_t mSClass; // Storage Class ++ uint8_t mNumAux; // Auxiliary Count ++}; ++ ++struct PeExportTable { ++ uint32_t mFlags; ++ uint32_t mTimeDateStamp; ++ uint16_t mMajorVersion; ++ uint16_t mMinorVErsion; ++ uint32_t mNameRVA; ++ uint32_t mOrdinalBase; ++ uint32_t mAddressTableEntries; ++ uint32_t mNumberofNamePointers; ++ uint32_t mExportAddressTableRVA; ++ uint32_t mNamePointerRVA; ++ uint32_t mOrdinalTableRVA; ++}; ++ ++#endif// COMMON_PECOFF_PECOFF_H__ +diff --git a/src/common/pecoff/pecoff_file_id.cc b/src/common/pecoff/pecoff_file_id.cc +new file mode 100644 +index 0000000..47c2763 +--- /dev/null ++++ b/src/common/pecoff/pecoff_file_id.cc +@@ -0,0 +1,83 @@ ++// Copyright (c) 2006, Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++// ++// pecoff_file_id.cc: Return a unique identifier for a file ++// ++ ++#include "common/pecoff/pecoff_file_id.h" ++ ++#include "common/pecoff/pecoffutils.h" ++ ++namespace google_breakpad { ++ ++// Attempt to locate a CodeView build-id section in a PECOFF binary ++// and copy as many bytes of it as will fit into |identifier|. ++static bool FindPeCoffBuildID(const uint8_t* mapped_base, ++ uint8_t identifier[kMDGUIDSize], ++ uint32_t *age) { ++ int peclass = PeCoffClass(mapped_base); ++ if (peclass == PE32) ++ return PeCoffClass32::GetBuildID(mapped_base, identifier, age); ++ if (peclass == PE32PLUS) ++ return PeCoffClass64::GetBuildID(mapped_base, identifier, age); ++ ++ return false; ++} ++ ++// Attempt to locate the .text section of a binary and generate ++// a simple hash by XORing the first page worth of bytes into |identifier|. ++static bool HashPeCoffTextSection(const uint8_t* mapped_base, ++ uint8_t identifier[kMDGUIDSize]) { ++ int peclass = PeCoffClass(mapped_base); ++ if (peclass == PE32) ++ return PeCoffClass32::HashTextSection(mapped_base, identifier); ++ if (peclass == PE32PLUS) ++ return PeCoffClass64::HashTextSection(mapped_base, identifier); ++ ++ return false; ++} ++ ++bool PeCoffFileID::PeCoffFileIdentifierFromMappedFile(const void* base, ++ uint8_t identifier[kMDGUIDSize], ++ uint32_t *age) { ++ *age = 0; ++ ++ // Look for a build id first. ++ if (FindPeCoffBuildID(reinterpret_cast(base), identifier, ++ age)) ++ return true; ++ ++ // Fall back on hashing the first page of the text section. ++ // (This is of questionable value as the Windows Minidump writer doesn't have ++ // this feature) ++ return HashPeCoffTextSection(reinterpret_cast(base), ++ identifier); ++} ++ ++} // namespace google_breakpad +diff --git a/src/common/pecoff/pecoff_file_id.h b/src/common/pecoff/pecoff_file_id.h +new file mode 100644 +index 0000000..fd2ea10 +--- /dev/null ++++ b/src/common/pecoff/pecoff_file_id.h +@@ -0,0 +1,52 @@ ++// Copyright (c) 2006, Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++// ++// pecoff_file_id.h: Return a unique identifier for a file ++// ++ ++#ifndef COMMON_PECOFF_PECOFF_FILE_ID_H__ ++#define COMMON_PECOFF_PECOFF_FILE_ID_H__ ++ ++#include ++#include ++ ++namespace google_breakpad { ++ ++static const size_t kMDGUIDSize = 16; ++ ++class PeCoffFileID { ++ public: ++ static bool PeCoffFileIdentifierFromMappedFile(const void* base, ++ uint8_t identifier[kMDGUIDSize], ++ uint32_t* age); ++}; ++ ++} // namespace google_breakpad ++ ++#endif // COMMON_PECOFF_PECOFF_FILE_ID_H__ +diff --git a/src/common/pecoff/pecoffutils.cc b/src/common/pecoff/pecoffutils.cc +new file mode 100644 +index 0000000..158270d +--- /dev/null ++++ b/src/common/pecoff/pecoffutils.cc +@@ -0,0 +1,490 @@ ++// Copyright (c) 2014 Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// pecoffutils.c: Utilities for dealing with PECOFF files ++// ++ ++#include "common/pecoff/pecoffutils.h" ++ ++#include ++#include ++#include ++ ++#ifndef _WIN32 ++#include ++#endif ++ ++namespace google_breakpad { ++ ++bool IsValidPeCoff(const uint8_t* obj_base) { ++ // at offset 0x3c, find the offset to PE signature ++ const uint32_t* peOffsetPtr = reinterpret_cast(obj_base + ++ IMAGE_FILE_HEADER_OFFSET); ++ ++ // TODO: ideally we want to check that the offset is less than the size of the ++ // mapped file, but we don't have that information at the moment ++ // ++ // if (*peOffsetPtr > size) return FALSE; ++ ++ // check PE signature ++ const PeHeader* peHeader = reinterpret_cast(obj_base+*peOffsetPtr); ++ if (peHeader->mMagic != IMAGE_FILE_MAGIC) ++ return false; ++ ++ return true; ++} ++ ++int PeCoffClass(const uint8_t* obj_base) { ++ const uint32_t* peOffsetPtr = reinterpret_cast(obj_base + ++ IMAGE_FILE_HEADER_OFFSET); ++ const PeHeader* peHeader = reinterpret_cast(obj_base+*peOffsetPtr); ++ const uint16_t* peOptionalHeader = reinterpret_cast ++ (reinterpret_cast(peHeader) + sizeof(PeHeader)); ++ ++ // We need to read the magic before we know if this a Pe32OptionalHeader or ++ // Pe32PlusOptionalHeader, so we don't use those types here. ++ return *peOptionalHeader; ++} ++ ++// ++// Header information ++// ++ ++template ++const char* PeCoffObjectFileReader::Architecture( ++ ObjectFileBase obj_base) { ++ const PeHeader* peHeader = GetHeader(obj_base); ++ uint16_t arch = peHeader->mMachine; ++ switch (arch) { ++ case IMAGE_FILE_MACHINE_I386: ++ return "x86"; ++ case IMAGE_FILE_MACHINE_ARM: ++ return "arm"; ++ case IMAGE_FILE_MACHINE_MIPS16: ++ case IMAGE_FILE_MACHINE_MIPSFPU: ++ case IMAGE_FILE_MACHINE_MIPSFPU16: ++ case IMAGE_FILE_MACHINE_WCEMIPSV2: ++ return "mips"; ++ case IMAGE_FILE_MACHINE_POWERPC: ++ case IMAGE_FILE_MACHINE_POWERPCFP: ++ return "ppc"; ++ case IMAGE_FILE_MACHINE_AMD64: ++ return "x86_64"; ++ default: ++ fprintf(stderr, "unrecognized machine architecture: %d\n", ++ peHeader->mMachine); ++ return NULL; ++ } ++} ++ ++template ++bool PeCoffObjectFileReader::Endianness( ++ ObjectFileBase obj_base, ++ bool* big_endian) { ++ // TODO: Not sure what big-endian PECOFF looks like: characteristics flag ++ // IMAGE_FILE_BYTES_REVERSED_HI and/or certain machine types are big-endian ++ *big_endian = false; ++ return true; ++} ++ ++template ++typename PeCoffObjectFileReader::Addr ++PeCoffObjectFileReader::GetLoadingAddress( ++ ObjectFileBase obj_base) { ++ const PeOptionalHeader* peOptionalHeader = GetOptionalHeader(obj_base); ++ return peOptionalHeader->mImageBase; ++} ++ ++// ++// Section enumeration and location ++// ++ ++template ++int PeCoffObjectFileReader::GetNumberOfSections( ++ ObjectFileBase obj_base) { ++ const PeHeader* peHeader = GetHeader(obj_base); ++ return peHeader->mNumberOfSections; ++} ++ ++template ++const typename PeCoffObjectFileReader::Section ++PeCoffObjectFileReader::FindSectionByIndex( ++ ObjectFileBase obj_base, int i) { ++ const PeSectionHeader* section_table = GetSectionTable(obj_base); ++ return reinterpret_cast(&(section_table[i])); ++} ++ ++template ++const typename PeCoffObjectFileReader::Section ++PeCoffObjectFileReader::FindSectionByName( ++ const char* section_name, ObjectFileBase obj_base) { ++ const PeHeader* peHeader = GetHeader(obj_base); ++ const PeSectionHeader* section_table = GetSectionTable(obj_base); ++ const char* string_table = GetStringTable(obj_base); ++ uint32_t string_table_length = *(reinterpret_cast(string_table)); ++ ++ for (int s = 0; s < peHeader->mNumberOfSections; s++) { ++ const char* name = section_table[s].mName; ++ ++ // look up long section names in string table ++ if (name[0] == '/') { ++ unsigned int offset = ::strtoul(section_table[s].mName+1, NULL, 10); ++ ++ if (offset > string_table_length) ++ fprintf(stderr, "section name offset %d exceeds string table length", ++ offset); ++ else ++ name = string_table + offset; ++ } ++ ++ if (::strcmp(section_name, name) == 0) { ++ return reinterpret_cast(&(section_table[s])); ++ } ++ } ++ ++ // nothing found ++ return NULL; ++} ++ ++// ++// Section information ++// ++ ++template ++const uint8_t* ++PeCoffObjectFileReader::GetSectionPointer( ++ ObjectFileBase obj_base, Section section) { ++ return reinterpret_cast(obj_base) + reinterpret_cast(section)->mPointerToRawData; ++} ++ ++template ++typename PeCoffObjectFileReader::Offset ++PeCoffObjectFileReader::GetSectionSize( ++ ObjectFileBase obj_base, Section section) { ++ ++ // There are mSizeOfRawData bytes of data for the section in the mapped image ++ // file. Return mVirtualSize if it's smaller. ++ // This doesn't handle the case where mVirtualSize is larger and the section ++ // should be zero padded, because we have nowhere to do that. ++ if ((reinterpret_cast(section)->mVirtualSize) < ++ (reinterpret_cast(section)->mSizeOfRawData)) ++ return reinterpret_cast(section)->mVirtualSize; ++ ++ return reinterpret_cast(section)->mSizeOfRawData; ++} ++ ++template ++typename PeCoffObjectFileReader::Offset ++PeCoffObjectFileReader::GetSectionRVA( ++ ObjectFileBase obj_base, Section section) { ++ return reinterpret_cast(section)->mVirtualAddress; ++} ++ ++template ++const char* PeCoffObjectFileReader::GetSectionName( ++ ObjectFileBase obj_base,Section section) { ++ const char* string_table = GetStringTable(obj_base); ++ uint32_t string_table_length = *(reinterpret_cast(string_table)); ++ const char* name = reinterpret_cast(section)->mName; ++ ++ // look up long section names in string table ++ if (name[0] == '/') { ++ unsigned int offset = ::strtoul(name+1, NULL, 10); ++ ++ if (offset > string_table_length) ++ fprintf(stderr, "section name offset %d exceeds string table length", ++ offset); ++ else ++ name = string_table + offset; ++ } ++ ++ return name; ++} ++ ++// ++// ++// ++ ++template ++bool PeCoffObjectFileReader::ExportedSymbolsToModule( ++ ObjectFileBase obj_base, Module* module) { ++ // locate the export table, if present ++ const PeDataDirectory* data_directory_export_entry = GetDataDirectoryEntry(obj_base, PE_EXPORT_TABLE); ++ if (data_directory_export_entry && data_directory_export_entry->mSize != 0) { ++ const PeExportTable* export_table = reinterpret_cast(ConvertRVAToPointer(obj_base, data_directory_export_entry->mVirtualAddress)); ++ const uint32_t* eat = reinterpret_cast(ConvertRVAToPointer(obj_base, export_table->mExportAddressTableRVA)); ++ const uint32_t* enpt = reinterpret_cast(ConvertRVAToPointer(obj_base, export_table->mNamePointerRVA)); ++ const uint16_t* eot = reinterpret_cast(ConvertRVAToPointer(obj_base, export_table->mOrdinalTableRVA)); ++ ++ // process the export name pointer table ++ for (uint32_t i = 0; i < export_table->mNumberofNamePointers; i++) { ++ // look up the name for the export ++ uint32_t export_name_rva = enpt[i]; ++ if (export_name_rva == 0) ++ continue; ++ const char* export_name = reinterpret_cast(ConvertRVAToPointer(obj_base, export_name_rva)); ++ ++ // find the corresponding export address table entry ++ uint16_t export_ordinal = eot[i]; ++ if ((export_ordinal < export_table->mOrdinalBase) || ++ (export_ordinal >= (export_table->mOrdinalBase + export_table->mAddressTableEntries))) { ++ fprintf(stderr, "exported ordinal %d out of range for EAT!\n", export_ordinal); ++ continue; ++ } ++ ++ uint32_t eat_index = export_ordinal - export_table->mOrdinalBase; ++ uint32_t export_rva = eat[eat_index]; ++ ++ // if the export's address lies inside the export table, it's a forwarded ++ // export, which we can ignore ++ if ((export_rva >= data_directory_export_entry->mVirtualAddress) && ++ (export_rva < (data_directory_export_entry->mVirtualAddress + data_directory_export_entry->mSize))) ++ continue; ++ ++ Module::Extern* ext = new Module::Extern; ++ ext->name = export_name; ++ ext->address = export_rva + GetLoadingAddress(obj_base); ++ module->AddExtern(ext); ++ } ++ ++ return true; ++ } ++ ++ // report if a COFF symbol table exists, but we don't use it (yet) ++ // According to the PECOFF spec. COFF debugging information is deprecated. ++ // We don't know of any tools which produce that and don't produce DWARF or ++ // MS CodeView debug information. ++ const PeHeader* peHeader = GetHeader(obj_base); ++ if (peHeader->mPointerToSymbolTable) { ++ fprintf(stderr, "COFF debug symbols present but are not implemented\n"); ++ } ++ ++ return false; ++} ++ ++template ++string ++PeCoffObjectFileReader::FileIdentifierFromMappedFile( ++ ObjectFileBase obj_file) { ++ uint8_t identifier[kMDGUIDSize]; ++ uint32_t age; ++ ++ if (!PeCoffFileID::PeCoffFileIdentifierFromMappedFile(obj_file, identifier, &age)) ++ return ""; ++ ++ // Endian-ness swap to match dump processor expectation. ++ uint8_t identifier_swapped[kMDGUIDSize]; ++ memcpy(identifier_swapped, identifier, kMDGUIDSize); ++ uint32_t* data1 = reinterpret_cast(identifier_swapped); ++ *data1 = htonl(*data1); ++ uint16_t* data2 = reinterpret_cast(identifier_swapped + 4); ++ *data2 = htons(*data2); ++ uint16_t* data3 = reinterpret_cast(identifier_swapped + 6); ++ *data3 = htons(*data3); ++ ++ // Format the file identifier in IDENTIFIER as a UUID with the ++ // dashes removed. ++ char identifier_str[40]; ++ int buffer_idx = 0; ++ for (int idx = 0; idx < kMDGUIDSize; ++idx) { ++ int hi = (identifier_swapped[idx] >> 4) & 0x0F; ++ int lo = (identifier_swapped[idx]) & 0x0F; ++ ++ identifier_str[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; ++ identifier_str[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; ++ } ++ identifier_str[buffer_idx] = 0; ++ string id = identifier_str; ++ ++ // Append age ++ char age_string[9]; ++ snprintf(age_string, sizeof(age_string) / sizeof(age_string[0]), "%X", age); ++ id += age_string; ++ ++ return id; ++} ++ ++// ++// Helper functions for PeCoffFileID ++// ++ ++template ++bool PeCoffObjectFileReader::GetBuildID( ++ ObjectFileBase obj_base, ++ uint8_t identifier[kMDGUIDSize], ++ uint32_t* age) { ++ // locate the debug directory, if present ++ const PeDataDirectory* data_directory_debug_entry = GetDataDirectoryEntry(obj_base, PE_DEBUG_DATA); ++ if (!data_directory_debug_entry) ++ return false; ++ ++ uint32_t debug_directory_size = data_directory_debug_entry->mSize; ++ if (debug_directory_size == 0) ++ return false; ++ ++ const PeDebugDirectory* debug_directory = reinterpret_cast(ConvertRVAToPointer(obj_base, data_directory_debug_entry->mVirtualAddress)); ++ if (debug_directory == NULL) { ++ fprintf(stderr, "No section containing the debug directory VMA could be found\n"); ++ return false; ++ } ++ ++ // search the debug directory for a codeview entry ++ for (int i = 0; i < debug_directory_size/sizeof(PeDebugDirectory); i++) { ++ if (debug_directory[i].mType == IMAGE_DEBUG_TYPE_CODEVIEW) { ++ // interpret the codeview record to get build-id ++ const CvInfoPbd70* codeview_record = reinterpret_cast ++ (obj_base + debug_directory[i].mPointerToRawData); ++ if ((codeview_record->mCvSignature) == CODEVIEW_PDB70_CVSIGNATURE) { ++ memcpy(identifier, codeview_record->mSignature, kMDGUIDSize); ++ *age = codeview_record->mAge; ++ return true; ++ } else { ++ fprintf(stderr, "Unhandled codeview signature %x\n", ++ codeview_record->mCvSignature); ++ } ++ } ++ } ++ ++ fprintf(stderr, "No codeview entry in debug directory\n"); ++ return false; ++} ++ ++template ++bool PeCoffObjectFileReader::HashTextSection( ++ ObjectFileBase obj_base, ++ uint8_t identifier[kMDGUIDSize]) { ++ Section text_section; ++ Offset text_size; ++ ++ if (!(text_section = FindSectionByName(".text", obj_base)) || ++ ((text_size = GetSectionSize(obj_base, text_section)) == 0)) ++ return false; ++ ++ memset(identifier, 0, kMDGUIDSize); ++ const uint8_t* ptr = GetSectionPointer(obj_base, text_section); ++ const uint8_t* ptr_end = ptr + std::min(text_size, 4096U); ++ while (ptr < ptr_end) { ++ for (unsigned i = 0; i < kMDGUIDSize; i++) ++ identifier[i] ^= ptr[i]; ++ ptr += kMDGUIDSize; ++ } ++ return true; ++} ++ ++// ++// Private implementation helper functions ++// ++ ++template ++const PeHeader* PeCoffObjectFileReader::GetHeader( ++ ObjectFileBase obj_base) { ++ const uint32_t* peOffsetPtr = reinterpret_cast(obj_base + ++ IMAGE_FILE_HEADER_OFFSET); ++ const PeHeader* peHeader = reinterpret_cast(obj_base+*peOffsetPtr); ++ return peHeader; ++} ++ ++template ++const typename PeCoffObjectFileReader::PeOptionalHeader* ++PeCoffObjectFileReader::GetOptionalHeader( ++ ObjectFileBase obj_base) { ++ const PeHeader* peHeader = GetHeader(obj_base); ++ PeOptionalHeader* peOptionalHeader = (PeOptionalHeader*) ((uint32_t*)peHeader + 6); ++ return peOptionalHeader; ++} ++ ++template ++const PeSectionHeader* ++PeCoffObjectFileReader::GetSectionTable( ++ ObjectFileBase obj_base) { ++ const PeHeader* peHeader = GetHeader(obj_base); ++ const PeOptionalHeader* peOptionalHeader = GetOptionalHeader(obj_base); ++ ++ // section table immediately follows optional header ++ const PeSectionHeader* section_table = reinterpret_cast ++ (reinterpret_cast(peOptionalHeader) + peHeader->mSizeOfOptionalHeader); ++ return section_table; ++} ++ ++template ++const char* PeCoffObjectFileReader::GetStringTable( ++ ObjectFileBase obj_base) { ++ const PeHeader* peHeader = GetHeader(obj_base); ++ ++ // string table immediately follows symbol table ++ uint32_t string_table_offset = peHeader->mPointerToSymbolTable + peHeader->mNumberOfSymbols*sizeof(PeSymbol); ++ const char* string_table = reinterpret_cast(obj_base) + string_table_offset; ++ return string_table; ++} ++ ++template ++const PeDataDirectory* ++PeCoffObjectFileReader::GetDataDirectoryEntry( ++ ObjectFileBase obj_base, int entry) { ++ const PeOptionalHeader* peOptionalHeader = GetOptionalHeader(obj_base); ++ ++ // the data directory immediately follows the optional header ++ const PeDataDirectory* data_directory = reinterpret_cast(&peOptionalHeader->mDataDirectory[0]); ++ uint32_t data_directory_size = peOptionalHeader->mNumberOfRvaAndSizes; ++ ++ // locate the required directory entry, if present ++ if (data_directory_size < entry) ++ return NULL; ++ ++ return &data_directory[entry]; ++} ++ ++template ++const uint8_t* ++PeCoffObjectFileReader::ConvertRVAToPointer( ++ ObjectFileBase obj_base, ++ Offset rva) { ++ // find which section contains the rva to compute it's mapped address ++ const PeSectionHeader* section_table = GetSectionTable(obj_base); ++ for (int s = 0; s < GetNumberOfSections(obj_base); s++) { ++ const PeSectionHeader* section = &(section_table[s]); ++ ++ if ((rva >= section->mVirtualAddress) && ++ (rva < (section->mVirtualAddress + section->mSizeOfRawData))) ++ { ++ uint32_t offset = rva - section->mVirtualAddress; ++ const uint8_t* pointer = GetSectionPointer(obj_base, (Section)section) + offset; ++ return pointer; ++ } ++ } ++ ++ fprintf(stderr, "No section could be found containing RVA %x\n", rva); ++ return NULL; ++} ++ ++// instantiation of templated classes ++template class PeCoffObjectFileReader; ++template class PeCoffObjectFileReader; ++ ++} +diff --git a/src/common/pecoff/pecoffutils.h b/src/common/pecoff/pecoffutils.h +new file mode 100644 +index 0000000..5553d9f +--- /dev/null ++++ b/src/common/pecoff/pecoffutils.h +@@ -0,0 +1,167 @@ ++// Copyright (c) 2014 Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// pecoffutils.h: Utilities for dealing with PECOFF files ++// ++ ++#ifndef COMMON_PECOFF_PECOFFUTILS_H__ ++#define COMMON_PECOFF_PECOFFUTILS_H__ ++ ++#include "common/pecoff/pecoff.h" ++#include "common/pecoff/pecoff_file_id.h" ++#include "common/module.h" ++ ++namespace google_breakpad { ++ ++bool IsValidPeCoff(const uint8_t* obj_file); ++int PeCoffClass(const uint8_t* obj_file); ++ ++class PeCoffClass32Traits { ++ public: ++ typedef uint32_t Addr; ++ typedef Pe32OptionalHeader PeOptionalHeader; ++ static const int kClass = PE32; ++ static const size_t kAddrSize = 4; ++}; ++ ++class PeCoffClass64Traits { ++ public: ++ typedef uint64_t Addr; ++ typedef Pe32PlusOptionalHeader PeOptionalHeader; ++ static const int kClass = PE32PLUS; ++ static const size_t kAddrSize = 8; ++}; ++// Offset isn't part of the traits as although PE32+ uses 64-bit address space, ++// it still uses 32-bit RVAs and offsets ++ ++template ++class PeCoffObjectFileReader { ++ public: ++ typedef const uint8_t* ObjectFileBase; ++ typedef const uint8_t* Section; ++ typedef uint32_t Offset; ++ typedef typename PeCoffClassTraits::Addr Addr; ++ static const int kClass = PeCoffClassTraits::kClass; ++ static const size_t kAddrSize = PeCoffClassTraits::kAddrSize; ++ ++ static bool IsValid(ObjectFileBase obj_file) { ++ return IsValidPeCoff(obj_file); ++ }; ++ ++ // ++ // Header information ++ // ++ ++ // Return the breakpad symbol file identifier for the architecture ++ static const char* Architecture(ObjectFileBase obj_base); ++ ++ // Get the endianness. If it's invalid, return false. ++ static bool Endianness(ObjectFileBase obj_base, bool* big_endian); ++ ++ // Find the preferred loading address of the binary. ++ static Addr GetLoadingAddress(ObjectFileBase obj_base); ++ ++ // ++ // Section enumeration and location ++ // ++ ++ static int GetNumberOfSections(ObjectFileBase obj_base); ++ static const Section FindSectionByIndex(ObjectFileBase obj_base, int i); ++ // Attempt to find a section named |section_name| ++ static const Section FindSectionByName(const char* section_name, ++ ObjectFileBase obj_base); ++ ++ // ++ // Section information ++ // ++ ++ // Convert a section into a pointer to the mapped address in the current ++ // process. ++ static const uint8_t* GetSectionPointer(ObjectFileBase obj_base, ++ Section section); ++ ++ // Get the size of a section ++ static Offset GetSectionSize(ObjectFileBase obj_base, Section section); ++ ++ // Get relative virtual address (RVA) of a section ++ static Offset GetSectionRVA(ObjectFileBase obj_base, Section section); ++ ++ // Get name of a section ++ static const char* GetSectionName(ObjectFileBase obj_base,Section section); ++ ++ // Find any linked section ++ static const Section FindLinkedSection(ObjectFileBase obj_base, ++ Section section) { ++ return 0; // PECOFF doesn't have the concept of linked sections ++ } ++ ++ // ++ // ++ // ++ ++ // Load symbols from the object file's exported symbol table ++ static bool ExportedSymbolsToModule(ObjectFileBase obj_base, Module* module); ++ ++ // Return the identifier for the file mapped into memory. ++ // Return an empty string if the identifier could not be created ++ // for the file. ++ static string FileIdentifierFromMappedFile(ObjectFileBase obj_base); ++ ++ // ++ // Helpers for PeCoffFileID ++ // ++ ++ // Get the build-id ++ static bool GetBuildID(ObjectFileBase obj_base, ++ uint8_t identifier[kMDGUIDSize], uint32_t* age); ++ // Hash the text section ++ static bool HashTextSection(ObjectFileBase obj_base, ++ uint8_t identifier[kMDGUIDSize]); ++ ++ private: ++ typedef typename PeCoffClassTraits::PeOptionalHeader PeOptionalHeader; ++ ++ // ++ // Private implementation helper functions ++ // ++ static const PeHeader* GetHeader(ObjectFileBase obj_base); ++ static const PeOptionalHeader* GetOptionalHeader(ObjectFileBase obj_base); ++ static const PeSectionHeader* GetSectionTable(ObjectFileBase obj_base); ++ static const char* GetStringTable(ObjectFileBase obj_base); ++ static const PeDataDirectory* GetDataDirectoryEntry(ObjectFileBase obj_base, ++ int entry); ++ static const uint8_t* ConvertRVAToPointer(ObjectFileBase obj_base, Offset rva); ++}; ++ ++class PeCoffClass32 : public PeCoffObjectFileReader { }; ++class PeCoffClass64 : public PeCoffObjectFileReader { }; ++ ++} // namespace google_breakpad ++ ++#endif // COMMON_PECOFF_PECOFFUTILS_H__ +diff --git a/src/tools/windows/dump_syms_dwarf/dump_syms.cc b/src/tools/windows/dump_syms_dwarf/dump_syms.cc +new file mode 100644 +index 0000000..2d7f70a +--- /dev/null ++++ b/src/tools/windows/dump_syms_dwarf/dump_syms.cc +@@ -0,0 +1,88 @@ ++// Copyright (c) 2011, Google Inc. ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following disclaimer ++// in the documentation and/or other materials provided with the ++// distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "common/pecoff/dump_symbols.h" ++ ++using google_breakpad::WriteSymbolFile; ++ ++int usage(const char* self) { ++ fprintf(stderr, "Usage: %s [OPTION] " ++ "[directories-for-debug-file]\n\n", self); ++ fprintf(stderr, "Options:\n"); ++ fprintf(stderr, " -c Do not generate CFI section\n"); ++ fprintf(stderr, " -r Do not handle inter-compilation unit references\n"); ++ return 1; ++} ++ ++int main(int argc, char **argv) { ++ if (argc < 2) ++ return usage(argv[0]); ++ ++ bool cfi = true; ++ bool handle_inter_cu_refs = true; ++ int arg_index = 1; ++ while (arg_index < argc && strlen(argv[arg_index]) > 0 && ++ argv[arg_index][0] == '-') { ++ if (strcmp("-c", argv[arg_index]) == 0) { ++ cfi = false; ++ } else if (strcmp("-r", argv[arg_index]) == 0) { ++ handle_inter_cu_refs = false; ++ } else { ++ return usage(argv[0]); ++ } ++ ++arg_index; ++ } ++ if (arg_index == argc) ++ return usage(argv[0]); ++ ++ const char* binary; ++ std::vector debug_dirs; ++ binary = argv[arg_index]; ++ for (int debug_dir_index = arg_index + 1; ++ debug_dir_index < argc; ++ ++debug_dir_index) { ++ debug_dirs.push_back(argv[debug_dir_index]); ++ } ++ ++ SymbolData symbol_data = cfi ? ALL_SYMBOL_DATA : NO_CFI; ++ google_breakpad::DumpOptions options(symbol_data, handle_inter_cu_refs); ++ if (!WriteSymbolFile(binary, debug_dirs, options, std::cout)) { ++ fprintf(stderr, "Failed to write symbol file.\n"); ++ return 1; ++ } ++ ++ return 0; ++} +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0006-Fix-building-minidump-processor-for-MinGW.patch b/mingw-w64-breakpad-svn/0006-Fix-building-minidump-processor-for-MinGW.patch new file mode 100644 index 0000000000..3e6e3d64a4 --- /dev/null +++ b/mingw-w64-breakpad-svn/0006-Fix-building-minidump-processor-for-MinGW.patch @@ -0,0 +1,246 @@ +From c36077c1411e0195dc852a8a515768d090495def Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Fri, 11 Jul 2014 23:37:02 +0100 +Subject: [PATCH 06/24] Fix building minidump processor for MinGW + +This is mainly the configure.ac and Makefile.am changes left over from +https://breakpad.appspot.com/548002/ with a bit of updating + +- Link minidump_stackwalk, minidump_dump with PTHREAD_LIBS as pthread_cancel is used +- Link minidump_stackwalk with ws2_32 as ntoh functions are used +- Don't try to build upload tools, dump_syms_dwarf for MinGW +- _s function variants should only be used if _MSC_VER, use _r variants with +MinGW (and define _POSIX to ensure they are prototyped) +- Don't try to include arpa/inet.h on Windows + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 17 +++++++++++++++-- + configure.ac | 6 ++++++ + src/google_breakpad/common/breakpad_types.h | 2 ++ + src/processor/basic_source_line_resolver.cc | 2 +- + src/processor/binarystream.cc | 2 ++ + src/processor/cfi_frame_info.cc | 2 +- + src/processor/logging.cc | 4 ++-- + src/processor/minidump.cc | 2 +- + src/processor/tokenize.cc | 2 +- + 9 files changed, 31 insertions(+), 8 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c802304..4d291e7 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -66,6 +66,11 @@ if WINDOWS_HOST + AM_CPPFLAGS += -DNO_STABS_SUPPORT + endif + ++if MINGW_HOST ++SOCKET_LIBS = -lws2_32 ++AM_CPPFLAGS += -D_POSIX ++endif ++ + # Specify include paths for ac macros + ACLOCAL_AMFLAGS = -I m4 + +@@ -308,11 +313,13 @@ bin_PROGRAMS += \ + src/processor/minidump_stackwalk + endif !DISABLE_PROCESSOR + ++if !MINGW_HOST + if !DISABLE_TOOLS + bin_PROGRAMS += \ + src/tools/common/symupload/minidump_upload \ + src/tools/common/symupload/sym_upload + endif ++endif + + if LINUX_HOST + bin_PROGRAMS += \ +@@ -327,11 +334,13 @@ endif + endif LINUX_HOST + + if WINDOWS_HOST ++if !MINGW_HOST + if !DISABLE_TOOLS + bin_PROGRAMS += \ + src/tools/windows/dump_syms_dwarf/dump_syms + endif + endif ++endif + + ## Tests + if !DISABLE_PROCESSOR +@@ -625,6 +634,7 @@ src_tools_linux_md2core_minidump_2_core_unittest_LDADD = \ + endif LINUX_HOST + + if WINDOWS_HOST ++if !MINGW_HOST + if !DISABLE_TOOLS + src_tools_windows_dump_syms_dwarf_dump_syms_SOURCES = \ + src/common/dwarf_cfi_to_module.cc \ +@@ -641,6 +651,7 @@ src_tools_windows_dump_syms_dwarf_dump_syms_SOURCES = \ + src/tools/windows/dump_syms_dwarf/dump_syms.cc + endif + endif ++endif + + if !DISABLE_PROCESSOR + src_processor_address_map_unittest_SOURCES = \ +@@ -1130,7 +1141,8 @@ src_processor_minidump_dump_LDADD = \ + src/processor/dump_object.o \ + src/processor/logging.o \ + src/processor/minidump.o \ +- src/processor/pathname_stripper.o ++ src/processor/pathname_stripper.o \ ++ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + + src_processor_minidump_stackwalk_SOURCES = \ + src/processor/minidump_stackwalk.cc +@@ -1125,7 +1125,8 @@ + src/processor/stackwalker_sparc.o \ + src/processor/stackwalker_x86.o \ + src/processor/tokenize.o \ +- src/third_party/libdisasm/libdisasm.a ++ src/third_party/libdisasm/libdisasm.a \ ++ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SOCKET_LIBS) + + src_processor_minidump_stackwalk_SOURCES = \ + src/processor/minidump_stackwalk.cc +@@ -1166,7 +1178,8 @@ src_processor_minidump_stackwalk_LDADD = \ + src/processor/stackwalker_sparc.o \ + src/processor/stackwalker_x86.o \ + src/processor/tokenize.o \ +- src/third_party/libdisasm/libdisasm.a ++ src/third_party/libdisasm/libdisasm.a \ ++ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SOCKET_LIBS) + + endif !DISABLE_PROCESSOR + +diff --git a/configure.ac b/configure.ac +index aeccf19..a2b9287 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,10 +83,16 @@ case $host in + *-*-cygwin* ) + WINDOWS_HOST=true + ;; ++ *-*-mingw* ) ++ WINDOWS_HOST=true ++ MINGW_HOST=true ++ ;; + esac + + AM_CONDITIONAL(LINUX_HOST, test x$LINUX_HOST = xtrue) ++# WINDOWS_HOST means MINGW or CYGWIN + AM_CONDITIONAL(WINDOWS_HOST, test x$WINDOWS_HOST = xtrue) ++AM_CONDITIONAL(MINGW_HOST, test x$MINGW_HOST = xtrue) + + # Only use Android support headers when compiling for Android + case $host in +diff --git a/src/google_breakpad/common/breakpad_types.h b/src/google_breakpad/common/breakpad_types.h +index e92436f..c50a3a9 100644 +--- a/src/google_breakpad/common/breakpad_types.h ++++ b/src/google_breakpad/common/breakpad_types.h +@@ -61,9 +61,11 @@ + #include + + typedef unsigned __int8 uint8_t; ++typedef __int16 int16_t; + typedef unsigned __int16 uint16_t; + typedef __int32 int32_t; + typedef unsigned __int32 uint32_t; ++typedef __int64 int64_t; + typedef unsigned __int64 uint64_t; + #endif + +diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc +index 62aa413..1d4d0e9 100644 +--- a/src/processor/basic_source_line_resolver.cc ++++ b/src/processor/basic_source_line_resolver.cc +@@ -55,7 +55,7 @@ using std::make_pair; + + namespace google_breakpad { + +-#ifdef _WIN32 ++#ifdef _MSC_VER + #define strtok_r strtok_s + #define strtoull _strtoui64 + #endif +diff --git a/src/processor/binarystream.cc b/src/processor/binarystream.cc +index bf92225..96f0693 100644 +--- a/src/processor/binarystream.cc ++++ b/src/processor/binarystream.cc +@@ -27,7 +27,9 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ++#ifndef _WIN32 + #include ++#endif + #include + + #include +diff --git a/src/processor/cfi_frame_info.cc b/src/processor/cfi_frame_info.cc +index 5106ba0..0c4af7b 100644 +--- a/src/processor/cfi_frame_info.cc ++++ b/src/processor/cfi_frame_info.cc +@@ -43,7 +43,7 @@ + + namespace google_breakpad { + +-#ifdef _WIN32 ++#ifdef _MSC_VER + #define strtok_r strtok_s + #endif + +diff --git a/src/processor/logging.cc b/src/processor/logging.cc +index 8bb95a6..45072bc 100644 +--- a/src/processor/logging.cc ++++ b/src/processor/logging.cc +@@ -45,7 +45,7 @@ + #include "processor/logging.h" + #include "processor/pathname_stripper.h" + +-#ifdef _WIN32 ++#ifdef _MSC_VER + #define snprintf _snprintf + #endif + +@@ -57,7 +57,7 @@ LogStream::LogStream(std::ostream &stream, Severity severity, + time_t clock; + time(&clock); + struct tm tm_struct; +-#ifdef _WIN32 ++#ifdef _MSC_VER + localtime_s(&tm_struct, &clock); + #else + localtime_r(&clock, &tm_struct); +diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc +index a4bf55a..1a79676 100644 +--- a/src/processor/minidump.cc ++++ b/src/processor/minidump.cc +@@ -372,7 +372,7 @@ static void PrintValueOrInvalid(bool valid, + // Converts a time_t to a string showing the time in UTC. + string TimeTToUTCString(time_t tt) { + struct tm timestruct; +-#ifdef _WIN32 ++#ifdef _MSC_VER + gmtime_s(×truct, &tt); + #else + gmtime_r(&tt, ×truct); +diff --git a/src/processor/tokenize.cc b/src/processor/tokenize.cc +index f468120..8fce87a 100644 +--- a/src/processor/tokenize.cc ++++ b/src/processor/tokenize.cc +@@ -36,7 +36,7 @@ + + namespace google_breakpad { + +-#ifdef _WIN32 ++#ifdef _MSC_VER + #define strtok_r strtok_s + #endif + +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0007-Build-PECOFF-DWARF-dump_syms-for-MinGW.patch b/mingw-w64-breakpad-svn/0007-Build-PECOFF-DWARF-dump_syms-for-MinGW.patch new file mode 100644 index 0000000000..7dba9b7eb0 --- /dev/null +++ b/mingw-w64-breakpad-svn/0007-Build-PECOFF-DWARF-dump_syms-for-MinGW.patch @@ -0,0 +1,134 @@ +From 18fdc070172177cb911583284d1425747105e836 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 5 Feb 2014 13:44:01 +0000 +Subject: [PATCH 07/24] Build PECOFF/DWARF dump_syms for MinGW + +- Substitute MapViewOfFile() for mmap() +- Link dump_syms_dwarf with ws2_32 as ntoh functions are used + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 6 ++---- + src/common/pecoff/dump_symbols-inl.h | 38 ++++++++++++++++++++++++++++++------ + 2 files changed, 34 insertions(+), 10 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 4d291e7..d8917aa 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -334,13 +334,11 @@ endif + endif LINUX_HOST + + if WINDOWS_HOST +-if !MINGW_HOST + if !DISABLE_TOOLS + bin_PROGRAMS += \ + src/tools/windows/dump_syms_dwarf/dump_syms + endif + endif +-endif + + ## Tests + if !DISABLE_PROCESSOR +@@ -634,7 +632,6 @@ src_tools_linux_md2core_minidump_2_core_unittest_LDADD = \ + endif LINUX_HOST + + if WINDOWS_HOST +-if !MINGW_HOST + if !DISABLE_TOOLS + src_tools_windows_dump_syms_dwarf_dump_syms_SOURCES = \ + src/common/dwarf_cfi_to_module.cc \ +@@ -649,7 +646,8 @@ src_tools_windows_dump_syms_dwarf_dump_syms_SOURCES = \ + src/common/pecoff/pecoffutils.cc \ + src/common/pecoff/pecoff_file_id.cc \ + src/tools/windows/dump_syms_dwarf/dump_syms.cc +-endif ++src_tools_windows_dump_syms_dwarf_dump_syms_LDADD = \ ++ $(SOCKET_LIBS) + endif + endif + +diff --git a/src/common/pecoff/dump_symbols-inl.h b/src/common/pecoff/dump_symbols-inl.h +index 6ec2059..4821ac9 100644 +--- a/src/common/pecoff/dump_symbols-inl.h ++++ b/src/common/pecoff/dump_symbols-inl.h +@@ -39,7 +39,9 @@ + #include + #include + #include ++#ifndef _WIN32 + #include ++#endif + #include + #include + #include +@@ -111,13 +113,37 @@ class MmapWrapper { + ~MmapWrapper() { + if (is_set_ && base_ != NULL) { + assert(size_ > 0); ++#ifndef _WIN32 + munmap(base_, size_); ++#else ++ UnmapViewOfFile(base_); ++ CloseHandle(hMap_); ++#endif + } + } +- void set(void *mapped_address, size_t mapped_size) { ++ void *set(int obj_fd, size_t mapped_size) { ++#ifndef _WIN32 ++ void *mapped_address = mmap(NULL, mapped_size, ++ PROT_READ | PROT_WRITE, MAP_PRIVATE, obj_fd, 0); ++ if (mapped_address == MAP_FAILED) ++ return NULL; ++#else ++ HANDLE h = (HANDLE)_get_osfhandle(obj_fd); ++ hMap_ = CreateFileMapping(h, NULL, PAGE_READONLY,0, 0, NULL); ++ // XXX: should also use SEC_IMAGE_NO_EXECUTE on Windows 6.2 or later ++ if (!hMap_) { ++ return NULL; ++ } ++ void *mapped_address = MapViewOfFile(hMap_, FILE_MAP_READ, 0, 0, 0); ++ if (!mapped_address) { ++ CloseHandle(hMap_); ++ return NULL; ++ } ++#endif + is_set_ = true; + base_ = mapped_address; + size_ = mapped_size; ++ return mapped_address; + } + void release() { + assert(is_set_); +@@ -130,6 +156,9 @@ class MmapWrapper { + bool is_set_; + void *base_; + size_t size_; ++#ifdef _WIN32 ++ HANDLE hMap_; ++#endif + }; + + #ifndef NO_STABS_SUPPORT +@@ -329,15 +358,12 @@ bool LoadFile(const string& obj_file, MmapWrapper* map_wrapper, + obj_file.c_str(), strerror(errno)); + return false; + } +- void *obj_base = mmap(NULL, st.st_size, +- PROT_READ | PROT_WRITE, MAP_PRIVATE, obj_fd, 0); +- if (obj_base == MAP_FAILED) { ++ *header = map_wrapper->set(obj_fd, st.st_size); ++ if (!(*header)) { + fprintf(stderr, "Failed to mmap file '%s': %s\n", + obj_file.c_str(), strerror(errno)); + return false; + } +- map_wrapper->set(obj_base, st.st_size); +- *header = obj_base; + return true; + } + +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0008-Fix-building-client-library-and-upload-tools-for-Min.patch b/mingw-w64-breakpad-svn/0008-Fix-building-client-library-and-upload-tools-for-Min.patch new file mode 100644 index 0000000000..b9813c089f --- /dev/null +++ b/mingw-w64-breakpad-svn/0008-Fix-building-client-library-and-upload-tools-for-Min.patch @@ -0,0 +1,123 @@ +From 7091ed120d7d5e90211572e3ec4e0882a071979e Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 19 Nov 2014 13:21:43 +0000 +Subject: [PATCH 08/24] Fix building client library and upload tools for MinGW + +This is the rest of https://breakpad.appspot.com/548002/, brought up to date + +v2: +Refine MinGW changes in HTTPUpload::GetFileContents so it closes file after use + +v3: +For consistency, write conditionals in terms of _MSC_VER, not __MINGW32__ + +v4: +Use fd rather than FILE * in HTTPUpload::GetFileContents + +It appears that constructing a stdio_filebuf from a FILE * does a fflush(0), +which has been seen to occasionally fail EBADF (on at least W7 x64). + +Both of these things seem like they might be bugs + +Workaround for the moment by constructing stdio_filebuf from a fd instead. + +v5: +Drop HTTPUpload::GetFileContents() changes as upstream now uses WideTOMBCP() +Drop changes to avoid stdext::checked_array_iterator, as upstream + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 2 -- + src/client/windows/crash_generation/client_info.cc | 4 ++++ + src/client/windows/crash_generation/crash_generation_server.cc | 7 +++++-- + .../windows/tests/crash_generation_app/crash_generation_app.cc | 6 ++++++ + 4 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index d8917aa..ad62471 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -313,13 +313,11 @@ bin_PROGRAMS += \ + src/processor/minidump_stackwalk + endif !DISABLE_PROCESSOR + +-if !MINGW_HOST + if !DISABLE_TOOLS + bin_PROGRAMS += \ + src/tools/common/symupload/minidump_upload \ + src/tools/common/symupload/sym_upload + endif +-endif + + if LINUX_HOST + bin_PROGRAMS += \ +diff --git a/src/client/windows/crash_generation/client_info.cc b/src/client/windows/crash_generation/client_info.cc +index ed31263..30a48db 100644 +--- a/src/client/windows/crash_generation/client_info.cc ++++ b/src/client/windows/crash_generation/client_info.cc +@@ -176,7 +176,11 @@ void ClientInfo::SetProcessUptime() { + + // Convert it to a string. + wchar_t* value = custom_info_entries_.get()[custom_client_info_.count].value; ++#ifdef _MSC_VER + _i64tow_s(delay, value, CustomInfoEntry::kValueMaxLength, 10); ++#else ++ _i64tow(delay, value, 10); ++#endif + } + + bool ClientInfo::PopulateCustomInfo() { +diff --git a/src/client/windows/crash_generation/crash_generation_server.cc b/src/client/windows/crash_generation/crash_generation_server.cc +index ae05243..81d6597 100644 +--- a/src/client/windows/crash_generation/crash_generation_server.cc ++++ b/src/client/windows/crash_generation/crash_generation_server.cc +@@ -85,14 +85,17 @@ static bool IsClientRequestValid(const ProtocolMessage& msg) { + msg.assert_info != NULL); + } + +-#ifdef _DEBUG + static bool CheckForIOIncomplete(bool success) { ++#ifdef _DEBUG + // We should never get an I/O incomplete since we should not execute this + // unless the operation has finished and the overlapped event is signaled. If + // we do get INCOMPLETE, we have a bug in our code. + return success ? false : (GetLastError() == ERROR_IO_INCOMPLETE); +-} ++#else ++ return true; + #endif ++} ++ + + CrashGenerationServer::CrashGenerationServer( + const std::wstring& pipe_name, +diff --git a/src/client/windows/tests/crash_generation_app/crash_generation_app.cc b/src/client/windows/tests/crash_generation_app/crash_generation_app.cc +index fa4e634..09a0aae 100644 +--- a/src/client/windows/tests/crash_generation_app/crash_generation_app.cc ++++ b/src/client/windows/tests/crash_generation_app/crash_generation_app.cc +@@ -42,6 +42,10 @@ + + #include "client/windows/tests/crash_generation_app/abstract_class.h" + ++#ifndef _MSC_VER ++#define swprintf_s swprintf ++#endif ++ + namespace google_breakpad { + + const int kMaxLoadString = 100; +@@ -480,9 +484,11 @@ int APIENTRY _tWinMain(HINSTANCE instance, + CustomClientInfo custom_info = {kCustomInfoEntries, kCustomInfoCount}; + + CrashServerStart(); ++#ifdef _MSC_VER + // This is needed for CRT to not show dialog for invalid param + // failures and instead let the code handle it. + _CrtSetReportMode(_CRT_ASSERT, 0); ++#endif + handler = new ExceptionHandler(L"C:\\dumps\\", + NULL, + google_breakpad::ShowDumpResults, +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0009-Fix-common.gypi-to-allow-gyp-to-generate-Makefiles-o.patch b/mingw-w64-breakpad-svn/0009-Fix-common.gypi-to-allow-gyp-to-generate-Makefiles-o.patch new file mode 100644 index 0000000000..b5517e538d --- /dev/null +++ b/mingw-w64-breakpad-svn/0009-Fix-common.gypi-to-allow-gyp-to-generate-Makefiles-o.patch @@ -0,0 +1,43 @@ +From 2af80c0b7d0827bb5102a7e0f65866f8d474b2dc Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Thu, 13 Feb 2014 01:06:51 +0000 +Subject: [PATCH 09/24] Fix common.gypi to allow gyp to generate Makefiles on + Windows + +The MSVS_VERSION variable does not exist unless we are using the MSVS generator + +Signed-off-by: Jon TURNEY +--- + src/build/common.gypi | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/build/common.gypi b/src/build/common.gypi +index b9466a3..9befd15 100644 +--- a/src/build/common.gypi ++++ b/src/build/common.gypi +@@ -206,9 +206,9 @@ + # Whether to use multiple cores to compile with visual studio. This is + # optional because it sometimes causes corruption on VS 2005. + # It is on by default on VS 2008 and off on VS 2005. +- ['OS=="win"', { ++ ['"<(GENERATOR)" == "msvs"', { + 'conditions': [ +- ['MSVS_VERSION=="2005"', { ++ [ 'MSVS_VERSION=="2005"', { + 'msvs_multi_core_compile%': 0, + },{ + 'msvs_multi_core_compile%': 1, +@@ -225,6 +225,10 @@ + # Native Client loader for 64-bit Windows. + 'NACL_WIN64', + ], ++ }, ++ { ++ # XXX: because value is used below... ++ 'msvs_multi_core_compile%': 0, + }], + ], + +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0010-Teach-gyp-generated-Makefile-to-build-crash_generati.patch b/mingw-w64-breakpad-svn/0010-Teach-gyp-generated-Makefile-to-build-crash_generati.patch new file mode 100644 index 0000000000..a21e87c631 --- /dev/null +++ b/mingw-w64-breakpad-svn/0010-Teach-gyp-generated-Makefile-to-build-crash_generati.patch @@ -0,0 +1,165 @@ +From d96319f23d7ba65a5f09f57a9a80af67a327e0e4 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Mon, 10 Feb 2014 18:12:14 +0000 +Subject: [PATCH 10/24] Teach gyp generated Makefile to build + crash_generation_app correctly + +- Use linker flag for Windows subsystem +- Use linker flag for unicode +- Add rule for compiling windows resources, using $RC to name the resource compiler +- Rename crash_generation_app.rc to avoid a clash in corresponding .o names + +Also +- Fix linking of unit test when built using gyp generated Makefile by providing +needed library + +XXX: We need to arrange for the gyp Makefile generator to set +CXXFLAGS="-DUNICODE -D_UNICODE" somewhere when generating for Windows. This is +already done in generated MSVS projects. + +Signed-off-by: Jon TURNEY +--- + .../crash_generation_app/crash_generation_app.gyp | 29 +++++++++++++++++++--- + .../{crash_generation_app.rc => resource.rc} | 13 +++++----- + src/client/windows/unittests/client_tests.gyp | 12 +++++++-- + 3 files changed, 41 insertions(+), 13 deletions(-) + rename src/client/windows/tests/crash_generation_app/{crash_generation_app.rc => resource.rc} (96%) + +diff --git a/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp b/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp +index 3ce307d..774f600 100644 +--- a/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp ++++ b/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp +@@ -40,19 +40,40 @@ + 'crash_generation_app.cc', + 'crash_generation_app.h', + 'crash_generation_app.ico', +- 'crash_generation_app.rc', ++ 'resource.rc', + 'resource.h', + 'small.ico', + ], +- 'libraries': [ +- 'user32.lib', +- ], + 'dependencies': [ + '../../breakpad_client.gyp:common', + '../../crash_generation/crash_generation.gyp:crash_generation_server', + '../../crash_generation/crash_generation.gyp:crash_generation_client', + '../../handler/exception_handler.gyp:exception_handler', + ], ++ 'conditions': [ ++ [ '"<(GENERATOR)" == "make"', { ++ 'ldflags': [ ++ '-Wl,--subsystem=2', '-municode' ++ ], ++ 'rules': [ ++ { 'rule_name': 'windres', ++ 'extension': 'rc', ++ 'inputs' : [ ], ++ 'outputs' : [ '$(builddir)/<(RULE_INPUT_ROOT).o' ], ++ 'action' : [ '$(RC)', '--input=<(RULE_INPUT_PATH)', '--output=$(builddir)/<(RULE_INPUT_ROOT).o', '--input-format=rc', '--output-format=coff', '-v', '--use-temp-file' ], ++ 'message' : 'Compiling Windows resources', ++ 'process_outputs_as_sources' : 1, ++ }, ++ ], ++ } ++ ], ++ [ '"<(GENERATOR)" == "msvs"', { ++ 'libraries': [ ++ 'user32.lib', ++ ], ++ } ++ ] ++ ], + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2', # Windows Subsystem as opposed to a console app +diff --git a/src/client/windows/tests/crash_generation_app/crash_generation_app.rc b/src/client/windows/tests/crash_generation_app/resource.rc +similarity index 96% +rename from src/client/windows/tests/crash_generation_app/crash_generation_app.rc +rename to src/client/windows/tests/crash_generation_app/resource.rc +index a362562..6c7e8b6 100644 +--- a/src/client/windows/tests/crash_generation_app/crash_generation_app.rc ++++ b/src/client/windows/tests/crash_generation_app/resource.rc +@@ -38,7 +38,7 @@ IDI_SMALL ICON "small.ico" + // Menu + // + +-IDC_CRASHGENERATIONAPP MENU ++IDC_CRASHGENERATIONAPP MENU + BEGIN + POPUP "&File" + BEGIN +@@ -64,7 +64,7 @@ END + // Accelerator + // + +-IDC_CRASHGENERATIONAPP ACCELERATORS ++IDC_CRASHGENERATIONAPP ACCELERATORS + BEGIN + "?", IDM_ABOUT, ASCII, ALT + "/", IDM_ABOUT, ASCII, ALT +@@ -94,12 +94,12 @@ END + // TEXTINCLUDE + // + +-1 TEXTINCLUDE ++1 TEXTINCLUDE + BEGIN + "resource.h\0" + END + +-2 TEXTINCLUDE ++2 TEXTINCLUDE + BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" +@@ -107,7 +107,7 @@ BEGIN + "\0" + END + +-3 TEXTINCLUDE ++3 TEXTINCLUDE + BEGIN + "\r\n" + "\0" +@@ -121,7 +121,7 @@ END + // String Table + // + +-STRINGTABLE ++STRINGTABLE + BEGIN + IDS_APP_TITLE "CrashGenerationApp" + IDC_CRASHGENERATIONAPP "CRASHGENERATIONAPP" +@@ -141,4 +141,3 @@ END + + ///////////////////////////////////////////////////////////////////////////// + #endif // not APSTUDIO_INVOKED +- +diff --git a/src/client/windows/unittests/client_tests.gyp b/src/client/windows/unittests/client_tests.gyp +index 7f9c7a0..238cf5d 100644 +--- a/src/client/windows/unittests/client_tests.gyp ++++ b/src/client/windows/unittests/client_tests.gyp +@@ -51,8 +51,16 @@ + '../crash_generation/crash_generation.gyp:crash_generation_server', + '../crash_generation/crash_generation.gyp:crash_generation_client', + '../handler/exception_handler.gyp:exception_handler', +- 'processor_bits', +- ] ++ 'processor_bits', ++ ], ++ 'conditions': [ ++ [ '"<(GENERATOR)" == "make"', { ++ 'libraries': [ ++ '-ldbghelp', '-lversion', '-lpthread', ++ ], ++ }, ++ ], ++ ], + }, + { + 'target_name': 'processor_bits', +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0011-Default-debug_file-to-the-code_file-basename.patch b/mingw-w64-breakpad-svn/0011-Default-debug_file-to-the-code_file-basename.patch new file mode 100644 index 0000000000..235ed2ef30 --- /dev/null +++ b/mingw-w64-breakpad-svn/0011-Default-debug_file-to-the-code_file-basename.patch @@ -0,0 +1,51 @@ +From 864ff09e70cf42fa4e96969d665890ef73144eba Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Fri, 7 Feb 2014 23:03:10 +0000 +Subject: [PATCH 11/24] Default debug_file to the code_file basename + +Strip any path from code_file, and use that as debug_file if one isn't recorded +in the codeview record. + +The current implementation of 'ld --build-id' doesn't write a pdbfilename in the +codeview record, not least because we don't have such a thing. + +The minidump processor requires both debug_file and debug_identifier (the +build-id) to locate the symbol file. + +v2: +Correctly make debug-file a basename when code-file has a windows-style path +Fix by Ivan Gubarev + +Signed-off-by: Jon TURNEY +--- + src/processor/minidump.cc | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc +index 1a79676..71c8456 100644 +--- a/src/processor/minidump.cc ++++ b/src/processor/minidump.cc +@@ -1961,6 +1961,20 @@ string MinidumpModule::debug_file() const { + } + } + ++ // Manufacture debug-file from code-file ++ if (file.empty()) { ++ file = code_file(); ++ ++ BPLOG(INFO) << "Generated debug_file '" << file << "' from code_file '" << *name_ << "'"; ++ } ++ ++ // This may be a windows-style pathname, so find the basename considering both ++ // forward and back-slashes. ++ const size_t last_slash_idx = file.find_last_of("\\/"); ++ if (std::string::npos != last_slash_idx) { ++ file.erase(0, last_slash_idx + 1); ++ } ++ + // Relatively common case + BPLOG_IF(INFO, file.empty()) << "MinidumpModule could not determine " + "debug_file for " << *name_; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0012-Fix-building-windows-client-unit-tests-with-gcc.patch b/mingw-w64-breakpad-svn/0012-Fix-building-windows-client-unit-tests-with-gcc.patch new file mode 100644 index 0000000000..96a971fda1 --- /dev/null +++ b/mingw-w64-breakpad-svn/0012-Fix-building-windows-client-unit-tests-with-gcc.patch @@ -0,0 +1,95 @@ +From 5314c78598a45acf2953e6b9f4c9168e180adcf9 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Tue, 11 Feb 2014 23:48:28 +0000 +Subject: [PATCH 12/24] Fix building windows client unit-tests with gcc + +- MinGW doesn't have _CrtSetReportMode + +- Trying to call PureVirtual() on a base class object give a linker error + +(Presumably gcc can see that base class will be used for virtual function call, +so requires an implementation (which is prohibited because it's pure virtual) +at link time.) + +XXX: crash_generatation_app manages to contain a pure virtual call without +tripping over this, so look how it does that... + +Signed-off-by: Jon TURNEY +--- + src/client/windows/unittests/exception_handler_death_test.cc | 6 +++++- + src/client/windows/unittests/exception_handler_test.cc | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/client/windows/unittests/exception_handler_death_test.cc b/src/client/windows/unittests/exception_handler_death_test.cc +index 079ca3d..e9f605e 100644 +--- a/src/client/windows/unittests/exception_handler_death_test.cc ++++ b/src/client/windows/unittests/exception_handler_death_test.cc +@@ -242,8 +242,10 @@ TEST_F(ExceptionHandlerDeathTest, InvalidParameterTest) { + ExceptionHandler handler(temp_path_, NULL, NULL, NULL, + ExceptionHandler::HANDLER_INVALID_PARAMETER); + ++#ifdef _MSC_VER + // Disable the message box for assertions + _CrtSetReportMode(_CRT_ASSERT, 0); ++#endif + + // Call with a bad argument. The invalid parameter will be swallowed + // and a dump will be generated, the process will exit(0). +@@ -255,7 +257,7 @@ struct PureVirtualCallBase { + PureVirtualCallBase() { + // We have to reinterpret so the linker doesn't get confused because the + // method isn't defined. +- reinterpret_cast(this)->PureFunction(); ++ reinterpret_cast(0)->PureFunction(); + } + virtual ~PureVirtualCallBase() {} + virtual void PureFunction() const = 0; +@@ -276,8 +278,10 @@ TEST_F(ExceptionHandlerDeathTest, PureVirtualCallTest) { + ExceptionHandler handler(temp_path_, NULL, NULL, NULL, + ExceptionHandler::HANDLER_PURECALL); + ++#ifdef _MSC_VER + // Disable the message box for assertions + _CrtSetReportMode(_CRT_ASSERT, 0); ++#endif + + // Calls a pure virtual function. + EXPECT_EXIT(DoCrashPureVirtualCall(), ::testing::ExitedWithCode(0), ""); +diff --git a/src/client/windows/unittests/exception_handler_test.cc b/src/client/windows/unittests/exception_handler_test.cc +index 5527532..a482379 100644 +--- a/src/client/windows/unittests/exception_handler_test.cc ++++ b/src/client/windows/unittests/exception_handler_test.cc +@@ -180,8 +180,10 @@ void ExceptionHandlerTest::DoCrashInvalidParameter() { + google_breakpad::ExceptionHandler::HANDLER_INVALID_PARAMETER, + kFullDumpType, kPipeName, NULL); + ++#ifdef _MSC_VER + // Disable the message box for assertions + _CrtSetReportMode(_CRT_ASSERT, 0); ++#endif + + // Although this is executing in the child process of the death test, + // if it's not true we'll still get an error rather than the crash +@@ -195,7 +197,7 @@ struct PureVirtualCallBase { + PureVirtualCallBase() { + // We have to reinterpret so the linker doesn't get confused because the + // method isn't defined. +- reinterpret_cast(this)->PureFunction(); ++ reinterpret_cast(0)->PureFunction(); + } + virtual ~PureVirtualCallBase() {} + virtual void PureFunction() const = 0; +@@ -212,8 +214,10 @@ void ExceptionHandlerTest::DoCrashPureVirtualCall() { + google_breakpad::ExceptionHandler::HANDLER_PURECALL, + kFullDumpType, kPipeName, NULL); + ++#ifdef _MSC_VER + // Disable the message box for assertions + _CrtSetReportMode(_CRT_ASSERT, 0); ++#endif + + // Although this is executing in the child process of the death test, + // if it's not true we'll still get an error rather than the crash +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0013-Add-symsrv_convert.patch b/mingw-w64-breakpad-svn/0013-Add-symsrv_convert.patch new file mode 100644 index 0000000000..efd6223712 --- /dev/null +++ b/mingw-w64-breakpad-svn/0013-Add-symsrv_convert.patch @@ -0,0 +1,179 @@ +From f97f2cb3b78eb0c6e8c409e121634f1520af6292 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Sun, 3 Aug 2014 23:44:28 +0100 +Subject: [PATCH 13/24] Add symsrv_convert + +- Add symsrv_convert from http://hg.mozilla.org/users/tmielczarek_mozilla.com/fetch-win32-symbols/ +- Add building symsrv_convert to .gyp file +- Fix compilation with MSVS 2013 +- NOMINMAX should not be needed as that comes from target_defaults + +Signed-off-by: Jon TURNEY +--- + src/common/windows/common_windows.gyp | 2 +- + src/common/windows/pdb_source_line_writer.cc | 6 +++ + .../converter/ms_symbol_server_converter.cc | 2 +- + .../converter/ms_symbol_server_converter.gyp | 13 +++++ + .../windows/converter/ms_symbol_server_converter.h | 4 +- + src/tools/windows/converter/symsrv_convert.cc | 59 ++++++++++++++++++++++ + 6 files changed, 82 insertions(+), 4 deletions(-) + mode change 100644 => 100755 src/common/windows/pdb_source_line_writer.cc + mode change 100644 => 100755 src/tools/windows/converter/ms_symbol_server_converter.cc + mode change 100644 => 100755 src/tools/windows/converter/ms_symbol_server_converter.h + create mode 100644 src/tools/windows/converter/symsrv_convert.cc + +diff --git a/src/common/windows/common_windows.gyp b/src/common/windows/common_windows.gyp +index aadc21a..5f4bff7 100644 +--- a/src/common/windows/common_windows.gyp ++++ b/src/common/windows/common_windows.gyp +@@ -37,7 +37,7 @@ + 'all_dependent_settings': { + 'include_dirs': [ + '<(DEPTH)', +- '$(VSInstallDir)/DIA SDK/include', ++ '"$(VSInstallDir)/DIA SDK/include"', + ], + 'msvs_settings': { + 'VCLinkerTool': { +diff --git a/src/common/windows/pdb_source_line_writer.cc b/src/common/windows/pdb_source_line_writer.cc +old mode 100644 +new mode 100755 +index a3213dc..20a7315 +--- a/src/common/windows/pdb_source_line_writer.cc ++++ b/src/common/windows/pdb_source_line_writer.cc +@@ -27,6 +27,12 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ++// We don't want windows.h to define the macro max() which collides with ++// std::numeric_limits::max() ++#ifndef NOMINMAX ++#define NOMINMAX ++#endif ++ + #include "common/windows/pdb_source_line_writer.h" + + #include +diff --git a/src/tools/windows/converter/ms_symbol_server_converter.cc b/src/tools/windows/converter/ms_symbol_server_converter.cc +old mode 100644 +new mode 100755 +index dd3f770..5a701a2 +--- a/src/tools/windows/converter/ms_symbol_server_converter.cc ++++ b/src/tools/windows/converter/ms_symbol_server_converter.cc +@@ -422,7 +422,7 @@ BOOL CALLBACK MSSymbolServerConverter::SymCallback(HANDLE process, + + // static + BOOL CALLBACK MSSymbolServerConverter::SymFindFileInPathCallback( +- const char *filename, void *context) { ++ PCSTR filename, PVOID context) { + // FALSE ends the search, indicating that the located symbol file is + // satisfactory. + return FALSE; +diff --git a/src/tools/windows/converter/ms_symbol_server_converter.gyp b/src/tools/windows/converter/ms_symbol_server_converter.gyp +index 57ec790..d84be5c 100644 +--- a/src/tools/windows/converter/ms_symbol_server_converter.gyp ++++ b/src/tools/windows/converter/ms_symbol_server_converter.gyp +@@ -42,5 +42,18 @@ + '../../../common/windows/common_windows.gyp:common_windows_lib', + ], + }, ++ { ++ 'target_name': 'symsrv_convert', ++ 'type': 'executable', ++ 'dependencies': [ ++ 'ms_symbol_server_converter' ++ ], ++ 'sources' : [ ++ 'symsrv_convert.cc', ++ ], ++ 'include_dirs': [ ++ '<(DEPTH)', ++ ], ++ } + ], + } +diff --git a/src/tools/windows/converter/ms_symbol_server_converter.h b/src/tools/windows/converter/ms_symbol_server_converter.h +old mode 100644 +new mode 100755 +index d601b43..82aaea0 +--- a/src/tools/windows/converter/ms_symbol_server_converter.h ++++ b/src/tools/windows/converter/ms_symbol_server_converter.h +@@ -199,8 +199,8 @@ class MSSymbolServerConverter { + // SymFindFileInPath actually seems to accept NULL for a callback function + // and behave properly for our needs in that case, but the documentation + // doesn't mention it, so this little callback is provided. +- static BOOL CALLBACK SymFindFileInPathCallback(const char *filename, +- void *context); ++ static BOOL CALLBACK SymFindFileInPathCallback(PCSTR filename, ++ PVOID context); + + // The search path used by SymSrv, built based on the arguments to the + // constructor. +diff --git a/src/tools/windows/converter/symsrv_convert.cc b/src/tools/windows/converter/symsrv_convert.cc +new file mode 100644 +index 0000000..4e45b56 +--- /dev/null ++++ b/src/tools/windows/converter/symsrv_convert.cc +@@ -0,0 +1,59 @@ ++#include ++#include ++#include ++ ++#include "tools/windows/converter/ms_symbol_server_converter.h" ++ ++using std::string; ++using std::vector; ++using google_breakpad::MissingSymbolInfo; ++using google_breakpad::MSSymbolServerConverter; ++ ++int main(int argc, char *argv[]) ++{ ++ if (argc < 5) { ++ fprintf(stderr, "Usage: %s \n ", argv[0]); ++ return 1; ++ } ++ ++ MissingSymbolInfo missing_info; ++ missing_info.debug_file = argv[3]; ++ missing_info.debug_identifier = argv[4]; ++ ++ MSSymbolServerConverter converter(argv[2], vector(1, argv[1])); ++ string converted_file; ++ ++ MSSymbolServerConverter::LocateResult result = ++ converter.LocateAndConvertSymbolFile(missing_info, ++ false, ++ &converted_file, ++ NULL); ++ printf("%s: ", argv[3]); ++ int return_code; ++ switch(result) { ++ case MSSymbolServerConverter::LOCATE_SUCCESS: ++ printf("converted: %s\n", converted_file.c_str()); ++ return_code = 0; ++ break; ++ ++ case MSSymbolServerConverter::LOCATE_RETRY: ++ printf("try again later\n"); ++ return_code = 1; ++ break; ++ ++ case MSSymbolServerConverter::LOCATE_FAILURE: ++ case MSSymbolServerConverter::LOCATE_NOT_FOUND: ++ printf("failed to locate symbols\n"); ++ return_code = 2; ++ break; ++ ++ default: ++ // ??? ++ return_code = 3; ++ break; ++ } ++ fflush(stdout); ++ fflush(stderr); ++ ++ return return_code; ++} +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0014-Build-MinGW-client-library-using-gyp-generated-Makef.patch b/mingw-w64-breakpad-svn/0014-Build-MinGW-client-library-using-gyp-generated-Makef.patch new file mode 100644 index 0000000000..a80c5a2b76 --- /dev/null +++ b/mingw-w64-breakpad-svn/0014-Build-MinGW-client-library-using-gyp-generated-Makef.patch @@ -0,0 +1,56 @@ +From f27d242e8b619d8ae867627cc342c8dc0bf762cc Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Thu, 13 Feb 2014 01:04:51 +0000 +Subject: [PATCH 14/24] Build MinGW client library using gyp-generated Makefile + +Make what it's possible to make with gyp for MinGW. + +Tools which rely on DIA (dump_syms, ms_symbol_server_converter) cannot be built +for MinGW. + +In theory it should be possible to build symupload, because it doesn't depend on +DIA, but it depends on the common_windows_libs, which does have a dependency on +DIA. + +v2: +Use configure to find WINDRES + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 7 +++++++ + configure.ac | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index ad62471..7632ba1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -338,6 +338,13 @@ bin_PROGRAMS += \ + endif + endif + ++if MINGW_HOST ++# For MinGW, use gyp to generate a Makefile to build Windows client library ++all-local: ++ cd $(top_srcdir)/src ; gyp --no-circular-check --depth=. -f make client/windows/breakpad_client.gyp ++ cd $(top_srcdir)/src ; $(MAKE) CXX="$(CXX)" CXXFLAGS="-DUNICODE -D_UNICODE $(AM_CPPFLAGS) $(CXXFLAGS)" RC="$(WINDRES)" ++endif ++ + ## Tests + if !DISABLE_PROCESSOR + check_PROGRAMS += \ +diff --git a/configure.ac b/configure.ac +index a2b9287..b2d8e33 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -47,6 +47,7 @@ AM_PROG_CC_C_O + AC_PROG_CPP + AC_PROG_CXX + AC_PROG_RANLIB ++AC_CHECK_TOOL(WINDRES, [windres]) + AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc + + dnl This must come before all the feature tests below. +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0015-Use-a-default-debug-id-of-all-zeros-when-no-CV-recor.patch b/mingw-w64-breakpad-svn/0015-Use-a-default-debug-id-of-all-zeros-when-no-CV-recor.patch new file mode 100644 index 0000000000..2c60e8b4c6 --- /dev/null +++ b/mingw-w64-breakpad-svn/0015-Use-a-default-debug-id-of-all-zeros-when-no-CV-recor.patch @@ -0,0 +1,69 @@ +From 376d96eb1861ce25d284fa284192c7f2a88dce74 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Sat, 22 Feb 2014 15:59:22 +0000 +Subject: [PATCH 15/24] Use a default debug-id of all zeros when no CV record + is present + +This lets us do something slightly useful with current binaries +which are produced without a CV record, but there is no guarantee +that the actually match. + +Signed-off-by: Jon TURNEY +--- + src/common/pecoff/pecoff_file_id.cc | 8 ++++++++ + src/processor/minidump.cc | 8 ++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/src/common/pecoff/pecoff_file_id.cc b/src/common/pecoff/pecoff_file_id.cc +index 47c2763..04563c8 100644 +--- a/src/common/pecoff/pecoff_file_id.cc ++++ b/src/common/pecoff/pecoff_file_id.cc +@@ -32,6 +32,7 @@ + + #include "common/pecoff/pecoff_file_id.h" + ++#include + #include "common/pecoff/pecoffutils.h" + + namespace google_breakpad { +@@ -73,11 +74,18 @@ bool PeCoffFileID::PeCoffFileIdentifierFromMappedFile(const void* base, + age)) + return true; + ++#if 1 ++ // XXX: Fallback to a default debug_identifier. ++ memset(identifier, 0, kMDGUIDSize); ++ *age = 0; ++ return true; ++#else + // Fall back on hashing the first page of the text section. + // (This is of questionable value as the Windows Minidump writer doesn't have + // this feature) + return HashPeCoffTextSection(reinterpret_cast(base), + identifier); ++#endif + } + + } // namespace google_breakpad +diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc +index 71c8456..fe86478 100644 +--- a/src/processor/minidump.cc ++++ b/src/processor/minidump.cc +@@ -2044,6 +2044,14 @@ string MinidumpModule::debug_identifier() const { + + // TODO(mmentovai): on the Mac, provide fallbacks as in code_identifier(). + ++ // XXX: PE generated with gcc don't currently have CV records, so the Windows ++ // minidumper can't record any identifier information, so there's no useful ++ // identifier for us to match with. Fallback to a default debug_identifier. ++ if (identifier.empty()) ++ { ++ identifier = "000000000000000000000000000000000"; ++ } ++ + // Relatively common case + BPLOG_IF(INFO, identifier.empty()) << "MinidumpModule could not determine " + "debug_identifier for " << *name_; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0016-Increase-RA-scanning-to-60-words.patch b/mingw-w64-breakpad-svn/0016-Increase-RA-scanning-to-60-words.patch new file mode 100644 index 0000000000..27a6de3b77 --- /dev/null +++ b/mingw-w64-breakpad-svn/0016-Increase-RA-scanning-to-60-words.patch @@ -0,0 +1,27 @@ +From ecd4d0f3d96f61f87522a7c34776a280a8233fc1 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Mon, 24 Feb 2014 21:09:24 +0000 +Subject: [PATCH 16/24] Increase RA scanning to 60 words + +http://code.google.com/p/google-breakpad/issues/detail?id=452 +Signed-off-by: Jon TURNEY +--- + src/processor/stackwalker.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/processor/stackwalker.cc b/src/processor/stackwalker.cc +index 424cf4c..bd900e0 100644 +--- a/src/processor/stackwalker.cc ++++ b/src/processor/stackwalker.cc +@@ -58,7 +58,7 @@ + + namespace google_breakpad { + +-const int Stackwalker::kRASearchWords = 30; ++const int Stackwalker::kRASearchWords = 60; + + uint32_t Stackwalker::max_frames_ = 1024; + bool Stackwalker::max_frames_set_ = false; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0017-Use-__USE_MINGW_ANSI_STDIO-for-MinGW-build.patch b/mingw-w64-breakpad-svn/0017-Use-__USE_MINGW_ANSI_STDIO-for-MinGW-build.patch new file mode 100644 index 0000000000..4a300bc224 --- /dev/null +++ b/mingw-w64-breakpad-svn/0017-Use-__USE_MINGW_ANSI_STDIO-for-MinGW-build.patch @@ -0,0 +1,30 @@ +From 5958e3ce981251e29dc51a858123ba57a97a47bd Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 9 Apr 2014 21:14:07 +0100 +Subject: [PATCH 17/24] Use __USE_MINGW_ANSI_STDIO for MinGW build + +Use __USE_MINGW_ANSI_STDIO for ANSI C99 compatible implementation of printf() +and friends on MinGW. +Use _POSIX_C_SOURCE for localtime_r implementation. + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.am b/Makefile.am +index 7632ba1..f1f29f3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -69,6 +69,8 @@ endif + if MINGW_HOST + SOCKET_LIBS = -lws2_32 + AM_CPPFLAGS += -D_POSIX ++AM_CPPFLAGS += -D__USE_MINGW_ANSI_STDIO ++AM_CPPFLAGS += -D_POSIX_C_SOURCE + endif + + # Specify include paths for ac macros +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0018-Provide-a-working-strtok_r-for-MinGW.patch b/mingw-w64-breakpad-svn/0018-Provide-a-working-strtok_r-for-MinGW.patch new file mode 100644 index 0000000000..e6f46e77c4 --- /dev/null +++ b/mingw-w64-breakpad-svn/0018-Provide-a-working-strtok_r-for-MinGW.patch @@ -0,0 +1,213 @@ +From 6ba0bec0545343c9b12c1468839014166a69ddc7 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 9 Apr 2014 23:49:03 +0100 +Subject: [PATCH 18/24] Provide a working strtok_r for MinGW + +Emulating it using strtok will not work as re-entrancy is required + +Signed-off-by: Jon TURNEY +--- + Makefile.am | 2 +- + compat/strtok_r.c | 85 +++++++++++++++++++++++++++++ + configure.ac | 3 + + src/config.h.in | 3 + + src/processor/basic_source_line_resolver.cc | 4 ++ + src/processor/cfi_frame_info.cc | 6 +- + src/processor/tokenize.cc | 6 +- + 7 files changed, 106 insertions(+), 3 deletions(-) + create mode 100644 compat/strtok_r.c + +diff --git a/Makefile.am b/Makefile.am +index f1f29f3..aa333ae 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1183,7 +1183,7 @@ src_processor_minidump_stackwalk_LDADD = \ + src/processor/stackwalker_x86.o \ + src/processor/tokenize.o \ + src/third_party/libdisasm/libdisasm.a \ +- $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SOCKET_LIBS) ++ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SOCKET_LIBS) @LIBOBJS@ + + endif !DISABLE_PROCESSOR + +diff --git a/compat/strtok_r.c b/compat/strtok_r.c +new file mode 100644 +index 0000000..ec7b637 +--- /dev/null ++++ b/compat/strtok_r.c +@@ -0,0 +1,85 @@ ++/*- ++ * Copyright (c) 1998 Softweyr LLC. All rights reserved. ++ * ++ * strtok_r, from Berkeley strtok ++ * Oct 13, 1998 by Wes Peters ++ * ++ * Copyright (c) 1988, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notices, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notices, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by Softweyr LLC, the ++ * University of California, Berkeley, and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS ++ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ++ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE ++ * REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ++ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include ++ ++char * ++strtok_r(char *s, const char *delim, char **last) ++{ ++ char *spanp, *tok; ++ int c, sc; ++ ++ if (s == NULL && (s = *last) == NULL) ++ return (NULL); ++ ++ /* ++ * Skip (span) leading delimiters (s += strspn(s, delim), sort of). ++ */ ++cont: ++ c = *s++; ++ for (spanp = (char *)delim; (sc = *spanp++) != 0;) { ++ if (c == sc) ++ goto cont; ++ } ++ ++ if (c == 0) { /* no non-delimiter characters */ ++ *last = NULL; ++ return (NULL); ++ } ++ tok = s - 1; ++ ++ /* ++ * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). ++ * Note that delim must have one NUL; we stop if we see that, too. ++ */ ++ for (;;) { ++ c = *s++; ++ spanp = (char *)delim; ++ do { ++ if ((sc = *spanp++) == c) { ++ if (c == 0) ++ s = NULL; ++ else ++ s[-1] = '\0'; ++ *last = s; ++ return (tok); ++ } ++ } while (sc != 0); ++ } ++ /* NOTREACHED */ ++} +diff --git a/configure.ac b/configure.ac +index b2d8e33..88cbf36 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -76,6 +76,9 @@ m4_include(m4/ax_pthread.m4) + AX_PTHREAD + AC_CHECK_HEADERS([a.out.h]) + ++AC_CONFIG_LIBOBJ_DIR([compat]) ++AC_REPLACE_FUNCS([strtok_r]) ++ + # Only build Linux client libs when compiling for Linux + case $host in + *-*-linux* | *-android* ) +diff --git a/src/config.h.in b/src/config.h.in +index 1db0159..cd76ccb 100644 +--- a/src/config.h.in ++++ b/src/config.h.in +@@ -24,6 +24,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_STRING_H + ++/* Define to 1 if you have the `strtok_r' function. */ ++#undef HAVE_STRTOK_R ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H + +diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc +index 1d4d0e9..6bbbf13 100644 +--- a/src/processor/basic_source_line_resolver.cc ++++ b/src/processor/basic_source_line_resolver.cc +@@ -49,6 +49,10 @@ + + #include "processor/tokenize.h" + ++#ifndef HAVE_STRTOK_R ++extern "C" char *strtok_r(char *, const char *, char **); ++#endif ++ + using std::map; + using std::vector; + using std::make_pair; +diff --git a/src/processor/cfi_frame_info.cc b/src/processor/cfi_frame_info.cc +index 0c4af7b..dd2b438 100644 +--- a/src/processor/cfi_frame_info.cc ++++ b/src/processor/cfi_frame_info.cc +@@ -41,12 +41,16 @@ + #include "common/scoped_ptr.h" + #include "processor/postfix_evaluator-inl.h" + +-namespace google_breakpad { ++#ifndef HAVE_STRTOK_R ++extern "C" char *strtok_r(char *, const char *, char **); ++#endif + + #ifdef _MSC_VER + #define strtok_r strtok_s + #endif + ++namespace google_breakpad { ++ + template + bool CFIFrameInfo::FindCallerRegs(const RegisterValueMap ®isters, + const MemoryRegion &memory, +diff --git a/src/processor/tokenize.cc b/src/processor/tokenize.cc +index 8fce87a..e6213ac 100644 +--- a/src/processor/tokenize.cc ++++ b/src/processor/tokenize.cc +@@ -34,12 +34,16 @@ + + #include "common/using_std_string.h" + +-namespace google_breakpad { ++#ifndef HAVE_STRTOK_R ++extern "C" char *strtok_r(char *, const char *, char **); ++#endif + + #ifdef _MSC_VER + #define strtok_r strtok_s + #endif + ++namespace google_breakpad { ++ + using std::vector; + + bool Tokenize(char *line, +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0019-Add-a-README.md-with-notes-on-what-is-left-to-do.patch b/mingw-w64-breakpad-svn/0019-Add-a-README.md-with-notes-on-what-is-left-to-do.patch new file mode 100644 index 0000000000..41bd5a5310 --- /dev/null +++ b/mingw-w64-breakpad-svn/0019-Add-a-README.md-with-notes-on-what-is-left-to-do.patch @@ -0,0 +1,99 @@ +From 021a9372d791c8620c30ad841ce293ac8d505ac4 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 5 Feb 2014 13:44:28 +0000 +Subject: [PATCH 19/24] Add a README.md with notes on what is left to do + +Signed-off-by: Jon TURNEY +--- + README.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 79 insertions(+) + create mode 100644 README.md + +diff --git a/README.md b/README.md +new file mode 100644 +index 0000000..6ce8836 +--- /dev/null ++++ b/README.md +@@ -0,0 +1,79 @@ ++# Breakpad for Cygwin/MinGW ++ ++google-breakpad with support added for PE/COFF executables with DWARF debugging ++information, as used by Cygwin/MinGW ++ ++## Compiling ++ ++See README ++ ++```` ++./configure && make ++```` ++ ++will produce dump\_syms, minidump\_dump, minidump\_stackwalk, libbreakpad.a ++and for MinGW libcrash\_generation_client.a, libcrash\_generation_server.a, crash\_generation_app.exe ++ ++Note that since git-svn ignores svn externals, this repository is missing the ++gyp and gtest dependencies. ++ ++## Using ++ ++See http://code.google.com/p/google-breakpad/wiki/GettingStartedWithBreakpad ++ ++### Producing and installing symbols ++ ++```` ++dump_syms crash_generation_app.exe >crash_generation_app.sym ++FILE=`head -1 crash_generation_app.sym | cut -f5 -d' '` ++BUILDID=`head -1 crash_generation_app.sym | cut -f4 -d' '` ++SYMBOLPATH=/symbols/${FILE}/${BUILDID}/ ++mdir -p ${SYMBOLPATH} ++mv crash_generation_app.sym ${SYMBOLPATH} ++```` ++ ++### Generating a minidump file ++ ++A small test application demonstrating out-of-process dumping called ++crash\_generation\_app.exe is built. ++ ++- Run it once, selecting "Server->Start" from the menu ++- Run it again, selecting "Client->Deref zero" ++- Client should crash, and a .dmp is written to C:\Dumps\ ++ ++### Processing the minidump to produce a stack trace ++ ++```` ++minidump_stackwalk blah.dmp /symbols/ ++```` ++ ++## Issues ++ ++### Lack of build-id ++ ++Executables produced by Cygwin/MinGW gcc do not currently contain a build-id. ++On Windows, this build-id takes the form of a CodeView record. ++ ++This build-id is captured for all modules in the process by MiniDumpWriteDump(), ++and is used by the breakpad minidump processing tools to find the matching ++symbol file. ++ ++See http://debuginfo.com/articles/debuginfomatch.html ++ ++I have implemented 'ld --build-id' for PE/COFF executables (See ++https://sourceware.org/ml/binutils/2014-01/msg00296.html), but you must use ++sufficently recent binutils and build with '-Wl,--build-id' (or a gcc configured ++'--enable-linker-build-id' which turns that flag on by defualt) to enable that. ++ ++A tool could be written to add a build-id to existing PE/COFF executables, but in ++practice this turns out to be quite tricky... ++ ++### Symbols from a PDB or the Microsoft Symbol Server ++ ++ ++symsrv_convert and dump_syms for PDB cannot be currently built with MinGW, ++because they require the MS DIA (Debug Interface Access) SDK (which is only in ++paid editions of Visual Studio) and the DIA SDK uses ATL. ++ ++An alternate PDB parser is available at https://github.com/luser/dump_syms, but ++that also needs some work before it can be built with MinGW. +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0020-Support-for-multiple-upload-files-in-Breakpad.patch b/mingw-w64-breakpad-svn/0020-Support-for-multiple-upload-files-in-Breakpad.patch new file mode 100644 index 0000000000..a5eb422368 --- /dev/null +++ b/mingw-w64-breakpad-svn/0020-Support-for-multiple-upload-files-in-Breakpad.patch @@ -0,0 +1,327 @@ +From 2b9f8e15393a39a53896f3b8b820b3a2607fb1c1 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Mon, 13 Oct 2014 16:26:30 +0100 +Subject: [PATCH 20/24] Support for multiple upload files in Breakpad + +https://bugzilla.mozilla.org/show_bug.cgi?id=1048091 +Signed-off-by: Jon TURNEY +--- + src/client/windows/sender/crash_report_sender.cc | 4 +- + src/client/windows/sender/crash_report_sender.h | 4 +- + src/common/http_upload.cc | 15 ++++--- + src/common/http_upload.h | 9 ++-- + src/common/windows/http_upload.cc | 56 ++++++++++++------------ + src/common/windows/http_upload.h | 14 +++--- + src/tools/common/symupload/minidump_upload.cc | 6 ++- + src/tools/common/symupload/sym_upload.cc | 7 ++- + src/tools/windows/symupload/symupload.cc | 6 ++- + 9 files changed, 63 insertions(+), 58 deletions(-) + +diff --git a/src/client/windows/sender/crash_report_sender.cc b/src/client/windows/sender/crash_report_sender.cc +index ecf626d..70c36b0 100644 +--- a/src/client/windows/sender/crash_report_sender.cc ++++ b/src/client/windows/sender/crash_report_sender.cc +@@ -59,7 +59,7 @@ CrashReportSender::CrashReportSender(const wstring &checkpoint_file) + + ReportResult CrashReportSender::SendCrashReport( + const wstring &url, const map ¶meters, +- const wstring &dump_file_name, wstring *report_code) { ++ const map &files, wstring *report_code) { + int today = GetCurrentDate(); + if (today == last_sent_date_ && + max_reports_per_day_ != -1 && +@@ -69,7 +69,7 @@ ReportResult CrashReportSender::SendCrashReport( + + int http_response = 0; + bool result = HTTPUpload::SendRequest( +- url, parameters, dump_file_name, L"upload_file_minidump", NULL, report_code, ++ url, parameters, files, NULL, report_code, + &http_response); + + if (result) { +diff --git a/src/client/windows/sender/crash_report_sender.h b/src/client/windows/sender/crash_report_sender.h +index da1ed0a..7786cc6 100644 +--- a/src/client/windows/sender/crash_report_sender.h ++++ b/src/client/windows/sender/crash_report_sender.h +@@ -77,7 +77,7 @@ class CrashReportSender { + + int max_reports_per_day() const { return max_reports_per_day_; } + +- // Sends the specified minidump file, along with the map of ++ // Sends the specified files, along with the map of + // name value pairs, as a multipart POST request to the given URL. + // Parameter names must contain only printable ASCII characters, + // and may not contain a quote (") character. +@@ -89,7 +89,7 @@ class CrashReportSender { + // (Otherwise, report_code will be unchanged.) + ReportResult SendCrashReport(const wstring &url, + const map ¶meters, +- const wstring &dump_file_name, ++ const map &files, + wstring *report_code); + + private: +diff --git a/src/common/http_upload.cc b/src/common/http_upload.cc +index 91fedf2..4dbbaa8 100644 +--- a/src/common/http_upload.cc ++++ b/src/common/http_upload.cc +@@ -56,8 +56,7 @@ static const char kUserAgent[] = "Breakpad/1.0 (Linux)"; + // static + bool HTTPUpload::SendRequest(const string &url, + const map ¶meters, +- const string &upload_file, +- const string &file_part_name, ++ const map &files, + const string &proxy, + const string &proxy_user_pwd, + const string &ca_certificate_file, +@@ -96,11 +95,13 @@ bool HTTPUpload::SendRequest(const string &url, + CURLFORM_COPYCONTENTS, iter->second.c_str(), + CURLFORM_END); + +- // Add form file. +- curl_formadd(&formpost, &lastptr, +- CURLFORM_COPYNAME, file_part_name.c_str(), +- CURLFORM_FILE, upload_file.c_str(), +- CURLFORM_END); ++ // Add form files. ++ for (iter = files.begin(); iter != files.end(); ++iter) { ++ (*curl_formadd)(&formpost, &lastptr, ++ CURLFORM_COPYNAME, iter->first.c_str(), ++ CURLFORM_FILE, iter->second.c_str(), ++ CURLFORM_END); ++ } + + curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + +diff --git a/src/common/http_upload.h b/src/common/http_upload.h +index 6dd36ea..4f0e452 100644 +--- a/src/common/http_upload.h ++++ b/src/common/http_upload.h +@@ -45,9 +45,9 @@ using std::map; + + class HTTPUpload { + public: +- // Sends the given set of parameters, along with the contents of +- // upload_file, as a multipart POST request to the given URL. +- // file_part_name contains the name of the file part of the request ++ // Sends the given sets of parameters and files as a multipart POST ++ // request to the given URL. ++ // Each key in |files| is the name of the file part of the request + // (i.e. it corresponds to the name= attribute on an . + // Parameter names must contain only printable ASCII characters, + // and may not contain a quote (") character. +@@ -60,8 +60,7 @@ class HTTPUpload { + // returned in error_description. + static bool SendRequest(const string &url, + const map ¶meters, +- const string &upload_file, +- const string &file_part_name, ++ const map &files, + const string &proxy, + const string &proxy_user_pwd, + const string &ca_certificate_file, +diff --git a/src/common/windows/http_upload.cc b/src/common/windows/http_upload.cc +index ba04d7d..7676bdc 100644 +--- a/src/common/windows/http_upload.cc ++++ b/src/common/windows/http_upload.cc +@@ -64,8 +64,7 @@ class HTTPUpload::AutoInternetHandle { + // static + bool HTTPUpload::SendRequest(const wstring &url, + const map ¶meters, +- const wstring &upload_file, +- const wstring &file_part_name, ++ const map &files, + int *timeout, + wstring *response_body, + int *response_code) { +@@ -143,8 +142,7 @@ bool HTTPUpload::SendRequest(const wstring &url, + HTTP_ADDREQ_FLAG_ADD); + + string request_body; +- if (!GenerateRequestBody(parameters, upload_file, +- file_part_name, boundary, &request_body)) { ++ if (!GenerateRequestBody(parameters, files, boundary, &request_body)) { + return false; + } + +@@ -268,15 +266,9 @@ wstring HTTPUpload::GenerateRequestHeader(const wstring &boundary) { + + // static + bool HTTPUpload::GenerateRequestBody(const map ¶meters, +- const wstring &upload_file, +- const wstring &file_part_name, ++ const map &files, + const wstring &boundary, + string *request_body) { +- vector contents; +- if (!GetFileContents(upload_file, &contents)) { +- return false; +- } +- + string boundary_str = WideToUTF8(boundary); + if (boundary_str.empty()) { + return false; +@@ -293,28 +285,36 @@ bool HTTPUpload::GenerateRequestBody(const map ¶meters, + WideToUTF8(pos->second) + "\r\n"); + } + +- // Now append the upload file as a binary (octet-stream) part +- string filename_utf8 = WideToUTF8(upload_file); +- if (filename_utf8.empty()) { +- return false; +- } ++ for (map::const_iterator pos = files.begin(); ++ pos != files.end(); ++pos) { ++ vector contents; ++ if (!GetFileContents(pos->second, &contents)) { ++ return false; ++ } + +- string file_part_name_utf8 = WideToUTF8(file_part_name); +- if (file_part_name_utf8.empty()) { +- return false; +- } ++ // Now append the upload files as a binary (octet-stream) part ++ string filename_utf8 = WideToUTF8(pos->second); ++ if (filename_utf8.empty()) { ++ return false; ++ } ++ ++ string file_part_name_utf8 = WideToUTF8(pos->first); ++ if (file_part_name_utf8.empty()) { ++ return false; ++ } + +- request_body->append("--" + boundary_str + "\r\n"); +- request_body->append("Content-Disposition: form-data; " +- "name=\"" + file_part_name_utf8 + "\"; " +- "filename=\"" + filename_utf8 + "\"\r\n"); +- request_body->append("Content-Type: application/octet-stream\r\n"); +- request_body->append("\r\n"); ++ request_body->append("--" + boundary_str + "\r\n"); ++ request_body->append("Content-Disposition: form-data; " ++ "name=\"" + file_part_name_utf8 + "\"; " ++ "filename=\"" + filename_utf8 + "\"\r\n"); ++ request_body->append("Content-Type: application/octet-stream\r\n"); ++ request_body->append("\r\n"); + +- if (!contents.empty()) { ++ if (!contents.empty()) { + request_body->append(&(contents[0]), contents.size()); ++ } ++ request_body->append("\r\n"); + } +- request_body->append("\r\n"); + request_body->append("--" + boundary_str + "--\r\n"); + return true; + } +diff --git a/src/common/windows/http_upload.h b/src/common/windows/http_upload.h +index e485b70..f8d48cb 100644 +--- a/src/common/windows/http_upload.h ++++ b/src/common/windows/http_upload.h +@@ -54,9 +54,9 @@ using std::vector; + + class HTTPUpload { + public: +- // Sends the given set of parameters, along with the contents of +- // upload_file, as a multipart POST request to the given URL. +- // file_part_name contains the name of the file part of the request ++ // Sends the given sets of parameters and files as a multipart POST ++ // request to the given URL. ++ // Each key in |files| is the name of the file part of the request + // (i.e. it corresponds to the name= attribute on an . + // Parameter names must contain only printable ASCII characters, + // and may not contain a quote (") character. +@@ -67,8 +67,7 @@ class HTTPUpload { + // received (or 0 if the request failed before getting an HTTP response). + static bool SendRequest(const wstring &url, + const map ¶meters, +- const wstring &upload_file, +- const wstring &file_part_name, ++ const map &files, + int *timeout, + wstring *response_body, + int *response_code); +@@ -88,12 +87,11 @@ class HTTPUpload { + // Generates a HTTP request header for a multipart form submit. + static wstring GenerateRequestHeader(const wstring &boundary); + +- // Given a set of parameters, an upload filename, and a file part name, ++ // Given a set of parameters, a set of upload files, and a file part name, + // generates a multipart request body string with these parameters + // and minidump contents. Returns true on success. + static bool GenerateRequestBody(const map ¶meters, +- const wstring &upload_file, +- const wstring &file_part_name, ++ const map &files, + const wstring &boundary, + string *request_body); + +diff --git a/src/tools/common/symupload/minidump_upload.cc b/src/tools/common/symupload/minidump_upload.cc +index f1146ac..ed0dd5f 100644 +--- a/src/tools/common/symupload/minidump_upload.cc ++++ b/src/tools/common/symupload/minidump_upload.cc +@@ -62,12 +62,14 @@ static void Start(Options *options) { + parameters["prod"] = options->product; + parameters["ver"] = options->version; + ++ std::map files; ++ files["upload_file_minidump"] = options->minidumpPath; ++ + // Send it + string response, error; + bool success = HTTPUpload::SendRequest(options->uploadURLStr, + parameters, +- options->minidumpPath, +- "upload_file_minidump", ++ files, + options->proxy, + options->proxy_user_pwd, + "", +diff --git a/src/tools/common/symupload/sym_upload.cc b/src/tools/common/symupload/sym_upload.cc +index bc2693e..0246044 100644 +--- a/src/tools/common/symupload/sym_upload.cc ++++ b/src/tools/common/symupload/sym_upload.cc +@@ -139,12 +139,15 @@ static void Start(Options *options) { + parameters["debug_file"] = module_parts[4]; + parameters["code_file"] = module_parts[4]; + parameters["debug_identifier"] = compacted_id; ++ ++ std::map files; ++ files["symbol_file"] = options->symbolsPath; ++ + string response, error; + long response_code; + bool success = HTTPUpload::SendRequest(options->uploadURLStr, + parameters, +- options->symbolsPath, +- "symbol_file", ++ files, + options->proxy, + options->proxy_user_pwd, + "", +diff --git a/src/tools/windows/symupload/symupload.cc b/src/tools/windows/symupload/symupload.cc +index df4bb69..fa5294d 100644 +--- a/src/tools/windows/symupload/symupload.cc ++++ b/src/tools/windows/symupload/symupload.cc +@@ -228,12 +228,14 @@ int wmain(int argc, wchar_t *argv[]) { + fwprintf(stderr, L"Warning: Could not get file version for %s\n", module); + } + ++ map files; ++ files[L"symbol_file"] = symbol_file; ++ + bool success = true; + + while (currentarg < argc) { + int response_code; +- if (!HTTPUpload::SendRequest(argv[currentarg], parameters, +- symbol_file, L"symbol_file", ++ if (!HTTPUpload::SendRequest(argv[currentarg], parameters, files, + timeout == -1 ? NULL : &timeout, + nullptr, &response_code)) { + success = false; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0021-Fallback-to-synthesizing-a-debug-id-from-version-and.patch b/mingw-w64-breakpad-svn/0021-Fallback-to-synthesizing-a-debug-id-from-version-and.patch new file mode 100644 index 0000000000..306d2287c8 --- /dev/null +++ b/mingw-w64-breakpad-svn/0021-Fallback-to-synthesizing-a-debug-id-from-version-and.patch @@ -0,0 +1,62 @@ +From 87b47575d002f2a542a408490b5f7c963cb43dc9 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Thu, 16 Oct 2014 00:53:55 +0100 +Subject: [PATCH 21/24] Fallback to synthesizing a debug-id from version and + architecture, if possible + +Based on an idea by Ivan Gubarev + +Ideally there would be a similar change in PeCoffFileIdentifierFromMappedFile(), +but that is not written yet... + +Signed-off-by: Jon TURNEY +--- + src/processor/minidump.cc | 32 +++++++++++++++++++++++++++++--- + 1 file changed, 29 insertions(+), 3 deletions(-) + +diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc +index fe86478..c143e89 100644 +--- a/src/processor/minidump.cc ++++ b/src/processor/minidump.cc +@@ -2044,9 +2044,35 @@ string MinidumpModule::debug_identifier() const { + + // TODO(mmentovai): on the Mac, provide fallbacks as in code_identifier(). + +- // XXX: PE generated with gcc don't currently have CV records, so the Windows +- // minidumper can't record any identifier information, so there's no useful +- // identifier for us to match with. Fallback to a default debug_identifier. ++ // If possible, synthesize a debug_identifier from the version and ++ // architecture. ++ if (identifier.empty()) { ++ std::string ver = version(); ++ if (ver.compare("") != 0) { ++ identifier = ""; ++ for (std::string::const_iterator i = ver.begin(); i != ver.end(); i++) { ++ if (isxdigit(*i)) { ++ identifier += *i; ++ } ++ } ++ ++ MinidumpSystemInfo *minidump_system_info = minidump_->GetSystemInfo(); ++ if (minidump_system_info) { ++ std::string cpu = minidump_system_info->GetCPU(); ++ for (std::string::const_iterator i = cpu.begin(); i != cpu.end(); i++) { ++ char ashex[4]; ++ snprintf(ashex, sizeof(ashex), "%02x", *i); ++ identifier += ashex; ++ } ++ } ++ ++ while (identifier.size() < 33) { ++ identifier += "0"; ++ } ++ } ++ } ++ ++ // Fallback to a default debug_identifier + if (identifier.empty()) + { + identifier = "000000000000000000000000000000000"; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0022-Fix-typo-in-the-name-of-the-info-entry-containing-up.patch b/mingw-w64-breakpad-svn/0022-Fix-typo-in-the-name-of-the-info-entry-containing-up.patch new file mode 100644 index 0000000000..1de76a0269 --- /dev/null +++ b/mingw-w64-breakpad-svn/0022-Fix-typo-in-the-name-of-the-info-entry-containing-up.patch @@ -0,0 +1,29 @@ +From d37f257d2849a87cf9499d26cf0f62169baa9c0f Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 19 Nov 2014 11:22:53 +0000 +Subject: [PATCH 22/24] Fix typo in the name of the info entry containing + uptime + +I'm assuming this is a typo, although it's been this way since it was added in r280 + +Signed-off-by: Jon TURNEY +--- + src/client/windows/crash_generation/client_info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/client/windows/crash_generation/client_info.cc b/src/client/windows/crash_generation/client_info.cc +index 30a48db..fb29362 100644 +--- a/src/client/windows/crash_generation/client_info.cc ++++ b/src/client/windows/crash_generation/client_info.cc +@@ -30,7 +30,7 @@ + #include "client/windows/crash_generation/client_info.h" + #include "client/windows/common/ipc_protocol.h" + +-static const wchar_t kCustomInfoProcessUptimeName[] = L"ptime"; ++static const wchar_t kCustomInfoProcessUptimeName[] = L"uptime"; + static const size_t kMaxCustomInfoEntries = 4096; + + namespace google_breakpad { +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0023-Fix-a-missing-r-in-crash_generation_app.patch b/mingw-w64-breakpad-svn/0023-Fix-a-missing-r-in-crash_generation_app.patch new file mode 100644 index 0000000000..72cca01365 --- /dev/null +++ b/mingw-w64-breakpad-svn/0023-Fix-a-missing-r-in-crash_generation_app.patch @@ -0,0 +1,30 @@ +From c36bfdb12226265298e3ba8f741f7ffb9b6daf91 Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 19 Nov 2014 11:29:44 +0000 +Subject: [PATCH 23/24] Fix a missing \r in crash_generation_app + +Fix a missing \r in crash_generation_app + +I thought this made a difference, but it doesn't seem to... + +Signed-off-by: Jon TURNEY +--- + src/client/windows/tests/crash_generation_app/crash_generation_app.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/client/windows/tests/crash_generation_app/crash_generation_app.cc b/src/client/windows/tests/crash_generation_app/crash_generation_app.cc +index 09a0aae..fae735e 100644 +--- a/src/client/windows/tests/crash_generation_app/crash_generation_app.cc ++++ b/src/client/windows/tests/crash_generation_app/crash_generation_app.cc +@@ -254,7 +254,7 @@ static void _cdecl ShowClientCrashed(void* context, + line[0] = _T('\0'); + result = swprintf_s(line, + kMaximumLineLength, +- L"%s\n", ++ L"%s\r\n", + str_line.c_str()); + if (result == -1) { + delete[] line; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0024-Disable-timeout-waiting-for-crash-reporting-server.patch b/mingw-w64-breakpad-svn/0024-Disable-timeout-waiting-for-crash-reporting-server.patch new file mode 100644 index 0000000000..cdbbb006df --- /dev/null +++ b/mingw-w64-breakpad-svn/0024-Disable-timeout-waiting-for-crash-reporting-server.patch @@ -0,0 +1,31 @@ +From d4d71ae2d604f215a687d931aa76ff7923ffa60f Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Wed, 19 Nov 2014 11:32:43 +0000 +Subject: [PATCH 24/24] Disable timeout waiting for crash reporting server + +15s is not enough if we are going to ask user if they want make a dump etc. + +Perhaps I need to change my server implementation to do the dump, then ask +if should be uploaded etc. ? + +Signed-off-by: Jon TURNEY +--- + src/client/windows/crash_generation/crash_generation_client.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/client/windows/crash_generation/crash_generation_client.cc b/src/client/windows/crash_generation/crash_generation_client.cc +index 1e86dce..9204feb 100644 +--- a/src/client/windows/crash_generation/crash_generation_client.cc ++++ b/src/client/windows/crash_generation/crash_generation_client.cc +@@ -36,7 +36,7 @@ namespace google_breakpad { + + const int kPipeBusyWaitTimeoutMs = 2000; + +-#ifdef _DEBUG ++#if 1 + const DWORD kWaitForServerTimeoutMs = INFINITE; + #else + const DWORD kWaitForServerTimeoutMs = 15000; +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0026-Fixes-for-sign-compare-warnings-due-to-signedness-of.patch b/mingw-w64-breakpad-svn/0026-Fixes-for-sign-compare-warnings-due-to-signedness-of.patch new file mode 100644 index 0000000000..5c4eea516b --- /dev/null +++ b/mingw-w64-breakpad-svn/0026-Fixes-for-sign-compare-warnings-due-to-signedness-of.patch @@ -0,0 +1,68 @@ +From 9e32014535bd3dfb8f536dd80e6d86a17406308c Mon Sep 17 00:00:00 2001 +From: Jon TURNEY +Date: Mon, 12 Jan 2015 21:45:14 +0000 +Subject: [PATCH 26/27] Fixes for sign-compare warnings due to signedness of + size_t + +Reported by AmR|EiSa + +src/common/pecoff/pecoffutils.cc:315:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] + for (int idx = 0; idx < kMDGUIDSize; ++idx) { + ^ +src/common/pecoff/pecoffutils.cc:358:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] + for (int i = 0; i < debug_directory_size/sizeof(PeDebugDirectory); i++) { + ^ +src/common/pecoff/pecoffutils.cc:457:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] + if (data_directory_size < entry) +--- + src/common/pecoff/pecoffutils.cc | 6 +++--- + src/common/pecoff/pecoffutils.h | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/common/pecoff/pecoffutils.cc b/src/common/pecoff/pecoffutils.cc +index 158270d..a9ff0a2 100644 +--- a/src/common/pecoff/pecoffutils.cc ++++ b/src/common/pecoff/pecoffutils.cc +@@ -312,7 +312,7 @@ PeCoffObjectFileReader::FileIdentifierFromMappedFile( + // dashes removed. + char identifier_str[40]; + int buffer_idx = 0; +- for (int idx = 0; idx < kMDGUIDSize; ++idx) { ++ for (unsigned int idx = 0; idx < kMDGUIDSize; ++idx) { + int hi = (identifier_swapped[idx] >> 4) & 0x0F; + int lo = (identifier_swapped[idx]) & 0x0F; + +@@ -355,7 +355,7 @@ bool PeCoffObjectFileReader::GetBuildID( + } + + // search the debug directory for a codeview entry +- for (int i = 0; i < debug_directory_size/sizeof(PeDebugDirectory); i++) { ++ for (unsigned int i = 0; i < debug_directory_size/sizeof(PeDebugDirectory); i++) { + if (debug_directory[i].mType == IMAGE_DEBUG_TYPE_CODEVIEW) { + // interpret the codeview record to get build-id + const CvInfoPbd70* codeview_record = reinterpret_cast +@@ -446,7 +446,7 @@ const char* PeCoffObjectFileReader::GetStringTable( + template + const PeDataDirectory* + PeCoffObjectFileReader::GetDataDirectoryEntry( +- ObjectFileBase obj_base, int entry) { ++ ObjectFileBase obj_base, unsigned int entry) { + const PeOptionalHeader* peOptionalHeader = GetOptionalHeader(obj_base); + + // the data directory immediately follows the optional header +diff --git a/src/common/pecoff/pecoffutils.h b/src/common/pecoff/pecoffutils.h +index 5553d9f..3e2d7b3 100644 +--- a/src/common/pecoff/pecoffutils.h ++++ b/src/common/pecoff/pecoffutils.h +@@ -155,7 +155,7 @@ class PeCoffObjectFileReader { + static const PeSectionHeader* GetSectionTable(ObjectFileBase obj_base); + static const char* GetStringTable(ObjectFileBase obj_base); + static const PeDataDirectory* GetDataDirectoryEntry(ObjectFileBase obj_base, +- int entry); ++ unsigned int entry); + static const uint8_t* ConvertRVAToPointer(ObjectFileBase obj_base, Offset rva); + }; + +-- +2.1.1 + diff --git a/mingw-w64-breakpad-svn/0027-google-breakpad-0.1.svn.1413-libtool.patch b/mingw-w64-breakpad-svn/0027-google-breakpad-0.1.svn.1413-libtool.patch new file mode 100644 index 0000000000..11375cd2a2 --- /dev/null +++ b/mingw-w64-breakpad-svn/0027-google-breakpad-0.1.svn.1413-libtool.patch @@ -0,0 +1,224 @@ +diff -rupN google-breakpad-0.1.svn.969/configure.ac google-breakpad-0.1.svn.969_mod/configure.ac +--- google-breakpad-0.1.svn.969/configure.ac 2012-06-12 01:52:23.000000000 +0200 ++++ google-breakpad-0.1.svn.969_mod/configure.ac 2012-06-12 13:20:41.264351886 +0200 +@@ -44,7 +44,7 @@ AC_PROG_CC + AM_PROG_CC_C_O + AC_PROG_CPP + AC_PROG_CXX +-AC_PROG_RANLIB ++LT_INIT([disable-shared]) + AC_CHECK_TOOL(WINDRES, [windres]) + AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc + +diff -rupN google-breakpad-0.1.svn.969/Makefile.am google-breakpad-0.1.svn.969_mod/Makefile.am +--- google-breakpad-0.1.svn.969/Makefile.am 2012-06-12 01:52:23.000000000 +0200 ++++ google-breakpad-0.1.svn.969_mod/Makefile.am 2012-06-12 13:14:22.051174459 +0200 +@@ -122,22 +122,22 @@ + pkgconfig_DATA = + + ## Libraries +-noinst_LIBRARIES = +-lib_LIBRARIES = ++noinst_LTLIBRARIES = ++lib_LTLIBRARIES = + bin_PROGRAMS = + check_PROGRAMS = + + if !DISABLE_PROCESSOR +-lib_LIBRARIES += src/libbreakpad.a ++lib_LTLIBRARIES += src/libbreakpad.la + pkgconfig_DATA += breakpad.pc +-noinst_LIBRARIES += src/third_party/libdisasm/libdisasm.a ++noinst_LTLIBRARIES += src/third_party/libdisasm/libdisasm.la + endif + + if LINUX_HOST +-lib_LIBRARIES += src/client/linux/libbreakpad_client.a ++lib_LTLIBRARIES += src/client/linux/libbreakpad_client.la + pkgconfig_DATA += breakpad-client.pc + +-src_client_linux_libbreakpad_client_a_SOURCES = \ ++src_client_linux_libbreakpad_client_la_SOURCES = \ + src/client/linux/crash_generation/crash_generation_client.cc \ + src/client/linux/crash_generation/crash_generation_server.cc \ + src/client/linux/dump_writer_common/seccomp_unwinder.cc \ +@@ -161,13 +161,13 @@ + src/common/linux/memory_mapped_file.cc \ + src/common/linux/safe_readlink.cc + if ANDROID_HOST +-src_client_linux_libbreakpad_client_a_SOURCES += \ ++src_client_linux_libbreakpad_client_la_SOURCES += \ + src/common/android/breakpad_getcontext.S + endif + endif LINUX_HOST + + if !DISABLE_PROCESSOR +-src_libbreakpad_a_SOURCES = \ ++src_libbreakpad_la_SOURCES = \ + src/google_breakpad/common/breakpad_types.h \ + src/google_breakpad/common/minidump_format.h \ + src/google_breakpad/common/minidump_size.h \ +@@ -283,9 +283,9 @@ + src/processor/tokenize.cc \ + src/processor/tokenize.h + +-src_libbreakpad_a_LIBADD = src/third_party/libdisasm/libdisasm.a ++src_libbreakpad_la_LIBADD = src/third_party/libdisasm/libdisasm.la + +-src_third_party_libdisasm_libdisasm_a_SOURCES = \ ++src_third_party_libdisasm_libdisasm_la_SOURCES = \ + src/third_party/libdisasm/ia32_implicit.c \ + src/third_party/libdisasm/ia32_implicit.h \ + src/third_party/libdisasm/ia32_insn.c \ +@@ -489,7 +489,8 @@ + -I$(top_srcdir)/src/testing/include \ + -I$(top_srcdir)/src/testing/gtest/include \ + -I$(top_srcdir)/src/testing/gtest \ +- -I$(top_srcdir)/src/testing ++ -I$(top_srcdir)/src/testing \ ++ $(AM_CPPFLAGS) + src_client_linux_linux_client_unittest_shlib_LDFLAGS = \ + -shared \ + -Wl,-h,linux_client_unittest_shlib +@@ -525,8 +526,8 @@ + + src_client_linux_linux_client_unittest_shlib_DEPENDENCIES = \ + src/client/linux/linux_dumper_unittest_helper \ +- src/client/linux/libbreakpad_client.a \ +- src/libbreakpad.a ++ src/client/linux/libbreakpad_client.la \ ++ src/libbreakpad.la + + src_client_linux_linux_client_unittest_SOURCES = + src_client_linux_linux_client_unittest_LDFLAGS = \ +@@ -549,8 +550,11 @@ + src/common/linux/elf_core_dump.cc + + src_tools_linux_core2md_core2md_LDADD = \ +- src/client/linux/libbreakpad_client.a ++ src/client/linux/libbreakpad_client.la \ ++ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + ++src_tools_linux_dump_syms_dump_syms_CPPFLAGS = \ ++ $(AM_CPPFLAGS) + src_tools_linux_dump_syms_dump_syms_SOURCES = \ + src/common/dwarf_cfi_to_module.cc \ + src/common/dwarf_cu_to_module.cc \ +@@ -572,6 +576,8 @@ + src/common/linux/safe_readlink.cc \ + src/tools/linux/dump_syms/dump_syms.cc + ++src_tools_linux_md2core_minidump_2_core_CPPFLAGS = \ ++ $(AM_CPPFLAGS) + src_tools_linux_md2core_minidump_2_core_SOURCES = \ + src/common/linux/memory_mapped_file.cc \ + src/tools/linux/md2core/minidump-2-core.cc +@@ -629,7 +635,8 @@ + -I$(top_srcdir)/src/testing/gtest/include \ + -I$(top_srcdir)/src/testing/gtest \ + -I$(top_srcdir)/src/testing \ +- $(PTHREAD_CFLAGS) ++ $(PTHREAD_CFLAGS) \ ++ $(AM_CPPFLAGS) + src_common_dumper_unittest_LDADD = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + endif + +@@ -775,7 +782,7 @@ + src/processor/stackwalker_x86.o \ + src/processor/symbolic_constants_win.o \ + src/processor/tokenize.o \ +- src/third_party/libdisasm/libdisasm.a \ ++ src/third_party/libdisasm/libdisasm.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + + src_processor_disassembler_x86_unittest_SOURCES = \ +@@ -791,7 +798,7 @@ + -I$(top_srcdir)/src/testing + src_processor_disassembler_x86_unittest_LDADD = \ + src/processor/disassembler_x86.o \ +- src/third_party/libdisasm/libdisasm.a \ ++ src/third_party/libdisasm/libdisasm.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + + src_processor_fast_source_line_resolver_unittest_SOURCES = \ +@@ -910,7 +917,7 @@ + src/processor/stackwalker_x86.o \ + src/processor/symbolic_constants_win.o \ + src/processor/tokenize.o \ +- src/third_party/libdisasm/libdisasm.a \ ++ src/third_party/libdisasm/libdisasm.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + + src_processor_minidump_unittest_SOURCES = \ +@@ -1051,7 +1058,7 @@ + src/testing/gtest/src/gtest_main.cc \ + src/testing/src/gmock-all.cc + src_processor_stackwalker_amd64_unittest_LDADD = \ +- src/libbreakpad.a \ ++ src/libbreakpad.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + src_processor_stackwalker_amd64_unittest_CPPFLAGS = \ + -I$(top_srcdir)/src \ +@@ -1067,7 +1074,7 @@ + src/testing/gtest/src/gtest_main.cc \ + src/testing/src/gmock-all.cc + src_processor_stackwalker_arm_unittest_LDADD = \ +- src/libbreakpad.a \ ++ src/libbreakpad.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + src_processor_stackwalker_arm_unittest_CPPFLAGS = \ + -I$(top_srcdir)/src \ +@@ -1083,7 +1090,7 @@ + src/testing/gtest/src/gtest_main.cc \ + src/testing/src/gmock-all.cc + src_processor_stackwalker_arm64_unittest_LDADD = \ +- src/libbreakpad.a \ ++ src/libbreakpad.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + src_processor_stackwalker_arm64_unittest_CPPFLAGS = \ + -I$(top_srcdir)/src \ +@@ -1099,7 +1106,7 @@ + src/testing/gtest/src/gtest_main.cc \ + src/testing/src/gmock-all.cc + src_processor_stackwalker_address_list_unittest_LDADD = \ +- src/libbreakpad.a \ ++ src/libbreakpad.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + src_processor_stackwalker_address_list_unittest_CPPFLAGS = \ + -I$(top_srcdir)/src \ +@@ -1115,7 +1122,7 @@ + src/testing/gtest/src/gtest_main.cc \ + src/testing/src/gmock-all.cc + src_processor_stackwalker_mips_unittest_LDADD = \ +- src/libbreakpad.a \ ++ src/libbreakpad.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + src_processor_stackwalker_mips_unittest_CPPFLAGS = \ + -I$(top_srcdir)/src \ +@@ -1131,7 +1138,7 @@ + src/testing/gtest/src/gtest_main.cc \ + src/testing/src/gmock-all.cc + src_processor_stackwalker_x86_unittest_LDADD = \ +- src/libbreakpad.a \ ++ src/libbreakpad.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + src_processor_stackwalker_x86_unittest_CPPFLAGS = \ + -I$(top_srcdir)/src \ +@@ -1219,7 +1226,7 @@ + src/processor/stackwalker_sparc.o \ + src/processor/stackwalker_x86.o \ + src/processor/tokenize.o \ +- src/third_party/libdisasm/libdisasm.a \ ++ src/third_party/libdisasm/libdisasm.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SOCKET_LIBS) + + src_processor_minidump_stackwalk_SOURCES = \ +@@ -1258,7 +1265,7 @@ + src/processor/stackwalker_x86.o \ + src/processor/symbolic_constants_win.o \ + src/processor/tokenize.o \ +- src/third_party/libdisasm/libdisasm.a \ ++ src/third_party/libdisasm/libdisasm.la \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(SOCKET_LIBS) @LIBOBJS@ + + endif !DISABLE_PROCESSOR diff --git a/mingw-w64-breakpad-svn/0028-pecoff-fix-assign-const.patch b/mingw-w64-breakpad-svn/0028-pecoff-fix-assign-const.patch new file mode 100644 index 0000000000..8f1ff10286 --- /dev/null +++ b/mingw-w64-breakpad-svn/0028-pecoff-fix-assign-const.patch @@ -0,0 +1,13 @@ +--- breakpad.build.x86_64/src/common/pecoff/pecoffutils.cc.orig 2015-07-18 20:50:02.583426500 +0300 ++++ breakpad.build.x86_64/src/common/pecoff/pecoffutils.cc 2015-07-18 20:50:19.279381500 +0300 +@@ -267,9 +267,8 @@ + (export_rva < (data_directory_export_entry->mVirtualAddress + data_directory_export_entry->mSize))) + continue; + +- Module::Extern* ext = new Module::Extern; ++ Module::Extern* ext = new Module::Extern(export_rva + GetLoadingAddress(obj_base)); + ext->name = export_name; +- ext->address = export_rva + GetLoadingAddress(obj_base); + module->AddExtern(ext); + } + diff --git a/mingw-w64-breakpad-svn/Makefile b/mingw-w64-breakpad-svn/Makefile new file mode 100644 index 0000000000..eab8691509 --- /dev/null +++ b/mingw-w64-breakpad-svn/Makefile @@ -0,0 +1,18 @@ +CXX=g++ +WINDRES=windres +CXXFLAGS=-DUNICODE -D_UNICODE +LDFLAGS=-mwindows -municode + +OBJS=abstract_class.o crash_generation_app.o resource.o +LIBS=-lbreakpad_client + +all: crash_generation_app.exe + +resource.o: resource.rc small.ico crash_generation_app.ico + $(WINDRES) resource.rc $@ + +crash_generation_app.exe: $(OBJS) + $(CXX) -o $@ $(OBJS) $(LIBS) $(LDFLAGS) + +clean: + ${RM} ${OBJS} diff --git a/mingw-w64-breakpad-svn/PKGBUILD b/mingw-w64-breakpad-svn/PKGBUILD new file mode 100644 index 0000000000..1ae5ff717b --- /dev/null +++ b/mingw-w64-breakpad-svn/PKGBUILD @@ -0,0 +1,191 @@ +# Maintainer: Jon Turney +# Contributor: Renato Silva +# Contributor: Alexey Pavlov + +_realname=breakpad +pkgbase=mingw-w64-${_realname}-svn +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}-svn) +provides=(${MINGW_PACKAGE_PREFIX}-${_realname}) +conflicts=(${MINGW_PACKAGE_PREFIX}-${_realname}) +pkgver=r1471 +pkgrel=1 +url='https://code.google.com/p/google-breakpad' +pkgdesc='An open-source multi-platform crash reporting system (mingw-w64)' +license=('BSD') +arch=('any') +depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs) +makedepends=(${MINGW_PACKAGE_PREFIX}-curl rsync subversion git gyp) +source=(${_realname}.svn::"svn+http://google-breakpad.googlecode.com/svn/trunk#revision=1471" + 0003-Build-minidump_upload-sym_upload-for-all-targets.patch + 0004-Remove-local-copy-of-curl-headers.patch + 0005-Add-support-for-DWARF-in-PECOFF-as-used-by-Cygwin-an.patch + 0006-Fix-building-minidump-processor-for-MinGW.patch + 0007-Build-PECOFF-DWARF-dump_syms-for-MinGW.patch + 0008-Fix-building-client-library-and-upload-tools-for-Min.patch + 0009-Fix-common.gypi-to-allow-gyp-to-generate-Makefiles-o.patch + 0010-Teach-gyp-generated-Makefile-to-build-crash_generati.patch + 0011-Default-debug_file-to-the-code_file-basename.patch + 0012-Fix-building-windows-client-unit-tests-with-gcc.patch + 0013-Add-symsrv_convert.patch + 0014-Build-MinGW-client-library-using-gyp-generated-Makef.patch + 0015-Use-a-default-debug-id-of-all-zeros-when-no-CV-recor.patch + 0016-Increase-RA-scanning-to-60-words.patch + 0017-Use-__USE_MINGW_ANSI_STDIO-for-MinGW-build.patch + 0018-Provide-a-working-strtok_r-for-MinGW.patch + 0019-Add-a-README.md-with-notes-on-what-is-left-to-do.patch + 0020-Support-for-multiple-upload-files-in-Breakpad.patch + 0021-Fallback-to-synthesizing-a-debug-id-from-version-and.patch + 0022-Fix-typo-in-the-name-of-the-info-entry-containing-up.patch + 0023-Fix-a-missing-r-in-crash_generation_app.patch + 0024-Disable-timeout-waiting-for-crash-reporting-server.patch + 0026-Fixes-for-sign-compare-warnings-due-to-signedness-of.patch + 0027-google-breakpad-0.1.svn.1413-libtool.patch + 0028-pecoff-fix-assign-const.patch + gyp-regenerate-no-circular-check.patch + Makefile + README.sample) + +pkgver() { + cd "${srcdir}/${_realname}.svn" + printf "r%s" "$(svnversion | tr -d 'A-z')" +} + +prepare() { + msg2 "Creating patched-source directory" + [[ -d "${srcdir}/${_realname}.patched" ]] && rm -rf "${srcdir}/${_realname}.patched" + mkdir -p "${srcdir}/${_realname}.patched" + cp -r "${srcdir}/${_realname}.svn"/* "${srcdir}/${_realname}.patched" + + # Apply patches + cd "${srcdir}/${_realname}.patched" + for patch in "${srcdir}"/0*.patch; do + msg2 "Applying ${patch} ..." + patch -p1 -i "${patch}" + done + patch -p2 -i "${srcdir}/gyp-regenerate-no-circular-check.patch" + + msg2 "Running autoreconf" + autoreconf -sif +} + +build() { + msg2 "Synchronizing build directory" + rsync --recursive --times --links "${srcdir}/${_realname}.patched"/* "${srcdir}/${_realname}.build.${CARCH}" + + cd "${srcdir}/${_realname}.build.${CARCH}" + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + + make CXXFLAGS="-Wno-error=reorder -DUNICODE -D_UNICODE -g" AR=${MINGW_PREFIX}/bin/ar RC=${MINGW_PREFIX}/bin/windres +} + +package() { + cd "${srcdir}/${_realname}.build.${CARCH}" + make CXXFLAGS="-Wno-error=reorder -DUNICODE -D_UNICODE -g" AR=${MINGW_PREFIX}/bin/ar RC=${MINGW_PREFIX}/bin/windres DESTDIR="${pkgdir}" install + + # Install headers + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad" + cd "${pkgdir}${MINGW_PREFIX}/include/breakpad" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad/common/" + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/google_breakpad/common/* common/ + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/common/scoped_ptr.h common/ + + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad/common/windows" + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/common/windows/string_utils-inl.h common/windows/ + + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad/client/windows/crash_generation" + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/crash_generation/client_info.h client/windows/crash_generation/ + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/crash_generation/crash_generation_client.h client/windows/crash_generation/ + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/crash_generation/crash_generation_server.h client/windows/crash_generation/ + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/crash_generation/minidump_generator.h client/windows/crash_generation/ + + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad/client/windows/common" + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/common/ipc_protocol.h client/windows/common/ + + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad/client/windows/handler" + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/handler/exception_handler.h client/windows/handler/ + + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/breakpad/client/windows/sender" + cp -v ${srcdir}/${_realname}.build.${CARCH}/src/client/windows/sender/crash_report_sender.h client/windows/sender/ + + # Headers aren't really designed to be installed, so we need to do some + # rewriting to make them usefully included using "include " + find ${pkgdir} -name *.h -exec sed -i -e's#client/windows/#breakpad/client/windows/#' {} \; + find ${pkgdir} -name *.h -exec sed -i -e's#common/scoped_ptr#breakpad/common/scoped_ptr#' {} \; + find ${pkgdir} -name *.h -exec sed -i -e's#common/windows/#breakpad/common/windows/#' {} \; + find ${pkgdir} -name *.h -exec sed -i -e's#google_breakpad/common/#breakpad/common/#' {} \; + + # Install a single client library + cd "${pkgdir}${MINGW_PREFIX}/lib" + local _windir=$(cygpath -wm ${srcdir}) + ${MINGW_PREFIX}/bin/ar -M <Server->Start. +This is now the 'Server'. + +Run the executable AGAIN (a second instance). This is now the 'Client'. You +should see a message like "Client connected" in the Server. In the Client, +click Menu->Client->Deref Zero + +The client should crash, and you should see a message like "Client requested +dump" in the server. + +In c:\dumps you now have a .dmp file. You can inspect that with +minidump_stackwalk or open in it WinDbg. + +Integrating BreakPad into your application +========================================== + +See http://code.google.com/p/google-breakpad/wiki/WindowsClientIntegration + +In your main() function (or equivalent), before your program does any real work, +add the following: + +#include + +int main() { + ... + + static wstring prod = get_myapp_name(); + static wstring ver = get_myapp_version(); + static wstring subver = get_myapp_subversion(); + + static int google_custom_count = 3; + static google_breakpad::CustomInfoEntry google_custom_entries[] = { + google_breakpad::CustomInfoEntry(L"prod", prod.c_str()), + google_breakpad::CustomInfoEntry(L"ver", ver.c_str()), + google_breakpad::CustomInfoEntry(L"subver", subver.c_str()), + }; + + google_breakpad::CustomClientInfo custom_info = {google_custom_entries, + google_custom_count}; + + google_breakpad::ExceptionHandler * google_pad = new + google_breakpad::ExceptionHandler( + L"C:\\dumps\\", // dump path + NULL, // filter callback + NULL, // MinidumpCallback, + NULL, // callback context + google_breakpad::ExceptionHandler::HANDLER_ALL, // handler types + MiniDumpNormal, // or for a larger dump: MiniDumpWithFullMemory + NULL, // pipe name + &custom_info); // custom info + + ... + } + +If you define MinidumpCallback, the signature is like so: bool +MinidumpCallback(const wchar_t* dump_path, const wchar_t* minidump_id, void* +context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion, bool +succeeded); + +The callback is the point where you could spawn another program that tells the +user that the program has crashed etc. + +The above code will generate dumps in the c:\dumps folder. MAKE SURE the folder +is created first. diff --git a/mingw-w64-breakpad-svn/gyp-regenerate-no-circular-check.patch b/mingw-w64-breakpad-svn/gyp-regenerate-no-circular-check.patch new file mode 100644 index 0000000000..5e4b806ef1 --- /dev/null +++ b/mingw-w64-breakpad-svn/gyp-regenerate-no-circular-check.patch @@ -0,0 +1,11 @@ +--- origsrc/svn/src/tools/gyp/pylib/gyp/__init__.py 2012-08-07 22:25:40.000000000 +0100 ++++ src/svn/src/tools/gyp/pylib/gyp/__init__.py 2014-02-12 00:39:43.298921600 +0000 +@@ -328,7 +328,7 @@ def gyp_main(args): + # behavior to be used elsewhere. + # TODO(mark): Remove this option when http://crbug.com/35878 is fixed. + parser.add_option('--no-circular-check', dest='circular_check', +- action='store_false', default=True, regenerate=False, ++ action='store_false', default=True, regenerate=True, + help="don't check for circular relationships between files") + + # We read a few things from ~/.gyp, so set up a var for that. diff --git a/mingw-w64-btyacc/PKGBUILD b/mingw-w64-btyacc/PKGBUILD new file mode 100644 index 0000000000..7012ad95a9 --- /dev/null +++ b/mingw-w64-btyacc/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Alexey Pavlov + +_realname=btyacc +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.0 +pkgrel=1 +pkgdesc="BackTracking Yacc (mingw-w64)" +arch=('any') +url="http://www.siber.com/btyacc/" +license=("custom") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=('strip' 'staticlibs') +source=(http://www.siber.com/btyacc/${_realname}-${pkgver//./-}.tar.gz) +sha1sums=('4a70f78d9695fa1101c49ab1cdbfda5ab740c027') + +build() { + cd ${srcdir} + make all +} + +package() { + cd "${srcdir}" + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,share} + cp btyacc.exe ${pkgdir}${MINGW_PREFIX}/bin/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname} + cp README{,.BYACC} ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/ +} diff --git a/mingw-w64-bullet/PKGBUILD b/mingw-w64-bullet/PKGBUILD index 5480b1e61d..88736f5ef6 100644 --- a/mingw-w64-bullet/PKGBUILD +++ b/mingw-w64-bullet/PKGBUILD @@ -1,31 +1,29 @@ # Maintainer: Alexey Pavlov _realname=bullet +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug") -pkgver=2.83 +pkgver=2.83.6 pkgrel=1 pkgdesc="A 3D Collision Detection and Rigid Body Dynamics Library for games and animation (mingw-w64)" arch=('any') url="http://www.bulletphysics.com/Bullet/" license=('custom:zlib') options=('!strip' 'staticlibs') -#optdepends=('bullet-docs: documentation') -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-freeglut") -source=(#"http://bullet.googlecode.com/files/bullet-${pkgver}-${_rev}.tgz" - https://github.com/bulletphysics/bullet3/archive/Bullet-${pkgver}-alpha.tar.gz - remove-absent-demo.patch - install-pkgconfig-files-mingw.patch - cast-error.patch) -md5sums=('f459bb08387eb5696467109f44c1d4fd' - '70eda7f29f87cc3b65b58cb417e14201' - '2c243be67782ceb32a96aad61e668e83' - '8db1300cf01a0fb244cb4b3ea5eb102e') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-freeglut") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/bulletphysics/bullet3/archive/${pkgver}.tar.gz" + cast-error.patch + promit-bulletcollisions.patch) +md5sums=('44cb2464336a2082b2c144194c2a2668' + '8db1300cf01a0fb244cb4b3ea5eb102e' + '1340ed3f23915dcaf8e29d0eedc5e8c3') prepare () { - cd ${srcdir}/bullet3-Bullet-${pkgver}-alpha - patch -p1 -i ${srcdir}/remove-absent-demo.patch - patch -p1 -i ${srcdir}/install-pkgconfig-files-mingw.patch + cd ${srcdir}/bullet3-${pkgver} patch -p1 -i ${srcdir}/cast-error.patch + patch -p0 -i ${srcdir}/promit-bulletcollisions.patch } build() { @@ -34,12 +32,14 @@ build() { build_release() { depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-freeglut") - - cd ${srcdir} + install=${_realname}-${CARCH}.install + + [[ -d build-release ]] && rm -rf build-release mkdir -p build-release && pushd build-release + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}\ -DBUILD_SHARED_LIBS=1 \ -DBUILD_EXTRAS=1 \ -DINSTALL_LIBS=1 \ @@ -47,27 +47,32 @@ build_release() { -DCMAKE_CXX_FLAGS_RELEASE="-fpermissive" \ -DINSTALL_EXTRA_LIBS=1 \ -DCMAKE_BUILD_TYPE=Release \ - ../bullet3-Bullet-${pkgver}-alpha + ../bullet3-${pkgver} + make - make install + make DESTDIR=${pkgdir} install + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/bullet + for f in $(find examples -type f -iname *.dll -o -iname *.exe); do + cp ${f} ${pkgdir}${MINGW_PREFIX}/share/bullet/ + done + cp -rf ${srcdir}/bullet3-${pkgver}/data/* ${pkgdir}${MINGW_PREFIX}/share/bullet/ + for f in gtest gwen OpenGLWindow; do + cp lib/lib${f}.dll ${pkgdir}${MINGW_PREFIX}/share/bullet/ + done + mv -f ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/ - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/bullet.pc } build_debug() { - depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=$pkgver") - - cd ${srcdir} + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}-${pkgrel}") + + [[ -d build-debug ]] && rm -rf build-debug mkdir -p build-debug && pushd build-debug + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=1 \ -DBUILD_EXTRAS=1 \ -DINSTALL_LIBS=1 \ @@ -76,12 +81,13 @@ build_debug() { -DINSTALL_EXTRA_LIBS=1 \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_DEBUG_POSTFIX="_d" \ - ../bullet3-Bullet-${pkgver}-alpha + ../bullet3-${pkgver} + make - make install - + make DESTDIR=${pkgdir} install + mv -f ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/ - + rm -rf ${pkgdir}${MINGW_PREFIX}/include rm -rf ${pkgdir}${MINGW_PREFIX}/lib/cmake rm -rf ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig @@ -103,16 +109,3 @@ package_mingw-w64-x86_64-bullet() { package_mingw-w64-x86_64-bullet-debug() { build_debug } - -package() { - cd "${srcdir}/bullet-${pkgver}-${_rev}/build-${MINGW_CHOST}" - make install # DESTDIR="${pkgdir}${MINGW_PREFIX}" - install -d "${pkgdir}${MINGW_PREFIX}"/bin - mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/bullet.pc -} diff --git a/mingw-w64-bullet/bullet-i686.install b/mingw-w64-bullet/bullet-i686.install new file mode 100644 index 0000000000..f860a55690 --- /dev/null +++ b/mingw-w64-bullet/bullet-i686.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/bullet/*.cmake; do + sed -e "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-bullet/bullet-x86_64.install b/mingw-w64-bullet/bullet-x86_64.install new file mode 100644 index 0000000000..191adb785a --- /dev/null +++ b/mingw-w64-bullet/bullet-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/bullet/*.cmake; do + sed -e "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-bullet/dont-try-find-glu.patch b/mingw-w64-bullet/dont-try-find-glu.patch deleted file mode 100644 index 53dea9e845..0000000000 --- a/mingw-w64-bullet/dont-try-find-glu.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt.orig 2013-10-24 03:35:13.000000000 +0400 -+++ b/CMakeLists.txt 2014-04-18 09:03:12.932400000 +0400 -@@ -321,8 +321,6 @@ - ENDIF (OPENGL_FOUND) - - # ADD_DEFINITIONS(-DBT_USE_FREEGLUT) -- --FIND_PACKAGE(GLU) - - IF (USE_GLUT) - FIND_PACKAGE(GLUT) diff --git a/mingw-w64-bullet/install-pkgconfig-files-mingw.patch b/mingw-w64-bullet/install-pkgconfig-files-mingw.patch deleted file mode 100644 index 568ed09519..0000000000 --- a/mingw-w64-bullet/install-pkgconfig-files-mingw.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt.orig 2013-10-24 03:35:13.000000000 +0400 -+++ b/CMakeLists.txt 2014-04-18 09:03:12.932400000 +0400 -@@ -402,14 +402,14 @@ - ## the following are directories where stuff will be installed to - SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/bullet/" CACHE PATH "The subdirectory to the header prefix") - SET(PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files") -- IF(NOT WIN32) -+ IF(NOT WIN32 OR MINGW) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc @ONLY) - INSTALL( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc - DESTINATION - ${PKGCONFIG_INSTALL_PREFIX}) -- ENDIF(NOT WIN32) -+ ENDIF(NOT WIN32 OR MINGW) - ENDIF(INSTALL_LIBS) - - #INSTALL of other files requires CMake 2.6 diff --git a/mingw-w64-bullet/promit-bulletcollisions.patch b/mingw-w64-bullet/promit-bulletcollisions.patch new file mode 100644 index 0000000000..ff277d17fd --- /dev/null +++ b/mingw-w64-bullet/promit-bulletcollisions.patch @@ -0,0 +1,63 @@ +Index: src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp +=================================================================== +--- src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp (revision 45) ++++ src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp (working copy) +@@ -22,6 +22,8 @@ + ContactDestroyedCallback gContactDestroyedCallback = 0; + ContactProcessedCallback gContactProcessedCallback = 0; + ++CollisionStartedCallback gCollisionStartedCallback = 0; ++CollisionEndedCallback gCollisionEndedCallback = 0; + + + btPersistentManifold::btPersistentManifold() +Index: src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +=================================================================== +--- src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h (revision 45) ++++ src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h (working copy) +@@ -32,6 +32,11 @@ + extern ContactDestroyedCallback gContactDestroyedCallback; + extern ContactProcessedCallback gContactProcessedCallback; + ++typedef void (*CollisionStartedCallback)(class btPersistentManifold* manifold); ++typedef void (*CollisionEndedCallback)(class btPersistentManifold* manifold); ++extern CollisionStartedCallback gCollisionStartedCallback; ++extern CollisionEndedCallback gCollisionEndedCallback; ++ + //the enum starts at 1024 to avoid type conflicts with btTypedConstraint + enum btContactManifoldTypes + { +@@ -159,6 +164,11 @@ + + btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0); + m_cachedPoints--; ++ ++ if(gCollisionEndedCallback && m_cachedPoints == 0) ++ { ++ gCollisionEndedCallback(this); ++ } + } + void replaceContactPoint(const btManifoldPoint& newPoint,int insertIndex) + { +Index: src/BulletCollision/CollisionDispatch/btManifoldResult.cpp +=================================================================== +--- src/BulletCollision/CollisionDispatch/btManifoldResult.cpp (revision 45) ++++ src/BulletCollision/CollisionDispatch/btManifoldResult.cpp (working copy) +@@ -68,6 +68,7 @@ + // if (depth > m_manifoldPtr->getContactProcessingThreshold()) + return; + ++ bool isNewCollision = m_manifoldPtr->getNumContacts() == 0; + bool isSwapped = m_manifoldPtr->getBody0() != m_body0Wrap->getCollisionObject(); + + btVector3 pointA = pointInWorld + normalOnBInWorld * depth; +@@ -131,5 +132,9 @@ + (*gContactAddedCallback)(m_manifoldPtr->getContactPoint(insertIndex),obj0,newPt.m_partId0,newPt.m_index0,obj1,newPt.m_partId1,newPt.m_index1); + } + ++ if (gCollisionStartedCallback && isNewCollision) ++ { ++ gCollisionStartedCallback(m_manifoldPtr); ++ } + } + diff --git a/mingw-w64-bullet/remove-absent-demo.patch b/mingw-w64-bullet/remove-absent-demo.patch deleted file mode 100644 index 6ab740ab13..0000000000 --- a/mingw-w64-bullet/remove-absent-demo.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- bullet3-Bullet-2.83-alpha/Demos/CMakeLists.txt.orig 2014-06-08 15:30:10.689800000 +0400 -+++ bullet3-Bullet-2.83-alpha/Demos/CMakeLists.txt 2014-06-08 15:30:32.623400000 +0400 -@@ -34,7 +34,7 @@ - ) - - IF(BUILD_MULTITHREADING) -- SUBDIRS( ThreadingDemo VectorAdd_OpenCL ) -+ SUBDIRS( ThreadingDemo ) - ENDIF() - - ENDIF(GLUT_FOUND) -@@ -58,7 +58,6 @@ - GenericJointDemo - SerializeDemo - SoftDemo -- VectorAdd_OpenCL - VoronoiFractureDemo - ) - ENDIF(WIN32) diff --git a/mingw-w64-bwidget/PKGBUILD b/mingw-w64-bwidget/PKGBUILD index 9b45a20339..fb94c86b4c 100644 --- a/mingw-w64-bwidget/PKGBUILD +++ b/mingw-w64-bwidget/PKGBUILD @@ -2,22 +2,22 @@ _realname=bwidget pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} -pkgver=1.9.7 +pkgver=1.9.8 pkgrel=1 -pkgdesc='A companion to Tcllib, for Tk related packages.' +pkgdesc='A companion to Tcllib, for Tk related packages (mingw-w64)' arch=('any') url='http://core.tcl.tk/bwidget/home' license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-tk") -source=("http://downloads.sourceforge.net/project/tcllib/BWidget/$pkgver/bwidget-$pkgver.tar.gz") -md5sums=('7b4acf73f8f49964f8185e9e9dab4a55') +source=("http://downloads.sourceforge.net/project/tcllib/BWidget/${pkgver}/bwidget-${pkgver}.tar.gz") +md5sums=('4b393b9189e32d5871dae035962558a1') package() { - _dest=${pkgdir}/${MINGW_PREFIX}/lib - mkdir -p ${_dest} - cd ${srcdir} - cp -r bwidget-$pkgver "${_dest}" - _bwdir=${_dest}/bwidget-$pkgver - cd ${_bwdir} - rm -rf .fslckout Changelog tests demo + _dest=${pkgdir}/${MINGW_PREFIX}/lib + mkdir -p ${_dest} + cd ${srcdir} + cp -r bwidget-${pkgver} "${_dest}" + _bwdir=${_dest}/bwidget-${pkgver} + cd ${_bwdir} + rm -rf .fslckout Changelog tests demo } diff --git a/mingw-w64-bzip2/PKGBUILD b/mingw-w64-bzip2/PKGBUILD index 848c9d9d04..afb0e98065 100644 --- a/mingw-w64-bzip2/PKGBUILD +++ b/mingw-w64-bzip2/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=bzip2 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.6 -pkgrel=2 +pkgrel=4 pkgdesc="A high-quality data compression program (mingw-w64)" arch=('any') url="http://sources.redhat.com/bzip2" @@ -12,12 +12,12 @@ license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs') source=("http://www.bzip.org/${pkgver}/bzip2-${pkgver}.tar.gz" - "bzip2-1.0.5-slash.patch" - "bzip2-1.0.4-bzip2recover.patch" - "bzgrep-debian-1.0.5-6.all.patch" - "bzip2-cygming-1.0.6.src.all.patch" - "bzip2-buildsystem.all.patch" - "bzip2-1.0.6-progress.all.patch") + "bzip2-1.0.5-slash.patch" + "bzip2-1.0.4-bzip2recover.patch" + "bzgrep-debian-1.0.5-6.all.patch" + "bzip2-cygming-1.0.6.src.all.patch" + "bzip2-buildsystem.all.patch" + "bzip2-1.0.6-progress.all.patch") sha1sums=('3f89f861209ce81a6bab1fd1998c0ef311712002' '809c3a95f6f6c26463d804b345d62eed8420c6a6' '85ce76fdb67f52f152bba368c1de81132dcdbdb5' @@ -27,7 +27,7 @@ sha1sums=('3f89f861209ce81a6bab1fd1998c0ef311712002' '353b74786f3f8fcddb73691780280a72ef77b85d') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i "$srcdir/"bzip2-1.0.4-bzip2recover.patch patch -p1 -i "$srcdir/"bzip2-1.0.5-slash.patch patch -p1 -i "$srcdir/"bzgrep-debian-1.0.5-6.all.patch @@ -39,15 +39,15 @@ prepare() { } build() { - unset LDFLAGS mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared + make all-dll-shared } @@ -58,8 +58,7 @@ check() { package() { cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install - #make PREFIX="${pkgdir}${MINGW_PREFIX}" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm - #rm "${pkgdir}${MINGW_PREFIX}/bin/bz"{diff,grep,more} + make DESTDIR="${pkgdir}" install + # rm "${pkgdir}${MINGW_PREFIX}/bin/bz"{diff,grep,more} + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-c-ares/PKGBUILD b/mingw-w64-c-ares/PKGBUILD index 58648d608f..96adfd77fa 100644 --- a/mingw-w64-c-ares/PKGBUILD +++ b/mingw-w64-c-ares/PKGBUILD @@ -1,18 +1,18 @@ # Maintainer: Alexey Pavlov _realname=c-ares - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.10.0 -pkgrel=1 +pkgrel=2 pkgdesc="C library that performs DNS requests and name resolves asynchronously (mingw-w64)" arch=('any') url="http://c-ares.haxx.se/" license=("MIT, BSD") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=(strip staticlibs) -source=("http://c-ares.haxx.se/download/${_realname}-$pkgver.tar.gz"{,.asc} +source=("http://c-ares.haxx.se/download/${_realname}-${pkgver}.tar.gz"{,.asc} 0001-Use-RPM-compiler-options.patch) +validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91') sha1sums=('e44e6575d5af99cb3a38461486e1ee8b49810eb5' 'SKIP' '7e1c721c5f4efd49db998209eaa9b80bea1a9819') @@ -20,14 +20,14 @@ sha1sums=('e44e6575d5af99cb3a38461486e1ee8b49810eb5' prepare() { cd "${srcdir}"/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-Use-RPM-compiler-options.patch - + autoreconf -fi } build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -38,5 +38,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-ca-certificates/PKGBUILD b/mingw-w64-ca-certificates/PKGBUILD index 4a1bd0c902..23af1e1fe7 100644 --- a/mingw-w64-ca-certificates/PKGBUILD +++ b/mingw-w64-ca-certificates/PKGBUILD @@ -2,15 +2,17 @@ _realname=ca-certificates pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=20140325 -pkgrel=3 -pkgdesc='Common CA certificates' +pkgver=20150426 +pkgrel=2 +pkgdesc='Common CA certificates (mingw-w64)' arch=('any') url='http://packages.qa.debian.org/c/ca-certificates.html' license=('MPL' 'GPL') install="ca-certificates-${CARCH}.install" source=("http://ftp.debian.org/debian/pool/main/c/${_realname}/${_realname}_${pkgver}.tar.xz" + 'StartSSL.sub.class1.server.ca.pem'::'http://www.startssl.com/certs/sub.class1.server.ca.pem' 'certdata2pem-redhat.patch' + 'diff-from-upstream-2.3.patch' 'trust-fixes' 'update-ca-trust' 'update-ca-trust.8') @@ -19,25 +21,28 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-p11-kit" "${MINGW_PACKAGE_PREFIX}-python2" 'asciidoc' 'python2' 'libxslt' 'sed' 'grep') -md5sums=('0436aba482091da310bd762e1deca8b4' +md5sums=('717455f13fb31fd014a11a468ea3895d' + 'ecd5a4cdf352cf31859cf57dd5f110b7' '2c8500579308a100425f4ddb0d61a9ea' + 'a4ebdb731affc54e6be17717d9fea1f0' 'ecfa72ad51c9a1c4488a3474b8def35b' 'b9e6692146cda711e3b7d2974502e446' 'b00295801f7b39694ad16869e846c227') prepare() { - cd ${srcdir}/${_realname} + cd ${srcdir}/${_realname}-${pkgver} cp ${srcdir}/trust-fixes mozilla/ cp ${srcdir}/update-ca-trust sbin/ cp ${srcdir}/update-ca-trust.8 sbin/ patch -p1 -i ${srcdir}/certdata2pem-redhat.patch + patch -p0 -i ${srcdir}/diff-from-upstream-2.3.patch sed "s|/usr/bin/python|${MINGW_PREFIX}/bin/python2|g" -i mozilla/certdata2pem.py } build() { - cd ${srcdir}/${_realname}/mozilla + cd ${srcdir}/${_realname}-${pkgver}/mozilla ${MINGW_PREFIX}/bin/python2 certdata2pem.py - + ( cat < ${srcdir}/${_realname}/ca-bundle.trust.crt + ) > ${srcdir}/${_realname}-${pkgver}/ca-bundle.trust.crt # Make sure repeat runs don't accumulate duplicate certs. if [ -f ${srcdir}/${pkgname}/ca-bundle.neutral-trust.crt ]; then @@ -64,52 +69,59 @@ EOF > info.trust > info.notrust + # Add custom certificate + echo '# alias="StartCom Class 1 Primary Intermediate Server CA"' > StartSSL.sub.class1.server.ca.crt + echo '# trust=CKA_TRUST_CODE_SIGNING CKA_TRUST_EMAIL_PROTECTION CKA_TRUST_SERVER_AUTH' >> StartSSL.sub.class1.server.ca.crt + echo '# distrust=' >> StartSSL.sub.class1.server.ca.crt + echo '# openssl-trust=codeSigning emailProtection serverAuth' >> StartSSL.sub.class1.server.ca.crt + cat "${srcdir}/StartSSL.sub.class1.server.ca.pem" >> StartSSL.sub.class1.server.ca.crt + local f= for f in *.crt do - echo "processing $f" - tbits=`sed -n '/^# openssl-trust/{s/^.*=//;p;}' $f` - distbits=`sed -n '/^# openssl-distrust/{s/^.*=//;p;}' $f` - alias=`sed -n '/^# alias=/{s/^.*=//;p;q;}' $f | sed "s/'//g" | sed 's/"//g'` + echo "processing ${f}" + tbits=`sed -n '/^# openssl-trust/{s/^.*=//;p;}' ${f}` + distbits=`sed -n '/^# openssl-distrust/{s/^.*=//;p;}' ${f}` + alias=`sed -n '/^# alias=/{s/^.*=//;p;q;}' ${f} | sed "s/'//g" | sed 's/"//g'` targs="" - if [ -n "$tbits" ] + if [ -n "${tbits}" ] then - for t in $tbits + for t in ${tbits} do - targs="${targs} -addtrust $t" + targs="${targs} -addtrust ${t}" done fi - if [ -n "$distbits" ] + if [ -n "${distbits}" ] then - for t in $distbits + for t in ${distbits} do - targs="${targs} -addreject $t" + targs="${targs} -addreject ${t}" done fi - if [ -n "$targs" ] + if [ -n "${targs}" ] then - echo "trust flags $targs for $f" >> info.trust - ${MINGW_PREFIX}/bin/openssl x509 -text -in "$f" -trustout $targs -setalias "$alias" >> ${srcdir}/${_realname}/ca-bundle.trust.crt + echo "trust flags $targs for ${f}" >> info.trust + ${MINGW_PREFIX}/bin/openssl x509 -text -in "${f}" -trustout ${targs} -setalias "${alias}" >> ${srcdir}/${_realname}-${pkgver}/ca-bundle.trust.crt else - echo "no trust flags for $f" >> tee -a info.notrust - ${MINGW_PREFIX}/bin/openssl x509 -text -in "$f" -setalias "$alias" >> ${srcdir}/${_realname}/ca-bundle.neutral-trust.crt + echo "no trust flags for ${f}" >> tee -a info.notrust + ${MINGW_PREFIX}/bin/openssl x509 -text -in "${f}" -setalias "${alias}" >> ${srcdir}/${_realname}-${pkgver}/ca-bundle.neutral-trust.crt fi done for p in *.p11-kit do - cat $p >> ${srcdir}/${_realname}/ca-bundle.supplement.p11-kit + cat ${p} >> ${srcdir}/${_realname}-${pkgver}/ca-bundle.supplement.p11-kit done - cat trust-fixes >> ${srcdir}/${_realname}/ca-bundle.supplement.p11-kit + cat trust-fixes >> ${srcdir}/${_realname}-${pkgver}/ca-bundle.supplement.p11-kit } package() { - cd ${srcdir}/${_realname} + cd ${srcdir}/${_realname}-${pkgver} mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,share} mkdir -p ${pkgdir}${MINGW_PREFIX}/etc mkdir -p ${pkgdir}${MINGW_PREFIX}/share/man/man8 - + sed -e "s|@PREFIX@|${MINGW_PREFIX}|g" -i sbin/update-ca-trust cp -f sbin/update-ca-trust ${pkgdir}${MINGW_PREFIX}/bin/ cp -f sbin/update-ca-trust.8 ${pkgdir}${MINGW_PREFIX}/share/man/man8/ @@ -121,7 +133,7 @@ package() { mkdir -p ${pkgdir}${MINGW_PREFIX}/share/pki/ca-trust-source for file in ca-bundle.{trust.crt,neutral-trust.crt,supplement.p11-kit} do - cp -f $file ${pkgdir}${MINGW_PREFIX}/share/pki/ca-trust-source + cp -f ${file} ${pkgdir}${MINGW_PREFIX}/share/pki/ca-trust-source done # touch all files overwritten by update-ca-trust for easy cleanup diff --git a/mingw-w64-ca-certificates/ca-certificates-i686.install b/mingw-w64-ca-certificates/ca-certificates-i686.install index 432326aa6b..b3fce9c4e0 100644 --- a/mingw-w64-ca-certificates/ca-certificates-i686.install +++ b/mingw-w64-ca-certificates/ca-certificates-i686.install @@ -12,8 +12,6 @@ post_install() { ${_mingw_prefix}/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose code-signing $DEST/pem/objsign-ca-bundle.pem ${_mingw_prefix}/bin/p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite --purpose server-auth $DEST/java/cacerts - # These files end up not being overwritten without a sleep - sleep 0.5 mkdir -p ${_mingw_prefix}/ssl/certs cp -f $DEST/pem/tls-ca-bundle.pem ${_mingw_prefix}/ssl/certs/ca-bundle.crt cp -f $DEST/pem/tls-ca-bundle.pem ${_mingw_prefix}/ssl/cert.pem diff --git a/mingw-w64-ca-certificates/ca-certificates-x86_64.install b/mingw-w64-ca-certificates/ca-certificates-x86_64.install index aedae6b8ac..5ba7dc4a78 100644 --- a/mingw-w64-ca-certificates/ca-certificates-x86_64.install +++ b/mingw-w64-ca-certificates/ca-certificates-x86_64.install @@ -12,8 +12,6 @@ post_install() { ${_mingw_prefix}/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose code-signing $DEST/pem/objsign-ca-bundle.pem ${_mingw_prefix}/bin/p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite --purpose server-auth $DEST/java/cacerts - # These files end up not being overwritten without a sleep - sleep 0.5 mkdir -p ${_mingw_prefix}/ssl/certs cp -f $DEST/pem/tls-ca-bundle.pem ${_mingw_prefix}/ssl/certs/ca-bundle.crt cp -f $DEST/pem/tls-ca-bundle.pem ${_mingw_prefix}/ssl/cert.pem diff --git a/mingw-w64-ca-certificates/diff-from-upstream-2.3.patch b/mingw-w64-ca-certificates/diff-from-upstream-2.3.patch new file mode 100644 index 0000000000..588bbaa024 --- /dev/null +++ b/mingw-w64-ca-certificates/diff-from-upstream-2.3.patch @@ -0,0 +1,2250 @@ +--- mozilla/certdata-2.3.txt 2015-03-17 00:03:37.000000000 +0100 ++++ mozilla/certdata.txt 2015-03-20 22:02:52.672993593 +0100 +@@ -23,100 +23,515 @@ + # CKA_SUBJECT DER+base64 (varies) + # CKA_ID byte array (varies) + # CKA_ISSUER DER+base64 (varies) + # CKA_SERIAL_NUMBER DER+base64 (varies) + # CKA_VALUE DER+base64 (varies) + # CKA_NSS_EMAIL ASCII7 (unused here) + # + # Trust + # + # -- Attribute -- -- type -- -- value -- + # CKA_CLASS CK_OBJECT_CLASS CKO_TRUST + # CKA_TOKEN CK_BBOOL CK_TRUE + # CKA_PRIVATE CK_BBOOL CK_FALSE + # CKA_MODIFIABLE CK_BBOOL CK_FALSE + # CKA_LABEL UTF8 (varies) + # CKA_ISSUER DER+base64 (varies) + # CKA_SERIAL_NUMBER DER+base64 (varies) + # CKA_CERT_HASH binary+base64 (varies) + # CKA_EXPIRES CK_DATE (not used here) + # CKA_TRUST_DIGITAL_SIGNATURE CK_TRUST (varies) + # CKA_TRUST_NON_REPUDIATION CK_TRUST (varies) + # CKA_TRUST_KEY_ENCIPHERMENT CK_TRUST (varies) + # CKA_TRUST_DATA_ENCIPHERMENT CK_TRUST (varies) + # CKA_TRUST_KEY_AGREEMENT CK_TRUST (varies) + # CKA_TRUST_KEY_CERT_SIGN CK_TRUST (varies) + # CKA_TRUST_CRL_SIGN CK_TRUST (varies) + # CKA_TRUST_SERVER_AUTH CK_TRUST (varies) + # CKA_TRUST_CLIENT_AUTH CK_TRUST (varies) + # CKA_TRUST_CODE_SIGNING CK_TRUST (varies) + # CKA_TRUST_EMAIL_PROTECTION CK_TRUST (varies) + # CKA_TRUST_IPSEC_END_SYSTEM CK_TRUST (varies) + # CKA_TRUST_IPSEC_TUNNEL CK_TRUST (varies) + # CKA_TRUST_IPSEC_USER CK_TRUST (varies) + # CKA_TRUST_TIME_STAMPING CK_TRUST (varies) + # CKA_TRUST_STEP_UP_APPROVED CK_BBOOL (varies) + # (other trust attributes can be defined) + # + + # + # The object to tell NSS that this is a root list and we don't + # have to go looking for others. + # + BEGINDATA + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_BUILTIN_ROOT_LIST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Mozilla Builtin Roots" + + # ++# Certificate "GTE CyberTrust Global Root" ++# ++# Issuer: CN=GTE CyberTrust Global Root,OU="GTE CyberTrust Solutions, Inc.",O=GTE Corporation,C=US ++# Serial Number: 421 (0x1a5) ++# Subject: CN=GTE CyberTrust Global Root,OU="GTE CyberTrust Solutions, Inc.",O=GTE Corporation,C=US ++# Not Valid Before: Thu Aug 13 00:29:00 1998 ++# Not Valid After : Mon Aug 13 23:59:00 2018 ++# Fingerprint (MD5): CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB ++# Fingerprint (SHA1): 97:81:79:50:D8:1C:96:70:CC:34:D8:09:CF:79:44:31:36:7E:F4:74 ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "GTE CyberTrust Global Root" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\165\061\013\060\011\006\003\125\004\006\023\002\125\123\061 ++\030\060\026\006\003\125\004\012\023\017\107\124\105\040\103\157 ++\162\160\157\162\141\164\151\157\156\061\047\060\045\006\003\125 ++\004\013\023\036\107\124\105\040\103\171\142\145\162\124\162\165 ++\163\164\040\123\157\154\165\164\151\157\156\163\054\040\111\156 ++\143\056\061\043\060\041\006\003\125\004\003\023\032\107\124\105 ++\040\103\171\142\145\162\124\162\165\163\164\040\107\154\157\142 ++\141\154\040\122\157\157\164 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\165\061\013\060\011\006\003\125\004\006\023\002\125\123\061 ++\030\060\026\006\003\125\004\012\023\017\107\124\105\040\103\157 ++\162\160\157\162\141\164\151\157\156\061\047\060\045\006\003\125 ++\004\013\023\036\107\124\105\040\103\171\142\145\162\124\162\165 ++\163\164\040\123\157\154\165\164\151\157\156\163\054\040\111\156 ++\143\056\061\043\060\041\006\003\125\004\003\023\032\107\124\105 ++\040\103\171\142\145\162\124\162\165\163\164\040\107\154\157\142 ++\141\154\040\122\157\157\164 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\002\001\245 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\002\132\060\202\001\303\002\002\001\245\060\015\006\011 ++\052\206\110\206\367\015\001\001\004\005\000\060\165\061\013\060 ++\011\006\003\125\004\006\023\002\125\123\061\030\060\026\006\003 ++\125\004\012\023\017\107\124\105\040\103\157\162\160\157\162\141 ++\164\151\157\156\061\047\060\045\006\003\125\004\013\023\036\107 ++\124\105\040\103\171\142\145\162\124\162\165\163\164\040\123\157 ++\154\165\164\151\157\156\163\054\040\111\156\143\056\061\043\060 ++\041\006\003\125\004\003\023\032\107\124\105\040\103\171\142\145 ++\162\124\162\165\163\164\040\107\154\157\142\141\154\040\122\157 ++\157\164\060\036\027\015\071\070\060\070\061\063\060\060\062\071 ++\060\060\132\027\015\061\070\060\070\061\063\062\063\065\071\060 ++\060\132\060\165\061\013\060\011\006\003\125\004\006\023\002\125 ++\123\061\030\060\026\006\003\125\004\012\023\017\107\124\105\040 ++\103\157\162\160\157\162\141\164\151\157\156\061\047\060\045\006 ++\003\125\004\013\023\036\107\124\105\040\103\171\142\145\162\124 ++\162\165\163\164\040\123\157\154\165\164\151\157\156\163\054\040 ++\111\156\143\056\061\043\060\041\006\003\125\004\003\023\032\107 ++\124\105\040\103\171\142\145\162\124\162\165\163\164\040\107\154 ++\157\142\141\154\040\122\157\157\164\060\201\237\060\015\006\011 ++\052\206\110\206\367\015\001\001\001\005\000\003\201\215\000\060 ++\201\211\002\201\201\000\225\017\240\266\360\120\234\350\172\307 ++\210\315\335\027\016\056\260\224\320\033\075\016\366\224\300\212 ++\224\307\006\310\220\227\310\270\144\032\172\176\154\074\123\341 ++\067\050\163\140\177\262\227\123\007\237\123\371\155\130\224\322 ++\257\215\155\210\147\200\346\355\262\225\317\162\061\312\245\034 ++\162\272\134\002\347\144\102\347\371\251\054\326\072\015\254\215 ++\102\252\044\001\071\346\234\077\001\205\127\015\130\207\105\370 ++\323\205\252\223\151\046\205\160\110\200\077\022\025\307\171\264 ++\037\005\057\073\142\231\002\003\001\000\001\060\015\006\011\052 ++\206\110\206\367\015\001\001\004\005\000\003\201\201\000\155\353 ++\033\011\351\136\331\121\333\147\042\141\244\052\074\110\167\343 ++\240\174\246\336\163\242\024\003\205\075\373\253\016\060\305\203 ++\026\063\201\023\010\236\173\064\116\337\100\310\164\327\271\175 ++\334\364\166\125\175\233\143\124\030\351\360\352\363\134\261\331 ++\213\102\036\271\300\225\116\272\372\325\342\174\365\150\141\277 ++\216\354\005\227\137\133\260\327\243\205\064\304\044\247\015\017 ++\225\223\357\313\224\330\236\037\235\134\205\155\307\252\256\117 ++\037\042\265\315\225\255\272\247\314\371\253\013\172\177 ++END ++ ++# Trust for Certificate "GTE CyberTrust Global Root" ++# Issuer: CN=GTE CyberTrust Global Root,OU="GTE CyberTrust Solutions, Inc.",O=GTE Corporation,C=US ++# Serial Number: 421 (0x1a5) ++# Subject: CN=GTE CyberTrust Global Root,OU="GTE CyberTrust Solutions, Inc.",O=GTE Corporation,C=US ++# Not Valid Before: Thu Aug 13 00:29:00 1998 ++# Not Valid After : Mon Aug 13 23:59:00 2018 ++# Fingerprint (MD5): CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB ++# Fingerprint (SHA1): 97:81:79:50:D8:1C:96:70:CC:34:D8:09:CF:79:44:31:36:7E:F4:74 ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "GTE CyberTrust Global Root" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\227\201\171\120\330\034\226\160\314\064\330\011\317\171\104\061 ++\066\176\364\164 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\312\075\323\150\361\003\134\320\062\372\270\053\131\350\132\333 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\165\061\013\060\011\006\003\125\004\006\023\002\125\123\061 ++\030\060\026\006\003\125\004\012\023\017\107\124\105\040\103\157 ++\162\160\157\162\141\164\151\157\156\061\047\060\045\006\003\125 ++\004\013\023\036\107\124\105\040\103\171\142\145\162\124\162\165 ++\163\164\040\123\157\154\165\164\151\157\156\163\054\040\111\156 ++\143\056\061\043\060\041\006\003\125\004\003\023\032\107\124\105 ++\040\103\171\142\145\162\124\162\165\163\164\040\107\154\157\142 ++\141\154\040\122\157\157\164 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\002\001\245 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# ++# Certificate "Thawte Server CA" ++# ++# Issuer: E=server-certs@thawte.com,CN=Thawte Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Serial Number: 1 (0x1) ++# Subject: E=server-certs@thawte.com,CN=Thawte Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Not Valid Before: Thu Aug 01 00:00:00 1996 ++# Not Valid After : Thu Dec 31 23:59:59 2020 ++# Fingerprint (MD5): C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D ++# Fingerprint (SHA1): 23:E5:94:94:51:95:F2:41:48:03:B4:D5:64:D2:A3:A3:F5:D8:8B:8C ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "Thawte Server CA" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\201\304\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\031\060\027\006\003\125\004\003\023\020\124 ++\150\141\167\164\145\040\123\145\162\166\145\162\040\103\101\061 ++\046\060\044\006\011\052\206\110\206\367\015\001\011\001\026\027 ++\163\145\162\166\145\162\055\143\145\162\164\163\100\164\150\141 ++\167\164\145\056\143\157\155 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\304\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\031\060\027\006\003\125\004\003\023\020\124 ++\150\141\167\164\145\040\123\145\162\166\145\162\040\103\101\061 ++\046\060\044\006\011\052\206\110\206\367\015\001\011\001\026\027 ++\163\145\162\166\145\162\055\143\145\162\164\163\100\164\150\141 ++\167\164\145\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\003\023\060\202\002\174\240\003\002\001\002\002\001\001 ++\060\015\006\011\052\206\110\206\367\015\001\001\004\005\000\060 ++\201\304\061\013\060\011\006\003\125\004\006\023\002\132\101\061 ++\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145\162 ++\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007\023 ++\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006\003 ++\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156\163 ++\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003\125 ++\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151\157 ++\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151\163 ++\151\157\156\061\031\060\027\006\003\125\004\003\023\020\124\150 ++\141\167\164\145\040\123\145\162\166\145\162\040\103\101\061\046 ++\060\044\006\011\052\206\110\206\367\015\001\011\001\026\027\163 ++\145\162\166\145\162\055\143\145\162\164\163\100\164\150\141\167 ++\164\145\056\143\157\155\060\036\027\015\071\066\060\070\060\061 ++\060\060\060\060\060\060\132\027\015\062\060\061\062\063\061\062 ++\063\065\071\065\071\132\060\201\304\061\013\060\011\006\003\125 ++\004\006\023\002\132\101\061\025\060\023\006\003\125\004\010\023 ++\014\127\145\163\164\145\162\156\040\103\141\160\145\061\022\060 ++\020\006\003\125\004\007\023\011\103\141\160\145\040\124\157\167 ++\156\061\035\060\033\006\003\125\004\012\023\024\124\150\141\167 ++\164\145\040\103\157\156\163\165\154\164\151\156\147\040\143\143 ++\061\050\060\046\006\003\125\004\013\023\037\103\145\162\164\151 ++\146\151\143\141\164\151\157\156\040\123\145\162\166\151\143\145 ++\163\040\104\151\166\151\163\151\157\156\061\031\060\027\006\003 ++\125\004\003\023\020\124\150\141\167\164\145\040\123\145\162\166 ++\145\162\040\103\101\061\046\060\044\006\011\052\206\110\206\367 ++\015\001\011\001\026\027\163\145\162\166\145\162\055\143\145\162 ++\164\163\100\164\150\141\167\164\145\056\143\157\155\060\201\237 ++\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003 ++\201\215\000\060\201\211\002\201\201\000\323\244\120\156\310\377 ++\126\153\346\317\135\266\352\014\150\165\107\242\252\302\332\204 ++\045\374\250\364\107\121\332\205\265\040\164\224\206\036\017\165 ++\311\351\010\141\365\006\155\060\156\025\031\002\351\122\300\142 ++\333\115\231\236\342\152\014\104\070\315\376\276\343\144\011\160 ++\305\376\261\153\051\266\057\111\310\073\324\047\004\045\020\227 ++\057\347\220\155\300\050\102\231\327\114\103\336\303\365\041\155 ++\124\237\135\303\130\341\300\344\331\133\260\270\334\264\173\337 ++\066\072\302\265\146\042\022\326\207\015\002\003\001\000\001\243 ++\023\060\021\060\017\006\003\125\035\023\001\001\377\004\005\060 ++\003\001\001\377\060\015\006\011\052\206\110\206\367\015\001\001 ++\004\005\000\003\201\201\000\007\372\114\151\134\373\225\314\106 ++\356\205\203\115\041\060\216\312\331\250\157\111\032\346\332\121 ++\343\140\160\154\204\141\021\241\032\310\110\076\131\103\175\117 ++\225\075\241\213\267\013\142\230\172\165\212\335\210\116\116\236 ++\100\333\250\314\062\164\271\157\015\306\343\263\104\013\331\212 ++\157\232\051\233\231\030\050\073\321\343\100\050\232\132\074\325 ++\265\347\040\033\213\312\244\253\215\351\121\331\342\114\054\131 ++\251\332\271\262\165\033\366\102\362\357\307\362\030\371\211\274 ++\243\377\212\043\056\160\107 ++END ++ ++# Trust for Certificate "Thawte Server CA" ++# Issuer: E=server-certs@thawte.com,CN=Thawte Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Serial Number: 1 (0x1) ++# Subject: E=server-certs@thawte.com,CN=Thawte Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Not Valid Before: Thu Aug 01 00:00:00 1996 ++# Not Valid After : Thu Dec 31 23:59:59 2020 ++# Fingerprint (MD5): C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D ++# Fingerprint (SHA1): 23:E5:94:94:51:95:F2:41:48:03:B4:D5:64:D2:A3:A3:F5:D8:8B:8C ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "Thawte Server CA" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\043\345\224\224\121\225\362\101\110\003\264\325\144\322\243\243 ++\365\330\213\214 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\305\160\304\242\355\123\170\014\310\020\123\201\144\313\320\035 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\304\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\031\060\027\006\003\125\004\003\023\020\124 ++\150\141\167\164\145\040\123\145\162\166\145\162\040\103\101\061 ++\046\060\044\006\011\052\206\110\206\367\015\001\011\001\026\027 ++\163\145\162\166\145\162\055\143\145\162\164\163\100\164\150\141 ++\167\164\145\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# ++# Certificate "Thawte Premium Server CA" ++# ++# Issuer: E=premium-server@thawte.com,CN=Thawte Premium Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Serial Number: 1 (0x1) ++# Subject: E=premium-server@thawte.com,CN=Thawte Premium Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Not Valid Before: Thu Aug 01 00:00:00 1996 ++# Not Valid After : Thu Dec 31 23:59:59 2020 ++# Fingerprint (MD5): 06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A ++# Fingerprint (SHA1): 62:7F:8D:78:27:65:63:99:D2:7D:7F:90:44:C9:FE:B3:F3:3E:FA:9A ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "Thawte Premium Server CA" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\201\316\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\041\060\037\006\003\125\004\003\023\030\124 ++\150\141\167\164\145\040\120\162\145\155\151\165\155\040\123\145 ++\162\166\145\162\040\103\101\061\050\060\046\006\011\052\206\110 ++\206\367\015\001\011\001\026\031\160\162\145\155\151\165\155\055 ++\163\145\162\166\145\162\100\164\150\141\167\164\145\056\143\157 ++\155 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\316\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\041\060\037\006\003\125\004\003\023\030\124 ++\150\141\167\164\145\040\120\162\145\155\151\165\155\040\123\145 ++\162\166\145\162\040\103\101\061\050\060\046\006\011\052\206\110 ++\206\367\015\001\011\001\026\031\160\162\145\155\151\165\155\055 ++\163\145\162\166\145\162\100\164\150\141\167\164\145\056\143\157 ++\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\003\047\060\202\002\220\240\003\002\001\002\002\001\001 ++\060\015\006\011\052\206\110\206\367\015\001\001\004\005\000\060 ++\201\316\061\013\060\011\006\003\125\004\006\023\002\132\101\061 ++\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145\162 ++\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007\023 ++\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006\003 ++\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156\163 ++\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003\125 ++\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151\157 ++\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151\163 ++\151\157\156\061\041\060\037\006\003\125\004\003\023\030\124\150 ++\141\167\164\145\040\120\162\145\155\151\165\155\040\123\145\162 ++\166\145\162\040\103\101\061\050\060\046\006\011\052\206\110\206 ++\367\015\001\011\001\026\031\160\162\145\155\151\165\155\055\163 ++\145\162\166\145\162\100\164\150\141\167\164\145\056\143\157\155 ++\060\036\027\015\071\066\060\070\060\061\060\060\060\060\060\060 ++\132\027\015\062\060\061\062\063\061\062\063\065\071\065\071\132 ++\060\201\316\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\041\060\037\006\003\125\004\003\023\030\124 ++\150\141\167\164\145\040\120\162\145\155\151\165\155\040\123\145 ++\162\166\145\162\040\103\101\061\050\060\046\006\011\052\206\110 ++\206\367\015\001\011\001\026\031\160\162\145\155\151\165\155\055 ++\163\145\162\166\145\162\100\164\150\141\167\164\145\056\143\157 ++\155\060\201\237\060\015\006\011\052\206\110\206\367\015\001\001 ++\001\005\000\003\201\215\000\060\201\211\002\201\201\000\322\066 ++\066\152\213\327\302\133\236\332\201\101\142\217\070\356\111\004 ++\125\326\320\357\034\033\225\026\107\357\030\110\065\072\122\364 ++\053\152\006\217\073\057\352\126\343\257\206\215\236\027\367\236 ++\264\145\165\002\115\357\313\011\242\041\121\330\233\320\147\320 ++\272\015\222\006\024\163\324\223\313\227\052\000\234\134\116\014 ++\274\372\025\122\374\362\104\156\332\021\112\156\010\237\057\055 ++\343\371\252\072\206\163\266\106\123\130\310\211\005\275\203\021 ++\270\163\077\252\007\215\364\102\115\347\100\235\034\067\002\003 ++\001\000\001\243\023\060\021\060\017\006\003\125\035\023\001\001 ++\377\004\005\060\003\001\001\377\060\015\006\011\052\206\110\206 ++\367\015\001\001\004\005\000\003\201\201\000\046\110\054\026\302 ++\130\372\350\026\164\014\252\252\137\124\077\362\327\311\170\140 ++\136\136\156\067\143\042\167\066\176\262\027\304\064\271\365\010 ++\205\374\311\001\070\377\115\276\362\026\102\103\347\273\132\106 ++\373\301\306\021\037\361\112\260\050\106\311\303\304\102\175\274 ++\372\253\131\156\325\267\121\210\021\343\244\205\031\153\202\114 ++\244\014\022\255\351\244\256\077\361\303\111\145\232\214\305\310 ++\076\045\267\224\231\273\222\062\161\007\360\206\136\355\120\047 ++\246\015\246\043\371\273\313\246\007\024\102 ++END ++ ++# Trust for Certificate "Thawte Premium Server CA" ++# Issuer: E=premium-server@thawte.com,CN=Thawte Premium Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Serial Number: 1 (0x1) ++# Subject: E=premium-server@thawte.com,CN=Thawte Premium Server CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape Town,ST=Western Cape,C=ZA ++# Not Valid Before: Thu Aug 01 00:00:00 1996 ++# Not Valid After : Thu Dec 31 23:59:59 2020 ++# Fingerprint (MD5): 06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A ++# Fingerprint (SHA1): 62:7F:8D:78:27:65:63:99:D2:7D:7F:90:44:C9:FE:B3:F3:3E:FA:9A ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "Thawte Premium Server CA" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\142\177\215\170\047\145\143\231\322\175\177\220\104\311\376\263 ++\363\076\372\232 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\006\237\151\171\026\146\220\002\033\214\214\242\303\007\157\072 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\316\061\013\060\011\006\003\125\004\006\023\002\132\101 ++\061\025\060\023\006\003\125\004\010\023\014\127\145\163\164\145 ++\162\156\040\103\141\160\145\061\022\060\020\006\003\125\004\007 ++\023\011\103\141\160\145\040\124\157\167\156\061\035\060\033\006 ++\003\125\004\012\023\024\124\150\141\167\164\145\040\103\157\156 ++\163\165\154\164\151\156\147\040\143\143\061\050\060\046\006\003 ++\125\004\013\023\037\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\123\145\162\166\151\143\145\163\040\104\151\166\151 ++\163\151\157\156\061\041\060\037\006\003\125\004\003\023\030\124 ++\150\141\167\164\145\040\120\162\145\155\151\165\155\040\123\145 ++\162\166\145\162\040\103\101\061\050\060\046\006\011\052\206\110 ++\206\367\015\001\011\001\026\031\160\162\145\155\151\165\155\055 ++\163\145\162\166\145\162\100\164\150\141\167\164\145\056\143\157 ++\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# + # Certificate "Equifax Secure CA" + # + # Issuer: OU=Equifax Secure Certificate Authority,O=Equifax,C=US + # Serial Number: 903804111 (0x35def4cf) + # Subject: OU=Equifax Secure Certificate Authority,O=Equifax,C=US + # Not Valid Before: Sat Aug 22 16:41:51 1998 + # Not Valid After : Wed Aug 22 16:41:51 2018 + # Fingerprint (MD5): 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4 + # Fingerprint (SHA1): D2:32:09:AD:23:D3:14:23:21:74:E4:0D:7F:9D:62:13:97:86:63:3A + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Equifax Secure CA" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \020\060\016\006\003\125\004\012\023\007\105\161\165\151\146\141 + \170\061\055\060\053\006\003\125\004\013\023\044\105\161\165\151 + \146\141\170\040\123\145\143\165\162\145\040\103\145\162\164\151 + \146\151\143\141\164\145\040\101\165\164\150\157\162\151\164\171 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \020\060\016\006\003\125\004\012\023\007\105\161\165\151\146\141 + \170\061\055\060\053\006\003\125\004\013\023\044\105\161\165\151 + \146\141\170\040\123\145\143\165\162\145\040\103\145\162\164\151 + \146\151\143\141\164\145\040\101\165\164\150\157\162\151\164\171 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\004\065\336\364\317 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\003\040\060\202\002\211\240\003\002\001\002\002\004\065 + \336\364\317\060\015\006\011\052\206\110\206\367\015\001\001\005 + \005\000\060\116\061\013\060\011\006\003\125\004\006\023\002\125 + \123\061\020\060\016\006\003\125\004\012\023\007\105\161\165\151 + \146\141\170\061\055\060\053\006\003\125\004\013\023\044\105\161 + \165\151\146\141\170\040\123\145\143\165\162\145\040\103\145\162 + \164\151\146\151\143\141\164\145\040\101\165\164\150\157\162\151 + \164\171\060\036\027\015\071\070\060\070\062\062\061\066\064\061 + \065\061\132\027\015\061\070\060\070\062\062\061\066\064\061\065 + \061\132\060\116\061\013\060\011\006\003\125\004\006\023\002\125 + \123\061\020\060\016\006\003\125\004\012\023\007\105\161\165\151 + \146\141\170\061\055\060\053\006\003\125\004\013\023\044\105\161 + \165\151\146\141\170\040\123\145\143\165\162\145\040\103\145\162 + \164\151\146\151\143\141\164\145\040\101\165\164\150\157\162\151 + \164\171\060\201\237\060\015\006\011\052\206\110\206\367\015\001 + \001\001\005\000\003\201\215\000\060\201\211\002\201\201\000\301 +@@ -140,100 +555,103 @@ + \070\062\062\061\066\064\061\065\061\132\060\013\006\003\125\035 + \017\004\004\003\002\001\006\060\037\006\003\125\035\043\004\030 + \060\026\200\024\110\346\150\371\053\322\262\225\327\107\330\043 + \040\020\117\063\230\220\237\324\060\035\006\003\125\035\016\004 + \026\004\024\110\346\150\371\053\322\262\225\327\107\330\043\040 + \020\117\063\230\220\237\324\060\014\006\003\125\035\023\004\005 + \060\003\001\001\377\060\032\006\011\052\206\110\206\366\175\007 + \101\000\004\015\060\013\033\005\126\063\056\060\143\003\002\006 + \300\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000 + \003\201\201\000\130\316\051\352\374\367\336\265\316\002\271\027 + \265\205\321\271\343\340\225\314\045\061\015\000\246\222\156\177 + \266\222\143\236\120\225\321\232\157\344\021\336\143\205\156\230 + \356\250\377\132\310\323\125\262\146\161\127\336\300\041\353\075 + \052\247\043\111\001\004\206\102\173\374\356\177\242\026\122\265 + \147\147\323\100\333\073\046\130\262\050\167\075\256\024\167\141 + \326\372\052\146\047\240\015\372\247\163\134\352\160\361\224\041 + \145\104\137\372\374\357\051\150\251\242\207\171\357\171\357\117 + \254\007\167\070 + END + + # Trust for Certificate "Equifax Secure CA" + # Issuer: OU=Equifax Secure Certificate Authority,O=Equifax,C=US + # Serial Number: 903804111 (0x35def4cf) + # Subject: OU=Equifax Secure Certificate Authority,O=Equifax,C=US + # Not Valid Before: Sat Aug 22 16:41:51 1998 + # Not Valid After : Wed Aug 22 16:41:51 2018 + # Fingerprint (MD5): 67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4 + # Fingerprint (SHA1): D2:32:09:AD:23:D3:14:23:21:74:E4:0D:7F:9D:62:13:97:86:63:3A + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Equifax Secure CA" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \322\062\011\255\043\323\024\043\041\164\344\015\177\235\142\023 + \227\206\143\072 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \147\313\235\300\023\044\212\202\233\262\027\036\321\033\354\324 + END + CKA_ISSUER MULTILINE_OCTAL + \060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \020\060\016\006\003\125\004\012\023\007\105\161\165\151\146\141 + \170\061\055\060\053\006\003\125\004\013\023\044\105\161\165\151 + \146\141\170\040\123\145\143\165\162\145\040\103\145\162\164\151 + \146\151\143\141\164\145\040\101\165\164\150\157\162\151\164\171 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\004\065\336\364\317 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # Distrust "Distrust a pb.com certificate that does not comply with the baseline requirements." + # Issuer: OU=Equifax Secure Certificate Authority,O=Equifax,C=US + # Serial Number: 1407252 (0x157914) + # Subject: CN=*.pb.com,OU=Meters,O=Pitney Bowes,L=Danbury,ST=Connecticut,C=US + # Not Valid Before: Mon Feb 01 14:54:04 2010 + # Not Valid After : Tue Sep 30 00:00:00 2014 + # Fingerprint (MD5): 8F:46:BE:99:47:6F:93:DC:5C:01:54:50:D0:4A:BD:AC + # Fingerprint (SHA1): 30:F1:82:CA:1A:5E:4E:4F:F3:6E:D0:E6:38:18:B8:B9:41:CB:5F:8C + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Distrust a pb.com certificate that does not comply with the baseline requirements." + CKA_ISSUER MULTILINE_OCTAL + \060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \020\060\016\006\003\125\004\012\023\007\105\161\165\151\146\141 + \170\061\055\060\053\006\003\125\004\013\023\044\105\161\165\151 + \146\141\170\040\123\145\143\165\162\145\040\103\145\162\164\151 + \146\151\143\141\164\145\040\101\165\164\150\157\162\151\164\171 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\003\025\171\024 + END + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "Digital Signature Trust Co. Global CA 1" + # + # Issuer: OU=DSTCA E1,O=Digital Signature Trust Co.,C=US + # Serial Number: 913315222 (0x36701596) + # Subject: OU=DSTCA E1,O=Digital Signature Trust Co.,C=US + # Not Valid Before: Thu Dec 10 18:10:23 1998 + # Not Valid After : Mon Dec 10 18:40:23 2018 + # Fingerprint (MD5): 25:7A:BA:83:2E:B6:A2:0B:DA:FE:F5:02:0F:08:D7:AD + # Fingerprint (SHA1): 81:96:8B:3A:EF:1C:DC:70:F5:FA:32:69:C2:92:A3:63:5B:D1:23:D3 + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Digital Signature Trust Co. Global CA 1" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL +@@ -530,100 +948,103 @@ + \005\252\354\003\037\170\177\236\223\271\232\000\252\043\175\326 + \254\205\242\143\105\307\162\047\314\364\114\306\165\161\322\071 + \357\117\102\360\165\337\012\220\306\216\040\157\230\017\370\254 + \043\137\160\051\066\244\311\206\347\261\232\040\313\123\245\205 + \347\075\276\175\232\376\044\105\063\334\166\025\355\017\242\161 + \144\114\145\056\201\150\105\247\002\003\001\000\001\060\015\006 + \011\052\206\110\206\367\015\001\001\002\005\000\003\201\201\000 + \273\114\022\053\317\054\046\000\117\024\023\335\246\373\374\012 + \021\204\214\363\050\034\147\222\057\174\266\305\372\337\360\350 + \225\274\035\217\154\054\250\121\314\163\330\244\300\123\360\116 + \326\046\300\166\001\127\201\222\136\041\361\321\261\377\347\320 + \041\130\315\151\027\343\104\034\234\031\104\071\211\134\334\234 + \000\017\126\215\002\231\355\242\220\105\114\344\273\020\244\075 + \360\062\003\016\361\316\370\350\311\121\214\346\142\237\346\237 + \300\175\267\162\234\311\066\072\153\237\116\250\377\144\015\144 + END + + # Trust for Certificate "Verisign Class 3 Public Primary Certification Authority" + # Issuer: OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US + # Serial Number:70:ba:e4:1d:10:d9:29:34:b6:38:ca:7b:03:cc:ba:bf + # Subject: OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US + # Not Valid Before: Mon Jan 29 00:00:00 1996 + # Not Valid After : Tue Aug 01 23:59:59 2028 + # Fingerprint (MD5): 10:FC:63:5D:F6:26:3E:0D:F3:25:BE:5F:79:CD:67:67 + # Fingerprint (SHA1): 74:2C:31:92:E6:07:E4:24:EB:45:49:54:2B:E1:BB:C5:3E:61:74:E2 + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 3 Public Primary Certification Authority" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \164\054\061\222\346\007\344\044\353\105\111\124\053\341\273\305 + \076\141\164\342 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \020\374\143\135\366\046\076\015\363\045\276\137\171\315\147\147 + END + CKA_ISSUER MULTILINE_OCTAL + \060\137\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \027\060\025\006\003\125\004\012\023\016\126\145\162\151\123\151 + \147\156\054\040\111\156\143\056\061\067\060\065\006\003\125\004 + \013\023\056\103\154\141\163\163\040\063\040\120\165\142\154\151 + \143\040\120\162\151\155\141\162\171\040\103\145\162\164\151\146 + \151\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164 + \171 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\020\160\272\344\035\020\331\051\064\266\070\312\173\003\314 + \272\277 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "Verisign Class 1 Public Primary Certification Authority - G2" + # + # Issuer: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 1 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Serial Number:4c:c7:ea:aa:98:3e:71:d3:93:10:f8:3d:3a:89:91:92 + # Subject: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 1 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Not Valid Before: Mon May 18 00:00:00 1998 + # Not Valid After : Tue Aug 01 23:59:59 2028 + # Fingerprint (MD5): DB:23:3D:F9:69:FA:4B:B9:95:80:44:73:5E:7D:41:83 + # Fingerprint (SHA1): 27:3E:E1:24:57:FD:C4:F9:0C:55:E8:2B:56:16:7F:62:F5:32:E5:47 + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 1 Public Primary Certification Authority - G2" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\301\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\074\060\072\006\003\125 + \004\013\023\063\103\154\141\163\163\040\061\040\120\165\142\154 + \151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 + \146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 + \164\171\040\055\040\107\062\061\072\060\070\006\003\125\004\013 + \023\061\050\143\051\040\061\071\071\070\040\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\040\055\040\106\157\162\040 + \141\165\164\150\157\162\151\172\145\144\040\165\163\145\040\157 + \156\154\171\061\037\060\035\006\003\125\004\013\023\026\126\145 + \162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 + \167\157\162\153 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\301\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\074\060\072\006\003\125 + \004\013\023\063\103\154\141\163\163\040\061\040\120\165\142\154 + \151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 + \146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 + \164\171\040\055\040\107\062\061\072\060\070\006\003\125\004\013 + \023\061\050\143\051\040\061\071\071\070\040\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\040\055\040\106\157\162\040 + \141\165\164\150\157\162\151\172\145\144\040\165\163\145\040\157 + \156\154\171\061\037\060\035\006\003\125\004\013\023\026\126\145 + \162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 +@@ -824,100 +1245,103 @@ + \005\005\000\003\201\201\000\162\056\371\177\321\361\161\373\304 + \236\366\305\136\121\212\100\230\270\150\370\233\034\203\330\342 + \235\275\377\355\241\346\146\352\057\011\364\312\327\352\245\053 + \225\366\044\140\206\115\104\056\203\245\304\055\240\323\256\170 + \151\157\162\332\154\256\010\360\143\222\067\346\273\304\060\027 + \255\167\314\111\065\252\317\330\217\321\276\267\030\226\107\163 + \152\124\042\064\144\055\266\026\233\131\133\264\121\131\072\263 + \013\024\364\022\337\147\240\364\255\062\144\136\261\106\162\047 + \214\022\173\305\104\264\256 + END + + # Trust for Certificate "Verisign Class 2 Public Primary Certification Authority - G2" + # Issuer: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 2 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Serial Number:00:b9:2f:60:cc:88:9f:a1:7a:46:09:b8:5b:70:6c:8a:af + # Subject: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 2 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Not Valid Before: Mon May 18 00:00:00 1998 + # Not Valid After : Tue Aug 01 23:59:59 2028 + # Fingerprint (MD5): 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 + # Fingerprint (SHA1): B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 2 Public Primary Certification Authority - G2" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \263\352\304\107\166\311\310\034\352\362\235\225\266\314\240\010 + \033\147\354\235 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \055\273\345\045\323\321\145\202\072\267\016\372\346\353\342\341 + END + CKA_ISSUER MULTILINE_OCTAL + \060\201\301\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\074\060\072\006\003\125 + \004\013\023\063\103\154\141\163\163\040\062\040\120\165\142\154 + \151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 + \146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 + \164\171\040\055\040\107\062\061\072\060\070\006\003\125\004\013 + \023\061\050\143\051\040\061\071\071\070\040\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\040\055\040\106\157\162\040 + \141\165\164\150\157\162\151\172\145\144\040\165\163\145\040\157 + \156\154\171\061\037\060\035\006\003\125\004\013\023\026\126\145 + \162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 + \167\157\162\153 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\021\000\271\057\140\314\210\237\241\172\106\011\270\133\160 + \154\212\257 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "Verisign Class 3 Public Primary Certification Authority - G2" + # + # Issuer: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 3 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Serial Number:7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6 + # Subject: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 3 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Not Valid Before: Mon May 18 00:00:00 1998 + # Not Valid After : Tue Aug 01 23:59:59 2028 + # Fingerprint (MD5): A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9 + # Fingerprint (SHA1): 85:37:1C:A6:E5:50:14:3D:CE:28:03:47:1B:DE:3A:09:E8:F8:77:0F + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 3 Public Primary Certification Authority - G2" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\301\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\074\060\072\006\003\125 + \004\013\023\063\103\154\141\163\163\040\063\040\120\165\142\154 + \151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 + \146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 + \164\171\040\055\040\107\062\061\072\060\070\006\003\125\004\013 + \023\061\050\143\051\040\061\071\071\070\040\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\040\055\040\106\157\162\040 + \141\165\164\150\157\162\151\172\145\144\040\165\163\145\040\157 + \156\154\171\061\037\060\035\006\003\125\004\013\023\026\126\145 + \162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 + \167\157\162\153 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\301\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\074\060\072\006\003\125 + \004\013\023\063\103\154\141\163\163\040\063\040\120\165\142\154 + \151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 + \146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 + \164\171\040\055\040\107\062\061\072\060\070\006\003\125\004\013 + \023\061\050\143\051\040\061\071\071\070\040\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\040\055\040\106\157\162\040 + \141\165\164\150\157\162\151\172\145\144\040\165\163\145\040\157 + \156\154\171\061\037\060\035\006\003\125\004\013\023\026\126\145 + \162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 +@@ -971,100 +1395,103 @@ + \005\000\003\201\201\000\121\115\315\276\134\313\230\031\234\025 + \262\001\071\170\056\115\017\147\160\160\231\306\020\132\224\244 + \123\115\124\155\053\257\015\135\100\213\144\323\327\356\336\126 + \141\222\137\246\304\035\020\141\066\323\054\047\074\350\051\011 + \271\021\144\164\314\265\163\237\034\110\251\274\141\001\356\342 + \027\246\014\343\100\010\073\016\347\353\104\163\052\232\361\151 + \222\357\161\024\303\071\254\161\247\221\011\157\344\161\006\263 + \272\131\127\046\171\000\366\370\015\242\063\060\050\324\252\130 + \240\235\235\151\221\375 + END + + # Trust for Certificate "Verisign Class 3 Public Primary Certification Authority - G2" + # Issuer: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 3 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Serial Number:7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6 + # Subject: OU=VeriSign Trust Network,OU="(c) 1998 VeriSign, Inc. - For authorized use only",OU=Class 3 Public Primary Certification Authority - G2,O="VeriSign, Inc.",C=US + # Not Valid Before: Mon May 18 00:00:00 1998 + # Not Valid After : Tue Aug 01 23:59:59 2028 + # Fingerprint (MD5): A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9 + # Fingerprint (SHA1): 85:37:1C:A6:E5:50:14:3D:CE:28:03:47:1B:DE:3A:09:E8:F8:77:0F + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 3 Public Primary Certification Authority - G2" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \205\067\034\246\345\120\024\075\316\050\003\107\033\336\072\011 + \350\370\167\017 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \242\063\233\114\164\170\163\324\154\347\301\363\215\313\134\351 + END + CKA_ISSUER MULTILINE_OCTAL + \060\201\301\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\074\060\072\006\003\125 + \004\013\023\063\103\154\141\163\163\040\063\040\120\165\142\154 + \151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 + \146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 + \164\171\040\055\040\107\062\061\072\060\070\006\003\125\004\013 + \023\061\050\143\051\040\061\071\071\070\040\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\040\055\040\106\157\162\040 + \141\165\164\150\157\162\151\172\145\144\040\165\163\145\040\157 + \156\154\171\061\037\060\035\006\003\125\004\013\023\026\126\145 + \162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 + \167\157\162\153 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\020\175\331\376\007\317\250\036\267\020\171\147\373\247\211 + \064\306 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "GlobalSign Root CA" + # + # Issuer: CN=GlobalSign Root CA,OU=Root CA,O=GlobalSign nv-sa,C=BE + # Serial Number:04:00:00:00:00:01:15:4b:5a:c3:94 + # Subject: CN=GlobalSign Root CA,OU=Root CA,O=GlobalSign nv-sa,C=BE + # Not Valid Before: Tue Sep 01 12:00:00 1998 + # Not Valid After : Fri Jan 28 12:00:00 2028 + # Fingerprint (MD5): 3E:45:52:15:09:51:92:E1:B7:5D:37:9F:B1:87:29:8A + # Fingerprint (SHA1): B1:BC:96:8B:D4:F4:9D:62:2A:A8:9A:81:F2:15:01:52:A4:1D:82:9C + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "GlobalSign Root CA" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\127\061\013\060\011\006\003\125\004\006\023\002\102\105\061 + \031\060\027\006\003\125\004\012\023\020\107\154\157\142\141\154 + \123\151\147\156\040\156\166\055\163\141\061\020\060\016\006\003 + \125\004\013\023\007\122\157\157\164\040\103\101\061\033\060\031 + \006\003\125\004\003\023\022\107\154\157\142\141\154\123\151\147 + \156\040\122\157\157\164\040\103\101 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\127\061\013\060\011\006\003\125\004\006\023\002\102\105\061 + \031\060\027\006\003\125\004\012\023\020\107\154\157\142\141\154 + \123\151\147\156\040\156\166\055\163\141\061\020\060\016\006\003 + \125\004\013\023\007\122\157\157\164\040\103\101\061\033\060\031 + \006\003\125\004\003\023\022\107\154\157\142\141\154\123\151\147 + \156\040\122\157\157\164\040\103\101 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\013\004\000\000\000\000\001\025\113\132\303\224 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\003\165\060\202\002\135\240\003\002\001\002\002\013\004 + \000\000\000\000\001\025\113\132\303\224\060\015\006\011\052\206 + \110\206\367\015\001\001\005\005\000\060\127\061\013\060\011\006 + \003\125\004\006\023\002\102\105\061\031\060\027\006\003\125\004 + \012\023\020\107\154\157\142\141\154\123\151\147\156\040\156\166 + \055\163\141\061\020\060\016\006\003\125\004\013\023\007\122\157 + \157\164\040\103\101\061\033\060\031\006\003\125\004\003\023\022 + \107\154\157\142\141\154\123\151\147\156\040\122\157\157\164\040 +@@ -1240,100 +1667,520 @@ + \333\335\161\064\032\301\124\332\106\077\340\323\052\253\155\124 + \042\365\072\142\315\040\157\272\051\211\327\335\221\356\323\134 + \242\076\241\133\101\365\337\345\144\103\055\351\325\071\253\322 + \242\337\267\213\320\300\200\031\034\105\300\055\214\350\370\055 + \244\164\126\111\305\005\265\117\025\336\156\104\170\071\207\250 + \176\273\363\171\030\221\273\364\157\235\301\360\214\065\214\135 + \001\373\303\155\271\357\104\155\171\106\061\176\012\376\251\202 + \301\377\357\253\156\040\304\120\311\137\235\115\233\027\214\014 + \345\001\311\240\101\152\163\123\372\245\120\264\156\045\017\373 + \114\030\364\375\122\331\216\151\261\350\021\017\336\210\330\373 + \035\111\367\252\336\225\317\040\170\302\140\022\333\045\100\214 + \152\374\176\102\070\100\144\022\367\236\201\341\223\056 + END + + # Trust for Certificate "GlobalSign Root CA - R2" + # Issuer: CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R2 + # Serial Number:04:00:00:00:00:01:0f:86:26:e6:0d + # Subject: CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R2 + # Not Valid Before: Fri Dec 15 08:00:00 2006 + # Not Valid After : Wed Dec 15 08:00:00 2021 + # Fingerprint (MD5): 94:14:77:7E:3E:5E:FD:8F:30:BD:41:B0:CF:E7:D0:30 + # Fingerprint (SHA1): 75:E0:AB:B6:13:85:12:27:1C:04:F8:5F:DD:DE:38:E4:B7:24:2E:FE + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "GlobalSign Root CA - R2" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \165\340\253\266\023\205\022\047\034\004\370\137\335\336\070\344 + \267\044\056\376 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \224\024\167\176\076\136\375\217\060\275\101\260\317\347\320\060 + END + CKA_ISSUER MULTILINE_OCTAL + \060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157 + \142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040 + \055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107 + \154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125 + \004\003\023\012\107\154\157\142\141\154\123\151\147\156 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\013\004\000\000\000\000\001\017\206\046\346\015 + END + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # ++# Certificate "ValiCert Class 1 VA" ++# ++# Issuer: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 1 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Serial Number: 1 (0x1) ++# Subject: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 1 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Not Valid Before: Fri Jun 25 22:23:48 1999 ++# Not Valid After : Tue Jun 25 22:23:48 2019 ++# Fingerprint (MD5): 65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB ++# Fingerprint (SHA1): E5:DF:74:3C:B6:01:C4:9B:98:43:DC:AB:8C:E8:6A:81:10:9F:E4:8E ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "ValiCert Class 1 VA" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\061\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\061\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\002\347\060\202\002\120\002\001\001\060\015\006\011\052 ++\206\110\206\367\015\001\001\005\005\000\060\201\273\061\044\060 ++\042\006\003\125\004\007\023\033\126\141\154\151\103\145\162\164 ++\040\126\141\154\151\144\141\164\151\157\156\040\116\145\164\167 ++\157\162\153\061\027\060\025\006\003\125\004\012\023\016\126\141 ++\154\151\103\145\162\164\054\040\111\156\143\056\061\065\060\063 ++\006\003\125\004\013\023\054\126\141\154\151\103\145\162\164\040 ++\103\154\141\163\163\040\061\040\120\157\154\151\143\171\040\126 ++\141\154\151\144\141\164\151\157\156\040\101\165\164\150\157\162 ++\151\164\171\061\041\060\037\006\003\125\004\003\023\030\150\164 ++\164\160\072\057\057\167\167\167\056\166\141\154\151\143\145\162 ++\164\056\143\157\155\057\061\040\060\036\006\011\052\206\110\206 ++\367\015\001\011\001\026\021\151\156\146\157\100\166\141\154\151 ++\143\145\162\164\056\143\157\155\060\036\027\015\071\071\060\066 ++\062\065\062\062\062\063\064\070\132\027\015\061\071\060\066\062 ++\065\062\062\062\063\064\070\132\060\201\273\061\044\060\042\006 ++\003\125\004\007\023\033\126\141\154\151\103\145\162\164\040\126 ++\141\154\151\144\141\164\151\157\156\040\116\145\164\167\157\162 ++\153\061\027\060\025\006\003\125\004\012\023\016\126\141\154\151 ++\103\145\162\164\054\040\111\156\143\056\061\065\060\063\006\003 ++\125\004\013\023\054\126\141\154\151\103\145\162\164\040\103\154 ++\141\163\163\040\061\040\120\157\154\151\143\171\040\126\141\154 ++\151\144\141\164\151\157\156\040\101\165\164\150\157\162\151\164 ++\171\061\041\060\037\006\003\125\004\003\023\030\150\164\164\160 ++\072\057\057\167\167\167\056\166\141\154\151\143\145\162\164\056 ++\143\157\155\057\061\040\060\036\006\011\052\206\110\206\367\015 ++\001\011\001\026\021\151\156\146\157\100\166\141\154\151\143\145 ++\162\164\056\143\157\155\060\201\237\060\015\006\011\052\206\110 ++\206\367\015\001\001\001\005\000\003\201\215\000\060\201\211\002 ++\201\201\000\330\131\202\172\211\270\226\272\246\057\150\157\130 ++\056\247\124\034\006\156\364\352\215\110\274\061\224\027\360\363 ++\116\274\262\270\065\222\166\260\320\245\245\001\327\000\003\022 ++\042\031\010\370\377\021\043\233\316\007\365\277\151\032\046\376 ++\116\351\321\177\235\054\100\035\131\150\156\246\370\130\260\235 ++\032\217\323\077\361\334\031\006\201\250\016\340\072\335\310\123 ++\105\011\006\346\017\160\303\372\100\246\016\342\126\005\017\030 ++\115\374\040\202\321\163\125\164\215\166\162\240\035\235\035\300 ++\335\077\161\002\003\001\000\001\060\015\006\011\052\206\110\206 ++\367\015\001\001\005\005\000\003\201\201\000\120\150\075\111\364 ++\054\034\006\224\337\225\140\177\226\173\027\376\117\161\255\144 ++\310\335\167\322\357\131\125\350\077\350\216\005\052\041\362\007 ++\322\265\247\122\376\234\261\266\342\133\167\027\100\352\162\326 ++\043\313\050\201\062\303\000\171\030\354\131\027\211\311\306\152 ++\036\161\311\375\267\164\245\045\105\151\305\110\253\031\341\105 ++\212\045\153\031\356\345\273\022\365\177\367\246\215\121\303\360 ++\235\164\267\251\076\240\245\377\266\111\003\023\332\042\314\355 ++\161\202\053\231\317\072\267\365\055\162\310 ++END ++ ++# Trust for Certificate "ValiCert Class 1 VA" ++# Issuer: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 1 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Serial Number: 1 (0x1) ++# Subject: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 1 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Not Valid Before: Fri Jun 25 22:23:48 1999 ++# Not Valid After : Tue Jun 25 22:23:48 2019 ++# Fingerprint (MD5): 65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB ++# Fingerprint (SHA1): E5:DF:74:3C:B6:01:C4:9B:98:43:DC:AB:8C:E8:6A:81:10:9F:E4:8E ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "ValiCert Class 1 VA" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\345\337\164\074\266\001\304\233\230\103\334\253\214\350\152\201 ++\020\237\344\216 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\145\130\253\025\255\127\154\036\250\247\265\151\254\277\377\353 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\061\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# ++# Certificate "ValiCert Class 2 VA" ++# ++# Issuer: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 2 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Serial Number: 1 (0x1) ++# Subject: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 2 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Not Valid Before: Sat Jun 26 00:19:54 1999 ++# Not Valid After : Wed Jun 26 00:19:54 2019 ++# Fingerprint (MD5): A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87 ++# Fingerprint (SHA1): 31:7A:2A:D0:7F:2B:33:5E:F5:A1:C3:4E:4B:57:E8:B7:D8:F1:FC:A6 ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "ValiCert Class 2 VA" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\062\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\062\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\002\347\060\202\002\120\002\001\001\060\015\006\011\052 ++\206\110\206\367\015\001\001\005\005\000\060\201\273\061\044\060 ++\042\006\003\125\004\007\023\033\126\141\154\151\103\145\162\164 ++\040\126\141\154\151\144\141\164\151\157\156\040\116\145\164\167 ++\157\162\153\061\027\060\025\006\003\125\004\012\023\016\126\141 ++\154\151\103\145\162\164\054\040\111\156\143\056\061\065\060\063 ++\006\003\125\004\013\023\054\126\141\154\151\103\145\162\164\040 ++\103\154\141\163\163\040\062\040\120\157\154\151\143\171\040\126 ++\141\154\151\144\141\164\151\157\156\040\101\165\164\150\157\162 ++\151\164\171\061\041\060\037\006\003\125\004\003\023\030\150\164 ++\164\160\072\057\057\167\167\167\056\166\141\154\151\143\145\162 ++\164\056\143\157\155\057\061\040\060\036\006\011\052\206\110\206 ++\367\015\001\011\001\026\021\151\156\146\157\100\166\141\154\151 ++\143\145\162\164\056\143\157\155\060\036\027\015\071\071\060\066 ++\062\066\060\060\061\071\065\064\132\027\015\061\071\060\066\062 ++\066\060\060\061\071\065\064\132\060\201\273\061\044\060\042\006 ++\003\125\004\007\023\033\126\141\154\151\103\145\162\164\040\126 ++\141\154\151\144\141\164\151\157\156\040\116\145\164\167\157\162 ++\153\061\027\060\025\006\003\125\004\012\023\016\126\141\154\151 ++\103\145\162\164\054\040\111\156\143\056\061\065\060\063\006\003 ++\125\004\013\023\054\126\141\154\151\103\145\162\164\040\103\154 ++\141\163\163\040\062\040\120\157\154\151\143\171\040\126\141\154 ++\151\144\141\164\151\157\156\040\101\165\164\150\157\162\151\164 ++\171\061\041\060\037\006\003\125\004\003\023\030\150\164\164\160 ++\072\057\057\167\167\167\056\166\141\154\151\143\145\162\164\056 ++\143\157\155\057\061\040\060\036\006\011\052\206\110\206\367\015 ++\001\011\001\026\021\151\156\146\157\100\166\141\154\151\143\145 ++\162\164\056\143\157\155\060\201\237\060\015\006\011\052\206\110 ++\206\367\015\001\001\001\005\000\003\201\215\000\060\201\211\002 ++\201\201\000\316\072\161\312\345\253\310\131\222\125\327\253\330 ++\164\016\371\356\331\366\125\107\131\145\107\016\005\125\334\353 ++\230\066\074\134\123\135\323\060\317\070\354\275\101\211\355\045 ++\102\011\044\153\012\136\263\174\335\122\055\114\346\324\326\175 ++\132\131\251\145\324\111\023\055\044\115\034\120\157\265\301\205 ++\124\073\376\161\344\323\134\102\371\200\340\221\032\012\133\071 ++\066\147\363\077\125\174\033\077\264\137\144\163\064\343\264\022 ++\277\207\144\370\332\022\377\067\047\301\263\103\273\357\173\156 ++\056\151\367\002\003\001\000\001\060\015\006\011\052\206\110\206 ++\367\015\001\001\005\005\000\003\201\201\000\073\177\120\157\157 ++\120\224\231\111\142\070\070\037\113\370\245\310\076\247\202\201 ++\366\053\307\350\305\316\350\072\020\202\313\030\000\216\115\275 ++\250\130\177\241\171\000\265\273\351\215\257\101\331\017\064\356 ++\041\201\031\240\062\111\050\364\304\216\126\325\122\063\375\120 ++\325\176\231\154\003\344\311\114\374\313\154\253\146\263\112\041 ++\214\345\265\014\062\076\020\262\314\154\241\334\232\230\114\002 ++\133\363\316\271\236\245\162\016\112\267\077\074\346\026\150\370 ++\276\355\164\114\274\133\325\142\037\103\335 ++END ++ ++# Trust for Certificate "ValiCert Class 2 VA" ++# Issuer: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 2 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Serial Number: 1 (0x1) ++# Subject: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 2 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Not Valid Before: Sat Jun 26 00:19:54 1999 ++# Not Valid After : Wed Jun 26 00:19:54 2019 ++# Fingerprint (MD5): A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87 ++# Fingerprint (SHA1): 31:7A:2A:D0:7F:2B:33:5E:F5:A1:C3:4E:4B:57:E8:B7:D8:F1:FC:A6 ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "ValiCert Class 2 VA" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\061\172\052\320\177\053\063\136\365\241\303\116\113\127\350\267 ++\330\361\374\246 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\251\043\165\233\272\111\066\156\061\302\333\362\347\146\272\207 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\062\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# ++# Certificate "RSA Root Certificate 1" ++# ++# Issuer: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 3 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Serial Number: 1 (0x1) ++# Subject: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 3 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Not Valid Before: Sat Jun 26 00:22:33 1999 ++# Not Valid After : Wed Jun 26 00:22:33 2019 ++# Fingerprint (MD5): A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72 ++# Fingerprint (SHA1): 69:BD:8C:F4:9C:D3:00:FB:59:2E:17:93:CA:55:6A:F3:EC:AA:35:FB ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "RSA Root Certificate 1" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\063\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\063\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\002\347\060\202\002\120\002\001\001\060\015\006\011\052 ++\206\110\206\367\015\001\001\005\005\000\060\201\273\061\044\060 ++\042\006\003\125\004\007\023\033\126\141\154\151\103\145\162\164 ++\040\126\141\154\151\144\141\164\151\157\156\040\116\145\164\167 ++\157\162\153\061\027\060\025\006\003\125\004\012\023\016\126\141 ++\154\151\103\145\162\164\054\040\111\156\143\056\061\065\060\063 ++\006\003\125\004\013\023\054\126\141\154\151\103\145\162\164\040 ++\103\154\141\163\163\040\063\040\120\157\154\151\143\171\040\126 ++\141\154\151\144\141\164\151\157\156\040\101\165\164\150\157\162 ++\151\164\171\061\041\060\037\006\003\125\004\003\023\030\150\164 ++\164\160\072\057\057\167\167\167\056\166\141\154\151\143\145\162 ++\164\056\143\157\155\057\061\040\060\036\006\011\052\206\110\206 ++\367\015\001\011\001\026\021\151\156\146\157\100\166\141\154\151 ++\143\145\162\164\056\143\157\155\060\036\027\015\071\071\060\066 ++\062\066\060\060\062\062\063\063\132\027\015\061\071\060\066\062 ++\066\060\060\062\062\063\063\132\060\201\273\061\044\060\042\006 ++\003\125\004\007\023\033\126\141\154\151\103\145\162\164\040\126 ++\141\154\151\144\141\164\151\157\156\040\116\145\164\167\157\162 ++\153\061\027\060\025\006\003\125\004\012\023\016\126\141\154\151 ++\103\145\162\164\054\040\111\156\143\056\061\065\060\063\006\003 ++\125\004\013\023\054\126\141\154\151\103\145\162\164\040\103\154 ++\141\163\163\040\063\040\120\157\154\151\143\171\040\126\141\154 ++\151\144\141\164\151\157\156\040\101\165\164\150\157\162\151\164 ++\171\061\041\060\037\006\003\125\004\003\023\030\150\164\164\160 ++\072\057\057\167\167\167\056\166\141\154\151\143\145\162\164\056 ++\143\157\155\057\061\040\060\036\006\011\052\206\110\206\367\015 ++\001\011\001\026\021\151\156\146\157\100\166\141\154\151\143\145 ++\162\164\056\143\157\155\060\201\237\060\015\006\011\052\206\110 ++\206\367\015\001\001\001\005\000\003\201\215\000\060\201\211\002 ++\201\201\000\343\230\121\226\034\350\325\261\006\201\152\127\303 ++\162\165\223\253\317\236\246\374\363\026\122\326\055\115\237\065 ++\104\250\056\004\115\007\111\212\070\051\365\167\067\347\267\253 ++\135\337\066\161\024\231\217\334\302\222\361\347\140\222\227\354 ++\330\110\334\277\301\002\040\306\044\244\050\114\060\132\166\155 ++\261\134\363\335\336\236\020\161\241\210\307\133\233\101\155\312 ++\260\270\216\025\356\255\063\053\317\107\004\134\165\161\012\230 ++\044\230\051\247\111\131\245\335\370\267\103\142\141\363\323\342 ++\320\125\077\002\003\001\000\001\060\015\006\011\052\206\110\206 ++\367\015\001\001\005\005\000\003\201\201\000\126\273\002\130\204 ++\147\010\054\337\037\333\173\111\063\365\323\147\235\364\264\012 ++\020\263\311\305\054\342\222\152\161\170\047\362\160\203\102\323 ++\076\317\251\124\364\361\330\222\026\214\321\004\313\113\253\311 ++\237\105\256\074\212\251\260\161\063\135\310\305\127\337\257\250 ++\065\263\177\211\207\351\350\045\222\270\177\205\172\256\326\274 ++\036\067\130\052\147\311\221\317\052\201\076\355\306\071\337\300 ++\076\031\234\031\314\023\115\202\101\265\214\336\340\075\140\010 ++\040\017\105\176\153\242\177\243\214\025\356 ++END ++ ++# Trust for Certificate "RSA Root Certificate 1" ++# Issuer: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 3 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Serial Number: 1 (0x1) ++# Subject: E=info@valicert.com,CN=http://www.valicert.com/,OU=ValiCert Class 3 Policy Validation Authority,O="ValiCert, Inc.",L=ValiCert Validation Network ++# Not Valid Before: Sat Jun 26 00:22:33 1999 ++# Not Valid After : Wed Jun 26 00:22:33 2019 ++# Fingerprint (MD5): A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72 ++# Fingerprint (SHA1): 69:BD:8C:F4:9C:D3:00:FB:59:2E:17:93:CA:55:6A:F3:EC:AA:35:FB ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "RSA Root Certificate 1" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\151\275\214\364\234\323\000\373\131\056\027\223\312\125\152\363 ++\354\252\065\373 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\242\157\123\267\356\100\333\112\150\347\372\030\331\020\113\162 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\273\061\044\060\042\006\003\125\004\007\023\033\126\141 ++\154\151\103\145\162\164\040\126\141\154\151\144\141\164\151\157 ++\156\040\116\145\164\167\157\162\153\061\027\060\025\006\003\125 ++\004\012\023\016\126\141\154\151\103\145\162\164\054\040\111\156 ++\143\056\061\065\060\063\006\003\125\004\013\023\054\126\141\154 ++\151\103\145\162\164\040\103\154\141\163\163\040\063\040\120\157 ++\154\151\143\171\040\126\141\154\151\144\141\164\151\157\156\040 ++\101\165\164\150\157\162\151\164\171\061\041\060\037\006\003\125 ++\004\003\023\030\150\164\164\160\072\057\057\167\167\167\056\166 ++\141\154\151\143\145\162\164\056\143\157\155\057\061\040\060\036 ++\006\011\052\206\110\206\367\015\001\011\001\026\021\151\156\146 ++\157\100\166\141\154\151\143\145\162\164\056\143\157\155 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\001\001 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# + # Certificate "Verisign Class 1 Public Primary Certification Authority - G3" + # + # Issuer: CN=VeriSign Class 1 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US + # Serial Number:00:8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4 + # Subject: CN=VeriSign Class 1 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US + # Not Valid Before: Fri Oct 01 00:00:00 1999 + # Not Valid After : Wed Jul 16 23:59:59 2036 + # Fingerprint (MD5): B1:47:BC:18:57:D1:18:A0:78:2D:EC:71:E8:2A:95:73 + # Fingerprint (SHA1): 20:42:85:DC:F7:EB:76:41:95:57:8E:13:6B:D4:B7:D1:E9:8E:46:A5 + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 1 Public Primary Certification Authority - G3" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 + \004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 + \163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 + \125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 + \162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 + \157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 + \145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 + \074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 + \061\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 + \040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 + \165\164\150\157\162\151\164\171\040\055\040\107\063 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 + \004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 + \163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 + \125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 + \162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 + \157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 + \145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 + \074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 + \061\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 + \040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 + \165\164\150\157\162\151\164\171\040\055\040\107\063 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\021\000\213\133\165\126\204\124\205\013\000\317\257\070\110 + \316\261\244 + END +@@ -2008,100 +2855,274 @@ + \154\273\322\036\000\260\041\355\370\101\142\202\271\330\262\304 + \273\106\120\363\061\305\217\001\250\164\353\365\170\047\332\347 + \367\146\103\363\236\203\076\040\252\303\065\140\221\316 + END + + # Trust for Certificate "Verisign Class 4 Public Primary Certification Authority - G3" + # Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US + # Serial Number:00:ec:a0:a7:8b:6e:75:6a:01:cf:c4:7c:cc:2f:94:5e:d7 + # Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US + # Not Valid Before: Fri Oct 01 00:00:00 1999 + # Not Valid After : Wed Jul 16 23:59:59 2036 + # Fingerprint (MD5): DB:C8:F2:27:2E:B1:EA:6A:29:23:5D:FE:56:3E:33:DF + # Fingerprint (SHA1): C8:EC:8C:87:92:69:CB:4B:AB:39:E9:8D:7E:57:67:F3:14:95:73:9D + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 4 Public Primary Certification Authority - G3" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \310\354\214\207\222\151\313\113\253\071\351\215\176\127\147\363 + \024\225\163\235 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \333\310\362\047\056\261\352\152\051\043\135\376\126\076\063\337 + END + CKA_ISSUER MULTILINE_OCTAL + \060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 + \151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 + \004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 + \163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 + \125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 + \162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 + \157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 + \145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 + \074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 + \064\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 + \040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 + \165\164\150\157\162\151\164\171\040\055\040\107\063 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\021\000\354\240\247\213\156\165\152\001\317\304\174\314\057 + \224\136\327 + END + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # ++# Certificate "Entrust.net Secure Server CA" ++# ++# Issuer: CN=Entrust.net Secure Server Certification Authority,OU=(c) 1999 Entrust.net Limited,OU=www.entrust.net/CPS incorp. by ref. (limits liab.),O=Entrust.net,C=US ++# Serial Number: 927650371 (0x374ad243) ++# Subject: CN=Entrust.net Secure Server Certification Authority,OU=(c) 1999 Entrust.net Limited,OU=www.entrust.net/CPS incorp. by ref. (limits liab.),O=Entrust.net,C=US ++# Not Valid Before: Tue May 25 16:09:40 1999 ++# Not Valid After : Sat May 25 16:39:40 2019 ++# Fingerprint (MD5): DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE ++# Fingerprint (SHA1): 99:A6:9B:E6:1A:FE:88:6B:4D:2B:82:00:7C:B8:54:FC:31:7E:15:39 ++CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "Entrust.net Secure Server CA" ++CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 ++CKA_SUBJECT MULTILINE_OCTAL ++\060\201\303\061\013\060\011\006\003\125\004\006\023\002\125\123 ++\061\024\060\022\006\003\125\004\012\023\013\105\156\164\162\165 ++\163\164\056\156\145\164\061\073\060\071\006\003\125\004\013\023 ++\062\167\167\167\056\145\156\164\162\165\163\164\056\156\145\164 ++\057\103\120\123\040\151\156\143\157\162\160\056\040\142\171\040 ++\162\145\146\056\040\050\154\151\155\151\164\163\040\154\151\141 ++\142\056\051\061\045\060\043\006\003\125\004\013\023\034\050\143 ++\051\040\061\071\071\071\040\105\156\164\162\165\163\164\056\156 ++\145\164\040\114\151\155\151\164\145\144\061\072\060\070\006\003 ++\125\004\003\023\061\105\156\164\162\165\163\164\056\156\145\164 ++\040\123\145\143\165\162\145\040\123\145\162\166\145\162\040\103 ++\145\162\164\151\146\151\143\141\164\151\157\156\040\101\165\164 ++\150\157\162\151\164\171 ++END ++CKA_ID UTF8 "0" ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\303\061\013\060\011\006\003\125\004\006\023\002\125\123 ++\061\024\060\022\006\003\125\004\012\023\013\105\156\164\162\165 ++\163\164\056\156\145\164\061\073\060\071\006\003\125\004\013\023 ++\062\167\167\167\056\145\156\164\162\165\163\164\056\156\145\164 ++\057\103\120\123\040\151\156\143\157\162\160\056\040\142\171\040 ++\162\145\146\056\040\050\154\151\155\151\164\163\040\154\151\141 ++\142\056\051\061\045\060\043\006\003\125\004\013\023\034\050\143 ++\051\040\061\071\071\071\040\105\156\164\162\165\163\164\056\156 ++\145\164\040\114\151\155\151\164\145\144\061\072\060\070\006\003 ++\125\004\003\023\061\105\156\164\162\165\163\164\056\156\145\164 ++\040\123\145\143\165\162\145\040\123\145\162\166\145\162\040\103 ++\145\162\164\151\146\151\143\141\164\151\157\156\040\101\165\164 ++\150\157\162\151\164\171 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\004\067\112\322\103 ++END ++CKA_VALUE MULTILINE_OCTAL ++\060\202\004\330\060\202\004\101\240\003\002\001\002\002\004\067 ++\112\322\103\060\015\006\011\052\206\110\206\367\015\001\001\005 ++\005\000\060\201\303\061\013\060\011\006\003\125\004\006\023\002 ++\125\123\061\024\060\022\006\003\125\004\012\023\013\105\156\164 ++\162\165\163\164\056\156\145\164\061\073\060\071\006\003\125\004 ++\013\023\062\167\167\167\056\145\156\164\162\165\163\164\056\156 ++\145\164\057\103\120\123\040\151\156\143\157\162\160\056\040\142 ++\171\040\162\145\146\056\040\050\154\151\155\151\164\163\040\154 ++\151\141\142\056\051\061\045\060\043\006\003\125\004\013\023\034 ++\050\143\051\040\061\071\071\071\040\105\156\164\162\165\163\164 ++\056\156\145\164\040\114\151\155\151\164\145\144\061\072\060\070 ++\006\003\125\004\003\023\061\105\156\164\162\165\163\164\056\156 ++\145\164\040\123\145\143\165\162\145\040\123\145\162\166\145\162 ++\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 ++\165\164\150\157\162\151\164\171\060\036\027\015\071\071\060\065 ++\062\065\061\066\060\071\064\060\132\027\015\061\071\060\065\062 ++\065\061\066\063\071\064\060\132\060\201\303\061\013\060\011\006 ++\003\125\004\006\023\002\125\123\061\024\060\022\006\003\125\004 ++\012\023\013\105\156\164\162\165\163\164\056\156\145\164\061\073 ++\060\071\006\003\125\004\013\023\062\167\167\167\056\145\156\164 ++\162\165\163\164\056\156\145\164\057\103\120\123\040\151\156\143 ++\157\162\160\056\040\142\171\040\162\145\146\056\040\050\154\151 ++\155\151\164\163\040\154\151\141\142\056\051\061\045\060\043\006 ++\003\125\004\013\023\034\050\143\051\040\061\071\071\071\040\105 ++\156\164\162\165\163\164\056\156\145\164\040\114\151\155\151\164 ++\145\144\061\072\060\070\006\003\125\004\003\023\061\105\156\164 ++\162\165\163\164\056\156\145\164\040\123\145\143\165\162\145\040 ++\123\145\162\166\145\162\040\103\145\162\164\151\146\151\143\141 ++\164\151\157\156\040\101\165\164\150\157\162\151\164\171\060\201 ++\235\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000 ++\003\201\213\000\060\201\207\002\201\201\000\315\050\203\064\124 ++\033\211\363\017\257\067\221\061\377\257\061\140\311\250\350\262 ++\020\150\355\237\347\223\066\361\012\144\273\107\365\004\027\077 ++\043\107\115\305\047\031\201\046\014\124\162\015\210\055\331\037 ++\232\022\237\274\263\161\323\200\031\077\107\146\173\214\065\050 ++\322\271\012\337\044\332\234\326\120\171\201\172\132\323\067\367 ++\302\112\330\051\222\046\144\321\344\230\154\072\000\212\365\064 ++\233\145\370\355\343\020\377\375\270\111\130\334\240\336\202\071 ++\153\201\261\026\031\141\271\124\266\346\103\002\001\003\243\202 ++\001\327\060\202\001\323\060\021\006\011\140\206\110\001\206\370 ++\102\001\001\004\004\003\002\000\007\060\202\001\031\006\003\125 ++\035\037\004\202\001\020\060\202\001\014\060\201\336\240\201\333 ++\240\201\330\244\201\325\060\201\322\061\013\060\011\006\003\125 ++\004\006\023\002\125\123\061\024\060\022\006\003\125\004\012\023 ++\013\105\156\164\162\165\163\164\056\156\145\164\061\073\060\071 ++\006\003\125\004\013\023\062\167\167\167\056\145\156\164\162\165 ++\163\164\056\156\145\164\057\103\120\123\040\151\156\143\157\162 ++\160\056\040\142\171\040\162\145\146\056\040\050\154\151\155\151 ++\164\163\040\154\151\141\142\056\051\061\045\060\043\006\003\125 ++\004\013\023\034\050\143\051\040\061\071\071\071\040\105\156\164 ++\162\165\163\164\056\156\145\164\040\114\151\155\151\164\145\144 ++\061\072\060\070\006\003\125\004\003\023\061\105\156\164\162\165 ++\163\164\056\156\145\164\040\123\145\143\165\162\145\040\123\145 ++\162\166\145\162\040\103\145\162\164\151\146\151\143\141\164\151 ++\157\156\040\101\165\164\150\157\162\151\164\171\061\015\060\013 ++\006\003\125\004\003\023\004\103\122\114\061\060\051\240\047\240 ++\045\206\043\150\164\164\160\072\057\057\167\167\167\056\145\156 ++\164\162\165\163\164\056\156\145\164\057\103\122\114\057\156\145 ++\164\061\056\143\162\154\060\053\006\003\125\035\020\004\044\060 ++\042\200\017\061\071\071\071\060\065\062\065\061\066\060\071\064 ++\060\132\201\017\062\060\061\071\060\065\062\065\061\066\060\071 ++\064\060\132\060\013\006\003\125\035\017\004\004\003\002\001\006 ++\060\037\006\003\125\035\043\004\030\060\026\200\024\360\027\142 ++\023\125\075\263\377\012\000\153\373\120\204\227\363\355\142\320 ++\032\060\035\006\003\125\035\016\004\026\004\024\360\027\142\023 ++\125\075\263\377\012\000\153\373\120\204\227\363\355\142\320\032 ++\060\014\006\003\125\035\023\004\005\060\003\001\001\377\060\031 ++\006\011\052\206\110\206\366\175\007\101\000\004\014\060\012\033 ++\004\126\064\056\060\003\002\004\220\060\015\006\011\052\206\110 ++\206\367\015\001\001\005\005\000\003\201\201\000\220\334\060\002 ++\372\144\164\302\247\012\245\174\041\215\064\027\250\373\107\016 ++\377\045\174\215\023\012\373\344\230\265\357\214\370\305\020\015 ++\367\222\276\361\303\325\325\225\152\004\273\054\316\046\066\145 ++\310\061\306\347\356\077\343\127\165\204\172\021\357\106\117\030 ++\364\323\230\273\250\207\062\272\162\366\074\342\075\237\327\035 ++\331\303\140\103\214\130\016\042\226\057\142\243\054\037\272\255 ++\005\357\253\062\170\207\240\124\163\031\265\134\005\371\122\076 ++\155\055\105\013\367\012\223\352\355\006\371\262 ++END ++ ++# Trust for Certificate "Entrust.net Secure Server CA" ++# Issuer: CN=Entrust.net Secure Server Certification Authority,OU=(c) 1999 Entrust.net Limited,OU=www.entrust.net/CPS incorp. by ref. (limits liab.),O=Entrust.net,C=US ++# Serial Number: 927650371 (0x374ad243) ++# Subject: CN=Entrust.net Secure Server Certification Authority,OU=(c) 1999 Entrust.net Limited,OU=www.entrust.net/CPS incorp. by ref. (limits liab.),O=Entrust.net,C=US ++# Not Valid Before: Tue May 25 16:09:40 1999 ++# Not Valid After : Sat May 25 16:39:40 2019 ++# Fingerprint (MD5): DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE ++# Fingerprint (SHA1): 99:A6:9B:E6:1A:FE:88:6B:4D:2B:82:00:7C:B8:54:FC:31:7E:15:39 ++CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST ++CKA_TOKEN CK_BBOOL CK_TRUE ++CKA_PRIVATE CK_BBOOL CK_FALSE ++CKA_MODIFIABLE CK_BBOOL CK_FALSE ++CKA_LABEL UTF8 "Entrust.net Secure Server CA" ++CKA_CERT_SHA1_HASH MULTILINE_OCTAL ++\231\246\233\346\032\376\210\153\115\053\202\000\174\270\124\374 ++\061\176\025\071 ++END ++CKA_CERT_MD5_HASH MULTILINE_OCTAL ++\337\362\200\163\314\361\346\141\163\374\365\102\351\305\174\356 ++END ++CKA_ISSUER MULTILINE_OCTAL ++\060\201\303\061\013\060\011\006\003\125\004\006\023\002\125\123 ++\061\024\060\022\006\003\125\004\012\023\013\105\156\164\162\165 ++\163\164\056\156\145\164\061\073\060\071\006\003\125\004\013\023 ++\062\167\167\167\056\145\156\164\162\165\163\164\056\156\145\164 ++\057\103\120\123\040\151\156\143\157\162\160\056\040\142\171\040 ++\162\145\146\056\040\050\154\151\155\151\164\163\040\154\151\141 ++\142\056\051\061\045\060\043\006\003\125\004\013\023\034\050\143 ++\051\040\061\071\071\071\040\105\156\164\162\165\163\164\056\156 ++\145\164\040\114\151\155\151\164\145\144\061\072\060\070\006\003 ++\125\004\003\023\061\105\156\164\162\165\163\164\056\156\145\164 ++\040\123\145\143\165\162\145\040\123\145\162\166\145\162\040\103 ++\145\162\164\151\146\151\143\141\164\151\157\156\040\101\165\164 ++\150\157\162\151\164\171 ++END ++CKA_SERIAL_NUMBER MULTILINE_OCTAL ++\002\004\067\112\322\103 ++END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE ++ ++# + # Certificate "Entrust.net Premium 2048 Secure Server CA" + # + # Issuer: CN=Entrust.net Certification Authority (2048),OU=(c) 1999 Entrust.net Limited,OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.),O=Entrust.net + # Serial Number: 946069240 (0x3863def8) + # Subject: CN=Entrust.net Certification Authority (2048),OU=(c) 1999 Entrust.net Limited,OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.),O=Entrust.net + # Not Valid Before: Fri Dec 24 17:50:51 1999 + # Not Valid After : Tue Jul 24 14:15:12 2029 + # Fingerprint (MD5): EE:29:31:BC:32:7E:9A:E6:E8:B5:F7:51:B4:34:71:90 + # Fingerprint (SHA1): 50:30:06:09:1D:97:D4:F5:AE:39:F7:CB:E7:92:7D:7D:65:2D:34:31 + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Entrust.net Premium 2048 Secure Server CA" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\264\061\024\060\022\006\003\125\004\012\023\013\105\156 + \164\162\165\163\164\056\156\145\164\061\100\060\076\006\003\125 + \004\013\024\067\167\167\167\056\145\156\164\162\165\163\164\056 + \156\145\164\057\103\120\123\137\062\060\064\070\040\151\156\143 + \157\162\160\056\040\142\171\040\162\145\146\056\040\050\154\151 + \155\151\164\163\040\154\151\141\142\056\051\061\045\060\043\006 + \003\125\004\013\023\034\050\143\051\040\061\071\071\071\040\105 + \156\164\162\165\163\164\056\156\145\164\040\114\151\155\151\164 + \145\144\061\063\060\061\006\003\125\004\003\023\052\105\156\164 + \162\165\163\164\056\156\145\164\040\103\145\162\164\151\146\151 + \143\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171 + \040\050\062\060\064\070\051 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\264\061\024\060\022\006\003\125\004\012\023\013\105\156 + \164\162\165\163\164\056\156\145\164\061\100\060\076\006\003\125 + \004\013\024\067\167\167\167\056\145\156\164\162\165\163\164\056 + \156\145\164\057\103\120\123\137\062\060\064\070\040\151\156\143 + \157\162\160\056\040\142\171\040\162\145\146\056\040\050\154\151 + \155\151\164\163\040\154\151\141\142\056\051\061\045\060\043\006 + \003\125\004\013\023\034\050\143\051\040\061\071\071\071\040\105 + \156\164\162\165\163\164\056\156\145\164\040\114\151\155\151\164 + \145\144\061\063\060\061\006\003\125\004\003\023\052\105\156\164 + \162\165\163\164\056\156\145\164\040\103\145\162\164\151\146\151 + \143\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171 + \040\050\062\060\064\070\051 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\004\070\143\336\370 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\004\052\060\202\003\022\240\003\002\001\002\002\004\070 + \143\336\370\060\015\006\011\052\206\110\206\367\015\001\001\005 +@@ -2410,100 +3431,103 @@ + \305\310\303\141\002\003\001\000\001\243\146\060\144\060\021\006 + \011\140\206\110\001\206\370\102\001\001\004\004\003\002\000\007 + \060\017\006\003\125\035\023\001\001\377\004\005\060\003\001\001 + \377\060\037\006\003\125\035\043\004\030\060\026\200\024\276\250 + \240\164\162\120\153\104\267\311\043\330\373\250\377\263\127\153 + \150\154\060\035\006\003\125\035\016\004\026\004\024\276\250\240 + \164\162\120\153\104\267\311\043\330\373\250\377\263\127\153\150 + \154\060\015\006\011\052\206\110\206\367\015\001\001\004\005\000 + \003\201\201\000\060\342\001\121\252\307\352\137\332\271\320\145 + \017\060\326\076\332\015\024\111\156\221\223\047\024\061\357\304 + \367\055\105\370\354\307\277\242\101\015\043\264\222\371\031\000 + \147\275\001\257\315\340\161\374\132\317\144\304\340\226\230\320 + \243\100\342\001\212\357\047\007\361\145\001\212\104\055\006\145 + \165\122\300\206\020\040\041\137\154\153\017\154\256\011\034\257 + \362\242\030\064\304\165\244\163\034\361\215\334\357\255\371\263 + \166\264\222\277\334\225\020\036\276\313\310\073\132\204\140\031 + \126\224\251\125 + END + + # Trust for Certificate "Equifax Secure Global eBusiness CA" + # Issuer: CN=Equifax Secure Global eBusiness CA-1,O=Equifax Secure Inc.,C=US + # Serial Number: 1 (0x1) + # Subject: CN=Equifax Secure Global eBusiness CA-1,O=Equifax Secure Inc.,C=US + # Not Valid Before: Mon Jun 21 04:00:00 1999 + # Not Valid After : Sun Jun 21 04:00:00 2020 + # Fingerprint (MD5): 8F:5D:77:06:27:C4:98:3C:5B:93:78:E7:D7:7D:9B:CC + # Fingerprint (SHA1): 7E:78:4A:10:1C:82:65:CC:2D:E1:F1:6D:47:B4:40:CA:D9:0A:19:45 + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Equifax Secure Global eBusiness CA" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \176\170\112\020\034\202\145\314\055\341\361\155\107\264\100\312 + \331\012\031\105 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \217\135\167\006\047\304\230\074\133\223\170\347\327\175\233\314 + END + CKA_ISSUER MULTILINE_OCTAL + \060\132\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \034\060\032\006\003\125\004\012\023\023\105\161\165\151\146\141 + \170\040\123\145\143\165\162\145\040\111\156\143\056\061\055\060 + \053\006\003\125\004\003\023\044\105\161\165\151\146\141\170\040 + \123\145\143\165\162\145\040\107\154\157\142\141\154\040\145\102 + \165\163\151\156\145\163\163\040\103\101\055\061 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\001 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "Equifax Secure eBusiness CA 1" + # + # Issuer: CN=Equifax Secure eBusiness CA-1,O=Equifax Secure Inc.,C=US + # Serial Number: 4 (0x4) + # Subject: CN=Equifax Secure eBusiness CA-1,O=Equifax Secure Inc.,C=US + # Not Valid Before: Mon Jun 21 04:00:00 1999 + # Not Valid After : Sun Jun 21 04:00:00 2020 + # Fingerprint (MD5): 64:9C:EF:2E:44:FC:C6:8F:52:07:D0:51:73:8F:CB:3D + # Fingerprint (SHA1): DA:40:18:8B:91:89:A3:ED:EE:AE:DA:97:FE:2F:9D:F5:B7:D1:8A:41 + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Equifax Secure eBusiness CA 1" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\123\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \034\060\032\006\003\125\004\012\023\023\105\161\165\151\146\141 + \170\040\123\145\143\165\162\145\040\111\156\143\056\061\046\060 + \044\006\003\125\004\003\023\035\105\161\165\151\146\141\170\040 + \123\145\143\165\162\145\040\145\102\165\163\151\156\145\163\163 + \040\103\101\055\061 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\123\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \034\060\032\006\003\125\004\012\023\023\105\161\165\151\146\141 + \170\040\123\145\143\165\162\145\040\111\156\143\056\061\046\060 + \044\006\003\125\004\003\023\035\105\161\165\151\146\141\170\040 + \123\145\143\165\162\145\040\145\102\165\163\151\156\145\163\163 + \040\103\101\055\061 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\004 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\002\202\060\202\001\353\240\003\002\001\002\002\001\004 + \060\015\006\011\052\206\110\206\367\015\001\001\004\005\000\060 + \123\061\013\060\011\006\003\125\004\006\023\002\125\123\061\034 + \060\032\006\003\125\004\012\023\023\105\161\165\151\146\141\170 + \040\123\145\143\165\162\145\040\111\156\143\056\061\046\060\044 + \006\003\125\004\003\023\035\105\161\165\151\146\141\170\040\123 + \145\143\165\162\145\040\145\102\165\163\151\156\145\163\163\040 + \103\101\055\061\060\036\027\015\071\071\060\066\062\061\060\064 +@@ -2526,100 +3550,103 @@ + \022\173\376\217\246\003\002\003\001\000\001\243\146\060\144\060 + \021\006\011\140\206\110\001\206\370\102\001\001\004\004\003\002 + \000\007\060\017\006\003\125\035\023\001\001\377\004\005\060\003 + \001\001\377\060\037\006\003\125\035\043\004\030\060\026\200\024 + \112\170\062\122\021\333\131\026\066\136\337\301\024\066\100\152 + \107\174\114\241\060\035\006\003\125\035\016\004\026\004\024\112 + \170\062\122\021\333\131\026\066\136\337\301\024\066\100\152\107 + \174\114\241\060\015\006\011\052\206\110\206\367\015\001\001\004 + \005\000\003\201\201\000\165\133\250\233\003\021\346\351\126\114 + \315\371\251\114\300\015\232\363\314\145\151\346\045\166\314\131 + \267\326\124\303\035\315\231\254\031\335\264\205\325\340\075\374 + \142\040\247\204\113\130\145\361\342\371\225\041\077\365\324\176 + \130\036\107\207\124\076\130\241\265\265\370\052\357\161\347\274 + \303\366\261\111\106\342\327\240\153\345\126\172\232\047\230\174 + \106\142\024\347\311\374\156\003\022\171\200\070\035\110\202\215 + \374\027\376\052\226\053\265\142\246\246\075\275\177\222\131\315 + \132\052\202\262\067\171 + END + + # Trust for Certificate "Equifax Secure eBusiness CA 1" + # Issuer: CN=Equifax Secure eBusiness CA-1,O=Equifax Secure Inc.,C=US + # Serial Number: 4 (0x4) + # Subject: CN=Equifax Secure eBusiness CA-1,O=Equifax Secure Inc.,C=US + # Not Valid Before: Mon Jun 21 04:00:00 1999 + # Not Valid After : Sun Jun 21 04:00:00 2020 + # Fingerprint (MD5): 64:9C:EF:2E:44:FC:C6:8F:52:07:D0:51:73:8F:CB:3D + # Fingerprint (SHA1): DA:40:18:8B:91:89:A3:ED:EE:AE:DA:97:FE:2F:9D:F5:B7:D1:8A:41 + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Equifax Secure eBusiness CA 1" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \332\100\030\213\221\211\243\355\356\256\332\227\376\057\235\365 + \267\321\212\101 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \144\234\357\056\104\374\306\217\122\007\320\121\163\217\313\075 + END + CKA_ISSUER MULTILINE_OCTAL + \060\123\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \034\060\032\006\003\125\004\012\023\023\105\161\165\151\146\141 + \170\040\123\145\143\165\162\145\040\111\156\143\056\061\046\060 + \044\006\003\125\004\003\023\035\105\161\165\151\146\141\170\040 + \123\145\143\165\162\145\040\145\102\165\163\151\156\145\163\163 + \040\103\101\055\061 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\004 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "AddTrust Low-Value Services Root" + # + # Issuer: CN=AddTrust Class 1 CA Root,OU=AddTrust TTP Network,O=AddTrust AB,C=SE + # Serial Number: 1 (0x1) + # Subject: CN=AddTrust Class 1 CA Root,OU=AddTrust TTP Network,O=AddTrust AB,C=SE + # Not Valid Before: Tue May 30 10:38:31 2000 + # Not Valid After : Sat May 30 10:38:31 2020 + # Fingerprint (MD5): 1E:42:95:02:33:92:6B:B9:5F:C0:7F:DA:D6:B2:4B:FC + # Fingerprint (SHA1): CC:AB:0E:A0:4C:23:01:D6:69:7B:DD:37:9F:CD:12:EB:24:E3:94:9D + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "AddTrust Low-Value Services Root" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\145\061\013\060\011\006\003\125\004\006\023\002\123\105\061 + \024\060\022\006\003\125\004\012\023\013\101\144\144\124\162\165 + \163\164\040\101\102\061\035\060\033\006\003\125\004\013\023\024 + \101\144\144\124\162\165\163\164\040\124\124\120\040\116\145\164 + \167\157\162\153\061\041\060\037\006\003\125\004\003\023\030\101 + \144\144\124\162\165\163\164\040\103\154\141\163\163\040\061\040 + \103\101\040\122\157\157\164 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\145\061\013\060\011\006\003\125\004\006\023\002\123\105\061 + \024\060\022\006\003\125\004\012\023\013\101\144\144\124\162\165 + \163\164\040\101\102\061\035\060\033\006\003\125\004\013\023\024 + \101\144\144\124\162\165\163\164\040\124\124\120\040\116\145\164 + \167\157\162\153\061\041\060\037\006\003\125\004\003\023\030\101 + \144\144\124\162\165\163\164\040\103\154\141\163\163\040\061\040 + \103\101\040\122\157\157\164 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\001 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\004\030\060\202\003\000\240\003\002\001\002\002\001\001 + \060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060 + \145\061\013\060\011\006\003\125\004\006\023\002\123\105\061\024 + \060\022\006\003\125\004\012\023\013\101\144\144\124\162\165\163 + \164\040\101\102\061\035\060\033\006\003\125\004\013\023\024\101 + \144\144\124\162\165\163\164\040\124\124\120\040\116\145\164\167 +@@ -7415,100 +8442,103 @@ + \164\164\160\163\072\057\057\167\167\167\056\156\145\164\154\157 + \143\153\056\156\145\164\057\144\157\143\163\040\157\162\040\142 + \171\040\145\055\155\141\151\154\040\141\164\040\143\160\163\100 + \156\145\164\154\157\143\153\056\156\145\164\056\060\015\006\011 + \052\206\110\206\367\015\001\001\004\005\000\003\201\201\000\004 + \333\256\214\027\257\370\016\220\061\116\315\076\011\300\155\072 + \260\370\063\114\107\114\343\165\210\020\227\254\260\070\025\221 + \306\051\226\314\041\300\155\074\245\164\317\330\202\245\071\303 + \145\343\102\160\273\042\220\343\175\333\065\166\341\240\265\332 + \237\160\156\223\032\060\071\035\060\333\056\343\174\262\221\262 + \321\067\051\372\271\326\027\134\107\117\343\035\070\353\237\325 + \173\225\250\050\236\025\112\321\321\320\053\000\227\240\342\222 + \066\053\143\254\130\001\153\063\051\120\206\203\361\001\110 + END + + # Trust for Certificate "NetLock Business (Class B) Root" + # Issuer: CN=NetLock Uzleti (Class B) Tanusitvanykiado,OU=Tanusitvanykiadok,O=NetLock Halozatbiztonsagi Kft.,L=Budapest,C=HU + # Serial Number: 105 (0x69) + # Subject: CN=NetLock Uzleti (Class B) Tanusitvanykiado,OU=Tanusitvanykiadok,O=NetLock Halozatbiztonsagi Kft.,L=Budapest,C=HU + # Not Valid Before: Thu Feb 25 14:10:22 1999 + # Not Valid After : Wed Feb 20 14:10:22 2019 + # Fingerprint (MD5): 39:16:AA:B9:6A:41:E1:14:69:DF:9E:6C:3B:72:DC:B6 + # Fingerprint (SHA1): 87:9F:4B:EE:05:DF:98:58:3B:E3:60:D6:33:E7:0D:3F:FE:98:71:AF + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "NetLock Business (Class B) Root" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \207\237\113\356\005\337\230\130\073\343\140\326\063\347\015\077 + \376\230\161\257 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \071\026\252\271\152\101\341\024\151\337\236\154\073\162\334\266 + END + CKA_ISSUER MULTILINE_OCTAL + \060\201\231\061\013\060\011\006\003\125\004\006\023\002\110\125 + \061\021\060\017\006\003\125\004\007\023\010\102\165\144\141\160 + \145\163\164\061\047\060\045\006\003\125\004\012\023\036\116\145 + \164\114\157\143\153\040\110\141\154\157\172\141\164\142\151\172 + \164\157\156\163\141\147\151\040\113\146\164\056\061\032\060\030 + \006\003\125\004\013\023\021\124\141\156\165\163\151\164\166\141 + \156\171\153\151\141\144\157\153\061\062\060\060\006\003\125\004 + \003\023\051\116\145\164\114\157\143\153\040\125\172\154\145\164 + \151\040\050\103\154\141\163\163\040\102\051\040\124\141\156\165 + \163\151\164\166\141\156\171\153\151\141\144\157 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\151 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "NetLock Express (Class C) Root" + # + # Issuer: CN=NetLock Expressz (Class C) Tanusitvanykiado,OU=Tanusitvanykiadok,O=NetLock Halozatbiztonsagi Kft.,L=Budapest,C=HU + # Serial Number: 104 (0x68) + # Subject: CN=NetLock Expressz (Class C) Tanusitvanykiado,OU=Tanusitvanykiadok,O=NetLock Halozatbiztonsagi Kft.,L=Budapest,C=HU + # Not Valid Before: Thu Feb 25 14:08:11 1999 + # Not Valid After : Wed Feb 20 14:08:11 2019 + # Fingerprint (MD5): 4F:EB:F1:F0:70:C2:80:63:5D:58:9F:DA:12:3C:A9:C4 + # Fingerprint (SHA1): E3:92:51:2F:0A:CF:F5:05:DF:F6:DE:06:7F:75:37:E1:65:EA:57:4B + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "NetLock Express (Class C) Root" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\233\061\013\060\011\006\003\125\004\006\023\002\110\125 + \061\021\060\017\006\003\125\004\007\023\010\102\165\144\141\160 + \145\163\164\061\047\060\045\006\003\125\004\012\023\036\116\145 + \164\114\157\143\153\040\110\141\154\157\172\141\164\142\151\172 + \164\157\156\163\141\147\151\040\113\146\164\056\061\032\060\030 + \006\003\125\004\013\023\021\124\141\156\165\163\151\164\166\141 + \156\171\153\151\141\144\157\153\061\064\060\062\006\003\125\004 + \003\023\053\116\145\164\114\157\143\153\040\105\170\160\162\145 + \163\163\172\040\050\103\154\141\163\163\040\103\051\040\124\141 + \156\165\163\151\164\166\141\156\171\153\151\141\144\157 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\233\061\013\060\011\006\003\125\004\006\023\002\110\125 + \061\021\060\017\006\003\125\004\007\023\010\102\165\144\141\160 + \145\163\164\061\047\060\045\006\003\125\004\012\023\036\116\145 + \164\114\157\143\153\040\110\141\154\157\172\141\164\142\151\172 + \164\157\156\163\141\147\151\040\113\146\164\056\061\032\060\030 + \006\003\125\004\013\023\021\124\141\156\165\163\151\164\166\141 + \156\171\153\151\141\144\157\153\061\064\060\062\006\003\125\004 + \003\023\053\116\145\164\114\157\143\153\040\105\170\160\162\145 + \163\163\172\040\050\103\154\141\163\163\040\103\051\040\124\141 + \156\165\163\151\164\166\141\156\171\153\151\141\144\157 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\150 + END + CKA_VALUE MULTILINE_OCTAL +@@ -7588,100 +8618,103 @@ + \145\164\154\157\143\153\056\156\145\164\057\144\157\143\163\040 + \157\162\040\142\171\040\145\055\155\141\151\154\040\141\164\040 + \143\160\163\100\156\145\164\154\157\143\153\056\156\145\164\056 + \060\015\006\011\052\206\110\206\367\015\001\001\004\005\000\003 + \201\201\000\020\255\177\327\014\062\200\012\330\206\361\171\230 + \265\255\324\315\263\066\304\226\110\301\134\315\232\331\005\056 + \237\276\120\353\364\046\024\020\055\324\146\027\370\236\301\047 + \375\361\355\344\173\113\240\154\265\253\232\127\160\246\355\240 + \244\355\056\365\375\374\275\376\115\067\010\014\274\343\226\203 + \042\365\111\033\177\113\053\264\124\301\200\174\231\116\035\320 + \214\356\320\254\345\222\372\165\126\376\144\240\023\217\270\270 + \026\235\141\005\147\200\310\320\330\245\007\002\064\230\004\215 + \063\004\324 + END + + # Trust for Certificate "NetLock Express (Class C) Root" + # Issuer: CN=NetLock Expressz (Class C) Tanusitvanykiado,OU=Tanusitvanykiadok,O=NetLock Halozatbiztonsagi Kft.,L=Budapest,C=HU + # Serial Number: 104 (0x68) + # Subject: CN=NetLock Expressz (Class C) Tanusitvanykiado,OU=Tanusitvanykiadok,O=NetLock Halozatbiztonsagi Kft.,L=Budapest,C=HU + # Not Valid Before: Thu Feb 25 14:08:11 1999 + # Not Valid After : Wed Feb 20 14:08:11 2019 + # Fingerprint (MD5): 4F:EB:F1:F0:70:C2:80:63:5D:58:9F:DA:12:3C:A9:C4 + # Fingerprint (SHA1): E3:92:51:2F:0A:CF:F5:05:DF:F6:DE:06:7F:75:37:E1:65:EA:57:4B + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "NetLock Express (Class C) Root" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \343\222\121\057\012\317\365\005\337\366\336\006\177\165\067\341 + \145\352\127\113 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \117\353\361\360\160\302\200\143\135\130\237\332\022\074\251\304 + END + CKA_ISSUER MULTILINE_OCTAL + \060\201\233\061\013\060\011\006\003\125\004\006\023\002\110\125 + \061\021\060\017\006\003\125\004\007\023\010\102\165\144\141\160 + \145\163\164\061\047\060\045\006\003\125\004\012\023\036\116\145 + \164\114\157\143\153\040\110\141\154\157\172\141\164\142\151\172 + \164\157\156\163\141\147\151\040\113\146\164\056\061\032\060\030 + \006\003\125\004\013\023\021\124\141\156\165\163\151\164\166\141 + \156\171\153\151\141\144\157\153\061\064\060\062\006\003\125\004 + \003\023\053\116\145\164\114\157\143\153\040\105\170\160\162\145 + \163\163\172\040\050\103\154\141\163\163\040\103\051\040\124\141 + \156\165\163\151\164\166\141\156\171\153\151\141\144\157 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\001\150 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "XRamp Global CA Root" + # + # Issuer: CN=XRamp Global Certification Authority,O=XRamp Security Services Inc,OU=www.xrampsecurity.com,C=US + # Serial Number:50:94:6c:ec:18:ea:d5:9c:4d:d5:97:ef:75:8f:a0:ad + # Subject: CN=XRamp Global Certification Authority,O=XRamp Security Services Inc,OU=www.xrampsecurity.com,C=US + # Not Valid Before: Mon Nov 01 17:14:04 2004 + # Not Valid After : Mon Jan 01 05:37:19 2035 + # Fingerprint (MD5): A1:0B:44:B3:CA:10:D8:00:6E:9D:0F:D8:0F:92:0A:D1 + # Fingerprint (SHA1): B8:01:86:D1:EB:9C:86:A5:41:04:CF:30:54:F3:4C:52:B7:E5:58:C6 + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "XRamp Global CA Root" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\202\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\036\060\034\006\003\125\004\013\023\025\167\167\167\056\170 + \162\141\155\160\163\145\143\165\162\151\164\171\056\143\157\155 + \061\044\060\042\006\003\125\004\012\023\033\130\122\141\155\160 + \040\123\145\143\165\162\151\164\171\040\123\145\162\166\151\143 + \145\163\040\111\156\143\061\055\060\053\006\003\125\004\003\023 + \044\130\122\141\155\160\040\107\154\157\142\141\154\040\103\145 + \162\164\151\146\151\143\141\164\151\157\156\040\101\165\164\150 + \157\162\151\164\171 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\202\061\013\060\011\006\003\125\004\006\023\002\125\123 + \061\036\060\034\006\003\125\004\013\023\025\167\167\167\056\170 + \162\141\155\160\163\145\143\165\162\151\164\171\056\143\157\155 + \061\044\060\042\006\003\125\004\012\023\033\130\122\141\155\160 + \040\123\145\143\165\162\151\164\171\040\123\145\162\166\151\143 + \145\163\040\111\156\143\061\055\060\053\006\003\125\004\003\023 + \044\130\122\141\155\160\040\107\154\157\142\141\154\040\103\145 + \162\164\151\146\151\143\141\164\151\157\156\040\101\165\164\150 + \157\162\151\164\171 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\020\120\224\154\354\030\352\325\234\115\325\227\357\165\217 + \240\255 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\004\060\060\202\003\030\240\003\002\001\002\002\020\120 +@@ -17139,100 +18172,103 @@ + \005\252\354\003\037\170\177\236\223\271\232\000\252\043\175\326 + \254\205\242\143\105\307\162\047\314\364\114\306\165\161\322\071 + \357\117\102\360\165\337\012\220\306\216\040\157\230\017\370\254 + \043\137\160\051\066\244\311\206\347\261\232\040\313\123\245\205 + \347\075\276\175\232\376\044\105\063\334\166\025\355\017\242\161 + \144\114\145\056\201\150\105\247\002\003\001\000\001\060\015\006 + \011\052\206\110\206\367\015\001\001\005\005\000\003\201\201\000 + \020\162\122\251\005\024\031\062\010\101\360\305\153\012\314\176 + \017\041\031\315\344\147\334\137\251\033\346\312\350\163\235\042 + \330\230\156\163\003\141\221\305\174\260\105\100\156\104\235\215 + \260\261\226\164\141\055\015\251\105\322\244\222\052\326\232\165 + \227\156\077\123\375\105\231\140\035\250\053\114\371\136\247\011 + \330\165\060\327\322\145\140\075\147\326\110\125\165\151\077\221 + \365\110\013\107\151\042\151\202\226\276\311\310\070\206\112\172 + \054\163\031\110\151\116\153\174\145\277\017\374\160\316\210\220 + END + + # Trust for Certificate "Verisign Class 3 Public Primary Certification Authority" + # Issuer: OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US + # Serial Number:3c:91:31:cb:1f:f6:d0:1b:0e:9a:b8:d0:44:bf:12:be + # Subject: OU=Class 3 Public Primary Certification Authority,O="VeriSign, Inc.",C=US + # Not Valid Before: Mon Jan 29 00:00:00 1996 + # Not Valid After : Wed Aug 02 23:59:59 2028 + # Fingerprint (MD5): EF:5A:F1:33:EF:F1:CD:BB:51:02:EE:12:14:4B:96:C4 + # Fingerprint (SHA1): A1:DB:63:93:91:6F:17:E4:18:55:09:40:04:15:C7:02:40:B0:AE:6B + CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Verisign Class 3 Public Primary Certification Authority" + CKA_CERT_SHA1_HASH MULTILINE_OCTAL + \241\333\143\223\221\157\027\344\030\125\011\100\004\025\307\002 + \100\260\256\153 + END + CKA_CERT_MD5_HASH MULTILINE_OCTAL + \357\132\361\063\357\361\315\273\121\002\356\022\024\113\226\304 + END + CKA_ISSUER MULTILINE_OCTAL + \060\137\061\013\060\011\006\003\125\004\006\023\002\125\123\061 + \027\060\025\006\003\125\004\012\023\016\126\145\162\151\123\151 + \147\156\054\040\111\156\143\056\061\067\060\065\006\003\125\004 + \013\023\056\103\154\141\163\163\040\063\040\120\165\142\154\151 + \143\040\120\162\151\155\141\162\171\040\103\145\162\164\151\146 + \151\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164 + \171 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\020\074\221\061\313\037\366\320\033\016\232\270\320\104\277 + \022\276 + END ++LEGACY_CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR ++LEGACY_CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR + CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # + # Certificate "Microsec e-Szigno Root CA 2009" + # + # Issuer: E=info@e-szigno.hu,CN=Microsec e-Szigno Root CA 2009,O=Microsec Ltd.,L=Budapest,C=HU + # Serial Number:00:c2:7e:43:04:4e:47:3f:19 + # Subject: E=info@e-szigno.hu,CN=Microsec e-Szigno Root CA 2009,O=Microsec Ltd.,L=Budapest,C=HU + # Not Valid Before: Tue Jun 16 11:30:18 2009 + # Not Valid After : Sun Dec 30 11:30:18 2029 + # Fingerprint (MD5): F8:49:F4:03:BC:44:2D:83:BE:48:69:7D:29:64:FC:B1 + # Fingerprint (SHA1): 89:DF:74:FE:5C:F4:0F:4A:80:F9:E3:37:7D:54:DA:91:E1:01:31:8E + CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE + CKA_TOKEN CK_BBOOL CK_TRUE + CKA_PRIVATE CK_BBOOL CK_FALSE + CKA_MODIFIABLE CK_BBOOL CK_FALSE + CKA_LABEL UTF8 "Microsec e-Szigno Root CA 2009" + CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 + CKA_SUBJECT MULTILINE_OCTAL + \060\201\202\061\013\060\011\006\003\125\004\006\023\002\110\125 + \061\021\060\017\006\003\125\004\007\014\010\102\165\144\141\160 + \145\163\164\061\026\060\024\006\003\125\004\012\014\015\115\151 + \143\162\157\163\145\143\040\114\164\144\056\061\047\060\045\006 + \003\125\004\003\014\036\115\151\143\162\157\163\145\143\040\145 + \055\123\172\151\147\156\157\040\122\157\157\164\040\103\101\040 + \062\060\060\071\061\037\060\035\006\011\052\206\110\206\367\015 + \001\011\001\026\020\151\156\146\157\100\145\055\163\172\151\147 + \156\157\056\150\165 + END + CKA_ID UTF8 "0" + CKA_ISSUER MULTILINE_OCTAL + \060\201\202\061\013\060\011\006\003\125\004\006\023\002\110\125 + \061\021\060\017\006\003\125\004\007\014\010\102\165\144\141\160 + \145\163\164\061\026\060\024\006\003\125\004\012\014\015\115\151 + \143\162\157\163\145\143\040\114\164\144\056\061\047\060\045\006 + \003\125\004\003\014\036\115\151\143\162\157\163\145\143\040\145 + \055\123\172\151\147\156\157\040\122\157\157\164\040\103\101\040 + \062\060\060\071\061\037\060\035\006\011\052\206\110\206\367\015 + \001\011\001\026\020\151\156\146\157\100\145\055\163\172\151\147 + \156\157\056\150\165 + END + CKA_SERIAL_NUMBER MULTILINE_OCTAL + \002\011\000\302\176\103\004\116\107\077\031 + END + CKA_VALUE MULTILINE_OCTAL + \060\202\004\012\060\202\002\362\240\003\002\001\002\002\011\000 + \302\176\103\004\116\107\077\031\060\015\006\011\052\206\110\206 diff --git a/mingw-w64-cairo/0002-fix-using-strings.patch b/mingw-w64-cairo/0002-fix-using-strings.patch deleted file mode 100644 index 789a1904fc..0000000000 --- a/mingw-w64-cairo/0002-fix-using-strings.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- cairo-1.14.0/build/aclocal.float.m4.orig 2014-10-14 01:46:33.000000000 +0000 -+++ cairo-1.14.0/build/aclocal.float.m4 2014-10-14 06:16:08.348180700 +0000 -@@ -31,10 +31,10 @@ - - ]])], [ - --if strings - conftest | grep noonsees >/dev/null ; then -+if strings - conftest$ac_exeext | grep noonsees >/dev/null ; then - ax_cv_c_float_words_bigendian=yes - fi --if strings - conftest | grep seesnoon >/dev/null ; then -+if strings - conftest$ac_exeext | grep seesnoon >/dev/null ; then - if test "$ax_cv_c_float_words_bigendian" = unknown; then - ax_cv_c_float_words_bigendian=no - else diff --git a/mingw-w64-cairo/0013-mozilla-transparent-windows.all.patch b/mingw-w64-cairo/0013-mozilla-transparent-windows.all.patch deleted file mode 100644 index e6712c01a9..0000000000 --- a/mingw-w64-cairo/0013-mozilla-transparent-windows.all.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff --git a/gfx/cairo/cairo/src/cairo-win32.h b/gfx/cairo/cairo/src/cairo-win32.h ---- a/src/cairo-win32.h -+++ b/src/cairo-win32.h -@@ -44,16 +44,19 @@ - #include - - CAIRO_BEGIN_DECLS - - cairo_public cairo_surface_t * - cairo_win32_surface_create (HDC hdc); - - cairo_public cairo_surface_t * -+cairo_win32_surface_create_with_alpha (HDC hdc); -+ -+cairo_public cairo_surface_t * - cairo_win32_printing_surface_create (HDC hdc); - - cairo_public cairo_surface_t * - cairo_win32_surface_create_with_ddb (HDC hdc, - cairo_format_t format, - int width, - int height); - ---- cairo-1.12.16/src/win32/cairo-win32-display-surface.c.orig 2013-08-26 15:07:21.000000000 +0000 -+++ cairo-1.12.16/src/win32/cairo-win32-display-surface.c 2014-03-27 00:04:01.097336000 +0000 -@@ -916,33 +916,14 @@ - * multiplied by all the src components. - */ - --/** -- * cairo_win32_surface_create: -- * @hdc: the DC to create a surface for -- * -- * Creates a cairo surface that targets the given DC. The DC will be -- * queried for its initial clip extents, and this will be used as the -- * size of the cairo surface. The resulting surface will always be of -- * format %CAIRO_FORMAT_RGB24; should you need another surface format, -- * you will need to create one through -- * cairo_win32_surface_create_with_dib(). -- * -- * Return value: the newly created surface -- * -- * Since: 1.0 -- **/ --cairo_surface_t * --cairo_win32_surface_create (HDC hdc) -+static cairo_surface_t * -+cairo_win32_surface_create_internal (HDC hdc, cairo_format_t format) - { - cairo_win32_display_surface_t *surface; - -- cairo_format_t format; - cairo_status_t status; - cairo_device_t *device; - -- /* Assume that everything coming in as a HDC is RGB24 */ -- format = CAIRO_FORMAT_RGB24; -- - surface = malloc (sizeof (*surface)); - if (surface == NULL) - return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); -@@ -977,6 +958,47 @@ - } - - /** -+ * cairo_win32_surface_create: -+ * @hdc: the DC to create a surface for -+ * -+ * Creates a cairo surface that targets the given DC. The DC will be -+ * queried for its initial clip extents, and this will be used as the -+ * size of the cairo surface. The resulting surface will always be of -+ * format %CAIRO_FORMAT_RGB24; should you need another surface format, -+ * you will need to create one through -+ * cairo_win32_surface_create_with_dib(). -+ * -+ * Return value: the newly created surface -+ * -+ * Since: 1.0 -+ **/ -+cairo_surface_t * -+cairo_win32_surface_create (HDC hdc) -+{ -+ return cairo_win32_surface_create_internal(hdc, CAIRO_FORMAT_RGB24); -+} -+ -+/** -+ * cairo_win32_surface_create_with_alpha: -+ * @hdc: the DC to create a surface for -+ * -+ * Creates a cairo surface that targets the given DC. The DC will be -+ * queried for its initial clip extents, and this will be used as the -+ * size of the cairo surface. The resulting surface will always be of -+ * format %CAIRO_FORMAT_ARGB32; this format is used when drawing into -+ * transparent windows. -+ * -+ * Return value: the newly created surface -+ * -+ * Since: 1.12 -+ **/ -+cairo_surface_t * -+cairo_win32_surface_create_with_alpha (HDC hdc) -+{ -+ return cairo_win32_surface_create_internal(hdc, CAIRO_FORMAT_ARGB32); -+} -+ -+/** - * cairo_win32_surface_create_with_dib: - * @format: format of pixels in the surface to create - * @width: width of the surface, in pixels diff --git a/mingw-w64-cairo/0022-dont-fail-argb-similar.all.patch b/mingw-w64-cairo/0022-dont-fail-argb-similar.all.patch deleted file mode 100644 index 4306e54608..0000000000 --- a/mingw-w64-cairo/0022-dont-fail-argb-similar.all.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cairo-bb17403622e9ea474017e0039af8ee48b2b285db/src/win32/cairo-win32-display-surface.c.orig 2014-04-05 19:23:25.770005100 +0000 -+++ cairo-bb17403622e9ea474017e0039af8ee48b2b285db/src/win32/cairo-win32-display-surface.c 2014-04-05 19:27:59.506765200 +0000 -@@ -1049,7 +1049,7 @@ - HDC screen_dc, ddb_dc; - HBITMAP saved_dc_bitmap; - -- if (format != CAIRO_FORMAT_RGB24) -+ if (format != CAIRO_FORMAT_RGB24 && format != CAIRO_FORMAT_ARGB32) - return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); - /* XXX handle these eventually - format != CAIRO_FORMAT_A8 || diff --git a/mingw-w64-cairo/0027-Bug-53121-hack-around.all.patch b/mingw-w64-cairo/0027-Bug-53121-hack-around.all.patch deleted file mode 100644 index 9c1e3490db..0000000000 --- a/mingw-w64-cairo/0027-Bug-53121-hack-around.all.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 844455c14f8e9e4767fd661e475a9c6fdea9d22e Mon Sep 17 00:00:00 2001 -From: Massimo Valentini -Date: Wed, 11 Sep 2013 18:10:38 +0200 -Subject: [PATCH] Bug 53121 - My program runs successfully with... - -Cairo-1.10.2, but getting SIGSEGV with 1.12.2. ---- - src/win32/cairo-win32-display-surface.c | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c -index 5ecdbee..965f2c4 100644 ---- a/src/win32/cairo-win32-display-surface.c -+++ b/src/win32/cairo-win32-display-surface.c -@@ -455,17 +455,17 @@ _cairo_win32_display_surface_map_to_image (void *abstract_sur - surface->fallback = - _cairo_win32_display_surface_create_for_dc (surface->win32.dc, - surface->win32.format, -- surface->win32.extents.width, -- surface->win32.extents.height); -+ surface->win32.extents.x + surface->win32.extents.width, -+ surface->win32.extents.y + surface->win32.extents.height); - if (unlikely (status = surface->fallback->status)) - goto err; - - if (!BitBlt (to_win32_surface(surface->fallback)->dc, -- 0, 0, -+ surface->win32.extents.x, surface->win32.extents.y, - surface->win32.extents.width, - surface->win32.extents.height, - surface->win32.dc, -- 0, 0, -+ surface->win32.extents.x, surface->win32.extents.y, - SRCCOPY)) { - status = _cairo_error (CAIRO_STATUS_DEVICE_ERROR); - goto err; --- -1.7.6.5 - diff --git a/mingw-w64-cairo/0030-add-cairo-API-to-setup-Win32-surface-for-HDC.patch b/mingw-w64-cairo/0030-add-cairo-API-to-setup-Win32-surface-for-HDC.patch new file mode 100644 index 0000000000..70d90ff98b --- /dev/null +++ b/mingw-w64-cairo/0030-add-cairo-API-to-setup-Win32-surface-for-HDC.patch @@ -0,0 +1,138 @@ +From 16898ba11b4d6e9e2e64bb2d02d0fb5adbe266e2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= + =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= +Date: Thu, 26 Mar 2015 19:33:43 +0000 +Subject: win32: Add cairo API to set up a Win32 surface for an HDC with an + alpha channel. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: РуÑлан Ижбулатов +Reviewed-by: Bryce Harrington + +diff --git a/src/cairo-win32.h b/src/cairo-win32.h +index 3d2e1c6..db4cac6 100644 +--- a/src/cairo-win32.h ++++ b/src/cairo-win32.h +@@ -49,6 +49,10 @@ cairo_public cairo_surface_t * + cairo_win32_surface_create (HDC hdc); + + cairo_public cairo_surface_t * ++cairo_win32_surface_create_with_format (HDC hdc, ++ cairo_format_t format); ++ ++cairo_public cairo_surface_t * + cairo_win32_printing_surface_create (HDC hdc); + + cairo_public cairo_surface_t * +diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c +index 965f2c4..1571480 100644 +--- a/src/win32/cairo-win32-display-surface.c ++++ b/src/win32/cairo-win32-display-surface.c +@@ -917,31 +917,41 @@ static const cairo_surface_backend_t cairo_win32_display_surface_backend = { + */ + + /** +- * cairo_win32_surface_create: ++ * cairo_win32_surface_create_with_format: + * @hdc: the DC to create a surface for ++ * @format: format of pixels in the surface to create + * + * Creates a cairo surface that targets the given DC. The DC will be + * queried for its initial clip extents, and this will be used as the +- * size of the cairo surface. The resulting surface will always be of +- * format %CAIRO_FORMAT_RGB24; should you need another surface format, +- * you will need to create one through +- * cairo_win32_surface_create_with_dib(). ++ * size of the cairo surface. + * +- * Return value: the newly created surface ++ * Supported formats are: ++ * %CAIRO_FORMAT_ARGB32 ++ * %CAIRO_FORMAT_RGB24 + * +- * Since: 1.0 ++ * Note: @format only tells cairo how to draw on the surface, not what ++ * the format of the surface is. Namely, cairo does not (and cannot) ++ * check that @hdc actually supports alpha-transparency. ++ * ++ * Return value: the newly created surface, NULL on failure ++ * ++ * Since: 1.14.3 + **/ + cairo_surface_t * +-cairo_win32_surface_create (HDC hdc) ++cairo_win32_surface_create_with_format (HDC hdc, cairo_format_t format) + { + cairo_win32_display_surface_t *surface; + +- cairo_format_t format; + cairo_status_t status; + cairo_device_t *device; + +- /* Assume that everything coming in as a HDC is RGB24 */ +- format = CAIRO_FORMAT_RGB24; ++ switch (format) { ++ default: ++ return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); ++ case CAIRO_FORMAT_ARGB32: ++ case CAIRO_FORMAT_RGB24: ++ break; ++ } + + surface = malloc (sizeof (*surface)); + if (surface == NULL) +@@ -977,6 +987,28 @@ cairo_win32_surface_create (HDC hdc) + } + + /** ++ * cairo_win32_surface_create: ++ * @hdc: the DC to create a surface for ++ * ++ * Creates a cairo surface that targets the given DC. The DC will be ++ * queried for its initial clip extents, and this will be used as the ++ * size of the cairo surface. The resulting surface will always be of ++ * format %CAIRO_FORMAT_RGB24; should you need another surface format, ++ * you will need to create one through ++ * cairo_win32_surface_create_with_format() or ++ * cairo_win32_surface_create_with_dib(). ++ * ++ * Return value: the newly created surface, NULL on failure ++ * ++ * Since: 1.0 ++ **/ ++cairo_surface_t * ++cairo_win32_surface_create (HDC hdc) ++{ ++ return cairo_win32_surface_create_with_format (hdc, CAIRO_FORMAT_RGB24); ++} ++ ++/** + * cairo_win32_surface_create_with_dib: + * @format: format of pixels in the surface to create + * @width: width of the surface, in pixels +@@ -1027,12 +1059,16 @@ cairo_win32_surface_create_with_ddb (HDC hdc, + HDC screen_dc, ddb_dc; + HBITMAP saved_dc_bitmap; + +- if (format != CAIRO_FORMAT_RGB24) ++ switch (format) { ++ default: ++/* XXX handle these eventually */ ++ case CAIRO_FORMAT_A8: ++ case CAIRO_FORMAT_A1: + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); +-/* XXX handle these eventually +- format != CAIRO_FORMAT_A8 || +- format != CAIRO_FORMAT_A1) +-*/ ++ case CAIRO_FORMAT_ARGB32: ++ case CAIRO_FORMAT_RGB24: ++ break; ++ } + + if (!hdc) { + screen_dc = GetDC (NULL); +-- +cgit v0.10.2 diff --git a/mingw-w64-cairo/PKGBUILD b/mingw-w64-cairo/PKGBUILD index 8a46d9d694..063ce21ef6 100644 --- a/mingw-w64-cairo/PKGBUILD +++ b/mingw-w64-cairo/PKGBUILD @@ -1,62 +1,58 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=cairo +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.14.0 +pkgver=1.14.4 pkgrel=1 pkgdesc="Cairo vector graphics library (mingw-w64)" arch=('any') url="http://cairographics.org" -license=("LGPL, MPL") +license=(LGPL2.1 MPL1.1) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-gtk2" - "${MINGW_PACKAGE_PREFIX}-poppler" - "${MINGW_PACKAGE_PREFIX}-ghostscript" - ) + "${MINGW_PACKAGE_PREFIX}-ghostscript" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libspectre" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-poppler" + ) depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-lzo2" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-pixman") -optdepends=("mingw-w64-glib2: libcairo-gobject") + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-lzo2" + "${MINGW_PACKAGE_PREFIX}-pixman" + "${MINGW_PACKAGE_PREFIX}-zlib" + ) +optdepends=("${MINGW_PACKAGE_PREFIX}-glib2: libcairo-gobject") options=('strip' 'staticlibs') source=("http://cairographics.org/releases/cairo-${pkgver}.tar.xz" - 0002-fix-using-strings.patch 0009-standalone-headers.mingw.patch - 0013-mozilla-transparent-windows.all.patch - 0022-dont-fail-argb-similar.all.patch 0026-create-argb-fonts.all.patch - 0027-Bug-53121-hack-around.all.patch) -sha1sums=('53cf589b983412ea7f78feee2e1ba9cea6e3ebae' - 'eed29a424e5e0bc9bd8d651b6237e541273c3f93' + 0030-add-cairo-API-to-setup-Win32-surface-for-HDC.patch) +sha1sums=('5b44471e7c328f96de6830baf8ea65030de797f9' '58c548d2791ba20dd7f6e328ff596f746df3aa10' - 'b4b8c6f4931814e7e77ddeb98fecaf70cb807e04' - 'fa601d6d2b2c75b0b1608ab3fa9c2e5b6cc31c9e' '9c0e533614782a41af2c3806a43ab7fe9d6a5431' - 'b74c9998d960a64fbf606ebe0284187add0da55a') + 'c0c9546f120133b8e5b116650ba233a15a1e20c4') prepare() { cd "${srcdir}"/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0002-fix-using-strings.patch patch -p1 -i ${srcdir}/0009-standalone-headers.mingw.patch - patch -p1 -i ${srcdir}/0013-mozilla-transparent-windows.all.patch - patch -p1 -i ${srcdir}/0022-dont-fail-argb-similar.all.patch patch -p1 -i ${srcdir}/0026-create-argb-fonts.all.patch - patch -p1 -i ${srcdir}/0027-Bug-53121-hack-around.all.patch + patch -p1 -i ${srcdir}/0030-add-cairo-API-to-setup-Win32-surface-for-HDC.patch autoreconf -fi } build() { - export lt_cv_deplibs_check_method='pass_all' - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - #CFLAGS+=" -fno-lto" - "${srcdir}"/${_realname}-${pkgver}/configure \ + # export lt_cv_deplibs_check_method='pass_all' + rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + CFLAGS+=" -Wno-implicit-function-declaration" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -73,10 +69,16 @@ build() { --enable-ft \ --disable-silent-rules \ ac_cv_prog_GS=${MINGW_PREFIX}/bin/gsc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING-LGPL-2.1" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING-LGPL-2.1" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING-MPL-1.1" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING-MPL-1.1" } diff --git a/mingw-w64-cairomm/PKGBUILD b/mingw-w64-cairomm/PKGBUILD index 7053c17ce2..e7dfa2427e 100644 --- a/mingw-w64-cairomm/PKGBUILD +++ b/mingw-w64-cairomm/PKGBUILD @@ -1,9 +1,9 @@ # Maintainer: Alexey Pavlov _realname=cairomm - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.11.2 +pkgver=1.12.0 pkgrel=1 pkgdesc="C++ bindings to Cairo vector graphics library (mingw-w64)" arch=('any') @@ -13,25 +13,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" depends=( "${MINGW_PACKAGE_PREFIX}-libsigc++" "${MINGW_PACKAGE_PREFIX}-cairo") options=(strip staticlibs) source=("http://www.cairographics.org/releases/cairomm-${pkgver}.tar.gz") -sha1sums=('35e190a03f760924bece5dc1204cc36b3583c806') +sha1sums=('5a09a3f604cec2ddb4dfcace28dbe74a53585585') build() { - CPPFLAGS+=" -D_REENTRANT" + CPPFLAGS+=" -D_REENTRANT -D_POSIX_SOURCE" export lt_cv_deplibs_check_method='pass_all' mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ --disable-documentation + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-catch/.gitignore b/mingw-w64-catch/.gitignore new file mode 100644 index 0000000000..d155f60450 --- /dev/null +++ b/mingw-w64-catch/.gitignore @@ -0,0 +1,2 @@ +catch.hpp +LICENSE_1_0.txt diff --git a/mingw-w64-catch/PKGBUILD b/mingw-w64-catch/PKGBUILD new file mode 100644 index 0000000000..3031f8b4e9 --- /dev/null +++ b/mingw-w64-catch/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: David Grayson + +_realname=catch +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.3.1 +pkgrel=1 +pkgdesc="Multi-paradigm automated test framework for C++ and Objective-C (mingw-w64)" +arch=('any') +url='https://github.com/philsquared/Catch' +license=('custom') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/philsquared/Catch/archive/v${pkgver}.tar.gz) +sha256sums=('eff0fe3e726287866a470c41ccd597f2a695d595230dda6afa13b85061b9436b') + +package() { + cd "${srcdir}/Catch-${pkgver}" + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" + install -m644 LICENSE_1_0.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE_1_0.txt" + mkdir -p "${pkgdir}${MINGW_PREFIX}/include/" + install -m644 single_include/catch.hpp "${pkgdir}${MINGW_PREFIX}/include/" +} diff --git a/mingw-w64-ccache-git/PKGBUILD b/mingw-w64-ccache-git/PKGBUILD deleted file mode 100644 index 2a9748a184..0000000000 --- a/mingw-w64-ccache-git/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Maintainer: Alexey Pavlov - -_realname=ccache - -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r1359.c5533d6 -pkgrel=1 -pkgdesc="A compiler cache (mingw-w64)." -arch=('any') -url="http://ccache.samba.org/" -license=("MIT") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-zlib") -options=('staticlibs' 'strip') -source=("${_realname}"::"git+git://git.samba.org/ccache.git") -md5sums=('SKIP') - -pkgver() { - cd "$srcdir/$_realname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare() { - cd ${_realname} - ./autogen.sh -} - -build() { - mkdir -p $srcdir/build-${CARCH} && cd $srcdir/build-${CARCH} - ../$_realname/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} - make -} - -package() { - cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install -} diff --git a/mingw-w64-ccache/PKGBUILD b/mingw-w64-ccache/PKGBUILD new file mode 100644 index 0000000000..de56d02c94 --- /dev/null +++ b/mingw-w64-ccache/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Alexey Pavlov + +_realname=ccache +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.2.2 +pkgrel=2 +pkgdesc="A compiler cache (mingw-w64)" +arch=('any') +url="http://ccache.samba.org/" +license=("MIT") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-zlib") +options=('staticlibs' 'strip') +source=(http://samba.org/ftp/ccache/${_realname}-${pkgver}.tar.bz2{,.asc}) +md5sums=('0823f62b5b44f7b4b0fa5205416be74a' + 'SKIP') + +prepare() { + cd ${_realname}-${pkgver} + #./autogen.sh +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-cego/PKGBUILD b/mingw-w64-cego/PKGBUILD new file mode 100644 index 0000000000..cb5d52cbd1 --- /dev/null +++ b/mingw-w64-cego/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Bjoern Lemke + +_realname=cego +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.28.2 +pkgrel=1 +pkgdesc="Cego database system (mingw-w64)" +arch=('any') +url='http://www.lemke-it.com/' +license=('GPL3') + +source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz") + +depends=("${MINGW_PACKAGE_PREFIX}-lfcbase") +depends=("${MINGW_PACKAGE_PREFIX}-lfcxml") + +sha256sums=("7df255e79a28f71a292d88874f3df789031187c2141d995b07bea8d6f8d6a6c3") + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make +} + +check() { + cd "${srcdir}"/build-${CARCH} + make check +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} + diff --git a/mingw-w64-celt/PKGBUILD b/mingw-w64-celt/PKGBUILD index cccb61c2db..d8f7af6891 100644 --- a/mingw-w64-celt/PKGBUILD +++ b/mingw-w64-celt/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=celt - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.11.3 -pkgrel=1 +pkgrel=3 pkgdesc="Low-latency audio communication codec (mingw-w64)" arch=('any') url="http://www.celt-codec.org/" @@ -12,25 +11,28 @@ license=("BSD") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libogg") options=('strip' 'staticlibs') -source=(http://downloads.us.xiph.org/releases/${_realname}/${_realname}-$pkgver.tar.gz) +source=(http://downloads.us.xiph.org/releases/${_realname}/${_realname}-${pkgver}.tar.gz) md5sums=('5511732a426cc42bf986ca79b5cdd02f') build() { export lt_cv_deplibs_check_method='pass_all' + [[ -d"${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-custom-modes \ - --disable-static - make + --enable-shared \ + --enable-static + + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-cfitsio/PKGBUILD b/mingw-w64-cfitsio/PKGBUILD index 92d9a6c2b5..1f544f887e 100644 --- a/mingw-w64-cfitsio/PKGBUILD +++ b/mingw-w64-cfitsio/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=cfitsio - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.360 -pkgrel=1 +pkgver=3.370 +pkgrel=2 pkgdesc="A library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format (mingw-w64)" arch=('any') url="http://heasarc.gsfc.nasa.gov/fitsio/" @@ -13,8 +12,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' 'staticlibs') source=("ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/${_realname}${pkgver/./}.tar.gz" - mingw-shared.patch) -md5sums=('833032c9ecbf1d460aca0360a26958db' + mingw-shared.patch) +md5sums=('abebd2d02ba5b0503c633581e3bfa116' '3f1e57458f0a0894fe66da3444bd35f1') prepare() { @@ -25,18 +24,20 @@ prepare() { build() { #export lt_cv_deplibs_check_method='pass_all' - - cd "${srcdir}/${_realname}" + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + cp -rf ${_realname} build-${MINGW_CHOST} + cd build-${MINGW_CHOST} ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} - make shared + + make shared } check() { - cd ${_realname} + cd build-${MINGW_CHOST} make testprog LD_LIBRARY_PATH=. ./testprog > testprog.lis [[ -z $(diff testprog.lis testprog.out) ]] || return 1 @@ -44,9 +45,9 @@ check() { } package() { - cd "${srcdir}/${_realname}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install mkdir -p "${pkgdir}${MINGW_PREFIX}"/bin mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ - install -D -m644 License.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE + install -Dm644 License.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-cgal/PKGBUILD b/mingw-w64-cgal/PKGBUILD index 7124599444..6c44589de7 100644 --- a/mingw-w64-cgal/PKGBUILD +++ b/mingw-w64-cgal/PKGBUILD @@ -1,53 +1,55 @@ # Maintainer: Alexey Pavlov _realname=cgal - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.4 +pkgver=4.7 pkgrel=1 -_pkgid=33526 pkgdesc="Computational Geometry Algorithms Library (mingw-w64)" arch=('any') url="http://www.cgal.org" license=("LGPL, GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-eigen3" - "${MINGW_PACKAGE_PREFIX}-boost" - ) + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-eigen3" + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-mpfr" - "${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-gmp") + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-mpfr") optdepends=("${MINGW_PACKAGE_PREFIX}-eigen3: for some packages, see the CGAL manual" - #"${MINGW_PACKAGE_PREFIX}qt4: for CGAL_Qt4" - ) + #"${MINGW_PACKAGE_PREFIX}-qt4: for CGAL_Qt4" + ) options=('strip' 'staticlibs') -source=(http://gforge.inria.fr/frs/download.php/$_pkgid/CGAL-$pkgver.tar.xz - cgal-4.4-mingw.patch) -sha1sums=('c3916db35dabc8c053b262e343049d90b90150c2' - '1d2b06fe6faa0cb1ee748fa14f2de92f9e9e091f') +source=(https://github.com/CGAL/cgal/releases/download/releases/CGAL-${pkgver}/CGAL-${pkgver}.tar.xz + msys2-relocate-cmake-config.patch) +sha1sums=('fafcadbe7e0d76369c8e262eca6a9c78ef80cff1' + '3742f2bb189f6c53e66e6ba5562c28685f9d1a86') prepare() { cd "${srcdir}"/CGAL-${pkgver} - patch -p1 -i ${srcdir}/cgal-4.4-mingw.patch + patch -p1 -i "${srcdir}"/msys2-relocate-cmake-config.patch } build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=Release \ - ../CGAL-${pkgver} - + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + ../CGAL-${pkgver} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install + make DESTDIR=${pkgdir} install + local MINGW_PREFIX_WIN=$(cygpath -am ${MINGW_PREFIX}) + sed -s "s|${MINGW_PREFIX_WIN}|\${RELOCATED_INSTALL_PREFIX}|g" -i "${pkgdir}"${MINGW_PREFIX}/lib/CGAL/CGALConfig.cmake + sed -s "s|${MINGW_PREFIX}|\${RELOCATED_INSTALL_PREFIX}|g" -i "${pkgdir}"${MINGW_PREFIX}/lib/CGAL/CGALConfig.cmake } diff --git a/mingw-w64-cgal/cgal-4.4-mingw.patch b/mingw-w64-cgal/cgal-4.4-mingw.patch deleted file mode 100644 index fa6505f790..0000000000 --- a/mingw-w64-cgal/cgal-4.4-mingw.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur CGAL-4.4-orig/include/CGAL/sse2.h CGAL-4.4/include/CGAL/sse2.h ---- CGAL-4.4-orig/include/CGAL/sse2.h 2012-11-13 17:13:59.000000000 +0400 -+++ CGAL-4.4/include/CGAL/sse2.h 2014-06-28 19:05:29.078000000 +0400 -@@ -27,7 +27,7 @@ - - #include - --#if defined ( _MSC_VER ) -+#if defined ( _WIN32 ) - #define CGAL_ALIGN_16 __declspec(align(16)) - #elif defined( __GNU__ ) - #define CGAL_ALIGN_16 __attribute__((aligned(16))) diff --git a/mingw-w64-cgal/msys2-relocate-cmake-config.patch b/mingw-w64-cgal/msys2-relocate-cmake-config.patch new file mode 100644 index 0000000000..1e4906d932 --- /dev/null +++ b/mingw-w64-cgal/msys2-relocate-cmake-config.patch @@ -0,0 +1,28 @@ +diff -urN CGAL-4.5.orig/cmake/modules/CGALConfig_binary.cmake.in CGAL-4.5/cmake/modules/CGALConfig_binary.cmake.in +--- CGAL-4.5.orig/cmake/modules/CGALConfig_binary.cmake.in 2015-06-26 09:41:08.742156800 +0100 ++++ CGAL-4.5/cmake/modules/CGALConfig_binary.cmake.in 2015-06-26 09:48:21.337089400 +0100 +@@ -8,6 +8,10 @@ + + set(CGAL_CONFIG_LOADED TRUE) + ++# MSYS2's PKGBUILD package() function replaces absolute build machine paths ++# with references to this variable in order to relocate the installation. ++get_filename_component(RELOCATED_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../.." REALPATH) ++ + set(CGAL_INSTALLATION_PACKAGE_DIR "@CGAL_INSTALLATION_PACKAGE_DIR@") + set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@") + +diff -urN CGAL-4.5.orig/cmake/modules/CGALConfig_install.cmake.in CGAL-4.5/cmake/modules/CGALConfig_install.cmake.in +--- CGAL-4.5.orig/cmake/modules/CGALConfig_install.cmake.in 2015-06-26 09:41:08.743156900 +0100 ++++ CGAL-4.5/cmake/modules/CGALConfig_install.cmake.in 2015-06-26 09:47:53.180013900 +0100 +@@ -8,6 +8,10 @@ + + set(CGAL_CONFIG_LOADED TRUE) + ++# MSYS2's PKGBUILD package() function replaces absolute build machine paths ++# with references to this variable in order to relocate the installation. ++get_filename_component(RELOCATED_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../.." REALPATH) ++ + # CGAL_DIR is the directory where this CGALConfig.cmake is installed + set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") + diff --git a/mingw-w64-check/PKGBUILD b/mingw-w64-check/PKGBUILD index 8e8747d151..dfa0c29e98 100644 --- a/mingw-w64-check/PKGBUILD +++ b/mingw-w64-check/PKGBUILD @@ -2,27 +2,30 @@ _realname=check pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.9.13 -pkgrel=1 +pkgver=0.9.14 +pkgrel=2 pkgdesc="A unit testing framework for C (mingw-w64)" arch=('any') url="http://check.sourceforge.net/" license=("LGPL") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' 'staticlibs') -source=(http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-$pkgver.tar.gz) -md5sums=('95530868f81a9496b2518fd2b713008a') +source=(http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-${pkgver}.tar.gz) +md5sums=('38263d115d784c17aa3b959ce94be8b8') build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --disable-static - make + --enable-static \ + --enable-shared + + make } package() { diff --git a/mingw-w64-chipmunk/001-build-fix.patch b/mingw-w64-chipmunk/001-build-fix.patch new file mode 100644 index 0000000000..90cc51352b --- /dev/null +++ b/mingw-w64-chipmunk/001-build-fix.patch @@ -0,0 +1,12 @@ +--- Chipmunk-7.0.0/src/cpHastySpace.c.orig 2015-01-18 21:26:39.565400000 +0300 ++++ Chipmunk-7.0.0/src/cpHastySpace.c 2015-01-18 21:26:51.561800000 +0300 +@@ -6,7 +6,9 @@ + + #include + //#include ++#ifndef _WIN32 + #include ++#endif + + #include "chipmunk/chipmunk_private.h" + #include "chipmunk/cpHastySpace.h" diff --git a/mingw-w64-chipmunk/fix-install-locations.patch b/mingw-w64-chipmunk/001-fix-install-locations.patch similarity index 100% rename from mingw-w64-chipmunk/fix-install-locations.patch rename to mingw-w64-chipmunk/001-fix-install-locations.patch diff --git a/mingw-w64-chipmunk/PKGBUILD b/mingw-w64-chipmunk/PKGBUILD index c00ecf8b4c..ec788e924e 100644 --- a/mingw-w64-chipmunk/PKGBUILD +++ b/mingw-w64-chipmunk/PKGBUILD @@ -1,43 +1,48 @@ -# Maintainer: Martell Malone +# Maintainer: Martell Malone _realname=chipmunk - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.2.1 +# Please don't update chipmunk until cocos2d-x support 7.x :) +pkgver=6.2.2 pkgrel=1 pkgdesc="A high-performance 2D rigid body physics library (mingw-w64)" arch=('any') url="http://chipmunk-physics.net/" license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") -source=(http://files.slembcke.net/chipmunk/release/Chipmunk-6.x/Chipmunk-${pkgver}.tgz - fix-install-locations.patch) -md5sums=('1cc6ff6a1f1cfcc6e167841fb24bf3c6' +source=("http://github.com/slembcke/Chipmunk2D/archive/Chipmunk-${pkgver}.tar.gz" + 001-build-fix.patch + 001-fix-install-locations.patch) +md5sums=('e989b9ef00750e56493f91f118705970' + '457ee3f8fb9a4779d8f7eaaab7eb2697' 'ae50c9ed773b2858435ca7c6dbb8d524') options=(staticlibs !buildflags !strip) prepare() { - cd ${srcdir}/Chipmunk-$pkgver - patch -p1 -i ${srcdir}/fix-install-locations.patch + cd ${srcdir}/Chipmunk2D-Chipmunk-${pkgver} + #patch -p1 -i ${srcdir}/001-build-fix.patch + patch -p1 -i ${srcdir}/001-fix-install-locations.patch } build() { mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - #unset LDFLAGS CFLAGS CXXFLAGS - - ${MINGW_PREFIX}/bin/cmake -G"MSYS Makefiles" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="${pkgdir}${MINGW_PREFIX}" \ - -DBUILD_DEMOS=OFF \ - -DBUILD_SHARED=ON \ - -DINSTALL_STATIC=ON \ - ../Chipmunk-$pkgver + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DBUILD_DEMOS=OFF \ + -DBUILD_SHARED=ON \ + -DINSTALL_STATIC=ON \ + ../Chipmunk2D-Chipmunk-${pkgver} + make } package() { cd "${srcdir}/build-${CARCH}" - make install + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-chromaprint/PKGBUILD b/mingw-w64-chromaprint/PKGBUILD index 2ae2e211d6..6f58824af2 100644 --- a/mingw-w64-chromaprint/PKGBUILD +++ b/mingw-w64-chromaprint/PKGBUILD @@ -3,7 +3,7 @@ _realname=chromaprint pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.2 -pkgrel=1 +pkgrel=2 pkgdesc="Library that implements a custom algorithm for extracting fingerprints from any audio source (mingw-w64)" arch=('any') url="http://acoustid.org/chromaprint/" @@ -22,23 +22,19 @@ prepare() { build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_AVFFT=ON \ ../${_realname}-${pkgver} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libchromaprint.pc + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-chromium-dev/PKGBUILD b/mingw-w64-chromium-dev/PKGBUILD new file mode 100644 index 0000000000..f587a0aa10 --- /dev/null +++ b/mingw-w64-chromium-dev/PKGBUILD @@ -0,0 +1,458 @@ +# ArchLinux: +# Maintainer: Gustavo Alvarez +# Contributor: Mikhail Vorozhtsov +# Contributor: Nagisa +# Contributor: Misc +# Contributor: Jeagoss +# MSYS2: +# Maintainer: Ray Donnelly + +_realname=chromium-dev + +######################### +## -- Build options -- ## +######################### +_use_clang=0 # Use clang compiler. Results in faster build and smaller chromium. +_use_pax=0 # If set 1, change PaX permisions in executables NOTE: only use if use PaX environment (IN TEST) + +############################################## +## -- Package and components information -- ## +############################################## +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=41.0.2224.3 +pkgrel=1 +pkgdesc='The open-source project behind Google Chrome (Dev Channel) (mingw-w64)' +arch=('i686' 'x86_64') +url="http://www.chromium.org/" +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-libexif" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-nss" + "${MINGW_PACKAGE_PREFIX}-snappy" + "${MINGW_PACKAGE_PREFIX}-speex" + ) +# "${MINGW_PACKAGE_PREFIX}-minizip" +# "${MINGW_PACKAGE_PREFIX}-re2" +# "${MINGW_PACKAGE_PREFIX}-speech-dispatcher" +# "${MINGW_PACKAGE_PREFIX}-ttf-font" + +makedepends=( +# 'elfutils' + 'gperf' + "${MINGW_PACKAGE_PREFIX}-ninja" + "${MINGW_PACKAGE_PREFIX}-python2-jinja" + 'subversion' + 'yasm' + 'git' + 'depot-tools-git') +# 'perl-json' +# 'python2-beautifulsoup3' +# 'python2-simplejson' +# 'python2-ply' +optdepends=('chromium-pepper-flash-dev: PPAPI Flash Player (Dev Channel)' + 'kdebase-kdialog: needed for file dialogs in KDE' + 'gnome-keyring: for storing passwords in GNOME keyring' + 'libgnome-keyring: for storing passwords in GNOME keyring' + 'kdeutils-kwalletmanager: for storing passwords in KWallet') +provides=('chromium-dev' 'chromedriver') +[ "${CARCH}" = "x86_64" ] && makedepends+=('lib32-gcc-libs' 'lib32-zlib') && warning "To build need active [multilib] repository, if not , fail build" +install=chromium-dev.install +_source="chromium-${pkgver}.tar.xz" +backup=('etc/chromium-dev/default') +source=("https://commondatastorage.googleapis.com/chromium-browser-official/${_source}" + 'chromium-dev.desktop' + 'chromium-dev.sh' + 'chromium-dev.default' + 'chromium-dev.xml' + # Patch form Gentoo + 'http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-system-jinja-r7.patch' + # Misc Patches + + # Patch from crbug (chromium bugtracker) + ) +sha1sums=("$(curl -sL "https://commondatastorage.googleapis.com/chromium-browser-official/${_source}.hashes" | grep sha1 | cut -d " " -f3)" + 'aa07e8539935d9f472c30db30a4c88549ba7cc2b' + '0b284e72169bf04316508d1709b11c38db70bdc1' + 'e90eb2ffadf9e3e8f5dc20e6cc3410b28eae814e' + '055fd99aedcb20343128854c3b00f7a731b6df20' + # Patch form Gentoo + 'c24d14029714d2295f3220a7173a5a7362f578a2' + # Misc Patches + + # Patch from crbug (chromium bugtracker) + ) +options=('!strip') +noextract=("${_source}") + +# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) +# Note: These are for Arch Linux use ONLY. For your own distribution, please +# get your own set of keys. Feel free to contact foutrelis@archlinux.org for +# more information. +_google_api_key="AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM" +_google_default_client_id="413772536636.apps.googleusercontent.com" +_google_default_client_secret="0ZChLK6AxeA3Isu96MkwqDR4" + +################################################ +## -- Don't touch anything below this line -- ## +################################################ + +[ "${CARCH}" = "i686" ] && _target_arch="ia32" && _arch="x86_32" +[ "${CARCH}" = "x86_64" ] && _target_arch="x64" && _arch="x86_64" + +# If use PaX environment, need 'paxctl' +[ "${_use_pax}" = "1" ] && makedepends+=('paxctl') + +if [ "${_use_clang}" = "1" ]; then + makedepends+=('clang') +fi + +# Are we in Gnome? +_use_gnome=0 +if [ -f /usr/lib/libgnome-keyring.so ]; then + depends+=('libgnome-keyring') + _use_gnome=1 +fi + +# Use Pulseaudio? +_use_pulseaudio=0 +if [ -x /usr/bin/pulseaudio ]; then + _use_pulseaudio=1 +fi + +prepare() { + ############################## + ## -- Get ready to build -- ## + ############################## + + # Clean environment + for i in $(find . -maxdepth 1 -type d -name 'chromium*' -o -name 'python-path'); do rm -fr ${i}; done + + # Uncompress sources + cd ${srcdir} + tar -xf "${srcdir}"/${_source} || true + # Set Python2 path + mkdir -p python-path + ln -s /usr/bin/python2 "${srcdir}/python-path/python" + export PATH="${srcdir}/python-path:$PATH" + + cd "chromium-${pkgver}" + + msg2 "Make sure use Python 2" + find . -type f -exec sed -i -r \ + -e 's|/usr/bin/python$|&2|g' \ + -e 's|(/usr/bin/python2)\.4$|\1|g' \ + {} + + + msg2 "Fix to save configuration in ~/.config/chromium-dev" + sed -e "s|'filename': 'chromium-browser'|'filename': 'chromium-dev'|" \ + -e "s|'confdir': 'chromium'|'confdir': 'chromium-dev'|" \ + -i chrome/chrome_exe.gypi + sed -e 's|config_dir.Append("chromium")|config_dir.Append("chromium-dev")|' \ + -e 's|config_dir.Append("chrome-frame")|config_dir.Append("chrome-frame-dev")|' \ + -i chrome/common/chrome_paths_linux.cc + + msg2 "Patch Sources" + # Patch sources from Gentoo + patch -p0 -i ../chromium-system-jinja-r7.patch + + # Patch from crbug (chromium bugtracker) + + # Misc Patches: + + # Make it possible to remove third_party/adobe + echo > "${srcdir}/flapper_version.h" + + msg2 "Remove unnecessary components to save space" + # Remove most bundled libraries. Some are still needed. + build/linux/unbundle/remove_bundled_libraries.py \ + 'base/third_party/dmg_fp' \ + 'base/third_party/dynamic_annotations' \ + 'base/third_party/icu' \ + 'base/third_party/nspr' \ + 'base/third_party/superfasthash' \ + 'base/third_party/symbolize' \ + 'base/third_party/valgrind' \ + 'base/third_party/xdg_mime' \ + 'base/third_party/xdg_user_dirs' \ + 'breakpad/src/third_party/curl' \ + 'chrome/third_party/mozilla_security_manager' \ + 'courgette/third_party' \ + 'crypto/third_party/nss' \ + 'native_client/src/third_party/dlmalloc' \ + 'net/third_party/mozilla_security_manager' \ + 'net/third_party/nss' \ + 'third_party/WebKit' \ + 'third_party/angle' \ + 'third_party/angle/src/third_party/compiler' \ + 'third_party/brotli' \ + 'third_party/cacheinvalidation' \ + 'third_party/cld_2' \ + 'third_party/cros_system_api' \ + 'third_party/cython/python_flags.py' \ + 'third_party/dom_distiller_js' \ + 'third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js' \ + 'third_party/ffmpeg' \ + 'third_party/fips181' \ + 'third_party/flot' \ + 'third_party/google_input_tools' \ + 'third_party/google_input_tools/third_party/closure_library' \ + 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \ + 'third_party/hunspell' \ + 'third_party/iccjpeg' \ + 'third_party/jsoncpp' \ + 'third_party/jstemplate' \ + 'third_party/khronos' \ + 'third_party/leveldatabase' \ + 'third_party/libaddressinput' \ + 'third_party/libevent' \ + 'third_party/libjingle' \ + 'third_party/libphonenumber' \ + 'third_party/libsrtp' \ + 'third_party/libusb' \ + 'third_party/libvpx' \ + 'third_party/libvpx/source/libvpx/third_party/x86inc' \ + 'third_party/libwebm' \ + 'third_party/libxml/chromium' \ + 'third_party/libXNVCtrl' \ + 'third_party/libyuv' \ + 'third_party/lss' \ + 'third_party/lzma_sdk' \ + 'third_party/mesa' \ + 'third_party/modp_b64' \ + 'third_party/mt19937ar' \ + 'third_party/npapi' \ + 'third_party/openmax_dl' \ + 'third_party/opus' \ + 'third_party/ots' \ + 'third_party/protobuf' \ + 'third_party/pdfium' \ + 'third_party/pdfium/third_party/logging.h' \ + 'third_party/pdfium/third_party/macros.h' \ + 'third_party/pdfium/third_party/numerics' \ + 'third_party/pdfium/third_party/template_util.h' \ + 'third_party/polymer' \ + 'third_party/qcms' \ + 'third_party/readability' \ + 'third_party/sfntly' \ + 'third_party/skia' \ + 'third_party/smhasher' \ + 'third_party/sqlite' \ + 'third_party/tcmalloc' \ + 'third_party/tlslite' \ + 'third_party/trace-viewer' \ + 'third_party/trace-viewer/third_party/d3' \ + 'third_party/trace-viewer/third_party/components/polymer' \ + 'third_party/trace-viewer/third_party/gl-matrix' \ + 'third_party/trace-viewer/third_party/jszip' \ + 'third_party/trace-viewer/third_party/tvcm' \ + 'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \ + 'third_party/undoview' \ + 'third_party/usrsctp' \ + 'third_party/webdriver' \ + 'third_party/webrtc' \ + 'third_party/widevine' \ + 'third_party/x86inc' \ + 'third_party/zlib/google' \ + 'url/third_party/mozilla' \ + 'v8/src/third_party/fdlibm' \ + 'v8/src/third_party/kernel' \ + 'v8/src/third_party/valgrind' \ + --do-remove + + + + msg2 "Setup NaCl/PNaCl SDK: Download and install NaCl/PNaCl toolchains" + build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator + +} + +build() { + cd "chromium-${pkgver}" + + ####################### + ## -- Let's build -- ## + ####################### + msg2 "Building Chromium..." + + if [ "${_use_clang}" = "0" ]; then + # Silence "typedef 'x' locally defined but not used" warnings + CFLAGS+=' -Wno-unused-local-typedefs' + elif [ "${_use_clang}" = "1" ]; then + sed "s|'-Wno-unused-local-typedef'|#'-Wno-unused-local-typedef'|g" -i build/common.gypi + fi + + # NOTES: + # -Denable_sql_database=0 | http://crbug.com/22208 + # -Dlogging_like_official_build=1 | Save space by removing DLOG and DCHECK messages (about 6% reduction). + # -Dlinux_use_gold_flags=0 | Never use bundled gold binary. Disable gold linker flags for now. + # -Dusb_ids_path=/usr/share/hwdata/usb.ids | Use the file at run time instead of effectively compiling it in. + + local _flags=( + -Ddisable_glibc=1 + -Ddisable_fatal_linker_warnings=1 + -Dffmpeg_branding=Chrome + -Dflapper_version_h_file="${srcdir}/flapper_version.h" + -Dgoogle_api_key="${_google_api_key}" + -Dgoogle_default_client_id="${_google_default_client_id}" + -Dgoogle_default_client_secret="${_google_default_client_secret}" + -Dicu_use_data_file_flag=0 + -Dlibspeechd_h_prefix=speech-dispatcher/ + -Dlinux_link_gnome_keyring="${_use_gnome}" + -Dlinux_link_gsettings="${_use_gnome}" + -Dlinux_link_libpci=1 + -Dlinux_link_libspeechd=1 + -Dlinux_link_pulseaudio="${_use_pulseaudio}" + -Dlinux_strip_binary=1 + -Dlinux_use_bundled_binutils=0 + -Dlinux_use_bundled_gold=0 + -Dlinux_use_gold_flags=0 + -Dlogging_like_official_build=1 + -Dno_strict_aliasing=1 + -Dproprietary_codecs=1 + -Drelease_extra_cflags="$CFLAGS" + -Dremove_webcore_debug_symbols=1 + -Dtarget_arch="${_target_arch}" + -Dusb_ids_path=/usr/share/hwdata/usb.ids + -Duse_gconf=0 + -Duse_gnome_keyring="${_use_gnome}" + -Duse_pulseaudio="${_use_pulseaudio}" + -Dwerror= + ) + + if [ "${_use_clang}" = "1" ]; then + # -Dclang=1 | use clang instead of GCC + # -Dclang_use_chrome_plugins=0 | fail if use external clang. only work if use bundled clang (because include own chromium plugin). disable this + _flags+=( + -Dclang=1 + -Dclang_use_chrome_plugins=0 + ) + export CC="clang" + export CXX="clang++" + elif [ "${_use_clang}" = "0" ]; then + _flags+=( + -Dclang=0 + ) + fi + + # TODO + # -Duse_system_hunspell=1 | upstream changes needed + # -Duse_system_jsoncpp=1 | need newer jsoncpp (0.6.0-rc2) + # -Duse_system_libsrtp=1 | https://bugs.gentoo.org/show_bug.cgi?id=459932 + # -Duse_system_libvpx=1 | http://crbug.com/347823 + # -Duse_system_libusb=1 | http://crbug.com/266149 + # -Duse_system_opus=1 | https://code.google.com/p/webrtc/issues/detail?id=3077 + # -Duse_system_protobuf=1 | need update to 2.6.0(?) + # -Duse_system_sqlite=1 | http://crbug.com/22208 + # -Duse_system_ssl=1 | http://crbug.com/58087 + # -Duse_system_openssl=1 | migrate to boringssl + + local _use_system=( + -Duse_system_expat=1 + -Duse_system_ffmpeg=0 + -Duse_system_flac=1 + -Duse_system_fontconfig=1 + -Duse_system_harfbuzz=1 + -Duse_system_icu=1 + -Duse_system_jsoncpp=0 + -Duse_system_libevent=0 + -Duse_system_libexif=1 + -Duse_system_libjpeg=1 + -Duse_system_libpng=1 + -Duse_system_libusb=0 + -Duse_system_libvpx=0 + -Duse_system_libwebp=1 + -Duse_system_libxml=1 + -Duse_system_libxnvctrl=0 + -Duse_system_libxslt=1 + -Duse_system_minizip=1 + -Duse_system_nspr=1 + -Duse_system_openssl=0 + -Duse_system_opus=0 + -Duse_system_protobuf=0 + -Duse_system_re2=1 + -Duse_system_snappy=1 + -Duse_system_speex=1 + -Duse_system_sqlite=0 + -Duse_system_ssl=0 + -Duse_system_v8=0 + -Duse_system_yasm=1 + -Duse_system_xdg_utils=1 + -Duse_system_zlib=1 + ) + + # Re-configure bundled ffmpeg + msg2 "Configuring bundled ffmpeg" + pushd third_party/ffmpeg > /dev/null + local _build_ffmpeg_args="" + [ "${CARCH}" = "i686" ] && _build_ffmpeg_args=" --disable-asm" + chromium/scripts/build_ffmpeg.py linux ${_target_arch} --branding=Chrome -- ${_build_ffmpeg_args} + chromium/scripts/copy_config.sh + chromium/scripts/generate_gyp.py + popd > /dev/null + + msg2 "1337's g0 7h3 p4r7y!" + + # CFLAGS are passed through -Drelease_extra_cflags= + export -n CFLAGS CXXFLAGS + + build/linux/unbundle/replace_gyp_files.py "${_use_system[@]}" + build/gyp_chromium --depth=. "${_flags[@]}" "${_use_system[@]}" + mkdir -p out/Release + + if [ "${_use_pax}" = "1" ]; then + # Build mksnapshot and pax-mark it. + ${_CC} ninja -C out/Release -v "mksnapshot" + paxctl -cm "out/Release/mksnapshot" + fi + + ${_CC} ninja -C out/Release -v chrome chrome_sandbox chromedriver + + if [ "${_use_pax}" = "1" ]; then + # Pax-mark again + paxctl -cm out/Release/chrome + fi +} + +package() { + install -Dm644 chromium-dev.default "${pkgdir}/etc/chromium-dev/default" + install -Dm755 chromium-dev.sh "${pkgdir}/usr/bin/chromium-dev" + install -Dm644 chromium-dev.desktop "${pkgdir}/usr/share/applications/chromium-dev.desktop" + install -Dm644 "chromium-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/chromium-dev/LICENSE" + + cd "chromium-${pkgver}/out/Release" + install -Dm755 chrome "${pkgdir}/usr/lib/chromium-dev/chromium-dev" + install -Dm4755 -o root -g root chrome_sandbox "${pkgdir}/usr/lib/chromium-dev/chrome-sandbox" + install -Dm755 chromedriver "${pkgdir}/usr/lib/chromium-dev/chromedriver" + ln -s /usr/lib/chromium-dev/chromedriver "${pkgdir}/usr/bin/chromedriver-dev" + install -Dm644 chrome_100_percent.pak "${pkgdir}/usr/lib/chromium-dev/chrome_100_percent.pak" + install -Dm644 content_resources.pak "${pkgdir}/usr/lib/chromium-dev/content_resources.pak" + install -Dm644 keyboard_resources.pak "${pkgdir}/usr/lib/chromium-dev/keyboard_resources.pak" + install -Dm644 resources.pak "${pkgdir}/usr/lib/chromium-dev/resources.pak" + install -Dm755 libffmpegsumo.so "${pkgdir}/usr/lib/chromium-dev/libffmpegsumo.so" + install -Dm755 libpdf.so "${pkgdir}/usr/lib/chromium-dev/libpdf.so" + find locales -type f -name "*.pak" -exec install -Dm644 '{}' "${pkgdir}/usr/lib/chromium-dev/{}" \; + install -Dm644 chrome.1 "${pkgdir}/usr/share/man/man1/chromium-dev.1" + + for _size in 16 22 24 32 48 128 256; do + case "${_size}" in + 16|32) _branding="${srcdir}/chromium-${pkgver}/chrome/app/theme/default_100_percent/chromium" ;; + *) _branding="${srcdir}/chromium-${pkgver}/chrome/app/theme/chromium" ;; + esac + install -Dm644 "${_branding}/product_logo_${_size}.png" "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/chromium-dev.png" + done + + install -Dm755 nacl_helper "${pkgdir}/usr/lib/chromium-dev/nacl_helper" + install -Dm755 nacl_helper_bootstrap "${pkgdir}/usr/lib/chromium-dev/nacl_helper_bootstrap" + install -Dm755 nacl_helper_nonsfi "${pkgdir}/usr/lib/chromium-dev/nacl_helper_nonsfi" + install -Dm755 "nacl_irt_${_arch}.nexe" "${pkgdir}/usr/lib/chromium-dev/nacl_irt_${_arch}.nexe" + + [ "${_use_gnome}" = "1" ] && install -Dm644 "${srcdir}/chromium-dev.xml" "${pkgdir}/usr/share/gnome-control-center/default-apps/chromium-dev.xml" + + # Manually strip binaries so that 'nacl_irt_*.nexe' is left intact + strip $STRIP_BINARIES "${pkgdir}/usr/lib/chromium-dev/"{chromium-dev,chrome-sandbox,chromedriver,nacl_helper{,_bootstrap,_nonsfi}} + strip $STRIP_SHARED "${pkgdir}/usr/lib/chromium-dev/"lib{ffmpegsumo,pdf}.so +} diff --git a/mingw-w64-chromium-dev/chromium-dev.default b/mingw-w64-chromium-dev/chromium-dev.default new file mode 100644 index 0000000000..beec0880e1 --- /dev/null +++ b/mingw-w64-chromium-dev/chromium-dev.default @@ -0,0 +1,4 @@ +# Default settings for chromium-dev. This file is sourced by /usr/bin/chromium-dev + +# Options to pass to chromium-dev +CHROMIUM_FLAGS="" diff --git a/mingw-w64-chromium-dev/chromium-dev.desktop b/mingw-w64-chromium-dev/chromium-dev.desktop new file mode 100644 index 0000000000..d9aa6301cf --- /dev/null +++ b/mingw-w64-chromium-dev/chromium-dev.desktop @@ -0,0 +1,113 @@ +[Desktop Entry] +Version=1.0 +Name=Chromium Dev +# Only KDE 4 seems to use GenericName, so we reuse the KDE strings. +# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. +GenericName=Web Browser +GenericName[ar]=Ù…ØªØµÙØ­ الشبكة +GenericName[bg]=Уеб браузър +GenericName[ca]=Navegador web +GenericName[cs]=WWW prohlížeÄ +GenericName[da]=Browser +GenericName[de]=Web-Browser +GenericName[el]=ΠεÏιηγητής Î¹ÏƒÏ„Î¿Ï +GenericName[en_GB]=Web Browser +GenericName[es]=Navegador web +GenericName[et]=Veebibrauser +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[gu]=વેબ બà«àª°àª¾àª‰àªàª° +GenericName[he]=דפדפן ×ינטרנט +GenericName[hi]=वेब बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤° +GenericName[hu]=WebböngészÅ‘ +GenericName[it]=Browser Web +GenericName[ja]=ウェブブラウザ +GenericName[kn]=ಜಾಲ ವೀಕà³à²·à²• +GenericName[ko]=웹 브ë¼ìš°ì € +GenericName[lt]=Žiniatinklio narÅ¡yklÄ— +GenericName[lv]=TÄ«mekļa pÄrlÅ«ks +GenericName[ml]=വെബൠബàµà´°àµŒà´¸à´°àµâ€ +GenericName[mr]=वेब बà¥à¤°à¤¾à¤Šà¤œà¤° +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[pl]=PrzeglÄ…darka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador da Internet +GenericName[ro]=Navigator de Internet +GenericName[ru]=Веб-браузер +GenericName[sl]=Spletni brskalnik +GenericName[sv]=Webbläsare +GenericName[ta]=இணைய உலாவி +GenericName[th]=เว็บเบราว์เซอร์ +GenericName[tr]=Web Tarayıcı +GenericName[uk]=Ðавігатор Тенет +GenericName[zh_CN]=网页æµè§ˆå™¨ +GenericName[zh_HK]=ç¶²é ç€è¦½å™¨ +GenericName[zh_TW]=ç¶²é ç€è¦½å™¨ +# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1. +GenericName[bn]=ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦° +GenericName[fil]=Web Browser +GenericName[hr]=Web preglednik +GenericName[id]=Browser Web +GenericName[or]=ଓà­à¬¬à­‡à¬¬ ବà­à¬°à¬¾à¬‰à¬œà¬° +GenericName[sk]=WWW prehliadaÄ +GenericName[sr]=Интернет прегледник +GenericName[te]=మహాతల à°…à°¨à±à°µà±‡à°·à°¿ +GenericName[vi]=Bá»™ duyệt Web +# Gnome and KDE 3 uses Comment. +Comment=Access the Internet +Comment[ar]=الدخول إلى الإنترنت +Comment[bg]=ДоÑтъп до интернет +Comment[bn]=ইনà§à¦Ÿà¦¾à¦°à¦¨à§‡à¦Ÿà¦Ÿà¦¿ অà§à¦¯à¦¾à¦•à§à¦¸à§‡à¦¸ করà§à¦¨ +Comment[ca]=Accedeix a Internet +Comment[cs]=Přístup k internetu +Comment[da]=FÃ¥ adgang til internettet +Comment[de]=Internetzugriff +Comment[el]=ΠÏόσβαση στο Διαδίκτυο +Comment[en_GB]=Access the Internet +Comment[es]=Accede a Internet. +Comment[et]=Pääs Internetti +Comment[fi]=Käytä internetiä +Comment[fil]=I-access ang Internet +Comment[fr]=Accéder à Internet +Comment[gu]=ઇંટરનેટ àªàª•à«àª¸à«‡àª¸ કરો +Comment[he]=גישה ×ל ×”×ינטרנט +Comment[hi]=इंटरनेट तक पहà¥à¤‚च सà¥à¤¥à¤¾à¤ªà¤¿à¤¤ करें +Comment[hr]=Pristup Internetu +Comment[hu]=Internetelérés +Comment[id]=Akses Internet +Comment[it]=Accesso a Internet +Comment[ja]=インターãƒãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ +Comment[kn]=ಇಂಟರà³à²¨à³†à²Ÿà³ ಅನà³à²¨à³ ಪà³à²°à²µà³‡à²¶à²¿à²¸à²¿ +Comment[ko]=ì¸í„°ë„· ì—°ê²° +Comment[lt]=Interneto prieiga +Comment[lv]=Piekļūt internetam +Comment[ml]=ഇനàµà´±à´°àµâ€â€Œà´¨àµ†à´±àµà´±àµ ആകàµâ€Œà´¸à´¸àµ ചെയàµà´¯àµà´• +Comment[mr]=इंटरनेटमधà¥à¤¯à¥‡ पà¥à¤°à¤µà¥‡à¤¶ करा +Comment[nb]=GÃ¥ til Internett +Comment[nl]=Verbinding maken met internet +Comment[or]=ଇଣà­à¬Ÿà¬°à­à¬¨à­‡à¬Ÿà­ ପà­à¬°à¬¬à­‡à¬¶ କରନà­à¬¤à­ +Comment[pl]=Skorzystaj z internetu +Comment[pt]=Aceder à Internet +Comment[pt_BR]=Acessar a internet +Comment[ro]=AccesaÅ£i Internetul +Comment[ru]=ДоÑтуп в Интернет +Comment[sk]=Prístup do siete Internet +Comment[sl]=Dostop do interneta +Comment[sr]=ПриÑтупите Интернету +Comment[sv]=GÃ¥ ut pÃ¥ Internet +Comment[ta]=இணையதà¯à®¤à¯ˆ அணà¯à®•à¯à®¤à®²à¯ +Comment[te]=ఇంటరà±à°¨à±†à°Ÿà±â€Œà°¨à± ఆకà±à°¸à±†à°¸à± చెయà±à°¯à°‚à°¡à°¿ +Comment[th]=เข้าถึงอินเทอร์เน็ต +Comment[tr]=İnternet'e eriÅŸin +Comment[uk]=ДоÑтуп до Інтернету +Comment[vi]=Truy cập Internet +Comment[zh_CN]=访问互è”网 +Comment[zh_HK]=連線到網際網路 +Comment[zh_TW]=連線到網際網路 +Exec=chromium-dev %U +Terminal=false +Icon=chromium-dev +Type=Application +Categories=Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; diff --git a/mingw-w64-chromium-dev/chromium-dev.install b/mingw-w64-chromium-dev/chromium-dev.install new file mode 100644 index 0000000000..b381a06deb --- /dev/null +++ b/mingw-w64-chromium-dev/chromium-dev.install @@ -0,0 +1,16 @@ +update_resources() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-desktop-database -q +} + +post_install() { + update_resources +} + +post_upgrade() { + update_resources +} + +post_remove() { + update_resources +} diff --git a/mingw-w64-chromium-dev/chromium-dev.sh b/mingw-w64-chromium-dev/chromium-dev.sh new file mode 100644 index 0000000000..8fd4fe21c5 --- /dev/null +++ b/mingw-w64-chromium-dev/chromium-dev.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# Allow users to override command-line options +# Based on Gentoo's chromium package (and by extension, Debian's) +if [[ -f /etc/chromium-dev/default ]]; then + . /etc/chromium-dev/default +fi + +# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system +# default CHROMIUM_FLAGS (from /etc/chromium-dev/default) +CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS} + +export CHROME_WRAPPER=$(readlink -f "$0") +export CHROME_DESKTOP="chromium-dev.desktop" + +exec /usr/lib/chromium-dev/chromium-dev ${CHROMIUM_FLAGS} "$@" diff --git a/mingw-w64-chromium-dev/chromium-dev.xml b/mingw-w64-chromium-dev/chromium-dev.xml new file mode 100644 index 0000000000..398107504a --- /dev/null +++ b/mingw-w64-chromium-dev/chromium-dev.xml @@ -0,0 +1,13 @@ + + + + + + Chromium-dev + chromium-dev + chromium-dev %s + chromium-dev + false + + + diff --git a/mingw-w64-chromium-dev/chromium-system-jinja-r7.patch b/mingw-w64-chromium-dev/chromium-system-jinja-r7.patch new file mode 100644 index 0000000000..fe28e12c33 --- /dev/null +++ b/mingw-w64-chromium-dev/chromium-system-jinja-r7.patch @@ -0,0 +1,35 @@ +--- third_party/WebKit/Source/bindings/scripts/scripts.gyp.orig 2014-08-19 09:55:10.330972228 +0000 ++++ third_party/WebKit/Source/bindings/scripts/scripts.gyp 2014-08-19 09:55:26.387286232 +0000 +@@ -54,7 +54,6 @@ + 'actions': [{ + 'action_name': 'cache_jinja_templates', + 'inputs': [ +- '<@(jinja_module_files)', + 'code_generator_v8.py', + '<@(code_generator_template_files)', + ], +--- third_party/WebKit/Source/build/scripts/scripts.gypi.orig 2014-08-19 10:00:00.216521733 +0000 ++++ third_party/WebKit/Source/build/scripts/scripts.gypi 2014-08-19 10:00:11.464735099 +0000 +@@ -2,10 +2,6 @@ + { + 'variables': { + 'scripts_for_in_files': [ +- # jinja2/__init__.py contains version string, so sufficient as +- # dependency for whole jinja2 package +- '<(DEPTH)/third_party/jinja2/__init__.py', +- '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep + 'hasher.py', + 'in_file.py', + 'in_generator.py', +--- third_party/WebKit/Source/bindings/scripts/scripts.gypi.orig 2014-08-19 10:53:02.824618979 +0000 ++++ third_party/WebKit/Source/bindings/scripts/scripts.gypi 2014-08-19 10:53:20.784957370 +0000 +@@ -12,9 +12,6 @@ + '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep + ], + 'idl_lexer_parser_files': [ +- # PLY (Python Lex-Yacc) +- '<(DEPTH)/third_party/ply/lex.py', +- '<(DEPTH)/third_party/ply/yacc.py', + # Web IDL lexer/parser (base parser) + '<(DEPTH)/tools/idl_parser/idl_lexer.py', + '<(DEPTH)/tools/idl_parser/idl_node.py', diff --git a/mingw-w64-clang-svn/0001-Add-Clang-MinGW-w64-driver-patch.patch b/mingw-w64-clang-svn/0001-Add-Clang-MinGW-w64-driver-patch.patch deleted file mode 100644 index e2d99ad28c..0000000000 --- a/mingw-w64-clang-svn/0001-Add-Clang-MinGW-w64-driver-patch.patch +++ /dev/null @@ -1,693 +0,0 @@ -From 5bcdda9e18a129c025e29a0cebcc733996dbd373 Mon Sep 17 00:00:00 2001 -From: Martell Malone -Date: Thu, 6 Nov 2014 01:11:07 +0000 -Subject: [PATCH] Add Clang MinGW-w64 driver patch - -This adds the MinGW-w64 driver to clang with the -new triplets compnerd introduced to clang. Based -off of rubenvb's driver patch from January 2014. ---- - include/clang/Driver/Options.td | 5 + - lib/Driver/CMakeLists.txt | 1 + - lib/Driver/Driver.cpp | 7 +- - lib/Driver/MinGWToolChain.cpp | 195 ++++++++++++++++++++++++++++++++++++ - lib/Driver/ToolChains.h | 30 ++++++ - lib/Driver/Tools.cpp | 204 ++++++++++++++++++++++++++++++++++++++ - lib/Driver/Tools.h | 33 ++++++ - lib/Frontend/InitHeaderSearch.cpp | 64 ++---------- - 8 files changed, 476 insertions(+), 63 deletions(-) - create mode 100644 lib/Driver/MinGWToolChain.cpp - -diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td -index db0fce9..a85354d 100644 ---- a/include/clang/Driver/Options.td -+++ b/include/clang/Driver/Options.td -@@ -1069,6 +1069,11 @@ def march_EQ : Joined<["-"], "march=">, Group; - def masm_EQ : Joined<["-"], "masm=">, Group, Flags<[DriverOption]>; - def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group; - def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group; -+def mconsole : Joined<["-"], "mconsole">, Group, Flags<[DriverOption]>; -+def mwindows : Joined<["-"], "mwindows">, Group, Flags<[DriverOption]>; -+def mdll : Joined<["-"], "mdll">, Group, Flags<[DriverOption]>; -+def municode : Joined<["-"], "municode">, Group, Flags<[DriverOption]>; -+def mthreads : Joined<["-"], "mthreads">, Group, Flags<[DriverOption]>; - def mcpu_EQ : Joined<["-"], "mcpu=">, Group; - def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; - def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group; -diff --git a/lib/Driver/CMakeLists.txt b/lib/Driver/CMakeLists.txt -index 412840b..8d88f96 100644 ---- a/lib/Driver/CMakeLists.txt -+++ b/lib/Driver/CMakeLists.txt -@@ -12,6 +12,7 @@ add_clang_library(clangDriver - Job.cpp - Multilib.cpp - MSVCToolChain.cpp -+ MinGWToolChain.cpp - Phases.cpp - SanitizerArgs.cpp - Tool.cpp -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index f827aaf..b6f2e6d 100644 ---- a/lib/Driver/Driver.cpp -+++ b/lib/Driver/Driver.cpp -@@ -2040,12 +2040,7 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, - TC = new toolchains::Generic_GCC(*this, Target, Args); - break; - case llvm::Triple::GNU: -- // FIXME: We need a MinGW toolchain. Use the default Generic_GCC -- // toolchain for now as the default case would below otherwise. -- if (Target.isOSBinFormatELF()) -- TC = new toolchains::Generic_ELF(*this, Target, Args); -- else -- TC = new toolchains::Generic_GCC(*this, Target, Args); -+ TC = new toolchains::MinGW(*this, Target, Args); - break; - case llvm::Triple::Itanium: - TC = new toolchains::CrossWindowsToolChain(*this, Target, Args); -diff --git a/lib/Driver/MinGWToolChain.cpp b/lib/Driver/MinGWToolChain.cpp -new file mode 100644 -index 0000000..e250c3d ---- /dev/null -+++ b/lib/Driver/MinGWToolChain.cpp -@@ -0,0 +1,195 @@ -+//===--- MinGWToolChain.cpp - MinGWToolChain Implementation -----------------------===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+ -+#include "ToolChains.h" -+#include "clang/Basic/CharInfo.h" -+#include "clang/Basic/DiagnosticIDs.h" -+#include "clang/Basic/Version.h" -+#include "clang/Driver/Compilation.h" -+#include "clang/Driver/Driver.h" -+#include "clang/Driver/DriverDiagnostic.h" -+#include "clang/Driver/Options.h" -+#include "llvm/Option/Arg.h" -+#include "llvm/Option/ArgList.h" -+#include "llvm/Support/ErrorHandling.h" -+#include "llvm/Support/FileSystem.h" -+#include "llvm/Support/Path.h" -+ -+using namespace clang::diag; -+using namespace clang::driver; -+using namespace clang::driver::toolchains; -+using namespace clang; -+using namespace llvm::opt; -+ -+MinGW::MinGW(const Driver &D, const llvm::Triple& Triple, -+ const ArgList &Args) -+ : ToolChain(D, Triple, Args) { -+ //TODO: libc++ directory -+ -+ // Get GCC version string for library and header directories -+ const std::string GCClibdir = -+#ifdef LLVM_ON_WIN32 -+ getDriver().Dir + "/../lib/gcc/" + getTriple().getArchName().str() + "-w64-mingw32"; -+#else -+ getDriver().SysRoot + "/usr/lib/gcc/" + getTriple().getArchName().str() + "-w64-mingw32"; -+#endif -+ if (llvm::sys::fs::exists(GCClibdir)) { -+ // Find subdirectory, should be the version of MinGW-w64 GCC -+ std::error_code EC; -+ llvm::sys::fs::directory_iterator entry(StringRef(GCClibdir), EC); -+ if (!EC) -+ GCCVersion = llvm::sys::path::filename(entry->path()); -+ // TODO report error: "no MinGW-w64 GCC installation found" -+ } -+ -+#ifdef LLVM_ON_WIN32 -+ // assume sysrooted compiler -+ getFilePaths().push_back(getDriver().Dir + "/../lib"); -+ getFilePaths().push_back(getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/lib"); -+ getFilePaths().push_back(getDriver().Dir + "/../lib/gcc/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/" + GCCVersion); -+ -+#else -+ // assume install prefix /usr -+ getFilePaths().push_back(getDriver().SysRoot + "/usr/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/lib"); -+ getFilePaths().push_back(getDriver().SysRoot + "/usr/lib/gcc/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/" + GCCVersion); -+#endif -+} -+ -+Tool *MinGW::buildLinker() const { -+ return new tools::MinGW::Link(*this); -+} -+ -+bool MinGW::IsIntegratedAssemblerDefault() const { -+ return true; -+} -+ -+Tool *MinGW::getTool(Action::ActionClass AC) const { -+ switch (AC) { -+ case Action::PreprocessJobClass: -+ if (!Preprocess) -+ Preprocess.reset(new tools::gcc::Preprocess(*this)); -+ return Preprocess.get(); -+ case Action::CompileJobClass: -+ if (!Compile) -+ Compile.reset(new tools::gcc::Compile(*this)); -+ return Compile.get(); -+ default: -+ return ToolChain::getTool(AC); -+ } -+} -+ -+Tool *MinGW::buildAssembler() const { -+ return new tools::MinGW::Assemble(*this); -+} -+ -+bool MinGW::IsUnwindTablesDefault() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::isPICDefault() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::isPIEDefault() const { -+ return false; -+} -+ -+ -+bool MinGW::isPICDefaultForced() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::UseSEHExceptions() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdinc)) -+ return; -+ -+ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { -+ SmallString<128> P(getDriver().ResourceDir); -+ llvm::sys::path::append(P, "include"); -+ addSystemInclude(DriverArgs, CC1Args, P.str()); -+ } -+ -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc)) -+ return; -+ -+#ifdef LLVM_ON_WIN32 -+ // Clang runs on Windows, assume sysroot toolchain -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include"); -+ // Add users standard include directory -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include"); -+#else -+ // Clang runs somewhere else, e.g. Linux, assume install prefix /usr -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include"); -+#endif -+} -+ -+void MinGW::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) || -+ DriverArgs.hasArg(options::OPT_nostdincxx)) -+ return; -+ -+ // Check if libc++ has been enabled and provide its include paths if so. -+ if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) { -+ // libc++ is always installed at a fixed path on Linux currently. -+#ifdef LLVM_ON_WIN32 -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/v1"); -+#else -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/include/c++/v1"); -+#endif -+ return; -+ } -+#ifdef LLVM_ON_WIN32 -+ // Assume sysroot toolchain -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion -+ + "/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion -+ + "/backward"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/backward"); -+#else -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion -+ + "/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion + "/backward"); -+#endif -+} -diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h -index 532a7cf..0f93231 100644 ---- a/lib/Driver/ToolChains.h -+++ b/lib/Driver/ToolChains.h -@@ -520,6 +520,36 @@ protected: - - }; - -+class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain { -+public: -+ MinGW(const Driver &D, const llvm::Triple &Triple, -+ const llvm::opt::ArgList &Args); -+ -+ bool IsIntegratedAssemblerDefault() const override; -+ bool IsUnwindTablesDefault() const override; -+ bool isPICDefault() const override; -+ bool isPIEDefault() const override; -+ bool isPICDefaultForced() const override; -+ bool UseSEHExceptions() const override; -+ -+ void -+ AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, -+ llvm::opt::ArgStringList &CC1Args) const override; -+ void -+ AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, -+ llvm::opt::ArgStringList &CC1Args) const override; -+ -+protected: -+ Tool *buildLinker() const override; -+ Tool *buildAssembler() const override; -+ Tool *getTool(Action::ActionClass AC) const override; -+ -+private: -+ std::string GCCVersion; -+ mutable std::unique_ptr Preprocess; -+ mutable std::unique_ptr Compile; -+}; -+ - - class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF { - public: -diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp -index 174df12..7a72d4d 100644 ---- a/lib/Driver/Tools.cpp -+++ b/lib/Driver/Tools.cpp -@@ -8090,6 +8090,210 @@ std::unique_ptr visualstudio::Compile::GetCommand( - CmdArgs); - } - -+/// MinGW Tools -+void MinGW::Assemble::ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const { -+ ArgStringList CmdArgs; -+ -+ if (getToolChain().getArch() == llvm::Triple::x86) { -+ CmdArgs.push_back("--32"); -+ } else if (getToolChain().getArch() == llvm::Triple::x86_64) { -+ CmdArgs.push_back("--64"); -+ } -+ -+ Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, -+ options::OPT_Xassembler); -+ -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back(Output.getFilename()); -+ -+ for (const auto &II : Inputs) -+ CmdArgs.push_back(II.getFilename()); -+ -+ const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as")); -+ C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs)); -+ -+ if (Args.hasArg(options::OPT_gsplit_dwarf)) -+ SplitDebugInfo(getToolChain(), C, *this, JA, Args, Output, -+ SplitDebugName(Args, Inputs)); -+} -+ -+void MinGW::Link::AddLibGCC(const ArgList &Args, ArgStringList &CmdArgs) const { -+ if (Args.hasArg(options::OPT_mthreads)) -+ CmdArgs.push_back("-lmingwthrd"); -+ CmdArgs.push_back("-lmingw32"); -+ if (Args.hasArg(options::OPT_shared) || -+ Args.hasArg(options::OPT_shared_libgcc)) { -+ CmdArgs.push_back("-lgcc_s"); -+ CmdArgs.push_back("-lgcc"); -+ } else { -+ CmdArgs.push_back("-lgcc"); -+ CmdArgs.push_back("-lgcc_eh"); -+ } -+ CmdArgs.push_back("-lmoldname"); -+ CmdArgs.push_back("-lmingwex"); -+ CmdArgs.push_back("-lmsvcrt"); -+} -+ -+void MinGW::Link::ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const { -+ const ToolChain &TC = getToolChain(); -+ const Driver &D = TC.getDriver(); -+ //const SanitizerArgs &Sanitize = TC.getSanitizerArgs(); -+ -+ ArgStringList CmdArgs; -+ -+ // Silence warning for "clang -g foo.o -o foo" -+ Args.ClaimAllArgs(options::OPT_g_Group); -+ // and "clang -emit-llvm foo.o -o foo" -+ Args.ClaimAllArgs(options::OPT_emit_llvm); -+ // and for "clang -w foo.o -o foo". Other warning options are already -+ // handled somewhere else. -+ Args.ClaimAllArgs(options::OPT_w); -+ -+ if (!D.SysRoot.empty()) -+ CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); -+ -+ if (Args.hasArg(options::OPT_s)) -+ CmdArgs.push_back("-s"); -+ -+ CmdArgs.push_back("-m"); -+ if (TC.getArch() == llvm::Triple::x86) -+ CmdArgs.push_back("i386pe"); -+ if (TC.getArch() == llvm::Triple::x86_64) -+ CmdArgs.push_back("i386pep"); -+ -+ if (Args.hasArg(options::OPT_mwindows)) { -+ CmdArgs.push_back("--subsystem"); -+ CmdArgs.push_back("windows"); -+ } else if (Args.hasArg(options::OPT_mconsole)) { -+ CmdArgs.push_back("--subsystem"); -+ CmdArgs.push_back("console"); -+ } -+ -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("-Bstatic"); -+ else { -+ if (Args.hasArg(options::OPT_mdll)) -+ CmdArgs.push_back("--dll"); -+ else if (Args.hasArg(options::OPT_shared)) -+ CmdArgs.push_back("--shared"); -+ CmdArgs.push_back("-Bdynamic"); -+ if (Args.hasArg(options::OPT_mdll) || Args.hasArg(options::OPT_shared)) { -+ CmdArgs.push_back("-e"); -+ if (TC.getArch() == llvm::Triple::x86) -+ CmdArgs.push_back("_DllMainCRTStartup@12"); -+ else -+ CmdArgs.push_back("DllMainCRTStartup"); -+ CmdArgs.push_back("--enable-auto-image-base"); -+ } -+ } -+ -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back(Output.getFilename()); -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_e); -+ // FIXME: add -N, -n flags -+ Args.AddLastArg(CmdArgs, options::OPT_r); -+ Args.AddLastArg(CmdArgs, options::OPT_s); -+ Args.AddLastArg(CmdArgs, options::OPT_t); -+ Args.AddAllArgs(CmdArgs, options::OPT_u_Group); -+ Args.AddLastArg(CmdArgs, options::OPT_Z_Flag); -+ -+ if (!Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nostartfiles)) { -+ if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_mdll)) { -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("dllcrt2.o"))); -+ } else { -+ if (Args.hasArg(options::OPT_municode)) -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2u.o"))); -+ else -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2.o"))); -+ } -+ if (Args.hasArg(options::OPT_pg)) -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("gcrt2.o"))); -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtbegin.o"))); -+ } -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_L); -+ const ToolChain::path_list Paths = TC.getFilePaths(); -+ for (const auto &Path : Paths) -+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + Path)); -+ -+ AddLinkerInputs(TC, Inputs, Args, CmdArgs); -+ -+ // TODO: Add ASan stuff here -+ -+ // TODO: Add profile stuff here -+ -+ if (D.CCCIsCXX() && -+ !Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nodefaultlibs)) { -+ bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) && -+ !Args.hasArg(options::OPT_static); -+ if (OnlyLibstdcxxStatic) -+ CmdArgs.push_back("-Bstatic"); -+ TC.AddCXXStdlibLibArgs(Args, CmdArgs); -+ if (OnlyLibstdcxxStatic) -+ CmdArgs.push_back("-Bdynamic"); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostdlib)) { -+ if (!Args.hasArg(options::OPT_nodefaultlibs)) { -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("--start-group"); -+ -+ if (Args.hasArg(options::OPT_fstack_protector) || -+ Args.hasArg(options::OPT_fstack_protector_strong) || -+ Args.hasArg(options::OPT_fstack_protector_all)) { -+ CmdArgs.push_back("-lssp_nonshared"); -+ CmdArgs.push_back("-lssp"); -+ } -+ if (Args.hasArg(options::OPT_fopenmp)) -+ CmdArgs.push_back("-lgomp"); -+ -+ AddLibGCC(Args, CmdArgs); -+ -+ if (Args.hasArg(options::OPT_pg)) -+ CmdArgs.push_back("-lgmon"); -+ -+ // TODO: remove unconditionally linking pthreads library -+ // Currently required for OpenMP and posix-threading libgcc -+ CmdArgs.push_back("-lpthread"); -+ -+ // add system libraries -+ if (Args.hasArg(options::OPT_mwindows)) { -+ CmdArgs.push_back("-lgdi32"); -+ CmdArgs.push_back("-lcomdlg32"); -+ } -+ CmdArgs.push_back("-ladvapi32"); -+ CmdArgs.push_back("-lshell32"); -+ CmdArgs.push_back("-luser32"); -+ CmdArgs.push_back("-lkernel32"); -+ -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("--end-group"); -+ else -+ AddLibGCC(Args, CmdArgs); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostartfiles)) { -+ // Add crtfastmath.o if available and fast math is enabled. -+ TC.AddFastMathRuntimeIfAvailable(Args, CmdArgs); -+ -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtend.o"))); -+ } -+ } -+ const char *Exec = -+ Args.MakeArgString(TC.GetProgramPath("ld")); -+ C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs)); -+} - - /// XCore Tools - // We pass assemble and link construction to the xcc tool. -diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h -index 59af8a0..bd43966 100644 ---- a/lib/Driver/Tools.h -+++ b/lib/Driver/Tools.h -@@ -612,6 +612,39 @@ namespace visualstudio { - }; - } // end namespace visualstudio - -+ /// MinGW -- Directly call GNU Binutils assembler and linker -+namespace MinGW { -+ class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { -+ public: -+ Assemble(const ToolChain &TC) : Tool("MinGW::Assemble", "assembler", -+ TC) {} -+ -+ bool hasIntegratedCPP() const override { return false; } -+ -+ void ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const llvm::opt::ArgList &TCArgs, -+ const char *LinkingOutput) const override; -+ }; -+ -+ class LLVM_LIBRARY_VISIBILITY Link : public Tool { -+ public: -+ Link(const ToolChain &TC) : Tool("MinGW::Link", "linker", TC) {} -+ -+ bool hasIntegratedCPP() const override { return false; } -+ bool isLinkJob() const override { return true; } -+ -+ void ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const llvm::opt::ArgList &TCArgs, -+ const char *LinkingOutput) const override; -+ private: -+ void AddLibGCC(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs) const; -+ }; -+} // end namespace MinGW -+ - namespace arm { - StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args, - const llvm::Triple &Triple); -diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp -index 998ccf9..2ff77c4 100644 ---- a/lib/Frontend/InitHeaderSearch.cpp -+++ b/lib/Frontend/InitHeaderSearch.cpp -@@ -82,11 +82,6 @@ public: - StringRef Arch, - StringRef Version); - -- /// AddMinGW64CXXPaths - Add the necessary paths to support -- /// libstdc++ of x86_64-w64-mingw32 aka mingw-w64. -- void AddMinGW64CXXPaths(StringRef Base, -- StringRef Version); -- - // AddDefaultCIncludePaths - Add paths that should always be searched. - void AddDefaultCIncludePaths(const llvm::Triple &triple, - const HeaderSearchOptions &HSOpts); -@@ -208,18 +203,6 @@ void InitHeaderSearch::AddMinGWCPlusPlusIncludePaths(StringRef Base, - CXXSystem, false); - } - --void InitHeaderSearch::AddMinGW64CXXPaths(StringRef Base, -- StringRef Version) { -- // Assumes Base is HeaderSearchOpts' ResourceDir -- AddPath(Base + "/../../../include/c++/" + Version, -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/x86_64-w64-mingw32", -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/i686-w64-mingw32", -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/backward", -- CXXSystem, false); --} - - void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - const HeaderSearchOptions &HSOpts) { -@@ -232,6 +215,9 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - case llvm::Triple::OpenBSD: - case llvm::Triple::Bitrig: - break; -+ case llvm::Triple::Win32: -+ if (triple.getEnvironment() == llvm::Triple::GNU) -+ break; - default: - // FIXME: temporary hack: hard-coded paths. - AddPath("/usr/local/include", System, false); -@@ -269,7 +255,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - switch (os) { - case llvm::Triple::Linux: - llvm_unreachable("Include management is handled in the driver."); -- -+ break; - case llvm::Triple::Haiku: - AddPath("/boot/common/include", System, false); - AddPath("/boot/develop/headers/os", System, false); -@@ -309,30 +295,11 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - case llvm::Triple::Win32: - switch (triple.getEnvironment()) { - default: llvm_unreachable("Include management is handled in the driver."); -+ break; - case llvm::Triple::Cygnus: - AddPath("/usr/include/w32api", System, false); - break; - case llvm::Triple::GNU: -- // mingw-w64 crt include paths -- // /i686-w64-mingw32/include -- SmallString<128> P = StringRef(HSOpts.ResourceDir); -- llvm::sys::path::append(P, "../../../i686-w64-mingw32/include"); -- AddPath(P.str(), System, false); -- -- // /x86_64-w64-mingw32/include -- P.resize(HSOpts.ResourceDir.size()); -- llvm::sys::path::append(P, "../../../x86_64-w64-mingw32/include"); -- AddPath(P.str(), System, false); -- -- // mingw.org crt include paths -- // /include -- P.resize(HSOpts.ResourceDir.size()); -- llvm::sys::path::append(P, "../../../include"); -- AddPath(P.str(), System, false); -- AddPath("/mingw/include", System, false); --#if defined(LLVM_ON_WIN32) -- AddPath("c:/mingw/include", System, false); --#endif - break; - } - break; -@@ -340,7 +307,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - break; - } - -- if ( os != llvm::Triple::RTEMS ) -+ if ( os != llvm::Triple::RTEMS && !triple.isWindowsGNUEnvironment() ) - AddPath("/usr/include", ExternCSystem, false); - } - -@@ -403,26 +370,9 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple, const HeaderSearchOp - AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.2"); - break; - case llvm::Triple::GNU: -- // mingw-w64 C++ include paths (i686-w64-mingw32 and x86_64-w64-mingw32) -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.0"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.1"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.2"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.3"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.0"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.1"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.2"); -- // mingw.org C++ include paths --#if defined(LLVM_ON_WIN32) -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.0"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.1"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.2"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.3"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.0"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.1"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.2"); --#endif - break; - } -+ break; - case llvm::Triple::DragonFly: - if (llvm::sys::fs::exists("/usr/lib/gcc47")) - AddPath("/usr/include/c++/4.7", CXXSystem, false); --- -2.1.3 - diff --git a/mingw-w64-clang-svn/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch b/mingw-w64-clang-svn/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch new file mode 100644 index 0000000000..a919a30e25 --- /dev/null +++ b/mingw-w64-clang-svn/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch @@ -0,0 +1,27 @@ +From 12d299345b51c1686c1d82986de6de020970bb57 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 28 Jun 2015 20:14:51 +0100 +Subject: [PATCH] Fix GetHostTriple for mingw-w64 in msys + + +diff --git a/cmake/modules/GetHostTriple.cmake b/cmake/modules/GetHostTriple.cmake +index 671a8ce..45c47e1 100644 +--- a/cmake/modules/GetHostTriple.cmake ++++ b/cmake/modules/GetHostTriple.cmake +@@ -8,11 +8,11 @@ function( get_host_triple var ) + else() + set( value "i686-pc-win32" ) + endif() +- elseif( MINGW AND NOT MSYS ) ++ elseif( MINGW ) + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + set( value "x86_64-w64-mingw32" ) + else() +- set( value "i686-pc-mingw32" ) ++ set( value "i686-w64-mingw32" ) + endif() + else( MSVC ) + set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess) +-- +2.4.5 + diff --git a/mingw-w64-clang-svn/0002-use-DESTDIR-on-windows.patch b/mingw-w64-clang-svn/0002-use-DESTDIR-on-windows.patch new file mode 100644 index 0000000000..920300ab1d --- /dev/null +++ b/mingw-w64-clang-svn/0002-use-DESTDIR-on-windows.patch @@ -0,0 +1,22 @@ +From 12d299345b51c1686c1d82986de6de020970bb57 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Sun, 25 Dec 2015 20:14:51 +0100 +Subject: [PATCH] Globally provide DESTDIR for all platforms + + +diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake +index 671a8ce..45c47e1 100644 +--- a/cmake/modules/LLVMInstallSymlink.cmake ++++ b/cmake/modules/LLVMInstallSymlink.cmake +@@ -3,9 +3,9 @@ + # See PR8397. + + function(install_symlink name target outdir) ++set(DESTDIR $ENV{DESTDIR}) + if(UNIX) + set(LINK_OR_COPY create_symlink) +- set(DESTDIR $ENV{DESTDIR}) + else() + set(LINK_OR_COPY copy) + endif() +2.4.5 diff --git a/mingw-w64-clang-svn/0003-generate-proper-library-names-mingw.patch b/mingw-w64-clang-svn/0003-generate-proper-library-names-mingw.patch new file mode 100644 index 0000000000..c3d92653c2 --- /dev/null +++ b/mingw-w64-clang-svn/0003-generate-proper-library-names-mingw.patch @@ -0,0 +1,32 @@ +From 12d299345b51c1686c1d82986de6de020970bb57 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Sun, 25 Dec 2015 20:14:51 +0100 +Subject: [PATCH] Generate proper names for import/static libraries + + +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 671a8ce..45c47e1 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -415,10 +415,15 @@ + endif() + add_link_opts( ${name} ) + if(ARG_OUTPUT_NAME) +- set_target_properties(${name} +- PROPERTIES +- OUTPUT_NAME ${ARG_OUTPUT_NAME} +- ) ++ if(MINGW) ++ string(REGEX REPLACE "^lib([A-Za-z]+)" "\\1" LIB_OUTPUT_NAME ${ARG_OUTPUT_NAME}) ++ set_target_properties(${name} PROPERTIES OUTPUT_NAME ${LIB_OUTPUT_NAME} RUNTIME_OUTPUT_NAME ${ARG_OUTPUT_NAME} ARCHIVE_OUTPUT_NAME ${LIB_OUTPUT_NAME}) ++ else() ++ set_target_properties(${name} ++ PROPERTIES ++ OUTPUT_NAME ${ARG_OUTPUT_NAME} ++ ) ++ endif() + endif() + + if(ARG_MODULE) +-- +2.4.5 diff --git a/mingw-w64-clang-svn/0014-dont-create-cl-mingw.patch b/mingw-w64-clang-svn/0014-dont-create-cl-mingw.patch new file mode 100644 index 0000000000..8506a2bc69 --- /dev/null +++ b/mingw-w64-clang-svn/0014-dont-create-cl-mingw.patch @@ -0,0 +1,21 @@ +From 12d299345b51c1686c1d82986de6de020970bb57 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Sun, 25 Dec 2015 20:14:51 +0100 +Subject: [PATCH] Don't create cl executable for mingw + + +diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt +index 671a8ce..45c47e1 100644 +--- a/tools/driver/CMakeLists.txt ++++ b/tools/driver/CMakeLists.txt +@@ -66,7 +66,7 @@ + if(NOT CLANG_LINKS_TO_CREATE) + set(CLANG_LINKS_TO_CREATE clang++ clang-cl) + +- if (WIN32) ++ if (MSVC) + list(APPEND CLANG_LINKS_TO_CREATE ../msbuild-bin/cl) + endif() + endif() +-- +2.4.5 diff --git a/mingw-w64-clang-svn/0018-mingw-enable-static-libclang.patch b/mingw-w64-clang-svn/0018-mingw-enable-static-libclang.patch new file mode 100644 index 0000000000..9a2cb0354c --- /dev/null +++ b/mingw-w64-clang-svn/0018-mingw-enable-static-libclang.patch @@ -0,0 +1,21 @@ +From 12d299345b51c1686c1d82986de6de020970bb57 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Sun, 25 Dec 2015 20:14:51 +0100 +Subject: [PATCH] Allow build static clang library for mingw + + +diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt +index 671a8ce..45c47e1 100644 +--- a/tools/libclang/CMakeLists.txt ++++ b/tools/libclang/CMakeLists.txt +@@ -74,7 +74,7 @@ + set(ENABLE_SHARED SHARED) + endif() + +-if((NOT LLVM_ENABLE_PIC OR LIBCLANG_BUILD_STATIC) AND NOT WIN32) ++if((NOT LLVM_ENABLE_PIC OR LIBCLANG_BUILD_STATIC) AND (NOT WIN32 OR MINGW)) + set(ENABLE_STATIC STATIC) + endif() + +-- +2.4.5 diff --git a/mingw-w64-clang-svn/0041-libcxx-add-support-for-mingw-w64.patch b/mingw-w64-clang-svn/0041-libcxx-add-support-for-mingw-w64.patch new file mode 100644 index 0000000000..4b4437b84d --- /dev/null +++ b/mingw-w64-clang-svn/0041-libcxx-add-support-for-mingw-w64.patch @@ -0,0 +1,35 @@ +From 53625b291503734db14e4a6146ceb06f288fd987 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 5 Jul 2015 00:54:34 +0100 +Subject: [PATCH] libcxx: add support for mingw-w64 + + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index d3d5f38..4820f2c 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -2,7 +2,7 @@ set(LIBCXX_LIB_CMAKEFILES_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTOR + + # Get sources + file(GLOB LIBCXX_SOURCES ../src/*.cpp) +-if(WIN32) ++if(MSVC) + file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp) + list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES}) + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") +diff --git a/src/random.cpp b/src/random.cpp +index 4ab424e..d3062f5 100644 +--- a/src/random.cpp ++++ b/src/random.cpp +@@ -7,7 +7,7 @@ + // + //===----------------------------------------------------------------------===// + +-#if defined(_LIBCPP_USING_WIN32_RANDOM) ++#if defined(_LIBCPP_USING_WIN32_RANDOM) || defined(__MINGW32__) + // Must be defined before including stdlib.h to enable rand_s(). + #define _CRT_RAND_S + #endif // defined(_LIBCPP_USING_WIN32_RANDOM) +-- +2.4.5 + diff --git a/mingw-w64-clang-svn/PKGBUILD b/mingw-w64-clang-svn/PKGBUILD index 8f19aec085..5277cbc7df 100644 --- a/mingw-w64-clang-svn/PKGBUILD +++ b/mingw-w64-clang-svn/PKGBUILD @@ -1,43 +1,80 @@ # Maintainer: Martell Malone # Contributor: Ray Donnelly +# Martell's notes +# libc++ and libc++abi are built statically only becuase shared will depend +# on libstdc++ atm which would make a big mess for us +# We could either use libc++ for this or use a static libstdc++ +# I would like to avoid the latter. + +# I may add a bootstrap option for libc++ to build libc++ soon +# Maybe having a seperate PKGBUILD for it would be helpful for this also + _realname=clang +pkgbase=mingw-w64-${_realname}-svn pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-analyzer-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-tools-extra-svn" + "${MINGW_PACKAGE_PREFIX}-compiler-rt-svn" + "${MINGW_PACKAGE_PREFIX}-libc++abi-svn" + "${MINGW_PACKAGE_PREFIX}-libc++-svn" + "${MINGW_PACKAGE_PREFIX}-lld-svn" "${MINGW_PACKAGE_PREFIX}-llvm-svn" - #"${MINGW_PACKAGE_PREFIX}-compiler-rt-svn" - ) -pkgver=54346.9443d04 + #"${MINGW_PACKAGE_PREFIX}-lldb-svn" + ) +pkgver=60430.db7c3ac pkgrel=1 -pkgdesc="LC language family frontend for LLVM (mingw-w64)" +pkgdesc="C language family frontend for LLVM (svn) (mingw-w64)" arch=('any') url="http://llvm.org" license=("custom:University of Illinois/NCSA Open Source License") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python3-sphinx" - "python2" "tar") + "${MINGW_PACKAGE_PREFIX}-python2" + "git") depends=("${MINGW_PACKAGE_PREFIX}-gcc") -options=('staticlibs' 'strip') -source=(#"llvm"::"svn+http://llvm.org/svn/llvm-project/llvm/trunk" - #"clang"::"svn+http://llvm.org/svn/llvm-project/cfe/trunk" - #"rt"::"svn+http://llvm.org/svn/llvm-project/compiler-rt/trunk" - #"testsuite"::"svn+http://llvm.org/svn/llvm-project/test-suite/trunk" - "llvm"::"git+http://llvm.org/git/llvm.git" +options=('debug' '!strip') +source=("llvm"::"git+http://llvm.org/git/llvm.git" + "lld"::"git+http://llvm.org/git/lld.git" "clang"::"git+http://llvm.org/git/clang.git" "clang-tools-extra"::"git+http://llvm.org/git/clang-tools-extra.git" - "rt"::"git+http://llvm.org/git/compiler-rt.git" + "compiler-rt"::"git+http://llvm.org/git/compiler-rt.git" "testsuite"::"git+http://llvm.org/git/test-suite.git" - #"libcxx"::"git+http://llvm.org/git/libcxx.git" - 0001-Add-Clang-MinGW-w64-driver-patch.patch - ) + "libcxxabi"::"git+http://llvm.org/git/libcxxabi.git" + "libcxx"::"git+http://llvm.org/git/libcxx.git" + "lldb"::"git+http://llvm.org/git/lldb.git" + 0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch + 0002-use-DESTDIR-on-windows.patch + 0003-generate-proper-library-names-mingw.patch + 0014-dont-create-cl-mingw.patch + 0018-mingw-enable-static-libclang.patch + 0041-libcxx-add-support-for-mingw-w64.patch) + +# Some patch notes :) +#0001-0009 -> llvm +#0011-0019 -> clang +#0021-0029 -> rt +#0031-0039 -> lld +#0041-0049 -> c++ +#0051-0059 -> lldb + md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' - 'b50272e4c3dc3a678219447b4961a65b') + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'a384d4607d9dcdfdcac6912ac413ec58' + '4d696d298d70db32338659ce2cfa505f' + '9b56e0d949c72be49aa059fd626923e2' + 'a65a06de9c455152b2bc9929dc1b089d' + '683388837c02bd231df8f58ea2db82fc' + '6b0b769d999dc884e59d388c5a7f3866') pkgver_internal() { if [ ! -d "$1" ]; then @@ -55,6 +92,10 @@ pkgver() { prepare() { cd "${srcdir}"/llvm + git am "${srcdir}"/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch + git am "${srcdir}"/0002-use-DESTDIR-on-windows.patch + git am "${srcdir}"/0003-generate-proper-library-names-mingw.patch + # Fix docs installation directory sed -i 's:$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \ Makefile.config.in @@ -63,206 +104,306 @@ prepare() { sed -i '/@LLVM_CONFIG_CMAKE_DIR@/s:$(PROJ_cmake):$(PROJ_prefix)/share/llvm/cmake:' \ cmake/modules/Makefile - cd "${srcdir}"/clang - git am "${srcdir}"/0001-Add-Clang-MinGW-w64-driver-patch.patch + cd "${srcdir}"/compiler-rt - cd "${srcdir}" - mv clang llvm/tools/clang - mv clang-tools-extra llvm/tools/clang/tools/extra - mv rt llvm/projects/compiler-rt - mv testsuite llvm/projects/test-suite -# mv libcxx llvm/projects/libcxx + cd "${srcdir}"/lld + + cd "${srcdir}"/libcxx + git am "${srcdir}"/0041-libcxx-add-support-for-mingw-w64.patch + + cd "${srcdir}"/clang + git am "${srcdir}"/0014-dont-create-cl-mingw.patch + git am "${srcdir}"/0018-mingw-enable-static-libclang.patch + + cd "${srcdir}"/llvm + + # At the present, clang must reside inside the LLVM source code tree to build + # See http://llvm.org/bugs/show_bug.cgi?id=4840 + mv "${srcdir}/clang" tools/clang + mv "${srcdir}/clang-tools-extra" tools/clang/tools/extra + mv "${srcdir}/lld" tools/lld + mv "${srcdir}/lldb" tools/lldb + mv "${srcdir}/compiler-rt" projects/compiler-rt + mv "${srcdir}/libcxxabi" projects/libcxxabi + mv "${srcdir}/libcxx" projects/libcxx +# mv "${srcdir}/testsuite" projects/test-suite } build() { - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} - mkdir -p "${srcdir}"/build-${CARCH} - cd "${srcdir}"/build-${CARCH} - echo 'ac_cv_have_decl_strerror_s=${ac_cv_have_decl_strerror_s=no}' > config.cache + cd "${srcdir}" + + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir build-${CARCH} && cd build-${CARCH} + + local -a extra_config + + if check_option "debug" "y"; then + extra_config+=(-DCMAKE_BUILD_TYPE=Debug) + VERBOSE="VERBOSE=1" + else + extra_config+=(-DCMAKE_BUILD_TYPE=Release) + fi # Include location of libffi headers in CPPFLAGS - CPPFLAGS+=" $(pkg-config --cflags libffi)" + FFI_INCLUDE_DIR="$(pkg-config --cflags libffi)" + FFI_INCLUDE_DIR=$(echo $FFI_INCLUDE_DIR | sed 's|-I||g') - ../llvm/configure \ - -C \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --with-sysroot=${MINGW_PREFIX} \ - --enable-targets=x86,x86_64,cpp \ - --enable-optimized \ - --disable-assertions \ - --disable-pthreads \ - --with-python=/usr/bin/python2 \ - --enable-libffi \ - --enable-docs + # "Ninja" cant install each component seperately + # https://github.com/martine/ninja/issues/932 - make VERBOSE=1 - make -C ../llvm/docs -f Makefile.sphinx man - make -C ../llvm/docs -f Makefile.sphinx html - make -C ../llvm/tools/clang/docs -f Makefile.sphinx html + PATH=${MINGW_PREFIX}/bin:/usr/bin \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib \ + -DCMAKE_MAKE_PROGRAM="/usr/bin/make.exe" \ + -DCMAKE_C_COMPILER="${MINGW_PREFIX}/bin/gcc.exe" \ + -DCMAKE_CXX_COMPILER="${MINGW_PREFIX}/bin/g++.exe" \ + -DFFI_INCLUDE_DIR="${FFI_INCLUDE_DIR}" \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS}" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DLLVM_TARGETS_TO_BUILD="ARM;CppBackend;X86" \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_THREADS=1 \ + -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python2.exe \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_SPHINX=ON \ + -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE -D_LIBCPP_HAS_NO_CONSTEXPR" \ + -DLIBCLANG_BUILD_STATIC=ON \ + -DLIBCXX_ENABLE_SHARED=OFF \ + -DLIBCXXABI_ENABLE_SHARED=OFF \ + "${extra_config[@]}" \ + ../llvm + + make ${VERBOSE} + + # Disable automatic installation of components that go into subpackages + # -i.orig to check what has been removed in-case it starts dropping more than it should + # + sed -i.orig '/\(clang\|lld\|lldb\)\/cmake_install.cmake/d' tools/cmake_install.cmake + sed -i.orig '/\(extra\|scan-build\|scan-view\)\/cmake_install.cmake/d' tools/clang/tools/cmake_install.cmake + sed -i.orig '/\(compiler-rt\|libcxxabi\|libcxx\)\/cmake_install.cmake/d' projects/cmake_install.cmake } -check() { - cd "${srcdir}"/build-${CARCH} - # Remove || true once testcase doesn't cause failures. - make check || true +#check() { +# cd "${srcdir}"/build-${CARCH} +# # Remove || true once testcase doesn't cause failures. +# make check || true +#} + +package_llvm-svn() { + pkgdesc="Low Level Virtual Machine (svn) (mingw-w64)" + #depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") # "compiler-rt" + provides=("${MINGW_PACKAGE_PREFIX}-llvm") + conflicts=("${MINGW_PACKAGE_PREFIX}-llvm") + install=llvm-${CARCH}.install + + pkgver=$(pkgver_internal "${srcdir}"/llvm) + + cd "${srcdir}"/llvm + + make -C ../build-${CARCH} DESTDIR="${pkgdir}" install + + install -Dm644 LICENSE.TXT "${pkgdir}${MINGW_PREFIX}/share/licenses/llvm/LICENSE" + + # Install CMake stuff + install -d "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/{modules,platforms} + install -Dm644 "${srcdir}"/llvm/cmake/modules/*.cmake "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/modules/ + install -Dm644 "${srcdir}"/llvm/cmake/platforms/*.cmake "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/platforms/ + + # FileCheck is needed to build rust. + install -Dm755 "${srcdir}"/build-${CARCH}/bin/FileCheck.exe "${pkgdir}${MINGW_PREFIX}/bin/FileCheck.exe" } -package_clang(){ - pkgdesc="C language family frontend for LLVM" +package_compiler-rt-svn() { + pkgdesc="Runtime libraries for Clang and LLVM (svn) (mingw-w64)" + url="http://compiler-rt.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-llvm-svn") + provides=("${MINGW_PACKAGE_PREFIX}-compiler-rt") + + conflicts=("${MINGW_PACKAGE_PREFIX}-compiler-rt") + pkgver=$(pkgver_internal "${srcdir}"/llvm/projects/compiler-rt) + + cd "${srcdir}/llvm" + make -C ../build-${CARCH}/projects/compiler-rt DESTDIR="${pkgdir}" install + } + +package_libcxxabi-svn() { + pkgdesc="C++ Standard Library Support (svn) (mingw-w64)" + url="http://libcxxabi.llvm.org/" + provides=("${MINGW_PACKAGE_PREFIX}-libc++abi") + conflicts=("${MINGW_PACKAGE_PREFIX}-libc++abi") + pkgver=$(pkgver_internal "${srcdir}"/llvm/projects/libcxxabi) + + cd "${srcdir}/llvm" + make -C ../build-${CARCH}/projects/libcxxabi -j1 DESTDIR="${pkgdir}" install +} + +package_libcxx-svn() { + pkgdesc="C++ Standard Library (svn) (mingw-w64)" + url="http://libcxx.llvm.org/" + provides=("${MINGW_PACKAGE_PREFIX}-libc++") + conflicts=("${MINGW_PACKAGE_PREFIX}-libc++") + pkgver=$(pkgver_internal "${srcdir}"/llvm/projects/libcxx) + + cd "${srcdir}/llvm" + make -C ../build-${CARCH}/projects/libcxx -j1 DESTDIR="${pkgdir}" install +} + +package_lldb-svn() { + pkgdesc="Next generation, high-performance debugger (svn) (mingw-w64)" + url="http://lldb.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-readline" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-python2") + + cd "${srcdir}/llvm" + + make -C ../build-${CARCH}/tools/lldb DESTDIR="${pkgdir}" install + + # Compile Python scripts + python2 -m compileall "${pkgdir}${MINGW_PREFIX}/lib/python2.7/site-packages/lldb" + python2 -O -m compileall "${pkgdir}${MINGW_PREFIX}/lib/python2.7/site-packages/lldb" + + install -Dm644 tools/lldb/LICENSE.TXT "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE" +} + +package_lld-svn() { + pkgdesc="Linker tools for LLVM (svn) (mingw-w64)" + url="http://lld.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-llvm-svn") + provides=("${MINGW_PACKAGE_PREFIX}-lld") + conflicts=("${MINGW_PACKAGE_PREFIX}-lld") + pkgver=$(pkgver_internal "${srcdir}"/llvm/tools/lld) + + cd "${srcdir}/llvm" + make -C ../build-${CARCH}/tools/lld -j1 DESTDIR="${pkgdir}" install +} + +package_clang-svn() { + pkgdesc="C language family frontend for LLVM (svn) (mingw-w64)" + url="http://clang.llvm.org/" depends=("${MINGW_PACKAGE_PREFIX}-llvm-svn") provides=("${MINGW_PACKAGE_PREFIX}-clang") conflicts=("${MINGW_PACKAGE_PREFIX}-clang") pkgver=$(pkgver_internal "${srcdir}"/llvm/tools/clang) - # Move .. - cd "${srcdir}" - mv llvm/tools/clang/tools/extra clang-tools-extra - mv build-${CARCH}/tools/clang/tools/extra clang-tools-extra-${CARCH} + cd "${srcdir}/llvm" + make -C ../build-${CARCH}/tools/clang DESTDIR="${pkgdir}" install - cd build-${CARCH}/tools/clang - make -j1 DESTDIR="$pkgdir" install - # Fix mis-named clang doc folder (is llvm, should be clang) - mv "${pkgdir}"${MINGW_PREFIX}/share/doc/llvm "${pkgdir}"${MINGW_PREFIX}/share/doc/clang - - # .. Unmove - cd "${srcdir}" - mv clang-tools-extra llvm/tools/clang/tools/extra - mv clang-tools-extra-${CARCH} build-${CARCH}/tools/clang/tools/extra - - # Install html docs - install -d "${pkgdir}"${MINGW_PREFIX}/share/doc/clang/html - cp -rf "${srcdir}"/llvm/tools/clang/docs/_build/html/* "${pkgdir}"${MINGW_PREFIX}/share/doc/clang/html/ - rm -r "${pkgdir}"${MINGW_PREFIX}/share/doc/clang/html/_sources + # Install static clang library .. + cp ../build-${CARCH}/lib/libclang.a ${pkgdir}${MINGW_PREFIX}/lib/ } -package_clang-tools-extra(){ - pkgdesc="Extra tools built using Clang's tooling APIs" +package_clang-analyzer-svn() { + pkgdesc="A source code analysis framework (svn) (mingw-w64)" + url="http://clang-analyzer.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-clang-svn" + "${MINGW_PACKAGE_PREFIX}-python2") + provides=("${MINGW_PACKAGE_PREFIX}-clang-analyzer") + conflicts=("${MINGW_PACKAGE_PREFIX}-clang-analyzer") + pkgver=$(pkgver_internal "${srcdir}"/llvm/tools/clang) + + cd "${srcdir}"/llvm + make -C ../build-${CARCH}/tools/clang/tools/scan-build -j1 DESTDIR="${pkgdir}" install + make -C ../build-${CARCH}/tools/clang/tools/scan-view -j1 DESTDIR="${pkgdir}" install + + # Use Python 2 + sed -i \ + -e 's|env python$|&2|' \ + -e 's|/usr/bin/python$|&2|' \ + "${pkgdir}"${MINGW_PREFIX}/bin/scan-view + + # Compile Python scripts + python2 -m compileall "${pkgdir}"${MINGW_PREFIX}/bin/clang-analyzer + python2 -O -m compileall "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer + install -Dm644 LICENSE.TXT "${pkgdir}"${MINGW_PREFIX}/share/licenses/clang-analyzer/LICENSE +} + +package_clang-tools-extra-svn() { + pkgdesc="Extra tools built using Clang's tooling APIs (svn) (mingw-w64)" url="http://clang.llvm.org/" depends=("${MINGW_PACKAGE_PREFIX}-clang-svn") provides=("${MINGW_PACKAGE_PREFIX}-clang-tools-extra") conflicts=("${MINGW_PACKAGE_PREFIX}-clang-tools-extra") pkgver=$(pkgver_internal "${srcdir}"/llvm/tools/clang/tools/extra) - cd "${srcdir}"/build-${CARCH}/tools/clang/tools/extra - make -j1 DESTDIR="$pkgdir" install -} - -# package_compiler-rt(){ -# pkgver=$(pkgver_internal "${srcdir}"/compiler-rt) -# } - -package_llvm(){ - pkgdesc="Low Level Virtual Machine" - depends=("${MINGW_PACKAGE_PREFIX}-gcc") # "${MINGW_PACKAGE_PREFIX}-compiler-rt" - provides=("${MINGW_PACKAGE_PREFIX}-llvm") - conflicts=("${MINGW_PACKAGE_PREFIX}-llvm") - install=llvm-${CARCH}.install - pkgver=$(pkgver_internal "${srcdir}"/llvm) - - # Move .. - cd "${srcdir}" - mv llvm/tools/clang clang - mv build-${CARCH}/tools/clang clang-${CARCH} - - cd build-${CARCH} - make -j1 DESTDIR="$pkgdir" install - - # .. Unmove - cd "${srcdir}" - mv clang llvm/tools/clang - mv clang-${CARCH} build-${CARCH}/tools/clang - - # Install man pages - install -d "${pkgdir}"${MINGW_PREFIX}/share/man/man1 - cp "${srcdir}"/llvm/docs/_build/man/*.1 "${pkgdir}"${MINGW_PREFIX}/share/man/man1/ - - # Install html docs - install -d "${pkgdir}"${MINGW_PREFIX}/share/doc/llvm/html - cp -rf "${srcdir}"/llvm/docs/_build/html/* "${pkgdir}"${MINGW_PREFIX}/share/doc/llvm/html/ - rm -r "${pkgdir}"${MINGW_PREFIX}/share/doc/llvm/html/_sources - - # Install CMake stuff - install -d "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/{modules,platforms} - install -Dm644 "${srcdir}"/llvm/cmake/modules/*.cmake "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/modules/ - install -Dm644 "${srcdir}"/llvm/cmake/platforms/*.cmake "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/platforms/ -} - -package_clang-analyzer() { - pkgdesc="A source code analysis framework" - url="http://clang-analyzer.llvm.org/" - depends=("${MINGW_PACKAGE_PREFIX}-clang-svn" "${MINGW_PACKAGE_PREFIX}-python2") - provides=("${MINGW_PACKAGE_PREFIX}-clang-analyzer") - conflicts=("${MINGW_PACKAGE_PREFIX}-clang-analyzer") - pkgver=$(pkgver_internal "${srcdir}"/llvm/tools/clang) - - cd "${srcdir}"/llvm/tools/clang - - install -d "${pkgdir}"${MINGW_PREFIX}/{bin,lib/clang-analyzer} - for _tool in scan-{build,view}; do - cp -r tools/$_tool "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/ - ln -s "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/$_tool/$_tool "${pkgdir}"${MINGW_PREFIX}/bin/ - done - - # scan-build looks for clang within the same directory - install -d "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ - ln -s "${srcdir}"/build-${CARCH}/Release/bin/clang.exe "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ - - # Relocate man page - install -d "${pkgdir}"${MINGW_PREFIX}/share/man/man1 - mv "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/scan-build/scan-build.1 \ - "${pkgdir}"${MINGW_PREFIX}/share/man/man1/ - - # Use Python 2 - #sed -i \ - # -e 's|env python$|&2|' \ - # -e 's|/usr/bin/python$|&2|' \ - # "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/scan-view/scan-view \ - # "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer/scan-build/set-xcode-analyzer - - # Compile Python scripts - python2 -m compileall "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer - python2 -O -m compileall "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer - install -Dm644 LICENSE.TXT "${pkgdir}"${MINGW_PREFIX}/share/licenses/clang-analyzer/LICENSE + cd "${srcdir}"/llvm + make -C ../build-${CARCH}/tools/clang/tools/extra -j1 DESTDIR="${pkgdir}" install } +# Wrappers package_mingw-w64-i686-clang-svn(){ - package_clang + package_clang-svn } package_mingw-w64-i686-clang-analyzer-svn(){ - package_clang-analyzer + package_clang-analyzer-svn } package_mingw-w64-i686-clang-tools-extra-svn(){ - package_clang-tools-extra + package_clang-tools-extra-svn } -# package_mingw-w64-i686-compiler-rt-svn(){ -# package_compiler-rt -# } +package_mingw-w64-i686-compiler-rt-svn(){ + package_compiler-rt-svn +} + +package_mingw-w64-i686-libc++abi-svn(){ + package_libcxxabi-svn +} + +package_mingw-w64-i686-libc++-svn(){ + package_libcxx-svn +} + +package_mingw-w64-i686-lld-svn(){ + package_lld-svn +} + +package_mingw-w64-i686-lldb-svn(){ + package_lldb-svn +} package_mingw-w64-i686-llvm-svn(){ - package_llvm + package_llvm-svn } package_mingw-w64-x86_64-clang-svn(){ - package_clang + package_clang-svn } package_mingw-w64-x86_64-clang-analyzer-svn(){ - package_clang-analyzer + package_clang-analyzer-svn } package_mingw-w64-x86_64-clang-tools-extra-svn(){ - package_clang-tools-extra + package_clang-tools-extra-svn } -# package_mingw-w64-x86_64-compiler-rt-svn(){ -# package_compiler-rt -# } +package_mingw-w64-x86_64-compiler-rt-svn(){ + package_compiler-rt-svn +} + +package_mingw-w64-x86_64-libc++abi-svn(){ + package_libcxxabi-svn +} + +package_mingw-w64-x86_64-libc++-svn(){ + package_libcxx-svn +} + +package_mingw-w64-x86_64-lld-svn(){ + package_lld-svn +} + +package_mingw-w64-x86_64-lldb-svn(){ + package_lldb-svn +} package_mingw-w64-x86_64-llvm-svn(){ - package_llvm + package_llvm-svn } + +# vim:set ts=2 sw=2 et: diff --git a/mingw-w64-clang/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch b/mingw-w64-clang/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch new file mode 100644 index 0000000000..a919a30e25 --- /dev/null +++ b/mingw-w64-clang/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch @@ -0,0 +1,27 @@ +From 12d299345b51c1686c1d82986de6de020970bb57 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 28 Jun 2015 20:14:51 +0100 +Subject: [PATCH] Fix GetHostTriple for mingw-w64 in msys + + +diff --git a/cmake/modules/GetHostTriple.cmake b/cmake/modules/GetHostTriple.cmake +index 671a8ce..45c47e1 100644 +--- a/cmake/modules/GetHostTriple.cmake ++++ b/cmake/modules/GetHostTriple.cmake +@@ -8,11 +8,11 @@ function( get_host_triple var ) + else() + set( value "i686-pc-win32" ) + endif() +- elseif( MINGW AND NOT MSYS ) ++ elseif( MINGW ) + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + set( value "x86_64-w64-mingw32" ) + else() +- set( value "i686-pc-mingw32" ) ++ set( value "i686-w64-mingw32" ) + endif() + else( MSVC ) + set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess) +-- +2.4.5 + diff --git a/mingw-w64-clang/0002-use-DESTDIR-on-windows.patch b/mingw-w64-clang/0002-use-DESTDIR-on-windows.patch new file mode 100644 index 0000000000..a9478ef0f2 --- /dev/null +++ b/mingw-w64-clang/0002-use-DESTDIR-on-windows.patch @@ -0,0 +1,13 @@ +--- llvm-3.7.0.src/tools/llvm-ar/install_symlink.cmake.orig 2015-09-03 13:40:19.927031000 +0300 ++++ llvm-3.7.0.src/tools/llvm-ar/install_symlink.cmake 2015-09-03 13:40:32.604756200 +0300 +@@ -2,9 +2,9 @@ + # DESTDIR environment variable may be unset at configuration time. + # See PR8397. + ++set(DESTDIR $ENV{DESTDIR}) + if(UNIX) + set(LINK_OR_COPY create_symlink) +- set(DESTDIR $ENV{DESTDIR}) + else() + set(LINK_OR_COPY copy) + endif() diff --git a/mingw-w64-clang/0003-generate-proper-library-names-mingw.patch b/mingw-w64-clang/0003-generate-proper-library-names-mingw.patch new file mode 100644 index 0000000000..11015d94e9 --- /dev/null +++ b/mingw-w64-clang/0003-generate-proper-library-names-mingw.patch @@ -0,0 +1,22 @@ +--- a/cmake/modules/AddLLVM.cmake 2015-12-25 11:45:24.447038200 +0300 ++++ b/cmake/modules/AddLLVM.cmake 2015-12-25 12:14:26.848945700 +0300 +@@ -399,10 +399,15 @@ + llvm_update_compile_flags(${name}) + add_link_opts( ${name} ) + if(ARG_OUTPUT_NAME) +- set_target_properties(${name} +- PROPERTIES +- OUTPUT_NAME ${ARG_OUTPUT_NAME} +- ) ++ if(MINGW) ++ string(REGEX REPLACE "^lib([A-Za-z]+)" "\\1" LIB_OUTPUT_NAME ${ARG_OUTPUT_NAME}) ++ set_target_properties(${name} PROPERTIES OUTPUT_NAME ${LIB_OUTPUT_NAME} RUNTIME_OUTPUT_NAME ${ARG_OUTPUT_NAME} ARCHIVE_OUTPUT_NAME ${LIB_OUTPUT_NAME}) ++ else() ++ set_target_properties(${name} ++ PROPERTIES ++ OUTPUT_NAME ${ARG_OUTPUT_NAME} ++ ) ++ endif() + endif() + + if(ARG_MODULE) diff --git a/mingw-w64-clang/0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch b/mingw-w64-clang/0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch new file mode 100644 index 0000000000..90824a9c31 --- /dev/null +++ b/mingw-w64-clang/0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch @@ -0,0 +1,26 @@ +From 57def79f5d6e97f5b353b22a5fb856e627cdf061 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 28 Jun 2015 19:12:19 +0100 +Subject: [PATCH] Set the x86 arch name to i686 for mingw-w64 + + +diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp +index 5451132..a6852b6 100644 +--- a/lib/Driver/Driver.cpp ++++ b/lib/Driver/Driver.cpp +@@ -1991,6 +1991,12 @@ static llvm::Triple computeTargetTriple(StringRef DefaultTargetTriple, + + if (AT != llvm::Triple::UnknownArch && AT != Target.getArch()) + Target.setArch(AT); ++ ++ // Override the default ArchName of 'i386' for mingw-w64 targets when passed -m32. ++ if (AT == llvm::Triple::x86 && Target.isWindowsGNUEnvironment() && ++ Target.getVendorName().equals(StringRef("w64"))) ++ Target.setArchName(StringRef("i686")); ++ + } + + return Target; +-- +2.4.5 + diff --git a/mingw-w64-clang/0013-mingw-w64-dont-have-dl-library.patch b/mingw-w64-clang/0013-mingw-w64-dont-have-dl-library.patch new file mode 100644 index 0000000000..5048cb613b --- /dev/null +++ b/mingw-w64-clang/0013-mingw-w64-dont-have-dl-library.patch @@ -0,0 +1,15 @@ +--- cfe-3.7.0.src/tools/libclang/CMakeLists.txt 2015-09-02 12:21:21.242154800 +0300 ++++ cfe-3.7.0.src/tools/libclang/CMakeLists.txt.orig 2015-09-02 12:20:53.198959400 +0300 +@@ -51,10 +51,12 @@ + list(APPEND LIBS clangARCMigrate) + endif () + ++if (NOT MINGW) + find_library(DL_LIBRARY_PATH dl) + if (DL_LIBRARY_PATH) + list(APPEND LIBS dl) + endif() ++endif() + + option(LIBCLANG_BUILD_STATIC + "Build libclang as a static library (in addition to a shared one)" OFF) diff --git a/mingw-w64-clang/0014-use-DESTDIR-on-windows.patch b/mingw-w64-clang/0014-use-DESTDIR-on-windows.patch new file mode 100644 index 0000000000..238f72b69c --- /dev/null +++ b/mingw-w64-clang/0014-use-DESTDIR-on-windows.patch @@ -0,0 +1,22 @@ +--- cfe-3.7.0.src/tools/driver/clang_symlink.cmake.orig 2015-09-03 09:34:54.313158900 +0300 ++++ cfe-3.7.0.src/tools/driver/clang_symlink.cmake 2015-09-03 09:35:07.237866300 +0300 +@@ -2,9 +2,9 @@ + # DESTDIR environment variable may be unset at configuration time. + # See PR8397. + ++set(CLANGXX_DESTDIR $ENV{DESTDIR}) + if(UNIX) + set(CLANGXX_LINK_OR_COPY create_symlink) +- set(CLANGXX_DESTDIR $ENV{DESTDIR}) + else() + set(CLANGXX_LINK_OR_COPY copy) + endif() +@@ -34,7 +34,7 @@ + COMMAND "${CMAKE_COMMAND}" -E ${CLANGXX_LINK_OR_COPY} "${clang}" "${clang_cl}" + WORKING_DIRECTORY "${bindir}") + +-if (WIN32) ++if (MSVC) + message("Creating cl executable based on ${clang}") + + execute_process( diff --git a/mingw-w64-clang/0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch b/mingw-w64-clang/0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch new file mode 100644 index 0000000000..87a1b735ba --- /dev/null +++ b/mingw-w64-clang/0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch @@ -0,0 +1,145 @@ +From f6a5ffd2cec68e89ddfb67b3c078c6c86a516a76 Mon Sep 17 00:00:00 2001 +From: Reid Kleckner +Date: Wed, 28 Oct 2015 22:29:52 +0000 +Subject: [PATCH] Fix the calling convention of Mingw64 long double values + +GCC uses the x87DoubleExtended model for long doubles, and passes them +indirectly by address through function calls. + +Also replace the existing mingw-long-double assembly emitting test with +an IR-level test. + +git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251567 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/Basic/Targets.cpp | 8 ++++++- + lib/CodeGen/TargetInfo.cpp | 33 ++++++++++++++++++---------- + test/CodeGen/mingw-long-double.c | 47 ++++++++++++++++++++++++++++++++-------- + 3 files changed, 67 insertions(+), 21 deletions(-) + +diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp +index 0094ce8..a0c379a 100644 +--- a/lib/Basic/Targets.cpp ++++ b/lib/Basic/Targets.cpp +@@ -4009,7 +4009,13 @@ public: + class MinGWX86_64TargetInfo : public WindowsX86_64TargetInfo { + public: + MinGWX86_64TargetInfo(const llvm::Triple &Triple) +- : WindowsX86_64TargetInfo(Triple) {} ++ : WindowsX86_64TargetInfo(Triple) { ++ // Mingw64 rounds long double size and alignment up to 16 bytes, but sticks ++ // with x86 FP ops. Weird. ++ LongDoubleWidth = LongDoubleAlign = 128; ++ LongDoubleFormat = &llvm::APFloat::x87DoubleExtended; ++ } ++ + void getTargetDefines(const LangOptions &Opts, + MacroBuilder &Builder) const override { + WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder); +diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp +index 149baaa..282c103 100644 +--- a/lib/CodeGen/TargetInfo.cpp ++++ b/lib/CodeGen/TargetInfo.cpp +@@ -1772,12 +1772,10 @@ public: + + /// WinX86_64ABIInfo - The Windows X86_64 ABI information. + class WinX86_64ABIInfo : public ABIInfo { +- +- ABIArgInfo classify(QualType Ty, unsigned &FreeSSERegs, +- bool IsReturnType) const; +- + public: +- WinX86_64ABIInfo(CodeGen::CodeGenTypes &CGT) : ABIInfo(CGT) {} ++ WinX86_64ABIInfo(CodeGen::CodeGenTypes &CGT) ++ : ABIInfo(CGT), ++ IsMingw64(getTarget().getTriple().isWindowsGNUEnvironment()) {} + + void computeInfo(CGFunctionInfo &FI) const override; + +@@ -1794,6 +1792,12 @@ public: + // FIXME: Assumes vectorcall is in use. + return isX86VectorCallAggregateSmallEnough(NumMembers); + } ++ ++private: ++ ABIArgInfo classify(QualType Ty, unsigned &FreeSSERegs, ++ bool IsReturnType) const; ++ ++ bool IsMingw64; + }; + + class X86_64TargetCodeGenInfo : public TargetCodeGenInfo { +@@ -3330,10 +3334,6 @@ ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, unsigned &FreeSSERegs, + if (RT->getDecl()->hasFlexibleArrayMember()) + return getNaturalAlignIndirect(Ty, /*ByVal=*/false); + +- // FIXME: mingw-w64-gcc emits 128-bit struct as i128 +- if (Width == 128 && getTarget().getTriple().isWindowsGNUEnvironment()) +- return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), +- Width)); + } + + // vectorcall adds the concept of a homogenous vector aggregate, similar to +@@ -3375,6 +3378,14 @@ ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, unsigned &FreeSSERegs, + if (BT && BT->getKind() == BuiltinType::Bool) + return ABIArgInfo::getExtend(); + ++ // Mingw64 GCC uses the old 80 bit extended precision floating point unit. It ++ // passes them indirectly through memory. ++ if (IsMingw64 && BT && BT->getKind() == BuiltinType::LongDouble) { ++ const llvm::fltSemantics *LDF = &getTarget().getLongDoubleFormat(); ++ if (LDF == &llvm::APFloat::x87DoubleExtended) ++ return ABIArgInfo::getIndirect(Align, /*ByVal=*/false); ++ } ++ + return ABIArgInfo::getDirect(); + } + +diff --git a/test/CodeGen/mingw-long-double.c b/test/CodeGen/mingw-long-double.c +index a29662c..1c7c31f 100644 +--- a/test/CodeGen/mingw-long-double.c ++++ b/test/CodeGen/mingw-long-double.c +@@ -0,0 +1,41 @@ ++// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -o - %s \ ++// RUN: | FileCheck %s --check-prefix=GNU32 ++// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -o - %s \ ++// RUN: | FileCheck %s --check-prefix=GNU64 ++// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -o - %s \ ++// RUN: | FileCheck %s --check-prefix=MSC64 ++ ++struct { ++ char c; ++ long double ldb; ++} agggregate_LD = {}; ++// GNU32: %struct.anon = type { i8, x86_fp80 } ++// GNU32: @agggregate_LD = global %struct.anon zeroinitializer, align 4 ++// GNU64: %struct.anon = type { i8, x86_fp80 } ++// GNU64: @agggregate_LD = global %struct.anon zeroinitializer, align 16 ++// MSC64: %struct.anon = type { i8, double } ++// MSC64: @agggregate_LD = global %struct.anon zeroinitializer, align 8 ++ ++long double dataLD = 1.0L; ++// GNU32: @dataLD = global x86_fp80 0xK3FFF8000000000000000, align 4 ++// GNU64: @dataLD = global x86_fp80 0xK3FFF8000000000000000, align 16 ++// MSC64: @dataLD = global double 1.000000e+00, align 8 ++ ++long double _Complex dataLDC = {1.0L, 1.0L}; ++// GNU32: @dataLDC = global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 4 ++// GNU64: @dataLDC = global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 16 ++// MSC64: @dataLDC = global { double, double } { double 1.000000e+00, double 1.000000e+00 }, align 8 ++ ++long double TestLD(long double x) { ++ return x * x; ++} ++// GNU32: define x86_fp80 @TestLD(x86_fp80 %x) ++// GNU64: define void @TestLD(x86_fp80* noalias sret %agg.result, x86_fp80*) ++// MSC64: define double @TestLD(double %x) ++ ++long double _Complex TestLDC(long double _Complex x) { ++ return x * x; ++} ++// GNU32: define void @TestLDC({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* byval align 4 %x) ++// GNU64: define void @TestLDC({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* %x) ++// MSC64: define void @TestLDC({ double, double }* noalias sret %agg.result, { double, double }* %x) +-- +2.5.0 + diff --git a/mingw-w64-clang/0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch b/mingw-w64-clang/0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch new file mode 100644 index 0000000000..4b9878c37a --- /dev/null +++ b/mingw-w64-clang/0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch @@ -0,0 +1,81 @@ +From 14d62ae679aa7b2fa5981741e217f0c31c2cd647 Mon Sep 17 00:00:00 2001 +From: Yaron Keren +Date: Sun, 9 Aug 2015 00:24:07 +0000 +Subject: [PATCH] Teach mingw toolchain driver to properly emit static or + dynamic linking of ligcc. Implemented in MinGW::Linker::AddLibGCC since + AddLibgcc is a logic puzzle even before adding one more boolean. A first step + towards simplification of AddLibgcc would be to factor out the Android + AddLibgcc code into its own routine. + +git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244407 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/Driver/Tools.cpp | 20 ++++++++++++++++++-- + test/Driver/mingw-libgcc.c | 25 +++++++++++++++++++++++++ + 2 files changed, 43 insertions(+), 2 deletions(-) + create mode 100644 test/Driver/mingw-libgcc.c + +diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp +index f23765b..b82b5f0 100644 +--- a/lib/Driver/Tools.cpp ++++ b/lib/Driver/Tools.cpp +@@ -9083,8 +9083,24 @@ void MinGW::Linker::AddLibGCC(const ArgList &Args, + CmdArgs.push_back("-lmingwthrd"); + CmdArgs.push_back("-lmingw32"); + +- // Add libgcc or compiler-rt. +- AddRunTimeLibs(getToolChain(), getToolChain().getDriver(), CmdArgs, Args); ++ // Make use of compiler-rt if --rtlib option is used ++ ToolChain::RuntimeLibType RLT = getToolChain().GetRuntimeLibType(Args); ++ if (RLT == ToolChain::RLT_Libgcc) { ++ bool Static = Args.hasArg(options::OPT_static_libgcc) || ++ Args.hasArg(options::OPT_static); ++ bool Shared = Args.hasArg(options::OPT_shared); ++ bool CXX = getToolChain().getDriver().CCCIsCXX(); ++ ++ if (Static || (!CXX && !Shared)) { ++ CmdArgs.push_back("-lgcc"); ++ CmdArgs.push_back("-lgcc_eh"); ++ } else { ++ CmdArgs.push_back("-lgcc_s"); ++ CmdArgs.push_back("-lgcc"); ++ } ++ } else { ++ AddRunTimeLibs(getToolChain(), getToolChain().getDriver(), CmdArgs, Args); ++ } + + CmdArgs.push_back("-lmoldname"); + CmdArgs.push_back("-lmingwex"); +diff --git a/test/Driver/mingw-libgcc.c b/test/Driver/mingw-libgcc.c +new file mode 100644 +index 0000000..c427eba +--- /dev/null ++++ b/test/Driver/mingw-libgcc.c +@@ -0,0 +1,25 @@ ++// Test if mingw toolchain driver emits static linking (-lgcc -lgcc_eh) or dynamic linking (-lgcc_s -lgcc). ++// Verified with gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project). ++ ++// gcc, static ++// RUN: %clang -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static-libgcc -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static -shared -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static-libgcc -shared -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++ ++// gcc, dynamic ++// RUN: %clang -shared -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s ++ ++// g++, static ++// RUN: %clang -static --driver-mode=g++ -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static-libgcc --driver-mode=g++ -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++// RUN: %clang -static-libgcc -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s ++ ++// g++, dynamic ++// RUN: %clang --driver-mode=g++ -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s ++// RUN: %clang -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s ++ ++// CHECK_STATIC: "-lgcc" "-lgcc_eh" ++// CHECK_DYNAMIC: "-lgcc_s" "-lgcc" +-- +2.5.2 + diff --git a/mingw-w64-clang/0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch b/mingw-w64-clang/0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch new file mode 100644 index 0000000000..5e3c94b064 --- /dev/null +++ b/mingw-w64-clang/0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch @@ -0,0 +1,44 @@ +From ece3f0021cd16518977b6b78af7bb3bfa19c089c Mon Sep 17 00:00:00 2001 +From: Yaron Keren +Date: Thu, 3 Sep 2015 20:33:29 +0000 +Subject: [PATCH] =?UTF-8?q?Fix=20PR23472=C3=BE=20by=20emitting=20initializ?= + =?UTF-8?q?ed=20variable=20and=20its=20guard=20in=20the=20same=20COMDAT=20?= + =?UTF-8?q?only=20for=20ELF=20objects.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + http://llvm.org/pr23472 + +Reviewed by Reid Kleckner. + + + +git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246803 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/CodeGen/ItaniumCXXABI.cpp | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp +index 751c472..9fa4f06 100644 +--- a/lib/CodeGen/ItaniumCXXABI.cpp ++++ b/lib/CodeGen/ItaniumCXXABI.cpp +@@ -1823,10 +1823,12 @@ void ItaniumCXXABI::EmitGuardedInit(CodeGenFunction &CGF, + // If the variable is thread-local, so is its guard variable. + guard->setThreadLocalMode(var->getThreadLocalMode()); + +- // The ABI says: It is suggested that it be emitted in the same COMDAT group +- // as the associated data object ++ // The ABI says: "It is suggested that it be emitted in the same COMDAT ++ // group as the associated data object." In practice, this doesn't work for ++ // non-ELF object formats, so only do it for ELF. + llvm::Comdat *C = var->getComdat(); +- if (!D.isLocalVarDecl() && C) { ++ if (!D.isLocalVarDecl() && C && ++ CGM.getTarget().getTriple().isOSBinFormatELF()) { + guard->setComdat(C); + CGF.CurFn->setComdat(C); + } else if (CGM.supportsCOMDAT() && guard->isWeakForLinker()) { +-- +2.5.2 + diff --git a/mingw-w64-clang/0018-mingw-enable-static-libclang.patch b/mingw-w64-clang/0018-mingw-enable-static-libclang.patch new file mode 100644 index 0000000000..d7bbc249f9 --- /dev/null +++ b/mingw-w64-clang/0018-mingw-enable-static-libclang.patch @@ -0,0 +1,11 @@ +--- cfe-3.7.0.src/tools/libclang/CMakeLists.txt.orig 2015-12-25 10:56:22.521432100 +0300 ++++ cfe-3.7.0.src/tools/libclang/CMakeLists.txt 2015-12-25 12:18:32.484593900 +0300 +@@ -74,7 +74,7 @@ + set(ENABLE_SHARED SHARED) + endif() + +-if((NOT LLVM_ENABLE_PIC OR LIBCLANG_BUILD_STATIC) AND NOT WIN32) ++if((NOT LLVM_ENABLE_PIC OR LIBCLANG_BUILD_STATIC) AND (NOT WIN32 OR MINGW)) + set(ENABLE_STATIC STATIC) + endif() + diff --git a/mingw-w64-clang/0031-COFF-add-the-mingw-alias-for-ImageBase.patch b/mingw-w64-clang/0031-COFF-add-the-mingw-alias-for-ImageBase.patch new file mode 100644 index 0000000000..b609b3b97a --- /dev/null +++ b/mingw-w64-clang/0031-COFF-add-the-mingw-alias-for-ImageBase.patch @@ -0,0 +1,24 @@ +From 0d44d5c00062f57a17eec0ca61e6590ab09d816d Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 8 Jun 2015 02:14:25 +0100 +Subject: [PATCH 1/4] COFF: add the mingw alias for ImageBase + +--- + COFF/SymbolTable.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/COFF/SymbolTable.cpp b/COFF/SymbolTable.cpp +index a90e208..e301b6a 100644 +--- a/COFF/SymbolTable.cpp ++++ b/COFF/SymbolTable.cpp +@@ -23,6 +23,7 @@ namespace coff { + + SymbolTable::SymbolTable() { + resolve(new (Alloc) DefinedAbsolute("__ImageBase", Config->ImageBase)); ++ resolve(new (Alloc) DefinedAbsolute("__image_base__", Config->ImageBase)); + if (!Config->EntryName.empty()) + resolve(new (Alloc) Undefined(Config->EntryName)); + } +-- +2.3.3 + diff --git a/mingw-w64-clang/0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch b/mingw-w64-clang/0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch new file mode 100644 index 0000000000..2a96e24bd1 --- /dev/null +++ b/mingw-w64-clang/0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch @@ -0,0 +1,67 @@ +From dd9f24a90e6f4cbe251280c40d61a99f7ffaee38 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 8 Jun 2015 02:17:26 +0100 +Subject: [PATCH 2/4] PECOFF: add the mingw alias for ImageBase + +--- + lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h | 10 +++++++--- + lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp | 2 +- + lib/ReaderWriter/PECOFF/WriterPECOFF.cpp | 4 +++- + 3 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h b/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h +index cfa66bf..21186f3 100644 +--- a/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h ++++ b/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h +@@ -97,13 +97,17 @@ class LinkerGeneratedSymbolFile : public SimpleFile { + public: + LinkerGeneratedSymbolFile(const PECOFFLinkingContext &ctx) + : SimpleFile(""), +- _imageBaseAtom(*this, ctx.decorateSymbol("__ImageBase"), ++ _imageBaseAtomMSVC(*this, ctx.decorateSymbol("__ImageBase"), ++ Atom::scopeGlobal, ctx.getBaseAddress()), ++ _imageBaseAtomGNU(*this, ctx.decorateSymbol("__image_base__"), + Atom::scopeGlobal, ctx.getBaseAddress()) { +- addAtom(_imageBaseAtom); ++ addAtom(_imageBaseAtomMSVC); ++ addAtom(_imageBaseAtomGNU); + }; + + private: +- SimpleAbsoluteAtom _imageBaseAtom; ++ SimpleAbsoluteAtom _imageBaseAtomMSVC; ++ SimpleAbsoluteAtom _imageBaseAtomGNU; + }; + + // A LocallyImporteSymbolFile is an archive file containing __imp_ +diff --git a/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +index ebd42f8..2bd0e9c 100644 +--- a/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp ++++ b/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +@@ -146,7 +146,7 @@ void PECOFFLinkingContext::createImplicitFiles( + llvm::make_unique(*this))); + members.insert(members.begin() + getGroupStartPos(members), std::move(entry)); + +- // Create a file for __ImageBase. ++ // Create a file for __ImageBase and __image_base__. + std::unique_ptr fileNode(new FileNode( + llvm::make_unique(*this))); + members.push_back(std::move(fileNode)); +diff --git a/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp b/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp +index 8c3aac0..63d0dad 100644 +--- a/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp ++++ b/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp +@@ -791,7 +791,9 @@ void AtomChunk::addBaseRelocations(std::vector &relocSites) const { + // because that's relative to run-time image base address. + if (auto *abs = dyn_cast(ref->target())) + if (!abs->name().equals("__ImageBase") && +- !abs->name().equals("___ImageBase")) ++ !abs->name().equals("___ImageBase") && ++ !abs->name().equals("__image_base__") && ++ !abs->name().equals("___image_base__")) + continue; + + uint64_t address = layout->_virtualAddr + ref->offsetInAtom(); +-- +2.3.3 + diff --git a/mingw-w64-clang/0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch b/mingw-w64-clang/0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch new file mode 100644 index 0000000000..6f23faa3ad --- /dev/null +++ b/mingw-w64-clang/0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch @@ -0,0 +1,102 @@ +From ef70aa910f276615977c7b3e61f5c61418208960 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 8 Jun 2015 02:21:51 +0100 +Subject: [PATCH 3/4] PECOFF: add searchLibrary function with sysroot support + +--- + include/lld/ReaderWriter/PECOFFLinkingContext.h | 5 ++++ + lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp | 36 ++++++++++++++++++++++++ + 2 files changed, 41 insertions(+) + +diff --git a/include/lld/ReaderWriter/PECOFFLinkingContext.h b/include/lld/ReaderWriter/PECOFFLinkingContext.h +index 2e19dd8..4f48882 100644 +--- a/include/lld/ReaderWriter/PECOFFLinkingContext.h ++++ b/include/lld/ReaderWriter/PECOFFLinkingContext.h +@@ -105,6 +105,7 @@ public: + _tempFiles.push_back(std::move(fileRemover)); + } + ++ ErrorOr searchLibrary(StringRef libName) const; + StringRef searchLibraryFile(StringRef path) const; + + StringRef decorateSymbol(StringRef name) const; +@@ -321,6 +322,9 @@ public: + return _parseDirectives; + } + ++ StringRef getSysroot() const { return _sysrootPath; } ++ void setSysroot(StringRef path) { _sysrootPath = path; } ++ + protected: + /// Method to create a internal file for the entry symbol + std::unique_ptr createEntrySymbolFile() const override; +@@ -402,6 +406,7 @@ private: + std::set _noDefaultLibs; + + std::vector _inputSearchPaths; ++ StringRef _sysrootPath = ""; + std::unique_ptr _writer; + + // A map for weak aliases. +diff --git a/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +index 2bd0e9c..043fe6f 100644 +--- a/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp ++++ b/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +@@ -23,11 +23,16 @@ + #include "llvm/ADT/STLExtras.h" + #include "llvm/ADT/SmallString.h" + #include "llvm/Support/Allocator.h" ++#include "llvm/Support/Errc.h" ++#include "llvm/Support/FileSystem.h" + #include "llvm/Support/Path.h" + #include + #include + #include + ++using llvm::sys::fs::exists; ++using llvm::sys::path::is_absolute; ++ + namespace lld { + + bool PECOFFLinkingContext::validateImpl(raw_ostream &diagnostics) { +@@ -214,6 +219,37 @@ bool PECOFFLinkingContext::addSectionRenaming(raw_ostream &diagnostics, + return true; + } + ++static void buildSearchPath(SmallString<128> &path, StringRef dir, ++ StringRef sysRoot) { ++ if (dir.startswith("=/")) { ++ // If a search directory begins with "=", "=" is replaced ++ // with the sysroot path. ++ path.assign(sysRoot); ++ path.append(dir.substr(1)); ++ } else { ++ path.assign(dir); ++ } ++} ++ ++ErrorOr PECOFFLinkingContext::searchLibrary(StringRef libName) const { ++ bool hasColonPrefix = libName[0] == ':'; ++ SmallString<128> path; ++ for (StringRef dir : _inputSearchPaths) { ++ // Search for static libraries too ++ buildSearchPath(path, dir, _sysrootPath); ++ llvm::sys::path::append(path, hasColonPrefix ++ ? libName.drop_front() ++ : Twine("lib", libName) + ".a"); ++ ++ if (exists(path.str())) ++ return path.str().copy(_allocator); ++ } ++ if (hasColonPrefix && exists(libName.drop_front())) ++ return libName.drop_front(); ++ ++ return make_error_code(llvm::errc::no_such_file_or_directory); ++} ++ + /// Try to find the input library file from the search paths and append it to + /// the input file list. Returns true if the library file is found. + StringRef PECOFFLinkingContext::searchLibraryFile(StringRef filename) const { +-- +2.3.3 + diff --git a/mingw-w64-clang/0034-GNU-add-support-for-linking-PECOFF.patch b/mingw-w64-clang/0034-GNU-add-support-for-linking-PECOFF.patch new file mode 100644 index 0000000000..478533fa28 --- /dev/null +++ b/mingw-w64-clang/0034-GNU-add-support-for-linking-PECOFF.patch @@ -0,0 +1,502 @@ +From 4ae708fdabd2cfc8882cf03d07ab0d5bf22e4964 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Thu, 2 Jul 2015 05:35:51 +0100 +Subject: [PATCH] GNU: add support for linking PECOFF + + +diff --git a/include/lld/Driver/Driver.h b/include/lld/Driver/Driver.h +index 160826c..8a276e4 100644 +--- a/include/lld/Driver/Driver.h ++++ b/include/lld/Driver/Driver.h +@@ -67,14 +67,43 @@ class GnuLdDriver : public Driver { + public: + /// Parses command line arguments same as gnu/binutils ld and performs link. + /// Returns true iff an error occurred. +- static bool linkELF(llvm::ArrayRef args, ++ static bool linkGNU(llvm::ArrayRef args, + raw_ostream &diag = llvm::errs()); + + /// Uses gnu/binutils style ld command line options to fill in options struct. ++ /// Parses command line arguments same as gnu/binutils ld and performs link on ELF. ++ /// Returns true iff an error occurred. ++ static bool linkELF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ llvm::Triple &baseTriple, ++ raw_ostream &diag = llvm::errs()); ++ ++ /// Parses command line arguments same as gnu/binutils ld and performs link on PECOFF. ++ /// Returns true iff an error occurred. ++ static bool linkPECOFF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ raw_ostream &diag = llvm::errs()); ++ ++ /// Uses gnu/binutils style ld command line options to fill in options struct for ELF. + /// Returns true iff there was an error. +- static bool parse(llvm::ArrayRef args, +- std::unique_ptr &context, +- raw_ostream &diag = llvm::errs()); ++ static bool parseELF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ llvm::Triple &baseTriple, ++ std::unique_ptr &context, ++ raw_ostream &diag = llvm::errs()); ++ ++ /// Uses gnu/binutils style ld command line options to fill in options struct for PECOFF. ++ /// Returns true iff there was an error. ++ static bool parsePECOFF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ PECOFFLinkingContext &ctx, ++ raw_ostream &diag = llvm::errs(), ++ bool isDirective = false); ++ ++ // Same as parse(), but restricted to the context of directives. ++ static bool parseDirectives(int argc, const char *argv[], ++ PECOFFLinkingContext &info, ++ raw_ostream &diag = llvm::errs()); + + /// Parses a given memory buffer as a linker script and evaluate that. + /// Public function for testing. +diff --git a/lib/Driver/GnuLdDriver.cpp b/lib/Driver/GnuLdDriver.cpp +index fbdc12d..21abb62 100644 +--- a/lib/Driver/GnuLdDriver.cpp ++++ b/lib/Driver/GnuLdDriver.cpp +@@ -15,6 +15,7 @@ + + #include "lld/Driver/Driver.h" + #include "lld/ReaderWriter/ELFLinkingContext.h" ++#include "lld/ReaderWriter/PECOFFLinkingContext.h" + #include "lld/ReaderWriter/LinkerScript.h" + #include "llvm/ADT/ArrayRef.h" + #include "llvm/ADT/Optional.h" +@@ -134,12 +135,61 @@ static bool parseMaxPageSize(StringRef opt, uint64_t &val) { + return true; + } + +-bool GnuLdDriver::linkELF(llvm::ArrayRef args, ++bool GnuLdDriver::linkGNU(llvm::ArrayRef args, + raw_ostream &diag) { + BumpPtrAllocator alloc; + args = maybeExpandResponseFiles(args, alloc); ++ ++ // Parse command line options using GnuLdOptions.td ++ GnuLdOptTable table; ++ unsigned missingIndex; ++ unsigned missingCount; ++ ++ llvm::opt::InputArgList parsedArgs = ++ table.ParseArgs(args.slice(1), missingIndex, missingCount); ++ if (missingCount) { ++ diag << "error: missing arg value for '" ++ << parsedArgs.getArgString(missingIndex) << "' expected " ++ << missingCount << " argument(s).\n"; ++ return false; ++ } ++ ++ // Handle --help ++ if (parsedArgs.hasArg(OPT_help)) { ++ table.PrintHelp(llvm::outs(), args[0], "LLVM Linker", false); ++ return true; ++ } ++ ++ // Use -target or use default target triple to instantiate LinkingContext ++ llvm::Triple baseTriple; ++ if (auto *arg = parsedArgs.getLastArg(OPT_target)) { ++ baseTriple = llvm::Triple(arg->getValue()); ++ } else { ++ baseTriple = getDefaultTarget(args[0]); ++ } ++ llvm::Triple triple(baseTriple); ++ ++ if (!applyEmulation(triple, parsedArgs, diag)) ++ return false; ++ ++ if (triple.getOS() == llvm::Triple::Win32) { ++ if(!linkPECOFF(parsedArgs, triple, diag)) ++ return false; ++ } else { ++ if(!linkELF(parsedArgs, triple, baseTriple, diag)) ++ return false; ++ } ++ ++ return true; ++} ++ ++bool GnuLdDriver::linkELF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ llvm::Triple &baseTriple, ++ raw_ostream &diag) { ++ + std::unique_ptr options; +- if (!parse(args, options, diag)) ++ if (!parseELF(args, triple, baseTriple, options, diag)) + return false; + if (!options) + return true; +@@ -154,8 +204,65 @@ bool GnuLdDriver::linkELF(llvm::ArrayRef args, + return linked; + } + ++bool GnuLdDriver::linkPECOFF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ raw_ostream &diag) { ++ ++ PECOFFLinkingContext ctx; ++ ctx.setParseDirectives(parseDirectives); ++ ctx.registry().addSupportCOFFObjects(ctx); ++ ctx.registry().addSupportCOFFImportLibraries(ctx); ++ ctx.registry().addSupportArchives(ctx.logInputFiles()); ++ ctx.registry().addSupportYamlFiles(); ++ ++ if (!parsePECOFF(args, triple, ctx, diag)) ++ return false; ++ ++ bool linked = link(ctx, diag); ++ return linked; ++} ++ ++bool GnuLdDriver::parseDirectives(int argc, const char *argv[], ++ PECOFFLinkingContext &info, ++ raw_ostream &diag) { ++ ++ llvm::ArrayRef args(argv, argc); ++ GnuLdOptTable table; ++ unsigned missingIndex; ++ unsigned missingCount; ++ ++ llvm::opt::InputArgList parsedArgs = ++ table.ParseArgs(args.slice(1), missingIndex, missingCount); ++ if (missingCount) { ++ diag << "error: missing arg value for '" ++ << parsedArgs.getArgString(missingIndex) << "' expected " ++ << missingCount << " argument(s).\n"; ++ return false; ++ } ++ ++ // Use -target or use default target triple to instantiate LinkingContext ++ llvm::Triple baseTriple; ++ if (auto *arg = parsedArgs.getLastArg(OPT_target)) { ++ baseTriple = llvm::Triple(arg->getValue()); ++ } else { ++ baseTriple = getDefaultTarget(argv[0]); ++ } ++ llvm::Triple triple(baseTriple); ++ ++ return parsePECOFF(parsedArgs, triple, info, diag, true); ++} ++ + static llvm::Optional + getArchType(const llvm::Triple &triple, StringRef value) { ++ ++ //the base arch can be wrong for windows so just check the PE target ++ if (value == "i386pe") ++ return llvm::Triple::x86; ++ if (value == "i386pep") ++ return llvm::Triple::x86_64; ++ if (value == "thumb2pe") ++ return llvm::Triple::arm; ++ + switch (triple.getArch()) { + case llvm::Triple::x86: + case llvm::Triple::x86_64: +@@ -184,6 +291,29 @@ getArchType(const llvm::Triple &triple, StringRef value) { + } + } + ++static llvm::COFF::MachineTypes ++getCOFFType(const llvm::Triple &triple) { ++ switch (triple.getArch()) { ++ case llvm::Triple::x86: ++ return llvm::COFF::IMAGE_FILE_MACHINE_I386; ++ case llvm::Triple::x86_64: ++ return llvm::COFF::IMAGE_FILE_MACHINE_AMD64; ++ case llvm::Triple::arm: ++ case llvm::Triple::thumb: ++ return llvm::COFF::IMAGE_FILE_MACHINE_ARMNT; ++ default: ++ return llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN; ++ } ++} ++ ++static llvm::COFF::WindowsSubsystem ++getSubsystem(StringRef value) { ++ return llvm::StringSwitch(value.lower()) ++ .Case("windows", llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_GUI) ++ .Case("console", llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_CUI) ++ .Default(llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN); ++} ++ + static bool isLinkerScript(StringRef path, raw_ostream &diag) { + llvm::sys::fs::file_magic magic = llvm::sys::fs::file_magic::unknown; + if (std::error_code ec = llvm::sys::fs::identify_magic(path, magic)) { +@@ -195,7 +325,24 @@ static bool isLinkerScript(StringRef path, raw_ostream &diag) { + } + + static ErrorOr +-findFile(ELFLinkingContext &ctx, StringRef path, bool dashL) { ++findFileELF(ELFLinkingContext &ctx, StringRef path, bool dashL) { ++ // If the path was referred to by using a -l argument, let's search ++ // for the file in the search path. ++ if (dashL) { ++ ErrorOr pathOrErr = ctx.searchLibrary(path); ++ if (std::error_code ec = pathOrErr.getError()) ++ return make_dynamic_error_code( ++ Twine("Unable to find library -l") + path + ": " + ec.message()); ++ path = pathOrErr.get(); ++ } ++ if (!llvm::sys::fs::exists(path)) ++ return make_dynamic_error_code( ++ Twine("lld: cannot find file ") + path); ++ return path; ++} ++ ++static ErrorOr ++findFilePECOFF(PECOFFLinkingContext &ctx, StringRef path, bool dashL = true) { + // If the path was referred to by using a -l argument, let's search + // for the file in the search path. + if (dashL) { +@@ -219,6 +366,17 @@ static bool isPathUnderSysroot(StringRef sysroot, StringRef path) { + return !path.empty(); + } + ++// Returns true if the given file node has already been added to the input ++// graph. ++static bool hasLibrary(PECOFFLinkingContext &ctx, File *file) { ++ StringRef path = file->path(); ++ for (std::unique_ptr &p : ctx.getNodes()) ++ if (auto *f = dyn_cast(p.get())) ++ if (f->getFile()->path() == path) ++ return true; ++ return false; ++} ++ + static std::error_code + addFilesFromLinkerScript(ELFLinkingContext &ctx, StringRef scriptPath, + const std::vector &inputPaths, +@@ -339,40 +497,11 @@ getBool(const llvm::opt::InputArgList &parsedArgs, + return llvm::None; + } + +-bool GnuLdDriver::parse(llvm::ArrayRef args, +- std::unique_ptr &context, +- raw_ostream &diag) { +- // Parse command line options using GnuLdOptions.td +- GnuLdOptTable table; +- unsigned missingIndex; +- unsigned missingCount; +- +- llvm::opt::InputArgList parsedArgs = +- table.ParseArgs(args.slice(1), missingIndex, missingCount); +- if (missingCount) { +- diag << "error: missing arg value for '" +- << parsedArgs.getArgString(missingIndex) << "' expected " +- << missingCount << " argument(s).\n"; +- return false; +- } +- +- // Handle --help +- if (parsedArgs.hasArg(OPT_help)) { +- table.PrintHelp(llvm::outs(), args[0], "LLVM Linker", false); +- return true; +- } +- +- // Use -target or use default target triple to instantiate LinkingContext +- llvm::Triple baseTriple; +- if (auto *arg = parsedArgs.getLastArg(OPT_target)) { +- baseTriple = llvm::Triple(arg->getValue()); +- } else { +- baseTriple = getDefaultTarget(args[0]); +- } +- llvm::Triple triple(baseTriple); +- +- if (!applyEmulation(triple, parsedArgs, diag)) +- return false; ++bool GnuLdDriver::parseELF(llvm::opt::InputArgList &parsedArgs, ++ llvm::Triple &triple, ++ llvm::Triple &baseTriple, ++ std::unique_ptr &context, ++ raw_ostream &diag) { + + std::unique_ptr ctx(createELFLinkingContext(triple)); + +@@ -673,7 +802,7 @@ bool GnuLdDriver::parse(llvm::ArrayRef args, + bool dashL = (arg->getOption().getID() == OPT_l); + StringRef path = arg->getValue(); + +- ErrorOr pathOrErr = findFile(*ctx, path, dashL); ++ ErrorOr pathOrErr = findFileELF(*ctx, path, dashL); + if (std::error_code ec = pathOrErr.getError()) { + auto file = llvm::make_unique(path, ec); + auto node = llvm::make_unique(std::move(file)); +@@ -747,6 +876,133 @@ bool GnuLdDriver::parse(llvm::ArrayRef args, + return true; + } + ++bool GnuLdDriver::parsePECOFF(llvm::opt::InputArgList &args, ++ llvm::Triple &triple, ++ PECOFFLinkingContext &ctx, ++ raw_ostream &diag, ++ bool isReadingDirectiveSection) { ++ ++ // Parse may be called from multiple threads simultaneously to parse .drectve ++ // sections. This function is not thread-safe because it mutates the context ++ // object. So acquire the lock. ++ std::lock_guard lock(ctx.getMutex()); ++ ++ // The list of input files. ++ std::vector> files; ++ std::vector> libraries; ++ ++ llvm::COFF::MachineTypes type = getCOFFType(triple); ++ if (type == llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN) { ++ diag << "error: unknown machine type\n"; ++ return false; ++ } ++ ++ ctx.setMachineType(type); ++ ++ if (args.hasArg(OPT_t)) ++ ctx.setLogInputFiles(true); ++ ++ //mingw-w64 never uses wide versions of mainCRTStartup ++ if(type == llvm::COFF::IMAGE_FILE_MACHINE_I386) ++ ctx.setEntrySymbolName(ctx.allocate("_mainCRTStartup")); ++ else ++ ctx.setEntrySymbolName(ctx.allocate("mainCRTStartup")); ++ ++ if (auto *arg = args.getLastArg(OPT_output)) ++ ctx.setOutputPath(arg->getValue()); ++ ++ if (auto *arg = args.getLastArg(OPT_subsystem)) ++ ctx.setSubsystem(getSubsystem(arg->getValue())); ++ ++ if (args.hasArg(OPT_dll)) { ++ ctx.setIsDll(true); ++ // Default base address of a DLL is 0x10000000. ++ //if (!args.hasArg(OPT_base)) ++ //ctx.setBaseAddress(0x10000000); ++ } ++ ++ for (auto *arg : args.filtered(OPT_L)) ++ ctx.appendInputSearchPath(ctx.allocate(arg->getValue())); ++ ++ // Process files ++ for (auto arg : args) { ++ switch (arg->getOption().getID()) { ++ case OPT_INPUT: ++ case OPT_l: ++ case OPT_T: { ++ bool dashL = (arg->getOption().getID() == OPT_l); ++ StringRef path = arg->getValue(); ++ ErrorOr pathOrErr = findFilePECOFF(ctx, path, dashL); ++ StringRef realpath = pathOrErr.get(); ++ std::vector> curr; ++ ++ if(!pathOrErr){ ++ diag << "Cannot find " << path << "\n"; ++ return false; ++ } ++ ++ if(dashL) { ++ curr = loadFile(ctx, realpath, false); ++ for (std::unique_ptr &lib : curr) { ++ if (ctx.logInputFiles()) ++ diag << "lib: " << lib->path() << "\n"; ++ libraries.push_back(std::move(lib)); ++ } ++ } else { ++ curr = loadFile(ctx, realpath, false); ++ for (std::unique_ptr &file : curr) { ++ if (ctx.logInputFiles()) ++ diag << "input: " << file->path() << "\n"; ++ files.push_back(std::move(file)); ++ } ++ } ++ break; ++ } ++ } ++ } ++ ++ for (std::unique_ptr &file : files) { ++ if (isReadingDirectiveSection) { ++ File *f = file.get(); ++ ctx.getTaskGroup().spawn([f] { f->parse(); }); ++ } ++ ctx.getNodes().push_back(llvm::make_unique(std::move(file))); ++ } ++ ++ // Add the library group to the linking context. ++ if (!isReadingDirectiveSection) { ++ // Add a group-end marker. ++ ctx.getNodes().push_back(llvm::make_unique(0)); ++ } ++ ++ // Add the library files to the library group. ++ for (std::unique_ptr &file : libraries) { ++ if (!hasLibrary(ctx, file.get())) { ++ if (isReadingDirectiveSection) { ++ File *f = file.get(); ++ ctx.getTaskGroup().spawn([f] { f->parse(); }); ++ } ++ ctx.addLibraryFile(llvm::make_unique(std::move(file))); ++ } ++ } ++ ++ if (ctx.getNodes().empty()) { ++ diag << "No input files\n"; ++ return false; ++ } ++ ++ // Set default output file name if the output file was not specified. ++ if (ctx.outputPath().empty()) ++ ctx.setOutputPath("a.exe"); ++ ++ if (!ctx.validate(diag)) { ++ diag << "error: invalid linking context\n"; ++ return false; ++ } ++ ++ return true; ++} ++ + /// Get the default target triple based on either the program name + /// (e.g. "x86-ibm-linux-lld") or the primary target llvm was configured for. + llvm::Triple GnuLdDriver::getDefaultTarget(const char *progName) { +diff --git a/lib/Driver/GnuLdOptions.td b/lib/Driver/GnuLdOptions.td +index b3c3d90..7aa8547 100644 +--- a/lib/Driver/GnuLdOptions.td ++++ b/lib/Driver/GnuLdOptions.td +@@ -354,6 +354,18 @@ def pcrel_eh_reloc : Flag<["-", "--"], "pcrel-eh-reloc">, + HelpText<"Interpret R_MIPS_EH as R_MIPS_PC32">; + + //===----------------------------------------------------------------------===// ++/// Windows Target Specific Options ++//===----------------------------------------------------------------------===// ++def grp_windows_targetopts : OptionGroup<"WINDOWS SPECIFIC OPTIONS">, ++ Group; ++def subsystem : Separate<["--"], "subsystem">, MetaVarName<"">, ++ HelpText<"Select target subsystem">, ++ Group; ++def dll : Separate<["-", "--"], "dll">, ++ HelpText<"Create dynamic link library">, ++ Group; ++ ++//===----------------------------------------------------------------------===// + /// Ignored options + //===----------------------------------------------------------------------===// + def grp_ignored: OptionGroup<"ignored">, +diff --git a/lib/Driver/UniversalDriver.cpp b/lib/Driver/UniversalDriver.cpp +index c09addf..8ce45ea 100644 +--- a/lib/Driver/UniversalDriver.cpp ++++ b/lib/Driver/UniversalDriver.cpp +@@ -201,7 +201,7 @@ bool UniversalDriver::link(llvm::MutableArrayRef args, + // Switch to appropriate driver. + switch (flavor) { + case Flavor::gnu_ld: +- return GnuLdDriver::linkELF(args, diagnostics); ++ return GnuLdDriver::linkGNU(args, diagnostics); + case Flavor::darwin_ld: + return DarwinLdDriver::linkMachO(args, diagnostics); + case Flavor::win_link: +-- +2.4.5 + diff --git a/mingw-w64-clang/0041-libcxx-add-support-for-mingw-w64.patch b/mingw-w64-clang/0041-libcxx-add-support-for-mingw-w64.patch new file mode 100644 index 0000000000..4b4437b84d --- /dev/null +++ b/mingw-w64-clang/0041-libcxx-add-support-for-mingw-w64.patch @@ -0,0 +1,35 @@ +From 53625b291503734db14e4a6146ceb06f288fd987 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 5 Jul 2015 00:54:34 +0100 +Subject: [PATCH] libcxx: add support for mingw-w64 + + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index d3d5f38..4820f2c 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -2,7 +2,7 @@ set(LIBCXX_LIB_CMAKEFILES_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTOR + + # Get sources + file(GLOB LIBCXX_SOURCES ../src/*.cpp) +-if(WIN32) ++if(MSVC) + file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp) + list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES}) + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") +diff --git a/src/random.cpp b/src/random.cpp +index 4ab424e..d3062f5 100644 +--- a/src/random.cpp ++++ b/src/random.cpp +@@ -7,7 +7,7 @@ + // + //===----------------------------------------------------------------------===// + +-#if defined(_LIBCPP_USING_WIN32_RANDOM) ++#if defined(_LIBCPP_USING_WIN32_RANDOM) || defined(__MINGW32__) + // Must be defined before including stdlib.h to enable rand_s(). + #define _CRT_RAND_S + #endif // defined(_LIBCPP_USING_WIN32_RANDOM) +-- +2.4.5 + diff --git a/mingw-w64-clang/PKGBUILD b/mingw-w64-clang/PKGBUILD index ae5e4a87b9..837a4069e4 100644 --- a/mingw-w64-clang/PKGBUILD +++ b/mingw-w64-clang/PKGBUILD @@ -1,269 +1,340 @@ +# Maintainer: Martell Malone # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=clang +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-clang-analyzer" "${MINGW_PACKAGE_PREFIX}-clang-tools-extra" + "${MINGW_PACKAGE_PREFIX}-compiler-rt" + "${MINGW_PACKAGE_PREFIX}-libc++abi" + "${MINGW_PACKAGE_PREFIX}-libc++" + "${MINGW_PACKAGE_PREFIX}-lld" "${MINGW_PACKAGE_PREFIX}-llvm" - #"${MINGW_PACKAGE_PREFIX}-compiler-rt" + #"${MINGW_PACKAGE_PREFIX}-lldb" ) -pkgver=3.5.0 -pkgrel=6 -pkgdesc="LC language family frontend for LLVM (mingw-w64)" +pkgver=3.7.0 +pkgrel=10 +pkgdesc="C language family frontend for LLVM (mingw-w64)" arch=('any') url="http://llvm.org" license=("custom:University of Illinois/NCSA Open Source License") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libffi" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python3-sphinx" - "python2" "tar") + "${MINGW_PACKAGE_PREFIX}-python2" + "tar" + "groff") depends=("${MINGW_PACKAGE_PREFIX}-gcc") -options=('staticlibs' 'strip') -source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig} - http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz{,.sig} - http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig} - #http://llvm.org/releases/$pkgver/test-suite-$pkgver.src.tar.xz{,.sig} - #http://llvm.org/releases/$pkgver/libcxx-$pkgver.src.tar.xz{,.sig} - http://llvm.org/releases/$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig} - #http://llvm.org/releases/$pkgver/lldb-$pkgver.src.tar.xz{,.sig} - clang-fabs.patch - clang-win64-seh.patch - clang-mingw-driver.patch - llvm-3.5.0-force-link-pass.o.patch - llvm-3.5.0-fix-cmake-llvm-exports.patch - clang-3.6-allow-dll-attributes0.patch - clang-3.6-allow-dll-attributes1.patch - clang-3.6-allow-dll-attributes2.patch) -sha256sums=('28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03' - 'SKIP' - 'fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b' - 'SKIP' - 'a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136' - 'SKIP' - '2981beb378afb5aa5c50ed017720a42a33e77e902c7086ad2d412ef4fa931f69' - 'SKIP' - '614a076dc65b400910b190f4e3d26fdebd20885cfd482f7f8464469808e3beac' - '6e1168e5c9cba875ef7e87ccfd3060c3a0db6b5e2c3f1fa9fdb4d0eaea465025' - '2f49bba3acb0e45b0c3374537f2f9036891013c751930437c80472d8d8d8e2a7' - '5702053503d49448598eda1b8dc8c263f0df9ad7486833273e3987b5dec25a19' - '841a153d0e9d2d196ea5318388ff295e69c41547eb73b24edf92a1b2cc3cccdd' - 'ff1786aa38a9c728e32d25e1c5e61af55aa0ebbde99720197052a5e72c22ce10' - 'bf0382de4d03b911a4016ec39df66795ba9f26cdf7fb0542dcb0befd9f713382' - '01cd407e1d2df64bcdb0ec444c86fee19ab262e21b1108b60a66ab954a4cb712') +#options=('debug' '!strip') +validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg, Google. +source=(http://llvm.org/releases/${pkgver}/llvm-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/cfe-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/compiler-rt-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/test-suite-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/libcxx-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/libcxxabi-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/clang-tools-extra-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/lld-${pkgver}.src.tar.xz{,.sig} + http://llvm.org/releases/${pkgver}/lldb-${pkgver}.src.tar.xz{,.sig} + 0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch + 0002-use-DESTDIR-on-windows.patch + 0003-generate-proper-library-names-mingw.patch + 0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch + 0013-mingw-w64-dont-have-dl-library.patch + 0014-use-DESTDIR-on-windows.patch + 0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch + 0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch + 0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch + 0018-mingw-enable-static-libclang.patch + 0031-COFF-add-the-mingw-alias-for-ImageBase.patch + 0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch + 0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch + 0034-GNU-add-support-for-linking-PECOFF.patch + 0041-libcxx-add-support-for-mingw-w64.patch + ) -noextract=(cfe-$pkgver.src.tar.xz) +# Some patch notes :) +#0001-0009 -> llvm +#0011-0019 -> clang +#0021-0029 -> rt +#0031-0039 -> lld +#0041-0049 -> c++ +#0051-0059 -> lldb + +sha256sums=('ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153' + 'SKIP' + '4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc' + 'SKIP' + '227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b' + 'SKIP' + '186d15c2233546e9e4c6b5a6ef572068a9a4fca900c74afb3a86954611a59653' + 'SKIP' + 'c18f3c8333cd7e678c1424a57fe5e25efe740ca7caf62ac67152b4723f3ad08e' + 'SKIP' + '48b074fd334958b2d8bab893c897a0c8258328782cdec2d229c7bce432b49beb' + 'SKIP' + '8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd' + 'SKIP' + 'ddb658b789c501efbe4f54ff8ced2c07cd9ff686c92445d8a1ab2cd5dbd837ed' + 'SKIP' + 'f4d7505bc111044eaa4033af012221e492938405b62522b8e3e354c20c4b71e9' + 'SKIP' + '0804146b32138d55c611336cc81e1783c29a8fab0fe62f248ba1ad7acc711c4d' + 'bf22d86c0546b80cd7212b7e7c3e1b628f00ab3aa3b9cf73ad338bf628f42597' + '6a95ed671876a6de04799d15bf7485d628016bb4a95a6764217ad452d8eed0d8' + '13a95a61e9c1c44c18a69947734e07515332a549446394f48b86b52511d221de' + '8f35b80eca6c18df020b176eee4eb95901c31e3e640848a6d606983aca15a3af' + '962b4de1afa781ee171f71211518c58f6a3531d7fcca5ec458e39703b0fb9af7' + 'f7bc109b07b5256a068dbe55097c24b46307aea442bec884d8ba455dc3ad18fd' + 'e0f4127df5857af667a9e40e2a7a13877352b89c99f3213b491215bf7bd03565' + '47fbe90718742d1a3c0aee919b159241e616738447de3505a48a9f5886e5db96' + '0e45e76ee6d6658de52edb7b508a8bcc9f10ff0b295ff2a4e35577136a40c6a5' + '421befbe54123066544f53876c7eb6013ac6684744d8173fb0a3fa9be16d68c7' + '96a6fcd81b8d5134b4273a2e413cd268430022533f1bfb44ed73503ee0ae7e87' + '08260b1ee54fad7e0015d66b117937701d2ce4ca1814b012250de03a0dae9317' + '3fa2c76eea1a55f5b03e7677e73a5f76a6d0fb326a23c606e88c683238f84d90' + '5b8edbbb638c906216e20229529e8348abc50d5886d20e07af08543e1e574e94') + +validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294') +noextract=(cfe-${pkgver}.src.tar.xz + #libcxx-${pkgver}.src.tar.xz + #lldb-${pkgver}.src.tar.xz + test-suite-${pkgver}.src.tar.xz + ) prepare() { - plain "Extracting clang-$pkgver.src.tar.xz due to symlink(s) without pre-existing target(s)" - [ -d $srcdir/cfe-$pkgver ] && rm -rf $srcdir/cfe-$pkgver - [ -d $srcdir/cfe-$pkgver ] || tar -xJvf $startdir/cfe-$pkgver.src.tar.xz -C $srcdir || true + plain "Extracting clang-${pkgver}.src.tar.xz due to symlink(s) without pre-existing target(s)" + [[ -d ${srcdir}/cfe-${pkgver} ]] && rm -rf ${srcdir}/cfe-${pkgver} + [[ -d ${srcdir}/cfe-${pkgver} ]] || tar -xJvf ${srcdir}/cfe-${pkgver}.src.tar.xz -C ${srcdir} || true - cd "$srcdir/llvm-$pkgver.src" - # Fix build with GCC 4.9 (patch from Debian) - # http://llvm.org/bugs/show_bug.cgi?id=20067 - patch -p1 -i "$srcdir/llvm-3.5.0-force-link-pass.o.patch" - patch -p0 -i "$srcdir/llvm-3.5.0-fix-cmake-llvm-exports.patch" + cd "${srcdir}/llvm-${pkgver}.src" + patch -p1 -i ${srcdir}/0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch + patch -p1 -i ${srcdir}/0002-use-DESTDIR-on-windows.patch + patch -p1 -i ${srcdir}/0003-generate-proper-library-names-mingw.patch - cd "$srcdir/cfe-$pkgver.src" - patch -p1 -i ${srcdir}/clang-fabs.patch - patch -p1 -i ${srcdir}/clang-win64-seh.patch - patch -p1 -i ${srcdir}/clang-mingw-driver.patch - patch -p1 -i ${srcdir}/clang-3.6-allow-dll-attributes0.patch - patch -p1 -i ${srcdir}/clang-3.6-allow-dll-attributes1.patch - patch -p1 -i ${srcdir}/clang-3.6-allow-dll-attributes2.patch + cd "${srcdir}/cfe-${pkgver}.src" + patch -p1 -i ${srcdir}/0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch + patch -p1 -i ${srcdir}/0013-mingw-w64-dont-have-dl-library.patch + patch -p1 -i ${srcdir}/0014-use-DESTDIR-on-windows.patch + patch -p1 -i ${srcdir}/0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch + patch -p1 -i ${srcdir}/0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch + patch -p1 -i ${srcdir}/0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch + patch -p1 -i ${srcdir}/0018-mingw-enable-static-libclang.patch - mv "$srcdir/llvm-$pkgver.src" "$srcdir/llvm-$pkgver" - cd "$srcdir/llvm-$pkgver" + cd "${srcdir}/lld-${pkgver}.src" + # patch -p1 -i "${srcdir}"/0031-COFF-add-the-mingw-alias-for-ImageBase.patch + patch -p1 -i "${srcdir}"/0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch + patch -p1 -i "${srcdir}"/0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch + patch -p1 -i "${srcdir}"/0034-GNU-add-support-for-linking-PECOFF.patch + + cd "${srcdir}/libcxx-${pkgver}.src" + patch -p1 -i "${srcdir}"/0041-libcxx-add-support-for-mingw-w64.patch + + cd "${srcdir}/llvm-${pkgver}.src" # Fix docs installation directory sed -i 's:$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \ Makefile.config.in - + # Fix definition of LLVM_CMAKE_DIR in LLVMConfig.cmake sed -i '/@LLVM_CONFIG_CMAKE_DIR@/s:$(PROJ_cmake):$(PROJ_prefix)/share/llvm/cmake:' \ cmake/modules/Makefile + cd "${srcdir}"/llvm-${pkgver}.src # At the present, clang must reside inside the LLVM source code tree to build # See http://llvm.org/bugs/show_bug.cgi?id=4840 - [ -d tools/clang ] && rm -rf tools/clang - mv "$srcdir/cfe-$pkgver.src" tools/clang - - [ -d projects/compiler-rt ] && rm -rf projects/compiler-rt - mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt - - # [ -d projects/test-suite ] && rm -rf projects/test-suite - # mv "$srcdir/test-suite-$pkgver.src" projects/test-suite - - [ -d tools/clang/tools/extra ] && rm -rf tools/clang/tools/extra - mv "$srcdir/clang-tools-extra-$pkgver.src" tools/clang/tools/extra - - #[ -d tools/lldb ] && rm -rf tools/lldb - #mv "$srcdir/lldb-$pkgver.src" tools/lldb - #sed -i -e "s|python-config|python2-config|" tools/lldb/lib/Makefile - #sed -i -e "s|python-config|python2-config|" tools/lldb/Makefile - #sed -i -e "s|/usr/bin/env python|&2|" tools/lldb/scripts/Python/build-swig-Python.sh - #sed -i -e "s|/usr/bin/env python|&2|" tools/lldb/scripts/Python/finish-swig-Python-LLDB.sh - - #[ -d projects/libcxx-$pkgver ] && rm -rf projects/libcxx - #mv "$srcdir/libcxx-$pkgver.src" projects/libcxx + mv "${srcdir}/cfe-${pkgver}.src" tools/clang + mv "${srcdir}/clang-tools-extra-${pkgver}.src" tools/clang/tools/extra + mv "${srcdir}/lld-${pkgver}.src" tools/lld + mv "${srcdir}/lldb-${pkgver}.src" tools/lldb + mv "${srcdir}/compiler-rt-${pkgver}.src" projects/compiler-rt + mv "${srcdir}/libcxxabi-${pkgver}.src" projects/libcxxabi + mv "${srcdir}/libcxx-${pkgver}.src" projects/libcxx +# mv "${srcdir}/testsuite-${pkgver}.src" projects/test-suite } build() { - cd "$srcdir" - mkdir -p build-${MINGW_CHOST} - cd build-${MINGW_CHOST} - echo 'ac_cv_have_decl_strerror_s=${ac_cv_have_decl_strerror_s=no}' > config.cache + cd "${srcdir}" + + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir build-${CARCH} && cd build-${CARCH} + + local -a extra_config + + if check_option "debug" "y"; then + extra_config+=(-DCMAKE_BUILD_TYPE=Debug) + VERBOSE="VERBOSE=1" + else + extra_config+=(-DCMAKE_BUILD_TYPE=Release) + fi # Include location of libffi headers in CPPFLAGS - CPPFLAGS+=" $(pkg-config --cflags libffi)" + FFI_INCLUDE_DIR="$(pkg-config --cflags libffi)" + FFI_INCLUDE_DIR=$(echo $FFI_INCLUDE_DIR | sed 's|-I||g') - ../llvm-$pkgver/configure \ - -C \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --with-sysroot=${MINGW_PREFIX} \ - --enable-targets=x86,x86_64,arm,mips \ - --enable-optimized \ - --disable-assertions \ - --disable-pthreads \ - --with-python=/usr/bin/python2 \ - --enable-libffi \ - --enable-docs + # "Ninja" cant install each component seperately + # https://github.com/martine/ninja/issues/932 - make - make -C ../llvm-$pkgver/docs -f Makefile.sphinx man - make -C ../llvm-$pkgver/docs -f Makefile.sphinx html - make -C ../llvm-$pkgver/tools/clang/docs -f Makefile.sphinx html - setup + PATH=${MINGW_PREFIX}/bin:/usr/bin \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib \ + -DCMAKE_MAKE_PROGRAM="/usr/bin/make.exe" \ + -DCMAKE_C_COMPILER="${MINGW_PREFIX}/bin/gcc.exe" \ + -DCMAKE_CXX_COMPILER="${MINGW_PREFIX}/bin/g++.exe" \ + -DFFI_INCLUDE_DIR="${FFI_INCLUDE_DIR}" \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS}" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DLLVM_TARGETS_TO_BUILD="ARM;CppBackend;X86" \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_THREADS=1 \ + -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python2.exe \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_SPHINX=ON \ + -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE -D_LIBCPP_HAS_NO_CONSTEXPR" \ + -DLIBCLANG_BUILD_STATIC=ON \ + -DLIBCXX_ENABLE_SHARED=OFF \ + -DLIBCXXABI_ENABLE_SHARED=OFF \ + "${extra_config[@]}" \ + ../llvm-${pkgver}.src + + make ${VERBOSE} + + # Disable automatic installation of components that go into subpackages + # -i.orig to check what has been removed in-case it starts dropping more than it should + # + sed -i.orig '/\(clang\|lld\|lldb\)\/cmake_install.cmake/d' tools/cmake_install.cmake + sed -i.orig '/\(extra\|scan-build\|scan-view\)\/cmake_install.cmake/d' tools/clang/tools/cmake_install.cmake + sed -i.orig '/\(compiler-rt\|libcxxabi\|libcxx\)\/cmake_install.cmake/d' projects/cmake_install.cmake } -check() { - plain "skipping make check..." - #cd "$srcdir/build-${MINGW_CHOST}" - #make check -} +#check() { +# cd "${srcdir}"/build-${CARCH} +# # Remove || true once testcase doesn't cause failures. +# make check || true +#} -setup() { - local destdir=${srcdir}/dest - [[ -d $destdir ]] && rm -rf ${destdir} - mkdir -p ${destdir} - - # CLANG-TOOLS-EXTRA - cd "$srcdir/build-${MINGW_CHOST}/tools/clang/tools/extra" - make DESTDIR="$destdir/clang-tools-extra" install - # Fix permissions of static libs - chmod -x $destdir/clang-tools-extra${MINGW_PREFIX}/lib/*.a - install -Dm644 ${srcdir}/llvm-$pkgver/tools/clang/tools/extra/LICENSE.TXT "$destdir/clang-tools-extra${MINGW_PREFIX}/share/licenses/clang-tools-extra/LICENSE" - cd ${srcdir} - mv ${srcdir}/build-${MINGW_CHOST}/tools/clang/tools/extra ${srcdir}/clang-tools-extra-${MINGW_CHOST} - mv ${srcdir}/llvm-$pkgver/tools/clang/tools/extra ${srcdir}/clang-tools-extra-${pkgver} - - # CLANG - cd "$srcdir/build-${MINGW_CHOST}/tools/clang" - make -j1 DESTDIR="$destdir/clang" install - # Fix mis-named clang doc folder (is llvm, should be clang) - mv ${destdir}/clang${MINGW_PREFIX}/share/doc/llvm ${destdir}/clang${MINGW_PREFIX}/share/doc/clang - - # Install html docs - install -d "${destdir}"/clang${MINGW_PREFIX}/share/doc/clang/html - cp -rf $srcdir/llvm-$pkgver/tools/clang/docs/_build/html/* "${destdir}"/clang${MINGW_PREFIX}/share/doc/clang/html/ - rm -r "${destdir}"/clang${MINGW_PREFIX}/share/doc/clang/html/_sources - - # CLANG-ANAYLYSER - install -d ${destdir}/clang-analyzer${MINGW_PREFIX}/{bin,lib/clang-analyzer} - for _tool in scan-{build,view}; do - cp -r $srcdir/llvm-$pkgver/tools/clang/tools/$_tool ${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer/ - ln -s ${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer/$_tool/$_tool ${destdir}/clang-analyzer${MINGW_PREFIX}/bin/ - done - - # scan-build looks for clang within the same directory - install -d ${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ - ln -s ${destdir}/clang${MINGW_PREFIX}/bin/clang.exe ${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ - - # Relocate man page - install -d ${destdir}/clang-analyzer${MINGW_PREFIX}/share/man/man1 - mv ${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer/scan-build/scan-build.1 \ - ${destdir}/clang-analyzer${MINGW_PREFIX}/share/man/man1/ - - # Compile Python scripts - python2 -m compileall "${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer" - python2 -O -m compileall "${destdir}/clang-analyzer${MINGW_PREFIX}/lib/clang-analyzer" - install -Dm644 $srcdir/llvm-$pkgver/tools/clang/LICENSE.TXT "${destdir}/clang-analyzer${MINGW_PREFIX}/share/licenses/clang-analyzer/LICENSE" - - # LLVM - cd ${srcdir} - # Move clang out of the way *before* installing llvm, both src and build. We'll put build back afterwards to allow re-packaging. - # but the src move is undoing what prepare() did. - mv "$srcdir/build-${MINGW_CHOST}/tools/clang" "$srcdir/clang-${MINGW_CHOST}" - mv "$srcdir/llvm-$pkgver/tools/clang" "$srcdir/clang-$pkgver" # Put src back where it was (clang) - cd "$srcdir/build-${MINGW_CHOST}" - make -j1 DESTDIR="$destdir/llvm" install - - # Install man pages - install -d "${destdir}"/llvm${MINGW_PREFIX}/share/man/man1 - cp $srcdir/llvm-$pkgver/docs/_build/man/*.1 "${destdir}"/llvm${MINGW_PREFIX}/share/man/man1/ - - # Install html docs - install -d "${destdir}"/llvm${MINGW_PREFIX}/share/doc/llvm/html - cp -rf $srcdir/llvm-$pkgver/docs/_build/html/* "${destdir}"/llvm${MINGW_PREFIX}/share/doc/llvm/html/ - rm -r "${destdir}"/llvm${MINGW_PREFIX}/share/doc/llvm/html/_sources - - # Install CMake stuff - install -d "${destdir}"/llvm${MINGW_PREFIX}/share/llvm/cmake/{modules,platforms} - install -Dm644 $srcdir/llvm-$pkgver/cmake/modules/*.cmake "${destdir}"/llvm${MINGW_PREFIX}/share/llvm/cmake/modules/ - install -Dm644 $srcdir/llvm-$pkgver/cmake/platforms/*.cmake "${destdir}"/llvm${MINGW_PREFIX}/share/llvm/cmake/platforms/ - - # Move all back - mv "${srcdir}/clang-${MINGW_CHOST}" "${srcdir}/build-${MINGW_CHOST}/tools/clang" - mv "${srcdir}/clang-$pkgver" "${srcdir}/llvm-$pkgver/tools/clang" - mv "${srcdir}/clang-tools-extra-${MINGW_CHOST}" "${srcdir}/build-${MINGW_CHOST}/tools/clang/tools/extra" - mv "${srcdir}/clang-tools-extra-${pkgver}" "${srcdir}/llvm-$pkgver/tools/clang/tools/extra" - - # Undo more prepare() moves. - #mv "${srcdir}/llvm-$pkgver/projects/compiler-rt" "${srcdir}/compiler-rt-$pkgver.src" # Put src back where it was (the rest) - #mv "${srcdir}/llvm-$pkgver/projects/test-suite" "${srcdir}/test-suite-$pkgver.src" - #mv "${srcdir}/llvm-$pkgver/projects/libcxx" "${srcdir}/libcxx-$pkgver.src" - #mv "${srcdir}/llvm-$pkgver/tools/clang/tools/extra" "${srcdir}/clang-tools-extra-${pkgver}.src" - #mv "${srcdir}/llvm-$pkgver/tools/clang" "${srcdir}/clang-$pkgver.src" -} - -package_clang(){ - pkgdesc="C language family frontend for LLVM" - depends=("${MINGW_PACKAGE_PREFIX}-llvm=${pkgver}-${pkgrel}") - - mv $srcdir/dest/clang/* $pkgdir -} - -# package_compiler-rt(){ -# cd ${srcdir}/compiler-rt -# } - -package_llvm(){ - pkgdesc="Low Level Virtual Machine" - depends=("${MINGW_PACKAGE_PREFIX}-gcc") # "${MINGW_PACKAGE_PREFIX}-compiler-rt" +package_llvm() { + pkgdesc="Low Level Virtual Machine (mingw-w64)" + #depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") # "compiler-rt" install=llvm-${CARCH}.install - mv $srcdir/dest/llvm/* $pkgdir + cd "${srcdir}"/llvm-${pkgver}.src + + make -C ../build-${CARCH} DESTDIR="${pkgdir}" install + + install -Dm644 LICENSE.TXT "${pkgdir}${MINGW_PREFIX}/share/licenses/llvm/LICENSE" + + # Install CMake stuff + install -d "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/{modules,platforms} + install -Dm644 "${srcdir}"/llvm/cmake/modules/*.cmake "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/modules/ + install -Dm644 "${srcdir}"/llvm/cmake/platforms/*.cmake "${pkgdir}"${MINGW_PREFIX}/share/llvm/cmake/platforms/ + + # FileCheck is needed to build rust. + install -Dm755 "${srcdir}"/build-${CARCH}/bin/FileCheck.exe "${pkgdir}${MINGW_PREFIX}/bin/FileCheck.exe" +} + +package_compiler-rt() { + pkgdesc="Runtime libraries for Clang and LLVM (mingw-w64)" + url="http://compiler-rt.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-llvm=${pkgver}-${pkgrel}") + + cd "${srcdir}"/llvm-${pkgver}.src + make -C ../build-${CARCH}/projects/compiler-rt DESTDIR="${pkgdir}" install + } + +package_libcxxabi() { + pkgdesc="C++ Standard Library Support (mingw-w64)" + url="http://libcxxabi.llvm.org/" + + cd "${srcdir}/llvm-${pkgver}.src" + make -C ../build-${CARCH}/projects/libcxxabi -j1 DESTDIR="${pkgdir}" install +} + +package_libcxx() { + pkgdesc="C++ Standard Library (mingw-w64)" + url="http://libcxx.llvm.org/" + + cd "${srcdir}/llvm-${pkgver}.src" + make -C ../build-${CARCH}/projects/libcxx -j1 DESTDIR="${pkgdir}" install +} + +package_lldb() { + pkgdesc="Next generation, high-performance debugger (mingw-w64)" + url="http://lldb.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-readline" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-python2") + + cd "${srcdir}/llvm-${pkgver}.src" + + make -C ../build-${CARCH}/tools/lldb DESTDIR="${pkgdir}" install + + # Compile Python scripts + python2 -m compileall "${pkgdir}${MINGW_PREFIX}/lib/python2.7/site-packages/lldb" + python2 -O -m compileall "${pkgdir}${MINGW_PREFIX}/lib/python2.7/site-packages/lldb" + + install -Dm644 tools/lldb/LICENSE.TXT "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE" +} + +package_lld() { + pkgdesc="Linker tools for LLVM (mingw-w64)" + url="http://lld.llvm.org/" + + cd "${srcdir}/llvm-${pkgver}.src" + make -C ../build-${CARCH}/tools/lld -j1 DESTDIR="${pkgdir}" install +} + +package_clang() { + pkgdesc="C language family frontend for LLVM (mingw-w64)" + url="http://clang.llvm.org/" + depends=("${MINGW_PACKAGE_PREFIX}-llvm=${pkgver}-${pkgrel}") + + cd "${srcdir}/llvm-${pkgver}.src" + make -C ../build-${CARCH}/tools/clang DESTDIR="${pkgdir}" install + + # Install static clang library .. + cp ../build-${CARCH}/lib/libclang.a ${pkgdir}${MINGW_PREFIX}/lib/ } package_clang-analyzer() { - pkgdesc="A source code analysis framework" + pkgdesc="A source code analysis framework (mingw-w64)" url="http://clang-analyzer.llvm.org/" - depends=("${MINGW_PACKAGE_PREFIX}-clang=${pkgver}-${pkgrel}" "${MINGW_PACKAGE_PREFIX}-python2") + depends=("${MINGW_PACKAGE_PREFIX}-clang=${pkgver}-${pkgrel}" + "${MINGW_PACKAGE_PREFIX}-python2") - mv $srcdir/dest/clang-analyzer/* $pkgdir + cd "${srcdir}/llvm-${pkgver}.src" + make -C ../build-${CARCH}/tools/clang/tools/scan-build -j1 DESTDIR="${pkgdir}" install + make -C ../build-${CARCH}/tools/clang/tools/scan-view -j1 DESTDIR="${pkgdir}" install + + # Use Python 2 + sed -i \ + -e 's|env python$|&2|' \ + -e 's|/usr/bin/python$|&2|' \ + "${pkgdir}"${MINGW_PREFIX}/bin/scan-view + + # Compile Python scripts + python2 -m compileall "${pkgdir}"${MINGW_PREFIX}/bin/clang-analyzer + python2 -O -m compileall "${pkgdir}"${MINGW_PREFIX}/lib/clang-analyzer + install -Dm644 LICENSE.TXT "${pkgdir}"${MINGW_PREFIX}/share/licenses/clang-analyzer/LICENSE } package_clang-tools-extra() { - pkgdesc="Extra tools built using Clang's tooling APIs" + pkgdesc="Extra tools built using Clang's tooling APIs (mingw-w64)" url="http://clang.llvm.org/" - depends=("${MINGW_PACKAGE_PREFIX}-clang=${pkgver}-${pkgrel}") - - mv $srcdir/dest/clang-tools-extra/* $pkgdir + + cd "${srcdir}/llvm-${pkgver}.src" + make -C ../build-${CARCH}/tools/clang/tools/extra -j1 DESTDIR="${pkgdir}" install } +# Wrappers package_mingw-w64-i686-clang(){ package_clang } @@ -276,9 +347,25 @@ package_mingw-w64-i686-clang-tools-extra(){ package_clang-tools-extra } -# package_mingw-w64-i686-compiler-rt(){ -# package_compiler-rt -# } +package_mingw-w64-i686-compiler-rt(){ + package_compiler-rt +} + +package_mingw-w64-i686-libc++abi(){ + package_libcxxabi +} + +package_mingw-w64-i686-libc++(){ + package_libcxx +} + +package_mingw-w64-i686-lld(){ + package_lld +} + +package_mingw-w64-i686-lldb(){ + package_lldb +} package_mingw-w64-i686-llvm(){ package_llvm @@ -296,10 +383,28 @@ package_mingw-w64-x86_64-clang-tools-extra(){ package_clang-tools-extra } -# package_mingw-w64-x86_64-compiler-rt(){ -# package_compiler-rt -# } +package_mingw-w64-x86_64-compiler-rt(){ + package_compiler-rt +} + +package_mingw-w64-x86_64-libc++abi(){ + package_libcxxabi +} + +package_mingw-w64-x86_64-libc++(){ + package_libcxx +} + +package_mingw-w64-x86_64-lld(){ + package_lld +} + +package_mingw-w64-x86_64-lldb(){ + package_lldb +} package_mingw-w64-x86_64-llvm(){ package_llvm } + +# vim:set ts=2 sw=2 et: diff --git a/mingw-w64-clang/clang-3.6-allow-dll-attributes0.patch b/mingw-w64-clang/clang-3.6-allow-dll-attributes0.patch deleted file mode 100644 index d2167e171c..0000000000 --- a/mingw-w64-clang/clang-3.6-allow-dll-attributes0.patch +++ /dev/null @@ -1,79 +0,0 @@ -From b567f63bf385a77f20f3118e9eb28734ba9f7cdd Mon Sep 17 00:00:00 2001 -From: Hans Wennborg -Date: Thu, 31 Jul 2014 19:29:39 +0000 -Subject: [PATCH] Local extern redeclarations of dllimport variables stay - dllimport even if they don't specify the attribute - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214425 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/Sema/SemaDecl.cpp | 5 +++-- - test/CodeGen/dllimport.c | 8 ++++++++ - test/Sema/dllimport.c | 4 ++++ - 3 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp -index 4abbbeb..d24cf6a 100644 ---- a/lib/Sema/SemaDecl.cpp -+++ b/lib/Sema/SemaDecl.cpp -@@ -5047,7 +5047,7 @@ static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, - } - - // A redeclaration is not allowed to drop a dllimport attribute, the only -- // exception being inline function definitions. -+ // exceptions being inline function definitions and local extern declarations. - // NB: MSVC converts such a declaration to dllexport. - bool IsInline = false, IsStaticDataMember = false; - if (const auto *VD = dyn_cast(NewDecl)) -@@ -5057,7 +5057,8 @@ static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, - else if (const auto *FD = dyn_cast(NewDecl)) - IsInline = FD->isInlined(); - -- if (OldImportAttr && !HasNewAttr && !IsInline && !IsStaticDataMember) { -+ if (OldImportAttr && !HasNewAttr && !IsInline && !IsStaticDataMember && -+ !NewDecl->isLocalExternDecl()) { - S.Diag(NewDecl->getLocation(), - diag::warn_redeclaration_without_attribute_prev_attribute_ignored) - << NewDecl << OldImportAttr; -diff --git a/test/CodeGen/dllimport.c b/test/CodeGen/dllimport.c -index 32ee81f..6ed60ea 100644 ---- a/test/CodeGen/dllimport.c -+++ b/test/CodeGen/dllimport.c -@@ -44,6 +44,14 @@ __declspec(dllimport) extern int GlobalRedecl3; - extern int GlobalRedecl3; // dllimport ignored - USEVAR(GlobalRedecl3) - -+// Redeclaration in local context. -+// CHECK: @GlobalRedecl4 = external dllimport global i32 -+__declspec(dllimport) int GlobalRedecl4; -+int functionScope() { -+ extern int GlobalRedecl4; // still dllimport -+ return GlobalRedecl4; -+} -+ - - - //===----------------------------------------------------------------------===// -diff --git a/test/Sema/dllimport.c b/test/Sema/dllimport.c -index 2702453..30ea4f3 100644 ---- a/test/Sema/dllimport.c -+++ b/test/Sema/dllimport.c -@@ -74,6 +74,7 @@ __declspec(dllimport) static int StaticGlobal; // expected-error{{'StaticGlobal' - __declspec(dllimport) float LocalRedecl1; // expected-note{{previous definition is here}} - __declspec(dllimport) float LocalRedecl2; // expected-note{{previous definition is here}} - __declspec(dllimport) float LocalRedecl3; // expected-note{{previous definition is here}} -+__declspec(dllimport) float LocalRedecl4; - void functionScope() { - __declspec(dllimport) int LocalRedecl1; // expected-error{{redefinition of 'LocalRedecl1' with a different type: 'int' vs 'float'}} - int *__attribute__((dllimport)) LocalRedecl2; // expected-error{{redefinition of 'LocalRedecl2' with a different type: 'int *' vs 'float'}} -@@ -84,6 +85,9 @@ void functionScope() { - __declspec(dllimport) extern int ExternLocalVarDecl; - __declspec(dllimport) extern int ExternLocalVarDef = 1; // expected-error{{definition of dllimport data}} - __declspec(dllimport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllimport'}} -+ -+ // Local extern redeclaration does not drop the attribute. -+ extern float LocalRedecl4; - } - - --- -2.0.3 \ No newline at end of file diff --git a/mingw-w64-clang/clang-3.6-allow-dll-attributes1.patch b/mingw-w64-clang/clang-3.6-allow-dll-attributes1.patch deleted file mode 100644 index ee3a80afa9..0000000000 --- a/mingw-w64-clang/clang-3.6-allow-dll-attributes1.patch +++ /dev/null @@ -1,245 +0,0 @@ -From eaf4ee9a6f888acbe933ab41d32bfa4bd2f1feb0 Mon Sep 17 00:00:00 2001 -From: Hans Wennborg -Date: Wed, 27 Aug 2014 21:27:40 +0000 -Subject: [PATCH] Allow adding dll attributes on certain redecls with a warning - if the decl hasn't been used yet (PR20746) - -This shouldn't really be allowed, but it comes up in real code (see PR). As -long as the decl hasn't been used there's no technical difficulty in supporting -it, so downgrade the error to a warning. - -Differential Revision: http://reviews.llvm.org/D5087 - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216619 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - include/clang/Basic/DiagnosticSemaKinds.td | 3 +++ - lib/Sema/SemaDecl.cpp | 29 +++++++++++++++++++++++------ - test/Sema/dllexport.c | 12 ++++++++++++ - test/Sema/dllimport.c | 21 +++++++++++++++++---- - test/SemaCXX/dllexport.cpp | 10 +++++----- - test/SemaCXX/dllimport.cpp | 10 +++++----- - 6 files changed, 65 insertions(+), 20 deletions(-) - -diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td -index 077345f..6f96e3a 100644 ---- a/include/clang/Basic/DiagnosticSemaKinds.td -+++ b/include/clang/Basic/DiagnosticSemaKinds.td -@@ -2133,6 +2133,9 @@ def warn_attribute_invalid_on_definition : Warning< - InGroup; - def err_attribute_dll_redeclaration : Error< - "redeclaration of %q0 cannot add %q1 attribute">; -+def warn_attribute_dll_redeclaration : Warning< -+ "redeclaration of %q0 should not add %q1 attribute">, -+ InGroup>; - def err_attribute_dllimport_function_definition : Error< - "dllimport cannot be applied to non-inline function definition">; - def err_attribute_dll_deleted : Error< -diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp -index e5cf31a..2d2f973 100644 ---- a/lib/Sema/SemaDecl.cpp -+++ b/lib/Sema/SemaDecl.cpp -@@ -5075,7 +5075,7 @@ static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, - NewDecl = NewTD->getTemplatedDecl(); - - if (!OldDecl || !NewDecl) -- return; -+ return; - - const DLLImportAttr *OldImportAttr = OldDecl->getAttr(); - const DLLExportAttr *OldExportAttr = OldDecl->getAttr(); -@@ -5092,13 +5092,30 @@ static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, - // Implicitly generated declarations are also excluded for now because there - // is no other way to switch these to use dllimport or dllexport. - bool AddsAttr = !(OldImportAttr || OldExportAttr) && HasNewAttr; -+ - if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { -- S.Diag(NewDecl->getLocation(), diag::err_attribute_dll_redeclaration) -- << NewDecl -- << (NewImportAttr ? (const Attr *)NewImportAttr : NewExportAttr); -+ // If the declaration hasn't been used yet, allow with a warning for -+ // free functions and global variables. -+ bool JustWarn = false; -+ if (!OldDecl->isUsed() && OldDecl->getDeclContext()->isFileContext()) { -+ auto *VD = dyn_cast(OldDecl); -+ if (VD && !VD->getDescribedVarTemplate()) -+ JustWarn = true; -+ auto *FD = dyn_cast(OldDecl); -+ if (FD && FD->getTemplatedKind() == FunctionDecl::TK_NonTemplate) -+ JustWarn = true; -+ } -+ -+ unsigned DiagID = JustWarn ? diag::warn_attribute_dll_redeclaration -+ : diag::err_attribute_dll_redeclaration; -+ S.Diag(NewDecl->getLocation(), DiagID) -+ << NewDecl -+ << (NewImportAttr ? (const Attr *)NewImportAttr : NewExportAttr); - S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); -- NewDecl->setInvalidDecl(); -- return; -+ if (!JustWarn) { -+ NewDecl->setInvalidDecl(); -+ return; -+ } - } - - // A redeclaration is not allowed to drop a dllimport attribute, the only -diff --git a/test/Sema/dllexport.c b/test/Sema/dllexport.c -index c6d04dc..6c71ad8 100644 ---- a/test/Sema/dllexport.c -+++ b/test/Sema/dllexport.c -@@ -39,8 +39,13 @@ __declspec(dllexport) extern int GlobalRedecl2; - int GlobalRedecl2; - - extern int GlobalRedecl3; // expected-note{{previous declaration is here}} -+int useGlobalRedecl3() { return GlobalRedecl3; } - __declspec(dllexport) extern int GlobalRedecl3; // expected-error{{redeclaration of 'GlobalRedecl3' cannot add 'dllexport' attribute}} - -+ extern int GlobalRedecl4; // expected-note{{previous declaration is here}} -+__declspec(dllexport) extern int GlobalRedecl4; // expected-warning{{redeclaration of 'GlobalRedecl4' should not add 'dllexport' attribute}} -+ -+ - // External linkage is required. - __declspec(dllexport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllexport'}} - -@@ -86,11 +91,18 @@ __declspec(dllexport) void redecl3(); - void redecl3() {} - - void redecl4(); // expected-note{{previous declaration is here}} -+void useRedecl4() { redecl4(); } - __declspec(dllexport) void redecl4(); // expected-error{{redeclaration of 'redecl4' cannot add 'dllexport' attribute}} - - void redecl5(); // expected-note{{previous declaration is here}} -+void useRedecl5() { redecl5(); } - __declspec(dllexport) inline void redecl5() {} // expected-error{{redeclaration of 'redecl5' cannot add 'dllexport' attribute}} - -+// Allow with a warning if the decl hasn't been used yet. -+ void redecl6(); // expected-note{{previous declaration is here}} -+__declspec(dllexport) void redecl6(); // expected-warning{{redeclaration of 'redecl6' should not add 'dllexport' attribute}} -+ -+ - // External linkage is required. - __declspec(dllexport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllexport'}} - -diff --git a/test/Sema/dllimport.c b/test/Sema/dllimport.c -index 30ea4f3..d64c859 100644 ---- a/test/Sema/dllimport.c -+++ b/test/Sema/dllimport.c -@@ -64,9 +64,16 @@ int GlobalRedecl2c __attribute__((dllimport)); - __declspec(dllimport) extern int GlobalRedecl3; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}} - extern int GlobalRedecl3; // expected-warning{{'GlobalRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} - -+// Adding an attribute on redeclaration. - extern int GlobalRedecl4; // expected-note{{previous declaration is here}} -+int useGlobalRedecl4() { return GlobalRedecl4; } - __declspec(dllimport) extern int GlobalRedecl4; // expected-error{{redeclaration of 'GlobalRedecl4' cannot add 'dllimport' attribute}} - -+// Allow with a warning if the decl hasn't been used yet. -+ extern int GlobalRedecl5; // expected-note{{previous declaration is here}} -+__declspec(dllimport) extern int GlobalRedecl5; // expected-warning{{redeclaration of 'GlobalRedecl5' should not add 'dllimport' attribute}} -+ -+ - // External linkage is required. - __declspec(dllimport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllimport'}} - -@@ -128,14 +135,20 @@ __declspec(dllimport) void redecl3(); // expected-note{{previous declaration is - void redecl3() {} // expected-warning{{'redecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} - - void redecl4(); // expected-note{{previous declaration is here}} -+void useRedecl4() { redecl4(); } - __declspec(dllimport) void redecl4(); // expected-error{{redeclaration of 'redecl4' cannot add 'dllimport' attribute}} - -+// Allow with a warning if the decl hasn't been used yet. -+ void redecl5(); // expected-note{{previous declaration is here}} -+__declspec(dllimport) void redecl5(); // expected-warning{{redeclaration of 'redecl5' should not add 'dllimport' attribute}} -+ -+ - // Inline redeclarations are fine. --__declspec(dllimport) void redecl5(); -- inline void redecl5() {} -+__declspec(dllimport) void redecl6(); -+ inline void redecl6() {} - -- void redecl6(); // expected-note{{previous declaration is here}} --__declspec(dllimport) inline void redecl6() {} // expected-error{{redeclaration of 'redecl6' cannot add 'dllimport' attribute}} -+ void redecl7(); // expected-note{{previous declaration is here}} -+__declspec(dllimport) inline void redecl7() {} // expected-warning{{redeclaration of 'redecl7' should not add 'dllimport' attribute}} - - // External linkage is required. - __declspec(dllimport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllimport'}} -diff --git a/test/SemaCXX/dllexport.cpp b/test/SemaCXX/dllexport.cpp -index 8219c47..df87c73 100644 ---- a/test/SemaCXX/dllexport.cpp -+++ b/test/SemaCXX/dllexport.cpp -@@ -53,7 +53,7 @@ __declspec(dllexport) extern int GlobalRedecl2; - int GlobalRedecl2; - - extern int GlobalRedecl3; // expected-note{{previous declaration is here}} --__declspec(dllexport) extern int GlobalRedecl3; // expected-error{{redeclaration of 'GlobalRedecl3' cannot add 'dllexport' attribute}} -+__declspec(dllexport) extern int GlobalRedecl3; // expected-warning{{redeclaration of 'GlobalRedecl3' should not add 'dllexport' attribute}} - - // External linkage is required. - __declspec(dllexport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllexport'}} -@@ -186,10 +186,10 @@ __declspec(dllexport) void redecl2(); - void redecl2() {} - - void redecl3(); // expected-note{{previous declaration is here}} --__declspec(dllexport) void redecl3(); // expected-error{{redeclaration of 'redecl3' cannot add 'dllexport' attribute}} -+__declspec(dllexport) void redecl3(); // expected-warning{{redeclaration of 'redecl3' should not add 'dllexport' attribute}} - - void redecl4(); // expected-note{{previous declaration is here}} --__declspec(dllexport) inline void redecl4() {} // expected-error{{redeclaration of 'redecl4' cannot add 'dllexport' attribute}} -+__declspec(dllexport) inline void redecl4() {} // expected-warning{{redeclaration of 'redecl4' should not add 'dllexport' attribute}} - - // Friend functions - struct FuncFriend { -@@ -200,8 +200,8 @@ struct FuncFriend { - }; - __declspec(dllexport) void friend1() {} - void friend2() {} --__declspec(dllexport) void friend3() {} // expected-error{{redeclaration of 'friend3' cannot add 'dllexport' attribute}} --__declspec(dllexport) inline void friend4() {} // expected-error{{redeclaration of 'friend4' cannot add 'dllexport' attribute}} -+__declspec(dllexport) void friend3() {} // expected-warning{{redeclaration of 'friend3' should not add 'dllexport' attribute}} -+__declspec(dllexport) inline void friend4() {} // expected-warning{{redeclaration of 'friend4' should not add 'dllexport' attribute}} - - // Implicit declarations can be redeclared with dllexport. - __declspec(dllexport) void* operator new(__SIZE_TYPE__ n); -diff --git a/test/SemaCXX/dllimport.cpp b/test/SemaCXX/dllimport.cpp -index 875cf1e..d0e8836 100644 ---- a/test/SemaCXX/dllimport.cpp -+++ b/test/SemaCXX/dllimport.cpp -@@ -75,7 +75,7 @@ __declspec(dllimport) extern int GlobalRedecl3; // expected-note{{previous decla - extern int GlobalRedecl3; // expected-warning{{'GlobalRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} - - extern int GlobalRedecl4; // expected-note{{previous declaration is here}} --__declspec(dllimport) extern int GlobalRedecl4; // expected-error{{redeclaration of 'GlobalRedecl4' cannot add 'dllimport' attribute}} -+__declspec(dllimport) extern int GlobalRedecl4; // expected-warning{{redeclaration of 'GlobalRedecl4' should not add 'dllimport' attribute}} - - // External linkage is required. - __declspec(dllimport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllimport'}} -@@ -224,10 +224,10 @@ __declspec(dllimport) void redecl3(); // expected-note{{previous declaration is - void redecl3() {} // expected-warning{{'redecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} - - void redecl4(); // expected-note{{previous declaration is here}} --__declspec(dllimport) void redecl4(); // expected-error{{redeclaration of 'redecl4' cannot add 'dllimport' attribute}} -+__declspec(dllimport) void redecl4(); // expected-warning{{redeclaration of 'redecl4' should not add 'dllimport' attribute}} - - void redecl5(); // expected-note{{previous declaration is here}} --__declspec(dllimport) inline void redecl5() {} // expected-error{{redeclaration of 'redecl5' cannot add 'dllimport' attribute}} -+__declspec(dllimport) inline void redecl5() {} // expected-warning{{redeclaration of 'redecl5' should not add 'dllimport' attribute}} - - // Friend functions - struct FuncFriend { -@@ -240,8 +240,8 @@ struct FuncFriend { - __declspec(dllimport) void friend1(); - void friend2(); // expected-warning{{'friend2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} - void friend3() {} // expected-warning{{'friend3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} --__declspec(dllimport) void friend4(); // expected-error{{redeclaration of 'friend4' cannot add 'dllimport' attribute}} --__declspec(dllimport) inline void friend5() {} // expected-error{{redeclaration of 'friend5' cannot add 'dllimport' attribute}} -+__declspec(dllimport) void friend4(); // expected-warning{{redeclaration of 'friend4' should not add 'dllimport' attribute}} -+__declspec(dllimport) inline void friend5() {} // expected-warning{{redeclaration of 'friend5' should not add 'dllimport' attribute}} - - void __declspec(dllimport) friend6(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}} - void __declspec(dllimport) friend7(); --- -2.0.3 - diff --git a/mingw-w64-clang/clang-3.6-allow-dll-attributes2.patch b/mingw-w64-clang/clang-3.6-allow-dll-attributes2.patch deleted file mode 100644 index 40d8855df5..0000000000 --- a/mingw-w64-clang/clang-3.6-allow-dll-attributes2.patch +++ /dev/null @@ -1,98 +0,0 @@ -From d4a1ae3f5696cc4c3741282569951dce3678d318 Mon Sep 17 00:00:00 2001 -From: Hans Wennborg -Date: Fri, 29 Aug 2014 00:16:06 +0000 -Subject: [PATCH] Better codegen support for DLL attributes being dropped after - the first declaration (PR20792) - -For the following code: - - __declspec(dllimport) int f(int x); - int user(int x) { - return f(x); - } - int f(int x) { return 1; } - -Clang will drop the dllimport attribute in the AST, but CodeGen would have -already put it on the LLVM::Function, and that would never get updated. -(The same thing happens for global variables.) - -This makes Clang check dropped DLL attribute case each time the LLVM object -is referenced. - -This isn't perfect, because we will still get it wrong if the function is -never referenced by codegen after the attribute is dropped, but this handles -the common cases and makes us not fail in the verifier. - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216699 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/CodeGen/CodeGenModule.cpp | 8 ++++++++ - test/CodeGen/dllimport.c | 21 +++++++++++++++++---- - 2 files changed, 25 insertions(+), 4 deletions(-) - -diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp -index 1f0dd73..aaadbd4 100644 ---- a/lib/CodeGen/CodeGenModule.cpp -+++ b/lib/CodeGen/CodeGenModule.cpp -@@ -1449,6 +1449,10 @@ CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName, - Entry->setLinkage(llvm::Function::ExternalLinkage); - } - -+ // Handle dropped DLL attributes. -+ if (D && !D->hasAttr() && !D->hasAttr()) -+ Entry->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); -+ - if (Entry->getType()->getElementType() == Ty) - return Entry; - -@@ -1614,6 +1618,10 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, - Entry->setLinkage(llvm::Function::ExternalLinkage); - } - -+ // Handle dropped DLL attributes. -+ if (D && !D->hasAttr() && !D->hasAttr()) -+ Entry->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); -+ - if (Entry->getType() == Ty) - return Entry; - -diff --git a/test/CodeGen/dllimport.c b/test/CodeGen/dllimport.c -index 6ed60ea..0f592d0 100644 ---- a/test/CodeGen/dllimport.c -+++ b/test/CodeGen/dllimport.c -@@ -44,12 +44,19 @@ __declspec(dllimport) extern int GlobalRedecl3; - extern int GlobalRedecl3; // dllimport ignored - USEVAR(GlobalRedecl3) - -+// Make sure this works even if the decl has been used before it's defined (PR20792). -+// CHECK: @GlobalRedecl4 = common global i32 -+__declspec(dllimport) extern int GlobalRedecl4; -+USEVAR(GlobalRedecl4) -+ int GlobalRedecl4; // dllimport ignored -+ -+ - // Redeclaration in local context. --// CHECK: @GlobalRedecl4 = external dllimport global i32 --__declspec(dllimport) int GlobalRedecl4; -+// CHECK: @GlobalRedecl5 = external dllimport global i32 -+__declspec(dllimport) int GlobalRedecl5; - int functionScope() { -- extern int GlobalRedecl4; // still dllimport -- return GlobalRedecl4; -+ extern int GlobalRedecl5; // still dllimport -+ return GlobalRedecl5; - } - - -@@ -99,3 +106,9 @@ USE(redecl2) - __declspec(dllimport) void redecl3(void); - void redecl3(void) {} // dllimport ignored - USE(redecl3) -+ -+// Make sure this works even if the decl is used before it's defined (PR20792). -+// CHECK-DAG: define void @redecl4() -+__declspec(dllimport) void redecl4(void); -+USE(redecl4) -+ void redecl4(void) {} // dllimport ignored --- -2.0.3 - diff --git a/mingw-w64-clang/clang-fabs.patch b/mingw-w64-clang/clang-fabs.patch deleted file mode 100644 index 241c09146f..0000000000 --- a/mingw-w64-clang/clang-fabs.patch +++ /dev/null @@ -1,32 +0,0 @@ -Original author: Reid Kleckner -Backported to clang 3.5 by: Antal Szabó - -This patch fixes the lowering of __builtin_fabs, __builtin_fabsf and __builtin_fabsl. Based on clang r221206. - -Original log message: - -Lower __builtin_fabs* to @llvm.fabs.* - -mingw64's headers implement fabs by calling __builtin_fabs, so using the -library call results in an infinite loop. If the backend legalizes -@llvm.fabs as a call to fabs later, things should work out, as the crt -provides a definition. - -diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp -index 4f68b34..230a770 100644 ---- a/lib/CodeGen/CGBuiltin.cpp -+++ b/lib/CodeGen/CGBuiltin.cpp -@@ -255,6 +255,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, - - return RValue::get(Result); - } -+ case Builtin::BI__builtin_fabs: -+ case Builtin::BI__builtin_fabsf: -+ case Builtin::BI__builtin_fabsl: { -+ Value *Arg1 = EmitScalarExpr(E->getArg(0)); -+ Value *Result = EmitFAbs(*this, Arg1, E->getArg(0)->getType()); -+ return RValue::get(Result); -+ } - - case Builtin::BI__builtin_conj: - case Builtin::BI__builtin_conjf: diff --git a/mingw-w64-clang/clang-mingw-driver-generic.patch b/mingw-w64-clang/clang-mingw-driver-generic.patch deleted file mode 100644 index ead275466d..0000000000 --- a/mingw-w64-clang/clang-mingw-driver-generic.patch +++ /dev/null @@ -1,574 +0,0 @@ -Author: Martell Malone - -This adds the mingw64 driver to clang even with the new triplets compnerd has created in clang. -Based off of ruben driver patch back from Jan - -diff --git a/lib/Driver/CMakeLists.txt b/lib/Driver/CMakeLists.txt -index e874ab8..71b7ec6 100644 ---- a/lib/Driver/CMakeLists.txt -+++ b/lib/Driver/CMakeLists.txt -@@ -17,6 +17,7 @@ add_clang_library(clangDriver - ToolChain.cpp - ToolChains.cpp - WindowsToolChain.cpp -+ MinGWToolChain.cpp - Tools.cpp - Types.cpp - ) -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index ca3e50f..c49d9fd 100644 ---- a/lib/Driver/Driver.cpp -+++ b/lib/Driver/Driver.cpp -@@ -1967,12 +1970,7 @@ - TC = new toolchains::Generic_GCC(*this, Target, Args); - break; - case llvm::Triple::GNU: -- // FIXME: We need a MinGW toolchain. Use the default Generic_GCC -- // toolchain for now as the default case would below otherwise. -- if (Target.isOSBinFormatELF()) -- TC = new toolchains::Generic_ELF(*this, Target, Args); -- else -- TC = new toolchains::Generic_GCC(*this, Target, Args); -+ TC = new toolchains::MinGW(*this, Target, Args); - break; - case llvm::Triple::MSVC: - case llvm::Triple::UnknownEnvironment: -diff --git a/lib/Driver/MinGWToolChain.cpp b/lib/Driver/MinGWToolChain.cpp -new file mode 100644 -index 0000000..87c0aa2 ---- /dev/null -+++ b/lib/Driver/MinGWToolChain.cpp -@@ -0,0 +1,163 @@ -+//===--- MinGWToolChain.cpp - MinGWToolChain Implementation -----------------------===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+ -+#include "ToolChains.h" -+#include "clang/Basic/CharInfo.h" -+#include "clang/Basic/DiagnosticIDs.h" -+#include "clang/Basic/Version.h" -+#include "clang/Driver/Compilation.h" -+#include "clang/Driver/Driver.h" -+#include "clang/Driver/DriverDiagnostic.h" -+#include "clang/Driver/Options.h" -+#include "llvm/Option/Arg.h" -+#include "llvm/Option/ArgList.h" -+#include "llvm/Support/ErrorHandling.h" -+#include "llvm/Support/FileSystem.h" -+#include "llvm/Support/Path.h" -+ -+using namespace clang::diag; -+using namespace clang::driver; -+using namespace clang::driver::toolchains; -+using namespace clang; -+using namespace llvm::opt; -+ -+MinGW::MinGW(const Driver &D, const llvm::Triple& Triple, -+ const ArgList &Args) -+ : Generic_GCC(D, Triple, Args) { -+ //TODO: libc++ directory -+ -+ // Get GCC version string for library and header directories -+ const std::string GCClibdir = -+#ifdef LLVM_ON_WIN32 -+ getDriver().Dir + "/../lib/gcc/" + getTriple().getArchName().str() + "-w64-mingw32"; -+#else -+ getDriver().SysRoot + "/usr/lib/gcc/" + getTriple().getArchName().str() + "-w64-mingw32"; -+#endif -+ if (llvm::sys::fs::exists(GCClibdir)) { -+ // Find subdirectory, should be the version of MinGW-w64 GCC -+ std::error_code EC; -+ llvm::sys::fs::directory_iterator entry(StringRef(GCClibdir), EC); -+ if (!EC) -+ GCCVersion = llvm::sys::path::filename(entry->path()); -+ // TODO report error: "no MinGW-w64 GCC installation found" -+ } -+ -+#ifdef LLVM_ON_WIN32 -+ // assume sysrooted compiler -+ getFilePaths().push_back(getDriver().Dir + "/../lib"); -+ getFilePaths().push_back(getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/lib"); -+ getFilePaths().push_back(getDriver().Dir + "/../lib/gcc/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/" + GCCVersion); -+ -+#else -+ // assume install prefix /usr -+ getFilePaths().push_back(getDriver().SysRoot + "/usr/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/lib"); -+ getFilePaths().push_back(getDriver().SysRoot + "/usr/lib/gcc/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/" + GCCVersion); -+#endif -+} -+ -+Tool *MinGW::buildLinker() const { -+ return new tools::MinGW::Link(*this); -+} -+ -+bool MinGW::isPICDefault() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::isPICDefaultForced() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::UseSEHExceptions() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdinc)) -+ return; -+ -+ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { -+ SmallString<128> P(getDriver().ResourceDir); -+ llvm::sys::path::append(P, "include"); -+ addSystemInclude(DriverArgs, CC1Args, P.str()); -+ } -+ -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc)) -+ return; -+ -+#ifdef LLVM_ON_WIN32 -+ // Clang runs on Windows, assume sysroot toolchain -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include"); -+ // Add users standard include directory -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include"); -+#else -+ // Clang runs somewhere else, e.g. Linux, assume install prefix /usr -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include"); -+#endif -+} -+ -+void MinGW::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) || -+ DriverArgs.hasArg(options::OPT_nostdincxx)) -+ return; -+ -+ // Check if libc++ has been enabled and provide its include paths if so. -+ if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) { -+ // libc++ is always installed at a fixed path on Linux currently. -+#ifdef LLVM_ON_WIN32 -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/v1"); -+#else -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/include/c++/v1"); -+#endif -+ return; -+ } -+#ifdef LLVM_ON_WIN32 -+ // Assume sysroot toolchain -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion -+ + "/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion -+ + "/backward"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/backward"); -+#else -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion -+ + "/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion + "/backward"); -+#endif -+} -diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h -index d5d0581..556afed 100644 ---- a/lib/Driver/ToolChains.h -+++ b/lib/Driver/ToolChains.h -@@ -740,6 +740,29 @@ protected: - Tool *buildAssembler() const override; - }; - -+class LLVM_LIBRARY_VISIBILITY MinGW : public Generic_GCC { -+public: -+ MinGW(const Driver &D, const llvm::Triple &Triple, -+ const llvm::opt::ArgList &Args); -+ -+ bool isPICDefault() const override; -+ bool isPICDefaultForced() const override; -+ bool UseSEHExceptions() const override; -+ -+ void -+ AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, -+ llvm::opt::ArgStringList &CC1Args) const override; -+ void -+ AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, -+ llvm::opt::ArgStringList &CC1Args) const override; -+ -+protected: -+ Tool *buildLinker() const override; -+ -+private: -+ std::string GCCVersion; -+}; -+ - - class LLVM_LIBRARY_VISIBILITY XCore : public ToolChain { - public: -diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp -index 892810e..a670502 100644 ---- a/lib/Driver/Tools.cpp -+++ b/lib/Driver/Tools.cpp -@@ -7089,6 +7089,177 @@ Command *visualstudio::Compile::GetCommand(Compilation &C, const JobAction &JA, - return new Command(JA, *this, Args.MakeArgString(Exec), CmdArgs); - } - -+/// MinGW Tools -+void MinGW::Link::AddLibGCC(const ArgList &Args, ArgStringList &CmdArgs) const { -+ if (Args.hasArg(options::OPT_mthreads)) -+ CmdArgs.push_back("-lmingwthrd"); -+ CmdArgs.push_back("-lmingw32"); -+ if (Args.hasArg(options::OPT_shared) || -+ Args.hasArg(options::OPT_shared_libgcc)) { -+ CmdArgs.push_back("-lgcc_s"); -+ CmdArgs.push_back("-lgcc"); -+ } else { -+ CmdArgs.push_back("-lgcc"); -+ CmdArgs.push_back("-lgcc_eh"); -+ } -+ CmdArgs.push_back("-lmoldname"); -+ CmdArgs.push_back("-lmingwex"); -+ CmdArgs.push_back("-lmsvcrt"); -+} -+ -+void MinGW::Link::ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const { -+ const ToolChain &TC = getToolChain(); -+ const Driver &D = TC.getDriver(); -+ //const SanitizerArgs &Sanitize = TC.getSanitizerArgs(); -+ -+ ArgStringList CmdArgs; -+ -+ // Silence warning for "clang -g foo.o -o foo" -+ Args.ClaimAllArgs(options::OPT_g_Group); -+ // and "clang -emit-llvm foo.o -o foo" -+ Args.ClaimAllArgs(options::OPT_emit_llvm); -+ // and for "clang -w foo.o -o foo". Other warning options are already -+ // handled somewhere else. -+ Args.ClaimAllArgs(options::OPT_w); -+ -+ if (!D.SysRoot.empty()) -+ CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); -+ -+ if (Args.hasArg(options::OPT_s)) -+ CmdArgs.push_back("-s"); -+ -+ CmdArgs.push_back("-m"); -+ if (TC.getArch() == llvm::Triple::x86) -+ CmdArgs.push_back("i386pe"); -+ if (TC.getArch() == llvm::Triple::x86_64) -+ CmdArgs.push_back("i386pep"); -+ -+ if (Args.hasArg(options::OPT_mwindows)) -+ CmdArgs.push_back("--subsystem windows"); -+ else if (Args.hasArg(options::OPT_mconsole)) -+ CmdArgs.push_back("--subsystem console"); -+ -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("-Bstatic"); -+ else { -+ // -shared means building DLL -+ if (Args.hasArg(options::OPT_shared)) -+ CmdArgs.push_back("--shared"); -+ else if (Args.hasArg(options::OPT_mdll)) -+ CmdArgs.push_back("--dll"); -+ CmdArgs.push_back("-Bdynamic"); -+ CmdArgs.push_back("-e"); -+ if (TC.getArch() == llvm::Triple::x86) -+ CmdArgs.push_back("_DllMainCRTStartup@12"); -+ else -+ CmdArgs.push_back("DllMainCRTStartup"); -+ -+ CmdArgs.push_back("--enable-auto-image-base"); -+ } -+ -+ AddLinkerInputs(TC, Inputs, Args, CmdArgs); -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_e); -+ // FIXME: add -N, -n flags -+ Args.AddLastArg(CmdArgs, options::OPT_r); -+ Args.AddLastArg(CmdArgs, options::OPT_s); -+ Args.AddLastArg(CmdArgs, options::OPT_t); -+ Args.AddAllArgs(CmdArgs, options::OPT_u_Group); -+ Args.AddLastArg(CmdArgs, options::OPT_Z_Flag); -+ -+ if (!Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nostartfiles)) { -+ if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_mdll)) { -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("dllcrt2.o"))); -+ } else { -+ if (Args.hasArg(options::OPT_municode)) -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2u.o"))); -+ else -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2.o"))); -+ } -+ if (Args.hasArg(options::OPT_pg)) -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("gcrt2.o"))); -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtbegin.o"))); -+ } -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_L); -+ const ToolChain::path_list Paths = TC.getFilePaths(); -+ for (const auto &Path : Paths) -+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + Path)); -+ -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back(Output.getFilename()); -+ -+ // TODO: Add ASan stuff here -+ -+ // TODO: Add profile stuff here -+ -+ if (D.CCCIsCXX() && -+ !Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nodefaultlibs)) { -+ bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) && -+ !Args.hasArg(options::OPT_static); -+ if (OnlyLibstdcxxStatic) -+ CmdArgs.push_back("-Bstatic"); -+ TC.AddCXXStdlibLibArgs(Args, CmdArgs); -+ if (OnlyLibstdcxxStatic) -+ CmdArgs.push_back("-Bdynamic"); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostdlib)) { -+ if (!Args.hasArg(options::OPT_nodefaultlibs)) { -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("--start-group"); -+ -+ if (Args.hasArg(options::OPT_fstack_protector) || -+ Args.hasArg(options::OPT_fstack_protector_strong) || -+ Args.hasArg(options::OPT_fstack_protector_all)) { -+ CmdArgs.push_back("-lssp_nonshared"); -+ CmdArgs.push_back("-lssp"); -+ } -+ if (Args.hasArg(options::OPT_fopenmp)) -+ CmdArgs.push_back("-lgomp"); -+ -+ AddLibGCC(Args, CmdArgs); -+ -+ if (Args.hasArg(options::OPT_pg)) -+ CmdArgs.push_back("-lgmon"); -+ -+ // TODO: remove unconditionally linking pthreads library -+ // Currently required for OpenMP and posix-threading libgcc -+ CmdArgs.push_back("-lpthread"); -+ -+ // add system libraries -+ if (Args.hasArg(options::OPT_mwindows)) { -+ CmdArgs.push_back("-lgdi32"); -+ CmdArgs.push_back("-lcomdlg32"); -+ } -+ CmdArgs.push_back("-ladvapi32"); -+ CmdArgs.push_back("-lshell32"); -+ CmdArgs.push_back("-luser32"); -+ CmdArgs.push_back("-lkernel32"); -+ -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("--end-group"); -+ else -+ AddLibGCC(Args, CmdArgs); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostartfiles)) { -+ // Add crtfastmath.o if available and fast math is enabled. -+ TC.AddFastMathRuntimeIfAvailable(Args, CmdArgs); -+ -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtend.o"))); -+ } -+ } -+ const char *Exec = -+ Args.MakeArgString(TC.GetProgramPath("ld")); -+ C.addCommand(new Command(JA, *this, Exec, CmdArgs)); -+} - - /// XCore Tools - // We pass assemble and link construction to the xcc tool. -diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h -index 873969b..3265ce1 100644 ---- a/lib/Driver/Tools.h -+++ b/lib/Driver/Tools.h -@@ -614,6 +614,25 @@ namespace visualstudio { - }; - } // end namespace visualstudio - -+ /// MinGW -- Directly call GNU Binutils assembler and linker -+namespace MinGW { -+ class LLVM_LIBRARY_VISIBILITY Link : public Tool { -+ public: -+ Link(const ToolChain &TC) : Tool("MinGW::Link", "linker", TC) {} -+ -+ bool hasIntegratedCPP() const override { return false; } -+ bool isLinkJob() const override { return true; } -+ -+ void ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const llvm::opt::ArgList &TCArgs, -+ const char *LinkingOutput) const override; -+ private: -+ void AddLibGCC(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs) const; -+ }; -+} // end namespace MinGW -+ - namespace arm { - StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args, - const llvm::Triple &Triple); -diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp -index bb1fe2d..9877216 100644 ---- a/lib/Frontend/InitHeaderSearch.cpp -+++ b/lib/Frontend/InitHeaderSearch.cpp -@@ -82,11 +82,6 @@ - StringRef Arch, - StringRef Version); - -- /// AddMinGW64CXXPaths - Add the necessary paths to support -- /// libstdc++ of x86_64-w64-mingw32 aka mingw-w64. -- void AddMinGW64CXXPaths(StringRef Base, -- StringRef Version); -- - // AddDefaultCIncludePaths - Add paths that should always be searched. - void AddDefaultCIncludePaths(const llvm::Triple &triple, - const HeaderSearchOptions &HSOpts); -@@ -208,18 +203,6 @@ - CXXSystem, false); - } - --void InitHeaderSearch::AddMinGW64CXXPaths(StringRef Base, -- StringRef Version) { -- // Assumes Base is HeaderSearchOpts' ResourceDir -- AddPath(Base + "/../../../include/c++/" + Version, -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/x86_64-w64-mingw32", -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/i686-w64-mingw32", -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/backward", -- CXXSystem, false); --} - - void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - const HeaderSearchOptions &HSOpts) { -@@ -269,7 +252,7 @@ - switch (os) { - case llvm::Triple::Linux: - llvm_unreachable("Include management is handled in the driver."); -- -+ break; - case llvm::Triple::Haiku: - AddPath("/boot/common/include", System, false); - AddPath("/boot/develop/headers/os", System, false); -@@ -309,30 +292,11 @@ - case llvm::Triple::Win32: - switch (triple.getEnvironment()) { - default: llvm_unreachable("Include management is handled in the driver."); -+ break; - case llvm::Triple::Cygnus: - AddPath("/usr/include/w32api", System, false); - break; - case llvm::Triple::GNU: -- // mingw-w64 crt include paths -- // /i686-w64-mingw32/include -- SmallString<128> P = StringRef(HSOpts.ResourceDir); -- llvm::sys::path::append(P, "../../../i686-w64-mingw32/include"); -- AddPath(P.str(), System, false); -- -- // /x86_64-w64-mingw32/include -- P.resize(HSOpts.ResourceDir.size()); -- llvm::sys::path::append(P, "../../../x86_64-w64-mingw32/include"); -- AddPath(P.str(), System, false); -- -- // mingw.org crt include paths -- // /include -- P.resize(HSOpts.ResourceDir.size()); -- llvm::sys::path::append(P, "../../../include"); -- AddPath(P.str(), System, false); -- AddPath("/mingw/include", System, false); --#if defined(LLVM_ON_WIN32) -- AddPath("c:/mingw/include", System, false); --#endif - break; - } - break; -@@ -340,7 +304,7 @@ - break; - } - -- if ( os != llvm::Triple::RTEMS ) -+ if ( os != llvm::Triple::RTEMS && !Triple.isWindowsGNUEnvironment() ) - AddPath("/usr/include", ExternCSystem, false); - } - -@@ -403,24 +368,6 @@ - AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.2"); - break; - case llvm::Triple::GNU: -- // mingw-w64 C++ include paths (i686-w64-mingw32 and x86_64-w64-mingw32) -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.0"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.1"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.2"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.3"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.0"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.1"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.2"); -- // mingw.org C++ include paths --#if defined(LLVM_ON_WIN32) -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.0"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.1"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.2"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.3"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.0"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.1"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.2"); --#endif - break; - } - case llvm::Triple::DragonFly: ---- a/include/clang/Driver/Options.td 2014-08-07 08:51:51.000000000 +0400 -+++ b/include/clang/Driver/Options.td 2014-09-08 10:02:24.295600000 +0400 -@@ -1041,6 +1041,11 @@ - def masm_EQ : Joined<["-"], "masm=">, Group, Flags<[DriverOption]>; - def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group; - def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group; -+def mconsole : Joined<["-"], "mconsole">, Group, Flags<[DriverOption]>; -+def mwindows : Joined<["-"], "mwindows">, Group, Flags<[DriverOption]>; -+def mdll : Joined<["-"], "mdll">, Group, Flags<[DriverOption]>; -+def municode : Joined<["-"], "municode">, Group, Flags<[DriverOption]>; -+def mthreads : Joined<["-"], "mthreads">, Group, Flags<[DriverOption]>; - def mcpu_EQ : Joined<["-"], "mcpu=">, Group; - def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; - def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group; diff --git a/mingw-w64-clang/clang-mingw-driver.patch b/mingw-w64-clang/clang-mingw-driver.patch deleted file mode 100644 index a3af83bcac..0000000000 --- a/mingw-w64-clang/clang-mingw-driver.patch +++ /dev/null @@ -1,675 +0,0 @@ -Author: Martell Malone - -This adds the mingw64 driver to clang even with the new triplets compnerd has created in clang. -Based off of ruben driver patch back from Jan - -diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td -index bb1fe2d..9877216 100644 ---- a/include/clang/Driver/Options.td -+++ b/include/clang/Driver/Options.td -@@ -1041,6 +1041,11 @@ - def masm_EQ : Joined<["-"], "masm=">, Group, Flags<[DriverOption]>; - def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group; - def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group; -+def mconsole : Joined<["-"], "mconsole">, Group, Flags<[DriverOption]>; -+def mwindows : Joined<["-"], "mwindows">, Group, Flags<[DriverOption]>; -+def mdll : Joined<["-"], "mdll">, Group, Flags<[DriverOption]>; -+def municode : Joined<["-"], "municode">, Group, Flags<[DriverOption]>; -+def mthreads : Joined<["-"], "mthreads">, Group, Flags<[DriverOption]>; - def mcpu_EQ : Joined<["-"], "mcpu=">, Group; - def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; - def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group; -diff --git a/lib/Driver/CMakeLists.txt b/lib/Driver/CMakeLists.txt -index e874ab8..71b7ec6 100644 ---- a/lib/Driver/CMakeLists.txt -+++ b/lib/Driver/CMakeLists.txt -@@ -16,6 +16,7 @@ - ToolChain.cpp - ToolChains.cpp - WindowsToolChain.cpp -+ MinGWToolChain.cpp - Tools.cpp - Types.cpp - -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index ca3e50f..c49d9fd 100644 ---- a/lib/Driver/Driver.cpp -+++ b/lib/Driver/Driver.cpp -@@ -1993,12 +1993,7 @@ - TC = new toolchains::Generic_GCC(*this, Target, Args); - break; - case llvm::Triple::GNU: -- // FIXME: We need a MinGW toolchain. Use the default Generic_GCC -- // toolchain for now as the default case would below otherwise. -- if (Target.isOSBinFormatELF()) -- TC = new toolchains::Generic_ELF(*this, Target, Args); -- else -- TC = new toolchains::Generic_GCC(*this, Target, Args); -+ TC = new toolchains::MinGW(*this, Target, Args); - break; - case llvm::Triple::MSVC: - case llvm::Triple::UnknownEnvironment: -diff --git a/lib/Driver/MinGWToolChain.cpp b/lib/Driver/MinGWToolChain.cpp -new file mode 100644 -index 0000000..87c0aa2 ---- /dev/null -+++ b/lib/Driver/MinGWToolChain.cpp -@@ -0,0 +1,195 @@ -+//===--- MinGWToolChain.cpp - MinGWToolChain Implementation -----------------------===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+ -+#include "ToolChains.h" -+#include "clang/Basic/CharInfo.h" -+#include "clang/Basic/DiagnosticIDs.h" -+#include "clang/Basic/Version.h" -+#include "clang/Driver/Compilation.h" -+#include "clang/Driver/Driver.h" -+#include "clang/Driver/DriverDiagnostic.h" -+#include "clang/Driver/Options.h" -+#include "llvm/Option/Arg.h" -+#include "llvm/Option/ArgList.h" -+#include "llvm/Support/ErrorHandling.h" -+#include "llvm/Support/FileSystem.h" -+#include "llvm/Support/Path.h" -+ -+using namespace clang::diag; -+using namespace clang::driver; -+using namespace clang::driver::toolchains; -+using namespace clang; -+using namespace llvm::opt; -+ -+MinGW::MinGW(const Driver &D, const llvm::Triple& Triple, -+ const ArgList &Args) -+ : ToolChain(D, Triple, Args) { -+ //TODO: libc++ directory -+ -+ // Get GCC version string for library and header directories -+ const std::string GCClibdir = -+#ifdef LLVM_ON_WIN32 -+ getDriver().Dir + "/../lib/gcc/" + getTriple().getArchName().str() + "-w64-mingw32"; -+#else -+ getDriver().SysRoot + "/usr/lib/gcc/" + getTriple().getArchName().str() + "-w64-mingw32"; -+#endif -+ if (llvm::sys::fs::exists(GCClibdir)) { -+ // Find subdirectory, should be the version of MinGW-w64 GCC -+ std::error_code EC; -+ llvm::sys::fs::directory_iterator entry(StringRef(GCClibdir), EC); -+ if (!EC) -+ GCCVersion = llvm::sys::path::filename(entry->path()); -+ // TODO report error: "no MinGW-w64 GCC installation found" -+ } -+ -+#ifdef LLVM_ON_WIN32 -+ // assume sysrooted compiler -+ getFilePaths().push_back(getDriver().Dir + "/../lib"); -+ getFilePaths().push_back(getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/lib"); -+ getFilePaths().push_back(getDriver().Dir + "/../lib/gcc/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/" + GCCVersion); -+ -+#else -+ // assume install prefix /usr -+ getFilePaths().push_back(getDriver().SysRoot + "/usr/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/lib"); -+ getFilePaths().push_back(getDriver().SysRoot + "/usr/lib/gcc/" -+ + getTriple().getArchName().str() + "-w64-mingw32" + "/" + GCCVersion); -+#endif -+} -+ -+Tool *MinGW::buildLinker() const { -+ return new tools::MinGW::Link(*this); -+} -+ -+bool MinGW::IsIntegratedAssemblerDefault() const { -+ return true; -+} -+ -+Tool *MinGW::getTool(Action::ActionClass AC) const { -+ switch (AC) { -+ case Action::PreprocessJobClass: -+ if (!Preprocess) -+ Preprocess.reset(new tools::gcc::Preprocess(*this)); -+ return Preprocess.get(); -+ case Action::CompileJobClass: -+ if (!Compile) -+ Compile.reset(new tools::gcc::Compile(*this)); -+ return Compile.get(); -+ default: -+ return ToolChain::getTool(AC); -+ } -+} -+ -+Tool *MinGW::buildAssembler() const { -+ return new tools::MinGW::Assemble(*this); -+} -+ -+bool MinGW::IsUnwindTablesDefault() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::isPICDefault() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::isPIEDefault() const { -+ return false; -+} -+ -+ -+bool MinGW::isPICDefaultForced() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+bool MinGW::UseSEHExceptions() const { -+ return getArch() == llvm::Triple::x86_64; -+} -+ -+void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdinc)) -+ return; -+ -+ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { -+ SmallString<128> P(getDriver().ResourceDir); -+ llvm::sys::path::append(P, "include"); -+ addSystemInclude(DriverArgs, CC1Args, P.str()); -+ } -+ -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc)) -+ return; -+ -+#ifdef LLVM_ON_WIN32 -+ // Clang runs on Windows, assume sysroot toolchain -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include"); -+ // Add users standard include directory -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include"); -+#else -+ // Clang runs somewhere else, e.g. Linux, assume install prefix /usr -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include"); -+#endif -+} -+ -+void MinGW::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, -+ ArgStringList &CC1Args) const { -+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) || -+ DriverArgs.hasArg(options::OPT_nostdincxx)) -+ return; -+ -+ // Check if libc++ has been enabled and provide its include paths if so. -+ if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) { -+ // libc++ is always installed at a fixed path on Linux currently. -+#ifdef LLVM_ON_WIN32 -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/v1"); -+#else -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/include/c++/v1"); -+#endif -+ return; -+ } -+#ifdef LLVM_ON_WIN32 -+ // Assume sysroot toolchain -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion -+ + "/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../include/c++/" + GCCVersion -+ + "/backward"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().Dir + "/../" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/backward"); -+#else -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion -+ + "/" + getTriple().getArchName().str() + "-w64-mingw32"); -+ addSystemInclude(DriverArgs, CC1Args, -+ getDriver().SysRoot + "/usr/" + getTriple().getArchName().str() + "-w64-mingw32" -+ + "/include/c++/" + GCCVersion + "/backward"); -+#endif -+} -diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h -index d5d0581..556afed 100644 ---- a/lib/Driver/ToolChains.h -+++ b/lib/Driver/ToolChains.h -@@ -751,6 +751,36 @@ - Tool *buildAssembler() const override; - }; - -+class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain { -+public: -+ MinGW(const Driver &D, const llvm::Triple &Triple, -+ const llvm::opt::ArgList &Args); -+ -+ bool IsIntegratedAssemblerDefault() const override; -+ bool IsUnwindTablesDefault() const override; -+ bool isPICDefault() const override; -+ bool isPIEDefault() const override; -+ bool isPICDefaultForced() const override; -+ bool UseSEHExceptions() const override; -+ -+ void -+ AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, -+ llvm::opt::ArgStringList &CC1Args) const override; -+ void -+ AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, -+ llvm::opt::ArgStringList &CC1Args) const override; -+ -+protected: -+ Tool *buildLinker() const override; -+ Tool *buildAssembler() const override; -+ Tool *getTool(Action::ActionClass AC) const override; -+ -+private: -+ std::string GCCVersion; -+ mutable std::unique_ptr Preprocess; -+ mutable std::unique_ptr Compile; -+}; -+ - - class LLVM_LIBRARY_VISIBILITY XCore : public ToolChain { - public: -diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp -index 892810e..a670502 100644 ---- a/lib/Driver/Tools.cpp -+++ b/lib/Driver/Tools.cpp -@@ -7949,6 +7949,210 @@ - return new Command(JA, *this, Args.MakeArgString(Exec), CmdArgs); - } - -+/// MinGW Tools -+void MinGW::Assemble::ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const { -+ ArgStringList CmdArgs; -+ -+ if (getToolChain().getArch() == llvm::Triple::x86) { -+ CmdArgs.push_back("--32"); -+ } else if (getToolChain().getArch() == llvm::Triple::x86_64) { -+ CmdArgs.push_back("--64"); -+ } -+ -+ Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, -+ options::OPT_Xassembler); -+ -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back(Output.getFilename()); -+ -+ for (const auto &II : Inputs) -+ CmdArgs.push_back(II.getFilename()); -+ -+ const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as")); -+ C.addCommand(new Command(JA, *this, Exec, CmdArgs)); -+ -+ if (Args.hasArg(options::OPT_gsplit_dwarf)) -+ SplitDebugInfo(getToolChain(), C, *this, JA, Args, Output, -+ SplitDebugName(Args, Inputs)); -+} -+ -+void MinGW::Link::AddLibGCC(const ArgList &Args, ArgStringList &CmdArgs) const { -+ if (Args.hasArg(options::OPT_mthreads)) -+ CmdArgs.push_back("-lmingwthrd"); -+ CmdArgs.push_back("-lmingw32"); -+ if (Args.hasArg(options::OPT_shared) || -+ Args.hasArg(options::OPT_shared_libgcc)) { -+ CmdArgs.push_back("-lgcc_s"); -+ CmdArgs.push_back("-lgcc"); -+ } else { -+ CmdArgs.push_back("-lgcc"); -+ CmdArgs.push_back("-lgcc_eh"); -+ } -+ CmdArgs.push_back("-lmoldname"); -+ CmdArgs.push_back("-lmingwex"); -+ CmdArgs.push_back("-lmsvcrt"); -+} -+ -+void MinGW::Link::ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const { -+ const ToolChain &TC = getToolChain(); -+ const Driver &D = TC.getDriver(); -+ //const SanitizerArgs &Sanitize = TC.getSanitizerArgs(); -+ -+ ArgStringList CmdArgs; -+ -+ // Silence warning for "clang -g foo.o -o foo" -+ Args.ClaimAllArgs(options::OPT_g_Group); -+ // and "clang -emit-llvm foo.o -o foo" -+ Args.ClaimAllArgs(options::OPT_emit_llvm); -+ // and for "clang -w foo.o -o foo". Other warning options are already -+ // handled somewhere else. -+ Args.ClaimAllArgs(options::OPT_w); -+ -+ if (!D.SysRoot.empty()) -+ CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); -+ -+ if (Args.hasArg(options::OPT_s)) -+ CmdArgs.push_back("-s"); -+ -+ CmdArgs.push_back("-m"); -+ if (TC.getArch() == llvm::Triple::x86) -+ CmdArgs.push_back("i386pe"); -+ if (TC.getArch() == llvm::Triple::x86_64) -+ CmdArgs.push_back("i386pep"); -+ -+ if (Args.hasArg(options::OPT_mwindows)) { -+ CmdArgs.push_back("--subsystem"); -+ CmdArgs.push_back("windows"); -+ } else if (Args.hasArg(options::OPT_mconsole)) { -+ CmdArgs.push_back("--subsystem"); -+ CmdArgs.push_back("console"); -+ } -+ -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("-Bstatic"); -+ else { -+ if (Args.hasArg(options::OPT_mdll)) -+ CmdArgs.push_back("--dll"); -+ else if (Args.hasArg(options::OPT_shared)) -+ CmdArgs.push_back("--shared"); -+ CmdArgs.push_back("-Bdynamic"); -+ if (Args.hasArg(options::OPT_mdll) || Args.hasArg(options::OPT_shared)) { -+ CmdArgs.push_back("-e"); -+ if (TC.getArch() == llvm::Triple::x86) -+ CmdArgs.push_back("_DllMainCRTStartup@12"); -+ else -+ CmdArgs.push_back("DllMainCRTStartup"); -+ CmdArgs.push_back("--enable-auto-image-base"); -+ } -+ } -+ -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back(Output.getFilename()); -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_e); -+ // FIXME: add -N, -n flags -+ Args.AddLastArg(CmdArgs, options::OPT_r); -+ Args.AddLastArg(CmdArgs, options::OPT_s); -+ Args.AddLastArg(CmdArgs, options::OPT_t); -+ Args.AddAllArgs(CmdArgs, options::OPT_u_Group); -+ Args.AddLastArg(CmdArgs, options::OPT_Z_Flag); -+ -+ if (!Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nostartfiles)) { -+ if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_mdll)) { -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("dllcrt2.o"))); -+ } else { -+ if (Args.hasArg(options::OPT_municode)) -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2u.o"))); -+ else -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2.o"))); -+ } -+ if (Args.hasArg(options::OPT_pg)) -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("gcrt2.o"))); -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtbegin.o"))); -+ } -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_L); -+ const ToolChain::path_list Paths = TC.getFilePaths(); -+ for (const auto &Path : Paths) -+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + Path)); -+ -+ AddLinkerInputs(TC, Inputs, Args, CmdArgs); -+ -+ // TODO: Add ASan stuff here -+ -+ // TODO: Add profile stuff here -+ -+ if (D.CCCIsCXX() && -+ !Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nodefaultlibs)) { -+ bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) && -+ !Args.hasArg(options::OPT_static); -+ if (OnlyLibstdcxxStatic) -+ CmdArgs.push_back("-Bstatic"); -+ TC.AddCXXStdlibLibArgs(Args, CmdArgs); -+ if (OnlyLibstdcxxStatic) -+ CmdArgs.push_back("-Bdynamic"); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostdlib)) { -+ if (!Args.hasArg(options::OPT_nodefaultlibs)) { -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("--start-group"); -+ -+ if (Args.hasArg(options::OPT_fstack_protector) || -+ Args.hasArg(options::OPT_fstack_protector_strong) || -+ Args.hasArg(options::OPT_fstack_protector_all)) { -+ CmdArgs.push_back("-lssp_nonshared"); -+ CmdArgs.push_back("-lssp"); -+ } -+ if (Args.hasArg(options::OPT_fopenmp)) -+ CmdArgs.push_back("-lgomp"); -+ -+ AddLibGCC(Args, CmdArgs); -+ -+ if (Args.hasArg(options::OPT_pg)) -+ CmdArgs.push_back("-lgmon"); -+ -+ // TODO: remove unconditionally linking pthreads library -+ // Currently required for OpenMP and posix-threading libgcc -+ CmdArgs.push_back("-lpthread"); -+ -+ // add system libraries -+ if (Args.hasArg(options::OPT_mwindows)) { -+ CmdArgs.push_back("-lgdi32"); -+ CmdArgs.push_back("-lcomdlg32"); -+ } -+ CmdArgs.push_back("-ladvapi32"); -+ CmdArgs.push_back("-lshell32"); -+ CmdArgs.push_back("-luser32"); -+ CmdArgs.push_back("-lkernel32"); -+ -+ if (Args.hasArg(options::OPT_static)) -+ CmdArgs.push_back("--end-group"); -+ else -+ AddLibGCC(Args, CmdArgs); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostartfiles)) { -+ // Add crtfastmath.o if available and fast math is enabled. -+ TC.AddFastMathRuntimeIfAvailable(Args, CmdArgs); -+ -+ CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtend.o"))); -+ } -+ } -+ const char *Exec = -+ Args.MakeArgString(TC.GetProgramPath("ld")); -+ C.addCommand(new Command(JA, *this, Exec, CmdArgs)); -+} - - /// XCore Tools - // We pass assemble and link construction to the xcc tool. -diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h -index 873969b..3265ce1 100644 ---- a/lib/Driver/Tools.h -+++ b/lib/Driver/Tools.h -@@ -613,6 +613,39 @@ - }; - } // end namespace visualstudio - -+ /// MinGW -- Directly call GNU Binutils assembler and linker -+namespace MinGW { -+ class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { -+ public: -+ Assemble(const ToolChain &TC) : Tool("MinGW::Assemble", "assembler", -+ TC) {} -+ -+ bool hasIntegratedCPP() const override { return false; } -+ -+ void ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const llvm::opt::ArgList &TCArgs, -+ const char *LinkingOutput) const override; -+ }; -+ -+ class LLVM_LIBRARY_VISIBILITY Link : public Tool { -+ public: -+ Link(const ToolChain &TC) : Tool("MinGW::Link", "linker", TC) {} -+ -+ bool hasIntegratedCPP() const override { return false; } -+ bool isLinkJob() const override { return true; } -+ -+ void ConstructJob(Compilation &C, const JobAction &JA, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const llvm::opt::ArgList &TCArgs, -+ const char *LinkingOutput) const override; -+ private: -+ void AddLibGCC(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs) const; -+ }; -+} // end namespace MinGW -+ - namespace arm { - StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args, - const llvm::Triple &Triple); -diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp -index bb1fe2d..9877216 100644 ---- a/lib/Frontend/InitHeaderSearch.cpp -+++ b/lib/Frontend/InitHeaderSearch.cpp -@@ -82,11 +82,6 @@ - StringRef Arch, - StringRef Version); - -- /// AddMinGW64CXXPaths - Add the necessary paths to support -- /// libstdc++ of x86_64-w64-mingw32 aka mingw-w64. -- void AddMinGW64CXXPaths(StringRef Base, -- StringRef Version); -- - // AddDefaultCIncludePaths - Add paths that should always be searched. - void AddDefaultCIncludePaths(const llvm::Triple &triple, - const HeaderSearchOptions &HSOpts); -@@ -208,18 +203,6 @@ - CXXSystem, false); - } - --void InitHeaderSearch::AddMinGW64CXXPaths(StringRef Base, -- StringRef Version) { -- // Assumes Base is HeaderSearchOpts' ResourceDir -- AddPath(Base + "/../../../include/c++/" + Version, -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/x86_64-w64-mingw32", -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/i686-w64-mingw32", -- CXXSystem, false); -- AddPath(Base + "/../../../include/c++/" + Version + "/backward", -- CXXSystem, false); --} - - void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, - const HeaderSearchOptions &HSOpts) { -@@ -232,6 +232,9 @@ - case llvm::Triple::OpenBSD: - case llvm::Triple::Bitrig: - break; -+ case llvm::Triple::Win32: -+ if (triple.getEnvironment() == llvm::Triple::GNU) -+ break; - default: - // FIXME: temporary hack: hard-coded paths. - AddPath("/usr/local/include", System, false); -@@ -269,7 +252,7 @@ - switch (os) { - case llvm::Triple::Linux: - llvm_unreachable("Include management is handled in the driver."); -- -+ break; - case llvm::Triple::Haiku: - AddPath("/boot/common/include", System, false); - AddPath("/boot/develop/headers/os", System, false); -@@ -309,30 +292,11 @@ - case llvm::Triple::Win32: - switch (triple.getEnvironment()) { - default: llvm_unreachable("Include management is handled in the driver."); -+ break; - case llvm::Triple::Cygnus: - AddPath("/usr/include/w32api", System, false); - break; - case llvm::Triple::GNU: -- // mingw-w64 crt include paths -- // /i686-w64-mingw32/include -- SmallString<128> P = StringRef(HSOpts.ResourceDir); -- llvm::sys::path::append(P, "../../../i686-w64-mingw32/include"); -- AddPath(P.str(), System, false); -- -- // /x86_64-w64-mingw32/include -- P.resize(HSOpts.ResourceDir.size()); -- llvm::sys::path::append(P, "../../../x86_64-w64-mingw32/include"); -- AddPath(P.str(), System, false); -- -- // mingw.org crt include paths -- // /include -- P.resize(HSOpts.ResourceDir.size()); -- llvm::sys::path::append(P, "../../../include"); -- AddPath(P.str(), System, false); -- AddPath("/mingw/include", System, false); --#if defined(LLVM_ON_WIN32) -- AddPath("c:/mingw/include", System, false); --#endif - break; - } - break; -@@ -340,7 +304,7 @@ - break; - } - -- if ( os != llvm::Triple::RTEMS ) -+ if ( os != llvm::Triple::RTEMS && !triple.isWindowsGNUEnvironment() ) - AddPath("/usr/include", ExternCSystem, false); - } - -@@ -404,26 +368,9 @@ - AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.2"); - break; - case llvm::Triple::GNU: -- // mingw-w64 C++ include paths (i686-w64-mingw32 and x86_64-w64-mingw32) -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.0"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.1"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.2"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.3"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.0"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.1"); -- AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.2"); -- // mingw.org C++ include paths --#if defined(LLVM_ON_WIN32) -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.0"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.1"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.2"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.3"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.0"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.1"); -- AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.2"); --#endif - break; - } -+ break; - case llvm::Triple::DragonFly: - if (llvm::sys::fs::exists("/usr/lib/gcc47")) - AddPath("/usr/include/c++/4.7", CXXSystem, false); diff --git a/mingw-w64-clang/llvm-3.5.0-fix-cmake-llvm-exports.patch b/mingw-w64-clang/llvm-3.5.0-fix-cmake-llvm-exports.patch deleted file mode 100644 index 7a7d42a3d4..0000000000 --- a/mingw-w64-clang/llvm-3.5.0-fix-cmake-llvm-exports.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: cmake/modules/Makefile -=================================================================== ---- cmake/modules/Makefile (revision 217483) -+++ cmake/modules/Makefile (revision 217484) -@@ -33,6 +33,16 @@ - LLVM_ENABLE_RTTI := 0 - endif - -+LLVM_LIBS_TO_EXPORT := $(subst -l,,$(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error)) -+ -+ifeq ($(LLVM_LIBS_TO_EXPORT),Error) -+$(error llvm-config --libs failed) -+endif -+ -+ifndef LLVM_LIBS_TO_EXPORT -+$(error LLVM_LIBS_TO_EXPORT cannot be empty) -+endif -+ - OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake - - $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in $(LLVMBuildCMakeFrag) -@@ -45,7 +55,7 @@ - -e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \ - -e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \ - -e 's/@LLVM_COMMON_DEPENDS@//' \ -- -e 's/@LLVM_AVAILABLE_LIBS@/'"$(subst -l,,$(LLVMConfigLibs))"'/' \ -+ -e 's/@LLVM_AVAILABLE_LIBS@/'"$(LLVM_LIBS_TO_EXPORT)"'/' \ - -e 's/@LLVM_ALL_TARGETS@/'"$(ALL_TARGETS)"'/' \ - -e 's/@LLVM_TARGETS_TO_BUILD@/'"$(TARGETS_TO_BUILD)"'/' \ - -e 's/@LLVM_TARGETS_WITH_JIT@/'"$(TARGETS_WITH_JIT)"'/' \ -@@ -83,7 +93,7 @@ - $(Echo) 'Generating LLVM CMake target exports file' - $(Verb) ( \ - echo '# LLVM CMake target exports. Do not include directly.' && \ -- for lib in $(subst -l,,$(LLVMConfigLibs)); do \ -+ for lib in $(LLVM_LIBS_TO_EXPORT); do \ - echo 'add_library('"$$lib"' STATIC IMPORTED)' && \ - echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "'"$(PROJ_libdir)/lib$$lib.a"'")' ; \ - done && \ diff --git a/mingw-w64-clang/llvm-3.5.0-force-link-pass.o.patch b/mingw-w64-clang/llvm-3.5.0-force-link-pass.o.patch deleted file mode 100644 index acc4c13396..0000000000 --- a/mingw-w64-clang/llvm-3.5.0-force-link-pass.o.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: llvm-toolchain-snapshot-3.5~svn211313/tools/bugpoint/Makefile -=================================================================== ---- llvm-toolchain-snapshot-3.5~svn211313.orig/tools/bugpoint/Makefile -+++ llvm-toolchain-snapshot-3.5~svn211313/tools/bugpoint/Makefile -@@ -12,6 +12,9 @@ TOOLNAME := bugpoint - LINK_COMPONENTS := asmparser instrumentation scalaropts ipo linker bitreader \ - bitwriter irreader vectorize objcarcopts codegen - -+# Crappy workaround to make sure it links correctly. -+LLVMLibsOptions := ../../lib/IR/Release*/Pass.o -+ - # Support plugins. - NO_DEAD_STRIP := 1 - -Index: llvm-toolchain-snapshot-3.5~svn211313/tools/opt/Makefile -=================================================================== ---- llvm-toolchain-snapshot-3.5~svn211313.orig/tools/opt/Makefile -+++ llvm-toolchain-snapshot-3.5~svn211313/tools/opt/Makefile -@@ -10,7 +10,9 @@ - LEVEL := ../.. - TOOLNAME := opt - LINK_COMPONENTS := bitreader bitwriter asmparser irreader instrumentation scalaropts objcarcopts ipo vectorize all-targets codegen -+# Crappy workaround to make sure it links correctly. - -+LLVMLibsOptions := ../../lib/IR/Release*/Pass.o - # Support plugins. - NO_DEAD_STRIP := 1 - diff --git a/mingw-w64-clang/clang-win64-seh.patch b/mingw-w64-cling-git/0001-Add-SEH-exceptions-to-the-clang-frontend.patch similarity index 68% rename from mingw-w64-clang/clang-win64-seh.patch rename to mingw-w64-cling-git/0001-Add-SEH-exceptions-to-the-clang-frontend.patch index 366d80ad8e..96fcaf1cc8 100644 --- a/mingw-w64-clang/clang-win64-seh.patch +++ b/mingw-w64-cling-git/0001-Add-SEH-exceptions-to-the-clang-frontend.patch @@ -1,13 +1,24 @@ -Author: Martell Malone +From 2228f948e75cef500c91902b47c2ac1fec10d4e5 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 8 Dec 2014 04:55:04 +0000 +Subject: [PATCH] Add SEH exceptions to the clang frontend -This adds seh exception handling on the clang side. -For now this will remove link errors regardless if seh is supported on the llvm backend or not. +--- + include/clang/Basic/LangOptions.def | 1 + + include/clang/Driver/CC1Options.td | 2 ++ + include/clang/Driver/ToolChain.h | 3 +++ + lib/CodeGen/CGException.cpp | 10 ++++++++++ + lib/Driver/ToolChains.h | 5 +++++ + lib/Driver/Tools.cpp | 2 ++ + lib/Frontend/CompilerInvocation.cpp | 1 + + lib/Frontend/InitPreprocessor.cpp | 2 ++ + 8 files changed, 26 insertions(+) diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def -index 34dfea2..ac20a9b 100644 +index a297a4c..44656e7 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def -@@ -82,6 +82,7 @@ +@@ -82,6 +82,7 @@ LANGOPT(Exceptions , 1, 0, "exception handling") LANGOPT(ObjCExceptions , 1, 0, "Objective-C exceptions") LANGOPT(CXXExceptions , 1, 0, "C++ exceptions") LANGOPT(SjLjExceptions , 1, 0, "setjmp-longjump exception handling") @@ -16,10 +27,10 @@ index 34dfea2..ac20a9b 100644 LANGOPT(RTTI , 1, 1, "run-time type information") LANGOPT(RTTIData , 1, 1, "emit run-time type information data") diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td -index 5ffeb43..ab73ca8 100644 +index c3685e0..dbb1a72 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td -@@ -425,6 +425,8 @@ +@@ -428,6 +428,8 @@ def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">, HelpText<"Weakly link in the blocks runtime">; def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, HelpText<"Use SjLj style exceptions">; @@ -29,10 +40,10 @@ index 5ffeb43..ab73ca8 100644 HelpText<"File name to use for split dwarf debug info output">; def fno_wchar : Flag<["-"], "fno-wchar">, diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h -index ceb1c76..30d687f 100644 +index 6f5677c..52c98c6 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h -@@ -248,6 +248,9 @@ +@@ -248,6 +248,9 @@ public: /// UseSjLjExceptions - Does this tool chain use SjLj exceptions. virtual bool UseSjLjExceptions() const { return false; } @@ -43,10 +54,10 @@ index ceb1c76..30d687f 100644 /// command line arguments into account. virtual std::string diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp -index cc03b0a..a4aa44b 100644 +index 1bbda5c..0f14d77 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp -@@ -137,12 +137,14 @@ +@@ -137,18 +137,22 @@ namespace { static const EHPersonality &get(const LangOptions &Lang); static const EHPersonality GNU_C; static const EHPersonality GNU_C_SJLJ; @@ -61,15 +72,15 @@ index cc03b0a..a4aa44b 100644 }; } -@@ -150,12 +152,16 @@ + const EHPersonality EHPersonality::GNU_C = { "__gcc_personality_v0", nullptr }; const EHPersonality EHPersonality::GNU_C_SJLJ = { "__gcc_personality_sj0", nullptr }; - const EHPersonality ++const EHPersonality +EHPersonality::GNU_C_SEH = { "__gcc_personality_seh0", nullptr }; -+const EHPersonality + const EHPersonality EHPersonality::NeXT_ObjC = { "__objc_personality_v0", nullptr }; const EHPersonality - EHPersonality::GNU_CPlusPlus = { "__gxx_personality_v0", nullptr }; +@@ -156,6 +160,8 @@ EHPersonality::GNU_CPlusPlus = { "__gxx_personality_v0", nullptr }; const EHPersonality EHPersonality::GNU_CPlusPlus_SJLJ = { "__gxx_personality_sj0", nullptr }; const EHPersonality @@ -78,7 +89,7 @@ index cc03b0a..a4aa44b 100644 EHPersonality::GNU_ObjC = {"__gnu_objc_personality_v0", "objc_exception_throw"}; const EHPersonality EHPersonality::GNU_ObjCXX = { "__gnustep_objcxx_personality_v0", nullptr }; -@@ -165,6 +171,8 @@ +@@ -165,6 +171,8 @@ EHPersonality::GNUstep_ObjC = { "__gnustep_objc_personality_v0", nullptr }; static const EHPersonality &getCPersonality(const LangOptions &L) { if (L.SjLjExceptions) return EHPersonality::GNU_C_SJLJ; @@ -87,7 +98,7 @@ index cc03b0a..a4aa44b 100644 return EHPersonality::GNU_C; } -@@ -189,6 +197,8 @@ +@@ -189,6 +197,8 @@ static const EHPersonality &getObjCPersonality(const LangOptions &L) { static const EHPersonality &getCXXPersonality(const LangOptions &L) { if (L.SjLjExceptions) return EHPersonality::GNU_CPlusPlus_SJLJ; @@ -96,11 +107,34 @@ index cc03b0a..a4aa44b 100644 else return EHPersonality::GNU_CPlusPlus; } +diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h +index 556e884..65c93dd 100644 +--- a/lib/Driver/ToolChains.h ++++ b/lib/Driver/ToolChains.h +@@ -302,6 +302,10 @@ public: + return false; + } + ++ bool UseSEHExceptions() const override { ++ return false; ++ } ++ + /// } + }; + +@@ -738,6 +742,7 @@ public: + bool isPICDefault() const override; + bool isPIEDefault() const override; + bool isPICDefaultForced() const override; ++ bool UseSEHExceptions() const override; + + void + AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp -index a670502..65bd056 100644 +index bcc8056..4202fd9 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp -@@ -4048,6 +4048,8 @@ +@@ -4088,6 +4088,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (getToolChain().UseSjLjExceptions()) CmdArgs.push_back("-fsjlj-exceptions"); @@ -110,10 +144,10 @@ index a670502..65bd056 100644 // C++ "sane" operator new. if (!Args.hasFlag(options::OPT_fassume_sane_operator_new, diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp -index 92202b7..de55c8b 100644 +index 0c6d77d..c3e8777 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp -@@ -1424,6 +1424,7 @@ +@@ -1427,6 +1427,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions); Opts.CXXExceptions = Args.hasArg(OPT_fcxx_exceptions); Opts.SjLjExceptions = Args.hasArg(OPT_fsjlj_exceptions); @@ -122,10 +156,10 @@ index 92202b7..de55c8b 100644 Opts.RTTI = !Args.hasArg(OPT_fno_rtti); diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp -index 39c474b..ceab8ac 100644 +index 7a9d09a..7754f0f 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp -@@ -557,6 +557,8 @@ +@@ -557,6 +557,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__GXX_RTTI"); if (LangOpts.SjLjExceptions) Builder.defineMacro("__USING_SJLJ_EXCEPTIONS__"); @@ -134,3 +168,6 @@ index 39c474b..ceab8ac 100644 if (LangOpts.Deprecated) Builder.defineMacro("__DEPRECATED"); +-- +2.2.0 + diff --git a/mingw-w64-cling-git/0001-change-all-WIN32-defines-to-_WIN32-as-it-is-a-compil.patch b/mingw-w64-cling-git/0001-change-all-WIN32-defines-to-_WIN32-as-it-is-a-compil.patch new file mode 100644 index 0000000000..a37e69f6df --- /dev/null +++ b/mingw-w64-cling-git/0001-change-all-WIN32-defines-to-_WIN32-as-it-is-a-compil.patch @@ -0,0 +1,179 @@ +From a140f2656c6017f9bf3b823b2d7058140ded73f6 Mon Sep 17 00:00:00 2001 +From: martell +Date: Thu, 4 Dec 2014 16:01:38 +0000 +Subject: [PATCH] change all WIN32 defines to _WIN32 as it is a compiler define + +--- + lib/Interpreter/DynamicLibraryManager.cpp | 2 +- + lib/UserInterface/textinput/SignalHandler.cpp | 2 +- + lib/UserInterface/textinput/StreamReader.cpp | 4 ++-- + lib/UserInterface/textinput/StreamReaderUnix.cpp | 4 ++-- + lib/UserInterface/textinput/StreamReaderWin.cpp | 4 ++-- + lib/UserInterface/textinput/TerminalConfigUnix.cpp | 4 ++-- + lib/UserInterface/textinput/TerminalDisplay.cpp | 4 ++-- + lib/UserInterface/textinput/TerminalDisplayUnix.cpp | 4 ++-- + lib/UserInterface/textinput/TerminalDisplayWin.cpp | 4 ++-- + 9 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/lib/Interpreter/DynamicLibraryManager.cpp b/lib/Interpreter/DynamicLibraryManager.cpp +index c841538..ac2a1e2 100644 +--- a/lib/Interpreter/DynamicLibraryManager.cpp ++++ b/lib/Interpreter/DynamicLibraryManager.cpp +@@ -22,7 +22,7 @@ + #include + #include + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + #include + #else +diff --git a/lib/UserInterface/textinput/SignalHandler.cpp b/lib/UserInterface/textinput/SignalHandler.cpp +index 9c02dee..6a3cd5b 100644 +--- a/lib/UserInterface/textinput/SignalHandler.cpp ++++ b/lib/UserInterface/textinput/SignalHandler.cpp +@@ -26,7 +26,7 @@ namespace textinput { + + void + SignalHandler::EmitCtrlZ() { +-#ifndef WIN32 ++#ifndef _WIN32 + raise(SIGTSTP); + #endif + } +diff --git a/lib/UserInterface/textinput/StreamReader.cpp b/lib/UserInterface/textinput/StreamReader.cpp +index e8e65b6..9ddfa0f 100644 +--- a/lib/UserInterface/textinput/StreamReader.cpp ++++ b/lib/UserInterface/textinput/StreamReader.cpp +@@ -14,7 +14,7 @@ + + #include "textinput/StreamReader.h" + +-#ifdef WIN32 ++#ifdef _WIN32 + # include "textinput/StreamReaderWin.h" + #else + # include "textinput/StreamReaderUnix.h" +@@ -25,7 +25,7 @@ namespace textinput { + + StreamReader* + StreamReader::Create() { +-#ifdef WIN32 ++#ifdef _WIN32 + return new StreamReaderWin(); + #else + return new StreamReaderUnix(); +diff --git a/lib/UserInterface/textinput/StreamReaderUnix.cpp b/lib/UserInterface/textinput/StreamReaderUnix.cpp +index 74e66c6..72e9367 100644 +--- a/lib/UserInterface/textinput/StreamReaderUnix.cpp ++++ b/lib/UserInterface/textinput/StreamReaderUnix.cpp +@@ -13,7 +13,7 @@ + // Axel Naumann , 2011-05-12 + //===----------------------------------------------------------------------===// + +-#ifndef WIN32 ++#ifndef _WIN32 + + #include "textinput/StreamReaderUnix.h" + +@@ -274,4 +274,4 @@ namespace textinput { + } + } + +-#endif // ifndef WIN32 ++#endif // ifndef _WIN32 +diff --git a/lib/UserInterface/textinput/StreamReaderWin.cpp b/lib/UserInterface/textinput/StreamReaderWin.cpp +index 1615e46..bf59ebc 100644 +--- a/lib/UserInterface/textinput/StreamReaderWin.cpp ++++ b/lib/UserInterface/textinput/StreamReaderWin.cpp +@@ -12,7 +12,7 @@ + // Axel Naumann , 2011-05-12 + //===----------------------------------------------------------------------===// + +-#ifdef WIN32 ++#ifdef _WIN32 + + #include "textinput/StreamReaderWin.h" + +@@ -211,4 +211,4 @@ namespace textinput { + } + } + } +-#endif // WIN32 ++#endif // _WIN32 +diff --git a/lib/UserInterface/textinput/TerminalConfigUnix.cpp b/lib/UserInterface/textinput/TerminalConfigUnix.cpp +index 113e7c9..6f00c5e 100644 +--- a/lib/UserInterface/textinput/TerminalConfigUnix.cpp ++++ b/lib/UserInterface/textinput/TerminalConfigUnix.cpp +@@ -1,4 +1,4 @@ +-#ifndef WIN32 ++#ifndef _WIN32 + + //===--- TerminalConfigUnix.cpp - termios storage -------------*- C++ -*-===// + // +@@ -143,4 +143,4 @@ bool TerminalConfigUnix::IsInteractive() const { + + + +-#endif // ndef WIN32 ++#endif // ifndef _WIN32 +diff --git a/lib/UserInterface/textinput/TerminalDisplay.cpp b/lib/UserInterface/textinput/TerminalDisplay.cpp +index a54529c..f2c2416 100644 +--- a/lib/UserInterface/textinput/TerminalDisplay.cpp ++++ b/lib/UserInterface/textinput/TerminalDisplay.cpp +@@ -14,7 +14,7 @@ + + #include "textinput/TerminalDisplay.h" + +-#ifdef WIN32 ++#ifdef _WIN32 + #include "textinput/TerminalDisplayWin.h" + #else + #include "textinput/TerminalDisplayUnix.h" +@@ -30,7 +30,7 @@ namespace textinput { + + TerminalDisplay* + TerminalDisplay::Create() { +-#ifdef WIN32 ++#ifdef _WIN32 + return new TerminalDisplayWin(); + #else + return new TerminalDisplayUnix(); +diff --git a/lib/UserInterface/textinput/TerminalDisplayUnix.cpp b/lib/UserInterface/textinput/TerminalDisplayUnix.cpp +index 17aef56..2b45168 100644 +--- a/lib/UserInterface/textinput/TerminalDisplayUnix.cpp ++++ b/lib/UserInterface/textinput/TerminalDisplayUnix.cpp +@@ -1,4 +1,4 @@ +-#ifndef WIN32 ++#ifndef _WIN32 + + //===--- TerminalDisplayUnix.cpp - Output To UNIX Terminal ------*- C++ -*-===// + // +@@ -326,4 +326,4 @@ namespace textinput { + + } + +-#endif // #ifndef WIN32 ++#endif // #ifndef _WIN32 +diff --git a/lib/UserInterface/textinput/TerminalDisplayWin.cpp b/lib/UserInterface/textinput/TerminalDisplayWin.cpp +index 8b9dd80..dd9cd6f 100644 +--- a/lib/UserInterface/textinput/TerminalDisplayWin.cpp ++++ b/lib/UserInterface/textinput/TerminalDisplayWin.cpp +@@ -13,7 +13,7 @@ + // Axel Naumann , 2011-05-12 + //===----------------------------------------------------------------------===// + +-#ifdef WIN32 ++#ifdef _WIN32 + #include "textinput/TerminalDisplayWin.h" + + #include "textinput/Color.h" +@@ -214,4 +214,4 @@ namespace textinput { + + } + +-#endif // WIN32 ++#endif // ifdef _WIN32 +-- +2.3.0 + diff --git a/mingw-w64-cling-git/0002-Invoke-bash-when-looking-for-gcc-includes.patch b/mingw-w64-cling-git/0002-Invoke-bash-when-looking-for-gcc-includes.patch new file mode 100644 index 0000000000..283c5ed5ff --- /dev/null +++ b/mingw-w64-cling-git/0002-Invoke-bash-when-looking-for-gcc-includes.patch @@ -0,0 +1,29 @@ +From 3799f58fabd8236a6f6042a04a457c69b47c0e16 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 22 Feb 2015 19:36:04 +0000 +Subject: [PATCH] Invoke bash when looking for gcc includes + +--- + lib/Interpreter/CIFactory.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Interpreter/CIFactory.cpp b/lib/Interpreter/CIFactory.cpp +index 4b5b6fa..d7951b5 100644 +--- a/lib/Interpreter/CIFactory.cpp ++++ b/lib/Interpreter/CIFactory.cpp +@@ -411,10 +411,10 @@ namespace { + } + #else // _MSC_VER + static const char *CppInclQuery = +- "echo | LC_ALL=C " LLVM_CXX " -xc++ -E -v - 2>&1 >/dev/null " ++ "bash -c \"echo | LC_ALL=C " LLVM_CXX " -xc++ -E -v - 2>&1 >/dev/null " + "| awk '/^#include +Date: Mon, 8 Dec 2014 18:11:37 +0000 +Subject: [PATCH] use size_t for void pointer cast + +--- + include/cling/Interpreter/Value.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/include/cling/Interpreter/Value.h b/include/cling/Interpreter/Value.h +index 4ebc32a..22b28fd 100644 +--- a/include/cling/Interpreter/Value.h ++++ b/include/cling/Interpreter/Value.h +@@ -10,6 +10,8 @@ + #ifndef CLING_VALUE_H + #define CLING_VALUE_H + ++#include ++ + namespace llvm { + class raw_ostream; + } +@@ -101,7 +103,7 @@ namespace cling { + case kLongDoubleType: + return (T) V.getAs(); + case kPointerType: +- return (T) (unsigned long) V.getAs(); ++ return (T) (size_t) V.getAs(); + case kUnsupportedType: + V.AssertOnUnsupportedTypeCast(); + } +@@ -115,7 +117,7 @@ namespace cling { + EStorageType storageType = V.getStorageType(); + switch (storageType) { + case kPointerType: +- return (T*) (unsigned long) V.getAs(); ++ return (T*) (size_t) V.getAs(); + default: + V.AssertOnUnsupportedTypeCast(); break; + } +-- +2.3.0 + diff --git a/mingw-w64-cling-git/0004-Hack-around-missing-functions.patch b/mingw-w64-cling-git/0004-Hack-around-missing-functions.patch new file mode 100644 index 0000000000..e84c06c618 --- /dev/null +++ b/mingw-w64-cling-git/0004-Hack-around-missing-functions.patch @@ -0,0 +1,64 @@ +From 0a816767085d68ec8e47dea84cbcb399ff80f2b5 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 23 Feb 2015 13:53:35 +0000 +Subject: [PATCH] Hack around missing functions + +--- + lib/Interpreter/IncrementalExecutor.cpp | 41 +++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +diff --git a/lib/Interpreter/IncrementalExecutor.cpp b/lib/Interpreter/IncrementalExecutor.cpp +index 2d7839d..dd2170f 100644 +--- a/lib/Interpreter/IncrementalExecutor.cpp ++++ b/lib/Interpreter/IncrementalExecutor.cpp +@@ -203,6 +203,47 @@ IncrementalExecutor::NotifyLazyFunctionCreators(const std::string& mangled_name) + return ret; + } + ++ FILE *pF = fopen("cling_func.map", "r"); ++ void *pAddr = NULL; ++ fflush(stdout); ++ while (pF) ++ { ++ char sz[512]; ++ if (!fgets(sz, sizeof(sz), pF)) ++ break; ++ ++ char *p = strrchr(sz, ' '); ++ if (!p) ++ continue; ++ ++ p++; ++ ++ char *p2 = strchr(sz, '\r'); ++ if (p2) ++ p2[0] = 0; ++ p2 = strchr(sz, '\n'); ++ if (p2) ++ p2[0] = 0; ++ ++ if (strcmp(p, mangled_name.c_str())) ++ { ++ if (p[0] != '_' || strcmp(p + 1, mangled_name.c_str())) ++ continue; ++ } ++ ++ sscanf(sz, "%x", &pAddr); ++ break; ++ } ++ ++ if (pF) ++ fclose(pF); ++ ++ if (pAddr) ++ { ++ fflush(stdout); ++ return pAddr; ++ } ++ + return HandleMissingFunction(mangled_name); + } + +-- +2.3.0 + diff --git a/mingw-w64-cling-git/PKGBUILD b/mingw-w64-cling-git/PKGBUILD index 4e7e96c3ed..cda77dda7a 100644 --- a/mingw-w64-cling-git/PKGBUILD +++ b/mingw-w64-cling-git/PKGBUILD @@ -1,30 +1,39 @@ # Maintainer: Martell Malone _realname=cling - -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-cern-git" "${MINGW_PACKAGE_PREFIX}-clang-cern-git" "${MINGW_PACKAGE_PREFIX}-clang-analyzer-cern-git" "${MINGW_PACKAGE_PREFIX}-llvm-cern-git") -pkgver=51262.b335d96 +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-cern-git" + "${MINGW_PACKAGE_PREFIX}-clang-cern-git" + "${MINGW_PACKAGE_PREFIX}-clang-analyzer-cern-git" + "${MINGW_PACKAGE_PREFIX}-llvm-cern-git") +pkgver=2518.6383df2 pkgrel=1 +clingver=cling-patches-r214630 pkgdesc="LC language family frontend for LLVM (mingw-w64)" arch=('any') url="http://llvm.org" license=("custom:University of Illinois/NCSA Open Source License") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "python2" "patch" "groff") depends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') -source=("llvm"::"git+http://root.cern.ch/git/llvm.git#branch=cling-patches" - "clang"::"git+http://root.cern.ch/git/clang.git#branch=cling-patches" +source=("llvm-cern"::"git+http://root.cern.ch/git/llvm.git#tag=$clingver" + "clang-cern"::"git+http://root.cern.ch/git/clang.git#tag=$clingver" "cling"::"git+http://root.cern.ch/git/cling.git" - cling-mingw64-fix.patch - clang-win64-seh.patch - llvm-win64-exceptions.patch -) + "0001-Add-SEH-exceptions-to-the-clang-frontend.patch" + "0001-change-all-WIN32-defines-to-_WIN32-as-it-is-a-compil.patch" + "0002-Invoke-bash-when-looking-for-gcc-includes.patch" + "0003-use-size_t-for-void-pointer-cast.patch" + "0004-Hack-around-missing-functions.patch") + md5sums=('SKIP' 'SKIP' 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP') + '19608fb25f3464b661344350822a7cc2' + '8f3f5d7f80ac92f81f9fd1a9af3ab599' + '44e00faa08d2a0877083d85ccb061e63' + '54d60e77f039ea7021349f02ddba720b' + 'c32c339b66cf579c821c00ed177c4837') pkgver() { cd "$srcdir/cling" @@ -33,29 +42,30 @@ pkgver() { } prepare() { - cd ${srcdir}/llvm - patch -p1 -i ${srcdir}/llvm-win64-exceptions.patch - - cd ${srcdir}/clang - patch -p1 -i ${srcdir}/clang-win64-seh.patch + + #cd ${srcdir}/clang + #patch -p1 -i ${srcdir}/0001-Add-SEH-exceptions-to-the-clang-frontend.patch cd ${srcdir}/cling - patch -p1 -i ${srcdir}/cling-mingw64-fix.patch + git checkout 39c7e56 + git am ${srcdir}/0001-change-all-WIN32-defines-to-_WIN32-as-it-is-a-compil.patch + git am ${srcdir}/0002-Invoke-bash-when-looking-for-gcc-includes.patch + git am ${srcdir}/0003-use-size_t-for-void-pointer-cast.patch + git am ${srcdir}/0004-Hack-around-missing-functions.patch cd ${srcdir} - mv ${srcdir}/clang ${srcdir}/llvm/tools/clang - mv ${srcdir}/cling ${srcdir}/llvm/tools/cling - + mv ${srcdir}/clang-cern ${srcdir}/llvm-cern/tools/clang + mv ${srcdir}/cling ${srcdir}/llvm-cern/tools/cling } build() { - mkdir -p ${srcdir}/llvm/build-${MINGW_CHOST} - cd ${srcdir}/llvm/build-${MINGW_CHOST} + mkdir -p ${srcdir}/llvm-cern/build-${MINGW_CHOST} + cd ${srcdir}/llvm-cern/build-${MINGW_CHOST} echo 'ac_cv_have_decl_strerror_s=${ac_cv_have_decl_strerror_s=no}' > config.cache # Include location of libffi headers in CPPFLAGS CPPFLAGS+=" $(pkg-config --cflags libffi)" - + ../configure \ -C \ --prefix=${MINGW_PREFIX} \ @@ -69,36 +79,19 @@ build() { --with-python=/usr/bin/python2 \ --enable-libffi \ --enable-docs - #--enable-shared - #--enable-embed-stdcxx - #--enable-libcpp - #--enable-cxx11 - # - #--enable-ltdl-install - # - #--with-c-include-dir - #--with-gcc-toolchain - #--with-default-sysroot - #--with-binutils-include - #--with-bug-report-url make } -check() { - cd "${srcdir}/llvm" - make check -} - package_clang(){ pkgdesc="C language family frontend for LLVM" depends=("${MINGW_PACKAGE_PREFIX}-llvm-cern-git") provides=("${MINGW_PACKAGE_PREFIX}-clang") conflicts=("${MINGW_PACKAGE_PREFIX}-clang") - cd ${srcdir}/llvm/tools/clang + cd ${srcdir}/llvm-cern/tools/clang local ver="$(git rev-parse HEAD)" - pkgver="r$(git svn find-rev ${ver})" - - cd "${srcdir}/llvm/build-${MINGW_CHOST}/tools/clang" + pkgver="r$(git rev-list --count HEAD)" + + cd "${srcdir}/llvm-cern/build-${MINGW_CHOST}/tools/clang" make -j1 DESTDIR="$pkgdir" install rm -r ${pkgdir}${MINGW_PREFIX}/docs } @@ -108,12 +101,15 @@ package_cling(){ depends=("${MINGW_PACKAGE_PREFIX}-llvm-cern-git" "${MINGW_PACKAGE_PREFIX}-clang-cern-git") provides=("${MINGW_PACKAGE_PREFIX}-cling") conflicts=("${MINGW_PACKAGE_PREFIX}-cling") - cd ${srcdir}/llvm/tools/cling + cd ${srcdir}/llvm-cern/tools/cling local ver="$(git rev-parse HEAD)" - pkgver="r$(git svn find-rev ${ver})" - - cd "${srcdir}/llvm/build-${MINGW_CHOST}/tools/cling" - make -j1 DESTDIR="$pkgdir" install + pkgver="r$(git rev-list --count HEAD)" + + cd "${srcdir}/llvm-cern/build-${MINGW_CHOST}/tools/cling" + make -j1 DESTDIR="$pkgdir" install + + # map hack + nm "${srcdir}/llvm-cern/build-${MINGW_CHOST}"/Release/bin/cling.exe > "${pkgdir}${MINGW_PREFIX}"/bin/cling_func.map } @@ -122,26 +118,26 @@ package_llvm(){ depends=("${MINGW_PACKAGE_PREFIX}-gcc") provides=("${MINGW_PACKAGE_PREFIX}-llvm") conflicts=("${MINGW_PACKAGE_PREFIX}-llvm") - cd ${srcdir}/llvm + cd ${srcdir}/llvm-cern local ver="$(git rev-parse HEAD)" - pkgver="r$(git svn find-rev ${ver})" - - mv "${srcdir}/llvm/tools/clang" "${srcdir}/clang" - mv "${srcdir}/llvm/build-${MINGW_CHOST}/tools/clang" "${srcdir}/clang-${MINGW_CHOST}" - mv "${srcdir}/llvm/tools/cling" "${srcdir}/cling" - mv "${srcdir}/llvm/build-${MINGW_CHOST}/tools/cling" "${srcdir}/cling-${MINGW_CHOST}" - cd "${srcdir}/llvm/build-${MINGW_CHOST}" + pkgver="r$(git rev-list --count HEAD)" + + mv "${srcdir}/llvm-cern/tools/clang" "${srcdir}/clang-cern" + mv "${srcdir}/llvm-cern/build-${MINGW_CHOST}/tools/clang" "${srcdir}/clang-${MINGW_CHOST}" + mv "${srcdir}/llvm-cern/tools/cling" "${srcdir}/cling" + mv "${srcdir}/llvm-cern/build-${MINGW_CHOST}/tools/cling" "${srcdir}/cling-${MINGW_CHOST}" + cd "${srcdir}/llvm-cern/build-${MINGW_CHOST}" make -j1 DESTDIR="$pkgdir" install - mv "${srcdir}/clang" "${srcdir}/llvm/tools/clang" - mv "${srcdir}/clang-${MINGW_CHOST}" "${srcdir}/llvm/build-${MINGW_CHOST}/tools/clang" - mv "${srcdir}/cling" "${srcdir}/llvm/tools/cling" - mv "${srcdir}/cling-${MINGW_CHOST}" "${srcdir}/llvm/build-${MINGW_CHOST}/tools/cling" + mv "${srcdir}/clang-cern" "${srcdir}/llvm-cern/tools/clang" + mv "${srcdir}/clang-${MINGW_CHOST}" "${srcdir}/llvm-cern/build-${MINGW_CHOST}/tools/clang" + mv "${srcdir}/cling" "${srcdir}/llvm-cern/tools/cling" + mv "${srcdir}/cling-${MINGW_CHOST}" "${srcdir}/llvm-cern/build-${MINGW_CHOST}/tools/cling" rm -r ${pkgdir}${MINGW_PREFIX}/docs - + # Install CMake stuff install -d "${pkgdir}${MINGW_PREFIX}"/share/llvm/cmake/{modules,platforms} - install -Dm644 $srcdir/llvm/cmake/modules/*.cmake "${pkgdir}${MINGW_PREFIX}"/share/llvm/cmake/modules/ - install -Dm644 $srcdir/llvm/cmake/platforms/*.cmake "${pkgdir}${MINGW_PREFIX}"/share/llvm/cmake/platforms/ + install -Dm644 $srcdir/llvm-cern/cmake/modules/*.cmake "${pkgdir}${MINGW_PREFIX}"/share/llvm/cmake/modules/ + install -Dm644 $srcdir/llvm-cern/cmake/platforms/*.cmake "${pkgdir}${MINGW_PREFIX}"/share/llvm/cmake/platforms/ } package_clang-analyzer() { @@ -150,10 +146,10 @@ package_clang-analyzer() { depends=("${MINGW_PACKAGE_PREFIX}-clang-cern-git" "${MINGW_PACKAGE_PREFIX}-python2") provides=("${MINGW_PACKAGE_PREFIX}-clang-analyzer") conflicts=("${MINGW_PACKAGE_PREFIX}-clang-analyzer") - cd ${srcdir}/llvm/tools/clang + cd ${srcdir}/llvm-cern/tools/clang local ver="$(git rev-parse HEAD)" - pkgver="r$(git svn find-rev ${ver})" - + pkgver="r$(git rev-list --count HEAD)" + install -d ${pkgdir}${MINGW_PREFIX}/{bin,lib/clang-analyzer} for _tool in scan-{build,view}; do cp -r tools/$_tool ${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/ @@ -162,20 +158,13 @@ package_clang-analyzer() { # scan-build looks for clang within the same directory install -d ${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ - ln -s ${srcdir}/llvm/build-${MINGW_CHOST}/Release/bin/clang.exe ${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ + ln -s ${srcdir}/llvm-cern/build-${MINGW_CHOST}/Release/bin/clang.exe ${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/scan-build/ # Relocate man page install -d ${pkgdir}${MINGW_PREFIX}/share/man/man1 mv ${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/scan-build/scan-build.1 \ ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - # Use Python 2 - #sed -i \ - # -e 's|env python$|&2|' \ - # -e 's|/usr/bin/python$|&2|' \ - # "${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/scan-view/scan-view" \ - # "${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer/scan-build/set-xcode-analyzer" - # Compile Python scripts python2 -m compileall "${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer" python2 -O -m compileall "${pkgdir}${MINGW_PREFIX}/lib/clang-analyzer" @@ -190,7 +179,7 @@ package_mingw-w64-i686-cling-cern-git(){ package_cling } -package_mingw-w64-i686-clang-cern-analyzer-git(){ +package_mingw-w64-i686-clang-analyzer-cern-git(){ package_clang-analyzer } diff --git a/mingw-w64-clink-git/0001-Relocation.patch b/mingw-w64-clink-git/0001-Relocation.patch new file mode 100644 index 0000000000..3ebfa1a75f --- /dev/null +++ b/mingw-w64-clink-git/0001-Relocation.patch @@ -0,0 +1,143 @@ +From dc7df971d8acf85c30263c9c267add272a5a3b3d Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Tue, 10 Mar 2015 02:11:40 +0100 +Subject: [PATCH] Relocation + +--- + clink/dll/lua.c | 1 + + clink/dll/rl_env.c | 2 +- + clink/loader/clink.bat | 18 ++++++++++++------ + clink/shared/paths.c | 46 ++++++++++++++++++++++++++-------------------- + 4 files changed, 40 insertions(+), 27 deletions(-) + +diff --git a/clink/dll/lua.c b/clink/dll/lua.c +index f734870..b0d94b9 100644 +--- a/clink/dll/lua.c ++++ b/clink/dll/lua.c +@@ -699,6 +699,7 @@ lua_State* initialise_lua() + if (g_inject_args.script_path[0] == '\0') + { + get_dll_dir(buffer, sizeof_array(buffer)); ++ str_cat(buffer, "/../share/clink", sizeof_array(buffer)); + } + else + { +diff --git a/clink/dll/rl_env.c b/clink/dll/rl_env.c +index 41c527c..fb35bb5 100644 +--- a/clink/dll/rl_env.c ++++ b/clink/dll/rl_env.c +@@ -142,7 +142,7 @@ void prepare_env_for_inputrc() + + strcpy(buffer, inputrc_eq); + get_dll_dir(buffer + size - 1, sizeof_array(buffer) - size); +- str_cat(buffer, "/clink_inputrc_base", sizeof_array(buffer)); ++ str_cat(buffer, "/../share/clink/clink_inputrc_base", sizeof_array(buffer)); + + putenv(buffer); + } +diff --git a/clink/loader/clink.bat b/clink/loader/clink.bat +index 1cafb84..cd0a524 100644 +--- a/clink/loader/clink.bat ++++ b/clink/loader/clink.bat +@@ -58,16 +58,22 @@ goto :eof + + :: Helper functions to avoid cmd.exe's issues with brackets. + :loader_x86 +-if exist "%~dpn0_x86.exe" ( +- "%~dpn0_x86.exe" %* ++if exist "%~dp0../../mingw32/bin/%~n0_x86.exe" ( ++ "%~dp0../../mingw32/bin/%~n0_x86.exe" %* ++ exit /b 0 ++) else ( ++ echo Cannot find "%~dp0../../mingw32/bin/%~n0_x86.exe" >&2 ++ exit /b 1 + ) +-exit /b 0 + + :loader_x64 +-if exist "%~dpn0_x64.exe" ( +- "%~dpn0_x64.exe" %* ++if exist "%~dp0../../mingw64/bin/%~n0_x64.exe" ( ++ "%~dp0../../mingw64/bin/%~n0_x64.exe" %* ++ exit /b 0 ++) else ( ++ echo Cannot find "%~dp0../../mingw64/bin/%~n0_x64.exe" >&2 ++ exit /b 1 + ) +-exit /b 0 + + :launch + start "" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg% && title Clink" +diff --git a/clink/shared/paths.c b/clink/shared/paths.c +index 35bec17..4d278c7 100644 +--- a/clink/shared/paths.c ++++ b/clink/shared/paths.c +@@ -74,18 +74,34 @@ void get_dll_dir(char* buffer, int size) + void get_config_dir(char* buffer, int size) + { + static int once = 1; ++ static char conf_dir[MAX_PATH] = { 1 }; + +- // Maybe the user specified an alternative location? +- if (g_config_dir_override != NULL) ++ // Just the once, get user's conf folder. ++ if (conf_dir[0] == 1) + { +- str_cpy(buffer, g_config_dir_override, size); +- } +- else +- { +- get_dll_dir(buffer, size); +- str_cat(buffer, ".\\profile", size); ++ // Maybe the user specified an alternative location? ++ if (g_config_dir_override != NULL) ++ { ++ str_cpy(conf_dir, g_config_dir_override, sizeof_array(conf_dir)); ++ } ++ else ++ { ++ const char* str; ++ if ((str = getenv("USERPROFILE")) != NULL) ++ { ++ str_cpy(conf_dir, str, sizeof_array(conf_dir)); ++ str_cat(conf_dir, "/.clink", sizeof_array(conf_dir)); ++ } ++ else ++ { ++ GetTempPath(sizeof_array(conf_dir), conf_dir); ++ str_cat(conf_dir, "./clink", sizeof_array(conf_dir)); ++ } ++ } + } + ++ str_cpy(buffer, conf_dir, size); ++ + // Try and create the directory if it doesn't already exist. Just this once. + if (once) + { +@@ -108,20 +124,10 @@ void get_log_dir(char* buffer, int size) + static once = 1; + static char log_dir[MAX_PATH] = { 1 }; + +- // Just the once, get user's appdata folder. ++ // Just the once, get user's temp folder. + if (log_dir[0] == 1) + { +- if (SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, NULL, 0, log_dir) != S_OK) +- { +- const char* str; +- if ((str = getenv("USERPROFILE")) == NULL) +- { +- GetTempPath(sizeof_array(log_dir), log_dir); +- } +- +- str_cpy(log_dir, str, sizeof_array(log_dir)); +- } +- ++ GetTempPath(sizeof_array(log_dir), log_dir); + str_cat(log_dir, "./clink", sizeof_array(log_dir)); + } + +-- +1.9.4.msysgit.2 + diff --git a/mingw-w64-clink-git/PKGBUILD b/mingw-w64-clink-git/PKGBUILD new file mode 100644 index 0000000000..3a0c3633ed --- /dev/null +++ b/mingw-w64-clink-git/PKGBUILD @@ -0,0 +1,85 @@ +# Maintainer: David Macek + +# TODO: compile docs (uses pandoc, which is in Haskell) + +_realname=clink +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=0.4.4.r616.a60c0a0 +pkgrel=1 +pkgdesc="Bash's powerful command line editing in cmd.exe (mingw-w64)" +arch=('any') +url="http://mridgers.github.io/clink" +license=("GPL3") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-premake" + "git") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +source=("git+https://github.com/mridgers/clink.git" + "0001-Relocation.patch") +md5sums=('SKIP' + 'd2db572d903d8bc09873c0588b452a90') + +pkgver() { + cd ${srcdir}/${_realname} + printf "%s.r%s.%s" "$(git describe --tags --abbrev=0)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_realname}" + git am "${srcdir}/0001-Relocation.patch" + sed '/premake.override/d' -i premake4.lua +} + +build() { + local _dbg _bit + case ${CARCH} in + i686) _bit=32 ;; + x86_64) _bit=64 ;; + esac + if check_option "debug" "y"; then + _dbg=debug + else + _dbg=release + fi + + cd "${srcdir}/${_realname}" + premake4 --clink_ver="$(git describe --tags --abbrev=0)" gmake + cd .build/gmake + rm -rf obj/${_dbg}/x${_bit} bin/${_dbg} + + sed -r 's/AS_STR[(]([^)]+)[)]/"AS_STR(\1)"/g' -i *.make + sed -r 's/[12]>nul//g' -i *.make + sed -r 's/-m32.*/\0 -static-libgcc/' -i *.make + sed 's~copy /y~cp~g' -i *.make + sed 's~\\\*.lua"~"/*.lua~' -i *.make + + CC=gcc make config=${_dbg}${_bit} +} + +package() { + local _dbg _arch + case ${CARCH} in + i686) _arch=86 ;; + x86_64) _arch=64 ;; + esac + if check_option "debug" "y"; then + _dbg=debug + else + _dbg=release + fi + + cd "${srcdir}/${_realname}/.build/gmake/bin/${_dbg}" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" + cp clink_x${_arch}.exe clink_dll_x${_arch}.dll clink.bat "${pkgdir}${MINGW_PREFIX}/bin" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + cp CHANGES "${srcdir}/${_realname}/docs/clink.md" "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/${_realname}" + cp *.lua clink_inputrc_base "${pkgdir}${MINGW_PREFIX}/share/${_realname}" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" + cp LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" +} diff --git a/mingw-w64-cloog/PKGBUILD b/mingw-w64-cloog/PKGBUILD index ddc4f313a0..f3d8d1d890 100644 --- a/mingw-w64-cloog/PKGBUILD +++ b/mingw-w64-cloog/PKGBUILD @@ -1,11 +1,9 @@ # Maintainer: Alexey Pavlov _realname=cloog - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=0.18.1 pkgrel=3 -groups=("${MINGW_PACKAGE_PREFIX}") pkgdesc="Library that generates loops for scanning polyhedra" arch=('any') url="http://www.bastoul.net/cloog/" @@ -27,7 +25,7 @@ prepare() { patch -p1 -i ${srcdir}/cloog-0.18.1-no-undefined.patch patch -p1 -i ${srcdir}/cloog-0.18.1-isl-use-documented-functions.patch patch -p1 -i ${srcdir}/cloog-0.18.1-isl-use-isl_val.patch - + autoreconf -fi } diff --git a/mingw-w64-clutter-gst/0001-msys2-fix-gir-scanner.patch b/mingw-w64-clutter-gst/0001-msys2-fix-gir-scanner.patch index a16515e964..91f44a5019 100644 --- a/mingw-w64-clutter-gst/0001-msys2-fix-gir-scanner.patch +++ b/mingw-w64-clutter-gst/0001-msys2-fix-gir-scanner.patch @@ -14,25 +14,14 @@ diff --git a/clutter-gst/Makefile.am b/clutter-gst/Makefile.am index f9d4ecd..cb02c52 100644 --- a/clutter-gst/Makefile.am +++ b/clutter-gst/Makefile.am -@@ -122,7 +122,8 @@ if HAVE_INTROSPECTION - BUILT_GIRSOURCES = - +@@ -139,6 +139,7 @@ if HAVE_INTROSPECTION ClutterGst-@CLUTTER_GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-gst-@CLUTTER_GST_API_VERSION@.la -- $(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \ + $(QUIET_GEN) \ + GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no DISPLAY="" \ + CC="$(CC)" \ -+ $(INTROSPECTION_SCANNER) -v \ + $(INTROSPECTION_SCANNER) -v \ --namespace ClutterGst --nsversion=@CLUTTER_GST_API_VERSION@ \ $(INCLUDES) \ - $(AM_CPPFLAGS) \ -@@ -132,6 +133,8 @@ ClutterGst-@CLUTTER_GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-gs - --c-include="clutter-gst/clutter-gst.h" \ - --include=GObject-2.0 \ - --include=Clutter-1.0 \ -+ `$(PKG_CONFIG) --cflags-only-I clutter-1.0` \ -+ `$(PKG_CONFIG) --cflags-only-I gstreamer-plugins-base-1.0` \ - --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-1.0` \ - --include=Gst-1.0 \ - --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-base-1.0` \ -- 2.0.4 diff --git a/mingw-w64-clutter-gst/0002-install-gtk-doc.patch b/mingw-w64-clutter-gst/0002-install-gtk-doc.patch new file mode 100644 index 0000000000..6900c9e7e4 --- /dev/null +++ b/mingw-w64-clutter-gst/0002-install-gtk-doc.patch @@ -0,0 +1,12 @@ +--- ./Makefile.am.orig 2015-10-28 09:13:02.305357700 +0100 ++++ ./Makefile.am 2015-10-28 09:13:08.255174800 +0100 +@@ -2,9 +2,7 @@ + + SUBDIRS = build scripts clutter-gst tests examples + +-if BUILD_GTK_DOC + SUBDIRS += doc +-endif + + DIST_SUBDIRS = build scripts clutter-gst tests examples doc + diff --git a/mingw-w64-clutter-gst/PKGBUILD b/mingw-w64-clutter-gst/PKGBUILD index 829ae4e636..fa4bf248fd 100644 --- a/mingw-w64-clutter-gst/PKGBUILD +++ b/mingw-w64-clutter-gst/PKGBUILD @@ -1,34 +1,33 @@ # Maintainer: Lubosz Sarnecki _realname=clutter-gst +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.0.12 +pkgver=3.0.14 pkgrel=1 -pkgdesc="A GStreamer integration library for Clutter. (mingw-w64)" +pkgdesc="A GStreamer integration library for Clutter (mingw-w64)" arch=('any') url="http://clutter-project.org/" license=("LGPL") makedepends=('automake' 'libtool' 'intltool' 'itstool' 'gtk-doc' 'gnome-doc-utils' 'yelp-tools') depends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-clutter" - "${MINGW_PACKAGE_PREFIX}-gstreamer" - ) + "${MINGW_PACKAGE_PREFIX}-clutter" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base") options=(!libtool strip staticlibs) - -source=(http://download.gnome.org/sources/${_realname}/${pkgver:0:3}/${_realname}-$pkgver.tar.xz - #"git://git.gnome.org/$_realname#tag=${pkgver}" - #"git://git.gnome.org/$_realname" +source=(http://download.gnome.org/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz "0001-msys2-fix-gir-scanner.patch" - #"0001-msys2-fix-gir-build-on-master.patch" - ) -md5sums=('3e845093843166001e65e1e4971c1588' - 'db504782f9b1e796d7faaa65ee376cac') + "0002-install-gtk-doc.patch") +md5sums=('635df0aef328fdcb8b2b565525dec3be' + '35fee4e70be0ba0b5c651119511b2f65' + '7c661ce904783d900b1ec2915d80d5b5') prepare() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-msys2-fix-gir-scanner.patch - #git am ../0001-msys2-fix-gir-build-on-master.patch - #NOCONFIGURE=1 ./autogen.sh + patch -b -V simple -p1 -i ${srcdir}/0002-install-gtk-doc.patch + autoreconf -fvi } @@ -36,7 +35,11 @@ build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir ${srcdir}/build-${MINGW_CHOST} cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-$pkgver/configure \ + + mkdir -p doc/reference/html + cp -rf ../${_realname}-${pkgver}/doc/reference/html/* doc/reference/html + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -44,12 +47,15 @@ build() { --enable-shared \ --enable-silent-rules \ --disable-gtk-doc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - + make -j1 DESTDIR="${pkgdir}" install + rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-clutter-gtk/0001-msys-add-no-undefined-to-libtool-flags.patch b/mingw-w64-clutter-gtk/0001-msys-add-no-undefined-to-libtool-flags.patch deleted file mode 100644 index f4f45665de..0000000000 --- a/mingw-w64-clutter-gtk/0001-msys-add-no-undefined-to-libtool-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -From d1c4e1b208ad71b5b7392ada878abbaf2b5d62c6 Mon Sep 17 00:00:00 2001 -From: Lubosz Sarnecki -Date: Sun, 3 Aug 2014 17:34:41 +0200 -Subject: [PATCH 1/3] msys: add -no-undefined to libtool flags - ---- - clutter-gtk/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/clutter-gtk/Makefile.am b/clutter-gtk/Makefile.am -index 9a35919..e9e4616 100644 ---- a/clutter-gtk/Makefile.am -+++ b/clutter-gtk/Makefile.am -@@ -48,6 +48,7 @@ libclutter_gtk_@CLUTTER_GTK_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $( - libclutter_gtk_@CLUTTER_GTK_API_VERSION@_la_LIBADD = $(CLUTTER_GTK_DEPS_LIBS) $(LIBM) - libclutter_gtk_@CLUTTER_GTK_API_VERSION@_la_LDFLAGS = \ - $(CLUTTER_LT_LDFLAGS) \ -+ -no-undefined \ - -export-symbols-regex "^gtk_clutter.*" - - cluttergtkheadersdir = $(includedir)/clutter-gtk-@CLUTTER_GTK_API_VERSION@/clutter-gtk --- -2.0.4 - diff --git a/mingw-w64-clutter-gtk/0002-msys-fix-introspection-build.patch b/mingw-w64-clutter-gtk/0002-msys-fix-introspection-build.patch index 97b4bd0c94..48e10689d4 100644 --- a/mingw-w64-clutter-gtk/0002-msys-fix-introspection-build.patch +++ b/mingw-w64-clutter-gtk/0002-msys-fix-introspection-build.patch @@ -11,13 +11,6 @@ diff --git a/clutter-gtk/Makefile.am b/clutter-gtk/Makefile.am index e9e4616..da41d0d 100644 --- a/clutter-gtk/Makefile.am +++ b/clutter-gtk/Makefile.am -@@ -65,6 +65,7 @@ EXTRA_DIST += gtk-clutter-version.h.in - -include $(INTROSPECTION_MAKEFILE) - - INTROSPECTION_GIRS = -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - if HAVE_INTROSPECTION GtkClutter-@CLUTTER_GTK_API_VERSION@.gir: libclutter-gtk-@CLUTTER_GTK_API_VERSION@.la Makefile @@ -73,7 +74,9 @@ GtkClutter_@CLUTTER_GTK_API_VERSION_AM@_gir_SCANNERFLAGS = \ --identifier-prefix=GtkClutter \ diff --git a/mingw-w64-clutter-gtk/0003-msys-update-clutter-win32-header-location.patch b/mingw-w64-clutter-gtk/0003-msys-update-clutter-win32-header-location.patch deleted file mode 100644 index 67be4669a6..0000000000 --- a/mingw-w64-clutter-gtk/0003-msys-update-clutter-win32-header-location.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d76dc6b14c470f6d92cf6a599796496b97783d27 Mon Sep 17 00:00:00 2001 -From: Lubosz Sarnecki -Date: Sun, 3 Aug 2014 17:35:31 +0200 -Subject: [PATCH 3/3] msys: update clutter-win32 header location - ---- - clutter-gtk/gtk-clutter-actor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clutter-gtk/gtk-clutter-actor.c b/clutter-gtk/gtk-clutter-actor.c -index b5de571..e090a89 100644 ---- a/clutter-gtk/gtk-clutter-actor.c -+++ b/clutter-gtk/gtk-clutter-actor.c -@@ -59,7 +59,7 @@ - #endif - - #ifdef CLUTTER_WINDOWING_WIN32 --#include -+#include - #endif - #ifdef GDK_WINDOWING_WIN32 - #include --- -2.0.4 - diff --git a/mingw-w64-clutter-gtk/PKGBUILD b/mingw-w64-clutter-gtk/PKGBUILD index 498c2593a7..2ffc1cce6c 100644 --- a/mingw-w64-clutter-gtk/PKGBUILD +++ b/mingw-w64-clutter-gtk/PKGBUILD @@ -1,43 +1,42 @@ # Maintainer: Lubosz Sarnecki _realname=clutter-gtk +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.6.0 +pkgver=1.6.6 pkgrel=1 -pkgdesc="Clutter integration with GTK+. (mingw-w64)" +pkgdesc="Clutter integration with GTK+ (mingw-w64)" arch=('any') url="http://clutter-project.org/" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") depends=("${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-clutter" - ) + "${MINGW_PACKAGE_PREFIX}-clutter") options=(!libtool strip staticlibs) -source=(http://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz - #"git://git.gnome.org/$_realname#tag=$pkgver" - "0001-msys-add-no-undefined-to-libtool-flags.patch" - "0002-msys-fix-introspection-build.patch" - "0003-msys-update-clutter-win32-header-location.patch") -md5sums=('08e5d7c249733d4d96bbbd2dc970a06c' - '317a8e3259f818c2e1147697d623e920' - '4b892afaf561ac2503962d238770f967' - '48afee140d22c548a85691d1ca2097a3') +source=(http://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + "0002-msys-fix-introspection-build.patch") +md5sums=('79dc3d7a8645f87d83a9ccca8a08aa8e' + 'ab881e17cbef38b2aa05c4f0b88d4358') prepare() { - cd ${_realname}-$pkgver - patch -p1 -i ${srcdir}/0001-msys-add-no-undefined-to-libtool-flags.patch + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0002-msys-fix-introspection-build.patch - patch -p1 -i ${srcdir}/0003-msys-update-clutter-win32-header-location.patch + autoreconf -fvi #NOCONFIGURE=1 ./autogen.sh } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-$pkgver/configure \ + + mkdir -p doc/reference/html + cp -rf ../${_realname}-${pkgver}/doc/reference/html/* doc/reference/html + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -45,10 +44,13 @@ build() { --enable-shared \ --enable-silent-rules \ --disable-gtk-doc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-clutter/0002-install-gtk-doc.patch b/mingw-w64-clutter/0002-install-gtk-doc.patch new file mode 100644 index 0000000000..a36ffee9a2 --- /dev/null +++ b/mingw-w64-clutter/0002-install-gtk-doc.patch @@ -0,0 +1,11 @@ +--- ./doc/Makefile.am.orig 2015-10-26 10:10:30.869694900 +0100 ++++ ./doc/Makefile.am 2015-10-26 10:10:36.000866600 +0100 +@@ -1,8 +1,6 @@ + SUBDIRS = + +-if BUILD_GTK_DOC + SUBDIRS += reference +-endif + + if ENABLE_DOCS + SUBDIRS += common cookbook diff --git a/mingw-w64-clutter/0002-msys2-add-CC-flags-to-gir-scanner.patch b/mingw-w64-clutter/0002-msys2-add-CC-flags-to-gir-scanner.patch deleted file mode 100644 index 3efaa359da..0000000000 --- a/mingw-w64-clutter/0002-msys2-add-CC-flags-to-gir-scanner.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 47586605368ef89502c4cdee2d8a58e8d87becb7 Mon Sep 17 00:00:00 2001 -From: Lubosz Sarnecki -Date: Sun, 3 Aug 2014 14:47:26 +0200 -Subject: [PATCH 2/2] msys2: add CC flags to gir-scanner - ---- - clutter/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/clutter/Makefile.am b/clutter/Makefile.am -index a48010b..e23021c 100644 ---- a/clutter/Makefile.am -+++ b/clutter/Makefile.am -@@ -977,6 +977,7 @@ Clutter_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \ - --pkg-export=clutter-@CLUTTER_API_VERSION@ - - INTROSPECTION_GIRS += Clutter-@CLUTTER_API_VERSION@.gir -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - Cally-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir - --- -2.0.4 - diff --git a/mingw-w64-clutter/PKGBUILD b/mingw-w64-clutter/PKGBUILD index fb52b6d08f..d571fd662c 100644 --- a/mingw-w64-clutter/PKGBUILD +++ b/mingw-w64-clutter/PKGBUILD @@ -1,55 +1,64 @@ # Maintainer: Lubosz Sarnecki _realname=clutter +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.20.0 +pkgver=1.24.2 pkgrel=1 -pkgdesc="A GObject based library for creating fast, visually rich graphical user interfaces. (mingw-w64)" +pkgdesc="A GObject based library for creating fast, visually rich graphical user interfaces (mingw-w64)" arch=('any') url="http://clutter-project.org/" license=("LGPL") -makedepends=('automake' 'libtool' 'intltool' 'itstool' 'gtk-doc' 'gnome-doc-utils' 'yelp-tools') -depends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-atk" - "${MINGW_PACKAGE_PREFIX}-json-glib" - "${MINGW_PACKAGE_PREFIX}-cogl" - ) +makedepends=('automake' 'libtool' 'intltool' 'itstool' 'gtk-doc' 'gnome-doc-utils' 'yelp-tools' + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-atk" + "${MINGW_PACKAGE_PREFIX}-cogl" + "${MINGW_PACKAGE_PREFIX}-json-glib" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime" + "${MINGW_PACKAGE_PREFIX}-gtk3") options=(!libtool strip staticlibs) - -source=(http://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz +source=(http://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz #"git://git.gnome.org/$_realname#tag=${pkgver}" "0001-msys2-add-header-for-BOOL-defintion.patch" - "0002-msys2-add-CC-flags-to-gir-scanner.patch") - -md5sums=('a8a33a57a944c6d7c7c013ce9aa3222b' + "0002-install-gtk-doc.patch") +md5sums=('3b98e1b33719982a5736ae42cbf7183e' '3a92db8341129b0db058d47f97062f65' - '993eabbeb6fa31af855a593956727e6f') + '701e0b142cc48f7871ea287899de5b92') prepare() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-msys2-add-header-for-BOOL-defintion.patch - patch -p1 -i ${srcdir}/0002-msys2-add-CC-flags-to-gir-scanner.patch + patch -p1 -i ${srcdir}/0002-install-gtk-doc.patch + autoreconf -fvi #NOCONFIGURE=1 ./autogen.sh } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-$pkgver/configure \ + + mkdir -p doc/reference/html + cp -rf ../${_realname}-${pkgver}/doc/reference/html/* doc/reference/html + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --disable-static \ --enable-shared \ --enable-silent-rules \ - --disable-gtk-doc + --enable-introspection + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-cmake-git/disable-response-files-for-msys.patch b/mingw-w64-cmake-git/0001-Disable-response-files-for-MSYS-Generator.patch similarity index 57% rename from mingw-w64-cmake-git/disable-response-files-for-msys.patch rename to mingw-w64-cmake-git/0001-Disable-response-files-for-MSYS-Generator.patch index 2b0312ef0a..75897284f7 100644 --- a/mingw-w64-cmake-git/disable-response-files-for-msys.patch +++ b/mingw-w64-cmake-git/0001-Disable-response-files-for-MSYS-Generator.patch @@ -1,13 +1,24 @@ ---- cmake-git/Modules/Platform/Windows-GNU.cmake.orig 2014-01-30 23:55:26.783200000 +0400 -+++ cmake-git/Modules/Platform/Windows-GNU.cmake 2014-01-31 00:03:27.411200000 +0400 -@@ -86,9 +86,11 @@ +From 05b0880a056f58069eb9bdc017d460556e4f68f9 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Mon, 3 Aug 2015 22:00:16 +0100 +Subject: [PATCH 1/3] Disable response files for MSYS Generator + +--- + Modules/Platform/Windows-GNU.cmake | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake +index b97409c..154062b 100644 +--- a/Modules/Platform/Windows-GNU.cmake ++++ b/Modules/Platform/Windows-GNU.cmake +@@ -84,9 +84,11 @@ macro(__windows_compiler_gnu lang) set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") - set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE}) - set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE}) - set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1) -+ if(NOT CMAKE_GENERATOR STREQUAL "MSYS Makefiles" OR CMAKE_NEED_RESPOSE) ++ if(NOT CMAKE_GENERATOR STREQUAL "MSYS Makefiles" OR CMAKE_NEED_RESPONSE) + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE}) + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE}) + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1) @@ -15,3 +26,6 @@ # We prefer "@" for response files but it is not supported by gcc 3. execute_process(COMMAND ${CMAKE_${lang}_COMPILER} --version OUTPUT_VARIABLE _ver ERROR_VARIABLE _ver) +-- +2.5.0 + diff --git a/mingw-w64-cmake-git/0002-Implement-Qt5-static-plugin-support.patch b/mingw-w64-cmake-git/0002-Implement-Qt5-static-plugin-support.patch new file mode 100644 index 0000000000..910cf13075 --- /dev/null +++ b/mingw-w64-cmake-git/0002-Implement-Qt5-static-plugin-support.patch @@ -0,0 +1,174 @@ +From 5bf3465977c82514375d3be4ad33d68acfd18e2c Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 3 Aug 2015 22:00:16 +0100 +Subject: [PATCH 2/3] Implement Qt5 static plugin support + +Enabled via a new target property "AUTOSTATICPLUGINS". + +At CMake execution time, a C++ file is created to link the +static plugins. For this to work, patches for Qt5-static +from [1] are necessary [2], [3] and [4] + +[1] https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-qt5-static +[2] 0038-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch +[3] 0039-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch +[4] 0041-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + +.. and also some more minor ones that aren't strictly related to Qt5 static +CMake but are necessary for this to work on MinGW-w64 (0040- for example). +--- + Source/cmGlobalGenerator.cxx | 3 +- + Source/cmQtAutoGenerators.cxx | 67 +++++++++++++++++++++++++++++++++++++++++-- + Source/cmTarget.cxx | 2 ++ + 3 files changed, 68 insertions(+), 4 deletions(-) + +diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx +index b437942..66a32ef 100644 +--- a/Source/cmGlobalGenerator.cxx ++++ b/Source/cmGlobalGenerator.cxx +@@ -1460,7 +1460,8 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) + { + if((target.GetPropertyAsBool("AUTOMOC") + || target.GetPropertyAsBool("AUTOUIC") +- || target.GetPropertyAsBool("AUTORCC")) ++ || target.GetPropertyAsBool("AUTORCC") ++ || target.GetPropertyAsBool("AUTOSTATICPLUGINS")) + && !target.IsImported()) + { + cmQtAutoGenerators autogen; +diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx +index 1322dea..b399cc0 100644 +--- a/Source/cmQtAutoGenerators.cxx ++++ b/Source/cmQtAutoGenerators.cxx +@@ -35,6 +35,7 @@ + #include + #endif + ++#include + #include "cmQtAutoGenerators.h" + + +@@ -155,7 +156,7 @@ cmQtAutoGenerators::cmQtAutoGenerators() + static std::string getAutogenTargetName(cmTarget const* target) + { + std::string autogenTargetName = target->GetName(); +- autogenTargetName += "_automoc"; ++ autogenTargetName += "_autogen"; + return autogenTargetName; + } + +@@ -315,6 +316,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg, + + target->AddSource(mocCppFile); + } ++ + // create a custom target for running generators at buildtime: + std::string autogenTargetName = getAutogenTargetName(target); + +@@ -352,7 +354,13 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg, + { + toolNames.push_back("rcc"); + } +- ++ /* AUTOSTATICPLUGINS .cpp files are created at cmake execution time, ++ * and not at build time, so in that case it is possible to get here ++ * with no toolNames. */ ++ if (!toolNames.size()) ++ { ++ return true; ++ } + std::string tools = toolNames[0]; + toolNames.erase(toolNames.begin()); + while (toolNames.size() > 1) +@@ -563,7 +571,9 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) + + if (target->GetPropertyAsBool("AUTOMOC") + || target->GetPropertyAsBool("AUTOUIC") +- || target->GetPropertyAsBool("AUTORCC")) ++ || target->GetPropertyAsBool("AUTORCC") ++ || ( target->GetPropertyAsBool("AUTOSTATICPLUGINS") ++ && target->GetType() == cmTarget::EXECUTABLE)) + { + this->SetupSourceFiles(target); + } +@@ -738,6 +748,57 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) + { + const_cast(target)->AddSource(*fileIt); + } ++ ++ /* in qt5-static/lib/cmake/Qt5Core/Qt5CoreConfig.cmake, macro(_populate_Core_plugin_properties ..), we'd have: ++ * set_property(TARGET PROPERTY AUTOSTATICPLUGINS True) // Not currently need as defaults to "ON" ++ * set_property(TARGET Qt5::Core APPEND PROPERTY STATIC_PLUGINS ${Plugin}) ++ */ ++ if (target->GetPropertyAsBool("AUTOSTATICPLUGINS")) ++ { ++ std::vector libTargets = target->GetLinkImplementationClosure(""); ++ std::vector::const_iterator li; ++ std::vector staticPlugins; ++ for (li = libTargets.begin(); li != libTargets.end(); ++li) ++ { ++ cmTarget const* tgt = *li; ++ const char *staticPluginsProp = tgt->GetProperty("STATIC_PLUGINS"); ++ if (staticPluginsProp) ++ { ++ std::vector staticPluginsTgt = cmSystemTools::tokenize(staticPluginsProp, ";"); ++ for (std::vector::const_iterator spti = staticPluginsTgt.begin(); spti != staticPluginsTgt.end(); ++spti) ++ { ++ if (std::find(staticPlugins.begin(), staticPlugins.end(), *spti) == staticPlugins.end()) ++ { ++ staticPlugins.push_back(*spti); ++ } ++ } ++ } ++ } ++ ++ if (staticPlugins.size()) ++ { ++ std::string static_plugins_output_dir = target->GetSupportDirectory(); ++ cmSystemTools::MakeDirectory(static_plugins_output_dir.c_str()); ++ std::string static_plugins_output_file = static_plugins_output_dir; ++ static_plugins_output_file += "/" + target->GetName() + "_plugin_import.cpp"; ++ cmGeneratedFileStream ++ staticPluginsFileStream(static_plugins_output_file.c_str()); ++ if(staticPluginsFileStream) ++ { ++ staticPluginsFileStream << "// This file is autogenerated by cmake. It imports static plugin classes for" << std::endl; ++ staticPluginsFileStream << "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS. variables." << std::endl; ++ staticPluginsFileStream << "#include " << std::endl; ++ for (std::vector::const_iterator spti = staticPlugins.begin(); spti != staticPlugins.end(); ++spti) ++ { ++ staticPluginsFileStream << "Q_IMPORT_PLUGIN(" << *spti << ")" << std::endl; ++ } ++ staticPluginsFileStream.Close(); ++ makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", ++ static_plugins_output_file.c_str(), false); ++ const_cast(target)->AddSource(static_plugins_output_file); ++ } ++ } ++ } + } + + void cmQtAutoGenerators::SetupAutoMocTarget(cmTarget const* target, +diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx +index cf33791..04c3907 100644 +--- a/Source/cmTarget.cxx ++++ b/Source/cmTarget.cxx +@@ -328,6 +328,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) + this->SetPropertyDefault("AUTOMOC", 0); + this->SetPropertyDefault("AUTOUIC", 0); + this->SetPropertyDefault("AUTORCC", 0); ++ this->SetPropertyDefault("AUTOSTATICPLUGINS", 0); + this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0); + this->SetPropertyDefault("AUTOUIC_OPTIONS", 0); + this->SetPropertyDefault("AUTORCC_OPTIONS", 0); +@@ -1681,6 +1682,7 @@ static bool whiteListedInterfaceProperty(const std::string& prop) + builtIns.insert("IMPORTED"); + builtIns.insert("NAME"); + builtIns.insert("TYPE"); ++ builtIns.insert("STATIC_PLUGINS"); + } + + if (builtIns.count(prop)) +-- +2.5.0 + diff --git a/mingw-w64-cmake-git/0003-Output-line-numbers-in-callstacks.patch b/mingw-w64-cmake-git/0003-Output-line-numbers-in-callstacks.patch new file mode 100644 index 0000000000..c099fe0cc6 --- /dev/null +++ b/mingw-w64-cmake-git/0003-Output-line-numbers-in-callstacks.patch @@ -0,0 +1,25 @@ +From 33ca9451c44bfc7d0aa7214ed30365f502293c03 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 3 Aug 2015 22:00:17 +0100 +Subject: [PATCH 3/3] Output line numbers in callstacks + +--- + Source/cmMakefile.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx +index 4bdc9d5..91ac920 100644 +--- a/Source/cmMakefile.cxx ++++ b/Source/cmMakefile.cxx +@@ -4393,7 +4393,7 @@ std::string cmMakefile::FormatListFileStack() const + cmState::Snapshot snp = this->StateSnapshot; + while (snp.IsValid()) + { +- listFiles.push_back(snp.GetExecutionListFile()); ++ listFiles.push_back(snp.GetExecutionListFile() + ":" + static_cast( &(std::ostringstream() << snp.GetEntryPointLine()) )->str()); + snp = snp.GetCallStackParent(); + } + std::reverse(listFiles.begin(), listFiles.end()); +-- +2.5.0 + diff --git a/mingw-w64-cmake-git/PKGBUILD b/mingw-w64-cmake-git/PKGBUILD index 3130420fd1..7a853a050a 100644 --- a/mingw-w64-cmake-git/PKGBUILD +++ b/mingw-w64-cmake-git/PKGBUILD @@ -1,15 +1,18 @@ # Maintainer: Martell Malone +# Maintainer: Ray Donnelly _realname=cmake - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r25180.3bbdb23 +pkgver=r29057.863b0a8 pkgrel=1 -pkgdesc="A cross-platform open-source make system (mingw-w64)." +pkgdesc="A cross-platform open-source make system (mingw-w64)" arch=('any') url="http://www.cmake.org/" license=("MIT") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-qt5") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-qt5-static" + "git") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-winpthreads" @@ -19,16 +22,15 @@ depends=("${MINGW_PACKAGE_PREFIX}-winpthreads" "${MINGW_PACKAGE_PREFIX}-ncurses" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-zlib") -optdepends=("${MINGW_PACKAGE_PREFIX}-qt5: CMake Qt GUI") -options=('staticlibs' 'strip') +options=('staticlibs' '!strip' 'debug') source=("${_realname}"::"git+http://cmake.org/cmake.git" - 'disable-response-files-for-msys.patch' - 'dont-install-bundle.patch' - 'wxWidgets-module.patch') + '0001-Disable-response-files-for-MSYS-Generator.patch' + '0002-Implement-Qt5-static-plugin-support.patch' + '0003-Output-line-numbers-in-callstacks.patch') md5sums=('SKIP' - 'cdd0c24ffdad5e175a731ddc9781a123' - 'fb33ace70ba863159b2c7964a9661e1e' - '09ea9092ca85e482de79886bd0c09144') + 'c880b071cda707214c100ecf5ad7f0bd' + 'b3501cf1e0d93a4185ca5962d5dcc102' + 'f8fb995735aab8307f8c1cffedcf9514') pkgver() { cd "$srcdir/$_realname" @@ -37,39 +39,45 @@ pkgver() { prepare() { cd ${_realname} - patch -Np1 -i ${srcdir}/disable-response-files-for-msys.patch - patch -Np1 -i ${srcdir}/dont-install-bundle.patch - patch -Np1 -i ${srcdir}/wxWidgets-module.patch + git am "${srcdir}"/0001-Disable-response-files-for-MSYS-Generator.patch + git am "${srcdir}"/0002-Implement-Qt5-static-plugin-support.patch + git am "${srcdir}"/0003-Output-line-numbers-in-callstacks.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_LIB=`pwd -W` - popd > /dev/null - mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - MSYSTEM=MINGW "${srcdir}"/${_realname}/configure \ - --prefix=${PREFIX_LIB} \ - --system-libs \ - --no-system-expat \ - --qt-gui \ - --parallel=3 \ - --mandir=share \ - --docdir=share/doc/cmake - +# Not working yet .. +# PATH=${MINGW_PREFIX}/qt5-static/bin:$PATH \ + + MSYSTEM=MINGW "${srcdir}"/${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --system-libs \ + --no-system-expat \ + --qt-qmake=$(cygpath -m ${MINGW_PREFIX})/qt5-static/bin/qmake.exe \ + --no-qt-gui \ + --parallel=${NUMBER_OF_PROCESSORS} \ + --mandir=share \ + --docdir=share/doc/cmake + plain "Start building..." - make + make VERBOSE=1 } package() { - mkdir -p "${pkgdir}${MINGW_PREFIX}" - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - cd "${srcdir}/build-${CARCH}" - ./bin/cmake.exe -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} -P cmake_install.cmake + ./bin/cmake.exe -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} -P cmake_install.cmake } + +# .. qt5-static stuff .. +# E:/m2/repo/mingw-w64-cmake-git/src/cmake/Source/QtDialog/CMakeLists.txt(159): target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES} ) +# /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Bootstrap.cmk/cmake.exe -E cmake_depends "MSYS Makefiles" /E/m2/repo/mingw-w64-cmake-git/src/cmake /E/m2/repo/mingw-w64-cmake-git/src/cmake/Source/QtDialog /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64 /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Source/QtDialog /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Source/QtDialog/CMakeFiles/cmake-gui.dir/DependInfo.cmake --color= +# make -f Source/QtDialog/CMakeFiles/cmake-gui.dir/build.make Source/QtDialog/CMakeFiles/cmake-gui.dir/build +# cd /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Source/QtDialog && /E/msys64t/mingw64/bin/g++.exe -march=x86-64 -mtune=generic -O2 -pipe -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W -Wshadow -Wpointer-arith -Wformat-security -Wundef -fPIC -pipe -mwindows -Wl,--whole-archive CMakeFiles/cmake-gui.dir/objects.a -Wl,--no-whole-archive -o ../../bin/cmake-gui.exe -Wl,--out-implib,../../bin/libcmake-gui.dll.a -Wl,--major-image-version,0,--minor-image-version,0 ../libCMakeLib.a /E/msys64t/mingw64/qt5-static/lib/libqtmain.a /E/msys64t/mingw64/qt5-static/lib/libQt5Widgets.a ../kwsys/libcmsys.a -lPsapi ../../Utilities/cmexpat/libcmexpat.a /E/msys64t/mingw64/lib/libz.dll.a /E/msys64t/mingw64/lib/libarchive.dll.a ../../Utilities/cmcompress/libcmcompress.a /E/msys64t/mingw64/lib/libcurl.dll.a /E/msys64t/mingw64/lib/libjsoncpp.a -lrpcrt4 /E/msys64t/mingw64/qt5-static/lib/libQt5Gui.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqdds.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqicns.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqico.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqjp2.a -ljasper /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqminimal.a -lQt5PlatformSupport -lQt5DBus -lnetapi32 -lqtfreetype /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqmng.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqoffscreen.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtga.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtiff.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/generic/libqtuiotouchplugin.a -lQt5Network -ldnsapi -lssl -lcrypto -lcrypt32 /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwbmp.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwebp.a -lwebp /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqwindows.a -lwinspool -lshlwapi -lQt5PlatformSupport -lQt5DBus -lnetapi32 -lqtfreetype /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqmng.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqoffscreen.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtga.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtiff.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/generic/libqtuiotouchplugin.a -lQt5Network -ldnsapi -lssl -lcrypto -lcrypt32 /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwbmp.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwebp.a -lwebp /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqwindows.a -lwinspool -lshlwapi /E/msys64t/mingw64/qt5-static/lib/libQt5Core.a -lws2_32 -static -L$[QT_INSTALL_LIBS] -lQt5Gui -lcomdlg32 -loleaut32 -limm32 -lwinmm -lglu32 -lopengl32 -lgdi32 -lqtharfbuzzng -lQt5Core -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -lqtpcre -lshell32 -luser32 -lkernel32 -lmpr -lqtpcre -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 +# [ 63%] Linking CXX executable ../../bin/cmake-gui.exe +# cd /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Source/QtDialog && /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Bootstrap.cmk/cmake.exe -E remove -f CMakeFiles/cmake-gui.dir/objects.a +# cd /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Source/QtDialog && /E/msys64t/mingw64/bin/ar.exe cr CMakeFiles/cmake-gui.dir/objects.a "CMakeFiles/cmake-gui.dir/AddCacheEntry.cxx.obj" "CMakeFiles/cmake-gui.dir/CMakeSetup.cxx.obj" "CMakeFiles/cmake-gui.dir/CMakeSetupDialog.cxx.obj" "CMakeFiles/cmake-gui.dir/FirstConfigure.cxx.obj" "CMakeFiles/cmake-gui.dir/QCMake.cxx.obj" "CMakeFiles/cmake-gui.dir/QCMakeCacheView.cxx.obj" "CMakeFiles/cmake-gui.dir/QCMakeWidgets.cxx.obj" "CMakeFiles/cmake-gui.dir/moc_AddCacheEntry.cpp.obj" "CMakeFiles/cmake-gui.dir/moc_Compilers.cpp.obj" "CMakeFiles/cmake-gui.dir/moc_CMakeSetupDialog.cpp.obj" "CMakeFiles/cmake-gui.dir/moc_FirstConfigure.cpp.obj" "CMakeFiles/cmake-gui.dir/moc_QCMake.cpp.obj" "CMakeFiles/cmake-gui.dir/moc_QCMakeCacheView.cpp.obj" "CMakeFiles/cmake-gui.dir/moc_QCMakeWidgets.cpp.obj" "CMakeFiles/cmake-gui.dir/qrc_CMakeSetup.cpp.obj" "CMakeFiles/cmake-gui.dir/CMakeSetup.rc.obj" +# cd /E/m2/repo/mingw-w64-cmake-git/src/build-x86_64/Source/QtDialog && /E/msys64t/mingw64/bin/g++.exe -march=x86-64 -mtune=generic -O2 -pipe -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W -Wshadow -Wpointer-arith -Wformat-security -Wundef -fPIC -pipe -mwindows -Wl,--whole-archive CMakeFiles/cmake-gui.dir/objects.a -Wl,--no-whole-archive -o ../../bin/cmake-gui.exe -Wl,--out-implib,../../bin/libcmake-gui.dll.a -Wl,--major-image-version,0,--minor-image-version,0 ../libCMakeLib.a /E/msys64t/mingw64/qt5-static/lib/libqtmain.a /E/msys64t/mingw64/qt5-static/lib/libQt5Widgets.a ../kwsys/libcmsys.a -lPsapi ../../Utilities/cmexpat/libcmexpat.a /E/msys64t/mingw64/lib/libz.dll.a /E/msys64t/mingw64/lib/libarchive.dll.a ../../Utilities/cmcompress/libcmcompress.a /E/msys64t/mingw64/lib/libcurl.dll.a /E/msys64t/mingw64/lib/libjsoncpp.a -lrpcrt4 /E/msys64t/mingw64/qt5-static/lib/libQt5Gui.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqdds.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqicns.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqico.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqjp2.a -ljasper /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqminimal.a -lQt5PlatformSupport -lQt5DBus -lnetapi32 -lqtfreetype /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqmng.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqoffscreen.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtga.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtiff.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/generic/libqtuiotouchplugin.a -lQt5Network -ldnsapi -lssl -lcrypto -lcrypt32 /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwbmp.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwebp.a -lwebp /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqwindows.a -lwinspool -lshlwapi -lQt5PlatformSupport -lQt5DBus -lnetapi32 -lqtfreetype /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqmng.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqoffscreen.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtga.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqtiff.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/generic/libqtuiotouchplugin.a -lQt5Network -ldnsapi -lssl -lcrypto -lcrypt32 /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwbmp.a /E/msys64t/mingw64/qt5-static/share/qt5/plugins/imageformats/libqwebp.a -lwebp /E/msys64t/mingw64/qt5-static/share/qt5/plugins/platforms/libqwindows.a -lwinspool -lshlwapi /E/msys64t/mingw64/qt5-static/lib/libQt5Core.a -lws2_32 -static -L$[QT_INSTALL_LIBS] -lQt5Gui -lcomdlg32 -loleaut32 -limm32 -lwinmm -lglu32 -lopengl32 -lgdi32 -lqtharfbuzzng -lQt5Core -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -lqtpcre -lshell32 -luser32 -lkernel32 -lmpr -lqtpcre -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 +# +# -L$[QT_INSTALL_LIBS] seems to be missing something. diff --git a/mingw-w64-cmake-git/dont-install-bundle.patch b/mingw-w64-cmake-git/dont-install-bundle.patch deleted file mode 100644 index 541e74c617..0000000000 --- a/mingw-w64-cmake-git/dont-install-bundle.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cmake-2.8.12.2/Source/QtDialog/CMakeLists.txt.orig 2014-04-24 10:45:16.178600000 +0400 -+++ cmake-2.8.12.2/Source/QtDialog/CMakeLists.txt 2014-04-24 10:45:23.198600000 +0400 -@@ -140,7 +140,7 @@ - WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)") - endif() - --if(APPLE OR WIN32) -+if(APPLE OR WIN32 AND NOT MINGW) - # install rules for including 3rd party libs such as Qt - # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation - set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}") diff --git a/mingw-w64-cmake-git/wxWidgets-module.patch b/mingw-w64-cmake-git/wxWidgets-module.patch deleted file mode 100644 index 3872f35373..0000000000 --- a/mingw-w64-cmake-git/wxWidgets-module.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur cmake-3.0.1.orig/Modules/FindwxWidgets.cmake cmake-3.0.1.wxfix/Modules/FindwxWidgets.cmake ---- cmake-3.0.1.orig/Modules/FindwxWidgets.cmake 2014-07-31 10:03:56.000000000 -0500 -+++ cmake-3.0.1.wxfix/Modules/FindwxWidgets.cmake 2014-08-14 12:02:11.604331400 -0500 -@@ -792,6 +792,10 @@ - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-I" "" - wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") -+ -+ # Flags are a string, not a list, fix it here -+ string(REPLACE ";" " " -+ wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - - DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") - DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") diff --git a/mingw-w64-cmake/PKGBUILD b/mingw-w64-cmake/PKGBUILD index 03d5cc4b91..b79666687a 100644 --- a/mingw-w64-cmake/PKGBUILD +++ b/mingw-w64-cmake/PKGBUILD @@ -1,47 +1,53 @@ # Maintainer: Alexey Pavlov _realname=cmake +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.0.2 +pkgver=3.4.1 pkgrel=1 -pkgdesc="A cross-platform open-source make system (mingw-w64)." +pkgdesc="A cross-platform open-source make system (mingw-w64)" arch=('any') url="http://www.cmake.org/" license=("MIT") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-qt5") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-qt5") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-libarchive" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-jsoncpp" + "${MINGW_PACKAGE_PREFIX}-libarchive" + "${MINGW_PACKAGE_PREFIX}-zlib") optdepends=("${MINGW_PACKAGE_PREFIX}-qt5: CMake Qt GUI") -options=('staticlibs' 'strip') -source=("http://www.cmake.org/files/v3.0/${_realname}-${pkgver}.tar.gz" +options=('staticlibs') # '!strip' 'debug' +source=("http://www.cmake.org/files/v${pkgver%.*}/${_realname}-${pkgver}.tar.gz" "disable-response-files-for-msys.patch" "dont-install-bundle.patch" - "wxWidgets-module.patch") -md5sums=('db4c687a31444a929d2fdc36c4dfb95f' - 'b715f7d6859ce82a0a1824592ab2a448' - 'fb33ace70ba863159b2c7964a9661e1e' - '09ea9092ca85e482de79886bd0c09144') + "qt5-static-plugin-support.patch" + "pkg-config-without-prefix.patch" + "do-not-generate-import-library-for-executables.patch") +md5sums=('73acda0d33be9b2729af99893d99a012' + '3b0eb07bb98ea9b8e8482e4936971013' + '3e70d2e8a616402163d52ac512059c68' + 'b2eb8c3d2036adfa3d48a40980a241cb' + 'a55c5c6231fc953bad5600c3bb49667b' + '3105d5c805111cd4db89a4c743ed18fe') prepare() { cd ${_realname}-${pkgver} patch -Np1 -i ${srcdir}/disable-response-files-for-msys.patch patch -Np1 -i ${srcdir}/dont-install-bundle.patch - patch -Np1 -i ${srcdir}/wxWidgets-module.patch + patch -Np1 -i ${srcdir}/qt5-static-plugin-support.patch + patch -Np1 -i ${srcdir}/pkg-config-without-prefix.patch + patch -Np1 -i ${srcdir}/do-not-generate-import-library-for-executables.patch } build() { - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_LIB=`pwd -W` - popd > /dev/null - mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" MSYSTEM=MINGW "${srcdir}"/${_realname}-${pkgver}/configure \ - --prefix=${PREFIX_LIB} \ + --prefix=${MINGW_PREFIX} \ --system-libs \ --no-system-expat \ --qt-gui \ @@ -54,11 +60,6 @@ build() { } package() { - mkdir -p "${pkgdir}${MINGW_PREFIX}" - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - cd "${srcdir}/build-${MINGW_CHOST}" - ./bin/cmake.exe -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} -P cmake_install.cmake + ./bin/cmake.exe -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} -P cmake_install.cmake } diff --git a/mingw-w64-cmake/disable-response-files-for-msys.patch b/mingw-w64-cmake/disable-response-files-for-msys.patch index ef72a91458..f218f041e9 100644 --- a/mingw-w64-cmake/disable-response-files-for-msys.patch +++ b/mingw-w64-cmake/disable-response-files-for-msys.patch @@ -1,13 +1,15 @@ ---- cmake-2.8.12.2/Modules/Platform/Windows-GNU.cmake.orig 2014-01-30 23:55:26.783200000 +0400 -+++ cmake-2.8.12.2/Modules/Platform/Windows-GNU.cmake 2014-01-31 00:03:27.411200000 +0400 -@@ -86,8 +86,10 @@ +--- cmake-3.3.2/Modules/Platform/Windows-GNU.cmake.orig 2015-09-16 19:53:05.000000000 +0300 ++++ cmake-3.3.2/Modules/Platform/Windows-GNU.cmake 2015-10-22 10:50:03.463924000 +0300 +@@ -84,9 +84,11 @@ set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") - set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE}) +- set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE}) - set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1) -+ if(NOT CMAKE_GENERATOR STREQUAL "MSYS Makefiles" OR CMAKE_NEED_RESPOSE) ++ if(NOT CMAKE_GENERATOR STREQUAL "MSYS Makefiles" OR CMAKE_NEED_RESPONSE) + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE}) ++ set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE}) + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1) + endif() diff --git a/mingw-w64-cmake/do-not-generate-import-library-for-executables.patch b/mingw-w64-cmake/do-not-generate-import-library-for-executables.patch new file mode 100644 index 0000000000..7c0d117dd1 --- /dev/null +++ b/mingw-w64-cmake/do-not-generate-import-library-for-executables.patch @@ -0,0 +1,11 @@ +--- cmake-3.3.2/Modules/Platform/Windows-GNU.cmake.orig 2015-09-16 19:53:05.000000000 +0300 ++++ cmake-3.3.2/Modules/Platform/Windows-GNU.cmake 2015-10-22 10:50:03.463924000 +0300 +@@ -115,7 +117,7 @@ + set(CMAKE_${lang}_CREATE_SHARED_LIBRARY + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") + set(CMAKE_${lang}_LINK_EXECUTABLE +- " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") ++ " -o ${CMAKE_GNULD_IMAGE_VERSION} ") + + list(APPEND CMAKE_${lang}_ABI_FILES "Platform/Windows-GNU-${lang}-ABI") + diff --git a/mingw-w64-cmake/dont-install-bundle.patch b/mingw-w64-cmake/dont-install-bundle.patch index 541e74c617..1b24a51e35 100644 --- a/mingw-w64-cmake/dont-install-bundle.patch +++ b/mingw-w64-cmake/dont-install-bundle.patch @@ -1,11 +1,11 @@ ---- cmake-2.8.12.2/Source/QtDialog/CMakeLists.txt.orig 2014-04-24 10:45:16.178600000 +0400 -+++ cmake-2.8.12.2/Source/QtDialog/CMakeLists.txt 2014-04-24 10:45:23.198600000 +0400 -@@ -140,7 +140,7 @@ - WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)") +--- cmake-3.4.1/Source/QtDialog/CMakeLists.txt.orig 2015-12-07 15:53:12.279129300 +0100 ++++ cmake-3.4.1/Source/QtDialog/CMakeLists.txt 2015-12-07 15:56:52.484583000 +0100 +@@ -207,7 +207,7 @@ + " ${COMPONENT}) endif() --if(APPLE OR WIN32) -+if(APPLE OR WIN32 AND NOT MINGW) +-if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32)) ++if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32) AND NOT MINGW) # install rules for including 3rd party libs such as Qt # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}") diff --git a/mingw-w64-cmake/pkg-config-without-prefix.patch b/mingw-w64-cmake/pkg-config-without-prefix.patch new file mode 100644 index 0000000000..1860ffe074 --- /dev/null +++ b/mingw-w64-cmake/pkg-config-without-prefix.patch @@ -0,0 +1,17 @@ +--- cmake-3.2.3/Modules/FindPkgConfig.cmake.orig 2015-07-14 09:18:44.905200000 +0300 ++++ cmake-3.2.3/Modules/FindPkgConfig.cmake 2015-07-14 09:19:05.606400000 +0300 +@@ -67,8 +67,13 @@ + macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) + set(_pkgconfig_invoke_result) + ++ if (PKG_CONFIG_WITHOUT_PREFIX) ++ set(_pkgconfig_extra_arg "--dont-define-prefix") ++ else() ++ set(_pkgconfig_extra_arg "") ++ endif() + execute_process( +- COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist} ++ COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkgconfig_extra_arg} ${ARGN} ${_pkglist} + OUTPUT_VARIABLE _pkgconfig_invoke_result + RESULT_VARIABLE _pkgconfig_failed) + diff --git a/mingw-w64-cmake/qt5-static-plugin-support.patch b/mingw-w64-cmake/qt5-static-plugin-support.patch new file mode 100644 index 0000000000..e3b5a1072b --- /dev/null +++ b/mingw-w64-cmake/qt5-static-plugin-support.patch @@ -0,0 +1,126 @@ +diff -Naur cmake-3.4.1.orig/Source/cmGlobalGenerator.cxx cmake-3.4.1/Source/cmGlobalGenerator.cxx +--- cmake-3.4.1.orig/Source/cmGlobalGenerator.cxx 2015-12-02 16:43:21.000000000 +0100 ++++ cmake-3.4.1/Source/cmGlobalGenerator.cxx 2015-12-07 22:43:50.804803400 +0100 +@@ -1432,7 +1432,8 @@ + } + if((!ti->second.GetPropertyAsBool("AUTOMOC") + && !ti->second.GetPropertyAsBool("AUTOUIC") +- && !ti->second.GetPropertyAsBool("AUTORCC")) ++ && !ti->second.GetPropertyAsBool("AUTORCC") ++ && !ti->second.GetPropertyAsBool("AUTOSTATICPLUGINS")) + || ti->second.IsImported()) + { + continue; +diff -Naur cmake-3.4.1.orig/Source/cmQtAutoGeneratorInitializer.cxx cmake-3.4.1/Source/cmQtAutoGeneratorInitializer.cxx +--- cmake-3.4.1.orig/Source/cmQtAutoGeneratorInitializer.cxx 2015-12-02 16:43:22.000000000 +0100 ++++ cmake-3.4.1/Source/cmQtAutoGeneratorInitializer.cxx 2015-12-08 01:16:20.424623700 +0100 +@@ -13,6 +13,7 @@ + + #include "cmQtAutoGeneratorInitializer.h" + ++#include "cmGeneratedFileStream.h" + #include "cmLocalGenerator.h" + #include "cmMakefile.h" + #include "cmSourceFile.h" +@@ -255,7 +256,13 @@ + { + toolNames.push_back("rcc"); + } +- ++ /* AUTOSTATICPLUGINS .cpp files are created at cmake execution time, ++ * and not at build time, so in that case it is possible to get here ++ * with no toolNames. */ ++ if (toolNames.empty()) ++ { ++ return; ++ } + std::string tools = toolNames[0]; + toolNames.erase(toolNames.begin()); + while (toolNames.size() > 1) +@@ -477,7 +484,9 @@ + + if (target->GetPropertyAsBool("AUTOMOC") + || target->GetPropertyAsBool("AUTOUIC") +- || target->GetPropertyAsBool("AUTORCC")) ++ || target->GetPropertyAsBool("AUTORCC") ++ || ( target->GetPropertyAsBool("AUTOSTATICPLUGINS") ++ && target->GetType() == cmTarget::EXECUTABLE)) + { + cmQtAutoGeneratorInitializer::SetupSourceFiles(target, skipMoc, + mocSources, mocHeaders, skipUic); +@@ -649,6 +658,56 @@ + { + const_cast(target)->AddSource(*fileIt); + } ++ /* in qt5-static/lib/cmake/Qt5Core/Qt5CoreConfig.cmake, macro(_populate_Core_plugin_properties ..), we'd have: ++ * set_property(TARGET PROPERTY AUTOSTATICPLUGINS True) // Not currently need as defaults to "ON" ++ * set_property(TARGET Qt5::Core APPEND PROPERTY STATIC_PLUGINS ${Plugin}) ++ */ ++ if (target->GetPropertyAsBool("AUTOSTATICPLUGINS")) ++ { ++ std::vector libTargets = gtgt->GetLinkImplementationClosure(""); ++ std::vector::const_iterator li; ++ std::vector staticPlugins; ++ for (li = libTargets.begin(); li != libTargets.end(); ++li) ++ { ++ cmTarget const* tgt = *li; ++ const char *staticPluginsProp = tgt->GetProperty("STATIC_PLUGINS"); ++ if (staticPluginsProp) ++ { ++ std::vector staticPluginsTgt = cmSystemTools::tokenize(staticPluginsProp, ";"); ++ for (std::vector::const_iterator spti = staticPluginsTgt.begin(); spti != staticPluginsTgt.end(); ++spti) ++ { ++ if (std::find(staticPlugins.begin(), staticPlugins.end(), *spti) == staticPlugins.end()) ++ { ++ staticPlugins.push_back(*spti); ++ } ++ } ++ } ++ } ++ ++ if (staticPlugins.size()) ++ { ++ std::string static_plugins_output_dir = target->GetSupportDirectory(); ++ cmSystemTools::MakeDirectory(static_plugins_output_dir.c_str()); ++ std::string static_plugins_output_file = static_plugins_output_dir; ++ static_plugins_output_file += "/" + target->GetName() + "_plugin_import.cpp"; ++ cmGeneratedFileStream ++ staticPluginsFileStream(static_plugins_output_file.c_str()); ++ if(staticPluginsFileStream) ++ { ++ staticPluginsFileStream << "// This file is autogenerated by cmake. It imports static plugin classes for" << std::endl; ++ staticPluginsFileStream << "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS. variables." << std::endl; ++ staticPluginsFileStream << "#include " << std::endl; ++ for (std::vector::const_iterator spti = staticPlugins.begin(); spti != staticPlugins.end(); ++spti) ++ { ++ staticPluginsFileStream << "Q_IMPORT_PLUGIN(" << *spti << ")" << std::endl; ++ } ++ staticPluginsFileStream.Close(); ++ makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", ++ static_plugins_output_file.c_str(), false); ++ const_cast(target)->AddSource(static_plugins_output_file); ++ } ++ } ++ } + } + + void cmQtAutoGeneratorInitializer::SetupAutoMocTarget(cmTarget const* target, +diff -Naur cmake-3.4.1.orig/Source/cmTarget.cxx cmake-3.4.1/Source/cmTarget.cxx +--- cmake-3.4.1.orig/Source/cmTarget.cxx 2015-12-02 16:43:22.000000000 +0100 ++++ cmake-3.4.1/Source/cmTarget.cxx 2015-12-07 22:38:57.046997600 +0100 +@@ -229,6 +229,7 @@ + this->SetPropertyDefault("AUTOMOC", 0); + this->SetPropertyDefault("AUTOUIC", 0); + this->SetPropertyDefault("AUTORCC", 0); ++ this->SetPropertyDefault("AUTOSTATICPLUGINS", 0); + this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0); + this->SetPropertyDefault("AUTOUIC_OPTIONS", 0); + this->SetPropertyDefault("AUTORCC_OPTIONS", 0); +@@ -1564,6 +1565,7 @@ + builtIns.insert("IMPORTED"); + builtIns.insert("NAME"); + builtIns.insert("TYPE"); ++ builtIns.insert("STATIC_PLUGINS"); + } + + if (builtIns.count(prop)) diff --git a/mingw-w64-cmake/wxWidgets-module.patch b/mingw-w64-cmake/wxWidgets-module.patch deleted file mode 100644 index 3872f35373..0000000000 --- a/mingw-w64-cmake/wxWidgets-module.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur cmake-3.0.1.orig/Modules/FindwxWidgets.cmake cmake-3.0.1.wxfix/Modules/FindwxWidgets.cmake ---- cmake-3.0.1.orig/Modules/FindwxWidgets.cmake 2014-07-31 10:03:56.000000000 -0500 -+++ cmake-3.0.1.wxfix/Modules/FindwxWidgets.cmake 2014-08-14 12:02:11.604331400 -0500 -@@ -792,6 +792,10 @@ - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-I" "" - wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") -+ -+ # Flags are a string, not a list, fix it here -+ string(REPLACE ";" " " -+ wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - - DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") - DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") diff --git a/mingw-w64-cocos2dx-console-git/PKGBUILD b/mingw-w64-cocos2dx-console-git/PKGBUILD index b2d0e24f47..6d254a0efc 100644 --- a/mingw-w64-cocos2dx-console-git/PKGBUILD +++ b/mingw-w64-cocos2dx-console-git/PKGBUILD @@ -2,7 +2,7 @@ _realname=cocos2d-x-console pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r452.8e158e1 +pkgver=r470.037a13f pkgrel=1 pkgdesc="cocos2d command line tool (mingw-w64)" arch=('any') @@ -12,9 +12,11 @@ provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-cocos2d-x" "${MINGW_PACKAGE_PREFIX}-cmake") +makedepends=('git') options=('staticlibs' 'strip') -source=("${_realname}"::"git+git://github.com/martell/cocos2d-console.git#branch=msys2") +source=(#"${_realname}"::"git+git://github.com/martell/cocos2d-console.git#branch=msys2") + "${_realname}"::"git+git://github.com/cocos2d/cocos2d-console.git") md5sums=('SKIP') pkgver() { @@ -23,12 +25,31 @@ pkgver() { } prepare() { - + cd "$srcdir/$_realname" + + #patch the location of cococs2d.ini + #sed -i "s|os.path.join(cocos2d_path, \"cocos2d.ini\")|\"${MINGW_PREFIX}/share/cocos2d-x/console/cocos2d.ini\"|g" $srcdir/$_realname/bin/cocos.py + sed -i "s|~/.cocos2d-js/cocos2d.ini|${MINGW_PREFIX}/share/cocos2d-x/console/cocos2d.ini|g" $srcdir/$_realname/bin/cocos.py + + #we use python2 not python ;) + sed -i "s|exec python|exec /usr/bin/python2|g" $srcdir/$_realname/bin/cocos + sed -i "s|#!/usr/bin/python|#!/usr/bin/python2|g" $srcdir/$_realname/bin/cocos.py + + #maybe i should just create a new cocos script + #fixup cocos + sed -i "s|exec python|exec /usr/bin/python2|g" $srcdir/$_realname/bin/cocos + sed -i "s|\$COCOS_CONSOLE_BIN_DIRECTORY/cocos.py|${MINGW_PREFIX}/bin/cocos.py|g" $srcdir/$_realname/bin/cocos + } -#build() { -# cd "$srcdir/$_realname/cocos" -#} +build() { + cd "$srcdir/$_realname" + + #set the location of the templates + sed -i "s|templates=|templates=${MINGW_PREFIX}/share/cocos2d-x/templates|g" $srcdir/$_realname/bin/cocos2d.ini + sed -i "s|plugins=../plugins|plugins=${MINGW_PREFIX}/share/cocos2d-x/console/plugins|g" $srcdir/$_realname/bin/cocos2d.ini + +} package() { mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" diff --git a/mingw-w64-cocos2dx-git/PKGBUILD b/mingw-w64-cocos2dx-git/PKGBUILD index 93930dc3aa..91c4a3482a 100644 --- a/mingw-w64-cocos2dx-git/PKGBUILD +++ b/mingw-w64-cocos2dx-git/PKGBUILD @@ -2,67 +2,71 @@ _realname=cocos2d-x pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r25276.596537e +pkgver=r33416.d371ec2 +_deps_ver=75 pkgrel=1 pkgdesc="Open source game framework written in C++ (mingw-w64)." arch=('any') url="http://www.cocos2d-x.org/" license=("MIT") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "make" ${MINGW_PACKAGE_PREFIX}-cmake) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "make" "${MINGW_PACKAGE_PREFIX}-cmake" "git") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -depends=("${MINGW_PACKAGE_PREFIX}-glfw" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-box2d" - "${MINGW_PACKAGE_PREFIX}-chipmunk" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-tinyxml2" +depends=("${MINGW_PACKAGE_PREFIX}-box2d" + "${MINGW_PACKAGE_PREFIX}-bullet" + "${MINGW_PACKAGE_PREFIX}-chipmunk<7.0.0" "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-protobuf" + "${MINGW_PACKAGE_PREFIX}-flatbuffers" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-glfw" + "${MINGW_PACKAGE_PREFIX}-glew" + "${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libtiff" "${MINGW_PACKAGE_PREFIX}-libwebsockets" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-mpg123" + "${MINGW_PACKAGE_PREFIX}-tinyxml2" + "${MINGW_PACKAGE_PREFIX}-protobuf" "${MINGW_PACKAGE_PREFIX}-xxhash" + "${MINGW_PACKAGE_PREFIX}-openal" + "${MINGW_PACKAGE_PREFIX}-libvorbis" "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') - source=("${_realname}"::"git+git://github.com/cocos2d/cocos2d-x.git#branch=v3" - "http://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-20.tar.gz") - + "http://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-${_deps_ver}.tar.gz") md5sums=('SKIP' 'SKIP') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" - #git am "$srcdir/0001-mingw64-mirgrate-to-upstream-minizip.patch" - cp -r $srcdir/cocos2d-x-3rd-party-libs-bin-3-deps-20/. $srcdir/$_realname/external + #git am "${srcdir}/0001-mingw64-mirgrate-to-upstream-minizip.patch" + cp -r ${srcdir}/cocos2d-x-3rd-party-libs-bin-3-deps-${_deps_ver}/. ${srcdir}/${_realname}/external #we need to change glfw to mingw-glfw3 - sed -i "s/glfw3.h/GLFW\/glfw3.h/g" $srcdir/$_realname/cocos/platform/desktop/CCGLViewImpl-desktop.h - sed -i "s/glfw3native.h/GLFW\/glfw3native.h/g" $srcdir/$_realname/cocos/platform/desktop/CCGLViewImpl-desktop.h + #sed -i "s/glfw3.h/GLFW\/glfw3.h/g" ${srcdir}/$_realname/cocos/platform/desktop/CCGLViewImpl-desktop.h + #sed -i "s/glfw3native.h/GLFW\/glfw3native.h/g" $srcdir/$_realname/cocos/platform/desktop/CCGLViewImpl-desktop.h #sed -i "s/ft2build.h/freetype2\/ft2build.h/g" $srcdir/$_realname/cocos/2d/CCFontFreeType.h - sed -i "s/unzip.h/minizip\/unzip.h/g" $srcdir/$_realname/cocos/platform/CCFileUtils.cpp - sed -i "s/unzip.h/minizip\/unzip.h/g" $srcdir/$_realname/cocos/base/ZipUtils.cpp - sed -i "s/unzip.h/minizip\/unzip.h/g" $srcdir/$_realname/extensions/assets-manager/AssetsManager.cpp - sed -i "s/unzip.h/minizip\/unzip.h/g" $srcdir/$_realname/extensions/assets-manager/AssetsManagerEx.cpp + #sed -i "s/unzip.h/minizip\/unzip.h/g" ${srcdir}/${_realname}/cocos/platform/CCFileUtils.cpp + #sed -i "s/unzip.h/minizip\/unzip.h/g" ${srcdir}/${_realname}/cocos/base/ZipUtils.cpp + #sed -i "s/unzip.h/minizip\/unzip.h/g" ${srcdir}/${_realname}/extensions/assets-manager/AssetsManager.cpp + #sed -i "s/unzip.h/minizip\/unzip.h/g" ${srcdir}/${_realname}/extensions/assets-manager/AssetsManagerEx.cpp - sed -i "s/tinyxml2\/tinyxml2.h/tinyxml2.h/g" $srcdir/$_realname/cocos/editor-support/cocostudio/CCSGUIReader.cpp - #sed -i "s/decode.h/webp\/decode.h/g" $srcdir/$_realname/cocos/platform/CCImage.cpp + #sed -i "s/tinyxml2\/tinyxml2.h/tinyxml2.h/g" ${srcdir}/${_realname}/cocos/editor-support/cocostudio/CCSGUIReader.cpp + #sed -i "s/decode.h/webp\/decode.h/g" ${srcdir}/${_realname}/cocos/platform/CCImage.cpp #force depend on mingw-tinyxml2 - rm -rf $srcdir/$_realname/external/tinyxml2 - rm -rf $srcdir/$_realname/external/unzip + rm -rf ${srcdir}/${_realname}/external/tinyxml2 + rm -rf ${srcdir}/${_realname}/external/unzip } build() { @@ -71,23 +75,29 @@ build() { unset LDFLAGS CFLAGS CXXFLAGS - cmake -G"MSYS Makefiles" \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ -DDEBUG_MODE=OFF \ -DBUILD_LUA_LIBS=OFF \ -DBUILD_LUA_TESTS=OFF \ + -DBUILD_JS_LIBS=OFF \ + -DBUILD_JS_TESTS=OFF \ -DBUILD_CPP_TESTS=OFF \ -DBUILD_EDITOR_COCOSTUDIO=OFF \ -DBUILD_EDITOR_COCOSBUILDER=OFF \ -DBUILD_EDITOR_SPINE=OFF \ - ../$_realname - # -DBUILD_EXTERN_LIBS=OFF \ - make -j4 + -DUSE_RECAST=OFF \ + -DUSE_PREBUILT_LIBS=OFF \ + ../${_realname} + + make } package() { mkdir -p "${pkgdir}${MINGW_PREFIX}/include/cocos" mkdir -p "${pkgdir}${MINGW_PREFIX}/lib" - cd "$srcdir/$_realname/cocos" + cd "${srcdir}/${_realname}/cocos" cp -r ${srcdir}/build-${CARCH}/lib/. ${pkgdir}${MINGW_PREFIX}/lib #little helper because we don't want to pollute include with all the sub dirs ;) @@ -95,7 +105,7 @@ package() { #looks like we will pollute until the cocos devs change include structure #cocos/ find -type f \( -name "*.h*" -o -name "*.inl" \) -exec install -D {} ${pkgdir}${MINGW_PREFIX}/include/{} \; - + #put win32 into include because we are on windows cd "${pkgdir}${MINGW_PREFIX}/include" mv platform/win32/* . @@ -106,7 +116,7 @@ package() { # add extensions mkdir -p "${pkgdir}${MINGW_PREFIX}/include/extensions" - cd "$srcdir/$_realname/extensions" + cd "${srcdir}/${_realname}/extensions" find -type f \( -name "*.h*" -o -name "*.inl" \) -exec install -D {} ${pkgdir}${MINGW_PREFIX}/include/extensions/{} \; # install templates for cocos2d-console diff --git a/mingw-w64-codelite-git/PKGBUILD b/mingw-w64-codelite-git/PKGBUILD index 5f65944ee7..a18fde396e 100644 --- a/mingw-w64-codelite-git/PKGBUILD +++ b/mingw-w64-codelite-git/PKGBUILD @@ -1,41 +1,65 @@ # Maintainer: Alexey Pavlov _realname=codelite +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=6.1.1.165.g9806d8e +pkgver=9.0.313.gc621cd8 pkgrel=1 pkgdesc="Open-source, cross platform IDE for the C/C++ programming languages (mingw-w64)" arch=('any') license=('GPL') url="http://www.codelite.org" -depends=("${MINGW_PACKAGE_PREFIX}-hunspell" - "${MINGW_PACKAGE_PREFIX}-libssh" - "${MINGW_PACKAGE_PREFIX}-wxWidgets" - #"${MINGW_PACKAGE_PREFIX}-drmingw" - "${MINGW_PACKAGE_PREFIX}-gcc-libs") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-hunspell" + "${MINGW_PACKAGE_PREFIX}-libssh" + "${MINGW_PACKAGE_PREFIX}-drmingw" + "${MINGW_PACKAGE_PREFIX}-wxWidgets" + ) optdepends=("${MINGW_PACKAGE_PREFIX}-clang") makedepends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-clang") + "${MINGW_PACKAGE_PREFIX}-clang" + "git") options=(strip staticlibs !debug) source=("${_realname}::git+https://github.com/eranif/codelite.git" - codelite-clang-deprecated.patch) + include-winsock-header.patch + mingw-use-wx-manifests.patch + use-gnu-extensions.patch + windows-headers-conflict.patch + fix-sqlite3-find-and-build.patch + clStandardPaths-missing-member.patch + mingw-posix-layout-fix.patch + proper-libraries-names-mingw.patch) md5sums=('SKIP' - '4bec2ac130687bd4b947b98a0d5d3fd4') + '926c4848932586577192bd950ffc604b' + 'b18e62316a10dac7c274e2faccd86180' + 'f7ce106c3565835c019fbcda0f9bea56' + '1ae47bc9b913d425f98533c237b45ceb' + 'e6ad6fec1b50070f68ea65bab4ec93a2' + '84bc65336879f9ca6d3dd9eed21b8215' + '47ab3dc498add139293f136c96925efa' + 'a53dd1fdbd27970d6ce1a51ffad2eb35') pkgver() { - cd "$_realname" + cd "${_realname}" git describe --tags | sed 's|-|.|g' } prepare() { - cd "$srcdir/$_realname" - patch -p1 -i ${srcdir}/codelite-clang-deprecated.patch + cd "${srcdir}/${_realname}" + patch -p1 -i ${srcdir}/include-winsock-header.patch + patch -p1 -i ${srcdir}/mingw-use-wx-manifests.patch + patch -p1 -i ${srcdir}/use-gnu-extensions.patch + patch -p1 -i ${srcdir}/windows-headers-conflict.patch + patch -p1 -i ${srcdir}/fix-sqlite3-find-and-build.patch + patch -p1 -i ${srcdir}/clStandardPaths-missing-member.patch + patch -p1 -i ${srcdir}/mingw-posix-layout-fix.patch + patch -p1 -i ${srcdir}/proper-libraries-names-mingw.patch } -build() { +package() { local -a extra_config if check_option "debug" "y"; then @@ -43,10 +67,12 @@ build() { else extra_config+=( -DCMAKE_BUILD_TYPE=Release ) fi - - cd $srcdir/${_realname} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + #cd ${srcdir}/${_realname} ${MINGW_PREFIX}/bin/cmake \ + -Wno-dev \ -G"MSYS Makefiles" \ -DPREFIX=${pkgdir}${MINGW_PREFIX} \ -DENABLE_CLANG=1 \ @@ -54,15 +80,11 @@ build() { -DwxWidgets_CONFIG_EXECUTABLE=${MINGW_PREFIX}/bin/wx-config \ -DwxWidgets_wxrc_EXECUTABLE=${MINGW_PREFIX}/bin/wxrc-3.0 \ "${extra_config[@]}" \ - . + ../${_realname} make # -j1 VERBOSE=1 -} - -package() { - cd "$srcdir/${_realname}" make install - + rm -f ${pkgdir}${MINGW_PREFIX}/lib/codelite/*.a rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.a } diff --git a/mingw-w64-codelite-git/clStandardPaths-missing-member.patch b/mingw-w64-codelite-git/clStandardPaths-missing-member.patch new file mode 100644 index 0000000000..2220781b24 --- /dev/null +++ b/mingw-w64-codelite-git/clStandardPaths-missing-member.patch @@ -0,0 +1,35 @@ +--- codelite/CodeLite/cl_standard_paths.h.orig 2015-12-24 15:52:24.680223100 +0300 ++++ codelite/CodeLite/cl_standard_paths.h 2015-12-24 15:53:38.368672300 +0300 +@@ -118,6 +118,8 @@ + * OSX: /Users/name/Documents + */ + wxString GetDocumentsDir() const; ++ ++ void IgnoreAppSubDir(const wxString & subdirPattern); + }; + + #endif // CLSTANDARDPATHS_H +--- codelite/CodeLite/cl_standard_paths.cpp.orig 2015-12-24 15:53:47.553753700 +0300 ++++ codelite/CodeLite/cl_standard_paths.cpp 2015-12-24 15:57:59.523953000 +0300 +@@ -29,9 +29,7 @@ + + clStandardPaths::clStandardPaths() + { +-#ifdef USE_POSIX_LAYOUT +- wxStandardPaths::Get().IgnoreAppSubDir("bin"); +-#endif ++ IgnoreAppSubDir("bin"); + } + + clStandardPaths::~clStandardPaths() {} +@@ -164,3 +162,10 @@ + #endif + return path; + } ++ ++void clStandardPaths::IgnoreAppSubDir(const wxString & subdirPattern) ++{ ++#ifdef USE_POSIX_LAYOUT ++ wxStandardPaths::Get().IgnoreAppSubDir(subdirPattern); ++#endif ++} diff --git a/mingw-w64-codelite-git/codelite-clang-3.6.patch b/mingw-w64-codelite-git/codelite-clang-3.6.patch new file mode 100644 index 0000000000..5dc7750f3f --- /dev/null +++ b/mingw-w64-codelite-git/codelite-clang-3.6.patch @@ -0,0 +1,10 @@ +--- codelite/cmake/Modules/FindClang.cmake.orig 2015-06-02 11:00:49.642600000 +0300 ++++ codelite/cmake/Modules/FindClang.cmake 2015-06-02 11:00:52.169800000 +0300 +@@ -45,6 +45,7 @@ + FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerCore) + FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerFrontend) + FIND_AND_ADD_CLANG_LIB(clangTooling) ++FIND_AND_ADD_CLANG_LIB(clangToolingCore) + + find_path(CLANG_INCLUDE_DIRS clang/Basic/Version.h HINTS ${LLVM_INCLUDE_DIRS}) + diff --git a/mingw-w64-codelite-git/codelite-clang-deprecated.patch b/mingw-w64-codelite-git/codelite-clang-deprecated.patch deleted file mode 100644 index 05dd9b9e5c..0000000000 --- a/mingw-w64-codelite-git/codelite-clang-deprecated.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- codelite/LiteEditor/clang_pch_maker_thread.cpp.orig 2014-07-06 14:54:17.618600000 +0400 -+++ codelite/LiteEditor/clang_pch_maker_thread.cpp 2014-07-06 14:55:02.094200000 +0400 -@@ -434,8 +434,7 @@ - // First time, need to create it - unsigned flags; - if(reparse) { -- flags = CXTranslationUnit_CXXPrecompiledPreamble -- | CXTranslationUnit_CacheCompletionResults -+ flags = CXTranslationUnit_CacheCompletionResults - | CXTranslationUnit_PrecompiledPreamble - | CXTranslationUnit_Incomplete - | CXTranslationUnit_DetailedPreprocessingRecord diff --git a/mingw-w64-codelite-git/fix-sqlite3-find-and-build.patch b/mingw-w64-codelite-git/fix-sqlite3-find-and-build.patch new file mode 100644 index 0000000000..8cc7cf418e --- /dev/null +++ b/mingw-w64-codelite-git/fix-sqlite3-find-and-build.patch @@ -0,0 +1,165 @@ +--- codelite/CMakeLists.txt.orig 2015-03-11 00:04:27.169200000 +0300 ++++ codelite/CMakeLists.txt 2015-03-11 00:05:10.755600000 +0300 +@@ -496,7 +496,7 @@ + add_definitions( -mmacosx-version-min=10.8 ) + endif() + +-if(APPLE) ++if(NOT SQLITE3_FOUND) + # On Linux, we use the distro's libsqlite3 + add_subdirectory(sqlite3) + endif() +@@ -574,8 +574,11 @@ + if ( USE_PCH ) + add_dependencies(sqlite3lib ${CL_PCH_TARGET}) + endif ( USE_PCH ) +- add_dependencies(wxsqlite3 sqlite3lib) + endif() ++ ++if(NOT SQLITE3_FOUND) ++ add_dependencies(wxsqlite3 sqlite3lib) ++endif() + + add_dependencies(databaselayersqlite wxsqlite3) + add_dependencies(wxshapeframework wxsqlite3) +--- codelite/cmake/Modules/FindSqlite3.cmake.orig 2015-12-24 15:02:52.639852500 +0300 ++++ codelite/cmake/Modules/FindSqlite3.cmake 2015-12-24 15:07:28.933929700 +0300 +@@ -1,27 +1,76 @@ +-if(UNIX AND NOT APPLE) ++# Try to find Sqlite3 ++# Once done this will define ++# ++# SQLITE3_FOUND - system has Sqlite3 ++# SQLITE3_INCLUDE_DIRS - the Sqlite3 include directory ++# SQLITE3_LIBRARIES - Link these to use Sqlite3 ++# SQLITE3_DEFINITIONS - Compiler switches required for using Sqlite3 ++# ++ ++if(NOT APPLE) ++ if (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS) ++ # in cache already ++ set(SQLITE3_FOUND TRUE) ++ else() ++ # use pkg-config to get the directories and then use these values ++ # in the FIND_PATH() and FIND_LIBRARY() calls ++ find_package(PkgConfig) ++ if(PKG_CONFIG_FOUND) ++ pkg_check_modules(_SQLITE3 sqlite3) ++ endif() ++ find_path(SQLITE3_INCLUDE_DIR ++ NAMES ++ sqlite3.h ++ HINTS ++ ${_SQLITE3_INCLUDE_DIRS} ++ $ENV{SQLITE3DIR}/include ++ /usr/include ++ /usr/include/sqlite3 ++ /usr/local/include ++ /opt/local/include ++ ) ++ + find_library(SQLITE3_LIBRARY +- NAMES libsqlite3.so +- HINTS +- /usr/local/lib +- /usr/lib +- /usr/lib/x86_64-linux-gnu +- /usr/lib/i386-linux-gnu +- ) +- +- find_path(SQLITE3_INCLUDE_DIR NAMES sqlite3.h +- HINTS +- /usr/local/include +- /usr/include +- /usr/include/sqlite3 +- ) +- if (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY) ++ NAMES ++ sqlite3 ++ HINTS ++ ${_SQLITE3_LIBRARY_DIRS} ++ $ENV{SQLITE3DIR}/lib ++ /usr/lib ++ /usr/lib/x86_64-linux-gnu ++ /usr/lib/i386-linux-gnu ++ /usr/local/lib ++ /opt/local/lib ++ ) ++ ++ if(SQLITE3_LIBRARY) ++ set(SQLITE3_FOUND TRUE) ++ endif() ++ ++ set(SQLITE3_INCLUDE_DIRS ++ ${SQLITE3_INCLUDE_DIR} ++ ) ++ ++ if(SQLITE3_FOUND) ++ set(SQLITE3_LIBRARIES ++ ${SQLITE3_LIBRARIES} ++ ${SQLITE3_LIBRARY} ++ ) ++ endif() ++ ++ if(SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES) + set(SQLITE3_FOUND TRUE) + endif() +- +- if(NOT SQLITE3_FOUND) +- message(FATAL_ERROR " **** Could not find Sqlite3. Please install libsqlite3-dev package **** ") ++ ++ if(SQLITE3_FOUND) ++ message("-- SQLITE3_INCLUDE_DIR: " ${SQLITE3_INCLUDE_DIR}) ++ message("-- SQLITE3_LIBRARY: " ${SQLITE3_LIBRARY}) + else() +- message("-- SQLITE3_INCLUDE_DIR: " ${SQLITE3_INCLUDE_DIR}) +- message("-- SQLITE3_LIBRARY: " ${SQLITE3_LIBRARY}) ++ message(-- "Could not find system Sqlite3. Using bundled sqlite3") + endif() ++ ++ # show the SQLITE3_INCLUDE_DIRS and SQLITE3_LIBRARIES variables only in the advanced view ++ mark_as_advanced(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES) ++ ++ endif () + endif() +--- codelite/sdk/databaselayer/CMakeLists.txt.orig 2015-12-24 15:15:22.810929700 +0300 ++++ codelite/sdk/databaselayer/CMakeLists.txt 2015-12-24 15:16:23.103929700 +0300 +@@ -12,7 +12,7 @@ + include( "${wxWidgets_USE_FILE}" ) + + # Include paths +-include_directories(./include/wx/dblayer/include src/sqlite3) ++include_directories(./include/wx/dblayer/include ${SQLITE3_INCLUDE_DIR}) + + if ( USE_PCH ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${CL_PCH_FILE} -Winvalid-pch ") +@@ -60,7 +60,7 @@ + + # Define the output + add_library(databaselayersqlite SHARED ${SRCS} ${MYSQL_SRCS}) +-target_link_libraries(databaselayersqlite ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES}) ++target_link_libraries(databaselayersqlite ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} -L"${CL_LIBPATH}" ${SQLITE3_LIBRARY}) + + if(APPLE) + install(TARGETS databaselayersqlite DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/) +--- codelite/CodeLite/CMakeLists.txt.orig 2015-12-24 15:15:22.810929700 +0300 ++++ codelite/CodeLite/CMakeLists.txt 2015-12-24 15:16:23.103929700 +0300 +@@ -100,16 +100,16 @@ + + # Define the output + add_library(libcodelite SHARED ${SRCS}) +-if (UNIX AND NOT APPLE ) ++if ( NOT APPLE ) + target_link_libraries(libcodelite + ${LINKER_OPTIONS} + ${wxWidgets_LIBRARIES} + -L"${CL_LIBPATH}" + ${SQLITE3_LIBRARY} + wxsqlite3 + ${LIBSSH_LIB} + ${ADDITIONAL_LIBRARIES}) +-else (UNIX AND NOT APPLE) ++else ( NOT APPLE) + target_link_libraries(libcodelite + ${LINKER_OPTIONS} + ${wxWidgets_LIBRARIES} diff --git a/mingw-w64-codelite-git/include-winsock-header.patch b/mingw-w64-codelite-git/include-winsock-header.patch new file mode 100644 index 0000000000..ac51aee0aa --- /dev/null +++ b/mingw-w64-codelite-git/include-winsock-header.patch @@ -0,0 +1,13 @@ +--- codelite/CodeLite/SocketAPI/clSocketBase.h.orig 2015-03-10 21:05:03.519200000 +0300 ++++ codelite/CodeLite/SocketAPI/clSocketBase.h 2015-03-10 21:05:18.807200000 +0300 +@@ -32,9 +32,7 @@ + #include "codelite_exports.h" + + #ifdef _WIN32 +-#ifndef _WIN64 +-#include +-#endif ++#include + + typedef SOCKET socket_t; + typedef int socklen_t; diff --git a/mingw-w64-codelite-git/mingw-posix-layout-fix.patch b/mingw-w64-codelite-git/mingw-posix-layout-fix.patch new file mode 100644 index 0000000000..759880e2ca --- /dev/null +++ b/mingw-w64-codelite-git/mingw-posix-layout-fix.patch @@ -0,0 +1,282 @@ +diff -Naur codelite-orig/CodeLite/cl_defs.h codelite/CodeLite/cl_defs.h +--- codelite-orig/CodeLite/cl_defs.h 2015-12-28 09:14:07.384041000 +0300 ++++ codelite/CodeLite/cl_defs.h 2015-12-28 10:17:06.738122000 +0300 +@@ -48,13 +48,13 @@ + #else + #ifdef USE_POSIX_LAYOUT + #ifndef PLUGINS_DIR +-#define PLUGINS_DIR "/lib/codelite" ++#define PLUGINS_DIR "\\lib\\codelite" + #endif + #ifndef INSTALL_DIR +-#define INSTALL_DIR "/share/codelite" ++#define INSTALL_DIR "\\share\\codelite" + #endif + #ifndef CFGDIR +-#define CFGDIR "/share/codelite/config/cfg" ++#define CFGDIR "\\share\\codelite\\config\\cfg" + #endif + #endif + // MSW / OSX and the rest of the world +diff -Naur codelite-orig/CodeLite/cl_standard_paths.cpp codelite/CodeLite/cl_standard_paths.cpp +--- codelite-orig/CodeLite/cl_standard_paths.cpp 2015-12-28 09:14:23.533041000 +0300 ++++ codelite/CodeLite/cl_standard_paths.cpp 2015-12-28 10:50:22.132984200 +0300 +@@ -74,7 +74,7 @@ + wxString pluginsDir = PLUGINS_DIR; + #else + #ifdef USE_POSIX_LAYOUT +- wxFileName path(GetDataDir() + wxT(PLUGINS_DIR), ""); ++ wxFileName path(GetInstallDir() + wxT(PLUGINS_DIR), ""); + #else + wxFileName path(GetDataDir(), ""); + path.AppendDir("plugins"); +@@ -84,7 +84,15 @@ + return pluginsDir; + } + +-wxString clStandardPaths::GetDataDir() const { return wxStandardPaths::Get().GetDataDir(); } ++wxString clStandardPaths::GetDataDir() const ++{ ++#ifdef USE_POSIX_LAYOUT ++ wxFileName path(wxStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR), ""); ++ return path.GetPath(); ++#else ++ return wxStandardPaths::Get().GetDataDir(); ++#endif ++} + + wxString clStandardPaths::GetBinFolder() const + { +@@ -104,22 +112,14 @@ + + wxString clStandardPaths::GetLexersDir() const + { +-#ifdef USE_POSIX_LAYOUT +- wxFileName fn(GetDataDir() + wxT(INSTALL_DIR), ""); +-#else + wxFileName fn(GetDataDir(), ""); +-#endif + fn.AppendDir("lexers"); + return fn.GetPath(); + } + + wxString clStandardPaths::GetProjectTemplatesDir() const + { +-#ifdef USE_POSIX_LAYOUT +- wxFileName fn(GetDataDir() + wxT(INSTALL_DIR), ""); +-#else + wxFileName fn(GetDataDir(), ""); +-#endif + fn.AppendDir("templates"); + fn.AppendDir("projects"); + return fn.GetPath(); +@@ -134,11 +134,7 @@ + + wxString clStandardPaths::GetUserProjectTemplatesDir() const + { +-#ifdef USE_POSIX_LAYOUT +- wxFileName fn(GetUserDataDir() + wxT(INSTALL_DIR), ""); +-#else + wxFileName fn(GetUserDataDir(), ""); +-#endif + fn.AppendDir("templates"); + fn.AppendDir("projects"); + return fn.GetPath(); +@@ -163,6 +159,20 @@ + return path; + } + ++wxString clStandardPaths::GetInstallDir() const ++{ ++#ifdef __WXGTK__ ++ return GetBinFolder(); ++#else ++#ifdef USE_POSIX_LAYOUT ++ wxFileName path(wxStandardPaths::Get().GetDataDir(), ""); ++ return path.GetPath(); ++#else ++ return GetBinFolder(); ++#endif ++#endif ++} ++ + void clStandardPaths::IgnoreAppSubDir(const wxString & subdirPattern) + { + #ifdef USE_POSIX_LAYOUT +diff -Naur codelite-orig/CodeLite/cl_standard_paths.h codelite/CodeLite/cl_standard_paths.h +--- codelite-orig/CodeLite/cl_standard_paths.h 2015-12-28 09:14:23.150041000 +0300 ++++ codelite/CodeLite/cl_standard_paths.h 2015-12-28 10:45:39.783044500 +0300 +@@ -119,6 +119,11 @@ + */ + wxString GetDocumentsDir() const; + ++ /** ++ * @brief return the installation directory. ++ */ ++ wxString GetInstallDir() const; ++ + void IgnoreAppSubDir(const wxString & subdirPattern); + }; + +diff -Naur codelite-orig/CodeLite/macros.h codelite/CodeLite/macros.h +--- codelite-orig/CodeLite/macros.h 2015-12-28 09:14:07.436041000 +0300 ++++ codelite/CodeLite/macros.h 2015-12-28 11:10:10.351039900 +0300 +@@ -114,10 +114,8 @@ + const wxString TERMINAL_CMD = wxT(""); + #endif + +-#if defined(__WXMSW__) && !defined(USE_POSIX_LAYOUT) ++#if defined(__WXMSW__) + #define PATH_SEP wxT("\\") +-#else +-#define PATH_SEP wxT("/") + #endif + + #define ID_MENU_CUSTOM_TARGET_FIRST 15000 +diff -Naur codelite-orig/codelitephp/PHPParser/php_utils.cpp codelite/codelitephp/PHPParser/php_utils.cpp +--- codelite-orig/codelitephp/PHPParser/php_utils.cpp 2015-12-28 09:14:12.524041000 +0300 ++++ codelite/codelitephp/PHPParser/php_utils.cpp 2015-12-28 10:30:14.036438700 +0300 +@@ -82,7 +82,7 @@ + fn.AppendDir("resources"); + #else + #ifdef USE_POSIX_LAYOUT +- fn = wxFileName(clStandardPaths::Get().GetDataDir() + wxT(PLUGINS_DIR)); ++ fn = wxFileName(clStandardPaths::Get().GetPluginsDirectory()); + #else + fn = wxFileName(clStandardPaths::Get().GetExecutablePath()); + fn.AppendDir("plugins"); +diff -Naur codelite-orig/Interfaces/plugin.h codelite/Interfaces/plugin.h +--- codelite-orig/Interfaces/plugin.h 2015-12-28 09:14:07.724041000 +0300 ++++ codelite/Interfaces/plugin.h 2015-12-28 10:38:29.711044500 +0300 +@@ -162,7 +162,7 @@ + wxString pluginsDir = clStandardPaths::Get().GetDataDir(); + #else + #ifdef USE_POSIX_LAYOUT +- wxString pluginsDir(clStandardPaths::Get().GetDataDir() + wxT(PLUGINS_DIR)); ++ wxString pluginsDir(clStandardPaths::Get().GetDataDir()); + #else + wxString pluginsDir(m_mgr->GetInstallDirectory() + wxT("/plugins")); + #endif +diff -Naur codelite-orig/LiteEditor/app.cpp codelite/LiteEditor/app.cpp +--- codelite-orig/LiteEditor/app.cpp 2015-12-28 09:14:07.841041000 +0300 ++++ codelite/LiteEditor/app.cpp 2015-12-28 10:54:34.309806000 +0300 +@@ -328,10 +328,6 @@ + // EnableDebugPriv(); + #endif + +-#ifdef USE_POSIX_LAYOUT +- clStandardPaths::Get().IgnoreAppSubDir("bin"); +-#endif +- + // Init resources and add the PNG handler + wxSystemOptions::SetOption(_T("msw.remap"), 0); + wxSystemOptions::SetOption("msw.notebook.themed-background", 1); +@@ -486,7 +482,7 @@ + #else //__WXMSW__ + if(homeDir.IsEmpty()) { // did we got a basedir from user? + #ifdef USE_POSIX_LAYOUT +- homeDir = clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR); ++ homeDir = clStandardPaths::Get().GetDataDir(); + #else + homeDir = ::wxGetCwd(); + #endif +@@ -642,7 +638,7 @@ + + #elif defined(__WXMSW__) + #ifdef USE_POSIX_LAYOUT +- wxLocale::AddCatalogLookupPathPrefix(clStandardPaths::Get().GetDataDir() + wxT("/share/locale")); ++ wxLocale::AddCatalogLookupPathPrefix(clStandardPaths::Get().GetInstallDir() + wxT("\\share\\locale")); + #else + wxLocale::AddCatalogLookupPathPrefix(ManagerST::Get()->GetInstallDir() + wxT("\\locale")); + #endif +@@ -933,13 +929,8 @@ + #ifdef __WXGTK__ + printersInstallDir = wxFileName(wxString(INSTALL_DIR, wxConvUTF8), "gdb_printers"); + #else +-#ifdef USE_POSIX_LAYOUT +- wxString commdir(clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR)); +- printersInstallDir = wxFileName(commdir, "gdb_printers"); +-#else + printersInstallDir = wxFileName(clStandardPaths::Get().GetDataDir(), "gdb_printers"); + #endif +-#endif + + // copy the files to ~/.codelite/gdb_printers + wxLogNull nolog; +diff -Naur codelite-orig/LiteEditor/frame.cpp codelite/LiteEditor/frame.cpp +--- codelite-orig/LiteEditor/frame.cpp 2015-12-28 09:14:08.030041000 +0300 ++++ codelite/LiteEditor/frame.cpp 2015-12-28 10:53:38.446392900 +0300 +@@ -3661,7 +3661,7 @@ + + // Load debuggers (*must* be after the plugins) + #ifdef USE_POSIX_LAYOUT +- wxString plugdir(clStandardPaths::Get().GetDataDir() + wxT(PLUGINS_DIR)); ++ wxString plugdir(clStandardPaths::Get().GetPluginsDirectory()); + DebuggerMgr::Get().Initialize(this, EnvironmentConfig::Instance(), plugdir); + #else + DebuggerMgr::Get().Initialize(this, EnvironmentConfig::Instance(), ManagerST::Get()->GetInstallDir()); +diff -Naur codelite-orig/Plugin/bitmap_loader.cpp codelite/Plugin/bitmap_loader.cpp +--- codelite-orig/Plugin/bitmap_loader.cpp 2015-12-28 09:14:08.426041000 +0300 ++++ codelite/Plugin/bitmap_loader.cpp 2015-12-28 10:56:16.813554600 +0300 +@@ -64,13 +64,8 @@ + wxString bitmapPath = wxString(INSTALL_DIR, wxConvUTF8); + fn = wxFileName(bitmapPath, zipname); + #else +-#ifdef USE_POSIX_LAYOUT +- wxString bitmapPath(clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR)); +- fn = wxFileName(bitmapPath, zipname); +-#else + fn = wxFileName(clStandardPaths::Get().GetDataDir(), zipname); + #endif +-#endif + + if(m_manifest.empty() || m_toolbarsBitmaps.empty()) { + m_zipPath = fn; +diff -Naur codelite-orig/Plugin/ColoursAndFontsManager.cpp codelite/Plugin/ColoursAndFontsManager.cpp +--- codelite-orig/Plugin/ColoursAndFontsManager.cpp 2015-12-28 09:14:08.351041000 +0300 ++++ codelite/Plugin/ColoursAndFontsManager.cpp 2015-12-28 10:57:09.064051300 +0300 +@@ -543,12 +543,9 @@ + wxFileName fnUserLexers(clStandardPaths::Get().GetUserDataDir(), "lexers.json"); + fnUserLexers.AppendDir("lexers"); + +-// Default installation lexers +-#ifdef USE_POSIX_LAYOUT +- wxFileName defaultLexersFileName(clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR), ""); +-#else ++ // Default installation lexers + wxFileName defaultLexersFileName(clStandardPaths::Get().GetDataDir(), ""); +-#endif ++ + defaultLexersFileName.AppendDir("lexers"); + defaultLexersFileName.SetFullName("lexers.json"); + +diff -Naur codelite-orig/Plugin/debuggermanager.cpp codelite/Plugin/debuggermanager.cpp +--- codelite-orig/Plugin/debuggermanager.cpp 2015-12-28 09:14:08.516041000 +0300 ++++ codelite/Plugin/debuggermanager.cpp 2015-12-28 11:04:22.364565400 +0300 +@@ -103,7 +103,11 @@ + wxString debuggersPath(PLUGINS_DIR, wxConvUTF8); + debuggersPath += wxT("/debuggers"); + #elif defined(__WXMSW__) ++#ifdef USE_POSIX_LAYOUT ++ wxString debuggersPath(clStandardPaths::Get().GetPluginsDirectory() + wxT("/debuggers")); ++#else + wxString debuggersPath(m_baseDir + wxT("/debuggers")); ++#endif + #else + // OSX + wxFileName debuggersFolder(clStandardPaths::Get().GetDataDir(), ""); +diff -Naur codelite-orig/SpellChecker/spellcheckeroptions.cpp codelite/SpellChecker/spellcheckeroptions.cpp +--- codelite-orig/SpellChecker/spellcheckeroptions.cpp 2015-12-28 09:14:09.378041000 +0300 ++++ codelite/SpellChecker/spellcheckeroptions.cpp 2015-12-28 11:06:19.093039900 +0300 +@@ -46,11 +46,7 @@ + m_scanD2 = false; + + wxString defaultDicsDir; +-#ifdef USE_POSIX_LAYOUT +- defaultDicsDir << clStandardPaths::Get().GetDataDir() << wxT(INSTALL_DIR) << wxFILE_SEP_PATH << "dics"; +-#else + defaultDicsDir << clStandardPaths::Get().GetDataDir() << wxFILE_SEP_PATH << "dics"; +-#endif + m_dictionaryPath = defaultDicsDir; + } + diff --git a/mingw-w64-codelite-git/mingw-use-wx-manifests.patch b/mingw-w64-codelite-git/mingw-use-wx-manifests.patch new file mode 100644 index 0000000000..0a218e4dbd --- /dev/null +++ b/mingw-w64-codelite-git/mingw-use-wx-manifests.patch @@ -0,0 +1,16 @@ +--- codelite/LiteEditor/code_parser.rc.orig 2015-03-10 23:32:02.096800000 +0300 ++++ codelite/LiteEditor/code_parser.rc 2015-03-10 23:32:36.214000000 +0300 +@@ -25,11 +25,13 @@ + + aaaaa ICON "res/cubes.ico" + #include "wx/msw/wx.rc" ++#ifndef __MINGW32__ + #if WIN64 + 1 24 "wx/msw/amd64.manifest" + #else + 1 24 "wx/msw/wx.manifest" + #endif ++#endif + /////////////////////////////////////////////////////////////////////////////// + // Version information + VS_VERSION_INFO VERSIONINFO diff --git a/mingw-w64-codelite-git/proper-libraries-names-mingw.patch b/mingw-w64-codelite-git/proper-libraries-names-mingw.patch new file mode 100644 index 0000000000..4a8abd1d6f --- /dev/null +++ b/mingw-w64-codelite-git/proper-libraries-names-mingw.patch @@ -0,0 +1,33 @@ +--- codelite/CodeLite/CMakeLists.txt.orig 2015-12-28 12:14:44.681944700 +0300 ++++ codelite/CodeLite/CMakeLists.txt 2015-12-28 12:20:55.582697000 +0300 +@@ -121,6 +121,15 @@ + -lz -lcrypto) + endif ( UNIX AND NOT APPLE ) + ++if(MINGW) ++ set_target_properties(libcodelite ++ PROPERTIES ++ PREFIX "" ++ OUTPUT_NAME codelite ++ RUNTIME_OUTPUT_NAME libcodelite ++ ARCHIVE_OUTPUT_NAME codelite) ++endif() ++ + if (NOT MINGW) + if(APPLE) + install(TARGETS libcodelite DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/) +--- scodelite/sdk/databaselayer/CMakeLists.txt.orig 2015-12-28 12:24:47.723314900 +0300 ++++ codelite/sdk/databaselayer/CMakeLists.txt 2015-12-28 12:26:06.692417200 +0300 +@@ -62,6 +62,12 @@ + add_library(databaselayersqlite SHARED ${SRCS} ${MYSQL_SRCS}) + target_link_libraries(databaselayersqlite ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} -L"${CL_LIBPATH}" ${SQLITE3_LIBRARY}) + ++if(MINGW) ++ set_target_properties(databaselayersqlite ++ PROPERTIES ++ PREFIX "") ++endif() ++ + if(APPLE) + install(TARGETS databaselayersqlite DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/) + CL_INSTALL_NAME_TOOL_STD(${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/libdatabaselayersqlite.dylib) diff --git a/mingw-w64-codelite-git/use-gnu-extensions.patch b/mingw-w64-codelite-git/use-gnu-extensions.patch new file mode 100644 index 0000000000..1e7fd35438 --- /dev/null +++ b/mingw-w64-codelite-git/use-gnu-extensions.patch @@ -0,0 +1,15 @@ +--- codelite/CMakeLists.txt.orig 2015-03-11 00:04:27.169200000 +0300 ++++ codelite/CMakeLists.txt 2015-03-11 00:05:10.755600000 +0300 +@@ -218,7 +218,11 @@ + + set( PLUGINS_DIR "${CL_PREFIX}/${CL_INSTALL_LIBDIR}/codelite") + add_definitions(-DYY_NEVER_INTERACTIVE=1) +-set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) ++if(CMAKE_COMPILER_IS_GNUCXX) ++ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11" ) ++else() ++ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) ++endif() + + if (NOT MINGW) + add_definitions(-DINSTALL_DIR=\"${CL_PREFIX}/share/codelite\") diff --git a/mingw-w64-codelite-git/windows-headers-conflict.patch b/mingw-w64-codelite-git/windows-headers-conflict.patch new file mode 100644 index 0000000000..843b5d91bc --- /dev/null +++ b/mingw-w64-codelite-git/windows-headers-conflict.patch @@ -0,0 +1,35 @@ +--- a/Outline/outline_tab.cpp.orig 2015-06-01 23:22:47.501600000 +0300 ++++ b/Outline/outline_tab.cpp 2015-06-01 23:39:02.750800000 +0300 +@@ -25,11 +25,14 @@ + + #include "outline_tab.h" + #include "outline_symbol_tree.h" +-#include "event_notifier.h" +-#include "plugin.h" ++#ifdef __WXMSW__ ++#include ++#endif + #include + #include + #include ++#include "event_notifier.h" ++#include "plugin.h" + #include "fileextmanager.h" + + const wxEventType wxEVT_SV_GOTO_DEFINITION = wxNewEventType(); +--- a/CodeLite/SocketAPI/clSocketBase.h.orig 2015-07-15 18:25:00.504000000 +0300 ++++ b/CodeLite/SocketAPI/clSocketBase.h 2015-07-15 18:34:16.400800000 +0300 +@@ -31,11 +31,12 @@ + #include + #include "codelite_exports.h" + +-#ifdef _WIN32 ++#ifdef __WXMSW__ + #include + + typedef SOCKET socket_t; + typedef int socklen_t; ++#include + #else + typedef int socket_t; + #define INVALID_SOCKET -1 diff --git a/mingw-w64-cogl/0001-msys2-fix-introspection-build.patch b/mingw-w64-cogl/0001-msys2-fix-introspection-build.patch deleted file mode 100644 index 0d49544363..0000000000 --- a/mingw-w64-cogl/0001-msys2-fix-introspection-build.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 09200701eb59673b026c5d829d4bbeed8f5ef62a Mon Sep 17 00:00:00 2001 -From: Lubosz Sarnecki -Date: Sun, 3 Aug 2014 13:22:17 +0200 -Subject: [PATCH] msys2: fix introspection build - ---- - cogl-pango/Makefile.am | 1 + - cogl/Makefile.am | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/cogl-pango/Makefile.am b/cogl-pango/Makefile.am -index 64d9771..5358725 100644 ---- a/cogl-pango/Makefile.am -+++ b/cogl-pango/Makefile.am -@@ -96,6 +96,7 @@ DISTCLEANFILES += ../build/win32/vs9/cogl-pango.vcproj ../build/win32/vs10/cogl- - -include $(INTROSPECTION_MAKEFILE) - - INTROSPECTION_GIRS = -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - if HAVE_INTROSPECTION - INTROSPECTION_COMPILER_ARGS=--includedir=$(top_builddir)/cogl -diff --git a/cogl/Makefile.am b/cogl/Makefile.am -index 62d3762..43ce89a 100644 ---- a/cogl/Makefile.am -+++ b/cogl/Makefile.am -@@ -667,6 +667,7 @@ DISTCLEANFILES += ../build/win32/vs9/cogl.vcproj ../build/win32/vs10/cogl.vcxpro - -include $(INTROSPECTION_MAKEFILE) - - INTROSPECTION_GIRS = -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - if HAVE_INTROSPECTION - Cogl-1.0.gir: libcogl.la Makefile --- -2.0.4 - diff --git a/mingw-w64-cogl/PKGBUILD b/mingw-w64-cogl/PKGBUILD index 3d4454fa83..d0040d045b 100644 --- a/mingw-w64-cogl/PKGBUILD +++ b/mingw-w64-cogl/PKGBUILD @@ -1,51 +1,58 @@ # Maintainer: Lubosz Sarnecki _realname=cogl +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.18.2 -pkgrel=1 -pkgdesc="An object oriented GL/GLES Abstraction/Utility Layer. (mingw-w64)" +pkgver=1.22.0 +pkgrel=2 +pkgdesc="An object oriented GL/GLES Abstraction/Utility Layer (mingw-w64)" arch=('any') url="http://www.clutter-project.org/" license=('GPL2') -makedepends=('automake' 'libtool' 'intltool' 'itstool' 'gtk-doc' 'gnome-doc-utils' 'yelp-tools') +makedepends=('automake' 'libtool' 'intltool' 'itstool' 'gtk-doc' 'gnome-doc-utils' 'yelp-tools' + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") depends=("${MINGW_PACKAGE_PREFIX}-pango" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - ) + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base") options=(!libtool strip staticlibs) -source=(#http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:4}/${_realname}-$pkgver.tar.xz - "git://git.gnome.org/$_realname#tag=${pkgver}" - "0001-msys2-fix-introspection-build.patch" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz "0002-windows-gl-headers.patch") -md5sums=('SKIP' - '66134daa1df08ebfa143b12c08f3290e' +md5sums=('ab684ec96848d79d22757fb3064820c8' '8686270ab5eae668eae11e2606aa7ce0') prepare() { - cd ${_realname} - patch -p1 -i ${srcdir}/0001-msys2-fix-introspection-build.patch + cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/0002-windows-gl-headers.patch - NOCONFIGURE=1 ./autogen.sh - #autoreconf -fi + + autoreconf -fiv } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}/configure \ + + mkdir doc + cp -rf ../${_realname}-${pkgver}/doc/* doc/ + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --disable-static \ --enable-shared \ --enable-silent-rules \ - --disable-gtk-doc + --enable-introspection \ + --enable-cogl-gst + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-coin3d-hg/PKGBUILD b/mingw-w64-coin3d-hg/PKGBUILD index 1c5bd22f07..9ba1876fd9 100644 --- a/mingw-w64-coin3d-hg/PKGBUILD +++ b/mingw-w64-coin3d-hg/PKGBUILD @@ -1,28 +1,27 @@ # Maintainer: Alexey Pavlov _realname=coin3d - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-hg" -pkgver=r11348.46b2e54e300b +pkgver=r11404.a9b4869bdc0e pkgrel=1 pkgdesc="High-level, retained-mode toolkit for effective 3D graphics development (mingw-w64)" arch=('any') license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-simage" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-openal" - #"${MINGW_PACKAGE_PREFIX}-freeglut" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-openal" + #"${MINGW_PACKAGE_PREFIX}-freeglut" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("mercurial" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") url=('https://bitbucket.org/Coin3D/coin') -source=("${_realname}"::"hg+https://bitbucket.org/Alexpux/coin" - hg+https://bitbucket.org/Alexpux/generalmsvcgeneration - hg+https://bitbucket.org/Alexpux/boost-header-libs-full) +source=("${_realname}"::"hg+https://bitbucket.org/msys2/coin" + hg+https://bitbucket.org/msys2/generalmsvcgeneration + hg+https://bitbucket.org/msys2/boost-header-libs-full) options=(!strip staticlibs) md5sums=('SKIP' 'SKIP' @@ -66,7 +65,7 @@ build() { --with-simage=${MINGW_PREFIX} \ --with-glu=${MINGW_PREFIX}/${MINGW_CHOST} \ --without-x - + #--with-spidermonkey=no make } diff --git a/mingw-w64-collada-dom-svn/collada-2.4.0-mingw-w64-fix.patch b/mingw-w64-collada-dom-svn/001-collada-2.4.0-mingw-w64-fix.patch similarity index 59% rename from mingw-w64-collada-dom-svn/collada-2.4.0-mingw-w64-fix.patch rename to mingw-w64-collada-dom-svn/001-collada-2.4.0-mingw-w64-fix.patch index 1af857e3c2..7ab99260fd 100644 --- a/mingw-w64-collada-dom-svn/collada-2.4.0-mingw-w64-fix.patch +++ b/mingw-w64-collada-dom-svn/001-collada-2.4.0-mingw-w64-fix.patch @@ -1,5 +1,14 @@ --- collada-dom/CMakeLists.txt.orig 2013-12-25 21:37:14.645200000 +0400 +++ collada-dom/CMakeLists.txt 2013-12-25 21:53:03.151000000 +0400 +@@ -144,7 +150,7 @@ + set(Boost_CFLAGS "-DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB") + endif() + +-set(Boost_ADDITIONAL_VERSIONS "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39" "1.38" "1.37.0" "1.37" "1.35.0" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33") ++set(Boost_ADDITIONAL_VERSIONS "1.57" "1.56" "1.55" "1.55.0" "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39" "1.38" "1.37.0" "1.37" "1.35.0" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33") + + if( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + set(Boost_INCLUDE_DIR $ENV{BOOST_INCLUDEDIR}) @@ -182,7 +182,7 @@ set(COLLADA_DOM_BOOST_LIB_DIRS "${COLLADA_DOM_BOOST_LIB_DIRS} -L${ldir}") endforeach() @@ -9,6 +18,30 @@ set(EXTRA_COMPILE_FLAGS "${COLLADA_DOM_EXTERNAL_FLAGS} -DCOLLADA_DOM_NAMESPACE -fPIC") else() set(EXTRA_COMPILE_FLAGS "${COLLADA_DOM_EXTERNAL_FLAGS} -DCOLLADA_DOM_NAMESPACE") +@@ -252,20 +258,20 @@ + + add_subdirectory(dom) + +-if(UNIX) ++if(UNIX OR MINGW) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom.pc" @ONLY IMMEDIATE) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev) + endif() + + if( OPT_COLLADA15 ) +- if(UNIX) ++ if(UNIX OR MINGW) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom-150.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom-150.pc" @ONLY IMMEDIATE) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom-150.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev) + endif() + endif() + + if( OPT_COLLADA14 ) +- if(UNIX) ++ if(UNIX OR MINGW) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom-141.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom-141.pc" @ONLY IMMEDIATE) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom-141.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev) + endif() diff -Naur collada-dom-orig/dom/include/dae/daeUtils.h collada-dom/dom/include/dae/daeUtils.h --- collada-dom-orig/dom/include/dae/daeUtils.h 2013-09-04 20:43:13.000000000 +0400 +++ collada-dom/dom/include/dae/daeUtils.h 2013-09-05 16:42:38.707031200 +0400 @@ -56,13 +89,11 @@ diff -Naur collada-dom-orig/dom/src/dae/daeUtils.cpp collada-dom/dom/src/dae/dae diff -Naur collada-dom-orig/dom/external-libs/minizip-1.1/CMakeLists.txt collada-dom/dom/external-libs/minizip-1.1/CMakeLists.txt --- collada-dom-orig/dom/external-libs/minizip-1.1/CMakeLists.txt 2013-09-04 20:43:11.000000000 +0400 +++ collada-dom/dom/external-libs/minizip-1.1/CMakeLists.txt 2013-09-05 18:08:14.522460900 +0400 -@@ -1,8 +1,5 @@ +@@ -1,6 +1,6 @@ include_directories(${ZLIB_INCLUDE_DIR}) --set(minizip_files crypt.h ioapi.c ioapi.h mztools.c mztools.h unzip.c unzip.h zip.c zip.h) + set(minizip_files crypt.h ioapi.c ioapi.h mztools.c mztools.h unzip.c unzip.h zip.c zip.h) -if( MSVC ) -- set(minizip_files ${minizip_files} iowin32.c iowin32.h) --endif() -+set(minizip_files crypt.h ioapi.c ioapi.h mztools.c mztools.h unzip.c unzip.h zip.c zip.h iowin32.c iowin32.h) ++if(WIN32) + set(minizip_files ${minizip_files} iowin32.c iowin32.h) + endif() add_library(minizip STATIC ${minizip_files}) - set_target_properties(minizip PROPERTIES COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS}") - target_link_libraries(minizip ${ZLIB_LIBRARIES}) diff --git a/mingw-w64-collada-dom-svn/002-fix-pkg-config.patch b/mingw-w64-collada-dom-svn/002-fix-pkg-config.patch new file mode 100644 index 0000000000..e24027780c --- /dev/null +++ b/mingw-w64-collada-dom-svn/002-fix-pkg-config.patch @@ -0,0 +1,16 @@ +--- collada-dom/collada-dom.pc.in.orig 2015-01-22 15:35:43.690800000 +0300 ++++ collada-dom/collada-dom.pc.in 2015-01-22 15:36:23.689200000 +0300 +@@ -2,11 +2,11 @@ + + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@/bin +-libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX% ++libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ + includedir=@CMAKE_INSTALL_PREFIX@/@COLLADA_DOM_INCLUDE_INSTALL_DIR@ + + Name: collada-dom +-Description: COLLADA Document Object Model (DOM), 1.4 support=%OPT_COLLADA14%, 1.5 support=%OPT_COLLADA15% ++Description: COLLADA Document Object Model (DOM), 1.4 support=@OPT_COLLADA14@, 1.5 support=@OPT_COLLADA15@ + Version: @COLLADA_DOM_VERSION@ + URL: http://sourceforge.net/projects/collada-dom + Libs: -L${libdir} -lcollada-dom@COLLADA_DOM_LIBRARY_SUFFIX@ diff --git a/mingw-w64-collada-dom-svn/PKGBUILD b/mingw-w64-collada-dom-svn/PKGBUILD index 2a0acbd890..328aad3565 100644 --- a/mingw-w64-collada-dom-svn/PKGBUILD +++ b/mingw-w64-collada-dom-svn/PKGBUILD @@ -1,95 +1,75 @@ # Maintainer: Alexey Pavlov _realname=collada-dom - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" _base_ver=2.4.1 pkgver=2.4.1.r889 -pkgrel=2 +pkgrel=5 pkgdesc="API that provides a C++ object representation of a COLLADA XML instance document (mingw-w64)" arch=('any') url="http://sourceforge.net/projects/collada-dom/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-cmake" "subversion") -depends=( - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-pcre" - "${MINGW_PACKAGE_PREFIX}-libxml2") +depends=("${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-pcre" + "${MINGW_PACKAGE_PREFIX}-zlib") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('staticlibs' 'strip' 'buildflags') source=("${_realname}"::"svn+svn://svn.code.sf.net/p/collada-dom/code/trunk" - collada-2.4.0-mingw-w64-fix.patch - build-separate-libs.patch) + 001-collada-2.4.0-mingw-w64-fix.patch + 002-fix-pkg-config.patch) md5sums=('SKIP' - '770dddcb6b498d3afc005fcebb129d98' - 'd8844a5233791acb033bbcfb8b10447a') + 'b500fff9e44b0e556f847838e5644592' + '538a75efbdcf1344103176e4a8c41fc6') pkgver() { - cd "$srcdir/${_realname}" + cd "${srcdir}/${_realname}" local ver="$(svnversion)" printf "%s.r%s" "${_base_ver}" "${ver//[[:alpha:]]}" } prepare() { cd "${srcdir}/${_realname}" - patch -p1 -i ${srcdir}/collada-2.4.0-mingw-w64-fix.patch - patch -p1 -i ${srcdir}/build-separate-libs.patch + patch -p1 -i ${srcdir}/001-collada-2.4.0-mingw-w64-fix.patch + patch -p1 -i ${srcdir}/002-fix-pkg-config.patch + #sed -i "s|#include |#include |g" dom/include/dae/daeZAEUncompressHandler.h } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + mkdir -p build-${MINGW_CHOST} - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + CPPFLAGS+=" -I ${MINGW_PREFIX}/include/minizip" - cp -r ${srcdir}/${_realname} ${srcdir}/build14 - cp -r ${srcdir}/${_realname} ${srcdir}/build15 + cd "${srcdir}/build-${MINGW_CHOST}" - CFLAGS+=" -I ${MINGW_PREFIX}/include -I ${MINGW_PREFIX}/include/minizip" - CPPFLAGS+=" -I ${MINGW_PREFIX}/include -I ${MINGW_PREFIX}/include/minizip" - CXXFLAGS+=" -I ${MINGW_PREFIX}/include -I ${MINGW_PREFIX}/include/minizip" - - cd "${srcdir}/build14" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ - -DOPT_COLLADA14:BOOL=ON \ - -DOPT_COLLADA15:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DOPT_COLLADA14=ON \ + -DOPT_COLLADA15L=ON \ -DCMAKE_BUILD_TYPE=RELEASE \ - -DBOOST_ROOT=${PREFIX_WIN} - make - - cd "${srcdir}/build15" - ${MINGW_PREFIX}/bin/cmake.exe \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ - -DOPT_COLLADA14:BOOL=OFF \ - -DOPT_COLLADA15:BOOL=ON \ - -DCMAKE_BUILD_TYPE=RELEASE \ - -DBOOST_ROOT=${PREFIX_WIN} + -DBOOST_ROOT=${MINGW_PREFIX} \ + ../${_realname} make } package() { - cd "${srcdir}/build14" - make -j1 install - cp dom/src/1.4/*.a ${pkgdir}${MINGW_PREFIX}/lib/ - mv ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom-config.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom14-config.cmake + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} -j1 install + #cp dom/src/1.4/*.a ${pkgdir}${MINGW_PREFIX}/lib/ + #mv ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom-config.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom14-config.cmake + + #cd "${srcdir}/build15" + #make -j1 install + #cp dom/src/1.5/*.a ${pkgdir}${MINGW_PREFIX}/lib/ + #mv ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom-config.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom15-config.cmake - cd "${srcdir}/build15" - make -j1 install - cp dom/src/1.5/*.a ${pkgdir}${MINGW_PREFIX}/lib/ - mv ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom-config.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/collada_dom-2.4/collada_dom15-config.cmake - mkdir -p ${pkgdir}${MINGW_PREFIX}/bin mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/ - rm ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/collada-dom.pc + #rm ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/collada-dom.pc } diff --git a/mingw-w64-collada-dom-svn/build-separate-libs.patch b/mingw-w64-collada-dom-svn/build-separate-libs.patch deleted file mode 100644 index 888bf0ef8a..0000000000 --- a/mingw-w64-collada-dom-svn/build-separate-libs.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- collada-dom/CMakeLists.txt.orig 2013-12-25 21:37:14.645200000 +0400 -+++ collada-dom/CMakeLists.txt 2013-12-25 21:53:03.151000000 +0400 -@@ -97,7 +97,13 @@ - endif() - set(COLLADA_DOM_LIBRARY_SUFFIX "${COLLADA_DOM_SOVERSION}-${COLLADA_PRECISION}-${MSVC_PREFIX}-mt") - else() -- set(COLLADA_DOM_LIBRARY_SUFFIX "${COLLADA_DOM_SOVERSION}-${COLLADA_PRECISION}") -+ if( OPT_COLLADA14 AND OPT_COLLADA15 ) -+ set(COLLADA_DOM_LIBRARY_SUFFIX "${COLLADA_DOM_SOVERSION}-${COLLADA_PRECISION}") -+ elseif( OPT_COLLADA15 ) -+ set(COLLADA_DOM_LIBRARY_SUFFIX "150") -+ elseif( OPT_COLLADA14 ) -+ set(COLLADA_DOM_LIBRARY_SUFFIX "141") -+ endif() - endif() - - include(CheckIncludeFile) -@@ -144,7 +150,7 @@ - set(Boost_CFLAGS "-DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB") - endif() - --set(Boost_ADDITIONAL_VERSIONS "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39" "1.38" "1.37.0" "1.37" "1.35.0" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33") -+set(Boost_ADDITIONAL_VERSIONS "1.55" "1.55.0" "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39" "1.38" "1.37.0" "1.37" "1.35.0" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33") - - if( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - set(Boost_INCLUDE_DIR $ENV{BOOST_INCLUDEDIR}) -@@ -252,20 +258,20 @@ - - add_subdirectory(dom) - --if(UNIX) -+if(UNIX OR MINGW) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom.pc" @ONLY IMMEDIATE) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev) - endif() - - if( OPT_COLLADA15 ) -- if(UNIX) -+ if(UNIX OR MINGW) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom-150.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom-150.pc" @ONLY IMMEDIATE) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom-150.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev) - endif() - endif() - - if( OPT_COLLADA14 ) -- if(UNIX) -+ if(UNIX OR MINGW) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom-141.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom-141.pc" @ONLY IMMEDIATE) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom-141.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev) - endif() diff --git a/mingw-w64-conemu-git/ConEmu.cpp.diff b/mingw-w64-conemu-git/ConEmu.cpp.diff deleted file mode 100644 index c00e54177e..0000000000 --- a/mingw-w64-conemu-git/ConEmu.cpp.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- src/ConEmu/ConEmu.cpp.orig 2014-11-09 02:31:01.456287600 +0100 -+++ src/ConEmu/ConEmu.cpp 2014-11-09 02:29:15.901296900 +0100 -@@ -938,7 +937,7 @@ - } - } - -- if (*szRequired || *szRecommended) -+ if (*szRequired) - { - size_t cchMax = _tcslen(szRequired) + _tcslen(szRecommended) + _tcslen(ms_ConEmuExe) + 255; - wchar_t* pszMsg = (wchar_t*)calloc(cchMax, sizeof(*pszMsg)); -@@ -951,12 +950,6 @@ - _wcscat_c(pszMsg, cchMax, szRequired); - _wcscat_c(pszMsg, cchMax, L"\n\n"); - } -- if (*szRecommended) -- { -- _wcscat_c(pszMsg, cchMax, L"Recommended files not found!\n"); -- _wcscat_c(pszMsg, cchMax, szRecommended); -- _wcscat_c(pszMsg, cchMax, L"\n\n"); -- } - _wcscat_c(pszMsg, cchMax, L"ConEmu was started from:\n"); - _wcscat_c(pszMsg, cchMax, ms_ConEmuExe); - _wcscat_c(pszMsg, cchMax, L"\n"); diff --git a/mingw-w64-conemu-git/ConEmu.xml b/mingw-w64-conemu-git/ConEmu.xml index 11046f0a63..8f1250a84e 100644 --- a/mingw-w64-conemu-git/ConEmu.xml +++ b/mingw-w64-conemu-git/ConEmu.xml @@ -1,626 +1,601 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mingw-w64-conemu-git/ConfirmDlg.h.diff b/mingw-w64-conemu-git/ConfirmDlg.h.diff deleted file mode 100644 index d9eee4cbfb..0000000000 --- a/mingw-w64-conemu-git/ConfirmDlg.h.diff +++ /dev/null @@ -1,121 +0,0 @@ ---- src/ConEmu/ConfirmDlg.h.orig 2014-11-09 02:16:29.755076500 +0100 -+++ src/ConEmu/ConfirmDlg.h 2014-11-09 02:17:16.373513900 +0100 -@@ -47,118 +46,4 @@ - }; - int ConfirmCloseConsoles(const ConfirmCloseParam& Parm); - --#ifdef __GNUC__ -- --enum _TASKDIALOG_FLAGS --{ -- TDF_ENABLE_HYPERLINKS = 0x0001, -- TDF_USE_HICON_MAIN = 0x0002, -- TDF_USE_HICON_FOOTER = 0x0004, -- TDF_ALLOW_DIALOG_CANCELLATION = 0x0008, -- TDF_USE_COMMAND_LINKS = 0x0010, -- TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020, -- TDF_EXPAND_FOOTER_AREA = 0x0040, -- TDF_EXPANDED_BY_DEFAULT = 0x0080, -- TDF_VERIFICATION_FLAG_CHECKED = 0x0100, -- TDF_SHOW_PROGRESS_BAR = 0x0200, -- TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400, -- TDF_CALLBACK_TIMER = 0x0800, -- TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000, -- TDF_RTL_LAYOUT = 0x2000, -- TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000, -- TDF_CAN_BE_MINIMIZED = 0x8000 --}; --typedef int TASKDIALOG_FLAGS; // Note: _TASKDIALOG_FLAGS is an int -- --enum _TASKDIALOG_COMMON_BUTTON_FLAGS --{ -- TDCBF_OK_BUTTON = 0x0001, // selected control return value IDOK -- TDCBF_YES_BUTTON = 0x0002, // selected control return value IDYES -- TDCBF_NO_BUTTON = 0x0004, // selected control return value IDNO -- TDCBF_CANCEL_BUTTON = 0x0008, // selected control return value IDCANCEL -- TDCBF_RETRY_BUTTON = 0x0010, // selected control return value IDRETRY -- TDCBF_CLOSE_BUTTON = 0x0020 // selected control return value IDCLOSE --}; --typedef int TASKDIALOG_COMMON_BUTTON_FLAGS; // Note: _TASKDIALOG_COMMON_BUTTON_FLAGS is an int -- --typedef enum _TASKDIALOG_MESSAGES --{ -- TDM_NAVIGATE_PAGE = WM_USER+101, -- TDM_CLICK_BUTTON = WM_USER+102, // wParam = Button ID -- TDM_SET_MARQUEE_PROGRESS_BAR = WM_USER+103, // wParam = 0 (nonMarque) wParam != 0 (Marquee) -- TDM_SET_PROGRESS_BAR_STATE = WM_USER+104, // wParam = new progress state -- TDM_SET_PROGRESS_BAR_RANGE = WM_USER+105, // lParam = MAKELPARAM(nMinRange, nMaxRange) -- TDM_SET_PROGRESS_BAR_POS = WM_USER+106, // wParam = new position -- TDM_SET_PROGRESS_BAR_MARQUEE = WM_USER+107, // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints) -- TDM_SET_ELEMENT_TEXT = WM_USER+108, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) -- TDM_CLICK_RADIO_BUTTON = WM_USER+110, // wParam = Radio Button ID -- TDM_ENABLE_BUTTON = WM_USER+111, // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID -- TDM_ENABLE_RADIO_BUTTON = WM_USER+112, // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID -- TDM_CLICK_VERIFICATION = WM_USER+113, // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus) -- TDM_UPDATE_ELEMENT_TEXT = WM_USER+114, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) -- TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER+115, // wParam = Button ID, lParam = 0 (elevation not required), lParam != 0 (elevation required) -- TDM_UPDATE_ICON = WM_USER+116 // wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise) --} TASKDIALOG_MESSAGES; -- --typedef enum _TASKDIALOG_NOTIFICATIONS --{ -- TDN_CREATED = 0, -- TDN_NAVIGATED = 1, -- TDN_BUTTON_CLICKED = 2, // wParam = Button ID -- TDN_HYPERLINK_CLICKED = 3, // lParam = (LPCWSTR)pszHREF -- TDN_TIMER = 4, // wParam = Milliseconds since dialog created or timer reset -- TDN_DESTROYED = 5, -- TDN_RADIO_BUTTON_CLICKED = 6, // wParam = Radio Button ID -- TDN_DIALOG_CONSTRUCTED = 7, -- TDN_VERIFICATION_CLICKED = 8, // wParam = 1 if checkbox checked, 0 if not, lParam is unused and always 0 -- TDN_HELP = 9, -- TDN_EXPANDO_BUTTON_CLICKED = 10 // wParam = 0 (dialog is now collapsed), wParam != 0 (dialog is now expanded) --} TASKDIALOG_NOTIFICATIONS; -- --typedef struct _TASKDIALOG_BUTTON --{ -- int nButtonID; -- PCWSTR pszButtonText; --} TASKDIALOG_BUTTON; -- --typedef HRESULT (WINAPI *PFTASKDIALOGCALLBACK)( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData); -- --typedef struct _TASKDIALOGCONFIG --{ -- UINT cbSize; -- HWND hwndParent; -- HINSTANCE hInstance; // used for MAKEINTRESOURCE() strings -- TASKDIALOG_FLAGS dwFlags; // TASKDIALOG_FLAGS (TDF_XXX) flags -- TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons; // TASKDIALOG_COMMON_BUTTON (TDCBF_XXX) flags -- PCWSTR pszWindowTitle; // string or MAKEINTRESOURCE() -- union -- { -- HICON hMainIcon; -- PCWSTR pszMainIcon; -- } DUMMYUNIONNAME; -- PCWSTR pszMainInstruction; -- PCWSTR pszContent; -- UINT cButtons; -- const TASKDIALOG_BUTTON *pButtons; -- int nDefaultButton; -- UINT cRadioButtons; -- const TASKDIALOG_BUTTON *pRadioButtons; -- int nDefaultRadioButton; -- PCWSTR pszVerificationText; -- PCWSTR pszExpandedInformation; -- PCWSTR pszExpandedControlText; -- PCWSTR pszCollapsedControlText; -- union -- { -- HICON hFooterIcon; -- PCWSTR pszFooterIcon; -- } DUMMYUNIONNAME2; -- PCWSTR pszFooter; -- PFTASKDIALOGCALLBACK pfCallback; -- LONG_PTR lpCallbackData; -- UINT cxWidth; // width of the Task Dialog's client area in DLU's. If 0, Task Dialog will calculate the ideal width. --} TASKDIALOGCONFIG; -- --#endif -- - HRESULT TaskDialog(TASKDIALOGCONFIG *pTaskConfig, int *pnButton, int *pnRadioButton, bool *pfVerificationFlagChecked); diff --git a/mingw-w64-conemu-git/PKGBUILD b/mingw-w64-conemu-git/PKGBUILD index 8029573748..1b94476fee 100644 --- a/mingw-w64-conemu-git/PKGBUILD +++ b/mingw-w64-conemu-git/PKGBUILD @@ -1,59 +1,38 @@ -# Maintainer: Martell Malone -# Contributer: Haroogan +# Maintainer: Haroogan +# Contributer: Martell Malone -_name='conemu' -pkgname="${MINGW_PACKAGE_PREFIX}-${_name}-git" -pkgver=r1093.261fe53 -pkgrel=2 -pkgdesc="Customizable Windows console emulator with tabs." -url="http://code.google.com/p/${_name}-maximus5/" -license=( - 'BSD New' -) -arch=( - 'any' -) -conflicts=( - "${MINGW_PACKAGE_PREFIX}-${_name}" -) -makedepends=( - "${MINGW_PACKAGE_PREFIX}-gcc" -) -options=( - '!strip' - 'staticlibs' -) -source=( - "${_name}"::"git+http://github.com/martell/ConEmu.git#branch=mingw64" - 'ConEmu.xml' - 'ConEmu.cpp.diff' - 'ConfirmDlg.h.diff' -) -sha256sums=( - 'SKIP' - 'SKIP' - '5352992b27005f6d2ca5c8cc9aaff86ee6069c8d961d805912c0f1e00fede429' - '18b8c48218a6f2955b09e0c47e5c772875bf5f2ed07a63bcd21a727c26f4fd46' -) +_realname='conemu' +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=r3199.5dc44c0 +pkgrel=1 +pkgdesc="Customizable Windows console emulator with tabs (mingw-w64)" +url="http://code.google.com/p/${_realname}-maximus5/" +license=('BSD New') +arch=('any') +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "git") +# CAUTION: +# Don't remove `!strip' option! Otherwise, 64-bit version of ConEmu will signal +# errors at startup. +options=('!strip' + 'staticlibs') +source=("${_realname}"::"git+http://github.com/Haroogan/ConEmu.git#branch=msys2" + 'ConEmu.xml') +sha256sums=('SKIP' + '84c201cf676aae844a5c00b20ce8912f004562422a3e340fe01c786ab666062c') pkgver() { - cd "${_name}" + cd "${_realname}" printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } -prepare() { - cd "${_name}" - patch --binary --forward -p0 < "${srcdir}/ConEmu.cpp.diff" - patch --binary --forward -p0 < "${srcdir}/ConfirmDlg.h.diff" -} - build() { - cd "${_name}/src" + cd "${_realname}/src" - # NOTE: - # The ugliest build system I've ever seen, yuck! - # NOTE: - # Don't remove `-static*' switches from `USERLIBSFIRST'! Otherwise when + # CAUTION: + # Don't remove `-static*' switches from `USERLIBSFIRST'! Otherwise, when # running `cmd.exe' (Command Prompt) in ConEmu, it cannot find # `libstdc++-6.dll' if it is not in the current `PATH' environment variable. make \ @@ -65,19 +44,19 @@ build() { } package() { - mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" - local suffix='' if test "${CARCH}" == 'x86_64'; then suffix='64' fi + mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" + cp -r "ConEmu.xml" "${pkgdir}${MINGW_PREFIX}/bin" - cd "${_name}/Release" + cd "${_realname}/Release" - cp -r "ConEmu.exe" "${pkgdir}${MINGW_PREFIX}/bin/ConEmu.exe" + cp -r "ConEmu.exe" "${pkgdir}${MINGW_PREFIX}/bin/" cd "ConEmu" diff --git a/mingw-w64-confuse/PKGBUILD b/mingw-w64-confuse/PKGBUILD new file mode 100644 index 0000000000..901168a512 --- /dev/null +++ b/mingw-w64-confuse/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: David Grayson + +_realname=confuse +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.8 +pkgrel=1 +pkgdesc='Library for parsing configuration files (mingw-w64)' +arch=('any') +url="https://github.com/martinh/libconfuse" +license=('custom') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-gettext") +options=('staticlibs' 'strip') +source=( + "https://github.com/martinh/libconfuse/releases/download/v${pkgver}/confuse-${pkgver}.tar.xz" +) + +sha256sums=('2a8102bfa3ccc846c14d94a81b0abfb4f5e855809f89ff3722aca1a9f314ea0d') + +build() { + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + "../${_realname}-${pkgver}/configure" \ + --prefix="${MINGW_PREFIX}" \ + --build="${MINGW_CHOST}" \ + --host="${MINGW_CHOST}" \ + --enable-static \ + --enable-shared \ + --disable-examples + + make +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + make check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + # Note that the license also gets installed in share/doc/confuse along with + # other documentation. + cd "${srcdir}/${_realname}-${pkgver}" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-connect/PKGBUILD b/mingw-w64-connect/PKGBUILD new file mode 100644 index 0000000000..50c5575b61 --- /dev/null +++ b/mingw-w64-connect/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Johannes Schindelin + +_realname=connect +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.104 +tag='fd6f352325d4' +pkgrel=1 +pkgdesc="Make socket connection using SOCKS4/5 and HTTP tunnel (mingw-w64)" +arch=('any') +license=('GPL2+') +url="https://bitbucket.org/gotoh/connect/overview" +options=('strip') +source=(${_realname}-${pkgver}.tar.bz2::"https://bitbucket.org/gotoh/${_realname}/get/${pkgver}.tar.bz2") +sha1sums=('bc65ff2833142ae6bd49d469224bc2111f30e078') + +build() { + cd "${srcdir}/gotoh-${_realname}-${tag}" + + test -x ver || printf '#!/bin/sh\n\necho Windows\n' > ver + + PATH=.:$PATH make -j1 rebuild +} + +package() { + cd "${srcdir}/gotoh-${_realname}-${tag}" + + install -d "${pkgdir}${MINGW_PREFIX}/bin/" + install connect.exe "${pkgdir}${MINGW_PREFIX}/bin/" + + install -d "${pkgdir}${MINGW_PREFIX}/share/doc/connect/" + install doc/manual.html "${pkgdir}${MINGW_PREFIX}/share/doc/connect/" + install doc/manual.txt "${pkgdir}${MINGW_PREFIX}/share/doc/connect/" +} diff --git a/mingw-w64-coq/0001-Guess-the-libraries-are-located-at-lib-coq-instead-o.patch b/mingw-w64-coq/0001-Guess-the-libraries-are-located-at-lib-coq-instead-o.patch new file mode 100644 index 0000000000..dbbcbdb60d --- /dev/null +++ b/mingw-w64-coq/0001-Guess-the-libraries-are-located-at-lib-coq-instead-o.patch @@ -0,0 +1,26 @@ +From dab04e936fd8c195843ac0b4a40201c46142da4a Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Sun, 5 Apr 2015 16:46:03 +0800 +Subject: [PATCH] Guess the libraries are located at lib/coq/ instead of lib/ + +Signed-off-by: Junjie Mao +--- + lib/envars.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/envars.ml b/lib/envars.ml +index 3040dd4..3a25e9c 100644 +--- a/lib/envars.ml ++++ b/lib/envars.ml +@@ -34,7 +34,7 @@ let reldir instdir testfile oth = + + let guess_coqlib () = + let file = "states/initial.coq" in +- reldir (if Coq_config.arch = "win32" then ["lib"] else ["lib";"coq"]) file ++ reldir (if Coq_config.arch = "win32" then ["lib";"coq"] else ["lib";"coq"]) file + (fun () -> + let coqlib = match Coq_config.coqlib with + | Some coqlib -> coqlib +-- +2.3.4 + diff --git a/mingw-w64-coq/PKGBUILD b/mingw-w64-coq/PKGBUILD new file mode 100644 index 0000000000..35be821c1f --- /dev/null +++ b/mingw-w64-coq/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Junjie Mao + +_realname=coq +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=8.4pl6 +pkgrel=1 +pkgdesc="A formal proof management system (mingw-w64)" +arch=('any') +url='https://coq.inria.fr/' +license=('LGPL 2.1') +depends=("${MINGW_PACKAGE_PREFIX}-ocaml" + "${MINGW_PACKAGE_PREFIX}-ocaml-camlp4") +source=("https://coq.inria.fr/distrib/V${pkgver}/files/${_realname}-${pkgver}.tar.gz" + "0001-Guess-the-libraries-are-located-at-lib-coq-instead-o.patch") +sha1sums=('107717cbaef3a469e8ff775ae54dbbc457935816' + '5683480358e92b4eb38adc2402dd0febf37ebb2e') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-Guess-the-libraries-are-located-at-lib-coq-instead-o.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + ./configure \ + -prefix ${MINGW_PREFIX} \ + -bindir ${MINGW_PREFIX}/bin \ + -libdir ${MINGW_PREFIX}/lib/coq \ + -mandir ${MINGW_PREFIX}/share/man \ + -configdir ${MINGW_PREFIX}/etc/xdg/coq \ + -datadir ${MINGW_PREFIX}/share/coq \ + -docdir ${MINGW_PREFIX}/share/doc/coq \ + -emacslib ${MINGW_PREFIX}/share/emacs/site-lisp/coq \ + -coqdocdir ${MINGW_PREFIX}/share/texmf/tex \ + -usecamlp4 -arch win32 -coqide no + + make revision + make coq +} + +check() { + # Some tests fail due to the following reasons: + # * Some signals are not available + # * lockf (lock a file region) fails + # These cases also fail with the official binaries. + plain "skip" +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + export OCAMLLIB=${MINGW_PREFIX}/lib/ocaml + make install COQINSTALLPREFIX=${pkgdir}/ OLDROOT=$(cygpath -m /) + [ -f LICENSE ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + [ -f COPYRIGHT ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + [ -f CREDITS ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-cotire/PKGBUILD b/mingw-w64-cotire/PKGBUILD new file mode 100644 index 0000000000..1088def648 --- /dev/null +++ b/mingw-w64-cotire/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Norbert Pfeiler + +_realname=cotire +pkgbase=mingw-w64-${_realname} +pkgname="$MINGW_PACKAGE_PREFIX-$_realname" +pkgver=1.7.6 +pkgrel=1 +pkgdesc='CMake module to speed up builds (automated PCH, unity builds). (mingw-w64)' +arch=(any) +license=('custom') +conflicts=("$MINGW_PACKAGE_PREFIX-cmake<3.4" "$MINGW_PACKAGE_PREFIX-cmake>=3.5") # the Modules dir changes every major release +url='https://github.com/sakra/cotire' +source=("https://github.com/sakra/cotire/archive/$_realname-$pkgver.tar.gz") +md5sums=('9f33cfa81d99686af98e73331adc0ed7') + +package() { + cd "$_realname-$_realname-$pkgver" + + modules_dir="$pkgdir$MINGW_PREFIX/share/cmake-3.4/Modules/" + mkdir -p $modules_dir + cp CMake/cotire.cmake $modules_dir + + license_dir="$pkgdir$MINGW_PREFIX/share/licenses/cotire/" + mkdir -p $license_dir + cp license $license_dir +} diff --git a/mingw-w64-cppunit/PKGBUILD b/mingw-w64-cppunit/PKGBUILD index 10b5c1e427..9ab0101263 100644 --- a/mingw-w64-cppunit/PKGBUILD +++ b/mingw-w64-cppunit/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=cppunit - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.13.2 -pkgrel=2 +pkgrel=4 pkgdesc="A C++ unit testing framework (mingw-w64)" arch=('any') url="http://www.freedesktop.org/wiki/Software/cppunit" @@ -16,6 +15,7 @@ source=("http://dev-www.libreoffice.org/src/${_realname}-${pkgver}.tar.gz") md5sums=('d1c6bdd5a76c66d2c38331e2d287bc01') build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ @@ -23,10 +23,11 @@ build() { --host=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-creduce-git/PKGBUILD b/mingw-w64-creduce-git/PKGBUILD new file mode 100644 index 0000000000..c5414ffe4a --- /dev/null +++ b/mingw-w64-creduce-git/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Ray Donnelly + +_realname=creduce +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=creduce.2.3.0.18.g7b3ce38 +pkgrel=2 +pkgdesc="A C program reducer (mingw-w64)" +depends=('perl-Benchmark-Timer' + 'perl-Exporter-Lite' + 'perl-File-Which' + 'perl-Getopt-Tabular' + 'perl-Regexp-Common' + 'perl-Sys-CPU' + 'delta' + "${MINGW_PACKAGE_PREFIX}-astyle" + "${MINGW_PACKAGE_PREFIX}-indent" + "${MINGW_PACKAGE_PREFIX}-clang") +arch=('any') +url='https://github.com/csmith-project/creduce' +license=('custom:University of Illinois/NCSA Open Source License') +makedepends=("git" "flex" "${MINGW_PACKAGE_PREFIX}-clang") +source=(${_realname}::git+https://github.com/csmith-project/creduce.git + "llvm-config-cygpath") +sha256sums=('SKIP' + '03a7239d1e26d8a5dd5f405e10826679725cae6c01a9c37e80c6f1c184dad0a9') + +pkgver() { + cd "${srcdir}/${_realname}" + git describe --always | sed 's|-|.|g' +} + +prepare() { + cd "${srcdir}" + [[ -d tools ]] && rm -rf tools + mkdir tools + cp -f "${srcdir}"/llvm-config-cygpath tools/llvm-config +} + +build() { + cd "${srcdir}" + [ -d ${CARCH} ] && rm -rf ${CARCH} + mkdir ${CARCH} + cd ${CARCH} + PATH="${srcdir}/tools:$PATH" \ + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/${CARCH}" + make DESTDIR="${pkgdir}" install + install -Dm644 "../${_realname}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + + # Point creduce perl script: + # #!/${MINGW_PREFIX} -> #!/usr + # .. to msys2 perl. + sed "s|#!${MINGW_PREFIX}|#!/usr|g" \ + -i ${pkgdir}${MINGW_PREFIX}/bin/creduce +} diff --git a/mingw-w64-creduce-git/llvm-config-cygpath b/mingw-w64-creduce-git/llvm-config-cygpath new file mode 100644 index 0000000000..427bcc178e --- /dev/null +++ b/mingw-w64-creduce-git/llvm-config-cygpath @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Translates output from MSYS2/MinGW-w64 llvm-config.exe to MSYS2 form. +# It may make sense to include this as part of the llvm packages? + +MINGW_PREFIX_M=$(cygpath -m $(dirname $(dirname $(which llvm-config)))) +# echo "input $*" >> /tmp/llvm-config.log +# echo "output " $(llvm-config.exe $*) | tr '\\' '/' | sed "s|${MINGW_PREFIX_M}|$(cygpath -u ${MINGW_PREFIX_M})|g" >> /tmp/llvm-config.log +echo $(llvm-config.exe $*) | tr '\\' '/' | sed "s|${MINGW_PREFIX_M}|$(cygpath -u ${MINGW_PREFIX_M})|g" diff --git a/mingw-w64-creduce/PKGBUILD b/mingw-w64-creduce/PKGBUILD new file mode 100644 index 0000000000..9744e4077d --- /dev/null +++ b/mingw-w64-creduce/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Ray Donnelly + +_realname=creduce +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +pkgver=2.3.0 +pkgrel=3 +pkgdesc="A C program reducer (mingw-w64)" +depends=('perl-Benchmark-Timer' + 'perl-Exporter-Lite' + 'perl-File-Which' + 'perl-Getopt-Tabular' + 'perl-Regexp-Common' + 'perl-Sys-CPU' + 'delta' + "${MINGW_PACKAGE_PREFIX}-astyle" + "${MINGW_PACKAGE_PREFIX}-indent" + "${MINGW_PACKAGE_PREFIX}-clang") +arch=('any') +url='https://github.com/csmith-project/creduce' +license=('custom:University of Illinois/NCSA Open Source License') +makedepends=("flex" "${MINGW_PACKAGE_PREFIX}-clang") +source=(https://github.com/csmith-project/creduce/archive/${_realname}-${pkgver}.tar.gz + "llvm-config-cygpath") +sha256sums=('47a42751aab8b51bc10d8df62f359bdc1b4a644f16feb85b9f7325f0c5bce4a3' + '03a7239d1e26d8a5dd5f405e10826679725cae6c01a9c37e80c6f1c184dad0a9') + +prepare() { + cd "${srcdir}" + [[ -d tools ]] && rm -rf tools + mkdir tools + cp -f "${srcdir}"/llvm-config-cygpath tools/llvm-config +} + +build() { + cd "${srcdir}" + [ -d ${CARCH} ] && rm -rf ${CARCH} + mkdir ${CARCH} + cd ${CARCH} + PATH="${srcdir}/tools:$PATH" \ + ../${_realname}-${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/${CARCH}" + make DESTDIR="${pkgdir}" install + install -Dm644 "../${_realname}-${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + + # Point creduce perl script: + # #!/${MINGW_PREFIX} -> #!/usr + # .. to msys2 perl. + sed "s|#!${MINGW_PREFIX}|#!/usr|g" \ + -i ${pkgdir}${MINGW_PREFIX}/bin/creduce +} diff --git a/mingw-w64-creduce/llvm-config-cygpath b/mingw-w64-creduce/llvm-config-cygpath new file mode 100644 index 0000000000..427bcc178e --- /dev/null +++ b/mingw-w64-creduce/llvm-config-cygpath @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Translates output from MSYS2/MinGW-w64 llvm-config.exe to MSYS2 form. +# It may make sense to include this as part of the llvm packages? + +MINGW_PREFIX_M=$(cygpath -m $(dirname $(dirname $(which llvm-config)))) +# echo "input $*" >> /tmp/llvm-config.log +# echo "output " $(llvm-config.exe $*) | tr '\\' '/' | sed "s|${MINGW_PREFIX_M}|$(cygpath -u ${MINGW_PREFIX_M})|g" >> /tmp/llvm-config.log +echo $(llvm-config.exe $*) | tr '\\' '/' | sed "s|${MINGW_PREFIX_M}|$(cygpath -u ${MINGW_PREFIX_M})|g" diff --git a/mingw-w64-crt-git/0002-dxgi-Add-interface-for-IDXGISurface1.patch b/mingw-w64-crt-git/0002-dxgi-Add-interface-for-IDXGISurface1.patch new file mode 100644 index 0000000000..de09588ee9 --- /dev/null +++ b/mingw-w64-crt-git/0002-dxgi-Add-interface-for-IDXGISurface1.patch @@ -0,0 +1,258 @@ +From a02316fd603ffa47e68c700390e66baaa2ffa7f5 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 16 Feb 2015 19:56:22 +0000 +Subject: [PATCH 2/6] dxgi: Add interface for IDXGISurface1 + +--- + mingw-w64-headers/direct-x/include/dxgi.h | 191 ++++++++++++++++++++++++++++ + mingw-w64-headers/direct-x/include/dxgi.idl | 19 +++ + 2 files changed, 210 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/dxgi.h b/mingw-w64-headers/direct-x/include/dxgi.h +index 88e76a2..08def83 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi.h ++++ b/mingw-w64-headers/direct-x/include/dxgi.h +@@ -42,6 +42,11 @@ typedef interface IDXGIKeyedMutex IDXGIKeyedMutex; + typedef interface IDXGISurface IDXGISurface; + #endif + ++#ifndef __IDXGISurface1_FWD_DEFINED__ ++#define __IDXGISurface1_FWD_DEFINED__ ++typedef interface IDXGISurface1 IDXGISurface1; ++#endif ++ + #ifndef __IDXGIOutput_FWD_DEFINED__ + #define __IDXGIOutput_FWD_DEFINED__ + typedef interface IDXGIOutput IDXGIOutput; +@@ -1019,6 +1024,192 @@ void __RPC_STUB IDXGISurface_Unmap_Stub( + #endif /* __IDXGISurface_INTERFACE_DEFINED__ */ + + /***************************************************************************** ++ * IDXGISurface1 interface ++ */ ++#ifndef __IDXGISurface1_INTERFACE_DEFINED__ ++#define __IDXGISurface1_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGISurface1, 0x4ae63092, 0x6327, 0x4c1b, 0x80,0xae, 0xbf,0xe1,0x2e,0xa3,0x2b,0x86); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("4ae63092-6327-4c1b-80ae-bfe12ea32b86") ++IDXGISurface1 : public IDXGISurface ++{ ++ virtual HRESULT STDMETHODCALLTYPE GetDC( ++ WINBOOL Discard, ++ HDC *dc) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE ReleaseDC( ++ RECT *rect) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGISurface1, 0x4ae63092, 0x6327, 0x4c1b, 0x80,0xae, 0xbf,0xe1,0x2e,0xa3,0x2b,0x86) ++#endif ++#else ++typedef struct IDXGISurface1Vtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGISurface1* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGISurface1* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGISurface1* This); ++ ++ /*** IDXGIObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ IDXGISurface1* This, ++ REFGUID guid, ++ UINT data_size, ++ const void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ IDXGISurface1* This, ++ REFGUID guid, ++ const IUnknown *object); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ IDXGISurface1* This, ++ REFGUID guid, ++ UINT *data_size, ++ void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *GetParent)( ++ IDXGISurface1* This, ++ REFIID riid, ++ void **parent); ++ ++ /*** IDXGIDeviceSubObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDevice)( ++ IDXGISurface1* This, ++ REFIID riid, ++ void **device); ++ ++ /*** IDXGISurface methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDesc)( ++ IDXGISurface1* This, ++ DXGI_SURFACE_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *Map)( ++ IDXGISurface1* This, ++ DXGI_MAPPED_RECT *mapped_rect, ++ UINT flags); ++ ++ HRESULT (STDMETHODCALLTYPE *Unmap)( ++ IDXGISurface1* This); ++ ++ /*** IDXGISurface1 methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDC)( ++ IDXGISurface1* This, ++ WINBOOL Discard, ++ HDC *dc); ++ ++ HRESULT (STDMETHODCALLTYPE *ReleaseDC)( ++ IDXGISurface1* This, ++ RECT *rect); ++ ++ END_INTERFACE ++} IDXGISurface1Vtbl; ++interface IDXGISurface1 { ++ CONST_VTBL IDXGISurface1Vtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGISurface1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGISurface1_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGISurface1_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIObject methods ***/ ++#define IDXGISurface1_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) ++#define IDXGISurface1_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) ++#define IDXGISurface1_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) ++#define IDXGISurface1_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) ++/*** IDXGIDeviceSubObject methods ***/ ++#define IDXGISurface1_GetDevice(This,riid,device) (This)->lpVtbl->GetDevice(This,riid,device) ++/*** IDXGISurface methods ***/ ++#define IDXGISurface1_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) ++#define IDXGISurface1_Map(This,mapped_rect,flags) (This)->lpVtbl->Map(This,mapped_rect,flags) ++#define IDXGISurface1_Unmap(This) (This)->lpVtbl->Unmap(This) ++/*** IDXGISurface1 methods ***/ ++#define IDXGISurface1_GetDC(This,Discard,dc) (This)->lpVtbl->GetDC(This,Discard,dc) ++#define IDXGISurface1_ReleaseDC(This,rect) (This)->lpVtbl->ReleaseDC(This,rect) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_QueryInterface(IDXGISurface1* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGISurface1_AddRef(IDXGISurface1* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGISurface1_Release(IDXGISurface1* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIObject methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_SetPrivateData(IDXGISurface1* This,REFGUID guid,UINT data_size,const void *data) { ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGISurface1_SetPrivateDataInterface(IDXGISurface1* This,REFGUID guid,const IUnknown *object) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); ++} ++static FORCEINLINE HRESULT IDXGISurface1_GetPrivateData(IDXGISurface1* This,REFGUID guid,UINT *data_size,void *data) { ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGISurface1_GetParent(IDXGISurface1* This,REFIID riid,void **parent) { ++ return This->lpVtbl->GetParent(This,riid,parent); ++} ++/*** IDXGIDeviceSubObject methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_GetDevice(IDXGISurface1* This,REFIID riid,void **device) { ++ return This->lpVtbl->GetDevice(This,riid,device); ++} ++/*** IDXGISurface methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_GetDesc(IDXGISurface1* This,DXGI_SURFACE_DESC *desc) { ++ return This->lpVtbl->GetDesc(This,desc); ++} ++static FORCEINLINE HRESULT IDXGISurface1_Map(IDXGISurface1* This,DXGI_MAPPED_RECT *mapped_rect,UINT flags) { ++ return This->lpVtbl->Map(This,mapped_rect,flags); ++} ++static FORCEINLINE HRESULT IDXGISurface1_Unmap(IDXGISurface1* This) { ++ return This->lpVtbl->Unmap(This); ++} ++/*** IDXGISurface1 methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_GetDC(IDXGISurface1* This,WINBOOL Discard,HDC *dc) { ++ return This->lpVtbl->GetDC(This,Discard,dc); ++} ++static FORCEINLINE HRESULT IDXGISurface1_ReleaseDC(IDXGISurface1* This,RECT *rect) { ++ return This->lpVtbl->ReleaseDC(This,rect); ++} ++#endif ++#endif ++ ++#endif ++ ++HRESULT STDMETHODCALLTYPE IDXGISurface1_GetDC_Proxy( ++ IDXGISurface1* This, ++ WINBOOL Discard, ++ HDC *dc); ++void __RPC_STUB IDXGISurface1_GetDC_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGISurface1_ReleaseDC_Proxy( ++ IDXGISurface1* This, ++ RECT *rect); ++void __RPC_STUB IDXGISurface1_ReleaseDC_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGISurface1_INTERFACE_DEFINED__ */ ++ ++/***************************************************************************** + * IDXGIOutput interface + */ + #ifndef __IDXGIOutput_INTERFACE_DEFINED__ +diff --git a/mingw-w64-headers/direct-x/include/dxgi.idl b/mingw-w64-headers/direct-x/include/dxgi.idl +index 009a6b5..41ff7f1 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi.idl ++++ b/mingw-w64-headers/direct-x/include/dxgi.idl +@@ -1,5 +1,6 @@ + /* + * Copyright 2007 Andras Kovacs ++ * Copyright 2015 Martell Malone + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -223,6 +224,24 @@ interface IDXGISurface : IDXGIDeviceSubObject + + [ + object, ++ uuid(4ae63092-6327-4c1b-80ae-bfe12ea32b86), ++ local, ++ pointer_default(unique) ++] ++interface IDXGISurface1 : IDXGISurface ++{ ++ HRESULT GetDC( ++ [in] BOOL Discard, ++ [out] HDC *dc ++ ); ++ ++ HRESULT ReleaseDC( ++ [in] RECT *rect ++ ); ++} ++ ++[ ++ object, + local, + uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa) + ] +-- +2.4.5 + diff --git a/mingw-w64-crt-git/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch b/mingw-w64-crt-git/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch new file mode 100644 index 0000000000..4d77b2292e --- /dev/null +++ b/mingw-w64-crt-git/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch @@ -0,0 +1,961 @@ +From 0e266c2461defa50a51bda4eab1b1c08d37f698d Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 16 Feb 2015 23:10:00 +0000 +Subject: [PATCH 3/6] dxgi: Add missing dxgi 1.2 structs and interfaces + +--- + mingw-w64-headers/direct-x/include/dxgi1_2.h | 744 +++++++++++++++++++++++++ + mingw-w64-headers/direct-x/include/dxgi1_2.idl | 151 +++++ + 2 files changed, 895 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/dxgi1_2.h b/mingw-w64-headers/direct-x/include/dxgi1_2.h +index de3f359..3af09c7 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi1_2.h ++++ b/mingw-w64-headers/direct-x/include/dxgi1_2.h +@@ -17,6 +17,16 @@ + + /* Forward declarations */ + ++#ifndef __IDXGIDisplayControl_FWD_DEFINED__ ++#define __IDXGIDisplayControl_FWD_DEFINED__ ++typedef interface IDXGIDisplayControl IDXGIDisplayControl; ++#endif ++ ++#ifndef __IDXGIOutputDuplication_FWD_DEFINED__ ++#define __IDXGIOutputDuplication_FWD_DEFINED__ ++typedef interface IDXGIOutputDuplication IDXGIOutputDuplication; ++#endif ++ + #ifndef __IDXGIDevice2_FWD_DEFINED__ + #define __IDXGIDevice2_FWD_DEFINED__ + typedef interface IDXGIDevice2 IDXGIDevice2; +@@ -37,6 +47,11 @@ typedef interface IDXGIFactory2 IDXGIFactory2; + typedef interface IDXGIAdapter2 IDXGIAdapter2; + #endif + ++#ifndef __IDXGIOutput1_FWD_DEFINED__ ++#define __IDXGIOutput1_FWD_DEFINED__ ++typedef interface IDXGIOutput1 IDXGIOutput1; ++#endif ++ + /* Headers for imported files */ + + #include +@@ -45,6 +60,423 @@ typedef interface IDXGIAdapter2 IDXGIAdapter2; + extern "C" { + #endif + ++/***************************************************************************** ++ * IDXGIDisplayControl interface ++ */ ++#ifndef __IDXGIDisplayControl_INTERFACE_DEFINED__ ++#define __IDXGIDisplayControl_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGIDisplayControl, 0xea9dbf1a, 0xc88e, 0x4486, 0x85,0x4a, 0x98,0xaa,0x01,0x38,0xf3,0x0c); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("ea9dbf1a-c88e-4486-854a-98aa0138f30c") ++IDXGIDisplayControl : public IUnknown ++{ ++ virtual WINBOOL STDMETHODCALLTYPE IsStereoEnabled( ++ ) = 0; ++ ++ virtual void STDMETHODCALLTYPE SetStereoEnabled( ++ WINBOOL enabled) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGIDisplayControl, 0xea9dbf1a, 0xc88e, 0x4486, 0x85,0x4a, 0x98,0xaa,0x01,0x38,0xf3,0x0c) ++#endif ++#else ++typedef struct IDXGIDisplayControlVtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGIDisplayControl* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGIDisplayControl* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGIDisplayControl* This); ++ ++ /*** IDXGIDisplayControl methods ***/ ++ WINBOOL (STDMETHODCALLTYPE *IsStereoEnabled)( ++ IDXGIDisplayControl* This); ++ ++ void (STDMETHODCALLTYPE *SetStereoEnabled)( ++ IDXGIDisplayControl* This, ++ WINBOOL enabled); ++ ++ END_INTERFACE ++} IDXGIDisplayControlVtbl; ++interface IDXGIDisplayControl { ++ CONST_VTBL IDXGIDisplayControlVtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGIDisplayControl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGIDisplayControl_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGIDisplayControl_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIDisplayControl methods ***/ ++#define IDXGIDisplayControl_IsStereoEnabled(This) (This)->lpVtbl->IsStereoEnabled(This) ++#define IDXGIDisplayControl_SetStereoEnabled(This,enabled) (This)->lpVtbl->SetStereoEnabled(This,enabled) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGIDisplayControl_QueryInterface(IDXGIDisplayControl* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGIDisplayControl_AddRef(IDXGIDisplayControl* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGIDisplayControl_Release(IDXGIDisplayControl* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIDisplayControl methods ***/ ++static FORCEINLINE WINBOOL IDXGIDisplayControl_IsStereoEnabled(IDXGIDisplayControl* This) { ++ return This->lpVtbl->IsStereoEnabled(This); ++} ++static FORCEINLINE void IDXGIDisplayControl_SetStereoEnabled(IDXGIDisplayControl* This,WINBOOL enabled) { ++ This->lpVtbl->SetStereoEnabled(This,enabled); ++} ++#endif ++#endif ++ ++#endif ++ ++WINBOOL STDMETHODCALLTYPE IDXGIDisplayControl_IsStereoEnabled_Proxy( ++ IDXGIDisplayControl* This); ++void __RPC_STUB IDXGIDisplayControl_IsStereoEnabled_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++void STDMETHODCALLTYPE IDXGIDisplayControl_SetStereoEnabled_Proxy( ++ IDXGIDisplayControl* This, ++ WINBOOL enabled); ++void __RPC_STUB IDXGIDisplayControl_SetStereoEnabled_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGIDisplayControl_INTERFACE_DEFINED__ */ ++ ++typedef struct DXGI_OUTDUPL_MOVE_RECT { ++ POINT SourcePoint; ++ RECT DestinationRect; ++} DXGI_OUTDUPL_MOVE_RECT; ++typedef struct DXGI_OUTDUPL_DESC { ++ DXGI_MODE_DESC ModeDesc; ++ DXGI_MODE_ROTATION Rotation; ++ WINBOOL DesktopImageInSystemMemory; ++} DXGI_OUTDUPL_DESC; ++typedef struct DXGI_OUTDUPL_POINTER_POSITION { ++ POINT Position; ++ WINBOOL Visible; ++} DXGI_OUTDUPL_POINTER_POSITION; ++typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE { ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4 ++} DXGI_OUTDUPL_POINTER_SHAPE_TYPE; ++typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO { ++ UINT Type; ++ UINT Width; ++ UINT Height; ++ UINT Pitch; ++ POINT HotSpot; ++} DXGI_OUTDUPL_POINTER_SHAPE_INFO; ++typedef struct DXGI_OUTDUPL_FRAME_INFO { ++ LARGE_INTEGER LastPresentTime; ++ LARGE_INTEGER LastMouseUpdateTime; ++ UINT AccumulatedFrames; ++ WINBOOL RectsCoalesced; ++ WINBOOL ProtectedContentMaskedOut; ++ DXGI_OUTDUPL_POINTER_POSITION PointerPosition; ++ UINT TotalMetadataBufferSize; ++ UINT PointerShapeBufferSize; ++} DXGI_OUTDUPL_FRAME_INFO; ++/***************************************************************************** ++ * IDXGIOutputDuplication interface ++ */ ++#ifndef __IDXGIOutputDuplication_INTERFACE_DEFINED__ ++#define __IDXGIOutputDuplication_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGIOutputDuplication, 0x191cfac3, 0xa341, 0x470d, 0xb2,0x6e, 0xa8,0x64,0xf4,0x28,0x31,0x9c); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("191cfac3-a341-470d-b26e-a864f428319c") ++IDXGIOutputDuplication : public IDXGIObject ++{ ++ virtual void STDMETHODCALLTYPE GetDesc( ++ DXGI_OUTDUPL_DESC *desc) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE AcquireNextFrame( ++ UINT timeout, ++ DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ IDXGIResource **resource) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetFrameDirtyRects( ++ UINT dirty_size, ++ RECT *buffer, ++ UINT *buffer_size) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetFrameMoveRects( ++ UINT move_size, ++ DXGI_OUTDUPL_MOVE_RECT *rect, ++ UINT *rect_size) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetFramePointerShape( ++ UINT shape_size, ++ void *buffer, ++ UINT *buffer_size, ++ DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE MapDesktopSurface( ++ DXGI_MAPPED_RECT *rect) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE UnMapDesktopSurface( ++ ) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE ReleaseFrame( ++ ) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGIOutputDuplication, 0x191cfac3, 0xa341, 0x470d, 0xb2,0x6e, 0xa8,0x64,0xf4,0x28,0x31,0x9c) ++#endif ++#else ++typedef struct IDXGIOutputDuplicationVtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGIOutputDuplication* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGIOutputDuplication* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGIOutputDuplication* This); ++ ++ /*** IDXGIObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ IDXGIOutputDuplication* This, ++ REFGUID guid, ++ UINT data_size, ++ const void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ IDXGIOutputDuplication* This, ++ REFGUID guid, ++ const IUnknown *object); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ IDXGIOutputDuplication* This, ++ REFGUID guid, ++ UINT *data_size, ++ void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *GetParent)( ++ IDXGIOutputDuplication* This, ++ REFIID riid, ++ void **parent); ++ ++ /*** IDXGIOutputDuplication methods ***/ ++ void (STDMETHODCALLTYPE *GetDesc)( ++ IDXGIOutputDuplication* This, ++ DXGI_OUTDUPL_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *AcquireNextFrame)( ++ IDXGIOutputDuplication* This, ++ UINT timeout, ++ DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ IDXGIResource **resource); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFrameDirtyRects)( ++ IDXGIOutputDuplication* This, ++ UINT dirty_size, ++ RECT *buffer, ++ UINT *buffer_size); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFrameMoveRects)( ++ IDXGIOutputDuplication* This, ++ UINT move_size, ++ DXGI_OUTDUPL_MOVE_RECT *rect, ++ UINT *rect_size); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFramePointerShape)( ++ IDXGIOutputDuplication* This, ++ UINT shape_size, ++ void *buffer, ++ UINT *buffer_size, ++ DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info); ++ ++ HRESULT (STDMETHODCALLTYPE *MapDesktopSurface)( ++ IDXGIOutputDuplication* This, ++ DXGI_MAPPED_RECT *rect); ++ ++ HRESULT (STDMETHODCALLTYPE *UnMapDesktopSurface)( ++ IDXGIOutputDuplication* This); ++ ++ HRESULT (STDMETHODCALLTYPE *ReleaseFrame)( ++ IDXGIOutputDuplication* This); ++ ++ END_INTERFACE ++} IDXGIOutputDuplicationVtbl; ++interface IDXGIOutputDuplication { ++ CONST_VTBL IDXGIOutputDuplicationVtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGIOutputDuplication_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGIOutputDuplication_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGIOutputDuplication_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIObject methods ***/ ++#define IDXGIOutputDuplication_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) ++#define IDXGIOutputDuplication_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) ++#define IDXGIOutputDuplication_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) ++#define IDXGIOutputDuplication_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) ++/*** IDXGIOutputDuplication methods ***/ ++#define IDXGIOutputDuplication_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) ++#define IDXGIOutputDuplication_AcquireNextFrame(This,timeout,frame_info,resource) (This)->lpVtbl->AcquireNextFrame(This,timeout,frame_info,resource) ++#define IDXGIOutputDuplication_GetFrameDirtyRects(This,dirty_size,buffer,buffer_size) (This)->lpVtbl->GetFrameDirtyRects(This,dirty_size,buffer,buffer_size) ++#define IDXGIOutputDuplication_GetFrameMoveRects(This,move_size,rect,rect_size) (This)->lpVtbl->GetFrameMoveRects(This,move_size,rect,rect_size) ++#define IDXGIOutputDuplication_GetFramePointerShape(This,shape_size,buffer,buffer_size,shape_info) (This)->lpVtbl->GetFramePointerShape(This,shape_size,buffer,buffer_size,shape_info) ++#define IDXGIOutputDuplication_MapDesktopSurface(This,rect) (This)->lpVtbl->MapDesktopSurface(This,rect) ++#define IDXGIOutputDuplication_UnMapDesktopSurface(This) (This)->lpVtbl->UnMapDesktopSurface(This) ++#define IDXGIOutputDuplication_ReleaseFrame(This) (This)->lpVtbl->ReleaseFrame(This) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGIOutputDuplication_QueryInterface(IDXGIOutputDuplication* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGIOutputDuplication_AddRef(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGIOutputDuplication_Release(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIObject methods ***/ ++static FORCEINLINE HRESULT IDXGIOutputDuplication_SetPrivateData(IDXGIOutputDuplication* This,REFGUID guid,UINT data_size,const void *data) { ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_SetPrivateDataInterface(IDXGIOutputDuplication* This,REFGUID guid,const IUnknown *object) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetPrivateData(IDXGIOutputDuplication* This,REFGUID guid,UINT *data_size,void *data) { ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetParent(IDXGIOutputDuplication* This,REFIID riid,void **parent) { ++ return This->lpVtbl->GetParent(This,riid,parent); ++} ++/*** IDXGIOutputDuplication methods ***/ ++static FORCEINLINE void IDXGIOutputDuplication_GetDesc(IDXGIOutputDuplication* This,DXGI_OUTDUPL_DESC *desc) { ++ This->lpVtbl->GetDesc(This,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_AcquireNextFrame(IDXGIOutputDuplication* This,UINT timeout,DXGI_OUTDUPL_FRAME_INFO *frame_info,IDXGIResource **resource) { ++ return This->lpVtbl->AcquireNextFrame(This,timeout,frame_info,resource); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetFrameDirtyRects(IDXGIOutputDuplication* This,UINT dirty_size,RECT *buffer,UINT *buffer_size) { ++ return This->lpVtbl->GetFrameDirtyRects(This,dirty_size,buffer,buffer_size); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetFrameMoveRects(IDXGIOutputDuplication* This,UINT move_size,DXGI_OUTDUPL_MOVE_RECT *rect,UINT *rect_size) { ++ return This->lpVtbl->GetFrameMoveRects(This,move_size,rect,rect_size); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetFramePointerShape(IDXGIOutputDuplication* This,UINT shape_size,void *buffer,UINT *buffer_size,DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info) { ++ return This->lpVtbl->GetFramePointerShape(This,shape_size,buffer,buffer_size,shape_info); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_MapDesktopSurface(IDXGIOutputDuplication* This,DXGI_MAPPED_RECT *rect) { ++ return This->lpVtbl->MapDesktopSurface(This,rect); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_UnMapDesktopSurface(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->UnMapDesktopSurface(This); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_ReleaseFrame(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->ReleaseFrame(This); ++} ++#endif ++#endif ++ ++#endif ++ ++void STDMETHODCALLTYPE IDXGIOutputDuplication_GetDesc_Proxy( ++ IDXGIOutputDuplication* This, ++ DXGI_OUTDUPL_DESC *desc); ++void __RPC_STUB IDXGIOutputDuplication_GetDesc_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_AcquireNextFrame_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT timeout, ++ DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ IDXGIResource **resource); ++void __RPC_STUB IDXGIOutputDuplication_AcquireNextFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_GetFrameDirtyRects_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT dirty_size, ++ RECT *buffer, ++ UINT *buffer_size); ++void __RPC_STUB IDXGIOutputDuplication_GetFrameDirtyRects_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_GetFrameMoveRects_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT move_size, ++ DXGI_OUTDUPL_MOVE_RECT *rect, ++ UINT *rect_size); ++void __RPC_STUB IDXGIOutputDuplication_GetFrameMoveRects_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_GetFramePointerShape_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT shape_size, ++ void *buffer, ++ UINT *buffer_size, ++ DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info); ++void __RPC_STUB IDXGIOutputDuplication_GetFramePointerShape_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_MapDesktopSurface_Proxy( ++ IDXGIOutputDuplication* This, ++ DXGI_MAPPED_RECT *rect); ++void __RPC_STUB IDXGIOutputDuplication_MapDesktopSurface_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_UnMapDesktopSurface_Proxy( ++ IDXGIOutputDuplication* This); ++void __RPC_STUB IDXGIOutputDuplication_UnMapDesktopSurface_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_ReleaseFrame_Proxy( ++ IDXGIOutputDuplication* This); ++void __RPC_STUB IDXGIOutputDuplication_ReleaseFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGIOutputDuplication_INTERFACE_DEFINED__ */ ++ + typedef enum _DXGI_OFFER_RESOURCE_PRIORITY { + DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, + DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = 2, +@@ -1385,6 +1817,318 @@ void __RPC_STUB IDXGIAdapter2_GetDesc2_Stub( + + #endif /* __IDXGIAdapter2_INTERFACE_DEFINED__ */ + ++typedef struct DXGI_MODE_DESC1 { ++ UINT Width; ++ UINT Height; ++ DXGI_RATIONAL RefreshRate; ++ DXGI_FORMAT Format; ++ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; ++ DXGI_MODE_SCALING Scaling; ++ WINBOOL Stereo; ++} DXGI_MODE_DESC1; ++/***************************************************************************** ++ * IDXGIOutput1 interface ++ */ ++#ifndef __IDXGIOutput1_INTERFACE_DEFINED__ ++#define __IDXGIOutput1_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGIOutput1, 0x00cddea8, 0x939b, 0x4b83, 0xa3,0x40, 0xa6,0x85,0x22,0x66,0x66,0xcc); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("00cddea8-939b-4b83-a340-a685226666cc") ++IDXGIOutput1 : public IDXGIOutput ++{ ++ virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList1( ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC1 *desc) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode1( ++ const DXGI_MODE_DESC1 *mode, ++ DXGI_MODE_DESC1 *closest_match, ++ IUnknown *device) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData1( ++ IDXGIResource *resource) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE DuplicateOutput( ++ IUnknown *device, ++ IDXGIOutputDuplication **output) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGIOutput1, 0x00cddea8, 0x939b, 0x4b83, 0xa3,0x40, 0xa6,0x85,0x22,0x66,0x66,0xcc) ++#endif ++#else ++typedef struct IDXGIOutput1Vtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGIOutput1* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGIOutput1* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGIOutput1* This); ++ ++ /*** IDXGIObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ IDXGIOutput1* This, ++ REFGUID guid, ++ UINT data_size, ++ const void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ IDXGIOutput1* This, ++ REFGUID guid, ++ const IUnknown *object); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ IDXGIOutput1* This, ++ REFGUID guid, ++ UINT *data_size, ++ void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *GetParent)( ++ IDXGIOutput1* This, ++ REFIID riid, ++ void **parent); ++ ++ /*** IDXGIOutput methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDesc)( ++ IDXGIOutput1* This, ++ DXGI_OUTPUT_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *GetDisplayModeList)( ++ IDXGIOutput1* This, ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *FindClosestMatchingMode)( ++ IDXGIOutput1* This, ++ const DXGI_MODE_DESC *mode, ++ DXGI_MODE_DESC *closest_match, ++ IUnknown *device); ++ ++ HRESULT (STDMETHODCALLTYPE *WaitForVBlank)( ++ IDXGIOutput1* This); ++ ++ HRESULT (STDMETHODCALLTYPE *TakeOwnership)( ++ IDXGIOutput1* This, ++ IUnknown *device, ++ WINBOOL exclusive); ++ ++ void (STDMETHODCALLTYPE *ReleaseOwnership)( ++ IDXGIOutput1* This); ++ ++ HRESULT (STDMETHODCALLTYPE *GetGammaControlCapabilities)( ++ IDXGIOutput1* This, ++ DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps); ++ ++ HRESULT (STDMETHODCALLTYPE *SetGammaControl)( ++ IDXGIOutput1* This, ++ const DXGI_GAMMA_CONTROL *gamma_control); ++ ++ HRESULT (STDMETHODCALLTYPE *GetGammaControl)( ++ IDXGIOutput1* This, ++ DXGI_GAMMA_CONTROL *gamma_control); ++ ++ HRESULT (STDMETHODCALLTYPE *SetDisplaySurface)( ++ IDXGIOutput1* This, ++ IDXGISurface *surface); ++ ++ HRESULT (STDMETHODCALLTYPE *GetDisplaySurfaceData)( ++ IDXGIOutput1* This, ++ IDXGISurface *surface); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFrameStatistics)( ++ IDXGIOutput1* This, ++ DXGI_FRAME_STATISTICS *stats); ++ ++ /*** IDXGIOutput1 methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDisplayModeList1)( ++ IDXGIOutput1* This, ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC1 *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *FindClosestMatchingMode1)( ++ IDXGIOutput1* This, ++ const DXGI_MODE_DESC1 *mode, ++ DXGI_MODE_DESC1 *closest_match, ++ IUnknown *device); ++ ++ HRESULT (STDMETHODCALLTYPE *GetDisplaySurfaceData1)( ++ IDXGIOutput1* This, ++ IDXGIResource *resource); ++ ++ HRESULT (STDMETHODCALLTYPE *DuplicateOutput)( ++ IDXGIOutput1* This, ++ IUnknown *device, ++ IDXGIOutputDuplication **output); ++ ++ END_INTERFACE ++} IDXGIOutput1Vtbl; ++interface IDXGIOutput1 { ++ CONST_VTBL IDXGIOutput1Vtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGIOutput1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGIOutput1_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGIOutput1_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIObject methods ***/ ++#define IDXGIOutput1_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) ++#define IDXGIOutput1_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) ++#define IDXGIOutput1_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) ++#define IDXGIOutput1_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) ++/*** IDXGIOutput methods ***/ ++#define IDXGIOutput1_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) ++#define IDXGIOutput1_GetDisplayModeList(This,format,flags,mode_count,desc) (This)->lpVtbl->GetDisplayModeList(This,format,flags,mode_count,desc) ++#define IDXGIOutput1_FindClosestMatchingMode(This,mode,closest_match,device) (This)->lpVtbl->FindClosestMatchingMode(This,mode,closest_match,device) ++#define IDXGIOutput1_WaitForVBlank(This) (This)->lpVtbl->WaitForVBlank(This) ++#define IDXGIOutput1_TakeOwnership(This,device,exclusive) (This)->lpVtbl->TakeOwnership(This,device,exclusive) ++#define IDXGIOutput1_ReleaseOwnership(This) (This)->lpVtbl->ReleaseOwnership(This) ++#define IDXGIOutput1_GetGammaControlCapabilities(This,gamma_caps) (This)->lpVtbl->GetGammaControlCapabilities(This,gamma_caps) ++#define IDXGIOutput1_SetGammaControl(This,gamma_control) (This)->lpVtbl->SetGammaControl(This,gamma_control) ++#define IDXGIOutput1_GetGammaControl(This,gamma_control) (This)->lpVtbl->GetGammaControl(This,gamma_control) ++#define IDXGIOutput1_SetDisplaySurface(This,surface) (This)->lpVtbl->SetDisplaySurface(This,surface) ++#define IDXGIOutput1_GetDisplaySurfaceData(This,surface) (This)->lpVtbl->GetDisplaySurfaceData(This,surface) ++#define IDXGIOutput1_GetFrameStatistics(This,stats) (This)->lpVtbl->GetFrameStatistics(This,stats) ++/*** IDXGIOutput1 methods ***/ ++#define IDXGIOutput1_GetDisplayModeList1(This,format,flags,mode_count,desc) (This)->lpVtbl->GetDisplayModeList1(This,format,flags,mode_count,desc) ++#define IDXGIOutput1_FindClosestMatchingMode1(This,mode,closest_match,device) (This)->lpVtbl->FindClosestMatchingMode1(This,mode,closest_match,device) ++#define IDXGIOutput1_GetDisplaySurfaceData1(This,resource) (This)->lpVtbl->GetDisplaySurfaceData1(This,resource) ++#define IDXGIOutput1_DuplicateOutput(This,device,output) (This)->lpVtbl->DuplicateOutput(This,device,output) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_QueryInterface(IDXGIOutput1* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGIOutput1_AddRef(IDXGIOutput1* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGIOutput1_Release(IDXGIOutput1* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIObject methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_SetPrivateData(IDXGIOutput1* This,REFGUID guid,UINT data_size,const void *data) { ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_SetPrivateDataInterface(IDXGIOutput1* This,REFGUID guid,const IUnknown *object) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetPrivateData(IDXGIOutput1* This,REFGUID guid,UINT *data_size,void *data) { ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetParent(IDXGIOutput1* This,REFIID riid,void **parent) { ++ return This->lpVtbl->GetParent(This,riid,parent); ++} ++/*** IDXGIOutput methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_GetDesc(IDXGIOutput1* This,DXGI_OUTPUT_DESC *desc) { ++ return This->lpVtbl->GetDesc(This,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplayModeList(IDXGIOutput1* This,DXGI_FORMAT format,UINT flags,UINT *mode_count,DXGI_MODE_DESC *desc) { ++ return This->lpVtbl->GetDisplayModeList(This,format,flags,mode_count,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_FindClosestMatchingMode(IDXGIOutput1* This,const DXGI_MODE_DESC *mode,DXGI_MODE_DESC *closest_match,IUnknown *device) { ++ return This->lpVtbl->FindClosestMatchingMode(This,mode,closest_match,device); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_WaitForVBlank(IDXGIOutput1* This) { ++ return This->lpVtbl->WaitForVBlank(This); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_TakeOwnership(IDXGIOutput1* This,IUnknown *device,WINBOOL exclusive) { ++ return This->lpVtbl->TakeOwnership(This,device,exclusive); ++} ++static FORCEINLINE void IDXGIOutput1_ReleaseOwnership(IDXGIOutput1* This) { ++ This->lpVtbl->ReleaseOwnership(This); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetGammaControlCapabilities(IDXGIOutput1* This,DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps) { ++ return This->lpVtbl->GetGammaControlCapabilities(This,gamma_caps); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_SetGammaControl(IDXGIOutput1* This,const DXGI_GAMMA_CONTROL *gamma_control) { ++ return This->lpVtbl->SetGammaControl(This,gamma_control); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetGammaControl(IDXGIOutput1* This,DXGI_GAMMA_CONTROL *gamma_control) { ++ return This->lpVtbl->GetGammaControl(This,gamma_control); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_SetDisplaySurface(IDXGIOutput1* This,IDXGISurface *surface) { ++ return This->lpVtbl->SetDisplaySurface(This,surface); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplaySurfaceData(IDXGIOutput1* This,IDXGISurface *surface) { ++ return This->lpVtbl->GetDisplaySurfaceData(This,surface); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetFrameStatistics(IDXGIOutput1* This,DXGI_FRAME_STATISTICS *stats) { ++ return This->lpVtbl->GetFrameStatistics(This,stats); ++} ++/*** IDXGIOutput1 methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplayModeList1(IDXGIOutput1* This,DXGI_FORMAT format,UINT flags,UINT *mode_count,DXGI_MODE_DESC1 *desc) { ++ return This->lpVtbl->GetDisplayModeList1(This,format,flags,mode_count,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_FindClosestMatchingMode1(IDXGIOutput1* This,const DXGI_MODE_DESC1 *mode,DXGI_MODE_DESC1 *closest_match,IUnknown *device) { ++ return This->lpVtbl->FindClosestMatchingMode1(This,mode,closest_match,device); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplaySurfaceData1(IDXGIOutput1* This,IDXGIResource *resource) { ++ return This->lpVtbl->GetDisplaySurfaceData1(This,resource); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_DuplicateOutput(IDXGIOutput1* This,IUnknown *device,IDXGIOutputDuplication **output) { ++ return This->lpVtbl->DuplicateOutput(This,device,output); ++} ++#endif ++#endif ++ ++#endif ++ ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_GetDisplayModeList1_Proxy( ++ IDXGIOutput1* This, ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC1 *desc); ++void __RPC_STUB IDXGIOutput1_GetDisplayModeList1_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_FindClosestMatchingMode1_Proxy( ++ IDXGIOutput1* This, ++ const DXGI_MODE_DESC1 *mode, ++ DXGI_MODE_DESC1 *closest_match, ++ IUnknown *device); ++void __RPC_STUB IDXGIOutput1_FindClosestMatchingMode1_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_GetDisplaySurfaceData1_Proxy( ++ IDXGIOutput1* This, ++ IDXGIResource *resource); ++void __RPC_STUB IDXGIOutput1_GetDisplaySurfaceData1_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_DuplicateOutput_Proxy( ++ IDXGIOutput1* This, ++ IUnknown *device, ++ IDXGIOutputDuplication **output); ++void __RPC_STUB IDXGIOutput1_DuplicateOutput_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGIOutput1_INTERFACE_DEFINED__ */ ++ + /* Begin additional prototypes for all interfaces */ + + +diff --git a/mingw-w64-headers/direct-x/include/dxgi1_2.idl b/mingw-w64-headers/direct-x/include/dxgi1_2.idl +index 92f9c0e..838521e 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi1_2.idl ++++ b/mingw-w64-headers/direct-x/include/dxgi1_2.idl +@@ -1,5 +1,6 @@ + /* + * Copyright 2014 Jacek Caban for CodeWeavers ++ * Copyright 2015 Martell Malone + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -18,6 +19,114 @@ + + import "dxgi.idl"; + ++[ ++ object, ++ uuid(ea9dbf1a-c88e-4486-854a-98aa0138f30c), ++ local, ++ pointer_default(unique) ++] ++interface IDXGIDisplayControl : IUnknown ++{ ++ BOOL IsStereoEnabled(); ++ ++ void SetStereoEnabled( ++ BOOL enabled ++ ); ++} ++ ++typedef struct DXGI_OUTDUPL_MOVE_RECT ++{ ++ POINT SourcePoint; ++ RECT DestinationRect; ++} DXGI_OUTDUPL_MOVE_RECT; ++ ++typedef struct DXGI_OUTDUPL_DESC ++{ ++ DXGI_MODE_DESC ModeDesc; ++ DXGI_MODE_ROTATION Rotation; ++ BOOL DesktopImageInSystemMemory; ++} DXGI_OUTDUPL_DESC; ++ ++typedef struct DXGI_OUTDUPL_POINTER_POSITION ++{ ++ POINT Position; ++ BOOL Visible; ++} DXGI_OUTDUPL_POINTER_POSITION; ++ ++typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE ++{ ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4 ++} DXGI_OUTDUPL_POINTER_SHAPE_TYPE; ++ ++typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO ++{ ++ UINT Type; ++ UINT Width; ++ UINT Height; ++ UINT Pitch; ++ POINT HotSpot; ++} DXGI_OUTDUPL_POINTER_SHAPE_INFO; ++ ++typedef struct DXGI_OUTDUPL_FRAME_INFO ++{ ++ LARGE_INTEGER LastPresentTime; ++ LARGE_INTEGER LastMouseUpdateTime; ++ UINT AccumulatedFrames; ++ BOOL RectsCoalesced; ++ BOOL ProtectedContentMaskedOut; ++ DXGI_OUTDUPL_POINTER_POSITION PointerPosition; ++ UINT TotalMetadataBufferSize; ++ UINT PointerShapeBufferSize; ++} DXGI_OUTDUPL_FRAME_INFO; ++ ++[ ++ object, ++ uuid(191cfac3-a341-470d-b26e-a864f428319c), ++ local, ++ pointer_default(unique) ++] ++interface IDXGIOutputDuplication : IDXGIObject ++{ ++ void GetDesc( ++ [out] DXGI_OUTDUPL_DESC *desc ++ ); ++ ++ HRESULT AcquireNextFrame( ++ [in] UINT timeout, ++ [out] DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ [out] IDXGIResource **resource ++ ); ++ ++ HRESULT GetFrameDirtyRects( ++ [in] UINT dirty_size, ++ [out] RECT *buffer, ++ [out] UINT *buffer_size ++ ); ++ ++ HRESULT GetFrameMoveRects( ++ [in] UINT move_size, ++ [out] DXGI_OUTDUPL_MOVE_RECT *rect, ++ [out] UINT *rect_size ++ ); ++ ++ HRESULT GetFramePointerShape( ++ [in] UINT shape_size, ++ [out] void *buffer, ++ [out] UINT *buffer_size, ++ [out] DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info ++ ); ++ ++ HRESULT MapDesktopSurface( ++ [out] DXGI_MAPPED_RECT *rect ++ ); ++ ++ HRESULT UnMapDesktopSurface(); ++ ++ HRESULT ReleaseFrame(); ++} ++ + typedef enum _DXGI_OFFER_RESOURCE_PRIORITY { + DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, + DXGI_OFFER_RESOURCE_PRIORITY_NORMAL, +@@ -232,3 +341,45 @@ interface IDXGIAdapter2 : IDXGIAdapter1 + { + HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc); + } ++ ++typedef struct DXGI_MODE_DESC1 ++{ ++ UINT Width; ++ UINT Height; ++ DXGI_RATIONAL RefreshRate; ++ DXGI_FORMAT Format; ++ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; ++ DXGI_MODE_SCALING Scaling; ++ BOOL Stereo; ++} DXGI_MODE_DESC1; ++ ++[ ++ object, ++ uuid(00cddea8-939b-4b83-a340-a685226666cc), ++ local, ++ pointer_default(unique) ++] ++interface IDXGIOutput1 : IDXGIOutput ++{ ++ HRESULT GetDisplayModeList1( ++ [in] DXGI_FORMAT format, ++ [in] UINT flags, ++ [in, out] UINT *mode_count, ++ [out] DXGI_MODE_DESC1 *desc ++ ); ++ ++ HRESULT FindClosestMatchingMode1( ++ [in] const DXGI_MODE_DESC1 *mode, ++ [out] DXGI_MODE_DESC1 *closest_match, ++ [in] IUnknown *device ++ ); ++ ++ HRESULT GetDisplaySurfaceData1( ++ [in] IDXGIResource *resource ++ ); ++ ++ HRESULT DuplicateOutput( ++ [in] IUnknown *device, ++ [out] IDXGIOutputDuplication **output ++ ); ++} +-- +2.4.5 + diff --git a/mingw-w64-crt-git/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch b/mingw-w64-crt-git/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch new file mode 100644 index 0000000000..4967bbbc4f --- /dev/null +++ b/mingw-w64-crt-git/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch @@ -0,0 +1,46 @@ +From 72fea0e0d302849b000e89dd9884661aa80f27dd Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 16 Feb 2015 23:40:12 +0000 +Subject: [PATCH 4/6] d3d11: Add missing d3d11 1.1 structs and interfaces + +--- + mingw-w64-headers/direct-x/include/d3d11_1.h | 5 +++++ + mingw-w64-headers/direct-x/include/d3d11_1.idl | 6 ++++++ + 2 files changed, 11 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/d3d11_1.h b/mingw-w64-headers/direct-x/include/d3d11_1.h +index 51ca735..2460b3d 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11_1.h ++++ b/mingw-w64-headers/direct-x/include/d3d11_1.h +@@ -59,6 +59,11 @@ typedef interface ID3D11Device1 ID3D11Device1; + extern "C" { + #endif + ++typedef enum D3D11_COPY_FLAGS { ++ D3D11_COPY_NO_OVERWRITE = 0x1, ++ D3D11_COPY_DISCARD = 0x2 ++} D3D11_COPY_FLAGS; ++ + typedef enum D3D11_LOGIC_OP { + D3D11_LOGIC_OP_CLEAR = 0, + D3D11_LOGIC_OP_SET = 1, +diff --git a/mingw-w64-headers/direct-x/include/d3d11_1.idl b/mingw-w64-headers/direct-x/include/d3d11_1.idl +index 1a46abf..319d522 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11_1.idl ++++ b/mingw-w64-headers/direct-x/include/d3d11_1.idl +@@ -22,6 +22,12 @@ import "dxgi1_2.idl"; + import "d3dcommon.idl"; + import "d3d11.idl"; + ++typedef enum D3D11_COPY_FLAGS ++{ ++ D3D11_COPY_NO_OVERWRITE = 0x1, ++ D3D11_COPY_DISCARD = 0x2, ++} D3D11_COPY_FLAGS; ++ + typedef enum D3D11_LOGIC_OP { + D3D11_LOGIC_OP_CLEAR = 0, + D3D11_LOGIC_OP_SET, +-- +2.4.5 + diff --git a/mingw-w64-crt-git/0006-Add-d3d11-video-context.patch b/mingw-w64-crt-git/0006-Add-d3d11-video-context.patch new file mode 100644 index 0000000000..beab74c429 --- /dev/null +++ b/mingw-w64-crt-git/0006-Add-d3d11-video-context.patch @@ -0,0 +1,385 @@ +From b952e857814e5cfe766626573e2f056ed91ceb09 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 14 Jun 2015 21:07:03 +0100 +Subject: [PATCH 6/6] Add d3d11 video context + +--- + mingw-w64-headers/direct-x/include/d3d11.h | 259 +++++++++++++++++++++++++++ + mingw-w64-headers/direct-x/include/d3d11.idl | 66 ++++++ + 2 files changed, 325 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/d3d11.h b/mingw-w64-headers/direct-x/include/d3d11.h +index e49fd99..834a536 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11.h ++++ b/mingw-w64-headers/direct-x/include/d3d11.h +@@ -21,6 +21,11 @@ + #define __ID3D11DeviceChild_FWD_DEFINED__ + typedef interface ID3D11DeviceChild ID3D11DeviceChild; + #endif ++ ++#ifndef __ID3D11VideoContext_FWD_DEFINED__ ++#define __ID3D11VideoContext_FWD_DEFINED__ ++typedef interface ID3D11VideoContext ID3D11VideoContext; ++#endif + + #ifndef __ID3D11Asynchronous_FWD_DEFINED__ + #define __ID3D11Asynchronous_FWD_DEFINED__ +@@ -1366,6 +1366,38 @@ + USHORT ConfigMinRenderTargetBuffCount; + USHORT ConfigDecoderSpecific; + } D3D11_VIDEO_DECODER_CONFIG; ++typedef enum D3D11_VIDEO_DECODER_BUFFER_TYPE { ++ D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, ++ D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1, ++ D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2, ++ D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3, ++ D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4, ++ D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5, ++ D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6, ++ D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7, ++ D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8 ++} D3D11_VIDEO_DECODER_BUFFER_TYPE; ++typedef struct D3D11_ENCRYPTED_BLOCK_INFO { ++ UINT NumEncryptedBytesAtBeginning; ++ UINT NumBytesInSkipPattern; ++ UINT NumBytesInEncryptPattern; ++} D3D11_ENCRYPTED_BLOCK_INFO; ++typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC { ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType; ++ UINT BufferIndex; ++ UINT DataOffset; ++ UINT DataSize; ++ UINT FirstMBaddress; ++ UINT NumMBsInBuffer; ++ UINT Width; ++ UINT Height; ++ UINT Stride; ++ UINT ReservedBits; ++ void *pIV; ++ UINT IVSize; ++ WINBOOL PartialEncryption; ++ D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo; ++} D3D11_VIDEO_DECODER_BUFFER_DESC; + typedef enum D3D11_VIDEO_FRAME_FORMAT { + D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0, + D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1, +@@ -8514,6 +8514,233 @@ + DWORD* pdwStubPhase); + + #endif /* __ID3D11VideoDecoder_INTERFACE_DEFINED__ */ ++ ++/***************************************************************************** ++ * ID3D11VideoContext interface ++ */ ++#ifndef __ID3D11VideoContext_INTERFACE_DEFINED__ ++#define __ID3D11VideoContext_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_ID3D11VideoContext, 0x61f21c45, 0x3c0e, 0x4a74, 0x9c,0xea, 0x67,0x10,0x0d,0x9a,0xd5,0xe4); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("61f21c45-3c0e-4a74-9cea-67100d9ad5e4") ++ID3D11VideoContext : public ID3D11DeviceChild ++{ ++ virtual HRESULT STDMETHODCALLTYPE GetDecoderBuffer( ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ UINT *pBufferSize, ++ void **ppBuffer) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE ReleaseDecoderBuffer( ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE DecoderBeginFrame( ++ ID3D11VideoDecoder *pDecoder, ++ ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ UINT ContentKeySize, ++ const void *pContentKey) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE DecoderEndFrame( ++ ID3D11VideoDecoder *pDecoder) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers( ++ ID3D11VideoDecoder *pDecoder, ++ UINT NumBuffers, ++ const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(ID3D11VideoContext, 0x61f21c45, 0x3c0e, 0x4a74, 0x9c,0xea, 0x67,0x10,0x0d,0x9a,0xd5,0xe4) ++#endif ++#else ++typedef struct ID3D11VideoContextVtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ ID3D11VideoContext* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ ID3D11VideoContext* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ ID3D11VideoContext* This); ++ ++ /*** ID3D11DeviceChild methods ***/ ++ void (STDMETHODCALLTYPE *GetDevice)( ++ ID3D11VideoContext* This, ++ ID3D11Device **ppDevice); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ ID3D11VideoContext* This, ++ REFGUID guid, ++ UINT *pDataSize, ++ void *pData); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ ID3D11VideoContext* This, ++ REFGUID guid, ++ UINT DataSize, ++ const void *pData); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ ID3D11VideoContext* This, ++ REFGUID guid, ++ const IUnknown *pData); ++ ++ /*** ID3D11VideoContext methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDecoderBuffer)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ UINT *pBufferSize, ++ void **ppBuffer); ++ ++ HRESULT (STDMETHODCALLTYPE *ReleaseDecoderBuffer)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType); ++ ++ HRESULT (STDMETHODCALLTYPE *DecoderBeginFrame)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ UINT ContentKeySize, ++ const void *pContentKey); ++ ++ HRESULT (STDMETHODCALLTYPE *DecoderEndFrame)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder); ++ ++ HRESULT (STDMETHODCALLTYPE *SubmitDecoderBuffers)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ UINT NumBuffers, ++ const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); ++ ++ END_INTERFACE ++} ID3D11VideoContextVtbl; ++interface ID3D11VideoContext { ++ CONST_VTBL ID3D11VideoContextVtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define ID3D11VideoContext_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define ID3D11VideoContext_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define ID3D11VideoContext_Release(This) (This)->lpVtbl->Release(This) ++/*** ID3D11DeviceChild methods ***/ ++#define ID3D11VideoContext_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice) ++#define ID3D11VideoContext_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData) ++#define ID3D11VideoContext_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData) ++#define ID3D11VideoContext_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData) ++/*** ID3D11VideoContext methods ***/ ++#define ID3D11VideoContext_GetDecoderBuffer(This,pDecoder,BufferType,pBufferSize,ppBuffer) (This)->lpVtbl->GetDecoderBuffer(This,pDecoder,BufferType,pBufferSize,ppBuffer) ++#define ID3D11VideoContext_ReleaseDecoderBuffer(This,pDecoder,BufferType) (This)->lpVtbl->ReleaseDecoderBuffer(This,pDecoder,BufferType) ++#define ID3D11VideoContext_DecoderBeginFrame(This,pDecoder,pVideoDecoderOutputView,ContentKeySize,pContentKey) (This)->lpVtbl->DecoderBeginFrame(This,pDecoder,pVideoDecoderOutputView,ContentKeySize,pContentKey) ++#define ID3D11VideoContext_DecoderEndFrame(This,pDecoder) (This)->lpVtbl->DecoderEndFrame(This,pDecoder) ++#define ID3D11VideoContext_SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) (This)->lpVtbl->SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT ID3D11VideoContext_QueryInterface(ID3D11VideoContext* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG ID3D11VideoContext_AddRef(ID3D11VideoContext* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG ID3D11VideoContext_Release(ID3D11VideoContext* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** ID3D11DeviceChild methods ***/ ++static FORCEINLINE void ID3D11VideoContext_GetDevice(ID3D11VideoContext* This,ID3D11Device **ppDevice) { ++ This->lpVtbl->GetDevice(This,ppDevice); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_GetPrivateData(ID3D11VideoContext* This,REFGUID guid,UINT *pDataSize,void *pData) { ++ return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_SetPrivateData(ID3D11VideoContext* This,REFGUID guid,UINT DataSize,const void *pData) { ++ return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_SetPrivateDataInterface(ID3D11VideoContext* This,REFGUID guid,const IUnknown *pData) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,pData); ++} ++/*** ID3D11VideoContext methods ***/ ++static FORCEINLINE HRESULT ID3D11VideoContext_GetDecoderBuffer(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType,UINT *pBufferSize,void **ppBuffer) { ++ return This->lpVtbl->GetDecoderBuffer(This,pDecoder,BufferType,pBufferSize,ppBuffer); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_ReleaseDecoderBuffer(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType) { ++ return This->lpVtbl->ReleaseDecoderBuffer(This,pDecoder,BufferType); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_DecoderBeginFrame(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,ID3D11VideoDecoderOutputView *pVideoDecoderOutputView,UINT ContentKeySize,const void *pContentKey) { ++ return This->lpVtbl->DecoderBeginFrame(This,pDecoder,pVideoDecoderOutputView,ContentKeySize,pContentKey); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_DecoderEndFrame(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder) { ++ return This->lpVtbl->DecoderEndFrame(This,pDecoder); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_SubmitDecoderBuffers(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,UINT NumBuffers,const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc) { ++ return This->lpVtbl->SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc); ++} ++#endif ++#endif ++ ++#endif ++ ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_GetDecoderBuffer_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ UINT *pBufferSize, ++ void **ppBuffer); ++void __RPC_STUB ID3D11VideoContext_GetDecoderBuffer_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_ReleaseDecoderBuffer_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType); ++void __RPC_STUB ID3D11VideoContext_ReleaseDecoderBuffer_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderBeginFrame_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ UINT ContentKeySize, ++ const void *pContentKey); ++void __RPC_STUB ID3D11VideoContext_DecoderBeginFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderEndFrame_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder); ++void __RPC_STUB ID3D11VideoContext_DecoderEndFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_SubmitDecoderBuffers_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ UINT NumBuffers, ++ const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); ++void __RPC_STUB ID3D11VideoContext_SubmitDecoderBuffers_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __ID3D11VideoContext_INTERFACE_DEFINED__ */ + + /***************************************************************************** + * ID3D11VideoProcessorEnumerator interface +diff --git a/mingw-w64-headers/direct-x/include/d3d11.idl b/mingw-w64-headers/direct-x/include/d3d11.idl +index 59beafb..cfae7c8 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11.idl ++++ b/mingw-w64-headers/direct-x/include/d3d11.idl +@@ -1246,6 +1246,44 @@ + USHORT ConfigMinRenderTargetBuffCount; + USHORT ConfigDecoderSpecific; + } D3D11_VIDEO_DECODER_CONFIG; ++ ++typedef enum D3D11_VIDEO_DECODER_BUFFER_TYPE ++{ ++ D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, ++ D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL, ++ D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE, ++ D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL, ++ D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX, ++ D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL, ++ D3D11_VIDEO_DECODER_BUFFER_BITSTREAM, ++ D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR, ++ D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN ++} D3D11_VIDEO_DECODER_BUFFER_TYPE; ++ ++typedef struct D3D11_ENCRYPTED_BLOCK_INFO ++{ ++ UINT NumEncryptedBytesAtBeginning; ++ UINT NumBytesInSkipPattern; ++ UINT NumBytesInEncryptPattern; ++} D3D11_ENCRYPTED_BLOCK_INFO; ++ ++typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC ++{ ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType; ++ UINT BufferIndex; ++ UINT DataOffset; ++ UINT DataSize; ++ UINT FirstMBaddress; ++ UINT NumMBsInBuffer; ++ UINT Width; ++ UINT Height; ++ UINT Stride; ++ UINT ReservedBits; ++ void *pIV; ++ UINT IVSize; ++ BOOL PartialEncryption; ++ D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo; ++} D3D11_VIDEO_DECODER_BUFFER_DESC; + + typedef enum D3D11_VIDEO_FRAME_FORMAT + { +@@ -2286,6 +2286,34 @@ + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc); + } + ++[ ++ object, ++ local, ++ uuid(61f21c45-3c0e-4a74-9cea-67100d9ad5e4) ++] ++interface ID3D11VideoContext : ID3D11DeviceChild ++{ ++ HRESULT GetDecoderBuffer( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ [out] UINT *pBufferSize, ++ [out] void **ppBuffer); ++ HRESULT ReleaseDecoderBuffer( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType); ++ HRESULT DecoderBeginFrame( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ [in] UINT ContentKeySize, ++ [in] const void *pContentKey); ++ HRESULT DecoderEndFrame( ++ [in] ID3D11VideoDecoder *pDecoder); ++ HRESULT SubmitDecoderBuffers( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] UINT NumBuffers, ++ [in] const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); ++} ++ + [ + object, + uuid(10ec4d5b-975a-4689-b9e4-d0aac30fe333), +-- +2.4.5 diff --git a/mingw-w64-crt-git/PKGBUILD b/mingw-w64-crt-git/PKGBUILD index c9b599b2c2..ee62c96ca9 100644 --- a/mingw-w64-crt-git/PKGBUILD +++ b/mingw-w64-crt-git/PKGBUILD @@ -1,31 +1,48 @@ # Maintainer: Alexey Pavlov _realname=crt +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -replaces="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" -_ver_base=4.0.0 -pkgver=4.0.0.4336.6a4cb01 +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") +pkgver=5.0.0.4598.fc005cd pkgrel=1 pkgdesc='MinGW-w64 CRT for Windows' arch=('any') url='http://mingw-w64.sourceforge.net' license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain" "${MINGW_PACKAGE_PREFIX}") +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") depends=("${MINGW_PACKAGE_PREFIX}-headers-git") -makedepends=("git" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-binutils") +makedepends=("git" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-binutils") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('!strip' 'staticlibs' '!buildflags' '!emptydirs') -source=("${_realname}"::"git://git.code.sf.net/p/mingw-w64/mingw-w64") -md5sums=('SKIP') +source=("mingw-w64"::"git://git.code.sf.net/p/mingw-w64/mingw-w64" + "0002-dxgi-Add-interface-for-IDXGISurface1.patch" + "0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch" + "0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch" + "0006-Add-d3d11-video-context.patch") +md5sums=('SKIP' + 'ada92acb4a3939bcede26298adc0a5d0' + 'b664667ec276614e62e4ea289c79c4b1' + '79bb56620aaef710ef1d73415dc5bc13' + '6bc79f1f64b8dddd4007c3ddd20c2df4') pkgver() { - cd "$srcdir/${_realname}" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/mingw-w64" + local _major=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MAJOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _minor=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MINOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _rev=0 + printf "%s.%s.%s.%s.%s" ${_major} ${_minor} ${_rev} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd ${srcdir}/${_realname}/mingw-w64-crt + cd ${srcdir}/mingw-w64 + git am "${srcdir}"/0002-dxgi-Add-interface-for-IDXGISurface1.patch + git am "${srcdir}"/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch + git am "${srcdir}"/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch + git am "${srcdir}"/0006-Add-d3d11-video-context.patch } build() { @@ -39,8 +56,9 @@ build() { ;; esac + [[ -d ${srcdir}/crt-${MINGW_CHOST} ]] && rm -rf ${srcdir}/crt-${MINGW_CHOST} mkdir -p ${srcdir}/crt-${MINGW_CHOST} && cd ${srcdir}/crt-${MINGW_CHOST} - ${srcdir}/${_realname}/mingw-w64-crt/configure \ + ${srcdir}/mingw-w64/mingw-w64-crt/configure \ --prefix=${MINGW_PREFIX}/${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ diff --git a/mingw-w64-crypto++-git/PKGBUILD b/mingw-w64-crypto++-git/PKGBUILD new file mode 100644 index 0000000000..dc2af68e51 --- /dev/null +++ b/mingw-w64-crypto++-git/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Alexey Pavlov + +_realname=crypto++ +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=r711.1160f41 +pkgrel=1 +pkgdesc="Crypto++ Library is a free C++ class library of cryptographic schemes." +arch=('any') +url="http://www.cryptopp.com/" +license=('Boost Software License 1.0') +options=('staticlibs' 'strip') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" "git") +source=(${_realname}::"git+https://github.com/weidai11/cryptopp.git" + libcrypto++.pc + missing-sources.patch + cryptopp-cmake.patch + resolve-namespace-conflict.patch + fix-test-linking.patch) +md5sums=('SKIP' + 'fdf6ec125726e944269b13a6883abc1c' + 'b27bcb0cc2938f5af6a07d724ce42b62' + '88fc344f33a404dccfa9f74ca9f532eb' + '947648b79dc1194217eb0ef0423dd413' + '038003a889c79e024754bc6f08cdafff') + +pkgver() { + cd ${_realname} + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${_realname} + sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile + patch -p1 -i ${srcdir}/missing-sources.patch + patch -p1 -i ${srcdir}/cryptopp-cmake.patch + patch -p1 -i ${srcdir}/resolve-namespace-conflict.patch + patch -p1 -i ${srcdir}/fix-test-linking.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname} + + make +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + install -D -m644 ${srcdir}/${_realname}/License.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-crypto++-git/cryptopp-cmake.patch b/mingw-w64-crypto++-git/cryptopp-cmake.patch new file mode 100644 index 0000000000..371c1b5b8f --- /dev/null +++ b/mingw-w64-crypto++-git/cryptopp-cmake.patch @@ -0,0 +1,534 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,510 @@ ++CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ++ ++PROJECT(cryptopp) ++ ++set(CRYPTOPP_VERSION_MAJOR 5) ++set(CRYPTOPP_VERSION_MINOR 6) ++set(CRYPTOPP_VERSION_BUILD 2) ++set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}") ++ ++################################### ++# Global platform-specific settings ++################################### ++IF(MSVC) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc) ++ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS") ++ELSE() ++ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo) ++ IF(MINGW) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS) ++ ELSE() ++ ADD_DEFINITIONS(-fPIC) ++ ENDIF() ++ENDIF() ++ ++SET(CRYPTOPP_LDFLAGS "") ++ ++######################### ++# User Settings ++######################### ++IF(CRYPTOPP_ADDED_DEFINITIONS) ++ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS}) ++ENDIF() ++ ++IF(CRYPTOPP_ADDED_LDFLAGS) ++ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS}) ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE) ++ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.") ++ELSE() ++ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE) ++ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ELSE() ++ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_BUILD_TESTS) ++ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.") ++ELSE() ++ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.") ++ENDIF() ++ ++######################### ++# Project-wide Settings ++######################### ++SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD) ++SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ++STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER) ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC) ++IF(NOT CRYPTOPP_STATIC) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC) ++ENDIF() ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED) ++IF(NOT CRYPTOPP_SHARED) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED) ++ENDIF() ++ ++STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER) ++STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME) ++ ++IF(CRYPTOPP_STATIC_RUNTIME) ++ IF(WIN32) ++ SET(CompilerFlags ++ CMAKE_CXX_FLAGS ++ CMAKE_CXX_FLAGS_DEBUG ++ CMAKE_CXX_FLAGS_RELEASE ++ CMAKE_C_FLAGS ++ CMAKE_C_FLAGS_DEBUG ++ CMAKE_C_FLAGS_RELEASE ++ ) ++ FOREACH(CompilerFlag ${CompilerFlags}) ++ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") ++ ENDFOREACH() ++ ENDIF() ++ENDIF() ++ ++# -------------------------------------------------------------------------- ++# Install directories ++ ++string(TOLOWER ${PROJECT_NAME} projectname) ++set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}") ++ ++if(NOT CRYPTOPP_INSTALL_BIN_DIR) ++ set(CRYPTOPP_INSTALL_BIN_DIR "bin") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR) ++ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_LIB_DIR) ++ set(CRYPTOPP_INSTALL_LIB_DIR "lib") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_SHARE_DIR) ++ set(CRYPTOPP_INSTALL_SHARE_DIR "share") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_DATA_DIR) ++ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}") ++endif() ++ ++######################### ++# Crypto++ Library ++######################### ++ ++CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp) ++ ++SET(CRYPTOPP_SRCS_FIPS ++ algebra.cpp ++ algparam.cpp ++ asn.cpp ++ authenc.cpp ++ basecode.cpp ++ cbcmac.cpp ++ ccm.cpp ++ channels.cpp ++ cmac.cpp ++ cpu.cpp ++ cryptlib.cpp ++ des.cpp ++ dessp.cpp ++ dh.cpp ++ dll.cpp ++ dsa.cpp ++ ec2n.cpp ++ eccrypto.cpp ++ ecp.cpp ++ emsa2.cpp ++ eprecomp.cpp ++ files.cpp ++ filters.cpp ++ fips140.cpp ++ gcm.cpp ++ gf2n.cpp ++ gfpcrypt.cpp ++ hex.cpp ++ hmac.cpp ++ hrtimer.cpp ++ integer.cpp ++ iterhash.cpp ++ misc.cpp ++ modes.cpp ++ modexppc.cpp ++ mqueue.cpp ++ nbtheory.cpp ++ oaep.cpp ++ osrng.cpp ++ pch.cpp ++ pkcspad.cpp ++ pssr.cpp ++ pubkey.cpp ++ queue.cpp ++ randpool.cpp ++ rdtables.cpp ++ rijndael.cpp ++ rng.cpp ++ rsa.cpp ++ rw.cpp ++ sha.cpp ++ simple.cpp ++ skipjack.cpp ++ strciphr.cpp ++ trdlocal.cpp ++) ++ ++SET(CRYPTOPP_SRCS ++ 3way.cpp ++ adhoc.cpp.proto ++ adler32.cpp ++ arc4.cpp ++ base32.cpp ++ base64.cpp ++ bfinit.cpp ++ blowfish.cpp ++ blumshub.cpp ++ camellia.cpp ++ cast.cpp ++ casts.cpp ++ crc.cpp ++ default.cpp ++ dh2.cpp ++ eax.cpp ++ elgamal.cpp ++ esign.cpp ++ gf256.cpp ++ gf2_32.cpp ++ gost.cpp ++ gzip.cpp ++ ida.cpp ++ idea.cpp ++ luc.cpp ++ mars.cpp ++ marss.cpp ++ md2.cpp ++ md4.cpp ++ md5.cpp ++ mqv.cpp ++ network.cpp ++ panama.cpp ++ polynomi.cpp ++ rabin.cpp ++ rc2.cpp ++ rc5.cpp ++ rc6.cpp ++ ripemd.cpp ++ safer.cpp ++ salsa.cpp ++ seal.cpp ++ seed.cpp ++ serpent.cpp ++ sha3.cpp ++ shacal2.cpp ++ shark.cpp ++ sharkbox.cpp ++ socketft.cpp ++ sosemanuk.cpp ++ square.cpp ++ squaretb.cpp ++ tea.cpp ++ tftables.cpp ++ tiger.cpp ++ tigertab.cpp ++ ttmac.cpp ++ twofish.cpp ++ vmac.cpp ++ wait.cpp ++ wake.cpp ++ whrlpool.cpp ++ winpipes.cpp ++ xtr.cpp ++ xtrcrypt.cpp ++ zdeflate.cpp ++ zinflate.cpp ++ zlib.cpp ++) ++SET(CRYPTOPP_HDRS ++ 3way.h ++ adler32.h ++ aes.h ++ algebra.h ++ algparam.h ++ arc4.h ++ argnames.h ++ asn.h ++ authenc.h ++ base32.h ++ base64.h ++ basecode.h ++ blowfish.h ++ blumshub.h ++ camellia.h ++ cast.h ++ cbcmac.h ++ ccm.h ++ channels.h ++ cmac.h ++ config.h ++ cpu.h ++ crc.h ++ cryptlib.h ++ default.h ++ des.h ++ dh.h ++ dh2.h ++ dmac.h ++ dsa.h ++ eax.h ++ ec2n.h ++ eccrypto.h ++ ecp.h ++ elgamal.h ++ emsa2.h ++ eprecomp.h ++ esign.h ++ files.h ++ filters.h ++ fips140.h ++ fltrimpl.h ++ gcm.h ++ gf256.h ++ gf2_32.h ++ gf2n.h ++ gfpcrypt.h ++ gost.h ++ gzip.h ++ hex.h ++ hmac.h ++ hrtimer.h ++ ida.h ++ idea.h ++ integer.h ++ iterhash.h ++ lubyrack.h ++ luc.h ++ mars.h ++ md2.h ++ md4.h ++ md5.h ++ mdc.h ++ misc.h ++ modarith.h ++ modes.h ++ modexppc.h ++ mqueue.h ++ mqv.h ++ nbtheory.h ++ network.h ++ nr.h ++ oaep.h ++ oids.h ++ osrng.h ++ panama.h ++ pch.h ++ pkcspad.h ++ polynomi.h ++ pssr.h ++ pubkey.h ++ pwdbased.h ++ queue.h ++ rabin.h ++ randpool.h ++ rc2.h ++ rc5.h ++ rc6.h ++ rijndael.h ++ ripemd.h ++ rng.h ++ rsa.h ++ rw.h ++ safer.h ++ salsa.h ++ seal.h ++ secblock.h ++ seckey.h ++ seed.h ++ serpent.h ++ sha.h ++ sha3.h ++ shacal2.h ++ shark.h ++ simple.h ++ skipjack.h ++ smartptr.h ++ socketft.h ++ sosemanuk.h ++ square.h ++ stdcpp.h ++ strciphr.h ++ tea.h ++ tiger.h ++ trdlocal.h ++ trunhash.h ++ ttmac.h ++ twofish.h ++ vmac.h ++ wait.h ++ wake.h ++ whrlpool.h ++ winpipes.h ++ words.h ++ xtr.h ++ xtrcrypt.h ++ zdeflate.h ++ zinflate.h ++ zlib.h ++) ++ ++SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS}) ++ ++IF(MSVC) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc) ++ IF(CMAKE_CL_64) ++ ENABLE_LANGUAGE(ASM_MASM) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ MAIN_DEPENDENCY x64dll.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ++ ) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ MAIN_DEPENDENCY x64masm.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm ++ ) ++ ENDIF() ++ENDIF() ++ ++######################### ++# Crypto++ Static library ++######################### ++IF(CRYPTOPP_STATIC) ++ #add_definitions(-DCRYPTOPP_IMPORTS) ++ IF(CMAKE_CL_64) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ++ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ ) ++ ENDIF() ++ ADD_LIBRARY(cryptlib STATIC ++ ${CRYPTOPP_SRCS} ++ ) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES OUTPUT_NAME "cryptopp") ++ TARGET_LINK_LIBRARIES(cryptlib) ++ ++ INSTALL( ++ TARGETS cryptlib ++ DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ) ++ENDIF() ++ ++######################### ++# Crypto++ Shared library ++######################### ++IF(CRYPTOPP_SHARED) ++ add_definitions(-DCRYPTOPP_EXPORTS) ++ ADD_LIBRARY(cryptopp SHARED ++ ${CRYPTOPP_SRCS_FIPS} ++ ) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ TARGET_LINK_LIBRARIES(cryptopp) ++ ++ INSTALL( ++ TARGETS cryptopp ++ PERMISSIONS ${EXEC_PERMS} ++ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR} ++ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ) ++ INSTALL(FILES ${CRYPTOPP_HDRS} ++ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR} ++ ) ++ENDIF() ++ ++######################### ++# Crypto++ Test ++######################### ++IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC) ++ SET(TEST_SRCS ++ adhoc.cpp ++ bench.cpp ++ bench2.cpp ++ datatest.cpp ++ dlltest.cpp ++ fipsalgt.cpp ++ regtest.cpp ++ test.cpp ++ validat1.cpp ++ validat2.cpp ++ validat3.cpp ++ fipstest.cpp ++ ) ++ IF(WIN32) ++ SET(TEST_SRCS ${TEST_SRCS} ++ bench.h ++ factory.h ++ validate.h ++ ) ++ ENDIF() ++ ADD_EXECUTABLE(cryptest ${TEST_SRCS}) ++ IF(WIN32) ++ IF(MSVC) ++ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib) ++ ELSE() ++ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32) ++ ENDIF() ++ ENDIF() ++ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT}) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ENDIF() ++ ++#----------------------------------------------------------------------------- ++# pkgconfig support ++# enabled by default on Unix, disabled by default on other platforms ++if(UNIX OR MINGW) ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON) ++else() ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) ++endif() ++if(BUILD_PKGCONFIG_FILES) ++ # install in lib and not share (see multi-arch note above) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY) ++ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION ++ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig ) ++endif() ++ +diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/libcrypto++.pc.cmake.in +@@ -0,0 +1,12 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@ ++libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@ ++includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@ ++ ++Name: libcrypto++ ++Description: Class library of cryptographic schemes ++URL: http://www.cryptopp.com/ ++Version: @CRYPTOPP_VERSION@ ++Libs: -L${libdir} -lcryptopp ++Cflags: -I${includedir} ++ diff --git a/mingw-w64-crypto++-git/cryptopp-cmake.patch.orig b/mingw-w64-crypto++-git/cryptopp-cmake.patch.orig new file mode 100644 index 0000000000..bf1093681b --- /dev/null +++ b/mingw-w64-crypto++-git/cryptopp-cmake.patch.orig @@ -0,0 +1,526 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,502 @@ ++CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ++ ++PROJECT(cryptopp) ++ ++set(CRYPTOPP_VERSION_MAJOR 5) ++set(CRYPTOPP_VERSION_MINOR 6) ++set(CRYPTOPP_VERSION_BUILD 2) ++set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}") ++ ++################################### ++# Global platform-specific settings ++################################### ++IF(MSVC) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc) ++ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS") ++ELSE() ++ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo) ++ IF(MINGW) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS) ++ ELSE() ++ ADD_DEFINITIONS(-fPIC) ++ ENDIF() ++ENDIF() ++ ++SET(CRYPTOPP_LDFLAGS "") ++ ++######################### ++# User Settings ++######################### ++IF(CRYPTOPP_ADDED_DEFINITIONS) ++ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS}) ++ENDIF() ++ ++IF(CRYPTOPP_ADDED_LDFLAGS) ++ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS}) ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE) ++ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.") ++ELSE() ++ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE) ++ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ELSE() ++ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_BUILD_TESTS) ++ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.") ++ELSE() ++ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.") ++ENDIF() ++ ++######################### ++# Project-wide Settings ++######################### ++SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD) ++SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ++STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER) ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC) ++IF(NOT CRYPTOPP_STATIC) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC) ++ENDIF() ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED) ++IF(NOT CRYPTOPP_SHARED) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED) ++ENDIF() ++ ++STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER) ++STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME) ++ ++IF(CRYPTOPP_STATIC_RUNTIME) ++ IF(WIN32) ++ SET(CompilerFlags ++ CMAKE_CXX_FLAGS ++ CMAKE_CXX_FLAGS_DEBUG ++ CMAKE_CXX_FLAGS_RELEASE ++ CMAKE_C_FLAGS ++ CMAKE_C_FLAGS_DEBUG ++ CMAKE_C_FLAGS_RELEASE ++ ) ++ FOREACH(CompilerFlag ${CompilerFlags}) ++ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") ++ ENDFOREACH() ++ ENDIF() ++ENDIF() ++ ++# -------------------------------------------------------------------------- ++# Install directories ++ ++string(TOLOWER ${PROJECT_NAME} projectname) ++set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}") ++ ++if(NOT CRYPTOPP_INSTALL_BIN_DIR) ++ set(CRYPTOPP_INSTALL_BIN_DIR "bin") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR) ++ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_LIB_DIR) ++ set(CRYPTOPP_INSTALL_LIB_DIR "lib") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_SHARE_DIR) ++ set(CRYPTOPP_INSTALL_SHARE_DIR "share") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_DATA_DIR) ++ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}") ++endif() ++ ++######################### ++# Crypto++ Library ++######################### ++ ++CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp) ++ ++SET(CRYPTOPP_SRCS_FIPS ++ algebra.cpp ++ algparam.cpp ++ asn.cpp ++ authenc.cpp ++ basecode.cpp ++ cbcmac.cpp ++ ccm.cpp ++ channels.cpp ++ cmac.cpp ++ cpu.cpp ++ cryptlib.cpp ++ des.cpp ++ dessp.cpp ++ dh.cpp ++ dll.cpp ++ dsa.cpp ++ ec2n.cpp ++ eccrypto.cpp ++ ecp.cpp ++ emsa2.cpp ++ eprecomp.cpp ++ files.cpp ++ filters.cpp ++ fips140.cpp ++ gcm.cpp ++ gf2n.cpp ++ gfpcrypt.cpp ++ hex.cpp ++ hmac.cpp ++ hrtimer.cpp ++ integer.cpp ++ iterhash.cpp ++ misc.cpp ++ modes.cpp ++ modexppc.cpp ++ mqueue.cpp ++ nbtheory.cpp ++ oaep.cpp ++ osrng.cpp ++ pch.cpp ++ pkcspad.cpp ++ pssr.cpp ++ pubkey.cpp ++ queue.cpp ++ randpool.cpp ++ rdtables.cpp ++ rijndael.cpp ++ rng.cpp ++ rsa.cpp ++ rw.cpp ++ sha.cpp ++ simple.cpp ++ skipjack.cpp ++ strciphr.cpp ++ trdlocal.cpp ++) ++ ++SET(CRYPTOPP_SRCS ++ 3way.cpp ++ adhoc.cpp.proto ++ adler32.cpp ++ arc4.cpp ++ base32.cpp ++ base64.cpp ++ bfinit.cpp ++ blowfish.cpp ++ blumshub.cpp ++ camellia.cpp ++ cast.cpp ++ casts.cpp ++ crc.cpp ++ default.cpp ++ dh2.cpp ++ eax.cpp ++ elgamal.cpp ++ esign.cpp ++ gf256.cpp ++ gf2_32.cpp ++ gost.cpp ++ gzip.cpp ++ ida.cpp ++ idea.cpp ++ luc.cpp ++ mars.cpp ++ marss.cpp ++ md2.cpp ++ md4.cpp ++ md5.cpp ++ mqv.cpp ++ network.cpp ++ panama.cpp ++ polynomi.cpp ++ rabin.cpp ++ rc2.cpp ++ rc5.cpp ++ rc6.cpp ++ ripemd.cpp ++ safer.cpp ++ salsa.cpp ++ seal.cpp ++ seed.cpp ++ serpent.cpp ++ sha3.cpp ++ shacal2.cpp ++ shark.cpp ++ sharkbox.cpp ++ socketft.cpp ++ sosemanuk.cpp ++ square.cpp ++ squaretb.cpp ++ tea.cpp ++ tftables.cpp ++ tiger.cpp ++ tigertab.cpp ++ ttmac.cpp ++ twofish.cpp ++ vmac.cpp ++ wait.cpp ++ wake.cpp ++ whrlpool.cpp ++ winpipes.cpp ++ xtr.cpp ++ xtrcrypt.cpp ++ zdeflate.cpp ++ zinflate.cpp ++ zlib.cpp ++) ++SET(CRYPTOPP_HDRS ++ 3way.h ++ adler32.h ++ aes.h ++ algebra.h ++ algparam.h ++ arc4.h ++ argnames.h ++ asn.h ++ authenc.h ++ base32.h ++ base64.h ++ basecode.h ++ blowfish.h ++ blumshub.h ++ camellia.h ++ cast.h ++ cbcmac.h ++ ccm.h ++ channels.h ++ cmac.h ++ config.h ++ cpu.h ++ crc.h ++ cryptlib.h ++ default.h ++ des.h ++ dh.h ++ dh2.h ++ dmac.h ++ dsa.h ++ eax.h ++ ec2n.h ++ eccrypto.h ++ ecp.h ++ elgamal.h ++ emsa2.h ++ eprecomp.h ++ esign.h ++ files.h ++ filters.h ++ fips140.h ++ fltrimpl.h ++ gcm.h ++ gf256.h ++ gf2_32.h ++ gf2n.h ++ gfpcrypt.h ++ gost.h ++ gzip.h ++ hex.h ++ hmac.h ++ hrtimer.h ++ ida.h ++ idea.h ++ integer.h ++ iterhash.h ++ lubyrack.h ++ luc.h ++ mars.h ++ md2.h ++ md4.h ++ md5.h ++ mdc.h ++ misc.h ++ modarith.h ++ modes.h ++ modexppc.h ++ mqueue.h ++ mqv.h ++ nbtheory.h ++ network.h ++ nr.h ++ oaep.h ++ oids.h ++ osrng.h ++ panama.h ++ pch.h ++ pkcspad.h ++ polynomi.h ++ pssr.h ++ pubkey.h ++ pwdbased.h ++ queue.h ++ rabin.h ++ randpool.h ++ rc2.h ++ rc5.h ++ rc6.h ++ rijndael.h ++ ripemd.h ++ rng.h ++ rsa.h ++ rw.h ++ safer.h ++ salsa.h ++ seal.h ++ secblock.h ++ seckey.h ++ seed.h ++ serpent.h ++ sha.h ++ sha3.h ++ shacal2.h ++ shark.h ++ simple.h ++ skipjack.h ++ smartptr.h ++ socketft.h ++ sosemanuk.h ++ square.h ++ stdcpp.h ++ strciphr.h ++ tea.h ++ tiger.h ++ trdlocal.h ++ trunhash.h ++ ttmac.h ++ twofish.h ++ vmac.h ++ wait.h ++ wake.h ++ whrlpool.h ++ winpipes.h ++ words.h ++ xtr.h ++ xtrcrypt.h ++ zdeflate.h ++ zinflate.h ++ zlib.h ++) ++ ++SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS}) ++ ++IF(MSVC) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc) ++ IF(CMAKE_CL_64) ++ ENABLE_LANGUAGE(ASM_MASM) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ MAIN_DEPENDENCY x64dll.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ++ ) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ MAIN_DEPENDENCY x64masm.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm ++ ) ++ ENDIF() ++ENDIF() ++ ++######################### ++# Crypto++ Static library ++######################### ++IF(CRYPTOPP_STATIC) ++ IF(CMAKE_CL_64) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ++ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ ) ++ ENDIF() ++ ADD_LIBRARY(cryptlib STATIC ++ ${CRYPTOPP_SRCS} ++ ) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ TARGET_LINK_LIBRARIES(cryptlib) ++ENDIF() ++ ++######################### ++# Crypto++ Shared library ++######################### ++IF(CRYPTOPP_SHARED) ++ ADD_LIBRARY(cryptopp SHARED ++ ${CRYPTOPP_SRCS_FIPS} ++ ) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ TARGET_LINK_LIBRARIES(cryptopp) ++ ++ INSTALL( ++ TARGETS cryptopp ++ PERMISSIONS ${EXEC_PERMS} ++ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR} ++ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ) ++ INSTALL(FILES ${CRYPTOPP_HDRS} ++ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR} ++ ) ++ENDIF() ++ ++######################### ++# Crypto++ Test ++######################### ++IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC) ++ SET(TEST_SRCS ++ adhoc.cpp ++ bench.cpp ++ bench2.cpp ++ datatest.cpp ++ dlltest.cpp ++ fipsalgt.cpp ++ regtest.cpp ++ test.cpp ++ validat1.cpp ++ validat2.cpp ++ validat3.cpp ++ fipstest.cpp ++ ) ++ IF(WIN32) ++ SET(TEST_SRCS ${TEST_SRCS} ++ bench.h ++ factory.h ++ validate.h ++ ) ++ ENDIF() ++ ADD_EXECUTABLE(cryptest ${TEST_SRCS}) ++ IF(WIN32) ++ IF(MSVC) ++ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib) ++ ELSE() ++ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32) ++ ENDIF() ++ ENDIF() ++ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT}) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ENDIF() ++ ++#----------------------------------------------------------------------------- ++# pkgconfig support ++# enabled by default on Unix, disabled by default on other platforms ++if(UNIX OR MINGW) ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON) ++else() ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) ++endif() ++if(BUILD_PKGCONFIG_FILES) ++ # install in lib and not share (see multi-arch note above) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY) ++ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION ++ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig ) ++endif() ++ +diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/libcrypto++.pc.cmake.in +@@ -0,0 +1,12 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@ ++libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@ ++includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@ ++ ++Name: libcrypto++ ++Description: Class library of cryptographic schemes ++URL: http://www.cryptopp.com/ ++Version: @CRYPTOPP_VERSION@ ++Libs: -L${libdir} -lcryptopp ++Cflags: -I${includedir} ++ diff --git a/mingw-w64-crypto++-git/fix-test-linking.patch b/mingw-w64-crypto++-git/fix-test-linking.patch new file mode 100644 index 0000000000..d854978efc --- /dev/null +++ b/mingw-w64-crypto++-git/fix-test-linking.patch @@ -0,0 +1,18 @@ +--- a/winpipes.h 2015-07-24 12:17:47.681944900 +0300 ++++ b/winpipes.h 2015-07-24 12:17:58.280460900 +0300 +@@ -116,7 +116,6 @@ + NetworkSource::GetWaitObjects; + + private: +- HANDLE GetHandle() const {return WindowsHandle::GetHandle();} + NetworkReceiver & AccessReceiver() {return *this;} + }; + +@@ -131,7 +130,6 @@ + NetworkSink::GetWaitObjects; + + private: +- HANDLE GetHandle() const {return WindowsHandle::GetHandle();} + NetworkSender & AccessSender() {return *this;} + }; + diff --git a/mingw-w64-crypto++-git/libcrypto++.pc b/mingw-w64-crypto++-git/libcrypto++.pc new file mode 100644 index 0000000000..8ed4b6d775 --- /dev/null +++ b/mingw-w64-crypto++-git/libcrypto++.pc @@ -0,0 +1,11 @@ +# Written by Alexander Rødseth + +prefix=/usr +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: libcrypto++ +Description: Class library of cryptographic schemes +Version: 5.6.2 +Libs: -L${libdir} -lcryptopp +Cflags: -I${includedir} \ No newline at end of file diff --git a/mingw-w64-crypto++-git/missing-sources.patch b/mingw-w64-crypto++-git/missing-sources.patch new file mode 100644 index 0000000000..88d6f4f22b --- /dev/null +++ b/mingw-w64-crypto++-git/missing-sources.patch @@ -0,0 +1,28 @@ +--- src/GNUmakefile.orig 2014-07-23 23:40:41.007000000 +0400 ++++ src/GNUmakefile 2014-07-23 23:41:05.280600000 +0400 +@@ -131,7 +131,7 @@ + TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o + LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS)) + +-DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp ++DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cpu.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp emsa2.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp hrtimer.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pssr.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp + DLLOBJS = $(DLLSRCS:.cpp=.export.o) + LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o) + TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o) +--- /dev/null 2014-07-23 23:52:53.000000000 +0400 ++++ src/modexppc.cpp 2014-07-23 20:41:34.132400000 +0400 +@@ -0,0 +1,14 @@ ++// modexppc.cpp - written and placed in the public domain by Wei Dai ++ ++#include "pch.h" ++ ++#ifndef CRYPTOPP_IMPORTS ++ ++#include "modexppc.h" ++#include "asn.h" ++NAMESPACE_BEGIN(CryptoPP) ++ ++ ++NAMESPACE_END ++ ++#endif diff --git a/mingw-w64-crypto++-git/resolve-namespace-conflict.patch b/mingw-w64-crypto++-git/resolve-namespace-conflict.patch new file mode 100644 index 0000000000..b1d741ed07 --- /dev/null +++ b/mingw-w64-crypto++-git/resolve-namespace-conflict.patch @@ -0,0 +1,11 @@ +--- a/validat1.cpp 2015-07-24 11:37:41.137857300 +0300 ++++ b/validat1.cpp 2015-07-24 11:38:06.164853700 +0300 +@@ -132,7 +132,7 @@ + cout << "\nTesting Settings...\n\n"; + + word32 w; +- memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4); ++ CryptoPP::memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4); + + if (w == 0x04030201L) + { diff --git a/mingw-w64-crypto++/PKGBUILD b/mingw-w64-crypto++/PKGBUILD index c89e71795f..979dbfcfe9 100644 --- a/mingw-w64-crypto++/PKGBUILD +++ b/mingw-w64-crypto++/PKGBUILD @@ -1,49 +1,60 @@ # Maintainer: Alexey Pavlov _realname=crypto++ - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.6.2 +pkgver=5.6.3 pkgrel=1 -pkgdesc="Crypto++ Library is a free C++ class library of cryptographic schemes." +pkgdesc="Crypto++ Library is a free C++ class library of cryptographic schemes (mingw-w64)" arch=('any') url="http://www.cryptopp.com/" license=('Boost Software License 1.0') options=('staticlibs' 'strip') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -source=("http://www.cryptopp.com/cryptopp${pkgver//./}.zip" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" "unzip") +source=("http://www.cryptopp.com/cryptopp${pkgver//./}.zip"\ + #https://github.com/weidai11/cryptopp/archive/CRYPTOPP_${pkgver//./_}.tar.gz libcrypto++.pc - missing-sources.patch) -md5sums=('7ed022585698df48e65ce9218f6c6a67' - '9aa03e5f77303f1c3685c796b17aa204' - 'b27bcb0cc2938f5af6a07d724ce42b62') + missing-sources.patch + cryptopp-cmake.patch + resolve-namespace-conflict.patch + fix-test-linking.patch) +md5sums=('3c5b70e2ec98b7a24988734446242d07' + 'fdf6ec125726e944269b13a6883abc1c' + '9e5030ee415e3a22bd5a353cff1556a3' + '36fe4fe5a932619170a06c1e287ce010' + '947648b79dc1194217eb0ef0423dd413' + '038003a889c79e024754bc6f08cdafff') +noextract=(cryptopp${pkgver//./}.zip) prepare() { cd ${srcdir} + unzip cryptopp${pkgver//./}.zip -d ${_realname} + + cd ${_realname} + sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile + patch -p1 -i ${srcdir}/missing-sources.patch + patch -p1 -i ${srcdir}/cryptopp-cmake.patch + patch -p1 -i ${srcdir}/resolve-namespace-conflict.patch + patch -p1 -i ${srcdir}/fix-test-linking.patch } build() { - sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile - patch -p1 -i ${srcdir}/missing-sources.patch - make -f GNUMakefile - make cryptopp.dll + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname} + + make } package() { - cd ${srcdir} - - mkdir -p ${pkgdir}${MINGW_PREFIX}/include/cryptopp - cp *.h ${pkgdir}${MINGW_PREFIX}/include/cryptopp + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} -j1 install - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib - - install -d ${pkgdir}${MINGW_PREFIX}/{bin,lib/pkgconfig,include/cryptopp} - install -m644 *.h ${pkgdir}${MINGW_PREFIX}/include/cryptopp/ - install -m644 cryptopp.dll "${pkgdir}${MINGW_PREFIX}/bin/cryptopp.dll" - install -m644 *.a "${pkgdir}${MINGW_PREFIX}/lib/" - install -m644 ${srcdir}/libcrypto++.pc "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libcrypto++.pc" - install -D -m644 License.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" - - sed -e "s|/usr|${MINGW_PREFIX}|g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libcrypto++.pc + install -D -m644 ${srcdir}/${_realname}/License.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-crypto++/cryptopp-cmake.patch b/mingw-w64-crypto++/cryptopp-cmake.patch new file mode 100644 index 0000000000..6105f0d010 --- /dev/null +++ b/mingw-w64-crypto++/cryptopp-cmake.patch @@ -0,0 +1,536 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,512 @@ ++CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ++ ++PROJECT(cryptopp) ++ ++set(CRYPTOPP_VERSION_MAJOR 5) ++set(CRYPTOPP_VERSION_MINOR 6) ++set(CRYPTOPP_VERSION_BUILD 3) ++set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}") ++ ++################################### ++# Global platform-specific settings ++################################### ++IF(MSVC) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc) ++ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS") ++ELSE() ++ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo) ++ IF(MINGW) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS) ++ ELSE() ++ ADD_DEFINITIONS(-fPIC) ++ ENDIF() ++ENDIF() ++ ++SET(CRYPTOPP_LDFLAGS "") ++ ++######################### ++# User Settings ++######################### ++IF(CRYPTOPP_ADDED_DEFINITIONS) ++ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS}) ++ENDIF() ++ ++IF(CRYPTOPP_ADDED_LDFLAGS) ++ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS}) ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE) ++ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.") ++ELSE() ++ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE) ++ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ELSE() ++ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_BUILD_TESTS) ++ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.") ++ELSE() ++ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.") ++ENDIF() ++ ++######################### ++# Project-wide Settings ++######################### ++SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD) ++SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ++STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER) ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC) ++IF(NOT CRYPTOPP_STATIC) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC) ++ENDIF() ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED) ++IF(NOT CRYPTOPP_SHARED) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED) ++ENDIF() ++ ++STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER) ++STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME) ++ ++IF(CRYPTOPP_STATIC_RUNTIME) ++ IF(WIN32) ++ SET(CompilerFlags ++ CMAKE_CXX_FLAGS ++ CMAKE_CXX_FLAGS_DEBUG ++ CMAKE_CXX_FLAGS_RELEASE ++ CMAKE_C_FLAGS ++ CMAKE_C_FLAGS_DEBUG ++ CMAKE_C_FLAGS_RELEASE ++ ) ++ FOREACH(CompilerFlag ${CompilerFlags}) ++ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") ++ ENDFOREACH() ++ ENDIF() ++ENDIF() ++ ++# -------------------------------------------------------------------------- ++# Install directories ++ ++string(TOLOWER ${PROJECT_NAME} projectname) ++set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}") ++ ++if(NOT CRYPTOPP_INSTALL_BIN_DIR) ++ set(CRYPTOPP_INSTALL_BIN_DIR "bin") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR) ++ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_LIB_DIR) ++ set(CRYPTOPP_INSTALL_LIB_DIR "lib") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_SHARE_DIR) ++ set(CRYPTOPP_INSTALL_SHARE_DIR "share") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_DATA_DIR) ++ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}") ++endif() ++ ++######################### ++# Crypto++ Library ++######################### ++ ++CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp) ++ ++SET(CRYPTOPP_SRCS_FIPS ++ algebra.cpp ++ algparam.cpp ++ asn.cpp ++ authenc.cpp ++ basecode.cpp ++ cbcmac.cpp ++ ccm.cpp ++ channels.cpp ++ cmac.cpp ++ cpu.cpp ++ cryptlib.cpp ++ des.cpp ++ dessp.cpp ++ dh.cpp ++ dll.cpp ++ dsa.cpp ++ ec2n.cpp ++ eccrypto.cpp ++ ecp.cpp ++ emsa2.cpp ++ eprecomp.cpp ++ files.cpp ++ filters.cpp ++ fips140.cpp ++ gcm.cpp ++ gf2n.cpp ++ gfpcrypt.cpp ++ hex.cpp ++ hmac.cpp ++ hrtimer.cpp ++ integer.cpp ++ iterhash.cpp ++ misc.cpp ++ modes.cpp ++ modexppc.cpp ++ mqueue.cpp ++ nbtheory.cpp ++ oaep.cpp ++ osrng.cpp ++ pch.cpp ++ pkcspad.cpp ++ pssr.cpp ++ pubkey.cpp ++ queue.cpp ++ randpool.cpp ++ rdrand.cpp ++ rdtables.cpp ++ rijndael.cpp ++ rng.cpp ++ rsa.cpp ++ rw.cpp ++ sha.cpp ++ simple.cpp ++ skipjack.cpp ++ strciphr.cpp ++ trdlocal.cpp ++) ++ ++SET(CRYPTOPP_SRCS ++ 3way.cpp ++ adhoc.cpp.proto ++ adler32.cpp ++ arc4.cpp ++ base32.cpp ++ base64.cpp ++ bfinit.cpp ++ blowfish.cpp ++ blumshub.cpp ++ camellia.cpp ++ cast.cpp ++ casts.cpp ++ crc.cpp ++ default.cpp ++ dh2.cpp ++ eax.cpp ++ elgamal.cpp ++ esign.cpp ++ gf256.cpp ++ gf2_32.cpp ++ gost.cpp ++ gzip.cpp ++ ida.cpp ++ idea.cpp ++ luc.cpp ++ mars.cpp ++ marss.cpp ++ md2.cpp ++ md4.cpp ++ md5.cpp ++ mqv.cpp ++ network.cpp ++ panama.cpp ++ polynomi.cpp ++ rabin.cpp ++ rc2.cpp ++ rc5.cpp ++ rc6.cpp ++ ripemd.cpp ++ safer.cpp ++ salsa.cpp ++ seal.cpp ++ seed.cpp ++ serpent.cpp ++ sha3.cpp ++ shacal2.cpp ++ shark.cpp ++ sharkbox.cpp ++ socketft.cpp ++ sosemanuk.cpp ++ square.cpp ++ squaretb.cpp ++ tea.cpp ++ tftables.cpp ++ tiger.cpp ++ tigertab.cpp ++ ttmac.cpp ++ twofish.cpp ++ vmac.cpp ++ wait.cpp ++ wake.cpp ++ whrlpool.cpp ++ winpipes.cpp ++ xtr.cpp ++ xtrcrypt.cpp ++ zdeflate.cpp ++ zinflate.cpp ++ zlib.cpp ++) ++SET(CRYPTOPP_HDRS ++ 3way.h ++ adler32.h ++ aes.h ++ algebra.h ++ algparam.h ++ arc4.h ++ argnames.h ++ asn.h ++ authenc.h ++ base32.h ++ base64.h ++ basecode.h ++ blowfish.h ++ blumshub.h ++ camellia.h ++ cast.h ++ cbcmac.h ++ ccm.h ++ channels.h ++ cmac.h ++ config.h ++ cpu.h ++ crc.h ++ cryptlib.h ++ default.h ++ des.h ++ dh.h ++ dh2.h ++ dmac.h ++ dsa.h ++ eax.h ++ ec2n.h ++ eccrypto.h ++ ecp.h ++ elgamal.h ++ emsa2.h ++ eprecomp.h ++ esign.h ++ files.h ++ filters.h ++ fips140.h ++ fltrimpl.h ++ gcm.h ++ gf256.h ++ gf2_32.h ++ gf2n.h ++ gfpcrypt.h ++ gost.h ++ gzip.h ++ hex.h ++ hmac.h ++ hrtimer.h ++ ida.h ++ idea.h ++ integer.h ++ iterhash.h ++ lubyrack.h ++ luc.h ++ mars.h ++ md2.h ++ md4.h ++ md5.h ++ mdc.h ++ misc.h ++ modarith.h ++ modes.h ++ modexppc.h ++ mqueue.h ++ mqv.h ++ nbtheory.h ++ network.h ++ nr.h ++ oaep.h ++ oids.h ++ osrng.h ++ panama.h ++ pch.h ++ pkcspad.h ++ polynomi.h ++ pssr.h ++ pubkey.h ++ pwdbased.h ++ queue.h ++ rabin.h ++ rdrand.h ++ randpool.h ++ rc2.h ++ rc5.h ++ rc6.h ++ rijndael.h ++ ripemd.h ++ rng.h ++ rsa.h ++ rw.h ++ safer.h ++ salsa.h ++ seal.h ++ secblock.h ++ seckey.h ++ seed.h ++ serpent.h ++ sha.h ++ sha3.h ++ shacal2.h ++ shark.h ++ simple.h ++ skipjack.h ++ smartptr.h ++ socketft.h ++ sosemanuk.h ++ square.h ++ stdcpp.h ++ strciphr.h ++ tea.h ++ tiger.h ++ trdlocal.h ++ trunhash.h ++ ttmac.h ++ twofish.h ++ vmac.h ++ wait.h ++ wake.h ++ whrlpool.h ++ winpipes.h ++ words.h ++ xtr.h ++ xtrcrypt.h ++ zdeflate.h ++ zinflate.h ++ zlib.h ++) ++ ++SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS}) ++ ++IF(MSVC) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc) ++ IF(CMAKE_CL_64) ++ ENABLE_LANGUAGE(ASM_MASM) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ MAIN_DEPENDENCY x64dll.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ++ ) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ MAIN_DEPENDENCY x64masm.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm ++ ) ++ ENDIF() ++ENDIF() ++ ++######################### ++# Crypto++ Static library ++######################### ++IF(CRYPTOPP_STATIC) ++ #add_definitions(-DCRYPTOPP_IMPORTS) ++ IF(CMAKE_CL_64) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ++ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ ) ++ ENDIF() ++ ADD_LIBRARY(cryptlib STATIC ++ ${CRYPTOPP_SRCS} ++ ) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES OUTPUT_NAME "cryptopp") ++ TARGET_LINK_LIBRARIES(cryptlib) ++ ++ INSTALL( ++ TARGETS cryptlib ++ DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ) ++ENDIF() ++ ++######################### ++# Crypto++ Shared library ++######################### ++IF(CRYPTOPP_SHARED) ++ add_definitions(-DCRYPTOPP_EXPORTS) ++ ADD_LIBRARY(cryptopp SHARED ++ ${CRYPTOPP_SRCS_FIPS} ++ ) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ TARGET_LINK_LIBRARIES(cryptopp) ++ ++ INSTALL( ++ TARGETS cryptopp ++ PERMISSIONS ${EXEC_PERMS} ++ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR} ++ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ) ++ INSTALL(FILES ${CRYPTOPP_HDRS} ++ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR} ++ ) ++ENDIF() ++ ++######################### ++# Crypto++ Test ++######################### ++IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC) ++ SET(TEST_SRCS ++ adhoc.cpp ++ bench.cpp ++ bench2.cpp ++ datatest.cpp ++ dlltest.cpp ++ fipsalgt.cpp ++ regtest.cpp ++ test.cpp ++ validat1.cpp ++ validat2.cpp ++ validat3.cpp ++ fipstest.cpp ++ ) ++ IF(WIN32) ++ SET(TEST_SRCS ${TEST_SRCS} ++ bench.h ++ factory.h ++ validate.h ++ ) ++ ENDIF() ++ ADD_EXECUTABLE(cryptest ${TEST_SRCS}) ++ IF(WIN32) ++ IF(MSVC) ++ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib) ++ ELSE() ++ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32) ++ ENDIF() ++ ENDIF() ++ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT}) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ENDIF() ++ ++#----------------------------------------------------------------------------- ++# pkgconfig support ++# enabled by default on Unix, disabled by default on other platforms ++if(UNIX OR MINGW) ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON) ++else() ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) ++endif() ++if(BUILD_PKGCONFIG_FILES) ++ # install in lib and not share (see multi-arch note above) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY) ++ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION ++ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig ) ++endif() ++ +diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/libcrypto++.pc.cmake.in +@@ -0,0 +1,12 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@ ++libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@ ++includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@ ++ ++Name: libcrypto++ ++Description: Class library of cryptographic schemes ++URL: http://www.cryptopp.com/ ++Version: @CRYPTOPP_VERSION@ ++Libs: -L${libdir} -lcryptopp ++Cflags: -I${includedir} ++ diff --git a/mingw-w64-crypto++/cryptopp-cmake.patch.orig b/mingw-w64-crypto++/cryptopp-cmake.patch.orig new file mode 100644 index 0000000000..bf1093681b --- /dev/null +++ b/mingw-w64-crypto++/cryptopp-cmake.patch.orig @@ -0,0 +1,526 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,502 @@ ++CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ++ ++PROJECT(cryptopp) ++ ++set(CRYPTOPP_VERSION_MAJOR 5) ++set(CRYPTOPP_VERSION_MINOR 6) ++set(CRYPTOPP_VERSION_BUILD 2) ++set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}") ++ ++################################### ++# Global platform-specific settings ++################################### ++IF(MSVC) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc) ++ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS") ++ELSE() ++ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo) ++ IF(MINGW) ++ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS) ++ ELSE() ++ ADD_DEFINITIONS(-fPIC) ++ ENDIF() ++ENDIF() ++ ++SET(CRYPTOPP_LDFLAGS "") ++ ++######################### ++# User Settings ++######################### ++IF(CRYPTOPP_ADDED_DEFINITIONS) ++ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS}) ++ENDIF() ++ ++IF(CRYPTOPP_ADDED_LDFLAGS) ++ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS}) ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE) ++ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.") ++ELSE() ++ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE) ++ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ELSE() ++ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.") ++ENDIF() ++ ++IF(NOT DEFINED CRYPTOPP_BUILD_TESTS) ++ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.") ++ELSE() ++ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.") ++ENDIF() ++ ++######################### ++# Project-wide Settings ++######################### ++SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD) ++SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ++STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER) ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC) ++IF(NOT CRYPTOPP_STATIC) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC) ++ENDIF() ++STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED) ++IF(NOT CRYPTOPP_SHARED) ++ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED) ++ENDIF() ++ ++STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER) ++STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME) ++ ++IF(CRYPTOPP_STATIC_RUNTIME) ++ IF(WIN32) ++ SET(CompilerFlags ++ CMAKE_CXX_FLAGS ++ CMAKE_CXX_FLAGS_DEBUG ++ CMAKE_CXX_FLAGS_RELEASE ++ CMAKE_C_FLAGS ++ CMAKE_C_FLAGS_DEBUG ++ CMAKE_C_FLAGS_RELEASE ++ ) ++ FOREACH(CompilerFlag ${CompilerFlags}) ++ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") ++ ENDFOREACH() ++ ENDIF() ++ENDIF() ++ ++# -------------------------------------------------------------------------- ++# Install directories ++ ++string(TOLOWER ${PROJECT_NAME} projectname) ++set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}") ++ ++if(NOT CRYPTOPP_INSTALL_BIN_DIR) ++ set(CRYPTOPP_INSTALL_BIN_DIR "bin") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR) ++ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_LIB_DIR) ++ set(CRYPTOPP_INSTALL_LIB_DIR "lib") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_SHARE_DIR) ++ set(CRYPTOPP_INSTALL_SHARE_DIR "share") ++endif() ++ ++if(NOT CRYPTOPP_INSTALL_DATA_DIR) ++ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}") ++endif() ++ ++######################### ++# Crypto++ Library ++######################### ++ ++CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp) ++ ++SET(CRYPTOPP_SRCS_FIPS ++ algebra.cpp ++ algparam.cpp ++ asn.cpp ++ authenc.cpp ++ basecode.cpp ++ cbcmac.cpp ++ ccm.cpp ++ channels.cpp ++ cmac.cpp ++ cpu.cpp ++ cryptlib.cpp ++ des.cpp ++ dessp.cpp ++ dh.cpp ++ dll.cpp ++ dsa.cpp ++ ec2n.cpp ++ eccrypto.cpp ++ ecp.cpp ++ emsa2.cpp ++ eprecomp.cpp ++ files.cpp ++ filters.cpp ++ fips140.cpp ++ gcm.cpp ++ gf2n.cpp ++ gfpcrypt.cpp ++ hex.cpp ++ hmac.cpp ++ hrtimer.cpp ++ integer.cpp ++ iterhash.cpp ++ misc.cpp ++ modes.cpp ++ modexppc.cpp ++ mqueue.cpp ++ nbtheory.cpp ++ oaep.cpp ++ osrng.cpp ++ pch.cpp ++ pkcspad.cpp ++ pssr.cpp ++ pubkey.cpp ++ queue.cpp ++ randpool.cpp ++ rdtables.cpp ++ rijndael.cpp ++ rng.cpp ++ rsa.cpp ++ rw.cpp ++ sha.cpp ++ simple.cpp ++ skipjack.cpp ++ strciphr.cpp ++ trdlocal.cpp ++) ++ ++SET(CRYPTOPP_SRCS ++ 3way.cpp ++ adhoc.cpp.proto ++ adler32.cpp ++ arc4.cpp ++ base32.cpp ++ base64.cpp ++ bfinit.cpp ++ blowfish.cpp ++ blumshub.cpp ++ camellia.cpp ++ cast.cpp ++ casts.cpp ++ crc.cpp ++ default.cpp ++ dh2.cpp ++ eax.cpp ++ elgamal.cpp ++ esign.cpp ++ gf256.cpp ++ gf2_32.cpp ++ gost.cpp ++ gzip.cpp ++ ida.cpp ++ idea.cpp ++ luc.cpp ++ mars.cpp ++ marss.cpp ++ md2.cpp ++ md4.cpp ++ md5.cpp ++ mqv.cpp ++ network.cpp ++ panama.cpp ++ polynomi.cpp ++ rabin.cpp ++ rc2.cpp ++ rc5.cpp ++ rc6.cpp ++ ripemd.cpp ++ safer.cpp ++ salsa.cpp ++ seal.cpp ++ seed.cpp ++ serpent.cpp ++ sha3.cpp ++ shacal2.cpp ++ shark.cpp ++ sharkbox.cpp ++ socketft.cpp ++ sosemanuk.cpp ++ square.cpp ++ squaretb.cpp ++ tea.cpp ++ tftables.cpp ++ tiger.cpp ++ tigertab.cpp ++ ttmac.cpp ++ twofish.cpp ++ vmac.cpp ++ wait.cpp ++ wake.cpp ++ whrlpool.cpp ++ winpipes.cpp ++ xtr.cpp ++ xtrcrypt.cpp ++ zdeflate.cpp ++ zinflate.cpp ++ zlib.cpp ++) ++SET(CRYPTOPP_HDRS ++ 3way.h ++ adler32.h ++ aes.h ++ algebra.h ++ algparam.h ++ arc4.h ++ argnames.h ++ asn.h ++ authenc.h ++ base32.h ++ base64.h ++ basecode.h ++ blowfish.h ++ blumshub.h ++ camellia.h ++ cast.h ++ cbcmac.h ++ ccm.h ++ channels.h ++ cmac.h ++ config.h ++ cpu.h ++ crc.h ++ cryptlib.h ++ default.h ++ des.h ++ dh.h ++ dh2.h ++ dmac.h ++ dsa.h ++ eax.h ++ ec2n.h ++ eccrypto.h ++ ecp.h ++ elgamal.h ++ emsa2.h ++ eprecomp.h ++ esign.h ++ files.h ++ filters.h ++ fips140.h ++ fltrimpl.h ++ gcm.h ++ gf256.h ++ gf2_32.h ++ gf2n.h ++ gfpcrypt.h ++ gost.h ++ gzip.h ++ hex.h ++ hmac.h ++ hrtimer.h ++ ida.h ++ idea.h ++ integer.h ++ iterhash.h ++ lubyrack.h ++ luc.h ++ mars.h ++ md2.h ++ md4.h ++ md5.h ++ mdc.h ++ misc.h ++ modarith.h ++ modes.h ++ modexppc.h ++ mqueue.h ++ mqv.h ++ nbtheory.h ++ network.h ++ nr.h ++ oaep.h ++ oids.h ++ osrng.h ++ panama.h ++ pch.h ++ pkcspad.h ++ polynomi.h ++ pssr.h ++ pubkey.h ++ pwdbased.h ++ queue.h ++ rabin.h ++ randpool.h ++ rc2.h ++ rc5.h ++ rc6.h ++ rijndael.h ++ ripemd.h ++ rng.h ++ rsa.h ++ rw.h ++ safer.h ++ salsa.h ++ seal.h ++ secblock.h ++ seckey.h ++ seed.h ++ serpent.h ++ sha.h ++ sha3.h ++ shacal2.h ++ shark.h ++ simple.h ++ skipjack.h ++ smartptr.h ++ socketft.h ++ sosemanuk.h ++ square.h ++ stdcpp.h ++ strciphr.h ++ tea.h ++ tiger.h ++ trdlocal.h ++ trunhash.h ++ ttmac.h ++ twofish.h ++ vmac.h ++ wait.h ++ wake.h ++ whrlpool.h ++ winpipes.h ++ words.h ++ xtr.h ++ xtrcrypt.h ++ zdeflate.h ++ zinflate.h ++ zlib.h ++) ++ ++SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS}) ++ ++IF(MSVC) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc) ++ IF(CMAKE_CL_64) ++ ENABLE_LANGUAGE(ASM_MASM) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ MAIN_DEPENDENCY x64dll.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm ++ ) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ MAIN_DEPENDENCY x64masm.asm ++ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm ++ ) ++ ENDIF() ++ENDIF() ++ ++######################### ++# Crypto++ Static library ++######################### ++IF(CRYPTOPP_STATIC) ++ IF(CMAKE_CL_64) ++ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ++ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj ++ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj ++ ) ++ ENDIF() ++ ADD_LIBRARY(cryptlib STATIC ++ ${CRYPTOPP_SRCS} ++ ) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ TARGET_LINK_LIBRARIES(cryptlib) ++ENDIF() ++ ++######################### ++# Crypto++ Shared library ++######################### ++IF(CRYPTOPP_SHARED) ++ ADD_LIBRARY(cryptopp SHARED ++ ${CRYPTOPP_SRCS_FIPS} ++ ) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ TARGET_LINK_LIBRARIES(cryptopp) ++ ++ INSTALL( ++ TARGETS cryptopp ++ PERMISSIONS ${EXEC_PERMS} ++ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR} ++ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR} ++ ) ++ INSTALL(FILES ${CRYPTOPP_HDRS} ++ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR} ++ ) ++ENDIF() ++ ++######################### ++# Crypto++ Test ++######################### ++IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC) ++ SET(TEST_SRCS ++ adhoc.cpp ++ bench.cpp ++ bench2.cpp ++ datatest.cpp ++ dlltest.cpp ++ fipsalgt.cpp ++ regtest.cpp ++ test.cpp ++ validat1.cpp ++ validat2.cpp ++ validat3.cpp ++ fipstest.cpp ++ ) ++ IF(WIN32) ++ SET(TEST_SRCS ${TEST_SRCS} ++ bench.h ++ factory.h ++ validate.h ++ ) ++ ENDIF() ++ ADD_EXECUTABLE(cryptest ${TEST_SRCS}) ++ IF(WIN32) ++ IF(MSVC) ++ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib) ++ ELSE() ++ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32) ++ ENDIF() ++ ENDIF() ++ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT}) ++ IF(CRYPTOPP_LDFLAGS) ++ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS}) ++ ENDIF() ++ENDIF() ++ ++#----------------------------------------------------------------------------- ++# pkgconfig support ++# enabled by default on Unix, disabled by default on other platforms ++if(UNIX OR MINGW) ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON) ++else() ++ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) ++endif() ++if(BUILD_PKGCONFIG_FILES) ++ # install in lib and not share (see multi-arch note above) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY) ++ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION ++ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig ) ++endif() ++ +diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in +new file mode 100644 +index 0000000..a0c6371 +--- /dev/null ++++ b/libcrypto++.pc.cmake.in +@@ -0,0 +1,12 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@ ++libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@ ++includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@ ++ ++Name: libcrypto++ ++Description: Class library of cryptographic schemes ++URL: http://www.cryptopp.com/ ++Version: @CRYPTOPP_VERSION@ ++Libs: -L${libdir} -lcryptopp ++Cflags: -I${includedir} ++ diff --git a/mingw-w64-crypto++/fix-test-linking.patch b/mingw-w64-crypto++/fix-test-linking.patch new file mode 100644 index 0000000000..d854978efc --- /dev/null +++ b/mingw-w64-crypto++/fix-test-linking.patch @@ -0,0 +1,18 @@ +--- a/winpipes.h 2015-07-24 12:17:47.681944900 +0300 ++++ b/winpipes.h 2015-07-24 12:17:58.280460900 +0300 +@@ -116,7 +116,6 @@ + NetworkSource::GetWaitObjects; + + private: +- HANDLE GetHandle() const {return WindowsHandle::GetHandle();} + NetworkReceiver & AccessReceiver() {return *this;} + }; + +@@ -131,7 +130,6 @@ + NetworkSink::GetWaitObjects; + + private: +- HANDLE GetHandle() const {return WindowsHandle::GetHandle();} + NetworkSender & AccessSender() {return *this;} + }; + diff --git a/mingw-w64-crypto++/libcrypto++.pc b/mingw-w64-crypto++/libcrypto++.pc index 11988b5a5c..8ed4b6d775 100644 --- a/mingw-w64-crypto++/libcrypto++.pc +++ b/mingw-w64-crypto++/libcrypto++.pc @@ -4,7 +4,7 @@ prefix=/usr libdir=${prefix}/lib includedir=${prefix}/include -Name: libcrypto++-5.6.2 +Name: libcrypto++ Description: Class library of cryptographic schemes Version: 5.6.2 Libs: -L${libdir} -lcryptopp diff --git a/mingw-w64-crypto++/missing-sources.patch b/mingw-w64-crypto++/missing-sources.patch index 88d6f4f22b..4582feb3b6 100644 --- a/mingw-w64-crypto++/missing-sources.patch +++ b/mingw-w64-crypto++/missing-sources.patch @@ -1,14 +1,14 @@ --- src/GNUmakefile.orig 2014-07-23 23:40:41.007000000 +0400 +++ src/GNUmakefile 2014-07-23 23:41:05.280600000 +0400 -@@ -131,7 +131,7 @@ - TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o - LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS)) +@@ -255,7 +255,7 @@ + LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS)) --DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp + # List cryptlib.cpp first in an attempt to tame C++ static initialization problems +-DLLSRCS := cryptlib.cpp algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp +DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cpu.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp emsa2.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp hrtimer.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pssr.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp - DLLOBJS = $(DLLSRCS:.cpp=.export.o) - LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o) - TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o) + DLLOBJS := $(DLLSRCS:.cpp=.export.o) + + # Import lib testing --- /dev/null 2014-07-23 23:52:53.000000000 +0400 +++ src/modexppc.cpp 2014-07-23 20:41:34.132400000 +0400 @@ -0,0 +1,14 @@ diff --git a/mingw-w64-crypto++/resolve-namespace-conflict.patch b/mingw-w64-crypto++/resolve-namespace-conflict.patch new file mode 100644 index 0000000000..b1d741ed07 --- /dev/null +++ b/mingw-w64-crypto++/resolve-namespace-conflict.patch @@ -0,0 +1,11 @@ +--- a/validat1.cpp 2015-07-24 11:37:41.137857300 +0300 ++++ b/validat1.cpp 2015-07-24 11:38:06.164853700 +0300 +@@ -132,7 +132,7 @@ + cout << "\nTesting Settings...\n\n"; + + word32 w; +- memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4); ++ CryptoPP::memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4); + + if (w == 0x04030201L) + { diff --git a/mingw-w64-csfml/PKGBUILD b/mingw-w64-csfml/PKGBUILD new file mode 100644 index 0000000000..b9748c0cfc --- /dev/null +++ b/mingw-w64-csfml/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Alexey Pavlov + +_realname=csfml +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.3 +pkgrel=2 +pkgdesc="A simple, fast, cross-platform, and object-oriented multimedia API for C (mingw-w64)" +arch=('any') +url="https://github.com/SFML/CSFML" +license=("zlib") +depends=("${MINGW_PACKAGE_PREFIX}-sfml") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen") +source=("${_realname}-${pkgver}.tar.gz"::https://github.com/SFML/CSFML/archive/${pkgver}.tar.gz + mingw-w64-msys2.patch) +md5sums=('eb99a783e367e018333e622945d232d2' + '6710683fc6c36a30d366d811213b8f8c') + +prepare() { + cd ${srcdir}/CSFML-${pkgver} + patch -p1 -i ${srcdir}/mingw-w64-msys2.patch +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCSFML_LINK_SFML_STATICALLY=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DCSFML_BUILD_DOC=ON \ + ../CSFML-${pkgver} + + make + make doc +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + install -Dm644 ${srcdir}/CSFML-${pkgver}/license.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-csfml/mingw-w64-msys2.patch b/mingw-w64-csfml/mingw-w64-msys2.patch new file mode 100644 index 0000000000..519728b8f2 --- /dev/null +++ b/mingw-w64-csfml/mingw-w64-msys2.patch @@ -0,0 +1,22 @@ +--- csfml/cmake/Config.cmake.orig 2014-05-22 12:05:19.717000000 +0400 ++++ csfml/cmake/Config.cmake 2014-05-22 12:12:58.926200000 +0400 +@@ -109,7 +109,7 @@ + + # define the install directory for miscellaneous files + if(SFML_OS_WINDOWS) +- set(INSTALL_MISC_DIR .) ++ set(INSTALL_MISC_DIR share/CSFML) + elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX) + set(INSTALL_MISC_DIR share/CSFML) + endif() +--- csfml/cmake/Macros.cmake.orig 2014-05-22 12:05:19.717000000 +0400 ++++ csfml/cmake/Macros.cmake 2014-05-22 12:14:36.733400000 +0400 +@@ -31,7 +31,7 @@ + # on Windows/gcc get rid of "lib" prefix for shared libraries, + # and transform the ".dll.a" suffix into ".a" for import libraries + set_target_properties(${target} PROPERTIES PREFIX "") +- set_target_properties(${target} PROPERTIES IMPORT_SUFFIX ".a") ++ set_target_properties(${target} PROPERTIES IMPORT_SUFFIX ".dll.a") + endif() + + # set the version and soversion of the target (for compatible systems -- mostly Linuxes) diff --git a/mingw-w64-ctags/PKGBUILD b/mingw-w64-ctags/PKGBUILD index 5dd7d143ad..40adc09328 100755 --- a/mingw-w64-ctags/PKGBUILD +++ b/mingw-w64-ctags/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Oscar Fuentes _realname=ctags +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=5.8 -pkgrel=1 +pkgrel=4 pkgdesc="A multilanguage implementation of Ctags (mingw-w64)" arch=('any') url="http://ctags.sourceforge.net/" @@ -11,29 +12,33 @@ license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') -source=("http://prdownloads.sourceforge.net/ctags/ctags-${pkgver}.tar.gz" - '001-fix-unused-attribute.patch') +source=("http://prdownloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" + '001-fix-unused-attribute.patch') md5sums=('c00f82ecdcc357434731913e5b48630d' - 'a85a1bd06a4f26546d2687d44195ff3e') + 'a85a1bd06a4f26546d2687d44195ff3e') + +_ctags_srcdir=${_realname}-${pkgver} prepare() { - cd ${_realname}-${pkgver} + cd ${_ctags_srcdir} patch -p1 -i ${srcdir}/001-fix-unused-attribute.patch } build() { - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - ../ctags-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --disable-etags \ - --disable-external-sort - make + cd ${_ctags_srcdir} + # The configure-based build has issues with features that depend + # on regular expressions (such as --langdef, --regex-lang, etc.) + # It is a bit tricky to enable proper regex support on the posix + # build (LIBS=pcreposix configure --with-posix-regex), and then + # the executable segfaults when regexs are involved. + make -f mk_mingw.mak } package() { - cd "${srcdir}/build-${CARCH}" - make prefix="${pkgdir}/${MINGW_PREFIX}" install + _root_dest="${pkgdir}/${MINGW_PREFIX}" + mkdir -p "${_root_dest}/bin" + cp "${_ctags_srcdir}/ctags.exe" "${_root_dest}/bin" + _man_dest="${_root_dest}/share/man/man1" + mkdir -p "${_man_dest}" + cp "${_ctags_srcdir}/ctags.1" "${_man_dest}" } diff --git a/mingw-w64-ctpl-git/PKGBUILD b/mingw-w64-ctpl-git/PKGBUILD new file mode 100644 index 0000000000..af801178a6 --- /dev/null +++ b/mingw-w64-ctpl-git/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Andrea Zagli + +_realname=ctpl +_base_ver=0.3.3 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=0.3.3.385.5423b19 +pkgrel=1 +arch=('any') +pkgdesc="C Template (Parser) Library (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-glib2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "gtk-doc" + "git") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://ctpl.tuxfamily.org/" +source=("${_realname}"::"git+https://github.com/b4n/ctpl.git") +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "%s.%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${srcdir}/${_realname} + + ./autogen.sh +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-curl/0001-curl-relocation.patch b/mingw-w64-curl/0001-curl-relocation.patch index e4b0e2beeb..78b9664075 100644 --- a/mingw-w64-curl/0001-curl-relocation.patch +++ b/mingw-w64-curl/0001-curl-relocation.patch @@ -22,24 +22,24 @@ diff -urN curl-7.37.1.orig/lib/curl_config.h.in curl-7.37.1/lib/curl_config.h.in /* to disable cookies support */ #undef CURL_DISABLE_COOKIES -diff -urN curl-7.37.1.orig/lib/Makefile.inc curl-7.37.1/lib/Makefile.inc ---- curl-7.37.1.orig/lib/Makefile.inc 2014-06-11 18:52:29.000000000 +0100 -+++ curl-7.37.1/lib/Makefile.inc 2014-08-28 21:19:37.748635000 +0100 -@@ -45,7 +45,7 @@ - asyn-thread.c curl_gssapi.c curl_ntlm.c curl_ntlm_wb.c \ - curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_multibyte.c \ - hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c \ -- http2.c curl_sasl_sspi.c -+ http2.c curl_sasl_sspi.c pathtools.c +diff --git a/lib/Makefile.inc b/lib/Makefile.inc +--- a/lib/Makefile.inc ++++ b/lib/Makefile.inc +@@ -46,7 +46,7 @@ LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ + curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_multibyte.c \ + hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c \ + http2.c curl_sasl_sspi.c smb.c curl_sasl_gssapi.c curl_endian.c \ +- curl_des.c ++ curl_des.c pathtools.c - LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ - formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h \ -@@ -63,7 +63,7 @@ - curl_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h \ - curl_ntlm_msgs.h curl_sasl.h curl_multibyte.h hostcheck.h bundles.h \ - conncache.h curl_setup_once.h multihandle.h setup-vms.h pipeline.h \ -- dotdot.h x509asn1.h http2.h sigpipe.h -+ dotdot.h x509asn1.h http2.h sigpipe.h pathtools.h + LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ + formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h \ +@@ -65,7 +65,7 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ + curl_ntlm_msgs.h curl_sasl.h curl_multibyte.h hostcheck.h bundles.h \ + conncache.h curl_setup_once.h multihandle.h setup-vms.h pipeline.h \ + dotdot.h x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h \ +- curl_printf.h ++ curl_printf.h pathtools.h LIB_RCFILES = libcurl.rc @@ -614,7 +614,7 @@ diff -urN curl-7.37.1.orig/lib/url.c curl-7.37.1/lib/url.c /* The last #include file should be: */ #include "memdebug.h" -@@ -552,7 +557,20 @@ +@@ -585,7 +591,20 @@ /* This is our preferred CA cert bundle/path since install time */ #if defined(CURL_CA_BUNDLE) @@ -632,6 +632,10 @@ diff -urN curl-7.37.1.orig/lib/url.c curl-7.37.1/lib/url.c +#else result = setstropt(&set->str[STRING_SSL_CAFILE], (char *) CURL_CA_BUNDLE); +#endif /* defined(__MINGW32__) */ + if(result) + return result; #elif defined(CURL_CA_PATH) result = setstropt(&set->str[STRING_SSL_CAPATH], (char *) CURL_CA_PATH); + if(result) + return result; #endif diff --git a/mingw-w64-curl/0002-curl-mingw-enable-static.patch b/mingw-w64-curl/0002-curl-mingw-enable-static.patch new file mode 100644 index 0000000000..7121ecacf3 --- /dev/null +++ b/mingw-w64-curl/0002-curl-mingw-enable-static.patch @@ -0,0 +1,12 @@ +diff -urN curl-7.40.0.orig/configure.ac curl-7.40.0/configure.ac +--- curl-7.40.0.orig/m4/xc-lt-iface.m4 2014-07-14 19:49:18.000000000 +0100 ++++ curl-7.40.0/m4/xc-lt-iface.m4 2014-08-28 21:39:53.352497100 +0100 +@@ -72,7 +72,7 @@ + if test "x$xc_lt_want_enable_shared" = 'xyes' && + test "x$xc_lt_want_enable_static" = 'xyes'; then + case $host_os in @%:@ ( +- mingw* | pw32* | cegcc* | os2* | aix*) ++ pw32* | cegcc* | os2* | aix*) + xc_lt_want_enable_static='no' + ;; + esac diff --git a/mingw-w64-curl/0003-curl-detect-ipv6-on-windows.patch b/mingw-w64-curl/0003-curl-detect-ipv6-on-windows.patch new file mode 100644 index 0000000000..79c0e840fa --- /dev/null +++ b/mingw-w64-curl/0003-curl-detect-ipv6-on-windows.patch @@ -0,0 +1,71 @@ +From: Johannes Schindelin +Date: Thu, 17 Sep 2015 20:03:34 +0200 +Subject: [PATCH] Auto-detect IPv6 support even on Windows + +Signed-off-by: Johannes Schindelin +--- + configure.ac | 11 ++++++++++- + m4/curl-functions.m4 | 10 ++++++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index be2634a..9ff200d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1081,7 +1081,11 @@ AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), + + AC_TRY_RUN([ /* is AF_INET6 available? */ + #include ++#ifdef HAVE_WINSOCK2_H ++#include ++#else + #include ++#endif + #include /* for exit() */ + main() + { +@@ -1108,7 +1112,12 @@ if test "$ipv6" = yes; then + AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member]) + AC_TRY_COMPILE([ + #include +-#include ] , ++#ifdef HAVE_WINSOCK2_H ++#include ++#include ++#else ++#include ++#endif] , + struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes) + if test "$have_sin6_scope_id" = yes; then + AC_MSG_RESULT([yes]) +diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 +index 0d65421..9f04661 100644 +--- a/m4/curl-functions.m4 ++++ b/m4/curl-functions.m4 +@@ -44,6 +44,10 @@ curl_includes_arpa_inet="\ + #ifdef HAVE_ARPA_INET_H + # include + #endif ++#ifdef HAVE_WINSOCK2_H ++#include ++#include ++#endif + /* includes end */" + AC_CHECK_HEADERS( + sys/types.h sys/socket.h netinet/in.h arpa/inet.h, +@@ -2098,6 +2102,12 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ + struct addrinfo *ai = 0; + int error; + ++ #ifdef HAVE_WINSOCK2_H ++ WSADATA wsa; ++ if (WSAStartup(MAKEWORD(2,2), &wsa)) ++ exit(2); ++ #endif ++ + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_NUMERICHOST; + hints.ai_family = AF_UNSPEC; +-- +2.5.2.windows.2 + diff --git a/mingw-w64-curl/PKGBUILD b/mingw-w64-curl/PKGBUILD index 487e5f80ae..4d9e9a67c7 100644 --- a/mingw-w64-curl/PKGBUILD +++ b/mingw-w64-curl/PKGBUILD @@ -1,8 +1,12 @@ # Maintainer: Alexey Pavlov +_variant=-openssl +#_variant=-winssl +#_variant=-gnutls _realname=curl +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=7.39.0 +pkgver=7.46.0 pkgrel=1 pkgdesc="An URL retrival utility and library. (mingw-w64)" arch=('any') @@ -11,24 +15,35 @@ license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-c-ares" - "${MINGW_PACKAGE_PREFIX}-ca-certificates" - "${MINGW_PACKAGE_PREFIX}-gnutls" "${MINGW_PACKAGE_PREFIX}-libidn" "${MINGW_PACKAGE_PREFIX}-libssh2" - "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-rtmpdump") -options=('staticlibs') # '!strip' 'debug') -source=("$url/download/${_realname}-$pkgver.tar.bz2"{,.asc} - "0001-curl-relocation.patch") -md5sums=('1efecb5b0e43c17d968f0d228bbbbbbd' + "${MINGW_PACKAGE_PREFIX}-rtmpdump" + $([[ "$_variant" == "-openssl" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-ca-certificates" \ + "${MINGW_PACKAGE_PREFIX}-openssl") + $([[ "$_variant" == "-gnutls" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-ca-certificates" \ + "${MINGW_PACKAGE_PREFIX}-gnutls") + ) +options=('staticlibs') +source=("$url/download/${_realname}-${pkgver}.tar.bz2"{,.asc} + "0001-curl-relocation.patch" + "0002-curl-mingw-enable-static.patch" + "0003-curl-detect-ipv6-on-windows.patch") +md5sums=('9979f989a2a9930d10f1b3deeabc2148' 'SKIP' - '6cd440db4867514fdb170be394986051') + '58520051c4ed77781d233c3fa40a5435' + 'eac9e212e619490966ae47004bec547b' + 'f1c5b8648af0dfab7bde4d68a6b65f25') +validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91') # Daniel Stenberg prepare() { - cd "${_realname}-$pkgver" + cd "${_realname}-${pkgver}" rm -f lib/pathtools.h lib/pathtools.c > /dev/null 2>&1 || true patch -p1 -i "${srcdir}/0001-curl-relocation.patch" + patch -p1 -i "${srcdir}/0002-curl-mingw-enable-static.patch" + patch -p1 -i "${srcdir}/0003-curl-detect-ipv6-on-windows.patch" autoreconf -vfi } @@ -40,19 +55,39 @@ build() { extra_config+=( --disable-debug ) fi mkdir -p "${srcdir}/build-${CARCH}" + + local -a _variant_config + if [ "${_variant}" = "-winssl" ]; then + _variant_config+=("--without-ssl") + _variant_config+=("--without-gnutls") + _variant_config+=("--with-winssl") + _variant_config+=("--without-ca-bundle") + _variant_config+=("--without-ca-path") + elif [ "${_variant}" = "-gnutls" ]; then + _variant_config+=("--without-ssl") + _variant_config+=("--with-gnutls") + _variant_config+=("--with-ca-bundle=${MINGW_PREFIX}/ssl/certs/ca-bundle.crt") + elif [ "${_variant}" = "-openssl" ]; then + _variant_config+=("--without-gnutls") + _variant_config+=("--with-ssl") + _variant_config+=("--with-ca-bundle=${MINGW_PREFIX}/ssl/certs/ca-bundle.crt") + fi cd "${srcdir}/build-${CARCH}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --with-ca-bundle=${MINGW_PREFIX}/ssl/certs/ca-bundle.crt \ --without-random \ + --enable-static \ + --enable-shared \ + --enable-sspi \ + "${_variant_config[@]}" \ "${extra_config[@]}" make } package() { cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-cyrus-sasl/19-paths-relocation.patch b/mingw-w64-cyrus-sasl/19-paths-relocation.patch new file mode 100644 index 0000000000..f6d7b1ec10 --- /dev/null +++ b/mingw-w64-cyrus-sasl/19-paths-relocation.patch @@ -0,0 +1,746 @@ +diff -Naur cyrus-sasl-2.1.26-orig/config/varexpand.m4 cyrus-sasl-2.1.26/config/varexpand.m4 +--- cyrus-sasl-2.1.26-orig/config/varexpand.m4 1970-01-01 03:00:00.000000000 +0300 ++++ cyrus-sasl-2.1.26/config/varexpand.m4 2014-12-16 00:22:11.487600000 +0300 +@@ -0,0 +1,8 @@ ++AC_DEFUN([FULL_EXPAND_VARIABLE], [ ++ $1=$2 ++ $1=`( ++ test "x$prefix" = xNONE && prefix="$ac_default_prefix" ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" ++ eval echo \""[$]$1"\" ++ )` ++]) +diff -Naur cyrus-sasl-2.1.26-orig/configure.in cyrus-sasl-2.1.26/configure.in +--- cyrus-sasl-2.1.26-orig/configure.in 2014-12-15 23:10:23.125400000 +0300 ++++ cyrus-sasl-2.1.26/configure.in 2014-12-16 00:23:05.167200000 +0300 +@@ -1027,6 +1027,8 @@ + configdir=$plugindir:/etc/sasl2) + AC_DEFINE_UNQUOTED(CONFIGDIR, "$configdir", [Runtime config file location]) + AC_SUBST(configdir) ++FULL_EXPAND_VARIABLE(sasl_bindir, "$bindir") ++AC_DEFINE_UNQUOTED(BINDIR, "$sasl_bindir", [Runtime executables location]) + + dnl look for rc4 libraries. we accept the CMU one or one from openSSL + AC_ARG_WITH(rc4, [ --with-rc4 use internal rc4 routines [[yes]] ], +diff -Naur cyrus-sasl-2.1.26-orig/include/sasl.h cyrus-sasl-2.1.26/include/sasl.h +--- cyrus-sasl-2.1.26-orig/include/sasl.h 2014-12-15 23:10:22.454600000 +0300 ++++ cyrus-sasl-2.1.26/include/sasl.h 2014-12-15 23:43:10.374600000 +0300 +@@ -667,6 +667,8 @@ + #define SASL_PATH_TYPE_PLUGIN 0 + #define SASL_PATH_TYPE_CONFIG 1 + ++LIBSASL_API char * sasl_path_relocation(const char *from, const char *to); ++LIBSASL_API char * sasl_pathlist_relocation(const char *from_path, const char *to_path_list); + /* a simpler way to set plugin path or configuration file path + * without the need to set sasl_getpath_t callback. + * +diff -Naur cyrus-sasl-2.1.26-orig/lib/common.c cyrus-sasl-2.1.26/lib/common.c +--- cyrus-sasl-2.1.26-orig/lib/common.c 2014-12-15 23:10:22.953800000 +0300 ++++ cyrus-sasl-2.1.26/lib/common.c 2014-12-15 23:46:29.514400000 +0300 +@@ -59,6 +59,7 @@ + #include + #include + #include "saslint.h" ++#include "pathtools.h" + + #ifdef HAVE_UNISTD_H + #include +@@ -86,6 +87,45 @@ + #endif + + ++char * ++sasl_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++sasl_pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} ++ + static const char build_ident[] = "$Build: libsasl " PACKAGE "-" VERSION " $"; + + /* It turns out to be convenient to have a shared sasl_utils_t */ +@@ -1585,9 +1625,13 @@ + + #if defined(WIN32) + /* NB: On Windows platforms this value is always allocated */ ++# ifdef __MINGW32__ ++ default_plugin_path = sasl_path_relocation(BINDIR, PLUGINDIR); ++# else + default_plugin_path = _sasl_get_default_win_path(context, + SASL_PLUGIN_PATH_ATTR, + PLUGINDIR); ++# endif + #else + /* NB: On Unix platforms this value is never allocated */ + path = _sasl_get_default_unix_path(context, +@@ -1640,9 +1684,13 @@ + + #if defined(WIN32) + /* NB: On Windows platforms this value is always allocated */ ++# ifdef __MINGW32__ ++ default_plugin_path = sasl_pathlist_relocation(BINDIR, CONFIGDIR); ++# else + default_conf_path = _sasl_get_default_win_path(context, + SASL_CONF_PATH_ATTR, + CONFIGDIR); ++# endif + #else + /* NB: On Unix platforms this value is never allocated */ + path = _sasl_get_default_unix_path(context, +diff -Naur cyrus-sasl-2.1.26-orig/lib/Makefile.am cyrus-sasl-2.1.26/lib/Makefile.am +--- cyrus-sasl-2.1.26-orig/lib/Makefile.am 2014-12-15 23:10:23.094200000 +0300 ++++ cyrus-sasl-2.1.26/lib/Makefile.am 2014-12-15 23:24:10.600800000 +0300 +@@ -60,8 +60,8 @@ + DLOPEN_C = dlopen.c + endif + +-common_headers = saslint.h +-common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c $(DLOPEN_C) ../plugins/plugin_common.c ++common_headers = saslint.h pathtools.h ++common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c pathtools.c saslutil.c server.c seterror.c $(DLOPEN_C) ../plugins/plugin_common.c + + LTLIBOBJS = @LTLIBOBJS@ + LIBOBJS = @LIBOBJS@ +diff -Naur cyrus-sasl-2.1.26-orig/lib/pathtools.c cyrus-sasl-2.1.26/lib/pathtools.c +--- cyrus-sasl-2.1.26-orig/lib/pathtools.c 1970-01-01 03:00:00.000000000 +0300 ++++ cyrus-sasl-2.1.26/lib/pathtools.c 1970-01-01 03:00:00.000000000 +0300 +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff -Naur cyrus-sasl-2.1.26-orig/lib/pathtools.h cyrus-sasl-2.1.26/lib/pathtools.h +--- cyrus-sasl-2.1.26-orig/lib/pathtools.h 1970-01-01 03:00:00.000000000 +0300 ++++ cyrus-sasl-2.1.26/lib/pathtools.h 1970-01-01 03:00:00.000000000 +0300 +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ +diff -Naur cyrus-sasl-2.1.26-orig/utils/pluginviewer.c cyrus-sasl-2.1.26/utils/pluginviewer.c +--- cyrus-sasl-2.1.26-orig/utils/pluginviewer.c 2014-12-15 23:10:22.407800000 +0300 ++++ cyrus-sasl-2.1.26/utils/pluginviewer.c 2014-12-15 23:45:36.037600000 +0300 +@@ -201,7 +201,7 @@ + if (searchpath) { + *path = searchpath; + } else { +- *path = PLUGINDIR; ++ *path = sasl_path_relocation(BINDIR, PLUGINDIR); + } + + return SASL_OK; diff --git a/mingw-w64-cyrus-sasl/PKGBUILD b/mingw-w64-cyrus-sasl/PKGBUILD index 1350daf0be..0434162f9e 100644 --- a/mingw-w64-cyrus-sasl/PKGBUILD +++ b/mingw-w64-cyrus-sasl/PKGBUILD @@ -1,5 +1,6 @@ # Maintainer: Alexey Pavlov # Contributor: Ray Donnelly +# Contributor: Renato Silva # There's an ugliness issue in cyrus-sasl's build system. # It builds libsasl2.dll with some compat objects, somehow @@ -23,13 +24,13 @@ _realname=cyrus-sasl pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=2.1.26 -pkgrel=1 +pkgrel=5 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library" arch=('any') url="http://cyrusimap.web.cmu.edu/" license=('custom') depends=("${MINGW_PACKAGE_PREFIX}-gdbm" - "${MINGW_PACKAGE_PREFIX}-openssl" + #"${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-sqlite3") options=('emptydirs' 'strip' '!makeflags') source=(http://cyrusimap.org/releases/${_realname}-${pkgver}.tar.gz @@ -43,14 +44,14 @@ source=(http://cyrusimap.org/releases/${_realname}-${pkgver}.tar.gz 08-cyrus-sasl-2.1.26-size_t.patch 09-cyrus-sasl-2.1.26-msys2.patch 10-MinGW-w64-already-has-getopt.patch - 11-MinGW-w64-add-disable-win32-reg-option.patch 12-MinGW-w64-uses-ws2_32-not-socket.patch 13-MSYS2-Use-cp-f-instead-of-ln-s.patch 14-MinGW-w64-add-LIBSASL_API-to-function-definitions.patch 15-MinGW-w64-define-LIBSASL_EXPORTS_eq_1-for-sasldb.patch 16-MinGW-w64-define-WIN32_LEAN_AND_MEAN-avoiding-handle_t-redef.patch 17-MinGW-w64-define-S_IRUSR-and-S_IWUSR.patch - 18-MinGW-w64-use-windlopen.c-not-dlopen.c.patch) + 18-MinGW-w64-use-windlopen.c-not-dlopen.c.patch + 19-paths-relocation.patch) md5sums=('a7f4e5e559a0e37b3ffc438c9456e425' '7f52862a74ada70ed2e257990f9b4334' 'd7ff8a6d1902478190c705a580b4bd80' @@ -62,14 +63,14 @@ md5sums=('a7f4e5e559a0e37b3ffc438c9456e425' 'bcaafcbc79054e8356217213d6eda16d' 'b48df2818c4836801445d9dee0adfaa0' '0804261cbd3605300de45d239f0985b1' - '88646a5b27f7d2d2dae2d37a84ce4bb9' '67b07a35ee220b0e604bfe232c73757b' 'e22b151aceb15d15abf86827741ecd9e' '74deb3bb998a1da6e1b7697606269a44' '3255cf7f8bf21e26e1900b5df5050d86' '8a7b3c956b6ade7f50b322f2f2211a46' '42b8a2f0f6a9b8c88168a5e6a7433cbb' - 'aa98b66f10b3628b3278e97adf4d4ce5') + 'aa98b66f10b3628b3278e97adf4d4ce5' + 'f0d91129bd6c0220a904cdb196aa3f4e') prepare() { cd ${srcdir}/$_realname-$pkgver @@ -84,7 +85,6 @@ prepare() { patch -p1 -i ${srcdir}/08-cyrus-sasl-2.1.26-size_t.patch patch -p1 -i ${srcdir}/09-cyrus-sasl-2.1.26-msys2.patch patch -p1 -i ${srcdir}/10-MinGW-w64-already-has-getopt.patch - patch -p1 -i ${srcdir}/11-MinGW-w64-add-disable-win32-reg-option.patch patch -p1 -i ${srcdir}/12-MinGW-w64-uses-ws2_32-not-socket.patch patch -p1 -i ${srcdir}/13-MSYS2-Use-cp-f-instead-of-ln-s.patch patch -p1 -i ${srcdir}/14-MinGW-w64-add-LIBSASL_API-to-function-definitions.patch @@ -92,9 +92,10 @@ prepare() { patch -p1 -i ${srcdir}/16-MinGW-w64-define-WIN32_LEAN_AND_MEAN-avoiding-handle_t-redef.patch patch -p1 -i ${srcdir}/17-MinGW-w64-define-S_IRUSR-and-S_IWUSR.patch patch -p1 -i ${srcdir}/18-MinGW-w64-use-windlopen.c-not-dlopen.c.patch + patch -p1 -i ${srcdir}/19-paths-relocation.patch sed 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' -i configure.in - rm -f config/config.guess config/config.sub + rm -f config/config.guess config/config.sub rm -f config/ltconfig config/ltmain.sh config/libtool.m4 rm -fr autom4te.cache libtoolize -c @@ -102,9 +103,9 @@ prepare() { automake -a -c autoheader autoconf - + pushd saslauthd - rm -f config/config.guess config/config.sub + rm -f config/config.guess config/config.sub rm -f config/ltconfig config/ltmain.sh config/libtool.m4 rm -fr autom4te.cache libtoolize -c @@ -118,7 +119,7 @@ prepare() { build() { mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - + # Useful ref: # https://fedorapeople.org/cgit/elmarco/public_git/mingw32-cyrus-sasl.git/tree/mingw32-cyrus-sasl.spec # --oldincludedir=${MINGW_PREFIX}/include is so that /usr/include isn't added by default. @@ -126,18 +127,28 @@ build() { # --enable-sql # --without-saslauthd because it needs sockaddr_un. - ../$_realname-$pkgver/configure \ + # We disable OpenSSL (--without-openssl --without-des) so that applications + # with licenses incompatible with OpenSSL (such as GPL applications) do not + # end up linked with OpenSSL if they use and redistribute Cyrus SASL outside + # MSYS2. See these links: + # + # * https://www.openssl.org/support/faq.html#LEGAL2 + # * http://en.wikipedia.org/wiki/OpenSSL#Licensing + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ - --build=$CHOST \ - --host=$CHOST \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ --with-configdir=${MINGW_PREFIX}/etc/sasl2:${MINGW_PREFIX}/etc/sasl:${MINGW_PREFIX}/lib/sasl2 \ + --with-plugindir=${MINGW_PREFIX}/lib/sasl2 \ --disable-static --enable-shared \ --with-sqlite3=${MINGW_PREFIX} \ --disable-ldapdb \ - --disable-win32-reg \ --oldincludedir=${MINGW_PREFIX}/include \ --without-saslauthd \ --without-pwcheck \ + --without-openssl \ + --without-des \ --without-authdaemond \ --with-dblib=gdbm @@ -150,5 +161,5 @@ package() { cd "${srcdir}/build-${CARCH}" make DESTDIR="${pkgdir}" install sasldir=${_plugindir} - install -Dm644 ${srcdir}/$_realname-$pkgver/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-cython-git/PKGBUILD b/mingw-w64-cython-git/PKGBUILD new file mode 100644 index 0000000000..ab7673ee1f --- /dev/null +++ b/mingw-w64-cython-git/PKGBUILD @@ -0,0 +1,91 @@ +# Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > +# Contributor: Ray Donnelly + +_realname=cython +pkgname=("${MINGW_PACKAGE_PREFIX}-cython-git" "${MINGW_PACKAGE_PREFIX}-cython2-git") +pkgver=0.23.beta1.7.g702f1f4 +pkgrel=1 +pkgdesc="C-Extensions for Python (mingw-w64)" +arch=('any') +url="http://www.cython.org" +license=('APACHE') +makedepends=( + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-gcc" + ) +source=("git+https://github.com/cython/cython.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}"/${_realname} + git describe --tags | sed 's|-|.|g' +} + +prepare() { + cp -a ${_realname} ${_realname}-py2-${pkgver}-${CARCH} + mv ${_realname} ${_realname}-${pkgver}-${CARCH} +} + +package_cython() { + depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") + cd ${_realname}-${pkgver}-${CARCH} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + DISTUTILS_DEBUG=1 \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + # Our setuptools {gui,cli}{,-32,-64}.exe have special-case handling for /usr/bin/env such that + # they look in PATH. + sed -i 's|#!.*|#!/usr/bin/env python3|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py +} + +package_cython2() { + depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") + cd ${_realname}-py2-${pkgver}-${CARCH} + DISTUTILS_DEBUG=1 \ + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + # Our setuptools {gui,cli}{,-32,-64}.exe have special-case handling for /usr/bin/env such that + # they look in PATH. + sed -i 's|#!.*|#!/usr/bin/env python2|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py + + mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}.exe + mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}.exe + mv ${pkgdir}${MINGW_PREFIX}/bin/cythonize{,2}.exe + if [ -f ${pkgdir}${MINGW_PREFIX}/bin/cygdb.exe.manifest ]; then + mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}.exe.manifest + mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}.exe.manifest + mv ${pkgdir}${MINGW_PREFIX}/bin/cythonize{,2}.exe.manifest + fi + + mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}-script.py + mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}-script.py + mv ${pkgdir}${MINGW_PREFIX}/bin/cythonize{,2}-script.py +} + +package_mingw-w64-i686-cython-git() { + conflicts=("mingw-w64-i686-cython") + provides=("mingw-w64-i686-cython") + package_cython +} + +package_mingw-w64-i686-cython2-git() { + conflicts=("mingw-w64-i686-cython2") + provides=("mingw-w64-i686-cython2") + package_cython2 +} + +package_mingw-w64-x86_64-cython-git() { + conflicts=("mingw-w64-x86_64-cython") + provides=("mingw-w64-x86_64-cython") + package_cython +} + +package_mingw-w64-x86_64-cython2-git() { + conflicts=("mingw-w64-x86_64-cython2") + provides=("mingw-w64-x86_64-cython2") + package_cython2 +} diff --git a/mingw-w64-cython/PKGBUILD b/mingw-w64-cython/PKGBUILD index 7241ad1bfd..812ecb2535 100644 --- a/mingw-w64-cython/PKGBUILD +++ b/mingw-w64-cython/PKGBUILD @@ -2,12 +2,12 @@ # Contributor: Ray Donnelly _realname=cython +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-cython" "${MINGW_PACKAGE_PREFIX}-cython2") -pkgver=0.21 -pkgrel=2 +pkgver=0.23.4 +pkgrel=1 pkgdesc="C-Extensions for Python (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") url="http://www.cython.org" license=('APACHE') makedepends=( @@ -15,17 +15,17 @@ makedepends=( "${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-gcc" ) -source=("http://cython.org/release/Cython-$pkgver.tar.gz") -md5sums=('6c9c4d19ba485fe8cd88e23b57ac7886') +source=("http://cython.org/release/Cython-${pkgver}.tar.gz") +md5sums=('157df1f69bcec6b56fd97e0f2e057f6e') prepare() { - cp -a $_realname-$pkgver $_realname-py2-$pkgver-${CARCH} - mv $_realname-$pkgver $_realname-$pkgver-${CARCH} + cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver}-${CARCH} + mv ${_realname}-${pkgver} ${_realname}-${pkgver}-${CARCH} } package_cython() { depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") - cd $_realname-$pkgver-${CARCH} + cd ${_realname}-${pkgver}-${CARCH} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ DISTUTILS_DEBUG=1 \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ @@ -38,7 +38,7 @@ package_cython() { package_cython2() { depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") - cd $_realname-py2-$pkgver-${CARCH} + cd ${_realname}-py2-${pkgver}-${CARCH} DISTUTILS_DEBUG=1 \ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ @@ -48,18 +48,18 @@ package_cython2() { # they look in PATH. sed -i 's|#!.*|#!/usr/bin/env python2|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py - mv $pkgdir/${MINGW_PREFIX}/bin/cygdb{,2}.exe - mv $pkgdir/${MINGW_PREFIX}/bin/cython{,2}.exe - mv $pkgdir/${MINGW_PREFIX}/bin/cythonize{,2}.exe - if [ -f $pkgdir/${MINGW_PREFIX}/bin/cygdb.exe.manifest ]; then - mv $pkgdir/${MINGW_PREFIX}/bin/cygdb{,2}.exe.manifest - mv $pkgdir/${MINGW_PREFIX}/bin/cython{,2}.exe.manifest - mv $pkgdir/${MINGW_PREFIX}/bin/cythonize{,2}.exe.manifest + mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}.exe + mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}.exe + mv ${pkgdir}${MINGW_PREFIX}/bin/cythonize{,2}.exe + if [ -f ${pkgdir}${MINGW_PREFIX}/bin/cygdb.exe.manifest ]; then + mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}.exe.manifest + mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}.exe.manifest + mv ${pkgdir}${MINGW_PREFIX}/bin/cythonize{,2}.exe.manifest fi - mv $pkgdir/${MINGW_PREFIX}/bin/cygdb{,2}-script.py - mv $pkgdir/${MINGW_PREFIX}/bin/cython{,2}-script.py - mv $pkgdir/${MINGW_PREFIX}/bin/cythonize{,2}-script.py + mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}-script.py + mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}-script.py + mv ${pkgdir}${MINGW_PREFIX}/bin/cythonize{,2}-script.py } package_mingw-w64-i686-cython() { diff --git a/mingw-w64-d-feet/PKGBUILD b/mingw-w64-d-feet/PKGBUILD index 239ed5af53..ac20b509f7 100644 --- a/mingw-w64-d-feet/PKGBUILD +++ b/mingw-w64-d-feet/PKGBUILD @@ -2,40 +2,50 @@ # Based on Arch Linux package maintained by : Balló György _realname=d-feet - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.3.8 -pkgrel=2 +pkgver=0.3.10 +pkgrel=1 pkgdesc="D-Bus debugger for GNOME (mingw-w64)" arch=('any') url="https://wiki.gnome.org/Apps/DFeet" license=('GPL') -depends=("${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-python3-gobject" "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme") +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-python3-gobject" + "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme") makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" "intltool" "itstool") install=d-feet-${CARCH}.install -source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz) -sha256sums=('e8423feb18fdff9b1465bf8442b78994ba13c12f8fa3b08e6a2f05768b4feee5') +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + localedir-fix.patch) +sha256sums=('88f0df5fcb862387ff3d1793873c5eb368c3e4db0bbd82ea65f748cbf70a6359' + 'fc75a1e0fafac35a0c94a6c0fff6d0a28c7d5d6ac80ad4ca89399945feafb6c7') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/localedir-fix.patch + autoreconf -fi +} build() { - cd "${srcdir}/${_realname}-${pkgver}" - [ -d build-${CARCH} ] && rm -rf build-${CARCH} - mkdir build-${CARCH} - cd build-${CARCH} + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf ${srcdir}/build-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${CARCH} + PYTHON=${MINGW_PREFIX}/bin/python3 \ - ../configure --prefix=${MINGW_PREFIX} \ - --sysconfdir="${pkgdir}${MINGW_PREFIX}/etc" \ - --localstatedir="${pkgdir}${MINGW_PREFIX}/var" \ - --disable-tests + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --sysconfdir="${pkgdir}${MINGW_PREFIX}/etc" \ + --localstatedir="${pkgdir}${MINGW_PREFIX}/var" \ + --disable-tests + make } check() { - cd ${_realname}-${pkgver} - # Needs X + cd build-${CARCH} #make check } package() { - cd "${srcdir}/${_realname}-${pkgver}/build-${CARCH}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-d-feet/localedir-fix.patch b/mingw-w64-d-feet/localedir-fix.patch new file mode 100644 index 0000000000..76a3f230e2 --- /dev/null +++ b/mingw-w64-d-feet/localedir-fix.patch @@ -0,0 +1,33 @@ +=== modified file 'Makefile.in.in' +--- a/po/Makefile.in.in 2012-01-18 16:37:06 +0000 ++++ b/po/Makefile.in.in 2013-05-12 17:12:40 +0000 +@@ -33,8 +33,7 @@ + datadir = @datadir@ + datarootdir = @datarootdir@ + libdir = @libdir@ +-DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +107,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +141,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot diff --git a/mingw-w64-daala-git/0003-missing-include.patch b/mingw-w64-daala-git/0003-missing-include.patch new file mode 100644 index 0000000000..682a0ffd69 --- /dev/null +++ b/mingw-w64-daala-git/0003-missing-include.patch @@ -0,0 +1,10 @@ +--- daala/src/mc.c.orig 2015-07-09 05:02:28.000000000 +0000 ++++ daala/src/mc.c 2015-07-09 12:24:59.844345500 +0000 +@@ -28,6 +28,7 @@ + + #include + #include ++#include + #include "logging.h" + #include "mc.h" + #include "state.h" diff --git a/mingw-w64-daala-git/0004-xp-sp2.all.patch b/mingw-w64-daala-git/0004-xp-sp2.all.patch new file mode 100644 index 0000000000..12ca426ad4 --- /dev/null +++ b/mingw-w64-daala-git/0004-xp-sp2.all.patch @@ -0,0 +1,11 @@ +--- daala-cb5f87b/configure.ac.orig 2015-01-16 05:02:28.000000000 +0000 ++++ daala-cb5f87b/configure.ac 2015-01-18 12:24:59.844345500 +0000 +@@ -52,7 +52,7 @@ + # It's okay to define this even when HTTP support is disabled, as it only + # affects header declarations, not linking (unless we actually use some + # XP-only functions). +- AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x501, ++ AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x502, + [We need at least WindowsXP for getaddrinfo/freaddrinfo]) + host_mingw=true + ;; diff --git a/mingw-w64-daala-git/0005-no-pkg-config-prefix.mingw.patch b/mingw-w64-daala-git/0005-no-pkg-config-prefix.mingw.patch new file mode 100644 index 0000000000..24f5933fca --- /dev/null +++ b/mingw-w64-daala-git/0005-no-pkg-config-prefix.mingw.patch @@ -0,0 +1,27 @@ +--- daala-cc4432e/m4/pkg.m4.orig 2015-04-03 02:08:04.000000000 +0000 ++++ daala-cc4432e/m4/pkg.m4 2015-04-06 12:13:46.678780600 +0000 +@@ -122,9 +122,9 @@ + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then +- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --dont-define-prefix --short-errors --print-errors --cflags --libs "$2" 2>&1` + else +- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --dont-define-prefix --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD +--- daala-cc4432e/m4/pkg.m4.orig 2015-04-06 12:17:39.485343300 +0000 ++++ daala-cc4432e/m4/pkg.m4 2015-04-06 12:19:32.115645500 +0000 +@@ -111,8 +111,8 @@ + pkg_failed=no + AC_MSG_CHECKING([for $1]) + +-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +-_PKG_CONFIG([$1][_LIBS], [libs], [$2]) ++_PKG_CONFIG([$1][_CFLAGS], [cflags --dont-define-prefix], [$2]) ++_PKG_CONFIG([$1][_LIBS], [libs --dont-define-prefix], [$2]) + + m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS + and $1[]_LIBS to avoid the need to call pkg-config. diff --git a/mingw-w64-daala-git/PKGBUILD b/mingw-w64-daala-git/PKGBUILD index 2de9319b4a..6345a4bf1e 100644 --- a/mingw-w64-daala-git/PKGBUILD +++ b/mingw-w64-daala-git/PKGBUILD @@ -2,28 +2,37 @@ _realname=daala pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgdesc="Daala is next-next-gen video compression technology from Xiph.org, Mozilla and others." -pkgver=r890.26a08c0 +pkgdesc="Daala is next-next-gen video compression technology from Xiph.org, Mozilla and others (mingw-w64)" +pkgver=r1373.efb96ed pkgrel=1 arch=('any') url="https://www.xiph.org/daala/" license=('BSD') -#groups=("${MINGW_PACKAGE_PREFIX}") -makedepends=('git' "${MINGW_PACKAGE_PREFIX}-check") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-check" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "git") depends=("${MINGW_PACKAGE_PREFIX}-libogg" - "${MINGW_PACKAGE_PREFIX}-libpng") + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-SDL2") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('strip' 'staticlibs') source=("${_realname}"::"git+https://git.xiph.org/daala.git" 0001-make-daalabase-public.mingw.patch - 0002-make-daalabase-public.mingw.patch) + 0002-make-daalabase-public.mingw.patch + 0003-missing-include.patch + 0004-xp-sp2.all.patch + 0005-no-pkg-config-prefix.mingw.patch) md5sums=('SKIP' 'b6aae57a2a95c785aa7b94f67c428b51' - '901557d36c62ccebf40d508ad834f157') + '901557d36c62ccebf40d508ad834f157' + '24df25713bb777ea48ba89ec0e4ccee5' + 'cc34a41847702531b0f3291bb51893d0' + '77ffed41ff865827171a6e70c4cd04d0') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } @@ -31,12 +40,17 @@ prepare() { cd ${srcdir}/${_realname} patch -p1 -i ${srcdir}/0001-make-daalabase-public.mingw.patch patch -p1 -i ${srcdir}/0002-make-daalabase-public.mingw.patch - + patch -p1 -i ${srcdir}/0003-missing-include.patch + patch -p1 -i ${srcdir}/0004-xp-sp2.all.patch + patch -p1 -i ${srcdir}/0005-no-pkg-config-prefix.mingw.patch + autoreconf -fi } build() { - mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -44,7 +58,9 @@ build() { --prefix=${MINGW_PREFIX} \ --enable-shared \ --enable-static \ - --enable-tools + --enable-tools \ + --disable-unit-tests + make } diff --git a/mingw-w64-db/PKGBUILD b/mingw-w64-db/PKGBUILD index fe4f5fe3b5..7c034334a3 100644 --- a/mingw-w64-db/PKGBUILD +++ b/mingw-w64-db/PKGBUILD @@ -2,20 +2,18 @@ # Contributor: Jürgen Pfeifer _realname=db - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.0.30 -pkgrel=1 +pkgver=6.0.19 +pkgrel=3 pkgdesc="The Berkeley DB embedded database system (mingw-w64)" arch=('any') -url="http://www.oracle.com/technology/software/products/berkeley-db/index.html" +url="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") source=(http://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz - mingw.patch) -sha1sums=('038dca3ef2984c6cb95ff088d1ab7c7b9da40883' + mingw.patch) +sha1sums=('058a24ecd18803978afb8a45702fe299abd9e818' '9cb5319029744f6e5d571d0ade25b6ea62e2958f') prepare() @@ -25,6 +23,9 @@ prepare() } build() { + CFLAGS+=" -DUNICODE -D_UNICODE" + CXXFLAGS+=" -DUNICODE -D_UNICODE" + [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} ../${_realname}-${pkgver}/dist/configure \ --build=${MINGW_CHOST} \ @@ -44,6 +45,7 @@ build() { --disable-tcl \ --disable-replication \ --docdir='${prefix}/share/doc/db' + make LIBSO_LIBS=-lpthread } @@ -58,7 +60,5 @@ check() { package() { cd ${srcdir}/build-${CARCH} make DESTDIR="${pkgdir}" install - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -pf ${srcdir}/${_realname}-${pkgver}/LICENSE \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-dbus-glib/PKGBUILD b/mingw-w64-dbus-glib/PKGBUILD index 72416c709a..8d2a80ad85 100644 --- a/mingw-w64-dbus-glib/PKGBUILD +++ b/mingw-w64-dbus-glib/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=dbus-glib - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.102 +pkgver=0.104 pkgrel=1 arch=('any') pkgdesc="D-Bus Message Bus System (mingw-w64)" @@ -13,7 +12,7 @@ options=('strip' 'staticlibs') license=("BSD") url="http://www.freedesktop.org/wiki/Software/dbus" source=("http://dbus.freedesktop.org/releases/${_realname}/${_realname}-${pkgver}.tar.gz"{,.asc}) -md5sums=('f76b8558fd575d0106c3a556eaa49184' +md5sums=('5497d2070709cf796f1878c75a72a039' 'SKIP') prepare() { @@ -31,14 +30,12 @@ build() { --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --enable-shared \ - --disable-static + --enable-static + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm - #rm -rf "${pkgdir}${MINGW_PREFIX}"/share/man - #rm -rf "${pkgdir}${MINGW_PREFIX}"/{etc,var,libexec,share} + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-dbus/PKGBUILD b/mingw-w64-dbus/PKGBUILD index bc430ac14c..d5d3f87b60 100644 --- a/mingw-w64-dbus/PKGBUILD +++ b/mingw-w64-dbus/PKGBUILD @@ -2,28 +2,32 @@ _realname=dbus pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.9.2 +pkgver=1.9.16 pkgrel=1 arch=('any') pkgdesc="Freedesktop.org message bus system (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-expat") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python2" "xmlto") +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-expat") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + "xmlto") options=('strip' 'staticlibs') license=("BSD") url="http://www.freedesktop.org/wiki/Software/dbus" source=("http://dbus.freedesktop.org/releases/dbus/${_realname}-${pkgver}.tar.gz"{,.asc}) -md5sums=('a568c8853eeced5a4346fa2dd8e9eda6' +md5sums=('1bd7617fb3e665817e2bc70de8a7c0bf' 'SKIP') prepare() { - cd "${srcdir}"/dbus-${pkgver} + cd "${srcdir}"/${_realname}-${pkgver} } build() { mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} - ../dbus-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ @@ -34,11 +38,11 @@ build() { --disable-Werror \ --enable-shared \ --enable-static + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-dcadec-git/0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch b/mingw-w64-dcadec-git/0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch new file mode 100644 index 0000000000..ddc63d6be7 --- /dev/null +++ b/mingw-w64-dcadec-git/0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch @@ -0,0 +1,24 @@ +From f580b6d6388bf1731384dd7513681f976fce9edd Mon Sep 17 00:00:00 2001 +From: Yuta NAKAI +Date: Sat, 11 Apr 2015 11:46:04 +0900 +Subject: [PATCH 1/5] Makefile: Don't set -static-libgcc on mingw systems. + +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index a1ffc53..350c338 100644 +--- a/Makefile ++++ b/Makefile +@@ -104,7 +104,6 @@ ifdef CONFIG_SHARED + IMP_LIB = libdcadec/libdcadec$(DLLSUF)$(LIBSUF) + IMP_DEF = libdcadec/libdcadec.def + EXTRA_LIB = $(IMP_LIB) $(IMP_DEF) +- LDFLAGS_DLL += -static-libgcc + LDFLAGS_DLL += -Wl,--nxcompat,--dynamicbase + LDFLAGS_DLL += -Wl,--output-def,$(IMP_DEF) + LDFLAGS_DLL += -Wl,--out-implib,$(IMP_LIB) +-- +2.4.3 + diff --git a/mingw-w64-dcadec-git/0002-Makefile-Install-windows-DLL-to-BINDIR.patch b/mingw-w64-dcadec-git/0002-Makefile-Install-windows-DLL-to-BINDIR.patch new file mode 100644 index 0000000000..5e403cb9bd --- /dev/null +++ b/mingw-w64-dcadec-git/0002-Makefile-Install-windows-DLL-to-BINDIR.patch @@ -0,0 +1,28 @@ +From 6d5d46985ed50035f1dc77d7669842215a6cb9b3 Mon Sep 17 00:00:00 2001 +From: Yuta NAKAI +Date: Sat, 11 Apr 2015 12:15:19 +0900 +Subject: [PATCH 2/5] Makefile: Install windows DLL to BINDIR. + +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Makefile b/Makefile +index 350c338..65d68cc 100644 +--- a/Makefile ++++ b/Makefile +@@ -157,7 +157,11 @@ dcadec.pc: dcadec.pc.in + + install-lib: $(OUT_LIB) dcadec.pc + install -d -m 755 $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig $(DESTDIR)$(INCLUDEDIR)/libdcadec ++ifneq ($(and $(CONFIG_WINDOWS),$(CONFIG_SHARED)),) ++ install -m 755 $(OUT_LIB) $(DESTDIR)$(BINDIR) ++else + install -m 644 $(OUT_LIB) $(DESTDIR)$(LIBDIR) ++endif + install -m 644 $(addprefix $(SRC_DIR)/, $(INC_LIB)) $(DESTDIR)$(INCLUDEDIR)/libdcadec + install -m 644 dcadec.pc $(DESTDIR)$(LIBDIR)/pkgconfig + +-- +2.4.3 + diff --git a/mingw-w64-dcadec-git/0003-Makefile-On-windows-install-import-library.patch b/mingw-w64-dcadec-git/0003-Makefile-On-windows-install-import-library.patch new file mode 100644 index 0000000000..79372cb03b --- /dev/null +++ b/mingw-w64-dcadec-git/0003-Makefile-On-windows-install-import-library.patch @@ -0,0 +1,24 @@ +From 0a17a7a87a1a3bb3745f8b1643d170dc7a66ea6c Mon Sep 17 00:00:00 2001 +From: Yuta NAKAI +Date: Sat, 11 Apr 2015 12:19:19 +0900 +Subject: [PATCH 3/5] Makefile: On windows, install import library. + +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 65d68cc..0f4c6c5 100644 +--- a/Makefile ++++ b/Makefile +@@ -159,6 +159,7 @@ install-lib: $(OUT_LIB) dcadec.pc + install -d -m 755 $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig $(DESTDIR)$(INCLUDEDIR)/libdcadec + ifneq ($(and $(CONFIG_WINDOWS),$(CONFIG_SHARED)),) + install -m 755 $(OUT_LIB) $(DESTDIR)$(BINDIR) ++ install -m 644 $(IMP_LIB) $(DESTDIR)$(LIBDIR) + else + install -m 644 $(OUT_LIB) $(DESTDIR)$(LIBDIR) + endif +-- +2.4.3 + diff --git a/mingw-w64-dcadec-git/0004-Makefile-Add-API-version-suffix-to-DLL-Name.patch b/mingw-w64-dcadec-git/0004-Makefile-Add-API-version-suffix-to-DLL-Name.patch new file mode 100644 index 0000000000..261fb5d742 --- /dev/null +++ b/mingw-w64-dcadec-git/0004-Makefile-Add-API-version-suffix-to-DLL-Name.patch @@ -0,0 +1,33 @@ +From 52ee72e4e5046d3e04b8c6c3c866d4cd6c607850 Mon Sep 17 00:00:00 2001 +From: Yuta NAKAI +Date: Wed, 29 Apr 2015 00:24:00 +0900 +Subject: [PATCH 4/5] Makefile: Add API version suffix to DLL Name. + +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 0f4c6c5..6a32ec3 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,6 +8,7 @@ LIBDIR ?= $(PREFIX)/lib + INCLUDEDIR ?= $(PREFIX)/include + + SRC_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) ++API_VER=$(shell grep -e '\#define DCADEC_VERSION_MAJOR' $(SRC_DIR)/libdcadec/dca_context.h | awk '{ printf $$3 }') + vpath %.c $(SRC_DIR) + vpath %.h $(SRC_DIR) + vpath %.pc.in $(SRC_DIR) +@@ -33,7 +34,7 @@ else + endif + + ifdef CONFIG_SHARED +- OUT_LIB ?= libdcadec/libdcadec$(DLLSUF) ++ OUT_LIB ?= libdcadec/libdcadec-$(API_VER)$(DLLSUF) + else + OUT_LIB ?= libdcadec/libdcadec$(LIBSUF) + endif +-- +2.4.3 + diff --git a/mingw-w64-dcadec-git/0005-Makefile-Add-install-cut.patch b/mingw-w64-dcadec-git/0005-Makefile-Add-install-cut.patch new file mode 100644 index 0000000000..63b1f7c170 --- /dev/null +++ b/mingw-w64-dcadec-git/0005-Makefile-Add-install-cut.patch @@ -0,0 +1,25 @@ +From 65259407adf1eb5583284a93e2e4729bb8ae3678 Mon Sep 17 00:00:00 2001 +From: Yuta NAKAI +Date: Thu, 11 Jun 2015 20:49:45 +0900 +Subject: [PATCH 5/5] Makefile: Add install-cut. + +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Makefile b/Makefile +index 6a32ec3..e81f2fe 100644 +--- a/Makefile ++++ b/Makefile +@@ -171,4 +171,8 @@ install-dec: $(OUT_DEC) + install -d -m 755 $(DESTDIR)$(BINDIR) + install -m 755 $(OUT_DEC) $(DESTDIR)$(BINDIR) + ++install-cut: $(OUT_CUT) ++ install -d -m 755 $(DESTDIR)$(BINDIR) ++ install -m 755 $(OUT_CUT) $(DESTDIR)$(BINDIR) ++ + install: install-lib install-dec +-- +2.4.3 + diff --git a/mingw-w64-dcadec-git/PKGBUILD b/mingw-w64-dcadec-git/PKGBUILD new file mode 100644 index 0000000000..8fe5815d63 --- /dev/null +++ b/mingw-w64-dcadec-git/PKGBUILD @@ -0,0 +1,98 @@ +# Maintainer: Yuta Nakai + +_realname=dcadec +pkgbase=mingw-w64-${_realname}-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgdesc='dcadec is a free DTS Coherent Acoustics decoder with support for HD extensions (mingw-w64)' +pkgver=0.0.0.207.2a9186e +pkgrel=4 +arch=('any') +url='https://github.com/foo86/dcadec.git' +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" 'git') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +source=("${_realname}"::'git+https://github.com/foo86/dcadec.git' + '0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch' + '0002-Makefile-Install-windows-DLL-to-BINDIR.patch' + '0003-Makefile-On-windows-install-import-library.patch' + '0004-Makefile-Add-API-version-suffix-to-DLL-Name.patch' + '0005-Makefile-Add-install-cut.patch') +sha512sums=('SKIP' + '80469f7ad04d7c247dda9c56d7aa9771c3b6ddd8aa238604be7b325ae7ac87cbdfa8668d2212adfa69ddaad3bdd7cad631f0b226255fb5cb6b432f66f6dc8de3' + 'ec11e3a5c300f709f8660c411aaafc98982100a346ad28242640103c2147aaa6dbefdb2a24e5d9198e29111f95fa18faccfd2394a9677c305028e049b4b9879f' + 'f2f7b99dcaf6f4b9d1ffd2ed0dd6f61c6eaba6ee7425752f428e864cec135fc6a4c6c6cf001bfc598ba4a8a487b85a59cfba93a5f59d71bc4a286400efbea985' + '6bebd8dba0d7b6dd39c69cb891e4103a47a006b7ad4ee110e9c81e3af70a3aa42d803744790d7150e701d1ea15851929ec23bc5c958ab69d3543774a8ad4fe83' + '9ae1446ac65d635858afa05f90734990d08096758bf03a24b9a74d98255643d90badd905e2718eeb97c4a79375c6714585d43c69f47e573d0d7497cc55dcd018') + +pkgver() { + cd "${srcdir}"/${_realname} + local _major=$(grep -e '\#define DCADEC_VERSION_MAJOR' libdcadec/dca_context.h | awk '{ printf $3 }') + local _minor=$(grep -e '\#define DCADEC_VERSION_MINOR' libdcadec/dca_context.h | awk '{ printf $3 }') + local _patch=$(grep -e '\#define DCADEC_VERSION_PATCH' libdcadec/dca_context.h | awk '{ printf $3 }') + printf "%s.%s.%s.%s.%s" "${_major}" "${_minor}" "${_patch}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_realname} + + patch -p1 -i "${srcdir}"/0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch + patch -p1 -i "${srcdir}"/0002-Makefile-Install-windows-DLL-to-BINDIR.patch + patch -p1 -i "${srcdir}"/0003-Makefile-On-windows-install-import-library.patch + patch -p1 -i "${srcdir}"/0004-Makefile-Add-API-version-suffix-to-DLL-Name.patch + patch -p1 -i "${srcdir}"/0005-Makefile-Add-install-cut.patch +} + +build() { + # Build shared lib and exe. + mkdir -p "${srcdir}"/build-shared-$CARCH + cd "${srcdir}"/build-shared-$CARCH + + make clean -f ../${_realname}/Makefile + + PREFIX=$MINGW_PREFIX \ + CONFIG_NDEBUG=1 \ + CONFIG_WINDOWS=1 \ + CONFIG_SHARED=1 \ + CC=gcc \ + make all -f ../${_realname}/Makefile + + # Build static lib. + mkdir -p "${srcdir}"/build-static-$CARCH + cd "${srcdir}"/build-static-$CARCH + + make clean -f ../${_realname}/Makefile + + PREFIX=$MINGW_PREFIX \ + CONFIG_NDEBUG=1 \ + CONFIG_WINDOWS=1 \ + CC=gcc \ + make lib -f ../${_realname}/Makefile +} + +package() { + # Install shared lib and exe. + cd "${srcdir}"/build-shared-$CARCH + + PREFIX=$MINGW_PREFIX \ + CONFIG_NDEBUG=1 \ + CONFIG_WINDOWS=1 \ + CONFIG_SHARED=1 \ + DESTDIR="${pkgdir}" \ + make install install-cut -f ../${_realname}/Makefile + + # Install static lib. + cd "${srcdir}"/build-static-$CARCH + + PREFIX=$MINGW_PREFIX \ + CONFIG_NDEBUG=1 \ + CONFIG_WINDOWS=1 \ + DESTDIR="${pkgdir}" \ + make install-lib -f ../${_realname}/Makefile + + # Install LICENSE file. + cd "${srcdir}"/${_realname} + install -Dm644 COPYING.LGPLv2.1 "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + + # Rename dcadec executable to not conflict with libdca + mv ${pkgdir}${MINGW_PREFIX}/bin/dcadec{,0}.exe +} diff --git a/mingw-w64-devcon-git/.gitignore b/mingw-w64-devcon-git/.gitignore new file mode 100644 index 0000000000..cdebe405b4 --- /dev/null +++ b/mingw-w64-devcon-git/.gitignore @@ -0,0 +1 @@ +/wds diff --git a/mingw-w64-devcon-git/02-driverspecs.patch b/mingw-w64-devcon-git/02-driverspecs.patch new file mode 100644 index 0000000000..324076279e --- /dev/null +++ b/mingw-w64-devcon-git/02-driverspecs.patch @@ -0,0 +1,10 @@ +--- orig/devcon.h 2015-08-28 13:09:16.053216200 -0400 ++++ new/devcon.h 2015-08-28 13:09:24.096011700 -0400 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "msg.h" + #include "rc_ids.h" diff --git a/mingw-w64-devcon-git/03-stdcall-callback.patch b/mingw-w64-devcon-git/03-stdcall-callback.patch new file mode 100644 index 0000000000..f3f56e6ffa --- /dev/null +++ b/mingw-w64-devcon-git/03-stdcall-callback.patch @@ -0,0 +1,11 @@ +diff -u -r C++/dump.cpp C++fix/dump.cpp +--- C++/dump.cpp 2015-04-24 21:30:25.722776800 -0700 ++++ C++fix/dump.cpp 2015-04-24 21:30:23.851251500 -0700 +@@ -408,6 +408,7 @@ + } + + ++__attribute__((__stdcall__)) + UINT DumpDeviceDriversCallback(_In_ PVOID Context, _In_ UINT Notification, _In_ UINT_PTR Param1, _In_ UINT_PTR Param2) + /*++ + diff --git a/mingw-w64-devcon-git/PKGBUILD b/mingw-w64-devcon-git/PKGBUILD new file mode 100644 index 0000000000..bf3f97fb8c --- /dev/null +++ b/mingw-w64-devcon-git/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: David Grayson +# +# You might need to run your shell as administrator for devcon to work. + +_realname=devcon +pkgbase=mingw-w64-${_realname}-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides="${MINGW_PACKAGE_PREFIX}-${_realname}" +conflicts="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=r35.818f6ee +pkgrel=1 +pkgdesc='Search for and manipulate devices (mingw-w64)' +arch=('any') +url='https://github.com/Microsoft/Windows-driver-samples/tree/master/setup/devcon' +license=('custom') +makedepends=( + "${MINGW_PACKAGE_PREFIX}-gcc" + 'patch' +) +depends=() +options=('strip') +source=( + "wds::git+https://github.com/Microsoft/Windows-driver-samples" + '02-driverspecs.patch' + '03-stdcall-callback.patch' +) + +sha256sums=('SKIP' + 'f0c0c941704e17d1c15c38458993bf8a4f92e04935a9fab3e6caba60694b2234' + '418eaa11f45d4756afe15da42bec4570f651cb62244f274d1fe00a6fc74614bd') + +pkgver() { + cd ${srcdir}/wds + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/wds/setup/devcon" + + # dos2unix -q *.cpp *.h *.rc + + # Include driverspecs.h to get __drv_allocatesMem and similar. + patch -p1 -i "${srcdir}/02-driverspecs.patch" + + # SetupScanFileQueue expects its callback to be stdcall. + patch -p1 -i "${srcdir}/03-stdcall-callback.patch" + + windmc msg.mc +} + +build() { + cd "${srcdir}" + mkdir -p "build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + + windres ../wds/setup/devcon/devcon.rc rc.so + + g++ -municode -Wno-write-strings ${CFLAGS} ${LDFLAGS} \ + -DWIN32_LEAN_AND_MEAN=1 -DUNICODE -D_UNICODE \ + ../wds/setup/devcon/*.cpp rc.so \ + -lsetupapi -lole32 \ + -o devcon.exe +} + +package() { + cd "${srcdir}/wds" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + cd "${srcdir}/build-${MINGW_CHOST}" + mkdir "${pkgdir}${MINGW_PREFIX}/bin" + install -Dm755 devcon.exe "${pkgdir}${MINGW_PREFIX}/bin" +} diff --git a/mingw-w64-devhelp/001-win.patch b/mingw-w64-devhelp/001-win.patch new file mode 100644 index 0000000000..e27e568662 --- /dev/null +++ b/mingw-w64-devhelp/001-win.patch @@ -0,0 +1,90 @@ +--- ./m4/intltool.m4.orig 2013-05-15 13:07:27.000000000 +0200 ++++ ./m4/intltool.m4 2015-03-14 17:51:28.198407000 +0100 +@@ -155,31 +155,6 @@ + # Substitute ALL_LINGUAS so we can use it in po/Makefile + AC_SUBST(ALL_LINGUAS) + +-# Set DATADIRNAME correctly if it is not set yet +-# (copied from glib-gettext.m4) +-if test -z "$DATADIRNAME"; then +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[]], +- [[extern int _nl_msg_cat_cntr; +- return _nl_msg_cat_cntr]])], +- [DATADIRNAME=share], +- [case $host in +- *-*-solaris*) +- dnl On Solaris, if bind_textdomain_codeset is in libc, +- dnl GNU format message catalog is always supported, +- dnl since both are added to the libc all together. +- dnl Hence, we'd like to go with DATADIRNAME=share +- dnl in this case. +- AC_CHECK_FUNC(bind_textdomain_codeset, +- [DATADIRNAME=share], [DATADIRNAME=lib]) +- ;; +- *) +- [DATADIRNAME=lib] +- ;; +- esac]) +-fi +-AC_SUBST(DATADIRNAME) +- + IT_PO_SUBDIR([po]) + + ]) +--- ./src/dh-book-manager.c.orig 2013-02-05 19:18:57.000000000 +0100 ++++ ./src/dh-book-manager.c 2015-03-14 17:51:23.006765300 +0100 +@@ -528,8 +528,7 @@ + + /* Build the path of the directory where the final + * devhelp book resides */ +- book_dir_path = g_build_filename (G_DIR_SEPARATOR_S, +- dir_path, ++ book_dir_path = g_build_filename (dir_path, + name, + NULL); + +--- ./src/dh-link.c.orig 2011-08-21 12:00:05.000000000 +0200 ++++ ./src/dh-link.c 2015-03-14 17:56:00.731796500 +0100 +@@ -234,7 +234,8 @@ + else + base = link->book->base; + +- uri = g_strconcat ("file://", base, "/", link->filename, NULL, NULL); ++ uri = g_strconcat ("file:///", base, "/", link->filename, NULL, NULL); ++ uri = g_strjoinv("/", g_strsplit(uri, "\\", -1)); + + return uri; + } +--- ./src/dh-main.c.orig 2013-02-01 15:35:06.000000000 +0100 ++++ ./src/dh-main.c 2015-03-14 17:51:23.019765900 +0100 +@@ -103,7 +103,13 @@ + gint status; + + setlocale (LC_ALL, ""); ++#ifdef G_OS_WIN32 ++ gchar *dir = g_win32_get_package_installation_directory_of_module (NULL); ++ bindtextdomain (GETTEXT_PACKAGE, g_build_filename (dir, "share", "locale", NULL)); ++ g_free (dir); ++#else + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); ++#endif + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + +--- ./src/dh-util.c.orig 2013-05-15 13:05:20.000000000 +0200 ++++ ./src/dh-util.c 2015-03-14 17:51:23.025767100 +0100 +@@ -131,7 +131,13 @@ + va_start (args, first_part); + + if (datadir == NULL) { ++#ifdef G_OS_WIN32 ++ gchar *dir = g_win32_get_package_installation_directory_of_module (NULL); ++ datadir = g_build_filename (dir, "share", NULL); ++ g_free (dir); ++#else + datadir = g_strdup (DATADIR); ++#endif + } + + /* 2 = 1 initial component + terminating NULL element. */ diff --git a/mingw-w64-devhelp/PKGBUILD b/mingw-w64-devhelp/PKGBUILD new file mode 100644 index 0000000000..daeb3a55a9 --- /dev/null +++ b/mingw-w64-devhelp/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Andrea Zagli + +_realname=devhelp +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.8.2 +pkgrel=1 +arch=('any') +pkgdesc="Remote desktop client for the GNOME Desktop (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-webkitgtk3" + "${MINGW_PACKAGE_PREFIX}-python2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-vala") +options=('strip' 'staticlibs') +license=("GPL 2") +url="http://www.gnome.org" +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz + 001-win.patch) +sha256sums=('a245b53824c6f2ff89245ff807bb2140bde74951ea6f1d759a0fd0c6959ca9f7' + '0ed77884d958aa94af910591a61f33895a5f6d9b4f7e4852de6ab543d4487b50') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + ACLOCAL_FLAGS="-I libgd $ACLOCAL_FLAGS" \ + AUTOPOINT='intltoolize --automake --copy' \ + autoreconf -fi +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --with-webkit2=no + + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-devhelp/devhelp-i686.install b/mingw-w64-devhelp/devhelp-i686.install new file mode 100644 index 0000000000..375e708c36 --- /dev/null +++ b/mingw-w64-devhelp/devhelp-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-devhelp/devhelp-x86_64.install b/mingw-w64-devhelp/devhelp-x86_64.install new file mode 100644 index 0000000000..d43ee14ce7 --- /dev/null +++ b/mingw-w64-devhelp/devhelp-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-diffutils/PKGBUILD b/mingw-w64-diffutils/PKGBUILD new file mode 100644 index 0000000000..252d771b08 --- /dev/null +++ b/mingw-w64-diffutils/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Alexey Pavlov +# Contributor: Paul Moore + +_realname=diffutils +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=3.3 +pkgrel=2 +pkgdesc="GNU Diffutils is a package of several programs related to finding differences between files (mingw-w64)" +arch=('any') +url='http://www.gnu.org/software/diffutils/' +license=('GPL3') +depends=("${MINGW_PACKAGE_PREFIX}-libwinpthread") +options=('strip' '!libtool' 'staticlibs') +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.xz" + "win_use_raise_rather_than_kill.patch" + "win64_dont_check_ptrdiff_size.patch" + "msvc_invalid_parameter_handler.patch") +md5sums=('99180208ec2a82ce71f55b0d7389f1b3' + '6e979e13696642bd184fb6b946ba996a' + '957454716c06313df2251cd2baf5a89c' + 'de6ece1a99a2471131899e49355f87e4') + + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p0 -i ${srcdir}/win_use_raise_rather_than_kill.patch + patch -p0 -i ${srcdir}/win64_dont_check_ptrdiff_size.patch + patch -p0 -i ${srcdir}/msvc_invalid_parameter_handler.patch +} + +build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make install DESTDIR="${pkgdir}" + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-diffutils/msvc_invalid_parameter_handler.patch b/mingw-w64-diffutils/msvc_invalid_parameter_handler.patch new file mode 100644 index 0000000000..957349ef21 --- /dev/null +++ b/mingw-w64-diffutils/msvc_invalid_parameter_handler.patch @@ -0,0 +1,13 @@ +--- lib/config.hin.orig 2013-03-24 17:55:37.000000000 +0000 ++++ lib/config.hin 2015-04-13 13:38:17.351409000 +0100 +@@ -599,7 +599,9 @@ + + /* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +-#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER ++/* Commented out due to a gnulib bug - see ++ http://lists.gnu.org/archive/html/bug-sed/2015-01/msg00003.html */ ++/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ + + /* Define to 1 if you have the `nanotime' function. */ + #undef HAVE_NANOTIME diff --git a/mingw-w64-diffutils/win64_dont_check_ptrdiff_size.patch b/mingw-w64-diffutils/win64_dont_check_ptrdiff_size.patch new file mode 100644 index 0000000000..128e84dbd1 --- /dev/null +++ b/mingw-w64-diffutils/win64_dont_check_ptrdiff_size.patch @@ -0,0 +1,13 @@ +--- src/system.h.orig 2013-02-02 04:39:05.000000000 +0000 ++++ src/system.h 2015-04-13 13:22:05.557095800 +0100 +@@ -132,7 +132,10 @@ + #define LIN_MAX PTRDIFF_MAX + verify (TYPE_SIGNED (lin)); + verify (sizeof (ptrdiff_t) <= sizeof (lin)); ++#ifndef _WIN64 ++/* On Windows 64-bit, this fails. It's probably not an issue in practice. */ + verify (sizeof (lin) <= sizeof (long int)); ++#endif + + /* This section contains POSIX-compliant defaults for macros + that are meant to be overridden by hand in config.h as needed. */ diff --git a/mingw-w64-diffutils/win_use_raise_rather_than_kill.patch b/mingw-w64-diffutils/win_use_raise_rather_than_kill.patch new file mode 100644 index 0000000000..998f5e5783 --- /dev/null +++ b/mingw-w64-diffutils/win_use_raise_rather_than_kill.patch @@ -0,0 +1,14 @@ +--- src/sdiff.c.orig 2013-02-02 04:39:05.000000000 +0000 ++++ src/sdiff.c 2015-04-13 13:17:38.480390800 +0100 +@@ -805,7 +805,11 @@ + + /* Yield an exit status indicating that a signal was received. */ + untrapsig (s); ++#if defined _MSC_VER || defined __MINGW32__ ++ raise (s); ++#else + kill (getpid (), s); ++#endif + + /* That didn't work, so exit with error status. */ + exit (EXIT_TROUBLE); diff --git a/mingw-w64-discount/PKGBUILD b/mingw-w64-discount/PKGBUILD index 2159f9c64a..7521ecdda3 100644 --- a/mingw-w64-discount/PKGBUILD +++ b/mingw-w64-discount/PKGBUILD @@ -1,31 +1,29 @@ # Maintainer: Alexey Pavlov _realname=discount - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.1.6 -pkgrel=1 +pkgver=2.1.8 +pkgrel=2 pkgdesc="A Markdown implementation written in C (mingw-w64)" arch=('any') url="http://www.pell.portland.or.us/~orc/Code/discount/" license=('custom:BSD') -provides=('markdown') -conflicts=('markdown') +provides=("${MINGW_PACKAGE_PREFIX}-markdown") +conflicts=("${MINGW_PACKAGE_PREFIX}-markdown") options=('strip' 'staticlibs') -source=(http://www.pell.portland.or.us/~orc/Code/discount/${_realname}-$pkgver.tar.bz2 - discount-mingw-building.patch) -md5sums=('6f44e627777b6392f8f4a3280642482a' - '5235a54f0a3e8e61a11c42f3541e9582') +source=(http://www.pell.portland.or.us/~orc/Code/discount/${_realname}-${pkgver}.tar.gz + discount-mingw-building.patch) +md5sums=('fcb1e7a3d19c2e666655fa8a28066e76' + 'f24ced063ce7229bcbdefc18db52b976') prepare() { cd "${srcdir}"/${_realname}-${pkgver} - patch -p0 -i ${srcdir}/discount-mingw-building.patch + patch -p1 -i ${srcdir}/discount-mingw-building.patch } build() { - cd "${srcdir}"/${_realname}-${pkgver} + cd "${srcdir}"/${_realname}-${pkgver} sed -e "s/m 444/m 644/g" -i configure.inc - export CFLAGS="-O2 -pipe -I${MINGW_PREFIX}/include" MSYSTEM=MINGW \ CC=${MINGW_PREFIX}/bin/gcc.exe \ AC_CPP_PROG=${MINGW_PREFIX}/bin/cpp.exe \ @@ -33,14 +31,15 @@ build() { ./configure.sh \ --prefix=${MINGW_PREFIX} \ --enable-all-features \ - --shared - make + --shared + + make } package() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,include,lib} - make DESTDIR="$pkgdir" install.everything + make DESTDIR="${pkgdir}" install.everything mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/ install -Dm644 COPYRIGHT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-discount/discount-mingw-building.patch b/mingw-w64-discount/discount-mingw-building.patch index b4890c0800..f4c5ada9d8 100644 --- a/mingw-w64-discount/discount-mingw-building.patch +++ b/mingw-w64-discount/discount-mingw-building.patch @@ -1,5 +1,5 @@ ---- configure.inc.orig 2013-12-06 10:26:52.855400000 +0400 -+++ configure.inc 2013-12-06 13:49:37.149800000 +0400 +--- discount-2.1.8/configure.inc.orig 2015-01-25 05:07:28.000000000 +0300 ++++ discount-2.1.8/configure.inc 2015-03-02 16:26:36.475000000 +0300 @@ -725,7 +725,11 @@ if [ "$DEST" ]; then rm -f /tmp/b$$ @@ -13,7 +13,15 @@ TLOG " ($DEST)" echo "$DEST exists, and ln -s works" PROG_LN_S="$DEST -s" -@@ -1207,6 +1211,9 @@ +@@ -876,6 +880,7 @@ + # windows machine; BYTE, WORD, DWORD already + # defined + echo "#include " >> $__cwd/config.h ++ echo "s;@DWORD@;DWORD;g" >> $__cwd/config.sub + TLOG " (defined in WinDef.h)" + return 0 + fi +@@ -1218,6 +1223,9 @@ AC_PROG_CC LOGN "checking for C compiler option to produce PIC " @@ -23,7 +31,7 @@ echo "int some_variable = 0;" > ngc$$.c if $AC_CC -c -fPIC -o ngc$$ ngc$$.c $LIBS; then -@@ -1219,6 +1226,7 @@ +@@ -1230,6 +1238,7 @@ fi __remove ngc$$ ngc$$.c return $__rc @@ -31,7 +39,7 @@ } -@@ -1311,6 +1319,41 @@ +@@ -1322,6 +1331,41 @@ chmod +x librarian.sh } @@ -73,7 +81,7 @@ # # AC_CC_SHLIBS checks if the C compiler can produce shared libraries -@@ -1335,6 +1378,10 @@ +@@ -1346,6 +1390,10 @@ LOG "(no)" __rc=1 fi @@ -84,3 +92,24 @@ elif $AC_CC $AC_PICFLAG -shared -o ngc$$.so ngc$$.c; then __AC_ELF_LIBRARIAN LOG "(yes; -shared)" +@@ -1402,7 +1450,7 @@ + + AC_SUB 'INSTALL' "$PROG_INSTALL" + AC_SUB 'INSTALL_PROGRAM' "$PROG_INSTALL -s -m 755" +- AC_SUB 'INSTALL_DATA' "$PROG_INSTALL -m 444" ++ AC_SUB 'INSTALL_DATA' "$PROG_INSTALL -m 644" + + # finally build a little directory installer + # if mkdir -p works, use that, otherwise use install -d, +--- discount-2.1.8/mkdio.h.in.orig 2015-03-02 16:30:39.824800000 +0300 ++++ discount-2.1.8/mkdio.h.in 2015-03-02 16:33:45.267200000 +0300 +@@ -2,6 +2,9 @@ + #define _MKDIO_D + + #include ++#ifdef _WIN32 ++#include ++#endif + + typedef void MMIOT; + diff --git a/mingw-w64-djvulibre/PKGBUILD b/mingw-w64-djvulibre/PKGBUILD index 75a0dd30e2..4879eb6f66 100644 --- a/mingw-w64-djvulibre/PKGBUILD +++ b/mingw-w64-djvulibre/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=djvulibre - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.5.25.3 +pkgver=3.5.27 pkgrel=1 pkgdesc="Suite to create, manipulate and view DjVu (mingw-w64)" arch=('any') @@ -11,42 +10,37 @@ url="http://djvu.sourceforge.net/" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-zlib" - ) + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') source=("http://downloads.sourceforge.net/djvu/${_realname}-${pkgver}.tar.gz" - djvulibre-3.5.22-exeext.patch - djvulibre-3.5.22-msvcp60.patch - djvulibre-3.5.23-size_t.patch - djvulibre-3.5.25-precision.patch) -md5sums=('5f45d6cd5700b4dd31b1eb963482089b' - '1f3f9949aa9ef1a2228512f8e928160b' - 'c9e60c5553223380faa54b9db5328cb7' - '8cc6fcf9c449631526e5644e1600379c' - '64ceeff2ff000a8ce1c749f796ed956c') + djvulibre-3.5.27-win32.patch) +md5sums=('aa4ed331f669f5a72e3c0d7f9196c4e6' + 'b95e00f15a67df96df985b5a51b15745') prepare() { - cd "$srcdir/${_realname}-${pkgver%.*}" - patch -p1 -i ${srcdir}/djvulibre-3.5.22-exeext.patch - patch -p1 -i ${srcdir}/djvulibre-3.5.22-msvcp60.patch - patch -p1 -i ${srcdir}/djvulibre-3.5.23-size_t.patch - patch -p1 -i ${srcdir}/djvulibre-3.5.25-precision.patch + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/djvulibre-3.5.27-win32.patch + + autoreconf -fiv } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver%.*}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --disable-static --enable-shared - make + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make -j1 } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-djvulibre/djvulibre-3.5.22-exeext.patch b/mingw-w64-djvulibre/djvulibre-3.5.22-exeext.patch deleted file mode 100644 index 69d14eec22..0000000000 --- a/mingw-w64-djvulibre/djvulibre-3.5.22-exeext.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- djvulibre-3.5.22/tools/Makefile.in 2008-09-06 04:52:46.000000000 +0200 -+++ djvulibre-3.5.22/tools/Makefile.in 2009-06-23 10:53:57.000000000 +0200 -@@ -38,6 +38,7 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ - LIBTOOL = @LIBTOOL@ -+EXEEXT = @EXEEXT@ - - DEFS = @DEFS@ - OPTS = @OPTS@ -@@ -60,10 +61,10 @@ - - SUBDIRS = jb2cmp - --PROGRAMS = bzz c44 cjb2 cpaldjvu csepdjvu \ -- ddjvu djvm djvmcvt djvudump \ -- djvups djvuextract djvumake \ -- djvused djvutxt djvuserve -+PROGRAMS = bzz${EXEEXT} c44${EXEEXT} cjb2${EXEEXT} cpaldjvu${EXEEXT} csepdjvu${EXEEXT} \ -+ ddjvu${EXEEXT} djvm${EXEEXT} djvmcvt${EXEEXT} djvudump${EXEEXT} \ -+ djvups${EXEEXT} djvuextract${EXEEXT} djvumake${EXEEXT} \ -+ djvused${EXEEXT} djvutxt${EXEEXT} djvuserve${EXEEXT} - - SCRIPTS = djvudigital any2djvu - -@@ -113,67 +114,67 @@ - jb2cmp/libjb2cmp.a: FORCE - cd jb2cmp && ${MAKE} - --annotate: annotate.o -+annotate${EXEEXT}: annotate.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} annotate.o ${LIBDJVU} ${LIBS} - --bzz: bzz.o -+bzz${EXEEXT}: bzz.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} bzz.o ${LIBDJVU} ${LIBS} - --c44: c44.o -+c44${EXEEXT}: c44.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} c44.o ${LIBDJVU} ${LIBS} - --cjb2: cjb2.o ${JB2OBJS} -+cjb2${EXEEXT}: cjb2.o ${JB2OBJS} - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} cjb2.o ${JB2OBJS} ${LIBDJVU} ${MORELIBS} - --cpaldjvu: cpaldjvu.o ${JB2OBJS} -+cpaldjvu${EXEEXT}: cpaldjvu.o ${JB2OBJS} - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} cpaldjvu.o ${JB2OBJS} ${LIBDJVU} ${LIBS} - --csepdjvu: csepdjvu.o ${JB2OBJS} -+csepdjvu${EXEEXT}: csepdjvu.o ${JB2OBJS} - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} csepdjvu.o ${JB2OBJS} ${LIBDJVU} ${LIBS} - --ddjvu: ddjvu.o tiff2pdf.o -+ddjvu${EXEEXT}: ddjvu.o tiff2pdf.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} ddjvu.o tiff2pdf.o ${LIBDJVU} ${MORELIBS} - --djvm: djvm.o -+djvm${EXEEXT}: djvm.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvm.o ${LIBDJVU} ${LIBS} - --djvmcvt: djvmcvt.o -+djvmcvt${EXEEXT}: djvmcvt.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvmcvt.o ${LIBDJVU} ${LIBS} - --djvudump: djvudump.o -+djvudump${EXEEXT}: djvudump.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvudump.o ${LIBDJVU} ${LIBS} - --djvups: djvups.o -+djvups${EXEEXT}: djvups.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvups.o ${LIBDJVU} ${LIBS} - --djvuextract: djvuextract.o -+djvuextract${EXEEXT}: djvuextract.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvuextract.o ${LIBDJVU} ${LIBS} - --djvumake: djvumake.o -+djvumake${EXEEXT}: djvumake.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvumake.o ${LIBDJVU} ${LIBS} - --djvused: djvused.o -+djvused${EXEEXT}: djvused.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvused.o ${LIBDJVU} ${LIBS} - --djvutxt: djvutxt.o -+djvutxt${EXEEXT}: djvutxt.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvutxt.o ${LIBDJVU} ${LIBS} - --djvuserve: djvuserve.o -+djvuserve${EXEEXT}: djvuserve.o - ${LIBTOOL} --mode=link \ - ${CXX} -o $@ ${CXXFLAGS} djvuserve.o ${LIBDJVU} ${LIBS} - diff --git a/mingw-w64-djvulibre/djvulibre-3.5.22-msvcp60.patch b/mingw-w64-djvulibre/djvulibre-3.5.22-msvcp60.patch deleted file mode 100644 index b31d30003e..0000000000 --- a/mingw-w64-djvulibre/djvulibre-3.5.22-msvcp60.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -u -r djvulibre-3.5.22/configure djvulibre-3.5.22/configure ---- djvulibre-3.5.22/configure 2009-05-21 17:15:50.000000000 +0200 -+++ djvulibre-3.5.22/configure 2009-11-13 21:42:30.000000000 +0100 -@@ -2166,7 +2166,6 @@ - case "$host" in - *-mingw32) - DLLFLAGS="$DLLFLAGS -Wl,--export-all-symbols" -- LIBS=-lmsvcp60 - ;; - *-darwin* | *-macos10*) - if test -d /opt/local ; then -diff -u -r djvulibre-3.5.22/configure.ac djvulibre-3.5.22/configure.ac ---- djvulibre-3.5.22/configure.ac 2009-05-21 17:15:50.000000000 +0200 -+++ djvulibre-3.5.22/configure.ac 2009-11-13 21:42:16.000000000 +0100 -@@ -75,7 +75,6 @@ - case "$host" in - *-mingw32) - DLLFLAGS="$DLLFLAGS -Wl,--export-all-symbols" -- LIBS=-lmsvcp60 - ;; - *-darwin* | *-macos10*) - if test -d /opt/local ; then diff --git a/mingw-w64-djvulibre/djvulibre-3.5.23-size_t.patch b/mingw-w64-djvulibre/djvulibre-3.5.23-size_t.patch deleted file mode 100644 index 3710cdb229..0000000000 --- a/mingw-w64-djvulibre/djvulibre-3.5.23-size_t.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur djvulibre-3.5.23/libdjvu/GSmartPointer.h djvulibre-3.5.23.new/libdjvu/GSmartPointer.h ---- djvulibre-3.5.23/libdjvu/GSmartPointer.h 2008-03-05 02:44:20.000000000 +0100 -+++ djvulibre-3.5.23.new/libdjvu/GSmartPointer.h 2011-03-31 09:28:02.769165003 +0200 -@@ -65,6 +65,8 @@ - # pragma interface - #endif - -+#include // For size_t -+ - /** @name GSmartPointer.h - - Files #"GSmartPointer.h"# and #"GSmartPointer.cpp"# define a smart-pointer diff --git a/mingw-w64-djvulibre/djvulibre-3.5.25-precision.patch b/mingw-w64-djvulibre/djvulibre-3.5.25-precision.patch deleted file mode 100644 index 1fc43dde5b..0000000000 --- a/mingw-w64-djvulibre/djvulibre-3.5.25-precision.patch +++ /dev/null @@ -1,88 +0,0 @@ ---- djvulibre-3.5.25/libdjvu/DjVuPort.cpp 2012-03-17 23:49:02.000000000 +0100 -+++ djvulibre-3.5.25/libdjvu/DjVuPort.cpp 2012-04-05 11:11:53.983644255 +0200 -@@ -466,11 +466,11 @@ - // Sort in depth order - int max_dist=0; - for(pos=set;pos;++pos) -- if (max_dist < (int)(long)set[pos]) -- max_dist = (int)(long)set[pos]; -+ if (max_dist < (int)(size_t)set[pos]) -+ max_dist = (int)(size_t)set[pos]; - GArray > lists(0,max_dist); - for(pos=set;pos;++pos) -- lists[(int)(long)set[pos]].append(set.key(pos)); -+ lists[(int)(size_t)set[pos]].append(set.key(pos)); - for(int dist=0;dist<=max_dist;dist++) - for(pos=lists[dist];pos;++pos) - { ---- djvulibre-3.5.25/libdjvu/GBitmap.cpp 2012-03-17 23:49:02.000000000 +0100 -+++ djvulibre-3.5.25/libdjvu/GBitmap.cpp 2012-04-05 11:11:53.983644255 +0200 -@@ -469,7 +469,7 @@ - { - if (!monitorptr) - { -- unsigned long x = (unsigned long)this; -+ size_t x = (size_t)this; - monitorptr = &monitors[(x^(x>>5)) % NMONITORS]; - } - } ---- djvulibre-3.5.25/libdjvu/GContainer.h 2012-03-17 23:49:02.000000000 +0100 -+++ djvulibre-3.5.25/libdjvu/GContainer.h 2012-04-05 11:11:53.984644229 +0200 -@@ -178,7 +178,7 @@ - static inline unsigned int - hash(const void * const & x) - { -- return (unsigned long) x; -+ return (unsigned long)((size_t) x); - } - - /** Hashing function (float). */ ---- djvulibre-3.5.25/libdjvu/IW44EncodeCodec.cpp 2012-03-17 23:49:02.000000000 +0100 -+++ djvulibre-3.5.25/libdjvu/IW44EncodeCodec.cpp 2012-04-05 11:10:49.230256891 +0200 -@@ -310,7 +310,7 @@ - static inline void - mmx_fv_1 ( short* &q, short* e, int s, int s3 ) - { -- while (q _realname=dlfcn - -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" -pkgver=r37 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=r66.e419539 pkgrel=1 pkgdesc="A wrapper for dlfcn to the Win32 API (mingw-w64)" arch=('any') -url="http://code.google.com/p/dlfcn-win32" +url="https://github.com/dlfcn-win32/dlfcn-win32" license=("LGPL") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "subversion") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -source=("${_realname}"::"svn+http://dlfcn-win32.googlecode.com/svn/trunk/") -md5sums=('SKIP') +source=("${_realname}"::"git+https://github.com/dlfcn-win32/dlfcn-win32.git" + unify-makefile.patch) +md5sums=('SKIP' + '11670a97bdb4df0e1daf2f25614d4d82') pkgver() { cd "${_realname}" - local ver="$(svnversion)" - printf "r%s" "${ver//[[:alpha:]]}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd "${srcdir}/${_realname}" + patch -p1 -i ${srcdir}/unify-makefile.patch } build() { @@ -36,7 +37,7 @@ build() { --disable-stripping \ --enable-shared \ --disable-msvc - sed -i "s|libdl.dll |libdl-0.dll |g" Makefile + make } diff --git a/mingw-w64-dlfcn-git/unify-makefile.patch b/mingw-w64-dlfcn-git/unify-makefile.patch new file mode 100644 index 0000000000..f8abed9fab --- /dev/null +++ b/mingw-w64-dlfcn-git/unify-makefile.patch @@ -0,0 +1,92 @@ +--- dlfcn/Makefile.orig 2015-06-09 13:04:20.785400000 +0300 ++++ dlfcn/Makefile 2015-06-09 13:22:27.590600000 +0300 +@@ -5,19 +5,32 @@ + CFLAGS = -Wall -O3 -fomit-frame-pointer + LIBS += -lpsapi + ++ ++API_VERSION=0 ++LIBRARY_NAME=libdl ++SHARED_EXTENSION=.dll ++STATIC_EXTENSION=.a ++ifeq ($(BUILD_MSVC),yes) ++IMPORT_LIBRARY_EXTENSION=.lib ++else ++IMPORT_LIBRARY_EXTENSION=.dll.a ++endif ++SHARED_LIBRARY_NAME=$(LIBRARY_NAME)-$(API_VERSION)$(SHARED_EXTENSION) ++STATIC_LIBRARY_NAME=$(LIBRARY_NAME)$(STATIC_EXTENSION) ++IMPORT_LIBRARY_NAME=$(LIBRARY_NAME)$(IMPORT_LIBRARY_EXTENSION) + ifeq ($(BUILD_SHARED),yes) +- TARGETS += libdl.dll +- SHFLAGS += -Wl,--out-implib,libdl.dll.a ++ TARGETS += $(SHARED_LIBRARY_NAME) ++ SHFLAGS += -Wl,--out-implib,$(IMPORT_LIBRARY_NAME) + CFLAGS += -DSHARED + INSTALL += shared-install + endif + ifeq ($(BUILD_STATIC),yes) +- TARGETS += libdl.a ++ TARGETS += $(STATIC_LIBRARY_NAME) + INSTALL += static-install + endif + ifeq ($(BUILD_MSVC),yes) +- TARGETS += libdl.lib +- SHFLAGS += -Wl,--output-def,libdl.def ++ TARGETS += $(IMPORT_LIBRARY_NAME) ++ SHFLAGS += -Wl,--output-def,$(LIBRARY_NAME).def + INSTALL += lib-install + endif + +@@ -29,14 +42,14 @@ + %.o: %.c + $(CC) -o $@ -c $< $(CFLAGS) + +-libdl.a: $(LIB_OBJS) ++$(STATIC_LIBRARY_NAME): $(LIB_OBJS) + $(AR) cru $@ $^ +- $(RANLIB) libdl.a ++ $(RANLIB) $(STATIC_LIBRARY_NAME) + +-libdl.dll: $(LIB_OBJS) ++$(SHARED_LIBRARY_NAME): $(LIB_OBJS) + $(CC) $(SHFLAGS) -shared -o $@ $^ $(LIBS) + +-libdl.lib: libdl.dll ++$(IMPORT_LIBRARY_NAME): $(SHARED_LIBRARY_NAME) + $(LIBCMD) /machine:i386 /def:libdl.def + + include-install: $(HEADERS) +@@ -45,18 +58,18 @@ + + shared-install: include-install + mkdir -p $(DESTDIR)$(prefix)/bin +- cp libdl.dll $(DESTDIR)$(prefix)/bin +- $(STRIP) $(DESTDIR)$(prefix)/bin/libdl.dll ++ cp $(SHARED_LIBRARY_NAME) $(DESTDIR)$(prefix)/bin ++ $(STRIP) $(DESTDIR)$(prefix)/bin/$(SHARED_LIBRARY_NAME) + mkdir -p $(DESTDIR)$(libdir) +- cp libdl.dll.a $(DESTDIR)$(libdir) ++ cp $(IMPORT_LIBRARY_NAME) $(DESTDIR)$(libdir) + + static-install: include-install + mkdir -p $(DESTDIR)$(libdir) +- cp libdl.a $(DESTDIR)$(libdir) ++ cp $(STATIC_LIBRARY_NAME) $(DESTDIR)$(libdir) + + lib-install: $(LIBS) + mkdir -p $(DESTDIR)$(libdir) +- cp libdl.lib $(DESTDIR)$(libdir) ++ cp $(IMPORT_LIBRARY_NAME) $(DESTDIR)$(libdir) + + install: $(INSTALL) + +@@ -70,7 +83,7 @@ + $(WINE) test.exe + + clean:: +- rm -f dlfcn.o libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp test.exe testdll.dll ++ rm -f dlfcn.o $(SHARED_LIBRARY_NAME) $(STATIC_LIBRARY_NAME) libdl.def $(IMPORT_LIBRARY_NAME) libdl.exp test.exe testdll.dll + + distclean: clean + rm -f config.mak diff --git a/mingw-w64-dlfcn/PKGBUILD b/mingw-w64-dlfcn/PKGBUILD index d8cba1b747..edd48d4df6 100644 --- a/mingw-w64-dlfcn/PKGBUILD +++ b/mingw-w64-dlfcn/PKGBUILD @@ -1,44 +1,42 @@ # Maintainer: Alexey Pavlov _realname=dlfcn - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=r19 -pkgrel=1 +pkgver=1.0.0 +pkgrel=2 pkgdesc="A wrapper for dlfcn to the Win32 API (mingw-w64)" arch=('any') -url="http://code.google.com/p/dlfcn-win32" +url="https://github.com/dlfcn-win32/dlfcn-win32" license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-crt") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs') -source=("http://dlfcn-win32.googlecode.com/files/dlfcn-win32-${pkgver}.tar.bz2" - 'dlfcn-fix-cplusplus-linkage.patch') -md5sums=('6e321b36ee289179777bab07dcfe5510' - '2e82b109a5a8b17be03494ff7e772c13') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/dlfcn-win32/dlfcn-win32/archive/v${pkgver}.tar.gz + unify-makefile.patch) +md5sums=('fc9882d8e33d06626ddb22b44c6fd4dd' + '2d724d5ab315e633b46fc8993f0663a4') -prepare () { - cd "$srcdir/dlfcn-win32-$pkgver" - patch -p0 -i "$srcdir"/dlfcn-fix-cplusplus-linkage.patch +prepare() { + cd "${srcdir}/dlfcn-win32-${pkgver}" + patch -p1 -i "${srcdir}"/unify-makefile.patch } -build() -{ - cd "$srcdir/dlfcn-win32-$pkgver" - mkdir -p "build-${MINGW_CHOST}" && cd "build-${MINGW_CHOST}" - ../configure \ +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + cp -rf "$srcdir/dlfcn-win32-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + ./configure \ --prefix=${MINGW_PREFIX} \ --libdir=${MINGW_PREFIX}/lib \ --incdir=${MINGW_PREFIX}/include \ --disable-stripping \ --enable-shared \ --disable-msvc - cp ../Makefile ../dlfcn.c ../dlfcn.h . - sed -i "s|libdl.dll |libdl-0.dll |g" Makefile + make } package() { - cd "$srcdir/dlfcn-win32-$pkgver/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-dlfcn/dlfcn-fix-cplusplus-linkage.patch b/mingw-w64-dlfcn/dlfcn-fix-cplusplus-linkage.patch deleted file mode 100644 index 0905d46580..0000000000 --- a/mingw-w64-dlfcn/dlfcn-fix-cplusplus-linkage.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- dlfcn.h.orig 2009-10-30 15:36:35.357902913 +0100 -+++ dlfcn.h 2009-10-30 15:39:51.126664184 +0100 -@@ -37,9 +37,17 @@ - #define RTLD_DEFAULT 0 - #define RTLD_NEXT 0 - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - void *dlopen ( const char *file, int mode ); - int dlclose( void *handle ); - void *dlsym ( void *handle, const char *name ); - char *dlerror( void ); - -+#ifdef __cplusplus -+} -+#endif -+ - #endif /* DLFCN_H */ diff --git a/mingw-w64-dlfcn/unify-makefile.patch b/mingw-w64-dlfcn/unify-makefile.patch new file mode 100644 index 0000000000..c4575cfd73 --- /dev/null +++ b/mingw-w64-dlfcn/unify-makefile.patch @@ -0,0 +1,90 @@ +--- dlfcn-win32-1.0.0/Makefile.orig 2015-06-09 13:37:21.704000000 +0300 ++++ dlfcn-win32-1.0.0/Makefile 2015-06-09 13:36:26.672400000 +0300 +@@ -3,18 +3,31 @@ + # + include config.mak + ++API_VERSION=0 ++LIBRARY_NAME=libdl ++SHARED_EXTENSION=.dll ++STATIC_EXTENSION=.a ++ifeq ($(BUILD_MSVC),yes) ++ IMPORT_LIBRARY_EXTENSION=.lib ++else ++ IMPORT_LIBRARY_EXTENSION=.dll.a ++endif ++SHARED_LIBRARY_NAME=$(LIBRARY_NAME)-$(API_VERSION)$(SHARED_EXTENSION) ++STATIC_LIBRARY_NAME=$(LIBRARY_NAME)$(STATIC_EXTENSION) ++IMPORT_LIBRARY_NAME=$(LIBRARY_NAME)$(IMPORT_LIBRARY_EXTENSION) ++ + ifeq ($(BUILD_SHARED),yes) +- TARGETS += libdl.dll libdl.dll.a +- SHFLAGS += -Wl,--out-implib,libdl.dll.a ++ TARGETS += $(SHARED_LIBRARY_NAME) ++ SHFLAGS += -Wl,--out-implib,$(IMPORT_LIBRARY_NAME) + INSTALL += shared-install + endif + ifeq ($(BUILD_STATIC),yes) +- TARGETS += libdl.a ++ TARGETS += $(STATIC_LIBRARY_NAME) + INSTALL += static-install + endif + ifeq ($(BUILD_MSVC),yes) +- TARGETS += libdl.lib +- SHFLAGS += -Wl,--output-def,libdl.def ++ TARGETS += $(IMPORT_LIBRARY_NAME) ++ SHFLAGS += -Wl,--output-def,$(LIBRARY_NAME).def + INSTALL += lib-install + endif + +@@ -26,14 +39,14 @@ + %.o: %.c + $(CC) -o $@ -c $< -Wall -O3 -fomit-frame-pointer + +-libdl.a: $(LIB_OBJS) ++$(STATIC_LIBRARY_NAME): $(LIB_OBJS) + $(AR) cru $@ $^ + $(RANLIB) libdl.a + +-libdl.dll libdl.dll.a: $(LIB_OBJS) ++$(SHARED_LIBRARY_NAME): $(LIB_OBJS) + $(CC) $(SHFLAGS) -shared -o $@ $^ + +-libdl.lib: libdl.dll ++$(IMPORT_LIBRARY_NAME): $(SHARED_LIBRARY_NAME) + $(LIBCMD) /machine:i386 /def:libdl.def + + include-install: $(HEADERS) +@@ -42,18 +55,18 @@ + + shared-install: include-install + mkdir -p $(DESTDIR)$(prefix)/bin +- cp libdl.dll $(DESTDIR)$(prefix)/bin +- $(STRIP) $(DESTDIR)$(prefix)/bin/libdl.dll ++ cp $(SHARED_LIBRARY_NAME) $(DESTDIR)$(prefix)/bin ++ $(STRIP) $(DESTDIR)$(prefix)/bin/$(SHARED_LIBRARY_NAME) + mkdir -p $(DESTDIR)$(libdir) +- cp libdl.dll.a $(DESTDIR)$(libdir) ++ cp $(IMPORT_LIBRARY_NAME) $(DESTDIR)$(libdir) + + static-install: include-install + mkdir -p $(DESTDIR)$(libdir) +- cp libdl.a $(DESTDIR)$(libdir) ++ cp $(STATIC_LIBRARY_NAME) $(DESTDIR)$(libdir) + + lib-install: $(LIBS) + mkdir -p $(DESTDIR)$(libdir) +- cp libdl.lib $(DESTDIR)$(libdir) ++ cp $(IMPORT_LIBRARY_NAME) $(DESTDIR)$(libdir) + + install: $(INSTALL) + +@@ -67,7 +80,7 @@ + $(WINE) test.exe + + clean:: +- rm -f dlfcn.o libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp test.exe testdll.dll ++ rm -f dlfcn.o $(SHARED_LIBRARY_NAME) $(STATIC_LIBRARY_NAME) libdl.def $(IMPORT_LIBRARY_NAME) libdl.exp test.exe testdll.dll + + distclean: clean + rm -f config.mak diff --git a/mingw-w64-dmake/dmake-mingw.patch b/mingw-w64-dmake/001-detect-mingw.patch similarity index 100% rename from mingw-w64-dmake/dmake-mingw.patch rename to mingw-w64-dmake/001-detect-mingw.patch diff --git a/mingw-w64-dmake/002-disable-shell-environment-variable.patch b/mingw-w64-dmake/002-disable-shell-environment-variable.patch new file mode 100644 index 0000000000..5ea4a23cf6 --- /dev/null +++ b/mingw-w64-dmake/002-disable-shell-environment-variable.patch @@ -0,0 +1,26 @@ +diff -aur 001/dmake.c 002/dmake.c +--- 001/dmake.c 2015-01-07 00:51:53.692179700 -0200 ++++ 002/dmake.c 2015-01-07 03:30:31.966593800 -0200 +@@ -81,6 +81,10 @@ + #include "extern.h" /* this includes config.h */ + #include "sysintf.h" + ++#ifdef _WIN32 ++#include ++#endif ++ + #ifndef MSDOS + #define USAGE \ + "Usage:\n%s [-P#] [-{f|K} file] [-{w|W} target ...] [macro[!][[*][+][:]]=value ...]\n" +@@ -144,6 +148,11 @@ + */ + DB_ENTER("main"); + ++#ifdef _WIN32 ++ /* The SHELL environment variable breaks dmake under MSYS2 */ ++ _putenv_s("SHELL", ""); ++#endif ++ + /* Initialize Global variables to their default values */ + Prolog(argc, argv); + /* Set internal macros to their initial values, some are changed diff --git a/mingw-w64-dmake/003-fix-config-location.patch b/mingw-w64-dmake/003-fix-config-location.patch new file mode 100644 index 0000000000..e4175e86af --- /dev/null +++ b/mingw-w64-dmake/003-fix-config-location.patch @@ -0,0 +1,47 @@ +diff -aur 002/startup/Makefile.in 003/startup/Makefile.in +--- 002/startup/Makefile.in 2012-02-07 12:36:47.000000000 -0200 ++++ 003/startup/Makefile.in 2015-01-10 17:51:06.418945300 -0200 +@@ -163,7 +163,7 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-startupdir = $(datadir)/startup ++startupdir = $(datadir) + startup_DATA = startup.mk config.mk + DIST_SUBDIRS = unix winnt + SUBDIRS = @OS_TYPE@ +diff -aur 002/startup/winnt/Makefile.in 003/startup/winnt/Makefile.in +--- 002/startup/winnt/Makefile.in 2012-02-07 12:36:46.000000000 -0200 ++++ 003/startup/winnt/Makefile.in 2015-01-10 18:12:18.143554600 -0200 +@@ -162,7 +162,7 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-startupdir = $(datadir)/startup/winnt ++startupdir = $(datadir)/winnt + startup_DATA = macros.mk recipes.mk + DIST_SUBDIRS = mingw msvc6 + SUBDIRS = @OS_VERSION@ +diff -aur 002/startup/winnt/mingw/Makefile.in 003/startup/winnt/mingw/Makefile.in +--- 002/startup/winnt/mingw/Makefile.in 2012-02-07 12:36:46.000000000 -0200 ++++ 003/startup/winnt/mingw/Makefile.in 2015-01-10 18:12:24.551757800 -0200 +@@ -154,7 +154,7 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-startupdir = $(datadir)/startup/winnt/mingw ++startupdir = $(datadir)/winnt/mingw + startup_DATA = macros.mk + all: all-am + +diff -aur 002/winnt/startup.h 003/winnt/startup.h +--- 002/winnt/startup.h 2012-02-07 12:36:53.000000000 -0200 ++++ 003/winnt/startup.h 2015-01-10 18:01:16.400390600 -0200 +@@ -24,6 +24,6 @@ + -- Use cvs log to obtain detailed change logs. + */ + +-"DMAKEROOT *= $(ABSMAKECMD:d)startup", ++"DMAKEROOT *= $(ABSMAKECMD:d)..\\etc\\dmake", + "MAKESTARTUP := $(DMAKEROOT)\\startup.mk", + diff --git a/mingw-w64-dmake/004-disable-mkstemp-detection.patch b/mingw-w64-dmake/004-disable-mkstemp-detection.patch new file mode 100644 index 0000000000..347b4baf65 --- /dev/null +++ b/mingw-w64-dmake/004-disable-mkstemp-detection.patch @@ -0,0 +1,12 @@ +diff -aur 003/configure 004/configure +--- 003/configure 2015-01-13 17:50:23.916015600 -0200 ++++ 004/configure 2015-01-13 17:55:46.017578100 -0200 +@@ -5397,7 +5397,7 @@ + done + + +-for ac_func in getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday setenv ++for ac_func in getcwd getwd strerror setvbuf tzset settz tempnam gettimeofday setenv + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --git a/mingw-w64-dmake/PKGBUILD b/mingw-w64-dmake/PKGBUILD index d6acd515bd..61868cea9a 100644 --- a/mingw-w64-dmake/PKGBUILD +++ b/mingw-w64-dmake/PKGBUILD @@ -1,40 +1,48 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=dmake - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=4.12.2 -pkgrel=2 +pkgrel=6 pkgdesc="Dmake is a make utility similar to GNU make or the Workshop dmake (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') license=('GPL') url="https://code.google.com/a/apache-extras.org/p/dmake/" source=("http://dmake.apache-extras.org.codespot.com/files/dmake-${pkgver}.tar.bz2" - "dmake-mingw.patch") + '001-detect-mingw.patch' + '002-disable-shell-environment-variable.patch' + '003-fix-config-location.patch' + '004-disable-mkstemp-detection.patch') md5sums=('9194f727c31d1db18bf5dd02e7b2dd09' - 'a39a65958762b2877c994428978d0c3d') + 'a39a65958762b2877c994428978d0c3d' + '08c08cf2432bd7ffdce6759d4f6974d4' + 'a1f153d6c8199c11344027a18a4baa26' + '36a84a7e83bc5b56de691e1da50c6f5f') prepare() { cd ${srcdir}/dmake-${pkgver} - patch -p1 -i ${srcdir}/dmake-mingw.patch + patch -p1 -i ${srcdir}/001-detect-mingw.patch + patch -p1 -i ${srcdir}/002-disable-shell-environment-variable.patch + patch -p1 -i ${srcdir}/003-fix-config-location.patch + patch -p1 -i ${srcdir}/004-disable-mkstemp-detection.patch } build() { - unset SHELL mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - MSYSTEM=MINGW ../dmake-${pkgver}/configure \ + ../dmake-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ + --datarootdir=${MINGW_PREFIX}/etc/dmake \ --build=${MINGW_CHOST} + make } package() { cd "${srcdir}/build-${CARCH}" make DESTDIR="${pkgdir}" install - mv "${pkgdir}${MINGW_PREFIX}/share/startup" "${pkgdir}${MINGW_PREFIX}/bin" } diff --git a/mingw-w64-dnscrypt-proxy/001-outside-source-build.patch b/mingw-w64-dnscrypt-proxy/001-outside-source-build.patch new file mode 100644 index 0000000000..f9aa2f3a8b --- /dev/null +++ b/mingw-w64-dnscrypt-proxy/001-outside-source-build.patch @@ -0,0 +1,96 @@ +--- dnscrypt-proxy-1.4.2/src/plugins/example/Makefile.am.orig 2014-12-09 21:32:37.767600000 +0300 ++++ dnscrypt-proxy-1.4.2/src/plugins/example/Makefile.am 2014-12-09 21:32:40.638000000 +0300 +@@ -16,4 +16,5 @@ + + libdcplugin_example_la_CPPFLAGS = \ + $(LTDLINCL) \ +- -I../../include ++ -I../../include \ ++ -I$(srcdir)/../../include +--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-aaaa-blocking/Makefile.am.orig 2014-12-09 21:28:43.235200000 +0300 ++++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-aaaa-blocking/Makefile.am 2014-12-09 21:28:47.213200000 +0300 +@@ -18,4 +18,5 @@ + + libdcplugin_example_ldns_aaaa_blocking_la_CPPFLAGS = \ + $(LTDLINCL) \ +- -I../../include ++ -I../../include \ ++ -I$(srcdir)/../../include +--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-blocking/Makefile.am.orig 2014-12-09 21:29:06.507000000 +0300 ++++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-blocking/Makefile.am 2014-12-09 21:29:09.221400000 +0300 +@@ -18,4 +18,5 @@ + + libdcplugin_example_ldns_blocking_la_CPPFLAGS = \ + $(LTDLINCL) \ +- -I../../include ++ -I../../include \ ++ -I$(srcdir)/../../include +--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-deviceid/Makefile.am.orig 2014-12-09 21:29:26.394000000 +0300 ++++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-deviceid/Makefile.am 2014-12-09 21:29:30.699600000 +0300 +@@ -18,4 +18,5 @@ + + libdcplugin_example_ldns_opendns_deviceid_la_CPPFLAGS = \ + $(LTDLINCL) \ +- -I../../include ++ -I../../include \ ++ -I$(srcdir)/../../include +--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-set-client-ip/Makefile.am.orig 2014-12-09 21:30:06.634000000 +0300 ++++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-set-client-ip/Makefile.am 2014-12-09 21:30:54.682000000 +0300 +@@ -18,4 +18,5 @@ + + libdcplugin_example_ldns_opendns_set_client_ip_la_CPPFLAGS = \ + $(LTDLINCL) \ +- -I../../include ++ -I../../include \ ++ -I$(srcdir)/../../include +--- dnscrypt-proxy-1.4.2/src/plugins/example-logging/Makefile.am.orig 2014-12-09 21:31:14.376400000 +0300 ++++ dnscrypt-proxy-1.4.2/src/plugins/example-logging/Makefile.am 2014-12-09 21:31:17.652400000 +0300 +@@ -16,4 +16,5 @@ + + libdcplugin_example_logging_la_CPPFLAGS = \ + $(LTDLINCL) \ +- -I../../include ++ -I../../include \ ++ -I$(srcdir)/../../include +--- dnscrypt-proxy-1.4.2/src/hostip/Makefile.am.orig 2014-12-09 21:27:24.540800000 +0300 ++++ dnscrypt-proxy-1.4.2/src/hostip/Makefile.am 2014-12-09 21:27:29.423600000 +0300 +@@ -11,7 +11,8 @@ + AM_CFLAGS = @CWFLAGS@ + + AM_CPPFLAGS = \ +- -I../libevent-modified/include ++ -I../libevent-modified/include \ ++ -I$(srcdir)/../libevent-modified/include + + hostip_LDADD = \ + ../libevent-modified/libevent_extra.la \ +--- dnscrypt-proxy-1.4.2/src/proxy/Makefile.am.orig 2014-12-09 21:25:07.351800000 +0300 ++++ dnscrypt-proxy-1.4.2/src/proxy/Makefile.am 2014-12-09 21:26:24.837000000 +0300 +@@ -49,6 +49,8 @@ + AM_CPPFLAGS = \ + -I../ext \ + -I../libevent-modified/include \ ++ -I$(srcdir)/../ext \ ++ -I$(srcdir)/../libevent-modified/include \ + -DPKGDATADIR='"${pkgdatadir}"' + + dnscrypt_proxy_LDADD = \ +@@ -62,8 +62,8 @@ + BUILT_SOURCES = \ + probes.h + +-probes.h: @PROBES_SOURCE@ +- cat @PROBES_SOURCE@ > $@ ++probes.h: $(srcdir)/@PROBES_SOURCE@ ++ cat $(srcdir)/@PROBES_SOURCE@ > $@ + + probes_dnscrypt_proxy.h: probes_dnscrypt_proxy.d + @DTRACE@ -o $@ -h -s probes_dnscrypt_proxy.d +@@ -83,6 +83,7 @@ + AM_CPPFLAGS += \ + $(LTDLINCL) \ + -I../include \ ++ -I$(srcdir)/../include \ + -DPLUGINS_ROOT=\"$(pkglibdir)/\" + + dnscrypt_proxy_LDADD += $(LIBLTDL) diff --git a/mingw-w64-dnscrypt-proxy/PKGBUILD b/mingw-w64-dnscrypt-proxy/PKGBUILD index c74a494ae4..82a9fce678 100644 --- a/mingw-w64-dnscrypt-proxy/PKGBUILD +++ b/mingw-w64-dnscrypt-proxy/PKGBUILD @@ -1,20 +1,35 @@ # Maintainer: Alexey Pavlov _realname=dnscrypt-proxy +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.0 -pkgrel=1 +pkgver=1.6.0 +pkgrel=2 pkgdesc="A tool for securing communications between a client and a DNS resolver (mingw-w64)" arch=("any") url="http://dnscrypt.org" license=('custom:ISC') -depends=("${MINGW_PACKAGE_PREFIX}-libsodium") -source=("http://download.dnscrypt.org/${_realname}/${_realname}-$pkgver.tar.bz2") -md5sums=('40b5b73f5042330b86084460d7c839c6') +depends=("${MINGW_PACKAGE_PREFIX}-libsodium" + "${MINGW_PACKAGE_PREFIX}-ldns") +makedepends=("${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://download.dnscrypt.org/${_realname}/${_realname}-${pkgver}.tar.bz2" + 001-outside-source-build.patch) +md5sums=('fa1dad8e487ab587be06e1cbccb9cfcc' + 'b7be1792d360db85014bd382f92dab03') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-outside-source-build.patch + autoreconf -fi +} build() { - cd ${_realname}-${pkgver} - ./configure \ + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --sbindir=${MINGW_PREFIX}/bin \ --build=${MINGW_CHOST} \ @@ -26,12 +41,12 @@ build() { } check() { - cd ${_realname}-${pkgver} + cd ${srcdir}/build-${MINGW_CHOST} make -k check } package() { - cd ${_realname}-${pkgver} + cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install - install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-dnssec-anchors/PKGBUILD b/mingw-w64-dnssec-anchors/PKGBUILD index 804ddf6d46..0b1dfa2fdb 100644 --- a/mingw-w64-dnssec-anchors/PKGBUILD +++ b/mingw-w64-dnssec-anchors/PKGBUILD @@ -1,7 +1,6 @@ # Maintainer: Alexey Pavlov _realname=dnssec-anchors - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=20130320 pkgrel=1 diff --git a/mingw-w64-docbook-xml/PKGBUILD b/mingw-w64-docbook-xml/PKGBUILD index 08680ea5d2..29610e97ff 100644 --- a/mingw-w64-docbook-xml/PKGBUILD +++ b/mingw-w64-docbook-xml/PKGBUILD @@ -1,23 +1,15 @@ # Maintainer: Alexey Pavlov _realname=docbook-xml - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=4.5 -pkgrel=3 +pkgrel=5 pkgdesc="A widely used XML scheme for writing documentation and help" arch=('any') url="http://www.oasis-open.org/docbook/" license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-libxml2") -case $MINGW_CHOST in - i686*) - install=docbook-xml32.install - ;; - x86_64*) - install=docbook-xml64.install - ;; -esac +install=docbook-xml-${CARCH}.install source=('http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip' 'http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip' 'http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip' @@ -39,11 +31,11 @@ md5sums=('03083e288e87a7e829e437358da7ef9e' 'd2ed39f57ea13ca8306c1e0d15149726') package() { - export MSYS2_ARG_CONV_EXCL="-//OASIS" + # export MSYS2_ARG_CONV_EXCL="-//OASIS" for ver in 4.2 4.3 4.4 4.5; do mkdir docbook-xml-${ver} pushd docbook-xml-${ver} - bsdtar xf "${startdir}/docbook-xml-${ver}.zip" + /usr/bin/bsdtar xf "${srcdir}/docbook-xml-${ver}.zip" case $ver in 4.2) patch -p1 -i ${srcdir}/4.2-Add-system.all.patch @@ -61,243 +53,289 @@ package() { "${pkgdir}${MINGW_PREFIX}/share/xml/docbook/xml-dtd-${ver}/" popd done - + #extract v4.1.2 mkdir docbook-xml-4.1.2 pushd docbook-xml-4.1.2 - bsdtar xf "${startdir}/docbkx412.zip" - patch -p1 -i ${srcdir}/4.1.2-add-catalog.all.patch - mkdir -p "${pkgdir}${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.1.2" - cp -dRf docbook.cat *.dtd ent/ *.mod \ - "${pkgdir}${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.1.2/" + /usr/bin/bsdtar xf "${srcdir}/docbkx412.zip" + patch -p1 -i ${srcdir}/4.1.2-add-catalog.all.patch + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.1.2" + cp -dRf docbook.cat *.dtd ent/ *.mod \ + "${pkgdir}${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.1.2/" popd mkdir -p "${pkgdir}${MINGW_PREFIX}/etc/xml" - xmlcatalog --noout --create "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" + ${MINGW_PREFIX}/bin/xmlcatalog --noout --create "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" # V4.1.2 - xmlcatalog --noout --add "public" \ + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteSystem" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.1.2" \ + "../../share/xml/docbook/xml-dtd-4.1.2" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteURI" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.1.2" \ + "../../share/xml/docbook/xml-dtd-4.1.2" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" # V4.2 - xmlcatalog --noout --add "public" \ + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Notations V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" \ "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteSystem" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.2" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.2" \ + "../../share/xml/docbook/xml-dtd-4.2" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteURI" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.2" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.2" \ + "../../share/xml/docbook/xml-dtd-4.2" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" # V4.3 - xmlcatalog --noout --add "public" \ + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \ "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteSystem" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.3" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.3" \ + "../../share/xml/docbook/xml-dtd-4.3" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteURI" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.3" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.3" \ + "../../share/xml/docbook/xml-dtd-4.3" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" # V4.4 - xmlcatalog --noout --add "public" \ + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \ "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteSystem" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.4" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.4" \ + "../../share/xml/docbook/xml-dtd-4.4" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteURI" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.4" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.4" \ + "../../share/xml/docbook/xml-dtd-4.4" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" # V4.5 - xmlcatalog --noout --add "public" \ + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.5//EN" \ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \ + "../../share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \ + "../../share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \ + "../../share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \ + "../../share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \ + "../../share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \ + "../../share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \ + "../../share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "public" \ + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \ - "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteSystem" \ - "http://www.oasis-open.org/docbook/xml/4.5" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5" \ - "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" - xmlcatalog --noout --add "rewriteURI" \ - "http://www.oasis-open.org/docbook/xml/4.5" \ - "file://${MINGW_PREFIX}/share/xml/docbook/xml-dtd-4.5" \ + "../../share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \ "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" -# license + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/4.5" \ + "../../share/xml/docbook/xml-dtd-4.5" \ + "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" + + ${MINGW_PREFIX}/bin/xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/4.5" \ + "../../share/xml/docbook/xml-dtd-4.5" \ + "${pkgdir}${MINGW_PREFIX}/etc/xml/docbook-xml" + + # license install -D -m644 "${srcdir}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" - } diff --git a/mingw-w64-docbook-xml/docbook-xml-i686.install b/mingw-w64-docbook-xml/docbook-xml-i686.install new file mode 100644 index 0000000000..964a14d6b6 --- /dev/null +++ b/mingw-w64-docbook-xml/docbook-xml-i686.install @@ -0,0 +1,46 @@ +MINGW_INSTALL=mingw32 +MINGW_XML_CATALOG=${MINGW_INSTALL}/etc/xml +# export MSYS2_ARG_CONV_EXCL="-//OASIS" + +post_install() { + if [ -e ${MINGW_XML_CATALOG}/catalog.preserve ]; then + mv ${MINGW_XML_CATALOG}/catalog.preserve ${MINGW_XML_CATALOG}/catalog + elif [ ! -e mingw32/etc/xml/catalog ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog + fi + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegatePublic" \ + '-//OASIS//ENTITIES DocBook XML' \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegatePublic" \ + '-//OASIS//DTD DocBook XML' \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + if [ $(vercmp $2 4.5) -lt 0 ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --del "${MINGW_XML_CATALOG}/docbook" ${MINGW_XML_CATALOG}/catalog > ${MINGW_XML_CATALOG}/catalog.preserve + fi +} + +post_upgrade() { + if [ $(vercmp $2 4.5) -ge 0 ]; then + post_remove + fi + post_install +} + +post_remove() { + ${MINGW_INSTALL}/bin/xmlcatalog --noout --del ./docbook-xml ${MINGW_XML_CATALOG}/catalog +} diff --git a/mingw-w64-docbook-xml/docbook-xml-x86_64.install b/mingw-w64-docbook-xml/docbook-xml-x86_64.install new file mode 100644 index 0000000000..2b2904112b --- /dev/null +++ b/mingw-w64-docbook-xml/docbook-xml-x86_64.install @@ -0,0 +1,46 @@ +MINGW_INSTALL=mingw64 +MINGW_XML_CATALOG=${MINGW_INSTALL}/etc/xml +# export MSYS2_ARG_CONV_EXCL="-//OASIS" + +post_install() { + if [ -e ${MINGW_XML_CATALOG}/catalog.preserve ]; then + mv ${MINGW_XML_CATALOG}/catalog.preserve ${MINGW_XML_CATALOG}/catalog + elif [ ! -e mingw64/etc/xml/catalog ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog + fi + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegatePublic" \ + '-//OASIS//ENTITIES DocBook XML' \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegatePublic" \ + '-//OASIS//DTD DocBook XML' \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "./docbook-xml" \ + ${MINGW_XML_CATALOG}/catalog +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + if [ $(vercmp $2 4.5) -lt 0 ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --del "${MINGW_XML_CATALOG}/docbook" ${MINGW_XML_CATALOG}/catalog > ${MINGW_XML_CATALOG}/catalog.preserve + fi +} + +post_upgrade() { + if [ $(vercmp $2 4.5) -ge 0 ]; then + post_remove + fi + post_install +} + +post_remove() { + ${MINGW_INSTALL}/bin/xmlcatalog --noout --del ./docbook-xml ${MINGW_XML_CATALOG}/catalog +} diff --git a/mingw-w64-docbook-xml/docbook-xml32.install b/mingw-w64-docbook-xml/docbook-xml32.install deleted file mode 100644 index 3ce15899b1..0000000000 --- a/mingw-w64-docbook-xml/docbook-xml32.install +++ /dev/null @@ -1,46 +0,0 @@ -cd /mingw32/etc/xml -MINGW_XML_CATALOG=$(pwd -W) -export MSYS2_ARG_CONV_EXCL="-//OASIS" - -post_install() { - if [ -e mingw32/etc/xml/catalog.preserve ]; then - mv mingw32/etc/xml/catalog.preserve mingw32/etc/xml/catalog - elif [ ! -e mingw32/etc/xml/catalog ]; then - mingw64/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog - fi - mingw32/bin/xmlcatalog --noout --add "delegatePublic" \ - '-//OASIS//ENTITIES DocBook XML' \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog - mingw32/bin/xmlcatalog --noout --add "delegatePublic" \ - '-//OASIS//DTD DocBook XML' \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog - mingw32/bin/xmlcatalog --noout --add "delegateSystem" \ - "http://www.oasis-open.org/docbook/" \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog - mingw32/bin/xmlcatalog --noout --add "delegateURI" \ - "http://www.oasis-open.org/docbook/" \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog -} - -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - if [ $(vercmp $2 4.5) -lt 0 ]; then - mingw32/bin/xmlcatalog --del "${MINGW_XML_CATALOG}/docbook" ${MINGW_XML_CATALOG}/catalog > ${MINGW_XML_CATALOG}/catalog.preserve - fi -} - -post_upgrade() { - if [ $(vercmp $2 4.5) -ge 0 ]; then - post_remove - fi - post_install -} - -post_remove() { - mingw32/bin/xmlcatalog --noout --del ${MINGW_XML_CATALOG}/docbook-xml ${MINGW_XML_CATALOG}/catalog -} diff --git a/mingw-w64-docbook-xml/docbook-xml64.install b/mingw-w64-docbook-xml/docbook-xml64.install deleted file mode 100644 index d67a7e3d62..0000000000 --- a/mingw-w64-docbook-xml/docbook-xml64.install +++ /dev/null @@ -1,46 +0,0 @@ -cd /mingw64/etc/xml -MINGW_XML_CATALOG=$(pwd -W) -export MSYS2_ARG_CONV_EXCL="-//OASIS" - -post_install() { - if [ -e mingw64/etc/xml/catalog.preserve ]; then - mv mingw64/etc/xml/catalog.preserve mingw64/etc/xml/catalog - elif [ ! -e mingw64/etc/xml/catalog ]; then - mingw64/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog - fi - mingw64/bin/xmlcatalog --noout --add "delegatePublic" \ - '-//OASIS//ENTITIES DocBook XML' \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog - mingw64/bin/xmlcatalog --noout --add "delegatePublic" \ - '-//OASIS//DTD DocBook XML' \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog - mingw64/bin/xmlcatalog --noout --add "delegateSystem" \ - "http://www.oasis-open.org/docbook/" \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog - mingw64/bin/xmlcatalog --noout --add "delegateURI" \ - "http://www.oasis-open.org/docbook/" \ - "${MINGW_XML_CATALOG}/docbook-xml" \ - ${MINGW_XML_CATALOG}/catalog -} - -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - if [ $(vercmp $2 4.5) -lt 0 ]; then - mingw64/bin/xmlcatalog --del "${MINGW_XML_CATALOG}/docbook" ${MINGW_XML_CATALOG}/catalog > ${MINGW_XML_CATALOG}/catalog.preserve - fi -} - -post_upgrade() { - if [ $(vercmp $2 4.5) -ge 0 ]; then - post_remove - fi - post_install -} - -post_remove() { - mingw64/bin/xmlcatalog --noout --del ${MINGW_XML_CATALOG}/docbook-xml ${MINGW_XML_CATALOG}/catalog -} diff --git a/mingw-w64-docbook-xsl/PKGBUILD b/mingw-w64-docbook-xsl/PKGBUILD index b047b350b4..07bcbce806 100644 --- a/mingw-w64-docbook-xsl/PKGBUILD +++ b/mingw-w64-docbook-xsl/PKGBUILD @@ -1,23 +1,17 @@ # Maintainer: Alexey Pavlov _realname=docbook-xsl - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.78.1 -pkgrel=3 +pkgrel=6 pkgdesc='XML stylesheets for Docbook-xml transformations (mingw-w64)' arch=('any') license=('custom') url='http://docbook.sourceforge.net/' -depends=("${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-libxslt" "${MINGW_PACKAGE_PREFIX}-docbook-xml") -case $MINGW_CHOST in - i686*) - install=${_realname}32.install - ;; - x86_64*) - install=${_realname}64.install - ;; -esac +depends=("${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-docbook-xml") +install=${_realname}-${CARCH}.install source=("http://downloads.sourceforge.net/docbook/${_realname}-${pkgver}.tar.bz2") md5sums=('6dd0f89131cc35bf4f2ed105a1c17771') @@ -37,6 +31,5 @@ package() { install -Dm644 catalog.xml ${_pkgroot}/catalog.xml install -dm755 ${pkgdir}${MINGW_PREFIX}/etc/xml - install -Dm644 COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${pkgname}/LICENSE - + install -Dm644 COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-docbook-xsl/docbook-xsl-i686.install b/mingw-w64-docbook-xsl/docbook-xsl-i686.install new file mode 100644 index 0000000000..eea410e1b0 --- /dev/null +++ b/mingw-w64-docbook-xsl/docbook-xsl-i686.install @@ -0,0 +1,37 @@ +MINGW_INSTALL=mingw32 +MINGW_XML_CATALOG=${MINGW_INSTALL}/etc/xml + +post_install() { + if [ ! -f ${MINGW_XML_CATALOG}/catalog ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog + fi + _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'` + + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateURI "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateSystem "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" ${MINGW_XML_CATALOG}/catalog + + if [ ! -f ${MINGW_XML_CATALOG}/docbook-xsl.xml ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/docbook-xsl.xml + fi + + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateURI \ + "http://docbook.sourceforge.net/release/xsl/" \ + "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ + ${MINGW_XML_CATALOG}/docbook-xsl.xml + + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateSystem \ + "http://docbook.sourceforge.net/release/xsl/" \ + "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ + ${MINGW_XML_CATALOG}/docbook-xsl.xml +} + +post_upgrade() { + post_remove $2 + post_install $1 +} + +post_remove() { + _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'` + ${MINGW_INSTALL}/bin/xmlcatalog --noout --del "http://docbook.sourceforge.net/release/xsl/" ${MINGW_XML_CATALOG}/catalog + rm -f ${MINGW_XML_CATALOG}/docbook-xsl.xml +} diff --git a/mingw-w64-docbook-xsl/docbook-xsl-x86_64.install b/mingw-w64-docbook-xsl/docbook-xsl-x86_64.install new file mode 100644 index 0000000000..287d393f29 --- /dev/null +++ b/mingw-w64-docbook-xsl/docbook-xsl-x86_64.install @@ -0,0 +1,37 @@ +MINGW_INSTALL=mingw64 +MINGW_XML_CATALOG=${MINGW_INSTALL}/etc/xml + +post_install() { + if [ ! -f ${MINGW_XML_CATALOG}/catalog ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog + fi + _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'` + + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateURI "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" ${MINGW_XML_CATALOG}/catalog + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateSystem "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" ${MINGW_XML_CATALOG}/catalog + + if [ ! -f ${MINGW_XML_CATALOG}/docbook-xsl.xml ]; then + ${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/docbook-xsl.xml + fi + + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateURI \ + "http://docbook.sourceforge.net/release/xsl/" \ + "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ + ${MINGW_XML_CATALOG}/docbook-xsl.xml + + ${MINGW_INSTALL}/bin/xmlcatalog --noout --add delegateSystem \ + "http://docbook.sourceforge.net/release/xsl/" \ + "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ + ${MINGW_XML_CATALOG}/docbook-xsl.xml +} + +post_upgrade() { + post_remove $2 + post_install $1 +} + +post_remove() { + _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'` + ${MINGW_INSTALL}/bin/xmlcatalog --noout --del "http://docbook.sourceforge.net/release/xsl/" ${MINGW_XML_CATALOG}/catalog + rm -f ${MINGW_XML_CATALOG}/docbook-xsl.xml +} diff --git a/mingw-w64-docbook-xsl/docbook-xsl32.install b/mingw-w64-docbook-xsl/docbook-xsl32.install deleted file mode 100644 index c2715805e1..0000000000 --- a/mingw-w64-docbook-xsl/docbook-xsl32.install +++ /dev/null @@ -1,37 +0,0 @@ -cd /mingw32 -MINGW_XML_CATALOG=$(pwd -W) - -post_install() { - if [ ! -f mingw32/etc/xml/catalog ]; then - mingw632bin/xmlcatalog --noout --create mingw32/etc/xml/catalog - fi - _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'` - - xmlcatalog --noout --add delegateURI "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" mingw32/etc/xml/catalog - xmlcatalog --noout --add delegateSystem "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" mingw32/etc/xml/catalog - - if [ ! -f mingw32/etc/xml/docbook-xsl.xml ]; then - xmlcatalog --noout --create mingw32/etc/xml/docbook-xsl.xml - fi - - xmlcatalog --noout --add delegateURI \ - "http://docbook.sourceforge.net/release/xsl/" \ - "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ - mingw32/etc/xml/docbook-xsl.xml - - xmlcatalog --noout --add delegateSystem \ - "http://docbook.sourceforge.net/release/xsl/" \ - "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ - mingw32/etc/xml/docbook-xsl.xml -} - -post_upgrade() { - post_remove $2 - post_install $1 -} - -post_remove() { - _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'` - xmlcatalog --noout --del "http://docbook.sourceforge.net/release/xsl/" mingw32/etc/xml/catalog - rm -f mingw32/etc/xml/docbook-xsl.xml -} diff --git a/mingw-w64-docbook-xsl/docbook-xsl64.install b/mingw-w64-docbook-xsl/docbook-xsl64.install deleted file mode 100644 index 0563d02cf0..0000000000 --- a/mingw-w64-docbook-xsl/docbook-xsl64.install +++ /dev/null @@ -1,37 +0,0 @@ -cd /mingw64 -MINGW_XML_CATALOG=$(pwd -W) - -post_install() { - if [ ! -f mingw64/etc/xml/catalog ]; then - mingw64/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/etc/xml/catalog - fi - _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'` - - xmlcatalog --noout --add delegateURI "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" mingw64/etc/xml/catalog - xmlcatalog --noout --add delegateSystem "http://docbook.sourceforge.net/release/xsl/" "./docbook-xsl.xml" mingw64/etc/xml/catalog - - if [ ! -f mingw64/etc/xml/docbook-xsl.xml ]; then - xmlcatalog --noout --create mingw64/etc/xml/docbook-xsl.xml - fi - - xmlcatalog --noout --add delegateURI \ - "http://docbook.sourceforge.net/release/xsl/" \ - "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ - mingw64/etc/xml/docbook-xsl.xml - - xmlcatalog --noout --add delegateSystem \ - "http://docbook.sourceforge.net/release/xsl/" \ - "../../share/xml/docbook/xsl-stylesheets-${_NEW}/catalog.xml" \ - mingw64/etc/xml/docbook-xsl.xml -} - -post_upgrade() { - post_remove $2 - post_install $1 -} - -post_remove() { - _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'` - xmlcatalog --noout --del "http://docbook.sourceforge.net/release/xsl/" mingw64/etc/xml/catalog - rm -f mingw64/etc/xml/docbook-xsl.xml -} diff --git a/mingw-w64-doxygen/PKGBUILD b/mingw-w64-doxygen/PKGBUILD index 319a0114a6..fc9a3f522f 100644 --- a/mingw-w64-doxygen/PKGBUILD +++ b/mingw-w64-doxygen/PKGBUILD @@ -2,8 +2,8 @@ _realname=doxygen pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.8.8 -pkgrel=1 +pkgver=1.8.10 +pkgrel=2 pkgdesc="A documentation system for C++, C, Java, IDL and PHP (mingw-w64)" arch=('any') url="http://www.doxygen.org/" @@ -11,54 +11,50 @@ options=('strip' 'staticlibs') license=('GPL') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-recode" "${MINGW_PACKAGE_PREFIX}-sqlite3") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + #"${MINGW_PACKAGE_PREFIX}-qt4" 'flex' - "${MINGW_PACKAGE_PREFIX}-ghostscript" - "${MINGW_PACKAGE_PREFIX}-python3") + 'bison') +optdepends=("${MINGW_PACKAGE_PREFIX}-qt4") source=("http://ftp.stack.nl/pub/users/dimitri/${_realname}-${pkgver}.src.tar.gz" - 'doxygen-configure-python2.patch' - 'force-win32.patch' - 'tmake-unquote.patch' - 'fix-casts.patch' - 'remove-extra-slashes.patch') -sha1sums=('cd511c73e7669dde5ac3e14a5d1abae093aaf1d9' - '98f9f473f906c5cd363b29c65b54bbe998c0793e' - '11ff505d15fa890aaa88fd7775842eb7ea3c1ed4' - '6b6338b36e1964064b303dc69282f87b335e5571' - '2a60fdfa3ecadda96478b67d2d1bdd833644c650' - '4a8a560f317bd8710b88a658706391fb25212471') -noextract=(${_realname}-${pkgver}.src.tar.gz) + 'cmake-mingw.patch' + 'fix-casts.patch') +sha1sums=('6bad93cbdb1b2efacba14769d39bcc7bc9c0753b' + 'cf433df601aded5a5f6c7c04587e140a2d2d460f' + '85f7e0b107fe788a071da5d94af54cd3bdab9e8a') prepare() { - cd ${srcdir} - [[ -d $srcdir/${_realname}-${pkgver} ]] || tar -xzvf ${startdir}/${_realname}-${pkgver}.src.tar.gz -C $srcdir cd "${srcdir}/${_realname}-${pkgver}" - #patch -p1 -i "${srcdir}/doxygen-configure-python2.patch" - patch -p1 -i "${srcdir}/force-win32.patch" - patch -p1 -i "${srcdir}/tmake-unquote.patch" + patch -p1 -i "${srcdir}/cmake-mingw.patch" patch -p1 -i "${srcdir}/fix-casts.patch" - patch -p1 -i "${srcdir}/remove-extra-slashes.patch" } build() { export QTDIR=${MINGW_PREFIX} - cd ${srcdir}/${_realname}-${pkgver} - ./configure \ - --prefix ${MINGW_PREFIX} \ - --bison /usr/bin/bison \ - --with-sqlite3 \ - --sqlite3-path ${MINGW_PREFIX} \ - --shared + + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -Dbuild_wizard=OFF \ + -Dbuild_search=OFF \ + -Duse_sqlite3=ON \ + -Duse_libclang=OFF \ + ../${_realname}-${pkgver} make } package() { - cd ${srcdir}/${_realname}-${pkgver} + cd ${srcdir}/build-${MINGW_CHOST} - #make DESTDIR="${pkgdir}" install - make INSTALL="${pkgdir}${MINGW_PREFIX}" MAN1DIR=share/man/man1 install - #rm -r "${pkgdir}${MINGW_PREFIX}"/share/man + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-doxygen/cmake-mingw.patch b/mingw-w64-doxygen/cmake-mingw.patch new file mode 100644 index 0000000000..e3957c02ef --- /dev/null +++ b/mingw-w64-doxygen/cmake-mingw.patch @@ -0,0 +1,20 @@ +--- doxygen-1.8.10/CMakeLists.txt.orig 2015-06-28 18:20:06.966200000 +0300 ++++ doxygen-1.8.10/CMakeLists.txt 2015-06-28 18:22:44.151800000 +0300 +@@ -44,7 +44,7 @@ + set(EXTRA_LIBS ${CORESERVICES_LIB}) + endif() + +-if (WIN32) ++if (MSVC) + set(ICONV_DIR "${CMAKE_SOURCE_DIR}/winbuild") + set(CMAKE_REQUIRED_DEFINITIONS "-DLIBICONV_STATIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # needed for language.cpp on 64bit +@@ -104,7 +104,7 @@ + link_directories(${CUSTOM_LINK_DIR}) + endif() + +-if (win_static) ++if (win_static AND MSVC) + set(CompilerFlags + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG diff --git a/mingw-w64-doxygen/doxygen-configure-python2.patch b/mingw-w64-doxygen/doxygen-configure-python2.patch deleted file mode 100644 index 9750d1eb2e..0000000000 --- a/mingw-w64-doxygen/doxygen-configure-python2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- doxygen-1.8.6/configure.orig 2013-12-25 20:54:22.171988706 +0000 -+++ doxygen-1.8.6/configure 2013-12-25 20:54:33.405247482 +0000 -@@ -560,7 +560,7 @@ - - printf " Checking for python... " - if test "$f_python" = NO; then -- python_names="python" -+ python_names="python2 python" - python_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" - python_prog=NO - python_found=NO diff --git a/mingw-w64-doxygen/fix-casts.patch b/mingw-w64-doxygen/fix-casts.patch index b1b0857b1c..e5f3fdc5d4 100644 --- a/mingw-w64-doxygen/fix-casts.patch +++ b/mingw-w64-doxygen/fix-casts.patch @@ -1,5 +1,5 @@ ---- doxygen-1.8.6/qtools/scstring.cpp.orig 2013-05-19 19:12:31.000000000 +0400 -+++ doxygen-1.8.6/qtools/scstring.cpp 2014-04-04 06:54:07.313800000 +0400 +--- doxygen-1.8.6/qtools/qcstring.cpp.orig 2013-05-19 19:12:31.000000000 +0400 ++++ doxygen-1.8.6/qtools/qcstring.cpp 2014-04-04 06:54:07.313800000 +0400 @@ -476,7 +476,7 @@ if ( to > first && *(to-1) == 0x20 ) to--; diff --git a/mingw-w64-doxygen/force-win32.patch b/mingw-w64-doxygen/force-win32.patch deleted file mode 100644 index 926df2817a..0000000000 --- a/mingw-w64-doxygen/force-win32.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- doxygen-1.8.6/configure.orig 2014-03-30 15:24:01.362200000 +0400 -+++ doxygen-1.8.6/configure 2014-03-30 15:24:23.046200000 +0400 -@@ -719,6 +719,12 @@ - EOF - fi - -+if test "$f_platform" = "win32-mingw"; then -+ cat >> .makeconfig <> .makeconfig <Makefile.doxyapp -+ $(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp - - strip: - strip doxyapp - - Makefile.doxyapp: doxyapp.pro -- $(ENV) $(PERL) "$(TMAKE)" doxyapp.pro >Makefile.doxyapp -+ $(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp - - install: -diff -Naur doxygen-1.8.6-orig/addon/doxysearch/Makefile.in doxygen-1.8.6/addon/doxysearch/Makefile.in ---- doxygen-1.8.6-orig/addon/doxysearch/Makefile.in 2013-10-07 23:20:02.000000000 +0400 -+++ doxygen-1.8.6/addon/doxysearch/Makefile.in 2014-03-30 15:47:20.893600000 +0400 -@@ -10,17 +10,17 @@ - realclean: distclean - - tmake: -- $(ENV) $(PERL) "$(TMAKE)" doxysearch.pro >Makefile.doxysearch -- $(ENV) $(PERL) "$(TMAKE)" doxyindexer.pro >Makefile.doxyindexer -+ $(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch -+ $(ENV) $(PERL) $(TMAKE) doxyindexer.pro >Makefile.doxyindexer - - strip: - strip doxysearch - - Makefile.doxysearch: doxysearch.pro -- $(ENV) $(PERL) "$(TMAKE)" doxysearch.pro >Makefile.doxysearch -+ $(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch - - Makefile.doxyindexer: doxyindexer.pro -- $(ENV) $(PERL) "$(TMAKE)" doxyindexer.pro >Makefile.doxyindexer -+ $(ENV) $(PERL) $(TMAKE) doxyindexer.pro >Makefile.doxyindexer - - install: - $(INSTTOOL) -d $(INSTALL)/bin -diff -Naur doxygen-1.8.6-orig/libmd5/Makefile.in doxygen-1.8.6/libmd5/Makefile.in ---- doxygen-1.8.6-orig/libmd5/Makefile.in 2013-10-07 23:20:02.000000000 +0400 -+++ doxygen-1.8.6/libmd5/Makefile.in 2014-03-30 15:46:41.503600000 +0400 -@@ -10,9 +10,9 @@ - realclean: distclean - - tmake: -- $(ENV) $(PERL) "$(TMAKE)" libmd5.pro >Makefile.libmd5 -+ $(ENV) $(PERL) $(TMAKE) libmd5.pro >Makefile.libmd5 - - Makefile.libmd5: libmd5.pro -- $(ENV) $(PERL) "$(TMAKE)" libmd5.pro >Makefile.libmd5 -+ $(ENV) $(PERL) $(TMAKE) libmd5.pro >Makefile.libmd5 - - install: -diff -Naur doxygen-1.8.6-orig/qtools/Makefile.in doxygen-1.8.6/qtools/Makefile.in ---- doxygen-1.8.6-orig/qtools/Makefile.in 2013-10-07 23:20:02.000000000 +0400 -+++ doxygen-1.8.6/qtools/Makefile.in 2014-03-30 15:45:06.858400000 +0400 -@@ -17,10 +17,10 @@ - $(MAKE) -f Makefile.qtools $@ - - Makefile.qtools: qtools.pro -- $(ENV) $(PERL) "$(TMAKE)" qtools.pro >Makefile.qtools -+ $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools - - tmake: -- $(ENV) $(PERL) "$(TMAKE)" qtools.pro >Makefile.qtools -+ $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools - - clean: Makefile.qtools - $(MAKE) -f Makefile.qtools clean -diff -Naur doxygen-1.8.6-orig/src/Makefile.in doxygen-1.8.6/src/Makefile.in ---- doxygen-1.8.6-orig/src/Makefile.in 2013-10-07 23:20:02.000000000 +0400 -+++ doxygen-1.8.6/src/Makefile.in 2014-03-30 15:46:08.400400000 +0400 -@@ -20,19 +20,19 @@ - $(MAKE) -f Makefile.doxygen $@ - - Makefile.libdoxygen: libdoxygen.pro libdoxygen.t -- $(ENV) $(PERL) "$(TMAKE)" libdoxygen.pro >Makefile.libdoxygen -+ $(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen - echo 'HEADERS += ' `ls -1 translator_??.h` >>Makefile.libdoxygen - - Makefile.libdoxycfg: libdoxycfg.pro libdoxycfg.t -- $(ENV) $(PERL) "$(TMAKE)" libdoxycfg.pro >Makefile.libdoxycfg -+ $(ENV) $(PERL) $(TMAKE) libdoxycfg.pro >Makefile.libdoxycfg - - Makefile.doxygen: doxygen.pro -- $(ENV) $(PERL) "$(TMAKE)" doxygen.pro >Makefile.doxygen -+ $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen - - tmake: -- $(ENV) $(PERL) "$(TMAKE)" libdoxygen.pro >Makefile.libdoxygen -- $(ENV) $(PERL) "$(TMAKE)" libdoxycfg.pro >Makefile.libdoxycfg -- $(ENV) $(PERL) "$(TMAKE)" doxygen.pro >Makefile.doxygen -+ $(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen -+ $(ENV) $(PERL) $(TMAKE) libdoxycfg.pro >Makefile.libdoxycfg -+ $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen - - # clean objects - clean: Makefile.libdoxygen Makefile.libdoxycfg Makefile.doxygen ---- doxygen-1.8.8/vhdlparser/Makefile.in.orig 2014-08-15 02:46:42.000000000 +0900 -+++ doxygen-1.8.8/vhdlparser/Makefile.in 2014-09-30 17:31:22.033228500 +0900 -@@ -17,10 +17,10 @@ - $(MAKE) -f Makefile.vhdlparser $@ - - Makefile.vhdlparser: vhdlparser.pro -- $(ENV) $(PERL) "$(TMAKE)" vhdlparser.pro >Makefile.vhdlparser -+ $(ENV) $(PERL) $(TMAKE) vhdlparser.pro >Makefile.vhdlparser - - tmake: -- $(ENV) $(PERL) "$(TMAKE)" vhdlparser.pro >Makefile.vhdlparser -+ $(ENV) $(PERL) $(TMAKE) vhdlparser.pro >Makefile.vhdlparser - - clean: Makefile.vhdlparser - $(MAKE) -f Makefile.vhdlparser clean diff --git a/mingw-w64-dragon/PKGBUILD b/mingw-w64-dragon/PKGBUILD new file mode 100644 index 0000000000..ba2e71d48b --- /dev/null +++ b/mingw-w64-dragon/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Bjoern Lemke + +_realname=dragon +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.4.0 +pkgrel=1 +pkgdesc="Dragon parser generator (mingw-w64)" +arch=('any') +url='http://www.lemke-it.com/' +license=('GPL3') + +depends=("${MINGW_PACKAGE_PREFIX}-lfcbase") + +source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz") + +sha256sums=("a2354e3b34fe10b7a7ba94e3fcb34c621409fd89e9d2599f883b2aade92f2277") + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make +} + +check() { + cd "${srcdir}"/build-${CARCH} + make check +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-drmingw-git/PKGBUILD b/mingw-w64-drmingw-git/PKGBUILD index 98251a6ca4..a0459f7cee 100644 --- a/mingw-w64-drmingw-git/PKGBUILD +++ b/mingw-w64-drmingw-git/PKGBUILD @@ -1,20 +1,28 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=drmingw pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r182.867ab17 -pkgrel=1 +pkgver=r450.bc67b75 +pkgrel=2 pkgdesc="Just-in-Time (JIT) debugger (mingw-w64)" arch=('any') -license=('GPL' 'LGPL') +license=(LGPL2.1) depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") +makedepends=(${MINGW_PACKAGE_PREFIX}-discount + ${MINGW_PACKAGE_PREFIX}-cmake + ${MINGW_PACKAGE_PREFIX}-gcc + git) provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") url=('https://github.com/jrfonseca/drmingw') -source=("${_realname}"::"git+https://github.com/jrfonseca/drmingw.git") +source=("${_realname}"::"git+https://github.com/jrfonseca/drmingw.git" + import-libs.patch + install-files.patch) options=(!strip staticlibs) -md5sums=('SKIP') +md5sums=('SKIP' + 'f0bdef5500486400e127257985ba9319' + '7a8b0bd82b4c80ee1c923bab7bd552d0') pkgver() { cd "$srcdir/$_realname" @@ -23,13 +31,14 @@ pkgver() { prepare() { cd ${_realname} - #patch -p1 -i ${srcdir}/build-fixes.patch + #patch -p1 -i ${srcdir}/import-libs.patch + patch -p1 -i ${srcdir}/install-files.patch } build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ @@ -40,8 +49,14 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" make -j1 install - rm -rf "${pkgdir}${MINGW_PREFIX}"/doc - rm -rf "${pkgdir}${MINGW_PREFIX}"/sample - install -Dm644 "${srcdir}/${_realname}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + # License files + cd "${pkgdir}${MINGW_PREFIX}/share" + mkdir -p licenses/${_realname} + mv doc/${_realname}/LICENSE* licenses/${_realname} + + # Readme + cd "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + markdown README.md > README.html + rm README.md } diff --git a/mingw-w64-drmingw-git/import-libs.patch b/mingw-w64-drmingw-git/import-libs.patch new file mode 100644 index 0000000000..0c4c7d2c95 --- /dev/null +++ b/mingw-w64-drmingw-git/import-libs.patch @@ -0,0 +1,679 @@ +--- drmingw/CMakeLists.txt.orig 2015-06-21 14:48:57.330400000 +0300 ++++ drmingw/CMakeLists.txt 2015-06-21 14:49:03.554800000 +0300 +@@ -60,11 +60,6 @@ + add_linker_flags (-static-libstdc++) + endif () + +-if (CMAKE_SIZEOF_VOID_P EQUAL 4) +- add_linker_flags (-Wl,--enable-stdcall-fixup) +- set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--kill-at") +-endif () +- + # Put all executables into top-level bin subdirectory + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +--- drmingw/src/exchndl/CMakeLists.txt.orig 2015-06-20 21:46:52.998600000 +0300 ++++ drmingw/src/exchndl/CMakeLists.txt 2015-06-20 21:46:57.741000000 +0300 +@@ -1,6 +1,11 @@ +-add_library (exchndl MODULE ++if (CMAKE_SIZEOF_VOID_P EQUAL 4) ++ set (EXCHNDL_DEF exchndl32.def) ++else () ++ set (EXCHNDL_DEF exchndl.def) ++endif () ++add_library (exchndl SHARED + exchndl.c +- exchndl.def ++ ${EXCHNDL_DEF} + version.rc + ) + +@@ -15,4 +15,8 @@ + PREFIX "" + ) + +-install (TARGETS exchndl LIBRARY DESTINATION bin) ++install (TARGETS exchndl ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +--- /dev/null 2015-06-21 14:20:14.000000000 +0300 ++++ drmingw/src/exchndl/exchndl32.def 2015-06-21 14:18:57.437200000 +0300 +@@ -0,0 +1,5 @@ ++EXPORTS ++ ExcHndlInit@0 ++ ExcHndlInit = ExcHndlInit@0 ++ ExcHndlSetLogFileNameA@4 ++ ExcHndlSetLogFileNameA = ExcHndlSetLogFileNameA@4 +--- drmingw/src/mgwhelp/CMakeLists.txt.orig 2015-06-20 21:56:28.342000000 +0300 ++++ drmingw/src/mgwhelp/CMakeLists.txt 2015-06-20 22:08:56.832200000 +0300 +@@ -1,7 +1,9 @@ + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set (MGWHELP_DEF mgwhelp32.def) ++ set (DBGHELP_DEF dbghelp32.def) + else () + set (MGWHELP_DEF mgwhelp64.def) ++ set (DBGHELP_DEF dbghelp64.def) + endif () + + add_library (mgwhelp SHARED +@@ -23,27 +25,13 @@ + LINKER_LANGUAGE CXX # for __cxa_demangle + ) + +-install (TARGETS mgwhelp RUNTIME DESTINATION bin) ++install (TARGETS mgwhelp ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) + +-if (CMAKE_SIZEOF_VOID_P EQUAL 4) +- # XXX: We need to use a custom import lib to avoid link failures +- get_filename_component (GCC_NAME ${CMAKE_C_COMPILER} NAME) +- string (REPLACE gcc dlltool DLLTOOL_NAME ${GCC_NAME}) +- find_program (DLLTOOL NAMES ${DLLTOOL_NAME}) +- if (DLLTOOL) +- message (STATUS "Found dlltool: ${DLLTOOL}") +- else () +- message (FATAL_ERROR "dlltool not found") +- endif () +- set (MGWHELP_IMPLIB ${CMAKE_CURRENT_BINARY_DIR}/libmgwhelp.a) +- add_custom_command ( +- OUTPUT ${MGWHELP_IMPLIB} +- COMMAND ${DLLTOOL} --output-lib ${MGWHELP_IMPLIB} --dllname mgwhelp.dll --kill-at --input-def=${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.def +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.def +- ) +-else () +- set (MGWHELP_IMPLIB mgwhelp) +-endif () ++set (MGWHELP_IMPLIB mgwhelp) + set (MGWHELP_IMPLIB ${MGWHELP_IMPLIB} PARENT_SCOPE) + + add_custom_target (mgwhelp_implib DEPENDS mgwhelp ${MGWHELP_IMPLIB}) +--- /dev/null 2015-06-22 09:25:15.000000000 +0300 ++++ drmingw/src/mgwhelp/dbghelp64.def 2015-06-22 09:24:34.433800000 +0300 +@@ -0,0 +1,109 @@ ++LIBRARY dbghelp.dll ++ ++EXPORTS ++ EnumDirTree ++ EnumDirTreeW ++ EnumerateLoadedModules ++ EnumerateLoadedModules64 ++ EnumerateLoadedModulesW64 ++ ExtensionApiVersion ++ FindDebugInfoFile ++ FindDebugInfoFileEx ++ FindExecutableImage ++ FindExecutableImageEx ++ FindExecutableImageExW ++ GetTimestampForLoadedLibrary ++ ImageDirectoryEntryToData ++ ImageDirectoryEntryToDataEx ++ ImageNtHeader ++ ImageRvaToSection ++ ImageRvaToVa ++ ImagehlpApiVersion ++ ImagehlpApiVersionEx ++ MakeSureDirectoryPathExists ++ MapDebugInformation ++ MiniDumpReadDumpStream ++ MiniDumpWriteDump ++ SearchTreeForFile ++ SearchTreeForFileW ++ StackWalk ++ StackWalk64 ++ SymAddSymbol ++ SymAddSymbolW ++ SymCleanup ++ SymEnumLines ++ SymEnumSourceFiles ++ SymEnumSymbols ++ SymEnumSymbolsW ++ SymEnumTypes ++ SymEnumTypesW ++ SymEnumerateModules ++ SymEnumerateModules64 ++ SymEnumerateModulesW64 ++ SymEnumerateSymbols ++ SymEnumerateSymbols64 ++ SymFindFileInPath ++ SymFindFileInPathW ++ SymFromAddr ++ SymFromAddrW ++ SymFromName ++ SymFunctionTableAccess ++ SymFunctionTableAccess64 ++ SymGetLineFromAddr ++ SymGetLineFromAddr64 ++ SymGetLineFromAddrW64 ++ SymGetLineNext ++ SymGetLineNext64 ++ SymGetLinePrev ++ SymGetLinePrev64 ++ SymGetModuleBase ++ SymGetModuleBase64 ++ SymGetModuleInfo ++ SymGetModuleInfo64 ++ SymGetModuleInfoW ++ SymGetModuleInfoW64 ++ SymGetOptions ++ SymGetSearchPath ++ SymGetSearchPathW ++ SymGetSourceFileToken ++ SymGetSourceFileTokenW ++ SymGetSymFromAddr ++ SymGetSymFromAddr64 ++ SymGetSymFromName ++ SymGetSymFromName64 ++ SymGetSymNext ++ SymGetSymNext64 ++ SymGetSymPrev ++ SymGetSymPrev64 ++ SymGetTypeFromName ++ SymGetTypeInfo ++ SymInitialize ++ SymInitializeW ++ SymLoadModule ++ SymLoadModule64 ++ SymLoadModuleEx ++ SymLoadModuleExW ++ SymMatchFileName ++ SymMatchFileNameW ++ SymMatchString ++ SymRefreshModuleList ++ SymRegisterCallback ++ SymRegisterCallback64 ++ SymRegisterCallbackW64 ++ SymRegisterFunctionEntryCallback ++ SymRegisterFunctionEntryCallback64 ++ SymSearch ++ SymSearchW ++ SymSetContext ++ SymSetOptions ++ SymSetParentWindow ++ SymSetScopeFromAddr ++ SymSetSearchPath ++ SymSetSearchPathW ++ SymUnDName ++ SymUnDName64 ++ SymUnloadModule ++ SymUnloadModule64 ++ UnDecorateSymbolName ++ UnmapDebugInformation ++ WinDbgExtensionDllInit +--- drmingw/src/mgwhelp/dbghelp.def 2015-06-23 09:28:20.819800000 +0300 ++++ /dev/null 2015-06-23 09:28:55.000000000 +0300 +@@ -1,109 +0,0 @@ +-LIBRARY dbghelp.dll +- +-EXPORTS +- EnumDirTree@24 +- EnumDirTreeW@24 +- EnumerateLoadedModules@12 +- EnumerateLoadedModules64@12 +- EnumerateLoadedModulesW64@12 +- ExtensionApiVersion@0 +- FindDebugInfoFile@12 +- FindDebugInfoFileEx@20 +- FindExecutableImage@12 +- FindExecutableImageEx@20 +- FindExecutableImageExW@20 +- GetTimestampForLoadedLibrary@4 +- ImageDirectoryEntryToData@16 +- ImageDirectoryEntryToDataEx@20 +- ImageNtHeader@4 +- ImageRvaToSection@12 +- ImageRvaToVa@16 +- ImagehlpApiVersion@0 +- ImagehlpApiVersionEx@4 +- MakeSureDirectoryPathExists@4 +- MapDebugInformation@16 +- MiniDumpReadDumpStream@20 +- MiniDumpWriteDump@28 +- SearchTreeForFile@12 +- SearchTreeForFileW@12 +- StackWalk@36 +- StackWalk64@36 +- SymAddSymbol@32 +- SymAddSymbolW@32 +- SymCleanup@4 +- SymEnumLines@28 +- SymEnumSourceFiles@24 +- SymEnumSymbols@24 +- SymEnumSymbolsW@24 +- SymEnumTypes@20 +- SymEnumTypesW@20 +- SymEnumerateModules@12 +- SymEnumerateModules64@12 +- SymEnumerateModulesW64@12 +- SymEnumerateSymbols@16 +- SymEnumerateSymbols64@20 +- SymFindFileInPath@40 +- SymFindFileInPathW@40 +- SymFromAddr@20 +- SymFromAddrW@20 +- SymFromName@12 +- SymFunctionTableAccess@8 +- SymFunctionTableAccess64@12 +- SymGetLineFromAddr@16 +- SymGetLineFromAddr64@20 +- SymGetLineFromAddrW64@20 +- SymGetLineNext@8 +- SymGetLineNext64@8 +- SymGetLinePrev@8 +- SymGetLinePrev64@8 +- SymGetModuleBase@8 +- SymGetModuleBase64@12 +- SymGetModuleInfo@12 +- SymGetModuleInfo64@16 +- SymGetModuleInfoW@12 +- SymGetModuleInfoW64@16 +- SymGetOptions@0 +- SymGetSearchPath@12 +- SymGetSearchPathW@12 +- SymGetSourceFileToken@24 +- SymGetSourceFileTokenW@24 +- SymGetSymFromAddr@16 +- SymGetSymFromAddr64@20 +- SymGetSymFromName@12 +- SymGetSymFromName64@12 +- SymGetSymNext@8 +- SymGetSymNext64@8 +- SymGetSymPrev@8 +- SymGetSymPrev64@8 +- SymGetTypeFromName@20 +- SymGetTypeInfo@24 +- SymInitialize@12 +- SymInitializeW@12 +- SymLoadModule@24 +- SymLoadModule64@28 +- SymLoadModuleEx@36 +- SymLoadModuleExW@36 +- SymMatchFileName@16 +- SymMatchFileNameW@16 +- SymMatchString@12 +- SymRefreshModuleList@4 +- SymRegisterCallback@12 +- SymRegisterCallback64@16 +- SymRegisterCallbackW64@16 +- SymRegisterFunctionEntryCallback@12 +- SymRegisterFunctionEntryCallback64@16 +- SymSearch@44 +- SymSearchW@44 +- SymSetContext@12 +- SymSetOptions@4 +- SymSetParentWindow@4 +- SymSetScopeFromAddr@12 +- SymSetSearchPath@8 +- SymSetSearchPathW@8 +- SymUnDName@12 +- SymUnDName64@12 +- SymUnloadModule@8 +- SymUnloadModule64@12 +- UnDecorateSymbolName@16 +- UnmapDebugInformation@4 +- WinDbgExtensionDllInit@12 +--- /dev/null 2015-06-23 09:37:49.000000000 +0300 ++++ drmingw/src/mgwhelp/dbghelp32.def 2015-06-23 09:37:32.394200000 +0300 +@@ -0,0 +1,216 @@ ++LIBRARY dbghelp.dll ++ ++EXPORTS ++ EnumDirTree@24 ++ EnumDirTreeW@24 ++ EnumerateLoadedModules@12 ++ EnumerateLoadedModules64@12 ++ EnumerateLoadedModulesW64@12 ++ ExtensionApiVersion@0 ++ FindDebugInfoFile@12 ++ FindDebugInfoFileEx@20 ++ FindExecutableImage@12 ++ FindExecutableImageEx@20 ++ FindExecutableImageExW@20 ++ GetTimestampForLoadedLibrary@4 ++ ImageDirectoryEntryToData@16 ++ ImageDirectoryEntryToDataEx@20 ++ ImageNtHeader@4 ++ ImageRvaToSection@12 ++ ImageRvaToVa@16 ++ ImagehlpApiVersion@0 ++ ImagehlpApiVersionEx@4 ++ MakeSureDirectoryPathExists@4 ++ MapDebugInformation@16 ++ MiniDumpReadDumpStream@20 ++ MiniDumpWriteDump@28 ++ SearchTreeForFile@12 ++ SearchTreeForFileW@12 ++ StackWalk@36 ++ StackWalk64@36 ++ SymAddSymbol@32 ++ SymAddSymbolW@32 ++ SymCleanup@4 ++ SymEnumLines@28 ++ SymEnumSourceFiles@24 ++ SymEnumSymbols@24 ++ SymEnumSymbolsW@24 ++ SymEnumTypes@20 ++ SymEnumTypesW@20 ++ SymEnumerateModules@12 ++ SymEnumerateModules64@12 ++ SymEnumerateModulesW64@12 ++ SymEnumerateSymbols@16 ++ SymEnumerateSymbols64@20 ++ SymFindFileInPath@40 ++ SymFindFileInPathW@40 ++ SymFromAddr@20 ++ SymFromAddrW@20 ++ SymFromName@12 ++ SymFunctionTableAccess@8 ++ SymFunctionTableAccess64@12 ++ SymGetLineFromAddr@16 ++ SymGetLineFromAddr64@20 ++ SymGetLineFromAddrW64@20 ++ SymGetLineNext@8 ++ SymGetLineNext64@8 ++ SymGetLinePrev@8 ++ SymGetLinePrev64@8 ++ SymGetModuleBase@8 ++ SymGetModuleBase64@12 ++ SymGetModuleInfo@12 ++ SymGetModuleInfo64@16 ++ SymGetModuleInfoW@12 ++ SymGetModuleInfoW64@16 ++ SymGetOptions@0 ++ SymGetSearchPath@12 ++ SymGetSearchPathW@12 ++ SymGetSourceFileToken@24 ++ SymGetSourceFileTokenW@24 ++ SymGetSymFromAddr@16 ++ SymGetSymFromAddr64@20 ++ SymGetSymFromName@12 ++ SymGetSymFromName64@12 ++ SymGetSymNext@8 ++ SymGetSymNext64@8 ++ SymGetSymPrev@8 ++ SymGetSymPrev64@8 ++ SymGetTypeFromName@20 ++ SymGetTypeInfo@24 ++ SymInitialize@12 ++ SymInitializeW@12 ++ SymLoadModule@24 ++ SymLoadModule64@28 ++ SymLoadModuleEx@36 ++ SymLoadModuleExW@36 ++ SymMatchFileName@16 ++ SymMatchFileNameW@16 ++ SymMatchString@12 ++ SymRefreshModuleList@4 ++ SymRegisterCallback@12 ++ SymRegisterCallback64@16 ++ SymRegisterCallbackW64@16 ++ SymRegisterFunctionEntryCallback@12 ++ SymRegisterFunctionEntryCallback64@16 ++ SymSearch@44 ++ SymSearchW@44 ++ SymSetContext@12 ++ SymSetOptions@4 ++ SymSetParentWindow@4 ++ SymSetScopeFromAddr@12 ++ SymSetSearchPath@8 ++ SymSetSearchPathW@8 ++ SymUnDName@12 ++ SymUnDName64@12 ++ SymUnloadModule@8 ++ SymUnloadModule64@12 ++ UnDecorateSymbolName@16 ++ UnmapDebugInformation@4 ++ WinDbgExtensionDllInit@12 ++ ++ EnumDirTree = EnumDirTree@24 ++ EnumDirTreeW = EnumDirTreeW@24 ++ EnumerateLoadedModules = EnumerateLoadedModules@12 ++ EnumerateLoadedModules64 = EnumerateLoadedModules64@12 ++ EnumerateLoadedModulesW64 = EnumerateLoadedModulesW64@12 ++ ExtensionApiVersion = ExtensionApiVersion@0 ++ FindDebugInfoFile = FindDebugInfoFile@12 ++ FindDebugInfoFileEx = FindDebugInfoFileEx@20 ++ FindExecutableImage = FindExecutableImage@12 ++ FindExecutableImageEx = FindExecutableImageEx@20 ++ FindExecutableImageExW = FindExecutableImageExW@20 ++ GetTimestampForLoadedLibrary = GetTimestampForLoadedLibrary@4 ++ ImageDirectoryEntryToData = ImageDirectoryEntryToData@16 ++ ImageDirectoryEntryToDataEx = ImageDirectoryEntryToDataEx@20 ++ ImageNtHeader = ImageNtHeader@4 ++ ImageRvaToSection = ImageRvaToSection@12 ++ ImageRvaToVa = ImageRvaToVa@16 ++ ImagehlpApiVersion = ImagehlpApiVersion@0 ++ ImagehlpApiVersionEx = ImagehlpApiVersionEx@4 ++ MakeSureDirectoryPathExists = MakeSureDirectoryPathExists@4 ++ MapDebugInformation = MapDebugInformation@16 ++ MiniDumpReadDumpStream = MiniDumpReadDumpStream@20 ++ MiniDumpWriteDump = MiniDumpWriteDump@28 ++ SearchTreeForFile = SearchTreeForFile@12 ++ SearchTreeForFileW = SearchTreeForFileW@12 ++ StackWalk = StackWalk@36 ++ StackWalk64 = StackWalk64@36 ++ SymAddSymbol = SymAddSymbol@32 ++ SymAddSymbolW = SymAddSymbolW@32 ++ SymCleanup = SymCleanup@4 ++ SymEnumLines = SymEnumLines@28 ++ SymEnumSourceFiles = SymEnumSourceFiles@24 ++ SymEnumSymbols = SymEnumSymbols@24 ++ SymEnumSymbolsW = SymEnumSymbolsW@24 ++ SymEnumTypes = SymEnumTypes@20 ++ SymEnumTypesW = SymEnumTypesW@20 ++ SymEnumerateModules = SymEnumerateModules@12 ++ SymEnumerateModules64 = SymEnumerateModules64@12 ++ SymEnumerateModulesW64 = SymEnumerateModulesW64@12 ++ SymEnumerateSymbols = SymEnumerateSymbols@16 ++ SymEnumerateSymbols64 = SymEnumerateSymbols64@20 ++ SymFindFileInPath = SymFindFileInPath@40 ++ SymFindFileInPathW = SymFindFileInPathW@40 ++ SymFromAddr = SymFromAddr@20 ++ SymFromAddrW = SymFromAddrW@20 ++ SymFromName = SymFromName@12 ++ SymFunctionTableAccess = SymFunctionTableAccess@8 ++ SymFunctionTableAccess64 = SymFunctionTableAccess64@12 ++ SymGetLineFromAddr = SymGetLineFromAddr@16 ++ SymGetLineFromAddr64 = SymGetLineFromAddr64@20 ++ SymGetLineFromAddrW64 = SymGetLineFromAddrW64@20 ++ SymGetLineNext = SymGetLineNext@8 ++ SymGetLineNext64 = SymGetLineNext64@8 ++ SymGetLinePrev = SymGetLinePrev@8 ++ SymGetLinePrev64 = SymGetLinePrev64@8 ++ SymGetModuleBase = SymGetModuleBase@8 ++ SymGetModuleBase64 = SymGetModuleBase64@12 ++ SymGetModuleInfo = SymGetModuleInfo@12 ++ SymGetModuleInfo64 = SymGetModuleInfo64@16 ++ SymGetModuleInfoW = SymGetModuleInfoW@12 ++ SymGetModuleInfoW64 = SymGetModuleInfoW64@16 ++ SymGetOptions = SymGetOptions@0 ++ SymGetSearchPath = SymGetSearchPath@12 ++ SymGetSearchPathW = SymGetSearchPathW@12 ++ SymGetSourceFileToken = SymGetSourceFileToken@24 ++ SymGetSourceFileTokenW = SymGetSourceFileTokenW@24 ++ SymGetSymFromAddr = SymGetSymFromAddr@16 ++ SymGetSymFromAddr64 = SymGetSymFromAddr64@20 ++ SymGetSymFromName = SymGetSymFromName@12 ++ SymGetSymFromName64 = SymGetSymFromName64@12 ++ SymGetSymNext = SymGetSymNext@8 ++ SymGetSymNext64 = SymGetSymNext64@8 ++ SymGetSymPrev = SymGetSymPrev@8 ++ SymGetSymPrev64 = SymGetSymPrev64@8 ++ SymGetTypeFromName = SymGetTypeFromName@20 ++ SymGetTypeInfo = SymGetTypeInfo@24 ++ SymInitialize = SymInitialize@12 ++ SymInitializeW = SymInitializeW@12 ++ SymLoadModule = SymLoadModule@24 ++ SymLoadModule64 = SymLoadModule64@28 ++ SymLoadModuleEx = SymLoadModuleEx@36 ++ SymLoadModuleExW = SymLoadModuleExW@36 ++ SymMatchFileName = SymMatchFileName@16 ++ SymMatchFileNameW = SymMatchFileNameW@16 ++ SymMatchString = SymMatchString@12 ++ SymRefreshModuleList = SymRefreshModuleList@4 ++ SymRegisterCallback = SymRegisterCallback@12 ++ SymRegisterCallback64 = SymRegisterCallback64@16 ++ SymRegisterCallbackW64 = SymRegisterCallbackW64@16 ++ SymRegisterFunctionEntryCallback = SymRegisterFunctionEntryCallback@12 ++ SymRegisterFunctionEntryCallback64 = SymRegisterFunctionEntryCallback64@16 ++ SymSearch = SymSearch@44 ++ SymSearchW = SymSearchW@44 ++ SymSetContext = SymSetContext@12 ++ SymSetOptions = SymSetOptions@4 ++ SymSetParentWindow = SymSetParentWindow@4 ++ SymSetScopeFromAddr = SymSetScopeFromAddr@12 ++ SymSetSearchPath = SymSetSearchPath@8 ++ SymSetSearchPathW = SymSetSearchPathW@8 ++ SymUnDName = SymUnDName@12 ++ SymUnDName64 = SymUnDName64@12 ++ SymUnloadModule = SymUnloadModule@8 ++ SymUnloadModule64 = SymUnloadModule64@12 ++ UnDecorateSymbolName = UnDecorateSymbolName@16 ++ UnmapDebugInformation = UnmapDebugInformation@4 ++ WinDbgExtensionDllInit = WinDbgExtensionDllInit@12 +--- drmingw/src/mgwhelp/mgwhelp32.def.orig 2015-06-23 09:38:41.159000000 +0300 ++++ drmingw/src/mgwhelp/mgwhelp32.def 2015-06-23 09:52:50.813000000 +0300 +@@ -8,9 +8,22 @@ + SymFromAddrW@20 = MgwSymFromAddrW@20 + SymGetLineFromAddr64@20 = MgwSymGetLineFromAddr64@20 + SymGetLineFromAddrW64@20 = MgwSymGetLineFromAddrW64@20 +- SymLoadModuleEx@36 = MgwSymLoadModuleEx@36 +- SymLoadModuleExW@36 = MgwSymLoadModuleExW@36 +- UnDecorateSymbolName@16 = MgwUnDecorateSymbolName@16 ++ SymLoadModuleEx@36 = MgwSymLoadModuleEx@36 ++ SymLoadModuleExW@36 = MgwSymLoadModuleExW@36 ++ UnDecorateSymbolName@16 = MgwUnDecorateSymbolName@16 ++ ++ SymInitialize = SymInitialize@12 ++ SymInitializeW = SymInitializeW@12 ++ SymCleanup = SymCleanup@4 ++ SymSetOptions = SymSetOptions@4 ++ SymGetModuleBase64 = SymGetModuleBase64@12 ++ SymFromAddr = SymFromAddr@20 ++ SymFromAddrW = SymFromAddrW@20 ++ SymGetLineFromAddr64 = SymGetLineFromAddr64@20 ++ SymGetLineFromAddrW64 = SymGetLineFromAddrW64@20 ++ SymLoadModuleEx = SymLoadModuleEx@36 ++ SymLoadModuleExW = SymLoadModuleExW@36 ++ UnDecorateSymbolName = UnDecorateSymbolName@16 + + EnumDirTree@24 + EnumDirTreeW@24 +@@ -104,3 +104,98 @@ + SymUnloadModule64@12 + UnmapDebugInformation@4 + WinDbgExtensionDllInit@12 ++ ++ EnumDirTree = EnumDirTree@24 ++ EnumDirTreeW = EnumDirTreeW@24 ++ EnumerateLoadedModules = EnumerateLoadedModules@12 ++ EnumerateLoadedModules64 = EnumerateLoadedModules64@12 ++ EnumerateLoadedModulesW64 = EnumerateLoadedModulesW64@12 ++ ExtensionApiVersion = ExtensionApiVersion@0 ++ FindDebugInfoFile = FindDebugInfoFile@12 ++ FindDebugInfoFileEx = FindDebugInfoFileEx@20 ++ FindExecutableImage = FindExecutableImage@12 ++ FindExecutableImageEx = FindExecutableImageEx@20 ++ FindExecutableImageExW = FindExecutableImageExW@20 ++ GetTimestampForLoadedLibrary = GetTimestampForLoadedLibrary@4 ++ ImageDirectoryEntryToData = ImageDirectoryEntryToData@16 ++ ImageDirectoryEntryToDataEx = ImageDirectoryEntryToDataEx@20 ++ ImageNtHeader = ImageNtHeader@4 ++ ImageRvaToSection = ImageRvaToSection@12 ++ ImageRvaToVa = ImageRvaToVa@16 ++ ImagehlpApiVersion = ImagehlpApiVersion@0 ++ ImagehlpApiVersionEx = ImagehlpApiVersionEx@4 ++ MakeSureDirectoryPathExists = MakeSureDirectoryPathExists@4 ++ MapDebugInformation = MapDebugInformation@16 ++ MiniDumpReadDumpStream = MiniDumpReadDumpStream@20 ++ MiniDumpWriteDump = MiniDumpWriteDump@28 ++ SearchTreeForFile = SearchTreeForFile@12 ++ SearchTreeForFileW = SearchTreeForFileW@12 ++ StackWalk = StackWalk@36 ++ StackWalk64 = StackWalk64@36 ++ SymAddSymbol = SymAddSymbol@32 ++ SymAddSymbolW = SymAddSymbolW@32 ++ SymEnumLines = SymEnumLines@28 ++ SymEnumSourceFiles = SymEnumSourceFiles@24 ++ SymEnumSymbols = SymEnumSymbols@24 ++ SymEnumSymbolsW = SymEnumSymbolsW@24 ++ SymEnumTypes = SymEnumTypes@20 ++ SymEnumTypesW = SymEnumTypesW@20 ++ SymEnumerateModules = SymEnumerateModules@12 ++ SymEnumerateModules64 = SymEnumerateModules64@12 ++ SymEnumerateModulesW64 = SymEnumerateModulesW64@12 ++ SymEnumerateSymbols = SymEnumerateSymbols@16 ++ SymEnumerateSymbols64 = SymEnumerateSymbols64@20 ++ SymFindFileInPath = SymFindFileInPath@40 ++ SymFindFileInPathW = SymFindFileInPathW@40 ++ SymFromName = SymFromName@12 ++ SymFunctionTableAccess = SymFunctionTableAccess@8 ++ SymFunctionTableAccess64 = SymFunctionTableAccess64@12 ++ SymGetLineFromAddr = SymGetLineFromAddr@16 ++ SymGetLineNext = SymGetLineNext@8 ++ SymGetLineNext64 = SymGetLineNext64@8 ++ SymGetLinePrev = SymGetLinePrev@8 ++ SymGetLinePrev64 = SymGetLinePrev64@8 ++ SymGetModuleBase = SymGetModuleBase@8 ++ SymGetModuleInfo = SymGetModuleInfo@12 ++ SymGetModuleInfo64 = SymGetModuleInfo64@16 ++ SymGetModuleInfoW = SymGetModuleInfoW@12 ++ SymGetModuleInfoW64 = SymGetModuleInfoW64@16 ++ SymGetOptions = SymGetOptions@0 ++ SymGetSearchPath = SymGetSearchPath@12 ++ SymGetSearchPathW = SymGetSearchPathW@12 ++ SymGetSourceFileToken = SymGetSourceFileToken@24 ++ SymGetSourceFileTokenW = SymGetSourceFileTokenW@24 ++ SymGetSymFromAddr = SymGetSymFromAddr@16 ++ SymGetSymFromAddr64 = SymGetSymFromAddr64@20 ++ SymGetSymFromName = SymGetSymFromName@12 ++ SymGetSymFromName64 = SymGetSymFromName64@12 ++ SymGetSymNext = SymGetSymNext@8 ++ SymGetSymNext64 = SymGetSymNext64@8 ++ SymGetSymPrev = SymGetSymPrev@8 ++ SymGetSymPrev64 = SymGetSymPrev64@8 ++ SymGetTypeFromName = SymGetTypeFromName@20 ++ SymGetTypeInfo = SymGetTypeInfo@24 ++ SymLoadModule = SymLoadModule@24 ++ SymLoadModule64 = SymLoadModule64@28 ++ SymMatchFileName = SymMatchFileName@16 ++ SymMatchFileNameW = SymMatchFileNameW@16 ++ SymMatchString = SymMatchString@12 ++ SymRefreshModuleList = SymRefreshModuleList@4 ++ SymRegisterCallback = SymRegisterCallback@12 ++ SymRegisterCallback64 = SymRegisterCallback64@16 ++ SymRegisterCallbackW64 = SymRegisterCallbackW64@16 ++ SymRegisterFunctionEntryCallback = SymRegisterFunctionEntryCallback@12 ++ SymRegisterFunctionEntryCallback64 = SymRegisterFunctionEntryCallback64@16 ++ SymSearch = SymSearch@44 ++ SymSearchW = SymSearchW@44 ++ SymSetContext = SymSetContext@12 ++ SymSetParentWindow = SymSetParentWindow@4 ++ SymSetScopeFromAddr = SymSetScopeFromAddr@12 ++ SymSetSearchPath = SymSetSearchPath@8 ++ SymSetSearchPathW = SymSetSearchPathW@8 ++ SymUnDName = SymUnDName@12 ++ SymUnDName64 = SymUnDName64@12 ++ SymUnloadModule = SymUnloadModule@8 ++ SymUnloadModule64 = SymUnloadModule64@12 ++ UnmapDebugInformation = UnmapDebugInformation@4 ++ WinDbgExtensionDllInit = WinDbgExtensionDllInit@12 +--- drmingw/src/mgwhelp/mgwhelp64.def.orig 2015-06-23 09:39:21.126200000 +0300 ++++ drmingw/src/mgwhelp/mgwhelp64.def 2015-06-23 09:39:32.576600000 +0300 +@@ -8,9 +8,9 @@ + SymFromAddrW = MgwSymFromAddrW + SymGetLineFromAddr64 = MgwSymGetLineFromAddr64 + SymGetLineFromAddrW64 = MgwSymGetLineFromAddrW64 +- SymLoadModuleEx = MgwSymLoadModuleEx +- SymLoadModuleExW = MgwSymLoadModuleExW +- UnDecorateSymbolName = MgwUnDecorateSymbolName ++ SymLoadModuleEx = MgwSymLoadModuleEx ++ SymLoadModuleExW = MgwSymLoadModuleExW ++ UnDecorateSymbolName = MgwUnDecorateSymbolName + + EnumDirTree + EnumDirTreeW diff --git a/mingw-w64-drmingw-git/install-files.patch b/mingw-w64-drmingw-git/install-files.patch new file mode 100644 index 0000000000..66fe95f821 --- /dev/null +++ b/mingw-w64-drmingw-git/install-files.patch @@ -0,0 +1,31 @@ +--- drmingw/CMakeLists.txt.orig 2015-06-21 14:26:32.215200000 +0300 ++++ drmingw/CMakeLists.txt 2015-06-21 14:27:19.342800000 +0300 +@@ -120,7 +120,7 @@ + FILES + LICENSE.txt + README.md +- DESTINATION doc ++ DESTINATION share/doc/drmingw + ) + + # cpack mistakenly detects Mingw-w64 as win32 +--- drmingw/sample/CMakeLists.txt.orig 2015-06-21 14:27:55.165000000 +0300 ++++ drmingw/sample/CMakeLists.txt 2015-06-21 14:28:26.833000000 +0300 +@@ -6,5 +6,5 @@ + add_dependencies (sample exchndl) + target_link_libraries (sample $) + +-install (FILES sample.cpp DESTINATION sample) +-install (FILES sample.mak DESTINATION sample RENAME Makefile) ++install (FILES sample.cpp DESTINATION share/drmingw/sample) ++install (FILES sample.mak DESTINATION share/drmingw/sample RENAME Makefile) +--- drmingw/thirdparty/dwarf/CMakeLists.txt.orig 2015-06-21 14:33:35.812200000 +0300 ++++ drmingw/thirdparty/dwarf/CMakeLists.txt 2015-06-21 14:33:45.733800000 +0300 +@@ -38,6 +38,6 @@ + + install ( + FILES LIBDWARFCOPYRIGHT +- DESTINATION doc ++ DESTINATION share/doc/drmingw + RENAME LICENSE-libdwarf.txt + ) diff --git a/mingw-w64-drmingw/PKGBUILD b/mingw-w64-drmingw/PKGBUILD new file mode 100644 index 0000000000..95de650c37 --- /dev/null +++ b/mingw-w64-drmingw/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Alexey Pavlov +# Contributor: Renato Silva + +_realname=drmingw +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}) +pkgver=0.7.4 +pkgrel=2 +pkgdesc="Just-in-Time (JIT) debugger (mingw-w64)" +arch=('any') +license=(LGPL2.1) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=(${MINGW_PACKAGE_PREFIX}-discount + ${MINGW_PACKAGE_PREFIX}-cmake + ${MINGW_PACKAGE_PREFIX}-gcc) +url=('https://github.com/jrfonseca/drmingw') +source=(${_realname}-${pkgver}.tar.gz::"https://github.com/jrfonseca/drmingw/archive/${pkgver}.tar.gz" + import-libs.patch + install-files.patch) +options=(!strip staticlibs) +md5sums=('17a3df69abe4c2c46fc6aaabfb209e58' + '95cf2d64efb65e035b96f58e9272798e' + '5e8f6c0cf54d73b0232ae759ed950008') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + #patch -p1 -i ${srcdir}/import-libs.patch + patch -p1 -i ${srcdir}/install-files.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} -j1 install + + # License files + cd "${pkgdir}${MINGW_PREFIX}/share" + mkdir -p licenses/${_realname} + mv doc/${_realname}/LICENSE* licenses/${_realname} + + # Readme + cd "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + markdown README.md > README.html + rm README.md +} diff --git a/mingw-w64-drmingw/import-libs.patch b/mingw-w64-drmingw/import-libs.patch new file mode 100644 index 0000000000..2078b085a1 --- /dev/null +++ b/mingw-w64-drmingw/import-libs.patch @@ -0,0 +1,192 @@ +--- drmingw/CMakeLists.txt.orig 2015-06-21 14:48:57.330400000 +0300 ++++ drmingw/CMakeLists.txt 2015-06-21 14:49:03.554800000 +0300 +@@ -60,10 +60,6 @@ + set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libstdc++") + endif () + +-if (CMAKE_SIZEOF_VOID_P EQUAL 4) +- set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--kill-at") +-endif () +- + # Put all executables into top-level bin subdirectory + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +--- drmingw/src/exchndl/CMakeLists.txt.orig 2015-06-20 21:46:52.998600000 +0300 ++++ drmingw/src/exchndl/CMakeLists.txt 2015-06-20 21:46:57.741000000 +0300 +@@ -1,6 +1,11 @@ +-add_library (exchndl MODULE ++if (CMAKE_SIZEOF_VOID_P EQUAL 4) ++ set (EXCHNDL_DEF exchndl32.def) ++else () ++ set (EXCHNDL_DEF exchndl.def) ++endif () ++add_library (exchndl SHARED + exchndl.c +- exchndl.def ++ ${EXCHNDL_DEF} + version.rc + ) + +@@ -15,4 +15,8 @@ + PREFIX "" + ) + +-install (TARGETS exchndl LIBRARY DESTINATION bin) ++install (TARGETS exchndl ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +--- /dev/null 2015-06-21 14:20:14.000000000 +0300 ++++ drmingw/src/exchndl/exchndl32.def 2015-06-21 14:18:57.437200000 +0300 +@@ -0,0 +1,2 @@ ++EXPORTS ++ SetLogFileNameA@4 +--- drmingw/src/mgwhelp/CMakeLists.txt.orig 2015-06-20 21:56:28.342000000 +0300 ++++ drmingw/src/mgwhelp/CMakeLists.txt 2015-06-20 22:08:56.832200000 +0300 +@@ -1,7 +1,9 @@ + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set (MGWHELP_DEF mgwhelp32.def) ++ set (DBGHELP_DEF dbghelp.def) + else () + set (MGWHELP_DEF mgwhelp64.def) ++ set (DBGHELP_DEF dbghelp64.def) + endif () + + add_library (mgwhelp SHARED +@@ -23,7 +23,11 @@ + LINKER_LANGUAGE CXX # for __cxa_demangle + ) + +-install (TARGETS mgwhelp RUNTIME DESTINATION bin) ++install (TARGETS mgwhelp ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) + + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + # XXX: We need to use a custom import lib to avoid link failures +@@ -42,8 +44,8 @@ + set (MGWHELP_IMPLIB ${CMAKE_CURRENT_BINARY_DIR}/libmgwhelp.a) + add_custom_command ( + OUTPUT ${MGWHELP_IMPLIB} +- COMMAND ${DLLTOOL} --output-lib ${MGWHELP_IMPLIB} --dllname mgwhelp.dll --kill-at --input-def=${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.def +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.def ++ COMMAND ${DLLTOOL} --output-lib ${MGWHELP_IMPLIB} --dllname mgwhelp.dll --input-def=${CMAKE_CURRENT_SOURCE_DIR}/${DBGHELP_DEF} ++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${DBGHELP_DEF} + ) + else () + set (MGWHELP_IMPLIB mgwhelp) +--- /dev/null 2015-06-22 09:25:15.000000000 +0300 ++++ drmingw/src/mgwhelp/dbghelp64.def 2015-06-22 09:24:34.433800000 +0300 +@@ -0,0 +1,109 @@ ++LIBRARY dbghelp.dll ++ ++EXPORTS ++ EnumDirTree ++ EnumDirTreeW ++ EnumerateLoadedModules ++ EnumerateLoadedModules64 ++ EnumerateLoadedModulesW64 ++ ExtensionApiVersion ++ FindDebugInfoFile ++ FindDebugInfoFileEx ++ FindExecutableImage ++ FindExecutableImageEx ++ FindExecutableImageExW ++ GetTimestampForLoadedLibrary ++ ImageDirectoryEntryToData ++ ImageDirectoryEntryToDataEx ++ ImageNtHeader ++ ImageRvaToSection ++ ImageRvaToVa ++ ImagehlpApiVersion ++ ImagehlpApiVersionEx ++ MakeSureDirectoryPathExists ++ MapDebugInformation ++ MiniDumpReadDumpStream ++ MiniDumpWriteDump ++ SearchTreeForFile ++ SearchTreeForFileW ++ StackWalk ++ StackWalk64 ++ SymAddSymbol ++ SymAddSymbolW ++ SymCleanup ++ SymEnumLines ++ SymEnumSourceFiles ++ SymEnumSymbols ++ SymEnumSymbolsW ++ SymEnumTypes ++ SymEnumTypesW ++ SymEnumerateModules ++ SymEnumerateModules64 ++ SymEnumerateModulesW64 ++ SymEnumerateSymbols ++ SymEnumerateSymbols64 ++ SymFindFileInPath ++ SymFindFileInPathW ++ SymFromAddr ++ SymFromAddrW ++ SymFromName ++ SymFunctionTableAccess ++ SymFunctionTableAccess64 ++ SymGetLineFromAddr ++ SymGetLineFromAddr64 ++ SymGetLineFromAddrW64 ++ SymGetLineNext ++ SymGetLineNext64 ++ SymGetLinePrev ++ SymGetLinePrev64 ++ SymGetModuleBase ++ SymGetModuleBase64 ++ SymGetModuleInfo ++ SymGetModuleInfo64 ++ SymGetModuleInfoW ++ SymGetModuleInfoW64 ++ SymGetOptions ++ SymGetSearchPath ++ SymGetSearchPathW ++ SymGetSourceFileToken ++ SymGetSourceFileTokenW ++ SymGetSymFromAddr ++ SymGetSymFromAddr64 ++ SymGetSymFromName ++ SymGetSymFromName64 ++ SymGetSymNext ++ SymGetSymNext64 ++ SymGetSymPrev ++ SymGetSymPrev64 ++ SymGetTypeFromName ++ SymGetTypeInfo ++ SymInitialize ++ SymInitializeW ++ SymLoadModule ++ SymLoadModule64 ++ SymLoadModuleEx ++ SymLoadModuleExW ++ SymMatchFileName ++ SymMatchFileNameW ++ SymMatchString ++ SymRefreshModuleList ++ SymRegisterCallback ++ SymRegisterCallback64 ++ SymRegisterCallbackW64 ++ SymRegisterFunctionEntryCallback ++ SymRegisterFunctionEntryCallback64 ++ SymSearch ++ SymSearchW ++ SymSetContext ++ SymSetOptions ++ SymSetParentWindow ++ SymSetScopeFromAddr ++ SymSetSearchPath ++ SymSetSearchPathW ++ SymUnDName ++ SymUnDName64 ++ SymUnloadModule ++ SymUnloadModule64 ++ UnDecorateSymbolName ++ UnmapDebugInformation ++ WinDbgExtensionDllInit diff --git a/mingw-w64-drmingw/install-files.patch b/mingw-w64-drmingw/install-files.patch new file mode 100644 index 0000000000..f42533b847 --- /dev/null +++ b/mingw-w64-drmingw/install-files.patch @@ -0,0 +1,34 @@ +diff -aurN 000/CMakeLists.txt 001/CMakeLists.txt +--- 000/CMakeLists.txt 2015-06-26 13:00:48.000000000 -0300 ++++ 001/CMakeLists.txt 2015-06-30 12:07:28.121666600 -0300 +@@ -133,7 +133,7 @@ + FILES + LICENSE.txt + README.md +- DESTINATION doc ++ DESTINATION share/doc/drmingw + ) + + # cpack mistakenly detects Mingw-w64 as win32 +diff -aurN 000/sample/CMakeLists.txt 001/sample/CMakeLists.txt +--- 000/sample/CMakeLists.txt 2015-06-26 13:00:48.000000000 -0300 ++++ 001/sample/CMakeLists.txt 2015-06-30 12:07:28.121666600 -0300 +@@ -6,5 +6,5 @@ + add_dependencies (sample exchndl_implib) + target_link_libraries (sample ${EXCHNDL_IMPLIB}) + +-install (FILES sample.cpp DESTINATION sample) +-install (FILES sample.mak DESTINATION sample RENAME Makefile) ++install (FILES sample.cpp DESTINATION share/drmingw/sample) ++install (FILES sample.mak DESTINATION share/drmingw/sample RENAME Makefile) +diff -aurN 000/thirdparty/dwarf/CMakeLists.txt 001/thirdparty/dwarf/CMakeLists.txt +--- 000/thirdparty/dwarf/CMakeLists.txt 2015-06-26 13:00:48.000000000 -0300 ++++ 001/thirdparty/dwarf/CMakeLists.txt 2015-06-30 12:07:28.121666600 -0300 +@@ -38,6 +38,6 @@ + + install ( + FILES LIBDWARFCOPYRIGHT +- DESTINATION doc ++ DESTINATION share/doc/drmingw + RENAME LICENSE-libdwarf.txt + ) diff --git a/mingw-w64-dumb/PKGBUILD b/mingw-w64-dumb/PKGBUILD index ac67a2f2b2..d526dcddf5 100644 --- a/mingw-w64-dumb/PKGBUILD +++ b/mingw-w64-dumb/PKGBUILD @@ -1,25 +1,24 @@ # Maintainer: Alexey Pavlov _realname=dumb - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.9.3 -pkgrel=2 +pkgrel=4 pkgdesc="IT, XM, S3M and MOD player library (mingw-w64)" arch=('any') url="http://dumb.sourceforge.net" license=("custom:dumb, GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/sourceforge/dumb/dumb-$pkgver.tar.gz" - "CVE-2006-3668.patch" - "config.txt") +source=("http://downloads.sourceforge.net/sourceforge/dumb/dumb-${pkgver}.tar.gz" + "CVE-2006-3668.patch" + "config.txt") sha256sums=('8d44fbc9e57f3bac9f761c3b12ce102d47d717f0dd846657fb988e0bb5d1ea33' '9f6785435757db725bc73b1c4874b91e80b9277c6fdd2b56e47dae1cfbc968e6' '5319fd08ad12bce4fc3ec41cbeeb71a40041867c56a713d564920f32e0ff4aa2') prepare() { - cd "$srcdir/dumb-$pkgver" + cd "${srcdir}/dumb-${pkgver}" patch -p1 -i ${srcdir}/CVE-2006-3668.patch cp ${srcdir}/config.txt make/ } @@ -27,7 +26,7 @@ prepare() { build() { cd "${srcdir}/dumb-${pkgver}" sed -i "s,PKGDIR/usr/ARCH,${pkgdir}${MINGW_PREFIX}," "make/config.txt" - COMSPEC=/bin/sh.exe make CC=${MINGW_CHOST}-gcc AR=ar RANLIB=ranlib + COMSPEC=/usr/bin/sh.exe make CC=${MINGW_CHOST}-gcc AR=ar RANLIB=ranlib ${MINGW_CHOST}-gcc -shared obj/unix/release/*.o -o libdumb.dll -Xlinker --out-implib -Xlinker libdumb.dll.a } diff --git a/mingw-w64-editrights/PKGBUILD b/mingw-w64-editrights/PKGBUILD new file mode 100644 index 0000000000..994db5e6f6 --- /dev/null +++ b/mingw-w64-editrights/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: David Macek + +_realname=editrights +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.03 +pkgrel=3 +pkgdesc="Edit special privileges of Windows accounts (mingw-w64)" +arch=('any') +url="http://cygwin.org/" +license=('custom') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://cygwin.cybermirror.org/release/${_realname}/${_realname}-${pkgver}-1-src.tar.xz" + 'uncygwinize.patch') +md5sums=('f24c3c33c30516f13fc84b765020e1e7' + 'ad733a23daeb1d46e98c80d334929846') + +prepare(){ + tar -xjf ${_realname}-${pkgver}-1.src/${_realname}-${pkgver}.tar.bz2 + patch -p1 -i "${srcdir}/uncygwinize.patch" +} + +build() { + cd ${_realname} + make clean + make CC=${MINGW_CHOST}-gcc +} + +package() { + cd ${_realname} + make DESTDIR="${pkgdir}" PREFIX=${MINGW_PREFIX} install + install -Dm0644 LICENCE ${pkgdir}${MINGW_PREFIX}/share/licenses/editrights/LICENCE + mv ${pkgdir}${MINGW_PREFIX}/share/doc/{Cygwin,editrights} +} diff --git a/mingw-w64-editrights/uncygwinize.patch b/mingw-w64-editrights/uncygwinize.patch new file mode 100644 index 0000000000..75a1574021 --- /dev/null +++ b/mingw-w64-editrights/uncygwinize.patch @@ -0,0 +1,31 @@ +--- src/editrights/main.c.orig 2014-10-31 19:49:43.000000000 +0100 ++++ src/editrights/main.c 2015-04-26 10:37:44.997236000 +0200 +@@ -38,8 +38,12 @@ + #include + #include + #include ++ ++#ifdef __CYGWIN__ + #include + #include ++#endif ++ + #include + #include + #include +@@ -177,6 +181,7 @@ + exit (RETURN_ERROR); + } + ++#ifdef __CYGWIN__ + /* Convert Cygwin username to windows username. */ + if ((pw = getpwnam (optUser)) != NULL) + { +@@ -190,6 +195,7 @@ + else if ((gr = getgrnam (optUser)) != NULL) + sid_str = gr->gr_passwd; + else ++#endif + { + WCHAR wuser[strlen (optUser) * 2 + 1]; + DWORD sid_size = 128, dom_size = 256; diff --git a/mingw-w64-eigen3/PKGBUILD b/mingw-w64-eigen3/PKGBUILD index 9bf03f0c8e..b4134f796d 100644 --- a/mingw-w64-eigen3/PKGBUILD +++ b/mingw-w64-eigen3/PKGBUILD @@ -2,54 +2,60 @@ _realname=eigen pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}3") -pkgver=3.2.2 +pkgver=3.2.5 pkgrel=1 pkgdesc="Lightweight C++ template library for vector and matrix math (mingw-w64)" arch=('any') url='http://eigen.tuxfamily.org' license=('MPL2') options=('strip' 'staticlibs') -depends=("${MINGW_PACKAGE_PREFIX}-recode") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -source=("http://bitbucket.org/eigen/eigen/get/${pkgver}.tar.bz2" +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-mpfr" + #"${MINGW_PACKAGE_PREFIX}-qt4" + ) +source=(${_realname}-${pkgver}.tar.bz2::"http://bitbucket.org/eigen/eigen/get/${pkgver}.tar.bz2" 'eigen-3.1.2_osversion.patch' 'eigen-3.2_gcc58087.patch' - 'TryRunResults.cmake') -md5sums=('fc2e814ae449d16b331f7e1f4e272bd3' + 'TryRunResults.cmake' + 'eigen-pkgconfig.patch' + 'eigen-test.patch') +md5sums=('21a928f6e0f1c7f24b6f63ff823593f5' '89587f79971efc8f363d478f48f86829' '1db055c7681799bb21118b2dcf95980a' - '67e151de214f29c1e6cf00452916d7d4') + '67e151de214f29c1e6cf00452916d7d4' + 'e07e847d7a87348b554fafe5e14b97ab' + '84d0f7d8967a9b04bf4e0fc7613c0f56') prepare() { cd "${srcdir}"/eigen-eigen-* patch -Np2 -i "${srcdir}/eigen-3.1.2_osversion.patch" patch -Np1 -i "${srcdir}/eigen-3.2_gcc58087.patch" + patch -Np1 -i "${srcdir}/eigen-pkgconfig.patch" + patch -Np1 -i "${srcdir}/eigen-test.patch" } build() { - cd ${srcdir}/eigen-eigen-* [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ - -C "$srcdir"/TryRunResults.cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ - -DEIGEN_BUILD_PKGCONFIG:BOOL=ON \ - .. + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DEIGEN_BUILD_PKGCONFIG=ON \ + -DFFTW_USE_STATIC_LIBS=ON \ + -DFFTW_ROOT=${MINGW_PREFIX} \ + -C "${srcdir}"/TryRunResults.cmake \ + ../eigen-eigen-* make } package() { - cd ${srcdir}/eigen-eigen-*/build-${MINGW_CHOST} - - make install - mv ${pkgdir}${MINGW_PREFIX}/share ${pkgdir}${MINGW_PREFIX}/lib - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/eigen3.pc + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-eigen3/eigen-pkgconfig.patch b/mingw-w64-eigen3/eigen-pkgconfig.patch new file mode 100644 index 0000000000..d39e560426 --- /dev/null +++ b/mingw-w64-eigen3/eigen-pkgconfig.patch @@ -0,0 +1,44 @@ +--- eigen-eigen-1306d75b4a21/eigen3.pc.in.orig 2014-08-04 13:51:54.000000000 +0300 ++++ eigen-eigen-1306d75b4a21/eigen3.pc.in 2014-12-21 00:44:50.850000000 +0300 +@@ -1,6 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=@INCLUDE_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ ++ + Name: Eigen3 + Description: A C++ template library for linear algebra: vectors, matrices, and related algorithms + Requires: +-Version: ${EIGEN_VERSION_NUMBER} ++Version: @EIGEN_VERSION_NUMBER@ + Libs: +-Cflags: -I${INCLUDE_INSTALL_DIR} ++Cflags: -I${includedir} +--- eigen-eigen-1306d75b4a21/CMakeLists.txt.orig 2014-12-21 00:45:25.606600000 +0300 ++++ eigen-eigen-1306d75b4a21/CMakeLists.txt 2014-12-21 00:45:50.519800000 +0300 +@@ -92,9 +92,9 @@ + endif() + + option(EIGEN_BUILD_BTL "Build benchmark suite" OFF) +-if(NOT WIN32) ++if(NOT MSVC) + option(EIGEN_BUILD_PKGCONFIG "Build pkg-config .pc file for Eigen" ON) +-endif(NOT WIN32) ++endif(NOT MSVC) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + +@@ -336,11 +336,11 @@ + SET(pkg_config_install_dir ${pkg_config_libdir}) + message(STATUS "found ${pkg_config_libdir}/pkgconfig" ) + else(pkg_config_libdir) +- SET(pkg_config_install_dir ${CMAKE_INSTALL_PREFIX}/share) ++ SET(pkg_config_install_dir ${CMAKE_INSTALL_PREFIX}/lib) + message(STATUS "pkgconfig not found; installing in ${pkg_config_install_dir}" ) + endif(pkg_config_libdir) + +- configure_file(eigen3.pc.in eigen3.pc) ++ configure_file(eigen3.pc.in eigen3.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc + DESTINATION ${pkg_config_install_dir}/pkgconfig + ) diff --git a/mingw-w64-eigen3/eigen-test.patch b/mingw-w64-eigen3/eigen-test.patch new file mode 100644 index 0000000000..7aaeee219f --- /dev/null +++ b/mingw-w64-eigen3/eigen-test.patch @@ -0,0 +1,11 @@ +--- eigen-eigen-bdd17ee3b1b3/cmake/EigenTesting.cmake.orig 2014-08-04 13:51:54.000000000 +0300 ++++ eigen-eigen-bdd17ee3b1b3/cmake/EigenTesting.cmake 2014-12-21 00:44:50.850000000 +0300 +@@ -324,7 +324,7 @@ + # on all other system we rely on ${CMAKE_CXX_COMPILER} + # supporting a "--version" or "/version" flag + +- if(WIN32 AND NOT CYGWIN) ++ if(WIN32 AND NOT CYGWIN AND NOT MINGW) + set(EIGEN_CXX_FLAG_VERSION "/version") + else() + set(EIGEN_CXX_FLAG_VERSION "--version") diff --git a/mingw-w64-emacs-git/PKGBUILD b/mingw-w64-emacs-git/PKGBUILD index 1b26a16799..8b15a91344 100644 --- a/mingw-w64-emacs-git/PKGBUILD +++ b/mingw-w64-emacs-git/PKGBUILD @@ -1,69 +1,55 @@ # Maintainer: Haroogan -_name='emacs' -pkgname="${MINGW_PACKAGE_PREFIX}-${_name}-git" -pkgver=r118176.83087df +_realname='emacs' +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=r121448.a314016 pkgrel=1 -pkgdesc=\ -"The extensible, customizable, self-documenting, real-time display editor." -url="http://www.gnu.org/software/${_name}/" -license=( - 'GPL3' -) -arch=( - 'any' -) -conflicts=( - "${MINGW_PACKAGE_PREFIX}-${_name}" -) -depends=( - "${MINGW_PACKAGE_PREFIX}-ctags" - "${MINGW_PACKAGE_PREFIX}-dbus" - "${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-giflib" - "${MINGW_PACKAGE_PREFIX}-gnutls" - "${MINGW_PACKAGE_PREFIX}-imagemagick" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-xpm-nox" - "${MINGW_PACKAGE_PREFIX}-zlib" -) -makedepends=( - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" -) -options=( - 'strip' -) -source=( - "${_name}"::"git://git.savannah.gnu.org/${_name}.git" - 'image.c.diff' - 'lread.c.diff' -) -sha256sums=( - 'SKIP' - '4571d45ec26fd556e73a70bb0ab0a2a8fa1efc5e3b3c5b472ab68bb7dc9bf52c' - 'b9db1b7d939301d0fedf52db6ac055f7265ee5bc0c3c757e394700ca39577b7f' -) +pkgdesc="The extensible, customizable, self-documenting, real-time display editor (mingw-w64)" +url="http://www.gnu.org/software/${_realname}/" +license=('GPL3') +arch=('any') +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +depends=("${MINGW_PACKAGE_PREFIX}-ctags" + "${MINGW_PACKAGE_PREFIX}-dbus" + "${MINGW_PACKAGE_PREFIX}-imagemagick" + "${MINGW_PACKAGE_PREFIX}-winpthreads") +optdepends=("${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-xpm-nox" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") +options=('strip') +source=("${_realname}"::"git://git.savannah.gnu.org/${_realname}.git" + 'image.c.diff' + 'lread.c.diff') +sha256sums=('SKIP' + '4571d45ec26fd556e73a70bb0ab0a2a8fa1efc5e3b3c5b472ab68bb7dc9bf52c' + 'b9db1b7d939301d0fedf52db6ac055f7265ee5bc0c3c757e394700ca39577b7f') pkgver() { - cd "${_name}" + cd "${_realname}" printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "${_name}" + cd "${_realname}" patch --binary --forward -p0 < "${srcdir}/image.c.diff" patch --binary --forward -p0 < "${srcdir}/lread.c.diff" ./autogen.sh } build() { - mkdir -p ".build/${MINGW_CHOST}" - cd ".build/${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" local with_wide_int='no' @@ -71,34 +57,37 @@ build() { with_wide_int='yes' fi - # NOTE: - # Do not add `-funroll-loops' to `CFLAGS'! - PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig" \ - "${srcdir}/${_name}/configure" \ - CPPFLAGS="-DNDEBUG -isystem ${MINGW_PREFIX}/include" \ - CFLAGS="-pipe -O3 -fomit-frame-pointer" \ - LDFLAGS="-s -Wl,-s" \ - --prefix="${MINGW_PREFIX}" \ - --build="${MINGW_CHOST}" \ - --with-wide-int="${with_wide_int}" \ - --with-sound="yes" \ - --with-file-notification="yes" \ - --without-gpm \ - --without-gconf \ - --without-gsettings \ + CPPFLAGS="-DNDEBUG -isystem ${MINGW_PREFIX}/include" + CFLAGS="-pipe -O3 -fomit-frame-pointer -funroll-loops" + LDFLAGS="-s -Wl,-s" + "${srcdir}/${_realname}/configure" \ + --prefix="${MINGW_PREFIX}" \ + --build="${MINGW_CHOST}" \ + --with-wide-int="${with_wide_int}" \ + --with-sound="yes" \ + --with-file-notification="yes" \ + --without-gpm \ + --without-gconf \ + --without-gsettings \ --without-selinux make } -# check() { - # cd ".build/${MINGW_CHOST}" - # make check -# } - package() { - cd ".build/${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install rm -f "${pkgdir}${MINGW_PREFIX}/bin/ctags.exe" rm -f "${pkgdir}${MINGW_PREFIX}/share/man/man1/ctags.1.gz" + + local dir="${pkgdir}${MINGW_PREFIX}/share/${_realname}" + dir="${dir}/$(ls -1 ${dir} | grep -E '([0-9]+\.[0-9]+)(\.[0-9]+)?')/src" + + mkdir -p "${dir}" + cd "${srcdir}/${_realname}/src" + cp *.c *.h *.m "${dir}" } + +# TODO: +# Patch `shell-file-name' default in the C source code similarly to +# `source-directory'. diff --git a/mingw-w64-emacs/PKGBUILD b/mingw-w64-emacs/PKGBUILD index 341d3afb3c..9bd17224d4 100644 --- a/mingw-w64-emacs/PKGBUILD +++ b/mingw-w64-emacs/PKGBUILD @@ -1,74 +1,56 @@ # Maintainer: Haroogan -_name='emacs' -pkgname="${MINGW_PACKAGE_PREFIX}-${_name}" -pkgver='24.4' -pkgrel='1' -pkgdesc=\ -"The extensible, customizable, self-documenting, real-time display editor." -url="http://www.gnu.org/software/${_name}/" -license=( - 'GPL3' -) -arch=( - 'any' -) -conflicts=( - "${MINGW_PACKAGE_PREFIX}-${_name}-git" -) -depends=( - "${MINGW_PACKAGE_PREFIX}-ctags" - "${MINGW_PACKAGE_PREFIX}-dbus" - "${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-giflib" - "${MINGW_PACKAGE_PREFIX}-gnutls" - "${MINGW_PACKAGE_PREFIX}-imagemagick" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-xpm-nox" - "${MINGW_PACKAGE_PREFIX}-zlib" -) -makedepends=( - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" -) -options=( - 'strip' -) -source=( - "${_name}"::"git://git.savannah.gnu.org/${_name}.git#tag=${_name}-${pkgver}" - 'image.c.diff' - 'lread.c.diff' - 'Makefile.in.diff' -) -sha256sums=( - 'SKIP' - '4571d45ec26fd556e73a70bb0ab0a2a8fa1efc5e3b3c5b472ab68bb7dc9bf52c' - 'b9db1b7d939301d0fedf52db6ac055f7265ee5bc0c3c757e394700ca39577b7f' - '1a49a2d4711d0204db80a88c120510168b2eb7649888de65634da252f03b7f16' -) - -pkgver() { - cd "${_name}" - git describe --long --tags \ - | \ - sed -r "s/${_name}-([0-9]+\.[0-9]+)(\.[0-9]+)?-.*/\1\2/g" -} +_realname=emacs +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=24.5 +pkgrel=4 +pkgdesc="The extensible, customizable, self-documenting, real-time display editor (mingw-w64)" +url="http://www.gnu.org/software/${_realname}/" +license=('GPL3') +arch=('any') +depends=("${MINGW_PACKAGE_PREFIX}-ctags" + "${MINGW_PACKAGE_PREFIX}-dbus" + "${MINGW_PACKAGE_PREFIX}-imagemagick" + "${MINGW_PACKAGE_PREFIX}-libwinpthread") +optdepends=("${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-xpm-nox" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-xpm-nox") +options=('strip') +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.xz"{,.sig} + 'image.c.diff' + 'lread.c.diff' + 'Makefile.in.diff' + 'emacs-24.5-w32-ime.diff') +sha256sums=('dd47d71dd2a526cf6b47cb49af793ec2e26af69a0951cc40e43ae290eacfc34e' + 'SKIP' + '4571d45ec26fd556e73a70bb0ab0a2a8fa1efc5e3b3c5b472ab68bb7dc9bf52c' + 'b9db1b7d939301d0fedf52db6ac055f7265ee5bc0c3c757e394700ca39577b7f' + '1a49a2d4711d0204db80a88c120510168b2eb7649888de65634da252f03b7f16' + '08e3863250aa88bfd54915fe1b5cb14b6481d4cf300669998d54e016563af3f2') prepare() { - cd "${_name}" + cd "${_realname}-${pkgver}" patch --binary --forward -p0 < "${srcdir}/image.c.diff" patch --binary --forward -p0 < "${srcdir}/lread.c.diff" patch --binary --forward -p0 < "${srcdir}/Makefile.in.diff" + patch --binary --forward -p0 < "${srcdir}/emacs-24.5-w32-ime.diff" ./autogen.sh } build() { - mkdir -p ".build/${MINGW_CHOST}" - cd ".build/${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" local with_wide_int='no' @@ -76,34 +58,37 @@ build() { with_wide_int='yes' fi - # NOTE: - # Do not add `-funroll-loops' to `CFLAGS'! - PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig" \ - "${srcdir}/${_name}/configure" \ - CPPFLAGS="-DNDEBUG -isystem ${MINGW_PREFIX}/include" \ - CFLAGS="-pipe -O3 -fomit-frame-pointer" \ - LDFLAGS="-s -Wl,-s" \ - --prefix="${MINGW_PREFIX}" \ - --build="${MINGW_CHOST}" \ - --with-wide-int="${with_wide_int}" \ - --with-sound="yes" \ - --with-file-notification="yes" \ - --without-gpm \ - --without-gconf \ - --without-gsettings \ + CPPFLAGS="-DNDEBUG -isystem ${MINGW_PREFIX}/include" + CFLAGS="-pipe -O3 -fomit-frame-pointer -funroll-loops" + LDFLAGS="-s -Wl,-s" + ../${_realname}-${pkgver}/configure \ + --prefix="${MINGW_PREFIX}" \ + --build="${MINGW_CHOST}" \ + --with-wide-int="${with_wide_int}" \ + --with-sound="yes" \ + --with-file-notification="yes" \ + --without-gpm \ + --without-gconf \ + --without-gsettings \ --without-selinux make } -# check() { - # cd ".build/${MINGW_CHOST}" - # make check -# } - package() { - cd ".build/${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install rm -f "${pkgdir}${MINGW_PREFIX}/bin/ctags.exe" rm -f "${pkgdir}${MINGW_PREFIX}/share/man/man1/ctags.1.gz" + + local dir="${pkgdir}${MINGW_PREFIX}/share/${_realname}" + dir="${dir}/$(ls -1 ${dir} | grep -E '([0-9]+\.[0-9]+)(\.[0-9]+)?')/src" + + mkdir -p "${dir}" + cd "${srcdir}/${_realname}-${pkgver}/src" + cp *.c *.h *.m "${dir}" } + +# TODO: +# Patch `shell-file-name' default in the C source code similarly to +# `source-directory'. diff --git a/mingw-w64-emacs/emacs-24.5-w32-ime.diff b/mingw-w64-emacs/emacs-24.5-w32-ime.diff new file mode 100644 index 0000000000..cf312ae638 --- /dev/null +++ b/mingw-w64-emacs/emacs-24.5-w32-ime.diff @@ -0,0 +1,2160 @@ +--- ./configure.ac.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./configure.ac 2015-04-11 07:28:36.226147400 +0900 +@@ -263,6 +263,10 @@ + OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system]) + OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build]) + ++OPTION_DEFAULT_ON([w32-ime], [don't compile with W32-IME support]) ++OPTION_DEFAULT_ON([reconversion], [don't compile with RECONVERSION support]) ++OPTION_DEFAULT_ON([documentfeed], [don't compile with DOCUMENTFEED support]) ++ + OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console]) + OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) + OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) +@@ -5006,6 +5010,42 @@ + acl_summary=no + fi + ++USE_W32_IME=no ++if test "${HAVE_W32}" = "yes"; then ++ if test "${with_w32_ime}" != "no"; then ++ USE_W32_IME=yes ++ AC_DEFINE(USE_W32_IME, 1, [Define to support W32-IME.]) ++ ++ RECONVERSION=no ++ if test "${with_reconversion}" != "no"; then ++ AC_CACHE_CHECK([whether RECONVERTSTRING is declared], ++ emacs_cv_have_reconvertstring, ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ++#include ++#include ]], [[RECONVERTSTRING]])], ++ emacs_cv_have_reconvertstring=yes, emacs_cv_have_reconvertstring=no)]) ++ if test "$emacs_cv_have_reconvertstring" = "yes"; then ++ RECONVERSION=yes ++ AC_DEFINE(RECONVERSION, 1, [Define to support RECONVERSION.]) ++ AC_DEFINE(HAVE_RECONVERTSTRING, 1, [Define to 1 if you have RECONVERTSTRING.]) ++ ++ DOCUMENTFEED=no ++ if test "${with_documentfeed}" != "no"; then ++ AC_CHECK_DECL(IMR_DOCUMENTFEED, HAVE_IMR_DOCUMENTFEED=yes, ++ HAVE_IMR_DOCUMENTFEED=no,[[ ++#include ++#include ]]) ++ if test "$ac_cv_have_decl_IMR_DOCUMENTFEED" = "yes"; then ++ DOCUMENTFEED=yes ++ AC_DEFINE(DOCUMENTFEED, 1, [Define to support DOCUMENTFEED.]) ++ AC_DEFINE(HAVE_IMR_DOCUMENTFEED, 1, [Define to 1 if you have IMR_DOCUMENTFEED.]) ++ fi ++ fi ++ fi ++ fi ++ fi ++fi ++ + echo " + Configured for \`${canonical}'. + +@@ -5056,7 +5096,19 @@ + echo " Does Emacs directly use zlib? ${HAVE_ZLIB}" + + echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" +-echo ++ ++if test "${HAVE_W32}" = "yes"; then ++ echo \ ++ " Does Emacs support W32-IME? ${USE_W32_IME}" ++ if test "${USE_W32_IME}" = "yes"; then ++ echo \ ++ " Does Emacs support RECONVERSION? ${RECONVERSION}" ++ if test "${RECONVERSION}" = "yes"; then ++ echo \ ++ " Does Emacs support DOCUMENTFEED? ${DOCUMENTFEED}" ++ fi ++ fi ++fi + + if test -n "${EMACSDATA}"; then + echo " Environment variable EMACSDATA set to: $EMACSDATA" +--- /dev/null 2015-04-11 07:28:48.000000000 +0900 ++++ ./lisp/international/w32-ime.el 2015-04-11 07:28:36.237148400 +0900 +@@ -0,0 +1,201 @@ ++;;;;; w32-ime.el ---- Meadow features for NTEmacs. ++;; ++;; Author H.Miyashita ++;; ++;;;;; ++ ++(defgroup W32-IME nil ++ "w32-ime" ++ :group 'emacs) ++ ++(defvar w32-last-selection nil ++ "It is stored the last data from Emacs.") ++ ++;---------- ++ ++(defvar w32-ime-on-hook nil ++ "Functions to eval when IME is turned on at least. ++Even if IME state is not changed, these functiona are maybe called.") ++(defvar w32-ime-off-hook nil ++ "Functions to eval when IME is turned off at least. ++Even if IME state is not changed, these functiona are maybe called.") ++(defvar w32-ime-buffer-switch-p t ++ "If this variable is nil, IME control when buffer is switched is disabled.") ++(defvar w32-ime-show-mode-line t ++ "When t, mode line indicates IME state.") ++(defvar w32-ime-mode-line-state-indicator "[O]" ++ "This is shown at the mode line. It is regarded as state of ime.") ++(make-variable-buffer-local 'w32-ime-mode-line-state-indicator) ++(put 'w32-ime-mode-line-state-indicator 'permanent-local t) ++(defvar w32-ime-mode-line-state-indicator-list '("-" "[|]" "[O]") ++ "List of IME state indicator string.") ++(defvar w32-ime-mode-line-format-original nil ++ "Original mode line format.") ++ ++;; ++;; Section: IME ++;; ++ ++;; ;; This is temporal solution. In the future, we will prepare ++;; ;; dynamic configuration. ++;; (defvar w32-ime-coding-system-language-environment-alist ++;; '(("Japanese" . japanese-shift-jis) ++;; ("Chinese-GB" . chinese-iso-8bit) ++;; ("Chinese-BIG5" . chinese-big5) ++;; ("Korean" . korean-iso-8bit))) ++ ++;; ++;; IME state indicator ++;; ++(global-set-key [kanji] 'ignore) ++(global-set-key [compend] 'ignore) ++ ++(defun wrap-function-to-control-ime ++ (function interactive-p interactive-arg &optional suffix) ++ "Wrap FUNCTION, and IME control is enabled when FUNCTION is called. ++An original function is saved to FUNCTION-SUFFIX when suffix is string. ++If SUFFIX is nil, \"-original\" is added. " ++ (let ((original-function ++ (intern (concat (symbol-name function) ++ (if suffix suffix "-original"))))) ++ (cond ++ ((not (fboundp original-function)) ++ (fset original-function ++ (symbol-function function)) ++ (fset function ++ (list ++ 'lambda '(&rest arguments) ++ (when interactive-p ++ (list 'interactive interactive-arg)) ++ `(cond ++ ((and (ime-get-mode) ++ (equal current-input-method "W32-IME")) ++ (ime-force-off) ++ (unwind-protect ++ (apply ',original-function arguments) ++ (when (and (not (ime-get-mode)) ++ (equal current-input-method "W32-IME")) ++ (ime-force-on)))) ++ (t ++ (apply ',original-function arguments))))))))) ++ ++(defvar w32-ime-toroku-region-yomigana nil ++ "* if this variable is string, toroku-region regard this value as yomigana.") ++ ++(defun w32-ime-toroku-region (begin end) ++ (interactive "r") ++ (let ((string (buffer-substring begin end)) ++ (w32-ime-buffer-switch-p nil) ++ (reading w32-ime-toroku-region-yomigana)) ++ (unless (stringp reading) ++ (w32-set-ime-mode 'hiragana) ++ (setq reading ++ (read-multilingual-string ++ (format "Input reading of \"%s\": " string) nil "W32-IME"))) ++ (w32-ime-register-word-dialog reading string))) ++ ++;; for IME management system. ++ ++(defun w32-ime-sync-state (window) ++ (when w32-ime-buffer-switch-p ++ (with-current-buffer (window-buffer window) ++ (let* ((frame (window-frame window)) ++ (ime-state (ime-get-mode))) ++ (cond ++ ((and (not ime-state) ++ (equal current-input-method "W32-IME")) ++ (ime-force-on nil) ++ (run-hooks 'w32-ime-on-hook)) ++ ((and ime-state ++ (not (equal current-input-method "W32-IME"))) ++;;; (when (= (w32-ime-undetermined-string-length) 0) ++ (ime-force-off nil) ++ (run-hooks 'w32-ime-off-hook))))))) ++ ++(defun w32-ime-set-selected-window-buffer-hook (oldbuf newwin newbuf) ++ (w32-ime-sync-state newwin)) ++ ++(defun w32-ime-select-window-hook (old new) ++ (w32-ime-sync-state new)) ++ ++(defun w32-ime-mode-line-update () ++ (cond ++ (w32-ime-show-mode-line ++ (unless (window-minibuffer-p (selected-window)) ++ (setq w32-ime-mode-line-state-indicator ++ (nth (if (ime-get-mode) 1 2) ++ w32-ime-mode-line-state-indicator-list)))) ++ (t ++ (setq w32-ime-mode-line-state-indicator ++ (nth 0 w32-ime-mode-line-state-indicator-list)))) ++ (force-mode-line-update)) ++ ++(defun w32-ime-init-mode-line-display () ++ (unless (member 'w32-ime-mode-line-state-indicator mode-line-format) ++ (setq w32-ime-mode-line-format-original ++ (default-value 'mode-line-format)) ++ (if (and (stringp (car mode-line-format)) ++ (string= (car mode-line-format) "-")) ++ (setq-default mode-line-format ++ (cons "" ++ (cons 'w32-ime-mode-line-state-indicator ++ (cdr mode-line-format)))) ++ (setq-default mode-line-format ++ (cons "" ++ (cons 'w32-ime-mode-line-state-indicator ++ mode-line-format)))) ++ (force-mode-line-update t))) ++ ++(defun w32-ime-initialize () ++ (when (and (or (eq system-type 'windows-nt) (eq system-type 'cygwin)) ++ (eq window-system 'w32) ++ (featurep 'w32-ime)) ++ (w32-ime-init-mode-line-display) ++ (w32-ime-mode-line-update) ++ (add-hook 'select-window-functions ++ 'w32-ime-select-window-hook) ++ (add-hook 'set-selected-window-buffer-functions ++ 'w32-ime-set-selected-window-buffer-hook) ++ (define-key global-map [kanji] 'toggle-input-method))) ++;; (set-keyboard-coding-system 'utf-8))) ++ ++(defun w32-ime-uninitialize () ++ (when (and (or (eq system-type 'windows-nt) (eq system-type 'cygwin)) ++ (eq window-system 'w32) ++ (featurep 'w32-ime)) ++ (setq-default mode-line-format ++ w32-ime-mode-line-format-original) ++ (force-mode-line-update t) ++ (remove-hook 'select-window-functions ++ 'w32-ime-select-window-hook) ++ (remove-hook 'set-selected-window-buffer-functions ++ 'w32-ime-set-selected-window-buffer-hook) ++ (define-key global-map [kanji] 'ignore))) ++ ++(defun w32-ime-exit-from-minibuffer () ++ (deactivate-input-method) ++ (when (<= (minibuffer-depth) 1) ++ (remove-hook 'minibuffer-exit-hook 'w32-ime-exit-from-minibuffer))) ++ ++(defun w32-ime-state-switch (&optional arg) ++ (if arg ++ (progn ++ (setq deactivate-current-input-method-function ++ 'w32-ime-state-switch) ++ (run-hooks 'input-method-activate-hook) ++ (run-hooks 'w32-ime-on-hook) ++ (setq describe-current-input-method-function nil) ++ (when (eq (selected-window) (minibuffer-window)) ++ (add-hook 'minibuffer-exit-hook 'w32-ime-exit-from-minibuffer)) ++ (ime-force-on)) ++ (setq current-input-method nil) ++ (run-hooks 'input-method-deactivate-hook) ++ (run-hooks 'w32-ime-off-hook) ++ (setq describe-current-input-method-function nil) ++ (ime-force-off)) ++ (w32-ime-mode-line-update)) ++ ++(register-input-method "W32-IME" "Japanese" 'w32-ime-state-switch "" ++ "W32 System IME") ++ ++(provide 'w32-ime) +--- ./lisp/language/japan-util.el.orig 2015-02-02 02:27:17.000000000 +0900 ++++ ./lisp/language/japan-util.el 2015-04-11 07:28:36.242154100 +0900 +@@ -31,9 +31,11 @@ + (defun setup-japanese-environment-internal () + ;; By default, we use 'japanese-iso-8bit for file names. But, the + ;; following prefer-coding-system will override it. +- (if (memq system-type '(windows-nt ms-dos cygwin)) ++ (if (memq system-type '(windows-nt ms-dos)) + (prefer-coding-system 'japanese-shift-jis) +- (prefer-coding-system 'japanese-iso-8bit)) ++ (if (eq system-type 'cygwin) ++ (prefer-coding-system 'utf-8) ++ (prefer-coding-system 'japanese-iso-8bit))) + (use-cjk-char-width-table 'ja_JP)) + + (defconst japanese-kana-table +--- ./lisp/loadup.el.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./lisp/loadup.el 2015-04-11 07:28:36.246148800 +0900 +@@ -250,6 +250,7 @@ + (load "term/w32-win") + (load "disp-table") + (load "w32-common-fns") ++ (load "international/w32-ime") + (when (eq system-type 'windows-nt) + (load "w32-fns") + (load "ls-lisp") +--- ./lisp/startup.el.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./lisp/startup.el 2015-04-11 07:28:36.251149200 +0900 +@@ -595,6 +595,7 @@ + (put 'user-full-name 'standard-value + (list (default-value 'user-full-name))) + ;; If the PWD environment variable isn't accurate, delete it. ++ (set-language-environment "japanese") + (let ((pwd (getenv "PWD"))) + (and (stringp pwd) + ;; Use FOO/., so that if FOO is a symlink, file-attributes +--- ./src/frame.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/frame.c 2015-04-11 07:28:36.256148100 +0900 +@@ -2744,6 +2744,9 @@ + {"fullscreen", &Qfullscreen}, + {"font-backend", &Qfont_backend}, + {"alpha", &Qalpha}, ++#ifdef USE_W32_IME ++ {"ime-font", &Qime_font}, ++#endif /* USE_W32_IME */ + {"sticky", &Qsticky}, + {"tool-bar-position", &Qtool_bar_position}, + }; +--- ./src/frame.h.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/frame.h 2015-04-11 07:28:36.274150400 +0900 +@@ -1217,6 +1217,9 @@ + extern Lisp_Object Qbuffer_predicate; + extern Lisp_Object Qcursor_color, Qcursor_type; + extern Lisp_Object Qfont; ++#ifdef USE_W32_IME ++extern Lisp_Object Qime_font; ++#endif /* USE_W32_IME */ + extern Lisp_Object Qbackground_color, Qforeground_color; + extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top; + extern Lisp_Object Qinternal_border_width; +--- ./src/keyboard.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/keyboard.c 2015-04-11 07:28:36.283150900 +0900 +@@ -4779,7 +4779,11 @@ + "junja", /* VK_JUNJA 0x17 */ + "final", /* VK_FINAL 0x18 */ + "kanji", /* VK_KANJI/VK_HANJA 0x19 */ ++#ifdef USE_W32_IME ++ "compend", /* VK_COMPEND 0x1A */ ++#else + 0, /* 0x1A */ ++#endif /* USE_W32_IME */ + "escape", /* VK_ESCAPE 0x1B */ + "convert", /* VK_CONVERT 0x1C */ + "non-convert", /* VK_NONCONVERT 0x1D */ +@@ -8851,6 +8855,13 @@ + { + ptrdiff_t count = SPECPDL_INDEX (); + ++ /* To control IME */ ++#ifdef USE_W32_IME ++ extern Lisp_Object Fime_force_on (), Fime_force_off (), Fime_get_mode (); ++ Lisp_Object VIME_command_off_flag = Qnil; ++ Lisp_Object IME_command_loop_flag = Qnil; ++#endif /* USE_W32_IME */ ++ + /* How many keys there are in the current key sequence. */ + int t; + +@@ -8966,6 +8977,12 @@ + keybuf[0..mock_input] holds the sequence we should reread. */ + replay_sequence: + ++#ifdef USE_W32_IME ++/* If key sequences are to replay, IME_loop_flag should not be set. ++ Because event has never been occured. */ ++ IME_command_loop_flag = Qnil; ++#endif /* USE_W32_IME */ ++ + starting_buffer = current_buffer; + first_unbound = bufsize + 1; + +@@ -9045,6 +9062,16 @@ + goto replay_sequence; + } + ++#ifdef USE_W32_IME ++ if (!NILP (IME_command_loop_flag) && NILP (VIME_command_off_flag)) ++ { ++ VIME_command_off_flag = Fime_get_mode (); ++ if (!NILP (VIME_command_off_flag)) ++ Fime_force_off (Qnil); ++ } ++ IME_command_loop_flag = Qt; ++#endif /* USE_W32_IME */ ++ + if (t >= bufsize) + error ("Key sequence too long"); + +@@ -9708,6 +9735,12 @@ + ? Fcommand_remapping (read_key_sequence_cmd, Qnil, Qnil) + : Qnil; + ++ /* to control IME */ ++#ifdef USE_W32_IME ++ if (!NILP (VIME_command_off_flag)) ++ Fime_force_on (Qnil); ++#endif /* USE_W32_IME */ ++ + unread_switch_frame = delayed_switch_frame; + unbind_to (count, Qnil); + +--- ./src/lisp.mk.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/lisp.mk 2015-04-11 07:28:36.292151800 +0900 +@@ -152,6 +152,7 @@ + $(lispsource)/term/w32-win.elc \ + $(lispsource)/ls-lisp.elc \ + $(lispsource)/disp-table.elc \ ++ $(lispsource)/international/w32-ime.elc \ + $(lispsource)/w32-common-fns.elc \ + $(lispsource)/dos-w32.elc \ + $(lispsource)/w32-fns.elc \ +--- ./src/w32fns.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/w32fns.c 2015-04-11 07:28:36.305152300 +0900 +@@ -89,6 +89,18 @@ + extern const char *map_w32_filename (const char *, const char **); + extern char * w32_strerror (int error_no); + ++#ifdef RECONVERSION ++#define CHRSZ sizeof(short) ++#define RECONV_LENG 100 ++#define DOCFEED_LENG 100 ++static LRESULT w32_get_ime_reconversion_string (HWND, RECONVERTSTRING*); ++static BOOL w32_perform_reconversion (HWND, RECONVERTSTRING*); ++#ifdef DOCUMENTFEED ++#define DOCFEED_CSTR_LENG 64 ++static LRESULT w32_get_ime_documentfeed_string (HWND, RECONVERTSTRING*); ++#endif ++#endif ++ + /* If non-NULL, a handle to a frame where to display the hourglass cursor. */ + static HWND hourglass_hwnd = NULL; + +@@ -98,6 +110,37 @@ + + Lisp_Object Qsuppress_icon; + Lisp_Object Qundefined_color; ++ ++#ifdef USE_W32_IME ++Lisp_Object Qw32_ime_buffer_switch_p; ++Lisp_Object Qime_font; ++static int set_ime_font = 0; ++static LOGFONT ime_logfont = {0}; ++static int IME_event_off_count; ++Lisp_Object Fime_get_mode(); ++const char * const ImmGetOpenStatus_Name = "ImmGetOpenStatus"; ++const char * const ImmSetOpenStatus_Name = "ImmSetOpenStatus"; ++const char * const ImmSetCompositionWindow_Name = "ImmSetCompositionWindow"; ++const char * const ImmGetContext_Name = "ImmGetContext"; ++const char * const ImmGetConversionStatus_Name = "ImmGetConversionStatus"; ++const char * const ImmSetConversionStatus_Name = "ImmSetConversionStatus"; ++const char * const ImmNotifyIME_Name = "ImmNotifyIME"; ++ ++const char * const ImmReleaseContext_Name = "ImmReleaseContext"; ++const char * const ImmCreateContext_Name = "ImmCreateContext"; ++const char * const ImmDestroyContext_Name = "ImmDestroyContext"; ++const char * const ImmAssociateContext_Name = "ImmAssociateContext"; ++const char * const ImmGetHotKey_Name = "ImmGetHotKey"; ++const char * const ImmGetProperty_Name = "ImmGetProperty"; ++const char * const ImmGetCompositionString_Name = "ImmGetCompositionStringW"; ++const char * const ImmSetCompositionString_Name = "ImmSetCompositionStringW"; ++const char * const ImmSetCompositionFont_Name = "ImmSetCompositionFontA"; /* LOGFONTA */ ++const char * const ImmGetConversionList_Name = "ImmGetConversionListW"; ++const char * const ImmConfigureIME_Name = "ImmConfigureIMEW"; ++const char * const ImmGetCandidateList_Name = "ImmGetCandidateListW"; ++const char * const ImmGetCandidateListCount_Name = "ImmGetCandidateListCountW"; ++#endif ++ + Lisp_Object Qcancel_timer; + Lisp_Object Qfont_param; + Lisp_Object Qhyper; +@@ -171,12 +214,14 @@ + + typedef BOOL (WINAPI * TrackMouseEvent_Proc) + (IN OUT LPTRACKMOUSEEVENT lpEventTrack); ++#ifndef USE_W32_IME + typedef LONG (WINAPI * ImmGetCompositionString_Proc) + (IN HIMC context, IN DWORD index, OUT LPVOID buffer, IN DWORD bufLen); + typedef HIMC (WINAPI * ImmGetContext_Proc) (IN HWND window); + typedef HWND (WINAPI * ImmReleaseContext_Proc) (IN HWND wnd, IN HIMC context); + typedef HWND (WINAPI * ImmSetCompositionWindow_Proc) (IN HIMC context, + IN COMPOSITIONFORM *form); ++#endif /* !USE_W32_IME */ + typedef HMONITOR (WINAPI * MonitorFromPoint_Proc) (IN POINT pt, IN DWORD flags); + typedef BOOL (WINAPI * GetMonitorInfo_Proc) + (IN HMONITOR monitor, OUT struct MONITOR_INFO* info); +@@ -188,10 +233,12 @@ + (IN HDC hdc, IN RECT *rcClip, IN MonitorEnum_Proc fnEnum, IN LPARAM dwData); + + TrackMouseEvent_Proc track_mouse_event_fn = NULL; ++#ifndef USE_W32_IME + ImmGetCompositionString_Proc get_composition_string_fn = NULL; + ImmGetContext_Proc get_ime_context_fn = NULL; + ImmReleaseContext_Proc release_ime_context_fn = NULL; + ImmSetCompositionWindow_Proc set_ime_composition_window_fn = NULL; ++#endif /* !USE_W32_IME */ + MonitorFromPoint_Proc monitor_from_point_fn = NULL; + GetMonitorInfo_Proc get_monitor_info_fn = NULL; + MonitorFromWindow_Proc monitor_from_window_fn = NULL; +@@ -203,8 +250,10 @@ + extern AppendMenuW_Proc unicode_append_menu; + #endif /* NTGUI_UNICODE */ + ++#ifndef USE_W32_IME + /* Flag to selectively ignore WM_IME_CHAR messages. */ + static int ignore_ime_char = 0; ++#endif + + /* W95 mousewheel handler */ + unsigned int msh_mousewheel = 0; +@@ -337,6 +386,17 @@ + void x_set_title (struct frame *, Lisp_Object, Lisp_Object); + void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); + ++#ifdef USE_W32_IME ++static void w32_set_ime_conv_window (HWND, struct frame *); ++static void w32_set_ime_status (HWND, int); ++static int w32_get_ime_status (HWND); ++static int w32_set_ime_mode (HWND, int, int); ++void w32_set_ime_logfont (HWND, struct frame *); ++static void w32_set_ime_font (HWND); ++static BOOL w32_get_ime_composition_string (HWND); ++static LRESULT CALLBACK conversion_agent_wndproc (HWND, UINT, WPARAM, LPARAM); ++static int initialize_conversion_agent (void); ++#endif /* USE_W32_IME */ + + + +@@ -1985,12 +2045,20 @@ + + if (hwnd) + { ++ static int initialized = 0; ++ + SetWindowLong (hwnd, WND_FONTWIDTH_INDEX, FRAME_COLUMN_WIDTH (f)); + SetWindowLong (hwnd, WND_LINEHEIGHT_INDEX, FRAME_LINE_HEIGHT (f)); + SetWindowLong (hwnd, WND_BORDER_INDEX, FRAME_INTERNAL_BORDER_WIDTH (f)); + SetWindowLong (hwnd, WND_SCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_WIDTH (f)); + SetWindowLong (hwnd, WND_BACKGROUND_INDEX, FRAME_BACKGROUND_PIXEL (f)); + ++ if (!initialized && (w32_major_version > 6 || w32_major_version >= 6 && w32_minor_version >= 2)) ++ { ++ ShowWindow (hwnd, SW_MINIMIZE); ShowWindow (hwnd, SW_RESTORE); ++ initialized = 1; ++ } ++ + /* Enable drag-n-drop. */ + DragAcceptFiles (hwnd, TRUE); + +@@ -3149,6 +3217,24 @@ + TranslateMessage (&windows_msg); + goto dflt; + } ++#ifdef USE_W32_IME ++ else ++ { ++ MSG ime_undo_test_msg; ++ ++ if (wParam == VK_BACK ++ && ctrl_modifier == w32_get_key_modifiers (wParam, lParam) ++ && w32_get_ime_status (hwnd) != 0 ++ && PeekMessage (&ime_undo_test_msg, hwnd, WM_KEYDOWN, WM_KEYDOWN, PM_NOYIELD | PM_NOREMOVE) != 0 ++ && ime_undo_test_msg.wParam == VK_BACK ++ && ime_undo_test_msg.lParam == 0x40000001 ++ ) ++ { ++ post_character_message (hwnd, msg, wParam, lParam, 0); ++ break; ++ } ++ } ++#endif + + /* Fall through */ + +@@ -3168,6 +3254,7 @@ + w32_get_key_modifiers (wParam, lParam)); + break; + ++#ifndef USE_W32_IME + case WM_UNICHAR: + /* WM_UNICHAR looks promising from the docs, but the exact + circumstances in which TranslateMessage sends it is one of those +@@ -3286,6 +3373,7 @@ + case WM_IME_ENDCOMPOSITION: + ignore_ime_char = 0; + goto dflt; ++#endif /* USE_W32_IME */ + + /* Simulate middle mouse button events when left and right buttons + are used together, but only if user has two button mouse. */ +@@ -4074,8 +4162,82 @@ + case WM_EMACS_FILENOTIFY: + my_post_msg (&wmsg, hwnd, msg, wParam, lParam); + return 1; ++#ifdef USE_W32_IME ++ case WM_IME_NOTIFY: ++ if (wParam == IMN_SETOPENSTATUS) ++ { ++ if (w32_get_ime_status(hwnd)){ ++ struct frame *f = x_window_to_frame (dpyinfo, hwnd); ++ if (f) { ++ set_ime_font = 0; ++ w32_set_ime_conv_window (hwnd, f); ++ } ++ } ++ if (!IME_event_off_count) ++ my_post_msg (&wmsg, hwnd, WM_MULE_IME_STATUS, 0, 0); ++ else ++ IME_event_off_count--; ++ } ++ goto dflt; ++ ++ case WM_IME_STARTCOMPOSITION: ++ { ++ struct frame *f = x_window_to_frame (dpyinfo, hwnd); ++ if (f && !set_ime_font) ++ { ++ my_post_msg (&wmsg, hwnd, WM_MULE_IME_SET_FONT, (WPARAM) f, 0); ++ set_ime_font = 1; ++ } ++ } ++ goto dflt; ++ ++ case WM_IME_SETCONTEXT: ++ set_ime_font = 0; ++ goto dflt; ++ ++ case WM_IME_COMPOSITION: ++ if (lParam & GCS_RESULTSTR) ++ if (w32_get_ime_composition_string (hwnd)) ++ return 0; ++ else ++ break; ++ goto dflt; ++ ++#ifdef RECONVERSION ++ case WM_IME_REQUEST: ++ if (wParam == IMR_RECONVERTSTRING) ++ { ++ if (!ime_enable_reconversion || !w32_get_ime_status (hwnd)) ++ return 0; ++ if (lParam) ++ return w32_get_ime_reconversion_string (hwnd, ++ (RECONVERTSTRING*) lParam); ++ else ++ return sizeof (RECONVERTSTRING) + (RECONV_LENG * 2 + 1) * CHRSZ; ++ } ++#ifdef DOCUMENTFEED ++ else if (wParam == IMR_DOCUMENTFEED) ++ { ++ if (!ime_enable_document_feed) ++ return 0; ++ if (lParam) ++ return w32_get_ime_documentfeed_string (hwnd, ++ (RECONVERTSTRING*) lParam); ++ else ++ return sizeof (RECONVERTSTRING) + (DOCFEED_LENG * 2 + DOCFEED_CSTR_LENG + 1) * CHRSZ; ++ } ++#endif ++ goto dflt; ++#endif ++#endif /* USE_W32_IME */ + + default: ++ ++#ifdef USE_W32_IME ++ if (MESSAGE_IMM_COM_P(msg)) ++ return conversion_agent_wndproc (hwnd, msg, wParam, lParam); ++#endif /* USE_W32_IME */ ++ + /* Check for messages registered at runtime. */ + if (msg == msh_mousewheel) + { +@@ -4370,6 +4532,10 @@ + x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil)); + } + x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING); ++#ifdef USE_W32_IME ++ x_default_parameter (f, parms, Qime_font, Qnil, ++ "ime-font", "IME-Font", RES_TYPE_STRING); ++#endif + } + + DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, +@@ -6895,6 +7061,1025 @@ + + + /*********************************************************************** ++ Input Method Editor ++ ***********************************************************************/ ++#ifdef USE_W32_IME ++BOOL fIME = FALSE; ++ ++typedef BOOL (WINAPI *IMMGETOPENSTATUSPROC)(HIMC); ++IMMGETOPENSTATUSPROC ImmGetOpenStatusProc; ++ ++typedef BOOL (WINAPI *IMMSETOPENSTATUSPROC)(HIMC, BOOL); ++IMMSETOPENSTATUSPROC ImmSetOpenStatusProc; ++ ++typedef BOOL (WINAPI *IMMSETCOMPOSITIONWINDOWPROC)(HIMC, LPCOMPOSITIONFORM); ++IMMSETCOMPOSITIONWINDOWPROC ImmSetCompositionWindowProc; ++ ++typedef LONG (WINAPI *IMMGETCOMPOSITIONSTRINGPROC) ++ (HIMC, DWORD, LPVOID, DWORD); ++IMMGETCOMPOSITIONSTRINGPROC ImmGetCompositionStringProc; ++ ++typedef LONG (WINAPI *IMMSETCOMPOSITIONSTRINGPROC) ++ (HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD); ++IMMSETCOMPOSITIONSTRINGPROC ImmSetCompositionStringProc; ++ ++typedef BOOL (WINAPI *IMMSETCOMPOSITIONFONTPROC) (HIMC, LPLOGFONTA); ++IMMSETCOMPOSITIONFONTPROC ImmSetCompositionFontProc; ++ ++typedef HIMC (WINAPI *IMMGETCONTEXTPROC)(HWND); ++IMMGETCONTEXTPROC ImmGetContextProc; ++ ++typedef BOOL (WINAPI *IMMGETCONVERSIONSTATUSPROC)(HIMC, LPDWORD, LPDWORD); ++IMMGETCONVERSIONSTATUSPROC ImmGetConversionStatusProc; ++ ++typedef BOOL (WINAPI *IMMSETCONVERSIONSTATUSPROC)(HIMC, DWORD, DWORD); ++IMMSETCONVERSIONSTATUSPROC ImmSetConversionStatusProc; ++ ++typedef BOOL (WINAPI *IMMGETCONVERSIONLISTPROC) ++ (HKL, HIMC, LPCTSTR, LPCANDIDATELIST, DWORD, UINT); ++IMMGETCONVERSIONLISTPROC ImmGetConversionListProc; ++ ++typedef BOOL (WINAPI *IMMCONFIGUREIMEPROC)(HKL, HWND, DWORD, LPVOID); ++IMMCONFIGUREIMEPROC ImmConfigureIMEProc; ++ ++typedef BOOL (WINAPI *IMMNOTIFYIMEPROC)(HIMC, DWORD, DWORD, DWORD); ++IMMNOTIFYIMEPROC ImmNotifyIMEProc; ++ ++typedef BOOL (WINAPI *IMMRELEASECONTEXTPROC)(HWND, HIMC); ++IMMRELEASECONTEXTPROC ImmReleaseContextProc; ++ ++typedef HIMC (WINAPI *IMMCREATECONTEXTPROC)(void); ++IMMCREATECONTEXTPROC ImmCreateContextProc; ++ ++typedef BOOL (WINAPI *IMMDESTROYCONTEXTPROC)(HIMC); ++IMMDESTROYCONTEXTPROC ImmDestroyContextProc; ++ ++typedef HIMC (WINAPI *IMMASSOCIATECONTEXTPROC) (HWND, HIMC); ++IMMASSOCIATECONTEXTPROC ImmAssociateContextProc; ++ ++typedef BOOL (WINAPI *IMMGETCANDIDATELISTPROC) ++ (HIMC, DWORD, LPCANDIDATELIST, DWORD); ++IMMGETCANDIDATELISTPROC ImmGetCandidateListProc; ++ ++typedef BOOL (WINAPI *IMMGETCANDIDATELISTCOUNTPROC) (HIMC, LPDWORD); ++IMMGETCANDIDATELISTCOUNTPROC ImmGetCandidateListCountProc; ++ ++typedef BOOL (WINAPI *IMMGETHOTKEYPROC)(DWORD, LPUINT, LPUINT, LPHKL); ++IMMGETHOTKEYPROC ImmGetHotKeyProc; ++ ++typedef BOOL (WINAPI *IMMGETPROPERTYPROC)(HKL, DWORD); ++IMMGETPROPERTYPROC ImmGetPropertyProc; ++ ++// Lisp_Object Vime_control; ++ ++static void ++w32_set_ime_conv_window (hwnd, f) ++ HWND hwnd; ++ struct frame *f; ++{ ++ if (fIME && !NILP (Vime_control)) ++ { ++ HIMC himc; ++ COMPOSITIONFORM compform; ++ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); ++ ++ /* If Vw32_ime_composition_window is set, try it. */ ++ if (!NILP (Vw32_ime_composition_window) ++ && WINDOWP (Vw32_ime_composition_window) ++ && WINDOW_FRAME (XWINDOW (Vw32_ime_composition_window)) ++ == WINDOW_FRAME (w)) ++ w = XWINDOW (Vw32_ime_composition_window); ++ ++ himc = (ImmGetContextProc) (hwnd); ++ compform.dwStyle = CFS_RECT; ++ ++ compform.ptCurrentPos.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); ++ ++ compform.ptCurrentPos.y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); ++#if 0 ++ if (FRAME_FONT (f)->vertical_centering == 1) ++ compform.ptCurrentPos.y += FRAME_FONT (f)->baseline_offset; ++#endif ++ ++ compform.rcArea.left = (WINDOW_BOX_LEFT_EDGE_X (w) ++ + WINDOW_LEFT_MARGIN_WIDTH (w) ++ + WINDOW_LEFT_FRINGE_WIDTH (w)); ++ ++ compform.rcArea.top = (WINDOW_TOP_EDGE_Y (w) ++ + WINDOW_HEADER_LINE_HEIGHT (w)); ++ ++ compform.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w) ++ - WINDOW_RIGHT_MARGIN_WIDTH (w) ++ - WINDOW_RIGHT_FRINGE_WIDTH (w)) + 1; ++ ++ compform.rcArea.bottom = (WINDOW_BOTTOM_EDGE_Y (w) ++ - WINDOW_MODE_LINE_HEIGHT (w)); ++ ++ (ImmSetCompositionWindowProc) (himc, &compform); ++ (ImmReleaseContextProc) (hwnd, himc); ++ } ++} ++ ++static void ++w32_set_ime_status (hwnd, openp) ++ HWND hwnd; ++ int openp; ++{ ++ HIMC himc; ++ ++ himc = (ImmGetContextProc) (hwnd); ++ (ImmSetOpenStatusProc) (himc, openp); ++ (ImmReleaseContextProc) (hwnd, himc); ++} ++ ++static int ++w32_get_ime_status (hwnd) ++ HWND hwnd; ++{ ++ HIMC himc; ++ int ret; ++ ++ himc = (ImmGetContextProc) (hwnd); ++ ret = (ImmGetOpenStatusProc) (himc); ++ (ImmReleaseContextProc) (hwnd, himc); ++ ++ return ret; ++} ++ ++static int ++w32_set_ime_mode (hwnd, mode, mask) ++ HWND hwnd; ++ int mode; ++ int mask; ++{ ++ HIMC himc; ++ DWORD cmode, smode; ++ ++ himc = (ImmGetContextProc) (hwnd); ++ if (!(ImmGetConversionStatusProc) (himc, &cmode, &smode)) ++ return 0; ++ ++ cmode = (cmode & (~mask)) | (mode & mask); ++ ++ (ImmSetConversionStatusProc) (himc, cmode, smode); ++ (ImmReleaseContextProc) (hwnd, himc); ++ ++ return 1; ++} ++ ++static BOOL ++w32_get_ime_composition_string (hwnd) ++ HWND hwnd; ++{ ++ HIMC hIMC; ++ int size; ++ HANDLE himestr; ++ LPWSTR lpstr; ++ ++ struct frame *f; ++ ++ hIMC = (ImmGetContextProc) (hwnd); ++ if (!hIMC) ++ return FALSE; ++ ++ size = (ImmGetCompositionStringProc) (hIMC, GCS_RESULTSTR, NULL, 0); ++ size += sizeof (WCHAR); ++ himestr = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, size); ++ if (!himestr) ++ abort (); ++ ++ (ImmGetCompositionStringProc) (hIMC, GCS_RESULTSTR, himestr, size); ++ (ImmReleaseContextProc) (hwnd, hIMC); ++ { ++ W32Msg wmsg; ++ f = SELECTED_FRAME (); ++ my_post_msg (&wmsg, hwnd, WM_MULE_IME_REPORT, ++ (WPARAM) himestr, (LPARAM) f); ++ } ++ return TRUE; ++} ++ ++#ifdef RECONVERSION ++ ++static EMACS_INT compstr_beginning_pos(int max_char) ++{ ++ EMACS_INT bol, point = PT, pt; ++ for (bol = XFASTINT(Fline_beginning_position(Qnil)), pt = PT; ++ PT >= bol && PT > point - max_char; ) { ++ pt = PT; ++ if (NILP(Fforward_word (make_number (-1)))) ++ break; ++ } ++ Fgoto_char (make_number(point)); ++ return pt; ++} ++ ++static EMACS_INT compstr_end_pos(int max_char) ++{ ++ EMACS_INT eol, point = PT, pt; ++ ++ for (eol = XFASTINT(Fline_end_position(Qnil)), pt = PT; ++ PT <= eol && PT < point + max_char;) { ++ pt = PT; ++ if (NILP(Fforward_word (make_number (1)))) ++ break; ++ } ++ Fgoto_char (make_number(point)); ++ return pt; ++} ++ ++static LRESULT ++get_reconversion_string (HWND hwnd, ++ RECONVERTSTRING *reconv, ++ unsigned short *compstr) ++{ ++ EMACS_INT pt, pt_byte, start, end, len, t_start, t_end, compstr_len; ++ W32Msg wmsg; ++ ++ if (!NILP (BVAR (current_buffer, read_only))) ++ return 0; ++ ++ pt = PT; ++ pt_byte = PT_BYTE; ++ ++ if (compstr) ++ { ++ t_start = PT; ++ start = compstr_beginning_pos (DOCFEED_LENG); ++ end = compstr_end_pos (DOCFEED_LENG); ++ } ++ else if (!NILP (BVAR (current_buffer, mark_active)) ++ && !NILP (Vtransient_mark_mode)) ++ { ++ if (marker_position (BVAR (current_buffer, mark)) < PT) ++ { ++ t_start = marker_position (BVAR (current_buffer, mark)); ++ t_end = PT; ++ } ++ else ++ { ++ t_start = PT; ++ t_end = marker_position (BVAR (current_buffer, mark)); ++ } ++ Fgoto_char (make_number (t_end)); ++ while (!NILP (Fbolp ()) && t_start < PT) ++ Fforward_char (make_number (-1)); ++ if (t_start >= PT) ++ return 0; ++ t_end = PT; ++ } ++ else ++ { ++ if (NILP (Feobp ())) ++ Fforward_char (make_number (1)); ++ if (!NILP (Fforward_word (make_number (-1)))) ++ t_start = PT; ++ else ++ { ++ SET_PT_BOTH (pt, pt_byte); ++ return 0; ++ } ++ Fforward_word (make_number (1)); ++ t_end = PT; ++ SET_PT_BOTH (pt, pt_byte); ++ if (t_end < PT) ++ return 0; ++ } ++ ++ if (!compstr) ++ { ++ if (t_start == t_end) ++ return 0; ++ ++ Fgoto_char (make_number (t_start)); ++ start = compstr_beginning_pos (RECONV_LENG); ++ Fgoto_char (make_number (t_end)); ++ end = compstr_end_pos (RECONV_LENG); ++ } ++ ++ len = end - start; ++ if (reconv) ++ { ++ int pos; ++ WCHAR *s; ++ ++ s = (WCHAR *) (reconv + 1); ++ ++ for (pos = start; pos < t_start; pos++) ++ *s++ = (WCHAR) FETCH_CHAR (CHAR_TO_BYTE (pos)); ++ ++ if (compstr) ++ { ++ for (compstr_len = 0; compstr[compstr_len]; compstr_len++) ++ *s++ = compstr[compstr_len]; ++ ++ len += compstr_len; ++ } ++ else ++ compstr_len = t_end - t_start; ++ ++ for (; pos < end; pos++) ++ *s++ = (WCHAR) FETCH_CHAR (CHAR_TO_BYTE (pos)); ++ ++ *s = 0; ++ } ++ else ++ { ++ SET_PT_BOTH (pt, pt_byte); ++ if (compstr) ++ { ++ for (compstr_len = 0; compstr[compstr_len]; compstr_len++) ++ ; ++ ++ len += compstr_len; ++ } ++ return (sizeof (RECONVERTSTRING) + (len + 1) * CHRSZ); ++ } ++ ++ reconv->dwStrOffset = sizeof (RECONVERTSTRING); ++ reconv->dwStrLen = len; ++ reconv->dwCompStrOffset = ++ reconv->dwTargetStrOffset = (t_start - start) * CHRSZ; ++ reconv->dwCompStrLen = ++ reconv->dwTargetStrLen = compstr_len; ++ ++ if (!compstr) ++ my_post_msg (&wmsg, hwnd, WM_MULE_IME_DEL_RANGE, (WPARAM) t_start, (LPARAM) t_end); ++ ++ return (reconv->dwSize = sizeof (RECONVERTSTRING) + (len + 1) * CHRSZ); ++} ++ ++static LRESULT ++w32_get_ime_reconversion_string (HWND hwnd, ++ RECONVERTSTRING *reconv) ++{ ++ return get_reconversion_string (hwnd, reconv, NULL); ++} ++#endif /* RECONVERSION */ ++ ++#if defined(DOCUMENTFEED) ++static LRESULT ++w32_get_ime_documentfeed_string (HWND hwnd, ++ RECONVERTSTRING *reconv) ++{ ++ unsigned short ime_compstr[DOCFEED_CSTR_LENG]; ++ HIMC hIMC; ++ LONG l; ++ ++ if (hIMC = (ImmGetContextProc) (hwnd)) ++ { ++ if ((ImmGetCompositionStringProc) (hIMC, GCS_COMPSTR, NULL, 0) ++ >= DOCFEED_CSTR_LENG * CHRSZ) ++ { ++ (ImmReleaseContextProc) (hwnd, hIMC); ++ return 0; ++ } ++ ++ switch (l = (ImmGetCompositionStringProc) ++ (hIMC, GCS_COMPSTR, ime_compstr, ++ (DOCFEED_CSTR_LENG - 1) * CHRSZ)) ++ { ++ case IMM_ERROR_NODATA: ++ case IMM_ERROR_GENERAL: ++ ime_compstr[0] = 0; ++ break; ++ default: ++ ime_compstr[l / CHRSZ] = 0; ++ break; ++ } ++ (ImmReleaseContextProc) (hwnd, hIMC); ++ ++ return get_reconversion_string (hwnd, reconv, ime_compstr); ++ } ++ ++ return 0; ++} ++#endif /* DOCUMENTFEED */ ++ ++void ++w32_ime_control_init (void) ++{ ++ HMODULE hImm32; ++ HMODULE hUser32; ++ ++ hImm32 = GetModuleHandle ("IMM32.DLL"); ++ if (!hImm32) ++ hImm32 = LoadLibrary ("IMM32.DLL"); ++ ++ fIME = FALSE; ++ Vime_control = Qnil; ++ IME_event_off_count = 0; ++ ++ if (hImm32) ++ { ++ ImmGetOpenStatusProc = ++ (IMMGETOPENSTATUSPROC) ++ GetProcAddress (hImm32, ++ ImmGetOpenStatus_Name); ++ ImmSetOpenStatusProc = ++ (IMMSETOPENSTATUSPROC) ++ GetProcAddress (hImm32, ++ ImmSetOpenStatus_Name); ++ ImmSetCompositionWindowProc = ++ (IMMSETCOMPOSITIONWINDOWPROC) ++ GetProcAddress (hImm32, ++ ImmSetCompositionWindow_Name); ++ ImmGetContextProc = ++ (IMMGETCONTEXTPROC) ++ GetProcAddress (hImm32, ++ ImmGetContext_Name); ++ ImmGetConversionStatusProc = ++ (IMMGETCONVERSIONSTATUSPROC) ++ GetProcAddress (hImm32, ++ ImmGetConversionStatus_Name); ++ ImmSetConversionStatusProc = ++ (IMMSETCONVERSIONSTATUSPROC) ++ GetProcAddress (hImm32, ++ ImmSetConversionStatus_Name); ++ ImmNotifyIMEProc = ++ (IMMNOTIFYIMEPROC) ++ GetProcAddress (hImm32, ++ ImmNotifyIME_Name); ++ ImmReleaseContextProc = ++ (IMMRELEASECONTEXTPROC) ++ GetProcAddress (hImm32, ++ ImmReleaseContext_Name); ++ ImmCreateContextProc = ++ (IMMCREATECONTEXTPROC) ++ GetProcAddress (hImm32, ++ ImmCreateContext_Name); ++ ImmDestroyContextProc = ++ (IMMDESTROYCONTEXTPROC) ++ GetProcAddress (hImm32, ++ ImmDestroyContext_Name); ++ ImmAssociateContextProc = ++ (IMMASSOCIATECONTEXTPROC) ++ GetProcAddress (hImm32, ++ ImmAssociateContext_Name); ++ ImmGetHotKeyProc = ++ (IMMGETHOTKEYPROC) ++ GetProcAddress (hImm32, ++ ImmGetHotKey_Name); ++ ImmGetPropertyProc = ++ (IMMGETPROPERTYPROC) ++ GetProcAddress (hImm32, ImmGetProperty_Name); ++ ImmGetCompositionStringProc = ++ (IMMGETCOMPOSITIONSTRINGPROC) ++ GetProcAddress (hImm32, ImmGetCompositionString_Name); ++ ImmSetCompositionStringProc = ++ (IMMSETCOMPOSITIONSTRINGPROC) ++ GetProcAddress (hImm32, ImmSetCompositionString_Name); ++ ImmSetCompositionFontProc = ++ (IMMSETCOMPOSITIONFONTPROC) ++ GetProcAddress (hImm32, ImmSetCompositionFont_Name); ++ ImmGetConversionListProc = ++ (IMMGETCONVERSIONLISTPROC) ++ GetProcAddress (hImm32, ++ ImmGetConversionList_Name); ++ ImmConfigureIMEProc = ++ (IMMCONFIGUREIMEPROC) ++ GetProcAddress (hImm32, ++ ImmConfigureIME_Name); ++ ImmGetCandidateListProc = ++ (IMMGETCANDIDATELISTPROC) ++ GetProcAddress (hImm32, ++ ImmGetCandidateList_Name); ++ ImmGetCandidateListCountProc = ++ (IMMGETCANDIDATELISTCOUNTPROC) ++ GetProcAddress (hImm32, ++ ImmGetCandidateListCount_Name); ++ ++ if (ImmGetOpenStatusProc && ++ ImmSetOpenStatusProc && ++ ImmSetCompositionWindowProc && ++ ImmGetCompositionStringProc && ++ ImmSetCompositionStringProc && ++ ImmSetCompositionFontProc && ++ ImmGetPropertyProc && ++ ImmGetContextProc && ++ ImmGetConversionStatusProc && ++ ImmSetConversionStatusProc && ++ ImmGetConversionListProc && ++ ImmConfigureIMEProc && ++ ImmNotifyIMEProc && ++ ImmReleaseContextProc && ++ ImmCreateContextProc && ++ ImmDestroyContextProc && ++ ImmAssociateContextProc && ++ ImmGetCandidateListProc && ++ ImmGetCandidateListCountProc && ++ ImmGetHotKeyProc) ++ { ++ fIME = TRUE; ++ Vime_control = Qt; ++ } ++ } ++} ++ ++#ifdef HAVE_NTGUI ++static int ++need_set_ime_font (PLOGFONT p) ++{ ++ if (!p || ++ (p->lfHeight == ime_logfont.lfHeight ++ && p->lfWidth == ime_logfont.lfWidth ++ && p->lfEscapement == ime_logfont.lfEscapement ++ && p->lfOrientation == ime_logfont.lfOrientation ++ && p->lfWeight == ime_logfont.lfWeight ++ && p->lfItalic == ime_logfont.lfItalic ++ && p->lfUnderline == ime_logfont.lfUnderline ++ && p->lfStrikeOut == ime_logfont.lfStrikeOut ++ && p->lfCharSet == ime_logfont.lfCharSet ++ && p->lfOutPrecision == ime_logfont.lfOutPrecision ++ && p->lfClipPrecision == ime_logfont.lfClipPrecision ++ && p->lfQuality == ime_logfont.lfQuality ++ && p->lfPitchAndFamily == ime_logfont.lfPitchAndFamily ++ && strncmp (p->lfFaceName, ime_logfont.lfFaceName, LF_FACESIZE) == 0)) ++ return 0; ++ else ++ return 1; ++} ++void ++w32_set_ime_logfont (hwnd, f) ++ HWND hwnd; ++ struct frame *f; ++{ ++ Lisp_Object ime_font = Qnil, temp = Qnil, font = Qnil, family; ++ struct gcpro gcpro1, gcpro2; ++ extern Lisp_Object QCfamily; ++ int fsid = -1; ++ LOGFONT logfont = {0}; ++ ++ if (!IsWindow (hwnd)) ++ return; ++ ++ if (!fIME || NILP(Vime_control)) ++ return; ++ ++ GCPRO2(font, temp); ++ ++ if (STRINGP(ime_font = get_frame_param (f, Qime_font)) ++ /* fontset */ ++ && ((fsid = fs_query_fontset(ime_font, 0)) >= 0 ++ && !NILP(font = fontset_ascii(fsid)) ++ && !NILP(font = font_spec_from_name(font)) ++ && !NILP(temp = Ffontset_font(temp, make_number(0x3042), Qnil)) ++ && !NILP(family = XCAR(temp)) ++ /* font */ ++ || !NILP(font = font_spec_from_name(ime_font)) ++ && SYMBOLP(family = AREF (font, FONT_FAMILY_INDEX)) ++ && STRINGP(family = SYMBOL_NAME(family))) ++ ++ /* use font object */ ++ /* frame-parameter */ ++ || (FONTP(font = ime_font) ++ /* frame fontset */ ++ || ((fsid = FRAME_FONTSET(f)) >= 0 ++ && !NILP(font = ++ Ffont_at(make_number(0), Qnil, ++ temp = Fchar_to_string(make_number(0x3042)))))) ++ && SYMBOLP(family = Ffont_get(font, QCfamily)) ++ && STRINGP(family = SYMBOL_NAME(family)) ++ && !NILP(font = copy_font_spec(font))) { ++ Lisp_Object tail; ++ ++ fill_in_logfont (f, &logfont, font); ++ ++ logfont.lfWidth = 0; ++ ++ family = ENCODE_SYSTEM(family); ++ ++ strcpy(logfont.lfFaceName, SDATA(family)); ++ ++ /* rescale */ ++ for (tail = Vface_font_rescale_alist; CONSP (tail); tail = XCDR (tail)) { ++ temp = XCAR (tail); ++ if (!FLOATP (XCDR (temp))) ++ continue; ++ ++ if (STRINGP (XCAR (temp))) { ++ if (fast_string_match_ignore_case (XCAR (temp), family) >= 0) { ++ logfont.lfHeight *= XFLOAT_DATA (XCDR (temp)); ++ break; ++ } ++ } else if (FONT_SPEC_P (XCAR (temp))) { ++ Lisp_Object name; ++ if (!NILP(name = Ffont_get(XCAR (temp), QCfamily)) && ++ STRINGP(name) && ++ xstrcasecmp(SDATA(name), SDATA(family)) == 0) { ++ logfont.lfHeight *= XFLOAT_DATA (XCDR (temp)); ++ break; ++ } ++ } ++ } ++ } else { ++ HFONT hfont = FONT_HANDLE (FRAME_FONT (f)); ++ GetObject (hfont, sizeof (logfont), &logfont); ++ } ++ UNGCPRO; ++ ++ if (need_set_ime_font (&logfont)) ++ { ++ ime_logfont = logfont; ++ PostMessage (hwnd, WM_MULE_IMM_SET_IMEFONT, (WPARAM) f, 0); ++ } ++} ++static void ++w32_set_ime_font (hwnd) ++ HWND hwnd; ++{ ++ HIMC himc; ++ ++ if (!fIME || NILP (Vime_control)) ++ return; ++ ++ himc = (ImmGetContextProc) (hwnd); ++ if (!himc) ++ return; ++ (ImmSetCompositionFontProc) (himc, &ime_logfont); ++ (ImmReleaseContextProc) (hwnd, himc); ++} ++#endif /* HAVE_NTGUI */ ++ ++static LRESULT CALLBACK ++conversion_agent_wndproc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) ++/* HWND hwnd; ++ UINT message; ++ WPARAM wparam; ++ LPARAM lparam; */ ++{ ++ HIMC himc, holdimc; ++ ++ switch (message) ++ { ++ case WM_MULE_IMM_SET_STATUS: ++ if (InSendMessage()) ++ ReplyMessage(1); ++ w32_set_ime_status (hwnd, (int) wparam); ++ break; ++ ++ case WM_MULE_IMM_GET_STATUS: ++ return w32_get_ime_status (hwnd); ++ ++ case WM_MULE_IMM_SET_MODE: ++ return w32_set_ime_mode (hwnd, (int) wparam, (int) lparam); ++ ++ case WM_MULE_IMM_SET_IMEFONT: ++ w32_set_ime_font (hwnd); ++ ++ case WM_MULE_IMM_SET_CONVERSION_WINDOW: ++ if (w32_get_ime_status (hwnd)) ++ w32_set_ime_conv_window (hwnd, (struct frame *) wparam); ++ break; ++ ++#ifdef RECONVERSION ++ case WM_MULE_IMM_PERFORM_RECONVERSION: ++ if (ime_enable_reconversion) ++ w32_perform_reconversion(hwnd, (RECONVERTSTRING*)lparam); ++ break; ++#endif ++ ++#if 0 ++ case WM_MULE_IMM_GET_COMPOSITION_STRING: ++ return w32_get_ime_composition_string (hwnd); ++#endif ++ ++ default: ++ return DefWindowProc (hwnd, message, wparam, lparam); ++ } ++ return 0; ++} ++ ++ ++/* ++ Emacs Lisp function entries ++*/ ++ ++DEFUN ("ime-force-on", Fime_force_on, Sime_force_on, 0, 1, 0, ++ doc: /* Force status of IME open. */) ++ (Lisp_Object eventp) ++{ ++ if (fIME && !NILP (Vime_control)) ++ { ++ HIMC himc; ++ HWND hwnd; ++ ++ if (!NILP (Fime_get_mode ())) ++ return Qnil; ++#ifdef HAVE_NTGUI ++ if (NILP (eventp)) ++ IME_event_off_count++; ++ hwnd = FRAME_W32_WINDOW (SELECTED_FRAME ()); ++#else ++ hwnd = hwndConsole; ++#endif ++ SendMessage (hwnd, WM_MULE_IMM_SET_STATUS, 1, 0); ++ } ++ return Qnil; ++} ++ ++DEFUN ("ime-force-off", Fime_force_off, Sime_force_off, 0, 1, 0, ++ doc: /* Force status of IME close. */) ++ (Lisp_Object eventp) ++{ ++ if (fIME && !NILP (Vime_control)) ++ { ++ HIMC himc; ++ HWND hwnd; ++ ++ if (NILP (Fime_get_mode ())) ++ return Qnil; ++#ifdef HAVE_NTGUI ++ if (NILP (eventp)) ++ IME_event_off_count++; ++ hwnd = FRAME_W32_WINDOW (SELECTED_FRAME ()); ++#else ++ hwnd = hwndConsole; ++#endif ++ SendMessage (hwnd, WM_MULE_IMM_SET_STATUS, 0, 0); ++ } ++ return Qnil; ++} ++ ++DEFUN ("ime-get-mode", Fime_get_mode, Sime_get_mode, 0, 0, "", ++ doc: /* Get IME status. ++t means status of IME is open. nil means it is close. */) ++ (void) ++{ ++ if (fIME && !NILP (Vime_control)) ++ { ++ HWND hwnd; ++ int result; ++ ++#ifdef HAVE_NTGUI ++ hwnd = FRAME_W32_WINDOW (SELECTED_FRAME ()); ++#else ++ hwnd = hwndConsole; ++#endif ++ result = SendMessage (hwnd, WM_MULE_IMM_GET_STATUS, 0, 0); ++ ++ return result ? Qt : Qnil; ++ } ++ else ++ return Qnil; ++} ++ ++DEFUN ("w32-set-ime-mode", ++ Fw32_set_ime_mode, ++ Sw32_set_ime_mode, 1, 2, 0, ++ doc: /* Set IME mode to MODE. If FRAME is omitted, the selected frame is used. */) ++ (Lisp_Object mode, Lisp_Object frame) ++{ ++ struct frame *f; ++ ++ if (NILP (frame)) ++ { ++ f = SELECTED_FRAME (); ++ } ++ else ++ { ++ CHECK_FRAME (frame); ++ f = XFRAME (frame); ++ } ++ if (fIME && !NILP (Vime_control)) ++ { ++ HWND hwnd; ++ int ret; ++ int newmode, mask; ++ ++ newmode = 0; ++ mask = 0; ++ ++ hwnd = FRAME_W32_WINDOW (f); ++ ++ if (EQ (mode, intern ("katakana"))) ++ { ++ newmode |= IME_CMODE_KATAKANA; ++ mask |= IME_CMODE_KATAKANA; ++ } ++ else if (EQ (mode, intern ("hiragana"))) ++ { ++ newmode &= ~IME_CMODE_KATAKANA; ++ mask |= IME_CMODE_KATAKANA; ++ } ++ else if (EQ (mode, intern ("kanji"))) ++ { ++ newmode |= IME_CMODE_HANJACONVERT; ++ mask |= IME_CMODE_HANJACONVERT; ++ } ++ else if (EQ (mode, intern ("nokanji"))) ++ { ++ newmode &= ~IME_CMODE_HANJACONVERT; ++ mask |= IME_CMODE_HANJACONVERT; ++ } ++ else if (EQ (mode, intern ("code"))) ++ { ++ newmode |= IME_CMODE_CHARCODE; ++ mask |= IME_CMODE_CHARCODE; ++ } ++ else if (EQ (mode, intern ("nocode"))) ++ { ++ newmode &= ~IME_CMODE_CHARCODE; ++ mask |= IME_CMODE_CHARCODE; ++ } ++ else if (EQ (mode, intern ("non-convert"))) ++ { ++ newmode |= IME_CMODE_NOCONVERSION; ++ mask |= IME_CMODE_NOCONVERSION; ++ } ++ else if (EQ (mode, intern ("convert"))) ++ { ++ newmode &= ~IME_CMODE_NOCONVERSION; ++ mask |= IME_CMODE_NOCONVERSION; ++ } ++ else ++ error ("unknown mode!!"); ++ ++ ret = SendMessage (hwnd, WM_MULE_IMM_SET_MODE, ++ (WPARAM) newmode, (LPARAM) mask); ++ ++ if (!ret) ++ return Qnil; ++ ++ return Qt; ++ } ++ return Qnil; ++} ++ ++DEFUN ("w32-ime-register-word-dialog", ++ Fw32_ime_register_word_dialog, ++ Sw32_ime_register_word_dialog, 2, 2, 0, ++ doc: /* Open IME regist word dialog. */) ++ (Lisp_Object reading, Lisp_Object word) ++{ ++ HKL hkl; ++ int reading_len, word_len; ++ REGISTERWORD regword; ++ Lisp_Object encoded_reading, encoded_word; ++ ++ CHECK_STRING (reading); ++ CHECK_STRING (word); ++ ++ if (fIME && !NILP (Vime_control) && ImmConfigureIMEProc) ++ { ++ hkl = GetKeyboardLayout (0); ++ encoded_reading = Fencode_coding_string (reading, ++ Vlocale_coding_system, ++ Qnil, Qnil); ++ reading_len = SBYTES (encoded_reading); ++ regword.lpReading = SDATA (encoded_reading); ++ ++ encoded_word = Fencode_coding_string (word, ++ Vlocale_coding_system, ++ Qnil, Qnil); ++ word_len = SBYTES (encoded_word); ++ regword.lpWord = SDATA (encoded_word); ++ (ImmConfigureIMEProc) (hkl, FRAME_W32_WINDOW (SELECTED_FRAME ()), ++ IME_CONFIG_REGISTERWORD, ®word); ++ } ++ return Qnil; ++} ++ ++DEFUN ("ime-get-property", Fime_get_property, Sime_get_property, 1, 1, 0, ++ doc: /* Retrieves the property and capabilities of the IME associated with the specified input locale. ++INDEX is one of igp-property, igp-conversion, igp-sentence, igp-ui, igp-setcompstr, igp-select of igp-getimeversion*/) ++ (Lisp_Object index) ++{ ++ int i; ++ Lisp_Object val; ++ DWORD v; ++ struct gcpro gcpro1; ++ ++ static const struct { ++ const char *name; ++ DWORD index; ++ } index_map[] = { ++ {"property", IGP_PROPERTY}, ++ {"conversion", IGP_CONVERSION}, ++ {"sentence", IGP_SENTENCE}, ++ {"ui", IGP_UI}, ++ {"setcompstr", IGP_SETCOMPSTR}, ++ {"select", IGP_SELECT}, ++ {"getimeversion", IGP_GETIMEVERSION}, ++ }, prop_map[] = { ++ {"at-caret", IME_PROP_AT_CARET}, ++ {"special-ui", IME_PROP_SPECIAL_UI}, ++ {"candlist-start-from-1", IME_PROP_CANDLIST_START_FROM_1}, ++ {"unicode", IME_PROP_UNICODE}, ++ {"complete-on-unselect", IME_PROP_COMPLETE_ON_UNSELECT}, ++ }, ui_map[] = { ++ {"rot2700", UI_CAP_2700}, ++ {"rot90", UI_CAP_ROT90}, ++ {"rotany", UI_CAP_ROTANY}, ++ }, setcompstr_map[] = { ++ {"compstr", SCS_CAP_COMPSTR}, ++ {"makeread", SCS_CAP_MAKEREAD}, ++ {"setreconvertstring", SCS_CAP_SETRECONVERTSTRING}, ++ }, select_map[] = { ++ {"conversion", SELECT_CAP_CONVERSION}, ++ {"sentence", SELECT_CAP_SENTENCE}, ++ }, imeversion_map[] = { ++ {"ver-0310", IMEVER_0310}, ++ {"ver-0400", IMEVER_0400}, ++ }; ++ ++ CHECK_SYMBOL(index); ++ for (i = 0; i < sizeof(index_map) / sizeof(index_map[0]); i++) ++ if (EQ(index, intern(index_map[i].name))) ++ break; ++ if (i >= sizeof(index_map) / sizeof(index_map[0])) ++ return Qnil; ++ ++ v = (*ImmGetPropertyProc)(GetKeyboardLayout(0), index_map[i].index); ++ val = Qnil; ++ GCPRO1(val); ++#define MAKE_CAP_LIST(map) do { \ ++ int j; \ ++ for (j = sizeof(map) / sizeof(map[0]) - 1; j >= 0 ; j--) \ ++ if (v & map[j].index) \ ++ val = Fcons(intern(map[j].name), val); \ ++} while(0) ++ ++ switch (index_map[i].index) { ++ case IGP_PROPERTY: ++ MAKE_CAP_LIST(prop_map); ++ break; ++ case IGP_UI: ++ MAKE_CAP_LIST(ui_map); ++ break; ++ case IGP_SETCOMPSTR: ++ MAKE_CAP_LIST(setcompstr_map); ++ break; ++ case IGP_SELECT: ++ MAKE_CAP_LIST(select_map); ++ break; ++ case IGP_GETIMEVERSION: ++ MAKE_CAP_LIST(imeversion_map); ++ break; ++ } ++ UNGCPRO; ++ return val; ++} ++ ++#ifdef RECONVERSION ++BOOL w32_perform_reconversion(HWND hwnd, RECONVERTSTRING *reconv) ++{ ++ struct frame *f = SELECTED_FRAME (); ++ HIMC himc; ++ BOOL result = FALSE; ++ ++ himc = (ImmGetContextProc) (hwnd); ++ if (!himc) { ++ xfree(reconv); ++ return FALSE; ++ } ++ ++ if ((*ImmSetCompositionStringProc) (himc, ++ SCS_QUERYRECONVERTSTRING, ++ reconv, reconv->dwSize, ++ NULL, 0 ) ++ && (*ImmSetCompositionStringProc) (himc, ++ SCS_SETRECONVERTSTRING, ++ reconv, reconv->dwSize, ++ NULL, 0)) { ++ /* Set the position of candidate list dialog. */ ++ (ImmReleaseContextProc) (hwnd, himc); ++ w32_set_ime_conv_window (hwnd, f); ++ result = TRUE; ++ } else ++ (ImmReleaseContextProc) (hwnd, himc); ++ xfree(reconv); ++ return result; ++} ++ ++DEFUN ("w32-ime-perform-reconversion", ++ Fw32_ime_perform_reconversion, ++ Sw32_ime_perform_reconversion, 0, 0, "", ++ doc: /* perfom ime reconversion. */) ++ (void) ++{ ++ HWND hwnd = FRAME_W32_WINDOW(SELECTED_FRAME()); ++ DWORD size; ++ RECONVERTSTRING *reconv; ++ ++ if (!ime_enable_reconversion || ++ NILP(Fime_get_mode())) ++ return Qnil; ++ ++ if ((size = get_reconversion_string (hwnd, NULL, NULL)) ++ && (reconv = xmalloc (size)) != NULL ++ && (memset (reconv, 0, size), (reconv->dwSize = size)) ++ && get_reconversion_string (hwnd, reconv, NULL)) ++ PostMessage(hwnd, WM_MULE_IMM_PERFORM_RECONVERSION, 0, (LPARAM) reconv); ++ ++ return Qt; ++} ++#endif ++ ++#endif /* USE_W32_IME */ ++ ++ ++/*********************************************************************** + w32 specialized functions + ***********************************************************************/ + +@@ -8115,6 +9300,9 @@ + x_set_fullscreen, + x_set_font_backend, + x_set_alpha, ++#ifdef USE_W32_IME ++ 0, /* ime-font */ ++#endif /* USE_W32_IME */ + 0, /* x_set_sticky */ + 0, /* x_set_tool_bar_position */ + }; +@@ -8129,6 +9317,10 @@ + + DEFSYM (Qsuppress_icon, "suppress-icon"); + DEFSYM (Qundefined_color, "undefined-color"); ++#ifdef USE_W32_IME ++ DEFSYM (Qw32_ime_buffer_switch_p, "w32-ime-buffer-switch-p"); ++ DEFSYM (Qime_font, "ime-font"); ++#endif /* USE_W32_IME */ + DEFSYM (Qcancel_timer, "cancel-timer"); + DEFSYM (Qhyper, "hyper"); + DEFSYM (Qsuper, "super"); +@@ -8405,6 +9597,27 @@ + only be necessary if the default setting causes problems. */); + w32_strict_painting = 1; + ++#ifdef USE_W32_IME ++#ifdef RECONVERSION ++ DEFVAR_BOOL ("ime-enable-reconversion", ime_enable_reconversion, ++ doc: /* Non-nil enables IME reconversion capability. */); ++ ime_enable_reconversion = 1; ++#endif ++#ifdef DOCUMENTFEED ++ DEFVAR_BOOL ("ime-enable-document-feed", ime_enable_document_feed, ++ doc: /* Non-nil enables IME document feed capability. */); ++ ime_enable_document_feed = 1; ++#endif ++ DEFVAR_LISP ("ime-control", Vime_control, doc: /* IME control flag. */); ++ Vime_control = Qnil; ++ ++ DEFVAR_LISP ("w32-ime-composition-window", ++ Vw32_ime_composition_window, ++ doc: /* If this is a window of current frame, IME composition window appears on the ++window instead of current window. */); ++ Vw32_ime_composition_window = Qnil; ++#endif /* USE_W32_IME */ ++ + #if 0 /* TODO: Port to W32 */ + defsubr (&Sx_change_window_property); + defsubr (&Sx_delete_window_property); +@@ -8450,6 +9663,18 @@ + defsubr (&Sw32_battery_status); + defsubr (&Sw32__menu_bar_in_use); + ++#ifdef USE_W32_IME ++ defsubr (&Sw32_set_ime_mode); ++ defsubr (&Sw32_ime_register_word_dialog); ++ defsubr (&Sime_force_on); ++ defsubr (&Sime_force_off); ++ defsubr (&Sime_get_mode); ++ defsubr (&Sime_get_property); ++#ifdef RECONVERSION ++ defsubr (&Sw32_ime_perform_reconversion); ++#endif ++#endif /* USE_W32_IME */ ++ + #ifdef WINDOWSNT + defsubr (&Sfile_system_info); + defsubr (&Sdefault_printer_name); +@@ -8662,6 +9887,7 @@ + enum_display_monitors_fn = (EnumDisplayMonitors_Proc) + GetProcAddress (user32_lib, "EnumDisplayMonitors"); + ++#ifndef USE_W32_IME + { + HMODULE imm32_lib = GetModuleHandle ("imm32.dll"); + get_composition_string_fn = (ImmGetCompositionString_Proc) +@@ -8673,6 +9899,7 @@ + set_ime_composition_window_fn = (ImmSetCompositionWindow_Proc) + GetProcAddress (imm32_lib, "ImmSetCompositionWindow"); + } ++#endif /* !USE_W32_IME */ + + except_code = 0; + except_addr = 0; +--- ./src/w32font.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/w32font.c 2015-04-11 07:28:36.315151100 +0900 +@@ -102,7 +102,10 @@ + /* Font spacing symbols - defined in font.c. */ + extern Lisp_Object Qc, Qp, Qm; + +-static void fill_in_logfont (struct frame *, LOGFONT *, Lisp_Object); ++#ifndef USE_W32_IME ++static ++#endif ++void fill_in_logfont (struct frame *, LOGFONT *, Lisp_Object); + + static BYTE w32_antialias_type (Lisp_Object); + static Lisp_Object lispy_antialias_type (BYTE); +@@ -1962,7 +1965,10 @@ + } + + /* Fill in all the available details of LOGFONT from FONT_SPEC. */ +-static void ++#ifndef USE_W32_IME ++static ++#endif ++void + fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec) + { + Lisp_Object tmp, extra; +--- ./src/w32font.h.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/w32font.h 2015-04-11 07:28:36.325153800 +0900 +@@ -83,6 +83,9 @@ + int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec); + + Lisp_Object intern_font_name (char *); ++#ifdef USE_W32_IME ++void fill_in_logfont (struct frame *, LOGFONT *, Lisp_Object); ++#endif + + extern void syms_of_w32font (void); + extern void globals_of_w32font (void); +--- ./src/w32term.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/w32term.c 2015-04-11 07:28:36.346155000 +0900 +@@ -4909,6 +4909,81 @@ + break; + #endif + ++#ifdef USE_W32_IME ++ case WM_MULE_IME_STATUS: ++ f = x_window_to_frame (dpyinfo, msg.msg.hwnd); ++ ++ if (f && !f->iconified && f->visible) ++ { ++ inev.kind = NON_ASCII_KEYSTROKE_EVENT; ++ inev.code = VK_KANJI; ++ inev.modifiers = 0; ++ XSETFRAME (inev.frame_or_window, f); ++ inev.timestamp = msg.msg.time; ++ } ++ break; ++ ++ case WM_MULE_IME_REPORT: ++ { ++ LPWSTR lpStr; ++ struct input_event buf; ++ HANDLE hw32_ime_string = (HANDLE) msg.msg.wParam; ++ ++ f = (struct frame *) msg.msg.lParam; ++ if (f && !f->iconified && f->visible) ++ { ++ lpStr = (LPWSTR) hw32_ime_string; ++ while(lpStr) ++ { ++ wchar_t code; ++ ++ EVENT_INIT (buf); ++ XSETFRAME (buf.frame_or_window, f); ++ buf.timestamp = msg.msg.time; ++ buf.modifiers = 0; ++ if (*lpStr) ++ { ++ if (*lpStr < 0x80) ++ buf.kind = ASCII_KEYSTROKE_EVENT; ++ else ++ buf.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; ++ if ((*lpStr & 0xFC00) == 0xD800 ++ && (*(lpStr + 1) & 0xFC00) == 0xDC00) ++ { ++ buf.code = 0x10000 ++ + (((*lpStr & 0x3FF) << 10) ++ | *(lpStr + 1) & 0x3FF); ++ lpStr++; ++ } ++ else ++ buf.code = *(lpStr++); ++ kbd_buffer_store_event (&buf); ++ } ++ else ++ { ++ buf.kind = NON_ASCII_KEYSTROKE_EVENT; ++ buf.code = VK_COMPEND; ++ kbd_buffer_store_event (&buf); ++ break; ++ } ++ } ++ HeapFree (GetProcessHeap (), 0, (LPVOID) hw32_ime_string); ++ } ++ } ++ break; ++ ++ case WM_MULE_IME_DEL_RANGE: ++ del_range ((ptrdiff_t) msg.msg.wParam, (ptrdiff_t) msg.msg.lParam); ++ Fgoto_char (make_number (msg.msg.wParam)); ++ redisplay (); ++ break; ++ ++ case WM_MULE_IME_SET_FONT: ++ w32_set_ime_logfont (msg.msg.hwnd, (struct frame *) msg.msg.wParam); ++ break; ++ ++#endif /* USE_W32_IME */ ++ + default: + /* Check for messages registered at runtime. */ + if (msg.msg.message == msh_mousewheel) +@@ -5274,7 +5349,12 @@ + w32_system_caret_hdr_height = WINDOW_HEADER_LINE_HEIGHT (w); + w32_system_caret_mode_height = WINDOW_MODE_LINE_HEIGHT (w); + ++#ifdef USE_W32_IME ++ if (f && f == FRAME_DISPLAY_INFO (f)->x_highlight_frame) ++ PostMessage (hwnd, WM_MULE_IMM_SET_CONVERSION_WINDOW, (WPARAM) f, 0); ++#else + PostMessage (hwnd, WM_IME_STARTCOMPOSITION, 0, 0); ++#endif + + /* If the size of the active cursor changed, destroy the old + system caret. */ +@@ -6563,6 +6643,9 @@ + vertical_scroll_bar_top_border = vertical_scroll_bar_bottom_border + = GetSystemMetrics (SM_CYVSCROLL); + } ++#ifdef USE_W32_IME ++ w32_ime_control_init(); ++#endif /* USE_W32_IME */ + } + + void +--- ./src/w32term.h.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/w32term.h 2015-04-11 07:28:36.360155300 +0900 +@@ -569,6 +569,8 @@ + #endif /* WM_MOUSEHWHEEL */ + #ifndef WM_APPCOMMAND + #define WM_APPCOMMAND 0x319 ++#endif ++#ifndef GET_APPCOMMAND_LPARAM + #define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff) + #endif + #ifndef WM_UNICHAR +@@ -605,6 +607,96 @@ + #define WM_EMACS_FILENOTIFY (WM_EMACS_START + 23) + #define WM_EMACS_END (WM_EMACS_START + 24) + ++#ifdef USE_W32_IME ++#ifndef VK_KANJI ++#define VK_KANJI 0x19 ++#endif ++#ifndef VK_KANA ++#define VK_KANA 0x15 ++#endif ++#define VK_COMPEND 0x1A ++ ++#ifdef RECONVERSION ++#ifndef WM_IME_REQUEST ++#define WM_IME_REQUEST 0x288 ++#endif ++#ifndef IMR_COMPOSITIONWINDOW ++#define IMR_COMPOSITIONWINDOW 0x0001 ++#endif ++#ifndef IMR_CANDIDATEWINDOW ++#define IMR_CANDIDATEWINDOW 0x0002 ++#endif ++#ifdef IMR_COMPOSITIONFONT ++#define IMR_COMPOSITIONFONT 0x0003 ++#endif ++#ifndef IMR_RECONVERTSTRING ++#define IMR_RECONVERTSTRING 0x0004 ++#endif ++#ifndef IMR_CONFIRMRECONVERTSTRING ++#define IMR_CONFIRMRECONVERTSTRING 0x0005 ++#endif ++#endif ++#ifndef IME_PROP_COMPLETE_ON_UNSELECT ++#define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000 ++#endif ++#ifndef SCS_CAP_SETRECONVERTSTRING ++#define SCS_CAP_SETRECONVERTSTRING 0x00000004 ++#endif ++ ++/* For internal communications ++ from window procedure to event loop. */ ++#define WM_MULE_IME_REPORT (WM_USER+2200) ++#define WM_MULE_IME_STATUS (WM_USER+2201) ++#define WM_MULE_IME_DEL_RANGE (WM_USER+2202) ++#define WM_MULE_IME_SET_FONT (WM_USER+2203) ++ ++/* For internal communications ++ from main thread to window procedure. */ ++#define WM_MULE_IMM_MESSAGE_START (WM_USER+2300) ++#define WM_MULE_IMM_SET_STATUS (WM_USER+2300) ++#define WM_MULE_IMM_GET_STATUS (WM_USER+2301) ++#if 0 ++#define WM_MULE_IMM_DEAL_WITH_CONTEXT (WM_USER+2302) ++#define WM_MULE_IMM_SET_COMPOSITION_STRING (WM_USER+2303) ++#endif ++#define WM_MULE_IMM_GET_COMPOSITION_STRING (WM_USER+2304) ++#define WM_MULE_IMM_SET_MODE (WM_USER+2305) ++#if 0 ++#define WM_MULE_IMM_NOTIFY (WM_USER+2310) ++#define WM_MULE_IMM_GET_UNDETERMINED_STRING_LENGTH (WM_USER+2320) ++#endif ++#define WM_MULE_IMM_SET_IMEFONT (WM_USER+2311) ++#define WM_MULE_IMM_SET_CONVERSION_WINDOW (WM_USER+2312) ++ ++#define WM_MULE_IMM_PERFORM_RECONVERSION (WM_USER+2320) ++ ++#define WM_MULE_IMM_MESSAGE_END (WM_USER+2399) ++#define MESSAGE_IMM_COM_P(message) \ ++ (((message) >= WM_MULE_IMM_MESSAGE_START) && \ ++ ((message) <= WM_MULE_IMM_MESSAGE_END)) ++ ++#ifdef RECONVERSION ++#ifndef HAVE_RECONVERTSTRING ++typedef struct tagRECONVERTSTRING { ++ DWORD dwSize; ++ DWORD dwVersion; ++ DWORD dwStrLen; ++ DWORD dwStrOffset; ++ DWORD dwCompStrLen; ++ DWORD dwCompStrOffset; ++ DWORD dwTargetStrLen; ++ DWORD dwTargetStrOffset; ++} RECONVERTSTRING, *PRECONVERTSTRING; ++#endif ++#ifndef SCS_SETRECONVERTSTRING ++#define SCS_SETRECONVERTSTRING 0x00010000 ++#endif ++#ifndef SCS_QUERYRECONVERTSTRING ++#define SCS_QUERYRECONVERTSTRING 0x00020000 ++#endif ++#endif /* RECONVERSION */ ++#endif /* USE_W32_IME */ ++ + #define WND_FONTWIDTH_INDEX (0) + #define WND_LINEHEIGHT_INDEX (4) + #define WND_BORDER_INDEX (8) +@@ -794,3 +886,8 @@ + #ifdef CYGWIN + extern int w32_message_fd; + #endif /* CYGWIN */ ++ ++#ifdef USE_W32_IME ++extern void w32_set_ime_logfont (HWND, struct frame *); ++extern void w32_ime_control_init (void); ++#endif /* USE_W32_IME */ +--- ./src/window.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/window.c 2015-04-11 07:28:36.379162300 +0900 +@@ -132,6 +132,12 @@ + /* Same for window_scroll_line_based. */ + static EMACS_INT window_scroll_preserve_hpos; + static EMACS_INT window_scroll_preserve_vpos; ++#ifdef USE_W32_IME ++Lisp_Object Vset_selected_window_buffer_functions; ++Lisp_Object Qset_selected_window_buffer_functions; ++Lisp_Object Vselect_window_functions; ++Lisp_Object Qselect_window_functions; ++#endif /* USE_W32_IME */ + + static void + CHECK_WINDOW_CONFIGURATION (Lisp_Object x) +@@ -474,6 +480,9 @@ + { + register struct window *w; + struct frame *sf; ++#ifdef USE_W32_IME ++ Lisp_Object oldwin = selected_window; ++#endif /* USE_W32_IME */ + + CHECK_LIVE_WINDOW (window); + +@@ -526,6 +535,11 @@ + record_buffer (w->contents); + } + ++#ifdef USE_W32_IME ++ if (!NILP (Vselect_window_functions)) ++ run_hook_with_args_2 (Qselect_window_functions, oldwin, window); ++#endif /* USE_W32_IME */ ++ + return window; + } + +@@ -3561,6 +3575,18 @@ + + set_window_buffer (window, buffer, 1, !NILP (keep_margins)); + ++#ifdef USE_W32_IME ++ if (! NILP (Vset_selected_window_buffer_functions)) ++ { ++ Lisp_Object temp[4]; ++ temp[0] = Qset_selected_window_buffer_functions; ++ temp[1] = tem; ++ temp[2] = window; ++ temp[3] = buffer; ++ Frun_hook_with_args (4, temp); ++ } ++#endif /* USE_W32_IME */ ++ + return Qnil; + } + +@@ -7247,6 +7273,10 @@ + Fput (Qscroll_down, Qscroll_command, Qt); + + DEFSYM (Qwindow_configuration_change_hook, "window-configuration-change-hook"); ++#ifdef USE_W32_IME ++ DEFSYM (Qset_selected_window_buffer_functions, "set-selected-window-buffer-functions"); ++ DEFSYM (Qselect_window_functions, "select-window-functions"); ++#endif + DEFSYM (Qwindowp, "windowp"); + DEFSYM (Qwindow_configuration_p, "window-configuration-p"); + DEFSYM (Qwindow_live_p, "window-live-p"); +--- ./src/xdisp.c.orig 2015-04-02 16:23:06.000000000 +0900 ++++ ./src/xdisp.c 2015-04-11 07:28:36.435165000 +0900 +@@ -11683,8 +11683,24 @@ + /* Prepare for redisplay by updating menu-bar item lists when + appropriate. This can call eval. */ + ++#ifdef USE_W32_IME ++static void prepare_menu_bars_0 (); ++static void ++prepare_menu_bars() ++{ ++ extern Lisp_Object Qw32_ime_buffer_switch_p; ++ int count = SPECPDL_INDEX (); ++ ++ specbind (Qw32_ime_buffer_switch_p, Qnil); ++ prepare_menu_bars_0 (); ++ unbind_to (count, Qnil); ++} ++static void ++prepare_menu_bars_0 () ++#else + static void + prepare_menu_bars (void) ++#endif + { + bool all_windows = windows_or_buffers_changed || update_mode_lines; + bool some_windows = REDISPLAY_SOME_P (); diff --git a/mingw-w64-enca/PKGBUILD b/mingw-w64-enca/PKGBUILD index d52ccfc301..26335195a3 100644 --- a/mingw-w64-enca/PKGBUILD +++ b/mingw-w64-enca/PKGBUILD @@ -3,7 +3,7 @@ _realname=enca pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.16 -pkgrel=1 +pkgrel=2 pkgdesc="Charset analyser and converter (mingw-w64)" arch=('any') url="http://cihar.com/software/enca/" @@ -27,9 +27,10 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/enca-${pkgver}/configure \ + ../enca-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -37,6 +38,7 @@ build() { --mandir=${MINGW_PREFIX}/share/man \ --with-librecode=${MINGW_PREFIX} \ --enable-external + make } diff --git a/mingw-w64-enchant/01-not-use-hardcoded-paths.patch b/mingw-w64-enchant/01-not-use-hardcoded-paths.patch new file mode 100644 index 0000000000..5f77e41665 --- /dev/null +++ b/mingw-w64-enchant/01-not-use-hardcoded-paths.patch @@ -0,0 +1,185 @@ +diff -Naur enchant-1.6.0-orig/src/aspell/aspell_provider.c enchant-1.6.0-rel/src/aspell/aspell_provider.c +--- enchant-1.6.0-orig/src/aspell/aspell_provider.c 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0-rel/src/aspell/aspell_provider.c 2014-12-14 23:51:20.883200000 +0300 +@@ -405,6 +405,7 @@ + HMODULE aspell_module = NULL; + char* szModule; + ++#ifndef __MINGW32__ + /* first try load from registry path */ + szModule = enchant_get_registry_value ("Aspell", "Module"); + if(szModule) +@@ -426,6 +427,7 @@ + g_free(wszDirectory); + } + } ++#endif + + if (aspell_module == NULL) + { +diff -Naur enchant-1.6.0-orig/src/enchant.c enchant-1.6.0-rel/src/enchant.c +--- enchant-1.6.0-orig/src/enchant.c 2014-12-12 16:54:56.911400000 +0300 ++++ enchant-1.6.0-rel/src/enchant.c 2014-12-14 23:56:15.364400000 +0300 +@@ -143,11 +143,13 @@ + { + GSList *dirs = NULL; + const char* home_dir; ++#ifndef __MINGW32__ + char *tmp; + + tmp = enchant_get_registry_value_ex (1, "Config", "Home_Dir"); + if (tmp) + dirs = enchant_slist_append_unique_path (dirs, tmp); ++#endif + + home_dir = g_get_home_dir (); + if (home_dir) +@@ -210,6 +212,7 @@ + char * module_dir = NULL; + char * prefix = NULL; + ++#ifndef __MINGW32__ + { + char* user_module_dir; + +@@ -217,6 +220,7 @@ + if (user_module_dir) + module_dirs = enchant_slist_append_unique_path (module_dirs, user_module_dir); + } ++#endif + + #ifdef XP_TARGET_COCOA + module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup ([[EnchantResourceProvider instance] moduleFolder])); +@@ -238,7 +242,7 @@ + if (module_dir) + module_dirs = enchant_slist_append_unique_path (module_dirs, module_dir); + +-#if defined(ENCHANT_GLOBAL_MODULE_DIR) ++#if defined(ENCHANT_GLOBAL_MODULE_DIR) && !defined(__MINGW32__) + module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (ENCHANT_GLOBAL_MODULE_DIR)); + #else + /* Dynamically locate library and search for modules relative to it. */ +@@ -273,10 +277,12 @@ + conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup ([[EnchantResourceProvider instance] configFolder])); + #endif + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + ordering_dir = enchant_get_registry_value_ex (0, "Config", "Data_Dir"); + if (ordering_dir) + conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir); ++#endif + + /* Dynamically locate library and search for files relative to it. */ + prefix = enchant_get_prefix_dir(); +@@ -287,7 +293,7 @@ + conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir); + } + +-#if defined(ENCHANT_GLOBAL_ORDERING) ++#if defined(ENCHANT_GLOBAL_ORDERING) && !defined(__MINGW32__) + conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup (ENCHANT_GLOBAL_ORDERING)); + #endif + +@@ -346,13 +352,17 @@ + enchant_get_user_config_dirs (void) + { + GSList *dirs; ++#ifndef __MINGW32__ + char* user_config; ++#endif + + dirs = enchant_get_user_dirs(); + ++#ifndef __MINGW32__ + user_config = enchant_get_registry_value_ex (1, "Config", "Data_Dir"); + if (user_config) + dirs = enchant_slist_prepend_unique_path (dirs, user_config); ++#endif + + return dirs; + } +@@ -2271,7 +2281,7 @@ + } + #endif + +-#if defined(ENCHANT_PREFIX_DIR) ++#if defined(ENCHANT_PREFIX_DIR) && !defined(__MINGW32__) + if (!prefix) { + prefix = g_strdup (ENCHANT_PREFIX_DIR); + } +diff -Naur enchant-1.6.0-orig/src/ispell/ispell_checker.cpp enchant-1.6.0-rel/src/ispell/ispell_checker.cpp +--- enchant-1.6.0-orig/src/ispell/ispell_checker.cpp 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0-rel/src/ispell/ispell_checker.cpp 2014-12-14 23:58:50.986000000 +0300 +@@ -309,10 +309,12 @@ + #ifndef XP_TARGET_COCOA + char * ispell_prefix = NULL; + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + ispell_prefix = enchant_get_registry_value ("Ispell", "Data_Dir"); + if (ispell_prefix) + dirs = g_slist_append (dirs, ispell_prefix); ++#endif + + /* Dynamically locate library and search for modules relative to it. */ + char * enchant_prefix = enchant_get_prefix_dir(); +@@ -324,7 +326,7 @@ + } + #endif + +-#ifdef ENCHANT_ISPELL_DICT_DIR ++#if defined(ENCHANT_ISPELL_DICT_DIR) && !defined(__MINGW32__) + dirs = g_slist_append (dirs, g_strdup (ENCHANT_ISPELL_DICT_DIR)); + #endif + +diff -Naur enchant-1.6.0-orig/src/myspell/myspell_checker.cpp enchant-1.6.0-rel/src/myspell/myspell_checker.cpp +--- enchant-1.6.0-orig/src/myspell/myspell_checker.cpp 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0-rel/src/myspell/myspell_checker.cpp 2014-12-14 23:59:57.301600000 +0300 +@@ -257,10 +257,12 @@ + #ifndef XP_TARGET_COCOA + char * myspell_prefix = NULL; + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + myspell_prefix = enchant_get_registry_value ("Myspell", "Data_Dir"); + if (myspell_prefix) + dirs = g_slist_append (dirs, myspell_prefix); ++#endif + + /* Dynamically locate library and search for modules relative to it. */ + char * enchant_prefix = enchant_get_prefix_dir(); +@@ -272,7 +274,7 @@ + } + #endif + +-#ifdef ENCHANT_MYSPELL_DICT_DIR ++#if defined(ENCHANT_MYSPELL_DICT_DIR) && !defined(__MINGW32__) + dirs = g_slist_append (dirs, g_strdup (ENCHANT_MYSPELL_DICT_DIR)); + #endif + +diff -Naur enchant-1.6.0-orig/src/uspell/uspell_provider.cpp enchant-1.6.0-rel/src/uspell/uspell_provider.cpp +--- enchant-1.6.0-orig/src/uspell/uspell_provider.cpp 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0-rel/src/uspell/uspell_provider.cpp 2014-12-15 00:01:43.625600000 +0300 +@@ -85,10 +85,12 @@ + #ifndef XP_TARGET_COCOA + char * uspell_prefix = NULL; + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + uspell_prefix = enchant_get_registry_value ("Uspell", "Data_Dir"); + if (uspell_prefix) + dirs = g_slist_append (dirs, uspell_prefix); ++#endif + + /* Dynamically locate library and search for modules relative to it. */ + char * enchant_prefix = enchant_get_prefix_dir(); +@@ -100,7 +102,7 @@ + } + #endif + +-#ifdef ENCHANT_USPELL_DICT_DIR ++#if defined(ENCHANT_USPELL_DICT_DIR) && !defined(__MINGW32__) + dirs = g_slist_append (dirs, g_strdup (ENCHANT_USPELL_DICT_DIR)); + #endif + diff --git a/mingw-w64-enchant/01-relocate.patch b/mingw-w64-enchant/01-relocate.patch new file mode 100644 index 0000000000..111d85e1d4 --- /dev/null +++ b/mingw-w64-enchant/01-relocate.patch @@ -0,0 +1,880 @@ +diff -Naur enchant-1.6.0-orig/configure.in enchant-1.6.0/configure.in +--- enchant-1.6.0-orig/configure.in 2010-04-01 23:56:07.000000000 +0300 ++++ enchant-1.6.0/configure.in 2014-12-12 21:31:01.901400000 +0300 +@@ -176,7 +176,7 @@ + CXX_WARN_CFLAGS="$enchant_cxx_cv_warn_cflags" + AC_SUBST(CXX_WARN_CFLAGS) + +-ENCHANT_CFLAGS="$ENCHANT_CFLAGS -DENCHANT_PREFIX_DIR='\"$prefix\"'" ++ENCHANT_CFLAGS="$ENCHANT_CFLAGS -DENCHANT_PREFIX_DIR='\"$prefix\"' -DENCHANT_BIN_DIR='\"$bindir\"'" + + AC_SUBST(ENCHANT_CFLAGS) + AC_SUBST(ENCHANT_LIBS) +diff -Naur enchant-1.6.0-orig/src/aspell/aspell_provider.c enchant-1.6.0/src/aspell/aspell_provider.c +--- enchant-1.6.0-orig/src/aspell/aspell_provider.c 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0/src/aspell/aspell_provider.c 2014-12-12 17:06:21.689000000 +0300 +@@ -405,6 +405,7 @@ + HMODULE aspell_module = NULL; + char* szModule; + ++#ifndef __MINGW32__ + /* first try load from registry path */ + szModule = enchant_get_registry_value ("Aspell", "Module"); + if(szModule) +@@ -426,6 +427,7 @@ + g_free(wszDirectory); + } + } ++#endif + + if (aspell_module == NULL) + { +diff -Naur enchant-1.6.0-orig/src/enchant.c enchant-1.6.0/src/enchant.c +--- enchant-1.6.0-orig/src/enchant.c 2014-12-12 16:54:56.911400000 +0300 ++++ enchant-1.6.0/src/enchant.c 2014-12-12 21:29:55.568400000 +0300 +@@ -41,6 +41,7 @@ + #include "enchant.h" + #include "enchant-provider.h" + #include "pwl.h" ++#include "pathtools.h" + + #ifdef XP_TARGET_COCOA + #import "enchant_cocoa.h" +@@ -58,6 +59,26 @@ + #include "prefix.h" + #endif + ++ ++ENCHANT_MODULE_EXPORT (char *) ++enchant_path_relocation(const char *path) ++{ ++#if defined(__MINGW32__) && defined(ENCHANT_BIN_DIR) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (ENCHANT_BIN_DIR, path); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(path); ++#endif ++} ++ + ENCHANT_PLUGIN_DECLARE("Enchant") + + static char * +@@ -143,11 +164,13 @@ + { + GSList *dirs = NULL; + const char* home_dir; ++#ifndef __MINGW32__ + char *tmp; + + tmp = enchant_get_registry_value_ex (1, "Config", "Home_Dir"); + if (tmp) + dirs = enchant_slist_append_unique_path (dirs, tmp); ++#endif + + home_dir = g_get_home_dir (); + if (home_dir) +@@ -210,6 +233,7 @@ + char * module_dir = NULL; + char * prefix = NULL; + ++#ifndef __MINGW32__ + { + char* user_module_dir; + +@@ -217,6 +241,7 @@ + if (user_module_dir) + module_dirs = enchant_slist_append_unique_path (module_dirs, user_module_dir); + } ++#endif + + #ifdef XP_TARGET_COCOA + module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup ([[EnchantResourceProvider instance] moduleFolder])); +@@ -233,13 +258,15 @@ + g_slist_free (user_dirs); + } + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + module_dir = enchant_get_registry_value_ex (0, "Config", "Module_Dir"); + if (module_dir) + module_dirs = enchant_slist_append_unique_path (module_dirs, module_dir); ++#endif + + #if defined(ENCHANT_GLOBAL_MODULE_DIR) +- module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (ENCHANT_GLOBAL_MODULE_DIR)); ++ module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (enchant_path_relocation(ENCHANT_GLOBAL_MODULE_DIR))); + #else + /* Dynamically locate library and search for modules relative to it. */ + prefix = enchant_get_prefix_dir(); +@@ -273,11 +300,14 @@ + conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup ([[EnchantResourceProvider instance] configFolder])); + #endif + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + ordering_dir = enchant_get_registry_value_ex (0, "Config", "Data_Dir"); + if (ordering_dir) + conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir); ++#endif + ++#if !defined(ENCHANT_GLOBAL_ORDERING) + /* Dynamically locate library and search for files relative to it. */ + prefix = enchant_get_prefix_dir(); + if(prefix) +@@ -287,8 +317,8 @@ + conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir); + } + +-#if defined(ENCHANT_GLOBAL_ORDERING) +- conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup (ENCHANT_GLOBAL_ORDERING)); ++#else ++ conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup (enchant_path_relocation(ENCHANT_GLOBAL_ORDERING))); + #endif + + return conf_dirs; +@@ -346,13 +376,17 @@ + enchant_get_user_config_dirs (void) + { + GSList *dirs; ++#ifndef __MINGW32__ + char* user_config; ++#endif + + dirs = enchant_get_user_dirs(); + ++#ifndef __MINGW32__ + user_config = enchant_get_registry_value_ex (1, "Config", "Data_Dir"); + if (user_config) + dirs = enchant_slist_prepend_unique_path (dirs, user_config); ++#endif + + return dirs; + } +@@ -2273,7 +2307,7 @@ + + #if defined(ENCHANT_PREFIX_DIR) + if (!prefix) { +- prefix = g_strdup (ENCHANT_PREFIX_DIR); ++ prefix = g_strdup(enchant_path_relocation(ENCHANT_PREFIX_DIR)); + } + #endif + +diff -Naur enchant-1.6.0-orig/src/enchant.h enchant-1.6.0/src/enchant.h +--- enchant-1.6.0-orig/src/enchant.h 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0/src/enchant.h 2014-12-12 20:16:47.164400000 +0300 +@@ -51,6 +51,9 @@ + typedef struct str_enchant_broker EnchantBroker; + typedef struct str_enchant_dict EnchantDict; + ++ENCHANT_MODULE_EXPORT (char *) ++ enchant_path_relocation(const char *path); ++ + /* const */ + ENCHANT_MODULE_EXPORT (char *) + enchant_get_version (void); +diff -Naur enchant-1.6.0-orig/src/ispell/ispell_checker.cpp enchant-1.6.0/src/ispell/ispell_checker.cpp +--- enchant-1.6.0-orig/src/ispell/ispell_checker.cpp 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0/src/ispell/ispell_checker.cpp 2014-12-12 20:17:39.814400000 +0300 +@@ -306,13 +306,15 @@ + + /* until I work out how to link the modules against enchant in MacOSX - fjf + */ +-#ifndef XP_TARGET_COCOA ++#if !defined(XP_TARGET_COCOA) && !defined(ENCHANT_ISPELL_DICT_DIR) + char * ispell_prefix = NULL; + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + ispell_prefix = enchant_get_registry_value ("Ispell", "Data_Dir"); + if (ispell_prefix) + dirs = g_slist_append (dirs, ispell_prefix); ++#endif + + /* Dynamically locate library and search for modules relative to it. */ + char * enchant_prefix = enchant_get_prefix_dir(); +@@ -325,7 +327,7 @@ + #endif + + #ifdef ENCHANT_ISPELL_DICT_DIR +- dirs = g_slist_append (dirs, g_strdup (ENCHANT_ISPELL_DICT_DIR)); ++ dirs = g_slist_append (dirs, g_strdup (enchant_path_relocation(ENCHANT_ISPELL_DICT_DIR))); + #endif + + { +diff -Naur enchant-1.6.0-orig/src/Makefile.am enchant-1.6.0/src/Makefile.am +--- enchant-1.6.0-orig/src/Makefile.am 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0/src/Makefile.am 2014-12-12 16:37:03.505000000 +0300 +@@ -14,7 +14,7 @@ + endif + + libenchant_la_DEPENDENCIES = @ENCHANT_WIN32_RESOURCE@ +-libenchant_la_SOURCES = prefix.c enchant.c pwl.c enchant.h prefix.h pwl.h ++libenchant_la_SOURCES = pathtools.c prefix.c enchant.c pwl.c enchant.h pathtools.h prefix.h pwl.h + + libenchant_includedir = $(includedir)/enchant + libenchant_include_HEADERS = enchant.h enchant-provider.h enchant++.h +diff -Naur enchant-1.6.0-orig/src/myspell/myspell_checker.cpp enchant-1.6.0/src/myspell/myspell_checker.cpp +--- enchant-1.6.0-orig/src/myspell/myspell_checker.cpp 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0/src/myspell/myspell_checker.cpp 2014-12-12 20:18:04.712000000 +0300 +@@ -254,13 +254,15 @@ + + /* until I work out how to link the modules against enchant in MacOSX - fjf + */ +-#ifndef XP_TARGET_COCOA ++#if !defined(XP_TARGET_COCOA) && !defined(ENCHANT_MYSPELL_DICT_DIR) + char * myspell_prefix = NULL; + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + myspell_prefix = enchant_get_registry_value ("Myspell", "Data_Dir"); + if (myspell_prefix) + dirs = g_slist_append (dirs, myspell_prefix); ++#endif + + /* Dynamically locate library and search for modules relative to it. */ + char * enchant_prefix = enchant_get_prefix_dir(); +@@ -273,7 +275,7 @@ + #endif + + #ifdef ENCHANT_MYSPELL_DICT_DIR +- dirs = g_slist_append (dirs, g_strdup (ENCHANT_MYSPELL_DICT_DIR)); ++ dirs = g_slist_append (dirs, g_strdup (enchant_path_relocation(ENCHANT_MYSPELL_DICT_DIR))); + #endif + + #if defined(_WIN32) +diff -Naur enchant-1.6.0-orig/src/pathtools.c enchant-1.6.0/src/pathtools.c +--- enchant-1.6.0-orig/src/pathtools.c 1970-01-01 03:00:00.000000000 +0300 ++++ enchant-1.6.0/src/pathtools.c 2014-12-12 20:13:13.631600000 +0300 +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff -Naur enchant-1.6.0-orig/src/pathtools.h enchant-1.6.0/src/pathtools.h +--- enchant-1.6.0-orig/src/pathtools.h 1970-01-01 03:00:00.000000000 +0300 ++++ enchant-1.6.0/src/pathtools.h 2014-12-12 20:31:02.151400000 +0300 +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ +diff -Naur enchant-1.6.0-orig/src/uspell/uspell_provider.cpp enchant-1.6.0/src/uspell/uspell_provider.cpp +--- enchant-1.6.0-orig/src/uspell/uspell_provider.cpp 2010-04-01 23:53:37.000000000 +0300 ++++ enchant-1.6.0/src/uspell/uspell_provider.cpp 2014-12-12 20:18:18.814400000 +0300 +@@ -82,13 +82,15 @@ + + /* until I work out how to link the modules against enchant in MacOSX - fjf + */ +-#ifndef XP_TARGET_COCOA ++#if !defined(XP_TARGET_COCOA) && !defined(ENCHANT_USPELL_DICT_DIR) + char * uspell_prefix = NULL; + ++#ifndef __MINGW32__ + /* Look for explicitly set registry values */ + uspell_prefix = enchant_get_registry_value ("Uspell", "Data_Dir"); + if (uspell_prefix) + dirs = g_slist_append (dirs, uspell_prefix); ++#endif + + /* Dynamically locate library and search for modules relative to it. */ + char * enchant_prefix = enchant_get_prefix_dir(); +@@ -101,7 +103,7 @@ + #endif + + #ifdef ENCHANT_USPELL_DICT_DIR +- dirs = g_slist_append (dirs, g_strdup (ENCHANT_USPELL_DICT_DIR)); ++ dirs = g_slist_append (dirs, g_strdup (enchant_path_relocation(ENCHANT_USPELL_DICT_DIR))); + #endif + + { diff --git a/mingw-w64-enchant/PKGBUILD b/mingw-w64-enchant/PKGBUILD index 63ff883560..ff732c81e3 100644 --- a/mingw-w64-enchant/PKGBUILD +++ b/mingw-w64-enchant/PKGBUILD @@ -1,44 +1,64 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=enchant - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.6.0 -pkgrel=1 +pkgrel=8 pkgdesc="Enchanting Spell Checking Library (mingw-w64)" arch=('any') url="http://www.abisource.com/" -license=("LGPL-2.1+") +license=(LGPL2.1) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs - ${MINGW_PACKAGE_PREFIX}-glib2 - ${MINGW_PACKAGE_PREFIX}-hunspell) -options=('!libtool' 'strip' '!makeflags') -source=("http://www.abisource.com/downloads/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz") -md5sums=('de11011aff801dc61042828041fb59c7') + ${MINGW_PACKAGE_PREFIX}-glib2 + #${MINGW_PACKAGE_PREFIX}-aspell + ${MINGW_PACKAGE_PREFIX}-hunspell) +options=('!libtool' 'strip' '!debug' '!makeflags') +source=("http://www.abisource.com/downloads/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz" + 01-relocate.patch + 01-not-use-hardcoded-paths.patch) +md5sums=('de11011aff801dc61042828041fb59c7' + 'd0c6e73ddd269081725ad05fd6b529c1' + '4fc6176b94518ac1307e4a2173dc64d4') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" + # True relocate patch + #patch -p1 -i ${srcdir}/01-relocate.patch + # Use instead relocate patch + patch -p1 -i ${srcdir}/01-not-use-hardcoded-paths.patch + + autoreconf -fiv } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - mkdir -p "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ - --enable-ispell --enable-myspell --with-system-myspell \ - --disable-aspell --disable-voikko --disable-uspell \ - --disable-hspell --disable-zemberek - + --enable-ispell \ + --enable-myspell \ + --disable-aspell \ + --with-system-myspell \ + --with-aspell-prefix=${MINGW_PREFIX} \ + --disable-voikko \ + --disable-uspell \ + --disable-hspell \ + --disable-zemberek + + # MSYS2_ARG_CONV_EXCL="-DENCHANT_USPELL_DICT_DIR=;-DENCHANT_MYSPELL_DICT_DIR=;-DENCHANT_ISPELL_DICT_DIR=;-DENCHANT_PREFIX_DIR=;-DENCHANT_GLOBAL_MODULE_DIR=;-DENCHANT_GLOBAL_ORDERING=;-DENCHANT_BIN_DIR=" make } package() { - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" + # MSYS2_ARG_CONV_EXCL="-DENCHANT_USPELL_DICT_DIR=;-DENCHANT_MYSPELL_DICT_DIR=;-DENCHANT_ISPELL_DICT_DIR=;-DENCHANT_PREFIX_DIR=;-DENCHANT_GLOBAL_MODULE_DIR=;-DENCHANT_GLOBAL_ORDERING=;-DENCHANT_BIN_DIR=" make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB" } diff --git a/mingw-w64-eog-plugins/001-win.patch b/mingw-w64-eog-plugins/001-win.patch index 80587f3bab..cd3a554e06 100644 --- a/mingw-w64-eog-plugins/001-win.patch +++ b/mingw-w64-eog-plugins/001-win.patch @@ -1,15 +1,15 @@ ---- ./configure.ac.orig 2014-10-18 00:09:48.261871000 +0200 -+++ ./configure.ac 2014-10-18 00:09:50.288980900 +0200 +--- ./configure.ac.orig 2015-03-25 18:12:11.388179700 +0100 ++++ ./configure.ac 2015-03-25 18:12:49.726012100 +0100 @@ -46,6 +46,7 @@ - glib-2.0 >= 2.32.0 - gtk+-3.0 >= 3.3.8 + glib-2.0 >= 2.38.0 + gtk+-3.0 >= 3.14.0 libpeas-1.0 >= 0.7.4 + libpeas-gtk-1.0 >= 0.7.4 - eog >= 3.11.4 + eog >= 3.15.90 ]) AC_SUBST(EOG_LIBS) --- ./plugins/exif-display/Makefile.am.orig 2014-08-10 17:37:36.000000000 +0200 -+++ ./plugins/exif-display/Makefile.am 2014-10-17 22:27:17.935709100 +0200 ++++ ./plugins/exif-display/Makefile.am 2015-03-25 18:12:11.398181200 +0100 @@ -25,10 +25,11 @@ eog-exif-display-plugin-setup.h @@ -24,7 +24,7 @@ eog-exif-display-plugin-resources.c: eog-exif-display-plugin.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/eog-exif-display-plugin.gresource.xml) --- ./plugins/fit-to-width/Makefile.am.orig 2014-08-09 20:39:08.000000000 +0200 -+++ ./plugins/fit-to-width/Makefile.am 2014-10-17 22:38:10.051051300 +0200 ++++ ./plugins/fit-to-width/Makefile.am 2015-03-25 18:12:11.448183500 +0100 @@ -15,9 +15,9 @@ eog-fit-to-width-plugin.c @@ -38,7 +38,7 @@ # Plugin Info --- ./plugins/hide-titlebar/Makefile.am.orig 2014-08-09 20:39:08.000000000 +0200 -+++ ./plugins/hide-titlebar/Makefile.am 2014-10-17 22:38:33.070962400 +0200 ++++ ./plugins/hide-titlebar/Makefile.am 2015-03-25 18:12:11.455184100 +0100 @@ -15,9 +15,9 @@ eog-hide-titlebar-plugin.c @@ -52,7 +52,7 @@ # Plugin Info --- ./plugins/light-theme/Makefile.am.orig 2014-08-09 20:39:08.000000000 +0200 -+++ ./plugins/light-theme/Makefile.am 2014-10-17 22:38:39.586328900 +0200 ++++ ./plugins/light-theme/Makefile.am 2015-03-25 18:12:11.461204300 +0100 @@ -15,9 +15,9 @@ eog-light-theme-plugin.c @@ -66,7 +66,7 @@ # Plugin Info --- ./plugins/map/Makefile.am.orig 2014-08-09 20:39:08.000000000 +0200 -+++ ./plugins/map/Makefile.am 2014-10-17 22:39:13.779262400 +0200 ++++ ./plugins/map/Makefile.am 2015-03-25 18:12:11.474185900 +0100 @@ -18,7 +18,9 @@ libmap_la_LDFLAGS = \ $(PLUGIN_LIBTOOL_FLAGS) \ @@ -79,7 +79,7 @@ # Plugin Info --- ./plugins/postasa/Makefile.am.orig 2014-08-09 20:39:08.000000000 +0200 -+++ ./plugins/postasa/Makefile.am 2014-10-17 22:39:32.713163200 +0200 ++++ ./plugins/postasa/Makefile.am 2015-03-25 18:12:11.532189200 +0100 @@ -24,10 +24,12 @@ libpostasa_la_LDFLAGS = \ @@ -95,8 +95,8 @@ eog-postasa-plugin-resources.c: eog-postasa-plugin.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/eog-postasa-plugin.gresource.xml) $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --internal --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/eog-postasa-plugin.gresource.xml ---- ./plugins/postr/Makefile.am.orig 2014-10-17 22:46:12.801774300 +0200 -+++ ./plugins/postr/Makefile.am 2014-10-17 22:46:21.972346700 +0200 +--- ./plugins/postr/Makefile.am.orig 2015-02-15 14:53:30.000000000 +0100 ++++ ./plugins/postr/Makefile.am 2015-03-25 18:12:11.563210600 +0100 @@ -15,9 +15,10 @@ eog-postr-plugin.c @@ -111,7 +111,7 @@ # Plugin Info --- ./plugins/send-by-mail/Makefile.am.orig 2014-08-09 20:39:08.000000000 +0200 -+++ ./plugins/send-by-mail/Makefile.am 2014-10-17 22:39:44.313194800 +0200 ++++ ./plugins/send-by-mail/Makefile.am 2015-03-25 18:12:11.593212500 +0100 @@ -15,9 +15,9 @@ eog-send-by-mail-plugin.c diff --git a/mingw-w64-eog-plugins/PKGBUILD b/mingw-w64-eog-plugins/PKGBUILD index 58b6d5c56f..5658853ac3 100644 --- a/mingw-w64-eog-plugins/PKGBUILD +++ b/mingw-w64-eog-plugins/PKGBUILD @@ -1,27 +1,29 @@ # Maintainer: Andrea Zagli _realname=eog-plugins +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.1 +pkgver=3.16.3 pkgrel=1 arch=('any') pkgdesc="Eye of GNOME graphics viewer program - plugins (mingw-w64)" options=(strip staticlibs) depends=("${MINGW_PACKAGE_PREFIX}-eog" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-libgdata" + "${MINGW_PACKAGE_PREFIX}-libchamplain" "${MINGW_PACKAGE_PREFIX}-libexif" + "${MINGW_PACKAGE_PREFIX}-libgdata" "${MINGW_PACKAGE_PREFIX}-postr" - "${MINGW_PACKAGE_PREFIX}-libchamplain") + "${MINGW_PACKAGE_PREFIX}-python2") makedepends=("${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas") options=('strip' 'staticlibs') license=("GPL 2") url="http://www.gnome.org" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz 001-win.patch 002-champlain.patch) -sha256sums=('12070173d875d6e9f70d8b918bbf3dfcc5af8c1681e4fabf212dae96b85318f5' - '8dcb1e721785460d58f32911c52de3b41ddeb23cc3326ba07f5c95ec60471818' +sha256sums=('2d2198ed026b1c28329ac3d353b3031c2024277d81d60f3c1e626f4701a73bd2' + '7b5a599b0fb719156747627944cae4b1107ffb8f11bcaddf0c8100d89c93548d' '3b7fab068ff3739fed247f72abbc18accb409b9008593e806f5c4e3df1d9b32d') prepare() { @@ -34,6 +36,7 @@ prepare() { } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} @@ -43,10 +46,13 @@ build() { --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-eog-plugins/eog-plugins-i686.install b/mingw-w64-eog-plugins/eog-plugins-i686.install new file mode 100644 index 0000000000..b5742c7285 --- /dev/null +++ b/mingw-w64-eog-plugins/eog-plugins-i686.install @@ -0,0 +1,12 @@ +post_install() { + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-eog-plugins/eog-plugins-x86_64.install b/mingw-w64-eog-plugins/eog-plugins-x86_64.install new file mode 100644 index 0000000000..3684301013 --- /dev/null +++ b/mingw-w64-eog-plugins/eog-plugins-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-eog/001-win.patch b/mingw-w64-eog/001-win.patch index 4f974f0764..9371f98205 100644 --- a/mingw-w64-eog/001-win.patch +++ b/mingw-w64-eog/001-win.patch @@ -292,32 +292,6 @@ #include #include -@@ -4746,24 +4745,8 @@ - * By ensuring we keep the GAppInfo around, we avoid the - * possibility of that situation occurring. - */ -- static GDesktopAppInfo *app_info = NULL; -- static gboolean initialised; - -- if (!initialised) { -- gchar *editor; -- -- editor = g_settings_get_string (window->priv->ui_settings, -- EOG_CONF_UI_EXTERNAL_EDITOR); -- -- if (editor != NULL) { -- app_info = g_desktop_app_info_new (editor); -- } -- -- initialised = TRUE; -- g_free (editor); -- } -- -- return (GAppInfo *) app_info; -+ return NULL; - } - - static void --- ./src/Makefile.am.orig 2014-10-15 21:46:54.750243900 +0200 +++ ./src/Makefile.am 2014-10-16 20:30:25.278428300 +0200 @@ -186,21 +186,21 @@ diff --git a/mingw-w64-eog/002-relocation-support.patch b/mingw-w64-eog/002-relocation-support.patch index 57a4e039ef..6a1d991152 100644 --- a/mingw-w64-eog/002-relocation-support.patch +++ b/mingw-w64-eog/002-relocation-support.patch @@ -1,7 +1,6 @@ -diff -Naur eog-3.14.1-orig/src/eog-application.c eog-3.14.1/src/eog-application.c ---- eog-3.14.1-orig/src/eog-application.c 2014-07-22 13:42:43.000000000 +0400 -+++ eog-3.14.1/src/eog-application.c 2014-10-19 11:41:44.795200000 +0400 -@@ -284,8 +284,20 @@ +--- ./src/eog-application.c.orig 2015-03-19 21:02:08.000000000 +0100 ++++ ./src/eog-application.c 2015-03-25 21:54:04.447015200 +0100 +@@ -318,8 +318,20 @@ g_object_unref (provider); /* Add application specific icons to search path */ @@ -23,7 +22,7 @@ diff -Naur eog-3.14.1-orig/src/eog-application.c eog-3.14.1/src/eog-application. gtk_window_set_default_icon_name ("eog"); g_set_application_name (_("Image Viewer")); -@@ -307,6 +319,7 @@ +@@ -342,6 +354,7 @@ G_CALLBACK (on_extension_removed), app); peas_extension_set_call (app->priv->extensions, "activate"); @@ -31,164 +30,59 @@ diff -Naur eog-3.14.1-orig/src/eog-application.c eog-3.14.1/src/eog-application. } static void -@@ -442,8 +455,20 @@ - - priv->ui_settings = g_settings_new (EOG_CONF_UI); - -+ gchar * eog_toolbar_file; -+#ifdef G_OS_WIN32 -+{ -+ gchar *dir; -+ -+ dir = g_win32_get_package_installation_directory_of_module (NULL); -+ eog_toolbar_file = g_build_filename (dir, "share", "eog", "eog-toolbar.xml", NULL); -+ g_free (dir); -+} -+#else -+ eog_toolbar_file = g_strdup (EOG_DATA_DIR G_DIR_SEPARATOR_S "eog-toolbar.xml"); -+#endif - egg_toolbars_model_load_names (priv->toolbars_model, -- EOG_DATA_DIR "/eog-toolbar.xml"); -+ eog_toolbar_file); - - if (G_LIKELY (dot_dir != NULL)) - priv->toolbars_file = g_build_filename -@@ -453,13 +478,14 @@ - priv->toolbars_file)) { - - egg_toolbars_model_load_toolbars (priv->toolbars_model, -- EOG_DATA_DIR "/eog-toolbar.xml"); -+ eog_toolbar_file); - } - - egg_toolbars_model_set_flags (priv->toolbars_model, 0, - EGG_TB_MODEL_NOT_REMOVABLE); - - eog_application_load_accelerators (); -+ g_free(eog_toolbar_file); - } - - /** -@@ -780,12 +806,26 @@ - - priv->toolbars_model = egg_toolbars_model_new (); - -+ gchar * eog_toolbar_file; -+#ifdef G_OS_WIN32 -+{ -+ gchar *dir; -+ -+ dir = g_win32_get_package_installation_directory_of_module (NULL); -+ eog_toolbar_file = g_build_filename (dir, "share", "eog", "eog-toolbar.xml", NULL); -+ g_free (dir); -+} -+#else -+ eog_toolbar_file = g_strdup (EOG_DATA_DIR G_DIR_SEPARATOR_S "eog-toolbar.xml"); -+#endif - egg_toolbars_model_load_names (priv->toolbars_model, -- EOG_DATA_DIR "/eog-toolbar.xml"); -+ eog_toolbar_file); - egg_toolbars_model_load_toolbars (priv->toolbars_model, -- EOG_DATA_DIR "/eog-toolbar.xml"); -+ eog_toolbar_file); - egg_toolbars_model_set_flags (priv->toolbars_model, 0, - EGG_TB_MODEL_NOT_REMOVABLE); -+ -+ g_free(eog_toolbar_file); - } - - static void -diff -Naur eog-3.14.1-orig/src/eog-plugin-engine.c eog-3.14.1/src/eog-plugin-engine.c ---- eog-3.14.1-orig/src/eog-plugin-engine.c 2014-01-14 00:17:51.000000000 +0400 -+++ eog-3.14.1/src/eog-plugin-engine.c 2014-10-19 11:49:44.495200000 +0400 -@@ -85,7 +85,19 @@ - const gchar * const * system_data_dirs; - GError *error = NULL; - -- private_path = g_build_filename (LIBDIR, "eog", -+ gchar * eog_lib_dir; -+#ifdef G_OS_WIN32 -+{ -+ gchar *dir; -+ -+ dir = g_win32_get_package_installation_directory_of_module (NULL); -+ eog_lib_dir = g_build_filename (dir, "lib", NULL); -+ g_free (dir); -+} -+#else -+ eog_lib_dir = g_strdup (LIBDIR); -+#endif -+ private_path = g_build_filename (eog_lib_dir, - "girepository-1.0", NULL); - - /* This should be moved to libpeas */ -@@ -117,6 +129,7 @@ - } - - g_free (private_path); -+ g_free (eog_lib_dir); - - engine = EOG_PLUGIN_ENGINE (g_object_new (EOG_TYPE_PLUGIN_ENGINE, - NULL)); -@@ -150,10 +163,24 @@ +--- ./src/eog-plugin-engine.c.orig 2014-01-13 21:17:51.000000000 +0100 ++++ ./src/eog-plugin-engine.c 2015-03-25 21:58:09.584059500 +0100 +@@ -150,10 +150,33 @@ } /* Find system-wide plugins */ -- eog_debug_message (DEBUG_PLUGINS, "Adding system plugin dir (" -- EOG_PLUGIN_DIR ")to plugins search path"); -+ gchar * eog_plugin_dir; -+ gchar * eog_data_plugin_dir; +#ifdef G_OS_WIN32 +{ -+ gchar *dir; ++ gchar *dir; ++ gchar *eog_plugin_dir; ++ gchar *eog_data_plugin_dir; ++ gchar *debug_message; + -+ dir = g_win32_get_package_installation_directory_of_module (NULL); -+ eog_plugin_dir = g_build_filename (dir, "lib", "eog", "plugins", NULL); -+ eog_data_plugin_dir = g_build_filename (dir, "share", "eog", "plugins", NULL); -+ g_free (dir); ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ eog_plugin_dir = g_build_filename (dir, "lib", "eog", "plugins", NULL); ++ eog_data_plugin_dir = g_build_filename (dir, "share", "eog", "plugins", NULL); ++ g_free (dir); ++ ++ debug_message = g_strdup_printf ("Adding system plugin dir (%s) to plugins search path", eog_plugin_dir); ++ eog_debug_message (DEBUG_PLUGINS, debug_message); ++ peas_engine_add_search_path (PEAS_ENGINE (engine), ++ eog_plugin_dir, eog_data_plugin_dir); ++ ++ g_free (eog_plugin_dir); ++ g_free (eog_data_plugin_dir); ++ g_free (debug_message); +} +#else -+ eog_plugin_dir = g_strdup (EOG_PLUGIN_DIR); -+ eog_data_plugin_dir = g_strdup (EOG_PLUGIN_DATA_DIR); -+#endif -+ eog_debug_message (DEBUG_PLUGINS, "Adding system plugin dir (%s) to plugins search path", eog_plugin_dir); + eog_debug_message (DEBUG_PLUGINS, "Adding system plugin dir (" + EOG_PLUGIN_DIR ")to plugins search path"); peas_engine_add_search_path (PEAS_ENGINE (engine), -- EOG_PLUGIN_DIR, EOG_PLUGIN_DATA_DIR); -+ eog_plugin_dir, eog_data_plugin_dir); + EOG_PLUGIN_DIR, EOG_PLUGIN_DATA_DIR); ++#endif g_settings_bind (engine->priv->plugins_settings, EOG_CONF_PLUGINS_ACTIVE_PLUGINS, -@@ -162,6 +190,8 @@ - G_SETTINGS_BIND_DEFAULT); +--- ./src/main.c.orig 2015-02-08 15:16:05.000000000 +0100 ++++ ./src/main.c 2015-03-25 21:54:04.655026900 +0100 +@@ -92,7 +92,17 @@ + GError *error = NULL; + GOptionContext *ctx; - g_free (user_plugin_path); -+ g_free (eog_plugin_dir); -+ g_free (eog_data_plugin_dir); - - return engine; - } -diff -Naur eog-3.14.1-orig/src/eog-thumbnail.c eog-3.14.1/src/eog-thumbnail.c ---- eog-3.14.1-orig/src/eog-thumbnail.c 2014-03-22 23:09:38.000000000 +0400 -+++ eog-3.14.1/src/eog-thumbnail.c 2014-10-19 12:16:07.387600000 +0400 -@@ -533,7 +533,20 @@ - void - eog_thumbnail_init (void) - { -+ gchar * eog_data_dir; +#ifdef G_OS_WIN32 +{ -+ gchar *dir; ++ gchar *dir; + -+ dir = g_win32_get_package_installation_directory_of_module (NULL); -+ eog_data_dir = g_build_filename (dir, "share", "eog", "/pixmaps/thumbnail-frame.png", NULL); -+ g_free (dir); ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ bindtextdomain (PACKAGE, g_build_filename (dir, "share", "locale", NULL)); ++ g_free (dir); +} +#else -+ eog_data_dir = g_strdup (EOG_DATA_DIR "/pixmaps/thumbnail-frame.png"); + bindtextdomain (PACKAGE, EOG_LOCALE_DIR); +#endif - if (frame == NULL) { -- frame = gdk_pixbuf_new_from_file (EOG_DATA_DIR "/pixmaps/thumbnail-frame.png", NULL); -+ frame = gdk_pixbuf_new_from_file (eog_data_dir, NULL); - } -+ g_free (eog_data_dir); - } + bind_textdomain_codeset (PACKAGE, "UTF-8"); + textdomain (PACKAGE); + diff --git a/mingw-w64-eog/PKGBUILD b/mingw-w64-eog/PKGBUILD index d80292db39..d9d6ee67c1 100644 --- a/mingw-w64-eog/PKGBUILD +++ b/mingw-w64-eog/PKGBUILD @@ -1,25 +1,29 @@ # Maintainer: Andrea Zagli _realname=eog +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.2 +pkgver=3.16.3 pkgrel=1 arch=('any') pkgdesc="Eye of GNOME graphics viewer program (mingw-w64)" options=(strip staticlibs) -depends=("${MINGW_PACKAGE_PREFIX}-gtk3" +depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - "${MINGW_PACKAGE_PREFIX}-shared-mime-info" - "${MINGW_PACKAGE_PREFIX}-libpeas" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime" "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" - "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-libexif" "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libpeas" "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection") + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-shared-mime-info") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "gtk-doc") options=('strip' 'staticlibs') license=("GPL 2") url="http://www.gnome.org" @@ -29,9 +33,9 @@ source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_real 002-relocation-support.patch 003-fix-install-dirs.patch 004-give-cc-to-gir-scanner.mingw.patch) -sha256sums=('bd532ba15a066e69eaeea3167d862176e231ee56f003ae3817d99bcb41764c5c' - '1309ea222055d951fbe5c1c9be0245adecdfe221ee9ce0b2cef8fab3597d3864' - '2a1b947202e765011ee37c40786baee96c04e23962a481bcee36757cabc3c669' +sha256sums=('ee6d101f8e73aacc8d48256f06a780c6d0d5f3975990f375f58cd0e70816b766' + '31db56ea4d64059e60c478a7ba1475d9beaf65f2c42967909adbb41843c2d129' + 'a7e897da94d7033fd2ad4d81129f7a60cd0f68bd8d887c079c79cef802d02a4d' 'abc9df56f5fc2213ba6efdcdad269534496d6eda900194b4000910dacf4042d9' '8fd79bb5f0e411d682abd7cffa3b9b8476cf8a073ea17c2e0bd1a386e3b060e0') @@ -42,13 +46,18 @@ prepare() { patch -p1 -i ${srcdir}/002-relocation-support.patch patch -p1 -i ${srcdir}/003-fix-install-dirs.patch patch -p1 -i ${srcdir}/004-give-cc-to-gir-scanner.mingw.patch + autoreconf -isf } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p doc/reference/html + cp -rf ../${_realname}-${pkgver}/doc/reference/html/* doc/reference/html + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ @@ -63,6 +72,8 @@ build() { } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-eog/eog-i686.install b/mingw-w64-eog/eog-i686.install index 2a92fca906..b5742c7285 100644 --- a/mingw-w64-eog/eog-i686.install +++ b/mingw-w64-eog/eog-i686.install @@ -1,5 +1,6 @@ post_install() { - /mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/hicolor } post_upgrade() { diff --git a/mingw-w64-eog/eog-x86_64.install b/mingw-w64-eog/eog-x86_64.install index 72636007e9..3684301013 100644 --- a/mingw-w64-eog/eog-x86_64.install +++ b/mingw-w64-eog/eog-x86_64.install @@ -1,5 +1,6 @@ post_install() { - /mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/hicolor } post_upgrade() { diff --git a/mingw-w64-evince/0002-missing-include.patch b/mingw-w64-evince/0002-missing-include.patch new file mode 100644 index 0000000000..f6247fb1ef --- /dev/null +++ b/mingw-w64-evince/0002-missing-include.patch @@ -0,0 +1,10 @@ +--- evince-3.18.0/backend/pdf/ev-poppler.cc.orig 2015-09-25 12:25:31.343557800 +0300 ++++ evince-3.18.0/backend/pdf/ev-poppler.cc 2015-09-25 12:25:48.411850800 +0300 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/mingw-w64-evince/001-give-cc-to-gir-scanner.mingw.patch b/mingw-w64-evince/001-give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index 8e84a4824b..0000000000 --- a/mingw-w64-evince/001-give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- evince-3.14.0/libdocument/Makefile.am.orig 2014-09-24 08:52:47.575000000 +0500 -+++ evince-3.14.0/libdocument/Makefile.am 2014-09-24 08:52:59.727400000 +0500 -@@ -167,6 +167,7 @@ - -I$(builddir) - EvinceDocument_@EV_API_VERSION_U@_gir_EXPORT_PACKAGES = evince-document-$(EV_API_VERSION) - INTROSPECTION_GIRS = EvinceDocument-$(EV_API_VERSION).gir -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - girdir = $(datadir)/gir-1.0 - gir_DATA = EvinceDocument-$(EV_API_VERSION).gir ---- evince-3.14.0/libview/Makefile.am.orig 2014-09-24 08:53:51.044400000 +0500 -+++ evince-3.14.0/libview/Makefile.am 2014-09-24 08:54:11.090400000 +0500 -@@ -150,6 +150,7 @@ - --identifier-prefix=Ev \ - --symbol-prefix=ev - INTROSPECTION_GIRS = EvinceView-$(EV_API_VERSION).gir -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - girdir = $(datadir)/gir-1.0 - gir_DATA = EvinceView-$(EV_API_VERSION).gir diff --git a/mingw-w64-evince/PKGBUILD b/mingw-w64-evince/PKGBUILD index 0961b19661..13417c5eb3 100644 --- a/mingw-w64-evince/PKGBUILD +++ b/mingw-w64-evince/PKGBUILD @@ -1,52 +1,54 @@ # Maintainer: Andrea Zagli _realname=evince +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.1 +pkgver=3.18.2 pkgrel=1 arch=('any') pkgdesc="Document (PostScript, PDF) viewer (mingw-w64)" -options=(strip staticlibs) -depends=("${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libgxps" - "${MINGW_PACKAGE_PREFIX}-libspectre" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-djvulibre" - "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" - "${MINGW_PACKAGE_PREFIX}-poppler" - "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "make" - "libtool" - "automake-wrapper" - "autoconf" - "intltool" - "itstool" - "gettext-devel" - "yelp-tools") license=("GPL 2") url="http://www.gnome.org" +options=('strip' 'staticlibs') +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-djvulibre" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libgxps" + "${MINGW_PACKAGE_PREFIX}-libspectre" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-poppler") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "make" + "libtool" + "automake-wrapper" + "autoconf" + "gtk-doc" + "intltool" + "itstool" + "gettext-devel" + "yelp-tools") install=evince-${CARCH}.install -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz - 001-give-cc-to-gir-scanner.mingw.patch) -sha256sums=('13ec728d6957aa18ba21a3a66504dd52b8607596337f30f0908b62b5fcc14507' - '2b704ea359fd73fb6ee905868b4b61246bb143cf783d7f970425a5236daa0686') +source=(https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 0002-missing-include.patch) +sha256sums=('42ad6c7354d881a9ecab136ea84ff867acb942605bcfac48b6c12e1c2d8ecb17' + 'd2850c4bdfa87fa56bae2674d2c798f9181bfb3f19319fbc9966672caae48237') prepare() { cd "${srcdir}"/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-give-cc-to-gir-scanner.mingw.patch - #autopoint --force + patch -p1 -i ${srcdir}/0002-missing-include.patch AUTOPOINT='intltoolize --automake --copy' autoreconf -f -i } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/share/pkgconfig" \ ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -57,10 +59,13 @@ build() { --disable-dbus \ --disable-browser-plugin \ --disable-nautilus + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-evince/evince-i686.install b/mingw-w64-evince/evince-i686.install index 375e708c36..9a4b51f80c 100644 --- a/mingw-w64-evince/evince-i686.install +++ b/mingw-w64-evince/evince-i686.install @@ -1,11 +1,12 @@ post_install() { - mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + mingw32/bin/glib-compile-schemas mingw32/share/glib-2.0/schemas + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/hicolor } post_upgrade() { - post_install $1 + post_install $1 } post_remove() { - post_install $1 + post_install $1 } diff --git a/mingw-w64-evince/evince-x86_64.install b/mingw-w64-evince/evince-x86_64.install index d43ee14ce7..db00db485e 100644 --- a/mingw-w64-evince/evince-x86_64.install +++ b/mingw-w64-evince/evince-x86_64.install @@ -1,11 +1,12 @@ post_install() { - mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas + mingw64/bin/glib-compile-schemas mingw64/share/glib-2.0/schemas + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/hicolor } post_upgrade() { - post_install $1 + post_install $1 } post_remove() { - post_install $1 + post_install $1 } diff --git a/mingw-w64-exiv2/PKGBUILD b/mingw-w64-exiv2/PKGBUILD index 1db2b64e6b..94036d13b3 100644 --- a/mingw-w64-exiv2/PKGBUILD +++ b/mingw-w64-exiv2/PKGBUILD @@ -1,24 +1,24 @@ # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=exiv2 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.24 +pkgver=0.25 pkgrel=2 pkgdesc="Exif and Iptc metadata manipulation library and tools (mingw-w64)" arch=('any') url="http://exiv2.org" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-libtool") depends=("${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-libtool" - ) + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' 'staticlibs') source=("http://www.exiv2.org/${_realname}-${pkgver}.tar.gz" - 0001-fix-cr-for-awk-in-configure.mingw.patch) -sha1sums=('2f19538e54f8c21c180fa96d17677b7cff7dc1bb' + 0001-fix-cr-for-awk-in-configure.mingw.patch) +sha1sums=('adb8ffe63916e7c27bda9792e690d1330ec7273d' '4c9dca6f5517ba5c857162441a28edd68b4bdeb5') prepare() { @@ -29,29 +29,30 @@ prepare() { build() { export lt_cv_deplibs_check_method='pass_all' CPPFLAGS+=" -D_FILE_OFFSET_BITS=64" - cp -r "${srcdir}"/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" + + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ - --disable-static + --enable-static # Fix executables extensions sed -i 's|BINARY = $(BINSRC:.cpp=)|BINARY = $(BINSRC:.cpp=$(EXEEXT))|; - s|EXIV2BIN = $(EXIV2MAIN:.cpp=)|EXIV2BIN = $(EXIV2MAIN:.cpp=$(EXEEXT))|; - s|MCBIN = $(MCMAIN:.cpp=)|MCBIN = $(MCMAIN:.cpp=$(EXEEXT))|; - s|-o $@ $(LIBRARY) $@.o|-o $@ $(LIBRARY) $(BINOBJ)| - s|$(BINARY): %: %.o lib|$(BINARY): lib $(BINOBJ)|' src/Makefile - + s|EXIV2BIN = $(EXIV2MAIN:.cpp=)|EXIV2BIN = $(EXIV2MAIN:.cpp=$(EXEEXT))|; + s|MCBIN = $(MCMAIN:.cpp=)|MCBIN = $(MCMAIN:.cpp=$(EXEEXT))|; + s|-o $@ $(LIBRARY) $@.o|-o $@ $(LIBRARY) $(BINOBJ)| + s|$(BINARY): %: %.o lib|$(BINARY): lib $(BINOBJ)|' src/Makefile + + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make || true - cp src/.libs/localtime.o src/ - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-expat/001-fix-extension.patch b/mingw-w64-expat/001-fix-extension.patch new file mode 100644 index 0000000000..1deef2f5d0 --- /dev/null +++ b/mingw-w64-expat/001-fix-extension.patch @@ -0,0 +1,11 @@ +--- expat-2.1.0/Makefile.in.orig 2015-04-11 23:40:32.731000000 +0300 ++++ expat-2.1.0/Makefile.in 2015-04-11 23:40:38.456200000 +0300 +@@ -79,7 +79,7 @@ + + install: xmlwf/xmlwf@EXEEXT@ installlib + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) +- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf@EXEEXT@ + $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) + + installlib: $(LIBRARY) $(APIHEADER) expat.pc diff --git a/mingw-w64-expat/PKGBUILD b/mingw-w64-expat/PKGBUILD index 0dbc1111a8..e90c65e02c 100644 --- a/mingw-w64-expat/PKGBUILD +++ b/mingw-w64-expat/PKGBUILD @@ -1,33 +1,46 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=expat - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.1.0 -pkgrel=3 +pkgrel=6 pkgdesc="An XML parser library (mingw-w64)" arch=('any') url="http://expat.sourceforge.net" -license=("custom") +license=(MIT) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/expat/expat-${pkgver}.tar.gz") -md5sums=('dd7dab7a5fea97d2a6a43f511449b7cd') +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" + 001-fix-extension.patch) +md5sums=('dd7dab7a5fea97d2a6a43f511449b7cd' + 'f0896e172059ce210ce70d2a37f4a04e') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/001-fix-extension.patch + + autoreconf -fiv +} build() { - mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${CARCH}" - cd "${srcdir}/${pkgname}-${pkgver}-build-${CARCH}" - "${srcdir}"/expat-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --enable-shared --enable-static - make + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make } package() { - cd "${srcdir}/${pkgname}-${pkgver}-build-${CARCH}" - make DESTDIR="$pkgdir" install - mv "${pkgdir}${MINGW_PREFIX}/bin/xmlwf" "${pkgdir}${MINGW_PREFIX}/bin/xmlwf.exe" + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-extra-cmake-modules/PKGBUILD b/mingw-w64-extra-cmake-modules/PKGBUILD index 9e78f06915..1143cede0a 100644 --- a/mingw-w64-extra-cmake-modules/PKGBUILD +++ b/mingw-w64-extra-cmake-modules/PKGBUILD @@ -4,23 +4,30 @@ _realname=extra-cmake-modules pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.0 -_pkgver=5.3.0 +pkgver=5.16.0 pkgrel=1 pkgdesc='Extra CMake modules (mingw-w64)' arch=('any') url='https://projects.kde.org/projects/kdesupport/extra-cmake-modules' license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-cmake") -# makedepends=('python-sphinx') # qt5-tools for QtHelp pages -source=("http://download.kde.org/stable/frameworks/${_pkgver}/${_realname}-${pkgver}.tar.xz") -md5sums=('a0b95a4e5ffb8bde51a95584292b03ed') +depends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-png2ico") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-sphinx") # qt5-tools for QtHelp pages +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_realname}-${pkgver}.tar.xz" + "set-AUTOSTATICPLUGINS.patch") +md5sums=('08d94fb941c670e4f1832a340e855836' + '0d249754247382f3b8dda80d6833aac4') prepare() { mkdir -p build-${CARCH} + + # Apply patches + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/set-AUTOSTATICPLUGINS.patch } build() { + mkdir -p build-${CARCH} cd build-${CARCH} MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ cmake ../${_realname}-${pkgver} \ @@ -35,4 +42,3 @@ package() { cd build-${CARCH} make DESTDIR="${pkgdir}" install } - diff --git a/mingw-w64-extra-cmake-modules/set-AUTOSTATICPLUGINS.patch b/mingw-w64-extra-cmake-modules/set-AUTOSTATICPLUGINS.patch new file mode 100644 index 0000000000..f0f5329b47 --- /dev/null +++ b/mingw-w64-extra-cmake-modules/set-AUTOSTATICPLUGINS.patch @@ -0,0 +1,15 @@ +diff -urN extra-cmake-modules-1.5.0.orig/kde-modules/KDECMakeSettings.cmake extra-cmake-modules-1.5.0/kde-modules/KDECMakeSettings.cmake +--- extra-cmake-modules-1.5.0.orig/kde-modules/KDECMakeSettings.cmake 2015-01-04 01:35:09.800389800 +0000 ++++ extra-cmake-modules-1.5.0/kde-modules/KDECMakeSettings.cmake 2015-01-04 01:37:00.535144400 +0000 +@@ -151,6 +151,11 @@ + # Since CMake 2.8.6 + set(CMAKE_AUTOMOC ON) + ++ # Enable autostaticplugins in MSYS2 qt5-static/cmake ++ # Since https://github.com/Alexpux/MINGW-packages/commit/e5517227778695a51bd56df07f1b05c43103ad3f ++ # and https://github.com/Alexpux/MINGW-packages/commit/aa8f86ab267446002bcbb59e1455fbdf0d9f1cde ++ set(CMAKE_AUTOSTATICPLUGINS ON) ++ + # By default, create 'GUI' executables. This can be reverted on a per-target basis + # using ECMMarkNonGuiExecutable + # Since CMake 2.8.8 diff --git a/mingw-w64-faac/PKGBUILD b/mingw-w64-faac/PKGBUILD index 0ba971ae6e..427222d781 100644 --- a/mingw-w64-faac/PKGBUILD +++ b/mingw-w64-faac/PKGBUILD @@ -3,24 +3,22 @@ _realname=faac pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.28 -pkgrel=1 +pkgrel=2 pkgdesc='FAAC is an AAC audio encoder (mingw-w64)' -groups=("${MINGW_PACKAGE_PREFIX}") arch=('any') url='http://www.audiocoding.com/faac.html' license=('GPL2') source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" - "make-shared.patch") + "make-shared.patch") md5sums=('80763728d392c7d789cde25614c878f6' - 'aa5048e1b2c960329d716a50fe1cfeaa') + 'aa5048e1b2c960329d716a50fe1cfeaa') prepare() { - cd $srcdir/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-${pkgver} patch -Np1 -i ${srcdir}/make-shared.patch } build() { - cd "$srcdir"/${_realname}-${pkgver} [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} ../${_realname}-${pkgver}/configure \ @@ -31,6 +29,7 @@ build() { --enable-static \ --enable-shared \ --without-mp4v2 + make } diff --git a/mingw-w64-faad2/PKGBUILD b/mingw-w64-faad2/PKGBUILD index f8f852d90c..5915e80d46 100644 --- a/mingw-w64-faad2/PKGBUILD +++ b/mingw-w64-faad2/PKGBUILD @@ -1,14 +1,12 @@ # Maintainer: Alexey Pavlov _realname=faad2 - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=2.7 -pkgrel=1 +pkgrel=2 pkgdesc="ISO AAC audio decoder (mingw-w64)" arch=('any') url="http://www.audiocoding.com/" -groups=("${MINGW_PACKAGE_PREFIX}") license=('GPL') options=('staticlibs' 'strip') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") @@ -36,6 +34,7 @@ prepare() { patch -p1 -i "${srcdir}/0001-update-ac.mingw.patch" patch -p1 -i "${srcdir}/0002-no-undefined.mingw.patch" patch -p1 -i "${srcdir}/0003-frontend.mingw.patch" + WANT_AUTOMAKE=latest autoreconf --force --install } @@ -48,6 +47,7 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} + make } diff --git a/mingw-w64-farstream/0001-farstream-0.2.4.patch b/mingw-w64-farstream/0001-farstream-0.2.4.patch new file mode 100644 index 0000000000..18c50919d2 --- /dev/null +++ b/mingw-w64-farstream/0001-farstream-0.2.4.patch @@ -0,0 +1,197 @@ +--- farstream-0.2.4/farstream/fs-session.h ++++ farstream-0.2.4/farstream/fs-session.h +@@ -64,7 +64,6 @@ + */ + typedef enum _FsDTMFEvent + { +- /*< protected >*/ + FS_DTMF_EVENT_0 = 0, + FS_DTMF_EVENT_1 = 1, + FS_DTMF_EVENT_2 = 2, +--- farstream-0.2.4/gst/fsmsnconference/fs-msn-connection.c ++++ farstream-0.2.4/gst/fsmsnconference/fs-msn-connection.c +@@ -30,12 +30,19 @@ + + #include "fs-msn-connection.h" + ++#ifdef _WIN32 ++#include ++#include ++#define strerror_r(code, msg, msg_size) strerror_s((msg), (msg_size), (code)) ++typedef int socklen_t; ++#else + #include ++#include ++#include ++#endif + #include + #include +-#include + #include +-#include + #include + #include + #ifdef HAVE_STDLIB_H +@@ -484,8 +491,10 @@ + goto error; + } + ++#ifndef _WIN32 + // set non-blocking mode + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); ++#endif + for (;;) { + GST_DEBUG ("Attempting to listen on port %d.....",port); + memset(&myaddr, 0, sizeof(myaddr)); +@@ -532,7 +541,7 @@ + + done: + +- if (getsockname (fd, (struct sockaddr *) &myaddr, &myaddr_len) < 0) { ++ if (getsockname (fd, (struct sockaddr *) &myaddr, (void*)&myaddr_len) < 0) { + gchar error_str[256]; + strerror_r (errno, error_str, 256); + g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, +@@ -600,8 +609,10 @@ + return FALSE; + } + ++#ifndef _WIN32 + // set non-blocking mode + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); ++#endif + + theiraddr.sin_family = AF_INET; + theiraddr.sin_addr.s_addr = inet_addr (candidate->ip); +--- farstream-0.2.4/gst/fsmsnconference/fs-msn-stream.c ++++ farstream-0.2.4/gst/fsmsnconference/fs-msn-stream.c +@@ -49,10 +49,15 @@ + + #include "fs-msn-stream.h" + ++#ifdef _WIN32 ++#include ++#include ++#else + #include +-#include + #include + #include ++#endif ++#include + #include + #include + +@@ -828,12 +833,12 @@ + if (self->priv->fd < 0) + return; + +- if (setsockopt (self->priv->fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) ++ if (setsockopt (self->priv->fd, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof (tos)) < 0) + GST_WARNING ( "could not set socket ToS: %s", g_strerror (errno)); + + #ifdef IPV6_TCLASS + if (setsockopt (self->priv->fd, IPPROTO_IPV6, IPV6_TCLASS, +- &tos, sizeof (tos)) < 0) ++ (const void *)&tos, sizeof (tos)) < 0) + GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); + #endif + } +--- farstream-0.2.4/gst/fsmsnconference/Makefile.am ++++ farstream-0.2.4/gst/fsmsnconference/Makefile.am +@@ -42,7 +42,8 @@ + $(FS_LIBS) \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ +- $(NICE_LIBS) ++ $(NICE_LIBS) \ ++ -lws2_32 + + + +--- farstream-0.2.4/transmitters/multicast/fs-multicast-transmitter.c ++++ farstream-0.2.4/transmitters/multicast/fs-multicast-transmitter.c +@@ -687,12 +687,12 @@ + } + + if (setsockopt (sock, IPPROTO_IP, IP_TOS, +- &type_of_service, sizeof (type_of_service)) < 0) ++ (const void*)&type_of_service, sizeof (type_of_service)) < 0) + GST_WARNING ("could not set socket ToS: %s", g_strerror (errno)); + + #ifdef IPV6_TCLASS + if (setsockopt (sock, IPPROTO_IPV6, IPV6_TCLASS, +- &type_of_service, sizeof (type_of_service)) < 0) ++ (const void*)&type_of_service, sizeof (type_of_service)) < 0) + GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); + #endif + +@@ -1223,12 +1223,12 @@ + UdpSock *udpsock = item->data; + + if (setsockopt (udpsock->fd, IPPROTO_IP, IP_TOS, +- &tos, sizeof (tos)) < 0) ++ (const void*)&tos, sizeof (tos)) < 0) + GST_WARNING ( "could not set socket tos: %s", g_strerror (errno)); + + #ifdef IPV6_TCLASS + if (setsockopt (udpsock->fd, IPPROTO_IPV6, IPV6_TCLASS, +- &tos, sizeof (tos)) < 0) ++ (const void*)&tos, sizeof (tos)) < 0) + GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); + #endif + } +--- farstream-0.2.4/transmitters/multicast/Makefile.am ++++ farstream-0.2.4/transmitters/multicast/Makefile.am +@@ -21,7 +21,8 @@ + $(FS_LIBS) \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ +- $(GIO_LIBS) ++ $(GIO_LIBS) \ ++ -lws2_32 + + noinst_HEADERS = \ + fs-multicast-transmitter.h \ +--- farstream-0.2.4/transmitters/rawudp/fs-rawudp-transmitter.c ++++ farstream-0.2.4/transmitters/rawudp/fs-rawudp-transmitter.c +@@ -618,11 +618,11 @@ + + fd = g_socket_get_fd (socket); + +- if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) ++ if (setsockopt (fd, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof (tos)) < 0) + GST_WARNING ("could not set socket ToS: %s", g_strerror (errno)); + + #ifdef IPV6_TCLASS +- if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) ++ if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, (const void *)&tos, sizeof (tos)) < 0) + GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); + #endif + +@@ -1299,11 +1299,11 @@ + UdpPort *udpport = item->data; + int fd = g_socket_get_fd (udpport->socket); + +- if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) ++ if (setsockopt (fd, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof (tos)) < 0) + GST_WARNING ( "could not set socket ToS: %s", g_strerror (errno)); + + #ifdef IPV6_TCLASS +- if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) ++ if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, (const void *)&tos, sizeof (tos)) < 0) + GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); + #endif + } +--- farstream-0.2.4/transmitters/rawudp/Makefile.am ++++ farstream-0.2.4/transmitters/rawudp/Makefile.am +@@ -27,7 +27,8 @@ + $(NICE_LIBS) \ + $(GUPNP_LIBS) \ + $(GIO_LIBS) \ +- -lgstnet-@GST_API_VERSION@ ++ -lgstnet-@GST_API_VERSION@ \ ++ -lws2_32 + + noinst_HEADERS = \ + fs-rawudp-transmitter.h \ diff --git a/mingw-w64-farstream/0002-give-cc-to-gir-scanner.all.patch b/mingw-w64-farstream/0002-give-cc-to-gir-scanner.all.patch new file mode 100644 index 0000000000..24dbd07330 --- /dev/null +++ b/mingw-w64-farstream/0002-give-cc-to-gir-scanner.all.patch @@ -0,0 +1,10 @@ +--- farstream-0.2.6/farstream/Makefile.am.orig 2015-01-01 20:00:54.330400000 +0300 ++++ farstream-0.2.6/farstream/Makefile.am 2014-09-25 21:38:03.000000000 +0400 +@@ -84,6 +84,7 @@ + $(libfarstreaminclude_HEADERS) + + INTROSPECTION_GIRS = Farstream-@FS_APIVERSION@.gir ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + Farstream-@FS_APIVERSION@.gir: libfarstream-@FS_APIVERSION@.la + Farstream_@FS_API_VERSION@_gir_NAMESPACE = Farstream + Farstream_@FS_API_VERSION@_gir_VERSION = @FS_APIVERSION@ diff --git a/mingw-w64-farstream/PKGBUILD b/mingw-w64-farstream/PKGBUILD new file mode 100644 index 0000000000..96cce52291 --- /dev/null +++ b/mingw-w64-farstream/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Alexey Pavlov + +_realname=farstream +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.2.7 +pkgrel=2 +pkgdesc="Farstream (formerly Farsight) - Audio/Video Communications Framework (mingw-w64)" +arch=('any') +url="http://www.freedesktop.org/wiki/Software/Farstream" +license=('LGPL') +options=('staticlibs' 'strip') +depends=("${MINGW_PACKAGE_PREFIX}-gst-plugins-base" "${MINGW_PACKAGE_PREFIX}-libnice") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "gtk-doc") +source=(http://freedesktop.org/software/${_realname}/releases/${_realname}/${_realname}-${pkgver}.tar.gz{,.asc} + 0001-farstream-0.2.4.patch + 0002-give-cc-to-gir-scanner.all.patch) +md5sums=('bb56af4cbf2cd42f35353f20cf04bc17' + 'SKIP' + '1324123fbf2aa65bcd4f712e7d582618' + '8a758676c230c58a687ff74784dd3ae5') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}/0001-farstream-0.2.4.patch" + patch -p1 -i "${srcdir}/0002-give-cc-to-gir-scanner.all.patch" + + WANT_AUTOMAKE=latest autoreconf --force --install +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --enable-introspection + + make +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + make check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a + rm -f ${pkgdir}${MINGW_PREFIX}/lib/farstream*/*.a +} diff --git a/mingw-w64-ffmpeg/PKGBUILD b/mingw-w64-ffmpeg/PKGBUILD index a4c0ee9f9d..fa3d9b8419 100644 --- a/mingw-w64-ffmpeg/PKGBUILD +++ b/mingw-w64-ffmpeg/PKGBUILD @@ -1,18 +1,19 @@ # Maintainer: Alexey Pavlov _realname=ffmpeg -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.4.3 -pkgrel=1 +pkgbase="mingw-w64-${_realname}" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.8.4 +pkgrel=2 pkgdesc="Complete and free Internet live audio and video broadcasting solution (mingw-w64)" arch=('any') url="http://ffmpeg.org/" -groups=("${MINGW_PACKAGE_PREFIX}") license=('GPL') options=('staticlibs' 'strip') depends=( "${MINGW_PACKAGE_PREFIX}-bzip2" "${MINGW_PACKAGE_PREFIX}-celt" + "${MINGW_PACKAGE_PREFIX}-dcadec-git" "${MINGW_PACKAGE_PREFIX}-fontconfig" "${MINGW_PACKAGE_PREFIX}-gnutls" "${MINGW_PACKAGE_PREFIX}-gsm" @@ -24,6 +25,7 @@ depends=( "${MINGW_PACKAGE_PREFIX}-libtheora" "${MINGW_PACKAGE_PREFIX}-libvorbis" "${MINGW_PACKAGE_PREFIX}-libvpx" + "${MINGW_PACKAGE_PREFIX}-libwebp" "${MINGW_PACKAGE_PREFIX}-openal" "${MINGW_PACKAGE_PREFIX}-opencore-amr" "${MINGW_PACKAGE_PREFIX}-openjpeg" @@ -32,21 +34,22 @@ depends=( "${MINGW_PACKAGE_PREFIX}-schroedinger" "${MINGW_PACKAGE_PREFIX}-SDL" "${MINGW_PACKAGE_PREFIX}-speex" + "${MINGW_PACKAGE_PREFIX}-wavpack" "${MINGW_PACKAGE_PREFIX}-x264" "${MINGW_PACKAGE_PREFIX}-x265" "${MINGW_PACKAGE_PREFIX}-xvidcore" - "${MINGW_PACKAGE_PREFIX}-wavpack" "${MINGW_PACKAGE_PREFIX}-zlib" ) -makedepends=("yasm" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -source=(http://ffmpeg.org/releases/$_realname-$pkgver.tar.bz2) -md5sums=('8da635baff57d7ab704b1daca5a99b47') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-yasm") +source=(http://ffmpeg.org/releases/${_realname}-${pkgver}.tar.bz2) +md5sums=('5a312bebaf71688703644c18ef3f26e8') prepare() { cd "${srcdir}/${_realname}-${pkgver}" } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" #CPPFLAGS+=" --save-temps" @@ -60,6 +63,7 @@ build() { --disable-static \ --enable-avresample \ --enable-dxva2 \ + --enable-d3d11va \ --enable-fontconfig \ --enable-gnutls \ --enable-gpl \ @@ -67,6 +71,7 @@ build() { --enable-libbluray \ --enable-libcaca \ --enable-libcelt \ + --enable-libdcadec \ --enable-libfreetype \ --enable-libgsm \ --enable-libmodplug \ @@ -90,12 +95,14 @@ build() { --enable-postproc \ --enable-runtime-cpudetect \ --enable-shared \ + --enable-static \ --enable-swresample \ --enable-version3 \ --enable-zlib \ --disable-doc #--enable-pthreads - make + + make -j1 } check() { @@ -107,6 +114,8 @@ package() { cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install mv "${pkgdir}${MINGW_PREFIX}"/bin/*.lib "${pkgdir}${MINGW_PREFIX}"/lib/ - + #find ${pkgdir}${MINGW_PREFIX}/bin -type f -name "*.exe" -exec objcopy --subsystem console {} \; + rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.def + rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.lib } diff --git a/mingw-w64-ffms2/PKGBUILD b/mingw-w64-ffms2/PKGBUILD new file mode 100644 index 0000000000..aa65f8ffc8 --- /dev/null +++ b/mingw-w64-ffms2/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Alexey Pavlov + +_realname=ffms2 +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.20 +pkgrel=1 +pkgdesc="A cross-platform wrapper library around libav/FFmpeg (mingw-w64)" +arch=('any') +url="https://github.com/FFMS/ffms2/" +license=('MIT') +options=('staticlibs' 'strip') +depends=("${MINGW_PACKAGE_PREFIX}-ffmpeg") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/FFMS/ffms2/archive/${pkgver}.tar.gz") +sha1sums=('bf09d8ed54e5aad86b352b4d335d29da016f2014') + +packagedir=${_realname}-${pkgver} + +prepare() { + cd "${srcdir}/${packagedir}" +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${packagedir}/configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --build=${CARCH%%-*} \ + --disable-debug \ + --disable-static \ + --enable-shared + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-fftw/PKGBUILD b/mingw-w64-fftw/PKGBUILD index 7d1a492465..5c77b4a711 100644 --- a/mingw-w64-fftw/PKGBUILD +++ b/mingw-w64-fftw/PKGBUILD @@ -3,7 +3,7 @@ _realname=fftw pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.3.4 -pkgrel=3 +pkgrel=5 pkgdesc="A library for computing the discrete Fourier transform (DFT) (mingw-w64)" arch=('any') url="http://www.fftw.org" @@ -11,72 +11,52 @@ license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') -source=("$url/fftw-$pkgver.tar.gz") +source=("${url}/${_realname}-${pkgver}.tar.gz") md5sums=('2edab8c06b24feeb3b82bbb3ebf3e7b3') -build() { - cd "${srcdir}/fftw-${pkgver}" - mkdir -p build-${MINGW_CHOST}-d && pushd build-${MINGW_CHOST}-d - ../configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-sse2 \ - --enable-avx \ - --enable-static \ - --enable-shared \ - --enable-threads \ - --with-combined-threads \ - --with-our-malloc \ - --with-g77-wrappers \ - --with-windows-f77-mangling - make - popd - - mkdir -p build-${MINGW_CHOST}-ld && pushd build-${MINGW_CHOST}-ld - ../configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-long-double \ - --enable-static \ - --enable-shared \ - --enable-threads \ - --with-combined-threads \ - --with-our-malloc \ - --with-g77-wrappers \ - --with-windows-f77-mangling - make - popd +precision="double float long_double quad" - mkdir -p build-${MINGW_CHOST}-f && pushd build-${MINGW_CHOST}-f - ../configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-float \ - --enable-sse2 \ - --enable-avx \ - --enable-static \ - --enable-shared \ - --enable-threads \ - --with-combined-threads \ - --with-our-malloc \ - --with-g77-wrappers \ - --with-windows-f77-mangling - make - popd +build() { + cd "${srcdir}/${_realname}-${pkgver}" + for cur in ${precision}; do + local _config="--enable-sse2 --enable-avx" + if [ "${cur}" = "float" ]; then + _config="${_config} --enable-float" + elif [ "${cur}" = "long_double" ]; then + _config="--enable-long-double" + elif [ "${cur}" = "quad" ]; then + _config="--enable-quad-precision" + fi + [[ -d ${MINGW_CHOST}-${cur} ]] && rm -rf ${MINGW_CHOST}-${cur} + mkdir -p ${MINGW_CHOST}-${cur} + pushd ${MINGW_CHOST}-${cur} > /dev/null + msg "Building ${_realname} with ${cur} ..." + + ../configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + ${_config} \ + --enable-static \ + --enable-shared \ + --enable-threads \ + --with-combined-threads \ + --with-our-malloc \ + --with-g77-wrappers \ + --with-windows-f77-mangling + make + + popd > /dev/null + + done } package() { - cd "${srcdir}/fftw-${pkgver}/build-${MINGW_CHOST}-d" - make DESTDIR="$pkgdir" install - cd "${srcdir}/fftw-${pkgver}/build-${MINGW_CHOST}-ld" - make DESTDIR="$pkgdir" install - cd "${srcdir}/fftw-${pkgver}/build-${MINGW_CHOST}-f" - make DESTDIR="$pkgdir" install - - #rm "${pkgdir}"${MINGW_PREFIX}/bin/*.exe - #rm "${pkgdir}${MINGW_PREFIX}/bin/fftw-wisdom-to-conf" - #rm -r "${pkgdir}${MINGW_PREFIX}/share" + cd "${srcdir}/${_realname}-${pkgver}" + for cur in ${precision}; do + pushd ${MINGW_CHOST}-${cur} > /dev/null + msg "Instaling ${_realname} with ${cur} ..." + make DESTDIR="${pkgdir}" install + popd > /dev/null + done } diff --git a/mingw-w64-field3d/PKGBUILD b/mingw-w64-field3d/PKGBUILD index ed2165c370..51fea4aa22 100644 --- a/mingw-w64-field3d/PKGBUILD +++ b/mingw-w64-field3d/PKGBUILD @@ -1,6 +1,7 @@ # Maintainer: Alexey Pavlov _realname=field3d +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.4.3 pkgrel=2 @@ -9,11 +10,13 @@ arch=('any') url="https://sites.google.com/site/field3d/" license=("custom") depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-hdf5" - "${MINGW_PACKAGE_PREFIX}-openexr") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-openexr") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'buildflags') -source=(https://github.com/imageworks/Field3D/archive/v${pkgver}.tar.gz +source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/Field3D/archive/v${pkgver}.tar.gz cmake-mingw.patch) md5sums=('f76d8537f1d058ede0bcb14fbc09e28c' 'ceaf0f2e8b9afb0b3a3ae117ff2553e4') @@ -21,22 +24,21 @@ md5sums=('f76d8537f1d058ede0bcb14fbc09e28c' prepare() { cd ${srcdir}/Field3D-${pkgver} patch -p1 -i ${srcdir}/cmake-mingw.patch - #patch -p1 -i ${srcdir}/workaround-ansidecl-h-PTR-define-conflict.patch } build() { [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ ../Field3D-${pkgver} make } package() { - cd "$srcdir"/build-${MINGW_CHOST} - - make install + cd "${srcdir}"/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-file/PKGBUILD b/mingw-w64-file/PKGBUILD new file mode 100644 index 0000000000..38066b72b2 --- /dev/null +++ b/mingw-w64-file/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Paul Moore + +_realname=file +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=5.22 +pkgrel=1 +pkgdesc='Determine the type of a file from its contents (mingw-w64)' +arch=('any') +url='http://www.darwinsys.com/file/' +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-libsystre") +source=("ftp://ftp.astron.com/pub/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('8fb13e5259fe447e02c4a37bc7225add') +options=('strip' '!libtool' 'staticlibs') + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd $srcdir/${_realname}-${pkgver} + ./configure --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make install DESTDIR="${pkgdir}" + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-firebird-git/PKGBUILD b/mingw-w64-firebird-git/PKGBUILD new file mode 100644 index 0000000000..862033faa7 --- /dev/null +++ b/mingw-w64-firebird-git/PKGBUILD @@ -0,0 +1,147 @@ +# Maintainer: Alexey Pavlov + +_realname='firebird' +_build_sys=autotools +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=3.0.0.31894.22cc629 +pkgrel=1 +pkgdesc="Cross-platform relational database offering many ANSI SQL standard features (mingw-w64)" +url="http://www.firebirdsql.org/" +license=('custom') +arch=('any') +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libfbclient") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libfbclient") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}") +depends=( + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-icu" + $([[ "$_build_sys" == "autotools" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-libtommath" \ + ) + "${MINGW_PACKAGE_PREFIX}-zlib" + ) +makedepends=(#"${MINGW_PACKAGE_PREFIX}-btyacc" # Maybe add check in firebird presence of system btyacc + $([[ "$_build_sys" == "cmake" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-cmake" \ + ) + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libatomic_ops" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git" + ) +options=('!debug' 'strip') +source=("${_realname}"::"git+https://github.com/Alexpux/firebird-git-svn.git" + mingw-w64-trunk.patch) +sha256sums=('SKIP' + '7bb02ba92093a53ca6f2f7076d055922d0d8ac15694db7cdc154cc036dda941a') + + +pkgver() { + cd "${_realname}" + source ${srcdir}/${_realname}/src/misc/writeBuildNum.sh + printf '%s.%s.%s.%s.%s' ${MajorVer} ${MinorVer} ${RevNo} ${BuildNum} "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${_realname} + git am ${srcdir}/mingw-w64-trunk.patch + + if [ "${_build_sys}" = "autotools" ]; then + NOCONFIGURE=1 ./autogen.sh + fi +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + + if [ "${_build_sys}" = "autotools" ]; then + cp -rf ${_realname} build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + local _debug_conf= + if check_option "debug" "y"; then + _debug_conf="--enable-debug" + fi + + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared \ + ${_debug_conf} \ + --disable-rpath \ + --with-fbbin=${MINGW_PREFIX}/bin \ + --with-fbsbin=${MINGW_PREFIX}/bin \ + --with-fbconf=${MINGW_PREFIX}/etc/${_realname} \ + --with-fblib=${MINGW_PREFIX}/lib \ + --with-fbinclude=${MINGW_PREFIX}/include \ + --with-fbdoc=${MINGW_PREFIX}/share/${_realname}/doc \ + --with-fbudf=${MINGW_PREFIX}/share/${_realname}/udf \ + --with-fbsample=${MINGW_PREFIX}/share/${_realname}/samples \ + --with-fbsample-db=${MINGW_PREFIX}/share/${_realname}/samples/empbuild \ + --with-fbhelp=${MINGW_PREFIX}/share/${_realname}/help \ + --with-fbintl=${MINGW_PREFIX}/share/${_realname}/intl \ + --with-fbmisc=${MINGW_PREFIX}/share/${_realname}/misc \ + --with-fbsecure-db=${MINGW_PREFIX}/etc/${_realname} \ + --with-fbmsg=${MINGW_PREFIX}/etc/${_realname} \ + --with-fblog=${MINGW_PREFIX}/var \ + --with-fbglock=${MINGW_PREFIX}/var \ + --with-fbplugins=${MINGW_PREFIX}/share/${_realname} + + CC=${MINGW_PREFIX}/bin/gcc \ + make -j1 + + elif [ "${_build_sys}" = "cmake" ]; then + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + local _build_conf="Release" + if check_option "debug" "y"; then + _build_conf="Debug" + fi + + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=${_build_conf} \ + ../${_realname} + + make -j1 + fi +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + + if [ "${_build_sys}" = "autotools" ]; then + local _dir=Release + if check_option "debug" "y"; then + _dir=Debug + fi + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,etc/${_realname},include,lib,share/${_realname}/{doc,help,intl,misc,plugins,samples,udf},var} + cp -f gen/${_dir}/firebird/bin/* ${pkgdir}${MINGW_PREFIX}/bin/ + cp -f gen/${_dir}/firebird/lib/* ${pkgdir}${MINGW_PREFIX}/lib/ + cp -rf gen/${_dir}/firebird/include/* ${pkgdir}${MINGW_PREFIX}/include/ + cp -f gen/${_dir}/firebird/UDF/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/udf/ + cp -rf gen/${_dir}/firebird/examples/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/samples/ + cp -f gen/${_dir}/firebird/help/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/help/ + cp -f gen/${_dir}/firebird/intl/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/intl/ + cp -rf gen/${_dir}/firebird/plugins/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/plugins/ + #cp -f gen/${_dir}/firebird/misc/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/misc/ + + cp -f gen/install/*.bat ${pkgdir}${MINGW_PREFIX}/bin/ + cp -f gen/${_dir}/firebird/*.conf ${pkgdir}${MINGW_PREFIX}/etc/${_realname}/ + cp -f gen/${_dir}/firebird/*.msg ${pkgdir}${MINGW_PREFIX}/etc/${_realname}/ + cp -f gen/${_dir}/firebird/*.fdb ${pkgdir}${MINGW_PREFIX}/etc/${_realname}/ + + cp -rf doc/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/doc/ + + touch ${pkgdir}${MINGW_PREFIX}/var/${_realname}.log + + # Remove build tools + rm -f ${pkgdir}${MINGW_PREFIX}/bin/{brltable,codes,create_db,*build*,*boot*,*static*,*current*}.exe + elif [ "${_build_sys}" = "cmake" ]; then + echo "Empty" + fi +} diff --git a/mingw-w64-firebird-git/mingw-w64-trunk.patch b/mingw-w64-firebird-git/mingw-w64-trunk.patch new file mode 100644 index 0000000000..90a42d0660 --- /dev/null +++ b/mingw-w64-firebird-git/mingw-w64-trunk.patch @@ -0,0 +1,3085 @@ +From b818db3c9b3f553752ad1fb6f818f84e3d07b971 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 25 Nov 2014 12:59:43 +0300 +Subject: [PATCH] our mingw-w64 have different icu libs naming. + +--- + src/common/unicode_util.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/common/unicode_util.cpp b/src/common/unicode_util.cpp +index ba77825..d93cd7a 100644 +--- a/src/common/unicode_util.cpp ++++ b/src/common/unicode_util.cpp +@@ -58,8 +58,13 @@ using namespace Firebird; + + namespace { + #if defined(WIN_NT) ++#ifdef __MINGW32__ ++const char* const inTemplate = "libicuin%s.dll"; ++const char* const ucTemplate = "libicuuc%s.dll"; ++#else + const char* const inTemplate = "icuin%s.dll"; + const char* const ucTemplate = "icuuc%s.dll"; ++#endif + #elif defined(DARWIN) + //const char* const inTemplate = "/Library/Frameworks/Firebird.framework/Versions/A/Libraries/libicui18n.dylib"; + //const char* const ucTemplate = "/Library/Frameworks/Firebird.framework/versions/A/Libraries/libicuuc.dylib"; +-- +2.4.3 + +From 7596d4f99639877213e38c6c2b36f57e20345dfe Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 23:15:45 +0300 +Subject: [PATCH] Fix UNIX path for mingw compiler. + +--- + src/misc/writeBuildNum.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/misc/writeBuildNum.sh b/src/misc/writeBuildNum.sh +index 45fb208..ae29b45 100755 +--- a/src/misc/writeBuildNum.sh ++++ b/src/misc/writeBuildNum.sh +@@ -96,6 +96,10 @@ createMakeVersion() { + + OdsH="${Root}/src/jrd/ods.h" + Mini="/tmp/miniods.h" ++if [ -n $MSYSTEM ] ++ then ++ Mini=$(cygpath -wm $Mini) ++fi + TestCpp="/tmp/test.cpp" + AOut="/tmp/a.out" + +-- +2.4.3 + +From 1a76d754fce9287ff93040bfb35846a072e5133b Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Mon, 25 May 2015 15:14:47 +0300 +Subject: [PATCH] cloop: Fix building with mingw. + +--- + extern/cloop/Makefile | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/extern/cloop/Makefile b/extern/cloop/Makefile +index 2056e4a..11e0901 100644 +--- a/extern/cloop/Makefile ++++ b/extern/cloop/Makefile +@@ -11,7 +11,7 @@ LD := $(CXX) + SRC_DIR := src + BUILD_DIR := build + OUT_DIR := output +-SHRLIB_EXT := .so ++SHRLIB_EXT := .dll + EXE_EXT := + + OBJ_DIR := $(BUILD_DIR)/$(TARGET) +@@ -27,7 +27,7 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$(wildcard $(sdir)/*.cpp)) + OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C)) + OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP)) + +-C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter ++C_FLAGS := -ggdb -MMD -MP -W -Wall -Wno-unused-parameter + CXX_FLAGS := $(C_FLAGS) + FPC_FLAGS := -Mdelphi + +@@ -106,23 +106,23 @@ $(BIN_DIR)/test1-c$(SHRLIB_EXT): \ + $(OBJ_DIR)/tests/test1/CalcCApi.o \ + $(OBJ_DIR)/tests/test1/CTest.o \ + +- $(LD) $^ -shared -ldl -o $@ ++ $(LD) $^ -shared -o $@ + + $(BIN_DIR)/test1-c$(EXE_EXT): \ + $(OBJ_DIR)/tests/test1/CalcCApi.o \ + $(OBJ_DIR)/tests/test1/CTest.o \ + +- $(LD) $^ -ldl -o $@ ++ $(LD) $^ -o $@ + + $(BIN_DIR)/test1-cpp$(SHRLIB_EXT): \ + $(OBJ_DIR)/tests/test1/CppTest.o \ + +- $(LD) $^ -shared -ldl -o $@ ++ $(LD) $^ -shared -o $@ + + $(BIN_DIR)/test1-cpp$(EXE_EXT): \ + $(OBJ_DIR)/tests/test1/CppTest.o \ + +- $(LD) $^ -ldl -o $@ ++ $(LD) $^ -o $@ + + $(BIN_DIR)/test1-pascal$(SHRLIB_EXT): \ + $(SRC_DIR)/tests/test1/PascalClasses.pas \ +@@ -130,7 +130,7 @@ $(BIN_DIR)/test1-pascal$(SHRLIB_EXT): \ + $(SRC_DIR)/tests/test1/CalcPascalApi.pas \ + + ifeq ($(WITH_FPC),1) +- fpc $(FPC_FLAGS) -fPIC -FU$(OBJ_DIR)/tests/test1 -o$(BIN_DIR)/test1-pascal$(SHRLIB_EXT) $(SRC_DIR)/tests/test1/PascalLibrary.dpr ++ fpc $(FPC_FLAGS) -FU$(OBJ_DIR)/tests/test1 -o$(BIN_DIR)/test1-pascal$(SHRLIB_EXT) $(SRC_DIR)/tests/test1/PascalLibrary.dpr + endif + + $(BIN_DIR)/test1-pascal$(EXE_EXT): \ +-- +2.4.3 + +From 87f08e2232a80c0d10c47c7892cbe4c525d8d718 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 18 Dec 2014 23:47:12 +0300 +Subject: [PATCH] Resolve conflict with STRING type from mingw-w64 + +--- + src/dsql/Parser.cpp | 6 +++--- + src/dsql/parse.y | 16 ++++++++-------- + src/yvalve/preparse.cpp | 10 +++++----- + 3 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/src/dsql/Parser.cpp b/src/dsql/Parser.cpp +index 0f1b0d1..65e9d75 100644 +--- a/src/dsql/Parser.cpp ++++ b/src/dsql/Parser.cpp +@@ -548,7 +548,7 @@ int Parser::yylexAux() + mark.str = yylval.intlStringPtr; + strMarks.put(mark.str, mark); + +- return STRING; ++ return TOK_STRING; + } + + /* +@@ -676,7 +676,7 @@ int Parser::yylexAux() + + yylval.intlStringPtr = newIntlString(temp, "BINARY"); + +- return STRING; ++ return TOK_STRING; + } // if (!hexerror)... + + // If we got here, there was a parsing error. Set the +@@ -731,7 +731,7 @@ int Parser::yylexAux() + mark.str = yylval.intlStringPtr; + strMarks.put(mark.str, mark); + +- return STRING; ++ return TOK_STRING; + } + } + +diff --git a/src/dsql/parse.y b/src/dsql/parse.y +index 9dd9c0c..8c8f281 100644 +--- a/src/dsql/parse.y ++++ b/src/dsql/parse.y +@@ -336,7 +336,7 @@ using namespace Firebird; + %token SYMBOL + %token NUMBER + +-%token STRING ++%token TOK_STRING + %token INTRODUCER + + // New tokens added v5.0 +@@ -3202,7 +3202,7 @@ err($exceptionArray) + item.type = ExceptionItem::SQL_CODE; + item.code = $2; + } +- | SQLSTATE STRING ++ | SQLSTATE TOK_STRING + { + ExceptionItem& item = $exceptionArray->add(); + item.type = ExceptionItem::SQL_STATE; +@@ -6381,7 +6381,7 @@ map_from_symbol_name + + %type map_logoninfo + map_logoninfo +- : STRING ++ : TOK_STRING + | valid_symbol_name { $$ = newNode($1->c_str()); } + ; + +@@ -6629,7 +6629,7 @@ u_constant + : u_numeric_constant + | sql_string + { $$ = MAKE_str_constant($1, lex.att_charset); } +- | DATE STRING ++ | DATE TOK_STRING + { + if (client_dialect < SQL_DIALECT_V6_TRANSITION) + { +@@ -6645,7 +6645,7 @@ u_constant + } + $$ = MAKE_constant($2->getString().c_str(), CONSTANT_DATE); + } +- | TIME STRING ++ | TIME TOK_STRING + { + if (client_dialect < SQL_DIALECT_V6_TRANSITION) + { +@@ -6661,7 +6661,7 @@ u_constant + } + $$ = MAKE_constant($2->getString().c_str(), CONSTANT_TIME); + } +- | TIMESTAMP STRING ++ | TIMESTAMP TOK_STRING + { $$ = MAKE_constant($2->getString().c_str(), CONSTANT_TIMESTAMP); } + ; + +@@ -6705,8 +6705,8 @@ internal_info + + %type sql_string + sql_string +- : STRING // string in current charset +- | INTRODUCER STRING // string in specific charset ++ : TOK_STRING // string in current charset ++ | INTRODUCER TOK_STRING // string in specific charset + { + $$ = $2; + $$->setCharSet(*$1); +diff --git a/src/yvalve/preparse.cpp b/src/yvalve/preparse.cpp +index 3fa672b..6b730ac 100644 +--- a/src/yvalve/preparse.cpp ++++ b/src/yvalve/preparse.cpp +@@ -89,7 +89,7 @@ enum token_vals { + TOKEN_TOO_LONG = -2, + UNEXPECTED_END_OF_COMMAND = -3, + UNEXPECTED_TOKEN = -4, +- STRING = 257, ++ TOK_STRING = 257, + NUMERIC = 258, + SYMBOL = 259 + }; +@@ -112,7 +112,7 @@ static NoCaseString getToken(unsigned& pos, const Tokens& toks, int symbol = SYM + case SYMBOL: + break; + +- case STRING: ++ case TOK_STRING: + if (!strchr(quotes, toks[pos].text[0])) + generate_error(curTok, UNEXPECTED_TOKEN); + return toks[pos++].stripped().ToNoCaseString(); +@@ -186,7 +186,7 @@ bool PREPARSE_execute(CheckStatusWrapper* status, Why::YAttachment** ptrAtt, + return false; + } + +- PathName file_name(getToken(pos, tks, STRING).ToPathName()); ++ PathName file_name(getToken(pos, tks, TOK_STRING).ToPathName()); + *stmt_eaten = false; + ClumpletWriter dpb(ClumpletReader::Tagged, MAX_DPB_SIZE, isc_dpb_version1); + +@@ -235,7 +235,7 @@ bool PREPARSE_execute(CheckStatusWrapper* status, Why::YAttachment** ptrAtt, + break; + + case PP_PASSWORD: +- token = getToken(pos, tks, STRING); ++ token = getToken(pos, tks, TOK_STRING); + + dpb.insertString(isc_dpb_password, token.ToString()); + matched = true; +@@ -252,7 +252,7 @@ bool PREPARSE_execute(CheckStatusWrapper* status, Why::YAttachment** ptrAtt, + token = getToken(pos, tks); + if (token != pp_symbols[PP_NAMES].symbol) + generate_error(token, UNEXPECTED_TOKEN); +- token = getToken(pos, tks, STRING); ++ token = getToken(pos, tks, TOK_STRING); + + dpb.insertString(isc_dpb_lc_ctype, token.ToString()); + matched = true; +-- +2.4.3 + +From 2edbfe6304c4dd86eb53018b00a0cb54abaca42d Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Mon, 24 Nov 2014 22:12:17 +0300 +Subject: [PATCH] mingw-w64 have matherr routine + +--- + src/extlib/ib_udf.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/extlib/ib_udf.cpp b/src/extlib/ib_udf.cpp +index fc6d69c..5a6f21b 100644 +--- a/src/extlib/ib_udf.cpp ++++ b/src/extlib/ib_udf.cpp +@@ -50,10 +50,12 @@ extern "C" + #else + #define exception_type __exception + #endif ++#ifndef matherr + int MATHERR(struct exception_type*) + { + return 1; + } ++#endif + #undef exception_type + #endif // SOLARIS + #endif //__ICC +-- +2.4.3 + +From 3ffc447fac451d7811234c769375f04601122eeb Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 28 Nov 2014 12:28:31 +0300 +Subject: [PATCH] Fix linkng error for mingw. + +--- + src/utilities/install/services.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/utilities/install/services.cpp b/src/utilities/install/services.cpp +index 04abff3..f28e7fa 100644 +--- a/src/utilities/install/services.cpp ++++ b/src/utilities/install/services.cpp +@@ -563,6 +563,7 @@ USHORT SERVICES_grant_access_rights(const char* service_name, const TEXT* accoun + // Until the fb_assert could be converted to a function/object linked with each module + // we need this ugly workaround. + // ++#ifndef __MINGW32__ + extern "C" void API_ROUTINE gds__log(const TEXT* text, ...) + { + va_list ptr; +@@ -572,6 +573,7 @@ extern "C" void API_ROUTINE gds__log(const TEXT* text, ...) + va_end(ptr); + printf("\n\n"); + } ++#endif + + // + // EOF +-- +2.4.3 + +From dc63f831f10770211a635b09cb4027b0392a4e21 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 30 Nov 2014 15:26:04 +0300 +Subject: [PATCH] DLL's are in BIN folder. + +--- + builds/posix/make.defaults | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index f68c44c..caa9930 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -202,7 +202,7 @@ include $(ROOT)/gen/Make.Version + + vpath %.so $(LIB) + vpath %.a $(LIB) +-vpath %.dll $(LIB) ++vpath %.dll $(BIN) + + #_____________________________________________________________________________ + +-- +2.4.3 + +From b68ce6c68bcf734e244c9ca54ccaefd28db0271e Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 30 Nov 2014 15:08:19 +0300 +Subject: [PATCH] Auto detect WINDRES with autoconf. + +Fix building .rc files. +--- + builds/posix/make.defaults | 4 +++- + builds/posix/make.rules | 4 ++-- + builds/posix/make.shared.targets | 14 +++++++------- + configure.ac | 10 ++++++++++ + 4 files changed, 22 insertions(+), 10 deletions(-) + +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index caa9930..65f8c6c 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -151,9 +151,11 @@ ECHO= echo + QUIET_ECHO= @echo + CD= cd + CAT= cat +-AR= ar @AR_OPTIONS@ ++AR= @AR@ @AR_OPTIONS@ + LN= @LN_S@ ++DLLTOOL= @DLLTOOL@ + RANLIB= @RANLIB@ ++RC= @RC@ + BTYACC=$(ROOT)/extern/btyacc/btyacc + CLOOP=$(GEN_ROOT)/$(TARGET)/cloop/release/bin/cloop + +diff --git a/builds/posix/make.rules b/builds/posix/make.rules +index 42c719d..601dc82 100644 +--- a/builds/posix/make.rules ++++ b/builds/posix/make.rules +@@ -102,8 +102,8 @@ $(OBJ)/%.o: $(SRC_ROOT)/%.cpp + + # Rules for making resource files + +-$(GEN_ROOT)/%.res: $(SRC_ROOT)/%.rc +- windres --output-format=coff --include-dir=$( +Date: Wed, 19 Nov 2014 08:59:48 +0300 +Subject: [PATCH] Define AMD64 for 64-bit mingw. + +--- + configure.ac | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 2e81f32..651ca3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -468,6 +468,11 @@ dnl CPU_TYPE=ppc64 + EDITLINE_FLG=N + RAW_DEVICES_FLG=N + SHRLIB_EXT=dll ++ case "$target" in ++ x86_64-*-mingw*) ++ AC_DEFINE(AMD64, 1, [Define this if CPU is amd64]) ++ ;; ++ esac + ;; + + *) +-- +2.4.3 + +From 50fa75577518ce66d31ed9c6fa84bbb8a91c544b Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 23:16:18 +0300 +Subject: [PATCH] Use mingw-w64 crt for Vista and later. Remove unneeded + +flag "-Dlint". Use GCC built-in define for mingw +--- + builds/posix/prefix.mingw | 4 ++-- + src/common/classes/fb_atomic.h | 2 +- + src/iscguard/iscguard.cpp | 2 +- + src/isql/isql.epp | 4 ++-- + src/jrd/ibsetjmp.h | 2 +- + src/remote/server/os/win32/srvr_w32.cpp | 2 +- + 6 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index 5f8dde8..09902f4 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -20,8 +20,8 @@ + # + + # -Wno-unused-variable is used due to unused gpre generated variables +-PROD_FLAGS=-O2 -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads -Wno-non-virtual-dtor +-DEV_FLAGS=-ggdb -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads -Wno-non-virtual-dtor ++PROD_FLAGS=-O2 -D_WIN32_WINNT=0x0600 -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -DWIN32_LEAN_AND_MEAN -MMD -mthreads -Wno-non-virtual-dtor ++DEV_FLAGS=-ggdb -D_WIN32_WINNT=0x0600 -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -DWIN32_LEAN_AND_MEAN -MMD -mthreads -Wno-non-virtual-dtor + + PLATFORM_PATH=os/win32 + +diff --git a/src/common/classes/fb_atomic.h b/src/common/classes/fb_atomic.h +index f32b2b8..2e90ab6 100644 +--- a/src/common/classes/fb_atomic.h ++++ b/src/common/classes/fb_atomic.h +@@ -99,7 +99,7 @@ public: + } + + protected: +-#ifndef MINGW ++#ifndef __MINGW32__ + volatile + #endif + counter_type counter; +diff --git a/src/iscguard/iscguard.cpp b/src/iscguard/iscguard.cpp +index b1cf0f6..6d21508 100644 +--- a/src/iscguard/iscguard.cpp ++++ b/src/iscguard/iscguard.cpp +@@ -137,7 +137,7 @@ int WINAPI WinMain(HINSTANCE hInstance, + + // BRS There is a error in MinGW (3.1.0) headers + // the parameter of StartServiceCtrlDispatcher is declared const in msvc headers +-#if defined(MINGW) ++#if defined(__MINGW32__) + if (!StartServiceCtrlDispatcher(const_cast(service_table))) + #else + if (!StartServiceCtrlDispatcher(service_table)) +diff --git a/src/isql/isql.epp b/src/isql/isql.epp +index c786f83..ae92c35 100644 +--- a/src/isql/isql.epp ++++ b/src/isql/isql.epp +@@ -6943,7 +6943,7 @@ static unsigned print_item(TEXT** s, const IsqlVar* var, const unsigned length) + break; + } + +-#if defined(MINGW) ++#if defined(__MINGW32__) + if (value == 0) + { + sprintf(p, "% #*.*g ", length, (int) MIN(8, (length - 6)) - 1, value); +@@ -7019,7 +7019,7 @@ static unsigned print_item(TEXT** s, const IsqlVar* var, const unsigned length) + } + else + { +-#if defined(MINGW) ++#if defined(__MINGW32__) + if (value == 0) + { + sprintf(p, "% #*.*g ", length, (int) MIN(16, (length - 7)) - 1, value); +diff --git a/src/jrd/ibsetjmp.h b/src/jrd/ibsetjmp.h +index 759f125..0ac3c54 100644 +--- a/src/jrd/ibsetjmp.h ++++ b/src/jrd/ibsetjmp.h +@@ -50,7 +50,7 @@ + + #endif // UNIX + +-#if defined(WIN_NT) && !defined(MINGW) ++#if defined(WIN_NT) && !defined(__MINGW32__) + #include + + #define START_CHECK_FOR_EXCEPTIONS(err) { \ +diff --git a/src/remote/server/os/win32/srvr_w32.cpp b/src/remote/server/os/win32/srvr_w32.cpp +index a7f8ac5..3bc652f 100644 +--- a/src/remote/server/os/win32/srvr_w32.cpp ++++ b/src/remote/server/os/win32/srvr_w32.cpp +@@ -322,7 +322,7 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs, + + // BRS There is a error in MinGW (3.1.0) headers + // the parameter of StartServiceCtrlDispatcher is declared const in msvc headers +-#if defined(MINGW) ++#if defined(__MINGW32__) + if (!StartServiceCtrlDispatcher(const_cast(service_table))) + { + #else +-- +2.4.3 + +From 750a2202b62e16bf84f0bd2813bc5ebb02e3ee3f Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 20 Nov 2014 07:31:40 +0300 +Subject: [PATCH] Add AuthSspi to remote common - needed for win32 target. + +--- + builds/posix/make.shared.variables | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builds/posix/make.shared.variables b/builds/posix/make.shared.variables +index 2d3143f..53597e6 100644 +--- a/builds/posix/make.shared.variables ++++ b/builds/posix/make.shared.variables +@@ -52,7 +52,7 @@ AllObjects += $(YValve_Objects) + + + # Remote +-Remote_Common:= $(call dirObjects,remote) $(call dirObjects,auth/SecureRemotePassword) ++Remote_Common:= $(call dirObjects,remote) $(call dirObjects,auth/SecureRemotePassword) $(call dirObjects,auth/trusted) + Remote_Server:= $(call dirObjects,remote/server) $(call dirObjects,auth/SecureRemotePassword/server) + Remote_Client:= $(call dirObjects,remote/client) $(call dirObjects,auth/SecureRemotePassword/client) \ + $(call makeObjects,auth/SecurityDatabase,LegacyClient.cpp) \ +-- +2.4.3 + +From fa8118fd2828e66de87d1625f5eed043ee825936 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Mon, 24 Nov 2014 09:08:35 +0300 +Subject: [PATCH] Some utilities need to link with additional windows libraries + +--- + builds/posix/Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/builds/posix/Makefile.in b/builds/posix/Makefile.in +index eac1ed5..85d4697 100644 +--- a/builds/posix/Makefile.in ++++ b/builds/posix/Makefile.in +@@ -375,7 +375,7 @@ utilities: firebird_server fb_lock_print fbguard fbsvcmgr fbtracemgr gbak gfix g + firebird_server: $(FB_DAEMON) + + $(FB_DAEMON): $(Remote_Server_Objects) $(COMMON_LIB) +- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) ++ $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(LIB_GUI) + + fb_lock_print: $(LOCKPRINT) + +@@ -385,7 +385,7 @@ $(LOCKPRINT): $(LOCKPRINT_Objects) $(COMMON_LIB) + fbguard: $(FBGUARD) + + $(FBGUARD): $(FBGUARD_Objects) $(COMMON_LIB) +- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) ++ $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(LIB_GUI) + + fbsvcmgr: $(FBSVCMGR) + +-- +2.4.3 + +From 9de828798a528614a938da3b3116d1a968716cf3 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Mon, 24 Nov 2014 10:10:35 +0300 +Subject: [PATCH] Fix linking executables and libraries with resources. + Generate proper import libraries. + +--- + builds/posix/Makefile.in.plugins_examples | 2 +- + builds/posix/make.defaults | 14 +- + builds/posix/prefix.mingw | 40 ++-- + builds/win32/defs/fbclient32.def | 372 ++++++++++++++++++++++++++++++ + builds/win32/defs/fbclient64.def | 372 ++++++++++++++++++++++++++++++ + 5 files changed, 773 insertions(+), 27 deletions(-) + create mode 100644 builds/win32/defs/fbclient32.def + create mode 100644 builds/win32/defs/fbclient64.def + +diff --git a/builds/posix/Makefile.in.plugins_examples b/builds/posix/Makefile.in.plugins_examples +index 40908f6..24fa138 100644 +--- a/builds/posix/Makefile.in.plugins_examples ++++ b/builds/posix/Makefile.in.plugins_examples +@@ -73,7 +73,7 @@ ifeq ($(PLATFORM),DARWIN) + $(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ \ + $(FIREBIRD_LIBRARY_LINK) + else +- $(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)udrcpp_example.$(SHRLIB_EXT) \ ++ $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(LIB_PREFIX)udrcpp_example.$(SHRLIB_EXT)) \ + $(LIB_PATH_OPTS) -o $@ $^ $(THR_LIBS) \ + $(FIREBIRD_LIBRARY_LINK) + endif +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index 65f8c6c..bc18fc8 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -107,6 +107,11 @@ RTTI_FLAG:= -fno-rtti + IsDeveloper = @DEVEL_FLG@ + + CpuType=@CPU_TYPE@ ++ifeq ($(CpuType), x86_64) ++ BITNESS_SUFFIX := 64 ++else ++ BITNESS_SUFFIX := 32 ++endif + PLATFORM=@PLATFORM@ + SFIO_EXAMPLES=@SFIO_EXAMPLES@ + +@@ -218,7 +223,7 @@ vpath %.dll $(BIN) + # + + #LibraryFileName=libfbclient +-LibraryFileName=libfbclient ++LibraryFileName=$(LIB_PREFIX)fbclient + LibraryFullName=$(LibraryFileName).${SHRLIB_EXT}.${FirebirdVersion} + LibrarySoName=$(LibraryFileName).${SHRLIB_EXT}.2 + LibraryBaseName=$(LibraryFileName).${SHRLIB_EXT} +@@ -229,7 +234,7 @@ LIBFIREBIRD_BASENAME = $(LIB)/$(LibrarySoName) + + # The firebird engine library name + +-EngineFileName=libEngine${OdsVersion} ++EngineFileName=$(LIB_PREFIX)Engine${OdsVersion} + EngineSoName=$(EngineFileName).${SHRLIB_EXT} + ENGINE_SONAME = $(PLUGINS)/$(EngineSoName) + +@@ -290,6 +295,7 @@ else + endif + LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl) + LIB_LINK_SONAME= -Wl,-soname,$(1) ++LIB_LINK_IMPLIB= + LIB_LINK_MAPFILE= -Wl,--version-script,$(1) + FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfbclient $(MATHLIB) + +@@ -304,7 +310,7 @@ LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_ + LINK_UDF_LIBS = $(THR_LIBS) -L$(LIB) -lib_util $(SO_LINK_LIBS) + + LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\ +- $(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib) ++ $(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_IMPLIB,$(LIB)/lib$(IbUtilLibraryName).a) + LINK_IB_UTIL_LIBS = $(THR_LIBS) + + LINK_INTL = $(LIB_LINK) $(LINK_FBINTL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\ +@@ -316,7 +322,7 @@ LINK_TRACE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAG + LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS) + + LINK_FIREBIRD = $(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\ +- $(call LIB_LINK_SONAME,$(LibrarySoName)) $(call LIB_LINK_RPATH,lib) ++ $(call LIB_LINK_SONAME,$(LibrarySoName)) $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_IMPLIB,$(LIB)/lib$(LibraryBaseName).a) + LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB) + + LINK_ENGINE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\ +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index 09902f4..8dad1ce 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -28,42 +28,38 @@ PLATFORM_PATH=os/win32 + # Override link command for implicit stdc++ linking + LIB_LINK=$(LD) + +-LIB_LINK_OPTIONS+=-Wl,--enable-stdcall-fixup +- + # Strip symbols from release versions to decrease size + ifeq ($(IsProdTypeBuild),Y) + EXE_LINK_OPTIONS+=-Wl,-s + LIB_LINK_OPTIONS+=-Wl,-s + endif + +-# Generation of fbclient_ms.lib +-LIB_LINK_IMPLIB:=-Wl,--out-implib,firebird/lib/fbclient_ms.lib + LIB_GUI:= -mwindows -lcomctl32 -lgdi32 + + # Add resources to some files +-FilesToAddVersionInfo=$(LIBFBEMBED_SO) $(LIBFBCLIENT_SO) $(LIBFBINTL_SO) \ +- $(GSTAT) $(GSEC) $(GFIX) $(QLI) $(ISQL) $(GBAK) $(GPRE) ++FilesToAddVersionInfo=$(FBTRACEMGR) $(LIBFIREBIRD_FULLNAME) $(ENGINE_SONAME) $(LIBFBINTL_SO) \ ++ $(FBSVCMGR) $(FBTRACEMGR) $(FBTRACE) $(FBUDF_SO) $(LIBIBUTIL_SO) \ ++ $(GBAK) $(GFIX) $(GPRE) $(GSEC) $(GSPLIT) $(GSTAT) $(QLI) $(ISQL) $(NBACKUP) + # TODO: guardians also must be here +-FilesToAddDialog=$(FB_SUPER_SERVER) $(FB_CLASSIC_SERVER) +-FilesToAddDialog2=$(IBGUARD) ++FilesToAddDialog=$(FB_DAEMON) ++FilesToAddDialog2=$(FBGUARD) + + # Suppress 'lib'-prefix + LIB_PREFIX= + + # Override library names to suppress version suffix +-ClientLibraryNameFull := $(ClientLibraryName) +-ClientLibrarySoName := $(ClientLibraryName) +- +-# Looks like MinGW 3 does not support version scripts but support def-files +-LINK_FIREBIRD_SYMBOLS = $(BLD_ROOT)/win32/defs/fbclient_s.def $(BLD_ROOT)/win32/defs/fbclient.def +- +-# This is required for newly built executable to find newly built shared +-# libraries because on Win32 there is no such thing as LD_LIBRARY_PATH +-LIB=$(BIN) ++LibrarySoName := $(LibraryBaseName) ++LibraryFullName := $(LibraryBaseName) ++LIBFIREBIRD_FULLNAME = $(BIN)/$(LibraryBaseName) ++LIBFIREBIRD_SONAME = $(LIBFIREBIRD_FULLNAME) ++LIBFIREBIRD_BASENAME = $(LIBFIREBIRD_FULLNAME) ++LIBIBUTIL_SO = $(BIN)/$(IbUtilLibraryName) + +-# Special options for UDF link +-LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_EXT)) -L$(LIB) -lib_util +-LINK_UDF_LIBS = ++LINK_FIREBIRD_SYMBOLS = $(BLD_ROOT)/win32/defs/fbclient$(BITNESS_SUFFIX).def ++LINK_FBINTL_SYMBOLS = ++LINK_IBUTIL_SYMBOLS = ++LINK_UDRENG_SYMBOLS = ++LINK_EMPTY_SYMBOLS = ++LINK_PLUGIN_SYMBOLS = ++LIB_LINK_IMPLIB= -Wl,--out-implib,$(1) + +-# Special options for trace plugin link +-LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS) +diff --git a/builds/win32/defs/fbclient32.def b/builds/win32/defs/fbclient32.def +new file mode 100644 +index 0000000..fa8f733 +--- /dev/null ++++ b/builds/win32/defs/fbclient32.def +@@ -0,0 +1,725 @@ ++; The contents of this file are subject to the Interbase Public ++; License Version 1.0 (the "License"); you may not use this file ++; except in compliance with the License. You may obtain a copy ++; of the License at http://www.Inprise.com/IPL.html ++; ++; Software distributed under the License is distributed on an ++; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express ++; or implied. See the License for the specific language governing ++; rights and limitations under the License. ++; ++; The Original Code was created by Inprise Corporation ++; and its predecessors. Portions created by Inprise Corporation are ++; Copyright (C) Inprise Corporation. ++; ++; All Rights Reserved. ++; Contributor(s): ______________________________________. ++ ++LIBRARY "fbclient.dll" ++EXPORTS ++ ++;------------------- ++; PRIVATE INTERFACE ++;------------------- ++ ++ gds__alloc@4 ++ gds__attach_database@24 ++ gds__blob_info@24 ++ gds__blob_size@16 ++ gds__cancel_blob@8 ++ gds__cancel_events@12 ++ gds__close@8 ++ gds__close_blob@8 ++ gds__commit_retaining@8 ++ gds__commit_transaction@8 ++ gds__compile_request@20 ++ gds__compile_request2@20 ++ gds__create_blob@20 ++ gds__create_blob2@28 ++ gds__create_database@28 ++ gds__database_cleanup@16 ++ gds__database_info@24 ++ gds__ddl@20 ++ gds__declare@12 ++ gds__decode@12 ++ gds__decode_date@8 ++ gds__describe@12 ++ gds__describe_bind@12 ++ gds__detach_database@8 ++ gds__disable_subsystem@4 ++ gds__dsql_finish@4 ++ gds__edit@8 ++ gds__enable_subsystem@4 ++ gds__encode@8 ++ gds__encode_date@8 ++ gds__event_block@0 ++ gds__event_counts@16 ++ gds__event_wait@20 ++ gds__execute@16 ++ gds__execute_immediate@20 ++ gds__fetch@12 ++ gds__free@4 ++ gds__ftof@16 ++ gds__get_prefix@8 ++ gds__get_segment@20 ++ gds__get_slice@44 ++ gds__interprete@8 ++ gds__log@0 ++ gds__log_status@8 ++ gds__map_blobs@8 ++ gds__msg_close@4 ++ gds__msg_format@40 ++ gds__msg_lookup@24 ++ gds__msg_open@8 ++ gds__msg_put@32 ++ gds__open@16 ++ gds__open_blob@20 ++ gds__open_blob2@28 ++ gds__parse_bpb@16 ++ gds__prefix@8 ++ gds__prefix_lock@8 ++ gds__prefix_msg@8 ++ gds__prepare@28 ++ gds__prepare_transaction@8 ++ gds__prepare_transaction2@16 ++ gds__print_blr@16 ++ gds__print_status@4 ++ gds__put_error@4 ++ gds__put_segment@16 ++ gds__put_slice@40 ++ gds__qtoq@8 ++ gds__que_events@28 ++ gds__receive@24 ++ gds__reconnect_transaction@20 ++ gds__register_cleanup@8 ++ gds__release_request@8 ++ gds__request_info@28 ++ gds__rollback_transaction@8 ++ gds__seek_blob@20 ++ gds__send@24 ++ gds__set_debug@4 ++ gds__sqlcode@4 ++ gds__start_and_send@28 ++ gds__start_multiple@16 ++ gds__start_request@16 ++ gds__start_transaction@0 ++ gds__temp_file@20 ++ gds__thread_enable@4 ++ gds__thread_enter@0 ++ gds__thread_exit@0 ++ gds__thread_start@20 ++ gds__to_sqlda@20 ++ gds__transaction_cleanup@16 ++ gds__transaction_info@24 ++ gds__unregister_cleanup@8 ++ gds__unwind_request@12 ++ gds__validate_lib_path@16 ++ gds__vax_integer@8 ++ gds__version@12 ++ gds__vtof@12 ++ gds__vtov@12 ++ gds__default_printer@0 ++ ++ gds__alloc_debug@12 ++ ++ gds_alloc_flag_unfreed@4 ++ gds_alloc_report@12 ++ ++ fb_shutdown@8 ++ fb_shutdown_callback@16 ++ fb_cancel_operation@12 ++ fb_disconnect_transaction@8 ++ ++ perf_format@20 ++ perf_get_info@8 ++ perf_report@16 ++ ++ perf64_format@20 ++ perf64_get_info@8 ++ perf64_report@16 ++ ++;---------------------------- ++; PUBLIC INTERFACE, i.e. API ++;---------------------------- ++ ++ ; Array functions ++ ++ isc_array_gen_sdl@20 ++ isc_array_get_slice@28 ++ isc_array_lookup_bounds@24 ++ isc_array_lookup_desc@24 ++ isc_array_put_slice@28 ++ isc_array_set_desc@28 ++ isc_get_slice@44 ++ isc_put_slice@40 ++ ++ ; BLOB functions ++ ++ isc_blob_default_desc@12 ++ isc_blob_gen_bpb@24 ++ isc_blob_info@24 ++ isc_blob_lookup_desc@28 ++ isc_blob_set_desc@28 ++ isc_cancel_blob@8 ++ isc_close_blob@8 ++ isc_create_blob@20 ++ isc_create_blob2@28 ++ isc_get_segment@20 ++ isc_open_blob@20 ++ isc_open_blob2@28 ++ isc_put_segment@16 ++ ++ ; Database functions ++ ++ isc_attach_database@24 ++ isc_create_database@28 ++ isc_database_info@24 ++ isc_detach_database@8 ++ isc_drop_database@8 ++ isc_expand_dpb@0 ++ isc_modify_dpb@20 ++ isc_version@12 ++ isc_get_client_major_version@0 ++ isc_get_client_minor_version@0 ++ isc_get_client_version@4 ++ ++ ; Conversion functions ++ ++ isc_decode_date@8 ++ isc_decode_sql_date@8 ++ isc_decode_sql_time@8 ++ isc_decode_timestamp@8 ++ isc_encode_date@8 ++ isc_encode_sql_date@8 ++ isc_encode_sql_time@8 ++ isc_encode_timestamp@8 ++ isc_portable_integer@8 ++ isc_vax_integer@8 ++ ++ ; DSQL functions ++ ++ isc_dsql_allocate_statement@12 ++ isc_dsql_alloc_statement2@12 ++ isc_dsql_describe@16 ++ isc_dsql_describe_bind@16 ++ isc_dsql_execute@20 ++ isc_dsql_execute2@24 ++ isc_dsql_execute_m@32 ++ isc_dsql_execute2_m@52 ++ isc_dsql_execute_immediate@28 ++ isc_dsql_exec_immed2@32 ++ isc_dsql_execute_immediate_m@44 ++ isc_dsql_exec_immed2_m@64 ++ isc_dsql_exec_immed3_m@64 ++ isc_dsql_fetch@16 ++ isc_dsql_fetch_a@20 ++ isc_dsql_fetch_m@28 ++ isc_dsql_finish@4 ++ isc_dsql_free_statement@12 ++ isc_dsql_insert@16 ++ isc_dsql_insert_m@28 ++ isc_dsql_prepare@28 ++ isc_dsql_prepare_m@40 ++ isc_dsql_release@8 ++ isc_dsql_set_cursor_name@16 ++ isc_dsql_sql_info@24 ++ ++ ; ESQL functions ++ ++ isc_embed_dsql_close@8 ++ isc_embed_dsql_declare@12 ++ isc_embed_dsql_describe@16 ++ isc_embed_dsql_describe_bind@16 ++ isc_embed_dsql_execute@20 ++ isc_embed_dsql_execute2@24 ++ isc_embed_dsql_execute_immed@28 ++ isc_embed_dsql_exec_immed2@32 ++ isc_embed_dsql_fetch@16 ++ isc_embed_dsql_fetch_a@20 ++ isc_embed_dsql_insert@16 ++ isc_embed_dsql_open@20 ++ isc_embed_dsql_open2@24 ++ isc_embed_dsql_prepare@32 ++ isc_embed_dsql_release@8 ++ isc_embed_dsql_length@8 ++ ++ ; Error-handling functions ++ ++ isc_interprete@8 ++ fb_interpret@12 ++ isc_print_sqlerror@8 ++ isc_print_status@4 ++ isc_sqlcode@4 ++ isc_sql_interprete@12 ++ isc_sqlcode_s@8 ++ fb_sqlstate@8 ++ ++ ; Event functions ++ ++ isc_cancel_events@12 ++ isc_event_block@0 ++ isc_event_counts@16 ++ isc_que_events@28 ++ isc_wait_for_event@20 ++ isc_event_block_a@16 ++ isc_event_block_s@20 ++ ++ ; Security functions ++ ++ isc_add_user@8 ++ isc_delete_user@8 ++ isc_modify_user@8 ++ ++ ; Services functions ++ ++ isc_service_attach@24 ++ isc_service_detach@8 ++ isc_service_query@36 ++ isc_service_start@20 ++ ++ ; Transaction control functions ++ ++ isc_commit_retaining@8 ++ isc_commit_transaction@8 ++ isc_prepare_transaction@8 ++ isc_prepare_transaction2@16 ++ isc_rollback_retaining@8 ++ isc_rollback_transaction@8 ++ isc_start_multiple@16 ++ isc_start_transaction@0 ++ isc_transaction_info@24 ++ ++ ; Other functions ++ ++ isc_compile_request@20 ++ isc_compile_request2@20 ++ isc_ddl@20 ++ isc_prepare@28 ++ isc_receive@24 ++ isc_reconnect_transaction@20 ++ isc_release_request@8 ++ isc_request_info@28 ++ isc_seek_blob@20 ++ isc_send@24 ++ isc_start_and_send@28 ++ isc_start_request@16 ++ isc_transact_request@36 ++ isc_unwind_request@12 ++ ++ ; Other SQL functions ++ ++ isc_close@8 ++ isc_declare@12 ++ isc_describe@12 ++ isc_describe_bind@12 ++ isc_execute@16 ++ isc_execute_immediate@20 ++ isc_fetch@12 ++ isc_fetch_a@16 ++ isc_open@16 ++ ++ ; Other BLOB functions ++ ++ BLOB_close@4 ++ BLOB_display@16 ++ BLOB_dump@16 ++ BLOB_edit@16 ++ BLOB_get@4 ++ BLOB_load@16 ++ BLOB_open@12 ++ BLOB_put@8 ++ BLOB_text_dump@16 ++ BLOB_text_load@16 ++ Bopen@16 ++ ++ ; Other misc functions ++ ++ isc_ftof@16 ++ isc_free@4 ++ isc_print_blr@16 ++ fb_print_blr@20 ++ isc_qtoq@8 ++ isc_reset_fpe@4 ++ isc_set_debug@4 ++ isc_to_sqlda@20 ++ isc_vtof@12 ++ isc_vtov@12 ++ isc_baddress@4 ++ isc_baddress_s@8 ++ ++ _isc_start_transaction = isc_start_transaction@0 ++ _isc_expand_dpb = isc_expand_dpb@0 ++ _isc_event_block = isc_event_block@0 ++ ++ fb_ping@8 ++ fb_get_master_interface@0 ++ fb_get_database_handle@12 ++ fb_get_transaction_handle@12 ++ fb_database_crypt_callback@8 ++ ++ gds__trace@4 ++ gds__trace_raw@8 ++ gds__trace_printer@0 ++ gds__parse_bpb2@40 ++ ++;----------------- ++; OTHER FUNCTIONS ++;----------------- ++ ++ CVT_move@12 ++ ++ KEYWORD_stringIsAToken@4 ++ KEYWORD_getTokens@0 ++ ++;-------------------------------------- ++; DUPLICATE FOR COMPATIBILITY WITH MSVC ++;-------------------------------------- ++ ++;------------------- ++; PRIVATE INTERFACE ++;------------------- ++ ++ gds__alloc = gds__alloc@4 @1 ++ gds__attach_database = gds__attach_database@24 @2 ++ gds__blob_info = gds__blob_info@24 @3 ++ gds__blob_size = gds__blob_size@16 @4 ++ gds__cancel_blob = gds__cancel_blob@8 @5 ++ gds__cancel_events = gds__cancel_events@12 @6 ++ gds__close = gds__close@8 @7 ++ gds__close_blob = gds__close_blob@8 @8 ++ gds__commit_retaining = gds__commit_retaining@8 @9 ++ gds__commit_transaction = gds__commit_transaction@8 @10 ++ gds__compile_request = gds__compile_request@20 @11 ++ gds__compile_request2 = gds__compile_request2@20 @12 ++ gds__create_blob = gds__create_blob@20 @13 ++ gds__create_blob2 = gds__create_blob2@28 @14 ++ gds__create_database = gds__create_database@28 @15 ++ gds__database_cleanup = gds__database_cleanup@16 @16 ++ gds__database_info = gds__database_info@24 @17 ++ gds__ddl = gds__ddl@20 @18 ++ gds__declare = gds__declare@12 @19 ++ gds__decode = gds__decode@12 @20 ++ gds__decode_date = gds__decode_date@8 @21 ++ gds__describe = gds__describe@12 @22 ++ gds__describe_bind = gds__describe_bind@12 @23 ++ gds__detach_database = gds__detach_database@8 @24 ++ gds__disable_subsystem = gds__disable_subsystem@4 @25 ++ gds__dsql_finish = gds__dsql_finish@4 @26 ++ gds__edit = gds__edit@8 @27 ++ gds__enable_subsystem = gds__enable_subsystem@4 @28 ++ gds__encode = gds__encode@8 @29 ++ gds__encode_date = gds__encode_date@8 @30 ++ gds__event_block = gds__event_block@0 @31 ++ gds__event_counts = gds__event_counts@16 @32 ++ gds__event_wait = gds__event_wait@20 @33 ++ gds__execute = gds__execute@16 @34 ++ gds__execute_immediate = gds__execute_immediate@20 @35 ++ gds__fetch = gds__fetch@12 @36 ++ gds__free = gds__free@4 @37 ++ gds__ftof = gds__ftof@16 @38 ++ gds__get_prefix = gds__get_prefix@8 @248 ++ gds__get_segment = gds__get_segment@20 @39 ++ gds__get_slice = gds__get_slice@44 @40 ++ gds__interprete = gds__interprete@8 @41 ++ gds__log = gds__log@0 @42 ++ gds__log_status = gds__log_status@8 @142 ++ gds__map_blobs = gds__map_blobs@8 @240 ++ gds__msg_close = gds__msg_close@4 @223 ++ gds__msg_format = gds__msg_format@40 @43 ++ gds__msg_lookup = gds__msg_lookup@24 @44 ++ gds__msg_open = gds__msg_open@8 @45 ++ gds__msg_put = gds__msg_put@32 @46 ++ gds__open = gds__open@16 @47 ++ gds__open_blob = gds__open_blob@20 @48 ++ gds__open_blob2 = gds__open_blob2@28 @49 ++ gds__parse_bpb = gds__parse_bpb@16 @50 ++ gds__prefix = gds__prefix@8 @51 ++ gds__prefix_lock = gds__prefix_lock@8 @249 ++ gds__prefix_msg = gds__prefix_msg@8 @250 ++ gds__prepare = gds__prepare@28 @52 ++ gds__prepare_transaction = gds__prepare_transaction@8 @53 ++ gds__prepare_transaction2 = gds__prepare_transaction2@16 @54 ++ gds__print_blr = gds__print_blr@16 @55 ++ gds__print_status = gds__print_status@4 @56 ++ gds__put_error = gds__put_error@4 @57 ++ gds__put_segment = gds__put_segment@16 @58 ++ gds__put_slice = gds__put_slice@40 @59 ++ gds__qtoq = gds__qtoq@8 @60 ++ gds__que_events = gds__que_events@28 @61 ++ gds__receive = gds__receive@24 @62 ++ gds__reconnect_transaction = gds__reconnect_transaction@20 @63 ++ gds__register_cleanup = gds__register_cleanup@8 @64 ++ gds__release_request = gds__release_request@8 @65 ++ gds__request_info = gds__request_info@28 @66 ++ gds__rollback_transaction = gds__rollback_transaction@8 @67 ++ gds__seek_blob = gds__seek_blob@20 @68 ++ gds__send = gds__send@24 @69 ++ gds__set_debug = gds__set_debug@4 @70 ++ gds__sqlcode = gds__sqlcode@4 @71 ++ gds__start_and_send = gds__start_and_send@28 @72 ++ gds__start_multiple = gds__start_multiple@16 @73 ++ gds__start_request = gds__start_request@16 @74 ++ gds__start_transaction = gds__start_transaction@0 @75 ++ gds__temp_file = gds__temp_file@20 @231 ++ gds__thread_enable = gds__thread_enable@4 @76 ++ gds__thread_enter = gds__thread_enter@0 @77 ++ gds__thread_exit = gds__thread_exit@0 @78 ++ gds__thread_start = gds__thread_start@20 @79 ++ gds__to_sqlda = gds__to_sqlda@20 @80 ++ gds__transaction_cleanup = gds__transaction_cleanup@16 @235 ++ gds__transaction_info = gds__transaction_info@24 @81 ++ gds__unregister_cleanup = gds__unregister_cleanup@8 @224 ++ gds__unwind_request = gds__unwind_request@12 @82 ++ gds__validate_lib_path = gds__validate_lib_path@16 @255 ++ gds__vax_integer = gds__vax_integer@8 @83 ++ gds__version = gds__version@12 @84 ++ gds__vtof = gds__vtof@12 @85 ++ gds__vtov = gds__vtov@12 @86 ++ gds__default_printer = gds__default_printer@0 @87 ++ ++ gds__alloc_debug = gds__alloc_debug@12 ++ ++ gds_alloc_flag_unfreed = gds_alloc_flag_unfreed@4 ++ gds_alloc_report = gds_alloc_report@12 ++ ++ fb_shutdown = fb_shutdown@8 ++ fb_shutdown_callback = fb_shutdown_callback@16 ++ fb_cancel_operation = fb_cancel_operation@12 ++ fb_disconnect_transaction = fb_disconnect_transaction@8 ++ ++ perf_format = perf_format@20 @100 ++ perf_get_info = perf_get_info@8 @101 ++ perf_report = perf_report@16 @102 ++ ++ perf64_format = perf64_format@20 ++ perf64_get_info = perf64_get_info@8 ++ perf64_report = perf64_report@16 ++ ++;---------------------------- ++; PUBLIC INTERFACE, i.e. API ++;---------------------------- ++ ++ ; Array functions ++ ++ isc_array_gen_sdl = isc_array_gen_sdl@20 @217 ++ isc_array_get_slice = isc_array_get_slice@28 @218 ++ isc_array_lookup_bounds = isc_array_lookup_bounds@24 @219 ++ isc_array_lookup_desc = isc_array_lookup_desc@24 @220 ++ isc_array_put_slice = isc_array_put_slice@28 @221 ++ isc_array_set_desc = isc_array_set_desc@28 @222 ++ isc_get_slice = isc_get_slice@44 @140 ++ isc_put_slice = isc_put_slice@40 @153 ++ ++ ; BLOB functions ++ ++ isc_blob_default_desc = isc_blob_default_desc@12 @239 ++ isc_blob_gen_bpb = isc_blob_gen_bpb@24 @236 ++ isc_blob_info = isc_blob_info@24 @108 ++ isc_blob_lookup_desc = isc_blob_lookup_desc@28 @237 ++ isc_blob_set_desc = isc_blob_set_desc@28 @238 ++ isc_cancel_blob = isc_cancel_blob@8 @110 ++ isc_close_blob = isc_close_blob@8 @113 ++ isc_create_blob = isc_create_blob@20 @118 ++ isc_create_blob2 = isc_create_blob2@28 @119 ++ isc_get_segment = isc_get_segment@20 @139 ++ isc_open_blob = isc_open_blob@20 @144 ++ isc_open_blob2 = isc_open_blob2@28 @145 ++ isc_put_segment = isc_put_segment@16 @152 ++ ++ ; Database functions ++ ++ isc_attach_database = isc_attach_database@24 @103 ++ isc_create_database = isc_create_database@28 @120 ++ isc_database_info = isc_database_info@24 @122 ++ isc_detach_database = isc_detach_database@8 @128 ++ isc_drop_database = isc_drop_database@8 @229 ++ isc_expand_dpb = isc_expand_dpb@0 @135 ++ isc_modify_dpb = isc_modify_dpb@20 @244 ++ isc_version = isc_version@12 @174 ++ isc_get_client_major_version = isc_get_client_major_version@0 @268 ++ isc_get_client_minor_version = isc_get_client_minor_version@0 @269 ++ isc_get_client_version = isc_get_client_version@4 @270 ++ ++ ; Conversion functions ++ ++ isc_decode_date = isc_decode_date@8 @125 ++ isc_decode_sql_date = isc_decode_sql_date@8 @261 ++ isc_decode_sql_time = isc_decode_sql_time@8 @262 ++ isc_decode_timestamp = isc_decode_timestamp@8 @263 ++ isc_encode_date = isc_encode_date@8 @129 ++ isc_encode_sql_date = isc_encode_sql_date@8 @264 ++ isc_encode_sql_time = isc_encode_sql_time@8 @265 ++ isc_encode_timestamp = isc_encode_timestamp@8 @266 ++ isc_portable_integer = isc_portable_integer@8 @259 ++ isc_vax_integer = isc_vax_integer@8 @173 ++ ++ ; DSQL functions ++ ++ isc_dsql_allocate_statement = isc_dsql_allocate_statement@12 @178 ++ isc_dsql_alloc_statement2 = isc_dsql_alloc_statement2@12 @179 ++ isc_dsql_describe = isc_dsql_describe@16 @180 ++ isc_dsql_describe_bind = isc_dsql_describe_bind@16 @181 ++ isc_dsql_execute = isc_dsql_execute@20 @182 ++ isc_dsql_execute2 = isc_dsql_execute2@24 @183 ++ isc_dsql_execute_m = isc_dsql_execute_m@32 @184 ++ isc_dsql_execute2_m = isc_dsql_execute2_m@52 @185 ++ isc_dsql_execute_immediate = isc_dsql_execute_immediate@28 @186 ++ isc_dsql_exec_immed2 = isc_dsql_exec_immed2@32 @187 ++ isc_dsql_execute_immediate_m = isc_dsql_execute_immediate_m@44 @188 ++ isc_dsql_exec_immed2_m = isc_dsql_exec_immed2_m@64 @189 ++ isc_dsql_exec_immed3_m = isc_dsql_exec_immed3_m@64 @230 ++ isc_dsql_fetch = isc_dsql_fetch@16 @190 ++ isc_dsql_fetch_a = isc_dsql_fetch_a@20 @191 ++ isc_dsql_fetch_m = isc_dsql_fetch_m@28 @192 ++ isc_dsql_finish = isc_dsql_finish@4 @193 ++ isc_dsql_free_statement = isc_dsql_free_statement@12 @194 ++ isc_dsql_insert = isc_dsql_insert@16 @195 ++ isc_dsql_insert_m = isc_dsql_insert_m@28 @196 ++ isc_dsql_prepare = isc_dsql_prepare@28 @197 ++ isc_dsql_prepare_m = isc_dsql_prepare_m@40 @198 ++ isc_dsql_release = isc_dsql_release@8 @199 ++ isc_dsql_set_cursor_name = isc_dsql_set_cursor_name@16 @200 ++ isc_dsql_sql_info = isc_dsql_sql_info@24 @201 ++ ++ ; ESQL functions ++ ++ isc_embed_dsql_close = isc_embed_dsql_close@8 @202 ++ isc_embed_dsql_declare = isc_embed_dsql_declare@12 @203 ++ isc_embed_dsql_describe = isc_embed_dsql_describe@16 @204 ++ isc_embed_dsql_describe_bind = isc_embed_dsql_describe_bind@16 @205 ++ isc_embed_dsql_execute = isc_embed_dsql_execute@20 @206 ++ isc_embed_dsql_execute2 = isc_embed_dsql_execute2@24 @207 ++ isc_embed_dsql_execute_immed = isc_embed_dsql_execute_immed@28 @208 ++ isc_embed_dsql_exec_immed2 = isc_embed_dsql_exec_immed2@32 @209 ++ isc_embed_dsql_fetch = isc_embed_dsql_fetch@16 @210 ++ isc_embed_dsql_fetch_a = isc_embed_dsql_fetch_a@20 @211 ++ isc_embed_dsql_insert = isc_embed_dsql_insert@16 @212 ++ isc_embed_dsql_open = isc_embed_dsql_open@20 @213 ++ isc_embed_dsql_open2 = isc_embed_dsql_open2@24 @214 ++ isc_embed_dsql_prepare = isc_embed_dsql_prepare@32 @215 ++ isc_embed_dsql_release = isc_embed_dsql_release@8 @216 ++ isc_embed_dsql_length = isc_embed_dsql_length@8 @273 ++ ++ ; Error-handling functions ++ ++ isc_interprete = isc_interprete@8 @141 ++ fb_interpret = fb_interpret@12 ++ isc_print_sqlerror = isc_print_sqlerror@8 @150 ++ isc_print_status = isc_print_status@4 @151 ++ isc_sqlcode = isc_sqlcode@4 @165 ++ isc_sql_interprete = isc_sql_interprete@12 @164 ++ isc_sqlcode_s = isc_sqlcode_s@8 @278 ++ fb_sqlstate = fb_sqlstate@8 @279 ++ ++ ; Event functions ++ ++ isc_cancel_events = isc_cancel_events@12 @111 ++ isc_event_block = isc_event_block@0 @130 ++ isc_event_counts = isc_event_counts@16 @131 ++ isc_que_events = isc_que_events@28 @155 ++ isc_wait_for_event = isc_wait_for_event@20 @177 ++ isc_event_block_a = isc_event_block_a@16 @274 ++ isc_event_block_s = isc_event_block_s@20 @275 ++ ++ ; Security functions ++ ++ isc_add_user = isc_add_user@8 @256 ++ isc_delete_user = isc_delete_user@8 @257 ++ isc_modify_user = isc_modify_user@8 @258 ++ ++ ; Services functions ++ ++ isc_service_attach = isc_service_attach@24 @225 ++ isc_service_detach = isc_service_detach@8 @226 ++ isc_service_query = isc_service_query@36 @227 ++ isc_service_start = isc_service_start@20 @228 ++ ++ ; Transaction control functions ++ ++ isc_commit_retaining = isc_commit_retaining@8 @114 ++ isc_commit_transaction = isc_commit_transaction@8 @115 ++ isc_prepare_transaction = isc_prepare_transaction@8 @147 ++ isc_prepare_transaction2 = isc_prepare_transaction2@16 @148 ++ isc_rollback_retaining = isc_rollback_retaining@8 @260 ++ isc_rollback_transaction = isc_rollback_transaction@8 @160 ++ isc_start_multiple = isc_start_multiple@16 @167 ++ isc_start_transaction = isc_start_transaction@0 @169 ++ isc_transaction_info = isc_transaction_info@24 @171 ++ ++ ; Other functions ++ ++ isc_compile_request = isc_compile_request@20 @116 ++ isc_compile_request2 = isc_compile_request2@20 @117 ++ isc_ddl = isc_ddl@20 @123 ++ isc_prepare = isc_prepare@28 @146 ++ isc_receive = isc_receive@24 @156 ++ isc_reconnect_transaction = isc_reconnect_transaction@20 @157 ++ isc_release_request = isc_release_request@8 @158 ++ isc_request_info = isc_request_info@28 @159 ++ isc_seek_blob = isc_seek_blob@20 @161 ++ isc_send = isc_send@24 @162 ++ isc_start_and_send = isc_start_and_send@28 @166 ++ isc_start_request = isc_start_request@16 @168 ++ isc_transact_request = isc_transact_request@36 @132 ++ isc_unwind_request = isc_unwind_request@12 @172 ++ ++ ; Other SQL functions ++ ++ isc_close = isc_close@8 @112 ++ isc_declare = isc_declare@12 @124 ++ isc_describe = isc_describe@12 @126 ++ isc_describe_bind = isc_describe_bind@12 @127 ++ isc_execute = isc_execute@16 @133 ++ isc_execute_immediate = isc_execute_immediate@20 @134 ++ isc_fetch = isc_fetch@12 @136 ++ isc_fetch_a = isc_fetch_a@16 @137 ++ isc_open = isc_open@16 @143 ++ ++ ; Other BLOB functions ++ ++ BLOB_close = BLOB_close@4 @91 ++ BLOB_display = BLOB_display@16 @92 ++ BLOB_dump = BLOB_dump@16 @93 ++ BLOB_edit = BLOB_edit@16 @94 ++ BLOB_get = BLOB_get@4 @95 ++ BLOB_load = BLOB_load@16 @96 ++ BLOB_open = BLOB_open@12 @97 ++ BLOB_put = BLOB_put@8 @98 ++ BLOB_text_dump = BLOB_text_dump@16 @242 ++ BLOB_text_load = BLOB_text_load@16 @243 ++ Bopen = Bopen@16 @99 ++ ++ ; Other misc functions ++ ++ isc_ftof = isc_ftof@16 @138 ++ isc_free = isc_free@4 @241 ++ isc_print_blr = isc_print_blr@16 @149 ++ fb_print_blr = fb_print_blr@20 @280 ++ isc_qtoq = isc_qtoq@8 @154 ++ isc_reset_fpe = isc_reset_fpe@4 ++ isc_set_debug = isc_set_debug@4 @163 ++ isc_to_sqlda = isc_to_sqlda@20 @170 ++ isc_vtof = isc_vtof@12 @175 ++ isc_vtov = isc_vtov@12 @176 ++ isc_baddress = isc_baddress@4 @276 ++ isc_baddress_s = isc_baddress_s@8 @277 ++ ++ fb_ping = fb_ping@8 ++ fb_get_master_interface = fb_get_master_interface@0 ++ fb_get_database_handle = fb_get_database_handle@12 ++ fb_get_transaction_handle = fb_get_transaction_handle@12 ++ fb_database_crypt_callback = fb_database_crypt_callback@8 ++ ++ gds__trace = gds__trace@4 ++ gds__trace_raw = gds__trace_raw@8 ++ gds__trace_printer = gds__trace_printer@0 ++ gds__parse_bpb2 = gds__parse_bpb2@40 ++ ++;----------------- ++; OTHER FUNCTIONS ++;----------------- ++ ++ CVT_move = CVT_move@12 @267 ++ ++ KEYWORD_stringIsAToken = KEYWORD_stringIsAToken@4 @271 ++ KEYWORD_getTokens = KEYWORD_getTokens@0 @272 +diff --git a/builds/win32/defs/fbclient64.def b/builds/win32/defs/fbclient64.def +new file mode 100644 +index 0000000..ed0b91e +--- /dev/null ++++ b/builds/win32/defs/fbclient64.def +@@ -0,0 +1,372 @@ ++; The contents of this file are subject to the Interbase Public ++; License Version 1.0 (the "License"); you may not use this file ++; except in compliance with the License. You may obtain a copy ++; of the License at http://www.Inprise.com/IPL.html ++; ++; Software distributed under the License is distributed on an ++; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express ++; or implied. See the License for the specific language governing ++; rights and limitations under the License. ++; ++; The Original Code was created by Inprise Corporation ++; and its predecessors. Portions created by Inprise Corporation are ++; Copyright (C) Inprise Corporation. ++; ++; All Rights Reserved. ++; Contributor(s): ______________________________________. ++ ++LIBRARY "fbclient.dll" ++EXPORTS ++ ++;------------------- ++; PRIVATE INTERFACE ++;------------------- ++ ++ gds__alloc @1 ++ gds__attach_database @2 ++ gds__blob_info @3 ++ gds__blob_size @4 ++ gds__cancel_blob @5 ++ gds__cancel_events @6 ++ gds__close @7 ++ gds__close_blob @8 ++ gds__commit_retaining @9 ++ gds__commit_transaction @10 ++ gds__compile_request @11 ++ gds__compile_request2 @12 ++ gds__create_blob @13 ++ gds__create_blob2 @14 ++ gds__create_database @15 ++ gds__database_cleanup @16 ++ gds__database_info @17 ++ gds__ddl @18 ++ gds__declare @19 ++ gds__decode @20 ++ gds__decode_date @21 ++ gds__describe @22 ++ gds__describe_bind @23 ++ gds__detach_database @24 ++ gds__disable_subsystem @25 ++ gds__dsql_finish @26 ++ gds__edit @27 ++ gds__enable_subsystem @28 ++ gds__encode @29 ++ gds__encode_date @30 ++ gds__event_block @31 ++ gds__event_counts @32 ++ gds__event_wait @33 ++ gds__execute @34 ++ gds__execute_immediate @35 ++ gds__fetch @36 ++ gds__free @37 ++ gds__ftof @38 ++ gds__get_prefix @248 ++ gds__get_segment @39 ++ gds__get_slice @40 ++ gds__interprete @41 ++ gds__log @42 ++ gds__log_status @142 ++ gds__map_blobs @240 ++ gds__msg_close @223 ++ gds__msg_format @43 ++ gds__msg_lookup @44 ++ gds__msg_open @45 ++ gds__msg_put @46 ++ gds__open @47 ++ gds__open_blob @48 ++ gds__open_blob2 @49 ++ gds__parse_bpb @50 ++ gds__prefix @51 ++ gds__prefix_lock @249 ++ gds__prefix_msg @250 ++ gds__prepare @52 ++ gds__prepare_transaction @53 ++ gds__prepare_transaction2 @54 ++ gds__print_blr @55 ++ gds__print_status @56 ++ gds__put_error @57 ++ gds__put_segment @58 ++ gds__put_slice @59 ++ gds__qtoq @60 ++ gds__que_events @61 ++ gds__receive @62 ++ gds__reconnect_transaction @63 ++ gds__register_cleanup @64 ++ gds__release_request @65 ++ gds__request_info @66 ++ gds__rollback_transaction @67 ++ gds__seek_blob @68 ++ gds__send @69 ++ gds__set_debug @70 ++ gds__sqlcode @71 ++ gds__start_and_send @72 ++ gds__start_multiple @73 ++ gds__start_request @74 ++ gds__start_transaction @75 ++ gds__temp_file @231 ++ gds__thread_enable @76 ++ gds__thread_enter @77 ++ gds__thread_exit @78 ++ gds__thread_start @79 ++ gds__to_sqlda @80 ++ gds__transaction_cleanup @235 ++ gds__transaction_info @81 ++ gds__unregister_cleanup @224 ++ gds__unwind_request @82 ++ gds__validate_lib_path @255 ++ gds__vax_integer @83 ++ gds__version @84 ++ gds__vtof @85 ++ gds__vtov @86 ++ gds__default_printer @87 ++ ++ gds__alloc_debug ++ ++ gds_alloc_flag_unfreed ++ gds_alloc_report ++ ++ fb_shutdown ++ fb_shutdown_callback ++ fb_cancel_operation ++ fb_disconnect_transaction ++ ++ perf_format @100 ++ perf_get_info @101 ++ perf_report @102 ++ ++ perf64_format ++ perf64_get_info ++ perf64_report ++ ++;---------------------------- ++; PUBLIC INTERFACE, i.e. API ++;---------------------------- ++ ++ ; Array functions ++ ++ isc_array_gen_sdl @217 ++ isc_array_get_slice @218 ++ isc_array_lookup_bounds @219 ++ isc_array_lookup_desc @220 ++ isc_array_put_slice @221 ++ isc_array_set_desc @222 ++ isc_get_slice @140 ++ isc_put_slice @153 ++ ++ ; BLOB functions ++ ++ isc_blob_default_desc @239 ++ isc_blob_gen_bpb @236 ++ isc_blob_info @108 ++ isc_blob_lookup_desc @237 ++ isc_blob_set_desc @238 ++ isc_cancel_blob @110 ++ isc_close_blob @113 ++ isc_create_blob @118 ++ isc_create_blob2 @119 ++ isc_get_segment @139 ++ isc_open_blob @144 ++ isc_open_blob2 @145 ++ isc_put_segment @152 ++ ++ ; Database functions ++ ++ isc_attach_database @103 ++ isc_create_database @120 ++ isc_database_info @122 ++ isc_detach_database @128 ++ isc_drop_database @229 ++ isc_expand_dpb @135 ++ isc_modify_dpb @244 ++ isc_version @174 ++ isc_get_client_major_version @268 ++ isc_get_client_minor_version @269 ++ isc_get_client_version @270 ++ ++ ; Conversion functions ++ ++ isc_decode_date @125 ++ isc_decode_sql_date @261 ++ isc_decode_sql_time @262 ++ isc_decode_timestamp @263 ++ isc_encode_date @129 ++ isc_encode_sql_date @264 ++ isc_encode_sql_time @265 ++ isc_encode_timestamp @266 ++ isc_portable_integer @259 ++ isc_vax_integer @173 ++ ++ ; DSQL functions ++ ++ isc_dsql_allocate_statement @178 ++ isc_dsql_alloc_statement2 @179 ++ isc_dsql_describe @180 ++ isc_dsql_describe_bind @181 ++ isc_dsql_execute @182 ++ isc_dsql_execute2 @183 ++ isc_dsql_execute_m @184 ++ isc_dsql_execute2_m @185 ++ isc_dsql_execute_immediate @186 ++ isc_dsql_exec_immed2 @187 ++ isc_dsql_execute_immediate_m @188 ++ isc_dsql_exec_immed2_m @189 ++ isc_dsql_exec_immed3_m @230 ++ isc_dsql_fetch @190 ++ isc_dsql_fetch_a @191 ++ isc_dsql_fetch_m @192 ++ isc_dsql_finish @193 ++ isc_dsql_free_statement @194 ++ isc_dsql_insert @195 ++ isc_dsql_insert_m @196 ++ isc_dsql_prepare @197 ++ isc_dsql_prepare_m @198 ++ isc_dsql_release @199 ++ isc_dsql_set_cursor_name @200 ++ isc_dsql_sql_info @201 ++ ++ ; ESQL functions ++ ++ isc_embed_dsql_close @202 ++ isc_embed_dsql_declare @203 ++ isc_embed_dsql_describe @204 ++ isc_embed_dsql_describe_bind @205 ++ isc_embed_dsql_execute @206 ++ isc_embed_dsql_execute2 @207 ++ isc_embed_dsql_execute_immed @208 ++ isc_embed_dsql_exec_immed2 @209 ++ isc_embed_dsql_fetch @210 ++ isc_embed_dsql_fetch_a @211 ++ isc_embed_dsql_insert @212 ++ isc_embed_dsql_open @213 ++ isc_embed_dsql_open2 @214 ++ isc_embed_dsql_prepare @215 ++ isc_embed_dsql_release @216 ++ isc_embed_dsql_length @273 ++ ++ ; Error-handling functions ++ ++ isc_interprete @141 ++ fb_interpret ++ isc_print_sqlerror @150 ++ isc_print_status @151 ++ isc_sqlcode @165 ++ isc_sql_interprete @164 ++ isc_sqlcode_s @278 ++ fb_sqlstate @279 ++ ++ ; Event functions ++ ++ isc_cancel_events @111 ++ isc_event_block @130 ++ isc_event_counts @131 ++ isc_que_events @155 ++ isc_wait_for_event @177 ++ isc_event_block_a @274 ++ isc_event_block_s @275 ++ ++ ; Security functions ++ ++ isc_add_user @256 ++ isc_delete_user @257 ++ isc_modify_user @258 ++ ++ ; Services functions ++ ++ isc_service_attach @225 ++ isc_service_detach @226 ++ isc_service_query @227 ++ isc_service_start @228 ++ ++ ; Transaction control functions ++ ++ isc_commit_retaining @114 ++ isc_commit_transaction @115 ++ isc_prepare_transaction @147 ++ isc_prepare_transaction2 @148 ++ isc_rollback_retaining @260 ++ isc_rollback_transaction @160 ++ isc_start_multiple @167 ++ isc_start_transaction @169 ++ isc_transaction_info @171 ++ ++ ; Other functions ++ ++ isc_compile_request @116 ++ isc_compile_request2 @117 ++ isc_ddl @123 ++ isc_prepare @146 ++ isc_receive @156 ++ isc_reconnect_transaction @157 ++ isc_release_request @158 ++ isc_request_info @159 ++ isc_seek_blob @161 ++ isc_send @162 ++ isc_start_and_send @166 ++ isc_start_request @168 ++ isc_transact_request @132 ++ isc_unwind_request @172 ++ ++ ; Other SQL functions ++ ++ isc_close @112 ++ isc_declare @124 ++ isc_describe @126 ++ isc_describe_bind @127 ++ isc_execute @133 ++ isc_execute_immediate @134 ++ isc_fetch @136 ++ isc_fetch_a @137 ++ isc_open @143 ++ ++ ; Other BLOB functions ++ ++ BLOB_close @91 ++ BLOB_display @92 ++ BLOB_dump @93 ++ BLOB_edit @94 ++ BLOB_get @95 ++ BLOB_load @96 ++ BLOB_open @97 ++ BLOB_put @98 ++ BLOB_text_dump @242 ++ BLOB_text_load @243 ++ Bopen @99 ++ ++ ; Other misc functions ++ ++ isc_ftof @138 ++ isc_free @241 ++ isc_print_blr @149 ++ fb_print_blr @280 ++ isc_qtoq @154 ++ isc_reset_fpe ++ isc_set_debug @163 ++ isc_to_sqlda @170 ++ isc_vtof @175 ++ isc_vtov @176 ++ isc_baddress @276 ++ isc_baddress_s @277 ++ ++ _isc_start_transaction=isc_start_transaction ++ _isc_expand_dpb=isc_expand_dpb ++ _isc_event_block=isc_event_block ++ ++ fb_ping ++ fb_get_master_interface ++ fb_get_database_handle ++ fb_get_transaction_handle ++ fb_database_crypt_callback ++ ++ gds__trace ++ gds__trace_raw ++ gds__trace_printer ++ gds__parse_bpb2 ++ ++;----------------- ++; OTHER FUNCTIONS ++;----------------- ++ ++ CVT_move @267 ++ ++ KEYWORD_stringIsAToken @271 ++ KEYWORD_getTokens @272 +-- +2.4.3 + +From 42461b606d8ea8409f91f785a973125645feb86d Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Mon, 24 Nov 2014 11:12:17 +0300 +Subject: [PATCH] Windows have another sources for FBGUARD. + +--- + builds/posix/make.shared.variables | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/builds/posix/make.shared.variables b/builds/posix/make.shared.variables +index 53597e6..ef25f37 100644 +--- a/builds/posix/make.shared.variables ++++ b/builds/posix/make.shared.variables +@@ -122,7 +122,11 @@ AllObjects += $(LOCKPRINT_Objects) + + + # Guardian ++ifeq ($(PLATFORM),win32) ++FBGUARD_Objects:= $(call dirObjects,iscguard) $(call makeObjects,remote/server/os/win32,chop.cpp) ++else + FBGUARD_Objects:= $(call dirObjects,utilities/guard) ++endif + + AllObjects += $(FBGUARD_Objects) + +-- +2.4.3 + +From aa46551df08a769daffd9a2d1acfe394aa214ab6 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 27 Nov 2014 15:57:53 +0300 +Subject: [PATCH] Do not install posix scripts for win32 platform. + +--- + configure.ac | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 651ca3e..72f43d6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1195,6 +1195,7 @@ if test "x$CROSS" != "x"; then + AC_CONFIG_FILES([gen/make.crossPlatform:builds/posix/make.$CROSS]) + fi + ++if test "$PLATFORM" != "win32"; then + AC_CONFIG_FILES([ + gen/Release/firebird/bin/fb_config:builds/install/posix-common/fb_config.in + gen/Release/firebird/bin/posixLibrary.sh:builds/install/posix-common/posixLibrary.sh.in +@@ -1208,8 +1209,9 @@ gen/Release/firebird/bin/taruninstall.sh:builds/install/posix-common/taruninstal + gen/Release/firebird/bin/tarMainUninstall.sh:builds/install/posix-common/tarMainUninstall.sh.in + gen/Release/firebird/bin/changeServerMode.sh:builds/install/posix-common/changeServerMode.sh.in + gen/Release/firebird/bin/registerDatabase.sh:builds/install/posix-common/registerDatabase.sh.in +-gen/vers.sh:builds/posix/vers.sh.in + ]) ++fi ++AC_CONFIG_FILES(gen/vers.sh:builds/posix/vers.sh.in) + + dnl: Platform Specific Files + +@@ -1304,6 +1306,11 @@ case "$PLATFORM" in + + DARWIN) + ;; ++ win32) ++ AC_CONFIG_FILES(gen/install/install_classic.bat:builds/install/arch-specific/win32/install_classic.bat ++ gen/install/install_super.bat:builds/install/arch-specific/win32/install_super.bat ++ gen/install/uninstall.bat:builds/install/arch-specific/win32/uninstall.bat) ++ ;; + esac + if test -f ${MAKE_SRC_DIR}/postfix.${MAKEFILE_POSTFIX};then + POSTFIX_FILE=gen/make.platform.postfix:${MAKE_SRC_DIR}/postfix.${MAKEFILE_POSTFIX} +-- +2.4.3 + +From 2939db0d6f51e983620e0f7b2b41fd37adcc5764 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 27 Nov 2014 17:04:52 +0300 +Subject: [PATCH] Use variables everywhere. + +--- + builds/posix/Makefile.in.examples | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/builds/posix/Makefile.in.examples b/builds/posix/Makefile.in.examples +index ec5c19c..49f6c9f 100644 +--- a/builds/posix/Makefile.in.examples ++++ b/builds/posix/Makefile.in.examples +@@ -123,7 +123,7 @@ $(EXAMPLES_DEST)% : $(EXAMPLES_SRC)% + + $(EMPLOYEE_DB): $(EXAMPLES_DEST)/empbuild$(EXEC_EXT) $(INPUT_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT) + -$(RM) $(EMPLOYEE_DB) +- ./empbuild $(EMPLOYEE_DB) ++ $(EXAMPLES_DEST)/empbuild$(EXEC_EXT) $(EMPLOYEE_DB) + $(GFIX) -write sync $(EMPLOYEE_DB) + -$(CHMOD_6) $(EMPLOYEE_DB) + +@@ -147,9 +147,9 @@ $(EXAMPLES_DEST)/empbuild.fdb : $(EXAMPLES_DEST)/empddl.sql $(EXAMPLES_DEST)/emp + # the intlemp.fdb database. + + $(EXAMPLES_DEST)/intlemp.fdb: $(EXAMPLES_DEST)/intlbld$(EXEC_EXT) $(INTL_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT) +- -$(RM) intlemp.fdb +- ./intlbld intlemp.fdb +- -$(CHMOD_6) intlemp.fdb ++ -$(RM) $(EXAMPLES_DEST)/intlemp.fdb ++ $(EXAMPLES_DEST)/intlbld$(EXEC_EXT) intlemp.fdb ++ -$(CHMOD_6) $(EXAMPLES_DEST)/intlemp.fdb + + $(EXAMPLES_DEST)/intlbld$(EXEC_EXT): $(INTLBLD_Objects) $(COMMON_LIB) + $(EXE_LINK) $(EXE_LINK_OPTIONS) @^ -o $@ -L$(LIB) $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) +@@ -157,8 +157,8 @@ $(EXAMPLES_DEST)/intlbld$(EXEC_EXT): $(INTLBLD_Objects) $(COMMON_LIB) + $(EXAMPLES_DEST)/intlbld.c: $(EXAMPLES_DEST)/intlbuild.fdb $(EXAMPLES_DEST)/intlbld.e + + $(EXAMPLES_DEST)/intlbuild.fdb : $(EXAMPLES_DEST)/intlddl.sql $(EXAMPLES_DEST)/intlbld.sql $(EXAMPLES_DEST)/isql$(EXEC_EXT) +- -$(RM) intlbuild.fdb +- $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i intlbld.sql ++ -$(RM) $(EXAMPLES_DEST)/intlbuild.fdb ++ $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i $(EXAMPLES_DEST)/intlbld.sql + + + $(EXAMPLES_DEST)/%.sql: $(EXAMPLES_SRC)/empbuild/%.sql +-- +2.4.3 + +From 94c47c8fcd14d1ebdc600fbb130d551b5d1fc295 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 28 Nov 2014 12:28:31 +0300 +Subject: [PATCH] Build windows specific utilities for mingw. + +--- + builds/posix/Makefile.in | 26 ++++++++++++++++++++++++++ + builds/posix/make.defaults | 1 + + builds/posix/make.shared.variables | 9 +++++++++ + builds/posix/prefix.mingw | 3 ++- + 4 files changed, 38 insertions(+), 1 deletion(-) + +diff --git a/builds/posix/Makefile.in b/builds/posix/Makefile.in +index 85d4697..79659d2 100644 +--- a/builds/posix/Makefile.in ++++ b/builds/posix/Makefile.in +@@ -168,6 +168,9 @@ endif + $(MAKE) plugins + $(MAKE) examples + $(MAKE) rest ++ifeq ($(PLATFORM), win32) ++ $(MAKE) helpers ++endif + + + cross_process: +@@ -434,6 +437,29 @@ $(NBACKUP): $(NBACKUP_Objects) $(COMMON_LIB) + + + #___________________________________________________________________________ ++# install helpers - utilities for Windows to install/uninstall services and etc ++# ++ ++.PHONY: instclient instreg instsvc ++ ++helpers: instclient instreg instsvc ++ ++instclient: $(INSTCLI) ++ ++$(INSTCLI): $(INSTCLIENT_Objects) ++ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(LINK_LIBS) ++ ++instreg: $(INSTREG) ++ ++$(INSTREG): $(INSTREG_Objects) ++ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(LINK_LIBS) ++ ++instsvc: $(INSTSVC) ++ ++$(INSTSVC): $(INSTSVC_Objects) $(YValve_Objects) $(Common_Objects) $(Remote_Client_Objects) ++ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(LINK_LIBS) $(MATHLIB) ++ ++#___________________________________________________________________________ + # plugins - some of them are required to build examples, use separate entry for them + # + +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index bc18fc8..65cd4f9 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -356,6 +356,7 @@ GDS_INSTALL = $(BIN)/gds_install_service$(EXEC_EXT) + FBGUARD = $(BIN)/fbguard$(EXEC_EXT) + IBGUARD = $(BIN)/ibguard$(EXEC_EXT) + FBMGR_BIN = $(BIN)/fbmgr.bin$(EXEC_EXT) ++INSTCLI = $(BIN)/instclient$(EXEC_EXT) + INSTREG = $(BIN)/instreg$(EXEC_EXT) + INSTSVC = $(BIN)/instsvc$(EXEC_EXT) + +diff --git a/builds/posix/make.shared.variables b/builds/posix/make.shared.variables +index ef25f37..18903b9 100644 +--- a/builds/posix/make.shared.variables ++++ b/builds/posix/make.shared.variables +@@ -219,3 +219,12 @@ AllObjects += $(CODES_Objects) + BUILD_Objects:= $(call makeObjects,msgs,build_file.epp) + + AllObjects += $(BUILD_Objects) ++ ++# Install helpers ++ifeq ($(PLATFORM),win32) ++INSTCLIENT_Objects:= $(call makeObjects,utilities/install,install.cpp install_client.cpp) ++INSTREG_Objects:= $(call makeObjects,utilities/install,install_reg.cpp registry.cpp) ++INSTSVC_Objects:= $(call makeObjects,utilities/install,install_svc.cpp services.cpp) ++ ++AllObjects += $(INSTCLIENT_Objects) $(INSTREG_Objects) $(INSTSVC_Objects) ++endif +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index 8dad1ce..7fd569a 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -39,7 +39,8 @@ LIB_GUI:= -mwindows -lcomctl32 -lgdi32 + # Add resources to some files + FilesToAddVersionInfo=$(FBTRACEMGR) $(LIBFIREBIRD_FULLNAME) $(ENGINE_SONAME) $(LIBFBINTL_SO) \ + $(FBSVCMGR) $(FBTRACEMGR) $(FBTRACE) $(FBUDF_SO) $(LIBIBUTIL_SO) \ +- $(GBAK) $(GFIX) $(GPRE) $(GSEC) $(GSPLIT) $(GSTAT) $(QLI) $(ISQL) $(NBACKUP) ++ $(GBAK) $(GFIX) $(GPRE) $(GSEC) $(GSPLIT) $(GSTAT) $(QLI) $(ISQL) $(NBACKUP) \ ++ $(INSTCLI) $(INSTREG) $(INSTSVC) + # TODO: guardians also must be here + FilesToAddDialog=$(FB_DAEMON) + FilesToAddDialog2=$(FBGUARD) +-- +2.4.3 + +From 7a92d1dcf2626da10784eb50f370a3e4d99a1dcf Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 28 Nov 2014 12:28:31 +0300 +Subject: [PATCH] Fix using mutex. + +--- + src/extlib/fbudf/fbudf.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/extlib/fbudf/fbudf.cpp b/src/extlib/fbudf/fbudf.cpp +index d3a5a96..2855fe9 100644 +--- a/src/extlib/fbudf/fbudf.cpp ++++ b/src/extlib/fbudf/fbudf.cpp +@@ -581,7 +581,7 @@ FBUDF_API void getExactTimestamp(ISC_TIMESTAMP* rc) + #if defined(HAVE_LOCALTIME_R) + tm* times = localtime_r(&seconds, &timex); + #else +- timeMutex.enter(); ++ timeMutex.enter(FB_FUNCTION); + tm* times = localtime(&seconds); + if (times) + { +@@ -628,7 +628,7 @@ FBUDF_API void getExactTimestampUTC(ISC_TIMESTAMP* rc) + #if defined(HAVE_GMTIME_R) + tm* times = gmtime_r(&seconds, &timex); + #else +- timeMutex.enter(); ++ timeMutex.enter(FB_FUNCTION); + tm* times = gmtime(&seconds); + if (times) + { +-- +2.4.3 + +From 1c21afa3c185b2e7fee937e0d66e225797e40510 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 16 Jun 2015 10:34:21 +0300 +Subject: [PATCH] mod_loader: mingw always link to msvcrt.dll + +--- + src/common/os/win32/mod_loader.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/common/os/win32/mod_loader.cpp b/src/common/os/win32/mod_loader.cpp +index a79313f..2008d7a 100644 +--- a/src/common/os/win32/mod_loader.cpp ++++ b/src/common/os/win32/mod_loader.cpp +@@ -76,7 +76,7 @@ public: + // if we don't use MSVC then we don't use MS CRT ? + // NS: versions of MSVC before 2005 and, as preliminary reports suggest, + // after 2008 do not need this hack +-#if !defined(_MSC_VER) || (_MSC_VER < 1400) ++#if (!defined(_MSC_VER) || (_MSC_VER < 1400)) && !defined(__MINGW32__) + return; + #else + +@@ -91,7 +91,9 @@ public: + if ((*mFindActCtxSectionString) + (0, NULL, + ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, +-#if _MSC_VER == 1400 ++#if defined(__MINGW32__) ++ "msvcrt.dll", ++#elif _MSC_VER == 1400 + "msvcr80.dll", + #elif _MSC_VER == 1500 + "msvcr90.dll", +-- +2.4.3 + +From 9e1d9ea0e8fe4fe4033e8073b46876962b9ac973 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 16 Jun 2015 13:35:36 +0300 +Subject: [PATCH] Relocate paths for unix-like files layout. + +--- + src/common/os/win32/path_utils.cpp | 10 +- + src/common/pathtools.cpp | 538 +++++++++++++++++++++++++++++ + src/common/pathtools.h | 53 +++ + src/common/utils.cpp | 21 +- + src/yvalve/config/os/win32/config_root.cpp | 3 +- + src/yvalve/gds.cpp | 7 +- + 6 files changed, 623 insertions(+), 9 deletions(-) + create mode 100644 src/common/pathtools.cpp + create mode 100644 src/common/pathtools.h + +diff --git a/src/common/os/win32/path_utils.cpp b/src/common/os/win32/path_utils.cpp +index ad592ac..5ac2431 100644 +--- a/src/common/os/win32/path_utils.cpp ++++ b/src/common/os/win32/path_utils.cpp +@@ -6,7 +6,13 @@ + + /// The Win32 implementation of the path_utils abstraction. + ++#if defined(__MINGW32__) ++const char PathUtils::dir_sep = '/'; ++const char alt_sep_dir = '\\'; ++#else + const char PathUtils::dir_sep = '\\'; ++const char alt_sep_dir = '/'; ++#endif + const char* PathUtils::up_dir_link = ".."; + const char PathUtils::dir_list_sep = ';'; + +@@ -155,7 +161,7 @@ bool PathUtils::isRelative(const Firebird::PathName& path) + if (path.length() > 0) + { + const char ds = hasDriveLetter(path) ? path[2] : path[0]; +- return ds != PathUtils::dir_sep && ds != '/'; ++ return ds != PathUtils::dir_sep && ds != alt_sep_dir; + } + return true; + } +@@ -168,7 +174,7 @@ void PathUtils::splitPrefix(Firebird::PathName& path, Firebird::PathName& prefix + prefix = path.substr(0, 2); + path.erase(0, 2); + } +- if (path.hasData() && (path[0] == PathUtils::dir_sep || path[0] == '/')) ++ if (path.hasData() && (path[0] == PathUtils::dir_sep || path[0] == alt_sep_dir)) + { + prefix += path[0]; + path.erase(0, 1); +diff --git a/src/common/pathtools.cpp b/src/common/pathtools.cpp +new file mode 100644 +index 0000000..9291ffd +--- /dev/null ++++ b/src/common/pathtools.cpp +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff --git a/src/common/pathtools.h b/src/common/pathtools.h +new file mode 100644 +index 0000000..139b7c2 +--- /dev/null ++++ b/src/common/pathtools.h +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ +diff --git a/src/common/utils.cpp b/src/common/utils.cpp +index df73d9c..473629a 100644 +--- a/src/common/utils.cpp ++++ b/src/common/utils.cpp +@@ -51,6 +51,7 @@ + #include "../common/os/fbsyslog.h" + #include "../common/StatusArg.h" + #include "../common/os/os_utils.h" ++#include "../common/pathtools.h" + #include "../dsql/sqlda_pub.h" + + #ifdef WIN_NT +@@ -1008,9 +1009,23 @@ Firebird::PathName getPrefix(unsigned int prefType, const char* name) + char tmp[MAXPATHLEN]; + + const char* configDir[] = { +- FB_BINDIR, FB_SBINDIR, FB_CONFDIR, FB_LIBDIR, FB_INCDIR, FB_DOCDIR, FB_UDFDIR, FB_SAMPLEDIR, +- FB_SAMPLEDBDIR, FB_HELPDIR, FB_INTLDIR, FB_MISCDIR, FB_SECDBDIR, FB_MSGDIR, FB_LOGDIR, +- FB_GUARDDIR, FB_PLUGDIR ++ single_path_relocation(FB_BINDIR,FB_BINDIR), ++ single_path_relocation(FB_BINDIR,FB_SBINDIR), ++ single_path_relocation(FB_BINDIR,FB_CONFDIR), ++ single_path_relocation(FB_BINDIR,FB_LIBDIR), ++ single_path_relocation(FB_BINDIR,FB_INCDIR), ++ single_path_relocation(FB_BINDIR,FB_DOCDIR), ++ single_path_relocation(FB_BINDIR,FB_UDFDIR), ++ single_path_relocation(FB_BINDIR,FB_SAMPLEDIR), ++ single_path_relocation(FB_BINDIR,FB_SAMPLEDBDIR), ++ single_path_relocation(FB_BINDIR,FB_HELPDIR), ++ single_path_relocation(FB_BINDIR,FB_INTLDIR), ++ single_path_relocation(FB_BINDIR,FB_MISCDIR), ++ single_path_relocation(FB_BINDIR,FB_SECDBDIR), ++ single_path_relocation(FB_BINDIR,FB_MSGDIR), ++ single_path_relocation(FB_BINDIR,FB_LOGDIR), ++ single_path_relocation(FB_BINDIR,FB_GUARDDIR), ++ single_path_relocation(FB_BINDIR,FB_PLUGDIR) + }; + + fb_assert(FB_NELEM(configDir) == Firebird::IConfigManager::DIR_COUNT); +diff --git a/src/yvalve/config/os/win32/config_root.cpp b/src/yvalve/config/os/win32/config_root.cpp +index d4641c7..e3ae8d9 100644 +--- a/src/yvalve/config/os/win32/config_root.cpp ++++ b/src/yvalve/config/os/win32/config_root.cpp +@@ -28,6 +28,7 @@ + #include "fb_types.h" + #include "../../../../common/classes/fb_string.h" + #include "../../../../common/dllinst.h" ++#include "../../../../common/pathtools.h" + #include "../../../../yvalve/config/os/config_root.h" + + using Firebird::PathName; +@@ -107,7 +108,7 @@ void ConfigRoot::osConfigInstallDir() + if (install_dir.isEmpty()) + { + // As a last resort get it from the default install directory +- install_dir = FB_PREFIX; ++ install_dir = single_path_relocation(FB_BINDIR,FB_PREFIX); + } + + PathUtils::ensureSeparator(install_dir); +diff --git a/src/yvalve/gds.cpp b/src/yvalve/gds.cpp +index 5cc5dcb..c7681d2 100644 +--- a/src/yvalve/gds.cpp ++++ b/src/yvalve/gds.cpp +@@ -57,6 +57,7 @@ + #include "../common/classes/init.h" + #include "../common/classes/TempFile.h" + #include "../common/utils_proto.h" ++#include "../common/pathtools.h" + + #ifdef HAVE_UNISTD_H + #include +@@ -3739,13 +3740,13 @@ public: + { + prefix = Config::getRootDirectory(); + if (prefix.isEmpty() && !GetProgramFilesDir(prefix)) +- prefix = FB_CONFDIR[0] ? FB_CONFDIR : FB_PREFIX; ++ prefix = FB_CONFDIR[0] ? single_path_relocation(FB_BINDIR,FB_CONFDIR) : single_path_relocation(FB_BINDIR,FB_PREFIX); + } + catch (const Firebird::Exception&) + { + // CVC: Presumably here we failed because the config file can't be located. + if (!GetProgramFilesDir(prefix)) +- prefix = FB_CONFDIR[0] ? FB_CONFDIR : FB_PREFIX; ++ prefix = FB_CONFDIR[0] ? single_path_relocation(FB_BINDIR,FB_CONFDIR) : single_path_relocation(FB_BINDIR,FB_PREFIX); + } + prefix.copyTo(fb_prefix_val, sizeof(fb_prefix_val)); + fb_prefix = fb_prefix_val; +@@ -3828,7 +3829,7 @@ public: + Firebird::PathName msgPrefix; + if (!fb_utils::readenv(FB_MSG_ENV, msgPrefix)) + { +- msgPrefix = FB_MSGDIR[0] ? FB_MSGDIR : prefix; ++ msgPrefix = FB_MSGDIR[0] ? single_path_relocation(FB_BINDIR,FB_MSGDIR) : prefix; + } + msgPrefix.copyTo(fb_prefix_msg_val, sizeof(fb_prefix_msg_val)); + fb_prefix_msg = fb_prefix_msg_val; +-- +2.4.3 + +From b3c77d3f7c0cb477e540a310692a257c5fd5d3f1 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 16 Jun 2015 13:36:14 +0300 +Subject: [PATCH] Fix linking Engine dll for mingw. + +--- + builds/posix/make.shared.variables | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/builds/posix/make.shared.variables b/builds/posix/make.shared.variables +index 18903b9..cc00a80 100644 +--- a/builds/posix/make.shared.variables ++++ b/builds/posix/make.shared.variables +@@ -67,6 +67,7 @@ AllObjects += $(Remote_Common) $(Remote_Server) $(Remote_Client) + Engine_Objects:= $(call dirObjects,jrd) $(call dirObjects,dsql) $(call dirObjects,jrd/extds) \ + $(call dirObjects,jrd/recsrc) $(call dirObjects,jrd/trace) \ + $(call makeObjects,lock,lock.cpp) ++Engine_Objects:= $(filter-out $(call makeObjects,jrd/$(PLATFORM_PATH),ibinitdll.cpp), $(Engine_Objects)) + + AllObjects += $(Engine_Objects) + +-- +2.4.3 + +From e09c3e5489366841c76627a8dc72cb3a55c02c0a Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 16 Jun 2015 14:07:13 +0300 +Subject: [PATCH] cmake: Mingw use external ICU. Customize files layout. + +--- + CMakeLists.txt | 10 ++++++---- + src/CMakeLists.txt | 2 +- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e8cb276..2f8b4fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -98,7 +98,7 @@ if (XCODE) + string(TOUPPER ${conf} conf2) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${conf2} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${conf}/bin) + endforeach() +-elseif (UNIX) ++elseif (UNIX OR MINGW) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${output_dir}/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${output_dir}/bin) + endif() +@@ -113,7 +113,7 @@ endif() + # icu + ######################################## + +-if (UNIX) ++if (UNIX OR MINGW) + if (NOT ICU_INCLUDE_DIR) + find_path(ICU_INCLUDE_DIR unicode/ucnv.h + PATHS +@@ -159,7 +159,9 @@ set(FB_SERVICE_NAME "gds_db") + set(FB_SERVICE_PORT 3050) + + if (WIN32) ++ if (NOT MINGW) + set(FB_PREFIX "c:\\\\Program Files\\\\Firebird\\\\") ++ endif() + set(FB_IPC_NAME "FIREBIRD") + endif() + +@@ -192,7 +194,7 @@ if (WIN32) + endif() + endif(MSVC) + +- set(LIB_Ws2_32 Ws2_32) ++ set(LIB_Ws2_32 ws2_32) + set(LIB_comctl32 comctl32) + set(LIB_mpr mpr) + set(LIB_version version) +@@ -249,7 +251,7 @@ endif() + # + ################################################################################ + +-if (WIN32) ++if (MSVC) + # icu + if (NOT ICU_EXTRACT) + message(STATUS "Extracting pre-built ICU") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9ca8421..414ea01 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -852,7 +852,7 @@ project_group (boot_isql Boot) + + endif() # if (NOT CMAKE_CROSSCOMPILING) + +-if (WIN32) ++if (MSVC) + add_custom_command( + TARGET boot_isql + POST_BUILD +-- +2.4.3 + diff --git a/mingw-w64-firebird2-git/PKGBUILD b/mingw-w64-firebird2-git/PKGBUILD new file mode 100644 index 0000000000..325860eeef --- /dev/null +++ b/mingw-w64-firebird2-git/PKGBUILD @@ -0,0 +1,113 @@ +# Maintainer: Alexey Pavlov + +_realname='firebird' +pkgbase=mingw-w64-${_realname}2-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}2-git" +pkgver=2.5.6.26956.c3587aa +pkgrel=1 +pkgdesc="Cross-platform relational database offering many ANSI SQL standard features - version 2.x (mingw-w64)" +url="http://www.firebirdsql.org/" +license=('custom') +arch=('any') +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}2" "${MINGW_PACKAGE_PREFIX}-libfbclient") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}2" "${MINGW_PACKAGE_PREFIX}-libfbclient") +replaces=("${MINGW_PACKAGE_PREFIX}-libfbclient") +depends=( + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-zlib" + ) +makedepends=(#"${MINGW_PACKAGE_PREFIX}-btyacc" # Maybe add check in firebird presence of system btyacc + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libatomic_ops" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git" + ) +options=('!debug' 'strip') +source=("${_realname}"::"git+https://github.com/Alexpux/firebird-git-svn.git#branch=B2_5" + mingw-w64-2_5.patch) +sha256sums=('SKIP' + 'dc930c9a5eb1dbf0dc797a0812a5292e081d7a6f7163c6fe88143ad5eba09958') + + +pkgver() { + cd "${_realname}" + source ${srcdir}/${_realname}/src/misc/writeBuildNum.sh + printf '%s.%s.%s.%s.%s' ${MajorVer} ${MinorVer} ${RevNo} ${BuildNum} "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${_realname} + git am ${srcdir}/mingw-w64-2_5.patch + + NOCONFIGURE=1 ./autogen.sh +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + + cp -rf ${_realname} build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + local _debug_conf= + if check_option "debug" "y"; then + _debug_conf="--enable-debug" + fi + + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared \ + ${_debug_conf} \ + --disable-rpath \ + --with-system-icu \ + --with-fbbin=${MINGW_PREFIX}/bin \ + --with-fbsbin=${MINGW_PREFIX}/bin \ + --with-fbconf=${MINGW_PREFIX}/etc/${_realname} \ + --with-fblib=${MINGW_PREFIX}/lib \ + --with-fbinclude=${MINGW_PREFIX}/include \ + --with-fbdoc=${MINGW_PREFIX}/share/${_realname}/doc \ + --with-fbudf=${MINGW_PREFIX}/share/${_realname}/udf \ + --with-fbsample=${MINGW_PREFIX}/share/${_realname}/samples \ + --with-fbsample-db=${MINGW_PREFIX}/share/${_realname}/samples/empbuild \ + --with-fbhelp=${MINGW_PREFIX}/share/${_realname}/help \ + --with-fbintl=${MINGW_PREFIX}/share/${_realname}/intl \ + --with-fbmisc=${MINGW_PREFIX}/share/${_realname}/misc \ + --with-fbsecure-db=${MINGW_PREFIX}/etc/${_realname} \ + --with-fbmsg=${MINGW_PREFIX}/etc/${_realname} \ + --with-fblog=${MINGW_PREFIX}/var \ + --with-fbglock=${MINGW_PREFIX}/var \ + --with-fbplugins=${MINGW_PREFIX}/share/${_realname} + + CC=${MINGW_PREFIX}/bin/gcc \ + make -j1 +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,etc/${_realname},include,lib,share/${_realname}/{doc,help,intl,misc,plugins,samples,udf},var} + cp -f gen/firebird/bin/* ${pkgdir}${MINGW_PREFIX}/bin/ + cp -f gen/firebird/lib/* ${pkgdir}${MINGW_PREFIX}/lib/ + cp -f gen/firebird/include/* ${pkgdir}${MINGW_PREFIX}/include/ + cp -f gen/firebird/UDF/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/udf/ + cp -rf gen/firebird/examples/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/samples/ + cp -f gen/firebird/help/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/help/ + cp -f gen/firebird/intl/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/intl/ + cp -f gen/firebird/plugins/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/plugins/ + #cp -f gen/firebird/misc/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/misc/ + + cp -f gen/firebird/*.bat ${pkgdir}${MINGW_PREFIX}/bin/ + cp -f gen/firebird/*.conf ${pkgdir}${MINGW_PREFIX}/etc/${_realname}/ + cp -f gen/firebird/*.msg ${pkgdir}${MINGW_PREFIX}/etc/${_realname}/ + cp -f gen/firebird/*.fdb ${pkgdir}${MINGW_PREFIX}/etc/${_realname}/ + + cp -rf doc/* ${pkgdir}${MINGW_PREFIX}/share/${_realname}/doc/ + + touch ${pkgdir}${MINGW_PREFIX}/var/${_realname}.log + + # Remove build tools + rm -f ${pkgdir}${MINGW_PREFIX}/bin/{brltable,codes,create_db,*build*,*boot*,*static*,*current*}.exe +} diff --git a/mingw-w64-firebird2-git/mingw-w64-2_5.patch b/mingw-w64-firebird2-git/mingw-w64-2_5.patch new file mode 100644 index 0000000000..884fccbe2b --- /dev/null +++ b/mingw-w64-firebird2-git/mingw-w64-2_5.patch @@ -0,0 +1,3014 @@ +From f241a31647a6c9830d1c2fdb1b1cc9f399e8dc27 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 07:39:37 +0300 +Subject: [PATCH] Remove hardcoded march to allow 64-bit builds. + +--- + builds/posix/prefix.mingw | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index fd36abe..04e0978 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -20,8 +20,8 @@ + # + + # -Wno-unused-variable is used due to unused gpre generated variables +-PROD_FLAGS=-O2 -march=i586 -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads +-DEV_FLAGS=-ggdb -march=i586 -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads ++PROD_FLAGS=-O2 -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads ++DEV_FLAGS=-ggdb -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads + + PLATFORM_PATH=os/win32 + +-- +2.6.3 + +From 9edc5599f7c6d630e65540392bf34311bbad7c99 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 06:18:02 +0300 +Subject: [PATCH] Always use Win32 threads for mingw. + +--- + src/jrd/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/jrd/common.h b/src/jrd/common.h +index ae54880..49e8b60 100644 +--- a/src/jrd/common.h ++++ b/src/jrd/common.h +@@ -65,7 +65,7 @@ + #include + #endif + +-#if defined(_POSIX_THREADS) && _POSIX_THREADS >= 200112L ++#if defined(_POSIX_THREADS) && _POSIX_THREADS >= 200112L && !defined(WIN_NT) + // above check is generally true. However, we use pthreads on some platforms + // where _POSIX_THREADS is defined to "1" or not even defined at all! + #define USE_POSIX_THREADS +-- +2.6.3 + +From 0676da5e7a3e9bbd5ff46214d36d3c763a06ab7f Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 08:56:28 +0300 +Subject: [PATCH] Define AMD64 for 64-bit mingw. + +--- + configure.in | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index fe2cc11..21384bf 100644 +--- a/configure.in ++++ b/configure.in +@@ -464,7 +464,12 @@ dnl CPU_TYPE=ppc64 + EDITLINE_FLG=N + RAW_DEVICES_FLG=N + SHRLIB_EXT=dll +- ICU_PLATFORM=MinGW ++ ICU_PLATFORM=MinGW ++ case "$target" in ++ x86_64-*-mingw*) ++ AC_DEFINE(AMD64, 1, [Define this if CPU is amd64]) ++ ;; ++ esac + ;; + + *) +-- +2.6.3 + +From bdf4ce45440b424a6e4e5526e241003b143a37a8 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 09:20:35 +0300 +Subject: [PATCH] mingw-w64 have isinf + +--- + src/common/classes/FpeControl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/classes/FpeControl.h b/src/common/classes/FpeControl.h +index e0e36ac..363cad5 100644 +--- a/src/common/classes/FpeControl.h ++++ b/src/common/classes/FpeControl.h +@@ -217,7 +217,7 @@ private: + + + // getting a portable isinf() is harder than you would expect +-#ifdef WIN_NT ++#if defined(WIN_NT) && !defined(__MINGW32__) + inline bool isinf(double x) + { + return (!_finite (x) && !isnan(x)); +-- +2.6.3 + +From dbc6299ebbadce2d530bad00d7fbf87a5e0c641f Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 09:57:27 +0300 +Subject: [PATCH] Fix cast error. + +--- + src/remote/inet.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp +index a92a5f6..b37cb9a 100644 +--- a/src/remote/inet.cpp ++++ b/src/remote/inet.cpp +@@ -1874,7 +1874,7 @@ static void wsaExitHandler(void*) + } + + +-static int fork(SOCKET old_handle, USHORT flag) ++static int fork(SOCKET old_handle, DWORD flag) + { + /************************************** + * +@@ -1931,7 +1931,7 @@ static int fork(SOCKET old_handle, USHORT flag) + + THREAD_ENTRY_DECLARE forkThread(THREAD_ENTRY_PARAM arg) + { +- const USHORT flag = (USHORT) arg; ++ const DWORD flag = (uintptr_t) arg; + + while (!INET_shutting_down) + { +-- +2.6.3 + +From 5ff56868027ac3d2a6ddfbeefff8520a021e3ca3 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 10:08:42 +0300 +Subject: [PATCH] mingw-w64 don't need hack for SecPkgContext_AccessToken + +--- + src/auth/trusted/AuthSspi.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/auth/trusted/AuthSspi.cpp b/src/auth/trusted/AuthSspi.cpp +index d420041..15b859c 100644 +--- a/src/auth/trusted/AuthSspi.cpp ++++ b/src/auth/trusted/AuthSspi.cpp +@@ -87,7 +87,7 @@ AuthSspi::~AuthSspi() + + bool AuthSspi::checkAdminPrivilege(PCtxtHandle phContext) const + { +-#if defined (__GNUC__) ++#if defined (__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + // ASF: MinGW hack. + struct SecPkgContext_AccessToken + { +-- +2.6.3 + +From a00e5b78c7effd9b2a8d2534db533bb45c8971d0 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 10:09:19 +0300 +Subject: [PATCH] Use modern ICU libraries when link with system wide ICU. + +--- + builds/posix/prefix.mingw | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index 04e0978..7523670 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -19,6 +19,10 @@ + # 2003-Sep-27 BRS Removed IPSERVER after XNET is included + # + ++ifeq ($(STD_ICU),true) ++ ICU_LIBS= -licuuc -licudt -licuin ++endif ++ + # -Wno-unused-variable is used due to unused gpre generated variables + PROD_FLAGS=-O2 -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads + DEV_FLAGS=-ggdb -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads +-- +2.6.3 + +From ad5a9d126c76ed9322e663e206f473478d69dedd Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 13:28:03 +0300 +Subject: [PATCH] mingw-w64 don't have win98 support. + +--- + src/common/classes/locks.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/classes/locks.cpp b/src/common/classes/locks.cpp +index bbb9440..de6b2f8 100644 +--- a/src/common/classes/locks.cpp ++++ b/src/common/classes/locks.cpp +@@ -28,7 +28,7 @@ + #include "../../include/firebird.h" + #include "../../jrd/common.h" + +-#if defined(WIN_NT) ++#if defined(WIN_NT) && !defined(__MINGW64_VERSION_MAJOR) + // minimum win32 version: win98 / winnt4 SP3 + #define _WIN32_WINNT 0x0403 + #endif +-- +2.6.3 + +From c54b1933df0f6fee916c98152693fef95c83cf96 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 18:54:37 +0300 +Subject: [PATCH] Fix redefinition of matherr. + +--- + src/extlib/ib_udf.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/extlib/ib_udf.cpp b/src/extlib/ib_udf.cpp +index c5a620d..9017228 100644 +--- a/src/extlib/ib_udf.cpp ++++ b/src/extlib/ib_udf.cpp +@@ -50,10 +50,12 @@ extern "C" + #else + #define exception_type __exception + #endif ++#ifndef matherr + int MATHERR(struct exception_type*) + { + return 1; + } ++#endif + #undef exception_type + #endif /* SOLARIS */ + #endif //__ICC +-- +2.6.3 + +From ce4d15040e1cc19d7985ad64ed0a7929481c2fa9 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 21:44:53 +0300 +Subject: [PATCH] Don't export gds__print_pool as it not part of API according + to gds_proto.h:135 + +--- + src/jrd/gds.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/jrd/gds.cpp b/src/jrd/gds.cpp +index 44fdbf7..a4ccaa9 100644 +--- a/src/jrd/gds.cpp ++++ b/src/jrd/gds.cpp +@@ -1226,7 +1226,7 @@ void API_ROUTINE gds__log(const TEXT* text, ...) + #endif + } + +-void API_ROUTINE gds__print_pool(MemoryPool* pool, const TEXT* text, ...) ++void gds__print_pool(MemoryPool* pool, const TEXT* text, ...) + { + /************************************** + * +-- +2.6.3 + +From 282fb09c5b1fc977bfc0c0a9e42d87858766e9e4 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 19 Nov 2014 21:44:53 +0300 +Subject: [PATCH] mingw-w64 have fenv.h + +--- + src/common/classes/FpeControl.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common/classes/FpeControl.h b/src/common/classes/FpeControl.h +index 363cad5..93e48be 100644 +--- a/src/common/classes/FpeControl.h ++++ b/src/common/classes/FpeControl.h +@@ -30,7 +30,7 @@ + #define CLASSES_FPE_CONTROL_H + + #include +-#if defined(WIN_NT) ++#if defined(_MSC_VER) + #include + #else + #include +@@ -78,7 +78,7 @@ public: + } + } + +-#if defined(WIN_NT) ++#if defined(_MSC_VER) + static void maskAll() throw() + { + _clearfp(); // always call _clearfp() before setting control word +-- +2.6.3 + +From 7c9ee48c935efa10c1a620bcdb13ed4f5900876f Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 21 Nov 2014 21:44:53 +0300 +Subject: [PATCH] Fix cast error for 64-bit. + +--- + src/remote/os/win32/srvr_w32.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/remote/os/win32/srvr_w32.cpp b/src/remote/os/win32/srvr_w32.cpp +index fd0f75c..a0bf167 100644 +--- a/src/remote/os/win32/srvr_w32.cpp ++++ b/src/remote/os/win32/srvr_w32.cpp +@@ -269,7 +269,7 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs, + else if (server_flag & SRVR_wnet) + port = WNET_reconnect(connection_handle, status_vector); + else if (server_flag & SRVR_xnet) +- port = XNET_reconnect((ULONG) connection_handle, status_vector); ++ port = XNET_reconnect((ULONG_PTR) connection_handle, status_vector); + + if (port) { + service_connection(port); +-- +2.6.3 + +From c56cf75240e65265940bb7b0a2ffc78f0592c278 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 21 Nov 2014 21:44:53 +0300 +Subject: [PATCH] Fix source extension. + +--- + builds/posix/prefix.mingw | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index 7523670..ac1327c 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -31,7 +31,7 @@ PLATFORM_PATH=os/win32 + + OS_SPECIFIC_Files=thd_priority.cpp + +-OS_ServerFiles= os/win32/srvr_w32 os/win32/window.cpp os/win32/chop.cpp os/win32/property.cpp os/win32/cntl.cpp ++OS_ServerFiles= os/win32/srvr_w32.cpp os/win32/window.cpp os/win32/chop.cpp os/win32/property.cpp os/win32/cntl.cpp + + # Override link command for implicit stdc++ linking + LIB_LINK=$(LD) +-- +2.6.3 + +From 119982fa94aad3986e32ada7dd88a6330b1f70e5 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sat, 22 Nov 2014 12:03:41 +0300 +Subject: [PATCH] Move extra mingw sources definitions for fbintl to + Makefile.in.intl + +--- + builds/posix/Makefile.in.intl | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/builds/posix/Makefile.in.intl b/builds/posix/Makefile.in.intl +index 57ecb34..8d1e4e4 100644 +--- a/builds/posix/Makefile.in.intl ++++ b/builds/posix/Makefile.in.intl +@@ -52,6 +52,13 @@ INTL_Files1= ld.cpp cv_narrow.cpp \ + cs_ksc.cpp cv_ksc.cpp lc_ksc.cpp \ + cs_icu.cpp cv_icu.cpp lc_icu.cpp + ++ifeq ($(PLATFORM),win32) ++INTL_Files2 += $(FBCONFIG_Sources) \ ++ $(FBCLASSES_MsgSources) \ ++ $(OS_SPECIFIC_Sources) \ ++ jrd/isc.cpp jrd/gds.cpp \ ++ common/utils.cpp ++endif + # use INTL_Files2 in prefix file for host-specific additional files + INTL_Sources= $(addprefix intl/, $(INTL_Files1)) $(INTL_Files2) \ + jrd/IntlUtil.cpp jrd/unicode_util.cpp jrd/CharSet.cpp jrd/mod_loader.cpp +@@ -61,7 +68,7 @@ INTL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(INTL_Sources))) + # SD: Shared variables are overriden to exclude extra files and + # this way fix 'unresolved symbol' errors when some unused routines call + # other routines from not included modules +-FBCLASSES_ClientFiles=alloc.cpp locks.cpp fb_string.cpp timestamp.cpp ++FBCLASSES_ClientFiles=alloc.cpp locks.cpp fb_string.cpp timestamp.cpp TempFile.cpp + + + AllObjects = $(INTL_Objects) +-- +2.6.3 + +From 9827aa65a71d442dd005199281762cd577c241a8 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sat, 22 Nov 2014 22:59:59 +0300 +Subject: [PATCH] Add missing sources for utils building. + +--- + builds/posix/Makefile.in.client.gsec | 2 +- + builds/posix/Makefile.in.client.util | 4 ++-- + builds/posix/Makefile.in.embed.util | 8 ++++---- + builds/posix/Makefile.in.fbtrace | 2 +- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/builds/posix/Makefile.in.client.gsec b/builds/posix/Makefile.in.client.gsec +index 2efa520..803ea4f 100644 +--- a/builds/posix/Makefile.in.client.gsec ++++ b/builds/posix/Makefile.in.client.gsec +@@ -29,7 +29,7 @@ include $(ROOT)/gen/make.shared.variables + + @SET_MAKE@ + +-GSEC_Other_Sources = jrd/isc_file.cpp jrd/ThreadData.cpp common/UtilSvc.cpp jrd/enc.cpp \ ++GSEC_Other_Sources = jrd/isc.cpp jrd/isc_file.cpp jrd/ThreadData.cpp common/UtilSvc.cpp jrd/enc.cpp \ + jrd/sha.cpp jrd/guid.cpp + GSEC_Files = gsec.cpp call_service.cpp gsecMain.cpp security.cpp + GSEC_Sources = $(addprefix utilities/gsec/, $(GSEC_Files)) $(GSEC_Other_Sources) +diff --git a/builds/posix/Makefile.in.client.util b/builds/posix/Makefile.in.client.util +index dab8911..70bfab7 100644 +--- a/builds/posix/Makefile.in.client.util ++++ b/builds/posix/Makefile.in.client.util +@@ -40,14 +40,14 @@ include $(ROOT)/gen/make.shared.variables + @SET_MAKE@ + + +-LOCKPRINT_Other_Sources = jrd/isc_sync.cpp jrd/isc.cpp jrd/db_alias.cpp \ ++LOCKPRINT_Other_Sources = jrd/isc_ipc.cpp jrd/isc_sync.cpp jrd/isc.cpp jrd/db_alias.cpp \ + common/config/config.cpp common/config/config_file.cpp $(OS_SPECIFIC_Sources) + LOCKPRINT_Files= print.cpp + LOCKPRINT_Sources = $(addprefix lock/, $(LOCKPRINT_Files)) $(LOCKPRINT_Other_Sources) + LOCKPRINT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(LOCKPRINT_Sources)))) \ + $(FBCONFIG_Objects) + +-NBACKUP_Other_Sources = jrd/isc_file.cpp jrd/db_alias.cpp common/UtilSvc.cpp $(OS_SPECIFIC_Sources) ++NBACKUP_Other_Sources = jrd/isc.cpp jrd/isc_file.cpp jrd/db_alias.cpp common/UtilSvc.cpp $(OS_SPECIFIC_Sources) + NBACKUP_Files= nbackup.cpp nbackup/nbkMain.cpp + NBACKUP_Sources = $(addprefix utilities/, $(NBACKUP_Files)) $(NBACKUP_Other_Sources) + NBACKUP_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(NBACKUP_Sources)))) \ +diff --git a/builds/posix/Makefile.in.embed.util b/builds/posix/Makefile.in.embed.util +index 3d1a98f..8488a05 100644 +--- a/builds/posix/Makefile.in.embed.util ++++ b/builds/posix/Makefile.in.embed.util +@@ -40,7 +40,7 @@ include $(ROOT)/gen/make.shared.variables + @SET_MAKE@ + + +-LOCKPRINT_Other_Sources += jrd/isc_sync.cpp jrd/isc.cpp jrd/db_alias.cpp \ ++LOCKPRINT_Other_Sources += jrd/isc_ipc.cpp jrd/isc_sync.cpp jrd/isc.cpp jrd/db_alias.cpp \ + $(OS_SPECIFIC_Sources) + + LOCKPRINT_Files= print.cpp +@@ -48,7 +48,7 @@ LOCKPRINT_Sources = $(addprefix lock/, $(LOCKPRINT_Files)) $(LOCKPRINT_Other_Sou + LOCKPRINT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(LOCKPRINT_Sources)))) \ + $(FBCONFIG_Objects) + +-NBACKUP_Other_Sources = jrd/isc_file.cpp jrd/db_alias.cpp common/UtilSvc.cpp $(OS_SPECIFIC_Sources) ++NBACKUP_Other_Sources = jrd/isc.cpp jrd/isc_file.cpp jrd/db_alias.cpp common/UtilSvc.cpp $(OS_SPECIFIC_Sources) + + NBACKUP_Files= nbackup.cpp nbackup/nbkMain.cpp + NBACKUP_Sources = $(addprefix utilities/, $(NBACKUP_Files)) $(NBACKUP_Other_Sources) +@@ -65,7 +65,7 @@ DROP_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(DROP_Sources))) + + + GSEC_Other_Sources = jrd/enc.cpp jrd/sha.cpp jrd/guid.cpp \ +-jrd/isc_file.cpp common/config/config.cpp common/config/config_file.cpp \ ++jrd/isc.cpp jrd/isc_file.cpp common/config/config.cpp common/config/config_file.cpp \ + common/config/dir_list.cpp \ + common/UtilSvc.cpp jrd/ThreadData.cpp \ + $(OS_SPECIFIC_Sources) +@@ -76,7 +76,7 @@ GSEC_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSEC_Sources))) + + + GSTAT_Other_Sources = jrd/btn.cpp jrd/db_alias.cpp common/utils.cpp jrd/ods.cpp \ +-common/UtilSvc.cpp jrd/ThreadData.cpp jrd/isc_file.cpp $(OS_SPECIFIC_Sources) ++common/UtilSvc.cpp jrd/ThreadData.cpp jrd/isc.cpp jrd/isc_file.cpp $(OS_SPECIFIC_Sources) + + GSTAT_Files = dba.epp ppg.cpp gstatMain.cpp + GSTAT_Sources = $(addprefix utilities/gstat/, $(GSTAT_Files)) $(GSTAT_Other_Sources) +diff --git a/builds/posix/Makefile.in.fbtrace b/builds/posix/Makefile.in.fbtrace +index 0f1a09e..daee0d8 100644 +--- a/builds/posix/Makefile.in.fbtrace ++++ b/builds/posix/Makefile.in.fbtrace +@@ -49,7 +49,7 @@ FBTRACE_UTIL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBTRACE + + + FBTRACE_OTHER_Sources = $(OS_SPECIFIC_Sources) $(TRACE_OS_Sources) \ +- jrd/isc.cpp jrd/isc_file.cpp jrd/CharSet.cpp jrd/TextType.cpp \ ++ jrd/isc.cpp jrd/isc_file.cpp jrd/isc_sync.cpp jrd/CharSet.cpp jrd/TextType.cpp \ + jrd/IntlUtil.cpp jrd/unicode_util.cpp common/classes/ClumpletReader.cpp common/utils.cpp + + FBTRACE_OTHER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBTRACE_OTHER_Sources)))) +-- +2.6.3 + +From 7fb111f4e8842524d8a40d011eda4a2e8256291a Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 23 Nov 2014 00:13:24 +0300 +Subject: [PATCH] smtp_server: Add win32 platform files. + +--- + builds/posix/Makefile.in.inet_server | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/builds/posix/Makefile.in.inet_server b/builds/posix/Makefile.in.inet_server +index d59b07a..ad471fd 100644 +--- a/builds/posix/Makefile.in.inet_server ++++ b/builds/posix/Makefile.in.inet_server +@@ -40,6 +40,9 @@ include $(ROOT)/gen/make.shared.variables + + SERVER_Files = server_stub.cpp + SERVER_Sources = $(addprefix remote/, $(SERVER_Files)) ++ifeq ($(PLATFORM),win32) ++SERVER_Sources += utilities/nbackup/nbkMain.cpp common/UtilSvc.cpp ++endif + SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources)))) + + AllObjects = $(SERVER_Objects) +-- +2.6.3 + +From 772876926b45e7cbbd5906930bae731545a01fa9 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 23 Nov 2014 13:27:02 +0300 +Subject: [PATCH] Fix building net_server and mp_server with mingw + +--- + builds/posix/Makefile.in.inet_server | 4 ++-- + builds/posix/Makefile.in.smp_server | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/builds/posix/Makefile.in.inet_server b/builds/posix/Makefile.in.inet_server +index ad471fd..99ddd19 100644 +--- a/builds/posix/Makefile.in.inet_server ++++ b/builds/posix/Makefile.in.inet_server +@@ -54,8 +54,8 @@ Dependencies = $(AllObjects:.o=.d) + # but we must ensure it's existance + fb_inet_server : $(LIBFBEMBED_SO) $(FB_CLASSIC_SERVER) + +-$(FB_CLASSIC_SERVER): $(SERVER_Objects) +- $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIB_GUI) $(LINK_LIBS) ++$(FB_CLASSIC_SERVER): $(SERVER_Objects) $(COMMON_Objects) $(CLUMPLETS_Objects) $(FBCONFIG_Objects) $(OS_SPECIFIC_Objects) $(DSQL_Objects) $(BURP_Objects) $(ALICE_Objects) $(LOCK_Objects) $(INTERFACE_Objects) $(NBACKUP_SERVER_Objects) $(NTRACE_SERVER_Objects) $(SECURITY_Objects) $(JRD_Objects) ++ $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIB_GUI) $(ICU_LIBS) $(LINK_LIBS) + + include $(ROOT)/gen/make.shared.targets + +diff --git a/builds/posix/Makefile.in.smp_server b/builds/posix/Makefile.in.smp_server +index 1bc3872..f386021 100644 +--- a/builds/posix/Makefile.in.smp_server ++++ b/builds/posix/Makefile.in.smp_server +@@ -59,8 +59,8 @@ $(OS_SPECIFIC_Objects) + + fb_smp_server: $(FB_DAEMON) + +-$(FB_DAEMON): $(SERVER_Objects) +- $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) ++$(FB_DAEMON): $(SERVER_Objects) $(DSQL_Objects) $(BURP_Objects) $(ALICE_Objects) $(JRD_Objects) $(LOCK_Objects) $(INTERFACE_Objects) $(SECURITY_Objects) $(NBACKUP_SERVER_Objects) $(NTRACE_SERVER_Objects) ++ $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIB_GUI) $(LINK_LIBS) $(ICU_LIBS) + + AllObjects = $(SERVER_Objects) + +-- +2.6.3 + +From c618ef79458e2f3aa13d51653a967d0df95ace5e Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 26 Nov 2014 09:27:40 +0300 +Subject: [PATCH] For mingw place dll's into BIN and generate import libraries + in LIB. Don't link with def files. + +--- + builds/posix/make.defaults | 18 +- + builds/posix/prefix.mingw | 38 ++- + builds/win32/defs/fbclient32.def | 703 +++++++++++++++++++++++++++++++++++++++ + builds/win32/defs/fbclient64.def | 361 ++++++++++++++++++++ + 4 files changed, 1100 insertions(+), 20 deletions(-) + create mode 100644 builds/win32/defs/fbclient32.def + create mode 100644 builds/win32/defs/fbclient64.def + +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index bced0da..bc96ceb 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -93,6 +93,11 @@ IsProdTypeBuild = @PROD_BUILD_FLG@ + + CpuType=@CPU_TYPE@ + ++ifeq ($(CpuType), x86_64) ++ BITNESS_SUFFIX := 64 ++else ++ BITNESS_SUFFIX := 32 ++endif + PLATFORM=@PLATFORM@ + ifeq (@FIREBIRD_ARCH_TYPE@,classic) + ArchPrefix=CS +@@ -193,9 +198,9 @@ BLRTABLE = $(BIN)/blrtable$(EXEC_EXT) + # Scold me, but I don't want library names to be in configure.in + # + +-SharedLibraryName=libfbembed.${SHRLIB_EXT}.${FirebirdVersion} +-SharedLibrarySoName=libfbembed.${SHRLIB_EXT}.${MajorVer}.${MinorVer} +-SharedLibraryBaseName=libfbembed.${SHRLIB_EXT} ++SharedLibraryBaseName=$(LIB_PREFIX)fbembed.${SHRLIB_EXT} ++SharedLibraryName=${SharedLibraryBaseName}.${FirebirdVersion} ++SharedLibrarySoName=${SharedLibraryBaseName}.${MajorVer}.${MinorVer} + + LIBFBEMBED_SO = $(LIB)/$(SharedLibraryName) + LIBFBEMBED_SOBASENAME = $(LIB)/$(SharedLibrarySoName) +@@ -261,6 +266,7 @@ LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$$$ORIGIN/../$(1)') + endif + LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl) + LIB_LINK_SONAME= -Wl,-soname,$(1) ++LIB_LINK_IMPLIB= + LIB_LINK_MAPFILE= -Wl,--version-script, + FBEMBED_LINK= -L$(LIB) -lfbembed + +@@ -281,7 +287,7 @@ LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_ + LINK_UDF_LIBS = $(THR_LIBS) -L$(LIB) -lib_util + + LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS)\ +- $(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib) ++ $(call LIB_LINK_IMPLIB,$(LIB)/lib$(IbUtilLibraryName).a) $(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib) + LINK_IB_UTIL_LIBS = $(THR_LIBS) + + LINK_INTL = $(LIB_LINK) $(LINK_FBINTL_SYMBOLS) $(LIB_LINK_OPTIONS)\ +@@ -293,11 +299,11 @@ LINK_TRACE = $(LIB_LINK) $(LINK_TRACE_SYMBOLS) $(LIB_LINK_OPTIONS)\ + LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS) + + LINK_CLIENT = $(CLIENTLIB_LINK) $(LINK_FIREBIRD_CLIENT_SYMBOLS) $(LIB_LINK_OPTIONS)\ +- $(LIB_LINK_IMPLIB) $(call LIB_LINK_SONAME,$(ClientLibrarySoName)) $(call LIB_LINK_RPATH,lib) ++ $(call LIB_LINK_IMPLIB,$(LIB)/lib$(ClientLibraryName).a) $(call LIB_LINK_SONAME,$(ClientLibrarySoName)) $(call LIB_LINK_RPATH,lib) + LINK_CLIENT_LIBS = $(SO_LINK_LIBS) $(STATIC_CXXSUPPORT_LIB) + + LINK_EMBED = $(LIB_LINK) $(LINK_FIREBIRD_EMBED_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_EMBED_LINK_OPTIONS)\ +- $(call LIB_LINK_SONAME,$(SharedLibrarySoName)) $(call LIB_LINK_RPATH,lib) ++ $(call LIB_LINK_IMPLIB,$(LIB)/lib$(SharedLibraryBaseName).a) $(call LIB_LINK_SONAME,$(SharedLibrarySoName)) $(call LIB_LINK_RPATH,lib) + LINK_EMBED_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(ICU_LIBS) + + # From utilities +diff --git a/builds/posix/prefix.mingw b/builds/posix/prefix.mingw +index ac1327c..8e514d8 100644 +--- a/builds/posix/prefix.mingw ++++ b/builds/posix/prefix.mingw +@@ -36,16 +36,12 @@ OS_ServerFiles= os/win32/srvr_w32.cpp os/win32/window.cpp os/win32/chop.cpp os/w + # Override link command for implicit stdc++ linking + LIB_LINK=$(LD) + +-LIB_LINK_OPTIONS+=-Wl,--enable-stdcall-fixup +- + # Strip symbols from release versions to decrease size + ifeq ($(IsProdTypeBuild),Y) + LINK_OPTS+=-Wl,-s + LIB_LINK_OPTIONS+=-Wl,-s + endif + +-# Generation of fbclient_ms.lib +-LIB_LINK_IMPLIB:=-Wl,--out-implib,firebird/lib/fbclient_ms.lib + LIB_GUI:= -mwindows -lcomctl32 -lgdi32 + + +@@ -65,19 +61,33 @@ FilesToAddDialog2=$(IBGUARD) + LIB_PREFIX= + + # Override library names to suppress version suffix +-ClientLibraryNameFull := $(ClientLibraryName) +-ClientLibrarySoName := $(ClientLibraryName) ++SharedLibraryName = $(SharedLibraryBaseName) ++SharedLibrarySoName = $(SharedLibraryBaseName) ++ ++LIBFBEMBED_SO = $(BIN)/$(SharedLibraryName) ++LIBFBEMBED_SOBASENAME = $(BIN)/$(SharedLibrarySoName) ++LIBFBEMBED_SONAME = $(BIN)/$(SharedLibraryBaseName) ++ ++ClientLibraryNameFull = $(ClientLibraryName) ++ClientLibrarySoName = $(ClientLibraryName) ++ ++LIBFBCLIENT_SO = $(BIN)/$(ClientLibraryNameFull) ++LIBFBCLIENT_SOBASENAME = $(BIN)/$(ClientLibrarySoName) ++LIBFBCLIENT_SONAME = $(BIN)/$(ClientLibraryName) + +-# Looks like MinGW 3 does not support version scripts but support def-files +-LINK_FIREBIRD_SYMBOLS = $(BLD_ROOT)/win32/defs/fbclient_s.def $(BLD_ROOT)/win32/defs/fbclient.def ++LIBIBUTIL_SO = $(BIN)/$(IbUtilLibraryName) + +-# This is required for newly built executable to find newly built shared +-# libraries because on Win32 there is no such thing as LD_LIBRARY_PATH +-LIB=$(BIN) ++# Generation of import libraries ++LIB_LINK_IMPLIB= -Wl,--out-implib,$(1) ++LIB_LINK_SONAME= + +-# Special options for UDF link +-LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_EXT)) -L$(LIB) -lib_util +-LINK_UDF_LIBS = ++LINK_FIREBIRD_SYMBOLS = $(BLD_ROOT)/win32/defs/fbclient$(BITNESS_SUFFIX).def ++#LINK_FIREBIRD_EMBED_SYMBOLS = ++#LINK_FIREBIRD_CLIENT_SYMBOLS = ++LINK_TRACE_SYMBOLS = ++LINK_FBINTL_SYMBOLS = ++LINK_IBUTIL_SYMBOLS = ++LINK_EMPTY_SYMBOLS = + + # Special options for trace plugin link + LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS) $(ICU_LIBS) +diff --git a/builds/win32/defs/fbclient32.def b/builds/win32/defs/fbclient32.def +new file mode 100644 +index 0000000..e867e65 +--- /dev/null ++++ b/builds/win32/defs/fbclient32.def +@@ -0,0 +1,703 @@ ++; The contents of this file are subject to the Interbase Public ++; License Version 1.0 (the "License"); you may not use this file ++; except in compliance with the License. You may obtain a copy ++; of the License at http://www.Inprise.com/IPL.html ++; ++; Software distributed under the License is distributed on an ++; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express ++; or implied. See the License for the specific language governing ++; rights and limitations under the License. ++; ++; The Original Code was created by Inprise Corporation ++; and its predecessors. Portions created by Inprise Corporation are ++; Copyright (C) Inprise Corporation. ++; ++; All Rights Reserved. ++; Contributor(s): ______________________________________. ++ ++LIBRARY "fbclient.dll" ++EXPORTS ++ ++;------------------- ++; PRIVATE INTERFACE ++;------------------- ++ ++ gds__alloc@4 ++ gds__attach_database@24 ++ gds__blob_info@24 ++ gds__blob_size@16 ++ gds__cancel_blob@8 ++ gds__cancel_events@12 ++ gds__close@8 ++ gds__close_blob@8 ++ gds__commit_retaining@8 ++ gds__commit_transaction@8 ++ gds__compile_request@20 ++ gds__compile_request2@20 ++ gds__create_blob@20 ++ gds__create_blob2@28 ++ gds__create_database@28 ++ gds__database_cleanup@16 ++ gds__database_info@24 ++ gds__ddl@20 ++ gds__declare@12 ++ gds__decode@12 ++ gds__decode_date@8 ++ gds__describe@12 ++ gds__describe_bind@12 ++ gds__detach_database@8 ++ gds__disable_subsystem@4 ++ gds__dsql_finish@4 ++ gds__edit@8 ++ gds__enable_subsystem@4 ++ gds__encode@8 ++ gds__encode_date@8 ++ gds__event_block@0 ++ gds__event_counts@16 ++ gds__event_wait@20 ++ gds__execute@16 ++ gds__execute_immediate@20 ++ gds__fetch@12 ++ gds__free@4 ++ gds__ftof@16 ++ gds__get_prefix@8 ++ gds__get_segment@20 ++ gds__get_slice@44 ++ gds__interprete@8 ++ gds__log@0 ++ gds__log_status@8 ++ gds__map_blobs@8 ++ gds__msg_close@4 ++ gds__msg_format@40 ++ gds__msg_lookup@24 ++ gds__msg_open@8 ++ gds__msg_put@32 ++ gds__open@16 ++ gds__open_blob@20 ++ gds__open_blob2@28 ++ gds__parse_bpb@16 ++ gds__prefix@8 ++ gds__prefix_lock@8 ++ gds__prefix_msg@8 ++ gds__prepare@28 ++ gds__prepare_transaction@8 ++ gds__prepare_transaction2@16 ++ gds__print_blr@16 ++ gds__print_status@4 ++ gds__put_error@4 ++ gds__put_segment@16 ++ gds__put_slice@40 ++ gds__qtoq@8 ++ gds__que_events@28 ++ gds__receive@24 ++ gds__reconnect_transaction@20 ++ gds__register_cleanup@8 ++ gds__release_request@8 ++ gds__request_info@28 ++ gds__rollback_transaction@8 ++ gds__seek_blob@20 ++ gds__send@24 ++ gds__set_debug@4 ++ gds__sqlcode@4 ++ gds__start_and_send@28 ++ gds__start_multiple@16 ++ gds__start_request@16 ++ gds__start_transaction@0 ++ gds__temp_file@20 ++ gds__thread_enable@4 ++ gds__thread_enter@0 ++ gds__thread_exit@0 ++ gds__thread_start@20 ++ gds__to_sqlda@20 ++ gds__transaction_cleanup@16 ++ gds__transaction_info@24 ++ gds__unregister_cleanup@8 ++ gds__unwind_request@12 ++ gds__validate_lib_path@16 ++ gds__vax_integer@8 ++ gds__version@12 ++ gds__vtof@12 ++ gds__vtov@12 ++ gds__default_printer@0 ++ ++ gds__alloc_debug@12 ++ ++ gds_alloc_flag_unfreed@4 ++ gds_alloc_report@12 ++ ++ fb_shutdown@8 ++ fb_shutdown_callback@16 ++ fb_cancel_operation@12 ++ fb_disconnect_transaction@8 ++ ++ perf_format@20 ++ perf_get_info@8 ++ perf_report@16 ++ ++ perf64_format@20 ++ perf64_get_info@8 ++ perf64_report@16 ++ ++;---------------------------- ++; PUBLIC INTERFACE, i.e. API ++;---------------------------- ++ ++ ; Array functions ++ ++ isc_array_gen_sdl@20 ++ isc_array_get_slice@28 ++ isc_array_lookup_bounds@24 ++ isc_array_lookup_desc@24 ++ isc_array_put_slice@28 ++ isc_array_set_desc@28 ++ isc_get_slice@44 ++ isc_put_slice@40 ++ ++ ; BLOB functions ++ ++ isc_blob_default_desc@12 ++ isc_blob_gen_bpb@24 ++ isc_blob_info@24 ++ isc_blob_lookup_desc@28 ++ isc_blob_set_desc@28 ++ isc_cancel_blob@8 ++ isc_close_blob@8 ++ isc_create_blob@20 ++ isc_create_blob2@28 ++ isc_get_segment@20 ++ isc_open_blob@20 ++ isc_open_blob2@28 ++ isc_put_segment@16 ++ ++ ; Database functions ++ ++ isc_attach_database@24 ++ isc_create_database@28 ++ isc_database_info@24 ++ isc_detach_database@8 ++ isc_drop_database@8 ++ isc_expand_dpb@0 ++ isc_modify_dpb@20 ++ isc_version@12 ++ isc_get_client_major_version@0 ++ isc_get_client_minor_version@0 ++ isc_get_client_version@4 ++ ++ ; Conversion functions ++ ++ isc_decode_date@8 ++ isc_decode_sql_date@8 ++ isc_decode_sql_time@8 ++ isc_decode_timestamp@8 ++ isc_encode_date@8 ++ isc_encode_sql_date@8 ++ isc_encode_sql_time@8 ++ isc_encode_timestamp@8 ++ isc_portable_integer@8 ++ isc_vax_integer@8 ++ ++ ; DSQL functions ++ ++ isc_dsql_allocate_statement@12 ++ isc_dsql_alloc_statement2@12 ++ isc_dsql_describe@16 ++ isc_dsql_describe_bind@16 ++ isc_dsql_execute@20 ++ isc_dsql_execute2@24 ++ isc_dsql_execute_m@32 ++ isc_dsql_execute2_m@52 ++ isc_dsql_execute_immediate@28 ++ isc_dsql_exec_immed2@32 ++ isc_dsql_execute_immediate_m@44 ++ isc_dsql_exec_immed2_m@64 ++ isc_dsql_exec_immed3_m@64 ++ isc_dsql_fetch@16 ++ isc_dsql_fetch_a@20 ++ isc_dsql_fetch_m@28 ++ isc_dsql_finish@4 ++ isc_dsql_free_statement@12 ++ isc_dsql_insert@16 ++ isc_dsql_insert_m@28 ++ isc_dsql_prepare@28 ++ isc_dsql_prepare_m@40 ++ isc_dsql_release@8 ++ isc_dsql_set_cursor_name@16 ++ isc_dsql_sql_info@24 ++ ++ ; ESQL functions ++ ++ isc_embed_dsql_close@8 ++ isc_embed_dsql_declare@12 ++ isc_embed_dsql_describe@16 ++ isc_embed_dsql_describe_bind@16 ++ isc_embed_dsql_execute@20 ++ isc_embed_dsql_execute2@24 ++ isc_embed_dsql_execute_immed@28 ++ isc_embed_dsql_exec_immed2@32 ++ isc_embed_dsql_fetch@16 ++ isc_embed_dsql_fetch_a@20 ++ isc_embed_dsql_insert@16 ++ isc_embed_dsql_open@20 ++ isc_embed_dsql_open2@24 ++ isc_embed_dsql_prepare@32 ++ isc_embed_dsql_release@8 ++ isc_embed_dsql_length@8 ++ ++ ; Error-handling functions ++ ++ isc_interprete@8 ++ fb_interpret@12 ++ isc_print_sqlerror@8 ++ isc_print_status@4 ++ isc_sqlcode@4 ++ isc_sql_interprete@12 ++ isc_sqlcode_s@8 ++ fb_sqlstate@8 ++ ++ ; Event functions ++ ++ isc_cancel_events@12 ++ isc_event_block@0 ++ isc_event_counts@16 ++ isc_que_events@28 ++ isc_wait_for_event@20 ++ isc_event_block_a@16 ++ isc_event_block_s@20 ++ ++ ; Security functions ++ ++ isc_add_user@8 ++ isc_delete_user@8 ++ isc_modify_user@8 ++ ++ ; Services functions ++ ++ isc_service_attach@24 ++ isc_service_detach@8 ++ isc_service_query@36 ++ isc_service_start@20 ++ ++ ; Transaction control functions ++ ++ isc_commit_retaining@8 ++ isc_commit_transaction@8 ++ isc_prepare_transaction@8 ++ isc_prepare_transaction2@16 ++ isc_rollback_retaining@8 ++ isc_rollback_transaction@8 ++ isc_start_multiple@16 ++ isc_start_transaction@0 ++ isc_transaction_info@24 ++ ++ ; Other functions ++ ++ isc_compile_request@20 ++ isc_compile_request2@20 ++ isc_ddl@20 ++ isc_prepare@28 ++ isc_receive@24 ++ isc_reconnect_transaction@20 ++ isc_release_request@8 ++ isc_request_info@28 ++ isc_seek_blob@20 ++ isc_send@24 ++ isc_start_and_send@28 ++ isc_start_request@16 ++ isc_transact_request@36 ++ isc_unwind_request@12 ++ ++ ; Other SQL functions ++ ++ isc_close@8 ++ isc_declare@12 ++ isc_describe@12 ++ isc_describe_bind@12 ++ isc_execute@16 ++ isc_execute_immediate@20 ++ isc_fetch@12 ++ isc_fetch_a@16 ++ isc_open@16 ++ ++ ; Other BLOB functions ++ ++ BLOB_close@4 ++ BLOB_display@16 ++ BLOB_dump@16 ++ BLOB_edit@16 ++ BLOB_get@4 ++ BLOB_load@16 ++ BLOB_open@12 ++ BLOB_put@8 ++ BLOB_text_dump@16 ++ BLOB_text_load@16 ++ Bopen@16 ++ ++ ; Other misc functions ++ ++ isc_ftof@16 ++ isc_free@4 ++ isc_print_blr@16 ++ fb_print_blr@20 ++ isc_qtoq@8 ++ isc_reset_fpe@4 ++ isc_set_debug@4 ++ isc_to_sqlda@20 ++ isc_vtof@12 ++ isc_vtov@12 ++ isc_baddress@4 ++ isc_baddress_s@8 ++ ++ _isc_start_transaction = isc_start_transaction@0 ++ _isc_expand_dpb = isc_expand_dpb@0 ++ _isc_event_block = isc_event_block@0 ++ ++;----------------- ++; OTHER FUNCTIONS ++;----------------- ++ ++ CVT_move@12 ++ ++ KEYWORD_stringIsAToken@4 ++ KEYWORD_getTokens@0 ++ ++;-------------------------------------- ++; DUPLICATE FOR COMPATIBILITY WITH MSVC ++;-------------------------------------- ++ ++;------------------- ++; PRIVATE INTERFACE ++;------------------- ++ ++ gds__alloc = gds__alloc@4 @1 ++ gds__attach_database = gds__attach_database@24 @2 ++ gds__blob_info = gds__blob_info@24 @3 ++ gds__blob_size = gds__blob_size@16 @4 ++ gds__cancel_blob = gds__cancel_blob@8 @5 ++ gds__cancel_events = gds__cancel_events@12 @6 ++ gds__close = gds__close@8 @7 ++ gds__close_blob = gds__close_blob@8 @8 ++ gds__commit_retaining = gds__commit_retaining@8 @9 ++ gds__commit_transaction = gds__commit_transaction@8 @10 ++ gds__compile_request = gds__compile_request@20 @11 ++ gds__compile_request2 = gds__compile_request2@20 @12 ++ gds__create_blob = gds__create_blob@20 @13 ++ gds__create_blob2 = gds__create_blob2@28 @14 ++ gds__create_database = gds__create_database@28 @15 ++ gds__database_cleanup = gds__database_cleanup@16 @16 ++ gds__database_info = gds__database_info@24 @17 ++ gds__ddl = gds__ddl@20 @18 ++ gds__declare = gds__declare@12 @19 ++ gds__decode = gds__decode@12 @20 ++ gds__decode_date = gds__decode_date@8 @21 ++ gds__describe = gds__describe@12 @22 ++ gds__describe_bind = gds__describe_bind@12 @23 ++ gds__detach_database = gds__detach_database@8 @24 ++ gds__disable_subsystem = gds__disable_subsystem@4 @25 ++ gds__dsql_finish = gds__dsql_finish@4 @26 ++ gds__edit = gds__edit@8 @27 ++ gds__enable_subsystem = gds__enable_subsystem@4 @28 ++ gds__encode = gds__encode@8 @29 ++ gds__encode_date = gds__encode_date@8 @30 ++ gds__event_block = gds__event_block@0 @31 ++ gds__event_counts = gds__event_counts@16 @32 ++ gds__event_wait = gds__event_wait@20 @33 ++ gds__execute = gds__execute@16 @34 ++ gds__execute_immediate = gds__execute_immediate@20 @35 ++ gds__fetch = gds__fetch@12 @36 ++ gds__free = gds__free@4 @37 ++ gds__ftof = gds__ftof@16 @38 ++ gds__get_prefix = gds__get_prefix@8 @248 ++ gds__get_segment = gds__get_segment@20 @39 ++ gds__get_slice = gds__get_slice@44 @40 ++ gds__interprete = gds__interprete@8 @41 ++ gds__log = gds__log@0 @42 ++ gds__log_status = gds__log_status@8 @142 ++ gds__map_blobs = gds__map_blobs@8 @240 ++ gds__msg_close = gds__msg_close@4 @223 ++ gds__msg_format = gds__msg_format@40 @43 ++ gds__msg_lookup = gds__msg_lookup@24 @44 ++ gds__msg_open = gds__msg_open@8 @45 ++ gds__msg_put = gds__msg_put@32 @46 ++ gds__open = gds__open@16 @47 ++ gds__open_blob = gds__open_blob@20 @48 ++ gds__open_blob2 = gds__open_blob2@28 @49 ++ gds__parse_bpb = gds__parse_bpb@16 @50 ++ gds__prefix = gds__prefix@8 @51 ++ gds__prefix_lock = gds__prefix_lock@8 @249 ++ gds__prefix_msg = gds__prefix_msg@8 @250 ++ gds__prepare = gds__prepare@28 @52 ++ gds__prepare_transaction = gds__prepare_transaction@8 @53 ++ gds__prepare_transaction2 = gds__prepare_transaction2@16 @54 ++ gds__print_blr = gds__print_blr@16 @55 ++ gds__print_status = gds__print_status@4 @56 ++ gds__put_error = gds__put_error@4 @57 ++ gds__put_segment = gds__put_segment@16 @58 ++ gds__put_slice = gds__put_slice@40 @59 ++ gds__qtoq = gds__qtoq@8 @60 ++ gds__que_events = gds__que_events@28 @61 ++ gds__receive = gds__receive@24 @62 ++ gds__reconnect_transaction = gds__reconnect_transaction@20 @63 ++ gds__register_cleanup = gds__register_cleanup@8 @64 ++ gds__release_request = gds__release_request@8 @65 ++ gds__request_info = gds__request_info@28 @66 ++ gds__rollback_transaction = gds__rollback_transaction@8 @67 ++ gds__seek_blob = gds__seek_blob@20 @68 ++ gds__send = gds__send@24 @69 ++ gds__set_debug = gds__set_debug@4 @70 ++ gds__sqlcode = gds__sqlcode@4 @71 ++ gds__start_and_send = gds__start_and_send@28 @72 ++ gds__start_multiple = gds__start_multiple@16 @73 ++ gds__start_request = gds__start_request@16 @74 ++ gds__start_transaction = gds__start_transaction@0 @75 ++ gds__temp_file = gds__temp_file@20 @231 ++ gds__thread_enable = gds__thread_enable@4 @76 ++ gds__thread_enter = gds__thread_enter@0 @77 ++ gds__thread_exit = gds__thread_exit@0 @78 ++ gds__thread_start = gds__thread_start@20 @79 ++ gds__to_sqlda = gds__to_sqlda@20 @80 ++ gds__transaction_cleanup = gds__transaction_cleanup@16 @235 ++ gds__transaction_info = gds__transaction_info@24 @81 ++ gds__unregister_cleanup = gds__unregister_cleanup@8 @224 ++ gds__unwind_request = gds__unwind_request@12 @82 ++ gds__validate_lib_path = gds__validate_lib_path@16 @255 ++ gds__vax_integer = gds__vax_integer@8 @83 ++ gds__version = gds__version@12 @84 ++ gds__vtof = gds__vtof@12 @85 ++ gds__vtov = gds__vtov@12 @86 ++ gds__default_printer = gds__default_printer@0 @87 ++ ++ gds__alloc_debug = gds__alloc_debug@12 ++ ++ gds_alloc_flag_unfreed = gds_alloc_flag_unfreed@4 ++ gds_alloc_report = gds_alloc_report@12 ++ ++ fb_shutdown = fb_shutdown@8 ++ fb_shutdown_callback = fb_shutdown_callback@16 ++ fb_cancel_operation = fb_cancel_operation@12 ++ fb_disconnect_transaction = fb_disconnect_transaction@8 ++ ++ perf_format = perf_format@20 @100 ++ perf_get_info = perf_get_info@8 @101 ++ perf_report = perf_report@16 @102 ++ ++ perf64_format = perf64_format@20 ++ perf64_get_info = perf64_get_info@8 ++ perf64_report = perf64_report@16 ++ ++;---------------------------- ++; PUBLIC INTERFACE, i.e. API ++;---------------------------- ++ ++ ; Array functions ++ ++ isc_array_gen_sdl = isc_array_gen_sdl@20 @217 ++ isc_array_get_slice = isc_array_get_slice@28 @218 ++ isc_array_lookup_bounds = isc_array_lookup_bounds@24 @219 ++ isc_array_lookup_desc = isc_array_lookup_desc@24 @220 ++ isc_array_put_slice = isc_array_put_slice@28 @221 ++ isc_array_set_desc = isc_array_set_desc@28 @222 ++ isc_get_slice = isc_get_slice@44 @140 ++ isc_put_slice = isc_put_slice@40 @153 ++ ++ ; BLOB functions ++ ++ isc_blob_default_desc = isc_blob_default_desc@12 @239 ++ isc_blob_gen_bpb = isc_blob_gen_bpb@24 @236 ++ isc_blob_info = isc_blob_info@24 @108 ++ isc_blob_lookup_desc = isc_blob_lookup_desc@28 @237 ++ isc_blob_set_desc = isc_blob_set_desc@28 @238 ++ isc_cancel_blob = isc_cancel_blob@8 @110 ++ isc_close_blob = isc_close_blob@8 @113 ++ isc_create_blob = isc_create_blob@20 @118 ++ isc_create_blob2 = isc_create_blob2@28 @119 ++ isc_get_segment = isc_get_segment@20 @139 ++ isc_open_blob = isc_open_blob@20 @144 ++ isc_open_blob2 = isc_open_blob2@28 @145 ++ isc_put_segment = isc_put_segment@16 @152 ++ ++ ; Database functions ++ ++ isc_attach_database = isc_attach_database@24 @103 ++ isc_create_database = isc_create_database@28 @120 ++ isc_database_info = isc_database_info@24 @122 ++ isc_detach_database = isc_detach_database@8 @128 ++ isc_drop_database = isc_drop_database@8 @229 ++ isc_expand_dpb = isc_expand_dpb@0 @135 ++ isc_modify_dpb = isc_modify_dpb@20 @244 ++ isc_version = isc_version@12 @174 ++ isc_get_client_major_version = isc_get_client_major_version@0 @268 ++ isc_get_client_minor_version = isc_get_client_minor_version@0 @269 ++ isc_get_client_version = isc_get_client_version@4 @270 ++ ++ ; Conversion functions ++ ++ isc_decode_date = isc_decode_date@8 @125 ++ isc_decode_sql_date = isc_decode_sql_date@8 @261 ++ isc_decode_sql_time = isc_decode_sql_time@8 @262 ++ isc_decode_timestamp = isc_decode_timestamp@8 @263 ++ isc_encode_date = isc_encode_date@8 @129 ++ isc_encode_sql_date = isc_encode_sql_date@8 @264 ++ isc_encode_sql_time = isc_encode_sql_time@8 @265 ++ isc_encode_timestamp = isc_encode_timestamp@8 @266 ++ isc_portable_integer = isc_portable_integer@8 @259 ++ isc_vax_integer = isc_vax_integer@8 @173 ++ ++ ; DSQL functions ++ ++ isc_dsql_allocate_statement = isc_dsql_allocate_statement@12 @178 ++ isc_dsql_alloc_statement2 = isc_dsql_alloc_statement2@12 @179 ++ isc_dsql_describe = isc_dsql_describe@16 @180 ++ isc_dsql_describe_bind = isc_dsql_describe_bind@16 @181 ++ isc_dsql_execute = isc_dsql_execute@20 @182 ++ isc_dsql_execute2 = isc_dsql_execute2@24 @183 ++ isc_dsql_execute_m = isc_dsql_execute_m@32 @184 ++ isc_dsql_execute2_m = isc_dsql_execute2_m@52 @185 ++ isc_dsql_execute_immediate = isc_dsql_execute_immediate@28 @186 ++ isc_dsql_exec_immed2 = isc_dsql_exec_immed2@32 @187 ++ isc_dsql_execute_immediate_m = isc_dsql_execute_immediate_m@44 @188 ++ isc_dsql_exec_immed2_m = isc_dsql_exec_immed2_m@64 @189 ++ isc_dsql_exec_immed3_m = isc_dsql_exec_immed3_m@64 @230 ++ isc_dsql_fetch = isc_dsql_fetch@16 @190 ++ isc_dsql_fetch_a = isc_dsql_fetch_a@20 @191 ++ isc_dsql_fetch_m = isc_dsql_fetch_m@28 @192 ++ isc_dsql_finish = isc_dsql_finish@4 @193 ++ isc_dsql_free_statement = isc_dsql_free_statement@12 @194 ++ isc_dsql_insert = isc_dsql_insert@16 @195 ++ isc_dsql_insert_m = isc_dsql_insert_m@28 @196 ++ isc_dsql_prepare = isc_dsql_prepare@28 @197 ++ isc_dsql_prepare_m = isc_dsql_prepare_m@40 @198 ++ isc_dsql_release = isc_dsql_release@8 @199 ++ isc_dsql_set_cursor_name = isc_dsql_set_cursor_name@16 @200 ++ isc_dsql_sql_info = isc_dsql_sql_info@24 @201 ++ ++ ; ESQL functions ++ ++ isc_embed_dsql_close = isc_embed_dsql_close@8 @202 ++ isc_embed_dsql_declare = isc_embed_dsql_declare@12 @203 ++ isc_embed_dsql_describe = isc_embed_dsql_describe@16 @204 ++ isc_embed_dsql_describe_bind = isc_embed_dsql_describe_bind@16 @205 ++ isc_embed_dsql_execute = isc_embed_dsql_execute@20 @206 ++ isc_embed_dsql_execute2 = isc_embed_dsql_execute2@24 @207 ++ isc_embed_dsql_execute_immed = isc_embed_dsql_execute_immed@28 @208 ++ isc_embed_dsql_exec_immed2 = isc_embed_dsql_exec_immed2@32 @209 ++ isc_embed_dsql_fetch = isc_embed_dsql_fetch@16 @210 ++ isc_embed_dsql_fetch_a = isc_embed_dsql_fetch_a@20 @211 ++ isc_embed_dsql_insert = isc_embed_dsql_insert@16 @212 ++ isc_embed_dsql_open = isc_embed_dsql_open@20 @213 ++ isc_embed_dsql_open2 = isc_embed_dsql_open2@24 @214 ++ isc_embed_dsql_prepare = isc_embed_dsql_prepare@32 @215 ++ isc_embed_dsql_release = isc_embed_dsql_release@8 @216 ++ isc_embed_dsql_length = isc_embed_dsql_length@8 @273 ++ ++ ; Error-handling functions ++ ++ isc_interprete = isc_interprete@8 @141 ++ fb_interpret = fb_interpret@12 ++ isc_print_sqlerror = isc_print_sqlerror@8 @150 ++ isc_print_status = isc_print_status@4 @151 ++ isc_sqlcode = isc_sqlcode@4 @165 ++ isc_sql_interprete = isc_sql_interprete@12 @164 ++ isc_sqlcode_s = isc_sqlcode_s@8 @278 ++ fb_sqlstate = fb_sqlstate@8 @279 ++ ++ ; Event functions ++ ++ isc_cancel_events = isc_cancel_events@12 @111 ++ isc_event_block = isc_event_block@0 @130 ++ isc_event_counts = isc_event_counts@16 @131 ++ isc_que_events = isc_que_events@28 @155 ++ isc_wait_for_event = isc_wait_for_event@20 @177 ++ isc_event_block_a = isc_event_block_a@16 @274 ++ isc_event_block_s = isc_event_block_s@20 @275 ++ ++ ; Security functions ++ ++ isc_add_user = isc_add_user@8 @256 ++ isc_delete_user = isc_delete_user@8 @257 ++ isc_modify_user = isc_modify_user@8 @258 ++ ++ ; Services functions ++ ++ isc_service_attach = isc_service_attach@24 @225 ++ isc_service_detach = isc_service_detach@8 @226 ++ isc_service_query = isc_service_query@36 @227 ++ isc_service_start = isc_service_start@20 @228 ++ ++ ; Transaction control functions ++ ++ isc_commit_retaining = isc_commit_retaining@8 @114 ++ isc_commit_transaction = isc_commit_transaction@8 @115 ++ isc_prepare_transaction = isc_prepare_transaction@8 @147 ++ isc_prepare_transaction2 = isc_prepare_transaction2@16 @148 ++ isc_rollback_retaining = isc_rollback_retaining@8 @260 ++ isc_rollback_transaction = isc_rollback_transaction@8 @160 ++ isc_start_multiple = isc_start_multiple@16 @167 ++ isc_start_transaction = isc_start_transaction@0 @169 ++ isc_transaction_info = isc_transaction_info@24 @171 ++ ++ ; Other functions ++ ++ isc_compile_request = isc_compile_request@20 @116 ++ isc_compile_request2 = isc_compile_request2@20 @117 ++ isc_ddl = isc_ddl@20 @123 ++ isc_prepare = isc_prepare@28 @146 ++ isc_receive = isc_receive@24 @156 ++ isc_reconnect_transaction = isc_reconnect_transaction@20 @157 ++ isc_release_request = isc_release_request@8 @158 ++ isc_request_info = isc_request_info@28 @159 ++ isc_seek_blob = isc_seek_blob@20 @161 ++ isc_send = isc_send@24 @162 ++ isc_start_and_send = isc_start_and_send@28 @166 ++ isc_start_request = isc_start_request@16 @168 ++ isc_transact_request = isc_transact_request@36 @132 ++ isc_unwind_request = isc_unwind_request@12 @172 ++ ++ ; Other SQL functions ++ ++ isc_close = isc_close@8 @112 ++ isc_declare = isc_declare@12 @124 ++ isc_describe = isc_describe@12 @126 ++ isc_describe_bind = isc_describe_bind@12 @127 ++ isc_execute = isc_execute@16 @133 ++ isc_execute_immediate = isc_execute_immediate@20 @134 ++ isc_fetch = isc_fetch@12 @136 ++ isc_fetch_a = isc_fetch_a@16 @137 ++ isc_open = isc_open@16 @143 ++ ++ ; Other BLOB functions ++ ++ BLOB_close = BLOB_close@4 @91 ++ BLOB_display = BLOB_display@16 @92 ++ BLOB_dump = BLOB_dump@16 @93 ++ BLOB_edit = BLOB_edit@16 @94 ++ BLOB_get = BLOB_get@4 @95 ++ BLOB_load = BLOB_load@16 @96 ++ BLOB_open = BLOB_open@12 @97 ++ BLOB_put = BLOB_put@8 @98 ++ BLOB_text_dump = BLOB_text_dump@16 @242 ++ BLOB_text_load = BLOB_text_load@16 @243 ++ Bopen = Bopen@16 @99 ++ ++ ; Other misc functions ++ ++ isc_ftof = isc_ftof@16 @138 ++ isc_free = isc_free@4 @241 ++ isc_print_blr = isc_print_blr@16 @149 ++ fb_print_blr = fb_print_blr@20 @280 ++ isc_qtoq = isc_qtoq@8 @154 ++ isc_reset_fpe = isc_reset_fpe@4 ++ isc_set_debug = isc_set_debug@4 @163 ++ isc_to_sqlda = isc_to_sqlda@20 @170 ++ isc_vtof = isc_vtof@12 @175 ++ isc_vtov = isc_vtov@12 @176 ++ isc_baddress = isc_baddress@4 @276 ++ isc_baddress_s = isc_baddress_s@8 @277 ++ ++;----------------- ++; OTHER FUNCTIONS ++;----------------- ++ ++ CVT_move = CVT_move@12 @267 ++ ++ KEYWORD_stringIsAToken = KEYWORD_stringIsAToken@4 @271 ++ KEYWORD_getTokens = KEYWORD_getTokens@0 @272 +diff --git a/builds/win32/defs/fbclient64.def b/builds/win32/defs/fbclient64.def +new file mode 100644 +index 0000000..ce3875c +--- /dev/null ++++ b/builds/win32/defs/fbclient64.def +@@ -0,0 +1,361 @@ ++; The contents of this file are subject to the Interbase Public ++; License Version 1.0 (the "License"); you may not use this file ++; except in compliance with the License. You may obtain a copy ++; of the License at http://www.Inprise.com/IPL.html ++; ++; Software distributed under the License is distributed on an ++; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express ++; or implied. See the License for the specific language governing ++; rights and limitations under the License. ++; ++; The Original Code was created by Inprise Corporation ++; and its predecessors. Portions created by Inprise Corporation are ++; Copyright (C) Inprise Corporation. ++; ++; All Rights Reserved. ++; Contributor(s): ______________________________________. ++ ++LIBRARY "fbclient.dll" ++EXPORTS ++ ++;------------------- ++; PRIVATE INTERFACE ++;------------------- ++ ++ gds__alloc @1 ++ gds__attach_database @2 ++ gds__blob_info @3 ++ gds__blob_size @4 ++ gds__cancel_blob @5 ++ gds__cancel_events @6 ++ gds__close @7 ++ gds__close_blob @8 ++ gds__commit_retaining @9 ++ gds__commit_transaction @10 ++ gds__compile_request @11 ++ gds__compile_request2 @12 ++ gds__create_blob @13 ++ gds__create_blob2 @14 ++ gds__create_database @15 ++ gds__database_cleanup @16 ++ gds__database_info @17 ++ gds__ddl @18 ++ gds__declare @19 ++ gds__decode @20 ++ gds__decode_date @21 ++ gds__describe @22 ++ gds__describe_bind @23 ++ gds__detach_database @24 ++ gds__disable_subsystem @25 ++ gds__dsql_finish @26 ++ gds__edit @27 ++ gds__enable_subsystem @28 ++ gds__encode @29 ++ gds__encode_date @30 ++ gds__event_block @31 ++ gds__event_counts @32 ++ gds__event_wait @33 ++ gds__execute @34 ++ gds__execute_immediate @35 ++ gds__fetch @36 ++ gds__free @37 ++ gds__ftof @38 ++ gds__get_prefix @248 ++ gds__get_segment @39 ++ gds__get_slice @40 ++ gds__interprete @41 ++ gds__log @42 ++ gds__log_status @142 ++ gds__map_blobs @240 ++ gds__msg_close @223 ++ gds__msg_format @43 ++ gds__msg_lookup @44 ++ gds__msg_open @45 ++ gds__msg_put @46 ++ gds__open @47 ++ gds__open_blob @48 ++ gds__open_blob2 @49 ++ gds__parse_bpb @50 ++ gds__prefix @51 ++ gds__prefix_lock @249 ++ gds__prefix_msg @250 ++ gds__prepare @52 ++ gds__prepare_transaction @53 ++ gds__prepare_transaction2 @54 ++ gds__print_blr @55 ++ gds__print_status @56 ++ gds__put_error @57 ++ gds__put_segment @58 ++ gds__put_slice @59 ++ gds__qtoq @60 ++ gds__que_events @61 ++ gds__receive @62 ++ gds__reconnect_transaction @63 ++ gds__register_cleanup @64 ++ gds__release_request @65 ++ gds__request_info @66 ++ gds__rollback_transaction @67 ++ gds__seek_blob @68 ++ gds__send @69 ++ gds__set_debug @70 ++ gds__sqlcode @71 ++ gds__start_and_send @72 ++ gds__start_multiple @73 ++ gds__start_request @74 ++ gds__start_transaction @75 ++ gds__temp_file @231 ++ gds__thread_enable @76 ++ gds__thread_enter @77 ++ gds__thread_exit @78 ++ gds__thread_start @79 ++ gds__to_sqlda @80 ++ gds__transaction_cleanup @235 ++ gds__transaction_info @81 ++ gds__unregister_cleanup @224 ++ gds__unwind_request @82 ++ gds__validate_lib_path @255 ++ gds__vax_integer @83 ++ gds__version @84 ++ gds__vtof @85 ++ gds__vtov @86 ++ gds__default_printer @87 ++ ++ gds__alloc_debug ++ ++ gds_alloc_flag_unfreed ++ gds_alloc_report ++ ++ fb_shutdown ++ fb_shutdown_callback ++ fb_cancel_operation ++ fb_disconnect_transaction ++ ++ perf_format @100 ++ perf_get_info @101 ++ perf_report @102 ++ ++ perf64_format ++ perf64_get_info ++ perf64_report ++ ++;---------------------------- ++; PUBLIC INTERFACE, i.e. API ++;---------------------------- ++ ++ ; Array functions ++ ++ isc_array_gen_sdl @217 ++ isc_array_get_slice @218 ++ isc_array_lookup_bounds @219 ++ isc_array_lookup_desc @220 ++ isc_array_put_slice @221 ++ isc_array_set_desc @222 ++ isc_get_slice @140 ++ isc_put_slice @153 ++ ++ ; BLOB functions ++ ++ isc_blob_default_desc @239 ++ isc_blob_gen_bpb @236 ++ isc_blob_info @108 ++ isc_blob_lookup_desc @237 ++ isc_blob_set_desc @238 ++ isc_cancel_blob @110 ++ isc_close_blob @113 ++ isc_create_blob @118 ++ isc_create_blob2 @119 ++ isc_get_segment @139 ++ isc_open_blob @144 ++ isc_open_blob2 @145 ++ isc_put_segment @152 ++ ++ ; Database functions ++ ++ isc_attach_database @103 ++ isc_create_database @120 ++ isc_database_info @122 ++ isc_detach_database @128 ++ isc_drop_database @229 ++ isc_expand_dpb @135 ++ isc_modify_dpb @244 ++ isc_version @174 ++ isc_get_client_major_version @268 ++ isc_get_client_minor_version @269 ++ isc_get_client_version @270 ++ ++ ; Conversion functions ++ ++ isc_decode_date @125 ++ isc_decode_sql_date @261 ++ isc_decode_sql_time @262 ++ isc_decode_timestamp @263 ++ isc_encode_date @129 ++ isc_encode_sql_date @264 ++ isc_encode_sql_time @265 ++ isc_encode_timestamp @266 ++ isc_portable_integer @259 ++ isc_vax_integer @173 ++ ++ ; DSQL functions ++ ++ isc_dsql_allocate_statement @178 ++ isc_dsql_alloc_statement2 @179 ++ isc_dsql_describe @180 ++ isc_dsql_describe_bind @181 ++ isc_dsql_execute @182 ++ isc_dsql_execute2 @183 ++ isc_dsql_execute_m @184 ++ isc_dsql_execute2_m @185 ++ isc_dsql_execute_immediate @186 ++ isc_dsql_exec_immed2 @187 ++ isc_dsql_execute_immediate_m @188 ++ isc_dsql_exec_immed2_m @189 ++ isc_dsql_exec_immed3_m @230 ++ isc_dsql_fetch @190 ++ isc_dsql_fetch_a @191 ++ isc_dsql_fetch_m @192 ++ isc_dsql_finish @193 ++ isc_dsql_free_statement @194 ++ isc_dsql_insert @195 ++ isc_dsql_insert_m @196 ++ isc_dsql_prepare @197 ++ isc_dsql_prepare_m @198 ++ isc_dsql_release @199 ++ isc_dsql_set_cursor_name @200 ++ isc_dsql_sql_info @201 ++ ++ ; ESQL functions ++ ++ isc_embed_dsql_close @202 ++ isc_embed_dsql_declare @203 ++ isc_embed_dsql_describe @204 ++ isc_embed_dsql_describe_bind @205 ++ isc_embed_dsql_execute @206 ++ isc_embed_dsql_execute2 @207 ++ isc_embed_dsql_execute_immed @208 ++ isc_embed_dsql_exec_immed2 @209 ++ isc_embed_dsql_fetch @210 ++ isc_embed_dsql_fetch_a @211 ++ isc_embed_dsql_insert @212 ++ isc_embed_dsql_open @213 ++ isc_embed_dsql_open2 @214 ++ isc_embed_dsql_prepare @215 ++ isc_embed_dsql_release @216 ++ isc_embed_dsql_length @273 ++ ++ ; Error-handling functions ++ ++ isc_interprete @141 ++ fb_interpret ++ isc_print_sqlerror @150 ++ isc_print_status @151 ++ isc_sqlcode @165 ++ isc_sql_interprete @164 ++ isc_sqlcode_s @278 ++ fb_sqlstate @279 ++ ++ ; Event functions ++ ++ isc_cancel_events @111 ++ isc_event_block @130 ++ isc_event_counts @131 ++ isc_que_events @155 ++ isc_wait_for_event @177 ++ isc_event_block_a @274 ++ isc_event_block_s @275 ++ ++ ; Security functions ++ ++ isc_add_user @256 ++ isc_delete_user @257 ++ isc_modify_user @258 ++ ++ ; Services functions ++ ++ isc_service_attach @225 ++ isc_service_detach @226 ++ isc_service_query @227 ++ isc_service_start @228 ++ ++ ; Transaction control functions ++ ++ isc_commit_retaining @114 ++ isc_commit_transaction @115 ++ isc_prepare_transaction @147 ++ isc_prepare_transaction2 @148 ++ isc_rollback_retaining @260 ++ isc_rollback_transaction @160 ++ isc_start_multiple @167 ++ isc_start_transaction @169 ++ isc_transaction_info @171 ++ ++ ; Other functions ++ ++ isc_compile_request @116 ++ isc_compile_request2 @117 ++ isc_ddl @123 ++ isc_prepare @146 ++ isc_receive @156 ++ isc_reconnect_transaction @157 ++ isc_release_request @158 ++ isc_request_info @159 ++ isc_seek_blob @161 ++ isc_send @162 ++ isc_start_and_send @166 ++ isc_start_request @168 ++ isc_transact_request @132 ++ isc_unwind_request @172 ++ ++ ; Other SQL functions ++ ++ isc_close @112 ++ isc_declare @124 ++ isc_describe @126 ++ isc_describe_bind @127 ++ isc_execute @133 ++ isc_execute_immediate @134 ++ isc_fetch @136 ++ isc_fetch_a @137 ++ isc_open @143 ++ ++ ; Other BLOB functions ++ ++ BLOB_close @91 ++ BLOB_display @92 ++ BLOB_dump @93 ++ BLOB_edit @94 ++ BLOB_get @95 ++ BLOB_load @96 ++ BLOB_open @97 ++ BLOB_put @98 ++ BLOB_text_dump @242 ++ BLOB_text_load @243 ++ Bopen @99 ++ ++ ; Other misc functions ++ ++ isc_ftof @138 ++ isc_free @241 ++ isc_print_blr @149 ++ fb_print_blr @280 ++ isc_qtoq @154 ++ isc_reset_fpe ++ isc_set_debug @163 ++ isc_to_sqlda @170 ++ isc_vtof @175 ++ isc_vtov @176 ++ isc_baddress @276 ++ isc_baddress_s @277 ++ ++ _isc_start_transaction=isc_start_transaction ++ _isc_expand_dpb=isc_expand_dpb ++ _isc_event_block=isc_event_block ++ ++;----------------- ++; OTHER FUNCTIONS ++;----------------- ++ ++ CVT_move @267 ++ ++ KEYWORD_stringIsAToken @271 ++ KEYWORD_getTokens @272 +-- +2.6.3 + +From afcfff601bad46d04da2139f5f855062cb7000a0 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 26 Nov 2014 09:27:40 +0300 +Subject: [PATCH] Don't install unix files for Windows platform + +--- + configure.in | 66 ++++++++++++++++++++++++++++++++++++------------------------ + 1 file changed, 40 insertions(+), 26 deletions(-) + +diff --git a/configure.in b/configure.in +index 21384bf..10ad6a2 100644 +--- a/configure.in ++++ b/configure.in +@@ -1314,32 +1314,39 @@ MAKE_SRC_DIR=builds/posix + + dnl common files for all posix hosts + dnl TODO: fix "arch-specific/linux/" paths for common posix scripts with SVN +-AC_CONFIG_FILES([gen/install/misc/firebird.conf:builds/install/misc/firebird.conf.in +-gen/install/misc/aliases.conf:builds/install/misc/aliases.conf.in +-gen/install/misc/fbintl.conf:builds/install/misc/fbintl.conf +-gen/install/misc/fbtrace.conf:src/utilities/ntrace/fbtrace.conf +-gen/firebird/bin/fb_config:builds/install/misc/fb_config.in +-gen/firebird/bin/posixLibrary.sh:builds/install/misc/posixLibrary.sh.in +-gen/firebird/bin/classicLibrary.sh:builds/install/misc/classicLibrary.sh.in +-gen/firebird/bin/superLibrary.sh:builds/install/misc/superLibrary.sh.in +-gen/firebird/bin/changeRunUser.sh:builds/install/misc/changeRunUser.sh.in +-gen/firebird/bin/restoreRootRunUser.sh:builds/install/misc/restoreRootRunUser.sh.in +-gen/firebird/bin/tarMainInstall.sh:builds/install/arch-specific/linux/misc/tarMainInstall.sh.in +-gen/firebird/bin/tarinstall.sh:builds/install/arch-specific/linux/misc/tarinstall.sh.in +-gen/firebird/bin/preinstall.sh:builds/install/arch-specific/linux/misc/preinstall.sh.in +-gen/firebird/bin/postinstall.sh:builds/install/arch-specific/linux/misc/postinstall.sh.in +-gen/firebird/bin/preuninstall.sh:builds/install/arch-specific/linux/misc/preuninstall.sh.in +-gen/firebird/bin/postuninstall.sh:builds/install/arch-specific/linux/misc/postuninstall.sh.in +-gen/firebird/bin/taruninstall.sh:builds/install/arch-specific/linux/misc/taruninstall.sh.in +-gen/firebird/bin/tarMainUninstall.sh:builds/install/arch-specific/linux/misc/tarMainUninstall.sh.in +-gen/firebird/bin/changeDBAPassword.sh:builds/install/misc/changeDBAPassword.sh.in +-gen/firebird/bin/changeGdsLibraryCompatibleLink.sh:builds/install/misc/changeGdsLibraryCompatibleLink.sh.in +-gen/firebird/bin/createAliasDB.sh:builds/install/misc/createAliasDB.sh.in], +-[chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null]) +- +-if test $FIREBIRD_ARCH_TYPE = classic; then +- AC_CONFIG_FILES([gen/firebird/bin/changeMultiConnectMode.sh:builds/install/misc/changeMultiConnectMode.sh.in], +- [chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null]) ++if test $PLATFORM = win32; then ++ AC_CONFIG_FILES(gen/firebird/firebird.conf:builds/install/misc/firebird.conf.in ++ gen/firebird/aliases.conf:builds/install/misc/aliases.conf.in ++ gen/firebird/intl/fbintl.conf:builds/install/misc/fbintl.conf ++ gen/firebird/fbtrace.conf:src/utilities/ntrace/fbtrace.conf) ++else ++ AC_CONFIG_FILES([gen/install/misc/firebird.conf:builds/install/misc/firebird.conf.in ++ gen/install/misc/aliases.conf:builds/install/misc/aliases.conf.in ++ gen/install/misc/fbintl.conf:builds/install/misc/fbintl.conf ++ gen/install/misc/fbtrace.conf:src/utilities/ntrace/fbtrace.conf ++ gen/firebird/bin/fb_config:builds/install/misc/fb_config.in ++ gen/firebird/bin/posixLibrary.sh:builds/install/misc/posixLibrary.sh.in ++ gen/firebird/bin/classicLibrary.sh:builds/install/misc/classicLibrary.sh.in ++ gen/firebird/bin/superLibrary.sh:builds/install/misc/superLibrary.sh.in ++ gen/firebird/bin/changeRunUser.sh:builds/install/misc/changeRunUser.sh.in ++ gen/firebird/bin/restoreRootRunUser.sh:builds/install/misc/restoreRootRunUser.sh.in ++ gen/firebird/bin/tarMainInstall.sh:builds/install/arch-specific/linux/misc/tarMainInstall.sh.in ++ gen/firebird/bin/tarinstall.sh:builds/install/arch-specific/linux/misc/tarinstall.sh.in ++ gen/firebird/bin/preinstall.sh:builds/install/arch-specific/linux/misc/preinstall.sh.in ++ gen/firebird/bin/postinstall.sh:builds/install/arch-specific/linux/misc/postinstall.sh.in ++ gen/firebird/bin/preuninstall.sh:builds/install/arch-specific/linux/misc/preuninstall.sh.in ++ gen/firebird/bin/postuninstall.sh:builds/install/arch-specific/linux/misc/postuninstall.sh.in ++ gen/firebird/bin/taruninstall.sh:builds/install/arch-specific/linux/misc/taruninstall.sh.in ++ gen/firebird/bin/tarMainUninstall.sh:builds/install/arch-specific/linux/misc/tarMainUninstall.sh.in ++ gen/firebird/bin/changeDBAPassword.sh:builds/install/misc/changeDBAPassword.sh.in ++ gen/firebird/bin/changeGdsLibraryCompatibleLink.sh:builds/install/misc/changeGdsLibraryCompatibleLink.sh.in ++ gen/firebird/bin/createAliasDB.sh:builds/install/misc/createAliasDB.sh.in], ++ [chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null]) ++ ++ if test $FIREBIRD_ARCH_TYPE = classic; then ++ AC_CONFIG_FILES([gen/firebird/bin/changeMultiConnectMode.sh:builds/install/misc/changeMultiConnectMode.sh.in], ++ [chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null]) ++ fi + fi + + dnl: Platform Specific Files +@@ -1439,6 +1446,13 @@ case "$PLATFORM" in + + DARWIN) + ;; ++ ++ win32) ++ AC_CONFIG_FILES(gen/firebird/install_classic.bat:builds/install/arch-specific/win32/install_classic.bat ++ gen/firebird/install_super.bat:builds/install/arch-specific/win32/install_super.bat ++ gen/firebird/install_superclassic.bat:builds/install/arch-specific/win32/install_superclassic.bat ++ gen/firebird/uninstall.bat:builds/install/arch-specific/win32/uninstall.bat) ++ ;; + esac + if test -f ${MAKE_SRC_DIR}/postfix.${MAKEFILE_POSTFIX};then + POSTFIX_FILE=gen/make.platform.postfix:${MAKE_SRC_DIR}/postfix.${MAKEFILE_POSTFIX} +-- +2.6.3 + +From fc0bb8741b23cf77250bad66013b302ecf094bd8 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Wed, 26 Nov 2014 09:27:40 +0300 +Subject: [PATCH] Fix rules to use variables. + +--- + builds/posix/Makefile.in.examples | 18 +++++++++--------- + builds/posix/Makefile.in.refDatabases | 8 ++++---- + builds/posix/make.defaults | 2 +- + 3 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/builds/posix/Makefile.in.examples b/builds/posix/Makefile.in.examples +index 3137649..ade180b 100644 +--- a/builds/posix/Makefile.in.examples ++++ b/builds/posix/Makefile.in.examples +@@ -117,9 +117,9 @@ $(EXAMPLES_DEST)% : $(EXAMPLES_SRC)% + + + $(EXAMPLES_DEST)/employee.fdb: $(EXAMPLES_DEST)/empbuild$(EXEC_EXT) $(INPUT_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT) +- -$(RM) employee.fdb +- ./empbuild employee.fdb +- -$(CHMOD_6) employee.fdb ++ -$(RM) $(EXAMPLES_DEST)/employee.fdb ++ $(EXAMPLES_DEST)/empbuild$(EXEC_EXT) $(EXAMPLES_DEST)/employee.fdb ++ -$(CHMOD_6) $(EXAMPLES_DEST)/employee.fdb + + # To get past the fact isql is called from the programs, we create a local link + # to the static one in this directory +@@ -134,16 +134,16 @@ $(EXAMPLES_DEST)/empbuild.c: $(EXAMPLES_DEST)/empbuild.fdb $(EXAMPLES_DEST)/empb + + $(EXAMPLES_DEST)/empbuild.fdb : $(EXAMPLES_DEST)/empddl.sql $(EXAMPLES_DEST)/empbld.sql $(EXAMPLES_DEST)/isql$(EXEC_EXT) + -$(RM) $(EXAMPLES_DEST)/empbuild.fdb +- $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i empbld.sql ++ $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i $(EXAMPLES_DEST)/empbld.sql + + # The chain for intlemp.fdb is the same a script file to create an empty database + # to allow a .e program to be compiled, to then create and populate with data + # the intlemp.fdb database. + + $(EXAMPLES_DEST)/intlemp.fdb: $(EXAMPLES_DEST)/intlbld$(EXEC_EXT) $(INTL_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT) +- -$(RM) intlemp.fdb +- ./intlbld intlemp.fdb +- -$(CHMOD_6) intlemp.fdb ++ -$(RM) $(EXAMPLES_DEST)/intlemp.fdb ++ $(EXAMPLES_DEST)/intlbld$(EXEC_EXT) $(EXAMPLES_DEST)/intlemp.fdb ++ -$(CHMOD_6) $(EXAMPLES_DEST)/intlemp.fdb + + $(EXAMPLES_DEST)/intlbld$(EXEC_EXT): $(INTLBLD_Objects) $(COMMON_Objects) $(LIBFBSTATIC_A) + $(EXE_LINK) $(LINK_OPTS) $(INTLBLD_Objects) $(COMMON_Objects) -o $@ -L$(LIB) -lfbstatic $(LINK_LIBS) $(ICU_LIBS) +@@ -151,8 +151,8 @@ $(EXAMPLES_DEST)/intlbld$(EXEC_EXT): $(INTLBLD_Objects) $(COMMON_Objects) $(LIBF + $(EXAMPLES_DEST)/intlbld.c: $(EXAMPLES_DEST)/intlbuild.fdb $(EXAMPLES_DEST)/intlbld.e + + $(EXAMPLES_DEST)/intlbuild.fdb : $(EXAMPLES_DEST)/intlddl.sql $(EXAMPLES_DEST)/intlbld.sql $(EXAMPLES_DEST)/isql$(EXEC_EXT) +- -$(RM) intlbuild.fdb +- $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i intlbld.sql ++ -$(RM) $(EXAMPLES_DEST)/intlbuild.fdb ++ $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i $(EXAMPLES_DEST)/intlbld.sql + + + $(EXAMPLES_DEST)/%.sql: $(EXAMPLES_SRC)/empbuild/%.sql +diff --git a/builds/posix/Makefile.in.refDatabases b/builds/posix/Makefile.in.refDatabases +index c1b61a6..68016cc 100644 +--- a/builds/posix/Makefile.in.refDatabases ++++ b/builds/posix/Makefile.in.refDatabases +@@ -65,7 +65,7 @@ empty_db : empty.fdb yachts.lnk + empty.fdb : $(CREATE_DB) + $(MAKE) -f $(GEN_ROOT)/Makefile.static.createdb + -$(RM) $@ +- $(BIN)/create_db $@ ++ $(CREATE_DB) $@ + $(TOUCH) $@ + $(CHMOD) 444 $@ + +@@ -99,7 +99,7 @@ help.fdb: $(FIREBIRD)/help/help.fdb + $(LN) -f $^ $@ + + $(FIREBIRD)/help/help.fdb: $(BLD_ROOT)/misc/help.gbak +- $(BIN)/gbak_static -MODE read_only -R $< $@ ++ $(GBAK_STATIC) -MODE read_only -R $< $@ + $(TOUCH) $@ + $(CHMOD) 444 $@ + +@@ -114,7 +114,7 @@ security2.fdb: $(SRC_ROOT)/dbs/security.sql + $(CHMOD) a=rw $@ + + metadata.fdb: $(BLD_ROOT)/misc/metadata.gbak +- $(BIN)/gbak_static -MODE read_only -R $< $@ ++ $(GBAK_STATIC) -MODE read_only -R $< $@ + $(TOUCH) $@ + $(CHMOD) 444 $@ + +@@ -122,7 +122,7 @@ metadata.fdb: $(BLD_ROOT)/misc/metadata.gbak + # since it ensures the data is valid. + + metadata.fdb.x: $(SRC_ROOT)/misc/metadata.sql +- $(BIN)/isql -i $< ++ $(ISQL) -i $< + $(TOUCH) $@ + $(CHMOD) 444 $@ + +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index bc96ceb..2e60fd3 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -183,7 +183,7 @@ SHRLIB_FOREIGN_EXT= $(SHRLIB_EXT) + + vpath %.so $(LIB) + vpath %.a $(LIB) +-vpath %.dll $(LIB) ++vpath %.dll $(BIN) + + #_____________________________________________________________________________ + +-- +2.6.3 + +From f89bf5d222d9fe9c4e852b21f68f4f1f8697c538 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 30 Nov 2014 09:27:40 +0300 +Subject: [PATCH] Auto detect WINDRES with autoconf. + +Fix building .rc files. +--- + builds/posix/make.defaults | 4 +++- + builds/posix/make.rules | 4 ++-- + builds/posix/make.shared.targets | 10 +++++----- + configure.in | 10 ++++++++++ + 4 files changed, 20 insertions(+), 8 deletions(-) + +diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults +index 2e60fd3..8e3a39f 100755 +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -139,9 +139,11 @@ ECHO= echo + QUIET_ECHO= @echo + CD= cd + CAT= cat +-AR= ar @AR_OPTIONS@ crsu ++AR= @AR@ @AR_OPTIONS@ crsu + LN= @LN_S@ ++DLLTOOL= @DLLTOOL@ + RANLIB= @RANLIB@ ++RC= @RC@ + BTYACC=$(ROOT)/extern/btyacc/btyacc + + CC = @CC@ +diff --git a/builds/posix/make.rules b/builds/posix/make.rules +index a784cb2..600b8f9 100644 +--- a/builds/posix/make.rules ++++ b/builds/posix/make.rules +@@ -115,5 +115,5 @@ $(OBJ)/%.o: $(SRC_ROOT)/%.cpp + + # Rules for making resource files + +-$(GEN_ROOT)/%.res: $(SRC_ROOT)/%.rc +- windres --output-format=coff --include-dir=$( +Date: Wed, 26 Nov 2014 09:27:40 +0300 +Subject: [PATCH] Create symlinks of fbembed only if names are different + +--- + builds/posix/Makefile.in.libfbembed | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/builds/posix/Makefile.in.libfbembed b/builds/posix/Makefile.in.libfbembed +index d919ba2..2e70ab9 100644 +--- a/builds/posix/Makefile.in.libfbembed ++++ b/builds/posix/Makefile.in.libfbembed +@@ -61,14 +61,18 @@ Dependencies = $(AllObjects:.o=.d) + + libfbembed : $(LIBIBUTIL_SO) $(LIBFBEMBED_SONAME) + +-$(LIBFBEMBED_SO): $(LIBFBEMBED_Objects) $(SERVER_Objects) $(COMMON_Objects) +- $(LINK_EMBED) -o $@ $^ $(LINK_EMBED_LIBS) +- ++ifneq ($(SharedLibraryName),$(SharedLibrarySoName)) + $(LIBFBEMBED_SOBASENAME): $(LIBFBEMBED_SO) + (cd $(LIB) && $(LN) -f $(SharedLibraryName) $(SharedLibrarySoName) ) ++endif + ++ifneq ($(SharedLibrarySoName),$(SharedLibraryBaseName)) + $(LIBFBEMBED_SONAME): $(LIBFBEMBED_SOBASENAME) + (cd $(LIB) && $(LN) -f $(SharedLibrarySoName) $(SharedLibraryBaseName) ) ++endif ++ ++$(LIBFBEMBED_SO): $(LIBFBEMBED_Objects) $(SERVER_Objects) $(COMMON_Objects) ++ $(LINK_EMBED) -o $@ $^ $(LINK_EMBED_LIBS) + + include $(ROOT)/gen/make.shared.targets + +-- +2.6.3 + +From 2b8ee995b010c730317ba3c24e0b76fb373cc23a Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 23 Nov 2014 09:27:40 +0300 +Subject: [PATCH] mod_loader: mingw always link to msvcrt.dll + +--- + src/jrd/os/win32/mod_loader.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/jrd/os/win32/mod_loader.cpp b/src/jrd/os/win32/mod_loader.cpp +index 76ceeca..51694ba 100644 +--- a/src/jrd/os/win32/mod_loader.cpp ++++ b/src/jrd/os/win32/mod_loader.cpp +@@ -74,7 +74,7 @@ public: + // if we don't use MSVC then we don't use MS CRT ? + // NS: versions of MSVC before 2005 and, as preliminary reports suggest, + // after 2008 do not need this hack +-#if !defined(_MSC_VER) || (_MSC_VER < 1400) ++#if (!defined(_MSC_VER) || (_MSC_VER < 1400)) && !defined(__MINGW32__) + return; + #else + +@@ -89,7 +89,9 @@ public: + if ((*mFindActCtxSectionString) + (0, NULL, + ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, +-#if _MSC_VER == 1400 ++#if defined(__MINGW32__) ++ "msvcrt.dll", ++#elif _MSC_VER == 1400 + "msvcr80.dll", + #elif _MSC_VER == 1500 + "msvcr90.dll", +-- +2.6.3 + +From 0ea44058670d4b02816b44698bcaaceeecf1a554 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 23 Nov 2014 09:27:40 +0300 +Subject: [PATCH] Relocate paths for unix-like files layout. + +--- + builds/posix/make.shared.variables | 4 +- + src/common/pathtools.cpp | 538 +++++++++++++++++++++++++++++++++++++ + src/common/pathtools.h | 53 ++++ + src/common/utils.cpp | 21 +- + src/jrd/gds.cpp | 7 +- + src/jrd/os/win32/config_root.cpp | 7 +- + src/jrd/os/win32/path_utils.cpp | 5 +- + 7 files changed, 623 insertions(+), 12 deletions(-) + create mode 100644 src/common/pathtools.cpp + create mode 100644 src/common/pathtools.h + +diff --git a/builds/posix/make.shared.variables b/builds/posix/make.shared.variables +index ef6099e..b10dae4 100644 +--- a/builds/posix/make.shared.variables ++++ b/builds/posix/make.shared.variables +@@ -259,7 +259,7 @@ VULCAN_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(VULCAN_Source + # common + + FBCOMMON_ClientFiles = fb_exception.cpp thd.cpp classes/MetaName.cpp StatusHolder.cpp classes/init.cpp StatusArg.cpp +-FBCOMMON_ServerFiles = utils.cpp ++FBCOMMON_ServerFiles = utils.cpp pathtools.cpp + + FBCOMMON_ClientObjects = $(addprefix $(OBJ)/common/, $(addsuffix .o, $(basename $(FBCOMMON_ClientFiles)))) \ + $(addprefix $(OBJ)/jrd/, $(addsuffix .o, $(basename fbsyslog.cpp))) +@@ -287,7 +287,7 @@ CLUMPLETS_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(CLUMPLETS_ + # just in case if make.platform defined some files + OS_SPECIFIC_Files += config_root.cpp path_utils.cpp mod_loader.cpp guid.cpp os_utils.cpp + +-OS_SPECIFIC_Sources = $(addprefix jrd/, $(OS_SPECIFIC_Files)) common/dllinst.cpp ++OS_SPECIFIC_Sources = $(addprefix jrd/, $(OS_SPECIFIC_Files)) common/dllinst.cpp common/pathtools.cpp + ifneq ($(strip @BINRELOC_CFLAGS@),) + OS_SPECIFIC_Sources += $(ROOT)/extern/binreloc/binreloc.c + endif +diff --git a/src/common/pathtools.cpp b/src/common/pathtools.cpp +new file mode 100644 +index 0000000..9291ffd +--- /dev/null ++++ b/src/common/pathtools.cpp +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff --git a/src/common/pathtools.h b/src/common/pathtools.h +new file mode 100644 +index 0000000..139b7c2 +--- /dev/null ++++ b/src/common/pathtools.h +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ +diff --git a/src/common/utils.cpp b/src/common/utils.cpp +index 34c7c5c..5991363 100644 +--- a/src/common/utils.cpp ++++ b/src/common/utils.cpp +@@ -43,6 +43,7 @@ + #include "../common/utils_proto.h" + #include "../common/classes/locks.h" + #include "../common/classes/init.h" ++#include "../common/pathtools.h" + #include "../jrd/constants.h" + #include "../jrd/os/path_utils.h" + #include "../jrd/os/fbsyslog.h" +@@ -929,9 +930,23 @@ Firebird::PathName getPrefix(FB_DIR prefType, const char* name) + + #ifndef BOOT_BUILD + const char* configDir[] = { +- FB_BINDIR, FB_SBINDIR, FB_CONFDIR, FB_LIBDIR, FB_INCDIR, FB_DOCDIR, FB_UDFDIR, FB_SAMPLEDIR, +- FB_SAMPLEDBDIR, FB_HELPDIR, FB_INTLDIR, FB_MISCDIR, FB_SECDBDIR, FB_MSGDIR, FB_LOGDIR, +- FB_GUARDDIR, FB_PLUGDIR ++ single_path_relocation(FB_BINDIR,FB_BINDIR), ++ single_path_relocation(FB_BINDIR,FB_SBINDIR), ++ single_path_relocation(FB_BINDIR,FB_CONFDIR), ++ single_path_relocation(FB_BINDIR,FB_LIBDIR), ++ single_path_relocation(FB_BINDIR,FB_INCDIR), ++ single_path_relocation(FB_BINDIR,FB_DOCDIR), ++ single_path_relocation(FB_BINDIR,FB_UDFDIR), ++ single_path_relocation(FB_BINDIR,FB_SAMPLEDIR), ++ single_path_relocation(FB_BINDIR,FB_SAMPLEDBDIR), ++ single_path_relocation(FB_BINDIR,FB_HELPDIR), ++ single_path_relocation(FB_BINDIR,FB_INTLDIR), ++ single_path_relocation(FB_BINDIR,FB_MISCDIR), ++ single_path_relocation(FB_BINDIR,FB_SECDBDIR), ++ single_path_relocation(FB_BINDIR,FB_MSGDIR), ++ single_path_relocation(FB_BINDIR,FB_LOGDIR), ++ single_path_relocation(FB_BINDIR,FB_GUARDDIR), ++ single_path_relocation(FB_BINDIR,FB_PLUGDIR) + }; + + fb_assert(FB_NELEM(configDir) == FB_DIR_LAST); +diff --git a/src/jrd/gds.cpp b/src/jrd/gds.cpp +index a4ccaa9..a802e8c 100644 +--- a/src/jrd/gds.cpp ++++ b/src/jrd/gds.cpp +@@ -56,6 +56,7 @@ + #include "../common/classes/timestamp.h" + #include "../common/classes/init.h" + #include "../common/classes/TempFile.h" ++#include "../common/pathtools.h" + #include "../common/utils_proto.h" + + #ifdef HAVE_UNISTD_H +@@ -3604,13 +3605,13 @@ public: + { + prefix = Config::getRootDirectory(); + if (prefix.isEmpty() && !GetProgramFilesDir(prefix)) +- prefix = FB_CONFDIR[0] ? FB_CONFDIR : FB_PREFIX; ++ prefix = FB_CONFDIR[0] ? single_path_relocation(FB_BINDIR,FB_CONFDIR) : single_path_relocation(FB_BINDIR,FB_PREFIX); + } + catch (Firebird::fatal_exception&) + { + // CVC: Presumably here we failed because the config file can't be located. + if (!GetProgramFilesDir(prefix)) +- prefix = FB_CONFDIR[0] ? FB_CONFDIR : FB_PREFIX; ++ prefix = FB_CONFDIR[0] ? single_path_relocation(FB_BINDIR,FB_CONFDIR) : single_path_relocation(FB_BINDIR,FB_PREFIX); + } + prefix.copyTo(fb_prefix_val, sizeof(fb_prefix_val)); + fb_prefix = fb_prefix_val; +@@ -3693,7 +3694,7 @@ public: + Firebird::PathName msgPrefix; + if (!fb_utils::readenv(FB_MSG_ENV, msgPrefix)) + { +- msgPrefix = FB_MSGDIR[0] ? FB_MSGDIR : prefix; ++ msgPrefix = FB_MSGDIR[0] ? single_path_relocation(FB_BINDIR,FB_MSGDIR) : prefix; + } + msgPrefix.copyTo(fb_prefix_msg_val, sizeof(fb_prefix_msg_val)); + fb_prefix_msg = fb_prefix_msg_val; +diff --git a/src/jrd/os/win32/config_root.cpp b/src/jrd/os/win32/config_root.cpp +index f5c7d54..deb33cc 100644 +--- a/src/jrd/os/win32/config_root.cpp ++++ b/src/jrd/os/win32/config_root.cpp +@@ -28,6 +28,7 @@ + #include "fb_types.h" + #include "../../../common/classes/fb_string.h" + #include "../../../common/dllinst.h" ++#include "../../../common/pathtools.h" + + #include "../jrd/os/config_root.h" + #include "../utilities/install/registry.h" +@@ -88,7 +89,7 @@ bool getBinFromHInstance(PathName& root) + void ConfigRoot::osConfigRoot() + { + // check the registry first +-#if defined(SUPERCLIENT) ++#if defined(SUPERCLIENT) && !defined(__MINGW32__) + if (getRootFromRegistry(root_dir)) + { + addSlash(); +@@ -125,7 +126,7 @@ void ConfigRoot::osConfigRoot() + } + + // As a last resort get it from the default install directory +- root_dir = FB_PREFIX; ++ root_dir = single_path_relocation(FB_BINDIR,FB_PREFIX); + } + + void ConfigRoot::osConfigInstallDir() +@@ -159,5 +160,5 @@ void ConfigRoot::osConfigInstallDir() + } + + // As a last resort get it from the default install directory +- install_dir = FB_PREFIX; ++ install_dir = single_path_relocation(FB_BINDIR,FB_PREFIX); + } +diff --git a/src/jrd/os/win32/path_utils.cpp b/src/jrd/os/win32/path_utils.cpp +index 6e22f15..48186bc 100644 +--- a/src/jrd/os/win32/path_utils.cpp ++++ b/src/jrd/os/win32/path_utils.cpp +@@ -4,8 +4,11 @@ + #include // _access + + /// The Win32 implementation of the path_utils abstraction. +- ++#if defined(__MINGW32__) ++const char PathUtils::dir_sep = '/'; ++#else + const char PathUtils::dir_sep = '\\'; ++#endif + const char* PathUtils::up_dir_link = ".."; + + class Win32DirItr : public PathUtils::dir_iterator +-- +2.6.3 + +From 5f5d09df508bb5697111d257fc8a032e6650ef47 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 11 Nov 2014 09:27:40 +0300 +Subject: [PATCH] Fix building gstat + +--- + src/utilities/gstat/dba.epp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/utilities/gstat/dba.epp b/src/utilities/gstat/dba.epp +index 76a10c5..71e6cf5 100644 +--- a/src/utilities/gstat/dba.epp ++++ b/src/utilities/gstat/dba.epp +@@ -42,7 +42,7 @@ + #include "../jrd/ibase.h" + #include "../jrd/ods.h" + #include "../jrd/btn.h" +-#include "../jrd/svc.h" ++#include "../jrd/ThreadData.h" + #include "../jrd/license.h" + #include "../jrd/msg_encode.h" + #include "../jrd/gdsassert.h" +-- +2.6.3 + +From d51de336a30cf7ebed7244431f50e73daf292e91 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Sun, 22 Nov 2015 17:09:05 +0300 +Subject: [PATCH] Fix using function pointer. + +--- + src/common/classes/locks.cpp | 3 ++- + src/common/classes/locks.h | 7 +++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/common/classes/locks.cpp b/src/common/classes/locks.cpp +index de6b2f8..aaf7f86 100644 +--- a/src/common/classes/locks.cpp ++++ b/src/common/classes/locks.cpp +@@ -124,7 +124,8 @@ BOOL WINAPI TryEnterCriticalSection_Win9X(CRITICAL_SECTION* cs) + + // On Win 98 and Win ME TryEnterCriticalSection is defined, but not implemented + // So direct linking to it won't hurt and will signal our incompatibility with Win 95 +-TryEnterCS::tTryEnterCriticalSection* TryEnterCS::m_funct = &TryEnterCriticalSection; ++TryEnterCS::tTryEnterCriticalSection TryEnterCS::m_funct = ++ reinterpret_cast(TryEnterCriticalSection); + + static TryEnterCS tryEnterCS; + +diff --git a/src/common/classes/locks.h b/src/common/classes/locks.h +index 75ba194..3586592 100644 +--- a/src/common/classes/locks.h ++++ b/src/common/classes/locks.h +@@ -60,14 +60,13 @@ public: + + static bool tryEnter(LPCRITICAL_SECTION lpCS) + { +- return ((*m_funct) (lpCS) == TRUE); ++ return ((m_funct) (lpCS) == TRUE); + } + + private: +- typedef WINBASEAPI BOOL WINAPI tTryEnterCriticalSection +- (LPCRITICAL_SECTION lpCriticalSection); ++ typedef BOOL (WINAPI *tTryEnterCriticalSection)(LPCRITICAL_SECTION lpCriticalSection); + +- static tTryEnterCriticalSection* m_funct; ++ static tTryEnterCriticalSection m_funct; + }; + + class Mutex +-- +2.6.3 + diff --git a/mingw-w64-firefox/.mozconfig.i686 b/mingw-w64-firefox/.mozconfig.i686 new file mode 100644 index 0000000000..3f5234d1b7 --- /dev/null +++ b/mingw-w64-firefox/.mozconfig.i686 @@ -0,0 +1,20 @@ +#Specify the cross compile +export CROSS_COMPILE=1 +ac_add_options --enable-application=browser +ac_add_options --target=i686-w64-mingw32 +ac_add_options --enable-default-toolkit=cairo-windows +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mozilla-mingw.i686 + +ac_add_options --enable-debug +ac_add_options --disable-optimize + +ac_add_options --disable-updater +ac_add_options --disable-crashreporter +ac_add_options --disable-maintenance-service +ac_add_options --disable-webrtc +ac_add_options --without-intl-api + +# ac_add_options --disable-accessibility # uncomment if you don't have widl installed + +# Use parallel build. Adjust number of processes for your setup. +mk_add_options MOZ_MAKE_FLAGS=-j8 diff --git a/mingw-w64-firefox/.mozconfig.x86_64 b/mingw-w64-firefox/.mozconfig.x86_64 new file mode 100644 index 0000000000..b9fd4d3753 --- /dev/null +++ b/mingw-w64-firefox/.mozconfig.x86_64 @@ -0,0 +1,20 @@ +#Specify the cross compile +export CROSS_COMPILE=1 +ac_add_options --enable-application=browser +ac_add_options --target=x86_64-w64-mingw32 +ac_add_options --enable-default-toolkit=cairo-windows +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mozilla-mingw.x86_64 + +ac_add_options --enable-debug +ac_add_options --disable-optimize + +ac_add_options --disable-updater +ac_add_options --disable-crashreporter +ac_add_options --disable-maintenance-service +ac_add_options --disable-webrtc +ac_add_options --without-intl-api + +# ac_add_options --disable-accessibility # uncomment if you don't have widl installed + +# Use parallel build. Adjust number of processes for your setup. +mk_add_options MOZ_MAKE_FLAGS=-j8 diff --git a/mingw-w64-firefox/0001-Allow-MSYS2-shell.patch b/mingw-w64-firefox/0001-Allow-MSYS2-shell.patch new file mode 100644 index 0000000000..4c526b4c80 --- /dev/null +++ b/mingw-w64-firefox/0001-Allow-MSYS2-shell.patch @@ -0,0 +1,12 @@ +diff -urN a/python/mach/mach/mixin/process.py b/python/mach/mach/mixin/process.py +--- a/python/mach/mach/mixin/process.py 2015-07-13 21:48:50.238620500 +0100 ++++ b/python/mach/mach/mixin/process.py 2015-07-13 21:59:40.972145000 +0100 +@@ -30,7 +30,7 @@ + + _in_msys = False + +-if os.environ.get('MSYSTEM', None) == 'MINGW32': ++if os.environ.get('MSYSTEM', None) in ['MINGW32', 'MINGW64', 'MSYS']: + _in_msys = True + + if not _current_shell.lower().endswith('.exe'): diff --git a/mingw-w64-firefox/0002-Allow-MSYS2-make.patch b/mingw-w64-firefox/0002-Allow-MSYS2-make.patch new file mode 100644 index 0000000000..91614184be --- /dev/null +++ b/mingw-w64-firefox/0002-Allow-MSYS2-make.patch @@ -0,0 +1,13 @@ +diff -urN a/config/baseconfig.mk b/config/baseconfig.mk +--- a/config/baseconfig.mk 2015-07-13 22:05:44.022749700 +0100 ++++ b/config/baseconfig.mk 2015-07-13 22:16:09.001405100 +0100 +@@ -31,9 +31,6 @@ + $(error Pymake is no longer supported. Please upgrade to MozillaBuild 1.9 or newer and build with 'mach' or 'mozmake') + endif + +-ifeq (a,$(firstword a$(subst /, ,$(abspath .)))) +-$(error MSYS make is not supported) +-endif + # 4.0- happens to be greater than 4.0, lower than the mozmake version, + # and lower than 4.0.1 or 4.1, whatever next version of gnu make will + # be released. diff --git a/mingw-w64-firefox/0003-Use-PYTHON-env-var.patch b/mingw-w64-firefox/0003-Use-PYTHON-env-var.patch new file mode 100644 index 0000000000..5ccc78a3b2 --- /dev/null +++ b/mingw-w64-firefox/0003-Use-PYTHON-env-var.patch @@ -0,0 +1,12 @@ +diff -urN a/mach b/mach +--- a/mach 2015-07-13 22:22:35.106011700 +0100 ++++ b/mach 2015-07-13 22:31:13.115823900 +0100 +@@ -6,7 +6,7 @@ + # The beginning of this script is both valid shell and valid python, + # such that the script starts with the shell and is reexecuted with + # the right python. +-'''which' python2.7 > /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@" ++'''which' ${PYTHON} > /dev/null && exec ${PYTHON} "$0" "$@" || exec python2.7 "$0" "$@" || exec python "$0" "$@" + ''' + + from __future__ import print_function, unicode_literals diff --git a/mingw-w64-firefox/0004-Allow-MSYS2-python.patch b/mingw-w64-firefox/0004-Allow-MSYS2-python.patch new file mode 100644 index 0000000000..21b3ea0221 --- /dev/null +++ b/mingw-w64-firefox/0004-Allow-MSYS2-python.patch @@ -0,0 +1,118 @@ +diff -urN a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4 +--- a/build/autoconf/config.status.m4 2015-07-13 22:34:59.729176500 +0100 ++++ b/build/autoconf/config.status.m4 2015-07-13 22:47:20.516343000 +0100 +@@ -87,7 +87,6 @@ + case "$host_os" in + mingw*) + WIN_TOP_SRC=`cd $srcdir; pwd -W` +- encoding=mbcs + ;; + esac + AC_SUBST(WIN_TOP_SRC) +diff -urN a/build/autoconf/python-virtualenv.m4 b/build/autoconf/python-virtualenv.m4 +--- a/build/autoconf/python-virtualenv.m4 2015-07-13 22:34:59.729176500 +0100 ++++ b/build/autoconf/python-virtualenv.m4 2015-07-13 22:47:20.520343200 +0100 +@@ -56,14 +56,7 @@ + $_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv \ + $_virtualenv_topsrcdir/build/virtualenv_packages.txt || exit 1 + +- case "$host_os" in +- mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe +- ;; +- *) +- PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python +- ;; +- esac ++ PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python + fi + + AC_SUBST(PYTHON) +diff -urN a/configure b/configure +--- a/configure 2015-07-13 22:37:44.550806000 +0100 ++++ b/configure 2015-07-13 22:47:20.534344000 +0100 +@@ -1367,7 +1367,7 @@ + exit 1 + break + fi +-MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd` ++MOZ_BUILD_ROOT=`pwd` + + + +@@ -1474,14 +1474,7 @@ + $_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv \ + $_virtualenv_topsrcdir/build/virtualenv_packages.txt || exit 1 + +- case "$host_os" in +- mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe +- ;; +- *) +- PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python +- ;; +- esac ++ PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python + fi + + +diff -urN a/configure.in b/configure.in +--- a/configure.in 2015-07-13 22:36:56.161466600 +0100 ++++ b/configure.in 2015-07-13 22:47:20.772353700 +0100 +@@ -133,7 +133,7 @@ + exit 1 + break + fi +-MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd` ++MOZ_BUILD_ROOT=`pwd` + + MOZ_PYTHON + +diff -urN a/js/src/configure b/js/src/configure +--- a/js/src/configure 2015-07-13 22:38:51.104908900 +0100 ++++ b/js/src/configure 2015-07-13 22:47:20.782353700 +0100 +@@ -1061,7 +1061,7 @@ + exit 1 + break + fi +-MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd` ++MOZ_BUILD_ROOT=`pwd` + + + # Check whether --with-dist-dir or --without-dist-dir was given. +@@ -4404,14 +4404,7 @@ + $_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv \ + $_virtualenv_topsrcdir/build/virtualenv_packages.txt || exit 1 + +- case "$host_os" in +- mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe +- ;; +- *) +- PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python +- ;; +- esac ++ PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python + fi + + +diff -urN a/python/virtualenv/virtualenv.py b/python/virtualenv/virtualenv.py +--- a/python/virtualenv/virtualenv.py 2015-07-13 22:35:33.117337000 +0100 ++++ b/python/virtualenv/virtualenv.py 2015-07-13 22:47:20.797353800 +0100 +@@ -45,6 +45,7 @@ + is_pypy = hasattr(sys, 'pypy_version_info') + is_win = (sys.platform == 'win32') + is_cygwin = (sys.platform == 'cygwin') ++is_msys = (sys.platform == 'msys') + is_darwin = (sys.platform == 'darwin') + abiflags = getattr(sys, 'abiflags', '') + +@@ -1276,7 +1277,7 @@ + executable = sys.executable + shutil.copyfile(executable, py_executable) + make_exe(py_executable) +- if is_win or is_cygwin: ++ if is_win or is_cygwin or is_msys: + pythonw = os.path.join(os.path.dirname(sys.executable), 'pythonw.exe') + if os.path.exists(pythonw): + logger.info('Also created pythonw.exe') diff --git a/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch b/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch new file mode 100644 index 0000000000..0c842a9705 --- /dev/null +++ b/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch @@ -0,0 +1,414 @@ +diff -urN firefox-39.0.orig/python/virtualenv/virtualenv.py firefox-39.0/python/virtualenv/virtualenv.py +--- firefox-39.0.orig/python/virtualenv/virtualenv.py 2015-07-15 15:31:44.566317100 +0100 ++++ firefox-39.0/python/virtualenv/virtualenv.py 2015-07-15 19:22:03.026946400 +0100 +@@ -41,6 +41,7 @@ + join = os.path.join + py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1]) + ++is_mingw = (sys.platform == 'win32' and 'GCC' in sys.version) + is_jython = sys.platform.startswith('java') + is_pypy = hasattr(sys, 'pypy_version_info') + is_win = (sys.platform == 'win32') +@@ -65,7 +66,7 @@ + + # Return a mapping of version -> Python executable + # Only provided for Windows, where the information in the registry is used +-if not is_win: ++if not is_win or is_mingw: + def get_installed_pythons(): + return {} + else: +@@ -1003,7 +1004,7 @@ + where scripts go, etc)""" + # XXX: We'd use distutils.sysconfig.get_python_inc/lib but its + # prefix arg is broken: http://bugs.python.org/issue3386 +- if is_win: ++ if is_win and not is_mingw: + # Windows has lots of problems with executables with spaces in + # the name; this function will remove them (using the ~1 + # format): +@@ -1035,7 +1036,7 @@ + lib_dir = home_dir + inc_dir = join(home_dir, 'include') + bin_dir = join(home_dir, 'bin') +- elif not is_win: ++ elif not is_win or is_mingw: + lib_dir = join(home_dir, 'lib', py_version) + multiarch_exec = '/usr/bin/multiarch-platform' + if is_executable_file(multiarch_exec): +@@ -1160,7 +1161,7 @@ + mkdir(lib_dir) + fix_lib64(lib_dir, symlink) + stdlib_dirs = [os.path.dirname(os.__file__)] +- if is_win: ++ if is_win and not is_mingw: + stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs')) + elif is_darwin: + stdlib_dirs.append(join(stdlib_dirs[0], 'site-packages')) +@@ -1197,7 +1198,7 @@ + if not site_packages: + writefile(site_packages_filename, '') + +- if is_pypy or is_win: ++ if is_pypy or (is_win and not is_mingw): + stdinc_dir = join(prefix, 'include') + else: + stdinc_dir = join(prefix, 'include', py_version + abiflags) +@@ -1223,7 +1224,7 @@ + + # pypy never uses exec_prefix, just ignore it + if sys.exec_prefix != prefix and not is_pypy: +- if is_win: ++ if is_win and not is_mingw: + exec_dir = join(sys.exec_prefix, 'lib') + elif is_jython: + exec_dir = join(sys.exec_prefix, 'Lib') +@@ -1291,8 +1293,9 @@ + os.unlink(python_d_dest) + # we need to copy the DLL to enforce that windows will load the correct one. + # may not exist if we are cygwin. +- py_executable_dll = 'python%s%s.dll' % ( +- sys.version_info[0], sys.version_info[1]) ++ import sysconfig ++ py_executable_dll = sysconfig.get_config_var('DLLLIBRARY') if is_mingw else \ ++ 'python%s%s.dll' % (sys.version_info[0], sys.version_info[1]) + py_executable_dll_d = 'python%s%s_d.dll' % ( + sys.version_info[0], sys.version_info[1]) + pythondll = os.path.join(os.path.dirname(sys.executable), py_executable_dll) +@@ -1859,147 +1861,147 @@ + + ##file site.py + SITE_PY = convert(""" +-eJzFPf1z2zaWv/OvwMqToZTKdOJ0e3tO3RsncVrfuYm3yc7m1vXoKAmyWFMkS5C2tTd3f/u9DwAE +-+CHb2+6cphNLJPDw8PC+8PAeOhqNTopCZkuxyZd1KoWScblYiyKu1kqs8lJU66Rc7hdxWW3h6eIm +-vpZKVLlQWxVhqygInv/GT/BcfF4nyqAA3+K6yjdxlSziNN2KZFPkZSWXYlmXSXYtkiypkjhN/g4t +-8iwSz387BsFZJmDmaSJLcStLBXCVyFfiYlut80yM6wLn/DL6Y/xqMhVqUSZFBQ1KjTNQZB1XQSbl +-EtCElrUCUiaV3FeFXCSrZGEb3uV1uhRFGi+k+K//4qlR0zAMVL6Rd2tZSpEBMgBTAqwC8YCvSSkW +-+VJGQryRixgH4OcNsQKGNsU1U0jGLBdpnl3DnDK5kErF5VaM53VFgAhlscwBpwQwqJI0De7y8kZN +-YElpPe7gkYiZPfzJMHvAPHH8LucAjh+z4C9Zcj9l2MA9CK5aM9uUcpXcixjBwk95Lxcz/WycrMQy +-Wa2ABlk1wSYBI6BEmswPClqOb/UKfXdAWFmujGEMiShzY35JPaLgrBJxqoBt6wJppAjzd3KexBlQ +-I7uF4QAikDToG2eZqMqOQ7MTOQAocR0rkJKNEuNNnGTArD/GC0L7r0m2zO/UhCgAq6XEL7Wq3PmP +-ewgArR0CTANcLLOadZYmNzLdTgCBz4B9KVWdVigQy6SUiyovE6kIAKC2FfIekJ6KuJSahMyZRm6n +-RH+iSZLhwqKAocDjSyTJKrmuS5IwsUqAc4Er3n/8Sbw7fXN28kHzmAHGMnu9AZwBCi20gxMMIA5q +-VR6kOQh0FJzjHxEvlyhk1zg+4NU0OHhwpYMxzL2I2n2cBQey68XVw8AcK1AmNFZA/f4bukzVGujz +-Pw+sdxCcDFGFJs7f7tY5yGQWb6RYx8xfyBnBtxrOd1FRrV8DNyiEUwGpFC4OIpggPCCJS7NxnklR +-AIulSSYnAVBoTm39VQRW+JBn+7TWLU4ACGWQwUvn2YRGzCRMtAvrNeoL03hLM9NNArvOm7wkxQH8 +-ny1IF6VxdkM4KmIo/jaX10mWIULIC0G4F9LA6iYBTlxG4pxakV4wjUTI2otbokjUwEvIdMCT8j7e +-FKmcsviibt2tRmgwWQmz1ilzHLSsSL3SqjVT7eW9w+hLi+sIzWpdSgBezz2hW+X5VMxBZxM2Rbxh +-8arucuKcoEeeqBPyBLWEvvgdKHqiVL2R9iXyCmgWYqhgladpfgckOwoCIfawkTHKPnPCW3gH/wJc +-/DeV1WIdBM5IFrAGhcgPgUIgYBJkprlaI+Fxm2bltpJJMtYUebmUJQ31OGIfMOKPbIxzDT7klTZq +-PF1c5XyTVKiS5tpkJmzxsrBi/fia5w3TAMutiGamaUOnDU4vLdbxXBqXZC5XKAl6kV7bZYcxg54x +-yRZXYsNWBt4BWWTCFqRfsaDSWVWSnACAwcIXZ0lRp9RIIYOJGAbaFAR/E6NJz7WzBOzNZjlAhcTm +-ewH2B3D7O4jR3ToB+iwAAmgY1FKwfPOkKtFBaPRR4Bt905/HB049W2nbxEOu4iTVVj7OgjN6eFqW +-JL4LWWCvqSaGghlmFbp21xnQEcV8NBoFgXGHtsp8zVVQldsjYAVhxpnN5nWChm82Q1Ovf6iARxHO +-wF43287CAw1hOn0AKjldVmW+wdd2bp9AmcBY2CPYExekZSQ7yB4nvkbyuSq9ME3RdjvsLFAPBRc/ +-nb4/+3L6SRyLy0alTdv67ArGPM1iYGuyCMBUrWEbXQYtUfElqPvEezDvxBRgz6g3ia+Mqxp4F1D/ +-XNb0Gqax8F4Gpx9O3pyfzv7y6fSn2aezz6eAINgZGezRlNE81uAwqgiEA7hyqSJtX4NOD3rw5uST +-fRDMEjX75mtgN3gyvpYVMHE5hhlPRbiJ7xUwaDilphPEsdMALHg4mYjvxOHz568OCVqxLbYADMyu +-0xQfzrRFnyXZKg8n1PgXdumPWUlp/+3y6OsrcXwswl/i2zgMwIdqmjJL/Eji9HlbSOhawZ9xriZB +-sJQrEL0biQI6fk5+8YQ7wJJAy1zb6V/yJDPvmSvdIUh/jKkH4DCbLdJYKWw8m4VABOrQ84EOETvX +-KHVj6Fhs3a4TjQp+SgkLm2GXKf7Tg2I8p36IBqPodjGNQFw3i1hJbkXTh36zGeqs2WysBwRhJokB +-h4vVUChME9RZZQJ+LXEe6rC5ylP8ifBRC5AA4tYKtSQukt46RbdxWks1diYFRByPW2RERZso4kdw +-UcZgiZulm0za1DQ8A82AfGkOWrRsUQ4/e+DvgLoymzjc6PHei2mGmP477zQIB3A5Q1T3SrWgsHYU +-F6cX4tWLw310Z2DPubTU8ZqjhU6yWtqHK1gtIw+MMPcy8uLSZYV6Fp8e7Ya5iezKdFlhpZe4lJv8 +-Vi4BW2RgZ5XFT/QGduYwj0UMqwh6nfwBVqHGb4xxH8qzB2lB3wGotyEoZv3N0u9xMEBmChQRb6yJ +-1HrXz6awKPPbBJ2N+Va/BFsJyhItpnFsAmfhPCZDkwgaArzgDCl1J0NQh2XNDivhjSDRXiwbxRoR +-uHPU1Ff09SbL77IZ74SPUemOJ5Z1UbA082KDZgn2xHuwQoBkDhu7hmgMBVx+gbK1D8jD9GG6QFna +-WwAgMPSKtmsOLLPVoynyrhGHRRiT14KEt5ToL9yaIWirZYjhQKK3kX1gtARCgslZBWdVg2YylDXT +-DAZ2SOJz3XnEW1AfQIuKEZjNsYbGjQz9Lo9AOYtzVyk5/dAif/nyhdlGrSm+gojNcdLoQqzIWEbF +-FgxrAjrBeGQcrSE2uAPnFsDUSrOm2P8k8oK9MVjPCy3b4AfA7q6qiqODg7u7u0hHF/Ly+kCtDv74 +-p2+++dML1onLJfEPTMeRFh1qiw7oHXq00bfGAn1nVq7Fj0nmcyPBGkvyysgVRfy+r5NlLo72J1Z/ +-Ihc3Zhr/Na4MKJCZGZSpDLQdNRg9U/vPoldqJJ6RdbZtxxP2S7RJtVbMt7rQo8rBEwC/ZZHXaKob +-TlDiK7BusENfynl9HdrBPRtpfsBUUU7Hlgf2X14hBj5nGL4ypniGWoLYAi2+Q/qfmG1i8o60hkDy +-oonq7J63/VrMEHf5eHm3vqYjNGaGiULuQInwmzxaAG3jruTgR7u2aPcc19Z8PENgLH1gmFc7lmMU +-HMIF12LqSp3D1ejxgjTdsWoGBeOqRlDQ4CTOmdoaHNnIEEGid2M2+7ywugXQqRU5NPEBswrQwh2n +-Y+3arOB4QsgDx+IlPZHgIh913r3gpa3TlAI6LR71qMKAvYVGO50DX44NgKkYlX8ZcUuzTfnYWhRe +-gx5gOceAkMFWHWbCN64PONob9bBTx+oP9WYa94HARRpzLOpR0AnlYx6hVCBNxdjvOcTilrjdwXZa +-HGIqs0wk0mpAuNrKo1eodhqmVZKh7nUWKVqkOXjFVisSIzXvfWeB9kH4uM+YaQnUZGjI4TQ6Jm/P +-E8BQt8Pw2XWNgQY3DoMYbRJF1g3JtIZ/wK2g+AYFo4CWBM2CeayU+RP7HWTOzld/GWAPS2hkCLfp +-kBvSsRgajnm/J5CMOhoDUpABCbvCSK4jq4MUOMxZIE+44bUclG6CESmQM8eCkJoB3Omlt8HBJxGe +-gJCEIuT7SslCfCVGsHxtUX2c7v5dudQEIcZOA3IVdPTi2I1sOFGN41aUw2doP75BZyVFDhw8B5fH +-DfS7bG6Y1gZdwFn3FbdFCjQyxWFGExfVK0MYN5j8h2OnRUMsM4hhKG8g70jHjDQJ7HJr0LDgBoy3 +-5u2x9GM3YoF9x2GuDuXmHvZ/YZmoRa5Cipm0YxfuR3NFlzYW2/NkPoI/3gKMJlceJJnq+AVGWf6B +-QUIPetgH3ZsshkWWcXmXZCEpME2/Y39pOnhYUnpG7uATbacOYKIY8Tx4X4KA0NHnAYgTagLYlctQ +-abe/C3bnFEcWLncfeW7z5dGrqy5xp0MRHvvpX6rT+6qMFa5WyovGQoGr1TXgqHRhcnG21YeX+nAb +-twllrmAXKT5++iKQEBzXvYu3T5t6w/CIzYNz8j4GddBrD5KrNTtiF0AEtSIyykH4dI58PLJPndyO +-iT0ByJMYZseiGEiaT/4ROLsWCsbYX24zjKO1VQZ+4PU3X896IqMukt98PXpglBYx+sR+3PIE7cic +-VLBrtqWMU3I1nD4UVMwa1rFtignrc9r+aR676vE5NVo29t3fAj8GCobUJfgIL6YN2bpTxY/vTg3C +-03ZqB7DObtV89mgRYG+fz3+BHbLSQbXbOEnpXAEmv7+PytVs7jle0a89PEg7FYxDgr79l7p8AdwQ +-cjRh0p2OdsZOTMC5ZxdsPkWsuqjs6RyC5gjMywtwjz+HFU6ve+B7Bge/r7p8IiBvTqMeMmpbbIZ4 +-wQclhz1K9gnzfvqMf9dZP27mw4L1/zHLF/+cST5hKgaaNh4+rH5iuXbXAHuEeRpwO3e4hd2h+axy +-ZZw7VklKPEfd9VzcUboCxVbxpAigLNnv64GDUqoPvd/WZclH16QCC1nu43HsVGCmlvH8ek3Mnjj4 +-ICvExDZbUKzayevJ+4Qv1NFnO5Ow2Tf0c+c6NzErmd0mJfQFhTsOf/j442nYb0IwjgudHm9FHu83 +-INwnMG6oiRM+pQ9T6Cld/nH10d66+AQ1GQEmIqzJ1iVsJxBs4gj9a/BARMg7sOVjdtyhL9ZycTOT +-lDqAbIpdnaD4W3yNmNiMAj//S8UrSmKDmSzSGmnFjjdmH67qbEHnI5UE/0qnCmPqECUEcPhvlcbX +-Ykydlxh60txI0anbuNTeZ1HmmJwq6mR5cJ0shfy1jlPc1svVCnDBwyv9KuLhKQIl3nFOAyctKrmo +-y6TaAglileuzP0p/cBrOtzzRsYckH/MwATEh4kh8wmnjeybc0pDLBAf8Ew+cJO67sYOTrBDRc3if +-5TMcdUY5vlNGqnsuT4+D9gg5ABgBUJj/aKIjd/4bSa/cA0Zac5eoqCU9UrqRhpycMYQynmCkg3/T +-T58RXd4awPJ6GMvr3Vhet7G87sXy2sfyejeWrkjgwtqglZGEvsBV+1ijN9/GjTnxMKfxYs3tMPcT +-czwBoijMBtvIFKdAe5EtPt8jIKS2nQNnetjkzyScVFrmHALXIJH78RBLb+ZN8rrTmbJxdGeeinFn +-h3KI/L4HUUSpYnPqzvK2jKs48uTiOs3nILYW3WkDYCra6UQcK81uZ3OO7rYs1ejiPz//8PEDNkdQ +-I5PeQN1wEdGw4FTGz+PyWnWlqdn8FcCO1NJPxKFuGuDeIyNrPMoe//OOMjyQccQdZSjkogAPgLK6 +-bDM39ykMW891kpR+zkzOh03HYpRVo2ZSA0Q6ubh4d/L5ZEQhv9H/jlyBMbT1pcPFx7SwDbr+m9vc +-Uhz7gFDr2FZj/Nw5ebRuOOJhG2vAdjzf1oPDxxjs3jCBP8t/KqVgSYBQkQ7+PoVQj945/Kb9UIc+ +-hhE7yX/uyRo7K/adI3uOi+KIft+xQ3sA/7AT9xgzIIB2ocZmZ9DslVtK35rXHRR1gD7S1/vNe832 +-1qu9k/EpaifR4wA6lLXNht0/75yGjZ6S1ZvT788+nJ+9uTj5/IPjAqIr9/HTwaE4/fGLoPwQNGDs +-E8WYGlFhJhIYFrfQSSxz+K/GyM+yrjhIDL3enZ/rk5oNlrpg7jPanAiecxqThcZBM45C24c6/wgx +-SvUGyakponQdqjnC/dKG61lUrvOjqVRpjs5qrbdeulbM1JTRuXYE0geNXVIwCE4xg1eUxV6ZXWHJ +-J4C6zqoHKW2jbWJISkHBTrqAc/5lTle8QCl1hidNZ63oL0MX1/AqUkWawE7udWhlSXfD9JiGcfRD +-e8DNePVpQKc7jKwb8qwHsUCr9Trkuen+k4bRfq0Bw4bB3sG8M0npIZSBjcltIsRGfJITynv4apde +-r4GCBcODvgoX0TBdArOPYXMt1glsIIAn12B9cZ8AEFor4R8IHDnRAZljdkb4drPc/3OoCeK3/vnn +-nuZVme7/TRSwCxKcShT2ENNt/A42PpGMxOnH95OQkaPUXPHnGssDwCGhAKgj7ZS/xCfos7GS6Urn +-l/j6AF9oP4Fet7qXsih1937XOEQJeKbG5DU8U4Z+IaZ7WdhTnMqkBRorHyxmWEHopiGYz574tJZp +-qvPdz96dn4LviMUYKEF87nYKw3G8BI/QdfIdVzi2QOEBO7wukY1LdGEpyWIZec16g9YoctTby8uw +-60SB4W6vThS4jBPloj3GaTMsU04QISvDWphlZdZutUEKu22I4igzzBKzi5ISWH2eAF6mpzFviWCv +-hKUeJgLPp8hJVpmMxTRZgB4FlQsKdQpCgsTFekbivDzjGHheKlMGBQ+LbZlcrys83YDOEZVgYPMf +-T76cn32gsoTDV43X3cOcU9oJTDmJ5BhTBDHaAV/ctD/kqtmsj2f1K4SB2gf+tF9xdsoxD9Dpx4FF +-/NN+xXVox85OkGcACqou2uKBGwCnW5/cNLLAuNp9MH7cFMAGMx8MxSKx7EUnerjz63KibdkyJRT3 +-MS+fcICzKmxKmu7spqS1P3qOqwLPuZbj/kbwtk+2zGcOXW86b4aS39xPRwqxJBYw6rb2xzDZYZ2m +-ejoOsw1xC21rtY39OXNipU67RYaiDEQcu50nLpP1K2HdnDnQS6PuABPfanSNJPaq8tHP2Uh7GB4m +-ltidfYrpSGUsZAQwkiF17U8NPhRaBFAglP07diR3Onl+6M3RsQYPz1HrLrCNP4Ai1Lm4VOORl8CJ +-8OVXdhz5FaGFevRIhI6nkskst3li+Llbo1f50p9jrwxQEBPFroyzazlmWFMD8yuf2AMhWNK2Hqkv +-k6s+wyLOwDm9H+Dwrlz0H5wY1FqM0Gl3I7dtdeSTBxv0loLsJJgPvozvQPcXdTXmlRw4h+6tpRuG +-+jBEzD6Epvr0fRxiOObXcGB9GsC91NCw0MP7deDsktfGOLLWPraqmkL7QnuwixK2ZpWiYxmnONH4 +-otYLaAzucWPyR/apThSyv3vqxJyYkAXKg7sgvbmNdINWOGHE5UpcOZpQOnxTTaPfLeWtTMFogJEd +-Y7XDL7baYRLZcEpvHthvxu5ie7Htx43eNJgdmXIMRIAKMXoDPbsQanDAFf5Z70Ti7Iac47d/PZuK +-tx9+gn/fyI9gQbHmcSr+BqOLt3kJ20ou2qXbFLCAo+L9Yl4rLIwkaHRCwRdPoLd24ZEXT0N0ZYlf +-UmIVpMBk2nLDt50AijxBKmRv3ANTLwG/TUFXywk1DmLfWoz0S6TBcI0L1oUc6JbRutqkaCac4Eiz +-iJej87O3px8+nUbVPTK2+Tlygid+HhZORx8Nl3gMNhX2yaLGJ1eOv/yDTIsed1nvNU29DO41RQjb +-kcLuL/kmjdjuKeISAwai2C7zRYQtgdO5RK+6A/954mwrH7TvnnFFWOOJPjxrnHh8DNQQP7f1zwga +-Uh89J+pJCMVzrBXjx9Go3wJPBUW04c/zm7ulGxDXRT80wTamzazHfnerAtdMZw3PchLhdWyXwdSB +-pkmsNvOFWx/4MRP6IhRQbnS8IVdxnVZCZrCVor093UgBCt4t6WMJYVZhK0Z1bhSdSe/irXJyj2Il +-RjjqiIrq8RyGAoWw9f4xvmEzgLWGouYSaIBOiNK2KXe6qnqxZgnmnRBRryff4C7JXrnJL5rCPChv +-jBeN/wrzRG+RMbqWlZ4/PxhPLl82CQ4UjF54Bb2LAoydyyZ7oDGL58+fj8S/Pez0MCpRmuc34I0B +-7F5n5ZxeDxhsPTm7Wl2H3ryJgB8Xa3kJD64oaG6f1xlFJHd0pQWR9q+BEeLahJYZTfuWOeZYXcnn +-y9yCz6m0wfhLltB1RxhRkqhs9a1RGG0y0kQsCYohjNUiSUKOTsB6bPMaa/Ewuqj5Rd4DxycIZopv +-8WCMd9hrdCwpb9Zyj0XnWIwI8IhSyng0KmamajTAc3ax1WjOzrKkaspIXrhnpvoKgMreYqT5SsR3 +-KBlmHi1iOGWdHqs2jnW+k0W9jUq+uHTjjK1Z8uuHcAfWBknLVyuDKTw0i7TIZbkw5hRXLFkklQPG +-tEM43JkubyLrEwU9KI1AvZNVWFqJtm//YNfFxfQjHR/vm5F01lBlL8TimFCctfIKo6gZn6JPlpCW +-b82XCYzygaLZ2hPwxhJ/0LFUrCHw7u1wyxnrTN/HwWkbzSUdAIfugLIK0rKjpyOci8csfGbagVs0 +-8EM7c8LtNimrOk5n+tqHGfppM3uervG0ZXA7CzyttwK+fQ6O777O2AfHwSTXID0x49ZUZByLlY5M +-RG5lmV+EVeTo5R2yrwQ+BVJmOTP10CZ2dGnZ1Raa6gRHR8UjqK9M8dKAQ26qZjoFJy7mU0pvMuUO +-A86zn29JV1eI78T41VQctnY+i2KLNzkBss+Woe+KUTeYihMMMHNs34shvjsW45dT8ccd0KOBAY4O +-3RHa+9gWhEEgr66eTMY0mRPZwr4U9of76hxG0PSM4+SqTf4umb4lKv1ri0pcIagTlV+2E5VbYw/u +-WzsfH8lwA4pjlcjl/jOFJNRIN7p5mMEJPyyg37M5Wrp2vKmoocK5OWxG7ho96GhE4zbbQUxRulZf +-XL+LuoYNp71zwKTJtFIV7S1zmMao0WsRFQDM+o7S8Bve7QLvNSlc/2zwiFUXAViwPREEXenJB2ZN +-w0ZQH3QEn6QBHmAUEeJhaqMoXMl6goiEdA8OMdFXrUNsh+N/d+bhEoOho9AOlt98vQtPVzB7izp6 +-FnR3pYUnsra8ollu8+kPzHmM0tf1NwmMA6URHXBWzVWV5GYeYfYy30GT2yzmDV4GSSfTaBJT6bpN +-vJXmW7/Qj6HYASWTwVqAJ1Wv8CD5lu62PFGU9IZX1Hx9+HJqKoMZkJ7Aq+jVV/oKSOpmLj/wfeyp +-3rvBS93vMPoXB1hS+b3tq85uhqZ13LoLyh8spOjZJJpZOjSG6eE6kGbNYoF3JjbEZN/aXgDyHryd +-Ofg55vLTHBw22JBGfei6GqOR3iHVNiDAD5uMIcl5VNdGkSLSu4RtSHnuUpxPFgXdq9+CYAgBOX8d +-8xt0BeviyIbYjE3Bk8+xm82Jn+qmt+6M7Qka2+om3DV97r9r7rpFYGdukhk6c/frS10a6L7DVrSP +-Bhze0IR4VIlEo/H7jYlrB6Y6h6Y/Qq8/SH63E850wKw8BMZk7GC8n9hTY2/M/iZeuN8xIWyfL2R2 +-y4l7nY3WtDs2o83xj/EUOPkFn9sbBiijaak5kPdLdMPejHNkZ/L6Ws1ivN1xRptsyufq7J7Mtu09 +-Xc4nY7U1uy28tAhAGG7Smbducj0wBuhKvmWa06Gc22kEDU1Jw04WskqWbBL01g7ARRwxpf4mEM9p +-xKNUYqBb1WVRwm54pO8i5jydvtTmBqgJ4G1idWNQNz2m+mpaUqyUHGZKkDlO20ryASKwEe+YhtnM +-vgNeedFcs5BMLTPIrN7IMq6aK4b8jIAENl3NCFR0jovrhOcaqWxxiYtYYnnDQQoDZPb7V7Cx9DbV +-O+5VmFht93h2oh465PuUKxscY2S4OLm31wu611ot6Wpr1zu0zRqus1cqwTKYu/JIR+pYGb/V93fx +-HbMcyUf/0uEfkHe38tLPQrfqjL1bi4bzzFUI3Qub8MYAMs599zB2OKB742JrA2zH9/WFZZSOhznQ +-2FJR++S9CqcZbdJEkDBh9IEIkl8U8MQIkgf/kREkfWsmGBqNj9YDvWUCD4SaWD24V1A2jAB9ZkAk +-PMBuXWBoTOXYTbovcpXcj+yF0qwrnUo+Yx6QI7t3kxEIvmpSuRnK3lVwuyJIvnTR4+/PP745OSda +-zC5O3v7HyfeUlIXHJS1b9egQW5bvM7X3vfRvN9ymE2n6Bm+w7bkhlmuYNITO+04OQg+E/nq1vgVt +-KzL39VCHTt1PtxMgvnvaLahDKrsXcscv0zUmbvpMK0870E85qdb8cjITzCNzUsfi0JzEmffN4YmW +-0U5seWjhnPTWrjrR/qq+BXQg7j2xSda0Anhmgvxlj0xMxYwNzLOD0v7ffFBmOFYbmht0QAoX0rnJ +-kS5xZFCV//8TKUHZxbi3Y0dxau/mpnZ8PKTspfN49ruQkSGIV+436s7PFfalTAeoEASs8PQ9hYyI +-0X/6QNWmHzxT4nKfCov3Udlc2V+4Ztq5/WuCSQaVve9LcYISH7NC41WduokDtk+nAzl9dBqVr5xK +-FtB8B0DnRjwVsDf6S6wQ51sRwsZRu2SYHEt01Jf1Ocij3XSwN7R6IfaHyk7dskshXg43XLYqO3WP +-Q+6hHuihalPc51hgzNIcqicV3xFkPs4UdMGX53zgGbre9sPX28uXR/ZwAfkdXzuKhLLJRo5hv3Sy +-MXdeKul0J2Ypp5Suh3s1JySsW1w5UNknGNrbdEpSBvY/Js+BIY289/0hM9PDu3p/1MbUst4RTEmM +-n6kJTcsp4tG42yeT7nQbtdUFwgVJjwDSUYEAC8F0dKOTILrlLO/xC70bnNd0Ha97whQ6UkHJYj5H +-cA/j+zX4tbtTIfGjujOKpj83aHOgXnIQbvYduNXEC4UMm4T21Bs+GHABuCa7v//LR/TvpjHa7oe7 +-/Grb6lVvHSD7spj5iplBLRKZxxEYGdCbY9LWWC5hBB2voWno6DJUMzfkC3T8KJsWL9umDQY5szPt +-AVijEPwfucjncQ== ++eJzFPWtz20aS3/ErZqlyAZQpyJazuT05ypVsy4nuFFsbO7W+VVQ8kByKiEAAwUMU9+rut18/ZgYz ++eFBSkq1jpSwSmOnp6enX9HRPRqPRaZ7LdCHW2aJOpChlVMxXIo+qVSmWWSGqVVwsDvKoqLbwdH4b ++3chSVJkot2WIrULP2/+dH29ffF7FpUYBvkV1la2jKp5HSbIV8TrPikouxKIu4vRGxGlcxVES/wNa ++ZGko9n8/Bt55KmDmSSwLcSeLEuCWIluKy221ylIR1DnO+WX45+jVeCLKeRHnFTQoFM5AkVVUeamU ++C0ATWtYlkDKu5EGZy3m8jOem4Sark4XIk2guxX/9F0+Nmvq+V2ZruVnJQooUkAGYEmDliAd8jQsx ++zxYyFOKNnEc4AD9viOUxtAmuWYlkTDORZOkNzCmVc1mWUbEVwayuCBChLBYZ4BQDBlWcJN4mK27L ++MSwprccGHomI2cOdDLMHzBPH73IO4Pgx9X5K4/sJwwbuQXDVitmmkMv4XkQIFn7KezmfqmdBvBSL ++eLkEGqTVGJt4jEApknh2mNNyfKNW6NtDwspwZQRjSESZG/NL6hF655WIkhLYts6RRiVh/k7O4igF ++aqR3MBxABJJ6feMs4rIy49DsRAYAClzHCqRkXYpgHcUpMOsP0ZzQ/lucLrJNOSYKwGqV4pe6rOz5 ++Bz0EgNYWASYeLpZezTpN4luZbMeAwGfAvpBlnVQoEIu4kPMqK2JZEgBAbSvkPSA9EVEhFQmZM7Xc ++Toj+RJM4xYVFAUOBx5dIkmV8UxckYWIZA+cCV7z/+KN4d/bm/PSD4jENjGX2Zg04AxRaaAsnGEAc ++1mVxmGQg0KF3gX9EtFigkN3g+IBX0+DwwZX2Aph7Hrb7WAsOZFeLq4aBOVagTGgsj/r9N3SZlCug ++z/88sN6edzpEFZo4f9usMpDJNFpLsYqYv5AzvG8UnG/DvFq9Bm4oEU4FpCpxcRDBGOEBSWyaBVkq ++RQ4slsSpHHtAoRm1dVcRWOFDlh7QWrc4ASAUXgovrWdjGjGVMNEurNeoL3TjLc1MNfHMOq+zghQH ++8H86J12UROkt4VgSQ/G3mbyJ0xQRQl7w/D2fBi5vY+DERSguqBXpBd1I+Ky9uCWKRA28hEwHPCnv ++o3WeyAmLL+rW3WqEBpOV0GudMMdBy4rUK61aM9Ve3jsKv7S4jtCsVoUE4PXMEbpllk3EDHQ2YZNH ++axavapMR53g98kSdkCeoJfTF70DR07Ks19K8RF4BzUIM5S2zJMk2QLJjzxNiDxtpo+wyJ7yFd/Av ++wMV/E1nNV55njWQAK1CI/BAoBAImQaaKqxUSDrcpVm4rmThlTZEVC1nQUI8j9iEj/sjGOFfvQ1Yp ++o8bTxVXO1nGFKmmmTGbMFi/1K9aPr3neMA2w3CXRTDdt6LTG6SX5KppJ7ZLM5BIlQS3Sa7PsMKbX ++MybZ4kqs2crAOyCLjNmC9CsWVDrLSpITADBY+KI0zuuEGpXIYCKCgdY5wV9HaNIz5SwBe7NZ9lAh ++sfmeg/0B3P4BYrRZxUCfOUAADYNaCpZvFlcFOgiNPvJco6/78/jAqedLZZt4yGUUJ8rKR6l3Tg/P ++ioLEdy5z7DVRxChhhmmFrt1NCnREMR+NRp6n3aFtqb9mpVcV22NgBaHHmU5ndYyGbzpFU69+lB6P ++IqyBnW6mnYEHGkJ3+gBUsrosi2yNr83cPoEygbGwh7cnLknLSHaQHU58jeSzVXqum6LttthZoB7y ++Ln88e3/+5eyTOBFXjUqbtPXZNYx5lkbA1mQRgKlawza6DFqi4otR94n3YN6JKcCeUW8SXxlVNfAu ++oP65qOk1TGPuvPTOPpy+uTib/vTp7Mfpp/PPZ4Ag2Bnp7dGU0TzW4DCWIQgHcOWiDJV99To96MGb ++00/mgTeNy+nXXwG7wZPgRlbAxEUAM54Ifx3dl8Cg/oSajhHHTgOw4P54LL4VR/v7r44IWr7NtwAM ++zK7VFB9OlUWfxuky88fU+Bd26U9YSSn/7er4q2txciL8X6K7yPfAh2qaMkv8QOL0eZtL6FrBnyAr ++x563kEsQvVuJAhrsk1885g6wJNAyU3b6lyxO9XvmSnsI0h8B9QAcptN5EpUlNp5OfSACdej5QIeQ ++nWuUugA65lu761ihgp9CwsKm2GWC//SgGM2oH6LBKNpddCMQ1/U8KiW3oulDv+kUddZ0GqgBQZhJ ++YsDhYjXkC90EdVYRg19LnIc6bFZmCf5E+KgFSABxa4VaEhdJbZ3CuyipZRlYkwIiBkGLjKho45L4 ++EVyUACxxs3TjcZuammegGZAvyUCLFi3K4WcP/B1QV3oThxs93nsxzRDTf+edBuEALqeP6r4sW1BY ++O4rLs0vx6sXRAbozsOdcGOo4zdFCx2ktzcMlrJaWB0aYe2l5semyRD2LT493w1yHZmW6rLBUS1zI ++dXYnF4AtMrC1yuJHegM7c5jHPIJVBL1O/gCrUO03RrgP5dmDtKDvANRbExS9/nrp9zgYINMSFBFv ++rInUatfPpjAvsrsYnY3ZVr0EWwnKEi2mdmw8a+EcJkOTCBoCvOAUKbWRPqjDomaHlfBGkGgvFo1i ++DQncBWrqa/p6m2abdMo74RNUusHYsC4KlmJebNAswZ54D1YIkMxgY9cQjaGAyy9Qtg4AeZg+TBco ++S3sLAASGvqTtmgVLb/VoirxrxGERxvi1IOEtJPoLd3oI2mppYliQ6G1oHmgtgZBgckbBGdWgmAxl ++TTeDgS2SuFx3EfIW1AXQomIIZjNQ0LiRpt/VMShncWErJasfWuQvX74w25Qriq8gYjOcNLoQSzKW ++Yb4FwxqDTtAeGUdriA024NwCmLpUrCkOPoksZ28M1vNSyTb4AbC7q6r8+PBws9mEKrqQFTeH5fLw ++z3/5+uu/vGCduFgQ/8B0LGlRobbwkN6hRxt+oy3Qt3rlWvwYpy43EqxAkldGriji910dLzJxfDA2 +++hO5uDHT+K92ZUCBTPWgTGWg7ajB6Fl58Cx8VY7EM7LOpm0wZr9EmVRjxVyrCz2qDDwB8FvmWY2m ++uuGEUjwH6wY79IWc1Te+GdyxkfoHTBXlNDA8cPDyGjFwOUPzlTbFU9QSxBZo8S3S/8hsE5F3pDQE ++khdNVGf3vO3XYpq4i8fLu/E1LaHRM4xL5A6UCLfJowXQNO5KDn6Ua4t2z3Jt9ccxBNrSe5p5lWMZ ++oOAQLrgWE1vqLK5GjxekacOqGRSMrRpBQYOTOGNqK3BkI30Eid6N3uzzwqoWQKdW5FDHB/QqQAt7 ++nI61a7OC5QkhD5yIl/REgot83Hn3gpe2ThIK6LR41KEKA3YWGu10BnwZaAATMSp+GnFLvU352FoU ++XoMeYBnHgJDBlh1mwje2DzjaG/WwU8fqD/VmGveBwEUKOBb1KOiE8gmPUJQgTXng9hxicUPc7mA7 ++LQ4xlV4mEulyQLjayqNXqHYapmWcou61FimcJxl4xUYrEiM1711ngfZB+LjPmCkJVGRoyGE1OiFv ++zxFAX7XD8NlNjYEGOw6DGK3jkqwbkmkF/4BbQfENCkYBLQmaAfNYKXMn9gfInJmv+jLAHobQyBB2 ++0yE3pGMxFBz9fk8gGVU0BqQgBRJ2hZFcR1YHCXCYtUCOcMNrOSjdBCMsQc4sC0JqBnCnl84GB5+E ++eAJCEoqQ76tS5uK5GMHytUX1cbr7D+VSHYQIrAbkKqjoxYkd2bCiGietKIfL0G58g85K8gw4eAYu ++jx3ot9lcM60JuoCz7ipugxRoZIrDjMY2qteaMHYw+U8nVouGWHoQzVDOQM6Rjh5p7JnlVqBhwTUY ++Z83bY6nHdsQC+wZ+Vh7J9T3s//wiLudZ6VPMpB27sD+KK7q0MdhexLMR/HEWYDS+diDJRMUvMMry ++GwbxHeh+H3RnshgWWUTFJk59UmCKfifu0nTwMKR0jNzhJ9pOHcJEMeJ5+L4AAaGjz0MQJ9QEsCuX ++fqnc/i7YnVMcGbjcfeS4zVfHr667xJ0MRXjMp3+pzu6rIipxtRJeNBYKXK2uAUelC5OL0q06vFSH ++27hNKLISdpHi46cvAgnBcd1NtH3a1BuGR2wenJPz0aiDXnuQXK3ZEbsAIqgVkVEO/adz5OORferk ++dkzsCUCexDA7FkVDUnzyW+DsWigY42CxTTGO1lYZ+IHXX3817YmM2kh+/dXogVFaxOgT+6DlCZqR ++Oalg12wLGSXkalh9KKiYNqxj2uRj1ue0/VM8dt3jcyq0TOy7vwV+NBQMqUvwEV5MGrJ1p4of150a ++hKfs1A5gnd2q/uzRIsDePpv9AjvkUgXV7qI4oXMFmPzBASpXvbnneEW/9nAg7VQwFgn69l/l1Qvg ++Bp+jCePudJQzdqoDzj27YP3Jo7KLyp7KIWiOwJy8APv4c1jh9LoHrmdw+MeqyycCcuY06iGjssV6 ++iBd8UHLUo2SfMO+nz/gPnfXjZj4sWP8fs3zxz5nkE6aioSnj4cLqJ5ZtdzWwR5inAbdzh1vYHZrP ++KpfauWOVVIp91F37YkPpChRbxZMigLJgv68HDkqpOvR+WxcFH12TCsxlcYDHsROBmVra8+s1MXvi ++8IOsEBPTbE6xaiuvJ+sTPl9Fn81M/Gbf0M+dq0zHrGR6FxfQFxRu4H//8Yczv9+EYBwXOj3eijze ++b0C4T2BcXxHHf0ofptBTuvx29dHeurgE1RkBOiKsyNYlbCcQrOMI/WvwQETIObDlY3bcoc9Xcn47 ++lZQ6gGyKXa2g+Ft8jZiYjAI3/6uMlpTEBjOZJzXSih1vzD5c1umczkcqCf6VShXG1CFKCODw3zKJ ++bkRAnRcYelLcSNGpu6hQ3mdeZJicKup4cXgTL4T8tY4S3NbL5RJwwcMr9Srk4SkCJd5xTgMnLZZy ++XhdxtQUSRGWmzv4o/cFqONvyRAMHST7mYQJiQsSx+ITTxvdMuIUmlw4OuCceOEncd2MHK1khpOfw ++Ps2mOOqUcnwnjFT3XJ4ee+0RMgAwAqAw/9FYRe7cN5Je2QeMtOY2UVFLOqS0Iw0ZOWMIJRhjpIN/ ++00+XEW3eGsDyZhjLm91Y3rSxvOnF8sbF8mY3lrZI4MKaoJWWhL7AVftYozffxo458TBn0XzF7TD3 ++E3M8AaLI9QZbyxSnQDuRLT7fIyCktq0DZ3rY5M/EnFRaZBwCVyCR+/EQS23mdfK61ZmycVRnnop2 ++Z4dyiNy+h2FIqWIz6s7ytoiqKHTk4ibJZiC2Bt1JA2Ai2ulEHCtN76Yzju62LNXo8j8/f//xAzZH ++UCOd3kDdcBHRsOBUgv2ouCm70tRs/nJgR2rpJuJQNwVw75GRNR5lj/95RxkeyDhiQxkKmcjBA6Cs ++LtPMzn3y/dZzlSSlnjOT82HTiRil1aiZ1ACRTi8v351+Ph1RyG/0vyNbYDRtXemw8dEtTIOu/2Y3 ++NxTHPiDUKrbVGD97Tg6tG4542MZqsB3Pt/Xg6DEGuzdM4M7yn0opWBIgVKiCv08h1KN3Dr9rP9Sh ++j2bETvKffbLGzop5Z8me5aJYot937NAewD3sxD3GFAigXKhA7wyavXJL6RvzuoOiFtBH+nq/e6/Z ++3nq1dzIuRc0kehxAi7Km2bD755zTsNErZfXm7LvzDxfnby5PP39vuYDoyn38dHgkzn74Iig/BA0Y +++0QRpkZUmIkEhsUudBKLDP6rMfKzqCsOEkOvdxcX6qRmjaUumPuMNieE55zGZKBx0Iyj0Oahyj9C ++jBK1QbJqiihdh2qOcL+05nqWMlP50VSqNENntVZbL1UrpmvK6Fw7BOmDxjYpGASnmMErymKv9K6w ++4BNAVWfVg5Sy0SYxJKGgYCddwDr/0qcrTqCUOsOTprNS9Fe+jat/HZZ5EsNO7rVvZEl1w/SYhnHU ++Q3PAzXj1aUCrO4ysGvKsB7FAq/Xa57mp/uOG0X6tAcOGwd7BvFNJ6SGUgY3JbcLHRnyS48t7+GqW ++Xq1BCQuGB30VLqJmuhhmH8HmWqxi2EAAT67A+uI+ASC0VsI9EDi2ogMyw+wM/+16cfBXXxHEbf3z ++zz3NqyI5+LvIYRckOJXI7yGm3fgdbHxCGYqzj+/HPiNHqbnirzWWB4BDQgFQS9opf4lP0KdBKZOl ++yi9x9QG+UH4CvW51L2ReqO79rrGPEvCsDMhreFZq+vmY7mVgT3Aq4xZorHwwmGEFoZ2GoD974tNK ++JonKdz9/d3EGviMWY6AE8bnbGQzH8RI8QlfJd1zh2AKFB+zwukA2LtCFpSSLReg06w1ao8hRbycv ++w6wTBYa7vTpR4CKKSxvtAKfNsHQ5QYisDGuhl5VZu9UGKWy3IYqjzDBLTC8LSmB1eQJ4mZ5GvCWC ++vRKWeugIPJ8ix2mlMxaTeA56FFQuKNQJCAkSF+sZifOylGPgWVHqMih4mG+L+GZV4ekGdA6pBAOb ++/3D65eL8A5UlHL1qvO4e5pzQTmDCSSQnmCKI0Q74Yqf9IVdNp308q14hDNQ+8Kf9irNTTniATj8O ++LOKf9iuuQzuxdoI8A1BQdd4WD9wAWN365KaRBcbV7IPxY6cANpi5YCgWiWUvKtHDnl+XE03Llimh ++uI9++YQDnGVuUtJUZzslrf1Rc1zmeM61CPobwds+2dKfGXS97bwZSn6zPx0pxJJYwKjb2h1DZ4d1 ++mqrpWMw2xC20rVU29ufUipVa7eYpijIQMbA7j20m61fCqjlzoJNG3QEmvlHoaknsVeWjn9OR8jAc ++TAyxO/sU3ZHKWMgIYCRDqtqfGnwotAigQCj7N7AkdzLeP3LmaFmDh+eodBfYxu9BEapcXKrxyArg ++RPjyKzuO/IrQQj16LHzLU0llmpk8MfxsVuhVvnTn2CsDFMREsSui9EYGDGuiYT53iT0QgiVt65D6 ++Kr7uMyziHJzT+wEO78pF/8GJRq3FCJ12t3LbVkcuebBBbynIToK54ItoA7o/r6uAV3LgHLq3lm4Y ++6sMQMfsQmqrT98DHcMyv/sD6NIB7qaFgoYf368DZJa+NdmSNfWxVNfnmhfJg5wVszaqSjmWs4kTt ++ixovoDG4J43JH5mnKlHI/O6pE7NiQgYoD26DdOY2Ug1a4YQRlytx5WhM6fBNNY16t5B3MgGjAUY2 ++wGqHX0y1wzg04ZTePLDfjd3l9nLbjxu9aTA71uUYiAAVYvQGenYh1OCAK/yz2olE6S05x2//dj4R ++bz/8CP++kR/BgmLN40T8HUYXb7MCtpVctEu3KWABR8X7xawusTCSoNEJBV88gd7apUNePA1RlSVu ++SYlRkAKTaYs133YCKPIEqZC9cQ90vQT81gVdLSdUO4h9azFSL5EGwzUuWBdyqFqGq2qdoJmwgiPN ++Il6NLs7fnn34dBZW98jY+ufICp64eVg4HXU0XOAx2ESYJ/Man1xb/vL3Msl73GW119T1MrjXFD5s ++R3Kzv+SbNCKzp4gKDBiIfLvI5iG2BE7nEr1qA/7z2NpWPmjfHeOKsIKxOjxrnHh8DNQQP7f1zwga ++Uh81J+pJCEUzrBXjx+Go3wJPBEW04c/+7WZhB8RV0Q9NsI1pM+vA7W5U4IrprOAZTiK8Tswy6DrQ ++JI7K9Wxu1wd+TIW6CAWUGx1vyGVUJ5WQKWylaG9PN1KAgrdL+lhCmFXYilGdG0Vnkk20La3co6gU ++Ixx1REX1eA5DgULYev8Q3bIZwFpDUXMJNEAnRGnblFldy3q+YgnmnRBRryffYBOnr+zkF0VhHpQ3 ++xvPGf4V5orfIGN3ISs2fHwTjq5dNggMFo+dOQe88B2Nns8keaMx8f39/JP7tYaeHUQmTLLsFbwxg ++9zorF/R6wGCryZnV6jr0+k0I/DhfySt4cE1Bc/O8TikiuaMrLYg0fzUMH9fGN8yo27fMMcfqCj5f ++5hZ8TqUMxk9pTNcdYURJorJVt0ZhtElLE7EkKAY/Kudx7HN0AtZjm9VYi4fRRcUv8h44PkYwE3yL ++B2O8w16hY0l5s4Z7DDonYkSAR5RSxqNRMTNVowGe08utQnN6nsZVU0bywj4zVVcAVOYWI8VXItqg ++ZOh5tIhhlXU6rNo41tlOFnU2Ktn8yo4ztmbJrx/CHVgbJC1bLjWm8FAv0jyTxVybU1yxeB5XFhjd ++DuFwZ7q8iaxP6PWgNAL1TlZhYSTavP2TWRcb0490fHygR1JZQ5W5EItjQlHayisMw2Z8ij4ZQhq+ ++1V/GMMoHimYrT8AZS/xJxVKxhsC5t8MuZ6xTdR8Hp200l3QAHLoDyihIw46OjrAuHjPwmWkHbtHA ++D+3MCbe7uKjqKJmqax+m6KdNzXm6wtOUwe0s8DTeCvj2GTi+BypjHxwHnVyD9MSMW12RcSKWKjIR ++2pVlbhFWnqGXd8S+EvgUSJnFVNdD69jRlWFXU2iqEhwtFY+gnuvipQGHXFfNdApObMwnlN6kyx0G ++nGc335KurhDfiuDVRBy1dj7zfIs3OQGyzxa+64pRN5iKFQzQc2zfiyG+PRHBy4n48w7o4cAAx0f2 ++CO19bAvCIJBX108mYxLPiGx+Xwr7w31VDiNoesZxfN0mf5dM3xCV/rVFJa4QVInKL9uJyq2xB/et ++nY+LpL8GxbGM5eLgWYkkVEg3unmYwQk/LKDfMzlaqna8qaihwrkZbEY2jR60NKJ2m80guihdqS+u ++30Vdw4bT3Dmg02RaqYrmljlMY1TotYgKAKZ9R2n4De92gfeKFLZ/NnjEqooADNieCIKq9OQDs6Zh ++I6gDjqC5c8T/7u1bX1eBK8b5jerhAS4SPp60NlrEFrsnyI9Pl+QQhz1vnXBb4vCHcxbXHwydk3aw ++/PqrXXjaUttb8dGz2rvLMBx5NrUXDS/oT3/UzuGivq6/S5osKI1cgSer77EkH/QYU5v5gprMpDiv ++8aZIOrZGe5lI26fifTZfCYZODgUWKNMM1gLcrHqJp8x3dPHlaUkZcXh/zVdHLye6bJgBqQm8Cl89 ++V/dDUjctE64DPlEbO3ip+h2F/2IBiyu3t3nV2erQtE5aF0W5g/kUWhuHU0OHxmo9XCTSrFkk8ELF ++hpjseJvbQd6DKzQDJ0jfjJqBNwe71bAPXVudNNI7pPcGBPhhezIkOY/q2mhZRHqXsA1p1l1a9cmi ++oHr1mxeMLyDnryJ+g35inR+b+Js2OHgsGtipnvipbnuL0tjYoCWubv1d0+f+u+auWnhm5jrToTN3 ++t/jUpoHqO2xi+2jAsQ9FiEfVTzQav9+Y2HZgohJs+sP36oPktzvhTAfMykNgdDoPHgYQeyrstU+w ++jub2d8wWO+Dbmu1a415PpDXtjs1oc/xj3AjOjMHn5voBSndaKA7kzRRdvzflBNqpvLkppxFe/Til ++HTgle3W2VnpP955u7pNRudVbMbzRCEBoblJpuXbmPTAG6Eq+gppzpayrawQNTRnFVopyGS/YJKh9 ++H4ALOZxK/XWUnnOMR4nEKHhZF3kBW+WRuqiYk3j68p4boDq6t47KW4267jFR99aSYqXMMV2fzEHc ++VgYQEIGNeMc0TKfmHfDKi+YOhnhimEGm9VoWUdXcP+SmC8SwI2tGoIp0XFwrdtdIZYtLbMRiwxsW ++Uhg9M9+fw67T2XHvuHRhbLTd49mJeqh48FPuc7CMkebi+N7cPWjfebWge69t79A0a7jO3LcEy6Av ++0iMdqQJp/FZd7sUX0HKYH/1Li39A3u2yTDdF3agz9m4NGtYzWyF0b3PC6wTIOPdd0tjhgO51jK3d ++sRnf1ReGUToe5kBjQ0Xlk/cqnGa0cRNewmzSB8JLbsXAE8NLDvxHhpfUlZpgaBQ+Sg/01hA8EIdi ++9WDfT9kwAvSZApHwdLt1u6E2lYGdkZ9nZXw/MrdNs660yvy0eUCO7F5cRiD4HsrSTl927onbFV5y ++pYsef3fx8c3pBdFienn69j9Ov6OMLdyLtmzVo+NvaXbA1D5wcsPtWJzKsukbvMG25/pYLnBSEDrv ++OwkKPRD6i9n6FrStyOzXQx06RUHdToD47mm3oA6p7F7IHb9MFaDYuTWtJG5PPeWMW/3LSlvQj/Qx ++HotDc0yn3zcnK0pGO4HnoYWzcl+76kT5q+qK0IGg+NhkYNMK4IEK8pc5T9HlNCZqzw5K+/8BQmnj ++WIqor9cBKZxL65pHuuGRQVXu/2ykAGUX4d6OHcWJubib2vHZUWlupMeD4bkMNUGcWsBRd362sC9k ++MkAFz2OFpy4xZES0/lOnrSY34Vkprg6o6vgAlc21+YVrppzbv8WYgVCZy8BKzl7iM1hovKwTO6vA ++9Ol0IKePjqqypVXmAprvEOjciGcJ7I3+EivE2Vb4sHFULhlmzhId1U1+FvJoNy3sNa1eiIOhmlS7 ++JlOIl8MNF62yT9XjiHuUD/Qoa135Z1lgTOEcKjYV3xJkPusUdPuX43zgAbva9sPXu6uXx+bkAfkd ++X1uKhFLNRpZhv7JSNXfeOGl1J2YpJpTLh3s1K16sWlxbUNknGNrbdOpVBvY/OgmCIY2c9/0hM93D ++uZd/1MbUsN4xTEkEz8oxTcuq8FG4myfj7nQbtdUFwtVKjwDSUYEAC8F0dKOVPbrlFPDghdoNzmq6 ++q9c+fvItqaAwsssR3EP7fg1+7e5UZfyo7oyi7s8N2hyolhyEm30HbjV2QiHDJqE99YYPBlwALtju ++7//yEf27OY6m+9Euv9q0etVbJMi+LKbFYtpQi0T6cQhGBvRmQNoaaym0oOMdNQ0dbYZq5oZ8gY4f ++pdriTdy0wSBndqo8AGMUvP8DesjxGg== + """) + + ##file activate.sh +diff -urN firefox-39.0.orig/python/virtualenv/virtualenv_embedded/site.py firefox-39.0/python/virtualenv/virtualenv_embedded/site.py +--- firefox-39.0.orig/python/virtualenv/virtualenv_embedded/site.py 2015-07-15 15:31:44.632317100 +0100 ++++ firefox-39.0/python/virtualenv/virtualenv_embedded/site.py 2015-07-15 19:06:43.500946400 +0100 +@@ -578,7 +578,7 @@ + plat_path = os.path.join(path, 'plat-%s' % sys.platform) + if os.path.exists(plat_path): + paths.append(plat_path) +- elif sys.platform == 'win32': ++ elif sys.platform == 'win32' and not 'GCC' in sys.version: + paths = [os.path.join(sys.real_prefix, 'Lib'), os.path.join(sys.real_prefix, 'DLLs')] + else: + paths = [os.path.join(sys.real_prefix, 'lib', 'python'+sys.version[:3])] +diff -urN firefox-39.0.orig/python/mozbuild/mozbuild/virtualenv.py firefox-39.0/python/mozbuild/mozbuild/virtualenv.py +--- firefox-39.0.orig/python/mozbuild/mozbuild/virtualenv.py 2015-07-15 21:11:43.419860400 +0100 ++++ firefox-39.0/python/mozbuild/mozbuild/virtualenv.py 2015-07-15 21:12:18.702750700 +0100 +@@ -65,7 +65,7 @@ + # we have a bit of a chicken-and-egg problem and can't reliably + # import virtualenv. The functionality is trivial, so just implement + # it here. +- if sys.platform in ('win32', 'cygwin'): ++ if sys.platform == 'win32' and not 'GCC' in sys.version: + return os.path.join(self.virtualenv_root, 'Scripts') + + return os.path.join(self.virtualenv_root, 'bin') +diff -urN firefox-39.0.orig/build/autoconf/python-virtualenv.m4 firefox-39.0/build/autoconf/python-virtualenv.m4 +--- firefox-39.0.orig/build/autoconf/python-virtualenv.m4 2015-06-30 23:57:57.000000000 +0100 ++++ firefox-39.0/build/autoconf/python-virtualenv.m4 2015-07-17 15:30:15.659590600 +0100 +@@ -58,7 +58,7 @@ + + case "$host_os" in + mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe ++ PYTHON=$(cygpath -am $(find $MOZ_BUILD_ROOT -name python.exe)) + ;; + *) + PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python +diff -urN firefox-39.0.orig/configure firefox-39.0/configure +--- firefox-39.0.orig/configure 2015-07-15 15:31:44.566317100 +0100 ++++ firefox-39.0/configure 2015-07-15 19:22:03.026946400 +0100 +@@ -1476,7 +1476,7 @@ + + case "$host_os" in + mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe ++ PYTHON=$(cygpath -am $(find $MOZ_BUILD_ROOT -name python.exe)) + ;; + *) + PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python diff --git a/mingw-w64-firefox/0006-Fix-pointer-casting.patch b/mingw-w64-firefox/0006-Fix-pointer-casting.patch new file mode 100644 index 0000000000..44226b106d --- /dev/null +++ b/mingw-w64-firefox/0006-Fix-pointer-casting.patch @@ -0,0 +1,11 @@ +--- firefox-39.0/security/sandbox/chromium/base/win/pe_image.h.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/win/pe_image.h 2015-07-19 19:49:17.704118900 +0100 +@@ -247,7 +247,7 @@ + } + + inline WORD PEImage::ToOrdinal(LPCSTR name) { +- return reinterpret_cast(name); ++ return static_cast(reinterpret_cast(name)); + } + + inline HMODULE PEImage::module() const { diff --git a/mingw-w64-firefox/0007-Fix-duplicate-explicit-instantiation.patch b/mingw-w64-firefox/0007-Fix-duplicate-explicit-instantiation.patch new file mode 100644 index 0000000000..c52e7c67ad --- /dev/null +++ b/mingw-w64-firefox/0007-Fix-duplicate-explicit-instantiation.patch @@ -0,0 +1,21 @@ +--- firefox-39.0/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc 2015-07-19 20:25:24.348811900 +0100 +@@ -122,7 +122,9 @@ + + // Instantiate versions we know callers will need. + template void PrepareForUTF8Output(const wchar_t*, size_t, std::string*); ++#if !defined(WCHAR_T_IS_UTF16) + template void PrepareForUTF8Output(const char16*, size_t, std::string*); ++#endif + + template + void PrepareForUTF16Or32Output(const char* src, +@@ -143,6 +145,8 @@ + + // Instantiate versions we know callers will need. + template void PrepareForUTF16Or32Output(const char*, size_t, std::wstring*); ++#if !defined(WCHAR_T_IS_UTF16) + template void PrepareForUTF16Or32Output(const char*, size_t, string16*); ++#endif + + } // namespace base diff --git a/mingw-w64-firefox/0008-Fix-stray-back-slash-in-program.patch b/mingw-w64-firefox/0008-Fix-stray-back-slash-in-program.patch new file mode 100644 index 0000000000..37e7671215 --- /dev/null +++ b/mingw-w64-firefox/0008-Fix-stray-back-slash-in-program.patch @@ -0,0 +1,12 @@ +--- firefox-39.0/security/sandbox/chromium/base/win/scoped_handle.h.orig 2015-07-19 20:52:07.176488400 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/win/scoped_handle.h 2015-07-19 20:57:44.812800100 +0100 +@@ -18,8 +18,7 @@ + #include + #define BASE_WIN_GET_CALLER _ReturnAddress() + #elif defined(COMPILER_GCC) +-#define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\ +- __builtin_return_address(0)) ++#define BASE_WIN_GET_CALLER __builtin_extract_return_addr(__builtin_return_address(0)) + #endif + + namespace base { diff --git a/mingw-w64-firefox/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch b/mingw-w64-firefox/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch new file mode 100644 index 0000000000..754b6626f0 --- /dev/null +++ b/mingw-w64-firefox/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch @@ -0,0 +1,15 @@ +--- firefox-39.0/security/sandbox/chromium/base/threading/platform_thread_win.cc.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/threading/platform_thread_win.cc 2015-07-19 21:41:06.812626000 +0100 +@@ -13,6 +13,12 @@ + #include "base/win/scoped_handle.h" + #include "base/win/windows_version.h" + ++// LibSEH may be useful here: ++// http://www.programmingunlimited.net/siteexec/content.cgi?page=libseh ++#if defined(__GNUC__) ++#define __except(_x) ++#endif ++ + namespace base { + + namespace { diff --git a/mingw-w64-firefox/0010-Dont-use-I64-numeric-suffix.patch b/mingw-w64-firefox/0010-Dont-use-I64-numeric-suffix.patch new file mode 100644 index 0000000000..e4d8b3d944 --- /dev/null +++ b/mingw-w64-firefox/0010-Dont-use-I64-numeric-suffix.patch @@ -0,0 +1,11 @@ +--- firefox-39.0/security/sandbox/chromium/base/time/time_win.cc.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/time/time_win.cc 2015-07-19 23:01:28.117321100 +0100 +@@ -334,7 +334,7 @@ + // we keep last_seen_now stay correctly in sync. + DWORD now = tick_function(); + if (now < last_seen_now) +- rollover_ms += 0x100000000I64; // ~49.7 days. ++ rollover_ms += 0x100000000ll; // ~49.7 days. + last_seen_now = now; + return TimeDelta::FromMilliseconds(now + rollover_ms); + } diff --git a/mingw-w64-firefox/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch b/mingw-w64-firefox/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch new file mode 100644 index 0000000000..b7fd3b59a5 --- /dev/null +++ b/mingw-w64-firefox/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch @@ -0,0 +1,85 @@ +diff -urN firefox-39.0.orig/media/libstagefright/moz.build firefox-39.0/media/libstagefright/moz.build +--- firefox-39.0.orig/media/libstagefright/moz.build 2015-06-30 23:57:58.000000000 +0100 ++++ firefox-39.0/media/libstagefright/moz.build 2015-07-20 18:53:20.523932000 +0100 +@@ -16,9 +16,10 @@ + DEFINES['off64_t'] = 'int64_t' + DEFINES['strcasecmp'] = 'stricmp' + DEFINES['strncasecmp'] = 'strnicmp' ++ LOCAL_INCLUDES += [ 'ports/win32/include' ] + DEFINES['HAVE_MS_C_RUNTIME'] = True + DEFINES['__PRETTY_FUNCTION__'] = '__FUNCTION__' +- LOCAL_INCLUDES += [ 'ports/win32/include' ] ++ LOCAL_INCLUDES += [ 'ports/mingw-w64/include' ] + elif CONFIG['OS_TARGET'] == 'Darwin': + DEFINES['HAVE_SYS_UIO_H'] = True + DEFINES['off64_t'] = 'off_t' +diff -urN firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/arpa/inet.h firefox-39.0/media/libstagefright/ports/mingw-w64/include/arpa/inet.h +--- firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/arpa/inet.h 1970-01-01 01:00:00.000000000 +0100 ++++ firefox-39.0/media/libstagefright/ports/mingw-w64/include/arpa/inet.h 2015-07-20 19:55:44.843115100 +0100 +@@ -0,0 +1,9 @@ ++/* Any copyright is dedicated to the Public Domain. ++ * http://creativecommons.org/publicdomain/zero/1.0/ */ ++ ++#ifndef INET_H_ ++#define INET_H_ ++ ++#include ++ ++#endif +diff -urN firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/byteswap.h firefox-39.0/media/libstagefright/ports/mingw-w64/include/byteswap.h +--- firefox-39.0.orig/media/libstagefright/ports/mingw-w64.orig/include/byteswap.h 1970-01-01 01:00:00.000000000 +0100 ++++ firefox-39.0/media/libstagefright/ports/mingw-w64/include/byteswap.h 2015-07-20 20:22:01.796787900 +0100 +@@ -0,0 +1,10 @@ ++/* Any copyright is dedicated to the Public Domain. ++ * http://creativecommons.org/publicdomain/zero/1.0/ */ ++ ++#ifndef BYTESWAP_H_ ++#define BYTESWAP_H_ ++ ++#include ++#define bswap_16 _byteswap_ushort ++ ++#endif +diff -urN firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/netinet/in.h firefox-39.0/media/libstagefright/ports/mingw-w64/include/netinet/in.h +--- firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/netinet/in.h 1970-01-01 01:00:00.000000000 +0100 ++++ firefox-39.0/media/libstagefright/ports/mingw-w64/include/netinet/in.h 2015-07-20 19:55:44.858714700 +0100 +@@ -0,0 +1,39 @@ ++/* Any copyright is dedicated to the Public Domain. ++ * http://creativecommons.org/publicdomain/zero/1.0/ */ ++ ++#ifndef IN_H_ ++#define IN_H_ ++ ++#include ++ ++#if defined(_M_IX86) || defined(_M_AMD64) ++ ++static uint32_t ++ntohl(uint32_t x) ++{ ++ return x << 24 | (x << 8 & 0xff0000) | (x >> 8 & 0xff00) | x >> 24; ++} ++ ++static uint16_t ++ntohs(uint16_t x) ++{ ++ return x << 8 | x >> 8; ++} ++ ++static uint32_t ++htonl(uint32_t x) ++{ ++ return x << 24 | (x << 8 & 0xff0000) | (x >> 8 & 0xff00) | x >> 24; ++} ++ ++static uint16_t ++htons(uint16_t x) ++{ ++ return x << 8 | x >> 8; ++} ++ ++#else ++#error Unsupported architecture ++#endif ++ ++#endif diff --git a/mingw-w64-firefox/0013-MinGW-w64-Disable-TabletMode-stuff.patch b/mingw-w64-firefox/0013-MinGW-w64-Disable-TabletMode-stuff.patch new file mode 100644 index 0000000000..c3a989c5b8 --- /dev/null +++ b/mingw-w64-firefox/0013-MinGW-w64-Disable-TabletMode-stuff.patch @@ -0,0 +1,49 @@ +--- firefox-41.0b5/widget/windows/WindowsUIUtils.cpp.orig 2015-08-30 16:03:42.591416200 +0100 ++++ firefox-41.0b5/widget/windows/WindowsUIUtils.cpp 2015-08-30 16:03:45.043620700 +0100 +@@ -20,6 +20,41 @@ + #include "nsString.h" + #include "nsIWidget.h" + ++#if defined(__MINGW64_VERSION_MAJOR) ++/* MinGW-w64 doesn't have support for this WRL stuff yet: ++ https://msdn.microsoft.com/en-us/library/hh438466(v=vs.110).aspx */ ++ ++WindowsUIUtils::WindowsUIUtils() : ++ mInTabletMode(eTabletModeUnknown) ++{ ++} ++ ++WindowsUIUtils::~WindowsUIUtils() ++{ ++} ++ ++/* ++ * Implement the nsISupports methods... ++ */ ++NS_IMPL_ISUPPORTS(WindowsUIUtils, ++ nsIWindowsUIUtils) ++ ++NS_IMETHODIMP ++WindowsUIUtils::GetInTabletMode(bool* aResult) ++{ ++ *aResult = false; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++WindowsUIUtils::UpdateTabletModeState() ++{ ++ return NS_OK; ++} ++ ++ ++ ++#else + #include + + #pragma comment(lib, "runtimeobject.lib") +@@ -172,3 +207,4 @@ + return NS_OK; + } + ++#endif /* defined(__MINGW64_VERSION_MAJOR) */ diff --git a/mingw-w64-firefox/0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch b/mingw-w64-firefox/0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch new file mode 100644 index 0000000000..b43d96c937 --- /dev/null +++ b/mingw-w64-firefox/0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch @@ -0,0 +1,13 @@ +--- firefox-41.0b5/browser/components/shell/nsWindowsShellService.cpp.orig 2015-08-27 22:29:59.000000000 +0100 ++++ firefox-41.0b5/browser/components/shell/nsWindowsShellService.cpp 2015-08-30 17:10:20.382614000 +0100 +@@ -389,8 +389,8 @@ + GetHashPrefName(LPCWSTR aClassName, nsACString& aPrefName) + { + aPrefName.AssignLiteral("browser.shell.associationHash."); +- aPrefName.Append(NS_ConvertUTF16toUTF8(*aClassName == L'.' ? aClassName + 1 +- : aClassName)); ++ aPrefName.Append(NS_ConvertUTF16toUTF8(*aClassName == L'.' ? (const char16_t*)(aClassName + 1) ++ : (const char16_t*)aClassName)); + } + + static bool diff --git a/mingw-w64-firefox/0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch b/mingw-w64-firefox/0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch new file mode 100644 index 0000000000..2e168b754e --- /dev/null +++ b/mingw-w64-firefox/0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch @@ -0,0 +1,11 @@ +--- firefox-41.0b5.orig/security/nss/lib/dbm/include/cdefs.h 2015-08-31 12:22:25.118591200 +0100 ++++ firefox-41.0b5/security/nss/lib/dbm/include/cdefs.h 2015-08-31 12:23:50.591480000 +0100 +@@ -109,7 +109,7 @@ + * these work for GNU C++ (modulo a slight glitch in the C++ grammar + * in the distribution version of 2.5.5). + */ +-#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5 ++#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) + #define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ + #if defined(__GNUC__) && !defined(__STRICT_ANSI__) + #define __dead __volatile diff --git a/mingw-w64-firefox/0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch b/mingw-w64-firefox/0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch new file mode 100644 index 0000000000..cc5da3283c --- /dev/null +++ b/mingw-w64-firefox/0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch @@ -0,0 +1,11 @@ +--- firefox-41.0b5.orig/dom/media/gmp/GMPLoader.cpp 2015-08-27 22:30:07.000000000 +0100 ++++ firefox-41.0b5/dom/media/gmp/GMPLoader.cpp 2015-08-31 13:40:19.208933900 +0100 +@@ -227,7 +227,7 @@ + + // Load the GMP. + PRLibSpec libSpec; +-#ifdef XP_WIN ++#if defined(XP_WIN) && defined(MOZ_SANDBOX) + libSpec.value.pathname_u = widePath; + libSpec.type = PR_LibSpec_PathnameU; + #else diff --git a/mingw-w64-firefox/0017-MSYS2-Dont-use--static-or--static-libgcc.patch b/mingw-w64-firefox/0017-MSYS2-Dont-use--static-or--static-libgcc.patch new file mode 100644 index 0000000000..e505a70fac --- /dev/null +++ b/mingw-w64-firefox/0017-MSYS2-Dont-use--static-or--static-libgcc.patch @@ -0,0 +1,30 @@ +--- firefox-41.0b5.orig/configure.in 2015-08-27 22:30:03.000000000 +0100 ++++ firefox-41.0b5/configure.in 2015-08-31 16:33:22.338814900 +0100 +@@ -2223,9 +2223,9 @@ + MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + RC='$(WINDRES)' +- # Use static libgcc and libstdc++ +- LDFLAGS="$LDFLAGS -static" +- NSPR_LDFLAGS="$NSPR_LDFLAGS -static-libgcc" ++ # Don't use static libgcc and libstdc++ for MSYS2 ++ # LDFLAGS="$LDFLAGS -static" ++ # NSPR_LDFLAGS="$NSPR_LDFLAGS -static-libgcc" + # Use temp file for windres (bug 213281) + RCFLAGS='-O coff --use-temp-file' + # mingw doesn't require kernel32, user32, and advapi32 explicitly +--- firefox-41.0b5/configure.orig 2015-08-31 15:21:34.109398300 +0100 ++++ firefox-41.0b5/configure 2015-08-31 16:33:30.509282300 +0100 +@@ -9473,9 +9473,9 @@ + MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + RC='$(WINDRES)' +- # Use static libgcc and libstdc++ +- LDFLAGS="$LDFLAGS -static" +- NSPR_LDFLAGS="$NSPR_LDFLAGS -static-libgcc" ++ # Don't use static libgcc and libstdc++ for MSYS2 ++ # LDFLAGS="$LDFLAGS -static" ++ # NSPR_LDFLAGS="$NSPR_LDFLAGS -static-libgcc" + # Use temp file for windres (bug 213281) + RCFLAGS='-O coff --use-temp-file' + # mingw doesn't require kernel32, user32, and advapi32 explicitly diff --git a/mingw-w64-firefox/0018-MSYS2-Allow-make-install.patch b/mingw-w64-firefox/0018-MSYS2-Allow-make-install.patch new file mode 100644 index 0000000000..dd3a6475d8 --- /dev/null +++ b/mingw-w64-firefox/0018-MSYS2-Allow-make-install.patch @@ -0,0 +1,15 @@ +--- firefox-41.0b5/toolkit/mozapps/installer/packager.mk.orig 2015-08-27 22:30:13.000000000 +0100 ++++ firefox-41.0b5/toolkit/mozapps/installer/packager.mk 2015-08-31 23:47:20.134091700 +0100 +@@ -116,9 +116,9 @@ + # dist/sdk/lib -> prefix/lib/appname-devel-version/lib + # prefix/lib/appname-devel-version/* symlinks to the above directories + install:: prepare-package +-ifeq ($(OS_ARCH),WINNT) +- $(error "make install" is not supported on this platform. Use "make package" instead.) +-endif ++# ifeq ($(OS_ARCH),WINNT) ++# $(error "make install" is not supported on this platform. Use "make package" instead.) ++# endif + ifeq (bundle,$(MOZ_FS_LAYOUT)) + $(error "make install" is not supported on this platform. Use "make package" instead.) + endif diff --git a/mingw-w64-firefox/0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch b/mingw-w64-firefox/0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch new file mode 100644 index 0000000000..c952cfc586 --- /dev/null +++ b/mingw-w64-firefox/0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch @@ -0,0 +1,15 @@ +--- firefox-41.0b5/xpcom/build/PoisonIOInterposerWin.cpp 2015-09-01 00:07:54.085669600 +0100 ++++ firefox-41.0b5/xpcom/build/PoisonIOInterposerWin.cpp.orig 2015-09-01 00:06:43.475631000 +0100 +@@ -445,7 +445,11 @@ + + // Stdout and Stderr are OK. + MozillaRegisterDebugFD(1); +- MozillaRegisterDebugFD(2); ++ // Avoid a MOZ_ASSERT() when launching from MSYS2's mintty: ++ // https://bugzilla.mozilla.org/show_bug.cgi?id=1163452 ++ if (_get_osfhandle(1) != _get_osfhandle(2)) { ++ MozillaRegisterDebugFD(2); ++ } + + #ifdef MOZ_REPLACE_MALLOC + // The contract with InitDebugFd is that the given registry can be used diff --git a/mingw-w64-firefox/0020-gmp-clearkey-include-atomic-header.patch b/mingw-w64-firefox/0020-gmp-clearkey-include-atomic-header.patch new file mode 100644 index 0000000000..7bf9466502 --- /dev/null +++ b/mingw-w64-firefox/0020-gmp-clearkey-include-atomic-header.patch @@ -0,0 +1,11 @@ +--- firefox-41.0b6/media/gmp-clearkey/0.1/VideoDecoder.h.orig 2015-09-01 01:26:48.000000000 +0100 ++++ firefox-41.0b6/media/gmp-clearkey/0.1/VideoDecoder.h 2015-09-03 17:49:05.009038800 +0100 +@@ -24,6 +24,8 @@ + + #include "mfobjects.h" + ++#include ++ + class VideoDecoder : public GMPVideoDecoder + , public RefCounted + { diff --git a/mingw-w64-firefox/0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch b/mingw-w64-firefox/0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch new file mode 100644 index 0000000000..d810735388 --- /dev/null +++ b/mingw-w64-firefox/0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch @@ -0,0 +1,19 @@ +--- firefox-42.0/dom/media/platforms/wmf/WMFVideoMFTManager.cpp.orig 2015-10-29 22:17:56.000000000 +0000 ++++ firefox-42.0/dom/media/platforms/wmf/WMFVideoMFTManager.cpp 2015-11-25 00:04:09.460865800 +0000 +@@ -30,7 +30,7 @@ + using mozilla::layers::LayerManager; + using mozilla::layers::LayersBackend; + +-#if MOZ_WINSDK_MAXVER < 0x0A000000 ++#if MOZ_WINSDK_MAXVER < 0x0A000000 && !defined(__MINGW64_VERSION_MAJOR) + // Windows 10+ SDK has VP80 and VP90 defines + const GUID MFVideoFormat_VP80 = + { +@@ -39,6 +39,7 @@ + 0x0010, + {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} + }; ++#endif /* MOZ_WINSDK_MAXVER < 0x0A000000 && !defined(__MINGW64_VERSION_MAJOR) */ + + const GUID MFVideoFormat_VP90 = + { diff --git a/mingw-w64-firefox/PKGBUILD b/mingw-w64-firefox/PKGBUILD new file mode 100644 index 0000000000..ea25903584 --- /dev/null +++ b/mingw-w64-firefox/PKGBUILD @@ -0,0 +1,305 @@ +# Maintainer: Ray Donnelly + +# My workings .. +# +# Setting up a virtualenv and installing setuptools and pip into it: +# pushd /c/repo/mingw-w64-firefox/src +# PATH=/mingw64/bin:$PATH /mingw64/bin/python2.7.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py /tmp/test +# PATH=/mingw64/bin:$PATH PYTHONPATH="C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/setuptools-11.0-py2.py3-none-any.whl;C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl" PIP_FIND_LINKS=". C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support" PIP_USE_WHEEL=1 PIP_PRE=1 PIP_NO_INDEX=1 C:/msys64t/tmp/test/bin/python2.7.exe -c 'import sys, pip; sys.exit(pip.main(["install", "--ignore-installed"] + sys.argv[1:]))' setuptools pip +# +# Using msys2-python has a problem. It emits .cpp files containing msys2 paths which causes MinGW-w64 GCC to fall over. +# seems harfbuzz have some conversion detection support that may be useful: +# "checking how to convert x86_64-pc-mingw64 file names to toolchain format... func_convert_file_msys_to_w32" +# but it'd need implementing in Python with subprocess I guess: +# msys2-python -> mingw-w64-gcc : cygpath -m +# msys2-python -> msys2-mingw-w64-cross-gcc : noop +# mingw-python -> mingw-w64-gcc : noop +# mingw-python -> msys2-mingw-w64-cross-gcc : cygpath -u +# * -> * : noop + +# Testing: +# cd /c/repo/mingw-w64-firefox/src +# [[ -d /tmp/win32-python ]] && rm -rf /tmp/win32-python +# mkdir /tmp/win32-python +# [[ -d /tmp/mingw-python ]] && rm -rf /tmp/mingw-python +# mkdir /tmp/mingw-python +# /c/Python27/python.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py /tmp/win32-python > /tmp/win32-python/log.txt +# /mingw64/bin/python.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py /tmp/mingw-python > /tmp/mingw-python/log.txt +# +# "ImportError: No module named opcode" <- it's meant to be found in the original location?! +# Working: +# In fake distutils __init__.py, sys.path is +# ['', +# 'C:\\repo\\mingw-w64-firefox\\src\\firefox-39.0\\python\\virtualenv\\virtualenv_support\\setuptools-11.0-py2.py3-none-any.whl', +# 'C:\\repo\\mingw-w64-firefox\\src\\firefox-39.0\\python\\virtualenv\\virtualenv_support\\pip-6.0.6-py2.py3-none-any.whl', +# 'C:\\windows\\system32\\python27.zip', +# 'C:\\msys64t\\tmp\\win32-python\\DLLs', +# 'C:\\msys64t\\tmp\\win32-python\\lib', +# 'C:\\msys64t\\tmp\\win32-python\\lib\\plat-win', +# 'C:\\msys64t\\tmp\\win32-python\\lib\\lib-tk', +# 'C:\\msys64t\\tmp\\win32-python\\Scripts', +# 'C:\\Python27\\Lib', +# 'C:\\Python27\\DLLs', +# 'C:\\Python27\\Lib\\lib-tk', +# 'C:\\msys64t\\tmp\\win32-python', +# 'C:\\msys64t\\tmp\\win32-python\\lib\\site-packages'] + +# In fake distutils __init__.py, sys.path is +# ['', +# 'C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/setuptools-11.0-py2.py3-none-any.whl', +# 'C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl', +# 'C:/msys64t/tmp/mingw-python/lib/python27.zip', +# 'C:/msys64t/tmp/mingw-python/lib/python2.7', +# 'C:/msys64t/tmp/mingw-python/lib/python2.7/plat-win32', +# 'C:/msys64t/tmp/mingw-python/lib/python2.7/lib-tk', +# 'C:/msys64t/tmp/mingw-python/lib/python2.7/lib-old', +# 'C:/msys64t/tmp/mingw-python/lib/python2.7/lib-dynload', +# 'C:/building/msys32/mingw64', +# 'C:/msys64t/mingw64/Lib', +# 'C:/msys64t/mingw64/DLLs', +# 'C:/msys64t/tmp/mingw-python/lib/python2.7/site-packages'] + +# Tweaks. +#_make="make.exe" +_make="mingw32-make.exe" +#_python="/usr/bin/python2.7.exe" +_python="${MINGW_PREFIX}/bin/python2.7.exe" +#_python="/c/Python27/python.exe" +#_python="/e/WinProgF/Python27/python.exe" +path_conv_for_make() { + if [ "${_make}" = "mingw32-make.exe" ]; then + echo $(cygpath -m "${1}") + else + echo $(cygpath -u "${1}") + fi +} + +_realname=firefox +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=42.0 +pkgrel=1 +pkgdesc='Mozilla Firefox (mingw-w64)' +groups=("${MINGW_PACKAGE_PREFIX}") +arch=('any') +options=('debug' '!strip') +url='https://www.mozilla.org/firefox/' +license=('MPL2') +makedepends=('unzip' + 'zip' + "${MINGW_PACKAGE_PREFIX}-yasm" + "${MINGW_PACKAGE_PREFIX}-python2") +source=("http://ftp.mozilla.org/pub/mozilla.org/${_realname}/releases/${pkgver}/source/${_realname}-${pkgver}.source.tar.xz" + "http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip" + "nsinstall.exe.manifest" + "0001-Allow-MSYS2-shell.patch" + "0002-Allow-MSYS2-make.patch" + "0003-Use-PYTHON-env-var.patch" + "0004-Allow-MSYS2-python.patch" + "0005-Allow-mingw-w64-python.patch" + "0006-Fix-pointer-casting.patch" + "0007-Fix-duplicate-explicit-instantiation.patch" + "0008-Fix-stray-back-slash-in-program.patch" + "0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch" + "0010-Dont-use-I64-numeric-suffix.patch" + "0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch" + "0013-MinGW-w64-Disable-TabletMode-stuff.patch" + "0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch" + "0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch" + "0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch" + "0017-MSYS2-Dont-use--static-or--static-libgcc.patch" + "0018-MSYS2-Allow-make-install.patch" + "0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch" + "0020-gmp-clearkey-include-atomic-header.patch" + "0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch" + "debugging.patch" + "mozconfig.x86_64" + "mozconfig.i686" + "config.sub" + "config.guess") +noextract=("${_realname}-${pkgver}.source.tar.xz") +sha1sums=('c207a73fbfde2683aca36417331441d007ceb765' + '6c018e4ac903180f5f65492241502842dc1c035a' + 'c4e841bf724a1ff907592c8a11ba9683568acfd5' + '1c0810fbfd6f336eec81e236c89c6c9ca0e79290' + 'c269337da604ab047de5dea088dbbe8f547dfbea' + '2fd8904f036d2515e314b3d7510d8358add298d2' + 'c06e3e351cb3d29148e0d477ad50b70973baf8be' + '4883d29fefd5c25d4892091bf6a45572f3d7aca4' + '82205584bd1b4ac4b5ac4352af3ccc15c5448a1c' + '3156a4001b6a5a62ac3a8c318f4115e8ff09e69d' + 'c17480500944d0863f51af46919133b2bd777e0c' + '17bc2719882a5bc0775f48522a45c9132aebdd04' + '12385ab4cb659f712f3a3a93248741d299048b9c' + '4553ac6631d56bc251ffd6cbc503002c6835c9de' + '1da4ea7929176f545f9f20e00109d93bc9c4fd12' + '7e36fe8fcca2730cf55a2703b50d998b93af3b7e' + '7dcb0ea5e54ffb08cc9afa495b13e42d058ecbbd' + 'bacec1492cb54096f7483b192918050e7cb1de1d' + '9eead9e427a8158df42a2ec81bf7c9f38ad1c915' + 'e939e9722fd0cb70a7bd5e705b37bd47045e9647' + '20a6613a688c2e7cb95a6faae49974e452dba8de' + '7f23896aeca52cd7bd3a038c5b5fd4eb68c90923' + '860dd63612e51d26b8bc17631539b16227efb8bf' + 'c2a0ed20a82d212bb4aa84cb2f294be3ba0bb859' + '02befff9986a31bbc4ad74a8c0125e84f29fcb40' + '9f4a4161fd23ba603c3e8140b322e732a46efffc' + '17c4f8628ea435c999be66ee4c2967fdaf3b2955' + 'ffb6644dbad00413c668c833e3f3680d1d73aa53') + +prepare() { + [ -d "${srcdir}"/${_realname}-${pkgver} ] && rm -rf ${_realname}-${pkgver} + tar -xf "${srcdir}"/${_realname}-${pkgver}.source.tar.xz || true + if [ -d "${srcdir}"/mozilla-beta ]; then + _archivedir="mozilla-beta" + elif [ -d "${srcdir}"/mozilla-release ]; then + _archivedir="mozilla-release" + elif [ -d "${srcdir}"/${_realname}-${pkgver} ]; then + echo "Found sources" + else + echo "Can't find sources!" + exit 1 + fi + + if [ -n "$_archivedir" ]; then + # Getting a lot of "mv: cannot move .. Permission denied"; try a bit of sleeping. Yuck. + (sleep 1 && mv "${srcdir}"/"${_archivedir}" "${srcdir}"/${_realname}-${pkgver}) || \ + (sleep 1 && mv "${srcdir}"/"${_archivedir}" "${srcdir}"/${_realname}-${pkgver}) + fi + + cd "${srcdir}"/${_realname}-${pkgver} + # Mostly this patch is about msys2-python and mingw-w64-python not + # working with virtualenv. Really it needs splitting into two, one + # adding support for each of them. Most of the "is_win or True:" + # and "is_win and False:" stuff relates to mingw-w64-python and is + # to be replaced with proper detection and a variable "is_mingw". + patch -p1 -i "${srcdir}"/0001-Allow-MSYS2-shell.patch + if [ "${_make}" = "make" ]; then + patch -p1 -i "${srcdir}"/0002-Allow-MSYS2-make.patch + fi + patch -p1 -i "${srcdir}"/0003-Use-PYTHON-env-var.patch + if [ "${_python}" = "/usr/bin/python2.7.exe" ]; then + patch -p1 -i "${srcdir}"/0004-Allow-MSYS2-python.patch + fi + patch -p1 -i "${srcdir}"/0005-Allow-mingw-w64-python.patch + patch -p1 -i "${srcdir}"/0006-Fix-pointer-casting.patch + patch -p1 -i "${srcdir}"/0007-Fix-duplicate-explicit-instantiation.patch + patch -p1 -i "${srcdir}"/0008-Fix-stray-back-slash-in-program.patch + patch -p1 -i "${srcdir}"/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch + patch -p1 -i "${srcdir}"/0010-Dont-use-I64-numeric-suffix.patch + patch -p1 -i "${srcdir}"/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch + patch -p1 -i "${srcdir}"/0013-MinGW-w64-Disable-TabletMode-stuff.patch + patch -p1 -i "${srcdir}"/0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch + patch -p1 -i "${srcdir}"/0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch + patch -p1 -i "${srcdir}"/0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch + patch -p1 -i "${srcdir}"/0017-MSYS2-Dont-use--static-or--static-libgcc.patch + patch -p1 -i "${srcdir}"/0018-MSYS2-Allow-make-install.patch + patch -p1 -i "${srcdir}"/0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch + patch -p1 -i "${srcdir}"/0020-gmp-clearkey-include-atomic-header.patch + patch -p1 -i "${srcdir}"/0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch + # patch -p1 -i "${srcdir}"/debugging.patch + + find . -name config.sub -exec cp "${srcdir}"/config.sub {} \; + find . -name config.guess -exec cp "${srcdir}"/config.guess {} \; + (autoconf-2.13 && cd js/src && autoconf-2.13) + + # Despite commit http://hg.mozilla.org/mozilla-central/rev/e149b8c85eb8 (hg log -p -r 98136 | less): + # changeset: 98136:e149b8c85eb8 + # summary: Bug 757252 - Kill nsinstall_win.c, use nsinstall.py on Windows instead. r=ted + # .. we still requires an nsinstall executable for some of the build process (NSPR, more?): + # firefox-41.0b5/nsprpub/configure.in:1177 + # case "$host" in + # *-mingw*|*-msys*) + # NSINSTALL=nsinstall + # ;; + # However, if we try to use it for everything via: + # "${_make}" -f $PWD/client.mk build NSINSTALL=${srcdir}/moztools/bin/nsinstall.exe + # .. we run into race conditions, some of which were fixed here: + # http://hg.mozilla.org/mozilla-central/rev/e857761718d5 + # .. but the nsinstall.exe in moztools.zip (from 2006) doesn't include those fixes. Anyway, + # since nsinstall_win.c has been removed to ease maintainence, we can get away with using + # the buggy one, as nsinstall.py is used for the majority of the build process. + cp "${srcdir}"/moztools/bin/nsinstall.exe . + cp "${srcdir}"/nsinstall.exe.manifest . +} + +build() { + cd "${srcdir}"/${_realname}-${pkgver} + if [ "${CARCH}" = "i686" ]; then + _builddir=obj-i686-w64-mingw32 + else + _builddir=obj-x86_64-w64-mingw32 + fi + [ -d ${_builddir} ] && rm -rf "${_builddir}" + mkdir ${_builddir} + cp "${srcdir}"/mozconfig.${CARCH} ${_builddir}/.mozconfig + if check_option "debug" "y"; then + echo "ac_add_options --enable-debug-symbols" >> ${_builddir}/.mozconfig + echo "ac_add_options --disable-install-strip" >> ${_builddir}/.mozconfig + echo "ac_add_options --disable-optimize" >> ${_builddir}/.mozconfig + # The next two lines are for older versions of Firefox but + # I've not managed to build a debuggable xul.dll yet. + echo "ac_add_options --enable-debugger-info-modules=yes" >> ${_builddir}/.mozconfig + export export MOZ_DEBUG_SYMBOLS=1 + fi + export PYTHON=$(path_conv_for_make "${_python}") + echo $PYTHON + export MOZCONFIG=${PWD}/${_builddir}/.mozconfig + # See: https://bugzilla.mozilla.org/show_bug.cgi?id=950332 + echo "mk_add_options MOZ_OBJDIR=$(path_conv_for_make ${PWD}/${_builddir})" >> ${_builddir}/.mozconfig + export MIDL="${MINGW_PREFIX}/bin/widl.exe -I ${MINGW_PREFIX}/${CARCH}-w64-mingw32/include" + export MOZ_TOOLS=${MINGW_PREFIX} + export MAKEFLAGS=-j9 + # For nsinstall.exe + export PATH=${PWD}:"${PATH}" + + # .. make a shell script so we can easily recreate the build environment while + # developing this PKGBUILD. + set + set |awk ' + BEGIN { _p = 1; } + $0~/^[^ ]+ \(\)/ { _p = 0; } + _p == 1 + $0 == "}" { _p = 1; } + ' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d; + /^(UID|EUID)=/d; + /^(FUNCNAME|GROUPS|PPID|SHELLOPTS|BASHOPTS)=/d;' > ./env-${CARCH}.sh + echo "export PATH PYTHON MOZCONFIG MIDL MOZ_TOOLS CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS" >> ./env-${CARCH}.sh + + "${_make}" -f $PWD/client.mk configure + "${_make}" -f $PWD/client.mk build +} + +# check() { +# cd "${srcdir}"/${_realname}-${pkgver} +# "${_make}" -f $PWD/client.mk check +# } + +package() { + cd "${srcdir}"/${_realname}-${pkgver} + if [ "${CARCH}" = "i686" ]; then + _builddir=obj-i686-w64-mingw32 + else + _builddir=obj-x86_64-w64-mingw32 + fi + # TBB uses: + "${_make}" -k -C ${PWD}/${_builddir} package INNER_MAKE_PACKAGE=true + # ArchLinux uses (but this fails on MSYS2): + # "${_make}" -k -C ${PWD}/${_builddir} DESTDIR="${pkgdir}" INSTALL_SDK= install -k +} + +# Trying to figure out why I'm not getting debugging info in xul.dll: +# (do_main in firefox-41.0.1/browser/app/nsBrowserApp.cpp is the last thing with debug info) +# Crash happens in firefox-41.0.1/js/src/jit/BaselineJIT.cpp .. in .. firefox-41.0.1/obj-i686-w64-mingw32/js/src/Unified_cpp_js_src3.cpp .. in .. libjs_static.a +# c++ -mwindows -o nsBrowserApp.o -c -DFIREFOX_ICO='"../../dist/branding/firefox.ico"' -DDOCUMENT_ICO='"../../dist/branding/document.ico"' -DNEWWINDOW_ICO='"../../dist/branding/newwindow.ico"' -DNEWTAB_ICO='"../../dist/branding/newtab.ico"' -DPBMODE_ICO='"../../dist/branding/pbmode.ico"' -DXPCOM_GLUE -DAPP_VERSION='41.0.1' -DMOZ_PHOENIX -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/browser/app -I. -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/build -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/toolkit/xre -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/xpcom/base -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/xpcom/build -I../../dist/include -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/dist/include/nspr -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/dist/include/nss -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/nsBrowserApp.o.pp -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -Wno-format -march=i686 -mtune=generic -O2 -pipe -ggdb -Og -ggdb -Og -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DDEBUG -DTRACING -g -fno-omit-frame-pointer E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/browser/app/nsBrowserApp.cpp +# E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/_virtualenv/bin/python.exe E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/config/expandlibs_exec.py --uselist -- c++ -mwindows -o firefox.exe -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -Wno-format -march=i686 -mtune=generic -O2 -pipe -ggdb -Og -ggdb -Og -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DDEBUG -DTRACING -g -fno-omit-frame-pointer nsBrowserApp.o ./module.res -mconsole -lpthread -pipe -Wl,--build-id -Wl,--enable-stdcall-fixup -Wl,--large-address-aware -DELAYLOAD:mozglue.dll ../../xpcom/glue/standalone/staticruntime/libxpcomglue_staticruntime.a ../../memory/fallible/libfallible.a ../../mozglue/build/libmozglue.a -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32 -lnetapi32 -ldelayimp +# +# /mingw32/bin/objdump -p ./js/src/Unified_cpp_js_src3.o | less +# ./js/src/Unified_cpp_js_src3.o: file format pe-i386 +# Characteristics 0x104 +# line numbers stripped +# 32 bit words +# +# c++ -mwindows -o Unified_cpp_js_src3.o -c -DFFI_BUILDING -D_CRT_RAND_S -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX='""' -DDLL_SUFFIX='".dll"' -DAB_CD= -DNO_NSPR_10_SUPPORT -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/js/src -I. -Ictypes/libffi/include -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/intl/icu/source/common -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/intl/icu/source/i18n -I../../dist/include -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/dist/include/nspr -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DMOZILLA_CLIENT -include ../../js/src/js-confdefs.h -MD -MP -MF .deps/Unified_cpp_js_src3.o.pp -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -Wno-format -march=i686 -mtune=generic -O2 -pipe -ggdb -Og -ggdb -Og -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DDEBUG -DTRACING -g -fno-omit-frame-pointer E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/js/src/Unified_cpp_js_src3.cpp +# E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/_virtualenv/bin/python.exe E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/config/expandlibs_exec.py --extract -- ar crs libjs_static.a RegExp.o CTypes.o Library.o Parser.o ExecutableAllocatorWin.o jsarray.o jsatom.o jsmath.o jsutil.o pm_stub.o TraceLogging.o TraceLoggingGraph.o TraceLoggingTypes.o Unified_cpp_js_src0.o Unified_cpp_js_src1.o Unified_cpp_js_src10.o Unified_cpp_js_src11.o Unified_cpp_js_src12.o Unified_cpp_js_src2.o Unified_cpp_js_src3.o Unified_cpp_js_src4.o Unified_cpp_js_src5.o Unified_cpp_js_src6.o Unified_cpp_js_src7.o Unified_cpp_js_src8.o Unified_cpp_js_src9.o ../../config/external/ffi/libffi.a ../../config/external/nspr/libnspr.a ../../config/external/zlib/libzlib.a + diff --git a/mingw-w64-firefox/config.guess b/mingw-w64-firefox/config.guess new file mode 100644 index 0000000000..e384484ed3 --- /dev/null +++ b/mingw-w64-firefox/config.guess @@ -0,0 +1,1443 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-03-04' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2015 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-w64-mingw32 + exit ;; + *:MINGW32*:*) + case "${UNAME_RELEASE}" in + 1.*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + esac + echo ${UNAME_MACHINE}-w64-mingw32 + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/mingw-w64-firefox/config.sub b/mingw-w64-firefox/config.sub new file mode 100644 index 0000000000..8f1229c6f7 --- /dev/null +++ b/mingw-w64-firefox/config.sub @@ -0,0 +1,1810 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-03-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2015 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/mingw-w64-firefox/debugging.patch b/mingw-w64-firefox/debugging.patch new file mode 100644 index 0000000000..03782a252e --- /dev/null +++ b/mingw-w64-firefox/debugging.patch @@ -0,0 +1,20 @@ +diff -urN firefox-38.0.5.orig/python/mozbuild/mozbuild/frontend/emitter.py firefox-38.0.5/python/mozbuild/mozbuild/frontend/emitter.py +--- firefox-38.0.5.orig/python/mozbuild/mozbuild/frontend/emitter.py 2015-05-25 22:28:56.000000000 +0100 ++++ firefox-38.0.5/python/mozbuild/mozbuild/frontend/emitter.py 2015-07-08 23:05:35.409977000 +0100 +@@ -3,6 +3,7 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + from __future__ import unicode_literals ++from __future__ import print_function + + import itertools + import json +@@ -392,6 +393,8 @@ + + for symbol in ('SOURCES', 'HOST_SOURCES', 'UNIFIED_SOURCES'): + for src in (context[symbol] or []): ++ print('sys.argv is %s' % sys.argv, file=sys.stderr) ++ print('checking if %s exists' % (mozpath.join(context.srcdir, src)), file=sys.stderr) + if not os.path.exists(mozpath.join(context.srcdir, src)): + raise SandboxValidationError('File listed in %s does not ' + 'exist: \'%s\'' % (symbol, src), context) diff --git a/mingw-w64-firefox/mozconfig.i686 b/mingw-w64-firefox/mozconfig.i686 new file mode 100644 index 0000000000..5e0a58979b --- /dev/null +++ b/mingw-w64-firefox/mozconfig.i686 @@ -0,0 +1,20 @@ +#Specify the cross compile +export CROSS_COMPILE=1 +mk_add_options CROSS_COMPILE=1 +ac_add_options --enable-application=browser +ac_add_options --target=i686-w64-mingw32 +ac_add_options --enable-default-toolkit=cairo-windows + +ac_add_options --enable-debug +ac_add_options --disable-optimize + +ac_add_options --disable-updater +ac_add_options --disable-crashreporter +ac_add_options --disable-maintenance-service +ac_add_options --disable-webrtc +ac_add_options --without-intl-api +ac_add_options --disable-sandbox +ac_add_options --prefix=/mingw32 + +# Use parallel build. Adjust number of processes for your setup. +mk_add_options MOZ_MAKE_FLAGS=-j8 diff --git a/mingw-w64-firefox/mozconfig.x86_64 b/mingw-w64-firefox/mozconfig.x86_64 new file mode 100644 index 0000000000..465e58197a --- /dev/null +++ b/mingw-w64-firefox/mozconfig.x86_64 @@ -0,0 +1,20 @@ +#Specify the cross compile +export CROSS_COMPILE=1 +mk_add_options CROSS_COMPILE=1 +ac_add_options --enable-application=browser +ac_add_options --target=x86_64-w64-mingw32 +ac_add_options --enable-default-toolkit=cairo-windows + +ac_add_options --enable-debug +ac_add_options --disable-optimize + +ac_add_options --disable-updater +ac_add_options --disable-crashreporter +ac_add_options --disable-maintenance-service +ac_add_options --disable-webrtc +ac_add_options --without-intl-api +ac_add_options --disable-sandbox +ac_add_options --prefix=/mingw64 + +# Use parallel build. Adjust number of processes for your setup. +mk_add_options MOZ_MAKE_FLAGS=-j8 diff --git a/mingw-w64-firefox/nsinstall.exe.manifest b/mingw-w64-firefox/nsinstall.exe.manifest new file mode 100644 index 0000000000..43c4646d22 --- /dev/null +++ b/mingw-w64-firefox/nsinstall.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/mingw-w64-flac/PKGBUILD b/mingw-w64-flac/PKGBUILD index e3484ab9c0..55786b23b2 100644 --- a/mingw-w64-flac/PKGBUILD +++ b/mingw-w64-flac/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=flac - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.0 +pkgver=1.3.1 pkgrel=2 pkgdesc="Free Lossless Audio Codec (mingw-w64)" arch=('any') @@ -14,31 +13,35 @@ depends=("${MINGW_PACKAGE_PREFIX}-libogg" "${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("nasm" "${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs') source=("http://downloads.xiph.org/releases/flac/flac-${pkgver}.tar.xz") -md5sums=('13b5c214cee8373464d3d65dee362cdd') +md5sums=('b9922c9a0378c88d3e901b234f852698') -build() { - cd "$srcdir/${_realname}-${pkgver}" +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" #Required as AM_CONFIG_HEADER is deprecated and causes autotools to error out. #sed -i "s/\/AC_CONFIG_HEADERS/g" configure.in touch config.rpath #./autogen.sh - ./configure \ +} + +build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --enable-shared \ --enable-static\ --disable-xmms-plugin \ - --disable-sse \ --disable-rpath \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --disable-asm-optimizations \ --with-pic make } package() { - cd "$srcdir/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-flatbuffers/0001-Add-a-libflatbuffers-for-other-projects-to-use.patch b/mingw-w64-flatbuffers/0001-Add-a-libflatbuffers-for-other-projects-to-use.patch new file mode 100644 index 0000000000..eb86c949c6 --- /dev/null +++ b/mingw-w64-flatbuffers/0001-Add-a-libflatbuffers-for-other-projects-to-use.patch @@ -0,0 +1,62 @@ +From ab710b6f89339e9ddaffa8416910e4fd8684d0fb Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Wed, 22 Jul 2015 13:34:44 +0100 +Subject: [PATCH] Add a libflatbuffers for other projects to use + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a746a64..3beee77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,7 @@ project(FlatBuffers) + option(FLATBUFFERS_CODE_COVERAGE "Enable the code coverage build option." OFF) + option(FLATBUFFERS_BUILD_TESTS "Enable the build of tests and samples." ON) + option(FLATBUFFERS_INSTALL "Enable the installation of targets." ON) ++option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library" ON) + option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler" ON) + option(FLATBUFFERS_BUILD_FLATHASH "Enable the build of flathash" ON) + +@@ -15,7 +16,7 @@ if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS) + set(FLATBUFFERS_BUILD_TESTS OFF) + endif() + +-set(FlatBuffers_Compiler_SRCS ++set(FlatBuffers_Library_SRCS + include/flatbuffers/flatbuffers.h + include/flatbuffers/hash.h + include/flatbuffers/idl.h +@@ -26,6 +27,10 @@ set(FlatBuffers_Compiler_SRCS + src/idl_gen_go.cpp + src/idl_gen_text.cpp + src/idl_gen_fbs.cpp ++) ++ ++set(FlatBuffers_Compiler_SRCS ++ ${FlatBuffers_Library_SRCS} + src/flatc.cpp + ) + +@@ -91,6 +96,10 @@ endif(BIICODE) + + include_directories(include) + ++if(FLATBUFFERS_BUILD_FLATLIB) ++add_library(flatbuffers STATIC ${FlatBuffers_Library_SRCS}) ++endif() ++ + if(FLATBUFFERS_BUILD_FLATC) + add_executable(flatc ${FlatBuffers_Compiler_SRCS}) + endif() +@@ -121,6 +130,9 @@ endif() + + if(FLATBUFFERS_INSTALL) + install(DIRECTORY include/flatbuffers DESTINATION include) ++ if(FLATBUFFERS_BUILD_FLATLIB) ++ install(TARGETS flatbuffers DESTINATION lib) ++ endif() + if(FLATBUFFERS_BUILD_FLATC) + install(TARGETS flatc DESTINATION bin) + endif() +-- +2.4.5 + diff --git a/mingw-w64-flatbuffers/PKGBUILD b/mingw-w64-flatbuffers/PKGBUILD new file mode 100644 index 0000000000..dfaee0caee --- /dev/null +++ b/mingw-w64-flatbuffers/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Martell Malone + +_realname=flatbuffers +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.1.0 +pkgrel=1 +pkgdesc='Memory Efficient Serialization Library (mingw-w64)' +arch=('any') +url='http://google.github.io/flatbuffers/' +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-libsystre") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/${_realname}/archive/v${pkgver}.tar.gz" + "0001-Add-a-libflatbuffers-for-other-projects-to-use.patch") +md5sums=('a469b3058e53a12d49556e8e1bb5edea' + '41c9da7937dccb1328e65ea0c0f85905') +options=('strip' '!libtool' 'staticlibs') + +prepare() { + cd $srcdir/${_realname}-${pkgver} + patch -p1 < $srcdir/0001-Add-a-libflatbuffers-for-other-projects-to-use.patch +} + +build() { + mkdir -p "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-flexdll/0001-Fix-the-List.hd-exception.patch b/mingw-w64-flexdll/0001-Fix-the-List.hd-exception.patch new file mode 100644 index 0000000000..d2e37249a7 --- /dev/null +++ b/mingw-w64-flexdll/0001-Fix-the-List.hd-exception.patch @@ -0,0 +1,30 @@ +From 504e2c48dd2ae889f5b76efcde5da18580dcbab3 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Thu, 2 Apr 2015 19:18:55 +0800 +Subject: [PATCH] Fix the 'List.hd []' exception + +get_output may return [] if the cmd prints nothing, leading get_output1 +to fail due to a 'List.hd []'. 'gcc -print-sysroot' is such a case. + +Signed-off-by: Junjie Mao +--- + reloc.ml | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/reloc.ml b/reloc.ml +index e175802..5f92e10 100644 +--- a/reloc.ml ++++ b/reloc.ml +@@ -85,7 +85,9 @@ let get_output ?(use_bash = false) ?(accept_error=false) cmd = + r + + let get_output1 ?use_bash cmd = +- List.hd (get_output ?use_bash cmd) ++ match (get_output ?use_bash cmd) with ++ | [] -> "" ++ | h :: t -> h + + + (* Preparing command line *) +-- +2.3.4 diff --git a/mingw-w64-flexdll/0002-Add-path-to-libcrt2.o-into-the-default-library-searc.patch b/mingw-w64-flexdll/0002-Add-path-to-libcrt2.o-into-the-default-library-searc.patch new file mode 100644 index 0000000000..91f0b2e291 --- /dev/null +++ b/mingw-w64-flexdll/0002-Add-path-to-libcrt2.o-into-the-default-library-searc.patch @@ -0,0 +1,25 @@ +From 862fa31ae745b9fecf8a5663a1ff1c757ca18a9d Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Sat, 4 Apr 2015 18:49:50 +0800 +Subject: [PATCH] Add path to libcrt2.o into the default library search + path + +Signed-off-by: Junjie Mao +--- + reloc.ml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/reloc.ml b/reloc.ml +index 5f92e10..b4b96bd 100644 +--- a/reloc.ml ++++ b/reloc.ml +@@ -1059,6 +1059,7 @@ let setup_toolchain () = + [ + Filename.dirname (get_output1 (!gcc ^ " -print-libgcc-file-name")); + get_output1 (!gcc ^ " -print-sysroot") ^ "/mingw/lib"; ++ (match !toolchain with | `MINGW -> "/mingw32" | `MINGW64 -> "/mingw64" | _ -> "") ^ "/" ^ pre ^ "/lib"; + ]; + default_libs := + ["-lmingw32"; "-lgcc"; "-lmoldname"; "-lmingwex"; "-lmsvcrt"; +-- +2.3.4 diff --git a/mingw-w64-flexdll/0003-Remove-the-usages-of-stdout-to-workaround-the-missin.patch b/mingw-w64-flexdll/0003-Remove-the-usages-of-stdout-to-workaround-the-missin.patch new file mode 100644 index 0000000000..0d35c4f1ee --- /dev/null +++ b/mingw-w64-flexdll/0003-Remove-the-usages-of-stdout-to-workaround-the-missin.patch @@ -0,0 +1,38 @@ +From d5c628a8b9a263a74874612638ff5426c4eff36a Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Sat, 4 Apr 2015 19:08:51 +0800 +Subject: [PATCH] Remove the usages of stdout to workaround the missing of + __getreent + +Signed-off-by: Junjie Mao +--- + test/dump.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/dump.c b/test/dump.c +index 0d6d700..bb4abe7 100644 +--- a/test/dump.c ++++ b/test/dump.c +@@ -25,9 +25,9 @@ int main(int argc, char **argv) + int i; + torun *torun; + +- printf("INIT\n"); fflush(stdout); ++ printf("INIT\n"); + flexdll_dump_exports(NULL); +- printf("OK\n"); fflush(stdout); ++ printf("OK\n"); + for (i = 1; i < argc; i++) { + printf("** Loading %s\n", argv[i]); + handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL); +@@ -39,7 +39,7 @@ int main(int argc, char **argv) + if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); } + + torun = flexdll_dlsym(handle, "torun"); +- printf("Now running %p...\n", torun); fflush(stdout); ++ printf("Now running %p...\n", torun); + if (torun) torun(); + } + exit(0); +-- +2.3.4 diff --git a/mingw-w64-flexdll/0004-use-lib-flexdll-as-the-default-library-path.patch b/mingw-w64-flexdll/0004-use-lib-flexdll-as-the-default-library-path.patch new file mode 100644 index 0000000000..735a4f3d0b --- /dev/null +++ b/mingw-w64-flexdll/0004-use-lib-flexdll-as-the-default-library-path.patch @@ -0,0 +1,26 @@ +From 0f243fb8f19bf6935c41e183a365860ae21a50d1 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Tue, 7 Apr 2015 07:34:35 +0800 +Subject: [PATCH] use lib/flexdll/ as the default library path + +Signed-off-by: Junjie Mao +--- + reloc.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/reloc.ml b/reloc.ml +index b4b96bd..17eed13 100644 +--- a/reloc.ml ++++ b/reloc.ml +@@ -29,7 +29,7 @@ let flexdir = + let s = Sys.getenv "FLEXDIR" in + if s = "" then raise Not_found else s + with Not_found -> +- Filename.dirname Sys.executable_name ++ List.fold_left (fun base dir -> Filename.concat base dir) (Filename.dirname Sys.executable_name) ["..";"lib";"flexdll"] + + let ext_obj () = + if !toolchain = `MSVC || !toolchain = `MSVC64 then ".obj" else ".o" +-- +2.3.4 + diff --git a/mingw-w64-flexdll/PKGBUILD b/mingw-w64-flexdll/PKGBUILD new file mode 100644 index 0000000000..0e5b11046c --- /dev/null +++ b/mingw-w64-flexdll/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Junjie Mao + + +_realname=flexdll +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.34 +pkgrel=2 +pkgdesc="An implementation of a dlopen-like API for Windows (mingw-w64)" +arch=('any') +url='http://alain.frisch.fr/flexdll.html' +license=('zlib/libpng License') +makedepends=("${MINGW_PACKAGE_PREFIX}-ocaml") +source=("http://alain.frisch.fr/flexdll/${_realname}-${pkgver}.tar.gz" + "0001-Fix-the-List.hd-exception.patch" + "0002-Add-path-to-libcrt2.o-into-the-default-library-searc.patch" + "0003-Remove-the-usages-of-stdout-to-workaround-the-missin.patch" + "0004-use-lib-flexdll-as-the-default-library-path.patch") +sha1sums=('86acfd2d965dcf7a650f3d8e8f8db7bfe99de2a0' + '642c99ad0d2035ef028254aff41dbff49014bed3' + '31ebdca246a4df6069d733350c9a2b8c94d33dec' + '43f232f04934a0c7797f05e8db03f04ae156d8c4' + '87754de44fd9a51299e52908b5948b31383ca6eb') + +if [ "${CARCH}" == "i686" ]; then + chain="mingw" +else + chain="mingw64" +fi + +prepare() { + cd ${srcdir}/${_realname} + + patch -p1 -i ${srcdir}/0001-Fix-the-List.hd-exception.patch + patch -p1 -i ${srcdir}/0002-Add-path-to-libcrt2.o-into-the-default-library-searc.patch + patch -p1 -i ${srcdir}/0003-Remove-the-usages-of-stdout-to-workaround-the-missin.patch + patch -p1 -i ${srcdir}/0004-use-lib-flexdll-as-the-default-library-path.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf ${_realname} build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + unset FLEXDIR + unset OCAMLLIB + make flexlink.exe -j1 + make build_${chain} -j1 +} + +check() { + # The test demo works on x86_64 but fails on i686. Root causes of the failure + # is still unknown, but the tool is good enough to be used in other + # applications such as ocaml and coq. + plain "skip" +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + + install -Dm755 flexlink.exe ${pkgdir}${MINGW_PREFIX}/bin/flexlink.exe + for f in flexdll_${chain}.o flexdll_initer_${chain}.o flexdll.h flexdll.c flexdll_initer.c default.manifest default_amd64.manifest; do + install -D ${f} ${pkgdir}${MINGW_PREFIX}/lib/flexdll/${f} + done + [ -f LICENSE ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + [ -f CHANGES ] && install -Dm644 CHANGES ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/CHANGES +} diff --git a/mingw-w64-fltk/PKGBUILD b/mingw-w64-fltk/PKGBUILD index 894dd9505e..f3e699c280 100644 --- a/mingw-w64-fltk/PKGBUILD +++ b/mingw-w64-fltk/PKGBUILD @@ -3,19 +3,18 @@ _realname=fltk pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.3 -pkgrel=1 +pkgrel=2 pkgdesc="C++ user interface toolkit (mingw-w64)" arch=('any') url="http://www.fltk.org" license=('LGPLv2+ with exceptions') -groups=("${MINGW_PACKAGE_PREFIX}") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo") +depends=("${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs' 'buildflags') source=("http://fltk.org/pub/fltk/${pkgver}/${_realname}-${pkgver}-source.tar.gz") @@ -32,7 +31,8 @@ build() { --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --enable-shared - make VERBOSE=1 + + make VERBOSE=1 } package() { diff --git a/mingw-w64-fluidsynth/PKGBUILD b/mingw-w64-fluidsynth/PKGBUILD index dd3ee6a091..955f913bcd 100644 --- a/mingw-w64-fluidsynth/PKGBUILD +++ b/mingw-w64-fluidsynth/PKGBUILD @@ -1,25 +1,22 @@ # Maintainer: Alexey Pavlov _realname=fluidsynth - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.1.6 -pkgrel=2 +pkgrel=3 pkgdesc="A real-time software synthesizer based on the SoundFont 2 specifications (mingw-w64)" arch=('any') url="http://www.fluidsynth.org/" license=('LGPL') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-libsndfile" - "${MINGW_PACKAGE_PREFIX}-portaudio" - ) + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libsndfile" + "${MINGW_PACKAGE_PREFIX}-portaudio") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-nasm" - "${MINGW_PACKAGE_PREFIX}-libtool" - patch automake-wrapper autoconf) + "${MINGW_PACKAGE_PREFIX}-nasm" + "${MINGW_PACKAGE_PREFIX}-libtool") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.gz" +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" 0001-10-ftbfs-bug-690006.all.patch 0002-1001-revert_abi_break_114.all.patch 0003-include-blddir.all.patch @@ -31,20 +28,21 @@ md5sums=('ae5aca6de824b4173667cbd3a310b263' '18f50014be62facdd4b10f305b886e88') prepare() { - cd "$srcdir/${_realname}-${pkgver}" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/0001-10-ftbfs-bug-690006.all.patch patch -p1 -i ${srcdir}/0002-1001-revert_abi_break_114.all.patch patch -p1 -i ${srcdir}/0003-include-blddir.all.patch patch -p1 -i ${srcdir}/0004-disable-rtkit-bindings-on-w32.all.patch - + ./autogen.sh } build() { - cd "$srcdir/${_realname}-${pkgver}" - export lt_cv_deplibs_check_method='pass_all' - ./configure \ + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -53,10 +51,11 @@ build() { --enable-shared \ --enable-static \ STRIP=true CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" PTHREAD_LIBS=-lpthread + make } package() { - cd "$srcdir/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-fontconfig/fontconfig-2.11.0-symlinks-fix.patch b/mingw-w64-fontconfig/0001-fix-config-linking.all.patch similarity index 69% rename from mingw-w64-fontconfig/fontconfig-2.11.0-symlinks-fix.patch rename to mingw-w64-fontconfig/0001-fix-config-linking.all.patch index 1340a7dbe5..2a8551f7e1 100644 --- a/mingw-w64-fontconfig/fontconfig-2.11.0-symlinks-fix.patch +++ b/mingw-w64-fontconfig/0001-fix-config-linking.all.patch @@ -1,6 +1,6 @@ ---- fontconfig-2.11.0/conf.d/Makefile.in.orig 2013-11-27 19:16:03.409200000 +0400 -+++ fontconfig-2.11.0/conf.d/Makefile.in 2013-11-27 19:26:38.045000000 +0400 -@@ -632,9 +632,9 @@ +--- fontconfig-2.10.92/conf.d/Makefile.am.orig 2013-04-13 06:32:27 +0400 ++++ fontconfig-2.10.92/conf.d/Makefile.am 2013-04-13 06:37:08 +0400 +@@ -83,9 +83,9 @@ @(echo cd $(DESTDIR)$(configdir); \ cd $(DESTDIR)$(configdir); \ for i in $(CONF_LINKS); do \ diff --git a/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch b/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch new file mode 100644 index 0000000000..62682ffb1a --- /dev/null +++ b/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch @@ -0,0 +1,12 @@ +--- fontconfig-2.11.0/test/test-migration.c.orig 2013-10-11 03:10:18.000000000 +0000 ++++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 12:20:57.859195300 +0000 +@@ -4,6 +4,9 @@ + #include + #include + #include ++#ifdef _WIN32 ++#define mkdir(path,mode) _mkdir(path) ++#endif + #ifndef HAVE_STRUCT_DIRENT_D_TYPE + #include + #include diff --git a/mingw-w64-fontconfig/0004-fix-mkdtemp.mingw.patch b/mingw-w64-fontconfig/0004-fix-mkdtemp.mingw.patch new file mode 100644 index 0000000000..d3980a6111 --- /dev/null +++ b/mingw-w64-fontconfig/0004-fix-mkdtemp.mingw.patch @@ -0,0 +1,216 @@ +--- fontconfig-2.11.0/test/test-migration.c.orig 2014-02-06 12:24:45.529605800 +0000 ++++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 14:43:19.691870300 +0000 +@@ -9,6 +9,213 @@ + #endif + #include + ++#if defined(_WIN32) ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static PSECURITY_DESCRIPTOR ++create_sd (int permissions) ++{ ++ PSECURITY_DESCRIPTOR pSD = NULL; ++ int i; ++ int j; ++ EXPLICIT_ACCESS ea[3]; ++ PSID sids[3] = { NULL, NULL, NULL }; ++ WELL_KNOWN_SID_TYPE sidtypes[3] = { WinCreatorOwnerSid, WinCreatorGroupSid, WinWorldSid }; ++ int ea_len = 0; ++ DWORD dwRes, dwDisposition; ++ PACL pACL = NULL; ++ ++ /* Initialize a security descriptor. */ ++ pSD = (PSECURITY_DESCRIPTOR) LocalAlloc (LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); ++ if (NULL == pSD) ++ { ++ errno = ENOMEM; ++ return NULL; ++ } ++ ++ if (!InitializeSecurityDescriptor (pSD, SECURITY_DESCRIPTOR_REVISION)) ++ { ++ LocalFree (pSD); ++ errno = EIO; ++ return NULL; ++ } ++ ++ for (i = 0; i < 3; i++) ++ { ++ BOOL b; ++ DWORD bytes; ++ int imasked = permissions & (07 << (2 - i)); ++ if (!imasked) ++ continue; ++ ++ bytes = SECURITY_MAX_SID_SIZE; ++ sids[ea_len] = (PSID) LocalAlloc (LMEM_FIXED, bytes); ++ if (NULL == sids[ea_len]) ++ { ++ errno = ENOMEM; ++ LocalFree (pSD); ++ for (j = 0; j < ea_len; j++) ++ { ++ if (sids[j] != NULL) ++ { ++ LocalFree (sids[j]); ++ sids[j] = NULL; ++ } ++ } ++ return NULL; ++ } ++ ++ b = CreateWellKnownSid (sidtypes[i], NULL, sids[ea_len], &bytes); ++ if (!b) ++ { ++ errno = EINVAL; ++ LocalFree (pSD); ++ for (j = 0; j < ea_len; j++) ++ { ++ if (sids[j] != NULL) ++ { ++ LocalFree (sids[j]); ++ sids[j] = NULL; ++ } ++ } ++ return NULL; ++ } ++ ++ /* Initialize an EXPLICIT_ACCESS structure for an ACE. */ ++ ZeroMemory (&ea[ea_len], sizeof(EXPLICIT_ACCESS)); ++ bytes = 0; ++ if (01 & imasked) ++ bytes = bytes | GENERIC_READ; ++ if (02 & imasked) ++ bytes = bytes | GENERIC_WRITE; ++ if (04 & imasked) ++ bytes = bytes | GENERIC_EXECUTE; ++ ea[ea_len].grfAccessPermissions = bytes; ++ ea[ea_len].grfAccessMode = SET_ACCESS; ++ ea[ea_len].grfInheritance= NO_INHERITANCE; ++ ea[ea_len].Trustee.TrusteeForm = TRUSTEE_IS_SID; ++ ea[ea_len].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; ++ ea[ea_len].Trustee.ptstrName = (LPTSTR) sids[ea_len]; ++ ea_len = ea_len + 1; ++ } ++ ++ /* Create a new ACL that contains the new ACEs. */ ++ dwRes = SetEntriesInAcl (ea_len, ea, NULL, &pACL); ++ if (ERROR_SUCCESS != dwRes) ++ { ++ errno = EIO; ++ LocalFree (pSD); ++ for (j = 0; j < ea_len; j++) ++ { ++ if (sids[j] != NULL) ++ { ++ LocalFree (sids[j]); ++ sids[j] = NULL; ++ } ++ } ++ return NULL; ++ } ++ ++ for (j = 0; j < ea_len; j++) ++ { ++ if (sids[j] != NULL) ++ { ++ LocalFree (sids[j]); ++ sids[j] = NULL; ++ } ++ } ++ ++ /* Add the ACL to the security descriptor. */ ++ if (!SetSecurityDescriptorDacl (pSD, ++ TRUE, // bDaclPresent flag ++ pACL, ++ FALSE)) // not a default DACL ++ { ++ errno = EIO; ++ LocalFree (pSD); ++ LocalFree (pACL); ++ return NULL; ++ } ++ ++ return pSD; ++} ++ ++static void ++free_sd (PSECURITY_DESCRIPTOR sd) ++{ ++ BOOL b, present, defaulted; ++ PACL pACL = NULL; ++ present = FALSE; ++ b = GetSecurityDescriptorDacl (sd, &present, &pACL, &defaulted); ++ if (b && present && !defaulted && pACL) ++ LocalFree (pACL); ++ LocalFree (sd); ++} ++ ++static void ++randtemplate (char *template, size_t l) ++{ ++ int i; ++ for (i = l - 6; i < l; i++) ++ { ++ int r = rand (); ++ if ((r / (RAND_MAX + 1)) > ((RAND_MAX + 1) / 2)) ++ template[i] = 'A' + (double) rand () / (RAND_MAX + 1) * ('Z' - 'A'); ++ else ++ template[i] = 'a' + (double) rand () / (RAND_MAX + 1) * ('z' - 'a'); ++ } ++} ++ ++static char * ++mkdtemp (char *template) ++{ ++ int i; ++ size_t l; ++ BOOL b; ++ SECURITY_ATTRIBUTES sa; ++ ++ if (template == NULL) ++ { ++ errno = EINVAL; ++ return NULL; ++ } ++ l = strlen (template); ++ if (l < 6 || strcmp (&template[l - 6], "XXXXXX") != 0) ++ { ++ errno = EINVAL; ++ return NULL; ++ } ++ srand(time (NULL)); ++ sa.nLength = sizeof (sa); ++ sa.lpSecurityDescriptor = create_sd (0700); ++ sa.bInheritHandle = FALSE; ++ do ++ { ++ randtemplate (template, l); ++ SetLastError (0); ++ b = CreateDirectoryA (template, &sa); ++ } while (!b && GetLastError () == ERROR_ALREADY_EXISTS); ++ free_sd (sa.lpSecurityDescriptor); ++ if (!b) ++ { ++ errno = EIO; ++ return NULL; ++ } ++ else ++ { ++ errno = 0; ++ return template; ++ } ++} ++#endif ++ + FcBool + mkdir_p(const char *dir) + { diff --git a/mingw-w64-fontconfig/0005-fix-setenv.mingw.patch b/mingw-w64-fontconfig/0005-fix-setenv.mingw.patch new file mode 100644 index 0000000000..36d31d3b06 --- /dev/null +++ b/mingw-w64-fontconfig/0005-fix-setenv.mingw.patch @@ -0,0 +1,27 @@ +--- fontconfig-2.11.0/test/test-migration.c.orig 2014-02-06 14:43:19.691870300 +0000 ++++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 14:48:25.336182200 +0000 +@@ -214,6 +214,24 @@ + return template; + } + } ++ ++static int ++setenv (const char *var, const char *val, int ovr) ++{ ++ BOOL b; ++ char c[2]; ++ if (!ovr) ++ { ++ DWORD d; ++ d = GetEnvironmentVariableA (var, c, 2); ++ if (0 != d && GetLastError () != ERROR_ENVVAR_NOT_FOUND) ++ return; ++ } ++ b = SetEnvironmentVariableA (var, val); ++ if (b) ++ return 0; ++ return 1; ++} + #endif + + FcBool diff --git a/mingw-w64-fontconfig/0007-pkgconfig.mingw.patch b/mingw-w64-fontconfig/0007-pkgconfig.mingw.patch new file mode 100644 index 0000000000..0895c2fc43 --- /dev/null +++ b/mingw-w64-fontconfig/0007-pkgconfig.mingw.patch @@ -0,0 +1,22 @@ +--- fontconfig-2.11.93/m4/pkg.m4.orig 2015-03-09 02:54:03.000000000 +0000 ++++ fontconfig-2.11.93/m4/pkg.m4 2015-04-06 11:04:21.862416100 +0000 +@@ -111,8 +111,8 @@ + pkg_failed=no + AC_MSG_CHECKING([for $1]) + +-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +-_PKG_CONFIG([$1][_LIBS], [libs], [$2]) ++_PKG_CONFIG([$1][_CFLAGS], [cflags --dont-define-prefix], [$2]) ++_PKG_CONFIG([$1][_LIBS], [libs --dont-define-prefix], [$2]) + + m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS + and $1[]_LIBS to avoid the need to call pkg-config. +@@ -207,7 +207,7 @@ + [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl + AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +-_PKG_CONFIG([$1], [variable="][$3]["], [$2]) ++_PKG_CONFIG([$1], [variable="][$3][" --dont-define-prefix], [$2]) + AS_VAR_COPY([$1], [pkg_cv_][$1]) + + AS_VAR_IF([$1], [""], [$5], [$4])dnl diff --git a/mingw-w64-fontconfig/PKGBUILD b/mingw-w64-fontconfig/PKGBUILD index d2eb4ffd63..60a7f6eaeb 100644 --- a/mingw-w64-fontconfig/PKGBUILD +++ b/mingw-w64-fontconfig/PKGBUILD @@ -1,50 +1,73 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=fontconfig - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.11.1 -pkgrel=1 +pkgver=2.11.94 +pkgrel=5 pkgdesc="A library for configuring and customizing font access (mingw-w64)" arch=('any') url="http://www.fontconfig.org/release" license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-expat>=2.1.0" - "${MINGW_PACKAGE_PREFIX}-freetype>=2.3.11" - "${MINGW_PACKAGE_PREFIX}-bzip2>=1.0.6" - "${MINGW_PACKAGE_PREFIX}-libiconv") + "${MINGW_PACKAGE_PREFIX}-expat>=2.1.0" + "${MINGW_PACKAGE_PREFIX}-freetype>=2.3.11" + "${MINGW_PACKAGE_PREFIX}-bzip2>=1.0.6" + "${MINGW_PACKAGE_PREFIX}-libiconv") options=('staticlibs' 'strip') install=${_realname}-${CARCH}.install -source=("http://www.fontconfig.org/release/fontconfig-$pkgver.tar.bz2" - "fontconfig-2.11.0-symlinks-fix.patch") -sha256sums=('dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99' - '92541375e945261832d4876551f94596fcf540c4edaf789ac0f36de7592c5966') +source=("http://www.fontconfig.org/release/fontconfig-${pkgver}.tar.bz2" + 0001-fix-config-linking.all.patch + 0002-fix-mkdir.mingw.patch + 0004-fix-mkdtemp.mingw.patch + 0005-fix-setenv.mingw.patch + 0007-pkgconfig.mingw.patch) +sha256sums=('d763c024df434146f3352448bc1f4554f390c8a48340cef7aa9cc44716a159df' + '1266d4bbd8270f013fee2401c890f0251babf50a175a69d681d3a6af5003c899' + '0d950eb8a19858bff1f0b26e4a560f589e79e7eb7f22f723267748dfe55e0b63' + '57ff8420dbf62873b6fcb38b52fb7b37e0e278425a9125e15dccba54668c8ab9' + '552b54010f9fe4097f332cf2397bbd3e78489542d3bbf07792ed1cfe9381796e' + 'af373531873da46d0356305da5444c1ec74f443cd2635ea2db6b7dadd1561f5b') prepare() { cd "${srcdir}"/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/fontconfig-2.11.0-symlinks-fix.patch + patch -p1 -i ${srcdir}/0001-fix-config-linking.all.patch + patch -p1 -i ${srcdir}/0002-fix-mkdir.mingw.patch + patch -p1 -i ${srcdir}/0004-fix-mkdtemp.mingw.patch + patch -p1 -i ${srcdir}/0005-fix-setenv.mingw.patch + patch -p1 -i ${srcdir}/0007-pkgconfig.mingw.patch + + autoreconf -fiv } build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ --enable-iconv \ + --with-libiconv=${MINGW_PREFIX} \ --disable-docs \ --with-arch=${CARCH} \ + --with-cache-dir=/var/cache/${_realname} \ as_ln_s="cp -pR" + sed -i 's,all-am: Makefile $(PROGRAMS),all-am:,' test/Makefile make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + mv ${pkgdir}{,${MINGW_PREFIX}}/var + find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-fontconfig/fontconfig-i686.install b/mingw-w64-fontconfig/fontconfig-i686.install index bb00ce6431..f52c9c6bbc 100644 --- a/mingw-w64-fontconfig/fontconfig-i686.install +++ b/mingw-w64-fontconfig/fontconfig-i686.install @@ -1,6 +1,6 @@ post_install() { cat << _EOF - + Fontconfig configuration is done via /mingw32/etc/fonts/conf.avail and conf.d. Read /mingw32/etc/fonts/conf.d/README for more information. @@ -20,8 +20,8 @@ post_upgrade() { post_remove() { cat << _EOF - Check for dead symlinks and leftover files + Check for dead symlinks and leftover files in mingw32/etc/fonts/conf.d/ - + _EOF } \ No newline at end of file diff --git a/mingw-w64-fontconfig/fontconfig-x86_64.install b/mingw-w64-fontconfig/fontconfig-x86_64.install index e7bccead84..08e5bd10ea 100644 --- a/mingw-w64-fontconfig/fontconfig-x86_64.install +++ b/mingw-w64-fontconfig/fontconfig-x86_64.install @@ -1,6 +1,6 @@ post_install() { cat << _EOF - + Fontconfig configuration is done via /mingw64/etc/fonts/conf.avail and conf.d. Read /mingw64/etc/fonts/conf.d/README for more information. @@ -20,8 +20,8 @@ post_upgrade() { post_remove() { cat << _EOF - Check for dead symlinks and leftover files + Check for dead symlinks and leftover files in mingw64/etc/fonts/conf.d/ - + _EOF } diff --git a/mingw-w64-fossil/PKGBUILD b/mingw-w64-fossil/PKGBUILD new file mode 100644 index 0000000000..d536a69936 --- /dev/null +++ b/mingw-w64-fossil/PKGBUILD @@ -0,0 +1,49 @@ +# Contributor (MSYS2): David Macek +# Maintainer (Arch Linux): Anatol Pomozov +# Contributor (Arch Linux): Daniel YC Lin +# Contributor (Arch Linux): Konstantin Plotnikov + +_realname=fossil +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.33 +pkgrel=2 +pkgdesc='Simple, high-reliability, distributed software configuration management (mingw-w64)' +arch=('any') +license=('BSD') +url='http://www.fossil-scm.org/' +depends=("${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-tcl") +optdepends=("${MINGW_PACKAGE_PREFIX}-putty: SSH transport") +source=("https://www.fossil-scm.org/download/${_realname}-src-${pkgver}.tar.gz" + "win.patch") +sha256sums=('6295c48289456f09e86099988058a12148dbe0051b72d413b4dff7216d6a7f3e' + '33bacb372f8e9a7b9508d17c013302a2ce9b30828e5623fd6126619f2f51b327') + +prepare() { + cd "${srcdir}/${_realname}-src-${pkgver}" + patch -p1 -i "${srcdir}/win.patch" + # this doesn't get expanded, so delete it just to be sure + sed -i '/ENABLE_MINIZ/d' Makefile.in +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL=--prefix \ + ../${_realname}-src-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --disable-internal-sqlite + + make \ + CFLAGS+="-DBROKEN_MINGW_CMDLINE=not_actually_broken" +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-fossil/win.patch b/mingw-w64-fossil/win.patch new file mode 100644 index 0000000000..41ad0760e5 --- /dev/null +++ b/mingw-w64-fossil/win.patch @@ -0,0 +1,167 @@ +diff -aur fossil-src-1.33.orig/Makefile.in fossil-src-1.33/Makefile.in +--- fossil-src-1.33.orig/Makefile.in 2015-05-23 13:11:31.000000000 +0200 ++++ fossil-src-1.33/Makefile.in 2015-05-23 13:53:28.251995600 +0200 +@@ -38,7 +38,7 @@ + # + TCLSH = tclsh + +-LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ ++LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ -lws2_32 + TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H + INSTALLDIR = $(DESTDIR)@prefix@/bin + USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ +diff -aur fossil-src-1.33.orig/src/checkin.c fossil-src-1.33/src/checkin.c +--- fossil-src-1.33.orig/src/checkin.c 2015-05-23 13:11:31.000000000 +0200 ++++ fossil-src-1.33/src/checkin.c 2015-05-23 13:54:26.116750700 +0200 +@@ -859,15 +859,6 @@ + if( zEditor==0 ){ + zEditor = fossil_getenv("EDITOR"); + } +-#if defined(_WIN32) || defined(__CYGWIN__) +- if( zEditor==0 ){ +- zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SYSTEMROOT")); +-#if defined(__CYGWIN__) +- zEditor = fossil_utf8_to_filename(zEditor); +- blob_add_cr(pPrompt); +-#endif +- } +-#endif + if( zEditor==0 ){ + blob_append(pPrompt, + "#\n" +@@ -885,9 +876,6 @@ + blob_str(&fname)); + blob_reset(&fname); + } +-#if defined(_WIN32) +- blob_add_cr(pPrompt); +-#endif + blob_write_to_file(pPrompt, zFile); + if( zEditor ){ + zCmd = mprintf("%s \"%s\"", zEditor, zFile); +@@ -954,16 +942,7 @@ + int parent_rid + ){ + Blob prompt; +-#if defined(_WIN32) || defined(__CYGWIN__) +- int bomSize; +- const unsigned char *bom = get_utf8_bom(&bomSize); +- blob_init(&prompt, (const char *) bom, bomSize); +- if( zInit && zInit[0]){ +- blob_append(&prompt, zInit, -1); +- } +-#else + blob_init(&prompt, zInit, -1); +-#endif + blob_append(&prompt, + "\n" + "# Enter a commit message for this check-in." +diff -aur fossil-src-1.33.orig/src/db.c fossil-src-1.33/src/db.c +--- fossil-src-1.33.orig/src/db.c 2015-05-23 13:11:31.000000000 +0200 ++++ fossil-src-1.33/src/db.c 2015-05-23 13:55:02.561878900 +0200 +@@ -928,41 +928,20 @@ + db_close_config(); + } + zHome = fossil_getenv("FOSSIL_HOME"); +-#if defined(_WIN32) || defined(__CYGWIN__) + if( zHome==0 ){ +- zHome = fossil_getenv("LOCALAPPDATA"); +- if( zHome==0 ){ +- zHome = fossil_getenv("APPDATA"); +- if( zHome==0 ){ +- char *zDrive = fossil_getenv("HOMEDRIVE"); +- char *zPath = fossil_getenv("HOMEPATH"); +- if( zDrive && zPath ) zHome = mprintf("%s%s", zDrive, zPath); +- } +- } +- } +- if( zHome==0 ){ +- fossil_fatal("cannot locate home directory - please set the " +- "FOSSIL_HOME, LOCALAPPDATA, APPDATA, or HOMEPATH " +- "environment variables"); ++ zHome = fossil_getenv("HOME"); + } +-#else + if( zHome==0 ){ +- zHome = fossil_getenv("HOME"); ++ zHome = fossil_getenv("USERPROFILE"); + } + if( zHome==0 ){ + fossil_fatal("cannot locate home directory - please set the " +- "FOSSIL_HOME or HOME environment variables"); ++ "FOSSIL_HOME, USERPROFILE or HOME environment variables"); + } +-#endif + if( file_isdir(zHome)!=1 ){ + fossil_fatal("invalid home directory: %s", zHome); + } +-#if defined(_WIN32) || defined(__CYGWIN__) +- /* . filenames give some window systems problems and many apps problems */ +- zDbName = mprintf("%//_fossil", zHome); +-#else + zDbName = mprintf("%s/.fossil", zHome); +-#endif + if( file_size(zDbName)<1024*3 ){ + if( file_access(zHome, W_OK) ){ + fossil_fatal("home directory %s must be writeable", zHome); +@@ -1446,12 +1425,13 @@ + if( zUser==0 ){ + #if defined(_WIN32) + zUser = fossil_getenv("USERNAME"); +-#else +- zUser = fossil_getenv("USER"); ++#endif ++ if( zUser==0 ){ ++ zUser = fossil_getenv("USER"); ++ } + if( zUser==0 ){ + zUser = fossil_getenv("LOGNAME"); + } +-#endif + } + if( zUser==0 ){ + zUser = "root"; +@@ -2253,11 +2233,7 @@ + g.allowSymlinks = db_get_boolean("allow-symlinks", 0); + } + +-#if defined(_WIN32) || defined(__CYGWIN__) +-# define LOCALDB_NAME "./_FOSSIL_" +-#else + # define LOCALDB_NAME "./.fslckout" +-#endif + db_init_database(LOCALDB_NAME, zLocalSchema, + #ifdef FOSSIL_LOCAL_WAL + "COMMIT; PRAGMA journal_mode=WAL; BEGIN;", +diff -aur fossil-src-1.33.orig/src/diffcmd.c fossil-src-1.33/src/diffcmd.c +--- fossil-src-1.33.orig/src/diffcmd.c 2015-05-23 13:11:31.000000000 +0200 ++++ fossil-src-1.33/src/diffcmd.c 2015-05-23 13:53:28.276997700 +0200 +@@ -606,11 +606,7 @@ + const char *zName; + + if( guiDiff ){ +-#if defined(_WIN32) +- zDefault = "WinDiff.exe"; +-#else + zDefault = 0; +-#endif + zName = "gdiff-command"; + }else{ + zDefault = 0; +diff -aur fossil-src-1.33.orig/src/stash.c fossil-src-1.33/src/stash.c +--- fossil-src-1.33.orig/src/stash.c 2015-05-23 13:11:31.000000000 +0200 ++++ fossil-src-1.33/src/stash.c 2015-05-23 13:53:28.278995500 +0200 +@@ -160,13 +160,7 @@ + if( zComment==0 ){ + Blob prompt; /* Prompt for stash comment */ + Blob comment; /* User comment reply */ +-#if defined(_WIN32) || defined(__CYGWIN__) +- int bomSize; +- const unsigned char *bom = get_utf8_bom(&bomSize); +- blob_init(&prompt, (const char *) bom, bomSize); +-#else + blob_zero(&prompt); +-#endif + blob_append(&prompt, + "\n" + "# Enter a description of what is being stashed. Lines beginning\n" diff --git a/mingw-w64-fox/PKGBUILD b/mingw-w64-fox/PKGBUILD new file mode 100644 index 0000000000..4597933966 --- /dev/null +++ b/mingw-w64-fox/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: David Vachulka + +_realname=fox +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.6.50 +pkgrel=1 +pkgdesc="C++ user interface toolkit (mingw-w64)" +arch=('any') +url="http://www.fox-toolkit.org" +license=('LGPLv2+ with exceptions') +groups=("${MINGW_PACKAGE_PREFIX}") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=('strip') +source=("ftp://ftp.fox-toolkit.org/pub/${_realname}-${pkgver}.tar.gz" + fox-1-rdynamic.patch + fox-2-FXTrayIcon.patch + fox-3-chart.patch) +md5sums=('f68c2219318ecb0b838387ae85d3220d' + 'd9a955540ec3a29bc3cef70f925a751c' + 'f83fde69de68aac83416cee1cb723891' + '4a1e63a68911728a06abddcb21d4ff34') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + patch -p0 -i ${srcdir}/fox-1-rdynamic.patch + patch -p0 -i ${srcdir}/fox-2-FXTrayIcon.patch + patch -p0 -i ${srcdir}/fox-3-chart.patch +} + +build() { + [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} + cp -rf ${_realname}-${pkgver} build-${CARCH} + cd build-${CARCH} + autoreconf -fvi + ./configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --enable-release \ + --disable-debug \ + --with-xft=no \ + --with-x=no + make VERBOSE=1 +} + +package() { + cd ${srcdir}/build-${CARCH} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-fox/fox-1-rdynamic.patch b/mingw-w64-fox/fox-1-rdynamic.patch new file mode 100644 index 0000000000..033ebddc6d --- /dev/null +++ b/mingw-w64-fox/fox-1-rdynamic.patch @@ -0,0 +1,13 @@ + +--- configure.ac.orig ++++ configure.ac +@@ -110,7 +110,7 @@ + # Add copious amounts of debugging with gcc + if test "${GXX}" = "yes" ; then +- CXXFLAGS="${CXXFLAGS} -Wall -Wformat -Woverloaded-virtual -Wshadow" ++ CXXFLAGS="${CXXFLAGS} -Wall -Wformat -Woverloaded-virtual -Wshadow -DUNICODE" +- #LDFLAGS="-rdynamic ${LDFLAGS}" ++ LDFLAGS="-no-undefined ${LDFLAGS}" + fi + + # Debugging turned on diff --git a/mingw-w64-fox/fox-2-FXTrayIcon.patch b/mingw-w64-fox/fox-2-FXTrayIcon.patch new file mode 100644 index 0000000000..1400b6b0ed --- /dev/null +++ b/mingw-w64-fox/fox-2-FXTrayIcon.patch @@ -0,0 +1,12 @@ + +--- include/FXIcon.h.orig ++++ include/FXIcon.h +@@ -49,6 +49,7 @@ + friend class FXDCWindow; + friend class FXDrawable; + friend class FXTopWindow; ++ friend class FXTrayIcon; + protected: + FXID shape; // Shape pixmap + FXID etch; // Etch pixmap + diff --git a/mingw-w64-fox/fox-3-chart.patch b/mingw-w64-fox/fox-3-chart.patch new file mode 100644 index 0000000000..d04490e1c0 --- /dev/null +++ b/mingw-w64-fox/fox-3-chart.patch @@ -0,0 +1,11 @@ +--- chart/Makefile.am.orig ++++ chart/Makefile.am +@@ -8,7 +8,7 @@ + + lib_LTLIBRARIES = libCHART-1.6.la + +-libCHART_1_6_la_LIBADD = $(X_LIBS) $(X_BASE_LIBS) $(X_EXTRA_LIBS) ++libCHART_1_6_la_LIBADD = $(X_LIBS) $(X_BASE_LIBS) $(X_EXTRA_LIBS) $(top_builddir)/src/libFOX-1.6.la + + libCHART_1_6_la_LDFLAGS = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ diff --git a/mingw-w64-freeglut/PKGBUILD b/mingw-w64-freeglut/PKGBUILD index a0b3bf773b..64c4eba548 100644 --- a/mingw-w64-freeglut/PKGBUILD +++ b/mingw-w64-freeglut/PKGBUILD @@ -2,34 +2,42 @@ _realname=freeglut pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.8.1 -pkgrel=4 -pkgdesc="freeglut allows the user to create and manage windows containing OpenGL contexts (mingw32-w64)" +_pre= +_ver=3.0.0 +pkgver=${_ver}${_pre} +pkgrel=2 +pkgdesc="Freeglut allows the user to create and manage windows containing OpenGL contexts (mingw32-w64)" arch=('any') url="http://freeglut.sourceforge.net/" license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' '!libtool' 'staticlibs') -source=("http://downloads.sourceforge.net/freeglut/freeglut-${pkgver}.tar.gz") -md5sums=('918ffbddcffbac83c218bc52355b6d5a') +source=("http://downloads.sourceforge.net/freeglut/${_realname}-${_ver}${_pre}.tar.gz") +md5sums=('90c3ca4dd9d51cf32276bc5344ec9754') +noextract=(${_realname}-${_ver}${_pre}.tar.gz) + +prepare() { + # Clean up old sources so re-patching doesn't fail. + [[ -d ${srcdir}/${_realname}-${_ver}${_pre} ]] && rm -rf ${srcdir}/${_realname}-${_ver}${_pre} + tar -xzvf ${_realname}-${_ver}${_pre}.tar.gz -C ${srcdir} +} build() { rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --enable-shared \ - --enable-static \ - --without-x + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + ../${_realname}-${_ver}${_pre} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-freerdp-git/PKGBUILD b/mingw-w64-freerdp-git/PKGBUILD new file mode 100644 index 0000000000..6cf0c6f7bf --- /dev/null +++ b/mingw-w64-freerdp-git/PKGBUILD @@ -0,0 +1,52 @@ +# (MSYS2) Maintainer: Ray Donnelly +# (ArchLinux) Maintainer: Christian Hesse +# (ArchLinux) Contributor: Alexey Vasiliev + +_realname=freerdp-git +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgdesc="Free RDP client (mingw-w64)" +pkgver=r8949.43a5680 +pkgrel=1 +depends=("${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-ffmpeg") +makedepends=("git" + "${MINGW_PACKAGE_PREFIX}-cmake") +arch=('any') +url="http://www.freerdp.com/" +license=('Apache License 2.0') +provides=("${MINGW_PACKAGE_PREFIX}-freerdp") +source=("${_realname}::git://github.com/FreeRDP/FreeRDP.git") + +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}"/${_realname} + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_realname} +} + +build() { + [[ -d ${CARCH}-build ]] && rm -rf ${CARCH}-build + mkdir ${CARCH}-build + cd ${CARCH}-build + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX \ + ${MINGW_PREFIX}/bin/cmake \ + -G'MSYS Makefiles' \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_WINDOWS_VERSION="WINXP" \ + -DWITH_PULSE=OFF \ + -DWITH_SERVER=ON \ + -DMSVC_RUNTIME="dynamic" \ + ../${_realname} + + make VERBOSE=1 +} + +package() { + cd ${CARCH}-build + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-freerdp-git/mingw-w64-redefinitions.patch b/mingw-w64-freerdp-git/mingw-w64-redefinitions.patch new file mode 100644 index 0000000000..515d61694a --- /dev/null +++ b/mingw-w64-freerdp-git/mingw-w64-redefinitions.patch @@ -0,0 +1,54 @@ +--- freerdp-git/winpr/include/winpr/nt.h.orig 2015-07-19 10:16:50.940895800 +0300 ++++ freerdp-git/winpr/include/winpr/nt.h 2015-07-19 10:25:19.643991900 +0300 +@@ -1286,12 +1286,15 @@ + + #include + ++#ifndef __MINGW64_VERSION_MAJOR + #undef FILE_INFORMATION_CLASS + #undef _FILE_INFORMATION_CLASS + #undef FileDirectoryInformation ++#endif + + #endif + ++#ifndef __MINGW64_VERSION_MAJOR + typedef enum _FILE_INFORMATION_CLASS + { + FileDirectoryInformation = 1, +@@ -1335,6 +1338,7 @@ + FileValidDataLengthInformation, + FileShortNameInformation + } FILE_INFORMATION_CLASS; ++#endif + + #ifndef _WIN32 + +--- freerdp-git/winpr/include/winpr/synch.h.orig 2015-07-19 10:21:55.124294100 +0300 ++++ freerdp-git/winpr/include/winpr/synch.h 2015-07-19 10:29:13.460365500 +0300 +@@ -285,7 +285,7 @@ + #if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0600)) + + /* One-Time Initialization */ +- ++#ifndef _RTL_RUN_ONCE_DEF + typedef struct _RTL_RUN_ONCE + { + PVOID Ptr; +@@ -293,6 +293,7 @@ + + #define RTL_RUN_ONCE_INIT { 0 } + #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT ++#endif + + typedef RTL_RUN_ONCE INIT_ONCE; + typedef PRTL_RUN_ONCE PINIT_ONCE; +@@ -308,7 +309,7 @@ + + /* Synchronization Barrier */ + +-#if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0602)) ++#if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0602) && !defined(__MINGW64_VERSION_MAJOR)) + + typedef struct _RTL_BARRIER + { diff --git a/mingw-w64-freetype/PKGBUILD b/mingw-w64-freetype/PKGBUILD index c03517dea4..81eb64269a 100644 --- a/mingw-w64-freetype/PKGBUILD +++ b/mingw-w64-freetype/PKGBUILD @@ -1,38 +1,37 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=freetype +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.5.3 -pkgrel=3 +pkgver=2.6.2 +pkgrel=1 pkgdesc="TrueType font rendering library (mingw-w64)" arch=('any') url="http://www.freetype.org/" -license=('GPL') -depends=("${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-harfbuzz") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +license=(GPL2+ custom:FreeType) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-harfbuzz" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' '!libtool' 'staticlibs') source=(http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2 freetype-2.2.1-enable-valid.patch freetype-2.5.1-enable-spr.patch freetype-2.5.1-enable-sph.patch - freetype-unquote-pc.patch mingw-config.patch) -md5sums=('d6b60f06bfc046e43ab2a6cbfd171d65' +md5sums=('86109d0c998787d81ac582bad9adf82e' '214119610444c9b02766ccee5e220680' - '80a14cce234f3f190cd936ca9060c398' - '0636ba2ff074201e2ea5c47ac408bc63' - '7a041aaef5240c70d2bfc02c74740a1b' - '9d62583e770c59af1c6bd19db89e7cf3') + 'c3532124d369824fcaebdbba512611e2' + '5529f52c10eb246375730b920b908ef9' + 'a43025dbe40e90c0f4bf96d01c7110f7') prepare() { cd "${srcdir}/freetype-${pkgver}" patch -p1 -i "${srcdir}/freetype-2.2.1-enable-valid.patch" patch -p1 -i "${srcdir}/freetype-2.5.1-enable-spr.patch" - patch -p1 -i "${srcdir}/freetype-unquote-pc.patch" patch -p1 -i "${srcdir}/mingw-config.patch" # Disabled for now due to resistance @@ -42,6 +41,7 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" @@ -56,10 +56,19 @@ build() { --with-bzip2 \ --with-png \ --with-harfbuzz + make } package () { cd "${srcdir}/build-${CARCH}" make DESTDIR="${pkgdir}" install + + # Replace the absolute path. + sed -i "s|$(cygpath -m /)|/|g" ${pkgdir}${MINGW_PREFIX}/bin/freetype-config + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/docs/LICENSE.TXT" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.TXT" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/docs/GPLv2.TXT" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/GPLv2.TXT" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/docs/FTL.TXT" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/FTL.TXT" } diff --git a/mingw-w64-freetype/freetype-2.5.1-enable-sph.patch b/mingw-w64-freetype/freetype-2.5.1-enable-sph.patch index 69f73b7e36..a4e424cac6 100644 --- a/mingw-w64-freetype/freetype-2.5.1-enable-sph.patch +++ b/mingw-w64-freetype/freetype-2.5.1-enable-sph.patch @@ -1,7 +1,7 @@ -diff --git i/include/config/ftoption.h w/include/config/ftoption.h +diff --git i/include/freetype/config/ftoption.h w/include/freetype/config/ftoption.h index fe2ba15..1ab4226 100644 ---- i/include/config/ftoption.h -+++ w/include/config/ftoption.h +--- i/include/freetype/config/ftoption.h ++++ w/include/freetype/config/ftoption.h @@ -591,7 +591,7 @@ FT_BEGIN_HEADER /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ diff --git a/mingw-w64-freetype/freetype-2.5.1-enable-spr.patch b/mingw-w64-freetype/freetype-2.5.1-enable-spr.patch index 0d300a8dfc..685acef5ac 100644 --- a/mingw-w64-freetype/freetype-2.5.1-enable-spr.patch +++ b/mingw-w64-freetype/freetype-2.5.1-enable-spr.patch @@ -1,7 +1,7 @@ -diff --git i/include/config/ftoption.h w/include/config/ftoption.h +diff --git i/include/freetype/config/ftoption.h w/include/freetype/config/ftoption.h index fe2ba15..22ce1a3 100644 ---- i/include/config/ftoption.h -+++ w/include/config/ftoption.h +--- i/include/freetype/config/ftoption.h ++++ w/include/freetype/config/ftoption.h @@ -92,7 +92,7 @@ FT_BEGIN_HEADER /* This is done to allow FreeType clients to run unmodified, forcing */ /* them to display normal gray-level anti-aliased glyphs. */ diff --git a/mingw-w64-freetype/freetype-unquote-pc.patch b/mingw-w64-freetype/freetype-unquote-pc.patch deleted file mode 100644 index 34ccd5d853..0000000000 --- a/mingw-w64-freetype/freetype-unquote-pc.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- freetype-2.5.3/builds/unix/freetype2.in.orig 2014-09-19 11:48:49.054400000 +0400 -+++ freetype-2.5.3/builds/unix/freetype2.in 2014-09-19 11:49:09.599600000 +0400 -@@ -1,7 +1,7 @@ --prefix="%prefix%" --exec_prefix="%exec_prefix%" --libdir="%libdir%" --includedir="%includedir%/freetype2" -+prefix=%prefix% -+exec_prefix=%exec_prefix% -+libdir=%libdir% -+includedir=%includedir%/freetype2 - - Name: FreeType 2 - URL: http://freetype.org diff --git a/mingw-w64-freetype/mingw-config.patch b/mingw-w64-freetype/mingw-config.patch index 94d6f04a17..9127eff5db 100644 --- a/mingw-w64-freetype/mingw-config.patch +++ b/mingw-w64-freetype/mingw-config.patch @@ -1,5 +1,5 @@ ---- freetype-2.5.3/include/config/ftoption.h.orig 2014-04-02 21:30:52.858800000 +0400 -+++ freetype-2.5.3/include/config/ftoption.h 2014-04-02 21:32:39.500400000 +0400 +--- freetype-2.6.2/include/freetype/config/ftoption.h.orig 2014-04-02 21:30:52.858800000 +0400 ++++ freetype-2.6.2/include/freetype/config/ftoption.h 2014-04-02 21:32:39.500400000 +0400 @@ -184,7 +184,7 @@ /* Do not #undef this macro here since the build system might define */ /* it for certain configurations only. */ diff --git a/mingw-w64-fribidi/0001-No-need-to-specialcase-export-symbols-for-OS_WIN32.patch b/mingw-w64-fribidi/0001-No-need-to-specialcase-export-symbols-for-OS_WIN32.patch index c759d2d530..71225e541b 100644 --- a/mingw-w64-fribidi/0001-No-need-to-specialcase-export-symbols-for-OS_WIN32.patch +++ b/mingw-w64-fribidi/0001-No-need-to-specialcase-export-symbols-for-OS_WIN32.patch @@ -1,11 +1,10 @@ -diff -urN fribidi-0.19.6.orig/lib/Makefile.am fribidi-0.19.6/lib/Makefile.am ---- fribidi-0.19.6.orig/lib/Makefile.am 2012-12-30 00:11:33.000000000 +0000 -+++ fribidi-0.19.6/lib/Makefile.am 2014-07-26 16:01:01.785635600 +0100 -@@ -7,12 +7,7 @@ - libfribidi_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION_INFO) +diff -urN fribidi-0.19.7.orig/lib/Makefile.am fribidi-0.19.7/lib/Makefile.am +--- fribidi-0.19.7.orig/lib/Makefile.am 2013-01-02 07:35:46.000000000 +1100 ++++ fribidi-0.19.7/lib/Makefile.am 2015-08-06 16:38:22.122583500 +1000 +@@ -8,11 +8,7 @@ libfribidi_la_LIBADD = $(MISC_LIBS) libfribidi_la_DEPENDENCIES = -- + -if OS_WIN32 -libfribidi_la_LDFLAGS += -export-symbols $(srcdir)/fribidi.def -else @@ -14,10 +13,10 @@ diff -urN fribidi-0.19.6.orig/lib/Makefile.am fribidi-0.19.6/lib/Makefile.am if FRIBIDI_CHARSETS -diff -urN fribidi-0.19.6.orig/lib/Makefile.in fribidi-0.19.6/lib/Makefile.in ---- fribidi-0.19.6.orig/lib/Makefile.in 2013-12-06 20:56:59.000000000 +0000 -+++ fribidi-0.19.6/lib/Makefile.in 2014-07-26 16:03:34.860073600 +0100 -@@ -79,11 +79,9 @@ +diff -urN fribidi-0.19.7.orig/lib/Makefile.in fribidi-0.19.7/lib/Makefile.in +--- fribidi-0.19.7.orig/lib/Makefile.in 2015-08-05 00:15:26.000000000 +1000 ++++ fribidi-0.19.7/lib/Makefile.in 2015-08-06 16:40:34.707583500 +1000 +@@ -89,11 +89,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @@ -29,10 +28,10 @@ diff -urN fribidi-0.19.6.orig/lib/Makefile.in fribidi-0.19.6/lib/Makefile.in +@FRIBIDI_CHARSETS_TRUE@am__append_1 = -I$(top_srcdir)/charset +@FRIBIDI_CHARSETS_TRUE@am__append_2 = $(top_builddir)/charset/libfribidi-char-sets.la +@FRIBIDI_CHARSETS_TRUE@am__append_3 = $(top_builddir)/charset/libfribidi-char-sets.la - DIST_COMMON = $(srcdir)/Headers.mk $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(srcdir)/fribidi-config.h.in \ - $(top_srcdir)/depcomp $(pkginclude_HEADERS) -@@ -338,11 +336,11 @@ + subdir = lib + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ +@@ -353,11 +351,11 @@ top_srcdir = @top_srcdir@ EXTRA_DIST = fribidi.def lib_LTLIBRARIES = libfribidi.la diff --git a/mingw-w64-fribidi/PKGBUILD b/mingw-w64-fribidi/PKGBUILD index 078555487d..e119706b81 100644 --- a/mingw-w64-fribidi/PKGBUILD +++ b/mingw-w64-fribidi/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=fribidi - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.19.6 -pkgrel=3 +pkgver=0.19.7 +pkgrel=1 pkgdesc="A Free Implementation of the Unicode Bidirectional Algorithm (mingw-w64)" arch=('any') license=('LGPL') @@ -15,8 +15,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") source=("http://fribidi.org/download/${_realname}-${pkgver}.tar.bz2" "0001-No-need-to-specialcase-export-symbols-for-OS_WIN32.patch" "0003-fix-eols-in-tests-on.mingw.patch") -md5sums=('ce93d862344991173dabb609bf93ca1d' - 'c86fe94d1aa9ee801124b9f393b6d346' +md5sums=('6c7e7cfdd39c908f7ac619351c1c5c23' + '0a3c16397d43cf9f83798050c262b7d1' '98a7907bee0060f3e72e2afa26b71cd9') prepare() { @@ -26,16 +26,15 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ --with-glib - #touch ${srcdir}/${_realname}-${pkgver}/doc/c2man.stamp - #touch ${srcdir}/${_realname}-${pkgver}/doc/*.3 make } diff --git a/mingw-w64-ftgl/PKGBUILD b/mingw-w64-ftgl/PKGBUILD index ee319a53b0..29c976133b 100644 --- a/mingw-w64-ftgl/PKGBUILD +++ b/mingw-w64-ftgl/PKGBUILD @@ -1,25 +1,28 @@ # Maintainer: Alexey Pavlov _realname=ftgl - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" _pkgver=2.1.3-rc5 pkgver=${_pkgver/-/} -pkgrel=1 +pkgrel=2 pkgdesc="OpenGL library to use arbitrary fonts (mingw-w64)" arch=('any') url="http://ftgl.wiki.sourceforge.net/" license=("MIT") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-freetype") +makedepends=("${MINGW_PACKAGE_PREFIX}-cppunit" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-freetype") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$_pkgver.tar.bz2" - m4.gl.m4.patch) +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${_pkgver}.tar.bz2" + m4.gl.m4.patch) md5sums=('c7879018cde844059495b3029b0b6503' '8590beb2dea7e28e7b7214ed562b2472') prepare () { - cd "${srcdir}/${_realname}-${_pkgver/-/~}" + cd "${srcdir}/${_realname}-${_pkgver/-/\~}" sed -i "s|SUBDIRS = src test demo docs|SUBDIRS = src|g" Makefile.am patch -p0 -i "${srcdir}"/m4.gl.m4.patch autoreconf -vfi @@ -29,7 +32,7 @@ build() { rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../"${_realname}-${_pkgver/-/~}"/configure \ + ../"${_realname}-${_pkgver/-/\~}"/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -41,10 +44,10 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make ECHO=echo DESTDIR="$pkgdir" install + make ECHO=echo DESTDIR="${pkgdir}" install # FS#23283: install missing headers for OpenCascade - install -m644 $srcdir/"${_realname}-${_pkgver/-/~}"/src/FT{Face,Library,Size}.h "${pkgdir}${MINGW_PREFIX}/include/FTGL/" + install -m644 $srcdir/"${_realname}-${_pkgver/-/\~}"/src/FT{Face,Library,Size}.h "${pkgdir}${MINGW_PREFIX}/include/FTGL/" - install -Dm644 $srcdir/"${_realname}-${_pkgver/-/~}"/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + install -Dm644 $srcdir/"${_realname}-${_pkgver/-/\~}"/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-gc/PKGBUILD b/mingw-w64-gc/PKGBUILD index f0a15c7565..39177a92b0 100644 --- a/mingw-w64-gc/PKGBUILD +++ b/mingw-w64-gc/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gc - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=7.4.2 -pkgrel=1 +pkgrel=2 pkgdesc="A garbage collector for C and C++ (mingw-w64)" arch=('any') url="http://www.hboehm.info/gc" @@ -23,7 +22,7 @@ prepare() { cd "${srcdir}"/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-winpthreads.mingw.patch patch -p1 -i ${srcdir}/0003-move-docs.all.patch - + ./autogen.sh } @@ -31,7 +30,7 @@ build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" export lt_cv_deplibs_check_method='pass_all' - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -40,10 +39,11 @@ build() { --disable-dependency-tracking \ --enable-large-config \ --enable-cplusplus + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-gcc-git/0001-Relocate-libintl.patch b/mingw-w64-gcc-git/0001-Relocate-libintl.patch new file mode 100644 index 0000000000..5031b955fd --- /dev/null +++ b/mingw-w64-gcc-git/0001-Relocate-libintl.patch @@ -0,0 +1,814 @@ +From ff4ae68b006fbbbf78360dee0f115a2715bf70d9 Mon Sep 17 00:00:00 2001 +From: Erwin Waterlander +Date: Wed, 5 Aug 2015 23:36:03 +0100 +Subject: [PATCH 01/22] Relocate libintl + +The relocatex-libintl patch adds builtin relocation for executables to the +libintl dll. With this patch the programs are automatically relocatable. There +is no need anymore to add relocation code to your program when you use this +libintl DLL. + +The patch was ported from the GnuWin32 port of libintl, which has also builtin +relacation support. + +At the moment the relocation support is only active if you compile with MinGW +for Windows. If you compile for Unix/Linux/Cygwin the functionality is +unchanged. + +See also: +http://waterlan.home.xs4all.nl/libintl.html +http://sourceforge.net/tracker/?func=detail&atid=302435&aid=3003879&group_id=2435 +GnuWin32: http://gnuwin32.sourceforge.net/ + +Great thanks to GnuWin32 maintainer Kees Zeelenberg. + +Erwin Waterlander +waterlan@xs4all.nl +http://waterlan.home.xs4all.nl/ + +Additional "bogus paths for *nix-style paths" fix by Alexey Pavlov +--- + intl/Makefile.in | 7 +- + intl/bindtextdom.c | 22 ++++ + intl/canonicalize.c | 329 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + intl/relocatex.c | 295 ++++++++++++++++++++++++++++++++++++++++++++++ + intl/relocatex.h | 41 +++++++ + 5 files changed, 693 insertions(+), 1 deletion(-) + create mode 100644 intl/canonicalize.c + create mode 100644 intl/relocatex.c + create mode 100644 intl/relocatex.h + +diff --git a/intl/Makefile.in b/intl/Makefile.in +index 3dd0b7f..25f3f01 100644 +--- a/intl/Makefile.in ++++ b/intl/Makefile.in +@@ -61,6 +61,7 @@ HEADERS = \ + eval-plural.h \ + localcharset.h \ + relocatable.h \ ++ relocatex.h \ + libgnuintl.h + SOURCES = \ + bindtextdom.c \ +@@ -81,6 +82,8 @@ SOURCES = \ + plural-exp.c \ + localcharset.c \ + relocatable.c \ ++ relocatex.c \ ++ canonicalize.c \ + localename.c \ + log.c \ + osdep.c \ +@@ -104,6 +107,8 @@ OBJECTS = \ + plural-exp.o \ + localcharset.o \ + relocatable.o \ ++ relocatex.o \ ++ canonicalize.o \ + localename.o \ + log.o \ + osdep.o \ +@@ -158,7 +163,7 @@ install-info install-dvi install-ps install-pdf install-html: + $(OBJECTS): config.h libintl.h + bindtextdom.o dcgettext.o dcigettext.o dcngettext.o dgettext.o \ + dngettext.o finddomain.o gettext.o intl-compat.o loadmsgcat.o \ +-localealias.o ngettext.o textdomain.o: gettextP.h gmo.h loadinfo.h ++localealias.o ngettext.o textdomain.o: gettextP.h gmo.h loadinfo.h relocatex.h + dcigettext.o loadmsgcat.o: hash-string.h + explodename.o l10nflist.o: loadinfo.h + dcigettext.o loadmsgcat.o plural.o plural-exp.o: plural-exp.h +diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c +index 6faac57..b7a62d5 100644 +--- a/intl/bindtextdom.c ++++ b/intl/bindtextdom.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #ifdef _LIBC + # include +@@ -91,6 +92,12 @@ static void set_binding_values PARAMS ((const char *domainname, + const char **dirnamep, + const char **codesetp)); + ++#if ENABLE_RELOCATABLE ++# include "relocatex.h" ++#else ++# define relocate(pathname) (pathname) ++#endif ++ + /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP + to be used for the DOMAINNAME message catalog. + If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not +@@ -352,8 +359,23 @@ BINDTEXTDOMAIN (domainname, dirname) + const char *domainname; + const char *dirname; + { ++/* + set_binding_values (domainname, &dirname, NULL); + return (char *) dirname; ++*/ ++ if (!access (dirname, R_OK)) { ++ set_binding_values (domainname, &dirname, NULL); ++ return (char *) dirname; ++ } else { ++ char *locale_dirname, *installdir = strdup (dirname), *s; ++ if ((s = strrchr (installdir, '/'))) *s = '\0'; ++ if ((s = strrchr (installdir, '/'))) *s = '\0'; ++ locale_dirname = relocatex (installdir, dirname); ++ set_binding_values (domainname, (const char **) &locale_dirname, NULL); ++ if (installdir) ++ free (installdir); ++ return (char *) locale_dirname; ++ } + } + + /* Specify the character encoding in which the messages from the +diff --git a/intl/canonicalize.c b/intl/canonicalize.c +new file mode 100644 +index 0000000..8bc1f84 +--- /dev/null ++++ b/intl/canonicalize.c +@@ -0,0 +1,329 @@ ++/* Return the canonical absolute name of a given file. ++ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#ifdef __WIN32__ ++# include ++# include ++//# include ++#endif /* __WIN32__ */ ++ ++#ifndef MAXSYMLINKS ++# define MAXSYMLINKS 20 ++#endif ++ ++#ifndef __set_errno ++# define __set_errno(Val) errno = (Val) ++#endif ++ ++# ifdef VMS ++ /* We want the directory in Unix syntax, not in VMS syntax. */ ++# define __getcwd(buf, max) getcwd (buf, max, 0) ++# else ++# define __getcwd getcwd ++# endif ++ ++#define weak_alias(local, symbol) ++ ++#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ ++ /* Win32, Cygwin, OS/2, DOS */ ++# define ISDIRSEP(C) ((C) == '/' || (C) == '\\') ++#else ++ /* Unix */ ++# define ISDIRSEP(C) ((C) == '/') ++#endif ++ ++/* Return the canonical absolute name of file NAME. A canonical name ++ does not contain any `.', `..' components nor any repeated path ++ separators ('/') or symlinks. All path components must exist. If ++ RESOLVED is null, the result is malloc'd; otherwise, if the ++ canonical name is PATH_MAX chars or more, returns null with `errno' ++ set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, ++ returns the name in RESOLVED. If the name cannot be resolved and ++ RESOLVED is non-NULL, it contains the path of the first component ++ that cannot be resolved. If the path can be resolved, RESOLVED ++ holds the same value as the value returned. ++ RESOLVED must be at least PATH_MAX long */ ++ ++static char * ++canonicalize (const char *name, char *resolved) ++{ ++ char *rpath, *dest, *extra_buf = NULL; ++ const char *start, *end, *rpath_limit; ++ long int path_max; ++ int num_links = 0, old_errno; ++ ++ if (name == NULL) ++ { ++ /* As per Single Unix Specification V2 we must return an error if ++ either parameter is a null pointer. We extend this to allow ++ the RESOLVED parameter to be NULL in case the we are expected to ++ allocate the room for the return value. */ ++ __set_errno (EINVAL); ++ return NULL; ++ } ++ ++ if (name[0] == '\0') ++ { ++ /* As per Single Unix Specification V2 we must return an error if ++ the name argument points to an empty string. */ ++ __set_errno (ENOENT); ++ return NULL; ++ } ++#ifdef __WIN32__ ++ { ++ char *lpFilePart; ++ int len; ++// fprintf(stderr, "name: %s\n", name); ++ rpath = resolved ? __builtin_alloca (MAX_PATH) : malloc (MAX_PATH); ++// unix2winpath (name); ++// fprintf(stderr, "name: %s\n", name); ++len = GetFullPathName(name, MAX_PATH, rpath, &lpFilePart); ++/* GetFullPathName returns bogus paths for *nix-style paths, like ++ * /foo/bar - it just prepends current drive to them. Keep them ++ * intact (they need to be for relocation to work!). ++ */ ++if (name[0] == '/') { ++ strncpy (rpath, name, MAX_PATH - 1); ++ rpath[MAX_PATH - 1] = '\0'; ++ len = strlen (rpath); ++} ++// fprintf(stderr, "rpath: %s\n", rpath); ++ if (len == 0) { ++ //set_werrno; ++ return NULL; ++ } ++ if (len > MAX_PATH) { ++ if (resolved) ++ __set_errno(ENAMETOOLONG); ++ else { ++ rpath = realloc(rpath, len + 2); ++ GetFullPathName(name, len, rpath, &lpFilePart); ++// fprintf(stderr, "rpath: %s\n", rpath); ++ } ++ } ++// if ( ISDIRSEP(name[strlen(name)]) && !ISDIRSEP(rpath[len]) ) { ++// rpath[len] = '\\'; ++// rpath[len + 1] = 0; ++// } ++ old_errno = errno; ++ //if (!access (rpath, D_OK) && !ISDIRSEP(rpath[len - 1]) ){ ++ if (!access (rpath, R_OK) && !ISDIRSEP(rpath[len - 1]) ){ ++ rpath[len] = '\\'; ++ rpath[len + 1] = 0; ++ } ++ errno = old_errno; ++ win2unixpath (rpath); ++// fprintf(stderr, "rpath: %s\n", rpath); ++ return resolved ? strcpy(resolved, rpath) : rpath ; ++ } ++#else /* __WIN32__ */ ++ ++#ifdef PATH_MAX ++ path_max = PATH_MAX; ++#else ++ path_max = pathconf (name, _PC_PATH_MAX); ++ if (path_max <= 0) ++ path_max = 1024; ++#endif ++ ++ rpath = resolved ? __builtin_alloca (path_max) : malloc (path_max); ++ rpath_limit = rpath + path_max; ++ ++ if (name[0] != '/') ++ { ++ if (!__getcwd (rpath, path_max)) ++ { ++ rpath[0] = '\0'; ++ goto error; ++ } ++ dest = strchr (rpath, '\0'); ++ } ++ else ++ { ++ rpath[0] = '/'; ++ dest = rpath + 1; ++ } ++ ++ for (start = end = name; *start; start = end) ++ { ++#ifdef _LIBC ++ struct stat64 st; ++#else ++ struct stat st; ++#endif ++ int n; ++ ++ /* Skip sequence of multiple path-separators. */ ++ while (*start == '/') ++ ++start; ++ ++ /* Find end of path component. */ ++ for (end = start; *end && *end != '/'; ++end) ++ /* Nothing. */; ++ ++ if (end - start == 0) ++ break; ++ else if (end - start == 1 && start[0] == '.') ++ /* nothing */; ++ else if (end - start == 2 && start[0] == '.' && start[1] == '.') ++ { ++ /* Back up to previous component, ignore if at root already. */ ++ if (dest > rpath + 1) ++ while ((--dest)[-1] != '/'); ++ } ++ else ++ { ++ size_t new_size; ++ ++ if (dest[-1] != '/') ++ *dest++ = '/'; ++ ++ if (dest + (end - start) >= rpath_limit) ++ { ++ ptrdiff_t dest_offset = dest - rpath; ++ ++ if (resolved) ++ { ++ __set_errno (ENAMETOOLONG); ++ if (dest > rpath + 1) ++ dest--; ++ *dest = '\0'; ++ goto error; ++ } ++ new_size = rpath_limit - rpath; ++ if (end - start + 1 > path_max) ++ new_size += end - start + 1; ++ else ++ new_size += path_max; ++ rpath = realloc (rpath, new_size); ++ rpath_limit = rpath + new_size; ++ if (rpath == NULL) ++ return NULL; ++ ++ dest = rpath + dest_offset; ++ } ++ ++#ifdef _LIBC ++ dest = __mempcpy (dest, start, end - start); ++#else ++ memcpy (dest, start, end - start); ++ dest += end - start; ++#endif ++ *dest = '\0'; ++ ++#ifdef _LIBC ++ if (__lxstat64 (_STAT_VER, rpath, &st) < 0) ++#else ++ if (lstat (rpath, &st) < 0) ++#endif ++ goto error; ++ ++#if HAVE_READLINK ++ if (S_ISLNK (st.st_mode)) ++ { ++ char *buf = __builtin_alloca (path_max); ++ size_t len; ++ ++ if (++num_links > MAXSYMLINKS) ++ { ++ __set_errno (ELOOP); ++ goto error; ++ } ++ ++ n = __readlink (rpath, buf, path_max); ++ if (n < 0) ++ goto error; ++ buf[n] = '\0'; ++ ++ if (!extra_buf) ++ extra_buf = __builtin_alloca (path_max); ++ ++ len = strlen (end); ++ if ((long int) (n + len) >= path_max) ++ { ++ __set_errno (ENAMETOOLONG); ++ goto error; ++ } ++ ++ /* Careful here, end may be a pointer into extra_buf... */ ++ memmove (&extra_buf[n], end, len + 1); ++ name = end = memcpy (extra_buf, buf, n); ++ ++ if (buf[0] == '/') ++ dest = rpath + 1; /* It's an absolute symlink */ ++ else ++ /* Back up to previous component, ignore if at root already: */ ++ if (dest > rpath + 1) ++ while ((--dest)[-1] != '/'); ++ } ++#endif ++ } ++ } ++ if (dest > rpath + 1 && dest[-1] == '/') ++ --dest; ++ *dest = '\0'; ++ ++ return resolved ? memcpy (resolved, rpath, dest - rpath + 1) : rpath; ++ ++error: ++ if (resolved) ++ strcpy (resolved, rpath); ++ else ++ free (rpath); ++ return NULL; ++ ++#endif /* __WIN32__ */ ++} ++ ++ ++char * ++__realpath (const char *name, char *resolved) ++{ ++ if (resolved == NULL) ++ { ++ __set_errno (EINVAL); ++ return NULL; ++ } ++ ++ return canonicalize (name, resolved); ++} ++weak_alias (__realpath, realpath) ++ ++ ++char * ++__canonicalize_file_name (const char *name) ++{ ++ return canonicalize (name, NULL); ++} ++weak_alias (__canonicalize_file_name, canonicalize_file_name) ++ ++char * ++canonicalize_file_name (const char *name) ++{ ++ return canonicalize (name, NULL); ++} +diff --git a/intl/relocatex.c b/intl/relocatex.c +new file mode 100644 +index 0000000..8e91a88 +--- /dev/null ++++ b/intl/relocatex.c +@@ -0,0 +1,295 @@ ++/* Provide relocatable packages. ++ Copyright (C) 2003 Free Software Foundation, Inc. ++ Written by Bruno Haible , 2003. ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU Library General Public License as published ++ by the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ USA. */ ++ ++ ++/* Specification. */ ++#include ++#define _GNU_SOURCE ++#include ++#include ++#include ++#include ++/* #include */ ++#include "relocatex.h" ++//#include "canonicalize.h" ++/* #include */ ++ ++ ++#if defined _WIN32 || defined __WIN32__ ++# define WIN32_LEAN_AND_MEAN ++# include ++//# define __GW32__ ++//# include ++#endif ++#define set_werrno ++ ++#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ ++ /* Win32, Cygwin, OS/2, DOS */ ++# define ISDIRSEP(C) ((C) == '/' || (C) == '\\') ++#else ++ /* Unix */ ++# define ISDIRSEP(C) ((C) == '/') ++#endif ++ ++/* Original installation prefix. */ ++static char *orig_prefix = NULL; ++static size_t orig_prefix_len = 0; ++/* Current installation prefix. */ ++static char *curr_prefix = NULL; ++static size_t curr_prefix_len = 0; ++/* These prefixes do not end in a slash. Anything that will be concatenated ++ to them must start with a slash. */ ++ ++ ++char *win2unixpath (char *FileName) ++{ ++ char *s = FileName; ++ while (*s) { ++ if (*s == '\\') ++ *s = '/'; ++ *s++; ++ } ++ return FileName; ++} ++ ++int win2posixpath (const char *winpath, char *posixpath) ++{ ++ strcpy (posixpath, winpath); ++ win2unixpath (posixpath); ++ return 0; ++} ++ ++ ++/* Sets the original and the current installation prefix of this module. ++ Relocation simply replaces a pathname starting with the original prefix ++ by the corresponding pathname with the current prefix instead. Both ++ prefixes should be directory names without trailing slash (i.e. use "" ++ instead of "/"). */ ++static char * ++set_orig_prefix (const char *orig_prefix_arg) ++{ ++ char *memory; ++// printf ("orig_prefix_arg: %s\n", orig_prefix_arg); ++ if (!orig_prefix_arg) { ++ orig_prefix = NULL; ++ orig_prefix_len = 0; ++ return NULL; ++ } ++ if (orig_prefix) ++ free (orig_prefix); ++ ++ memory = canonicalize_file_name (orig_prefix_arg); ++// printf ("memory: %s\n", memory); ++// memory = (char *) malloc (orig_prefix_len + 1); ++ if (!memory) { ++ set_werrno; ++ orig_prefix = NULL; ++ orig_prefix_len = 0; ++ return NULL; ++ } ++ win2unixpath (memory); ++// win2posixpath (orig_prefix_arg, memory); ++ orig_prefix = memory; ++ orig_prefix_len = strlen (orig_prefix); ++// printf ("orig_prefix: %s\n", orig_prefix); ++ if (ISDIRSEP (orig_prefix[orig_prefix_len-1])) { ++ orig_prefix[orig_prefix_len-1] = '\0'; ++ orig_prefix_len--; ++ } ++// printf ("orig_prefix: %s\n", orig_prefix); ++// printf ("orig_prefix_len: %d\n", orig_prefix_len); ++ return orig_prefix; ++} ++ ++#if defined __WIN32__ ++static char * ++set_current_prefix (const char *ModuleName) ++{ ++ LPTSTR curr_prefix_arg, q, lpFilePart; ++ DWORD len; ++ int nDIRSEP = 0; ++ ++ if (curr_prefix) ++ free (curr_prefix); ++ curr_prefix_arg = malloc (MAX_PATH * sizeof (TCHAR)); ++ if (!curr_prefix_arg) { ++ set_werrno; ++ curr_prefix = NULL; ++ curr_prefix_len = 0; ++ return NULL; ++ } ++ if (ModuleName) { ++// printf ("ModuleName: %s\n", ModuleName); ++ len = SearchPath (NULL, ModuleName, ".DLL", MAX_PATH, curr_prefix_arg, &lpFilePart); ++ if (len) { ++// printf ("ModulePath: %s\n", curr_prefix_arg); ++// printf ("FilePart: %s\n", lpFilePart); ++ } ++ } ++ if (!ModuleName || !len) { ++ len = GetModuleFileName (NULL, curr_prefix_arg, MAX_PATH); ++ if (!len) { ++ set_werrno; ++ curr_prefix = NULL; ++ curr_prefix_len = 0; ++ return NULL; ++ } ++ } ++// strncpy (curr_prefix_arg, ModuleName, MAX_PATH); ++// printf ("curr_prefix_arg: %s\n", curr_prefix_arg); ++ win2posixpath (curr_prefix_arg, curr_prefix_arg); ++ curr_prefix = curr_prefix_arg; ++ q = curr_prefix_arg + len - 1; ++ /* strip name of executable and its directory */ ++ while (!ISDIRSEP (*q) && (q > curr_prefix_arg) && nDIRSEP < 2) { ++ q--; ++ if (ISDIRSEP (*q)) { ++ *q = '\0'; ++ nDIRSEP++; ++ } ++ } ++ curr_prefix_len = q - curr_prefix_arg; ++// printf ("curr_prefix: %s\n", curr_prefix); ++// printf ("curr_prefix_len: %d\n", curr_prefix_len); ++ return curr_prefix; ++} ++ ++char *getshortpath (const char *longpath) ++{ ++ char *shortpath = NULL; ++ DWORD len, res; ++ ++// printf ("longpath: %s\n", longpath); ++ len = GetShortPathName(longpath, shortpath, 0); ++// printf ("len: %ld\n", len); ++ if (!len) { ++// WinErr ("getshortpath: len = 0"); ++ set_werrno; ++ return (char *) longpath; ++ } ++ shortpath = (char *) malloc (len + 1); ++ if (!shortpath) { ++// WinErr ("getshortpath: malloc"); ++ set_werrno; ++ return (char *) longpath; ++ } ++ res = GetShortPathName(longpath, shortpath, len); ++// printf ("res: %ld\n", res); ++ if (!res) { ++// WinErr ("getshortpath: res = 0"); ++ free (shortpath); ++ set_werrno; ++ return (char *) longpath; ++ } ++// printf ("shortpath: %s\n", shortpath); ++ return shortpath; ++} ++ ++char *relocaten (const char *ModuleName, const char *path) ++{ ++ char *relative_path, *relocated_path, *relocated_short_path; ++ int relative_path_len; ++ ++ if (!curr_prefix) ++ set_current_prefix (ModuleName); ++// printf ("path: %s\n", path); ++// printf ("orig_prefix: %s\n", orig_prefix); ++// printf ("curr_prefix: %s\n", curr_prefix); ++// if (strncmp (orig_prefix, path, orig_prefix_len)) ++// if (strcmp (orig_prefix, path)) ++// return (char *) path; ++ relative_path = (char *) path + orig_prefix_len; ++// printf ("relative_path: %s\n", relative_path); ++ relative_path_len = strlen (relative_path); ++ relocated_path = malloc (curr_prefix_len + relative_path_len + 1); ++ strcpy (relocated_path, curr_prefix); ++ strcat (relocated_path, relative_path); ++// printf ("relocated_path: %s\n", relocated_path); ++ relocated_short_path = getshortpath (relocated_path); ++// printf ("relocated_short_path: %s\n", relocated_short_path); ++ if (relocated_short_path) { ++ if (relocated_short_path != relocated_path) ++ free (relocated_path); ++ return relocated_short_path; ++ } else ++ return relocated_path; ++} ++ ++#else // __WIN32__ ++char *relocaten (const char *ModuleName, const char *path) ++{ ++ // dummy function for Unix/Linux ++ return (char *)path; ++} ++#endif ++ ++char *relocaten2 (const char *ModuleName, const char *installdir, const char *path) ++{ ++ set_orig_prefix (installdir); ++ return relocaten (ModuleName, path); ++} ++ ++char *relocatenx (const char *ModuleName, const char *installdir, const char *path) ++{ ++ char *p; ++ ++ set_orig_prefix (installdir); ++ if (access (path, R_OK)) ++ p = relocaten (ModuleName, path); ++ else ++ p = (char *) path; ++// printf ("relocatenx: %s\n", p); ++ return p; ++} ++ ++char *relocate2 (const char *installdir, const char *path) ++{ ++ return relocaten2 (NULL, installdir, path); ++} ++ ++char *relocatex (const char *installdir, const char *path) ++{ ++ return relocatenx (NULL, installdir, path); ++} ++ ++char *relocatepx (const char *cprefix, const char *installdir, const char *path) ++{ ++ if (curr_prefix) ++ free (curr_prefix); ++ curr_prefix = strdup (cprefix); ++ return relocatex (installdir, path); ++} ++ ++static char *get_orig_prefix (void) ++{ ++ return orig_prefix; ++} ++ ++static char *get_curr_prefix (void) ++{ ++ return curr_prefix; ++} ++ ++static char *set_curr_prefix (const char *ModuleName) ++{ ++ if (curr_prefix) ++ free (curr_prefix); ++ set_current_prefix (ModuleName); ++ return curr_prefix; ++} +diff --git a/intl/relocatex.h b/intl/relocatex.h +new file mode 100644 +index 0000000..5cc7c51 +--- /dev/null ++++ b/intl/relocatex.h +@@ -0,0 +1,41 @@ ++/* ++ Copyright (C) 2006 Free Software Foundation, Inc. ++ This file is part of the GnuWin C Library. ++ ++ The GnuWin C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GnuWin C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GnuWin32 C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef __RELOCATE_H__ ++#define __RELOCATE_H__ 1 ++ ++/* #include */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++char *relocaten (const char *ModuleName, const char *path); ++char *relocaten2 (const char *ModuleName, const char *installdir, const char *path); ++char *relocatenx (const char *ModuleName, const char *installdir, const char *path); ++char *relocate2 (const char *installdir, const char *path); ++char *relocatex (const char *installdir, const char *path); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++//#endif /* __GW32__ */ ++ ++#endif /* __RELOCATE_H__ */ +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch b/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch new file mode 100644 index 0000000000..fbd3a752bf --- /dev/null +++ b/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch @@ -0,0 +1,54 @@ +From 9fe0b8519f2845d47377d393cadbde0ccfa17bb0 Mon Sep 17 00:00:00 2001 +From: gee +Date: Wed, 5 Aug 2015 23:36:04 +0100 +Subject: [PATCH 02/22] PR54314: Include _ZTC* in libstdc++ exports + [deprecated] + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314 +https://gcc.gnu.org/bugzilla/attachment.cgi?id=28065 + +Discussion: + +1. gee 2012-08-21 13:38:57 UTC +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314#c5 + +I think symbol _ZTCSt* need to be included +in libstdc++/config/abi/pre/gnu.ver so that +shared-library can export these symbols +unless user did append --disable-symvers. +nothing need to be done such as reverting +the commit or so. + +2. Jason Merrill 2013-01-25 20:37:07 UTC +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314#c19 + +This change turns out to be wrong; we don't want to +export the construction vtables, as they should only +be referenced by the VTTs which are emitted along +with them. If other code is referring to those +symbols, that's the bug that should be fixed. + +3. Kai Tietz 2013-09-10 16:19:48 UTC +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314#c41 + +Add thunk _ZTv0_n12_NS* like in gnu.ver +--- + libstdc++-v3/config/abi/pre/gnu.ver | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver +index d42cd37..7502fee 100644 +--- a/libstdc++-v3/config/abi/pre/gnu.ver ++++ b/libstdc++-v3/config/abi/pre/gnu.ver +@@ -2064,7 +2064,7 @@ CXXABI_1.3.6 { + __cxa_allocate_dependent_exception; + __cxa_free_dependent_exception; + __cxa_deleted_virtual; +- ++ _ZTC*; + } CXXABI_1.3.5; + + CXXABI_1.3.7 { +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch b/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch new file mode 100644 index 0000000000..59a6244c5d --- /dev/null +++ b/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch @@ -0,0 +1,32 @@ +From 103329511f61dc7675a69ae0e4c84dd1b32b94f1 Mon Sep 17 00:00:00 2001 +From: niXman +Date: Wed, 5 Aug 2015 23:36:06 +0100 +Subject: [PATCH 03/22] PR52300: Avoid __weakref__ on __MINGW32__ [deprecated] + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300#c0 + +Deprecated by: + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300#c3 +http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184406 +--- + libgcc/gthr-posix.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h +index fb59816..733bece 100644 +--- a/libgcc/gthr-posix.h ++++ b/libgcc/gthr-posix.h +@@ -82,7 +82,7 @@ typedef struct timespec __gthread_time_t; + # define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function + #endif + +-#if SUPPORTS_WEAK && GTHREAD_USE_WEAK ++#if SUPPORTS_WEAK && GTHREAD_USE_WEAK && !defined(__MINGW32__) + # ifndef __gthrw_pragma + # define __gthrw_pragma(pragma) + # endif +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch b/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch new file mode 100644 index 0000000000..6492f308cf --- /dev/null +++ b/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch @@ -0,0 +1,130 @@ +From e79a89ddcccd411c0d61adc3c21710f63b79730d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:07 +0100 +Subject: [PATCH 04/22] Windows: Follow Posix dir-exists semantics more closely + +Make Windows behave the same as Posix in the consideration +of whether folder "/doesnt-exist/.." is a valid +path. In Posix, it isn't. + +A concrete instance of when this matters is when cross +compiling GNU/Linux glibc on Windows. +--- + libcpp/files.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 87 insertions(+) + +diff --git a/libcpp/files.c b/libcpp/files.c +index 8c388d8..e45665c 100644 +--- a/libcpp/files.c ++++ b/libcpp/files.c +@@ -30,6 +30,13 @@ along with this program; see the file COPYING3. If not see + #include "md5.h" + #include + ++/* Needed for stat_st_mode_symlink below */ ++#if defined(_WIN32) ++# include ++# define S_IFLNK 0xF000 ++# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) ++#endif ++ + /* Variable length record files on VMS will have a stat size that includes + record control characters that won't be included in the read size. */ + #ifdef VMS +@@ -198,6 +205,49 @@ static int pchf_save_compare (const void *e1, const void *e2); + static int pchf_compare (const void *d_p, const void *e_p); + static bool check_file_against_entries (cpp_reader *, _cpp_file *, bool); + ++#if defined(_WIN32) ++ ++static int stat_st_mode_symlink (char const* path, struct stat* buf) ++{ ++ WIN32_FILE_ATTRIBUTE_DATA attr; ++ memset(buf,0,sizeof(*buf)); ++ int err = GetFileAttributesExA (path, GetFileExInfoStandard, &attr) ? 0 : 1; ++ if (!err) ++ { ++ WIN32_FIND_DATAA finddata; ++ HANDLE h = FindFirstFileA (path, &finddata); ++ if (h != INVALID_HANDLE_VALUE) ++ { ++ FindClose (h); ++ if ((finddata.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && ++ (finddata.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) ++ buf->st_mode = S_IFLNK; ++ else if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ++ buf->st_mode = S_IFDIR; ++ else if (finddata.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ++ buf->st_mode = S_IFDIR; ++ else ++ buf->st_mode = S_IFREG; ++ buf->st_mode |= S_IREAD; ++ if (!(finddata.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) ++ buf->st_mode |= S_IWRITE; ++ } ++ else ++ { ++ buf->st_mode = S_IFDIR; ++ } ++ return 0; ++ } ++ return -1; ++} ++ ++#else ++ ++#define stat_st_mode_symlink (_name, _buf) stat ((_name), (_buf)) ++ ++#endif ++ ++ + /* Given a filename in FILE->PATH, with the empty string interpreted + as , open it. + +@@ -227,6 +277,43 @@ open_file (_cpp_file *file) + } + else + file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY, 0666); ++#if defined(_WIN32) || defined(__CYGWIN__) ++ /* Windows and Posix differ in the face of paths of the form: ++ nonexistantdir/.. in that Posix will return ENOENT whereas ++ Windows won't care that we stepped into a non-existant dir ++ Only do these slow checks if ".." appears in file->path. ++ Cygwin also suffers from the same problem (but doesn't need ++ a new stat function): ++ http://cygwin.com/ml/cygwin/2013-05/msg00222.html ++ */ ++ if (file->fd > 0) ++ { ++ char filepath[MAX_PATH]; ++ strncpy (filepath, file->path, sizeof(filepath) - 1); ++ char* dirsep = &filepath[0]; ++ while ( (dirsep = strchr (dirsep, '\\')) != NULL) ++ *dirsep = '/'; ++ if (strstr(file->path, "/../")) ++ { ++ dirsep = &filepath[0]; ++ char dirsepc; ++ /* Check each directory in the chain. */ ++ while ( (dirsep = strpbrk (dirsep, "\\/")) != NULL) ++ { ++ dirsepc = *(++dirsep); ++ *dirsep = '\0'; ++ if (stat_st_mode_symlink (filepath, &file->st) == -1) ++ { ++ *dirsep = dirsepc; ++ close (file->fd); ++ file->fd = -1; ++ return false; ++ } ++ *dirsep++ = dirsepc; ++ } ++ } ++ } ++#endif + + if (file->fd != -1) + { +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch b/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch new file mode 100644 index 0000000000..146aec9d21 --- /dev/null +++ b/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch @@ -0,0 +1,60 @@ +From 1140ae4d65b16735ce32ebd99ab29ad96997165b Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:09 +0100 +Subject: [PATCH 05/22] Windows: Use '/' not '\' in progpath and leave case + as-is + +Windows can handle both '/' and '\' dirseps. GCC will +have been built using Cygwin, MSYS* or cross-compiled +from a system where dirsep is '/' so it is cleaner to +force the dirseps to be '/' and keep the case as-is. + +This way, the value will be consistent with the build +system and string operations, be they internal to GCC +or external to it (e.g. processing map files with sed) +have a better chance of working as expected. + +A concrete instance of when this matters is when cross +compiling GNU/Linux glibc on Windows. +--- + libiberty/lrealpath.c | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c +index b27c8de..8165984 100644 +--- a/libiberty/lrealpath.c ++++ b/libiberty/lrealpath.c +@@ -138,15 +138,26 @@ lrealpath (const char *filename) + { + char buf[MAX_PATH]; + char* basename; ++ char* slash; + DWORD len = GetFullPathName (filename, MAX_PATH, buf, &basename); + if (len == 0 || len > MAX_PATH - 1) + return strdup (filename); + else + { +- /* The file system is case-preserving but case-insensitive, +- Canonicalize to lowercase, using the codepage associated +- with the process locale. */ +- CharLowerBuff (buf, len); ++ /* Turn all back slashes back into forward slashes ++ and don't make it lowercase. ++ Rationale: ++ Windows is as happy with / as it is with \. This will ++ have been built using Cygwin, MSYS* or cross-compiled ++ from a system where dirsep is / so it is cleaner just ++ to keep the dirseps as / (and the case un-modified). ++ This way, the value will be consistent with the build ++ system and string operations (be they internal to this ++ software or external to it, e.g. processing map files ++ with sed) work as expected. */ ++ slash = buf; ++ while ((slash = strchr(slash,'\\')) != NULL) ++ *slash = '/'; + return strdup (buf); + } + } +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch b/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch new file mode 100644 index 0000000000..254436a87d --- /dev/null +++ b/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch @@ -0,0 +1,28 @@ +From b35b11fad88c2f0de40663813e2c19154faccae2 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:11 +0100 +Subject: [PATCH 06/22] Windows: Don't ignore native system header dir + +--- + gcc/config.gcc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 24f6d35..8c79739 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1722,7 +1722,10 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) + tmake_file="${tmake_file} i386/t-mingw-w32" + ;; + esac +- native_system_header_dir=/mingw/include ++ # Don't ignore values passed in to configure via --native-system-header-dir ++ if test x$native_system_header_dir = x ; then ++ native_system_header_dir=/mingw/include ++ fi + target_gtfiles="\$(srcdir)/config/i386/winnt.c" + extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" + case ${target} in +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0007-gcc-5-branch-Windows-New-feature-to-allow-overriding-lmsvcrt.patch b/mingw-w64-gcc-git/0007-gcc-5-branch-Windows-New-feature-to-allow-overriding-lmsvcrt.patch new file mode 100644 index 0000000000..31ac4732d8 --- /dev/null +++ b/mingw-w64-gcc-git/0007-gcc-5-branch-Windows-New-feature-to-allow-overriding-lmsvcrt.patch @@ -0,0 +1,43 @@ +From 9a5802335d195c8b1bf577bbc00e7905c2ed8226 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:13 +0100 +Subject: [PATCH 07/21] gcc-5-branch Windows: New feature to allow overriding -lmsvcrt + +Added in support of the MinGW-w64 WIP feature "agile mscvrt dll" where +a process' loaded msvc runtime is used by a newly loaded DLL rather than +always using msvcrt.dll +--- + gcc/config/i386/cygming.opt | 3 +++ + gcc/config/i386/mingw32.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt +index c7e398f..dfddaf8 100644 +--- a/gcc/config/i386/cygming.opt ++++ b/gcc/config/i386/cygming.opt +@@ -22,6 +22,9 @@ mconsole + Target RejectNegative + Create console application + ++mcrtdll= ++Target RejectNegative Joined ++ + mdll + Target RejectNegative + Generate code for a DLL +diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h +index f139761..0950304 100644 +--- a/gcc/config/i386/mingw32.h ++++ b/gcc/config/i386/mingw32.h +@@ -140,7 +140,7 @@ along with GCC; see the file COPYING3. If not see + #define REAL_LIBGCC_SPEC \ + "%{mthreads:-lmingwthrd} -lmingw32 \ + "SHARED_LIBGCC_SPEC" \ +- -lmoldname -lmingwex -lmsvcrt" ++ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvc.patch b/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvc.patch new file mode 100644 index 0000000000..ee54722cf1 --- /dev/null +++ b/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvc.patch @@ -0,0 +1,44 @@ +From cba090e187e04894e13c4ad178498f710e814d88 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:13 +0100 +Subject: [PATCH 07/22] master Windows: New feature to allow overriding + -lmsvcrt + +Added in support of the MinGW-w64 WIP feature "agile mscvrt dll" where +a process' loaded msvc runtime is used by a newly loaded DLL rather than +always using msvcrt.dll +--- + gcc/config/i386/cygming.opt | 3 +++ + gcc/config/i386/mingw32.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt +index c7e398f..dfddaf8 100644 +--- a/gcc/config/i386/cygming.opt ++++ b/gcc/config/i386/cygming.opt +@@ -22,6 +22,9 @@ mconsole + Target RejectNegative + Create console application + ++mcrtdll= ++Target RejectNegative Joined ++ + mdll + Target RejectNegative + Generate code for a DLL +diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h +index eef90fb..47e12e7 100644 +--- a/gcc/config/i386/mingw32.h ++++ b/gcc/config/i386/mingw32.h +@@ -140,7 +140,7 @@ along with GCC; see the file COPYING3. If not see + #define REAL_LIBGCC_SPEC \ + "%{mthreads:-lmingwthrd} -lmingw32 \ + " SHARED_LIBGCC_SPEC " \ +- -lmoldname -lmingwex -lmsvcrt" ++ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvcrt.patch b/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvcrt.patch new file mode 100644 index 0000000000..02a7ea8dad --- /dev/null +++ b/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvcrt.patch @@ -0,0 +1,43 @@ +From aa1cf6450bfaaaeee75c6aaa16631dc6f606f16b Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:13 +0100 +Subject: [PATCH 07/20] master Windows: New feature to allow overriding -lmsvcrt + +Added in support of the MinGW-w64 WIP feature "agile mscvrt dll" where +a process' loaded msvc runtime is used by a newly loaded DLL rather than +always using msvcrt.dll +--- + gcc/config/i386/cygming.opt | 3 +++ + gcc/config/i386/mingw32.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt +index c7e398f..dfddaf8 100644 +--- a/gcc/config/i386/cygming.opt ++++ b/gcc/config/i386/cygming.opt +@@ -22,6 +22,9 @@ mconsole + Target RejectNegative + Create console application + ++mcrtdll= ++Target RejectNegative Joined ++ + mdll + Target RejectNegative + Generate code for a DLL +diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h +index eef90fb..47e12e7 100644 +--- a/gcc/config/i386/mingw32.h ++++ b/gcc/config/i386/mingw32.h +@@ -140,7 +140,7 @@ along with GCC; see the file COPYING3. If not see + #define REAL_LIBGCC_SPEC \ + "%{mthreads:-lmingwthrd} -lmingw32 \ + " SHARED_LIBGCC_SPEC " \ +- -lmoldname -lmingwex -lmsvcrt" ++ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch b/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch new file mode 100644 index 0000000000..f93e74b53a --- /dev/null +++ b/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch @@ -0,0 +1,75 @@ +From 17b20f9905260f575071bce6d192ac0319e1b294 Mon Sep 17 00:00:00 2001 +From: Kai Tietz +Date: Wed, 5 Aug 2015 23:36:16 +0100 +Subject: [PATCH 08/22] libgomp: Use gomp_malloc_cleared instead of gomp_malloc + [deprecated] + +This was added when trying to track down a problem in Blender, +but the actual problem turned out not to be related, so this +is probably not needed. +--- + libgomp/team.c | 4 ++-- + libgomp/testsuite/config/default.exp | 5 +++++ + libgomp/work.c | 4 ++-- + 3 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/libgomp/team.c b/libgomp/team.c +index 7671b05..f9024c0 100644 +--- a/libgomp/team.c ++++ b/libgomp/team.c +@@ -224,7 +224,7 @@ free_team (struct gomp_team *team) + static struct gomp_thread_pool *gomp_new_thread_pool (void) + { + struct gomp_thread_pool *pool +- = gomp_malloc (sizeof(struct gomp_thread_pool)); ++ = gomp_malloc_cleared (sizeof(struct gomp_thread_pool)); + pool->threads = NULL; + pool->threads_size = 0; + pool->threads_used = 0; +@@ -964,7 +964,7 @@ struct gomp_task_icv * + gomp_new_icv (void) + { + struct gomp_thread *thr = gomp_thread (); +- struct gomp_task *task = gomp_malloc (sizeof (struct gomp_task)); ++ struct gomp_task *task = gomp_malloc_cleared (sizeof (struct gomp_task)); + gomp_init_task (task, NULL, &gomp_global_icv); + thr->task = task; + pthread_setspecific (gomp_thread_destructor, thr); +diff --git a/libgomp/testsuite/config/default.exp b/libgomp/testsuite/config/default.exp +index 7f82b4d..7febdea 100644 +--- a/libgomp/testsuite/config/default.exp ++++ b/libgomp/testsuite/config/default.exp +@@ -15,3 +15,8 @@ + # . + + load_lib "standard.exp" ++ ++# Support for old dejagnu. Must be loaded here, not in libstdc++.exp, to ++# make sure all existing procs are loaded when their presence is tested. ++load_file $srcdir/../../gcc/testsuite/lib/dejapatches.exp ++ +diff --git a/libgomp/work.c b/libgomp/work.c +index 0570b90..741599a 100644 +--- a/libgomp/work.c ++++ b/libgomp/work.c +@@ -76,7 +76,7 @@ alloc_work_share (struct gomp_team *team) + #endif + + team->work_share_chunk *= 2; +- ws = gomp_malloc (team->work_share_chunk * sizeof (struct gomp_work_share)); ++ ws = gomp_malloc_cleared (team->work_share_chunk * sizeof (struct gomp_work_share)); + ws->next_alloc = team->work_shares[0].next_alloc; + team->work_shares[0].next_alloc = ws; + team->work_share_list_alloc = &ws[1]; +@@ -175,7 +175,7 @@ gomp_work_share_start (bool ordered) + /* Work sharing constructs can be orphaned. */ + if (team == NULL) + { +- ws = gomp_malloc (sizeof (*ws)); ++ ws = gomp_malloc_cleared (sizeof (*ws)); + gomp_init_work_share (ws, ordered, 1); + thr->ts.work_share = ws; + return ws; +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch b/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch new file mode 100644 index 0000000000..b13fd88cb2 --- /dev/null +++ b/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch @@ -0,0 +1,43 @@ +From 266f288900a364912d011fe5f4d29c5cf04c8a85 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Wed, 5 Aug 2015 23:36:17 +0100 +Subject: [PATCH 09/22] Build EXTRA_GNATTOOLS for Ada + +--- + gnattools/Makefile.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gnattools/Makefile.in b/gnattools/Makefile.in +index 423cc6e..aaee42f 100644 +--- a/gnattools/Makefile.in ++++ b/gnattools/Makefile.in +@@ -193,7 +193,7 @@ gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib-rts + ../../gnatmake$(exeext) ../../gnatlink$(exeext) + # gnattools2 + $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ +- $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools ++ $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools $(EXTRA_GNATTOOLS) + + # gnatmake/link can be built with recent gnatmake/link if they are available. + # This is especially convenient for building cross tools or for rebuilding +@@ -205,7 +205,7 @@ regnattools: $(GCC_DIR)/stamp-gnatlib-rts + gnatmake-re gnatlink-re + # gnattools2 + $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ +- $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools ++ $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools $(EXTRA_GNATTOOLS) + + gnattools-cross: $(GCC_DIR)/stamp-tools + # gnattools1-re +@@ -214,7 +214,7 @@ gnattools-cross: $(GCC_DIR)/stamp-tools + gnatmake-re gnatlink-re + # gnattools2 + $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ +- $(TOOLS_FLAGS_TO_PASS_CROSS) common-tools ++ $(TOOLS_FLAGS_TO_PASS_CROSS) common-tools $(EXTRA_GNATTOOLS) + # Rename cross tools to where the GCC makefile wants them when + # installing. FIXME: installation should be done elsewhere. + if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \ +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch b/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch new file mode 100644 index 0000000000..e44a820536 --- /dev/null +++ b/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch @@ -0,0 +1,41 @@ +From 4b42253739b297be7568a69674867d04a16668e7 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Wed, 5 Aug 2015 23:36:19 +0100 +Subject: [PATCH 10/22] Prettify linking -no-undefined + +It might be better to put this change in a +conditional block for Windows only? +--- + libgfortran/Makefile.am | 2 +- + libgfortran/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am +index 0e816ac..0477605 100644 +--- a/libgfortran/Makefile.am ++++ b/libgfortran/Makefile.am +@@ -44,7 +44,7 @@ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + cafexeclib_LTLIBRARIES = libcaf_single.la + cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) + libcaf_single_la_SOURCES = caf/single.c +-libcaf_single_la_LDFLAGS = -static ++libcaf_single_la_LDFLAGS = -static -no-undefined + libcaf_single_la_DEPENDENCIES = caf/libcaf.h + libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) + +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in +index ab71b38..77374d4 100644 +--- a/libgfortran/Makefile.in ++++ b/libgfortran/Makefile.in +@@ -605,7 +605,7 @@ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + cafexeclib_LTLIBRARIES = libcaf_single.la + cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) + libcaf_single_la_SOURCES = caf/single.c +-libcaf_single_la_LDFLAGS = -static ++libcaf_single_la_LDFLAGS = -static -no-undefined + libcaf_single_la_DEPENDENCIES = caf/libcaf.h + libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) + @IEEE_SUPPORT_TRUE@fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch b/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch new file mode 100644 index 0000000000..06d8b1cffa --- /dev/null +++ b/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch @@ -0,0 +1,41 @@ +From 3bae5991f5eee5a4c8f2ebf466dbffe95ce466b7 Mon Sep 17 00:00:00 2001 +From: Erik van Pienbroek +Date: Wed, 5 Aug 2015 23:36:21 +0100 +Subject: [PATCH 11/22] gcc: make xmmintrin header cplusplus compatible + [deprecated] + +Deprecated as-per: +http://marc.info/?l=fedora-extras-commits&m=138946782004553&w=2 +--- + gcc/config/i386/xmmintrin.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gcc/config/i386/xmmintrin.h b/gcc/config/i386/xmmintrin.h +index 9cd3fa7..9334f27 100644 +--- a/gcc/config/i386/xmmintrin.h ++++ b/gcc/config/i386/xmmintrin.h +@@ -64,6 +64,10 @@ _mm_prefetch (const void *__P, enum _mm_hint __I) + #define __DISABLE_SSE__ + #endif /* __SSE__ */ + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + /* The Intel API is flexible enough that we must allow aliasing with other + vector types, and their scalar components. */ + typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); +@@ -1245,6 +1249,10 @@ do { \ + (row3) = __builtin_ia32_movhlps (__t3, __t2); \ + } while (0) + ++#ifdef __cplusplus ++} ++#endif ++ + /* For backward source compatibility. */ + # include + +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch b/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch new file mode 100644 index 0000000000..99d0c23db1 --- /dev/null +++ b/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch @@ -0,0 +1,61 @@ +From b70fc022cae3efec16efb2b46a0440d3e6dd3bdc Mon Sep 17 00:00:00 2001 +From: Matt Breedlove +Date: Wed, 5 Aug 2015 23:36:22 +0100 +Subject: [PATCH 12/22] Work around {un-,too-late-}resolved __EH_FRAME_BEGIN__ + +Here's the dwarf2 patch I'm using. With the change to checking +__LIBGCC_EH_FRAME_SECTION_NAME__, an undefined reference to +__EH_FRAME_BEGIN__ gets emitted within __main.o. The actual symbol +for it is defined within cygming-crtbegin.c (crtbegin.o) which is +listed before __main.o when linking libgcc leaving the undefined +reference unresolved. This restores behavior to the 4.9 branch only +for this specific instance (confirmed by comparing pre-processed +output). Will update with bugtraq info. + +Relevant references: + +https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00409.html +http://gcc.gcc.gnu.narkive.com/RMY4RcbE/asm-output-section-name-cleanup-patch-problem + +Posted to mingw-w64 ML: + +https://sourceforge.net/p/mingw-w64/mailman/message/34101954/ +https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01212.html +--- + libgcc/libgcc2.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c +index c737620..e5ab209 100644 +--- a/libgcc/libgcc2.c ++++ b/libgcc/libgcc2.c +@@ -2211,7 +2211,7 @@ TRANSFER_FROM_TRAMPOLINE + /* Some ELF crosses use crtstuff.c to provide __CTOR_LIST__, but use this + code to run constructors. In that case, we need to handle EH here, too. */ + +-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__ ++#ifdef EH_FRAME_SECTION_NAME + #include "unwind-dw2-fde.h" + extern unsigned char __EH_FRAME_BEGIN__[]; + #endif +@@ -2231,7 +2231,7 @@ __do_global_dtors (void) + (*(p-1)) (); + } + #endif +-#if defined (__LIBGCC_EH_FRAME_SECTION_NAME__) && !defined (HAS_INIT_SECTION) ++#if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION) + { + static int completed = 0; + if (! completed) +@@ -2250,7 +2250,7 @@ __do_global_dtors (void) + void + __do_global_ctors (void) + { +-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__ ++#ifdef EH_FRAME_SECTION_NAME + { + static struct object object; + __register_frame_info (__EH_FRAME_BEGIN__, &object); +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch b/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch new file mode 100644 index 0000000000..e07fc780d7 --- /dev/null +++ b/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch @@ -0,0 +1,154 @@ +From f62203be0f878559bf0ce423d38ed174f23779fa Mon Sep 17 00:00:00 2001 +From: Martin Richter +Date: Wed, 5 Aug 2015 23:36:25 +0100 +Subject: [PATCH 13/22] Fix using large PCH + +The following patch fixes segfault when gt_pch_use_address +fails (returns -1). fatal_error now correctly shows an error +message and terminates the program. +I have basicly only reordered reads, and placed them after +the file mapping itself. Global pointers are changed only +after gt_pch_use_address succeeds, so in case of failure +they still contain valid addresses. + +This patch is meant for the master branch. However, it +should not be hard to modify it for others. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940 +https://sourceforge.net/p/mingw-w64/bugs/382/ +--- + gcc/config/i386/host-mingw32.c | 10 ++------- + gcc/ggc-common.c | 51 +++++++++++++++++++++++++++++++++--------- + 2 files changed, 42 insertions(+), 19 deletions(-) + +diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c +index aa17378..631d9c4 100644 +--- a/gcc/config/i386/host-mingw32.c ++++ b/gcc/config/i386/host-mingw32.c +@@ -42,9 +42,6 @@ static size_t mingw32_gt_pch_alloc_granularity (void); + + static inline void w32_error(const char*, const char*, int, const char*); + +-/* FIXME: Is this big enough? */ +-static const size_t pch_VA_max_size = 128 * 1024 * 1024; +- + /* Granularity for reserving address space. */ + static size_t va_granularity = 0x10000; + +@@ -86,9 +83,6 @@ static void * + mingw32_gt_pch_get_address (size_t size, int) + { + void* res; +- size = (size + va_granularity - 1) & ~(va_granularity - 1); +- if (size > pch_VA_max_size) +- return NULL; + + /* FIXME: We let system determine base by setting first arg to NULL. + Allocating at top of available address space avoids unnecessary +@@ -98,7 +92,7 @@ mingw32_gt_pch_get_address (size_t size, int) + If we allocate at bottom we need to reserve the address as early + as possible and at the same point in each invocation. */ + +- res = VirtualAlloc (NULL, pch_VA_max_size, ++ res = VirtualAlloc (NULL, size, + MEM_RESERVE | MEM_TOP_DOWN, + PAGE_NOACCESS); + if (!res) +@@ -148,7 +142,7 @@ mingw32_gt_pch_use_address (void *addr, size_t size, int fd, + + /* Offset must be also be a multiple of allocation granularity for + this to work. We can't change the offset. */ +- if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size) ++ if ((offset & (va_granularity - 1)) != 0) + return -1; + + +diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c +index 5096837..f741f2c 100644 +--- a/gcc/ggc-common.c ++++ b/gcc/ggc-common.c +@@ -599,7 +599,9 @@ gt_pch_restore (FILE *f) + size_t i; + struct mmap_info mmi; + int result; +- ++ long pch_tabs_off; ++ long pch_data_off; ++ + /* Delete any deletable objects. This makes ggc_pch_read much + faster, as it can be sure that no GCable objects remain other + than the ones just read in. */ +@@ -607,20 +609,24 @@ gt_pch_restore (FILE *f) + for (rti = *rt; rti->base != NULL; rti++) + memset (rti->base, 0, rti->stride); + +- /* Read in all the scalar variables. */ ++ /* We need to read tables after mapping, or fatal_error will ++ segfault when gt_pch_use_address returns -1. Skip them for now. */ ++ pch_tabs_off = ftell(f); ++ ++ /* Skip all the scalar variables. */ + for (rt = gt_pch_scalar_rtab; *rt; rt++) + for (rti = *rt; rti->base != NULL; rti++) +- if (fread (rti->base, rti->stride, 1, f) != 1) +- fatal_error (input_location, "can%'t read PCH file: %m"); ++ if (fseek (f, rti->stride, SEEK_CUR) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); + +- /* Read in all the global pointers, in 6 easy loops. */ ++ /* Skip all the global pointers. */ + for (rt = gt_ggc_rtab; *rt; rt++) + for (rti = *rt; rti->base != NULL; rti++) + for (i = 0; i < rti->nelt; i++) +- if (fread ((char *)rti->base + rti->stride * i, +- sizeof (void *), 1, f) != 1) +- fatal_error (input_location, "can%'t read PCH file: %m"); +- ++ if (fseek (f, sizeof (void *), SEEK_CUR) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ /* mmi still has to be read now. */ + if (fread (&mmi, sizeof (mmi), 1, f) != 1) + fatal_error (input_location, "can%'t read PCH file: %m"); + +@@ -631,12 +637,35 @@ gt_pch_restore (FILE *f) + if (result == 0) + { + if (fseek (f, mmi.offset, SEEK_SET) != 0 +- || fread (mmi.preferred_base, mmi.size, 1, f) != 1) +- fatal_error (input_location, "can%'t read PCH file: %m"); ++ || fread (mmi.preferred_base, mmi.size, 1, f) != 1) ++ fatal_error (input_location, "can%'t read PCH file: %m"); + } + else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0) + fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ /* File mapping done, read tables now. */ ++ pch_data_off = ftell(f); ++ ++ if (fseek (f, pch_tabs_off, SEEK_SET) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); + ++ /* Read in all the scalar variables. */ ++ for (rt = gt_pch_scalar_rtab; *rt; rt++) ++ for (rti = *rt; rti->base != NULL; rti++) ++ if (fread (rti->base, rti->stride, 1, f) != 1) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ /* Read in all the global pointers, in 6 easy loops. */ ++ for (rt = gt_ggc_rtab; *rt; rt++) ++ for (rti = *rt; rti->base != NULL; rti++) ++ for (i = 0; i < rti->nelt; i++) ++ if (fread ((char *)rti->base + rti->stride * i, ++ sizeof (void *), 1, f) != 1) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ if (fseek (f, pch_data_off, SEEK_SET) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ + ggc_pch_read (f, mmi.preferred_base); + + gt_pch_restore_stringpool (); +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch b/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch new file mode 100644 index 0000000000..3f8a163e19 --- /dev/null +++ b/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch @@ -0,0 +1,39 @@ +From 53c92e4aa8cca14ecf849c6a69cf12fdabd716c6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=BCrgen=20Pfeifer?= +Date: Wed, 5 Aug 2015 23:36:27 +0100 +Subject: [PATCH 14/22] Enable shared gnat implib + +Provide GNAT runtime import libraries to +allow to link against shared runtime + +Original commit: +https://github.com/Alexpux/MINGW-packages/commit/51b4eb3b702fdb38df0460180c2f8209a686aaec +--- + gcc/ada/gcc-interface/Makefile.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in +index 1d03f86..dd4453c 100644 +--- a/gcc/ada/gcc-interface/Makefile.in ++++ b/gcc/ada/gcc-interface/Makefile.in +@@ -2886,13 +2886,16 @@ gnatlib-shared-win32: + $(PICFLAG_FOR_TARGET) \ + -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ + $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ +- $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) ++ $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ ++ -Wl,-out-implib,libgnat$(hyphen)$(LIBRARY_VERSION).dll.a \ ++ $(MISCLIB) + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \ + $(PICFLAG_FOR_TARGET) \ + -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ + $(GNATRTL_TASKING_OBJS) \ + $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ ++ -Wl,-out-implib,libgnarl$(hyphen)$(LIBRARY_VERSION).dll.a \ + $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) + + gnatlib-shared-darwin: +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch b/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch new file mode 100644 index 0000000000..3a18d641b3 --- /dev/null +++ b/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch @@ -0,0 +1,112 @@ +From 5e266f42509c70dc8a04a3bde4200af97013a1d0 Mon Sep 17 00:00:00 2001 +From: LRN +Date: Wed, 5 Aug 2015 23:36:29 +0100 +Subject: [PATCH 15/22] MinGW-w64: Enable libitm + +--- + libitm/Makefile.am | 2 +- + libitm/Makefile.in | 3 ++- + libitm/configure | 17 +++++++++++++++++ + libitm/configure.ac | 1 + + libitm/configure.tgt | 4 ++++ + 5 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/libitm/Makefile.am b/libitm/Makefile.am +index 1dce82d..0ea39f2 100644 +--- a/libitm/Makefile.am ++++ b/libitm/Makefile.am +@@ -54,7 +54,7 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) $(lt_host_flags) + + libitm_la_SOURCES = \ + aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \ +diff --git a/libitm/Makefile.in b/libitm/Makefile.in +index 138eeb1..a25c6d2 100644 +--- a/libitm/Makefile.in ++++ b/libitm/Makefile.in +@@ -307,6 +307,7 @@ libtool_VERSION = @libtool_VERSION@ + link_itm = @link_itm@ + localedir = @localedir@ + localstatedir = @localstatedir@ ++lt_host_flags = @lt_host_flags@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + multi_basedir = @multi_basedir@ +@@ -357,7 +358,7 @@ libitm_version_info = -version-info $(libtool_VERSION) + # want or need libstdc++. + libitm_la_DEPENDENCIES = $(libitm_version_dep) + libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS) +-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) ++libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) $(lt_host_flags) + libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \ + barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \ + retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \ +diff --git a/libitm/configure b/libitm/configure +index 55332bb..8f19e0a 100644 +--- a/libitm/configure ++++ b/libitm/configure +@@ -630,6 +630,7 @@ MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE + enable_static + enable_shared ++lt_host_flags + CXXCPP + CPP + OTOOL64 +@@ -15149,6 +15150,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Only expand once: + + ++case $host in ++ *-cygwin* | *-mingw*) ++ # 'host' will be top-level target in the case of a target lib, ++ # we must compare to with_cross_host to decide if this is a native ++ # or cross-compiler and select where to install dlls appropriately. ++ if test -n "$with_cross_host" && ++ test x"$with_cross_host" != x"no"; then ++ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; ++ else ++ lt_host_flags='-no-undefined -bindir "$(bindir)"'; ++ fi ++ ;; ++ *) ++ lt_host_flags= ++ ;; ++esac + + + +diff --git a/libitm/configure.ac b/libitm/configure.ac +index 2d99b11..6b8ad09 100644 +--- a/libitm/configure.ac ++++ b/libitm/configure.ac +@@ -147,6 +147,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes") + + # Configure libtool + AM_PROG_LIBTOOL ++ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) + +diff --git a/libitm/configure.tgt b/libitm/configure.tgt +index 99da73a..e50b90f 100644 +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -145,6 +145,10 @@ case "${target}" in + # POSIX system. The OS is supported. + ;; + ++ *-*-mingw*) ++ # POSIX system. The OS is supported. ++ ;; ++ + *) # Non-POSIX, or embedded system + UNSUPPORTED=1 + ;; +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch b/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch new file mode 100644 index 0000000000..33b7713b2d --- /dev/null +++ b/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch @@ -0,0 +1,25 @@ +From 52acb6abae02ed86e8181e62bd8648087b4a18a5 Mon Sep 17 00:00:00 2001 +From: LRN +Date: Wed, 5 Aug 2015 23:36:31 +0100 +Subject: [PATCH 16/22] MinGW-w64: Enable libsanitizer + +--- + libsanitizer/configure.tgt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt +index ac0eb7a..a7f7356 100644 +--- a/libsanitizer/configure.tgt ++++ b/libsanitizer/configure.tgt +@@ -36,6 +36,8 @@ case "${target}" in + ;; + aarch64*-*-linux*) + ;; ++ *-*-mingw*) ++ ;; + x86_64-*-darwin[1]* | i?86-*-darwin[1]*) + TSAN_SUPPORTED=no + ;; +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch b/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch new file mode 100644 index 0000000000..e55cf7949b --- /dev/null +++ b/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch @@ -0,0 +1,39 @@ +From 083731577ddd8e4544fb0cc091b472ac73607a02 Mon Sep 17 00:00:00 2001 +From: LRN +Date: Wed, 5 Aug 2015 23:36:33 +0100 +Subject: [PATCH 17/22] MinGW-w64: Enable shared gnat + +--- + libada/configure | 2 +- + libada/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libada/configure b/libada/configure +index 2296096..ba488e7 100755 +--- a/libada/configure ++++ b/libada/configure +@@ -2956,7 +2956,7 @@ fi + + + # Determine what to build for 'gnatlib' +-if test $build = $target \ ++if test $host = $target \ + && test ${enable_shared} = yes ; then + # Note that build=target is almost certainly the wrong test; FIXME + default_gnatlib_target="gnatlib-shared" +diff --git a/libada/configure.ac b/libada/configure.ac +index d11bfad..d37a771 100644 +--- a/libada/configure.ac ++++ b/libada/configure.ac +@@ -127,7 +127,7 @@ AC_PROG_AWK + AC_PROG_LN_S + + # Determine what to build for 'gnatlib' +-if test $build = $target \ ++if test $host = $target \ + && test ${enable_shared} = yes ; then + # Note that build=target is almost certainly the wrong test; FIXME + default_gnatlib_target="gnatlib-shared" +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch b/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch new file mode 100644 index 0000000000..fde6e98f81 --- /dev/null +++ b/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch @@ -0,0 +1,179 @@ +From 6e0d53d3f927ae3c30da2d14a45a49a12abfaa51 Mon Sep 17 00:00:00 2001 +From: LRN +Date: Wed, 5 Aug 2015 23:36:35 +0100 +Subject: [PATCH 18/22] MinGW-w64: No -fpic in sanitizer + +--- + libsanitizer/asan/Makefile.am | 2 +- + libsanitizer/asan/Makefile.in | 2 +- + libsanitizer/interception/Makefile.am | 2 +- + libsanitizer/interception/Makefile.in | 2 +- + libsanitizer/lsan/Makefile.am | 2 +- + libsanitizer/lsan/Makefile.in | 2 +- + libsanitizer/sanitizer_common/Makefile.am | 2 +- + libsanitizer/sanitizer_common/Makefile.in | 2 +- + libsanitizer/tsan/Makefile.am | 2 +- + libsanitizer/tsan/Makefile.in | 2 +- + libsanitizer/ubsan/Makefile.am | 2 +- + libsanitizer/ubsan/Makefile.in | 2 +- + 12 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am +index 54c74ce..1dc515e 100644 +--- a/libsanitizer/asan/Makefile.am ++++ b/libsanitizer/asan/Makefile.am +@@ -7,7 +7,7 @@ DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D + if USING_MAC_INTERPOSE + DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT + endif +-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf ++AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf + AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AM_CXXFLAGS += -std=gnu++11 + ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config +diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in +index edbed4d..690d41a 100644 +--- a/libsanitizer/asan/Makefile.in ++++ b/libsanitizer/asan/Makefile.in +@@ -297,7 +297,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) + # May be used by toolexeclibdir. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ +- -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ ++ -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti \ + -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ + -Wno-variadic-macros -fno-ipa-icf \ + $(LIBSTDCXX_RAW_CXX_CXXFLAGS) -std=gnu++11 +diff --git a/libsanitizer/interception/Makefile.am b/libsanitizer/interception/Makefile.am +index 4fb69a9..6df9645 100644 +--- a/libsanitizer/interception/Makefile.am ++++ b/libsanitizer/interception/Makefile.am +@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + + DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS +-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros ++AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros + AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AM_CXXFLAGS += -std=gnu++11 + ACLOCAL_AMFLAGS = -I m4 +diff --git a/libsanitizer/interception/Makefile.in b/libsanitizer/interception/Makefile.in +index 3dfa774..422593f 100644 +--- a/libsanitizer/interception/Makefile.in ++++ b/libsanitizer/interception/Makefile.in +@@ -247,7 +247,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) + # May be used by toolexeclibdir. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ +- -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ ++ -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti \ + -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ + -Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \ + -std=gnu++11 +diff --git a/libsanitizer/lsan/Makefile.am b/libsanitizer/lsan/Makefile.am +index 03ec4fe..55a1d33 100644 +--- a/libsanitizer/lsan/Makefile.am ++++ b/libsanitizer/lsan/Makefile.am +@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + + DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS +-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros ++AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros + AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AM_CXXFLAGS += -std=gnu++11 + ACLOCAL_AMFLAGS = -I m4 +diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in +index b02c373..bb0475f 100644 +--- a/libsanitizer/lsan/Makefile.in ++++ b/libsanitizer/lsan/Makefile.in +@@ -288,7 +288,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) + # May be used by toolexeclibdir. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ +- -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ ++ -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti \ + -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ + -Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \ + -std=gnu++11 +diff --git a/libsanitizer/sanitizer_common/Makefile.am b/libsanitizer/sanitizer_common/Makefile.am +index d541717..7b302b3 100644 +--- a/libsanitizer/sanitizer_common/Makefile.am ++++ b/libsanitizer/sanitizer_common/Makefile.am +@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -isystem $(top_srcdir)/include/system + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + + DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS @RPC_DEFS@ +-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros ++AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros + AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AM_CXXFLAGS += -std=gnu++11 + if LIBBACKTRACE_SUPPORTED +diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in +index 6614524..d2fd290 100644 +--- a/libsanitizer/sanitizer_common/Makefile.in ++++ b/libsanitizer/sanitizer_common/Makefile.in +@@ -275,7 +275,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -isystem $(top_srcdir)/include/system + # May be used by toolexeclibdir. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ +- -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ ++ -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti \ + -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ + -Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \ + -std=gnu++11 $(am__append_1) +diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am +index abfafb7..5e8a6ba 100644 +--- a/libsanitizer/tsan/Makefile.am ++++ b/libsanitizer/tsan/Makefile.am +@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + + DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS +-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros ++AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros + AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AM_CXXFLAGS += -std=gnu++11 + ACLOCAL_AMFLAGS = -I m4 +diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in +index 8b20d28..ec5243d 100644 +--- a/libsanitizer/tsan/Makefile.in ++++ b/libsanitizer/tsan/Makefile.in +@@ -301,7 +301,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include + # May be used by toolexeclibdir. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ +- -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ ++ -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti \ + -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ + -Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \ + -std=gnu++11 +diff --git a/libsanitizer/ubsan/Makefile.am b/libsanitizer/ubsan/Makefile.am +index 12d1ffa..83b6b5c 100644 +--- a/libsanitizer/ubsan/Makefile.am ++++ b/libsanitizer/ubsan/Makefile.am +@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + + DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DPIC +-AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros ++AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros + AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AM_CXXFLAGS += -std=gnu++11 + ACLOCAL_AMFLAGS = -I m4 +diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in +index 64aad19..f5748b9 100644 +--- a/libsanitizer/ubsan/Makefile.in ++++ b/libsanitizer/ubsan/Makefile.in +@@ -284,7 +284,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include + # May be used by toolexeclibdir. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) + AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ +- -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ ++ -Wno-long-long -fno-builtin -fno-exceptions -fno-rtti \ + -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ + -Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \ + -std=gnu++11 +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch b/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch new file mode 100644 index 0000000000..2e715ac9f3 --- /dev/null +++ b/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch @@ -0,0 +1,141 @@ +From 433fc9e4c5d5ce2bd6e9c3ec3a9c815b3657b499 Mon Sep 17 00:00:00 2001 +From: LRN +Date: Wed, 5 Aug 2015 23:36:37 +0100 +Subject: [PATCH 19/22] MinGW-w64: Port sanitizer + +--- + libsanitizer/asan/asan_win.cc | 3 --- + libsanitizer/configure | 30 +++++++++++++++++++++++-- + libsanitizer/configure.ac | 5 +++-- + libsanitizer/sanitizer_common/sanitizer_libc.cc | 4 ++++ + libsanitizer/ubsan/ubsan_value.h | 2 +- + 5 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/libsanitizer/asan/asan_win.cc b/libsanitizer/asan/asan_win.cc +index b002876..7b93331 100644 +--- a/libsanitizer/asan/asan_win.cc ++++ b/libsanitizer/asan/asan_win.cc +@@ -63,9 +63,6 @@ void MaybeReexec() { + } + + void *AsanDoesNotSupportStaticLinkage() { +-#if defined(_DEBUG) +-#error Please build the runtime with a non-debug CRT: /MD or /MT +-#endif + return 0; + } + +diff --git a/libsanitizer/configure b/libsanitizer/configure +index 809f0d7..75fbc0e 100755 +--- a/libsanitizer/configure ++++ b/libsanitizer/configure +@@ -628,6 +628,7 @@ TSAN_SUPPORTED_FALSE + TSAN_SUPPORTED_TRUE + enable_static + enable_shared ++lt_host_flags + CXXCPP + OTOOL64 + OTOOL +@@ -15387,6 +15388,31 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++ ++ ++case $host in ++ *-cygwin* | *-mingw*) ++ # 'host' will be top-level target in the case of a target lib, ++ # we must compare to with_cross_host to decide if this is a native ++ # or cross-compiler and select where to install dlls appropriately. ++ if test -n "$with_cross_host" && ++ test x"$with_cross_host" != x"no"; then ++ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; ++ else ++ lt_host_flags='-no-undefined -bindir "$(bindir)"'; ++ fi ++ ;; ++ *) ++ lt_host_flags= ++ ;; ++esac ++ ++ ++ ++ ++ ++ ++ + for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -15514,10 +15540,10 @@ done + + + # Common libraries that we need to link against for all sanitizer libs. +-link_sanitizer_common='-lpthread -ldl -lm' ++link_sanitizer_common="-lpthread -lm $lt_host_flags" + + # Set up the set of additional libraries that we need to link against for libasan. +-link_libasan=$link_sanitizer_common ++link_libasan="$link_sanitizer_common -ldbghelp" + + + # Set up the set of additional libraries that we need to link against for libtsan. +diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac +index 11e2d99..18967fe 100644 +--- a/libsanitizer/configure.ac ++++ b/libsanitizer/configure.ac +@@ -74,6 +74,7 @@ case "$AWK" in + "") AC_MSG_ERROR([can't build without awk]) ;; + esac + ++ACX_LT_HOST_FLAGS + AC_SUBST(enable_shared) + AC_SUBST(enable_static) + +@@ -96,10 +97,10 @@ AM_CONDITIONAL(LSAN_SUPPORTED, [test "x$LSAN_SUPPORTED" = "xyes"]) + AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime) + + # Common libraries that we need to link against for all sanitizer libs. +-link_sanitizer_common='-lpthread -ldl -lm' ++link_sanitizer_common="-lpthread -lm $lt_host_flags" + + # Set up the set of additional libraries that we need to link against for libasan. +-link_libasan=$link_sanitizer_common ++link_libasan="$link_sanitizer_common -ldbghelp" + AC_SUBST(link_libasan) + + # Set up the set of additional libraries that we need to link against for libtsan. +diff --git a/libsanitizer/sanitizer_common/sanitizer_libc.cc b/libsanitizer/sanitizer_common/sanitizer_libc.cc +index c13a66d..3ad62d9 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_libc.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_libc.cc +@@ -18,7 +18,11 @@ namespace __sanitizer { + static inline void break_optimization(void *arg) { + #if _MSC_VER + // FIXME: make sure this is actually enough. ++# ifdef __GNUC__ ++ __asm__ __volatile__("" : : "r" (arg) : "memory"); ++# else + __asm; ++# endif + #else + __asm__ __volatile__("" : : "r" (arg) : "memory"); + #endif +diff --git a/libsanitizer/ubsan/ubsan_value.h b/libsanitizer/ubsan/ubsan_value.h +index abfd31f..e1fa725 100644 +--- a/libsanitizer/ubsan/ubsan_value.h ++++ b/libsanitizer/ubsan/ubsan_value.h +@@ -14,7 +14,7 @@ + + // For now, only support Linux, FreeBSD and Darwin. Other platforms should + // be easy to add, and probably work as-is. +-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__APPLE__) ++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(_WIN32) + #error "UBSan not supported for this platform!" + #endif + +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch b/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch new file mode 100644 index 0000000000..4d02b95138 --- /dev/null +++ b/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch @@ -0,0 +1,84 @@ +From a1bb29d7af308c59b1715406465fee95c0d52012 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:39 +0100 +Subject: [PATCH 20/22] Force linking to libgcc_s_dw2-1.dll [deprecated] + +.. by adding to specs: +*libgcc +--undefined=___deregister_frame_info +--undefined=___register_frame_info + +These flags get added twice to the ld command line +because of %G appearing twice in: +*link_gcc_c_sequence +%G %L %G +so this should be tidied up really. + +20150805 update: + +Looking at this again, it seems that the +SHARED_LIBGCC_UNDEFS_SPEC stuff added in commit 7d804f +does the same thing, so my hack may not be needed. It +would appear that for some time, DWARF2_UNWIND_INFO +was not defined, but it's OK now. Latest specs have: +*shared_libgcc_undefs: +%{shared-libgcc: -u ___register_frame_info -u ___deregister_frame_info} +--- + gcc/config/i386/cygwin.h | 6 +++++- + gcc/config/i386/mingw32.h | 8 ++++++-- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h +index 2186937..7f71ccc 100644 +--- a/gcc/config/i386/cygwin.h ++++ b/gcc/config/i386/cygwin.h +@@ -55,6 +55,10 @@ along with GCC; see the file COPYING3. If not see + fvtable-verify=std:vtv_end.o%s} \ + crtend.o%s" + ++/* There is a bug when building i686 dw-2 exceptions ++ where gcc_s gets stripped which this works around */ ++#define PREVENT_STRIP_REG_FRAME_INFO "--undefined=___deregister_frame_info --undefined=___register_frame_info" ++ + /* Normally, -lgcc is not needed since everything in it is in the DLL, but we + want to allow things to be added to it when installing new versions of + GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled +@@ -65,7 +69,7 @@ along with GCC; see the file COPYING3. If not see + %{static|static-libgcc:-lgcc -lgcc_eh} \ + %{!static: \ + %{!static-libgcc: \ +- -lgcc_s -lgcc \ ++ -lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc \ + } \ + } " + #else +diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h +index 47e12e7..9afe794 100644 +--- a/gcc/config/i386/mingw32.h ++++ b/gcc/config/i386/mingw32.h +@@ -120,6 +120,10 @@ along with GCC; see the file COPYING3. If not see + %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \ + %(shared_libgcc_undefs)" + ++/* There is a bug when building i686 dw-2 exceptions ++ where gcc_s gets stripped which this works around */ ++#define PREVENT_STRIP_REG_FRAME_INFO "--undefined=___deregister_frame_info --undefined=___register_frame_info" ++ + /* Include in the mingw32 libraries with libgcc */ + #ifdef ENABLE_SHARED_LIBGCC + #define SHARED_LIBGCC_SPEC " \ +@@ -128,9 +132,9 @@ along with GCC; see the file COPYING3. If not see + %{!static-libgcc: \ + %{!shared: \ + %{!shared-libgcc:-lgcc -lgcc_eh} \ +- %{shared-libgcc:-lgcc_s -lgcc} \ ++ %{shared-libgcc:-lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc} \ + } \ +- %{shared:-lgcc_s -lgcc} \ ++ %{shared:-lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc} \ + } \ + } " + #else +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch b/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch new file mode 100644 index 0000000000..a5e947ffdb --- /dev/null +++ b/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch @@ -0,0 +1,30 @@ +From d8338b5d84c7de1643d76301c1d73ee52b476ba8 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 8 Aug 2015 16:46:03 +0100 +Subject: [PATCH 21/22] MinGW-w64: Disable libsanitizer + +[20150808] Causes a build failure on gcc-5-branch +--- + libsanitizer/configure.tgt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt +index a7f7356..a400893 100644 +--- a/libsanitizer/configure.tgt ++++ b/libsanitizer/configure.tgt +@@ -36,8 +36,10 @@ case "${target}" in + ;; + aarch64*-*-linux*) + ;; +- *-*-mingw*) +- ;; ++# [20150808] :: Causes a build failure on gcc-5-branch: ++# mingw-w64-gcc-git\src\build-i686-w64-mingw32\i686-w64-mingw32\libsanitizer\asan/../../../../gcc/libsanitizer/asan/asan_interceptors.cc:722: undefined reference to `_except_handler4_common' ++# *-*-mingw*) ++# ;; + x86_64-*-darwin[1]* | i?86-*-darwin[1]*) + TSAN_SUPPORTED=no + ;; +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch b/mingw-w64-gcc-git/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch new file mode 100644 index 0000000000..efb3fc0340 --- /dev/null +++ b/mingw-w64-gcc-git/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch @@ -0,0 +1,112 @@ +From 38274147bb2a3fa481d0a1853c185c2337550260 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 17 Aug 2015 22:57:46 +0100 +Subject: [PATCH 22/22] clone_function_name_1: Retain any stdcall suffix + +Previously, clone_function_name_1 would add a suffix after +any existing stdcall suffix, for example ipa-split.c would +clone test@4 as test@4.part.0. + +Later, i386_pe_strip_name_encoding_full would come along +and strip off everything from the last @ onwards which had +the effect of generating incorrect section names which +would then fall over with errors such as: + +error: void test() causes a section type conflict with \ + void test@4.part.0() + +The following testcase, reduced from Firefox can be used +to reproduce this. + +test.ii: +class ClassA { +public: + virtual int __attribute__((__stdcall__)) Dispatch() = 0; +}; +class ClassB { +public: + ClassA* __attribute__((__stdcall__)) operator->(); +}; +class ClassC : ClassA { + int *some_int_ptr_variable; + int __attribute__((__stdcall__)) Dispatch() { + return some_int_ptr_variable + ? 42 + : m_ClassInstanceB->Dispatch(); + } + ClassB m_ClassInstanceB; +}; +ClassC ClassInstanceC; + +Compile for i686-w64-mingw32 with: +cc1plus -O -fpartial-inlining -fdevirtualize \ + -fdevirtualize-speculatively test.ii + +Outputs: +test.ii: In member function 'virtual int ClassC::Dispatch()': +test.ii:11:36: error: virtual int ClassC::Dispatch() causes \ + a section type conflict with int ClassC::_ZN6ClassC8DispatchEv@4.part.0() + int __attribute__((CALLTYPE)) Dispatch() { + ^ +test.ii:11:36: note: \ + 'int ClassC::_ZN6ClassC8DispatchEv@4.part.0()' was declared here +--- + gcc/cgraphclones.c | 13 ++++++++++++- + gcc/defaults.h | 2 +- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c +index 9e9f1a0..69b8a91 100644 +--- a/gcc/cgraphclones.c ++++ b/gcc/cgraphclones.c +@@ -519,15 +519,24 @@ cgraph_node::create_clone (tree new_decl, gcov_type gcov_count, int freq, + static GTY(()) unsigned int clone_fn_id_num; + + /* Return a new assembler name for a clone with SUFFIX of a decl named +- NAME. */ ++ NAME. Final stdcall @N suffixes are maintained. */ + + tree + clone_function_name_1 (const char *name, const char *suffix) + { + size_t len = strlen (name); + char *tmp_name, *prefix; ++ char *at_suffix = NULL; + + prefix = XALLOCAVEC (char, len + strlen (suffix) + 2); ++ /* name + 1 to skip fastcall which begins with '@' */ ++ at_suffix = strchr (name + 1, '@'); ++ size_t at_suffix_len = 0; ++ if (at_suffix) ++ { ++ at_suffix_len = strlen (at_suffix); ++ len -= at_suffix_len; ++ } + memcpy (prefix, name, len); + strcpy (prefix + len + 1, suffix); + #ifndef NO_DOT_IN_LABEL +@@ -538,6 +547,8 @@ clone_function_name_1 (const char *name, const char *suffix) + prefix[len] = '_'; + #endif + ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix, clone_fn_id_num++); ++ if (at_suffix) ++ strcat (tmp_name, at_suffix); + return get_identifier (tmp_name); + } + +diff --git a/gcc/defaults.h b/gcc/defaults.h +index 9d38ba1..c34478a 100644 +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -51,7 +51,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + do { const char *const name_ = (NAME); \ + char *const output_ = (OUTPUT) = \ +- (char *) alloca (strlen (name_) + 32); \ ++ (char *) alloca (strlen (name_) + 35); \ + sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \ + } while (0) + #endif +-- +2.5.0 + diff --git a/mingw-w64-gcc-git/PKGBUILD b/mingw-w64-gcc-git/PKGBUILD new file mode 100644 index 0000000000..8e16bbc8f6 --- /dev/null +++ b/mingw-w64-gcc-git/PKGBUILD @@ -0,0 +1,455 @@ +# Maintainer: Alexey Pavlov +# Contributor: Alexey Borzenkov +# Contributor: Ray Donnelly +# Contributor: Renato Silva + +_realname=gcc +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libs-git" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran-git" + "${MINGW_PACKAGE_PREFIX}-${_realname}-fortran-git" + "${MINGW_PACKAGE_PREFIX}-${_realname}-ada-git" + "${MINGW_PACKAGE_PREFIX}-${_realname}-objc-git") +pkgver=r142868.30adea3 +pkgrel=1 +pkgdesc="GCC for the MinGW-w64" +arch=('any') +url="http://gcc.gnu.org" +license=('GPL' 'LGPL' 'FDL' 'custom') +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +makedepends=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-ada" + "${MINGW_PACKAGE_PREFIX}-binutils" + "${MINGW_PACKAGE_PREFIX}-crt" + "${MINGW_PACKAGE_PREFIX}-headers" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-isl" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-mpc" + "${MINGW_PACKAGE_PREFIX}-mpfr" + "${MINGW_PACKAGE_PREFIX}-windows-default-manifest" + "${MINGW_PACKAGE_PREFIX}-winpthreads" + "${MINGW_PACKAGE_PREFIX}-zlib") +#checkdepends=('dejagnu') +optdepends=() +options=('staticlibs' '!emptydirs' '!strip' 'debug') +#_branch=gcc-5-branch +_branch=master +if [ "${_branch}" = "master" ]; then + _realpkgver=6.0.0 +else + _realpkgver=5.2.1 +fi +source=("git://gcc.gnu.org/git/gcc.git#branch=${_branch}" + "0001-Relocate-libintl.patch" + "0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch" + "0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch" + "0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch" + "0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch" + "0006-Windows-Don-t-ignore-native-system-header-dir.patch" + "0007-master-Windows-New-feature-to-allow-overriding-lmsvcrt.patch" + "0007-gcc-5-branch-Windows-New-feature-to-allow-overriding-lmsvcrt.patch" + "0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch" + "0009-Build-EXTRA_GNATTOOLS-for-Ada.patch" + "0010-Prettify-linking-no-undefined.patch" + "0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch" + "0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch" + "0013-Fix-using-large-PCH.patch" + "0014-Enable-shared-gnat-implib.patch" + "0015-MinGW-w64-Enable-libitm.patch" + "0016-MinGW-w64-Enable-libsanitizer.patch" + "0017-MinGW-w64-Enable-shared-gnat.patch" + "0018-MinGW-w64-No-fpic-in-sanitizer.patch" + "0019-MinGW-w64-Port-sanitizer.patch" + "0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch" + "0021-MinGW-w64-Disable-libsanitizer.patch" + "0022-clone_function_name_1-Retain-any-stdcall-suffix.patch") +md5sums=('SKIP' + 'dd26ec3ea15d31c6f498c1176e3b5f3f' + '96d12a0805156b6a561c7b59d2531236' + 'f99dc355b4163c7a09ab15c3b7f02598' + '2b21960c7d9ea765d64043069a9a3fea' + '3a6ce6d6f427ce18cc55d5812dd51046' + 'f675f6022e60e8e982591439c7de76cb' + 'a886e4914107b5019ff5dbcc8456eef2' + 'ebb2dac7bae6e8f8076a61a0afed0c9d' + 'ba7fa43f4eacdf6c1ddd8afe927c3b4a' + '69823dfb44323debddb7e92ca4ba308e' + 'd543491fff1e6c8f39fb6976372c92f2' + '42f8997aef728de8a1525142658fe7da' + 'e10957bfa81d031170c46aa77285ed91' + 'f4d1e62c12002efda8c4eeba63c847e2' + '1e135b48b058d03800b7edb8abb15df1' + '24010af0744aa8788ca465272ccb0cfb' + 'e27b09a68d3f4a705595f4aeea4cf291' + '8e6e6984b85fd1926892638ba415edfd' + '4fba7f1a5c4c6e4a8ded450a277146b3' + '9d09fcca9ae013c8bbb8695a8b7704eb' + '4df51b31b322aa9609897a9aa870f54f' + 'd8301e8e667210c3d7ac09a0791c52d7' + '6d0a782eef0077ddbffd130f806529fa') + +_threads="posix" + +pkgver() { + cd "$_realname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${srcdir}/${_realname} + + git am "${srcdir}"/0001-Relocate-libintl.patch + git am "${srcdir}"/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch + git am "${srcdir}"/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch + git am "${srcdir}"/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch + git am "${srcdir}"/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch + git am "${srcdir}"/0006-Windows-Don-t-ignore-native-system-header-dir.patch + git am "${srcdir}"/0007-${_branch}-Windows-New-feature-to-allow-overriding-lmsvcrt.patch + git am "${srcdir}"/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch + git am "${srcdir}"/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch + git am "${srcdir}"/0010-Prettify-linking-no-undefined.patch + git am "${srcdir}"/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch + git am "${srcdir}"/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch + git am "${srcdir}"/0013-Fix-using-large-PCH.patch + git am "${srcdir}"/0014-Enable-shared-gnat-implib.patch + git am "${srcdir}"/0015-MinGW-w64-Enable-libitm.patch + git am "${srcdir}"/0016-MinGW-w64-Enable-libsanitizer.patch + git am "${srcdir}"/0017-MinGW-w64-Enable-shared-gnat.patch + git am "${srcdir}"/0018-MinGW-w64-No-fpic-in-sanitizer.patch + git am "${srcdir}"/0019-MinGW-w64-Port-sanitizer.patch + git am "${srcdir}"/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch + git am "${srcdir}"/0021-MinGW-w64-Disable-libsanitizer.patch + git am "${srcdir}"/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch + + # do not expect $prefix/mingw symlink - this should be superceded by + # 0006-Windows-Don-t-ignore-native-system-header-dir.patch .. but isn't! + sed -i 's/${prefix}\/mingw\//${prefix}\//g' configure + + # change hardcoded /mingw prefix to the real prefix .. isn't this rubbish? + # it might work at build time and could be important there but beyond that?! + local MINGW_NATIVE_PREFIX=$(cygpath -am ${MINGW_PREFIX}/${MINGW_CHOST}) + sed -i "s#\\/mingw\\/#${MINGW_NATIVE_PREFIX//\//\\/}\\/#g" gcc/config/i386/mingw32.h +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + case "${CARCH}" in + i686) + local _conf="--disable-sjlj-exceptions --with-dwarf2" + LDFLAGS+=" -Wl,--large-address-aware" + local _arch=i686 + ;; + + x86_64) + local _arch=x86-64 + local _conf="" + ;; + esac + + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --with-local-prefix=${MINGW_PREFIX}/local \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --with-native-system-header-dir=${MINGW_PREFIX}/${MINGW_CHOST}/include \ + --libexecdir=${MINGW_PREFIX}/lib \ + --with-gxx-include-dir=${MINGW_PREFIX}/include/c++/${_realpkgver} \ + --enable-bootstrap \ + --with-arch=${_arch} \ + --with-tune=generic \ + --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada \ + --enable-shared --enable-static \ + --enable-libatomic \ + --enable-threads=${_threads} \ + --enable-graphite \ + --enable-fully-dynamic-string \ + --enable-libstdcxx-time=yes \ + --disable-libstdcxx-pch \ + --disable-libstdcxx-debug \ + --enable-version-specific-runtime-libs \ + --disable-isl-version-check \ + --enable-lto \ + --enable-libgomp \ + --disable-multilib \ + --enable-checking=release \ + --disable-rpath \ + --disable-win32-registry \ + --disable-nls \ + --disable-werror \ + --disable-symvers \ + --with-libiconv \ + --with-system-zlib \ + --with-{gmp,mpfr,mpc,isl}=${MINGW_PREFIX} \ + --with-pkgversion="Rev${pkgrel}, Built by MSYS2 project" \ + --with-bugurl="http://sourceforge.net/projects/msys2" \ + --with-gnu-as --with-gnu-ld \ + ${_conf} + #--enable-libitm + #--enable-objc-gc + + # While we're debugging -fopenmp problems at least. + # .. we may as well not strip anything. + if check_option "strip" "n"; then + sed -i 's,^STRIP = .*$,STRIP = true,g' Makefile + sed -i 's,^STRIP_FOR_TARGET=.*$,STRIP_FOR_TARGET=true,g' Makefile + fi + + make all + + make -j1 DESTDIR=${srcdir} install + mv ${srcdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/adalib/*.dll ${srcdir}${MINGW_PREFIX}/bin/ +} + +package_mingw-w64-gcc-libs-git() { + pkgdesc="GNU Compiler Collection (libraries) for MinGW-w64" + depends=("${MINGW_PACKAGE_PREFIX}-gmp" "${MINGW_PACKAGE_PREFIX}-libwinpthread") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-libs") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-libs") + + # Licensing information + + # Part of the package is GCCRLE, part is LGPL2+, see README generation below. + # Since the packaged GCCRLE libraries are also GPL3+, and LGPL2+ is compatible + # with GPL3+, the whole package can be redistributed under GPL3+. + license=(GPL3+ partial:'GCCRLE' partial:'LGPL2+') + + # We explain the licensing in this generated README file + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs" + cat << ENDFILE > "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/README" +The libgcc, libssp, libstdc++, libgomp and libatomic libraries are covered by +GPL3+ with the GCC Runtime Library Exception. The libquadmath library is covered +by LGPL2+. The package as a whole can be redistributed under GPL3+. +ENDFILE + + # License files + install -Dm644 "${srcdir}/${_realname}/COPYING3" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/COPYING3" + install -Dm644 "${srcdir}/${_realname}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/COPYING.LIB" + install -Dm644 "${srcdir}/${_realname}/COPYING.RUNTIME" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/COPYING.RUNTIME" + + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin + + cd ${srcdir}${MINGW_PREFIX} + cp bin/{libatomic*,libgcc*,libgomp*,libquadmath*,libssp*,libstdc*,libvtv*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ +} + +package_mingw-w64-gcc-git() { + pkgdesc="GNU Compiler Collection (C,C++,OpenMP) for MinGW-w64" + depends=("${MINGW_PACKAGE_PREFIX}-binutils" + "${MINGW_PACKAGE_PREFIX}-crt" + "${MINGW_PACKAGE_PREFIX}-headers" + "${MINGW_PACKAGE_PREFIX}-isl" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-mpc" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libs-git=${pkgver}-${pkgrel}" + "${MINGW_PACKAGE_PREFIX}-windows-default-manifest" + "${MINGW_PACKAGE_PREFIX}-winpthreads" + "${MINGW_PACKAGE_PREFIX}-zlib") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,include,lib,share} + + cd ${srcdir}${MINGW_PREFIX} + cp bin/cpp.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc-ar.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc-nm.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc-ranlib.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcov.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcov-tool.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/c++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/g++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-c++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-g++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-${_realpkgver}.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-ar.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-nm.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-ranlib.exe ${pkgdir}${MINGW_PREFIX}/bin/ + + #cp bin/{libgcc*,libgomp*,libquadmath*,libssp*,libstdc*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/include + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/*.h ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/ + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/ssp ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/ + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/include-fixed ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/install-tools ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/cc1.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/collect2.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/crt*.o ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/liblto* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libatomic* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libgcc* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libgcov* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libgomp* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libquadmath* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libssp* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libvtv* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/lto*.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + + #mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/lib + cp ${srcdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/lib/libgcc_s.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + #cp lib/gcc/${MINGW_CHOST}/lib/libgcc_s.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/lib/ + + #cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/c++ ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/ + cp -r include/c++ ${pkgdir}${MINGW_PREFIX}/include/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/cc1plus.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libstdc++* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libsupc++* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/{doc,info,locale,man} + #cp -r share/doc/gcc-${_realpkgver} ${pkgdir}${MINGW_PREFIX}/share/doc/ + cp share/info/cpp.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/cppinternals.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gcc.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gccinstall.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gccint.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/libgomp.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/libquadmath.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + + #cp share/locale/* ${pkgdir}${MINGW_PREFIX}/share/locale/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/gcc-${_realpkgver}/python + cp -r share/gcc-${_realpkgver}/python/libstdcxx ${pkgdir}${MINGW_PREFIX}/share/gcc-${_realpkgver}/python/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/man/man1 + cp share/man/man1/cpp.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/gcc.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/gcov.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man7/fsf-funding.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man7/gfdl.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man7/gpl.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/g++.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ +} + +package_mingw-w64-gcc-libgfortran-git() { + pkgdesc="GNU Compiler Collection (libgfortran) for MinGW-w64" + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-libs-git=${pkgver}-${pkgrel}") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran") + + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin + cd ${srcdir}${MINGW_PREFIX} + cp bin/libgfortran*.dll ${pkgdir}${MINGW_PREFIX}/bin/ +} + +package_mingw-w64-gcc-fortran-git() { + pkgdesc="GNU Compiler Collection (Fortran) for MinGW-w64" + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-git=${pkgver}-${pkgrel}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran-git=${pkgver}-${pkgrel}") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-fortran") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-fortran") + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,share} + + cd ${srcdir}${MINGW_PREFIX} + cp bin/gfortran.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gfortran.exe ${pkgdir}${MINGW_PREFIX}/bin/ + + #cp bin/libgfortran*.dll ${pkgdir}${MINGW_PREFIX}/bin/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver} + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/finclude ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/f951.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libcaf_single.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libgfortran* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/man/man1 + cp share/man/man1/gfortran.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/info + cp share/info/gfortran.info* ${pkgdir}${MINGW_PREFIX}/share/info/ +} + +package_mingw-w64-gcc-ada-git() { + pkgdesc="GNU Compiler Collection (Ada) for MinGW-w64" + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-git=${pkgver}-${pkgrel}") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-ada") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-ada") + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,share} + + cd ${srcdir}${MINGW_PREFIX} + cp bin/gnat*.exe ${pkgdir}${MINGW_PREFIX}/bin/ + + cp bin/{libgnarl*,libgnat*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver} + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/adainclude ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/adalib ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/gnat1.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/info + cp share/info/gnat-style.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gnat_rm.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gnat_ugn.info* ${pkgdir}${MINGW_PREFIX}/share/info/ +} + +package_mingw-w64-gcc-objc-git() { + pkgdesc="GNU Compiler Collection (ObjC,Obj-C++) for MinGW-w64" + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-git=${pkgver}-${pkgrel}") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-objc") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-objc") + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib} + + cd ${srcdir}${MINGW_PREFIX} + cp bin/libobjc*.dll ${pkgdir}${MINGW_PREFIX}/bin/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/include + cp -r lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/objc ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/include/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/cc1obj.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/libobjc.* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ + cp lib/gcc/${MINGW_CHOST}/${_realpkgver}/cc1objplus.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${_realpkgver}/ +} + +# Wrappers for package functions + +# 32-bit wrappers +package_mingw-w64-i686-gcc-libs-git() { + package_mingw-w64-gcc-libs-git +} + +package_mingw-w64-i686-gcc-git() { + package_mingw-w64-gcc-git +} + +package_mingw-w64-i686-gcc-libgfortran-git() { + package_mingw-w64-gcc-libgfortran-git +} + +package_mingw-w64-i686-gcc-fortran-git() { + package_mingw-w64-gcc-fortran-git +} + +package_mingw-w64-i686-gcc-ada-git() { + package_mingw-w64-gcc-ada-git +} + +package_mingw-w64-i686-gcc-objc-git() { + package_mingw-w64-gcc-objc-git +} + +# 64-bit wrappers +package_mingw-w64-x86_64-gcc-libs-git() { + package_mingw-w64-gcc-libs-git +} + +package_mingw-w64-x86_64-gcc-git() { + package_mingw-w64-gcc-git +} + +package_mingw-w64-x86_64-gcc-libgfortran-git() { + package_mingw-w64-gcc-libgfortran-git +} + +package_mingw-w64-x86_64-gcc-fortran-git() { + package_mingw-w64-gcc-fortran-git +} + +package_mingw-w64-x86_64-gcc-ada-git() { + package_mingw-w64-gcc-ada-git +} + +package_mingw-w64-x86_64-gcc-objc-git() { + package_mingw-w64-gcc-objc-git +} diff --git a/mingw-w64-gcc/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch b/mingw-w64-gcc/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch new file mode 100644 index 0000000000..efb3fc0340 --- /dev/null +++ b/mingw-w64-gcc/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch @@ -0,0 +1,112 @@ +From 38274147bb2a3fa481d0a1853c185c2337550260 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 17 Aug 2015 22:57:46 +0100 +Subject: [PATCH 22/22] clone_function_name_1: Retain any stdcall suffix + +Previously, clone_function_name_1 would add a suffix after +any existing stdcall suffix, for example ipa-split.c would +clone test@4 as test@4.part.0. + +Later, i386_pe_strip_name_encoding_full would come along +and strip off everything from the last @ onwards which had +the effect of generating incorrect section names which +would then fall over with errors such as: + +error: void test() causes a section type conflict with \ + void test@4.part.0() + +The following testcase, reduced from Firefox can be used +to reproduce this. + +test.ii: +class ClassA { +public: + virtual int __attribute__((__stdcall__)) Dispatch() = 0; +}; +class ClassB { +public: + ClassA* __attribute__((__stdcall__)) operator->(); +}; +class ClassC : ClassA { + int *some_int_ptr_variable; + int __attribute__((__stdcall__)) Dispatch() { + return some_int_ptr_variable + ? 42 + : m_ClassInstanceB->Dispatch(); + } + ClassB m_ClassInstanceB; +}; +ClassC ClassInstanceC; + +Compile for i686-w64-mingw32 with: +cc1plus -O -fpartial-inlining -fdevirtualize \ + -fdevirtualize-speculatively test.ii + +Outputs: +test.ii: In member function 'virtual int ClassC::Dispatch()': +test.ii:11:36: error: virtual int ClassC::Dispatch() causes \ + a section type conflict with int ClassC::_ZN6ClassC8DispatchEv@4.part.0() + int __attribute__((CALLTYPE)) Dispatch() { + ^ +test.ii:11:36: note: \ + 'int ClassC::_ZN6ClassC8DispatchEv@4.part.0()' was declared here +--- + gcc/cgraphclones.c | 13 ++++++++++++- + gcc/defaults.h | 2 +- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c +index 9e9f1a0..69b8a91 100644 +--- a/gcc/cgraphclones.c ++++ b/gcc/cgraphclones.c +@@ -519,15 +519,24 @@ cgraph_node::create_clone (tree new_decl, gcov_type gcov_count, int freq, + static GTY(()) unsigned int clone_fn_id_num; + + /* Return a new assembler name for a clone with SUFFIX of a decl named +- NAME. */ ++ NAME. Final stdcall @N suffixes are maintained. */ + + tree + clone_function_name_1 (const char *name, const char *suffix) + { + size_t len = strlen (name); + char *tmp_name, *prefix; ++ char *at_suffix = NULL; + + prefix = XALLOCAVEC (char, len + strlen (suffix) + 2); ++ /* name + 1 to skip fastcall which begins with '@' */ ++ at_suffix = strchr (name + 1, '@'); ++ size_t at_suffix_len = 0; ++ if (at_suffix) ++ { ++ at_suffix_len = strlen (at_suffix); ++ len -= at_suffix_len; ++ } + memcpy (prefix, name, len); + strcpy (prefix + len + 1, suffix); + #ifndef NO_DOT_IN_LABEL +@@ -538,6 +547,8 @@ clone_function_name_1 (const char *name, const char *suffix) + prefix[len] = '_'; + #endif + ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix, clone_fn_id_num++); ++ if (at_suffix) ++ strcat (tmp_name, at_suffix); + return get_identifier (tmp_name); + } + +diff --git a/gcc/defaults.h b/gcc/defaults.h +index 9d38ba1..c34478a 100644 +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -51,7 +51,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + do { const char *const name_ = (NAME); \ + char *const output_ = (OUTPUT) = \ +- (char *) alloca (strlen (name_) + 32); \ ++ (char *) alloca (strlen (name_) + 35); \ + sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \ + } while (0) + #endif +-- +2.5.0 + diff --git a/mingw-w64-gcc/130-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch b/mingw-w64-gcc/130-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch deleted file mode 100644 index e2a3fae4e2..0000000000 --- a/mingw-w64-gcc/130-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -urN gcc-4.8.2.orig/libiberty/pex-win32.c gcc-4.8.2/libiberty/pex-win32.c ---- gcc-4.8.2.orig/libiberty/pex-win32.c 2013-12-21 20:21:26.446076700 +0000 -+++ gcc-4.8.2/libiberty/pex-win32.c 2013-12-22 02:56:54.800559500 +0000 -@@ -340,17 +340,26 @@ - char *p; - size_t cmdline_len; - int i, j, k; -+ int needs_quotes; - - cmdline_len = 0; - for (i = 0; argv[i]; i++) - { -- /* We quote every last argument. This simplifies the problem; -- we need only escape embedded double-quotes and immediately -+ /* We only quote arguments that contain spaces, \n \t \v or " characters -+ to prevent wasting 2 chars per argument of the CreateProcess 32k char limit -+ We need only escape embedded double-quotes and immediately - preceeding backslash characters. A sequence of backslach characters - that is not follwed by a double quote character will not be - escaped. */ -+ needs_quotes = 0; - for (j = 0; argv[i][j]; j++) - { -+ if (argv[i][j] == ' ' || argv[i][j] == '\n' || -+ argv[i][j] == '\t' || argv[i][j] == '"' ) -+ { -+ needs_quotes = 1; -+ } -+ - if (argv[i][j] == '"') - { - /* Escape preceeding backslashes. */ -@@ -362,16 +371,33 @@ - } - /* Trailing backslashes also need to be escaped because they will be - followed by the terminating quote. */ -- for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -- cmdline_len++; -+ if (needs_quotes) -+ { -+ for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -+ cmdline_len++; -+ } - cmdline_len += j; -- cmdline_len += 3; /* for leading and trailing quotes and space */ -+ cmdline_len += 1 + (needs_quotes<<1); /* for leading and trailing quotes and space */ - } - cmdline = XNEWVEC (char, cmdline_len); - p = cmdline; - for (i = 0; argv[i]; i++) - { -- *p++ = '"'; -+ needs_quotes = 0; -+ for (j = 0; argv[i][j]; j++) -+ { -+ if (argv[i][j] == ' ' || argv[i][j] == '\n' || -+ argv[i][j] == '\t' || argv[i][j] == '"' ) -+ { -+ needs_quotes = 1; -+ break; -+ } -+ } -+ -+ if (needs_quotes) -+ { -+ *p++ = '"'; -+ } - for (j = 0; argv[i][j]; j++) - { - if (argv[i][j] == '"') -@@ -382,9 +408,12 @@ - } - *p++ = argv[i][j]; - } -- for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -- *p++ = '\\'; -- *p++ = '"'; -+ if (needs_quotes) -+ { -+ for (k = j - 1; k >= 0 && argv[i][k] == '\\'; k--) -+ *p++ = '\\'; -+ *p++ = '"'; -+ } - *p++ = ' '; - } - p[-1] = '\0'; diff --git a/mingw-w64-gcc/160-mingw-dont-ignore-native-system-header-dir.patch b/mingw-w64-gcc/160-mingw-dont-ignore-native-system-header-dir.patch index 3d46aeb1a7..5f9a31a9a4 100644 --- a/mingw-w64-gcc/160-mingw-dont-ignore-native-system-header-dir.patch +++ b/mingw-w64-gcc/160-mingw-dont-ignore-native-system-header-dir.patch @@ -1,18 +1,3 @@ -diff -urN gcc-4.8.2.orig/gcc/config/i386/mingw32.h gcc-4.8.2/gcc/config/i386/mingw32.h ---- gcc-4.8.2.orig/gcc/config/i386/mingw32.h 2014-01-11 16:50:54.080767000 +0000 -+++ gcc-4.8.2/gcc/config/i386/mingw32.h 2014-01-11 17:03:42.743874800 +0000 -@@ -158,11 +158,6 @@ - #define STANDARD_STARTFILE_PREFIX_2 "" - #endif - --/* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR -- macro contains POSIX-style path. See bug 52947. */ --#undef NATIVE_SYSTEM_HEADER_DIR --#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" -- - /* Output STRING, a string representing a filename, to FILE. - We canonicalize it to be in Unix format (backslashes are replaced - forward slashes. */ diff -urN gcc-4.8.2.orig/gcc/config.gcc gcc-4.8.2/gcc/config.gcc --- gcc-4.8.2.orig/gcc/config.gcc 2014-01-11 16:50:54.401307700 +0000 +++ gcc-4.8.2/gcc/config.gcc 2014-01-11 17:03:21.806216000 +0000 diff --git a/mingw-w64-gcc/170-Add--mcrtdll-option-for-msvcrt-stubbing.patch b/mingw-w64-gcc/170-Add--mcrtdll-option-for-msvcrt-stubbing.patch new file mode 100644 index 0000000000..db5c693515 --- /dev/null +++ b/mingw-w64-gcc/170-Add--mcrtdll-option-for-msvcrt-stubbing.patch @@ -0,0 +1,25 @@ +diff -urN gcc-4.9.2.orig/gcc/config/i386/cygming.opt gcc-4.9.2/gcc/config/i386/cygming.opt +--- gcc-4.9.2.orig/gcc/config/i386/cygming.opt 2015-02-08 17:42:18.991804700 +0000 ++++ gcc-4.9.2/gcc/config/i386/cygming.opt 2015-02-08 18:30:04.004615200 +0000 +@@ -22,6 +22,9 @@ + Target RejectNegative + Create console application + ++mcrtdll= ++Target RejectNegative Joined ++ + mdll + Target RejectNegative + Generate code for a DLL +diff -urN gcc-4.9.2.orig/gcc/config/i386/mingw32.h gcc-4.9.2/gcc/config/i386/mingw32.h +--- gcc-4.9.2.orig/gcc/config/i386/mingw32.h 2015-02-08 17:42:19.021308500 +0000 ++++ gcc-4.9.2/gcc/config/i386/mingw32.h 2015-02-08 18:31:49.685034900 +0000 +@@ -142,7 +142,7 @@ + #define REAL_LIBGCC_SPEC \ + "%{mthreads:-lmingwthrd} -lmingw32 \ + "SHARED_LIBGCC_SPEC" \ +- -lmoldname -lmingwex -lmsvcrt" ++ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}" + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ diff --git a/mingw-w64-gcc/180-pr-57440.patch b/mingw-w64-gcc/180-pr-57440.patch deleted file mode 100644 index cbbeb1c11a..0000000000 --- a/mingw-w64-gcc/180-pr-57440.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: gcc-4.9.0/libgcc/gthr-posix.h -=================================================================== ---- a/libgcc/gthr-posix.h (Revision 210070) -+++ b/libgcc/gthr-posix.h (Arbeitskopie) -@@ -34,6 +34,10 @@ see the files COPYING3 and COPYING.RUNTIME respect - - #include - -+#if defined (_WIN32) && !defined (__CYGWIN__) -+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1 -+#endif -+ - #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ - || !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK)) - # include diff --git a/mingw-w64-gcc/190-isl-0.13.patch b/mingw-w64-gcc/190-isl-0.13.patch deleted file mode 100644 index d126861c87..0000000000 --- a/mingw-w64-gcc/190-isl-0.13.patch +++ /dev/null @@ -1,437 +0,0 @@ -Index: gcc/graphite-optimize-isl.c -=================================================================== ---- gcc/graphite-optimize-isl.c (revision 207298) -+++ gcc/graphite-optimize-isl.c (working copy) -@@ -260,6 +260,7 @@ - DimToVectorize can be devided by VectorWidth. The default VectorWidth is - currently constant and not yet target specific. This function does not reason - about parallelism. */ -+ - static isl_map * - getPrevectorMap (isl_ctx *ctx, int DimToVectorize, - int ScheduleDimensions, -@@ -273,8 +274,9 @@ - isl_aff *Aff; - int PointDimension; /* ip */ - int TileDimension; /* it */ -- isl_int VectorWidthMP; -+ isl_val *VectorWidthMP; - int i; -+ isl_ctx *ct; - - /* assert (0 <= DimToVectorize && DimToVectorize < ScheduleDimensions);*/ - -@@ -304,10 +306,10 @@ - Aff = isl_aff_zero_on_domain (LocalSpaceRange); - Aff = isl_aff_set_constant_si (Aff, VectorWidth); - Aff = isl_aff_set_coefficient_si (Aff, isl_dim_in, TileDimension, 1); -- isl_int_init (VectorWidthMP); -- isl_int_set_si (VectorWidthMP, VectorWidth); -- Aff = isl_aff_mod (Aff, VectorWidthMP); -- isl_int_clear (VectorWidthMP); -+ -+ ct = isl_aff_get_ctx (Aff); -+ VectorWidthMP = isl_val_int_from_si (ct, VectorWidth); -+ Aff = isl_aff_mod_val (Aff, VectorWidthMP); - Modulo = isl_pw_aff_zero_set (isl_pw_aff_from_aff (Aff)); - TilingMap = isl_map_intersect_range (TilingMap, Modulo); - -@@ -375,7 +375,7 @@ - { - for (i = ScheduleDimensions - 1 ; i >= 0 ; i--) - { -- if (isl_band_member_is_zero_distance (Band, i)) -+ if (isl_band_member_is_coincident (Band, i)) - { - isl_map *TileMap; - isl_union_map *TileUMap; -Index: gcc/graphite-sese-to-poly.c -=================================================================== ---- gcc/graphite-sese-to-poly.c (revision 207298) -+++ gcc/graphite-sese-to-poly.c (working copy) -@@ -26,8 +26,8 @@ - #include - #include - #include -+#include - #include --#include - #include - #endif - -@@ -67,7 +74,6 @@ - #include "graphite-poly.h" - #include "graphite-sese-to-poly.h" - -- - /* Assigns to RES the value of the INTEGER_CST T. */ - - static inline void -@@ -481,13 +487,11 @@ - int i; - int nb_iterators = pbb_dim_iter_domain (pbb); - int used_scattering_dimensions = nb_iterators * 2 + 1; -- isl_int val; -+ isl_val *val; - isl_space *dc, *dm; - - gcc_assert (scattering_dimensions >= used_scattering_dimensions); - -- isl_int_init (val); -- - dc = isl_set_get_space (pbb->domain); - dm = isl_space_add_dims (isl_space_from_domain (dc), - isl_dim_out, scattering_dimensions); -@@ -501,12 +505,10 @@ - isl_constraint *c = isl_equality_alloc - (isl_local_space_from_space (isl_map_get_space (pbb->schedule))); - -- if (0 != isl_aff_get_coefficient (static_sched, isl_dim_in, -- i / 2, &val)) -- gcc_unreachable (); -+ val = isl_aff_get_coefficient_val (static_sched, isl_dim_in, i / 2); - -- isl_int_neg (val, val); -- c = isl_constraint_set_constant (c, val); -+ val = isl_val_neg (val); -+ c = isl_constraint_set_constant_val (c, val); - c = isl_constraint_set_coefficient_si (c, isl_dim_out, i, 1); - pbb->schedule = isl_map_add_constraint (pbb->schedule, c); - } -@@ -520,8 +522,6 @@ - } - } - -- isl_int_clear (val); -- - pbb->transformed = isl_map_copy (pbb->schedule); - } - -@@ -700,12 +700,12 @@ - isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space)); - isl_aff *aff = isl_aff_zero_on_domain (ls); - isl_set *dom = isl_set_universe (space); -- isl_int v; -+ isl_val *v; -+ isl_ctx *ct; - -- isl_int_init (v); -- isl_int_set_gmp (v, g); -- aff = isl_aff_add_constant (aff, v); -- isl_int_clear (v); -+ ct = isl_aff_get_ctx (aff); -+ v = isl_val_int_from_gmp (ct, g); -+ aff = isl_aff_add_constant_val (aff, v); - - return isl_pw_aff_alloc (dom, aff); - } -@@ -728,19 +728,17 @@ - - /* Compute pwaff mod 2^width. */ - -+extern isl_ctx *the_isl_ctx; -+ - static isl_pw_aff * - wrap (isl_pw_aff *pwaff, unsigned width) - { -- isl_int mod; -+ isl_val *mod; - -- isl_int_init (mod); -- isl_int_set_si (mod, 1); -- isl_int_mul_2exp (mod, mod, width); -+ mod = isl_val_int_from_ui(the_isl_ctx, width); -+ mod = isl_val_2exp (mod); -+ pwaff = isl_pw_aff_mod_val (pwaff, mod); - -- pwaff = isl_pw_aff_mod (pwaff, mod); -- -- isl_int_clear (mod); -- - return pwaff; - } - -@@ -995,11 +993,10 @@ - isl_space *space; - isl_constraint *c; - int pos = isl_set_dim (outer, isl_dim_set); -- isl_int v; -+ isl_val *v; - mpz_t g; - - mpz_init (g); -- isl_int_init (v); - - inner = isl_set_add_dims (inner, isl_dim_set, 1); - space = isl_set_get_space (inner); -@@ -1017,8 +1014,8 @@ - (isl_local_space_from_space (isl_space_copy (space))); - c = isl_constraint_set_coefficient_si (c, isl_dim_set, pos, -1); - tree_int_to_gmp (nb_iters, g); -- isl_int_set_gmp (v, g); -- c = isl_constraint_set_constant (c, v); -+ v = isl_val_int_from_gmp (the_isl_ctx, g); -+ c = isl_constraint_set_constant_val (c, v); - inner = isl_set_add_constraint (inner, c); - } - -@@ -1072,9 +1069,9 @@ - c = isl_inequality_alloc - (isl_local_space_from_space (isl_space_copy (space))); - c = isl_constraint_set_coefficient_si (c, isl_dim_set, pos, -1); -- isl_int_set_gmp (v, g); -+ v = isl_val_int_from_gmp (the_isl_ctx, g); - mpz_clear (g); -- c = isl_constraint_set_constant (c, v); -+ c = isl_constraint_set_constant_val (c, v); - inner = isl_set_add_constraint (inner, c); - } - else -@@ -1097,7 +1094,6 @@ - - isl_set_free (outer); - isl_space_free (space); -- isl_int_clear (v); - mpz_clear (g); - } - -@@ -1331,17 +1327,15 @@ - isl_space *space = isl_set_get_space (scop->context); - isl_constraint *c; - mpz_t g; -- isl_int v; -+ isl_val *v; - - c = isl_inequality_alloc (isl_local_space_from_space (space)); - mpz_init (g); -- isl_int_init (v); - tree_int_to_gmp (lb, g); -- isl_int_set_gmp (v, g); -- isl_int_neg (v, v); -+ v = isl_val_int_from_gmp (the_isl_ctx, g); -+ v = isl_val_neg (v); - mpz_clear (g); -- c = isl_constraint_set_constant (c, v); -- isl_int_clear (v); -+ c = isl_constraint_set_constant_val (c, v); - c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1); - - scop->context = isl_set_add_constraint (scop->context, c); -@@ -1352,17 +1346,15 @@ - isl_space *space = isl_set_get_space (scop->context); - isl_constraint *c; - mpz_t g; -- isl_int v; -+ isl_val *v; - - c = isl_inequality_alloc (isl_local_space_from_space (space)); - - mpz_init (g); -- isl_int_init (v); - tree_int_to_gmp (ub, g); -- isl_int_set_gmp (v, g); -+ v = isl_val_int_from_gmp (the_isl_ctx, g); - mpz_clear (g); -- c = isl_constraint_set_constant (c, v); -- isl_int_clear (v); -+ c = isl_constraint_set_constant_val (c, v); - c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1); - - scop->context = isl_set_add_constraint (scop->context, c); -Index: gcc/graphite-poly.c -=================================================================== ---- gcc/graphite-poly.c (revision 207298) -+++ gcc/graphite-poly.c (working copy) -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include - #include - #endif -@@ -1029,11 +1037,8 @@ - isl_set *transdomain; - isl_space *dc; - isl_aff *aff; -- isl_int isllb, islub; -+ isl_val *isllb, *islub; - -- isl_int_init (isllb); -- isl_int_init (islub); -- - /* Map the iteration domain through the current scatter, and work - on the resulting set. */ - transdomain = isl_set_apply (isl_set_copy (pbb->domain), -@@ -1046,15 +1051,14 @@ - - /* And find the min/max for that function. */ - /* XXX isl check results? */ -- isl_set_min (transdomain, aff, &isllb); -- isl_set_max (transdomain, aff, &islub); -+ isllb = isl_set_min_val (transdomain, aff); -+ islub = isl_set_max_val (transdomain, aff); - -- isl_int_sub (islub, islub, isllb); -- isl_int_add_ui (islub, islub, 1); -- isl_int_get_gmp (islub, res); -+ islub = isl_val_sub (islub, isllb); -+ islub = isl_val_add_ui (islub, 1); -+ isl_val_get_num_gmp (islub, res); - -- isl_int_clear (isllb); -- isl_int_clear (islub); -+ isl_val_free (islub); - isl_aff_free (aff); - isl_set_free (transdomain); - } -Index: gcc/graphite-interchange.c -=================================================================== ---- gcc/graphite-interchange.c (revision 207635) -+++ gcc/graphite-interchange.c (working copy) -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - #include - #endif -@@ -79,13 +87,13 @@ - isl_local_space *ls = isl_local_space_from_space (isl_map_get_space (map)); - unsigned offset, nsubs; - int i; -- isl_int size, subsize; -+ isl_ctx *ct; - -+ isl_val *size, *subsize, *size1; -+ - res = isl_equality_alloc (ls); -- isl_int_init (size); -- isl_int_set_ui (size, 1); -- isl_int_init (subsize); -- isl_int_set_ui (subsize, 1); -+ ct = isl_local_space_get_ctx (ls); -+ size = isl_val_int_from_ui (ct, 1); - - nsubs = isl_set_dim (pdr->extent, isl_dim_set); - /* -1 for the already included L dimension. */ -@@ -98,18 +106,17 @@ - isl_space *dc; - isl_aff *aff; - -- res = isl_constraint_set_coefficient (res, isl_dim_out, offset + i, size); -- -+ size1 = isl_val_copy (size); -+ res = isl_constraint_set_coefficient_val (res, isl_dim_out, offset + i, size); - dc = isl_set_get_space (pdr->extent); - aff = isl_aff_zero_on_domain (isl_local_space_from_space (dc)); - aff = isl_aff_set_coefficient_si (aff, isl_dim_in, i, 1); -- isl_set_max (pdr->extent, aff, &subsize); -+ subsize = isl_set_max_val (pdr->extent, aff); - isl_aff_free (aff); -- isl_int_mul (size, size, subsize); -+ size = isl_val_mul (size1, subsize); - } - -- isl_int_clear (subsize); -- isl_int_clear (size); -+ isl_val_free (size); - - return res; - } -@@ -126,7 +133,7 @@ - isl_aff *aff; - isl_space *dc; - isl_constraint *lma, *c; -- isl_int islstride; -+ isl_val *islstride; - graphite_dim_t time_depth; - unsigned offset, nt; - unsigned i; -@@ -239,10 +246,9 @@ - aff = isl_aff_zero_on_domain (isl_local_space_from_space (dc)); - aff = isl_aff_set_coefficient_si (aff, isl_dim_in, offset - 1, -1); - aff = isl_aff_set_coefficient_si (aff, isl_dim_in, offset + offset - 1, 1); -- isl_int_init (islstride); -- isl_set_max (set, aff, &islstride); -- isl_int_get_gmp (islstride, stride); -- isl_int_clear (islstride); -+ islstride = isl_set_max_val (set, aff); -+ isl_val_get_num_gmp (islstride, stride); -+ isl_val_free (islstride); - isl_aff_free (aff); - isl_set_free (set); - -Index: gcc/graphite-clast-to-gimple.c -=================================================================== ---- gcc/graphite-clast-to-gimple.c (revision 207298) -+++ gcc/graphite-clast-to-gimple.c (working copy) -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include - #include - #endif -@@ -871,18 +879,18 @@ - static void - compute_bounds_for_param (scop_p scop, int param, mpz_t low, mpz_t up) - { -- isl_int v; -+ isl_val *v; - isl_aff *aff = isl_aff_zero_on_domain - (isl_local_space_from_space (isl_set_get_space (scop->context))); - - aff = isl_aff_add_coefficient_si (aff, isl_dim_param, param, 1); - -- isl_int_init (v); -- isl_set_min (scop->context, aff, &v); -- isl_int_get_gmp (v, low); -- isl_set_max (scop->context, aff, &v); -- isl_int_get_gmp (v, up); -- isl_int_clear (v); -+ v = isl_set_min_val (scop->context, aff); -+ isl_val_get_num_gmp (v, low); -+ isl_val_free (v); -+ v = isl_set_max_val (scop->context, aff); -+ isl_val_get_num_gmp (v, up); -+ isl_val_free (v); - isl_aff_free (aff); - } - -@@ -901,8 +909,7 @@ - isl_set *domain; - isl_aff *dimension; - isl_local_space *local_space; -- isl_int isl_value; -- enum isl_lp_result lp_result; -+ isl_val *isl_value; - - domain = isl_set_copy (isl_set_from_cloog_domain (loop->domain)); - local_space = isl_local_space_from_space (isl_set_get_space (domain)); -@@ -911,17 +918,12 @@ - isl_set_dim (domain, isl_dim_set) - 1, - 1); - -- isl_int_init (isl_value); -- -- lp_result = isl_set_min (domain, dimension, &isl_value); -- assert (lp_result == isl_lp_ok); -- isl_int_get_gmp (isl_value, low); -- -- lp_result = isl_set_max (domain, dimension, &isl_value); -- assert (lp_result == isl_lp_ok); -- isl_int_get_gmp (isl_value, up); -- -- isl_int_clear (isl_value); -+ isl_value = isl_set_min_val (domain, dimension); -+ isl_val_get_num_gmp (isl_value, low); -+ isl_val_free (isl_value); -+ isl_value = isl_set_max_val (domain, dimension); -+ isl_val_get_num_gmp (isl_value, up); -+ isl_val_free (isl_value); - isl_set_free (domain); - isl_aff_free (dimension); - } diff --git a/mingw-w64-gcc/200-gcc-4.8-filename-output.patch b/mingw-w64-gcc/200-gcc-4.8-filename-output.patch deleted file mode 100644 index 6951eb239b..0000000000 --- a/mingw-w64-gcc/200-gcc-4.8-filename-output.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- gcc/c-family/c-opts.c (revision 200330) -+++ gcc/c-family/c-opts.c (working copy) -@@ -1338,10 +1338,14 @@ c_finish_options (void) - - /* Give CPP the next file given by -include, if any. */ - static void - push_command_line_include (void) - { -+ // This can happen if disabled by -imacros for example. -+ if (include_cursor > deferred_count) -+ return; -+ - if (!done_preinclude) - { - done_preinclude = true; - if (flag_hosted && std_inc && !cpp_opts->preprocessed) - { diff --git a/mingw-w64-gcc/220-4.9.0-libatomic-cygwin.patch b/mingw-w64-gcc/220-4.9.0-libatomic-cygwin.patch deleted file mode 100644 index 67c1dfab1a..0000000000 --- a/mingw-w64-gcc/220-4.9.0-libatomic-cygwin.patch +++ /dev/null @@ -1,118 +0,0 @@ ---- origsrc/gcc-4.8-20130310/libatomic/Makefile.am 2013-01-14 12:16:23.000000000 -0600 -+++ src/gcc-4.8-20130310/libatomic/Makefile.am 2013-03-17 05:10:55.958313400 -0500 -@@ -66,7 +66,7 @@ - endif - libatomic_version_info = -version-info $(libtool_VERSION) - --libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) -+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) - libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ - fenv.c - ---- origsrc/gcc-4.8-20130310/libatomic/Makefile.in 2013-03-10 17:37:36.000000000 -0500 -+++ src/gcc-4.8-20130310/libatomic/Makefile.in 2013-03-17 05:13:32.732280300 -0500 -@@ -244,6 +244,7 @@ - libtool_VERSION = @libtool_VERSION@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_host_flags = @lt_host_flags@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - multi_basedir = @multi_basedir@ -@@ -285,7 +286,7 @@ - @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map - @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun - libatomic_version_info = -version-info $(libtool_VERSION) --libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) -+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) - libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ - fenv.c - ---- origsrc/gcc-4.8-20130310/libatomic/aclocal.m4 2013-03-10 17:37:36.000000000 -0500 -+++ src/gcc-4.8-20130310/libatomic/aclocal.m4 2013-03-17 05:09:13.598458700 -0500 -@@ -993,6 +993,7 @@ - m4_include([../config/acx.m4]) - m4_include([../config/depstand.m4]) - m4_include([../config/lead-dot.m4]) -+m4_include([../config/lthostflags.m4]) - m4_include([../config/multi.m4]) - m4_include([../config/override.m4]) - m4_include([../config/stdint.m4]) ---- origsrc/gcc-4.8-20130310/libatomic/configure 2013-03-10 17:37:36.000000000 -0500 -+++ src/gcc-4.8-20130310/libatomic/configure 2013-03-17 05:29:38.288507000 -0500 -@@ -627,6 +627,7 @@ - MAINTAINER_MODE_TRUE - enable_static - enable_shared -+lt_host_flags - CPP - OTOOL64 - OTOOL -@@ -11013,7 +11014,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11109 "configure" -+#line 11110 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11119,7 +11120,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11215 "configure" -+#line 11216 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11357,6 +11358,28 @@ - - - -+ -+ -+case $host in -+ *-cygwin* | *-mingw*) -+ # 'host' will be top-level target in the case of a target lib, -+ # we must compare to with_cross_host to decide if this is a native -+ # or cross-compiler and select where to install dlls appropriately. -+ if test -n "$with_cross_host" && -+ test x"$with_cross_host" != x"no"; then -+ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; -+ else -+ lt_host_flags='-no-undefined -bindir "$(bindir)"'; -+ fi -+ ;; -+ *) -+ lt_host_flags= -+ ;; -+esac -+ -+ -+ -+ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 ---- origsrc/gcc-4.8-20130310/libatomic/configure.ac 2013-01-14 12:16:23.000000000 -0600 -+++ src/gcc-4.8-20130310/libatomic/configure.ac 2013-03-17 05:29:30.655070400 -0500 -@@ -143,6 +143,7 @@ - - # Configure libtool - AM_PROG_LIBTOOL -+ACX_LT_HOST_FLAGS - AC_SUBST(enable_shared) - AC_SUBST(enable_static) - AM_MAINTAINER_MODE ---- origsrc/gcc-4.8-20130310/libatomic/configure.tgt 2013-01-14 12:16:23.000000000 -0600 -+++ src/gcc-4.8-20130310/libatomic/configure.tgt 2013-03-17 04:50:09.727033000 -0500 -@@ -108,7 +108,7 @@ - *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \ - | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \ - | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \ -- | *-*-darwin* | *-*-aix*) -+ | *-*-darwin* | *-*-aix* | *-*-cygwin* | *-*-mingw*) - # POSIX system. The OS is supported. - config_path="${config_path} posix" - ;; diff --git a/mingw-w64-gcc/310-gcc-make-xmmintrin-header-cplusplus-compatible.patch b/mingw-w64-gcc/310-gcc-make-xmmintrin-header-cplusplus-compatible.patch new file mode 100644 index 0000000000..b66b294ff2 --- /dev/null +++ b/mingw-w64-gcc/310-gcc-make-xmmintrin-header-cplusplus-compatible.patch @@ -0,0 +1,24 @@ +--- gcc-5.1.0/gcc/config/i386/xmmintrin.h.orig 2013-01-18 14:57:27.762645582 +0100 ++++ gcc-5.1.0/gcc/config/i386/xmmintrin.h 2013-01-18 14:58:27.604561940 +0100 +@@ -37,6 +37,10 @@ + /* Get _mm_malloc () and _mm_free (). */ + #include + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + /* The Intel API is flexible enough that we must allow aliasing with other + vector types, and their scalar components. */ + typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); +@@ -1241,6 +1245,10 @@ + (row3) = __builtin_ia32_movhlps (__t3, __t2); \ + } while (0) + ++#ifdef __cplusplus ++} ++#endif ++ + /* For backward source compatibility. */ + #ifdef __SSE2__ + # include diff --git a/mingw-w64-gcc/405-dwarf-regression.patch b/mingw-w64-gcc/405-dwarf-regression.patch new file mode 100644 index 0000000000..7756abb6e0 --- /dev/null +++ b/mingw-w64-gcc/405-dwarf-regression.patch @@ -0,0 +1,36 @@ +Relevant references: + +https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00409.html +http://gcc.gcc.gnu.narkive.com/RMY4RcbE/asm-output-section-name-cleanup-patch-problem + +diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c +index c737620..e5ab209 100644 +--- a/libgcc/libgcc2.c ++++ b/libgcc/libgcc2.c +@@ -2211,7 +2211,7 @@ TRANSFER_FROM_TRAMPOLINE + /* Some ELF crosses use crtstuff.c to provide __CTOR_LIST__, but use this + code to run constructors. In that case, we need to handle EH here, too. */ + +-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__ ++#ifdef EH_FRAME_SECTION_NAME + #include "unwind-dw2-fde.h" + extern unsigned char __EH_FRAME_BEGIN__[]; + #endif +@@ -2231,7 +2231,7 @@ __do_global_dtors (void) + (*(p-1)) (); + } + #endif +-#if defined (__LIBGCC_EH_FRAME_SECTION_NAME__) && !defined (HAS_INIT_SECTION) ++#if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION) + { + static int completed = 0; + if (! completed) +@@ -2250,7 +2250,7 @@ __do_global_dtors (void) + void + __do_global_ctors (void) + { +-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__ ++#ifdef EH_FRAME_SECTION_NAME + { + static struct object object; + __register_frame_info (__EH_FRAME_BEGIN__, &object); diff --git a/mingw-w64-gcc/410-fix-using-large-pch.patch b/mingw-w64-gcc/410-fix-using-large-pch.patch new file mode 100644 index 0000000000..5e1dff51f4 --- /dev/null +++ b/mingw-w64-gcc/410-fix-using-large-pch.patch @@ -0,0 +1,131 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940 +https://sourceforge.net/p/mingw-w64/bugs/382/ + +diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c +index aa17378..631d9c4 100644 +--- a/gcc/config/i386/host-mingw32.c ++++ b/gcc/config/i386/host-mingw32.c +@@ -42,9 +42,6 @@ static size_t mingw32_gt_pch_alloc_granularity (void); + + static inline void w32_error(const char*, const char*, int, const char*); + +-/* FIXME: Is this big enough? */ +-static const size_t pch_VA_max_size = 128 * 1024 * 1024; +- + /* Granularity for reserving address space. */ + static size_t va_granularity = 0x10000; + +@@ -86,9 +83,6 @@ static void * + mingw32_gt_pch_get_address (size_t size, int) + { + void* res; +- size = (size + va_granularity - 1) & ~(va_granularity - 1); +- if (size > pch_VA_max_size) +- return NULL; + + /* FIXME: We let system determine base by setting first arg to NULL. + Allocating at top of available address space avoids unnecessary +@@ -98,7 +92,7 @@ mingw32_gt_pch_get_address (size_t size, int) + If we allocate at bottom we need to reserve the address as early + as possible and at the same point in each invocation. */ + +- res = VirtualAlloc (NULL, pch_VA_max_size, ++ res = VirtualAlloc (NULL, size, + MEM_RESERVE | MEM_TOP_DOWN, + PAGE_NOACCESS); + if (!res) +@@ -148,7 +142,7 @@ mingw32_gt_pch_use_address (void *addr, size_t size, int fd, + + /* Offset must be also be a multiple of allocation granularity for + this to work. We can't change the offset. */ +- if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size) ++ if ((offset & (va_granularity - 1)) != 0) + return -1; + + +diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c +index 5096837..f741f2c 100644 +--- a/gcc/ggc-common.c ++++ b/gcc/ggc-common.c +@@ -599,7 +599,9 @@ gt_pch_restore (FILE *f) + size_t i; + struct mmap_info mmi; + int result; +- ++ long pch_tabs_off; ++ long pch_data_off; ++ + /* Delete any deletable objects. This makes ggc_pch_read much + faster, as it can be sure that no GCable objects remain other + than the ones just read in. */ +@@ -607,20 +609,24 @@ gt_pch_restore (FILE *f) + for (rti = *rt; rti->base != NULL; rti++) + memset (rti->base, 0, rti->stride); + +- /* Read in all the scalar variables. */ ++ /* We need to read tables after mapping, or fatal_error will ++ segfault when gt_pch_use_address returns -1. Skip them for now. */ ++ pch_tabs_off = ftell(f); ++ ++ /* Skip all the scalar variables. */ + for (rt = gt_pch_scalar_rtab; *rt; rt++) + for (rti = *rt; rti->base != NULL; rti++) +- if (fread (rti->base, rti->stride, 1, f) != 1) +- fatal_error (input_location, "can%'t read PCH file: %m"); ++ if (fseek (f, rti->stride, SEEK_CUR) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); + +- /* Read in all the global pointers, in 6 easy loops. */ ++ /* Skip all the global pointers. */ + for (rt = gt_ggc_rtab; *rt; rt++) + for (rti = *rt; rti->base != NULL; rti++) + for (i = 0; i < rti->nelt; i++) +- if (fread ((char *)rti->base + rti->stride * i, +- sizeof (void *), 1, f) != 1) +- fatal_error (input_location, "can%'t read PCH file: %m"); +- ++ if (fseek (f, sizeof (void *), SEEK_CUR) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ /* mmi still has to be read now. */ + if (fread (&mmi, sizeof (mmi), 1, f) != 1) + fatal_error (input_location, "can%'t read PCH file: %m"); + +@@ -631,12 +637,35 @@ gt_pch_restore (FILE *f) + if (result == 0) + { + if (fseek (f, mmi.offset, SEEK_SET) != 0 +- || fread (mmi.preferred_base, mmi.size, 1, f) != 1) +- fatal_error (input_location, "can%'t read PCH file: %m"); ++ || fread (mmi.preferred_base, mmi.size, 1, f) != 1) ++ fatal_error (input_location, "can%'t read PCH file: %m"); + } + else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0) + fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ /* File mapping done, read tables now. */ ++ pch_data_off = ftell(f); ++ ++ if (fseek (f, pch_tabs_off, SEEK_SET) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); + ++ /* Read in all the scalar variables. */ ++ for (rt = gt_pch_scalar_rtab; *rt; rt++) ++ for (rti = *rt; rti->base != NULL; rti++) ++ if (fread (rti->base, rti->stride, 1, f) != 1) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ /* Read in all the global pointers, in 6 easy loops. */ ++ for (rt = gt_ggc_rtab; *rt; rt++) ++ for (rti = *rt; rti->base != NULL; rti++) ++ for (i = 0; i < rti->nelt; i++) ++ if (fread ((char *)rti->base + rti->stride * i, ++ sizeof (void *), 1, f) != 1) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ ++ if (fseek (f, pch_data_off, SEEK_SET) != 0) ++ fatal_error (input_location, "can%'t read PCH file: %m"); ++ + ggc_pch_read (f, mmi.preferred_base); + + gt_pch_restore_stringpool (); diff --git a/mingw-w64-gcc/PKGBUILD b/mingw-w64-gcc/PKGBUILD index 23fe18b1a3..98fdcf9dc1 100644 --- a/mingw-w64-gcc/PKGBUILD +++ b/mingw-w64-gcc/PKGBUILD @@ -1,33 +1,36 @@ -# Maintainer: Alexey Pavlov +# Maintainer: Alexey Pavlov # Contributor: Alexey Borzenkov # Contributor: Ray Donnelly +# Contributor: Renato Silva _realname=gcc -pkgname=( - "${MINGW_PACKAGE_PREFIX}-${_realname}" - "${MINGW_PACKAGE_PREFIX}-${_realname}-libs" - "${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran" - "${MINGW_PACKAGE_PREFIX}-${_realname}-fortran" - "${MINGW_PACKAGE_PREFIX}-${_realname}-ada" - "${MINGW_PACKAGE_PREFIX}-${_realname}-objc" - ) -pkgver=4.9.2 -pkgrel=2 +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libs" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran" + "${MINGW_PACKAGE_PREFIX}-${_realname}-fortran" + "${MINGW_PACKAGE_PREFIX}-${_realname}-ada" + "${MINGW_PACKAGE_PREFIX}-${_realname}-objc") +pkgver=5.3.0 +pkgrel=1 pkgdesc="GCC for the MinGW-w64" arch=('any') url="http://gcc.gnu.org" license=('GPL' 'LGPL' 'FDL' 'custom') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain" "${MINGW_PACKAGE_PREFIX}") -depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-ada" - "${MINGW_PACKAGE_PREFIX}-binutils" - "${MINGW_PACKAGE_PREFIX}-crt" - "${MINGW_PACKAGE_PREFIX}-headers" - "${MINGW_PACKAGE_PREFIX}-winpthreads" - "${MINGW_PACKAGE_PREFIX}-mpc" - "${MINGW_PACKAGE_PREFIX}-cloog" - "${MINGW_PACKAGE_PREFIX}-windows-default-manifest" - "${MINGW_PACKAGE_PREFIX}-zlib") -makedepends=("${MINGW_PACKAGE_PREFIX}-${_realname}" 'lndir') +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +makedepends=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-ada" + "${MINGW_PACKAGE_PREFIX}-binutils" + "${MINGW_PACKAGE_PREFIX}-crt" + "${MINGW_PACKAGE_PREFIX}-headers" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-isl" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-mpc" + "${MINGW_PACKAGE_PREFIX}-mpfr" + "${MINGW_PACKAGE_PREFIX}-windows-default-manifest" + "${MINGW_PACKAGE_PREFIX}-winpthreads" + "${MINGW_PACKAGE_PREFIX}-zlib") #checkdepends=('dejagnu') optdepends=() options=('strip' '!debug' 'staticlibs' '!emptydirs') @@ -35,48 +38,48 @@ source=("ftp://gcc.gnu.org/pub/gcc/releases/${_realname}-${pkgver}/${_realname}- '000-relocatex-libintl-0.18.3.1.mingw.patch' '001-gcc-4.8-libstdc++export.patch' '002-gcc-4.7-stdthreads.patch' - '130-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch' '140-fix-for-windows-not-minding-non-existent-parent-dirs.patch' '150-windows-lrealpath-no-force-lowercase-nor-backslash.patch' '160-mingw-dont-ignore-native-system-header-dir.patch' - '180-pr-57440.patch' - '190-isl-0.13.patch' - '200-gcc-4.8-filename-output.patch' + '170-Add--mcrtdll-option-for-msvcrt-stubbing.patch' '210-ktietz-libgomp.patch' - '220-4.9.0-libatomic-cygwin.patch' '230-build-more-gnattools.mingw.patch' '240-prettify-linking-no-undefined.mingw.patch' '300-libgomp-no-static.patch' + '310-gcc-make-xmmintrin-header-cplusplus-compatible.patch' + '405-dwarf-regression.patch' + '410-fix-using-large-pch.patch' 'enable-libitm.mingw.patch' 'enable-libsanitizer.mingw.patch' 'enable-shared-gnat.mingw.patch' 'no-fpic-in-sanitizer.all.patch' 'port-sanitizer-to-mingw.all.patch' 'enable-shared-gnat-implib.mingw.patch' - '955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch') -md5sums=('4df8ee253b7f3863ad0b86359cd39c43' + '955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch' + '0022-clone_function_name_1-Retain-any-stdcall-suffix.patch') +md5sums=('c9616fd448f980259c31de613e575719' '41635a40493dc79416db6627b2826b21' 'f6b5fb08ff06a7d60ee3280e14240bb2' '71cdb550528efcf2a5c9112464bfbabc' - '4ea64bea762b96cbe69986bd9ddc1532' 'c9967332940eb2b23820faeb48db6e72' '9e07f25b8813191eebd7fda684b1e2dd' - '60fdccbd072e2b2e724ff879d31ec57e' - '347336d5a318e5e8b3cde29e9174413c' - 'bf00d36f0d6bfc1fcb461c1b99461be4' - '40cb437805e2f7a006aa0d0c3098ab0f' + '93cb2509ae8fdb518d0d6b9e2a7ae062' + '3b8b5d9e8c20c0d75fa01a32215ada02' 'f539e602715250bbdb8d2a6a25f1ccbe' - '9303e0f9cd9c601a1939792123677499' 'fde1098e5c71963ec2ed4c5b2c4217bd' '09bdad41515c8d353612f30c91b3bac2' '0a78aaac959e212acb24bb38271804cb' + '4a6e2e0f6424abf37e830d7f37fd3351' + 'b558ee5f7529b1765e4266289ad1a83c' + 'a9badc7f193d4fc44e7e51c17117bbe3' '27d5611996e209ba6f6a55ab417386e4' '5201bee23601ddfacde436461559f561' 'a56fb2cf67ae619f22e0d21f378ff704' '0f3fb8c9aab4bbb02a9923adc22c6109' '52592c1d7c6031ff601ecfdf3942b940' '62cc23251ae746b5f39c2c7aef121e8f' - '393ce6bf124d5b1ca0e38cbe0fc6eb51') + '393ce6bf124d5b1ca0e38cbe0fc6eb51' + '6d0a782eef0077ddbffd130f806529fa') _threads="posix" @@ -84,31 +87,16 @@ prepare() { cd ${srcdir}/${_realname}-${pkgver} #remove files the patches will create (so they aren't in the way the 2nd time round) - rm -f intl/canonicalize.c intl/relocatex.c intl/relocatex.h > /dev/null 2>&1 | true - - #do not install libiberty - sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + rm -f intl/canonicalize.c intl/relocatex.c intl/relocatex.h > /dev/null 2>&1 || true # hack! - some configure tests for header files using "$CPP $CPPFLAGS" sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure # do not expect $prefix/mingw symlink - this should be superceded by # 160-mingw-dont-ignore-native-system-header-dir.patch .. but isn't! - [[ -f configure.src ]] && { - rm -f configure - cp configure.src configure - } || { - cp configure configure.src - } sed -i 's/${prefix}\/mingw\//${prefix}\//g' configure - + # change hardcoded /mingw prefix to the real prefix - [[ -f gcc/config/i386/mingw32.h.src ]] && { - rm -f gcc/config/i386/mingw32.h - cp gcc/config/i386/mingw32.h.src gcc/config/i386/mingw32.h - } || { - cp gcc/config/i386/mingw32.h gcc/config/i386/mingw32.h.src - } local MINGW_NATIVE_PREFIX=$(cygpath -am ${MINGW_PREFIX}/${MINGW_CHOST}) sed -i "s/\\/mingw\\//${MINGW_NATIVE_PREFIX//\//\\/}\\//g" gcc/config/i386/mingw32.h @@ -116,10 +104,6 @@ prepare() { patch -p1 -i ${srcdir}/001-gcc-4.8-libstdc++export.patch patch -p1 -i ${srcdir}/002-gcc-4.7-stdthreads.patch - # Don't waste valuable commandline chars on double-quotes around "arguments" - # that don't need them. - patch -p1 -i ${srcdir}/130-dont-escape-arguments-that-dont-need-it-in-pex-win32.c.patch - # Make Windows behave the same as Posix in the consideration of whether folder # "/exists/doesnt-exist/.." is a valid path.. in Posix, it isn't. patch -p1 -i ${srcdir}/140-fix-for-windows-not-minding-non-existent-parent-dirs.patch @@ -129,26 +113,26 @@ prepare() { patch -p1 -i ${srcdir}/150-windows-lrealpath-no-force-lowercase-nor-backslash.patch # Don't ignore values passed via --with-native-system-header-dir= - # patch -p1 -i ${srcdir}/160-mingw-dont-ignore-native-system-header-dir.patch + patch -p1 -i ${srcdir}/160-mingw-dont-ignore-native-system-header-dir.patch - patch -p1 -i ${srcdir}/180-pr-57440.patch - - # Compatibility with isl>=0.12.2 - patch -p0 -i ${srcdir}/190-isl-0.13.patch - - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653 - patch -p0 -i ${srcdir}/200-gcc-4.8-filename-output.patch + # Feature to allow overriding -lmsvcrt with a custom msvcrt dll, for example + # a stub implementation that defers to the one already loaded by the process. + patch -p1 -i ${srcdir}/170-Add--mcrtdll-option-for-msvcrt-stubbing.patch # Kai's libgomp fix. patch -p1 -i ${srcdir}/210-ktietz-libgomp.patch - - # Enable building libatomic - patch -p2 -i ${srcdir}/220-4.9.0-libatomic-cygwin.patch - + # Build aextra tools for Ada patch -p1 -i ${srcdir}/230-build-more-gnattools.mingw.patch - + patch -p1 -i ${srcdir}/240-prettify-linking-no-undefined.mingw.patch + + patch -p1 -i ${srcdir}/310-gcc-make-xmmintrin-header-cplusplus-compatible.patch + + if [ "${CARCH}" = "i686" ]; then + patch -p1 -i ${srcdir}/405-dwarf-regression.patch + fi + patch -p1 -i ${srcdir}/410-fix-using-large-pch.patch patch -p1 -i ${srcdir}/enable-shared-gnat-implib.mingw.patch @@ -157,9 +141,11 @@ prepare() { # patch -p1 -i ${srcdir}/enable-shared-gnat.mingw.patch # patch -p1 -i ${srcdir}/no-fpic-in-sanitizer.all.patch # patch -p1 -i ${srcdir}/port-sanitizer-to-mingw.all.patch - + patch -p1 -i ${srcdir}/955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch + patch -p1 -i ${srcdir}/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch + #if check_option "debug" "y"; then # Expose some libgomp internals for debugging. #patch -p1 -i ${srcdir}/300-libgomp-no-static.patch @@ -176,7 +162,7 @@ build() { LDFLAGS+=" -Wl,--large-address-aware" local _arch=i686 ;; - + x86_64) local _arch=x86-64 local _conf="" @@ -204,9 +190,8 @@ build() { --enable-libstdcxx-time=yes \ --disable-libstdcxx-pch \ --disable-libstdcxx-debug \ - --enable-cloog-backend=isl \ --enable-version-specific-runtime-libs \ - --disable-cloog-version-check --disable-isl-version-check \ + --disable-isl-version-check \ --enable-lto \ --enable-libgomp \ --disable-multilib \ @@ -218,7 +203,7 @@ build() { --disable-symvers \ --with-libiconv \ --with-system-zlib \ - --with-{gmp,mpfr,mpc,isl,cloog}=${MINGW_PREFIX} \ + --with-{gmp,mpfr,mpc,isl}=${MINGW_PREFIX} \ --with-pkgversion="Rev${pkgrel}, Built by MSYS2 project" \ --with-bugurl="http://sourceforge.net/projects/msys2" \ --with-gnu-as --with-gnu-ld \ @@ -242,168 +227,189 @@ build() { package_mingw-w64-gcc-libs() { pkgdesc="GNU Compiler Collection (libraries) for MinGW-w64" depends=("${MINGW_PACKAGE_PREFIX}-gmp" "${MINGW_PACKAGE_PREFIX}-libwinpthread") + + # Licensing information + + # Part of the package is GCCRLE, part is LGPL2+, see README generation below. + # Since the packaged GCCRLE libraries are also GPL3+, and LGPL2+ is compatible + # with GPL3+, the whole package can be redistributed under GPL3+. + license=(GPL3+ partial:'GCCRLE' partial:'LGPL2+') + + # We explain the licensing in this generated README file + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs" + cat << ENDFILE > "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/README" +The libgcc, libssp, libstdc++, libgomp and libatomic libraries are covered by +GPL3+ with the GCC Runtime Library Exception. The libquadmath library is covered +by LGPL2+. The package as a whole can be redistributed under GPL3+. +ENDFILE + + # License files + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING3" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/COPYING3" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/COPYING.LIB" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.RUNTIME" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-libs/COPYING.RUNTIME" + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin cd ${srcdir}${MINGW_PREFIX} - cp bin/{libatomic*,libgcc*,libgomp*,libquadmath*,libssp*,libstdc*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/{libatomic*,libgcc*,libgomp*,libquadmath*,libssp*,libstdc*,libvtv*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ } package_mingw-w64-gcc() { pkgdesc="GNU Compiler Collection (C,C++,OpenMP) for MinGW-w64" - depends=("${MINGW_PACKAGE_PREFIX}-crt" "${MINGW_PACKAGE_PREFIX}-binutils" "${MINGW_PACKAGE_PREFIX}-winpthreads" "${MINGW_PACKAGE_PREFIX}-headers" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-mpc" "${MINGW_PACKAGE_PREFIX}-cloog" "${MINGW_PACKAGE_PREFIX}-${_realname}-libs=${pkgver}") + depends=("${MINGW_PACKAGE_PREFIX}-binutils" + "${MINGW_PACKAGE_PREFIX}-crt" + "${MINGW_PACKAGE_PREFIX}-headers" + "${MINGW_PACKAGE_PREFIX}-isl" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-mpc" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libs=${pkgver}-${pkgrel}" + "${MINGW_PACKAGE_PREFIX}-windows-default-manifest" + "${MINGW_PACKAGE_PREFIX}-winpthreads" + "${MINGW_PACKAGE_PREFIX}-zlib") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-base") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-base") mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,include,lib,share} - + cd ${srcdir}${MINGW_PREFIX} - cp bin/cpp.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/gcc.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/gcc-ar.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/gcc-nm.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/gcc-ranlib.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/gcov.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/c++.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/g++.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-c++.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-g++.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-gcc-${pkgver}.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-gcc.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-gcc-ar.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-gcc-nm.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp bin/${MINGW_CHOST}-gcc-ranlib.exe ${pkgdir}${MINGW_PREFIX}/bin/ - + cp bin/cpp.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc-ar.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc-nm.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcc-ranlib.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcov.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/gcov-tool.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/c++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/g++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-c++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-g++.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-${pkgver}.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-ar.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-nm.exe ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/${MINGW_CHOST}-gcc-ranlib.exe ${pkgdir}${MINGW_PREFIX}/bin/ + #cp bin/{libgcc*,libgomp*,libquadmath*,libssp*,libstdc*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include - cp lib/gcc/${MINGW_CHOST}/${pkgver}/include/*.h ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include/ssp ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include-fixed ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/install-tools ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/collect2.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/crt*.o ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/liblto* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libatomic* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgcc* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgcov.* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgomp.* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libquadmath.* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libssp* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/lto*.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - + cp lib/gcc/${MINGW_CHOST}/${pkgver}/include/*.h ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include/ssp ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include-fixed ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/install-tools ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/collect2.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/crt*.o ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/liblto* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libatomic* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgcc* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgcov* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgomp* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libquadmath* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libssp* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libvtv* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/lto*.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + #mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/lib cp ${srcdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/lib/libgcc_s.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ #cp lib/gcc/${MINGW_CHOST}/lib/libgcc_s.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/lib/ - + #cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include/c++ ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ cp -r include/c++ ${pkgdir}${MINGW_PREFIX}/include/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1plus.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libstdc++* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libsupc++* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - + cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1plus.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libstdc++* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libsupc++* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/{doc,info,locale,man} #cp -r share/doc/gcc-${pkgver} ${pkgdir}${MINGW_PREFIX}/share/doc/ - cp share/info/cpp.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/cppinternals.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/gcc.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/gccinstall.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/gccint.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/libgomp.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/libquadmath.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - + cp share/info/cpp.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/cppinternals.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gcc.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gccinstall.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gccint.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/libgomp.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/libquadmath.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + #cp share/locale/* ${pkgdir}${MINGW_PREFIX}/share/locale/ mkdir -p ${pkgdir}${MINGW_PREFIX}/share/gcc-${pkgver}/python - cp -r share/gcc-${pkgver}/python/libstdcxx ${pkgdir}${MINGW_PREFIX}/share/gcc-${pkgver}/python/ + cp -r share/gcc-${pkgver}/python/libstdcxx ${pkgdir}${MINGW_PREFIX}/share/gcc-${pkgver}/python/ mkdir -p ${pkgdir}${MINGW_PREFIX}/share/man/man1 - cp share/man/man1/cpp.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - cp share/man/man1/gcc.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - cp share/man/man1/gcov.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - cp share/man/man7/fsf-funding.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - cp share/man/man7/gfdl.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - cp share/man/man7/gpl.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ - cp share/man/man1/g++.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/cpp.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/gcc.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/gcov.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man7/fsf-funding.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man7/gfdl.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man7/gpl.7* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/g++.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ } package_mingw-w64-gcc-libgfortran() { pkgdesc="GNU Compiler Collection (libgfortran) for MinGW-w64" - depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-libs=${pkgver}") - + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-libs=${pkgver}-${pkgrel}") + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin cd ${srcdir}${MINGW_PREFIX} - cp bin/libgfortran*.dll ${pkgdir}${MINGW_PREFIX}/bin/ + cp bin/libgfortran*.dll ${pkgdir}${MINGW_PREFIX}/bin/ } package_mingw-w64-gcc-fortran() { pkgdesc="GNU Compiler Collection (Fortran) for MinGW-w64" - depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}" "${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran=${pkgver}") - + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}-${pkgrel}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-libgfortran=${pkgver}-${pkgrel}") + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,share} - + cd ${srcdir}${MINGW_PREFIX} cp bin/gfortran.exe ${pkgdir}${MINGW_PREFIX}/bin/ cp bin/${MINGW_CHOST}-gfortran.exe ${pkgdir}${MINGW_PREFIX}/bin/ - + #cp bin/libgfortran*.dll ${pkgdir}${MINGW_PREFIX}/bin/ - + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver} - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/finclude ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/f951.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libcaf_single.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgfortran* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/finclude ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/f951.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libcaf_single.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libgfortran* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ mkdir -p ${pkgdir}${MINGW_PREFIX}/share/man/man1 - cp share/man/man1/gfortran.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ + cp share/man/man1/gfortran.1* ${pkgdir}${MINGW_PREFIX}/share/man/man1/ mkdir -p ${pkgdir}${MINGW_PREFIX}/share/info - cp share/info/gfortran.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gfortran.info* ${pkgdir}${MINGW_PREFIX}/share/info/ } package_mingw-w64-gcc-ada() { pkgdesc="GNU Compiler Collection (Ada) for MinGW-w64" - depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}") + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}-${pkgrel}") mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,share} - + cd ${srcdir}${MINGW_PREFIX} cp bin/gnat*.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatbind.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatchop.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatclean.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatdll.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatfind.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatkr.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatlink.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatls.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatmake.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatname.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatprep.exe ${pkgdir}${MINGW_PREFIX}/bin/ - # cp bin/gnatxref.exe ${pkgdir}${MINGW_PREFIX}/bin/ - - cp bin/{libgnarl*,libgnat*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/adalib - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/adainclude ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/adalib ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/gnat1.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - + cp bin/{libgnarl*,libgnat*}.dll ${pkgdir}${MINGW_PREFIX}/bin/ + + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver} + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/adainclude ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/adalib ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/gnat1.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/info - cp share/info/gnat-style.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/gnat_rm.info* ${pkgdir}${MINGW_PREFIX}/share/info/ - cp share/info/gnat_ugn.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gnat-style.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gnat_rm.info* ${pkgdir}${MINGW_PREFIX}/share/info/ + cp share/info/gnat_ugn.info* ${pkgdir}${MINGW_PREFIX}/share/info/ } package_mingw-w64-gcc-objc() { pkgdesc="GNU Compiler Collection (ObjC,Obj-C++) for MinGW-w64" - depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}") - + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}-${pkgrel}") + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib} - + cd ${srcdir}${MINGW_PREFIX} cp bin/libobjc*.dll ${pkgdir}${MINGW_PREFIX}/bin/ - + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include - cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include/objc ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1obj.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/libobjc.* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ - cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1objplus.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp -r lib/gcc/${MINGW_CHOST}/${pkgver}/include/objc ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/include/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1obj.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/libobjc.* ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ + cp lib/gcc/${MINGW_CHOST}/${pkgver}/cc1objplus.exe ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/ } # Wrappers for package functions diff --git a/mingw-w64-gd/PKGBUILD b/mingw-w64-gd/PKGBUILD index 0b54465e43..d54add36c2 100644 --- a/mingw-w64-gd/PKGBUILD +++ b/mingw-w64-gd/PKGBUILD @@ -1,37 +1,37 @@ # Maintainer: Alexey Pavlov _realname=gd - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.1.0 -pkgrel=2 +pkgver=2.1.1 +pkgrel=3 pkgdesc='Library for the dynamic creation of images by programmers (mingw-w64)' url='http://www.libgd.org/' arch=('any') license=("CPL") options=(!libtool strip staticlibs) -depends=( - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libvpx" - "${MINGW_PACKAGE_PREFIX}-xpm-nox" - ) -optdepends=('perl: bdftogd script') -source=("https://bitbucket.org/libgd/gd-libgd/downloads/libgd-${pkgver}.tar.xz") -md5sums=('03588159bf4faab9079849c8d709acc6') +depends=("${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libvpx" + "${MINGW_PACKAGE_PREFIX}-xpm-nox") +#optdepends=('perl: bdftogd script') +source=("https://bitbucket.org/libgd/gd-libgd/downloads/libgd-${pkgver}.tar.xz" + "php-gd-newvpx.patch") +md5sums=('9076f3abd1f9815d106da36467ea15bc' + '96a607c9f9fa90050943a08ab6c254d6') prepare() { cd ${srcdir}/libgd-${pkgver} + patch -p1 -i ${srcdir}/php-gd-newvpx.patch } build() { export lt_cv_deplibs_check_method='pass_all' [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" + ../libgd-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -40,11 +40,13 @@ build() { --enable-shared \ LIBXPM_CFLAGS="-I${MINGW_PREFIX}/include/noX" \ LIBXPM_LIBS="-L${MINGW_PREFIX}/lib -lXpm" + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make -j1 DESTDIR="${pkgdir}" install + + install -Dm644 ${srcdir}/libgd-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/libgd/LICENSE } diff --git a/mingw-w64-gd/php-gd-newvpx.patch b/mingw-w64-gd/php-gd-newvpx.patch new file mode 100644 index 0000000000..4fd16e59fd --- /dev/null +++ b/mingw-w64-gd/php-gd-newvpx.patch @@ -0,0 +1,25 @@ +diff -urN a/src/webpimg.c b/src/webpimg.c +--- a/src/webpimg.c 2015-04-15 13:43:00.000000000 +0300 ++++ b/src/webpimg.c 2015-04-18 11:46:36.247244985 +0300 +@@ -706,14 +722,14 @@ + codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0); + codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2); + +- vpx_img_wrap(&img, IMG_FMT_I420, ++ vpx_img_wrap(&img, VPX_IMG_FMT_I420, + y_width, y_height, 16, (uint8*)(Y)); +- img.planes[PLANE_Y] = (uint8*)(Y); +- img.planes[PLANE_U] = (uint8*)(U); +- img.planes[PLANE_V] = (uint8*)(V); +- img.stride[PLANE_Y] = y_stride; +- img.stride[PLANE_U] = uv_stride; +- img.stride[PLANE_V] = uv_stride; ++ img.planes[VPX_PLANE_Y] = (uint8*)(Y); ++ img.planes[VPX_PLANE_U] = (uint8*)(U); ++ img.planes[VPX_PLANE_V] = (uint8*)(V); ++ img.stride[VPX_PLANE_Y] = y_stride; ++ img.stride[VPX_PLANE_U] = uv_stride; ++ img.stride[VPX_PLANE_V] = uv_stride; + + res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY); + diff --git a/mingw-w64-gdal/01-sqlite387-r27950.patch b/mingw-w64-gdal/01-sqlite387-r27950.patch deleted file mode 100644 index 409dcbd8cd..0000000000 --- a/mingw-w64-gdal/01-sqlite387-r27950.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp (revision 27729) -+++ b/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp (revision 27950) -@@ -36,4 +36,23 @@ - #ifdef HAVE_SQLITE_VFS - -+/************************************************************************/ -+/* OGR2SQLITE_Register() */ -+/************************************************************************/ -+ -+CPL_C_START -+int CPL_DLL OGR2SQLITE_static_register (sqlite3* hDB, char **pzErrMsg, void* pApi); -+CPL_C_END -+ -+/* We call this function so that each time a db is created, */ -+/* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */ -+/* structure with the right pointers. */ -+/* We need to declare this function before including sqlite3ext.h, since */ -+/* sqlite 3.8.7, sqlite3_auto_extension can be a macro (#5725) */ -+ -+void OGR2SQLITE_Register() -+{ -+ sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register); -+} -+ - #define VIRTUAL_OGR_DYNAMIC_EXTENSION_ENABLED - //#define DEBUG_OGR2SQLITE -@@ -2401,16 +2420,11 @@ - /************************************************************************/ - --CPL_C_START --int CPL_DLL OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg, -- const sqlite3_api_routines * pApi); --CPL_C_END -- - #ifndef WIN32 - extern const struct sqlite3_api_routines OGRSQLITE_static_routines; - #endif - --int OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg, -- const sqlite3_api_routines * pApi) --{ -+int OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg, void * _pApi) -+{ -+ const sqlite3_api_routines * pApi = (const sqlite3_api_routines * )_pApi; - #ifndef WIN32 - if( pApi->create_module == NULL ) -@@ -2448,16 +2462,3 @@ - } - --/************************************************************************/ --/* OGR2SQLITE_Register() */ --/************************************************************************/ -- --/* We call this function so that each time a db is created, */ --/* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */ --/* structure with the right pointers. */ -- --void OGR2SQLITE_Register() --{ -- sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register); --} -- - #endif // HAVE_SQLITE_VFS diff --git a/mingw-w64-gdal/PKGBUILD b/mingw-w64-gdal/PKGBUILD index 03abe5245f..7fe51b9599 100644 --- a/mingw-w64-gdal/PKGBUILD +++ b/mingw-w64-gdal/PKGBUILD @@ -4,32 +4,50 @@ # Contributor: William Rea _realname=gdal +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.11.1 +pkgver=2.0.1 pkgrel=2 pkgdesc="A translator library for raster geospatial data formats (mingw-w64)" arch=('any') url="http://www.gdal.org/" license=('custom') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "automake" "autoconf") -depends=("${MINGW_PACKAGE_PREFIX}-geos" "${MINGW_PACKAGE_PREFIX}-curl" "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-giflib" "${MINGW_PACKAGE_PREFIX}-libjpeg" "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libgeotiff" "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-libfreexl" "${MINGW_PACKAGE_PREFIX}-pcre" - "${MINGW_PACKAGE_PREFIX}-cfitsio" "${MINGW_PACKAGE_PREFIX}-xz" "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-proj" "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-libspatialite" "${MINGW_PACKAGE_PREFIX}-hdf5" "${MINGW_PACKAGE_PREFIX}-poppler" - "${MINGW_PACKAGE_PREFIX}-postgresql" "${MINGW_PACKAGE_PREFIX}-xerces-c") -options=(strip) +depends=("${MINGW_PACKAGE_PREFIX}-cfitsio" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-geos" + "${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-json-c" + "${MINGW_PACKAGE_PREFIX}-libfreexl" + "${MINGW_PACKAGE_PREFIX}-libgeotiff" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libspatialite" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-openjpeg2" + "${MINGW_PACKAGE_PREFIX}-pcre" + "${MINGW_PACKAGE_PREFIX}-poppler" + "${MINGW_PACKAGE_PREFIX}-postgresql" + "${MINGW_PACKAGE_PREFIX}-proj" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-xerces-c" + "${MINGW_PACKAGE_PREFIX}-xz") +options=('strip' 'staticlibs') -source=(http://download.osgeo.org/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz - 01-sqlite387-r27950.patch) -sha256sums=('f46b5944a8cabc8516673f231f466131cdfd2cdc6677dbee5d96ec7fc58a3340' - 'be80696d6520d7a6c8fda0b3fc3f66c8b3415c371f76c8e2bfb63d3a544b1c1e') +source=(http://download.osgeo.org/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz) +sha256sums=('b55f794768e104a2fd0304eaa61bb8bda3dc7c4e14f2c9d0913baca3e55b83ab') prepare() { - cd "${srcdir}/${_realname}-$pkgver" - patch -p1 -i ${srcdir}/01-sqlite387-r27950.patch + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + sed -i "s|/usr/local|${MINGW_PREFIX}|g" configure.in sed -i "s|/usr|${MINGW_PREFIX}|g" configure.in sed -i "s|mandir='\${prefix}/man'|mandir='\${prefix}/share/man'|g" configure.in @@ -41,7 +59,7 @@ prepare() { } build() { - cd "${srcdir}/${_realname}-$pkgver" + cd "${srcdir}/build-${MINGW_CHOST}" CFLAGS+=" -fno-strict-aliasing" @@ -60,12 +78,12 @@ build() { sed -i GDALmake.opt -e "s|EXE_DEP_LIBS.*|EXE_DEP_LIBS = \$\(GDAL_SLIB\)|g" sed -i GNUmakefile -e "s|\$(GDAL_ROOT)\/||g" - make + make # make man } package () { - cd "${srcdir}/${_realname}-$pkgver" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" install-man diff --git a/mingw-w64-gdb-git/0001-MinGW-w64-Two-fixes-for-unusual-files.patch b/mingw-w64-gdb-git/0001-MinGW-w64-Two-fixes-for-unusual-files.patch new file mode 100644 index 0000000000..25f6f00f1a --- /dev/null +++ b/mingw-w64-gdb-git/0001-MinGW-w64-Two-fixes-for-unusual-files.patch @@ -0,0 +1,121 @@ +From 85062d02b4759b3b3e027e82dedc87fdf84d6c69 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:39:35 +0000 +Subject: [PATCH 1/4] MinGW-w64: Two fixes for 'unusual' files. + +Handle isatty() files better. +Pretend 'nul' is '/dev/null' which is necessary for libtool. +--- + binutils/bucomm.c | 19 +++++++++++++++++-- + binutils/elfedit.c | 15 ++++++++++++++- + binutils/readelf.c | 15 ++++++++++++++- + 3 files changed, 45 insertions(+), 4 deletions(-) + +diff --git a/binutils/bucomm.c b/binutils/bucomm.c +index 4621e60..e6a20eb 100644 +--- a/binutils/bucomm.c ++++ b/binutils/bucomm.c +@@ -574,6 +574,14 @@ off_t + get_file_size (const char * file_name) + { + struct stat statbuf; ++ int f, t; ++ t = -1; ++ f = open (file_name, O_RDONLY | O_BINARY); ++ if (f != 0) ++ { ++ t = isatty (f); ++ close (f); ++ } + + if (stat (file_name, &statbuf) < 0) + { +@@ -583,8 +591,15 @@ get_file_size (const char * file_name) + non_fatal (_("Warning: could not locate '%s'. reason: %s"), + file_name, strerror (errno)); + } +- else if (! S_ISREG (statbuf.st_mode)) +- non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); ++ else if (! S_ISREG (statbuf.st_mode) || t > 0) ++ { ++#ifdef _WIN32 ++ /* libtool passes /dev/null and checks for /dev/null in the output */ ++ if (stricmp (file_name, "nul") == 0) ++ file_name = "/dev/null"; ++#endif ++ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); ++ } + else if (statbuf.st_size < 0) + non_fatal (_("Warning: '%s' has negative size, probably it is too large"), + file_name); +diff --git a/binutils/elfedit.c b/binutils/elfedit.c +index 02b9c98..fb0eadf 100644 +--- a/binutils/elfedit.c ++++ b/binutils/elfedit.c +@@ -483,6 +483,14 @@ static int + check_file (const char *file_name, struct stat *statbuf_p) + { + struct stat statbuf; ++ int f, t; ++ t = -1; ++ f = open (file_name, O_RDONLY | O_BINARY); ++ if (f != 0) ++ { ++ t = isatty (f); ++ close (f); ++ } + + if (statbuf_p == NULL) + statbuf_p = &statbuf; +@@ -497,8 +505,13 @@ check_file (const char *file_name, struct stat *statbuf_p) + return 1; + } + +- if (! S_ISREG (statbuf_p->st_mode)) ++ if (! S_ISREG (statbuf_p->st_mode) || t > 0) + { ++#ifdef _WIN32 ++ /* libtool passes /dev/null and checks for /dev/null in the output */ ++ if (stricmp (file_name, "nul") == 0) ++ file_name = "/dev/null"; ++#endif + error (_("'%s' is not an ordinary file\n"), file_name); + return 1; + } +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 70a84e5..229a5f5 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -16523,6 +16523,14 @@ process_file (char * file_name) + struct stat statbuf; + char armag[SARMAG]; + int ret; ++ int f, t; ++ t = -1; ++ f = open (file_name, O_RDONLY | O_BINARY); ++ if (f != 0) ++ { ++ t = isatty (f); ++ close (f); ++ } + + if (stat (file_name, &statbuf) < 0) + { +@@ -16534,8 +16542,13 @@ process_file (char * file_name) + return 1; + } + +- if (! S_ISREG (statbuf.st_mode)) ++ if (! S_ISREG (statbuf.st_mode) || t > 0) + { ++#ifdef _WIN32 ++ /* libtool passes /dev/null and checks for /dev/null in the output */ ++ if (stricmp (file_name, "nul") == 0) ++ file_name = "/dev/null"; ++#endif + error (_("'%s' is not an ordinary file\n"), file_name); + return 1; + } +-- +2.6.2 + diff --git a/mingw-w64-gdb-git/0002-MinGW-w64-Fix-libiberty-makefile.patch b/mingw-w64-gdb-git/0002-MinGW-w64-Fix-libiberty-makefile.patch new file mode 100644 index 0000000000..1f62ae1139 --- /dev/null +++ b/mingw-w64-gdb-git/0002-MinGW-w64-Fix-libiberty-makefile.patch @@ -0,0 +1,57 @@ +From ed9ad8527fb28ca26279bcf77f5d78cb25e5eb05 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:39:48 +0000 +Subject: [PATCH 2/4] MinGW-w64: Fix libiberty makefile + +--- + libiberty/Makefile.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 9b87720..eddde49 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -130,7 +130,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \ + d-demangle.c dwarfnames.c dyn-string.c \ + fdmatch.c ffs.c fibheap.c filename_cmp.c floatformat.c \ + fnmatch.c fopen_unlocked.c \ +- getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \ ++ getcwd.c getpagesize.c getpwd.c getruntime.c \ + gettimeofday.c \ + hashtab.c hex.c \ + index.c insque.c \ +@@ -155,8 +155,8 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \ + strtoul.c strndup.c strnlen.c strverscmp.c \ + timeval-utils.c tmpnam.c \ + unlink-if-ordinary.c \ +- vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \ +- waitpid.c \ ++ vasprintf.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \ ++ msdos.c \ + xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c \ + xstrndup.c + +@@ -172,7 +172,7 @@ REQUIRED_OFILES = \ + ./fdmatch.$(objext) ./fibheap.$(objext) \ + ./filename_cmp.$(objext) ./floatformat.$(objext) \ + ./fnmatch.$(objext) ./fopen_unlocked.$(objext) \ +- ./getopt.$(objext) ./getopt1.$(objext) ./getpwd.$(objext) \ ++ ./getpwd.$(objext) \ + ./getruntime.$(objext) ./hashtab.$(objext) ./hex.$(objext) \ + ./lbasename.$(objext) ./lrealpath.$(objext) \ + ./make-relative-prefix.$(objext) ./make-temp-file.$(objext) \ +@@ -221,9 +221,9 @@ CONFIGURED_OFILES = ./asprintf.$(objext) ./atexit.$(objext) \ + ./strrchr.$(objext) ./strstr.$(objext) ./strtod.$(objext) \ + ./strtol.$(objext) ./strtoul.$(objext) ./strverscmp.$(objext) \ + ./tmpnam.$(objext) \ +- ./vasprintf.$(objext) ./vfork.$(objext) ./vfprintf.$(objext) \ ++ ./vasprintf.$(objext) ./vfprintf.$(objext) \ + ./vprintf.$(objext) ./vsnprintf.$(objext) ./vsprintf.$(objext) \ +- ./waitpid.$(objext) ++ ./msdos.$(objext) + + # These files are installed if the library has been configured to do so. + INSTALLED_HEADERS = \ +-- +2.6.2 + diff --git a/mingw-w64-gdb-git/0003-MinGW-w64-Fix-libibery-configure.patch b/mingw-w64-gdb-git/0003-MinGW-w64-Fix-libibery-configure.patch new file mode 100644 index 0000000000..0bd5e19ca9 --- /dev/null +++ b/mingw-w64-gdb-git/0003-MinGW-w64-Fix-libibery-configure.patch @@ -0,0 +1,99 @@ +From 36e94c3ebc68f839a97f71a13e8b917ec0351cb8 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:40:03 +0000 +Subject: [PATCH 2/4] MinGW-w64: Fix libibery configure + +--- + libiberty/configure | 16 +--------------- + libiberty/configure.ac | 6 +----- + 2 files changed, 2 insertions(+), 20 deletions(-) + +diff --git a/libiberty/configure b/libiberty/configure +index d8890a1..efb376c 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5684,7 +5684,6 @@ funcs="$funcs vfprintf" + funcs="$funcs vprintf" + funcs="$funcs vsnprintf" + funcs="$funcs vsprintf" +-funcs="$funcs waitpid" + funcs="$funcs setproctitle" + + # Also in the old function.def file: alloca, vfork, getopt. +@@ -6051,13 +6050,6 @@ esac + ;; + esac + +- case " $LIBOBJS " in +- *" waitpid.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" +- ;; +-esac +- +- + for f in $funcs; do + case "$f" in + asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid) +@@ -6198,12 +6190,6 @@ esac + esac + + case " $LIBOBJS " in +- *" vfork.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS vfork.$ac_objext" +- ;; +-esac +- +- case " $LIBOBJS " in + *" waitpid.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" + ;; +@@ -6665,7 +6651,7 @@ fi + if test $ac_cv_func_vfork_works = no; then + case " $LIBOBJS " in + *" vfork.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ++ *) + ;; + esac + +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 868be8e..05f9401 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -381,7 +381,6 @@ funcs="$funcs vfprintf" + funcs="$funcs vprintf" + funcs="$funcs vsnprintf" + funcs="$funcs vsprintf" +-funcs="$funcs waitpid" + funcs="$funcs setproctitle" + + # Also in the old function.def file: alloca, vfork, getopt. +@@ -482,6 +481,7 @@ if test -n "${with_target_subdir}"; then + AC_LIBOBJ([insque]) + AC_LIBOBJ([mempcpy]) + AC_LIBOBJ([mkstemps]) ++ AC_LIBOBJ([msdos]) + AC_LIBOBJ([random]) + AC_LIBOBJ([rindex]) + AC_LIBOBJ([sigsetmask]) +@@ -491,7 +491,6 @@ if test -n "${with_target_subdir}"; then + AC_LIBOBJ([strnlen]) + AC_LIBOBJ([strverscmp]) + AC_LIBOBJ([vasprintf]) +- AC_LIBOBJ([waitpid]) + + for f in $funcs; do + case "$f" in +@@ -639,9 +638,6 @@ if test -z "${setobjs}"; then + AC_REPLACE_FUNCS($funcs) + libiberty_AC_FUNC_C_ALLOCA + AC_FUNC_FORK +- if test $ac_cv_func_vfork_works = no; then +- AC_LIBOBJ([vfork]) +- fi + # We only need _doprnt if we might use it to implement v*printf. + if test $ac_cv_func_vprintf != yes \ + || test $ac_cv_func_vfprintf != yes \ +-- +2.6.2 + diff --git a/mingw-w64-gdb-git/0004-MinGW-w64-Use-gnu-printf.patch b/mingw-w64-gdb-git/0004-MinGW-w64-Use-gnu-printf.patch new file mode 100644 index 0000000000..e6dc521503 --- /dev/null +++ b/mingw-w64-gdb-git/0004-MinGW-w64-Use-gnu-printf.patch @@ -0,0 +1,182 @@ +From 46d752aca5e7987b1668c75a3e2726506e8efd8b Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 31 Oct 2015 21:40:15 +0000 +Subject: [PATCH 3/4] MinGW-w64: Use gnu-printf + +--- + bfd/bfd-in.h | 2 +- + bfd/bfd-in2.h | 2 +- + binutils/nm.c | 4 ++-- + binutils/prdbg.c | 2 +- + binutils/readelf.c | 4 ++-- + gas/as.h | 4 ++-- + gas/read.c | 2 +- + gold/configure | 2 +- + gold/configure.ac | 2 +- + include/ansidecl.h | 4 ++-- + 10 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h +index 9e40df5..4c84467 100644 +--- a/bfd/bfd-in.h ++++ b/bfd/bfd-in.h +@@ -137,7 +137,7 @@ typedef BFD_HOST_U_64_BIT symvalue; + + #if BFD_HOST_64BIT_LONG + #define BFD_VMA_FMT "l" +-#elif defined (__MSVCRT__) ++#elif defined(__MSVCRT__) && !defined( __USE_MINGW_ANSI_STDIO) + #define BFD_VMA_FMT "I64" + #else + #define BFD_VMA_FMT "ll" +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index e2e247d..57ee655 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -144,7 +144,7 @@ typedef BFD_HOST_U_64_BIT symvalue; + + #if BFD_HOST_64BIT_LONG + #define BFD_VMA_FMT "l" +-#elif defined (__MSVCRT__) ++#elif defined (__MSVCRT__) && !defined(__USE_MINGW_ANSI_STDIO) + #define BFD_VMA_FMT "I64" + #else + #define BFD_VMA_FMT "ll" +diff --git a/binutils/nm.c b/binutils/nm.c +index ad6e70d..8256791 100644 +--- a/binutils/nm.c ++++ b/binutils/nm.c +@@ -162,7 +162,7 @@ static char value_format_32bit[] = "%08lx"; + #if BFD_HOST_64BIT_LONG + static char value_format_64bit[] = "%016lx"; + #elif BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + static char value_format_64bit[] = "%016llx"; + #else + static char value_format_64bit[] = "%016I64x"; +@@ -292,7 +292,7 @@ set_print_radix (char *radix) + #if BFD_HOST_64BIT_LONG + value_format_64bit[5] = *radix; + #elif BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + value_format_64bit[6] = *radix; + #else + value_format_64bit[7] = *radix; +diff --git a/binutils/prdbg.c b/binutils/prdbg.c +index 6e2b217..7550620 100644 +--- a/binutils/prdbg.c ++++ b/binutils/prdbg.c +@@ -502,7 +502,7 @@ print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp) + #if BFD_HOST_64BIT_LONG_LONG + else if (sizeof (vma) <= sizeof (unsigned long long)) + { +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + if (hexp) + sprintf (buf, "0x%llx", (unsigned long long) vma); + else if (unsignedp) +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 229a5f5..017f887 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -1150,7 +1150,7 @@ dump_relocations (FILE * file, + : "%12.12lx %12.12lx ", + offset, inf); + #elif BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + printf (do_wide + ? "%16.16llx %16.16llx " + : "%12.12llx %12.12llx ", +@@ -12204,7 +12204,7 @@ dump_section_as_strings (Elf_Internal_Shdr * section, FILE * file) + { + size_t maxlen = end - data; + +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + /* PR 11128: Use two separate invocations in order to work + around bugs in the Solaris 8 implementation of printf. */ + printf (" [%6tx] ", data - start); +diff --git a/gas/as.h b/gas/as.h +index 635b2c5..741ac19 100644 +--- a/gas/as.h ++++ b/gas/as.h +@@ -451,10 +451,10 @@ typedef struct _pseudo_type pseudo_typeS; + + #define PRINTF_LIKE(FCN) \ + void FCN (const char *format, ...) \ +- __attribute__ ((__format__ (__printf__, 1, 2))) ++ __attribute__ ((__format__ (gnu_printf, 1, 2))) + #define PRINTF_WHERE_LIKE(FCN) \ + void FCN (char *file, unsigned int line, const char *format, ...) \ +- __attribute__ ((__format__ (__printf__, 3, 4))) ++ __attribute__ ((__format__ (gnu_printf, 3, 4))) + + #else /* __GNUC__ < 2 || defined(VMS) */ + +diff --git a/gas/read.c b/gas/read.c +index 53440de..5f993a6 100644 +--- a/gas/read.c ++++ b/gas/read.c +@@ -4352,7 +4352,7 @@ emit_expr_with_reloc (expressionS *exp, + || (get & hibit) == 0)) + { /* Leading bits contain both 0s & 1s. */ + #if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG +-#ifndef __MSVCRT__ ++#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO) + as_warn (_("value 0x%llx truncated to 0x%llx"), + (unsigned long long) get, (unsigned long long) use); + #else +diff --git a/gold/configure b/gold/configure +index 987a846..0e15f73 100755 +--- a/gold/configure ++++ b/gold/configure +@@ -7489,7 +7489,7 @@ else + /* end confdefs.h. */ + + template extern void foo(const char*, ...) +- __attribute__ ((__format__ (__printf__, 1, 2))); ++ __attribute__ ((__format__ (gnu_printf, 1, 2))); + template void foo(const char* format, ...) {} + void bar() { foo("%s\n", "foo"); } + +diff --git a/gold/configure.ac b/gold/configure.ac +index 89f6c53..2f87621 100644 +--- a/gold/configure.ac ++++ b/gold/configure.ac +@@ -616,7 +616,7 @@ AC_CACHE_CHECK([whether we can use attributes with template functions], + [gold_cv_template_attribute], + [AC_COMPILE_IFELSE([ + template extern void foo(const char*, ...) +- __attribute__ ((__format__ (__printf__, 1, 2))); ++ __attribute__ ((__format__ (gnu_printf, 1, 2))); + template void foo(const char* format, ...) {} + void bar() { foo("%s\n", "foo"); } + ], [gold_cv_template_attribute=yes], [gold_cv_template_attribute=no])]) +diff --git a/include/ansidecl.h b/include/ansidecl.h +index 6e4bfc2..ae7e9ab 100644 +--- a/include/ansidecl.h ++++ b/include/ansidecl.h +@@ -195,7 +195,7 @@ So instead we use the macro below and test it against specific values. */ + before GCC 3.3, but as of 3.3 we need to add the `nonnull' + attribute to retain this behavior. */ + #ifndef ATTRIBUTE_PRINTF +-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m) ++#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) ATTRIBUTE_NONNULL(m) + #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) + #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) + #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) +@@ -223,7 +223,7 @@ So instead we use the macro below and test it against specific values. */ + NULL format specifier was allowed as of gcc 3.3. */ + #ifndef ATTRIBUTE_NULL_PRINTF + # if (GCC_VERSION >= 3003) +-# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ++# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) + # else + # define ATTRIBUTE_NULL_PRINTF(m, n) + # endif /* GNUC >= 3.3 */ +-- +2.6.2 + diff --git a/mingw-w64-gdb-git/0005-GDB-performance.patch b/mingw-w64-gdb-git/0005-GDB-performance.patch new file mode 100644 index 0000000000..5521218fff --- /dev/null +++ b/mingw-w64-gdb-git/0005-GDB-performance.patch @@ -0,0 +1,26 @@ +From fb7c98b413fd7020413bd0b280fa05e7bf5ae3a9 Mon Sep 17 00:00:00 2001 +From: dje/asmwarrior +Date: Mon, 2 Nov 2015 22:25:33 +0000 +Subject: [PATCH] GDB performance + +http://sourceware.org/bugzilla/show_bug.cgi?id=15412 +--- + gdb/typeprint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/typeprint.c b/gdb/typeprint.c +index 377223a..e919112 100644 +--- a/gdb/typeprint.c ++++ b/gdb/typeprint.c +@@ -59,7 +59,7 @@ const struct type_print_options type_print_raw_options = + + static struct type_print_options default_ptype_flags = + { +- 0, /* raw */ ++ 1, /* raw */ + 1, /* print_methods */ + 1, /* print_typedefs */ + NULL, /* local_typedefs */ +-- +2.6.2 + diff --git a/mingw-w64-gdb-git/PKGBUILD b/mingw-w64-gdb-git/PKGBUILD new file mode 100644 index 0000000000..9c4efed4f4 --- /dev/null +++ b/mingw-w64-gdb-git/PKGBUILD @@ -0,0 +1,114 @@ +# Maintainer: Ray Donnelly +# Contributor: Alexey Pavlov + +_realname=gdb +_gcc_ver=5.2.0 +pkgbase=mingw-w64-${_realname} +_base_ver=7.10 +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +replaces="${MINGW_PACKAGE_PREFIX}-${_realname}=${_base_ver}" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=7.10.r85475.f5cc5a5 +pkgrel=1 +pkgdesc="GNU Debugger (mingw-w64)" +arch=('any') +url="http://www.gnu.org/software/gdb/" +license=('GPL') +#groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +depends=("${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-zlib") +#checkdepends=('dejagnu' 'bc') +makedepends=("${MINGW_PACKAGE_PREFIX}-iconv" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-xz" + "git") +options=('staticlibs' '!distcc' '!ccache' 'debug' '!strip') +source=("${_realname}"::"git://sourceware.org/git/binutils-gdb.git#branch=users/palves/mingw-cxx-conversion" + gdbinit + 0001-MinGW-w64-Two-fixes-for-unusual-files.patch + 0002-MinGW-w64-Fix-libiberty-makefile.patch + 0003-MinGW-w64-Fix-libibery-configure.patch + 0004-MinGW-w64-Use-gnu-printf.patch + 0005-GDB-performance.patch) +md5sums=('SKIP' + 'be1c16674d98189a6f18dc0f5922c739' + '8f21d3c0c2d07a8e7717625fca4410ab' + '52b62ba647ee0f27d70bcfa6c7bac5b9' + '6c854b3f155f82c14048338b250d7c63' + 'f614db2fdc6c6bf06a0797f395a847bc' + '4e9d7f210eaa3c50b6bfd2f941454f4f') + +pkgver() { + cd "$srcdir/$_realname" + printf "%s.r%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${srcdir}/${_realname} + git am "${srcdir}"/0001-MinGW-w64-Two-fixes-for-unusual-files.patch +# Does not apply currently; probably want to sync libiberty across from GCC. +# git am "${srcdir}"/0002-MinGW-w64-Fix-libiberty-makefile.patch + git am "${srcdir}"/0003-MinGW-w64-Fix-libibery-configure.patch + git am "${srcdir}"/0004-MinGW-w64-Use-gnu-printf.patch + git am "${srcdir}"/0005-GDB-performance.patch +} + +build() { + declare -a _extra_conf + if [ "${CARCH}" = "x86_64" ]; then + _extra_conf+=(--enable-64-bit-bfd) + else + LDFLAGS+=" -Wl,--large-address-aware" + fi + + if check_option "debug" "y"; then + CFLAGS+=" -O0" + fi + + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}/configure \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --enable-targets="i686-w64-mingw32,x86_64-w64-mingw32" \ + "${_extra_conf[@]}" \ + --disable-werror \ + --disable-win32-registry \ + --disable-rpath \ + --with-system-gdbinit=${MINGW_PREFIX}/etc/gdbinit \ + --with-python=${MINGW_PREFIX}/bin/python-config-u.sh \ + --with-expat \ + --with-libiconv-prefix=${MINGW_PREFIX} \ + --with-zlib \ + --with-lzma \ + --disable-tui + + make all-gdb +} + +# check() { +# cd "${srcdir}"/build-${MINGW_CHOST} +# +# # unset LDFLAGS as testsuite makes assumptions about which ones are active +# # do not abort on errors - manually check log files +# make LDFLAGS="" -k check || true +# } + +package() { + cd "${srcdir}"/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install-gdb + + # Remove unwanted files + rm -rf ${pkgdir}${MINGW_PREFIX}/share/{man,info} + + # install "custom" system gdbinit + install -D -m644 ${srcdir}/gdbinit ${pkgdir}${MINGW_PREFIX}/etc/gdbinit + sed -i 's|%GCC_NAME%|gcc-'${_gcc_ver}'|g' ${pkgdir}${MINGW_PREFIX}/etc/gdbinit +} diff --git a/mingw-w64-gdb-git/gdbinit b/mingw-w64-gdb-git/gdbinit new file mode 100644 index 0000000000..cf2f8b7847 --- /dev/null +++ b/mingw-w64-gdb-git/gdbinit @@ -0,0 +1,5 @@ +python +import sys +sys.path.insert(0, sys.path[0] + '/../../%GCC_NAME%/python') +from libstdcxx.v6.printers import register_libstdcxx_printers +end diff --git a/mingw-w64-gdb/PKGBUILD b/mingw-w64-gdb/PKGBUILD index 56548a688c..2267b8e5cd 100644 --- a/mingw-w64-gdb/PKGBUILD +++ b/mingw-w64-gdb/PKGBUILD @@ -2,38 +2,38 @@ # Contributor: Ray Donnelly _realname=gdb - -_gcc_ver=4.9.1 -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +_gcc_ver=5.3.0 +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" # Until https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62279 is # fixed, we will stick with 7.6.2 which hasn't got this bug.. -#pkgver=7.8.1 -pkgver=7.6.2 +pkgver=7.10.1 pkgrel=1 pkgdesc="GNU Debugger (mingw-w64)" arch=('any') url="http://www.gnu.org/software/gdb/" license=('GPL') groups=("${MINGW_PACKAGE_PREFIX}-toolchain") -depends=("${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-expat" +depends=("${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-python2") + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-zlib") checkdepends=('dejagnu' 'bc') -makedepends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-ncurses" "${MINGW_PACKAGE_PREFIX}-xz") +makedepends=("${MINGW_PACKAGE_PREFIX}-iconv" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-xz") options=('staticlibs' '!distcc' '!ccache') -source=(http://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz{,.sig} +source=(http://ftp.gnu.org/gnu/gdb/${_realname}-${pkgver}.tar.xz{,.sig} 'gdbinit' 'gdb-fix-display-tabs-on-mingw.patch' -# 'gdb-mingw-gcc-4.7.patch' + #'gdb-mingw-gcc-4.7.patch' 'gdb-7.8.1-mingw-gcc-4.7.patch' 'gdb-7.6.2-mingw-gcc-4.7.patch' 'gdb-perfomance.patch' 'gdb-fix-using-gnu-print.patch') -md5sums=('8072be87a94be0936bc3b4b6941b0862' +md5sums=('39e654460c9cdd80200a29ac020cfe11' 'SKIP' - 'dec2439447cb1accf037457b459093f7' + 'be1c16674d98189a6f18dc0f5922c739' 'e48292d553379a9765c82e80e618ffd2' '8cc7f920caf4dddfc0d5d3fcd347ebb4' '7cc5df72d958ef3e4b1ffa9f7b069e6f' @@ -41,13 +41,13 @@ md5sums=('8072be87a94be0936bc3b4b6941b0862' 'd7112b220466a294aa266bb4d5c06a59') prepare() { - cd ${srcdir}/gdb-${pkgver} -set -x + cd ${srcdir}/${_realname}-${pkgver} + # https://sourceware.org/ml/gdb-patches/2013-11/msg00224.html #patch -p1 -i ${srcdir}/gdb-fix-display-tabs-on-mingw.patch # https://sourceware.org/bugzilla/show_bug.cgi?id=15559 # patch -p1 -i ${srcdir}/gdb-mingw-gcc-4.7.patch - patch -p1 -i ${srcdir}/gdb-${pkgver}-mingw-gcc-4.7.patch + # patch -p1 -i ${srcdir}/gdb-${pkgver}-mingw-gcc-4.7.patch # http://sourceware.org/bugzilla/show_bug.cgi?id=15412 patch -p1 -i ${srcdir}/gdb-perfomance.patch @@ -62,7 +62,7 @@ build() { mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/gdb-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ diff --git a/mingw-w64-gdb/gdb-7.9-mingw-gcc-4.7.patch b/mingw-w64-gdb/gdb-7.9-mingw-gcc-4.7.patch new file mode 100644 index 0000000000..ffe9d1e659 --- /dev/null +++ b/mingw-w64-gdb/gdb-7.9-mingw-gcc-4.7.patch @@ -0,0 +1,143 @@ + gdb/eval.c | 7 +++++++ + gdb/i386-tdep.c | 39 ++++++++++++++++++++++++++++++++++++++- + gdb/infcall.c | 23 +++++++++++++++++++++++ + 3 files changed, 68 insertions(+), 1 deletion(-) +--- a/gdb/eval.c ++++ a/gdb/eval.c +@@ -49,6 +49,10 @@ + /* This is defined in valops.c */ + extern int overload_resolution; + ++/* this variable is to notify i386_push_dummy_call that an ++ function is static member function, it is a hack */ ++extern int i386_windows_static_memfun; ++ + /* Prototypes for local functions. */ + + static struct value *evaluate_subexp_for_sizeof (struct expression *, int *); +@@ -1668,7 +1672,10 @@ evaluate_subexp_standard (struct type *expect_type, + argvec[1] = argvec[0]; + nargs--; + argvec++; ++ i386_windows_static_memfun = 1; + } ++ else ++ i386_windows_static_memfun = 0; + } + else if (op == STRUCTOP_MEMBER || op == STRUCTOP_MPTR) + { +--- a/gdb/i386-tdep.c ++++ a/gdb/i386-tdep.c +@@ -2396,6 +2396,15 @@ i386_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, + /* Keep the stack aligned. */ + return sp - 16; + } ++/* This is the hack to handle the non-static member function to thiscall ++ calling convention mode, this variable is updated in eval.c of the ++ static member function check */ ++int i386_windows_static_memfun = 0; ++ ++/* This is the hack to determine which version of gcc is used to generate ++ the function, if it is greater than 4.6, this use thiscall for member ++ function. */ ++int i386_windows_build_gt_gcc46 = 0; + + static CORE_ADDR + i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -2408,6 +2417,28 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + int i; + int write_pass; + int args_space = 0; ++ struct type *func_type = value_type (function); ++ int i386_windows_thiscall = 0; ++ ++ if (func_type) ++ { ++ func_type = check_typedef (func_type); ++ ++ if (TYPE_CODE (func_type) == TYPE_CODE_PTR) ++ func_type = check_typedef (TYPE_TARGET_TYPE (func_type)); ++ ++ if( (TYPE_CODE (func_type) == TYPE_CODE_METHOD) ++ && i386_windows_build_gt_gcc46 == 1 ++ && (nargs > 0) ++ && i386_windows_static_memfun == 0 ) ++ { ++ /* a.f(5,6); ++ args[0] = this pointer; ++ args[1] = 5; ++ args[2] = 6; */ ++ i386_windows_thiscall = 1; ++ } ++ } + + /* Determine the total space required for arguments and struct + return address in a first pass (allowing for 16-byte-aligned +@@ -2430,7 +2461,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + args_space += 4; + } + +- for (i = 0; i < nargs; i++) ++ for (i = i386_windows_thiscall; i < nargs; i++) + { + int len = TYPE_LENGTH (value_enclosing_type (args[i])); + +@@ -2482,6 +2513,12 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + /* ...and fake a frame pointer. */ + regcache_cooked_write (regcache, I386_EBP_REGNUM, buf); + ++ if (i386_windows_thiscall) ++ { ++ /* args[0] refer to the last argument which is the this pointer */ ++ regcache_cooked_write (regcache, I386_ECX_REGNUM, value_contents_all(args[0])); ++ } ++ + /* MarkK wrote: This "+ 8" is all over the place: + (i386_frame_this_id, i386_sigtramp_frame_this_id, + i386_dummy_id). It's there, since all frame unwinders for +--- a/gdb/infcall.c ++++ a/gdb/infcall.c +@@ -36,6 +36,12 @@ + #include "gdbthread.h" + #include "exceptions.h" + #include "event-top.h" ++#include "utils.h" ++ ++/* this value is defined in i386-tdep.c, and we set this value here ++ if the dummy call function is build from gcc 4.7 and later, we ++ should set this value to 1, other wise, set it to 0 */ ++extern int i386_windows_build_gt_gcc46; + + /* If we can't find a function's name from its address, + we print this instead. */ +@@ -480,6 +486,8 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) + ptid_t call_thread_ptid; + struct gdb_exception e; + char name_buf[RAW_FUNCTION_ADDRESS_SIZE]; ++ struct symtab *sym; ++ int gcc_minor; + + if (TYPE_CODE (ftype) == TYPE_CODE_PTR) + ftype = check_typedef (TYPE_TARGET_TYPE (ftype)); +@@ -745,6 +753,21 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) + } + else + args_cleanup = make_cleanup (null_cleanup, NULL); ++ ++ /* before we push the dummy call, we need to use the real_pc to determine ++ what gcc producer is used to generate this function, so it will notify ++ this information to i386-tdep.c */ ++ sym = find_pc_symtab(real_pc); ++ if (sym != NULL && sym->producer != NULL) ++ { ++ gcc_minor = producer_is_gcc_ge_4(sym->producer); ++ if (gcc_minor>6) ++ i386_windows_build_gt_gcc46 = 1; ++ else ++ i386_windows_build_gt_gcc46 = 0; ++ } ++ else ++ i386_windows_build_gt_gcc46 = 0; + + /* Create the dummy stack frame. Pass in the call dummy address as, + presumably, the ABI code knows where, in the call dummy, the diff --git a/mingw-w64-gdb/gdbinit b/mingw-w64-gdb/gdbinit index 57b4abb4d3..cf2f8b7847 100644 --- a/mingw-w64-gdb/gdbinit +++ b/mingw-w64-gdb/gdbinit @@ -2,5 +2,4 @@ python import sys sys.path.insert(0, sys.path[0] + '/../../%GCC_NAME%/python') from libstdcxx.v6.printers import register_libstdcxx_printers -register_libstdcxx_printers (None) -end \ No newline at end of file +end diff --git a/mingw-w64-gdbm/PKGBUILD b/mingw-w64-gdbm/PKGBUILD index de7bf9c5a8..82268ed24b 100644 --- a/mingw-w64-gdbm/PKGBUILD +++ b/mingw-w64-gdbm/PKGBUILD @@ -1,30 +1,31 @@ # Maintainer: Alexey Pavlov _realname=gdbm - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.10 -pkgrel=1 +pkgver=1.11 +pkgrel=3 pkgdesc="GNU database library (mingw-w64)" arch=('any') url="http://www.gnu.org/software/gdbm/gdbm.html" license=('GPL3') -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-libiconv" ) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-libiconv") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs') source=(ftp://ftp.gnu.org/gnu/gdbm/${_realname}-${pkgver}.tar.gz{,.sig} - 'gdbm-1.10-zeroheaders.patch' - 'gdbm-win32-support.patch') -md5sums=('88770493c2559dc80b561293e39d3570' + 'gdbm-1.10-zeroheaders.patch' + 'gdbm-win32-support.patch') +md5sums=('72c832680cf0999caedbe5b265c8c1bd' 'SKIP' 'ac255b10452005237836cd2d3a470733' - 'ce7d37d8d7cfc895ccd04a59adabbbbe') + 'eb46af0a7d4360526f9a39f181d1af21') prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/gdbm-1.10-zeroheaders.patch - patch -p1 -i ${srcdir}/gdbm-win32-support.patch + patch -p0 -i ${srcdir}/gdbm-win32-support.patch autoreconf --install --force } @@ -33,15 +34,15 @@ build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - - ${srcdir}/${_realname}-${pkgver}/configure \ + + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ - --enable-static \ - --enable-shared \ - --enable-libgdbm-compat + --enable-static \ + --enable-shared \ + --disable-libgdbm-compat make } diff --git a/mingw-w64-gdbm/gdbm-win32-support.patch b/mingw-w64-gdbm/gdbm-win32-support.patch index 0237132c96..d3ed942d2c 100644 --- a/mingw-w64-gdbm/gdbm-win32-support.patch +++ b/mingw-w64-gdbm/gdbm-win32-support.patch @@ -1,951 +1,326 @@ -From 49a6d868583051c80fa82ed87c79b9dae1a88eed Mon Sep 17 00:00:00 2001 -From: Hiroshi Shirosaki -Date: Wed, 4 Jul 2012 11:47:34 +0900 -Subject: [PATCH] Mingw port of gdbm 1.10 - -I fixed gdbm 1.10 based on existing gdbm 1.8.3 patch for Windows. -http://jarp.does.notwork.org/win32/gdbm-1.8.3-1-src.zip -http://gnuwin32.sourceforge.net/packages/gdbm.htm - -Additinal fixes: - -src/gdbmreorg.c: -Reorganize of gdbm doesn't work because file rename is not allowed -with opened files on Windows. Adding close/open file process fixes it. - -src/flatfile.c: -It doesn't exist in 1.8.3. I added fixes using winsock2.h. -compat/dbmopen.c has hard link related feature which doesn't work. -I fixed it using Windows API. - -`make check` executes tests for gdbm. It fails causes of CRLF newlines -and '.exe' of file names. I fixed it setting binary mode and adding -extention. - -I added some Makefile fixes. I did `autoreconf` on MinGW 1.0.17. It -needs `autopoint` command which is included in gettext package, but -devkit doesn't have. ---- - Makefile.in | 1 + - aclocal.m4 | 4 +-- - autoconf.h.in | 8 ++++- - compat/Makefile.am | 2 +- - compat/Makefile.in | 3 +- - compat/dbmopen.c | 46 ++++++++++++++++++++++++----- - doc/Makefile.in | 1 + - export/Makefile.in | 1 + - src/Makefile.am | 2 +- - src/Makefile.in | 3 +- - src/flatfile.c | 4 +++ - src/gdbmopen.c | 4 ++- - src/gdbmreorg.c | 32 ++++++++++++++++++-- - src/lock.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++-- - src/systems.h | 17 ++++++++++- - src/testgdbm.c | 4 +++ - tests/Makefile.in | 1 + - tests/dtdel.c | 8 ++++- - tests/dtdump.c | 8 ++++- - tests/dtfetch.c | 8 ++++- - tests/dtload.c | 9 +++++- - tests/gtdel.c | 8 ++++- - tests/gtdump.c | 8 ++++- - tests/gtfetch.c | 8 ++++- - tests/gtload.c | 8 ++++- - tests/gtopt.c | 10 ++++++- - tests/gtver.c | 5 ++++ - tests/num2word.c | 5 ++++ - tests/testsuite | 8 ++--- - 29 files changed, 275 insertions(+), 34 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 9f80d90..426f304 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -203,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - POSUB = @POSUB@ -diff --git a/aclocal.m4 b/aclocal.m4 -index 9080a65..58f2365 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -13,8 +13,8 @@ +--- configure.ac.orig 2012-11-21 22:34:12.148598606 +0100 ++++ configure.ac 2012-11-21 22:35:17.036673433 +0100 +@@ -112,6 +112,13 @@ + AM_CONDITIONAL([COMPAT_OPT], [test "$want_compat" = yes]) + AM_CONDITIONAL([ENABLE_EXPORT], [test "$want_export" = yes]) - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl --m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, --[m4_warning([this file was generated for autoconf 2.63. -+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -+[m4_warning([this file was generated for autoconf 2.68. - You have another version of autoconf. It may work, but is not guaranteed to. - If you have problems, you may need to regenerate the build system entirely. - To do so, use the procedure documented by the package, typically `autoreconf'.])]) -diff --git a/autoconf.h.in b/autoconf.h.in -index aff7024..997ef10 100644 ---- a/autoconf.h.in -+++ b/autoconf.h.in -@@ -82,12 +82,15 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_STRING_H - --/* Define to 1 if `st_blksize' is member of `struct stat'. */ -+/* Define to 1 if `st_blksize' is a member of `struct stat'. */ - #undef HAVE_STRUCT_STAT_ST_BLKSIZE - - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_FILE_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SYS_PARAM_H ++if test x$host_os = xmingw32 ++then ++ AM_CONDITIONAL(WIN32, true) ++else ++ AM_CONDITIONAL(WIN32, false) ++fi + - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_STAT_H + # Initialize the test suite. + AC_CONFIG_TESTDIR(tests) + AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) +--- src/Makefile.am.orig 2012-11-21 22:27:53.410325014 +0100 ++++ src/Makefile.am 2012-11-21 22:33:13.957634294 +0100 +@@ -65,7 +65,10 @@ + update.c\ + version.c -@@ -119,6 +122,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME +-libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) ++libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) -no-undefined ++if WIN32 ++libgdbm_la_LDFLAGS += -lws2_32 ++endif -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION + noinst_LIBRARIES = libgdbmapp.a -diff --git a/compat/Makefile.am b/compat/Makefile.am -index 42554b6..7c4ab15 100644 ---- a/compat/Makefile.am -+++ b/compat/Makefile.am -@@ -50,5 +50,5 @@ NDBM_CF=\ +--- src/update.c.orig 2012-11-21 22:25:32.667991693 +0100 ++++ src/update.c 2012-11-21 22:27:07.567564969 +0100 +@@ -39,8 +39,10 @@ + _gdbm_fatal (dbf, gdbm_strerror (rc)); - libgdbm_compat_la_SOURCES = $(DBM_CF) $(NDBM_CF) - --libgdbm_compat_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) -+libgdbm_compat_la_LDFLAGS = -no-undefined -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) - -diff --git a/compat/Makefile.in b/compat/Makefile.in -index 4994e01..fe46887 100644 ---- a/compat/Makefile.in -+++ b/compat/Makefile.in -@@ -208,6 +208,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - POSUB = @POSUB@ -@@ -305,7 +306,7 @@ NDBM_CF = \ - dbmrdonly.c - - libgdbm_compat_la_SOURCES = $(DBM_CF) $(NDBM_CF) --libgdbm_compat_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) -+libgdbm_compat_la_LDFLAGS = -no-undefined -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) - all: all-am - - .SUFFIXES: -diff --git a/compat/dbmopen.c b/compat/dbmopen.c -index 7a5127e..6110afb 100644 ---- a/compat/dbmopen.c -+++ b/compat/dbmopen.c -@@ -58,13 +58,17 @@ putint (unsigned char *cp, unsigned n) - - /* FIXME: revise return codes */ - static int --ndbm_open_dir_file0 (const char *file_name, int pagfd, int mode) -+ndbm_open_dir_file0 (const char *file_name, struct gdbm_file_info *pag, int mode) - { - int fd = -1; - struct stat st, pagst; - unsigned char dirbuf[DEF_DIR_SIZE]; - int flags = (mode & GDBM_OPENMASK) == GDBM_READER ? - O_RDONLY : O_RDWR; -+ int pagfd = pag->desc; -+#ifdef _WIN32 -+ HANDLE hFile; + /* Sync the file if fast_write is FALSE. */ ++#ifdef HAVE_FSYNC + if (dbf->fast_write == FALSE) + __fsync (dbf); +#endif + } - if (mode & GDBM_CLOEXEC) - flags |= O_CLOEXEC; -@@ -76,13 +80,40 @@ ndbm_open_dir_file0 (const char *file_name, int pagfd, int mode) - } - - /* Previous versions of GDBM linked pag to dir. Try to detect this: */ -+#ifdef _WIN32 -+ hFile = CreateFile(file_name, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, -+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, -+ NULL); -+ -+ if (hFile != INVALID_HANDLE_VALUE) -+ { -+ BY_HANDLE_FILE_INFORMATION fileInfo; -+ GetFileInformationByHandle (hFile, &fileInfo); -+ CloseHandle (hFile); -+ st.st_size = (fileInfo.nFileSizeHigh * MAXDWORD) + fileInfo.nFileSizeLow; -+ -+ if (fileInfo.nNumberOfLinks >= 2) -+ { -+ BY_HANDLE_FILE_INFORMATION pagInfo; -+ GetFileInformationByHandle ((HANDLE)_get_osfhandle (pagfd), &pagInfo); -+ if ((fileInfo.nFileIndexLow == pagInfo.nFileIndexLow) && -+ (fileInfo.nFileIndexHigh == pagInfo.nFileIndexHigh)) -+ { -+ /* Close pag because unlink dir file fails on Windows */ -+ close (pagfd); -+#else - if (stat (file_name, &st) == 0) - { - if (st.st_nlink >= 2) - { - if (st.st_dev == pagst.st_dev && st.st_ino == pagst.st_ino) - { -- if (unlink (file_name)) + +@@ -84,8 +86,10 @@ + if (rc) + _gdbm_fatal (dbf, gdbm_strerror (rc)); + dbf->directory_changed = FALSE; ++#ifdef HAVE_FSYNC + if (!dbf->header_changed && dbf->fast_write == FALSE) + __fsync (dbf); +#endif -+ int ret = unlink (file_name); -+#ifdef _WIN32 -+ pagfd = pag->desc = open(pag->name, flags | O_BINARY); + } + + /* Final write of the header. */ +--- src/gdbmsync.c.orig 2012-11-21 22:30:53.253304003 +0100 ++++ src/gdbmsync.c 2012-11-21 22:31:02.123450829 +0100 +@@ -31,7 +31,8 @@ + /* Initialize the gdbm_errno variable. */ + gdbm_errno = GDBM_NO_ERROR; + ++#ifdef HAVE_FSYNC + /* Do the sync on the file. */ + __fsync (dbf); +- +#endif -+ if (ret) - { - if ((mode & GDBM_OPENMASK) == GDBM_READER) - /* Ok, try to cope with it. */ -@@ -109,7 +140,7 @@ ndbm_open_dir_file0 (const char *file_name, int pagfd, int mode) + } +--- src/gdbmopen.c.orig 2012-11-21 22:29:23.495815449 +0100 ++++ src/gdbmopen.c 2012-11-21 22:29:37.659050171 +0100 +@@ -316,8 +316,10 @@ + return NULL; } - else - { -- fd = open (file_name, flags); -+ fd = open (file_name, flags | O_BINARY); - if (fd == -1) - { - gdbm_errno = GDBM_FILE_OPEN_ERROR; -@@ -141,7 +172,7 @@ ndbm_open_dir_file0 (const char *file_name, int pagfd, int mode) + ++#ifdef HAVE_FSYNC + /* Wait for initial configuration to be written to disk. */ + __fsync (dbf); ++#endif + + free (dbf->bucket); } - - /* File does not exist. Create it. */ -- fd = open (file_name, flags | O_CREAT, pagst.st_mode & 0777); -+ fd = open (file_name, flags | O_CREAT | O_BINARY, pagst.st_mode & 0777); - if (fd >= 0) - { - putint (dirbuf, GDBM_DIR_MAGIC); -@@ -161,10 +192,11 @@ ndbm_open_dir_file0 (const char *file_name, int pagfd, int mode) - } +--- src/gdbmclose.c.orig 2012-11-21 22:30:04.928503285 +0100 ++++ src/gdbmclose.c 2012-11-21 22:30:14.862667066 +0100 +@@ -31,9 +31,11 @@ + { + int index; /* For freeing the bucket cache. */ + ++#ifdef HAVE_FSYNC + /* Make sure the database is all on disk. */ + if (dbf->read_write != GDBM_READER) + __fsync (dbf); ++#endif + + /* Close the file and free all malloced memory. */ + #if HAVE_MMAP +--- src/gdbmreorg.c.orig 2012-11-21 22:30:26.776863411 +0100 ++++ src/gdbmreorg.c 2012-11-21 22:30:37.976049148 +0100 +@@ -207,8 +207,10 @@ + free (new_dbf); + free (new_name); + ++#ifdef HAVE_FSYNC + /* Make sure the new database is all on disk. */ + __fsync (dbf); ++#endif + + /* Force the right stuff for a correct bucket cache. */ + dbf->cache_entry = &dbf->bucket_cache[0]; +--- src/gdbmdump.c.orig 2015-01-01 22:10:46.464030280 +0100 ++++ src/gdbmdump.c 2015-01-01 22:11:29.762727347 +0100 +@@ -17,8 +17,6 @@ + # include "autoconf.h" + # include "gdbmdefs.h" + # include "gdbm.h" +-# include +-# include + # include static int --ndbm_open_dir_file (const char *base, int pagfd, int mode) -+ndbm_open_dir_file (const char *base, struct gdbm_file_info *pag, int mode) - { - char *file_name = malloc (strlen (base) + sizeof (DIRSUF)); +@@ -56,8 +54,6 @@ + time_t t; int fd; -+ int pagfd = pag->desc; + struct stat st; +- struct passwd *pw; +- struct group *gr; + datum key; + size_t count = 0; + unsigned char *buffer = NULL; +@@ -76,13 +72,7 @@ + + fprintf (fp, "#:file=%s\n", dbf->name); + fprintf (fp, "#:uid=%lu,", (unsigned long) st.st_uid); +- pw = getpwuid (st.st_uid); +- if (pw) +- fprintf (fp, "user=%s,", pw->pw_name); + fprintf (fp, "gid=%lu,", (unsigned long) st.st_gid); +- gr = getgrgid (st.st_gid); +- if (gr) +- fprintf (fp, "group=%s,", gr->gr_name); + fprintf (fp, "mode=%03o\n", st.st_mode & 0777); + fprintf (fp, "# End of header\n"); - if (!file_name) - { -@@ -172,7 +204,7 @@ ndbm_open_dir_file (const char *base, int pagfd, int mode) - return -1; - } - fd = ndbm_open_dir_file0 (strcat (strcpy (file_name, base), DIRSUF), -- pagfd, mode); -+ pag, mode); - free (file_name); - return fd; - } -@@ -265,7 +297,7 @@ dbm_open (char *file, int flags, int mode) - } - else - { -- dbm->dirfd = ndbm_open_dir_file (file, dbm->file->desc, open_flags); -+ dbm->dirfd = ndbm_open_dir_file (file, dbm->file, open_flags); - if (dbm->dirfd == -1) - { - gdbm_close (dbm->file); -diff --git a/doc/Makefile.in b/doc/Makefile.in -index 7379b75..d620ab6 100644 ---- a/doc/Makefile.in -+++ b/doc/Makefile.in -@@ -186,6 +186,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - POSUB = @POSUB@ -diff --git a/export/Makefile.in b/export/Makefile.in -index 37de02d..62db897 100644 ---- a/export/Makefile.in -+++ b/export/Makefile.in -@@ -178,6 +178,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - POSUB = @POSUB@ -diff --git a/src/Makefile.am b/src/Makefile.am -index 1c55a4e..860a56b 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -60,7 +60,7 @@ libgdbm_la_SOURCES = \ - update.c\ - version.c - --libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) -+libgdbm_la_LDFLAGS = -no-undefined -lws2_32 -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) - - # Programs - bin_PROGRAMS = testgdbm -diff --git a/src/Makefile.in b/src/Makefile.in -index b03d5c1..7860daf 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -215,6 +215,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - POSUB = @POSUB@ -@@ -324,7 +325,7 @@ libgdbm_la_SOURCES = \ - update.c\ - version.c - --libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) -+libgdbm_la_LDFLAGS = -no-undefined -lws2_32 -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) - testgdbm_LDADD = ./libgdbm.la - all: all-am - -diff --git a/src/flatfile.c b/src/flatfile.c -index c0f9422..adb83f2 100644 ---- a/src/flatfile.c -+++ b/src/flatfile.c -@@ -20,7 +20,11 @@ +--- src/gdbmexp.c.orig 2015-01-01 22:37:11.643551174 +0100 ++++ src/gdbmexp.c 2015-01-01 22:37:18.896668075 +0100 +@@ -18,7 +18,7 @@ /* Include system configuration before all else. */ # include "autoconf.h" -+#ifdef _WIN32 +-# include +# include -+#else - # include -+#endif # include "gdbmdefs.h" # include "gdbm.h" -diff --git a/src/gdbmopen.c b/src/gdbmopen.c -index 67db9c2..ec1c9a7 100644 ---- a/src/gdbmopen.c -+++ b/src/gdbmopen.c -@@ -128,7 +128,9 @@ gdbm_open (const char *file, int block_size, int flags, int mode, - } - else - dbf->cloexec = FALSE; -- -+ -+ fbits |= O_BINARY; -+ - /* Open the file. */ - need_trunc = FALSE; - switch (flags & GDBM_OPENMASK) -diff --git a/src/gdbmreorg.c b/src/gdbmreorg.c -index cc2a929..8b716c9 100644 ---- a/src/gdbmreorg.c -+++ b/src/gdbmreorg.c -@@ -22,7 +22,17 @@ - - #include "gdbmdefs.h" - --#if !HAVE_RENAME -+#if defined(_WIN32) -+static int -+_gdbm_rename (char *old_name, char *new_name) -+{ -+ if (!MoveFileEx (old_name, new_name, MOVEFILE_REPLACE_EXISTING)) -+ return -1; -+ -+ return 0; -+} -+#define rename _gdbm_rename -+#elif !HAVE_RENAME - - /* Rename takes OLD_NAME and renames it as NEW_NAME. If it can not rename - the file a non-zero value is returned. OLD_NAME is guaranteed to -@@ -94,7 +104,7 @@ gdbm_reorganize (GDBM_FILE dbf) - strcpy (&new_name[0], dbf->name); - new_name[len+2] = 0; - new_name[len+1] = '#'; -- while ( (len > 0) && new_name[len-1] != '/') -+ while ( (len > 0) && new_name[len-1] != '/' && new_name[len-1] != '\\') - { - new_name[len] = new_name[len-1]; - len -= 1; -@@ -157,20 +167,38 @@ gdbm_reorganize (GDBM_FILE dbf) - - /* Move the new file to old name. */ - -+ -+#ifdef _WIN32 -+ close (new_dbf->desc); -+ -+ if (dbf->file_locking) -+ { -+ _gdbm_unlock_file (dbf); -+ } -+ close (dbf->desc); -+#endif - if (rename (new_name, dbf->name) != 0) - { - gdbm_errno = GDBM_REORGANIZE_FAILED; -+#ifdef _WIN32 -+ dbf->desc = open (dbf->name, O_RDWR|O_BINARY, 0); -+ new_dbf->desc = open (new_name, O_RDWR|O_BINARY, 0); -+#endif - gdbm_close (new_dbf); - free (new_name); - return -1; - } - - /* Fix up DBF to have the correct information for the new file. */ -+#ifdef _WIN32 -+ new_dbf->desc = open (dbf->name, O_RDWR|O_BINARY, 0); -+#else - if (dbf->file_locking) - { - _gdbm_unlock_file (dbf); - } - close (dbf->desc); -+#endif - free (dbf->header); - free (dbf->dir); - -diff --git a/src/lock.c b/src/lock.c -index 214e1cb..8ccb98b 100644 ---- a/src/lock.c -+++ b/src/lock.c -@@ -23,7 +23,7 @@ - - #include - --#if HAVE_FLOCK -+#if HAVE_FLOCK || defined(_WIN32) - # ifndef LOCK_SH - # define LOCK_SH 1 - # endif -@@ -41,6 +41,83 @@ - # endif - #endif - -+#ifdef _WIN32 -+#include -+#include -+ -+/* -+ * flock support code for windows -+ * -+ * This code is derived from ruby (http://www.ruby-lang.org/). -+ * Original copyright notice is below. -+ */ -+/* -+ * Copyright (c) 1993, Intergraph Corporation -+ * -+ * You may distribute under the terms of either the GNU General Public -+ * License or the Artistic License, as specified in the perl README file. -+ * -+ * Various Unix compatibility functions and NT specific functions. -+ * -+ * Some of this code was derived from the MSDOS port(s) and the OS/2 port. -+ * -+ */ -+ -+#ifndef EWOULDBLOCK -+#define EWOULDBLOCK 10035 /* EBASEERR + 35 (winsock.h) */ -+#endif -+ -+#define LK_ERR(f,i) ((f) ? (i = 0) : (errno = GetLastError() == ERROR_LOCK_VIOLATION ? EWOULDBLOCK : EACCES)) -+#define LK_LEN ULONG_MAX -+ -+static int -+flock_winnt(HANDLE fh, int oper) -+{ -+ OVERLAPPED o; -+ int i = -1; -+ -+ memset(&o, 0, sizeof(o)); -+ -+ switch(oper) { -+ case LOCK_SH: /* shared lock */ -+ LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i); -+ break; -+ case LOCK_EX: /* exclusive lock */ -+ LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i); -+ break; -+ case LOCK_SH|LOCK_NB: /* non-blocking shared lock */ -+ LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i); -+ break; -+ case LOCK_EX|LOCK_NB: /* non-blocking exclusive lock */ -+ LK_ERR(LockFileEx(fh, -+ LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, -+ 0, LK_LEN, LK_LEN, &o), i); -+ break; -+ case LOCK_UN: /* unlock lock */ -+ LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i); -+ break; -+ default: /* unknown */ -+ errno = EINVAL; -+ break; -+ } -+ return i; -+} -+ -+#undef LK_ERR -+ -+int -+flock(int fd, int oper) -+{ -+ static int (*locker)(HANDLE, int) = NULL; -+ -+ if (!locker) { -+ locker = flock_winnt; -+ } -+ -+ return locker((HANDLE)_get_osfhandle(fd), oper); -+} -+#endif /* _WIN32 */ -+ - #if defined(F_SETLK) && defined(F_RDLCK) && defined(F_WRLCK) - # define HAVE_FCNTL_LOCK 1 - #else -@@ -65,7 +142,7 @@ _gdbm_unlock_file (GDBM_FILE dbf) - switch (dbf->lock_type) - { - case LOCKING_FLOCK: --#if HAVE_FLOCK -+#if HAVE_FLOCK || defined(_WIN32) - flock (dbf->desc, LOCK_UN); - #endif - break; -@@ -101,7 +178,7 @@ _gdbm_lock_file (GDBM_FILE dbf) - #endif - int lock_val = -1; - --#if HAVE_FLOCK -+#if HAVE_FLOCK || defined(_WIN32) - if (dbf->read_write == GDBM_READER) - lock_val = flock (dbf->desc, LOCK_SH + LOCK_NB); - else -diff --git a/src/systems.h b/src/systems.h -index c83cd9c..7b3eee4 100644 ---- a/src/systems.h -+++ b/src/systems.h -@@ -18,6 +18,11 @@ - along with GDBM. If not, see . */ - - /* Include all system headers first. */ -+#ifdef _WIN32 -+# undef _WIN32_WINNT -+# define _WIN32_WINNT 0x0501 -+# include -+#endif - #if HAVE_SYS_TYPES_H +--- src/gdbmload.c.windows 2013-12-25 10:52:42.000000000 +0100 ++++ src/gdbmload.c 2015-01-01 22:47:10.027195405 +0100 +@@ -18,8 +18,6 @@ + # include "gdbmdefs.h" + # include "gdbm.h" # include - #endif -@@ -50,6 +55,10 @@ - # define O_CLOEXEC 0 - #endif +-# include +-# include -+#ifndef O_BINARY -+# define O_BINARY 0 + struct datbuf + { +@@ -288,14 +286,13 @@ + _set_gdbm_meta_info (GDBM_FILE dbf, char *param, int meta_mask) + { + unsigned long n; +- uid_t owner_uid; +- uid_t owner_gid; + mode_t mode; + int meta_flags = 0; + const char *p; + char *end; + int rc = 0; + ++#if 0 + if (!(meta_mask & GDBM_META_MASK_OWNER)) + { + p = getparm (param, "user"); +@@ -341,6 +338,7 @@ + } + } + } +#endif -+ - /* Default block size. Some systems do not have blocksize in their - stat record. This code uses the BSD blocksize from stat. */ - -@@ -63,7 +72,7 @@ - #if HAVE_FTRUNCATE - # define TRUNCATE(dbf) ftruncate (dbf->desc, 0) - #else --# define TRUNCATE(dbf) close( open (dbf->name, O_RDWR|O_TRUNC, mode)); -+# define TRUNCATE(dbf) close( open (dbf->name, O_RDWR|O_TRUNC|O_BINARY, mode)); - #endif - - #ifndef STDERR_FILENO -@@ -82,8 +91,14 @@ - # define __lseek(_dbf, _off, _whn) lseek(_dbf->desc, _off, _whn) - # if HAVE_FSYNC - # define __fsync(_dbf) fsync(_dbf->desc) -+# elif defined(_WIN32) -+# define __fsync(_dbf) _commit(_dbf->desc) - # else - # define __fsync(_dbf) { sync(); sync(); } - # endif - #endif - -+/* Windows port of flock */ -+#ifdef _WIN32 -+extern int flock(int fd, int oper); + + if (!(meta_mask & GDBM_META_MASK_MODE)) + { +@@ -357,6 +355,7 @@ + } + } + ++#if 0 + if (meta_flags) + { + int fd = gdbm_fdesc (dbf); +@@ -383,6 +382,7 @@ + rc = 1; + } + } +#endif -diff --git a/src/testgdbm.c b/src/testgdbm.c -index b2b9c6c..3a0926c 100644 ---- a/src/testgdbm.c -+++ b/src/testgdbm.c -@@ -27,7 +27,9 @@ + return rc; + } + +--- src/gdbmimp.c.orig 2015-01-01 22:47:52.994887921 +0100 ++++ src/gdbmimp.c 2015-01-01 22:47:58.755980773 +0100 +@@ -17,7 +17,7 @@ + along with GDBM. If not, see . */ + + # include "autoconf.h" +-# include ++# include + + # include "gdbmdefs.h" + # include "gdbm.h" +--- src/gdbmtool.c.orig 2015-01-01 22:50:36.615525016 +0100 ++++ src/gdbmtool.c 2015-01-01 22:50:59.346891381 +0100 +@@ -22,8 +22,6 @@ #include #include #include -+#ifndef _WIN32 - #include -+#endif +-#include +-#include #ifdef HAVE_SYS_TERMIOS_H # include #endif -@@ -1126,7 +1128,9 @@ main (int argc, char *argv[]) - -1) - error (2, _("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); +@@ -1497,6 +1495,7 @@ + if (setsource (GDBMTOOLRC, 0) == 0) + yyparse (); + } ++#if 0 + else + { + char *fname; +@@ -1519,6 +1518,7 @@ + } + free (fname); + } ++#endif + } -+#ifndef _WIN32 - signal (SIGPIPE, SIG_IGN); -+#endif - - /* Welcome message. */ - if (interactive) -diff --git a/tests/Makefile.in b/tests/Makefile.in -index a7a7e39..8a5a368 100644 ---- a/tests/Makefile.in -+++ b/tests/Makefile.in -@@ -230,6 +230,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - POSUB = @POSUB@ -diff --git a/tests/dtdel.c b/tests/dtdel.c -index b7d0112..1134027 100644 ---- a/tests/dtdel.c -+++ b/tests/dtdel.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include "dbm.h" -@@ -30,7 +31,12 @@ main (int argc, char **argv) - int flags = 0; - int data_z = 0; - int rc = 0; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+ _setmode(_fileno(stderr), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/dtdump.c b/tests/dtdump.c -index 4e0aa3e..302655a 100644 ---- a/tests/dtdump.c -+++ b/tests/dtdump.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include "dbm.h" -@@ -29,7 +30,12 @@ main (int argc, char **argv) - datum key; - datum data; - int delim = '\t'; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+ _setmode(_fileno(stderr), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/dtfetch.c b/tests/dtfetch.c -index 8a2686f..b17a344 100644 ---- a/tests/dtfetch.c -+++ b/tests/dtfetch.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include "dbm.h" -@@ -44,7 +45,12 @@ main (int argc, char **argv) - int data_z = 0; - int delim = 0; - int rc = 0; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+ _setmode(_fileno(stderr), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/dtload.c b/tests/dtload.c -index 6ebd638..c449c74 100644 ---- a/tests/dtload.c -+++ b/tests/dtload.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include -@@ -39,7 +40,13 @@ main (int argc, char **argv) - datum data; - int delim = '\t'; - int data_z = 0; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdin), O_BINARY); -+ _setmode(_fileno(stdout), O_BINARY); -+ _setmode(_fileno(stderr), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/gtdel.c b/tests/gtdel.c -index ff9cdb9..e6a8c5f 100644 ---- a/tests/gtdel.c -+++ b/tests/gtdel.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include "gdbm.h" -@@ -31,7 +32,12 @@ main (int argc, char **argv) - GDBM_FILE dbf; - int data_z = 0; - int rc = 0; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+ _setmode(_fileno(stderr), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/gtdump.c b/tests/gtdump.c -index 927a47c..acb0f56 100644 ---- a/tests/gtdump.c -+++ b/tests/gtdump.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include "gdbm.h" -@@ -31,7 +32,12 @@ main (int argc, char **argv) - int flags = 0; - GDBM_FILE dbf; - int delim = '\t'; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdin), O_BINARY); -+ _setmode(_fileno(stdout), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/gtfetch.c b/tests/gtfetch.c -index 0c254b7..4f7135c 100644 ---- a/tests/gtfetch.c -+++ b/tests/gtfetch.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include "gdbm.h" -@@ -46,7 +47,12 @@ main (int argc, char **argv) - int data_z = 0; - int delim = 0; - int rc = 0; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+ _setmode(_fileno(stderr), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/gtload.c b/tests/gtload.c -index b89ae1f..f0c09cf 100644 ---- a/tests/gtload.c -+++ b/tests/gtload.c -@@ -16,6 +16,7 @@ - */ - #include "autoconf.h" - #include -+#include - #include - #include - #include -@@ -39,7 +40,12 @@ main (int argc, char **argv) - int delim = '\t'; - int data_z = 0; - size_t mapped_size_max = 0; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdin), O_BINARY); -+ _setmode(_fileno(stdout), O_BINARY); -+#endif -+ - while (--argc) - { - char *arg = *++argv; -diff --git a/tests/gtopt.c b/tests/gtopt.c -index 13ad8cc..535edbb 100644 ---- a/tests/gtopt.c -+++ b/tests/gtopt.c -@@ -178,7 +178,11 @@ init_maxmapsize (void *valptr, int valsize) int - test_maxmapsize (void *valptr) - { -+#ifdef _SC_PAGESIZE - size_t page_size = sysconf (_SC_PAGESIZE); -+#else -+ size_t page_size = 4096; -+#endif - size_t expected_size = ((mapped_size_max + page_size - 1) / page_size) * - page_size; - return (*(size_t*) valptr == expected_size) ? RES_PASS : RES_FAIL; -@@ -308,7 +312,11 @@ main (int argc, char **argv) - { - GDBM_FILE dbf; - struct optest *op; -- -+ -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+#endif -+ - progname = canonical_progname (argv[0]); - while (--argc) - { -diff --git a/tests/gtver.c b/tests/gtver.c -index 27fc0b9..cbfe794 100644 ---- a/tests/gtver.c -+++ b/tests/gtver.c -@@ -17,6 +17,7 @@ - #include "autoconf.h" - #include - #include -+#include - #include - #include "gdbm.h" - #include "progname.h" -@@ -31,6 +32,10 @@ main (int argc, char **argv) - const char *progname = canonical_progname (argv[0]); - int library = 0; - -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); -+#endif -+ +@@ -1620,8 +1620,6 @@ if (argc == 1) - { - printf ("%s\n", gdbm_version); -diff --git a/tests/num2word.c b/tests/num2word.c -index 4b55a35..551afd0 100644 ---- a/tests/num2word.c -+++ b/tests/num2word.c -@@ -17,6 +17,7 @@ - #include "autoconf.h" - #include - #include -+#include - #include - #include - #include -@@ -203,6 +204,10 @@ xstrtoul (char *arg, char **endp) - int - main (int argc, char **argv) + file_name = argv[0]; + +- signal (SIGPIPE, SIG_IGN); +- + memset (¶m, 0, sizeof (param)); + argmax = 0; + +--- src/util.c.orig 2015-01-01 23:01:56.323492992 +0100 ++++ src/util.c 2015-01-01 23:02:01.910583185 +0100 +@@ -16,7 +16,6 @@ + along with GDBM. If not, see . */ + + #include "gdbmtool.h" +-#include + + char * + mkfilename (const char *dir, const char *file, const char *suf) +@@ -45,6 +44,7 @@ + char * + tildexpand (char *s) { -+#ifdef _WIN32 -+ _setmode(_fileno(stdout), O_BINARY); ++#if 0 + if (s[0] == '~') + { + char *p = s + 1; +@@ -65,6 +65,7 @@ + if (pw) + return mkfilename (pw->pw_dir, p + len + 1, NULL); + } +#endif -+ - progname = argv[0]; - - if (argc == 1 || strcmp (argv[1], "-h") == 0) -diff --git a/tests/testsuite b/tests/testsuite -index 96ee5f9..8826999 100644 ---- a/tests/testsuite -+++ b/tests/testsuite -@@ -2069,7 +2069,7 @@ gtfetch test.db 0 - fi - at_status=$? - at_failed=false --echo >>"$at_stderr"; $as_echo "gtfetch: 0: not found -+echo >>"$at_stderr"; $as_echo "gtfetch.exe: 0: not found - " | \ - $at_diff - "$at_stderr" || at_failed=: - at_func_diff_devnull "$at_stdout" || at_failed=: -@@ -2200,7 +2200,7 @@ gtdel test.db 11 - fi - at_status=$? - at_failed=false --echo >>"$at_stderr"; $as_echo "gtdel: cannot delete 11: Item not found -+echo >>"$at_stderr"; $as_echo "gtdel.exe: cannot delete 11: Item not found - " | \ - $at_diff - "$at_stderr" || at_failed=: - at_func_diff_devnull "$at_stdout" || at_failed=: -@@ -2519,7 +2519,7 @@ dtfetch test 0 - fi - at_status=$? - at_failed=false --echo >>"$at_stderr"; $as_echo "dtfetch: 0: not found -+echo >>"$at_stderr"; $as_echo "dtfetch.exe: 0: not found - " | \ - $at_diff - "$at_stderr" || at_failed=: - at_func_diff_devnull "$at_stdout" || at_failed=: -@@ -2808,7 +2808,7 @@ dtdel test 11 - fi - at_status=$? - at_failed=false --echo >>"$at_stderr"; $as_echo "dtdel: cannot delete 11: Item not found -+echo >>"$at_stderr"; $as_echo "dtdel.exe: cannot delete 11: Item not found - " | \ - $at_diff - "$at_stderr" || at_failed=: - at_func_diff_devnull "$at_stdout" || at_failed=: --- -1.7.10.msysgit.1 + return estrdup (s); + } + +--- src/gdbm_load.c.orig 2015-01-01 23:04:32.733017885 +0100 ++++ src/gdbm_load.c 2015-01-01 23:05:01.929489199 +0100 +@@ -18,16 +18,12 @@ + # include "gdbm.h" + # include "gdbmapp.h" + # include "gdbmdefs.h" +-# include +-# include + + int replace = 0; + int meta_mask = 0; + int no_meta_option; + + int mode; +-uid_t owner_uid; +-gid_t owner_gid; + + char *parseopt_program_doc = "load a GDBM database from a file"; + char *parseopt_program_args = "FILE [DB_FILE]"; +@@ -45,6 +44,7 @@ + static int + set_meta_info (GDBM_FILE dbf) + { ++#if 0 + if (meta_mask) + { + int fd = gdbm_fdesc (dbf); +@@ -63,6 +63,7 @@ + return 1; + } + } ++#endif + return 0; + } + +@@ -139,6 +137,7 @@ + } + break; + ++#if 0 + case 'u': + { + size_t len; +@@ -198,6 +197,7 @@ + meta_mask |= GDBM_META_MASK_OWNER; + } + break; ++#endif + + case 'r': + replace = 1; diff --git a/mingw-w64-gdk-pixbuf2/0001-Give-priority-to-the-modules-using-the-open-source-l.patch b/mingw-w64-gdk-pixbuf2/0001-Give-priority-to-the-modules-using-the-open-source-l.patch deleted file mode 100644 index b60cebfbde..0000000000 --- a/mingw-w64-gdk-pixbuf2/0001-Give-priority-to-the-modules-using-the-open-source-l.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 3f33257a16e3490a9286881fc46c9951ed872aae Mon Sep 17 00:00:00 2001 -From: Ignacio Casal Quinteiro -Date: Wed, 3 Sep 2014 09:48:50 +0200 -Subject: [PATCH] Give priority to the modules using the open source libraries - instead of gdip - ---- - gdk-pixbuf/gdk-pixbuf-io.c | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c -index 7c50b87..90ac91d 100644 ---- a/gdk-pixbuf/gdk-pixbuf-io.c -+++ b/gdk-pixbuf/gdk-pixbuf-io.c -@@ -682,6 +682,18 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module, - - try_module (pixdata,pixdata); - -+#ifdef INCLUDE_gdiplus -+ try_module (ico,gdip_ico); -+ try_module (wmf,gdip_wmf); -+ try_module (emf,gdip_emf); -+ try_module (bmp,gdip_bmp); -+ try_module (gif,gdip_gif); -+ try_module (jpeg,gdip_jpeg); -+ try_module (tiff,gdip_tiff); -+#endif -+#ifdef INCLUDE_gdip_png -+ try_module (png,gdip_png); -+#endif - #ifdef INCLUDE_png - try_module (png,png); - #endif -@@ -733,18 +745,6 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module, - #ifdef INCLUDE_qtif - try_module (qtif,qtif); - #endif --#ifdef INCLUDE_gdiplus -- try_module (ico,gdip_ico); -- try_module (wmf,gdip_wmf); -- try_module (emf,gdip_emf); -- try_module (bmp,gdip_bmp); -- try_module (gif,gdip_gif); -- try_module (jpeg,gdip_jpeg); -- try_module (tiff,gdip_tiff); --#endif --#ifdef INCLUDE_gdip_png -- try_module (png,gdip_png); --#endif - - #undef try_module - --- -1.9.3 - diff --git a/mingw-w64-gdk-pixbuf2/0002-gdk-pixbuf-introspection.patch b/mingw-w64-gdk-pixbuf2/0002-gdk-pixbuf-introspection.patch new file mode 100644 index 0000000000..ac5270ac64 --- /dev/null +++ b/mingw-w64-gdk-pixbuf2/0002-gdk-pixbuf-introspection.patch @@ -0,0 +1,26 @@ +Index: gdk-pixbuf-2.31.1/gdk-pixbuf/gdk-pixbuf-core.h +=================================================================== +--- gdk-pixbuf-2.31.1/gdk-pixbuf/gdk-pixbuf-core.h ++++ gdk-pixbuf-2.31.1/gdk-pixbuf/gdk-pixbuf-core.h +@@ -333,6 +333,21 @@ gboolean gdk_pixbuf_save (GdkP + GError **error, + ...) G_GNUC_NULL_TERMINATED; + ++/** ++ * gdk_pixbuf_savev_utf8: ++ * @pixbuf: a #GdkPixbuf. ++ * @filename: name of file to save. ++ * @type: name of file format. ++ * @option_keys: (array zero-terminated=1): name of options to set, %NULL-terminated ++ * @option_values: (array zero-terminated=1): values for named options ++ * @error: (allow-none): return location for error, or %NULL ++ * ++ * Saves pixbuf to a file in @type, which is currently "jpeg", "png", "tiff", "ico" or "bmp". ++ * If @error is set, %FALSE will be returned. ++ * See gdk_pixbuf_save () for more details. ++ * ++ * Return value: whether an error was set ++ **/ + gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf, + const char *filename, + const char *type, diff --git a/mingw-w64-gdk-pixbuf2/PKGBUILD b/mingw-w64-gdk-pixbuf2/PKGBUILD index 06e28f6890..5f1c09eab3 100644 --- a/mingw-w64-gdk-pixbuf2/PKGBUILD +++ b/mingw-w64-gdk-pixbuf2/PKGBUILD @@ -1,53 +1,69 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=gdk-pixbuf2 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.31.1 -pkgrel=1 +pkgver=2.32.1 +pkgrel=3 pkgdesc="An image loading library (mingw-w64)" arch=('any') url="http://www.gtk.org" -license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +license=(LGPL2) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-glib2>=2.37.2" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libtiff") -options=('strip' 'staticlibs') + "${MINGW_PACKAGE_PREFIX}-glib2>=2.37.2" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff") +options=('strip' 'staticlibs' 'emptydirs') install=${_realname}-${CARCH}.install -source=("http://download.gnome.org/sources/gdk-pixbuf/${pkgver%.*}/gdk-pixbuf-$pkgver.tar.xz" +source=("http://download.gnome.org/sources/gdk-pixbuf/${pkgver%.*}/gdk-pixbuf-${pkgver}.tar.xz" 0001-Use-a-regex-to-properly-export-the-symbols.patch - 0001-Give-priority-to-the-modules-using-the-open-source-l.patch) -sha256sums=('25a75e3c61dac11e6ff6416ad846951ccafac6486b1c6a1bfb0b213b99db52cd' + 0002-gdk-pixbuf-introspection.patch) +sha256sums=('4432b74f25538c7d6bcb3ca51adabdd666168955f25812a2568dc9637697f3bc' 'e8d278e30c44e973e14e3c61e8ab195621d6a9a402e0da557db4616955ca4543' - '8f8b3882b3bbc6d32e99230ab188a5749cea57c37b699e371cb7f6096a1ec712') + 'dd496d66f0a6b369410fb4039e116ac7d6c2808c97998932a1f8f70b58f88ce2') prepare() { cd ${srcdir}/gdk-pixbuf-${pkgver} patch -p1 -i ${srcdir}/0001-Use-a-regex-to-properly-export-the-symbols.patch - patch -p1 -i ${srcdir}/0001-Give-priority-to-the-modules-using-the-open-source-l.patch + patch -p1 -i ${srcdir}/0002-gdk-pixbuf-introspection.patch autoreconf -fi } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/gdk-pixbuf-${pkgver}/configure \ + + mkdir -p docs/reference/gdk-pixbuf/html + cp -rf ../gdk-pixbuf-${pkgver}/docs/reference/gdk-pixbuf/html/* docs/reference/gdk-pixbuf/html + + ../gdk-pixbuf-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ --enable-shared \ --enable-introspection \ + --enable-relocations \ --with-included-loaders make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + + #get rid of "_utf8" sufix in function names + sed -i 's/\( gdk-pixbuf/GdkPixbuf-2.0.typelib + + make DESTDIR="${pkgdir}" install + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders + install -Dm644 "${srcdir}/gdk-pixbuf-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-i686.install b/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-i686.install index 25c91e7c00..35640ba1ed 100644 --- a/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-i686.install +++ b/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-i686.install @@ -1,11 +1,11 @@ post_install() { - mingw32/bin/gdk-pixbuf-query-loaders --update-cache + mingw32/bin/gdk-pixbuf-query-loaders --update-cache } post_upgrade() { - post_install + post_install } pre_remove() { - rm -f mingw32/lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache + rm -f mingw32/lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache } \ No newline at end of file diff --git a/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-x86_64.install b/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-x86_64.install index a3dc1814fc..fcc5dd0573 100644 --- a/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-x86_64.install +++ b/mingw-w64-gdk-pixbuf2/gdk-pixbuf2-x86_64.install @@ -1,11 +1,11 @@ post_install() { - mingw64/bin/gdk-pixbuf-query-loaders --update-cache + mingw64/bin/gdk-pixbuf-query-loaders --update-cache } post_upgrade() { - post_install + post_install } pre_remove() { - rm -f mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache + rm -f mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache } \ No newline at end of file diff --git a/mingw-w64-gdl/001-win.patch b/mingw-w64-gdl/001-win.patch new file mode 100644 index 0000000000..6688f8e54d --- /dev/null +++ b/mingw-w64-gdl/001-win.patch @@ -0,0 +1,87 @@ +--- ./gdl/Makefile.am.orig 2012-11-21 21:05:57.000000000 +0100 ++++ ./gdl/Makefile.am 2015-04-05 18:41:18.851937700 +0200 +@@ -136,8 +136,9 @@ + + -include $(INTROSPECTION_MAKEFILE) + INTROSPECTION_GIRS = +-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) ++INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --c-include gdl/gdl.h + INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + introspection_sources = $(libgdl_3_la_SOURCES) +@@ -149,7 +150,6 @@ + Gdl_3_gir_LIBS = libgdl-3.la + Gdl_3_gir_FILES = $(introspection_sources) + Gdl_3_gir_EXPORT_PACKAGES = gdl-3.0 +-Gdl_3_gir_SCANNERFLAGS = --c-include gdl/gdl.h + INTROSPECTION_GIRS += Gdl-3.gir + + girdir = $(datadir)/gir-1.0 +--- ./m4/intltool.m4.orig 2015-03-21 08:44:19.000000000 +0100 ++++ ./m4/intltool.m4 2015-04-05 18:41:18.858938200 +0200 +@@ -155,31 +155,6 @@ + # Substitute ALL_LINGUAS so we can use it in po/Makefile + AC_SUBST(ALL_LINGUAS) + +-# Set DATADIRNAME correctly if it is not set yet +-# (copied from glib-gettext.m4) +-if test -z "$DATADIRNAME"; then +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[]], +- [[extern int _nl_msg_cat_cntr; +- return _nl_msg_cat_cntr]])], +- [DATADIRNAME=share], +- [case $host in +- *-*-solaris*) +- dnl On Solaris, if bind_textdomain_codeset is in libc, +- dnl GNU format message catalog is always supported, +- dnl since both are added to the libc all together. +- dnl Hence, we'd like to go with DATADIRNAME=share +- dnl in this case. +- AC_CHECK_FUNC(bind_textdomain_codeset, +- [DATADIRNAME=share], [DATADIRNAME=lib]) +- ;; +- *) +- [DATADIRNAME=lib] +- ;; +- esac]) +-fi +-AC_SUBST(DATADIRNAME) +- + IT_PO_SUBDIR([po]) + + ]) +--- ./po/Makefile.in.in.orig 2015-04-05 18:41:35.994660600 +0200 ++++ ./po/Makefile.in.in 2015-04-05 18:42:02.375335400 +0200 +@@ -33,8 +33,7 @@ + datadir = @datadir@ + datarootdir = @datarootdir@ + libdir = @libdir@ +-DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +107,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +141,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot diff --git a/mingw-w64-gdl/PKGBUILD b/mingw-w64-gdl/PKGBUILD new file mode 100644 index 0000000000..c0c6cff395 --- /dev/null +++ b/mingw-w64-gdl/PKGBUILD @@ -0,0 +1,55 @@ +# $Id$ +# Maintainer: Jan de Groot +# Maintainer (MSYS2): Ray Donnelly + +_realname=gdl +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=3.16.0 +pkgrel=1 +pkgdesc="GNOME Docking Library (mingw-w64)" +arch=('any') +license=('LGPL 2') +url="http://www.gnome.org/" +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "intltool" + "gtk-doc") +options=('strip' 'staticlibs') +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver:0:4}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('34cbe104f5df9a20ea26aa8acca2b6d1a73035448aa854162c598e90f4e6ff80' + 'ba2f1eed43f926df573ec299b973929499e1da78c0f15157a4ec4ae40057afa1') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + autoreconf -f -i +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-gdl2/001-pixbuf.patch b/mingw-w64-gdl2/001-pixbuf.patch new file mode 100644 index 0000000000..60cbca68fd --- /dev/null +++ b/mingw-w64-gdl2/001-pixbuf.patch @@ -0,0 +1,370 @@ +diff -rup gdl-2.31.2/gdl/gdl-dock-bar.c gdl-2.31.2-ricky/gdl/gdl-dock-bar.c +--- gdl-2.31.2/gdl/gdl-dock-bar.c 2010-05-02 20:03:06.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-bar.c 2013-07-01 15:25:01.795260400 +0800 +@@ -269,6 +269,7 @@ gdl_dock_bar_add_item (GdlDockBar *dock + GtkWidget *button; + gchar *stock_id; + gchar *name; ++ GdkPixbuf *pixbuf_icon; + GtkWidget *image, *box, *label; + + g_return_if_fail (GDL_IS_DOCK_BAR (dockbar)); +@@ -293,6 +294,8 @@ gdl_dock_bar_add_item (GdlDockBar *dock + box = gtk_vbox_new (FALSE, 0); + + g_object_get (item, "stock-id", &stock_id, "long-name", &name, NULL); ++ g_object_get (item, "stock-id", &stock_id, "pixbuf-icon", &pixbuf_icon, ++ "long-name", &name, NULL); + + if (dockbar->_priv->dockbar_style == GDL_DOCK_BAR_TEXT || + dockbar->_priv->dockbar_style == GDL_DOCK_BAR_BOTH) { +@@ -311,7 +314,9 @@ gdl_dock_bar_add_item (GdlDockBar *dock + image = gtk_image_new_from_stock (stock_id, + GTK_ICON_SIZE_SMALL_TOOLBAR); + g_free (stock_id); +- } else { ++ } else if(pixbuf_icon){ ++ image = gtk_image_new_from_pixbuf (pixbuf_icon); ++ }else { + image = gtk_image_new_from_stock (GTK_STOCK_NEW, + GTK_ICON_SIZE_SMALL_TOOLBAR); + } +diff -rup gdl-2.31.2/gdl/gdl-dock-item.c gdl-2.31.2-ricky/gdl/gdl-dock-item.c +--- gdl-2.31.2/gdl/gdl-dock-item.c 2010-05-03 03:53:28.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-item.c 2013-07-02 09:33:19.280291200 +0800 +@@ -177,6 +177,7 @@ struct _GdlDockItemPrivate { + gboolean intern_tab_label; + guint notify_label; + guint notify_stock_id; ++ guint notify_pixbuf_icon; + + gint preferred_width; + gint preferred_height; +@@ -444,11 +445,21 @@ on_stock_id_changed (GObject* item, + gpointer user_data) + { + gchar* stock_id; +- g_object_get (item, "stock_id", &stock_id, NULL); ++ g_object_get (item, "stock-id", &stock_id, NULL); + gtk_image_set_from_stock (GTK_IMAGE (user_data), stock_id, GTK_ICON_SIZE_MENU); + g_free(stock_id); + } + ++static void ++on_pixbuf_icon_changed (GObject* item, ++ GParamSpec* spec, ++ gpointer user_data) ++{ ++ GdkPixbuf* pixbuf_icon; ++ g_object_get (item, "pixbuf-icon", &pixbuf_icon, NULL); ++ gtk_image_set_from_pixbuf(GTK_IMAGE (user_data), pixbuf_icon); ++} ++ + static GObject * + gdl_dock_item_constructor (GType type, + guint n_construct_properties, +@@ -469,6 +480,7 @@ gdl_dock_item_constructor (GType + GtkWidget *icon; + gchar* long_name; + gchar* stock_id; ++ GdkPixbuf *pixbuf_icon; + + if (GDL_DOCK_ITEM_HAS_GRIP (item)) { + item->_priv->grip_shown = TRUE; +@@ -481,6 +493,8 @@ gdl_dock_item_constructor (GType + } + + g_object_get (g_object, "long-name", &long_name, "stock-id", &stock_id, NULL); ++ g_object_get (g_object, "long-name", &long_name, "stock-id", &stock_id, ++ "pixbuf-icon", &pixbuf_icon,NULL); + + hbox = gtk_hbox_new (FALSE, 5); + label = gtk_label_new (long_name); +@@ -488,6 +502,9 @@ gdl_dock_item_constructor (GType + if (stock_id) + gtk_image_set_from_stock (GTK_IMAGE (icon), stock_id, + GTK_ICON_SIZE_MENU); ++ else if(pixbuf_icon) ++ gtk_image_set_from_pixbuf (GTK_IMAGE (icon), pixbuf_icon); ++ + gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + +@@ -497,6 +514,9 @@ gdl_dock_item_constructor (GType + item->_priv->notify_stock_id = + g_signal_connect (item, "notify::stock-id", G_CALLBACK (on_stock_id_changed), + icon); ++ item->_priv->notify_pixbuf_icon = ++ g_signal_connect (item, "notify::pixbuf-icon", G_CALLBACK (on_pixbuf_icon_changed), ++ icon); + + gtk_widget_show_all (hbox); + +@@ -1722,6 +1742,28 @@ gdl_dock_item_new_with_stock (const gcha + return GTK_WIDGET (item); + } + ++GtkWidget * ++gdl_dock_item_new_with_pixbuf_icon (const gchar *name, ++ const gchar *long_name, ++ const GdkPixbuf *pixbuf_icon, ++ GdlDockItemBehavior behavior) ++{ ++ GdlDockItem *item; ++ ++ item = GDL_DOCK_ITEM (g_object_new (GDL_TYPE_DOCK_ITEM, ++ "name", name, ++ "long-name", long_name, ++ "pixbuf-icon", pixbuf_icon, ++ "behavior", behavior, ++ NULL)); ++ ++ GDL_DOCK_OBJECT_UNSET_FLAGS (item, GDL_DOCK_AUTOMATIC); ++ gdl_dock_item_set_tablabel (item, gtk_label_new (long_name)); ++ ++ return GTK_WIDGET (item); ++} ++ ++ + /* convenient function (and to preserve source compat) */ + /** + * gdl_dock_item_dock_to: +@@ -1842,6 +1884,7 @@ gdl_dock_item_set_tablabel (GdlDockItem + item->_priv->intern_tab_label = FALSE; + g_signal_handler_disconnect (item, item->_priv->notify_label); + g_signal_handler_disconnect (item, item->_priv->notify_stock_id); ++ g_signal_handler_disconnect (item, item->_priv->notify_pixbuf_icon); + } + + if (item->_priv->tab_label) { +diff -rup gdl-2.31.2/gdl/gdl-dock-item.h gdl-2.31.2-ricky/gdl/gdl-dock-item.h +--- gdl-2.31.2/gdl/gdl-dock-item.h 2010-04-11 21:26:30.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-item.h 2013-07-01 15:30:01.489563500 +0800 +@@ -142,6 +142,12 @@ GtkWidget *gdl_dock_item_new_with_st + const gchar *stock_id, + GdlDockItemBehavior behavior); + ++GtkWidget *gdl_dock_item_new_with_pixbuf_icon (const gchar *name, ++ const gchar *long_name, ++ const GdkPixbuf *pixbuf_icon, ++ GdlDockItemBehavior behavior); ++ ++ + GType gdl_dock_item_get_type (void); + + void gdl_dock_item_dock_to (GdlDockItem *item, +diff -rup gdl-2.31.2/gdl/gdl-dock-item-grip.c gdl-2.31.2-ricky/gdl/gdl-dock-item-grip.c +--- gdl-2.31.2/gdl/gdl-dock-item-grip.c 2010-05-02 20:03:06.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-item-grip.c 2013-07-01 15:27:55.387563500 +0800 +@@ -69,10 +69,12 @@ gdl_dock_item_create_label_widget(GdlDoc + GtkLabel *label; + gchar *stock_id = NULL; + gchar *title = NULL; ++ GdkPixbuf *pixbuf; + + label_box = (GtkHBox*)gtk_hbox_new (FALSE, 0); + + g_object_get (G_OBJECT (grip->item), "stock-id", &stock_id, NULL); ++ g_object_get (G_OBJECT (grip->item), "pixbuf-icon", &pixbuf, NULL); + if(stock_id) { + image = GTK_IMAGE(gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU)); + +@@ -81,6 +83,12 @@ gdl_dock_item_create_label_widget(GdlDoc + + g_free (stock_id); + } ++ else if(pixbuf){ ++ image = GTK_IMAGE(gtk_image_new_from_pixbuf (pixbuf)); ++ ++ gtk_widget_show (GTK_WIDGET(image)); ++ gtk_box_pack_start(GTK_BOX(label_box), GTK_WIDGET(image), FALSE, TRUE, 0); ++ } + + g_object_get (G_OBJECT (grip->item), "long-name", &title, NULL); + if (title) { +diff -rup gdl-2.31.2/gdl/gdl-dock-notebook.c gdl-2.31.2-ricky/gdl/gdl-dock-notebook.c +--- gdl-2.31.2/gdl/gdl-dock-notebook.c 2010-04-24 19:42:49.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-notebook.c 2013-07-02 11:56:58.058942800 +0800 +@@ -388,11 +388,12 @@ gdl_dock_notebook_dock (GdlDockObject + GdlDockItem *item = GDL_DOCK_ITEM (object); + GdlDockItem *requestor_item = GDL_DOCK_ITEM (requestor); + gchar *long_name, *stock_id; ++ GdkPixbuf *pixbuf_icon; + GtkWidget *label; + gint position = -1; + + g_object_get (requestor_item, "long-name", &long_name, +- "stock-id", &stock_id, NULL); ++ "stock-id", &stock_id, "pixbuf-icon", &pixbuf_icon, NULL); + label = gdl_dock_item_get_tablabel (requestor_item); + if (!label) { + label = gtk_label_new (long_name); +@@ -412,7 +413,7 @@ gdl_dock_notebook_dock (GdlDockObject + position = gdl_switcher_insert_page (GDL_SWITCHER (item->child), + GTK_WIDGET (requestor), label, + long_name, long_name, +- stock_id, position); ++ stock_id, pixbuf_icon, position); + + GDL_DOCK_OBJECT_SET_FLAGS (requestor, GDL_DOCK_ATTACHED); + +diff -rup gdl-2.31.2/gdl/gdl-dock-object.c gdl-2.31.2-ricky/gdl/gdl-dock-object.c +--- gdl-2.31.2/gdl/gdl-dock-object.c 2010-05-02 20:03:06.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-object.c 2013-07-01 16:37:45.281565200 +0800 +@@ -81,6 +81,7 @@ enum { + PROP_NAME, + PROP_LONG_NAME, + PROP_STOCK_ID, ++ PROP_PIXBUF_ICON, + PROP_MASTER, + PROP_EXPORT_PROPERTIES + }; +@@ -137,6 +138,12 @@ gdl_dock_object_class_init (GdlDockObjec + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property ( ++ g_object_class, PROP_PIXBUF_ICON, ++ g_param_spec_pointer ("pixbuf-icon", _("Pixbuf Icon"), ++ _("Pixbuf icon for the dock object"), ++ G_PARAM_READWRITE)); ++ ++ g_object_class_install_property ( + g_object_class, PROP_MASTER, + g_param_spec_object ("master", _("Dock master"), + _("Dock master this dock object is bound to"), +@@ -213,6 +220,9 @@ gdl_dock_object_set_property (GObject + g_free (object->stock_id); + object->stock_id = g_value_dup_string (value); + break; ++ case PROP_PIXBUF_ICON: ++ object->pixbuf_icon = g_value_get_pointer (value); ++ break; + case PROP_MASTER: + if (g_value_get_object (value)) + gdl_dock_object_bind (object, g_value_get_object (value)); +@@ -243,6 +253,9 @@ gdl_dock_object_get_property (GObject + case PROP_STOCK_ID: + g_value_set_string (value, object->stock_id); + break; ++ case PROP_PIXBUF_ICON: ++ g_value_set_pointer (value, object->pixbuf_icon); ++ break; + case PROP_MASTER: + g_value_set_object (value, object->master); + break; +diff -rup gdl-2.31.2/gdl/gdl-dock-object.h gdl-2.31.2-ricky/gdl/gdl-dock-object.h +--- gdl-2.31.2/gdl/gdl-dock-object.h 2010-04-11 21:26:30.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-dock-object.h 2013-07-01 15:50:02.935563500 +0800 +@@ -88,6 +88,7 @@ struct _GdlDockObject { + gchar *name; + gchar *long_name; + gchar *stock_id; ++ GdkPixbuf *pixbuf_icon; + + gboolean reduce_pending; + }; +diff -rup gdl-2.31.2/gdl/gdl-switcher.c gdl-2.31.2-ricky/gdl/gdl-switcher.c +--- gdl-2.31.2/gdl/gdl-switcher.c 2010-05-02 20:09:27.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-switcher.c 2013-07-02 09:18:28.271970500 +0800 +@@ -51,6 +51,7 @@ static void gdl_switcher_add_button (Gd + const gchar *label, + const gchar *tooltips, + const gchar *stock_id, ++ const GdkPixbuf *pixbuf_icon, + gint switcher_id, + GtkWidget *page); + /* static void gdl_switcher_remove_button (GdlSwitcher *switcher, gint switcher_id); */ +@@ -125,6 +126,18 @@ gdl_switcher_stock_id_changed (GObject* + g_free (id); + } + ++static void ++gdl_switcher_pixbuf_icon_changed (GObject* object, ++ GParamSpec* spec, ++ gpointer user_data) ++{ ++ Button* button = user_data; ++ GdkPixbuf* pixbuf_icon; ++ ++ g_object_get (object, "pixbuf-icon", &pixbuf_icon, NULL); ++ gtk_image_set_from_pixbuf (GTK_IMAGE(button->icon),pixbuf_icon); ++} ++ + + static Button * + button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, +@@ -144,6 +157,8 @@ button_new (GtkWidget *button_widget, Gt + button); + g_signal_connect (page, "notify::stock-id", G_CALLBACK (gdl_switcher_stock_id_changed), + button); ++ g_signal_connect (page, "notify::pixbuf-icon", G_CALLBACK (gdl_switcher_pixbuf_icon_changed), ++ button); + + g_object_ref (button_widget); + g_object_ref (label); +@@ -670,8 +685,8 @@ gdl_switcher_page_added_cb (GtkNotebook + + switcher_id = gdl_switcher_get_page_id (page); + +- gdl_switcher_add_button (GDL_SWITCHER (switcher), NULL, NULL, NULL, +- switcher_id, page); ++ gdl_switcher_add_button (GDL_SWITCHER (switcher), NULL, NULL, NULL, NULL, ++ switcher_id, page); + gdl_switcher_select_button (GDL_SWITCHER (switcher), switcher_id); + } + +@@ -781,6 +796,7 @@ gdl_switcher_new (void) + void + gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label, + const gchar *tooltips, const gchar *stock_id, ++ const GdkPixbuf *pixbuf_icon, + gint switcher_id, GtkWidget* page) + { + GtkWidget *event_box; +@@ -803,8 +819,15 @@ gdl_switcher_add_button (GdlSwitcher *sw + gtk_container_add (GTK_CONTAINER (button_widget), hbox); + gtk_widget_show (hbox); + +- icon_widget = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); +- gtk_widget_show (icon_widget); ++ if (stock_id) { ++ icon_widget = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); ++ } else if (pixbuf_icon) { ++ icon_widget = gtk_image_new_from_pixbuf (pixbuf_icon); ++ } else { ++ icon_widget = gtk_image_new_from_stock (GTK_STOCK_NEW, GTK_ICON_SIZE_MENU); ++ } ++ ++ gtk_widget_show (icon_widget); + + if (!label) { + gchar *text = g_strdup_printf ("Item %d", switcher_id); +@@ -881,7 +904,7 @@ gint + gdl_switcher_insert_page (GdlSwitcher *switcher, GtkWidget *page, + GtkWidget *tab_widget, const gchar *label, + const gchar *tooltips, const gchar *stock_id, +- gint position) ++ const GdkPixbuf *pixbuf_icon, gint position) + { + gint ret_position; + gint switcher_id; +@@ -894,7 +917,7 @@ gdl_switcher_insert_page (GdlSwitcher *s + gtk_widget_show (tab_widget); + } + switcher_id = gdl_switcher_get_page_id (page); +- gdl_switcher_add_button (switcher, label, tooltips, stock_id, switcher_id, page); ++ gdl_switcher_add_button (switcher, label, tooltips, stock_id, pixbuf_icon, switcher_id, page); + + ret_position = gtk_notebook_insert_page (GTK_NOTEBOOK (switcher), page, + tab_widget, position); +diff -rup gdl-2.31.2/gdl/gdl-switcher.h gdl-2.31.2-ricky/gdl/gdl-switcher.h +--- gdl-2.31.2/gdl/gdl-switcher.h 2010-04-11 21:26:30.000000000 +0800 ++++ gdl-2.31.2-ricky/gdl/gdl-switcher.h 2013-07-01 15:43:38.083563500 +0800 +@@ -60,6 +60,7 @@ gint gdl_switcher_insert_page (Gd + const gchar *label, + const gchar *tooltips, + const gchar *stock_id, ++ const GdkPixbuf *pixbuf_icon, + gint position); + G_END_DECLS + diff --git a/mingw-w64-gdl2/PKGBUILD b/mingw-w64-gdl2/PKGBUILD new file mode 100644 index 0000000000..a0a92ab1d9 --- /dev/null +++ b/mingw-w64-gdl2/PKGBUILD @@ -0,0 +1,53 @@ +# $Id$ +# Maintainer: Ricky Wu + +_realname=gdl2 +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=2.31.2 +pkgrel=1 +pkgdesc="GNOME Docking Library (mingw-w64)" +arch=('any') +license=('LGPL 2') +url="http://www.gnome.org/" +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("intltool" + "gtk-doc") +options=('strip' 'staticlibs') +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname:0:3}/${pkgver:0:4}/${_realname:0:3}-${pkgver}.tar.gz + 001-pixbuf.patch) +sha256sums=('34cbe104f5df9a20ea26aa8acca2b6d1a73035448aa854162c598e90f4e6ff80' + 'ba2f1eed43f926df573ec299b973929499e1da78c0f15157a4ec4ae40057afa1') + +prepare() { + cd "${srcdir}"/${_realname:0:3}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-pixbuf.patch + + autoreconf -f -i +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/html + cp -rf ../${_realname:0:3}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname:0:3}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection=no + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname:0:3}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-gdlmm2/000-C11.patch b/mingw-w64-gdlmm2/000-C11.patch new file mode 100644 index 0000000000..cc2ccf35c3 --- /dev/null +++ b/mingw-w64-gdlmm2/000-C11.patch @@ -0,0 +1,28 @@ +diff -rup gdlmm-2.30.0-org/gdl/gdlmm/Makefile.am gdlmm-2.30.0/gdl/gdlmm/Makefile.am +--- gdlmm-2.30.0-org/gdl/gdlmm/Makefile.am 2010-04-26 04:21:18.000000000 +0800 ++++ gdlmm-2.30.0/gdl/gdlmm/Makefile.am 2015-10-22 22:06:15.021489400 +0800 +@@ -23,8 +23,8 @@ include $(top_srcdir)/build/compile-bind + + local_cppflags = $(binding_includes) $(binding_cppflags) -DGDLMM_BUILD=1 + +-AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GDLMM_CFLAGS) +-AM_CXXFLAGS = $(GDLMM_WXXFLAGS) ++AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GDLMM_CFLAGS) -std=c++11 ++AM_CXXFLAGS = $(GDLMM_WXXFLAGS) -std=c++11 + + libgdlmm_@GDLMM_API_VERSION@_la_SOURCES = $(binding_sources) + libgdlmm_@GDLMM_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(GDLMM_SO_VERSION) +diff -rup gdlmm-2.30.0-org/gdl/gdlmm/Makefile.in gdlmm-2.30.0/gdl/gdlmm/Makefile.in +--- gdlmm-2.30.0-org/gdl/gdlmm/Makefile.in 2010-04-26 04:32:22.000000000 +0800 ++++ gdlmm-2.30.0/gdl/gdlmm/Makefile.in 2015-10-22 22:06:07.821479300 +0800 +@@ -300,8 +300,8 @@ binding_private_HEADERS = $(files_built_ + binding_built_sources = $(files_built_cc) $(files_built_h) $(files_built_ph) + MAINTAINERCLEANFILES = $(binding_built_sources) $(addprefix $(srcdir)/,$(binding_built_sources)) + local_cppflags = $(binding_includes) $(binding_cppflags) -DGDLMM_BUILD=1 +-AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GDLMM_CFLAGS) +-AM_CXXFLAGS = $(GDLMM_WXXFLAGS) ++AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GDLMM_CFLAGS) -std=c++11 ++AM_CXXFLAGS = $(GDLMM_WXXFLAGS) -std=c++11 + libgdlmm_@GDLMM_API_VERSION@_la_SOURCES = $(binding_sources) + libgdlmm_@GDLMM_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(GDLMM_SO_VERSION) + libgdlmm_@GDLMM_API_VERSION@_la_LIBADD = $(GDLMM_LIBS) diff --git a/mingw-w64-gdlmm2/PKGBUILD b/mingw-w64-gdlmm2/PKGBUILD new file mode 100644 index 0000000000..cbc4ba01d2 --- /dev/null +++ b/mingw-w64-gdlmm2/PKGBUILD @@ -0,0 +1,53 @@ +# $Id$ +# Maintainer: Ricky Wu + +_realname=gdlmm2 +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=2.30.0 +pkgrel=1 +pkgdesc="GNOME Docking Library (mingw-w64)" +arch=('any') +license=('LGPL 2') +url="http://www.gnome.org/" +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("intltool" + "gtk-doc") +options=('strip' 'staticlibs') +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname:0:5}/${pkgver:0:4}/${_realname:0:5}-${pkgver}.tar.gz + 000-C11.patch + ) +sha256sums=('34cbe104f5df9a20ea26aa8acca2b6d1a73035448aa854162c598e90f4e6ff80' + 'ba2f1eed43f926df573ec299b973929499e1da78c0f15157a4ec4ae40057afa1') + +prepare() { + cd "${srcdir}"/${_realname:0:5}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/000-C11.patch +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/html + #cp -rf ../${_realname:0:5}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname:0:5}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-static \ + --enable-shared + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname:0:5}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-geany/0001-Fix-windres-invocation.patch b/mingw-w64-geany/0001-Fix-windres-invocation.patch new file mode 100644 index 0000000000..dd57129186 --- /dev/null +++ b/mingw-w64-geany/0001-Fix-windres-invocation.patch @@ -0,0 +1,37 @@ +From ada38bc30b61401ea36296e6f580cbed7b50b5ce Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 19 Feb 2015 13:42:35 +0100 +Subject: [PATCH 1/4] Fix windres invocation + +--- + src/Makefile.in | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.in b/src/Makefile.in +index c231cfc..528b580 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -547,7 +547,7 @@ nodist_EXTRA_geany_SOURCES = dummy.cxx + @MINGW_TRUE@ -DG_LOG_DOMAIN=\""Geany"\" + + @MINGW_TRUE@geany_LDFLAGS = -mwindows -mms-bitfields +-@MINGW_TRUE@WINDRES = $(host_alias)-windres ++@MINGW_TRUE@WINDRES = windres + all: all-am + + .SUFFIXES: +@@ -968,7 +968,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-geany_includeHEADERS + + + @MINGW_TRUE@geany_private.res: +-@MINGW_TRUE@ $(WINDRES) -i ../geany_private.rc --input-format=rc -o geany_private.res -O coff; ++@MINGW_TRUE@ cp $(VPATH)/../geany_private.rc ./ ++@MINGW_TRUE@ cp $(VPATH)/../geany.exe.manifest ./ ++@MINGW_TRUE@ cp $(VPATH)/../icons/geany.ico ../icons/ ++@MINGW_TRUE@ $(WINDRES) -i geany_private.rc --input-format=rc -o geany_private.res -O coff; + + @MINGW_TRUE@clean-local: + @MINGW_TRUE@ rm -f geany_private.res +-- +2.3.0 + diff --git a/mingw-w64-geany/0002-Fix-plugin-compilation.patch b/mingw-w64-geany/0002-Fix-plugin-compilation.patch new file mode 100644 index 0000000000..f1ab6a2b8e --- /dev/null +++ b/mingw-w64-geany/0002-Fix-plugin-compilation.patch @@ -0,0 +1,25 @@ +From 7e6446a6c67f47d68317b071ad4767b9f24f2255 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 19 Feb 2015 13:44:06 +0100 +Subject: [PATCH 2/4] Fix plugin compilation + +--- + plugins/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/Makefile.in b/plugins/Makefile.in +index 111f135..30ddf6e 100644 +--- a/plugins/Makefile.in ++++ b/plugins/Makefile.in +@@ -463,7 +463,7 @@ splitwindow_la_LDFLAGS = -module -avoid-version + + # build Geany for Windows on non-Windows systems (cross-compile) + # (this is a little hack'ish and surely can be improved) +-@MINGW_TRUE@@PLUGINS_TRUE@DLL_LD_FLAGS = -module -avoid-version ++@MINGW_TRUE@@PLUGINS_TRUE@DLL_LD_FLAGS = + @MINGW_TRUE@@PLUGINS_TRUE@MINGW_CFLAGS = \ + @MINGW_TRUE@@PLUGINS_TRUE@ -DGEANY_DATADIR=\"data\" \ + @MINGW_TRUE@@PLUGINS_TRUE@ -DHAVE_CONFIG_H \ +-- +2.3.0 + diff --git a/mingw-w64-geany/0003-Use-FHS.patch b/mingw-w64-geany/0003-Use-FHS.patch new file mode 100644 index 0000000000..4b62073694 --- /dev/null +++ b/mingw-w64-geany/0003-Use-FHS.patch @@ -0,0 +1,69 @@ +From 45bd465a64e456defcf37f429afe89edf103b4fa Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 19 Feb 2015 13:52:42 +0100 +Subject: [PATCH 3/4] Use FHS + +--- + plugins/Makefile.in | 2 +- + src/Makefile.in | 2 +- + src/main.c | 4 ++-- + src/plugins.c | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/plugins/Makefile.in b/plugins/Makefile.in +index 30ddf6e..73b54f1 100644 +--- a/plugins/Makefile.in ++++ b/plugins/Makefile.in +@@ -465,7 +465,7 @@ splitwindow_la_LDFLAGS = -module -avoid-version + # (this is a little hack'ish and surely can be improved) + @MINGW_TRUE@@PLUGINS_TRUE@DLL_LD_FLAGS = + @MINGW_TRUE@@PLUGINS_TRUE@MINGW_CFLAGS = \ +-@MINGW_TRUE@@PLUGINS_TRUE@ -DGEANY_DATADIR=\"data\" \ ++@MINGW_TRUE@@PLUGINS_TRUE@ -DGEANY_DATADIR=\"\" \ + @MINGW_TRUE@@PLUGINS_TRUE@ -DHAVE_CONFIG_H \ + @MINGW_TRUE@@PLUGINS_TRUE@ -DGTK \ + @MINGW_TRUE@@PLUGINS_TRUE@ -I$(top_srcdir) \ +diff --git a/src/Makefile.in b/src/Makefile.in +index 528b580..0638b0e 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -537,7 +537,7 @@ nodist_EXTRA_geany_SOURCES = dummy.cxx + @MINGW_FALSE@ -DGTK \ + @MINGW_FALSE@ -DG_LOG_DOMAIN=\""Geany"\" + +-@MINGW_TRUE@AM_CFLAGS = -DGEANY_DATADIR=\"data\" \ ++@MINGW_TRUE@AM_CFLAGS = -DGEANY_DATADIR=\"\" \ + @MINGW_TRUE@ -DGEANY_DOCDIR=\"\" \ + @MINGW_TRUE@ -DGEANY_LIBDIR=\"\" \ + @MINGW_TRUE@ -DGEANY_LOCALEDIR=\"\" \ +diff --git a/src/main.c b/src/main.c +index 0d952bc..fc5ca18 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -414,8 +414,8 @@ static void setup_paths(void) + * documentation and data files */ + gchar *install_dir = win32_get_installation_dir(); + +- data_dir = g_build_filename(install_dir, "data", NULL); /* e.g. C:\Program Files\geany\data */ +- doc_dir = g_build_filename(install_dir, "doc", NULL); ++ data_dir = g_build_filename(install_dir, "share", "geany", NULL); ++ doc_dir = g_build_filename(install_dir, "share", "doc", "geany", "html", NULL); + + g_free(install_dir); + #else +diff --git a/src/plugins.c b/src/plugins.c +index 08523d8..3f17f8c 100644 +--- a/src/plugins.c ++++ b/src/plugins.c +@@ -962,7 +962,7 @@ static gchar *get_plugin_path(void) + gchar *path; + gchar *install_dir = win32_get_installation_dir(); + +- path = g_build_filename(install_dir, "lib", NULL); ++ path = g_build_filename(install_dir, "lib", "geany", NULL); + g_free(install_dir); + + return path; +-- +2.3.0 + diff --git a/mingw-w64-geany/0004-Fix-genapi-invocation.patch b/mingw-w64-geany/0004-Fix-genapi-invocation.patch new file mode 100644 index 0000000000..2be70d4b27 --- /dev/null +++ b/mingw-w64-geany/0004-Fix-genapi-invocation.patch @@ -0,0 +1,41 @@ +From a3d840f370ed2e4478a3d6e865350003bc73e548 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 19 Feb 2015 23:16:44 +0100 +Subject: [PATCH 4/4] Fix genapi invocation + +--- + plugins/Makefile.in | 4 ++-- + plugins/genapi.py | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plugins/Makefile.in b/plugins/Makefile.in +index 73b54f1..ef273e1 100644 +--- a/plugins/Makefile.in ++++ b/plugins/Makefile.in +@@ -958,8 +958,8 @@ uninstall-am: uninstall-pluginLTLIBRARIES \ + + + # systems without python should continue to build OK +-geanyfunctions.h: genapi.py ../src/plugins.c +- python genapi.py || true ++geanyfunctions.h: @srcdir@/genapi.py @srcdir@/../src/plugins.c ++ python2 @srcdir@/genapi.py @srcdir@/../src/plugins.c + + all: geanyfunctions.h + +diff --git a/plugins/genapi.py b/plugins/genapi.py +index 5c798f8..31d3fe3 100644 +--- a/plugins/genapi.py ++++ b/plugins/genapi.py +@@ -36,7 +36,7 @@ import sys + + def get_function_names(): + names = [] +- filep = open('../src/plugins.c') ++ filep = open(sys.argv[1]) + while 1: + line = filep.readline() + if line == "": +-- +2.3.0 + diff --git a/mingw-w64-geany/PKGBUILD b/mingw-w64-geany/PKGBUILD new file mode 100644 index 0000000000..b77eea25c8 --- /dev/null +++ b/mingw-w64-geany/PKGBUILD @@ -0,0 +1,79 @@ +# Contributor (MSYS2): David Macek +# Maintainer (Arch Linux): Alexander Rødseth +# Contributor (Arch Linux): Angel Velasquez +# Contributor (Arch Linux): Ionut Biru +# Contributor (Arch Linux): William Rea +# Contributor (Arch Linux): Allan McRae + +_realname=geany +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.24.1 +pkgrel=2 +pkgdesc='Fast and lightweight IDE (mingw-w64)' +arch=('any') +url='http://www.geany.org/' +license=('GPL') +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme") +makedepends=('perlxml' + 'intltool' + "${MINGW_PACKAGE_PREFIX}-gcc") +install=geany-${CARCH}.install +optdepends=( + #'geany-plugins: various extra features' + #'vte: terminal support' + "${MINGW_PACKAGE_PREFIX}-python2") +source=(http://download.geany.org/${_realname}-${pkgver}.tar.bz2{,.sig} + "0001-Fix-windres-invocation.patch" + "0002-Fix-plugin-compilation.patch" + "0003-Use-FHS.patch" + "0004-Fix-genapi-invocation.patch") +sha256sums=('7fb505d9b01fe6874890525f837644a6a38c23a372bb068c65ef3673108a8c33' + 'SKIP' + 'aacd1815833e03ba95853f7a8adf53d848cc68f41c5cddd47f2f1a8425590a81' + 'b96b810359e45bb9a263377bc2dcca0125833bf649153cd5da24d21ee94cfb42' + '8380b1cfa5f58233158c7e4f71d910399026df4bc3abf117087e050ecee323cf' + 'a21ff06e9022bb973f876d4edc003c23f3c244c3638281b58a2b141a6ba893b9') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + # Python2 fix + sed -i '0,/on/s//on2/' data/templates/files/main.py + + # Syntax highlighting for PKGBUILD files + sed -i 's/Sh=/Sh=PKGBUILD;/' data/filetype_extensions.conf + + patch -p1 -i "${srcdir}/0001-Fix-windres-invocation.patch" + patch -p1 -i "${srcdir}/0002-Fix-plugin-compilation.patch" + patch -p1 -i "${srcdir}/0003-Use-FHS.patch" + patch -p1 -i "${srcdir}/0004-Fix-genapi-invocation.patch" +} + +build() { + mkdir -p "build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + + # libiberty + export LDFLAGS+=" -L${MINGW_PREFIX}/lib/binutils" + + # config.h + export PLUGIN_CFLAGS+=" -I$(pwd)" + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} + + make +} + +package() { + cd "build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/geany" + cp plugins/*.dll "${pkgdir}${MINGW_PREFIX}/lib/geany/" + rm -r "${pkgdir}${MINGW_PREFIX}/share/applications" + rm -r "${pkgdir}${MINGW_PREFIX}/share/icons/hicolor/index.theme" +} diff --git a/mingw-w64-geany/geany-i686.install b/mingw-w64-geany/geany-i686.install new file mode 100644 index 0000000000..da50a72875 --- /dev/null +++ b/mingw-w64-geany/geany-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-geany/geany-x86_64.install b/mingw-w64-geany/geany-x86_64.install new file mode 100644 index 0000000000..4a2bb1bb75 --- /dev/null +++ b/mingw-w64-geany/geany-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-gedit-plugins/PKGBUILD b/mingw-w64-gedit-plugins/PKGBUILD index 9bada1e654..ee3fa0610f 100644 --- a/mingw-w64-gedit-plugins/PKGBUILD +++ b/mingw-w64-gedit-plugins/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Ignacio Casal Quinteiro _realname=gedit-plugins +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.18.0 pkgrel=1 arch=('any') pkgdesc="Collection of plugins for the gedit Text Editor (mingw-w64)" @@ -19,8 +20,8 @@ options=('strip' 'staticlibs') license=("GPL") url="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins" install=gedit-plugins-${CARCH}.install -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz) -sha256sums=('ae0e45eeb7fbac6f5eb17c932d5ea32359ed7c399eabcb7a7878c6e4566b09aa') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz) +sha256sums=('e25249c0c2a057827bb4d4755a2359e1f9b4de288e0c4e201c6ef4f0e0e8c580') prepare() { cd "${srcdir}"/${_realname}-${pkgver} @@ -40,11 +41,13 @@ build() { --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ --disable-schemas-compile \ - --enable-python + --enable-python \ + --enable-vala=no + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-gedit/PKGBUILD b/mingw-w64-gedit/PKGBUILD index 04c3d5c6fa..f121c3310a 100644 --- a/mingw-w64-gedit/PKGBUILD +++ b/mingw-w64-gedit/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gedit +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.18.2 pkgrel=1 arch=('any') pkgdesc="A text editor for GNOME (mingw-w64)" @@ -24,9 +25,9 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" options=('strip' 'staticlibs') license=("GPL") url="http://www.gnome.org" -install=gedit-${CARCH}.install -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz) -sha256sums=('9c74f456cc3c0200a3409c3ece17fae17a22ee38213a53aa29ff8e346cba2f90') +install=${_realname}-${CARCH}.install +source=(https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz) +sha256sums=('856e451aec29ee45980011de57cadfe89c3cbc53968f6cc865f8efe0bd0d49b1') prepare() { cd "${srcdir}"/${_realname}-${pkgver} @@ -35,6 +36,7 @@ prepare() { } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} @@ -52,6 +54,8 @@ build() { } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gegl-git/PKGBUILD b/mingw-w64-gegl-git/PKGBUILD deleted file mode 100644 index 682507200d..0000000000 --- a/mingw-w64-gegl-git/PKGBUILD +++ /dev/null @@ -1,91 +0,0 @@ -# Maintainer: Alexey Pavlov - -_realname=gegl - -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=r6300.2726ed7 -pkgrel=1 -pkgdesc="Generic Graphics Library (mingw-w64)" -arch=('any') -url="http://gegl.org/gegl/" -license=("GPL-3.0+" "LGPL-3.0+") -makedepends=(asciidoc - #"${MINGW_PACKAGE_PREFIX}-ffmpeg" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-lua" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-ruby" - "${MINGW_PACKAGE_PREFIX}-vala") -depends=("${MINGW_PACKAGE_PREFIX}-babl-git" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-exiv2" - "${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-gtk2" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-libspiro" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-lcms" - "${MINGW_PACKAGE_PREFIX}-lensfun" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-pango" - "${MINGW_PACKAGE_PREFIX}-SDL") -#optdepends=("${MINGW_PACKAGE_PREFIX}-openexr: for using the openexr plugin" -# "${MINGW_PACKAGE_PREFIX}-ffmpeg: for using the ffmpeg plugin" -# "${MINGW_PACKAGE_PREFIX}-librsvg: for using the svg plugin" -# "${MINGW_PACKAGE_PREFIX}-jasper: for using the jasper plugin") -options=('strip' 'staticlibs') -source=("${_realname}"::"git://git.gnome.org/gegl" - 0001-give-cc-to-gir-scanner.all.patch) -sha1sums=('SKIP' - '6ce3626a529d51c87d8a531b273d10a1ce89b6ca') - -pkgver() { - cd "$srcdir/$_realname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare() { - cd ${srcdir}/${_realname} - patch -p1 -i ${srcdir}/0001-give-cc-to-gir-scanner.all.patch - autoreconf --force --install --verbose -} - -build() { - export lt_cv_deplibs_check_method='pass_all' - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - PKG_CONFIG=${MINGW_PREFIX}/bin/pkg-config.exe \ - "${srcdir}"/${_realname-}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-shared \ - --disable-static \ - --with-sdl \ - --with-openexr \ - --with-librsvg \ - --with-jasper \ - --without-libavformat \ - --disable-docs \ - --with-vala \ - --enable-introspection - - make -} - -package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm - rm "${pkgdir}${MINGW_PREFIX}"/lib/gegl-*/*.dll.a -} diff --git a/mingw-w64-gegl-git/0001-give-cc-to-gir-scanner.all.patch b/mingw-w64-gegl/0001-give-cc-to-gir-scanner.all.patch similarity index 100% rename from mingw-w64-gegl-git/0001-give-cc-to-gir-scanner.all.patch rename to mingw-w64-gegl/0001-give-cc-to-gir-scanner.all.patch diff --git a/mingw-w64-gegl/PKGBUILD b/mingw-w64-gegl/PKGBUILD new file mode 100644 index 0000000000..dd2a467f95 --- /dev/null +++ b/mingw-w64-gegl/PKGBUILD @@ -0,0 +1,100 @@ +# Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly + +_realname=gegl +pkgbase="mingw-w64-${_realname}" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +pkgver=0.3.4 +pkgrel=1 +pkgdesc="Generic Graphics Library (mingw-w64)" +arch=('any') +url="http://gegl.org/" +license=("GPL-3.0+" "LGPL-3.0+") +makedepends=("asciidoc" + "intltool" + #"${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-ruby" + "${MINGW_PACKAGE_PREFIX}-vala") +depends=("${MINGW_PACKAGE_PREFIX}-babl" + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-exiv2" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-json-glib" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libspiro" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-lcms" + "${MINGW_PACKAGE_PREFIX}-lensfun" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-pango" + "${MINGW_PACKAGE_PREFIX}-SDL") +#optdepends=("${MINGW_PACKAGE_PREFIX}-openexr: for using the openexr plugin" +# "${MINGW_PACKAGE_PREFIX}-ffmpeg: for using the ffmpeg plugin" +# "${MINGW_PACKAGE_PREFIX}-librsvg: for using the svg plugin" +# "${MINGW_PACKAGE_PREFIX}-jasper: for using the jasper plugin") +#options=('!strip' 'debug') +source=(#"${_realname}"::"git://git.gnome.org/gegl" + http://ftp.gtk.org/pub/gegl/${pkgver%.*}/${_realname}-${pkgver}.tar.bz2 + 0001-give-cc-to-gir-scanner.all.patch) +sha1sums=('20528559801d5a44b821c7e71c25c592a0986b00' + 'aabcead7c7a81b875840cbd233826ff4920c042f') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-give-cc-to-gir-scanner.all.patch + autoreconf --force --install --verbose +} + +build() { + declare -a extra_config + + if check_option "debug" "y"; then + extra_config+=("--enable-debug") + VERBOSE="V=1" + export DISTUTILS_DEBUG=1 + fi + + export lt_cv_deplibs_check_method='pass_all' + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --disable-static \ + --with-sdl \ + --with-openexr \ + --with-librsvg \ + --with-jasper \ + --without-libavformat \ + --disable-docs \ + --with-vala \ + --enable-introspection \ + "${extra_config[@]}" + + make ${VERBOSE} +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + rm "${pkgdir}${MINGW_PREFIX}"/lib/gegl-*/*.dll.a +} diff --git a/mingw-w64-geoclue/PKGBUILD b/mingw-w64-geoclue/PKGBUILD index 5422914bee..11e229b3e9 100644 --- a/mingw-w64-geoclue/PKGBUILD +++ b/mingw-w64-geoclue/PKGBUILD @@ -3,7 +3,8 @@ _realname=geoclue pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.12.99 -pkgrel=2 +#pkgver=2.2.0 +pkgrel=3 arch=('any') pkgdesc="Modular Geoinformation Service (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-glib2" @@ -19,13 +20,16 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-libsoup: Skyhook location provider") options=('strip' 'staticlibs') license=("BSD") url="http://geoclue.freedesktop.org/" -source=(http://freedesktop.org/~hadess/${_realname}-$pkgver.tar.gz +source=(http://freedesktop.org/~hadess/${_realname}-${pkgver}.tar.gz + #http://freedesktop.org/software/geoclue/releases/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz geoclue-0.12.0-win32reloc.patch geoclue-0.12.99-ldflags.patch + gio-win.patch ) md5sums=('779245045bfeeec4853da8baaa3a18e6' '175021cc9767407260908f315d3c36d3' - 'b446a0942aaa88bfbc2e8ec47bb24877') + 'b446a0942aaa88bfbc2e8ec47bb24877' + '52e8e77cdae3063f85f8dec5685c8422') prepare() { cd "${srcdir}"/${_realname}-${pkgver} @@ -44,12 +48,12 @@ build() { --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-shared \ - --disable-static + --enable-static + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-geoclue/gio-win.patch b/mingw-w64-geoclue/gio-win.patch new file mode 100644 index 0000000000..d734554d6f --- /dev/null +++ b/mingw-w64-geoclue/gio-win.patch @@ -0,0 +1,20 @@ +--- geoclue-2.2.0/configure.ac.orig 2015-07-10 12:50:52.864282200 +0300 ++++ geoclue-2.2.0/configure.ac 2015-07-10 12:51:12.097358700 +0300 +@@ -53,7 +53,7 @@ + PKG_CHECK_MODULES(GEOCLUE, [ + glib-2.0 >= $GLIB_MIN_VERSION + gio-2.0 >= $GLIB_MIN_VERSION +- gio-unix-2.0 >= $GLIB_MIN_VERSION ++ gio-windows-2.0 >= $GLIB_MIN_VERSION + json-glib-1.0 >= $JSON_GLIB_MIN_VERSION + libsoup-2.4 >= $LIBSOUP_MIN_VERSION + ]) +@@ -115,7 +115,7 @@ + PKG_CHECK_MODULES(DEMO_AGENT, [ + glib-2.0 >= $GLIB_MIN_VERSION + gio-2.0 >= $GLIB_MIN_VERSION +- gio-unix-2.0 >= $GLIB_MIN_VERSION ++ gio-windows-2.0 >= $GLIB_MIN_VERSION + libnotify]) + else + AC_DEFINE([BUILD_DEMO_AGENT], [0], [Build demo agent?]) diff --git a/mingw-w64-geocode-glib/001-locale.patch b/mingw-w64-geocode-glib/001-locale.patch index 6669f6dab9..1bce28f993 100644 --- a/mingw-w64-geocode-glib/001-locale.patch +++ b/mingw-w64-geocode-glib/001-locale.patch @@ -1,5 +1,15 @@ --- geocode-glib-3.13.3-orig/geocode-glib/geocode-glib.c 2014-06-25 00:37:44.000000000 +0200 +++ geocode-glib-3.13.3/geocode-glib/geocode-glib.c 2014-08-15 16:22:59.265705500 +0200 +@@ -25,7 +25,9 @@ + #include + #include + #include ++#ifndef __MINGW32__ + #include ++#endif + #include + + /** @@ -186,5 +186,9 @@ char * _geocode_object_get_lang (void) diff --git a/mingw-w64-geocode-glib/002-symbols.patch b/mingw-w64-geocode-glib/002-symbols.patch deleted file mode 100644 index c1ba45ca15..0000000000 --- a/mingw-w64-geocode-glib/002-symbols.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- geocode-glib-3.13.3-orig/geocode-glib/geocode-glib.symbols 2014-06-25 00:37:44.000000000 +0200 -+++ geocode-glib-3.13.3/geocode-glib/geocode-glib.symbols 2014-08-15 16:26:16.680759400 +0200 -@@ -34,7 +34,6 @@ - geocode_error_quark - geocode_error_get_type - _geocode_parse_search_json --_geocode_parse_resolve_json - _geocode_read_nominatim_attributes - _geocode_create_place_from_attributes - geocode_place_get_type diff --git a/mingw-w64-geocode-glib/003-give-cc-to-gir-scanner.all.patch b/mingw-w64-geocode-glib/003-give-cc-to-gir-scanner.all.patch deleted file mode 100644 index 4ed86dc098..0000000000 --- a/mingw-w64-geocode-glib/003-give-cc-to-gir-scanner.all.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- geocode-glib-3.13.3/geocode-glib/Makefile.am.orig 2014-06-25 02:37:44.000000000 +0400 -+++ geocode-glib-3.13.3/geocode-glib/Makefile.am 2014-08-20 19:13:06.699600000 +0400 -@@ -75,6 +75,7 @@ - INTROSPECTION_GIRS = - INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(top_srcdir) - INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir) -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - CLEANFILES = - - if HAVE_INTROSPECTION diff --git a/mingw-w64-geocode-glib/PKGBUILD b/mingw-w64-geocode-glib/PKGBUILD index c4c2945fd5..09bfc7ea42 100644 --- a/mingw-w64-geocode-glib/PKGBUILD +++ b/mingw-w64-geocode-glib/PKGBUILD @@ -1,20 +1,22 @@ # Maintainer: Andrea Zagli _realname=geocode-glib +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.18.0 pkgrel=1 arch=('any') pkgdesc="geocoding and reverse geocoding GLib library using Yahoo! Place Finder (mingw-w64)" license=("LGPL 2") url="http://www.gnome.org/" +install=${_realname}-${CARCH}.install depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-json-glib" "${MINGW_PACKAGE_PREFIX}-libsoup") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" + "gtk-doc" "make" "libtool" "automake-wrapper" @@ -22,29 +24,27 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "gettext" "patch") options=('strip' '!debug' 'staticlibs') -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:4}/${_realname}-$pkgver.tar.xz - 001-locale.patch - 002-symbols.patch - 003-give-cc-to-gir-scanner.all.patch) -sha256sums=('a19b21a92b8cbfa29a5ae6616c2fdca8567e97480f7bb5c955905f6ae1c72010' - '3e694f9b07a989cfbd362a4c117cad8d873cbb202b912ecaa2ee409bfbb5168b' - 'e7ddcaf273910b35b60991bf1db1d9dcff38bad09123dd43033cddcfbee224b2' - '946437e815fc17ddcb4f4c7b52dd80bd1460363e37d211d97ac7ba5e32f49e9a') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:4}/${_realname}-${pkgver}.tar.xz + 001-locale.patch) +sha256sums=('8fb7f0d569e3e6696aaa1fdf275cb3094527ec5e9fa36fd88dd633dfec63495d' + '7379362319bab800b464ae4cf1d33e05f51bf500d8b0f65be63c05036f040c34') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-locale.patch - patch -p1 -i ${srcdir}/002-symbols.patch - patch -p1 -i ${srcdir}/003-give-cc-to-gir-scanner.all.patch autoreconf -fi } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p docs/html + cp -rf ../${_realname}-${pkgver}/docs/html/* docs/html + ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -56,6 +56,8 @@ build() { } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB" } diff --git a/mingw-w64-geocode-glib/geocode-glib-i686.install b/mingw-w64-geocode-glib/geocode-glib-i686.install new file mode 100644 index 0000000000..a22a9c5c0e --- /dev/null +++ b/mingw-w64-geocode-glib/geocode-glib-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-geocode-glib/geocode-glib-x86_64.install b/mingw-w64-geocode-glib/geocode-glib-x86_64.install new file mode 100644 index 0000000000..522f66d091 --- /dev/null +++ b/mingw-w64-geocode-glib/geocode-glib-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-geoip2-database/PKGBUILD b/mingw-w64-geoip2-database/PKGBUILD new file mode 100644 index 0000000000..d545e74b51 --- /dev/null +++ b/mingw-w64-geoip2-database/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Alexey Pavlov + +_realname=geoip2-database +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=20150720 +pkgrel=1 +pkgdesc="GeoLite country geolocation database compiled by MaxMind (mingw-w64)" +arch=('any') +url="http://www.maxmind.com/app/ip-location" +license=('custom:Creative Commons Attribution-ShareAlike 3.0 Unported') +source=(GeoLite2-Country-${pkgver}.mmdb.gz::http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz + #GeoLite2-City-${pkgver}.mmdb.gz::http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz + ) +sha256sums=('4819459376f61423f5fb96eff141bf486d8e6133c47acd832d2ba87a39f2a922') + +prepare() { + cd "${srcdir}" + mv GeoLite2-Country-${pkgver}.mmdb GeoLite2-Country.mmdb +} + +package() { + cd "${srcdir}" + + install -d "${pkgdir}${MINGW_PREFIX}/share/GeoIP2" + install -m644 -t "${pkgdir}${MINGW_PREFIX}/share/GeoIP2" GeoLite2-Country.mmdb +} diff --git a/mingw-w64-geos/PKGBUILD b/mingw-w64-geos/PKGBUILD index 10443e88b1..5265509997 100644 --- a/mingw-w64-geos/PKGBUILD +++ b/mingw-w64-geos/PKGBUILD @@ -3,14 +3,14 @@ _realname=geos pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.4.2 -pkgrel=3 +pkgrel=4 pkgdesc="C++ port of the Java Topology Suite (mingw-w64)" arch=('any') url="http://trac.osgeo.org/geos/" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' '!emptydirs') -source=(http://download.osgeo.org/geos/geos-$pkgver.tar.bz2 +source=(http://download.osgeo.org/geos/geos-${pkgver}.tar.bz2 01-fix-buildsystem.patch) sha256sums=('15e8bfdf7e29087a957b56ac543ea9a80321481cef4d4f63a7b268953ad26c53' '89cd30338e6d29bfb0b1f50565b6ac32f85a4e327fbcfa025f20e51af4abae27') @@ -23,9 +23,11 @@ prepare() { build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTS=ON \ -DGEOS_ENABLE_INLINE=OFF \ @@ -35,7 +37,7 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install + make DESTDIR=${pkgdir} install } check() { diff --git a/mingw-w64-gettext/08-vs-compatible.patch b/mingw-w64-gettext/08-vs-compatible.patch new file mode 100644 index 0000000000..d6413ad508 --- /dev/null +++ b/mingw-w64-gettext/08-vs-compatible.patch @@ -0,0 +1,11 @@ +--- gettext-runtime/intl/libgnuintl.in.h.old 2015-06-15 10:40:11.594942600 +0200 ++++ gettext-runtime/intl/libgnuintl.in.h 2015-06-15 10:40:50.579345400 +0200 +@@ -336,7 +336,7 @@ extern int vfprintf (FILE *, const char + + #if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ + #undef printf +-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ ++#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ || defined _MSC_VER + /* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. diff --git a/mingw-w64-gettext/121-keep-posix-path.patch b/mingw-w64-gettext/121-keep-posix-path.patch new file mode 100644 index 0000000000..bd13c5e1b6 --- /dev/null +++ b/mingw-w64-gettext/121-keep-posix-path.patch @@ -0,0 +1,37 @@ +From c9b8cf86ba8a24f1e0a45de53a295166672cf219 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Thu, 10 Sep 2015 13:09:15 +0200 +Subject: [PATCH] Prevent absolute DOS path from being hard-coded + +When passing absolute POSIX-style paths to the MinGW compiler, they are +mangled into Windows-style paths, including the DOS drive, making the +paths highly specific to the developer who happened to build the package. + +This is obviously not what we want, so prefix the absolute POSIX path with +a space to convince the MSys2 runtime *not* to mangle the aliaspath. + +Signed-off-by: Johannes Schindelin +--- + gettext-runtime/intl/Makefile.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in +index 49751a2..b801220 100644 +--- a/gettext-runtime/intl/Makefile.in ++++ b/gettext-runtime/intl/Makefile.in +@@ -98,9 +98,9 @@ am__v_lt_0 = --silent + + # -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro. + # -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro. +-DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ +--DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \ +--DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ ++DEFS = -DLOCALEDIR=\ \"$(localedir)\" -DLOCALE_ALIAS_PATH=\ \"$(aliaspath)\" \ ++-DLIBDIR=\ \"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \ ++-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\ \"$(libdir)\" -DNO_XMALLOC \ + -Dset_relocation_prefix=libintl_set_relocation_prefix \ + -Drelocate=libintl_relocate \ + -DDEPENDS_ON_LIBICONV=1 @DEFS@ +-- +2.5.1+unc.5.gc15a74e.dirty + diff --git a/mingw-w64-gettext/PKGBUILD b/mingw-w64-gettext/PKGBUILD index 665a5f81e4..891728d623 100644 --- a/mingw-w64-gettext/PKGBUILD +++ b/mingw-w64-gettext/PKGBUILD @@ -1,51 +1,71 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=gettext +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.19.3 -pkgrel=1 +pkgver=0.19.6 +pkgrel=2 arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") pkgdesc="GNU internationalization library (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libiconv") # "${MINGW_PACKAGE_PREFIX}-termcap" +depends=("${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-libiconv" + #"${MINGW_PACKAGE_PREFIX}-termcap" + ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-ncurses") options=('strip' 'staticlibs') -license=('GPL' 'LGPL') + +# GPL3 for the package as a whole and LGPL for some parts, see the license files +license=(GPL3 partial:'LGPL2.1') + url="http://www.gnu.org/software/gettext/" -source=("http://ftp.gnu.org/pub/gnu/${_realname}/${_realname}-$pkgver.tar.gz"{,.sig} +source=("http://ftp.gnu.org/pub/gnu/${_realname}/${_realname}-${pkgver}.tar.gz"{,.sig} 00-relocatex-libintl-0.18.3.1.patch 120-Fix-Woe32-link-errors-when-compiling-with-O0.patch 04-mingw-script-slash-fix.mingw.patch 05-always-use-libintl-vsnprintf.mingw.patch 06-dont-include-ctype-after-gnulibs-wctype.mingw.patch - 07-fix-asprintf-conflict.mingw.patch) -md5sums=('c365029ffc866fc4e485d9e5ca60b260' + 07-fix-asprintf-conflict.mingw.patch + 08-vs-compatible.patch + 121-keep-posix-path.patch) +md5sums=('6d1447f8c5c45c329371ef4bfe7d79a5' 'SKIP' '397d7d6d4abd15a70edb3c9f2bab4cd2' '6fc5459e5afa3f9df7602fcd1d09355b' '0f754bf438368854ef63886715a3b023' '27852a388b8cf38188dc392c244230ff' 'f69747f43f279b8a81286cfe5916b82f' - '3ebccf730ec3377b068027eb2283afb2') + '3ebccf730ec3377b068027eb2283afb2' + 'f5b611172ae58f1e4589a8d0c1d53414' + 'cc773909f10b1cbb626caafa822c73cf') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" + rm -rf gettext-runtime/intl/canonicalize.c \ + gettext-runtime/intl/relocatex.c \ + gettext-runtime/intl/relocatex.h \ + MINGW-PATCHES/README-relocatex-libintl.txt || true + patch -p1 -i ${srcdir}/00-relocatex-libintl-0.18.3.1.patch patch -p0 -i ${srcdir}/04-mingw-script-slash-fix.mingw.patch patch -p0 -i ${srcdir}/05-always-use-libintl-vsnprintf.mingw.patch patch -p0 -i ${srcdir}/06-dont-include-ctype-after-gnulibs-wctype.mingw.patch patch -p0 -i ${srcdir}/07-fix-asprintf-conflict.mingw.patch + patch -p0 -i ${srcdir}/08-vs-compatible.patch #patch -p1 -i ${srcdir}/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch - + patch -p1 -i ${srcdir}/121-keep-posix-path.patch + # libtoolize --automake --copy --force #WANT_AUTOMAKE=latest ./autogen.sh --skip-gnulib } -build() -{ - mkdir -p $srcdir/build-${MINGW_CHOST} && cd $srcdir/build-${MINGW_CHOST} - # export lt_cv_deplibs_check_method='pass_all' - ${srcdir}/${_realname}-$pkgver/configure \ +build() { + export lt_cv_deplibs_check_method='pass_all' + + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -64,10 +84,22 @@ build() --with-included-libxml \ --with-included-glib \ --with-libncurses-prefix=${MINGW_PREFIX} + make } package() { - cd $srcdir/build-${MINGW_CHOST} - make DESTDIR="$pkgdir" install + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gettext-runtime/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gettext-runtime/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gettext-runtime/intl/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gettext-runtime/intl/COPYING.LIB" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gettext-runtime/libasprintf/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gettext-runtime/libasprintf/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gettext-runtime/libasprintf/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gettext-runtime/libasprintf/COPYING.LIB" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gettext-tools/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gettext-tools/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gettext-tools/gnulib-lib/libxml/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gettext-tools/gnulib-lib/libxml/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/gnulib-local/lib/libxml/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gnulib-local/lib/libxml/COPYING" + rm "${pkgdir}${MINGW_PREFIX}/share/${_realname}/intl/COPYING.LIB" } diff --git a/mingw-w64-gexiv2/001-win.patch b/mingw-w64-gexiv2/001-win.patch new file mode 100644 index 0000000000..6141c6a74c --- /dev/null +++ b/mingw-w64-gexiv2/001-win.patch @@ -0,0 +1,43 @@ +--- ./configure.ac.orig 2014-09-17 00:09:05.000000000 +0200 ++++ ./configure.ac 2015-02-21 21:20:44.406810300 +0100 +@@ -122,7 +122,7 @@ + if test "x$enable_introspection" = "xyes"; then + # Used to determine where Python wants the .gi file to be installed ... + # if Python is not installed, PYTHON2 and PYTHON3 will be empty +- PYTHON="import gi; print(gi._overridesdir)" ++ PYTHON="import gi; from os.path import abspath; print(abspath(gi._overridesdir))" + PYTHON2_GIDIR=$(python2 -c "$PYTHON") + AC_MSG_RESULT([Python2 GObject Introspection directory: $PYTHON2_GIDIR]) + PYTHON3_GIDIR=$(python3 -c "$PYTHON") +--- ./Makefile.am.orig 2014-09-17 00:07:53.000000000 +0200 ++++ ./Makefile.am 2015-02-21 21:21:24.598425100 +0100 +@@ -4,9 +4,9 @@ + pkgconfigdir = $(libdir)/pkgconfig + GEXIV2_publicdir = $(includedir)/gexiv2 + girdir = $(datadir)/gir-1.0 +-typelibdir = `pkg-config gobject-introspection-no-export-1.0 --variable typelibdir` +-py2gidir = $(PYTHON2_GIDIR) +-py3gidir = $(PYTHON3_GIDIR) ++typelibdir = `pkg-config gobject-introspection-no-export-1.0 --variable typelibdir --dont-define-prefix` ++py2gidir = `cygpath -u $(PYTHON2_GIDIR)` ++py3gidir = `cygpath -u $(PYTHON3_GIDIR)` + vapidir = $(datadir)/vala/vapi + + # Extra package files. # +@@ -130,7 +130,7 @@ + g-ir-compiler --includedir=$(BUILD_DIR) -o $@ $< + + GExiv2-$(GIR_VERSION).gir: lib@PACKAGE_NAME@.la +- g-ir-scanner --verbose \ ++ CC="$(CC)" g-ir-scanner --verbose \ + --namespace=GExiv2 \ + --nsversion=$(GIR_VERSION) \ + --symbol-prefix=@PACKAGE_NAME@ \ +@@ -141,6 +141,6 @@ + -I @PACKAGE_NAME@ \ + $(GEXIV2_public_HEADERS) \ + --library lib@PACKAGE_NAME@.la \ +- $(LIBTOOL) \ ++ --libtool `which libtool` \ + --pkg=gobject-2.0 + diff --git a/mingw-w64-gexiv2/PKGBUILD b/mingw-w64-gexiv2/PKGBUILD new file mode 100644 index 0000000000..5be13c34d9 --- /dev/null +++ b/mingw-w64-gexiv2/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Andrea Zagli + +_realname=gexiv2 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.10.3 +pkgrel=2 +arch=('any') +pkgdesc="GObject-based wrapper around the Exiv2 library (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-exiv2" + "${MINGW_PACKAGE_PREFIX}-python2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-python2-gobject" + "${MINGW_PACKAGE_PREFIX}-python3-gobject" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "gtk-doc") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://www.gnome.org/" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('390cfb966197fa9f3f32200bc578d7c7f3560358c235e6419657206a362d3988' + '1ba351119f9112ba649dd4397b712ee04d8327d5d056d3587f77c824f7846438') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-win.patch + + AUTOPOINT='intltoolize --automake --copy' autoreconf -fiv +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-ghex/001-nohelp.patch b/mingw-w64-ghex/001-nohelp.patch new file mode 100644 index 0000000000..65b4aa80d1 --- /dev/null +++ b/mingw-w64-ghex/001-nohelp.patch @@ -0,0 +1,11 @@ +--- ./Makefile.am.orig 2015-02-03 21:31:06.938593300 +0100 ++++ ./Makefile.am 2015-02-03 21:31:09.376081200 +0100 +@@ -2,7 +2,7 @@ + + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +-SUBDIRS = data po help src icons ++SUBDIRS = data po src icons + + EXTRA_DIST = \ + COPYING-DOCS \ diff --git a/mingw-w64-ghex/002-fread.patch b/mingw-w64-ghex/002-fread.patch new file mode 100644 index 0000000000..fa44024875 --- /dev/null +++ b/mingw-w64-ghex/002-fread.patch @@ -0,0 +1,11 @@ +--- ./src/hex-document.c.orig 2014-04-14 22:42:15.000000000 +0200 ++++ ./src/hex-document.c 2015-02-15 10:48:42.205722500 +0100 +@@ -652,7 +652,7 @@ + if(!get_document_attributes(doc)) + return FALSE; + +- if((file = fopen(doc->file_name, "r")) == NULL) ++ if((file = fopen(doc->file_name, "rb")) == NULL) + return FALSE; + + doc->gap_size = doc->buffer_size - doc->file_size; diff --git a/mingw-w64-ghex/PKGBUILD b/mingw-w64-ghex/PKGBUILD new file mode 100644 index 0000000000..f69310fa0f --- /dev/null +++ b/mingw-w64-ghex/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Andrea Zagli + +_realname=ghex +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.18.0 +pkgrel=1 +arch=('any') +pkgdesc="GNOME Hex editor for files (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +license=("GPL 2") +url="http://www.gnome.org" +install=ghex-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-nohelp.patch + 002-fread.patch) +sha256sums=('c5b1eb50a8dd1334880b37617871498b778ea137f79bb43894ec68e4f63dc925' + 'cd87d0040cd37a942ff8a1e3013bc96083920dc959dac0a96b543b8b706585ff' + '8e403c1e7c3f83adc768bfe45bb1ea42ae90fc4dfb7fe9bf4544820541a3241d') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p0 -i ${srcdir}/001-nohelp.patch + patch -p0 -i ${srcdir}/002-fread.patch + + autoreconf -ifv +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-ghex/ghex-i686.install b/mingw-w64-ghex/ghex-i686.install new file mode 100644 index 0000000000..1056eadbc3 --- /dev/null +++ b/mingw-w64-ghex/ghex-i686.install @@ -0,0 +1,13 @@ +post_install() { + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/HighContrast + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-ghex/ghex-x86_64.install b/mingw-w64-ghex/ghex-x86_64.install new file mode 100644 index 0000000000..05e2963202 --- /dev/null +++ b/mingw-w64-ghex/ghex-x86_64.install @@ -0,0 +1,13 @@ +post_install() { + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/HighContrast + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-ghostscript/PKGBUILD b/mingw-w64-ghostscript/PKGBUILD index 76c60f8daa..d5e090b91e 100644 --- a/mingw-w64-ghostscript/PKGBUILD +++ b/mingw-w64-ghostscript/PKGBUILD @@ -1,47 +1,49 @@ # Maintainer: Alexey Pavlov _realname=ghostscript +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=9.15 -pkgrel=1 +pkgver=9.18 +pkgrel=2 arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('AGPL' 'custom') pkgdesc="An interpreter for the PostScript language (mingw-w64)" -depends=( - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-libpng>=1.5.7" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libtiff>=4.0.0" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-dbus" - #"${MINGW_PACKAGE_PREFIX}-openjpeg" - "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - ) +depends=("${MINGW_PACKAGE_PREFIX}-dbus" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-openjpeg" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-gnutls") -optdepends=("${MINGW_PACKAGE_PREFIX}-gtk3: needed for gsx") +optdepends=("${MINGW_PACKAGE_PREFIX}-gtk3: needed for gsx") url="http://www.ghostscript.com/" source=(http://downloads.ghostscript.com/public/ghostscript-${pkgver}.tar.bz2 mingw-build.patch ghostscript-sys-zlib.patch libspectre.patch) options=('staticlibs' 'strip') -md5sums=('0ee21d975c67a4883ba66bcc332418f5' - '00bd92ade43e6e652ae48e1c020281df' +md5sums=('aa125af368d89b3dbd15fc379f13375f' + 'd41cb9780478929be3430fee1a1a55ba' '24169cd027208610fd40070bae68ca73' '1fddb43d7ec2cd90a38291e6410d108d') +noextract=(ghostscript-${pkgver}.tar.bz2) prepare() { - cd "$srcdir/${_realname}-$pkgver" + [[ -d ${srcdir}/${_realname}-${pkgver} ]] && rm -rf ${srcdir}/${_realname}-${pkgver} + tar -xjf ${srcdir}/${_realname}-${pkgver}.tar.bz2 -C $srcdir || true + + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/mingw-build.patch patch -p1 -i ${srcdir}/ghostscript-sys-zlib.patch patch -p1 -i ${srcdir}/libspectre.patch sed -e "s|/usr|${MINGW_PREFIX}/${MINGW_CHOST}|g" -i base/all-arch.mak base/unix-aux.mak - + # force it to use system-libs rm -rf freetype jpeg libpng lcms lcms2 tiff zlib #openjpeg @@ -52,7 +54,7 @@ prepare() { build() { - cd ${srcdir}/${_realname}-$pkgver + cd ${srcdir}/${_realname}-${pkgver} ./configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ @@ -67,19 +69,22 @@ build() --enable-freetype \ --disable-contrib \ --without-x - + make so } package() { - cd ${srcdir}/${_realname}-$pkgver - make DESTDIR="$pkgdir" soinstall + cd ${srcdir}/${_realname}-${pkgver} + make DESTDIR="${pkgdir}" soinstall # install missing doc files # http://bugs.archlinux.org/task/18023 - install -m 644 "${srcdir}"/${_realname}-${pkgver}/doc/{Ps2ps2.htm,gs-vms.hlp,gsdoc.el,pscet_status.txt} "${pkgdir}${MINGW_PREFIX}"/share/${_realname}/$pkgver/doc/ + install -m 644 "${srcdir}"/${_realname}-${pkgver}/doc/{Ps2ps2.htm,gs-vms.hlp,gsdoc.el,pscet_status.txt} "${pkgdir}${MINGW_PREFIX}"/share/${_realname}/${pkgver}/doc/ install -D -m644 "${srcdir}"/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE + cp ${pkgdir}${MINGW_PREFIX}/bin/{gsc,gswin32c}.exe + cp ${pkgdir}${MINGW_PREFIX}/bin/{gsc,gs}.exe + # remove unwanted localized man-pages rm -rf "${pkgdir}${MINGW_PREFIX}"/share/man/[^man1]* } diff --git a/mingw-w64-ghostscript/mingw-build.patch b/mingw-w64-ghostscript/mingw-build.patch index d32da5e1a6..ecbe99c11e 100644 --- a/mingw-w64-ghostscript/mingw-build.patch +++ b/mingw-w64-ghostscript/mingw-build.patch @@ -1,19 +1,15 @@ diff -Naur ghostscript-9.10-orig/base/gp_mswin.c ghostscript-9.10/base/gp_mswin.c --- ghostscript-9.10-orig/base/gp_mswin.c 2013-08-30 14:37:28.000000000 +0400 +++ ghostscript-9.10/base/gp_mswin.c 2014-01-22 20:16:23.009800000 +0400 -@@ -866,6 +866,7 @@ - return((bool)S_ISREG(s.st_mode)); - } +@@ -866,7 +866,7 @@ -+#ifndef __MINGW64_VERSION_MAJOR /* ------------------------- _snprintf -----------------------------*/ +-#if defined(_MSC_VER) && _MSC_VER>=1900 /* VS 2014 and later have (finally) snprintf */ ++#if (defined(_MSC_VER) && _MSC_VER>=1900) || defined(__MINGW64_VERSION_MAJOR) /* VS 2014 and later have (finally) snprintf */ + # define STDC99 + #else /* Microsoft Visual C++ 2005 doesn't properly define snprintf, -@@ -885,3 +886,4 @@ - } else - return 0; - } -+#endif diff -Naur ghostscript-9.10-orig/base/gp_mswin.h ghostscript-9.10/base/gp_mswin.h --- ghostscript-9.10-orig/base/gp_mswin.h 2013-08-30 14:37:28.000000000 +0400 +++ ghostscript-9.10/base/gp_mswin.h 2014-01-22 17:21:46.232600000 +0400 @@ -230,7 +226,7 @@ diff -Naur ghostscript-9.10-orig/base/unix-aux.mak ghostscript-9.10/base/unix-au + $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) +endif - $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) + $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS) $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) # .... and one using the zlib library linked via the command line @@ -250,7 +246,7 @@ diff -Naur ghostscript-9.10-orig/base/unix-aux.mak ghostscript-9.10/base/unix-au + $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) +endif - $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) + $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS) $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) diff -Naur ghostscript-9.10-orig/base/unix-dll.mak ghostscript-9.10/base/unix-dll.mak --- ghostscript-9.10-orig/base/unix-dll.mak 2013-08-30 14:37:28.000000000 +0400 @@ -298,7 +294,7 @@ diff -Naur ghostscript-9.10-orig/base/unix-dll.mak ghostscript-9.10/base/unix-dl # GNU/Linux GS_SOEXT=$(SO_LIB_EXT) -@@ -80,27 +101,27 @@ +@@ -101,30 +122,30 @@ # Create symbolic links to the Ghostscript interpreter library @@ -315,14 +311,17 @@ diff -Naur ghostscript-9.10-orig/base/unix-dll.mak ghostscript-9.10/base/unix-dl + $(RM_) $(GS_SO_MAJOR_MINOR) + ln -s $(GS_SONAME_MAJOR) $(GS_SO_MAJOR_MINOR) + so-links-subtarget: $(GS_SO) + $(NO_OP) + # Build the small Ghostscript loaders, with Gtk+ and without - $(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) + $(GSSOC_XE): so-links-subtarget $(PSSRC)$(SOC_LOADER) - $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ - -L$(BINDIR) -l$(GS_SO_BASE) + $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)$(SOC_LOADER_PLAIN) \ + -L$(BINDIR) -l$(GS_SONAME_LINK) - $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) + $(GSSOX_XE): so-links-subtarget $(PSSRC)$(SOC_LOADER) $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ - -L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) + -L$(BINDIR) -l$(GS_SONAME_LINK) $(SOC_LIBS) @@ -335,7 +334,7 @@ diff -Naur ghostscript-9.10-orig/base/unix-dll.mak ghostscript-9.10/base/unix-dl DISPLAY_DEV=$(DD)display.dev\ STDIO_IMPLEMENTATION=c\ BUILDDIRPREFIX=$(BUILDDIRPREFIX) -@@ -158,11 +179,16 @@ +@@ -158,11 +179,17 @@ -mkdir -p $(DESTDIR)$(gsincludedir) $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME) $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME) @@ -354,28 +353,22 @@ diff -Naur ghostscript-9.10-orig/base/unix-dll.mak ghostscript-9.10/base/unix-dl + $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) ; \ + ln -s $(GS_SONAME_MAJOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR) ; \ + fi ++ $(INSTALL_DATA) $(GLSRCDIR)/gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h $(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h $(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h $(INSTALL_DATA) $(DEVSRC)gdevdsp.h $(DESTDIR)$(gsincludedir)gdevdsp.h diff -Naur ghostscript-9.10-orig/base/unix-gcc.mak ghostscript-9.10/base/unix-gcc.mak --- ghostscript-9.10-orig/base/unix-gcc.mak 2013-08-30 14:37:28.000000000 +0400 +++ ghostscript-9.10/base/unix-gcc.mak 2014-01-22 22:02:03.959800000 +0400 -@@ -57,13 +57,13 @@ - INSTALL_PROGRAM = $(INSTALL) -m 755 +@@ -57,7 +57,7 @@ INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_SHARED = -prefix = /usr/local +prefix = /usr - exec_prefix = $(prefix) - bindir = $(exec_prefix)/bin + exec_prefix = ${prefix} + bindir = ${exec_prefix}/bin scriptdir = $(bindir) - includedir = $(prefix)/include - libdir = $(exec_prefix)/lib --mandir = $(prefix)/man -+mandir = $(prefix)/share/man - man1ext = 1 - datadir = $(prefix)/share - gsdir = $(datadir)/ghostscript @@ -71,7 +71,7 @@ gssharedir = $(libdir)/ghostscript/$(GS_DOT_VERSION) gsincludedir = $(includedir)/ghostscript/ @@ -553,24 +546,6 @@ diff -Naur ghostscript-9.10-orig/Makefile.in ghostscript-9.10/Makefile.in # Do not edit the next group of lines. include $(GLSRCDIR)/version.mak -@@ -146,7 +154,16 @@ - - # Define the name of the executable file. - --GS=@GS@@EXEEXT@ -+ifeq ($(MINGW_BUILD), 1) -+ # On Windows, building a shared object and the accompanying thin loaders is the recommended method, -+ # so we need to eliminate the .exe from the dll's name. -+ # At the same time, should a user want to use the basic make, -+ # he/she may simply pass --with-gs='gs.exe' or --with-gs='gswin32.exe' to ./configure -+ GS=@GS@ -+else -+ # define GS in all other platforms -+ GS=@GS@@EXEEXT@ -+endif - GS_SO_BASE=@GS@ - XE=@EXEEXT@ - XEAUX=@EXEEXT@ @@ -387,8 +404,8 @@ # Solaris may need -lnsl -lsocket -lposix4. # (Libraries required by individual drivers are handled automatically.) @@ -628,3 +603,14 @@ diff -Naur ghostscript-9.10-orig/Makefile.in ghostscript-9.10/Makefile.in # Clean up after the autotools scripts distclean : clean config-clean soclean pgclean debugclean mementoclean -$(RM_) -r $(BINDIR) $(GLOBJDIR) $(PSOBJDIR) $(AUXDIR) +--- ghostscript-9.18/base/stat_.h.orig 2015-10-13 10:13:06.284676300 +0300 ++++ ghostscript-9.18/base/stat_.h 2015-10-13 10:13:24.677192400 +0300 +@@ -43,7 +43,7 @@ + * Microsoft C uses _stat instead of stat, + * for both the function name and the structure name. + */ +-#ifdef _MSC_VER ++#if defined(_MSC_VER) || defined(__MINGW32__) + # define stat _stat + #define struct_stat struct _stat + #else diff --git a/mingw-w64-giflib/PKGBUILD b/mingw-w64-giflib/PKGBUILD index 2bbbfb8b42..6b2e434325 100644 --- a/mingw-w64-giflib/PKGBUILD +++ b/mingw-w64-giflib/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=giflib - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.1.0 -pkgrel=1 +pkgver=5.1.1 +pkgrel=2 pkgdesc="A library for reading and writing gif images (mingw-w64)" arch=('any') url="http://sourceforge.net/projects/giflib" @@ -14,12 +13,12 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') source=("http://downloads.sourceforge.net/sourceforge/giflib/${_realname}-${pkgver}.tar.bz2" "giflib-5.0.4-include-stddef.patch") -md5sums=('c7e9f1c10b755ab955156d4c1ac7fc5d' +md5sums=('1c39333192712788c6568c78a949f13e' 'e39b98822334f2bd2009469e5dea65c5') prepare() { - cd "$srcdir/giflib-$pkgver" - patch -Np1 -i "$srcdir/giflib-5.0.4-include-stddef.patch" + cd "${srcdir}/${_realname}-${pkgver}" + patch -Np1 -i "${srcdir}/giflib-5.0.4-include-stddef.patch" } build() { @@ -27,15 +26,16 @@ build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} + make bin_PROGRAMS='' } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" bin_PROGRAMS='' install + make DESTDIR="${pkgdir}" bin_PROGRAMS='' install } diff --git a/mingw-w64-gimp-ufraw/PKGBUILD b/mingw-w64-gimp-ufraw/PKGBUILD index 8d637d9962..6a7a88e82b 100644 --- a/mingw-w64-gimp-ufraw/PKGBUILD +++ b/mingw-w64-gimp-ufraw/PKGBUILD @@ -1,33 +1,30 @@ # Maintainer: Alexey Pavlov _realname=ufraw - pkgname="${MINGW_PACKAGE_PREFIX}-gimp-${_realname}" groups=("${MINGW_PACKAGE_PREFIX}-gimp-plugins") -pkgver=0.19.2 +pkgver=0.22 pkgrel=1 pkgdesc="Converter for raw files; utility and GIMP plugin (mingw-w64)" arch=('any') url="http://ufraw.sourceforge.net/" license=("GPL") options=('strip' 'staticlibs') -depends=( - "${MINGW_PACKAGE_PREFIX}-gtkimageview" - "${MINGW_PACKAGE_PREFIX}-exiv2" - "${MINGW_PACKAGE_PREFIX}-lcms" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-lensfun" - "${MINGW_PACKAGE_PREFIX}-cfitsio" - ) +depends=("${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-cfitsio" + "${MINGW_PACKAGE_PREFIX}-exiv2" + "${MINGW_PACKAGE_PREFIX}-gtkimageview" + "${MINGW_PACKAGE_PREFIX}-lcms" + "${MINGW_PACKAGE_PREFIX}-lensfun") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gimp") + "${MINGW_PACKAGE_PREFIX}-gimp") optdepends=("${MINGW_PACKAGE_PREFIX}-gimp: to use the gimp import plugin for raw images") -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.gz" - mingw-getopt-long.patch - mingw-w64-fixes.patch) -sha256sums=('73befe9f16f015a8c0f26cef3bb2e17cac9ae64aef2ade48c29aedb1ee51abd3' +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" + mingw-getopt-long.patch + mingw-w64-fixes.patch) +sha256sums=('f7abd28ce587db2a74b4c54149bd8a2523a7ddc09bedf4f923246ff0ae09a25e' '41c7c530b6c8992653166ba2adb155c3ae137eb12ed7bc8675d623fd58a6bb13' - 'd38eb64d6b5d5d85a25e1adaa5cafbd0156ba939329b66d48c46047f833ab1ec') + '9bbb7748bdb3bb9e085600b827a061d91e938852aae80e51da082f030901cd25') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -37,9 +34,10 @@ prepare() { } build() { - cd "${srcdir}/${_realname}-${pkgver}" + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} MSYS2_ARG_CONV_EXCL="GIMP_LIBDIR" \ - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -50,12 +48,12 @@ build() { --enable-contrast local wgimp_pref=$(cygpath -wm ${MINGW_PREFIX}) - sed -e "s|$wgimp_pref|${MINGW_PREFIX}|g" -i Makefile + sed -e "s|${wgimp_pref}|${MINGW_PREFIX}|g" -i Makefile sed -e "s|-ffast-math -fomit-frame-pointer -W -Wall -O3|${CFLAGS}|" -i Makefile make VERBOSE=1 } package() { - cd "${srcdir}/${_realname}-${pkgver}" - make -j1 DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-gimp-ufraw/mingw-w64-fixes.patch b/mingw-w64-gimp-ufraw/mingw-w64-fixes.patch index febe2c1809..634143492f 100644 --- a/mingw-w64-gimp-ufraw/mingw-w64-fixes.patch +++ b/mingw-w64-gimp-ufraw/mingw-w64-fixes.patch @@ -1,40 +1,29 @@ ---- ufraw-0.19.2/dcraw.cc.orig 2014-02-27 09:46:30.949200000 +0400 -+++ ufraw-0.19.2/dcraw.cc 2014-02-27 09:46:52.898400000 +0400 -@@ -513,7 +513,7 @@ +--- ufraw-0.22/dcraw.cc.orig 2014-02-27 09:46:30.949200000 +0400 ++++ ufraw-0.22/dcraw.cc 2014-02-27 09:46:52.898400000 +0400 +@@ -446,7 +446,7 @@ { if (fread (pixel, 2, count, ifp) < count) derror(); if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) -- swab ((const char *)pixel, (char *)pixel, count*2); /*mingw support UF*/ -+ swab ((char *)pixel, (char *)pixel, count*2); /*mingw support UF*/ - } - - void CLASS canon_600_fixed_wb (int temp) -@@ -2187,7 +2187,7 @@ +-#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 4 ++#if defined(__MINGW64_VERSION_MAJOR) + swab ((char *) pixel, (char *) pixel, count*2); + #else + swab ((const char *) pixel, (char *) pixel, count*2); +@@ -2397,7 +2397,7 @@ DCRaw *d = (DCRaw*)cinfo->client_data; nbytes = fread (jpeg_buffer, 1, 4096, d->ifp); -- swab ((const char *)jpeg_buffer, (char *)jpeg_buffer, nbytes); /*mingw UF*/ -+ swab ((char *)jpeg_buffer, (char *)jpeg_buffer, nbytes); /*mingw UF*/ - cinfo->src->next_input_byte = jpeg_buffer; - cinfo->src->bytes_in_buffer = nbytes; - return TRUE; -@@ -9342,7 +9342,7 @@ +-#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 4 ++#if defined(__MINGW64_VERSION_MAJOR) + swab ((char *) jpeg_buffer, (char *) jpeg_buffer, nbytes); + #else + swab ((const char *) jpeg_buffer, (char *) jpeg_buffer, nbytes); +@@ -10196,7 +10196,7 @@ FORCC ppm [col*colors+c] = curve[image[soff][c]] >> 8; else FORCC ppm2[col*colors+c] = curve[image[soff][c]]; if (output_bps == 16 && !output_tiff && htons(0x55aa) != 0x55aa) -- swab ((const char *)ppm2, (char *)ppm2, width*colors*2); /*mingw UF*/ -+ swab ((char *)ppm2, (char *)ppm2, width*colors*2); /*mingw UF*/ - fwrite (ppm, colors*output_bps/8, width, ofp); - } - free (ppm); ---- ufraw-0.19.2/uf_gtk.cc.orig 2014-02-27 09:46:30.949200000 +0400 -+++ ufraw-0.19.2/uf_gtk.cc 2014-02-27 09:46:52.898400000 +0400 -@@ -97,7 +97,7 @@ - // Set combo box data and keep it up to date - void uf_combo_box_set_data(GtkComboBox *combo, int *valuep) - { -- gulong handler_id = reinterpret_cast( -+ guint64 handler_id = reinterpret_cast( - g_object_get_data(G_OBJECT(combo), "uf-combo-handler-id")); - if (handler_id != 0) - g_signal_handler_disconnect(G_OBJECT(combo), handler_id); +-#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 4 ++#if defined(__MINGW64_VERSION_MAJOR) + swab ((char *) ppm2, (char *) ppm2, width*colors*2); + #else + swab ((const char *) ppm2, (char *) ppm2, width*colors*2); diff --git a/mingw-w64-gimp/PKGBUILD b/mingw-w64-gimp/PKGBUILD index 0d7e6517e2..b207bf9a47 100644 --- a/mingw-w64-gimp/PKGBUILD +++ b/mingw-w64-gimp/PKGBUILD @@ -1,58 +1,56 @@ # Maintainer: Alexey Pavlov _realname=gimp +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.8.14 +pkgver=2.8.16 pkgrel=1 pkgdesc="GNU Image Manipulation Program (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") url="http://www.gimp.org/" license=('GPL' 'LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-python2-pygtk" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-xpm-nox" - "${MINGW_PACKAGE_PREFIX}-libwmf" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-libmng" - "${MINGW_PACKAGE_PREFIX}-dbus-glib" - "${MINGW_PACKAGE_PREFIX}-libexif" - "${MINGW_PACKAGE_PREFIX}-gegl" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" - "${MINGW_PACKAGE_PREFIX}-babl" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-webkitgtk2" - "${MINGW_PACKAGE_PREFIX}-poppler" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-ghostscript" +depends=("${MINGW_PACKAGE_PREFIX}-babl" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-dbus-glib" + "${MINGW_PACKAGE_PREFIX}-gegl" + "${MINGW_PACKAGE_PREFIX}-ghostscript" + "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-libexif" + "${MINGW_PACKAGE_PREFIX}-libmng" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libwmf" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-poppler" + "${MINGW_PACKAGE_PREFIX}-python2-pygtk" + "${MINGW_PACKAGE_PREFIX}-python2-gobject" + "${MINGW_PACKAGE_PREFIX}-webkitgtk2" + "${MINGW_PACKAGE_PREFIX}-xpm-nox" ) -makedepends=('intltool' - "${MINGW_PACKAGE_PREFIX}-iso-codes" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-webkitgtk2" - "${MINGW_PACKAGE_PREFIX}-poppler" - "${MINGW_PACKAGE_PREFIX}-ghostscript") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-iso-codes" + "intltool") options=('strip' 'makeflags') install=gimp-${CARCH}.install source=(http://download.gimp.org/pub/gimp/v${pkgver%.*}/${_realname}-${pkgver}.tar.bz2 gegl-0.3-fix.patch find-directx-fix.patch python-m4.patch - mingw-add-ModuleFileName-dir-to-PATH.patch) -md5sums=('233c948203383fa078434cc3f8f925cb' + replace-pygtk-codegen.patch) +md5sums=('30e0a1b7c18b0e3415f4ac54567252ac' 'd1e19159164cac7b39578a6b0bb02cbb' '0df0c9c5f55012023894ed8b959c2fa9' '460f010cfb789608d2045a4a936f47b2' - '0d5c523e91fbfbab43c2f12447ccfebc') + '99c9edb5613db63033e043261e53d2c3') prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/gegl-0.3-fix.patch patch -p1 -i ${srcdir}/find-directx-fix.patch patch -p1 -i ${srcdir}/python-m4.patch - patch -p1 -i ${srcdir}/mingw-add-ModuleFileName-dir-to-PATH.patch - + patch -p1 -i ${srcdir}/replace-pygtk-codegen.patch + rm -fr autom4te.cache libtoolize -c aclocal -I m4macros @@ -64,10 +62,13 @@ prepare() { } build() { - cd "${srcdir}/${_realname}-${pkgver}" + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + cd build-${MINGW_CHOST} PYTHON=${MINGW_PREFIX}/bin/python2 \ - ./configure --prefix=${MINGW_PREFIX} \ + ./configure \ + --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -82,11 +83,14 @@ build() { --with-pdbgen \ --with-directx-sdk=${MINGW_PREFIX}/${MINGW_CHOST} \ --without-x - make + + # V=1 because of a race condition (a generated 'bin2c' type + # file ending up truncated once). This might avoid it. + make V=1 } package() { - cd "${srcdir}/${_realname}-${pkgver}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install ln -s gimptool-2.0 "${pkgdir}${MINGW_PREFIX}/bin/gimptool.exe" diff --git a/mingw-w64-gimp/mingw-add-ModuleFileName-dir-to-PATH.patch b/mingw-w64-gimp/mingw-add-ModuleFileName-dir-to-PATH.patch deleted file mode 100644 index 911d404033..0000000000 --- a/mingw-w64-gimp/mingw-add-ModuleFileName-dir-to-PATH.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- gimp-2.8.10/app/main.c.orig 2014-02-27 14:45:08.125400000 +0400 -+++ gimp-2.8.10/app/main.c 2014-02-27 15:05:28.119200000 +0400 -@@ -309,6 +309,32 @@ - if (p_SetDllDirectoryA) - (*p_SetDllDirectoryA) (""); - } -+ /* Add ourself to system path */ -+ { -+ int result = 0; -+ static char progpath[PATH_MAX] = {'\0'}; -+ char *path = getenv("PATH"); -+ result = GetModuleFileNameA(NULL, progpath, PATH_MAX); -+ if (path) { -+ /* Add path of executable to system path. */ -+ char *module_path = progpath; -+ char *new_path = alloca(strlen("PATH=")+strlen(module_path)+1+strlen(path)+1); -+ if (new_path) { -+ strcpy( new_path, "PATH=" ); -+ strcat( new_path, module_path ); -+ char *slashes = strchr( new_path, '/' ); -+ while (slashes) { -+ *slashes = '\\'; -+ slashes = strchr( slashes+1, '/' ); -+ } -+ char *end = strrchr(new_path, '\\') ? strrchr(new_path, '\\') : new_path + strlen(new_path); -+ end[0] = ';'; -+ end[1] = '\0'; -+ strcat( new_path, path ); -+ putenv( new_path ); -+ } -+ } -+ } - #ifndef _WIN64 - { - typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags); diff --git a/mingw-w64-gimp/replace-pygtk-codegen.patch b/mingw-w64-gimp/replace-pygtk-codegen.patch new file mode 100644 index 0000000000..8fb9a6253a --- /dev/null +++ b/mingw-w64-gimp/replace-pygtk-codegen.patch @@ -0,0 +1,26 @@ +--- gimp-2.8.14/configure.ac.orig 2015-10-13 14:54:35.164396900 +0300 ++++ gimp-2.8.14/configure.ac 2015-10-13 15:01:58.768840100 +0300 +@@ -1892,9 +1892,9 @@ + PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version,, + [AC_MSG_ERROR([pycheck_error([PyGTK pygtk_required_version or newer], [it])])]) + +- AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no) +- if test "x$PYGTK_CODEGEN" = xno; then +- AC_MSG_ERROR([pycheck_error([pygtk-codegen-2.0 script], [it])]) ++ AC_PATH_PROG(PYGOBJECT_CODEGEN, pygobject-codegen-2.0, no) ++ if test "x$PYGOBJECT_CODEGEN" = xno; then ++ AC_MSG_ERROR([pycheck_error([pygobject-codegen-2.0 script], [it])]) + fi + + AC_MSG_CHECKING(for pygtk defs) +--- gimp-2.8.14/plug-ins/pygimp/Makefile.am.orig 2015-10-13 15:00:41.547754900 +0300 ++++ gimp-2.8.14/plug-ins/pygimp/Makefile.am 2015-10-13 15:01:12.574025700 +0300 +@@ -166,7 +166,7 @@ + + .defs.c: + (cd $(srcdir) \ +- && $(PYGTK_CODEGEN) \ ++ && $(PYGOBJECT_CODEGEN) \ + --override $*.override \ + --register $(PYGTK_DEFSDIR)/gdk-types.defs \ + --register $(PYGTK_DEFSDIR)/gtk-types.defs \ diff --git a/mingw-w64-git-git/PKGBUILD b/mingw-w64-git-git/PKGBUILD index d9b0d3caa2..4a2bc8e603 100644 --- a/mingw-w64-git-git/PKGBUILD +++ b/mingw-w64-git-git/PKGBUILD @@ -28,6 +28,7 @@ url="http://git-scm.com/" license=('GPL2') depends=("${MINGW_PACKAGE_PREFIX}-libiconv") +makedepends=('git') options=(!libtool strip staticlibs) diff --git a/mingw-w64-git-repo/PKGBUILD b/mingw-w64-git-repo/PKGBUILD new file mode 100644 index 0000000000..d1969dc1f3 --- /dev/null +++ b/mingw-w64-git-repo/PKGBUILD @@ -0,0 +1,43 @@ +_realname=git-repo +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.3.17 +pkgrel=1 +pkgdesc="The multiple Git repository tool (mingw-w64)" +arch=("any") +url="https://github.com/esrlabs/git-repo" +license=("Apache-2.0") +groups=("${MINGW_PACKAGE_PREFIX}") +depends=("${MINGW_PACKAGE_PREFIX}-python3") +source=(${_realname}-${pkgver}.tar.gz::"https://github.com/esrlabs/${_realname}/archive/v${pkgver}.tar.gz") +md5sums=('87b9bf38003ebed8b0692bf36b8f4c3e') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + cat <=2.0" - "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-tcl" "perl-Error" "perl>=5.14.0" @@ -104,7 +104,7 @@ build() { [ -d build-${CARCH} ] && rm -rf build-${CARCH} cp -rf $_realname-$_sillyname build-${CARCH} cd build-${CARCH} - + ./configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ diff --git a/mingw-w64-gitg/0001-Add-missing-includes.patch b/mingw-w64-gitg/0001-Add-missing-includes.patch new file mode 100644 index 0000000000..3a24079164 --- /dev/null +++ b/mingw-w64-gitg/0001-Add-missing-includes.patch @@ -0,0 +1,35 @@ +From 82337a0bd09cb63fdd61df90482aef5494be5846 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro +Date: Wed, 23 Dec 2015 08:46:06 +0100 +Subject: [PATCH] Add missing includes + +This happens for developing on linux something that is for windows +--- + libgitg/gitg-platform-support-win32.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/libgitg/gitg-platform-support-win32.c b/libgitg/gitg-platform-support-win32.c +index ca7f725..debb9fc 100644 +--- a/libgitg/gitg-platform-support-win32.c ++++ b/libgitg/gitg-platform-support-win32.c +@@ -21,6 +21,17 @@ + + #include + ++#define SAVE_DATADIR DATADIR ++#undef DATADIR ++#include ++#include ++#ifndef _WIN32_WINNT ++#define _WIN32_WINNT 0x0501 ++#endif ++#include ++#define DATADIR SAVE_DATADIR ++#undef SAVE_DATADIR ++ + gboolean + gitg_platform_support_use_native_window_controls (GdkDisplay *display) + { +-- +2.5.0 + diff --git a/mingw-w64-gitg/PKGBUILD b/mingw-w64-gitg/PKGBUILD index 55c028688c..e21a2b896b 100644 --- a/mingw-w64-gitg/PKGBUILD +++ b/mingw-w64-gitg/PKGBUILD @@ -1,19 +1,24 @@ # Maintainer: Ignacio Casal Quinteiro _realname=gitg +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.3.3 +pkgver=3.19.3 pkgrel=1 arch=('any') pkgdesc="git repository viewer for GTK+/GNOME (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-gtksourceview3" +depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-gtksourceview3" "${MINGW_PACKAGE_PREFIX}-libpeas" "${MINGW_PACKAGE_PREFIX}-enchant" "${MINGW_PACKAGE_PREFIX}-iso-codes" "${MINGW_PACKAGE_PREFIX}-python3-gobject" "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libsecret" + "${MINGW_PACKAGE_PREFIX}-gtkspell3" "${MINGW_PACKAGE_PREFIX}-libgit2-glib" - "${MINGW_PACKAGE_PREFIX}-webkit2gtk3") + "${MINGW_PACKAGE_PREFIX}-libgee") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-vala" @@ -21,14 +26,20 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "intltool" "itstool" "gettext-devel") -options=('strip' 'staticlibs') +#options=('!strip' 'debug') license=("GPL2+") url="https://wiki.gnome.org/Apps/Gitg" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:4}/${_realname}-$pkgver.tar.xz) -sha256sums=('a206574d5d3542223c79693d0954fa87d4ba95f13074bb9598e83c91df8f9a16') +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:4}/${_realname}-$pkgver.tar.xz + 0001-Add-missing-includes.patch) +sha256sums=('c14949cda8e9d9a8ac16e3993ed188be4c408a573247faf16133580f424a091a' + '4f4862d5ec676c75d3c5c39f63608dd9e71f22d2375961885f3b3e43363cb794') prepare() { cd "${srcdir}"/${_realname}-${pkgver} + + patch -Np1 -i "${srcdir}/0001-Add-missing-includes.patch" + #autopoint --force #AUTOPOINT='intltoolize --automake --copy' autoreconf -f -i } @@ -37,17 +48,26 @@ build() { mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + declare -a extra_config + if check_option "debug" "yes"; then + extra_config+=("--enable-debug") + VERBOSE="V=1" + fi + ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ - --disable-schemas-compile - make + --disable-schemas-compile \ + "${extra_config[@]}" + make ${VERBOSE} } package() { cd "$srcdir/build-${MINGW_CHOST}" make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gitg/gitg-i686.install b/mingw-w64-gitg/gitg-i686.install new file mode 100644 index 0000000000..d6a765e9de --- /dev/null +++ b/mingw-w64-gitg/gitg-i686.install @@ -0,0 +1,12 @@ +post_install() { + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + mingw32/bin/gtk-update-icon-cache-3.0.exe /mingw32/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-gitg/gitg-x86_64.install b/mingw-w64-gitg/gitg-x86_64.install new file mode 100644 index 0000000000..e20abc755f --- /dev/null +++ b/mingw-w64-gitg/gitg-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas + mingw64/bin/gtk-update-icon-cache-3.0.exe /mingw64/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-gl2ps/0001-MSYS2-FHS-layout.patch b/mingw-w64-gl2ps/0001-MSYS2-FHS-layout.patch new file mode 100644 index 0000000000..df9993a8bb --- /dev/null +++ b/mingw-w64-gl2ps/0001-MSYS2-FHS-layout.patch @@ -0,0 +1,12 @@ +diff -urN gl2ps-1.3.8-source.orig/CMakeLists.txt gl2ps-1.3.8-source/CMakeLists.txt +--- gl2ps-1.3.8-source.orig/CMakeLists.txt 2012-11-27 19:41:06.000000000 +0000 ++++ gl2ps-1.3.8-source/CMakeLists.txt 2015-01-22 13:58:33.264048300 +0000 +@@ -125,7 +125,7 @@ + install(TARGETS lib shared DESTINATION lib${LIB_SUFFIX}) + endif(OPENGL_FOUND) + +-if(WIN32) ++if(WIN32 AND NOT DEFINED ENV{MSYSTEM}) + set(GL2PS_DOC .) + else(WIN32) + set(GL2PS_DOC share/doc/gl2ps) diff --git a/mingw-w64-gl2ps/PKGBUILD b/mingw-w64-gl2ps/PKGBUILD new file mode 100644 index 0000000000..2c12e79a88 --- /dev/null +++ b/mingw-w64-gl2ps/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: hauptmech # Contributor: figo.zhang, chubtuff, lubosz +# Maintainer (MSYS2): Ray Donnelly +# +# Matlab bindings are not built by default to reduce dependencies. + +_realname=gl2ps +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.3.8 +pkgrel=4 +pkgdesc="an OpenGL to PostScript printing library (mingw-w64)" +arch=('any') +url='http://geuz.org/gl2ps/' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://geuz.org/gl2ps/src/gl2ps-${pkgver}.tgz" + "0001-MSYS2-FHS-layout.patch") +sha1sums=('792e11db0fe7a30a4dc4491af5098b047ec378b1' + '8aba0e227b70ca013b8405577c42821ee2173533') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver}-source + patch -p1 -i "${srcdir}"/0001-MSYS2-FHS-layout.patch +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname}-${pkgver}-source + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-glade/0001-Fix-windres-invocation.mingw.patch b/mingw-w64-glade/0001-Fix-windres-invocation.mingw.patch new file mode 100644 index 0000000000..bcfa1701e7 --- /dev/null +++ b/mingw-w64-glade/0001-Fix-windres-invocation.mingw.patch @@ -0,0 +1,42 @@ +--- glade-3.16.1/gladeui/glade-previewer.rc.in.orig 2013-11-11 18:50:38.000000000 +0000 ++++ glade-3.16.1/gladeui/glade-previewer.rc.in 2014-01-27 09:30:24.515199100 +0000 +@@ -1,6 +1,6 @@ + #include + +-GLADE_ICON ICON "../data/icons/glade.ico" ++GLADE_ICON ICON "glade.ico" + + VS_VERSION_INFO VERSIONINFO + FILEVERSION @GLADE_MAJOR_VERSION@,@GLADE_MINOR_VERSION@,@GLADE_MICRO_VERSION@,0 +--- glade-3.16.1/gladeui/Makefile.am.orig 2013-12-18 15:00:38.000000000 +0000 ++++ glade-3.16.1/gladeui/Makefile.am 2014-01-27 09:31:05.755936000 +0000 +@@ -32,7 +32,7 @@ + endif + + glade-win32-res.o: glade-previewer.rc +- $(WINDRES) $< $@ ++ $(WINDRES) -I $(top_srcdir)/data/icons $< $@ + + ## Rest of the UI ;) + +--- glade-3.16.1/src/glade.rc.in.orig 2013-11-11 18:50:38.000000000 +0000 ++++ glade-3.16.1/src/glade.rc.in 2014-01-27 09:30:36.766754800 +0000 +@@ -1,6 +1,6 @@ + #include + +-GLADE_ICON ICON "../data/icons/glade.ico" ++GLADE_ICON ICON "glade.ico" + + VS_VERSION_INFO VERSIONINFO + FILEVERSION @GLADE_MAJOR_VERSION@,@GLADE_MINOR_VERSION@,@GLADE_MICRO_VERSION@,0 +--- glade-3.16.1/src/Makefile.am.orig 2014-01-27 09:28:36.908034700 +0000 ++++ glade-3.16.1/src/Makefile.am 2014-01-27 09:31:20.477805400 +0000 +@@ -57,7 +57,7 @@ + endif + + glade-win32-res.o: glade.rc +- $(WINDRES) $< $@ ++ $(WINDRES) -I $(top_srcdir)/data/icons $< $@ + + UI_FILES = glade.glade glade-preferences.glade + diff --git a/mingw-w64-glade/0008-localedir-fix.patch b/mingw-w64-glade/0008-localedir-fix.patch new file mode 100644 index 0000000000..9319bd24fe --- /dev/null +++ b/mingw-w64-glade/0008-localedir-fix.patch @@ -0,0 +1,32 @@ +--- glade-3.18.3/po/Makefile.in.in 2012-01-18 16:37:06 +0000 ++++ glade-3.18.3/po/Makefile.in.in 2013-05-12 17:12:40 +0000 +@@ -33,8 +33,7 @@ + datadir = @datadir@ + datarootdir = @datarootdir@ + libdir = @libdir@ +-DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +107,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +141,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot diff --git a/mingw-w64-glade/PKGBUILD b/mingw-w64-glade/PKGBUILD index 0283103987..ec0d8fdb85 100644 --- a/mingw-w64-glade/PKGBUILD +++ b/mingw-w64-glade/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=glade - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.18.3 +pkgver=3.19.0 pkgrel=1 pkgdesc="User interface builder for GTK+ and GNOME (mingw-w64)" arch=('any') @@ -11,45 +10,55 @@ url="http://glade.gnome.org" license=("GPL" "LGPL") options=('strip' '!debug' 'staticlibs') depends=("${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme") + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-python2-gobject2" - 'intltool' - 'itstool' - 'docbook-xsl') + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-python2-gobject" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "gtk-doc" + "intltool" + "itstool" + "docbook-xsl") optdepends=("${MINGW_PACKAGE_PREFIX}-python2: Python widgets support" #'devhelp: help browser' ) url="http://glade.gnome.org/" install=glade-${CARCH}.install -source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 0001-Fix-windres-invocation.mingw.patch 0004-give-cc-to-gir-scanner.all.patch 0005-give-gtk-cflags-to-gir.patch 0006-disable-gnome-help.patch - 0007-glade-3.16.1-no-undefined.patch) -md5sums=('6852d6286683728e0ea40ca9b5d2416f' + 0007-glade-3.16.1-no-undefined.patch + 0008-localedir-fix.patch) +md5sums=('2f446e84b399864c426679b89f250ecd' + '0605a5d30457be0cdf4061c07f1096f2' 'fb4d5a33bbfea33b6437c85a9ac567c8' '294197385457bdc58905a32b6d0e9e1e' '3ebefeb0d48ff89f7992e5046ce9f09c' - '15aa17f408e551a19a5419d6db51a58a') + '15aa17f408e551a19a5419d6db51a58a' + '48f5c9d78b9140d7e677a28a6d620ce3') prepare() { cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/0001-Fix-windres-invocation.mingw.patch patch -p1 -i ${srcdir}/0004-give-cc-to-gir-scanner.all.patch patch -p1 -i ${srcdir}/0005-give-gtk-cflags-to-gir.patch patch -p1 -i ${srcdir}/0006-disable-gnome-help.patch patch -p1 -i ${srcdir}/0007-glade-3.16.1-no-undefined.patch + patch -p1 -i ${srcdir}/0008-localedir-fix.patch + autoreconf -fi } build() { - cd "${srcdir}/${_realname}-${pkgver}" - export PYTHON=${MINGW_PREFIX}/bin/python2 - ./configure \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + PYTHON=${MINGW_PREFIX}/bin/python2 \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -64,8 +73,6 @@ build() { } package() { - cd "${srcdir}/${_realname}-${pkgver}" + cd "${srcdir}/build-${MINGW_CHOST}" make -j1 DESTDIR="$pkgdir" install - - mv ${pkgdir}${MINGW_PREFIX}/lib/locale ${pkgdir}${MINGW_PREFIX}/share/ } diff --git a/mingw-w64-glade/glade-i686.install b/mingw-w64-glade/glade-i686.install index da50a72875..62459f29d3 100644 --- a/mingw-w64-glade/glade-i686.install +++ b/mingw-w64-glade/glade-i686.install @@ -1,5 +1,5 @@ post_install() { - mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/hicolor } post_upgrade() { diff --git a/mingw-w64-glade/glade-x86_64.install b/mingw-w64-glade/glade-x86_64.install index 4a2bb1bb75..f2f0233676 100644 --- a/mingw-w64-glade/glade-x86_64.install +++ b/mingw-w64-glade/glade-x86_64.install @@ -1,5 +1,5 @@ post_install() { - mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/hicolor } post_upgrade() { diff --git a/mingw-w64-glade3/PKGBUILD b/mingw-w64-glade3/PKGBUILD new file mode 100644 index 0000000000..a34b047046 --- /dev/null +++ b/mingw-w64-glade3/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Ricky Wu + +_realname=glade +pkgbase="mingw-w64-${_realname}3" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}3" +pkgver=3.8.5 +pkgrel=1 +pkgdesc="User interface builder for GTK+ and GNOME (mingw-w64)" +arch=('any') +url="http://glade.gnome.org" +license=("GPL" "LGPL") +options=('strip' '!debug' 'staticlibs') +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "gtk-doc" + "intltool" + "itstool" + "docbook-xsl") +optdepends=("${MINGW_PACKAGE_PREFIX}-python2: Python widgets support" + #'devhelp: help browser' + ) +url="http://glade.gnome.org/" +install=glade3-${CARCH}.install + +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}3-${pkgver}.tar.xz + ) +md5sums=('2f446e84b399864c426679b89f250ecd' + '0605a5d30457be0cdf4061c07f1096f2' + 'fb4d5a33bbfea33b6437c85a9ac567c8' + '294197385457bdc58905a32b6d0e9e1e' + '3ebefeb0d48ff89f7992e5046ce9f09c' + '15aa17f408e551a19a5419d6db51a58a' + '48f5c9d78b9140d7e677a28a6d620ce3') + +prepare() { + cd "${srcdir}/${_realname}3-${pkgver}" + + autoreconf -fi +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + mkdir -p data/icons + cp -rf ../${_realname}3-${pkgver}/data/icons/* data/icons + + PYTHON=${MINGW_PREFIX}/bin/python2 \ + ../${_realname}3-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --disable-static \ + --enable-shared \ + --disable-gtk-doc + + make VERBOSE=1 +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="$pkgdir" install +} diff --git a/mingw-w64-glade3/glade3-i686.install b/mingw-w64-glade3/glade3-i686.install new file mode 100644 index 0000000000..da50a72875 --- /dev/null +++ b/mingw-w64-glade3/glade3-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-glade3/glade3-x86_64.install b/mingw-w64-glade3/glade3-x86_64.install new file mode 100644 index 0000000000..4a2bb1bb75 --- /dev/null +++ b/mingw-w64-glade3/glade3-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-glbinding/PKGBUILD b/mingw-w64-glbinding/PKGBUILD new file mode 100644 index 0000000000..cb73ef2441 --- /dev/null +++ b/mingw-w64-glbinding/PKGBUILD @@ -0,0 +1,91 @@ +# Maintainer: Nazar Mishturak + + +_realname=glbinding +pkgbase="mingw-w64-${_realname}" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.1.0 +pkgrel=3 +arch=('any') +url='https://github.com/cginternals/glbinding' +pkgdesc="A C++ binding for the OpenGL API, generated using the gl.xml specification (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen") +license=('MIT') +options=('strip' 'staticlibs' 'docs') + +source=(${_realname}-${pkgver}.tar.gz::"https://github.com/cginternals/glbinding/archive/v${pkgver}.tar.gz" + 'werror-conversion.patch' + 'mingw-unix-layout.patch') +md5sums=('fe6517dc1aa5f81d56ee060073da0f44' + 'c6477823eb997c97fc77d1a74c8b6607' + 'b6bcd5f61d1bcfc7e2fa3005340e8b31') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}/werror-conversion.patch" + patch -p1 -i "${srcdir}/mingw-unix-layout.patch" +} + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + + local BUILD_TYPE="Release" + if check_option "debug" "y"; then + BUILD_TYPE="Debug" + fi + + # Build static libs + [[ -d ${srcdir}/static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/static-${MINGW_CHOST} + mkdir -p ${srcdir}/static-${MINGW_CHOST} + cd ${srcdir}/static-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_C_COMPILER=${MINGW_CHOST}-gcc \ + -DCMAKE_CXX_COMPILER=${MINGW_CHOST}-g++ \ + -DOPTION_BUILD_EXAMPLES=OFF \ + -DOPTION_BUILD_TESTS=OFF \ + -DOPTION_BUILD_TOOLS=OFF \ + -DOPTION_BUILD_STATIC=ON \ + ../${_realname}-${pkgver} + make + + # Build shared libs + [[ -d ${srcdir}/shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/shared-${MINGW_CHOST} + mkdir -p ${srcdir}/shared-${MINGW_CHOST} + cd ${srcdir}/shared-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_C_COMPILER=${MINGW_CHOST}-gcc \ + -DCMAKE_CXX_COMPILER=${MINGW_CHOST}-g++ \ + -DOPTION_BUILD_EXAMPLES=OFF \ + -DOPTION_BUILD_TESTS=OFF \ + -DOPTION_BUILD_TOOLS=OFF \ + -DOPTION_BUILD_STATIC=OFF \ + ../${_realname}-${pkgver} + make + + # Build the docs once + make docs +} + +package () { + cd "${srcdir}/static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + cd "${srcdir}/shared-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/ + cp -R docs/doxygen/html ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/ +} diff --git a/mingw-w64-glbinding/mingw-unix-layout.patch b/mingw-w64-glbinding/mingw-unix-layout.patch new file mode 100644 index 0000000000..1fc1d50736 --- /dev/null +++ b/mingw-w64-glbinding/mingw-unix-layout.patch @@ -0,0 +1,31 @@ +--- glbinding-1.1.0/CMakeLists.txt.orig 2015-08-26 08:11:47.410400000 +0300 ++++ glbinding-1.1.0/CMakeLists.txt 2015-08-26 08:11:51.669200000 +0300 +@@ -97,7 +97,7 @@ + + # Installation paths + set(project ${META_PROJECT_NAME}) +-if(WIN32) ++if(MSVC) + + # "%PROGRAMFILES%//" + +@@ -185,7 +185,7 @@ + install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT dev) + install(FILES LICENSE DESTINATION ${INSTALL_ROOT} COMPONENT dev) + install(FILES codegeneration/gl.revision DESTINATION ${INSTALL_ROOT} COMPONENT dev) +-install(FILES glbinding-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev) ++install(FILES glbinding-config.cmake DESTINATION ${INSTALL_LIB}/cmake/${project} COMPONENT dev) + + # Data files + if(OPTION_BUILD_EXAMPLES) +--- glbinding-1.1.0/glbinding-config.cmake.orig 2015-08-26 08:29:55.746400000 +0300 ++++ glbinding-1.1.0/glbinding-config.cmake 2015-08-26 08:30:51.953200000 +0300 +@@ -98,7 +98,7 @@ + + find(glbinding glbinding/glbinding_api.h ${LIB_PATHS}) + +-if (GLBINDING_LIBRARY AND WIN32) ++if (GLBINDING_LIBRARY AND MSVC) + set(GLBINDING_BINARIES "") + + find_file(GLBINDING_BINARY_RELEASE diff --git a/mingw-w64-glbinding/werror-conversion.patch b/mingw-w64-glbinding/werror-conversion.patch new file mode 100644 index 0000000000..adc123b705 --- /dev/null +++ b/mingw-w64-glbinding/werror-conversion.patch @@ -0,0 +1,19 @@ +diff -aur glbinding-1.1.0/source/glbinding/source/callbacks.cpp glbinding-1.1.0.new/source/glbinding/source/callbacks.cpp +--- glbinding-1.1.0/source/glbinding/source/callbacks.cpp 2015-04-08 18:20:30.000000000 +0300 ++++ glbinding-1.1.0.new/source/glbinding/source/callbacks.cpp 2015-08-23 23:27:53.424091000 +0300 +@@ -77,13 +77,13 @@ + { + using microseconds = std::chrono::microseconds; + microseconds now_micros = std::chrono::duration_cast(timestamp.time_since_epoch()); +- std::size_t micros = now_micros.count() % 1000; ++ auto micros = now_micros.count() % 1000; + std::ostringstream micros_os; + micros_os << std::setfill('0') << std::setw(3) << micros; + + using milliseconds = std::chrono::milliseconds; + milliseconds now_millis = std::chrono::duration_cast(now_micros); +- std::size_t millis = now_millis.count() % 1000; ++ auto millis = now_millis.count() % 1000; + std::ostringstream millis_os; + millis_os << std::setfill('0') << std::setw(3) << millis; + diff --git a/mingw-w64-glew/001-makefile.patch b/mingw-w64-glew/001-makefile.patch index 873d3b1ddb..11c575bea2 100644 --- a/mingw-w64-glew/001-makefile.patch +++ b/mingw-w64-glew/001-makefile.patch @@ -1,15 +1,19 @@ --- glew-1.11.0/Makefile.orig 2014-08-18 22:59:52.467400000 +0400 +++ glew-1.11.0/Makefile 2014-08-18 23:00:02.217400000 +0400 -@@ -42,9 +42,9 @@ +@@ -42,13 +42,9 @@ GLEW_PREFIX ?= /usr GLEW_DEST ?= /usr -BINDIR ?= $(GLEW_DEST)/bin -LIBDIR ?= $(GLEW_DEST)/lib -INCDIR ?= $(GLEW_DEST)/include/GL +- +-ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU) +-LIBGLU = glu +-endif +BINDIR ?= $(GLEW_PREFIX)/bin +LIBDIR ?= $(GLEW_PREFIX)/lib +INCDIR ?= $(GLEW_PREFIX)/include/GL - ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU) - LIBGLU = glu + DIST_NAME ?= glew-$(GLEW_VERSION) + DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME).zip diff --git a/mingw-w64-glew/PKGBUILD b/mingw-w64-glew/PKGBUILD index f5967dbcaa..cb59a8e628 100644 --- a/mingw-w64-glew/PKGBUILD +++ b/mingw-w64-glew/PKGBUILD @@ -2,32 +2,31 @@ _realname=glew pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.11.0 -pkgrel=1 +pkgver=1.12.0 +pkgrel=3 arch=('any') pkgdesc="GLEW, The OpenGL Extension Wrangler Library (mingw-w64)" -depends=('') +depends=() makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "xz") -groups=("${MINGW_PACKAGE_PREFIX}") license=('Modified BSD/MIT/GPL') url="http://glew.sourceforge.net/" options=('strip' '!libtool' 'staticlibs') -source=("http://sourceforge.net/projects/glew/files/glew/$pkgver/glew-$pkgver.tgz" +source=("http://sourceforge.net/projects/glew/files/glew/${pkgver}/${_realname}-${pkgver}.tgz" 001-makefile.patch) -md5sums=('f6d72c7426a5f66580ad09e50816450a' - '5a6948c7d8b8d01aa7b463d00fe9a989') - +md5sums=('01246c7ecd135d99be031aa63f86dca1' + '0f4ea29bfa687508ebaaefd0de5199dc') + prepare() { - cd "$srcdir/glew-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/001-makefile.patch } build() { - cd "$srcdir/glew-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" MSYSTEM=MINGW make GLEW_PREFIX=${MINGW_PREFIX} } package () { - cd "$srcdir/glew-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" MSYSTEM=MINGW make GLEW_PREFIX=${MINGW_PREFIX} DESTDIR="${pkgdir}" install.all } diff --git a/mingw-w64-glfw/0001-enabled-pkg-config-file-generation-on-mingw.patch b/mingw-w64-glfw/0001-enabled-pkg-config-file-generation-on-mingw.patch deleted file mode 100644 index 25152c4abf..0000000000 --- a/mingw-w64-glfw/0001-enabled-pkg-config-file-generation-on-mingw.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 60f2302..d10f10d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -154,6 +154,9 @@ endif() - # Use Win32 for window creation - #-------------------------------------------------------------------- - if (_GLFW_WIN32) -+ -+ set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -lgdi32 -lwinmm") -+ - # The DLL links against winmm; the static library loads it - # That way, both code paths receive testing - if (BUILD_SHARED_LIBS) -@@ -180,8 +183,12 @@ endif() - # Use WGL for context creation - #-------------------------------------------------------------------- - if (_GLFW_WGL) -+ -+ set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -lopengl32") -+ - list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) - list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY}) -+ - endif() - - #-------------------------------------------------------------------- -@@ -308,9 +315,7 @@ if (_GLFW_EGL) - list(APPEND glfw_INCLUDE_DIRS ${EGL_INCLUDE_DIR}) - list(APPEND glfw_LIBRARIES ${EGL_LIBRARY}) - -- if (UNIX) -- set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl") -- endif() -+ set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl") - - if (_GLFW_USE_OPENGL) - list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY}) -@@ -397,10 +402,8 @@ configure_file(${GLFW_SOURCE_DIR}/src/glfwConfig.cmake.in - configure_file(${GLFW_SOURCE_DIR}/src/glfwConfigVersion.cmake.in - ${GLFW_BINARY_DIR}/src/glfwConfigVersion.cmake @ONLY) - --if (UNIX) -- configure_file(${GLFW_SOURCE_DIR}/src/glfw3.pc.in -- ${GLFW_BINARY_DIR}/src/glfw3.pc @ONLY) --endif() -+configure_file(${GLFW_SOURCE_DIR}/src/glfw3.pc.in -+ ${GLFW_BINARY_DIR}/src/glfw3.pc @ONLY) - - #-------------------------------------------------------------------- - # Add subdirectories -@@ -431,11 +434,9 @@ if (GLFW_INSTALL) - ${GLFW_BINARY_DIR}/src/glfwConfigVersion.cmake - DESTINATION lib${LIB_SUFFIX}/cmake/glfw) - -- if (UNIX) -- install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw) -- install(FILES ${GLFW_BINARY_DIR}/src/glfw3.pc -- DESTINATION lib${LIB_SUFFIX}/pkgconfig) -- endif() -+ install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw) -+ install(FILES ${GLFW_BINARY_DIR}/src/glfw3.pc -+ DESTINATION lib${LIB_SUFFIX}/pkgconfig) - - # Only generate this target if no higher-level project already has - if (NOT TARGET uninstall) --- -2.0.3 - diff --git a/mingw-w64-glfw/001-cmake-config-location.patch b/mingw-w64-glfw/001-cmake-config-location.patch new file mode 100644 index 0000000000..ed9e529be8 --- /dev/null +++ b/mingw-w64-glfw/001-cmake-config-location.patch @@ -0,0 +1,11 @@ +--- glfw-3.1/CMakeLists.txt.orig 2015-02-27 21:55:29.220000000 +0300 ++++ glfw-3.1/CMakeLists.txt 2015-02-27 22:08:05.389600000 +0300 +@@ -513,7 +513,7 @@ + #-------------------------------------------------------------------- + include(CMakePackageConfigHelpers) + +-if (UNIX) ++if (UNIX OR MINGW) + set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/glfw3/") + else() + set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/") diff --git a/mingw-w64-glfw/PKGBUILD b/mingw-w64-glfw/PKGBUILD index cfb4c9e28b..e3bb273cf9 100644 --- a/mingw-w64-glfw/PKGBUILD +++ b/mingw-w64-glfw/PKGBUILD @@ -1,63 +1,66 @@ # Maintainer: Martell Malone _realname=glfw - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.0.4 -pkgrel=2 -pkgdesc="A free, open source, portable framework for OpenGL application development. (mingw-w64)" +pkgver=3.1.2 +pkgrel=1 +pkgdesc="A free, open source, portable framework for OpenGL application development (mingw-w64)" arch=('any') url="http://www.glfw.org/" license=('custom:ZLIB') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") -optdepends=() -conflicts=() +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake") options=('staticlibs' 'strip') -source=(http://downloads.sourceforge.net/project/glfw/glfw/$pkgver/${_realname}-$pkgver.tar.gz - 0001-enabled-pkg-config-file-generation-on-mingw.patch) -sha1sums=('9b04309418ccbc74b2115d11198b7912669814ee' - '1018e847e3bd3874662788c883bebb453d490267') +source=(http://downloads.sourceforge.net/project/glfw/glfw/${pkgver}/${_realname}-${pkgver}.tar.gz + 001-cmake-config-location.patch) +sha1sums=('172ea86287c96adeae0d1b3e1caf02086c837f93' + '3c3f953929d9fcb4d7fbac931cad736889156ca1') prepare() { cd "${srcdir}/glfw-${pkgver}" - patch -p1 -i "${srcdir}/0001-enabled-pkg-config-file-generation-on-mingw.patch" + patch -p1 -i "${srcdir}/001-cmake-config-location.patch" } build() { - # Build static libs - [[ -d ${srcdir}/static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/static-${MINGW_CHOST} - mkdir -p ${srcdir}/static-${MINGW_CHOST} - cd ${srcdir}/static-${MINGW_CHOST} - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DCMAKE_C_COMPILER=${CARCH}-w64-mingw32-gcc \ - -DBUILD_SHARED_LIBS=ON \ - -DGLFW_BUILD_DOCS=OFF \ - "../${_realname}-${pkgver}" - make - # Build shared libs [[ -d ${srcdir}/shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/shared-${MINGW_CHOST} mkdir -p ${srcdir}/shared-${MINGW_CHOST} cd ${srcdir}/shared-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DCMAKE_C_COMPILER=${CARCH}-w64-mingw32-gcc \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_C_COMPILER=${MINGW_CHOST}-gcc \ + -DBUILD_SHARED_LIBS=ON \ + -DGLFW_BUILD_DOCS=OFF \ + ../${_realname}-${pkgver} + make + + # Build static libs + [[ -d ${srcdir}/static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/static-${MINGW_CHOST} + mkdir -p ${srcdir}/static-${MINGW_CHOST} + cd ${srcdir}/static-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_C_COMPILER=${MINGW_CHOST}-gcc \ -DBUILD_SHARED_LIBS=OFF \ -DGLFW_BUILD_DOCS=OFF \ - "../${_realname}-${pkgver}" + ../${_realname}-${pkgver} make } package() { - cd "$srcdir/static-${MINGW_CHOST}" - make install + cd "${srcdir}/static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install cd "${srcdir}/shared-${MINGW_CHOST}" - make install + make DESTDIR=${pkgdir} install mv ${pkgdir}${MINGW_PREFIX}/lib/glfw3dll.a ${pkgdir}${MINGW_PREFIX}/lib/libglfw3.dll.a mkdir -p ${pkgdir}${MINGW_PREFIX}/bin @@ -66,10 +69,4 @@ package() { #copy license file mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" cp "${srcdir}/${_realname}-${pkgver}/COPYING.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/glfw3.pc } diff --git a/mingw-w64-glib-networking/PKGBUILD b/mingw-w64-glib-networking/PKGBUILD index 6b97d0b3eb..1e7e91b84f 100644 --- a/mingw-w64-glib-networking/PKGBUILD +++ b/mingw-w64-glib-networking/PKGBUILD @@ -1,33 +1,37 @@ # Maintainer: Alexey Pavlov _realname=glib-networking +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.42.0 +pkgver=2.46.1 pkgrel=1 pkgdesc="Network-related GIO modules for glib (mingw-w64)" arch=(any) url="http://ftp.gnome.org/pub/GNOME/sources/libsoup" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" "intltool") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "intltool") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libgcrypt" - "${MINGW_PACKAGE_PREFIX}-gnutls" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-p11-kit" - "${MINGW_PACKAGE_PREFIX}-xz") + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-p11-kit" + "${MINGW_PACKAGE_PREFIX}-xz") options=('staticlibs' 'strip') -source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz" +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz" 0001-dont-overwrite-prefix-remain-relative.mingw.patch 0001-hack-path.patch 0002-relative-system-ca-file.mingw.patch) -md5sums=('d1935e6974da7f39d265303c87a8389b' +md5sums=('c000e0b579f5d8fd48efebc7ac4d95dc' '6c55845f6c66fc8401915d1561b6872d' '5b72f575aee2cd8d7b30f580ebca4971' 'b96895469c4dc36e172056763aa0d014') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" #patch -p1 -i ${srcdir}/0001-dont-overwrite-prefix-remain-relative.mingw.patch patch -p1 -i ${srcdir}/0001-hack-path.patch patch -p1 -i ${srcdir}/0002-relative-system-ca-file.mingw.patch @@ -35,22 +39,24 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-$pkgver/configure \ + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --without-libproxy \ --without-gnome-proxy \ - --with-ca-certificates=../ssl/certs/ca-bundle.crt \ + --with-ca-certificates=ssl/certs/ca-bundle.crt \ --with-pkcs11 + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - #mv ${pkgdir}/lib ${pkgdir}${MINGW_PREFIX}/ + make DESTDIR="${pkgdir}" install rm -f ${pkgdir}${MINGW_PREFIX}/lib/gio/modules/*.a } diff --git a/mingw-w64-glib2/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch b/mingw-w64-glib2/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch index eec9b21dab..e53fd8d166 100644 --- a/mingw-w64-glib2/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch +++ b/mingw-w64-glib2/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch @@ -1,28 +1,7 @@ -From 7f4f4354540440c0a8a37beaccbec8bc7fc15ec7 Mon Sep 17 00:00:00 2001 -From: Erik van Pienbroek -Date: Mon, 27 Aug 2012 23:28:54 +0200 -Subject: [PATCH] Use CreateFile on Win32 to make sure g_unlink always works - -The functions g_open(), g_creat() and g_fopen() defer to _wopen(), -_wcreat() and _wfopen() respectively. This is very similar to -the corresponding arrangement for Linux. However, those Windows -functions do not support renaming a file whilst it's open. As a -result, g_rename() behaves differently on the Windows platform -compared to its Linux behaviour, where files can be renamed even -while there are file handles still open. Resolved this by using -the Win32 API function CreateFile() instead of _wopen(), _wcreat() -and _wfopen() - -Patch initially created by John Emmas ---- - glib/gstdio.c | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 233 insertions(+), 26 deletions(-) - -diff --git a/glib/gstdio.c b/glib/gstdio.c -index 6d763e1..c1d072f 100644 ---- a/glib/gstdio.c -+++ b/glib/gstdio.c -@@ -191,6 +191,11 @@ g_open (const gchar *filename, +diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c +--- glib-2.46.0-orig/glib/gstdio.c 2015-02-26 15:57:09.000000000 +0300 ++++ glib-2.46.0/glib/gstdio.c 2015-09-22 09:08:58.032066100 +0300 +@@ -192,6 +192,11 @@ int mode) { #ifdef G_OS_WIN32 @@ -34,7 +13,7 @@ index 6d763e1..c1d072f 100644 wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); int retval; int save_errno; -@@ -201,12 +206,114 @@ g_open (const gchar *filename, +@@ -202,12 +207,114 @@ return -1; } @@ -152,7 +131,7 @@ index 6d763e1..c1d072f 100644 return retval; #else int fd; -@@ -248,6 +355,8 @@ g_creat (const gchar *filename, +@@ -254,6 +361,8 @@ int mode) { #ifdef G_OS_WIN32 @@ -161,7 +140,7 @@ index 6d763e1..c1d072f 100644 wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); int retval; int save_errno; -@@ -258,12 +367,41 @@ g_creat (const gchar *filename, +@@ -264,12 +373,41 @@ return -1; } @@ -172,8 +151,7 @@ index 6d763e1..c1d072f 100644 + if (! (mode & _S_IWRITE)) + dwFlagsAndAttributes = FILE_ATTRIBUTE_READONLY; /* Sets file to 'read only' after the file gets closed */ + } - -- g_free (wfilename); ++ + hFile = CreateFileW(wfilename, (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_DELETE), + NULL, CREATE_ALWAYS, dwFlagsAndAttributes, NULL); + @@ -200,13 +178,14 @@ index 6d763e1..c1d072f 100644 + retval = _open_osfhandle((long)hFile, _O_RDWR); + save_errno = errno; -+ g_free (wfilename); + g_free (wfilename); +- errno = save_errno; + return retval; #else return creat (filename, mode); -@@ -699,33 +837,102 @@ g_fopen (const gchar *filename, +@@ -702,33 +840,102 @@ const gchar *mode) { #ifdef G_OS_WIN32 @@ -216,6 +195,25 @@ index 6d763e1..c1d072f 100644 - int save_errno; - - if (wfilename == NULL) +- { +- errno = EINVAL; +- return NULL; +- } +- +- wmode = g_utf8_to_utf16 (mode, -1, NULL, NULL, NULL); +- +- if (wmode == NULL) +- { +- g_free (wfilename); +- errno = EINVAL; +- return NULL; +- } +- +- retval = _wfopen (wfilename, wmode); +- save_errno = errno; +- +- g_free (wfilename); +- g_free (wmode); + int hFile; + int flags = 0; + gchar priv_mode[4]; @@ -241,9 +239,7 @@ index 6d763e1..c1d072f 100644 + if (('c' == priv_mode[2]) || ('n' == priv_mode[2])) + priv_mode[2] = '\0'; + else - { -- errno = EINVAL; -- return NULL; ++ { + if (0 == strcmp(priv_mode, "a+b")) + flags = _O_RDWR | _O_CREAT | _O_APPEND | _O_BINARY; + else if (0 == strcmp(priv_mode, "a+t")) @@ -261,21 +257,14 @@ index 6d763e1..c1d072f 100644 + errno = EINVAL; + goto out; + } - } -- -- wmode = g_utf8_to_utf16 (mode, -1, NULL, NULL, NULL); -- -- if (wmode == NULL) ++ } + } + if (2 == strlen(priv_mode)) + { + if (('c' == priv_mode[1]) || ('n' == priv_mode[1])) + priv_mode[1] = '\0'; + else - { -- g_free (wfilename); -- errno = EINVAL; -- return NULL; ++ { + if (0 == strcmp(priv_mode, "a+")) + flags = _O_RDWR | _O_CREAT | _O_APPEND; + else if (0 == strcmp(priv_mode, "ab")) @@ -295,7 +284,7 @@ index 6d763e1..c1d072f 100644 + errno = EINVAL; + goto out; + } - } ++ } + } + if (1 == strlen(priv_mode)) + { @@ -311,13 +300,9 @@ index 6d763e1..c1d072f 100644 + goto out; + } + } - -- retval = _wfopen (wfilename, wmode); -- save_errno = errno; ++ + hFile = g_open (filename, flags, (_S_IREAD | _S_IWRITE)); - -- g_free (wfilename); -- g_free (wmode); ++ + if (INVALID_HANDLE_VALUE == (HANDLE)hFile) + /* 'errno' will have already been set by 'g_open()' */ + retval = NULL; @@ -329,5 +314,3 @@ index 6d763e1..c1d072f 100644 return retval; #else return fopen (filename, mode); --- -1.7.11.4 diff --git a/mingw-w64-glib2/0003-g_abort.all.patch b/mingw-w64-glib2/0003-g_abort.all.patch index 8b8aaffe0d..7e286db306 100644 --- a/mingw-w64-glib2/0003-g_abort.all.patch +++ b/mingw-w64-glib2/0003-g_abort.all.patch @@ -1,7 +1,7 @@ -diff -ur glib-2.37.4.orig/glib/gbacktrace.c glib-2.37.4/glib/gbacktrace.c ---- glib-2.37.4.orig/glib/gbacktrace.c 2013-06-02 23:20:49.000000000 +0000 -+++ glib-2.37.4/glib/gbacktrace.c 2013-07-28 19:59:41.097131300 +0000 -@@ -259,7 +259,7 @@ +diff -Naur glib-2.46.0-orig/glib/gbacktrace.c glib-2.46.0/glib/gbacktrace.c +--- glib-2.46.0-orig/glib/gbacktrace.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gbacktrace.c 2015-09-22 09:08:59.311126700 +0300 +@@ -254,7 +254,7 @@ if (IsDebuggerPresent ()) G_BREAKPOINT (); else @@ -10,10 +10,10 @@ diff -ur glib-2.37.4.orig/glib/gbacktrace.c glib-2.37.4/glib/gbacktrace.c #endif } -diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c ---- glib-2.37.4.orig/glib/giowin32.c 2013-06-02 23:20:49.000000000 +0000 -+++ glib-2.37.4/glib/giowin32.c 2013-07-28 19:59:57.402201800 +0000 -@@ -800,7 +800,7 @@ +diff -Naur glib-2.46.0-orig/glib/giowin32.c glib-2.46.0/glib/giowin32.c +--- glib-2.46.0-orig/glib/giowin32.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/giowin32.c 2015-09-22 09:08:59.357921600 +0300 +@@ -798,7 +798,7 @@ default: g_assert_not_reached (); @@ -22,7 +22,7 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } if (channel->debug) g_print ("\n"); -@@ -947,7 +947,7 @@ +@@ -945,7 +945,7 @@ default: g_assert_not_reached (); @@ -31,7 +31,7 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } } -@@ -1012,7 +1012,7 @@ +@@ -1010,7 +1010,7 @@ default: g_assert_not_reached (); @@ -40,7 +40,7 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } if (channel->debug) g_print ("\n"); -@@ -1297,7 +1297,7 @@ +@@ -1295,7 +1295,7 @@ default: whence = -1; /* Keep the compiler quiet */ g_assert_not_reached (); @@ -49,7 +49,7 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } tmp_offset = offset; -@@ -1692,7 +1692,7 @@ +@@ -1690,7 +1690,7 @@ break; default: g_assert_not_reached (); @@ -58,7 +58,7 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } /* always open 'untranslated' */ -@@ -1738,7 +1738,7 @@ +@@ -1736,7 +1736,7 @@ break; default: g_assert_not_reached (); @@ -67,7 +67,7 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } return channel; -@@ -2227,7 +2227,7 @@ +@@ -2225,7 +2225,7 @@ default: g_assert_not_reached (); @@ -76,9 +76,10 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } fd->events = condition; ---- glib-2.39.3/glib/gmessages.c.orig 2014-01-06 19:02:48.000000000 +0000 -+++ glib-2.39.3/glib/gmessages.c 2014-01-22 22:44:37.532985700 +0000 -@@ -308,7 +308,7 @@ +diff -Naur glib-2.46.0-orig/glib/gmessages.c glib-2.46.0/glib/gmessages.c +--- glib-2.46.0-orig/glib/gmessages.c 2015-09-21 06:33:23.000000000 +0300 ++++ glib-2.46.0/glib/gmessages.c 2015-09-22 09:08:59.373519900 +0300 +@@ -323,7 +323,7 @@ if (breakpoint) G_BREAKPOINT (); else @@ -87,19 +88,19 @@ diff -ur glib-2.37.4.orig/glib/giowin32.c glib-2.37.4/glib/giowin32.c } #ifdef G_OS_WIN32 -@@ -1130,7 +1130,7 @@ - pretty_function, - expression); +@@ -1176,7 +1176,7 @@ + line, + pretty_function); _g_log_abort (FALSE); - abort (); + g_abort (); } /** -diff -ur glib-2.37.4.orig/glib/gslice.c glib-2.37.4/glib/gslice.c ---- glib-2.37.4.orig/glib/gslice.c 2013-06-11 02:14:02.000000000 +0000 -+++ glib-2.37.4/glib/gslice.c 2013-07-28 20:00:41.525304700 +0000 -@@ -1094,7 +1094,7 @@ +diff -Naur glib-2.46.0-orig/glib/gslice.c glib-2.46.0/glib/gslice.c +--- glib-2.46.0-orig/glib/gslice.c 2015-09-08 20:40:27.000000000 +0300 ++++ glib-2.46.0/glib/gslice.c 2015-09-22 09:08:59.404716500 +0300 +@@ -1082,7 +1082,7 @@ return; if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (mem_block, mem_size)) @@ -108,7 +109,7 @@ diff -ur glib-2.37.4.orig/glib/gslice.c glib-2.37.4/glib/gslice.c if (G_LIKELY (acat == 1)) /* allocate through magazine layer */ { ThreadMemory *tmem = thread_memory_from_self(); -@@ -1178,7 +1178,7 @@ +@@ -1165,7 +1165,7 @@ slice = *(gpointer*) (current + next_offset); if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (current, mem_size)) @@ -117,7 +118,7 @@ diff -ur glib-2.37.4.orig/glib/gslice.c glib-2.37.4/glib/gslice.c if (G_UNLIKELY (thread_memory_magazine2_is_full (tmem, ix))) { thread_memory_swap_magazines (tmem, ix); -@@ -1199,7 +1199,7 @@ +@@ -1186,7 +1186,7 @@ slice = *(gpointer*) (current + next_offset); if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (current, mem_size)) @@ -126,7 +127,7 @@ diff -ur glib-2.37.4.orig/glib/gslice.c glib-2.37.4/glib/gslice.c if (G_UNLIKELY (g_mem_gc_friendly)) memset (current, 0, chunk_size); slab_allocator_free_chunk (chunk_size, current); -@@ -1213,7 +1213,7 @@ +@@ -1200,7 +1200,7 @@ slice = *(gpointer*) (current + next_offset); if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (current, mem_size)) @@ -135,7 +136,7 @@ diff -ur glib-2.37.4.orig/glib/gslice.c glib-2.37.4/glib/gslice.c if (G_UNLIKELY (g_mem_gc_friendly)) memset (current, 0, mem_size); g_free (current); -@@ -1452,7 +1452,7 @@ +@@ -1436,7 +1436,7 @@ vfprintf (stderr, format, args); va_end (args); fputs ("\n", stderr); @@ -144,10 +145,10 @@ diff -ur glib-2.37.4.orig/glib/gslice.c glib-2.37.4/glib/gslice.c _exit (1); } -diff -ur glib-2.37.4.orig/glib/gtester.c glib-2.37.4/glib/gtester.c ---- glib-2.37.4.orig/glib/gtester.c 2013-06-02 23:20:49.000000000 +0000 -+++ glib-2.37.4/glib/gtester.c 2013-07-28 20:00:48.964249400 +0000 -@@ -96,7 +96,7 @@ +diff -Naur glib-2.46.0-orig/glib/gtester.c glib-2.46.0/glib/gtester.c +--- glib-2.46.0-orig/glib/gtester.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gtester.c 2015-09-22 09:08:59.420314800 +0300 +@@ -94,7 +94,7 @@ terminate (void) { kill (getpid(), SIGTERM); @@ -156,10 +157,48 @@ diff -ur glib-2.37.4.orig/glib/gtester.c glib-2.37.4/glib/gtester.c } static void -diff -ur glib-2.37.4.orig/glib/gthread-posix.c glib-2.37.4/glib/gthread-posix.c ---- glib-2.37.4.orig/glib/gthread-posix.c 2013-07-09 16:45:56.000000000 +0000 -+++ glib-2.37.4/glib/gthread-posix.c 2013-07-28 20:01:09.374341100 +0000 -@@ -76,7 +76,7 @@ +diff -Naur glib-2.46.0-orig/glib/gtestutils.c glib-2.46.0/glib/gtestutils.c +--- glib-2.46.0-orig/glib/gtestutils.c 2015-09-01 06:34:13.000000000 +0300 ++++ glib-2.46.0/glib/gtestutils.c 2015-09-22 09:08:59.576297800 +0300 +@@ -846,7 +846,7 @@ + { + if (test_tap_log) + g_print ("Bail out!\n"); +- abort(); ++ g_abort(); + } + if (result == G_TEST_RUN_SKIPPED) + test_skipped_count++; +@@ -2426,7 +2426,7 @@ + _exit (1); + } + else +- abort (); ++ g_abort (); + } + + void +@@ -2451,7 +2451,7 @@ + if (test_in_subprocess) + _exit (1); + else +- abort (); ++ g_abort (); + } + + void +diff -Naur glib-2.46.0-orig/glib/gthread-posix.c glib-2.46.0/glib/gthread-posix.c +--- glib-2.46.0-orig/glib/gthread-posix.c 2015-08-19 06:35:30.000000000 +0300 ++++ glib-2.46.0/glib/gthread-posix.c 2015-09-22 09:08:59.560699500 +0300 +@@ -46,6 +46,7 @@ + #include "gmessages.h" + #include "gstrfuncs.h" + #include "gmain.h" ++#include "gutils.h" + + #include + #include +@@ -77,7 +78,7 @@ { fprintf (stderr, "GLib (gthread-posix.c): Unexpected error from C library during '%s': %s. Aborting.\n", function, strerror (status)); @@ -168,10 +207,10 @@ diff -ur glib-2.37.4.orig/glib/gthread-posix.c glib-2.37.4/glib/gthread-posix.c } /* {{{1 GMutex */ -diff -ur glib-2.37.4.orig/glib/gthread-win32.c glib-2.37.4/glib/gthread-win32.c ---- glib-2.37.4.orig/glib/gthread-win32.c 2013-06-02 23:20:49.000000000 +0000 -+++ glib-2.37.4/glib/gthread-win32.c 2013-07-28 20:01:13.008802600 +0000 -@@ -60,7 +60,7 @@ +diff -Naur glib-2.46.0-orig/glib/gthread-win32.c glib-2.46.0/glib/gthread-win32.c +--- glib-2.46.0-orig/glib/gthread-win32.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gthread-win32.c 2015-09-22 09:08:59.467109700 +0300 +@@ -58,7 +58,7 @@ { fprintf (stderr, "GLib (gthread-win32.c): Unexpected error from C library during '%s': %s. Aborting.\n", strerror (status), function); @@ -180,10 +219,10 @@ diff -ur glib-2.37.4.orig/glib/gthread-win32.c glib-2.37.4/glib/gthread-win32.c } /* Starting with Vista and Windows 2008, we have access to the -diff -ur glib-2.37.4.orig/glib/gutils.c glib-2.37.4/glib/gutils.c ---- glib-2.37.4.orig/glib/gutils.c 2013-06-11 02:14:02.000000000 +0000 -+++ glib-2.37.4/glib/gutils.c 2013-07-28 19:57:12.280734000 +0000 -@@ -2433,3 +2433,15 @@ +diff -Naur glib-2.46.0-orig/glib/gutils.c glib-2.46.0/glib/gutils.c +--- glib-2.46.0-orig/glib/gutils.c 2015-08-28 21:15:54.000000000 +0300 ++++ glib-2.46.0/glib/gutils.c 2015-09-22 09:08:59.498306300 +0300 +@@ -2375,3 +2375,15 @@ return FALSE; #endif } @@ -199,10 +238,10 @@ diff -ur glib-2.37.4.orig/glib/gutils.c glib-2.37.4/glib/gutils.c + abort (); +#endif +} -diff -ur glib-2.37.4.orig/glib/gutils.h glib-2.37.4/glib/gutils.h ---- glib-2.37.4.orig/glib/gutils.h 2013-06-11 02:14:02.000000000 +0000 -+++ glib-2.37.4/glib/gutils.h 2013-07-28 19:58:22.568659500 +0000 -@@ -230,6 +230,9 @@ +diff -Naur glib-2.46.0-orig/glib/gutils.h glib-2.46.0/glib/gutils.h +--- glib-2.46.0-orig/glib/gutils.h 2015-08-21 03:20:48.000000000 +0300 ++++ glib-2.46.0/glib/gutils.h 2015-09-22 09:08:59.529502900 +0300 +@@ -228,6 +228,9 @@ GLIB_DEPRECATED_FOR(g_format_size) gchar *g_format_size_for_display (goffset size); @@ -212,42 +251,3 @@ diff -ur glib-2.37.4.orig/glib/gutils.h glib-2.37.4/glib/gutils.h #ifndef G_DISABLE_DEPRECATED /** * GVoidFunc: ---- glib-2.37.4/glib/gthread-posix.c.orig 2013-07-28 20:02:38.456653100 +0000 -+++ glib-2.37.4/glib/gthread-posix.c 2013-07-28 20:06:34.756159300 +0000 -@@ -47,6 +47,7 @@ - #include "gmessages.h" - #include "gstrfuncs.h" - #include "gmain.h" -+#include "gutils.h" - - #include - #include ---- glib-2.39.3/glib/gtestutils.c.orig 2014-01-09 03:58:06.000000000 +0000 -+++ glib-2.39.3/glib/gtestutils.c 2014-01-22 22:42:53.192017800 +0000 -@@ -764,7 +764,7 @@ - { - if (test_tap_log) - g_print ("Bail out!\n"); -- abort(); -+ g_abort(); - } - if (largs[0] == G_TEST_RUN_SKIPPED) - test_skipped_count++; -@@ -2349,7 +2349,7 @@ - _exit (1); - } - else -- abort (); -+ g_abort (); - } - - void -@@ -2374,7 +2374,7 @@ - if (test_in_subprocess) - _exit (1); - else -- abort (); -+ g_abort (); - } - - void diff --git a/mingw-w64-glib2/0004-glib-prefer-constructors-over-DllMain.patch b/mingw-w64-glib2/0004-glib-prefer-constructors-over-DllMain.patch index 01da75a56a..7cc925a886 100644 --- a/mingw-w64-glib2/0004-glib-prefer-constructors-over-DllMain.patch +++ b/mingw-w64-glib2/0004-glib-prefer-constructors-over-DllMain.patch @@ -1,22 +1,7 @@ -From bc90511c1eb333e26e0bc0eaee62375d0e788db6 Mon Sep 17 00:00:00 2001 -From: Erik van Pienbroek -Date: Tue, 16 Apr 2013 11:42:11 +0200 -Subject: [PATCH] win32: Prefer the use of constructors over DllMain - -This prevents having to depend on DllMain in static libraries - -Constructors are available in both the GCC build (GCC 2.7 and later) -and the MSVC build (MSVC 2008 and later using _Pragma, earlier -versions using #pragma) ---- - glib/glib-init.c | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - -diff --git a/glib/glib-init.c b/glib/glib-init.c -index 0032ee8..dd6ccbf 100644 ---- a/glib/glib-init.c -+++ b/glib/glib-init.c -@@ -223,12 +223,14 @@ glib_init (void) +diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c +--- glib-2.46.0-orig/glib/glib-init.c 2015-09-12 18:13:45.000000000 +0300 ++++ glib-2.46.0/glib/glib-init.c 2015-09-22 09:09:00.512195800 +0300 +@@ -238,12 +238,14 @@ #if defined (G_OS_WIN32) @@ -33,7 +18,7 @@ index 0032ee8..dd6ccbf 100644 BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, -@@ -238,11 +240,6 @@ DllMain (HINSTANCE hinstDLL, +@@ -253,11 +255,6 @@ { case DLL_PROCESS_ATTACH: glib_dll = hinstDLL; @@ -45,7 +30,7 @@ index 0032ee8..dd6ccbf 100644 break; case DLL_THREAD_DETACH: -@@ -259,7 +256,10 @@ DllMain (HINSTANCE hinstDLL, +@@ -274,7 +271,10 @@ return TRUE; } @@ -57,7 +42,7 @@ index 0032ee8..dd6ccbf 100644 #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(glib_init_ctor) -@@ -269,6 +269,12 @@ G_DEFINE_CONSTRUCTOR(glib_init_ctor) +@@ -284,6 +284,12 @@ static void glib_init_ctor (void) { @@ -70,5 +55,3 @@ index 0032ee8..dd6ccbf 100644 glib_init (); } --- -1.8.2 diff --git a/mingw-w64-glib2/0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch b/mingw-w64-glib2/0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch index 3052d41a86..6731f9ff61 100644 --- a/mingw-w64-glib2/0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch +++ b/mingw-w64-glib2/0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch @@ -1,6 +1,7 @@ ---- glib/gmessages.c.orig 2013-01-02 01:35:51.326148960 +0100 -+++ glib/gmessages.c 2013-01-02 01:36:28.467415487 +0100 -@@ -823,7 +823,7 @@ +diff -Naur glib-2.46.0-orig/glib/gmessages.c glib-2.46.0/glib/gmessages.c +--- glib-2.46.0-orig/glib/gmessages.c 2015-09-22 09:09:00.356212800 +0300 ++++ glib-2.46.0/glib/gmessages.c 2015-09-22 09:09:01.292110800 +0300 +@@ -932,7 +932,7 @@ if ((log_level & G_LOG_FLAG_FATAL) != 0 && !g_test_initialized ()) win32_keep_fatal_message = TRUE; #endif diff --git a/mingw-w64-glib2/0014-fix-gtkdoc.all.patch b/mingw-w64-glib2/0014-fix-gtkdoc.all.patch deleted file mode 100644 index cb3dd279f4..0000000000 --- a/mingw-w64-glib2/0014-fix-gtkdoc.all.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- glib-2.36.0/gtk-doc.make.orig 2013-04-17 19:29:34 +0400 -+++ glib-2.36.0/gtk-doc.make 2013-04-17 19:44:07 +0400 -@@ -101,7 +101,7 @@ - GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) - GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; - --scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) -+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) setup-build.stamp - $(GTK_DOC_V_SCAN)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ diff --git a/mingw-w64-glib2/0017-glib-use-gnu-print-scanf.patch b/mingw-w64-glib2/0017-glib-use-gnu-print-scanf.patch index 5754b672c0..613cd1a832 100644 --- a/mingw-w64-glib2/0017-glib-use-gnu-print-scanf.patch +++ b/mingw-w64-glib2/0017-glib-use-gnu-print-scanf.patch @@ -1,24 +1,7 @@ -From ea281f66ce6d71a83d0b0d235a80b505c7d0d26d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= - =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= -Date: Sun, 2 Mar 2014 18:18:18 +0000 -Subject: [PATCH] Switch G_GNUC_(PRINT|SCAN)F to gnu_(print|scan)f format - explicitly - -https://bugzilla.gnome.org/show_bug.cgi?id=725470 ---- - configure.ac | 10 +++++----- - gio/gregistrysettingsbackend.c | 2 +- - gio/win32/gwinhttpfile.c | 2 +- - glib/gmacros.h | 4 ++-- - glib/gpoll.h | 2 +- - 5 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 6c2ad85..b38715f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -552,7 +552,7 @@ else +diff -Naur glib-2.46.0-orig/configure.ac glib-2.46.0/configure.ac +--- glib-2.46.0-orig/configure.ac 2015-09-21 15:38:33.000000000 +0300 ++++ glib-2.46.0/configure.ac 2015-09-22 09:09:02.118820700 +0300 +@@ -567,7 +567,7 @@ ]) fi @@ -27,7 +10,7 @@ index 6c2ad85..b38715f 100644 # long long is a 64 bit integer. AC_MSG_CHECKING(for format to printf and scanf a guint64) AC_CACHE_VAL(glib_cv_long_long_format,[ -@@ -574,8 +574,8 @@ +@@ -589,8 +589,8 @@ AS_IF([ test -n "$glib_cv_long_long_format"], [ AC_MSG_RESULT(%${glib_cv_long_long_format}u) AC_DEFINE(HAVE_LONG_LONG_FORMAT,1,[define if system printf can print long long]) @@ -38,7 +21,7 @@ index 6c2ad85..b38715f 100644 fi ], [AC_MSG_RESULT(none)]) ],[ test x$ac_cv_sizeof___int64 = x8], [ -@@ -3222,8 +3222,8 @@ +@@ -3177,8 +3177,8 @@ glib_msize_type='LONG' ;; "long long"|__int64) @@ -49,7 +32,7 @@ index 6c2ad85..b38715f 100644 glib_msize_type='INT64' ;; esac -@@ -3245,8 +3245,8 @@ +@@ -3200,8 +3200,8 @@ glib_mssize_type='LONG' ;; "long long"|__int64) @@ -60,7 +43,7 @@ index 6c2ad85..b38715f 100644 glib_mssize_type='INT64' ;; esac -@@ -3264,9 +3264,9 @@ +@@ -3230,9 +3230,9 @@ ;; $ac_cv_sizeof_long_long) glib_intptr_type_define='long long' @@ -73,11 +56,10 @@ index 6c2ad85..b38715f 100644 glib_gpi_cast='(gint64)' glib_gpui_cast='(guint64)' ;; -diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c -index 396159c..c25a771 100644 ---- a/gio/gregistrysettingsbackend.c -+++ b/gio/gregistrysettingsbackend.c -@@ -328,7 +328,7 @@ registry_value_dump (RegistryValue value) +diff -Naur glib-2.46.0-orig/gio/gregistrysettingsbackend.c glib-2.46.0/gio/gregistrysettingsbackend.c +--- glib-2.46.0-orig/gio/gregistrysettingsbackend.c 2015-08-19 06:35:30.000000000 +0300 ++++ glib-2.46.0/gio/gregistrysettingsbackend.c 2015-09-22 09:09:02.118820700 +0300 +@@ -328,7 +328,7 @@ if (value.type == REG_DWORD) return g_strdup_printf ("%i", value.dword); else if (value.type == REG_QWORD) @@ -86,10 +68,9 @@ index 396159c..c25a771 100644 else if (value.type == REG_SZ) return g_strdup_printf ("%s", (char *)value.ptr); else if (value.type == REG_NONE) -diff --git a/gio/win32/gwinhttpfile.c b/gio/win32/gwinhttpfile.c -index 6403a99..a3c149d 100644 ---- a/gio/win32/gwinhttpfile.c -+++ b/gio/win32/gwinhttpfile.c +diff -Naur glib-2.46.0-orig/gio/win32/gwinhttpfile.c glib-2.46.0/gio/win32/gwinhttpfile.c +--- glib-2.46.0-orig/gio/win32/gwinhttpfile.c 2015-02-26 15:57:09.000000000 +0300 ++++ glib-2.46.0/gio/win32/gwinhttpfile.c 2015-09-22 09:09:02.118820700 +0300 @@ -549,7 +549,7 @@ gint64 cl; int n; @@ -99,11 +80,10 @@ index 6403a99..a3c149d 100644 n == wcslen (content_length)) g_file_info_set_size (info, cl); -diff --git a/glib/gmacros.h b/glib/gmacros.h -index 6403a99..a3c149d 100644 ---- a/glib/gmacros.h -+++ b/glib/gmacros.h -@@ -73,9 +73,9 @@ +diff -Naur glib-2.46.0-orig/glib/gmacros.h glib-2.46.0/glib/gmacros.h +--- glib-2.46.0-orig/glib/gmacros.h 2015-08-19 06:35:30.000000000 +0300 ++++ glib-2.46.0/glib/gmacros.h 2015-09-22 09:09:02.118820700 +0300 +@@ -79,9 +79,9 @@ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) #define G_GNUC_PRINTF( format_idx, arg_idx ) \ @@ -115,12 +95,11 @@ index 6403a99..a3c149d 100644 #define G_GNUC_FORMAT( arg_idx ) \ __attribute__((__format_arg__ (arg_idx))) #define G_GNUC_NORETURN \ -diff --git a/glib/gpoll.h b/glib/gpoll.h -index 6403a99..a3c149d 100644 ---- a/glib/gpoll.h -+++ b/glib/gpoll.h -@@ -100,7 +100,7 @@ - +diff -Naur glib-2.46.0-orig/glib/gpoll.h glib-2.46.0/glib/gpoll.h +--- glib-2.46.0-orig/glib/gpoll.h 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gpoll.h 2015-09-22 09:09:02.118820700 +0300 +@@ -108,7 +108,7 @@ + */ #ifdef G_OS_WIN32 #if GLIB_SIZEOF_VOID_P == 8 -#define G_POLLFD_FORMAT "%#I64x" @@ -128,5 +107,3 @@ index 6403a99..a3c149d 100644 #else #define G_POLLFD_FORMAT "%#x" #endif --- -1.8.4 diff --git a/mingw-w64-glib2/0021-use-64bit-stat-for-localfile-size-calc.all.patch b/mingw-w64-glib2/0021-use-64bit-stat-for-localfile-size-calc.all.patch deleted file mode 100644 index 896f55c2d7..0000000000 --- a/mingw-w64-glib2/0021-use-64bit-stat-for-localfile-size-calc.all.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- glib-2.39.90/gio/glocalfile.c.orig 2014-02-03 17:40:41.000000000 +0000 -+++ glib-2.39.90/gio/glocalfile.c 2014-03-02 14:30:32.519644000 +0000 -@@ -2648,10 +2648,45 @@ - - #if defined (AT_FDCWD) - if (fstatat (parent_fd, name->data, &buf, AT_SYMLINK_NOFOLLOW) != 0) --#else -+ return g_local_file_measure_size_error (state->flags, errno, name, error); -+#elif defined (HAVE_LSTAT) || !defined (G_OS_WIN32) - if (g_lstat (name->data, &buf) != 0) --#endif - return g_local_file_measure_size_error (state->flags, errno, name, error); -+#else -+ { -+ const char *filename = (const gchar *) name->data; -+ wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); -+ int retval; -+ int save_errno; -+ int len; -+ -+ if (wfilename == NULL) -+ { -+ errno = EINVAL; -+ return g_local_file_measure_size_error (state->flags, errno, name, error); -+ } -+ -+ len = wcslen (wfilename); -+ while (len > 0 && G_IS_DIR_SEPARATOR (wfilename[len-1])) -+ len--; -+ if (len > 0 && -+ (!g_path_is_absolute (filename) || len > g_path_skip_root (filename) - filename)) -+ wfilename[len] = '\0'; -+ -+#ifdef _WIN64 -+ retval = _wstati64 (wfilename, &buf); -+#else -+ retval = _wstat32i64 (wfilename, &buf); -+#endif -+ save_errno = errno; -+ -+ g_free (wfilename); -+ -+ errno = save_errno; -+ if (retval != 0) -+ return g_local_file_measure_size_error (state->flags, errno, name, error); -+ } -+#endif - - if (name->next) - { diff --git a/mingw-w64-glib2/0023-print-in-binary-more-for-testing.all.patch b/mingw-w64-glib2/0023-print-in-binary-more-for-testing.all.patch index ee43958dd6..d0d5d7e5d9 100644 --- a/mingw-w64-glib2/0023-print-in-binary-more-for-testing.all.patch +++ b/mingw-w64-glib2/0023-print-in-binary-more-for-testing.all.patch @@ -1,5 +1,6 @@ ---- glib-2.39.90/glib/tests/test-printf.c.orig 2014-03-02 17:25:28.535468800 +0000 -+++ glib-2.39.90/glib/tests/test-printf.c 2014-03-02 17:24:39.981803200 +0000 +diff -Naur glib-2.46.0-orig/glib/tests/test-printf.c glib-2.46.0/glib/tests/test-printf.c +--- glib-2.46.0-orig/glib/tests/test-printf.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/tests/test-printf.c 2015-09-22 09:09:03.039120400 +0300 @@ -24,6 +24,9 @@ #include #include "glib.h" @@ -10,7 +11,7 @@ static void test_retval_and_trunc (void) -@@ -896,6 +899,9 @@ +@@ -907,6 +910,9 @@ main (int argc, char *argv[]) { diff --git a/mingw-w64-glib2/0024-return-actually-written-data-in-printf.all.patch b/mingw-w64-glib2/0024-return-actually-written-data-in-printf.all.patch index a6cc49305b..478b2be211 100644 --- a/mingw-w64-glib2/0024-return-actually-written-data-in-printf.all.patch +++ b/mingw-w64-glib2/0024-return-actually-written-data-in-printf.all.patch @@ -1,5 +1,6 @@ ---- glib-2.40.0/glib/gnulib/printf.c.orig 2014-02-03 17:40:41.000000000 +0000 -+++ glib-2.40.0/glib/gnulib/printf.c 2014-05-20 00:11:04.036075100 +0000 +diff -Naur glib-2.46.0-orig/glib/gnulib/printf.c glib-2.46.0/glib/gnulib/printf.c +--- glib-2.46.0-orig/glib/gnulib/printf.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gnulib/printf.c 2015-09-22 09:09:03.834633700 +0300 @@ -88,16 +88,16 @@ int _g_gnulib_vfprintf (FILE *file, char const *format, va_list args) { diff --git a/mingw-w64-glib2/0025-glib-update-valgrind-h-stdint.patch b/mingw-w64-glib2/0025-glib-update-valgrind-h-stdint.patch deleted file mode 100644 index 17f3eb2e7e..0000000000 --- a/mingw-w64-glib2/0025-glib-update-valgrind-h-stdint.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- glib-2.40.0/glib/valgrind.h.old 2014-05-16 09:19:32.211000000 -0400 -+++ glib-2.40.0/glib/valgrind.h 2014-05-16 09:19:50.043000000 -0400 -@@ -93,6 +93,7 @@ - - - #include -+#include - - /* Nb: this file might be included in a file compiled with -ansi. So - we can't use C++ style "//" comments nor the "asm" keyword (instead diff --git a/mingw-w64-glib2/0027-no_sys_if_nametoindex.patch b/mingw-w64-glib2/0027-no_sys_if_nametoindex.patch new file mode 100644 index 0000000000..456949797c --- /dev/null +++ b/mingw-w64-glib2/0027-no_sys_if_nametoindex.patch @@ -0,0 +1,20 @@ +diff -Naur glib-2.46.0-orig/gio/gsocket.c glib-2.46.0/gio/gsocket.c +--- glib-2.46.0-orig/gio/gsocket.c 2015-08-31 16:08:34.000000000 +0300 ++++ glib-2.46.0/gio/gsocket.c 2015-09-22 09:09:04.614548700 +0300 +@@ -1951,7 +1951,7 @@ + + #if !defined(HAVE_IF_NAMETOINDEX) && defined(G_OS_WIN32) + static guint +-if_nametoindex (const gchar *iface) ++w32_if_nametoindex (const gchar *iface) + { + PIP_ADAPTER_ADDRESSES addresses = NULL, p; + gulong addresses_len = 0; +@@ -2004,6 +2004,7 @@ + } + + #define HAVE_IF_NAMETOINDEX 1 ++#define if_nametoindex w32_if_nametoindex + #endif + + static gboolean diff --git a/mingw-w64-glib2/0028-inode_directory.patch b/mingw-w64-glib2/0028-inode_directory.patch new file mode 100644 index 0000000000..fdb8048bf8 --- /dev/null +++ b/mingw-w64-glib2/0028-inode_directory.patch @@ -0,0 +1,12 @@ +diff -Naur glib-2.46.0-orig/gio/glocalfileinfo.c glib-2.46.0/gio/glocalfileinfo.c +--- glib-2.46.0-orig/gio/glocalfileinfo.c 2015-08-21 08:00:49.000000000 +0300 ++++ glib-2.46.0/gio/glocalfileinfo.c 2015-09-22 09:09:05.410062000 +0300 +@@ -1232,7 +1232,7 @@ + (symlink_broken || (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS))) + return g_content_type_from_mime_type ("inode/symlink"); + else if (statbuf != NULL && S_ISDIR(statbuf->st_mode)) +- return g_content_type_from_mime_type ("inode/directory"); ++ return g_strdup ("inode/directory"); + #ifndef G_OS_WIN32 + else if (statbuf != NULL && S_ISCHR(statbuf->st_mode)) + return g_content_type_from_mime_type ("inode/chardevice"); diff --git a/mingw-w64-glib2/0029-grand.all.patch b/mingw-w64-glib2/0029-grand.all.patch new file mode 100644 index 0000000000..1c7ea25c1a --- /dev/null +++ b/mingw-w64-glib2/0029-grand.all.patch @@ -0,0 +1,13 @@ +diff -Naur glib-2.46.0-orig/glib/grand.c glib-2.46.0/glib/grand.c +--- glib-2.46.0-orig/glib/grand.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/grand.c 2015-09-22 09:09:06.174378700 +0300 +@@ -263,7 +263,8 @@ + } + #else /* G_OS_WIN32 */ + /* rand_s() is only available since Visual Studio 2005 */ +-#if defined(_MSC_VER) && _MSC_VER >= 1400 ++ /* MinGW-w64 has a wrapper that will emulate rand_s() if it's not in msvcrt */ ++#if (defined(_MSC_VER) && _MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR) + gint i; + + for (i = 0; i < G_N_ELEMENTS (seed); i++) diff --git a/mingw-w64-glib2/0035-glib-fix-on-windows-when-using-bindings.patch b/mingw-w64-glib2/0035-glib-fix-on-windows-when-using-bindings.patch new file mode 100644 index 0000000000..c2055c6af9 --- /dev/null +++ b/mingw-w64-glib2/0035-glib-fix-on-windows-when-using-bindings.patch @@ -0,0 +1,64 @@ +From cfac878d4e7aff96c89e997ea4132043bb5a24e0 Mon Sep 17 00:00:00 2001 +From: Chun-wei Fan +Date: Mon, 21 Dec 2015 14:54:42 +0800 +Subject: [PATCH] g_application_run(): Fix on Windows When Using Bindings + +As g_win32_get_command_line() calls CommandLineToArgvW() to acquire the +arguments passed into a GApplication program, it actually returns the +whole command line which is used to invoke the program, including the +script interpreter and its flags when a script using GNOME bindings +(e.g. PyGObject and so on) is being invoked. + +The issue here is that g_application_run() would most probably have +trouble in the scripts scenario on Windows as it is likely unable to +"recognize" the script interpreter, causing such scripts to fail to run. + +Largely based on the patch by Ray Donnelly . + +https://bugzilla.gnome.org/show_bug.cgi?id=734095 +--- + gio/gapplication.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/gio/gapplication.c b/gio/gapplication.c +index e24ab69..5c4b2fb 100644 +--- a/gio/gapplication.c ++++ b/gio/gapplication.c +@@ -2277,7 +2277,34 @@ g_application_run (GApplication *application, + g_return_val_if_fail (!application->priv->must_quit_now, 1); + + #ifdef G_OS_WIN32 +- arguments = g_win32_get_command_line (); ++ { ++ gint new_argc = 0; ++ ++ arguments = g_win32_get_command_line (); ++ ++ /* ++ * CommandLineToArgvW(), which is called by g_win32_get_command_line(), ++ * pulls in the whole command line that is used to call the program. This is ++ * fine in cases where the program is a .exe program, but in the cases where the ++ * program is a called via a script, such as PyGObject's gtk-demo.py, which is normally ++ * called using 'python gtk-demo.py' on Windows, the program name (argv[0]) ++ * returned by g_win32_get_command_line() will not be the argv[0] that ->local_command_line() ++ * would expect, causing the program to fail with "This application can not open files." ++ */ ++ new_argc = g_strv_length (arguments); ++ ++ if (new_argc > argc) ++ { ++ gint i; ++ ++ for (i = 0; i < new_argc - argc; i++) ++ g_free (arguments[i]); ++ ++ memmove (&arguments[0], ++ &arguments[new_argc - argc], ++ sizeof (arguments[0]) * (argc + 1)); ++ } ++ } + #else + { + gint i; +-- +2.3.5.windows.8 diff --git a/mingw-w64-glib2/PKGBUILD b/mingw-w64-glib2/PKGBUILD index f1692aca2a..e72437a52c 100644 --- a/mingw-w64-glib2/PKGBUILD +++ b/mingw-w64-glib2/PKGBUILD @@ -1,68 +1,75 @@ # Maintainer: Alexey Pavlov +# Contributor: Ignacio Casal Quinteiro +# Contributor: Renato Silva +# Contributor: Ray Donnelly _realname=glib2 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.42.0 -pkgrel=1 +pkgver=2.46.2 +pkgrel=3 url="http://www.gtk.org/" arch=('any') pkgdesc="Common C routines used by GTK+ 2.4 and other libs (mingw-w64)" -license=('LGPL') -options=('!debug' 'strip' 'staticlibs') +license=(LGPL2) +# options=('debug' '!strip') install=glib2-${CARCH}.install depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-libffi") + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2") -source=("http://ftp.gnome.org/pub/GNOME/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz" +source=("http://ftp.gnome.org/pub/GNOME/sources/glib/${pkgver%.*}/glib-${pkgver}.tar.xz" 0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch 0003-g_abort.all.patch 0004-glib-prefer-constructors-over-DllMain.patch 0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch - 0015-fix-stat.all.patch 0017-glib-use-gnu-print-scanf.patch - 0021-use-64bit-stat-for-localfile-size-calc.all.patch 0023-print-in-binary-more-for-testing.all.patch 0024-return-actually-written-data-in-printf.all.patch - 0025-glib-update-valgrind-h-stdint.patch) -md5sums=('71af99768063ac24033ac738e2832740' - '98c7778b5e8a30dbcdb86bcd15f9c11d' - '6eb9d56028ea3bbec3d053254a00a04b' - '46969e815f3ab19582ba33667a52048b' - '7b065f9bc154bf996523974a698b24de' - '963a72f6efcaa3405204b76b27b44645' - '29065eb21bc779787080f0529a6c5f96' - '952989e534235721d30b9ee3d89cc225' - '217a997ede1b93ac06f96ed869b74378' - '500f39baea98d98e4a2f877ad56f55a5' - 'c5f7671c710678473b3e6209d57710b1') + 0027-no_sys_if_nametoindex.patch + 0028-inode_directory.patch + 0029-grand.all.patch + 0035-glib-fix-on-windows-when-using-bindings.patch) + +md5sums=('7f815d6e46df68e070cb421ed7f1139e' + '10cf1e482b6a1367d79648466f2cf23c' + '27e8188e764eed3b3d565e5fc5746654' + 'b3cf766d5e717010a7534c61e53f3204' + '80fb538441701d2dd3ab8bcb13baf90c' + 'b66efec303c72876e6e7d25375b8d081' + 'f6659fa19dd0395a7a285c84bb75472b' + '3f896edd80eaa9c4e98abca0df6c83bd' + '4aa52b552a6a25b49a1b6f928b3cdafd' + '27ad96697441aabc4a01f881ad9999ea' + 'b64390c406d32578e979103eed89232b' + 'b3077e73a447734b331131dcd47cb4d9') prepare() { - cd "$srcdir/glib-$pkgver" + cd "${srcdir}/glib-${pkgver}" - patch -Np1 -i "$srcdir/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch" - patch -Np1 -i "$srcdir/0003-g_abort.all.patch" - patch -Np1 -i "$srcdir/0004-glib-prefer-constructors-over-DllMain.patch" - patch -Np0 -i "$srcdir/0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch" - patch -Np1 -i "$srcdir/0015-fix-stat.all.patch" - patch -Np1 -i "$srcdir/0017-glib-use-gnu-print-scanf.patch" - patch -Np1 -i "$srcdir/0021-use-64bit-stat-for-localfile-size-calc.all.patch" - patch -Np1 -i "$srcdir/0023-print-in-binary-more-for-testing.all.patch" - patch -Np1 -i "$srcdir/0024-return-actually-written-data-in-printf.all.patch" - patch -Np1 -i "$srcdir/0025-glib-update-valgrind-h-stdint.patch" + patch -Np1 -i "${srcdir}/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch" + patch -Np1 -i "${srcdir}/0003-g_abort.all.patch" + patch -Np1 -i "${srcdir}/0004-glib-prefer-constructors-over-DllMain.patch" + patch -Np1 -i "${srcdir}/0005-glib-send-log-messages-to-correct-stdout-and-stderr.patch" + patch -Np1 -i "${srcdir}/0017-glib-use-gnu-print-scanf.patch" + patch -Np1 -i "${srcdir}/0023-print-in-binary-more-for-testing.all.patch" + patch -Np1 -i "${srcdir}/0024-return-actually-written-data-in-printf.all.patch" + patch -Np1 -i "${srcdir}/0027-no_sys_if_nametoindex.patch" + patch -Np1 -i "${srcdir}/0028-inode_directory.patch" + patch -Np1 -i "${srcdir}/0029-grand.all.patch" + + # https://bugzilla.gnome.org/show_bug.cgi?id=734095 + patch -Np1 -i "${srcdir}/0035-glib-fix-on-windows-when-using-bindings.patch" NOCONFIGURE=1 ./autogen.sh } -build() -{ - cd "$srcdir/glib-$pkgver" - +build() { export MSYS2_ARG_CONV_EXCL="-//OASIS//DTD" msg "Build shared version" - mkdir $srcdir/build-${CARCH}-shared && cd $srcdir/build-${CARCH}-shared - ../glib-$pkgver/configure \ + mkdir ${srcdir}/build-${CARCH}-shared && cd ${srcdir}/build-${CARCH}-shared + ../glib-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -75,8 +82,8 @@ build() make msg "Build static version" - mkdir $srcdir/build-${CARCH}-static && cd $srcdir/build-${CARCH}-static - ../glib-$pkgver/configure \ + mkdir ${srcdir}/build-${CARCH}-static && cd ${srcdir}/build-${CARCH}-static + ../glib-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -90,13 +97,13 @@ build() } package() { - cd "$srcdir/build-${CARCH}-static" - make DESTDIR="$pkgdir/static" install + cd "${srcdir}/build-${CARCH}-static" + make DESTDIR="${pkgdir}/static" install - cd "$srcdir/build-${CARCH}-shared" - make DESTDIR="$pkgdir" install - - mv "$pkgdir/static/${MINGW_PREFIX}/lib/"*.a "$pkgdir/${MINGW_PREFIX}/lib/" + cd "${srcdir}/build-${CARCH}-shared" + make DESTDIR="${pkgdir}" install + + mv "${pkgdir}/static/${MINGW_PREFIX}/lib/"*.a "${pkgdir}/${MINGW_PREFIX}/lib/" rm -rf "${pkgdir}/static" @@ -106,4 +113,6 @@ package() { #rm -f "${pkgdir}${MINGW_PREFIX}/bin/gdbus-codegen" #rm -rf "${pkgdir}${MINGW_PREFIX}/lib/gdbus-2.0" + + install -Dm644 "${srcdir}/glib-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-glibmm/PKGBUILD b/mingw-w64-glibmm/PKGBUILD index 6a4c9c4245..ef7418c964 100644 --- a/mingw-w64-glibmm/PKGBUILD +++ b/mingw-w64-glibmm/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=glibmm +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.42.0 -pkgrel=2 +pkgver=2.46.1 +pkgrel=1 pkgdesc="Glib-- (glibmm) is a C++ interface for glib (mingw-w64)" arch=('any') url="http://www.gtkmm.org" @@ -11,27 +12,29 @@ license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libsigc++" "${MINGW_PACKAGE_PREFIX}-glib2") options=('staticlibs' 'strip') -source=("http://ftp.gnome.org/pub/GNOME/sources/glibmm/${pkgver%.*}/glibmm-$pkgver.tar.xz") -sha256sums=('985083d97378d234da27a7243587cc0d186897a4b2d3c1286f794089be1a3397') +source=("http://ftp.gnome.org/pub/GNOME/sources/glibmm/${pkgver%.*}/glibmm-${pkgver}.tar.xz") +sha256sums=('9647e596c1081d2ea202bd3da2824ec2ea359498fa86eb59a55b1b307dd8c4aa') prepare() { cd "${srcdir}"/${_realname}-${pkgver} } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ --enable-shared \ --disable-documentation + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-glm/001-remove-missing-define.patch b/mingw-w64-glm/001-remove-missing-define.patch new file mode 100644 index 0000000000..bec7e65099 --- /dev/null +++ b/mingw-w64-glm/001-remove-missing-define.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt.orig 2015-02-27 22:26:52.662000000 +0300 ++++ b/CMakeLists.txt 2015-02-27 22:26:58.184400000 +0300 +@@ -129,7 +129,7 @@ + if(CMAKE_COMPILER_IS_GNUCXX) + #add_definitions(-S) + #add_definitions(-s) +- add_definitions(-m64) ++ #add_definitions(-m64) + add_definitions(-O2) + + #add_definitions(-fprofile-arcs -ftest-coverage) gcov diff --git a/mingw-w64-glm/PKGBUILD b/mingw-w64-glm/PKGBUILD index d3bfab9e1a..8db7364548 100644 --- a/mingw-w64-glm/PKGBUILD +++ b/mingw-w64-glm/PKGBUILD @@ -1,39 +1,50 @@ # Maintainer: Alexey Pavlov _realname=glm - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.9.5.4 -pkgrel=1 +pkgver=0.9.6.3 +pkgrel=2 pkgdesc="C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification (mingw-w64)" arch=('any') url='http://glm.g-truc.net' license=('MIT') -depends=("") -source=("http://sourceforge.net/projects/ogl-math/files/glm-$pkgver/glm-$pkgver.zip") -md5sums=('fab76fc982b256b46208e5c750ed456a') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +source=("http://sourceforge.net/projects/ogl-math/files/glm-${pkgver}/glm-${pkgver}.zip" + 001-remove-missing-define.patch) +md5sums=('acd0b517c37ed25c3f11ee155ee8257e' + 'f28ad01cff9055123e82d46b70435b97') + +prepare() { + cd ${_realname} + patch -p1 -i ${srcdir}/001-remove-missing-define.patch +} build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd "$srcdir/build-${MINGW_CHOST}" + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DGLM_TEST_ENABLE=ON \ ../${_realname} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/doc cp -r $srcdir/${_realname}/doc ${pkgdir}${MINGW_PREFIX}/share/doc/glm rm -f ${pkgdir}${MINGW_PREFIX}/include/glm/CMakeLists.txt find ${pkgdir}${MINGW_PREFIX} -type f -exec chmod 644 {} \; find ${pkgdir}${MINGW_PREFIX} -type d -exec chmod 755 {} \; - install -Dm644 $srcdir/${_realname}/util/FindGLM.cmake ${pkgdir}${MINGW_PREFIX}/share/cmake-3.0/Modules/FindGLM.cmake - install -Dm644 $srcdir/${_realname}/copying.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + #install -Dm644 ${srcdir}/${_realname}/util/FindGLM.cmake ${pkgdir}${MINGW_PREFIX}/share/cmake-3.2/Modules/FindGLM.cmake + install -Dm644 ${srcdir}/${_realname}/copying.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-glpk/PKGBUILD b/mingw-w64-glpk/PKGBUILD new file mode 100644 index 0000000000..02035584bb --- /dev/null +++ b/mingw-w64-glpk/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Ray Donnelly + +_realname=glpk +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=4.57 +pkgrel=1 +pkgdesc="GNU Linear Programming Kit: solve LP, MIP and other problems (mingw-w64)" +arch=('any') +url="http://www.gnu.org/software/glpk/glpk.html" +license=('GPL') +depends=("${MINGW_PACKAGE_PREFIX}-gmp") +options=('staticlibs' !strip debug) +source=("http://ftp.gnu.org/gnu/glpk/glpk-${pkgver}.tar.gz" + 'timeval-64bit.patch') +sha1sums=('d2df2de59798c35024df8d140a53453e29a095be' + 'b496de484eb3df16dd91c253cd8230b4e42fb902') + +prepare () { + cd "${srcdir}/glpk-${pkgver}" + patch -p1 -i "${srcdir}/timeval-64bit.patch" + sed -i "s|-version-info|-no-undefined -version-info|g" src/Makefile.am + autoreconf -vfi +} + +build() { + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir -p build-${CARCH} && cd build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --with-gmp \ + --with-gnu-ld + + make +} + +check() { + cd "${srcdir}/build-${CARCH}" + make check +} + +package() { + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-glpk/timeval-64bit.patch b/mingw-w64-glpk/timeval-64bit.patch new file mode 100644 index 0000000000..3537d5efe8 --- /dev/null +++ b/mingw-w64-glpk/timeval-64bit.patch @@ -0,0 +1,17 @@ +diff -Naur glpk-4.55.orig/src/env/time.c glpk-4.55/src/env/time.c +--- glpk-4.55.orig/src/env/time.c 2015-03-27 02:15:07.371110800 +0100 ++++ glpk-4.55/src/env/time.c 2015-03-27 17:24:58.926888700 +0100 +@@ -54,10 +54,12 @@ + double glp_time(void) + { struct timeval tv; + struct tm *tm; ++ time_t sec; + int j; + double t; + gettimeofday(&tv, NULL); +- tm = gmtime(&tv.tv_sec); ++ sec = tv.tv_sec; ++ tm = gmtime(&sec); + j = jday(tm->tm_mday, tm->tm_mon + 1, 1900 + tm->tm_year); + xassert(j >= 0); + t = ((((double)(j - EPOCH) * 24.0 + (double)tm->tm_hour) * 60.0 + diff --git a/mingw-w64-glsl-optimizer/0001-GYP-Add-missing-files.patch b/mingw-w64-glsl-optimizer/0001-GYP-Add-missing-files.patch new file mode 100644 index 0000000000..d14aa2b202 --- /dev/null +++ b/mingw-w64-glsl-optimizer/0001-GYP-Add-missing-files.patch @@ -0,0 +1,37 @@ +From 1c56d65b20a354fa4c83e06524aee8e53d503c62 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 14 Jul 2015 16:29:12 +0100 +Subject: [PATCH 1/6] GYP: Add missing files + +--- + src/glsl_optimizer_lib.gyp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/glsl_optimizer_lib.gyp b/src/glsl_optimizer_lib.gyp +index 37ae920..980683a 100644 +--- a/src/glsl_optimizer_lib.gyp ++++ b/src/glsl_optimizer_lib.gyp +@@ -114,7 +114,7 @@ + 'glsl/lower_vec_index_to_swizzle.cpp', + 'glsl/lower_vector.cpp', + 'glsl/lower_vector_insert.cpp', +- 'glsl/lower_named_interface_blocks.cpp', ++ 'glsl/lower_vertex_id.cpp', + 'glsl/opt_algebraic.cpp', + 'glsl/opt_array_splitting.cpp', + 'glsl/opt_constant_folding.cpp', +@@ -136,8 +136,9 @@ + 'glsl/opt_tree_grafting.cpp', + 'glsl/opt_vectorize.cpp', + 'glsl/opt_vector_splitting.cpp', +- 'glsl/opt_flip_matrices.cpp', +- 'glsl/opt_dead_builtin_varyings.cpp', ++ 'glsl/opt_minmax.cpp', ++ 'glsl/opt_rebalance_tree.cpp', ++ 'glsl/opt_dead_builtin_variables.cpp', + 'glsl/program.h', + 'glsl/s_expression.cpp', + 'glsl/s_expression.h', +-- +2.4.5 + diff --git a/mingw-w64-glsl-optimizer/0001-cmake-Link-OpenGL-with-glsl_test.patch b/mingw-w64-glsl-optimizer/0001-cmake-Link-OpenGL-with-glsl_test.patch deleted file mode 100644 index 4910298d1e..0000000000 --- a/mingw-w64-glsl-optimizer/0001-cmake-Link-OpenGL-with-glsl_test.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7aa3b231cd1a6359eb3e2cff15047f189f0bafa6 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Wed, 11 Dec 2013 21:58:11 +0000 -Subject: [PATCH 1/2] cmake: Link OpenGL with glsl_test - ---- - CMakeLists.txt | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1215af7..fcd364c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,6 +16,9 @@ else() - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -s") - endif() - -+find_package(OpenGL REQUIRED) -+link_directories(${OpenGL_LIBRARY_DIRS}) -+ - file(GLOB glcpp-library_sources src/glsl/glcpp/*.c) - #file(GLOB glcpp-library_sources_remove src/glsl/glcpp/glcpp.c) - #list(REMOVE_ITEM glcpp-library_sources ${glcpp-library_sources_remove}) -@@ -35,7 +38,7 @@ target_link_libraries(glsl_compiler glsl_optimizer) - - file(GLOB glsl_test_sources tests/*.cpp) - add_executable(glsl_test ${glsl_test_sources}) --target_link_libraries(glsl_test glsl_optimizer) -+target_link_libraries(glsl_test ${OPENGL_LIBRARIES} glsl_optimizer) - - file(GLOB glslopt_sources contrib/glslopt/*.cpp) - add_executable(glslopt ${glslopt_sources}) --- -1.8.5.1 - diff --git a/mingw-w64-glsl-optimizer/0002-Fix-glslopt-compile-failure.patch b/mingw-w64-glsl-optimizer/0002-Fix-glslopt-compile-failure.patch deleted file mode 100644 index 70b6baabfc..0000000000 --- a/mingw-w64-glsl-optimizer/0002-Fix-glslopt-compile-failure.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7c1500ad4ce2e2d279b60adc25db72956b08c85b Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Wed, 11 Dec 2013 21:58:28 +0000 -Subject: [PATCH 2/2] Fix glslopt compile failure - ---- - contrib/glslopt/Main.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/contrib/glslopt/Main.cpp b/contrib/glslopt/Main.cpp -index c9e2546..bf2bbf4 100644 ---- a/contrib/glslopt/Main.cpp -+++ b/contrib/glslopt/Main.cpp -@@ -17,7 +17,7 @@ static int printhelp(const char* msg) - - static bool init() - { -- gContext = glslopt_initialize(false); -+ gContext = glslopt_initialize(kGlslTargetOpenGL); - if( !gContext ) - return false; - return true; --- -1.8.5.1 - diff --git a/mingw-w64-glsl-optimizer/0002-tests-MinGW-w64-Fix-build.patch b/mingw-w64-glsl-optimizer/0002-tests-MinGW-w64-Fix-build.patch new file mode 100644 index 0000000000..1d8dad6827 --- /dev/null +++ b/mingw-w64-glsl-optimizer/0002-tests-MinGW-w64-Fix-build.patch @@ -0,0 +1,36 @@ +From 24bb20df088cae8e3b8e29fa17a083c31d6ab6ac Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 9 Dec 2013 19:10:48 +0000 +Subject: [PATCH 2/6] tests (MinGW-w64): Fix build + +Generalize two checks for _MSC_VER by replacing them +with checks for _WIN32. +--- + tests/glsl_optimizer_tests.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/glsl_optimizer_tests.cpp b/tests/glsl_optimizer_tests.cpp +index 7dab3d1..da8991f 100644 +--- a/tests/glsl_optimizer_tests.cpp ++++ b/tests/glsl_optimizer_tests.cpp +@@ -14,7 +14,7 @@ + #if GOT_GFX + + // ---- Windows GL bits +-#ifdef _MSC_VER ++#ifdef _WIN32 + #define GOT_MORE_THAN_GLSL_120 1 + #include + #include +@@ -370,7 +370,7 @@ static StringVector GetFiles (const std::string& folder, const std::string& ends + { + StringVector res; + +- #ifdef _MSC_VER ++ #ifdef _WIN32 + WIN32_FIND_DATAA FindFileData; + HANDLE hFind = FindFirstFileA ((folder+"/*"+endsWith).c_str(), &FindFileData); + if (hFind == INVALID_HANDLE_VALUE) +-- +2.4.5 + diff --git a/mingw-w64-glsl-optimizer/0003-Win64-long-is-32-bit-use-intptr_t-instead.patch b/mingw-w64-glsl-optimizer/0003-Win64-long-is-32-bit-use-intptr_t-instead.patch new file mode 100644 index 0000000000..6d6307e113 --- /dev/null +++ b/mingw-w64-glsl-optimizer/0003-Win64-long-is-32-bit-use-intptr_t-instead.patch @@ -0,0 +1,57 @@ +From f921c25741eb5e97c9c327e3873394f536361e50 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 14 Jul 2015 16:28:25 +0100 +Subject: [PATCH 3/6] Win64: long is 32-bit, use intptr_t instead + +--- + src/glsl/ir_print_glsl_visitor.cpp | 4 ++-- + src/glsl/ir_print_metal_visitor.cpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/glsl/ir_print_glsl_visitor.cpp b/src/glsl/ir_print_glsl_visitor.cpp +index 81a2c60..73afa8d 100644 +--- a/src/glsl/ir_print_glsl_visitor.cpp ++++ b/src/glsl/ir_print_glsl_visitor.cpp +@@ -337,7 +337,7 @@ void ir_print_glsl_visitor::newline_deindent() + + void ir_print_glsl_visitor::print_var_name (ir_variable* v) + { +- long id = (long)hash_table_find (globals->var_hash, v); ++ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, v); + if (!id && v->data.mode == ir_var_temporary) + { + id = ++globals->var_counter; +@@ -462,7 +462,7 @@ void ir_print_glsl_visitor::visit(ir_variable *ir) + // give an id to any variable defined in a function that is not an uniform + if ((this->mode == kPrintGlslNone && ir->data.mode != ir_var_uniform)) + { +- long id = (long)hash_table_find (globals->var_hash, ir); ++ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, ir); + if (id == 0) + { + id = ++globals->var_counter; +diff --git a/src/glsl/ir_print_metal_visitor.cpp b/src/glsl/ir_print_metal_visitor.cpp +index 0442208..c523d89 100644 +--- a/src/glsl/ir_print_metal_visitor.cpp ++++ b/src/glsl/ir_print_metal_visitor.cpp +@@ -377,7 +377,7 @@ void ir_print_metal_visitor::newline_deindent() + + void ir_print_metal_visitor::print_var_name (ir_variable* v) + { +- long id = (long)hash_table_find (globals->var_hash, v); ++ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, v); + if (!id && v->data.mode == ir_var_temporary) + { + id = ++globals->var_counter; +@@ -546,7 +546,7 @@ void ir_print_metal_visitor::visit(ir_variable *ir) + // give an id to any variable defined in a function that is not an uniform + if ((this->mode == kPrintGlslNone && ir->data.mode != ir_var_uniform)) + { +- long id = (long)hash_table_find (globals->var_hash, ir); ++ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, ir); + if (id == 0) + { + id = ++globals->var_counter; +-- +2.4.5 + diff --git a/mingw-w64-glsl-optimizer/0003-fix-tests-compile.patch b/mingw-w64-glsl-optimizer/0003-fix-tests-compile.patch deleted file mode 100644 index 472f865b2d..0000000000 --- a/mingw-w64-glsl-optimizer/0003-fix-tests-compile.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- glsl-optimizer/tests/glsl_optimizer_tests.cpp.orig 2014-01-18 16:35:25.459600000 +0400 -+++ glsl-optimizer/tests/glsl_optimizer_tests.cpp 2014-01-18 17:05:21.662000000 +0400 -@@ -14,7 +14,7 @@ - #if GOT_GFX - - // ---- Windows GL bits --#ifdef _MSC_VER -+#ifdef _WIN32 - #define GOT_MORE_THAN_GLSL_120 1 - #include - #include -@@ -311,7 +311,7 @@ - { - StringVector res; - -- #ifdef _MSC_VER -+ #ifdef _WIN32 - WIN32_FIND_DATAA FindFileData; - HANDLE hFind = FindFirstFileA ((folder+"/*"+endsWith).c_str(), &FindFileData); - if (hFind == INVALID_HANDLE_VALUE) diff --git a/mingw-w64-glsl-optimizer/0004-Fix-incorrect-Windows-64-hash_table_find-cast.patch b/mingw-w64-glsl-optimizer/0004-Fix-incorrect-Windows-64-hash_table_find-cast.patch deleted file mode 100644 index e6749c3868..0000000000 --- a/mingw-w64-glsl-optimizer/0004-Fix-incorrect-Windows-64-hash_table_find-cast.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp.orig 2014-01-18 16:35:24.773200000 +0400 -+++ glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp 2014-01-18 17:11:06.406600000 +0400 -@@ -302,7 +302,7 @@ - - void ir_print_glsl_visitor::print_var_name (ir_variable* v) - { -- long id = (long)hash_table_find (globals->var_hash, v); -+ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, v); - if (!id && v->mode == ir_var_temporary) - { - id = ++globals->var_counter; -@@ -406,7 +406,7 @@ - // give an id to any variable defined in a function that is not an uniform - if ((this->mode == kPrintGlslNone && ir->mode != ir_var_uniform)) - { -- long id = (long)hash_table_find (globals->var_hash, ir); -+ intptr_t id = (intptr_t)hash_table_find (globals->var_hash, ir); - if (id == 0) - { - id = ++globals->var_counter; diff --git a/mingw-w64-glsl-optimizer/0004-tests-MinGW-w64-Use-find_package-OpenGL-in-CMakeList.patch b/mingw-w64-glsl-optimizer/0004-tests-MinGW-w64-Use-find_package-OpenGL-in-CMakeList.patch new file mode 100644 index 0000000000..f99f17aa12 --- /dev/null +++ b/mingw-w64-glsl-optimizer/0004-tests-MinGW-w64-Use-find_package-OpenGL-in-CMakeList.patch @@ -0,0 +1,28 @@ +From 1320541ceaa321b2c0e105ba1c4161cfb9ee12f1 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 22 Jul 2015 08:44:33 +0100 +Subject: [PATCH 4/6] tests (MinGW-w64): Use find_package(OpenGL) in + CMakeLists.txt + +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c058bef..d6ab5d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,6 +42,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + find_library(OpenGL_LIBRARY OpenGL ) + target_link_libraries(glsl_test ${OpenGL_LIBRARY}) + endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++if(MINGW) ++ find_package(OpenGL) ++ target_link_libraries(glsl_test ${OPENGL_gl_LIBRARY}) ++endif(MINGW) + + file(GLOB glslopt_sources contrib/glslopt/*.cpp) + add_executable(glslopt ${glslopt_sources}) +-- +2.4.5 + diff --git a/mingw-w64-glsl-optimizer/0005-main.cpp-Remove-duplicate-_mesa_error_no_memory-func.patch b/mingw-w64-glsl-optimizer/0005-main.cpp-Remove-duplicate-_mesa_error_no_memory-func.patch new file mode 100644 index 0000000000..924735211a --- /dev/null +++ b/mingw-w64-glsl-optimizer/0005-main.cpp-Remove-duplicate-_mesa_error_no_memory-func.patch @@ -0,0 +1,52 @@ +From dd9859f0976b3e447509ed664cb5261d77d063b9 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 22 Jul 2015 08:56:14 +0100 +Subject: [PATCH 5/6] main.cpp: Remove duplicate _mesa_error_no_memory function + +The stub implementation in src/glsl/standalone_scaffolding.cpp +was replaced by the implementation in src/glsl/main.cpp. +--- + src/glsl/main.cpp | 6 ------ + src/glsl/standalone_scaffolding.cpp | 2 ++ + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp +index feed100..97fcee1 100644 +--- a/src/glsl/main.cpp ++++ b/src/glsl/main.cpp +@@ -40,12 +40,6 @@ + + static int glsl_version = 330; + +-extern "C" void +-_mesa_error_no_memory(const char *caller) +-{ +- fprintf(stderr, "Mesa error: out of memory in %s", caller); +-} +- + static void + initialize_context(struct gl_context *ctx, gl_api api) + { +diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp +index b338e92..16d4b47 100644 +--- a/src/glsl/standalone_scaffolding.cpp ++++ b/src/glsl/standalone_scaffolding.cpp +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include "util/ralloc.h" + + +@@ -52,6 +53,7 @@ _mesa_shader_debug(struct gl_context *, GLenum, GLuint *id, + extern "C" void + _mesa_error_no_memory(const char *caller) + { ++ fprintf(stderr, "Mesa error: out of memory in %s", caller); + } + + +-- +2.4.5 + diff --git a/mingw-w64-glsl-optimizer/0006-CMake-Handle-installation.patch b/mingw-w64-glsl-optimizer/0006-CMake-Handle-installation.patch new file mode 100644 index 0000000000..4c912641dc --- /dev/null +++ b/mingw-w64-glsl-optimizer/0006-CMake-Handle-installation.patch @@ -0,0 +1,52 @@ +From a72a3fef22a2fbf240597f6fe9f58883b17fe27a Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 22 Jul 2015 09:58:02 +0100 +Subject: [PATCH 6/6] CMake: Handle installation + +--- + CMakeLists.txt | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d6ab5d8..0bf8574 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,6 +29,8 @@ file(GLOB glsl_sources src/glsl/*.cpp src/glsl/*.c) + file(GLOB glsl_sources_remove src/glsl/main.cpp src/glsl/builtin_stubs.cpp) + list(REMOVE_ITEM glsl_sources ${glsl_sources_remove}) + add_library(glsl_optimizer ${glsl_sources}) ++set_property(TARGET glsl_optimizer PROPERTY PUBLIC_HEADER src/glsl/glsl_optimizer.h) ++ + target_link_libraries(glsl_optimizer glcpp-library mesa) + + add_executable(glsl_compiler src/glsl/main.cpp) +@@ -53,3 +55,26 @@ target_link_libraries(glslopt glsl_optimizer) + + #add_executable(glcpp src/glsl/glcpp/glcpp.c) + #target_link_libraries(glcpp glsl_optimizer) ++ ++# ++# http://www.cmake.org/pipermail/cmake/2010-February/035466.html ++# compute default library install dir ++set (_DEFAULT_LIBRARY_INSTALL_DIR lib) ++if (EXISTS "${CMAKE_INSTALL_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4) ++ set (_DEFAULT_LIBRARY_INSTALL_DIR lib32) ++elif (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8) ++ set (_DEFAULT_LIBRARY_INSTALL_DIR lib64) ++endif () ++# the library install dir ++set(LIBRARY_INSTALL_DIR "${_DEFAULT_LIBRARY_INSTALL_DIR}" CACHE PATH "Installation directory for libraries") ++# make the library install dir an absolute path (can be important e.g. when using CONFIGURE_FILE to embed ++# the library installation directory into a file) ++if(NOT IS_ABSOLUTE "${LIBRARY_INSTALL_DIR}") ++ set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}") ++endif() ++# ++ ++install(TARGETS glsl_optimizer glsl_compiler glsl_test glslopt PUBLIC_HEADER ++ ARCHIVE DESTINATION "${LIBRARY_INSTALL_DIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" ++ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/include") +-- +2.4.5 + diff --git a/mingw-w64-glsl-optimizer/PKGBUILD b/mingw-w64-glsl-optimizer/PKGBUILD index 1e57799b04..8cbcb0700a 100644 --- a/mingw-w64-glsl-optimizer/PKGBUILD +++ b/mingw-w64-glsl-optimizer/PKGBUILD @@ -1,68 +1,62 @@ # Maintainer: Alexey Pavlov +# Maintainer: Ray Donnelly _realname=glsl-optimizer - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r60842.9b2a2d2 +pkgver=r66854.14946bd pkgrel=1 pkgdesc="C++ library that takes GLSL shaders, does some GPU-independent optimizations on them and outputs GLSL back (mingw-w64)" arch=('any') -url='https://github.com/aras-p/glsl-optimizer' +url="https://github.com/aras-p/glsl-optimizer" license=('MIT') -depends=("") makedepends=("git" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") -optdepends=() provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -replaces=() -backup=() options=('!strip' 'staticlibs' '!emptydirs') source=("${_realname}"::"git+https://github.com/aras-p/glsl-optimizer.git" - 0001-cmake-Link-OpenGL-with-glsl_test.patch - 0002-Fix-glslopt-compile-failure.patch - 0003-fix-tests-compile.patch - 0004-Fix-incorrect-Windows-64-hash_table_find-cast.patch - ) + 0001-GYP-Add-missing-files.patch + 0002-tests-MinGW-w64-Fix-build.patch + 0003-Win64-long-is-32-bit-use-intptr_t-instead.patch + 0004-tests-MinGW-w64-Use-find_package-OpenGL-in-CMakeList.patch + 0005-main.cpp-Remove-duplicate-_mesa_error_no_memory-func.patch + 0006-CMake-Handle-installation.patch) md5sums=('SKIP' - 'a69f07671525c48ac0a9a0321fda2b42' - '42190f0e6a8f434885e8347831f5d407' - '2b647ac196a91e08bd7e5aa35c851cdd' - '4223ad35f51d21a77b0b89c1cb8a26c0') + '50edec8ce23514d1347eff59ad461964' + '0024bc916c22aeccd1d1f14cfeb9e93d' + '24e10e6c050b3b608c15aab49d7b26b1' + 'a637926c8b3a7b73ce8059233b2d21af' + 'b12670f6a22d0e58803ed09df398be8c' + 'efb55c4ae8eee935e2ec41c8daee3930') pkgver() { - cd "$srcdir/${_realname}" + cd "${srcdir}"/${_realname} printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/${_realname}" - patch -p1 -i ${srcdir}/0001-cmake-Link-OpenGL-with-glsl_test.patch - patch -p1 -i ${srcdir}/0002-Fix-glslopt-compile-failure.patch - patch -p1 -i ${srcdir}/0003-fix-tests-compile.patch - patch -p1 -i ${srcdir}/0004-Fix-incorrect-Windows-64-hash_table_find-cast.patch + cd "${srcdir}"/${_realname} + git am "${srcdir}"/0001-GYP-Add-missing-files.patch + git am "${srcdir}"/0002-tests-MinGW-w64-Fix-build.patch + git am "${srcdir}"/0003-Win64-long-is-32-bit-use-intptr_t-instead.patch + git am "${srcdir}"/0004-tests-MinGW-w64-Use-find_package-OpenGL-in-CMakeList.patch + git am "${srcdir}"/0005-main.cpp-Remove-duplicate-_mesa_error_no_memory-func.patch + git am "${srcdir}"/0006-CMake-Handle-installation.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - mkdir ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ ../${_realname} - - make + + make } package() { - cd ${srcdir}/build-${MINGW_CHOST} - mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,include,lib} - cp *.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp $srcdir/${_realname}/src/glsl/glsl_optimizer.h ${pkgdir}${MINGW_PREFIX}/include/ - cp libglsl_optimizer.a ${pkgdir}${MINGW_PREFIX}/lib/ + cd "${srcdir}"/build-${CARCH} + make install DESTDIR=${pkgdir} } - diff --git a/mingw-w64-gmime/001-win.patch b/mingw-w64-gmime/001-win.patch new file mode 100644 index 0000000000..4a6ee871da --- /dev/null +++ b/mingw-w64-gmime/001-win.patch @@ -0,0 +1,26 @@ +--- ./gmime/Makefile.am.orig 2014-02-02 13:27:55.000000000 +0100 ++++ ./gmime/Makefile.am 2015-04-01 22:30:44.606566100 +0200 +@@ -43,7 +43,6 @@ + gmime-filter-strip.c \ + gmime-filter-windows.c \ + gmime-filter-yenc.c \ +- gmime-gpg-context.c \ + gmime-header.c \ + gmime-iconv.c \ + gmime-iconv-utils.c \ +@@ -98,7 +97,6 @@ + gmime-filter-strip.h \ + gmime-filter-windows.h \ + gmime-filter-yenc.h \ +- gmime-gpg-context.h \ + gmime-header.h \ + gmime-iconv.h \ + gmime-iconv-utils.h \ +@@ -177,6 +175,7 @@ + INTROSPECTION_GIRS = + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) + INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + GMime-2.6.gir: libgmime-2.6.la diff --git a/mingw-w64-gmime/PKGBUILD b/mingw-w64-gmime/PKGBUILD new file mode 100644 index 0000000000..8cc066f790 --- /dev/null +++ b/mingw-w64-gmime/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Andrea Zagli + +_realname=gmime +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.6.20 +pkgrel=2 +arch=('any') +pkgdesc="Glorious MIME Utility Library (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libiconv") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala" + "gtk-doc") +license=("LGPL 2.1") +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('e0a170fb264c2ae4cecd852f4e7aaddb8d58e8f3f0b569ce2d2a4704f55bdf65' + 'f1fd6b8ad76f083be818623c1083c777880bb56356f87735fb407f5da0ec66a8') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + autoreconf -f -i +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-cryptography=no + + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-gmp/PKGBUILD b/mingw-w64-gmp/PKGBUILD index 19d556e500..b7188b5365 100644 --- a/mingw-w64-gmp/PKGBUILD +++ b/mingw-w64-gmp/PKGBUILD @@ -1,26 +1,26 @@ # Maintainer: Alexey Pavlov _realname=gmp - +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=6.0.0 -pkgrel=2 -pkgdesc="A free library for arbitrary precision arithmetic" +pkgver=6.1.0 +pkgrel=1 +pkgdesc="A free library for arbitrary precision arithmetic (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") url="http://gmplib.org/" license=('LGPL3') -source=(ftp://ftp.gmplib.org/pub/gmp-${pkgver}/${_realname}-${pkgver}a.tar.xz{,.sig}) +source=(ftp://ftp.gmplib.org/pub/gmp-${pkgver}/${_realname}-${pkgver}.tar.xz{,.sig}) options=('staticlibs') -md5sums=('1e6da4e434553d2811437aa42c7f7c76' +md5sums=('a9868ef2556ad6a2909babcd1428f3c7' 'SKIP') build() { cd "${srcdir}/${_realname}-${pkgver}" # Build static version - mkdir -p "${srcdir}/build-static-${CARCH}" && cd "${srcdir}/build-static-${CARCH}" - ../${_realname}-${pkgver}/configure --build=${MINGW_CHOST} \ + mkdir -p "${srcdir}/static-${MINGW_CHOST}" && cd "${srcdir}/static-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-cxx \ --enable-static \ @@ -28,7 +28,7 @@ build() { make # Build shared version - mkdir -p "${srcdir}/build-shared-${CARCH}" && cd "${srcdir}/build-shared-${CARCH}" + mkdir -p "${srcdir}/shared-${MINGW_CHOST}" && cd "${srcdir}/shared-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-cxx \ @@ -38,15 +38,15 @@ build() { } check() { - cd "${srcdir}/build-static-${CARCH}" + cd "${srcdir}/static-${MINGW_CHOST}" make check } package() { - cd "${srcdir}/build-static-${CARCH}" + cd "${srcdir}/static-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install - cd ${srcdir}/build-shared-${CARCH} + cd ${srcdir}/shared-${MINGW_CHOST} mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib} cp .libs/libgmp*.dll ${pkgdir}${MINGW_PREFIX}/bin/ cp .libs/libgmp*.dll.a ${pkgdir}${MINGW_PREFIX}/lib/ diff --git a/mingw-w64-gnome-calculator/001-win.patch b/mingw-w64-gnome-calculator/001-win.patch new file mode 100644 index 0000000000..58b76ae1c4 --- /dev/null +++ b/mingw-w64-gnome-calculator/001-win.patch @@ -0,0 +1,264 @@ +--- ./Makefile.am.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./Makefile.am 2015-04-15 21:58:52.598827600 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS = po src search-provider data help ++SUBDIRS = po src search-provider data + + # Temporary fix for JHBuild, see https://bugzilla.gnome.org/show_bug.cgi?id=641652 + ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 +--- ./search-provider/Makefile.am.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./search-provider/Makefile.am 2015-04-15 21:58:52.610827700 +0200 +@@ -1,6 +1,12 @@ ++# The valac command is always executed in the sources directory, not the build ++# directory. If $(top_srcdir) is used, it will be relative to the build directory. ++vapidir = ../vapi ++ ++ + libexec_PROGRAMS = gnome-calculator-search-provider + + gnome_calculator_search_provider_SOURCES = \ ++ $(top_srcdir)/src/windows.c \ + search-provider.vala + + gnome_calculator_search_provider_VALAFLAGS = \ +--- ./search-provider/search-provider.vala.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./search-provider/search-provider.vala 2015-04-15 21:58:52.617828200 +0200 +@@ -9,6 +9,9 @@ + * license. + */ + ++extern string locale_get_tsep (); ++extern string locale_get_decimal (); ++ + [DBus (name = "org.gnome.Shell.SearchProvider2")] + public class SearchProvider : Object + { +@@ -23,11 +26,13 @@ + { + int exit_status; + +- var tsep_string = Posix.nl_langinfo (Posix.NLItem.THOUSEP); ++ string tsep_string; ++ tsep_string = locale_get_tsep (); + if (tsep_string == null || tsep_string == "") + tsep_string = " "; + +- var decimal = Posix.nl_langinfo (Posix.NLItem.RADIXCHAR); ++ string decimal; ++ decimal = locale_get_decimal (); + if (decimal == null) + decimal = ""; + +--- ./src/gcalccmd.vala.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./src/gcalccmd.vala 2015-04-15 21:58:52.623829100 +0200 +@@ -15,11 +15,13 @@ + + static void solve (string equation) + { +- var tsep_string = Posix.nl_langinfo (Posix.NLItem.THOUSEP); ++ string tsep_string; ++ tsep_string = locale_get_tsep (); + if (tsep_string == null || tsep_string == "") + tsep_string = " "; + +- var decimal = Posix.nl_langinfo (Posix.NLItem.RADIXCHAR); ++ string decimal; ++ decimal = locale_get_decimal (); + if (decimal == null) + decimal = ""; + +@@ -82,5 +84,5 @@ + if (requires_new_line) + stdout.printf ("\n"); + +- return Posix.EXIT_SUCCESS; ++ return 0; + } +--- ./src/gnome-calculator.vala.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./src/gnome-calculator.vala 2015-04-15 21:58:52.630828500 +0200 +@@ -142,17 +142,20 @@ + { + /* NOTE: Is not translated so can be easily parsed */ + stderr.printf ("%1$s %2$s\n", program_name, VERSION); +- return Posix.EXIT_SUCCESS; ++ return 0; + } + + if (options.contains ("solve")) + { + var solve_equation = (string) options.lookup_value ("solve", VariantType.STRING); +- var tsep_string = Posix.nl_langinfo (Posix.NLItem.THOUSEP); ++ ++ string tsep_string; ++ tsep_string = locale_get_tsep (); + if (tsep_string == null || tsep_string == "") + tsep_string = " "; + +- var decimal = Posix.nl_langinfo (Posix.NLItem.RADIXCHAR); ++ string decimal; ++ decimal = locale_get_decimal (); + if (decimal == null) + decimal = ""; + +@@ -169,17 +172,17 @@ + var serializer = new Serializer (DisplayFormat.AUTOMATIC, 10, 9); + serializer.set_representation_base (representation_base); + stdout.printf ("%s\n", serializer.to_string (result)); +- return Posix.EXIT_SUCCESS; ++ return 0; + } + else if (error == ErrorCode.MP) + { + stderr.printf ("Error: %s\n", Number.error); +- return Posix.EXIT_FAILURE; ++ return 1; + } + else + { + stderr.printf ("Error: %s\n", mp_error_code_to_string (error)); +- return Posix.EXIT_FAILURE; ++ return 1; + } + } + +@@ -264,7 +267,10 @@ + public static int main (string[] args) + { + Intl.setlocale (LocaleCategory.ALL, ""); +- Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); ++ ++ string p = Win32.get_package_installation_directory_of_module (null); ++ Intl.bindtextdomain (GETTEXT_PACKAGE, Path.build_filename (p, "share", "locale")); ++ + Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + Intl.textdomain (GETTEXT_PACKAGE); + +--- ./src/Makefile.am.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./src/Makefile.am 2015-04-15 21:58:52.638829100 +0200 +@@ -1,6 +1,10 @@ + bin_PROGRAMS = gnome-calculator gcalccmd + noinst_PROGRAMS = test-number test-equation test-serializer + ++# The valac command is always executed in the sources directory, not the build ++# directory. If $(top_srcdir) is used, it will be relative to the build directory. ++vapidir = ../vapi ++ + TESTS = test-number test-equation test-serializer + + AM_CPPFLAGS = \ +@@ -40,6 +44,7 @@ + function-manager.vala \ + math-function-popup.vala \ + math-history.vala \ ++ windows.c \ + $(BUILT_SOURCES) + + gnome_calculator_VALAFLAGS = \ +@@ -66,7 +71,8 @@ + serializer.vala \ + unit.vala \ + math-function.vala \ +- function-manager.vala ++ function-manager.vala \ ++ windows.c + + gcalccmd_VALAFLAGS = \ + --target-glib 2.32 \ +@@ -84,7 +90,8 @@ + mpfr.vapi \ + test-number.vala \ + number.vala \ +- serializer.vala ++ serializer.vala \ ++ windows.c + + test_number_VALAFLAGS = \ + --target-glib 2.32 \ +@@ -110,7 +117,8 @@ + serializer.vala \ + unit.vala \ + math-function.vala \ +- function-manager.vala ++ function-manager.vala \ ++ windows.c + + test_equation_VALAFLAGS = \ + --target-glib 2.32 \ +@@ -128,7 +136,8 @@ + mpfr.vapi \ + test-serializer.vala \ + number.vala \ +- serializer.vala ++ serializer.vala \ ++ windows.c + + test_serializer_VALAFLAGS = \ + --target-glib 2.32 \ +--- ./src/math-equation.vala.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./src/math-equation.vala 2015-04-15 21:58:52.645829600 +0200 +@@ -477,7 +477,8 @@ + get_bounds (out start, out end); + + var text = get_text (start, end, false); +- var tsep_string = Posix.nl_langinfo (Posix.NLItem.THOUSEP); ++ string tsep_string; ++ tsep_string = locale_get_tsep (); + if (tsep_string == null || tsep_string == "") + tsep_string = " "; + text = text.replace (tsep_string, ""); +--- ./src/serializer.vala.orig 2015-01-29 16:28:18.000000000 +0100 ++++ ./src/serializer.vala 2015-04-15 21:58:52.653830600 +0200 +@@ -9,6 +9,9 @@ + * license. + */ + ++extern string locale_get_tsep (); ++extern string locale_get_decimal (); ++ + public enum DisplayFormat + { + AUTOMATIC, +@@ -37,12 +40,15 @@ + + public Serializer (DisplayFormat format, int number_base, int trailing_digits) + { +- var radix_string = Posix.nl_langinfo (Posix.NLItem.RADIXCHAR); ++ string radix_string; ++ radix_string = locale_get_decimal (); + if (radix_string != null && radix_string != "") + radix = radix_string.locale_to_utf8 (-1, null, null).get_char (0); + else + radix = '.'; +- var tsep_string = Posix.nl_langinfo (Posix.NLItem.THOUSEP); ++ ++ string tsep_string; ++ tsep_string = locale_get_tsep (); + if (tsep_string != null && tsep_string != "") + tsep = tsep_string.locale_to_utf8 (-1, null, null).get_char (0); + else +--- ./src/windows.c.orig 2015-04-15 21:58:52.433817800 +0200 ++++ ./src/windows.c 2015-04-15 22:04:42.098180500 +0200 +@@ -1 +1,23 @@ ++#include ++#include ++ ++char * ++locale_get_tsep () ++{ ++ char tmp[4]; ++ ++ GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, (LPTSTR)&tmp, 4); ++ ++ return strdup(&tmp); ++} ++ ++char * ++locale_get_decimal () ++{ ++ char tmp[4]; ++ ++ GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPTSTR)&tmp, 4); ++ ++ return strdup(&tmp); ++} + diff --git a/mingw-w64-gnome-calculator/PKGBUILD b/mingw-w64-gnome-calculator/PKGBUILD new file mode 100644 index 0000000000..a4bc24f594 --- /dev/null +++ b/mingw-w64-gnome-calculator/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Andrea Zagli + +_realname=gnome-calculator +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.16.2 +pkgrel=1 +arch=('any') +pkgdesc="GNOME desktop calculator (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gtksourceview3" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-mpfr") +makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +license=("GPL 2") +url="http://www.gnome.org" +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('f4c6ca7e0eda0dbb7d5cfb85ee9fe3351b1d8bd1bf05ce890939374b95e230a0' + '7555c43e7b4aa3c6041f0c1641e96186adc02092cb0b5b83fb45f6276e271248') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + echo "" > src/windows.c + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + autoreconf -f -i +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-gnome-calculator/gnome-calculator-i686.install b/mingw-w64-gnome-calculator/gnome-calculator-i686.install new file mode 100644 index 0000000000..fcc957e480 --- /dev/null +++ b/mingw-w64-gnome-calculator/gnome-calculator-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/glib-compile-schemas mingw32/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-gnome-calculator/gnome-calculator-x86_64.install b/mingw-w64-gnome-calculator/gnome-calculator-x86_64.install new file mode 100644 index 0000000000..6bcf50799c --- /dev/null +++ b/mingw-w64-gnome-calculator/gnome-calculator-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/glib-compile-schemas mingw64/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-gnome-common/PKGBUILD b/mingw-w64-gnome-common/PKGBUILD index 1e2cdfa230..f6ea8ce367 100644 --- a/mingw-w64-gnome-common/PKGBUILD +++ b/mingw-w64-gnome-common/PKGBUILD @@ -1,17 +1,17 @@ # Maintainer: Alexey Pavlov _realname=gnome-common +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.18.0 pkgrel=1 pkgdesc="Common development macros for GNOME (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}-gnome") license=('GPL') url="http://www.gnome.org" -source=(http://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz +source=(http://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz Werror-format-remove.patch) -sha256sums=('4c00242f781bb441289f49dd80ed1d895d84de0c94bfc2c6818a104c9e39262c' +sha256sums=('22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf' 'c88704be75556c08a62645588ec70050f58def421f849c0519213c8709e36906') prepare() { @@ -30,5 +30,5 @@ build() { package() { cd "${srcdir}/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-adwaita-icon-theme/0001-localedir-fix.patch b/mingw-w64-gnome-icon-theme/0001-localedir-fix.patch similarity index 81% rename from mingw-w64-adwaita-icon-theme/0001-localedir-fix.patch rename to mingw-w64-gnome-icon-theme/0001-localedir-fix.patch index 6d5d1d8abd..a2a4b5f35e 100644 --- a/mingw-w64-adwaita-icon-theme/0001-localedir-fix.patch +++ b/mingw-w64-gnome-icon-theme/0001-localedir-fix.patch @@ -1,5 +1,48 @@ ---- a/m4/intltool.m4.orig 2014-08-15 23:20:04.371400000 +0400 -+++ b/m4/intltool.m4 2014-08-15 23:21:28.549000000 +0400 +--- a/configure.ac 2012-01-18 16:37:06 +0000 ++++ b/configure.ac 2013-05-12 17:12:40 +0000 +@@ -13,8 +13,6 @@ + + GETTEXT_PACKAGE="${PACKAGE}" + AC_SUBST(GETTEXT_PACKAGE) +-localedir='$(prefix)/$(DATADIRNAME)/locale' +-AC_SUBST(localedir) + + # Workaround to make aclocal get the right flags + AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") +--- a/po/Makefile.in.in 2012-01-18 16:37:06 +0000 ++++ b/po/Makefile.in.in 2013-05-12 17:12:40 +0000 +@@ -33,8 +33,7 @@ + datadir = @datadir@ + datarootdir = @datarootdir@ + libdir = @libdir@ +-DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +107,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +141,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot +--- a/m4/intltool.m4 2012-02-20 14:50:33 +0000 ++++ b/m4/intltool.m4 2013-05-12 17:12:40 +0000 @@ -155,31 +155,6 @@ # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) @@ -32,46 +75,3 @@ IT_PO_SUBDIR([po]) ]) ---- a/po/Makefile.in.in.orig 2014-08-15 23:15:13.750400000 +0400 -+++ b/po/Makefile.in.in 2014-08-15 23:19:03.934000000 +0400 -@@ -33,8 +33,7 @@ - datadir = @datadir@ - datarootdir = @datarootdir@ - libdir = @libdir@ --DATADIRNAME = @DATADIRNAME@ --itlocaledir = $(prefix)/$(DATADIRNAME)/locale -+localedir = @localedir@ - subdir = po - install_sh = @install_sh@ - # Automake >= 1.8 provides @mkdir_p@. -@@ -108,7 +107,7 @@ - install-data-yes: all - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ -- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ -+ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $$dir; \ - if test -r $$lang.gmo; then \ - $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ -@@ -142,8 +141,8 @@ - uninstall: - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ -- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ -- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ -+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ -+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ - done - - check: all $(GETTEXT_PACKAGE).pot ---- adwaita-icon-theme-3.14.0/configure.ac.orig 2014-09-23 20:09:21.907400000 +0500 -+++ adwaita-icon-theme-3.14.0/configure.ac 2014-09-23 20:09:35.666600000 +0500 -@@ -13,7 +13,7 @@ - - GETTEXT_PACKAGE="${PACKAGE}" - AC_SUBST(GETTEXT_PACKAGE) --localedir='$(prefix)/$(DATADIRNAME)/locale' -+localedir='$(datarootdir)/locale' - AC_SUBST(localedir) - - # Workaround to make aclocal get the right flags diff --git a/mingw-w64-gnome-icon-theme/PKGBUILD b/mingw-w64-gnome-icon-theme/PKGBUILD index 325795fe42..501c64c4da 100644 --- a/mingw-w64-gnome-icon-theme/PKGBUILD +++ b/mingw-w64-gnome-icon-theme/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=gnome-icon-theme - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.11.5 +pkgver=3.12.0 pkgrel=1 pkgdesc="GNOME icon theme (mingw-w64)" arch=('any') @@ -11,30 +10,36 @@ url="http://www.gnome.org" license=("GPL") makedepends=("intltool") depends=("${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" - "${MINGW_PACKAGE_PREFIX}-icon-naming-utils" - "${MINGW_PACKAGE_PREFIX}-gtk2" - "${MINGW_PACKAGE_PREFIX}-gnome-icon-theme-symbolic" - ) + "${MINGW_PACKAGE_PREFIX}-icon-naming-utils" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-gnome-icon-theme-symbolic") groups=("${MINGW_PACKAGE_PREFIX}-gnome") options=(!libtool strip staticlibs) install=theme-${CARCH}.install -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz) -sha256sums=('345dce06d4071f7c71b2659aa8834f70349a49fe8f91e6f0006606456dfeb230') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz + 0001-localedir-fix.patch) +sha256sums=('359e720b9202d3aba8d477752c4cd11eced368182281d51ffd64c8572b4e503a' + 'bf568bb64316cc225ea32e27193639c678973b5f2e66f697e794699af08c62f1') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-localedir-fix.patch + autoreconf -fiv +} build() { cd ${srcdir}/${_realname}-${pkgver} ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} + --host=${MINGW_CHOST} \ + --datarootdir=${MINGW_PREFIX}/share + make } package() { cd "${srcdir}/${_realname}-${pkgver}" make DESTDIR="$pkgdir" install - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib - mv ${pkgdir}${MINGW_PREFIX}/share/pkgconfig ${pkgdir}${MINGW_PREFIX}/lib/ - mv ${pkgdir}${MINGW_PREFIX}/lib/locale ${pkgdir}${MINGW_PREFIX}/share/ rm -f "${pkgdir}${MINGW_PREFIX}/share/icons/gnome/icon-theme.cache" } diff --git a/mingw-w64-gnome-icon-theme/theme-i686.install b/mingw-w64-gnome-icon-theme/theme-i686.install index 704dd942d0..a8e97e8ff2 100644 --- a/mingw-w64-gnome-icon-theme/theme-i686.install +++ b/mingw-w64-gnome-icon-theme/theme-i686.install @@ -1,5 +1,10 @@ post_install() { - mingw32/bin/gtk-update-icon-cache -q -t -f /mingw32/share/icons/gnome + [[ -f mingw32/bin/gtk-update-icon-cache.exe ]] && { + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/gnome + } + [[ -f mingw32/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/gnome + } } post_upgrade() { diff --git a/mingw-w64-gnome-icon-theme/theme-x86_64.install b/mingw-w64-gnome-icon-theme/theme-x86_64.install index c23e407459..a805535ee9 100644 --- a/mingw-w64-gnome-icon-theme/theme-x86_64.install +++ b/mingw-w64-gnome-icon-theme/theme-x86_64.install @@ -1,5 +1,10 @@ post_install() { - mingw64/bin/gtk-update-icon-cache -q -t -f /mingw64/share/icons/gnome + [[ -f mingw64/bin/gtk-update-icon-cache.exe ]] && { + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/gnome + } + [[ -f mingw64/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/gnome + } } post_upgrade() { diff --git a/mingw-w64-gnome-js-common/PKGBUILD b/mingw-w64-gnome-js-common/PKGBUILD index 0b458c6dfe..aacc6f44e2 100644 --- a/mingw-w64-gnome-js-common/PKGBUILD +++ b/mingw-w64-gnome-js-common/PKGBUILD @@ -1,7 +1,6 @@ # Maintainer: Alexey Pavlov _realname=gnome-js-common - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.1.2 pkgrel=1 @@ -9,7 +8,6 @@ pkgdesc="GNOME JavaScript common modules (mingw-w64)" url="http://live.gnome.org/Seed/" license=('GPL3') arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("intltool") source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/0.1/${_realname}-${pkgver}.tar.bz2) sha1sums=('f3771ad53e158443ffe84b5d86fb2ce73417a69d') @@ -21,7 +19,7 @@ prepare() { build() { mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} make } diff --git a/mingw-w64-gnonlin-git/PKGBUILD b/mingw-w64-gnonlin/PKGBUILD similarity index 60% rename from mingw-w64-gnonlin-git/PKGBUILD rename to mingw-w64-gnonlin/PKGBUILD index 5522ea46e2..99d91ba75c 100644 --- a/mingw-w64-gnonlin-git/PKGBUILD +++ b/mingw-w64-gnonlin/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Lubosz Sarnecki _realname=gnonlin -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.3.0.1.733.c91c4e4 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +pkgver=1.4.0 pkgrel=1 pkgdesc="GStreamer Non-Linear plugins (mingw-w64)" arch=('any') @@ -16,28 +15,15 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" depends=("${MINGW_PACKAGE_PREFIX}-gst-plugins-base" "${MINGW_PACKAGE_PREFIX}-gstreamer") options=(!libtool strip staticlibs) -source=("git://anongit.freedesktop.org/gstreamer/$_realname") -md5sums=('SKIP') - -pkgver() { - cd $_realname - version=$(grep AC_INIT configure.ac | sed 's/AC_INIT(GNonLin, //' | sed 's/,//') - hash=$(git log --pretty=format:'%h' -n 1) - revision=$(git rev-list --count HEAD) - echo $version.$revision.$hash -} - -prepare() { - cd $_realname - NOCONFIGURE=1 ./autogen.sh -} +source=("http://gstreamer.freedesktop.org/src/${_realname}/${_realname}-${pkgver}.tar.xz") +md5sums=('106899d1ee36e18f92bb838244d585eb') build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r "${srcdir}/${_realname}" "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + #cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -45,12 +31,13 @@ build() { --enable-shared \ --enable-silent-rules \ --disable-gtk-doc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gnu-cobol-svn/PKGBUILD b/mingw-w64-gnu-cobol-svn/PKGBUILD index aefb8324c5..bb78ab193e 100644 --- a/mingw-w64-gnu-cobol-svn/PKGBUILD +++ b/mingw-w64-gnu-cobol-svn/PKGBUILD @@ -2,38 +2,34 @@ # Contributor: Jürgen Pfeifer _realname=gnu-cobol - pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}-svn -pkgrel=1 -pkgver=r275 -pkgdesc="GNU Cobol is a free, modern COBOL compiler" +_base_ver=2.0 +pkgver=2.0.r599 +pkgrel=2 +pkgdesc="GNU Cobol is a free, modern COBOL compiler (mingw-w64)" arch=('any') provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") url="http://sourceforge.net/projects/open-cobol/" options=('strip') license=('GPL' 'LGPL') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("subversion" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-libiconv") -depends=("${MINGW_PACKAGE_PREFIX}-db" - "${MINGW_PACKAGE_PREFIX}-gmp" - "${MINGW_PACKAGE_PREFIX}-ncurses") -source=("$_realname::svn+http://svn.code.sf.net/p/open-cobol/code/branches/gnu-cobol-2.0" - fix-including-headers.patch) -md5sums=('SKIP' - '6f8310009330fc0b5fba616cfab5c07b') + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libiconv") +depends=("${MINGW_PACKAGE_PREFIX}-db" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-ncurses") +source=("${_realname}::svn+http://svn.code.sf.net/p/open-cobol/code/branches/gnu-cobol-2.0") +md5sums=('SKIP') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" local ver="$(svnversion)" - printf "r%s" "${ver//[[:alpha:]]}" + printf "%s.r%s" "${_base_ver}" "${ver//[[:alpha:]]}" } prepare() { cd ${srcdir}/${_realname} - patch -p1 -i ${srcdir}/fix-including-headers.patch autoreconf -fi } @@ -41,7 +37,7 @@ build() { export lt_cv_deplibs_check_method='pass_all' # libncurses [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - ../$_realname/configure \ + ../${_realname}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -51,14 +47,15 @@ build() { --enable-shared \ --enable-static \ --disable-rpath - make + + make -j1 } package() { cd ${srcdir}/build-${CARCH} - make DESTDIR="$pkgdir" install - - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + make DESTDIR="${pkgdir}" install + + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} cp -pf ${srcdir}/${_realname}/COPYING* \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} } diff --git a/mingw-w64-gnu-cobol-svn/fix-including-headers.patch b/mingw-w64-gnu-cobol-svn/fix-including-headers.patch deleted file mode 100644 index 08761d21e1..0000000000 --- a/mingw-w64-gnu-cobol-svn/fix-including-headers.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- gnu-cobol/extras/Makefile.am.orig 2014-04-04 23:43:39.838600000 +0400 -+++ gnu-cobol/extras/Makefile.am 2014-04-05 00:07:39.107200000 +0400 -@@ -26,5 +26,5 @@ - - CBL_OC_DUMP.$(COB_MODULE_EXT): CBL_OC_DUMP.cob $(top_builddir)/cobc/cobc - . $(top_builddir)/tests/atconfig; . $(top_builddir)/tests/atlocal; \ -- cobc -m -Wall -std=mf -O $(top_srcdir)/extras/CBL_OC_DUMP.cob -+ cobc -m -Wall -std=mf -I$(top_srcdir) -O $(top_srcdir)/extras/CBL_OC_DUMP.cob - diff --git a/mingw-w64-gnupg/01-mingw32-fix-potomo.mingw.patch b/mingw-w64-gnupg/01-mingw32-fix-potomo.mingw.patch new file mode 100644 index 0000000000..74e9583ae1 --- /dev/null +++ b/mingw-w64-gnupg/01-mingw32-fix-potomo.mingw.patch @@ -0,0 +1,11 @@ +--- gnupg-2.1.3/build-aux/potomo 2015-04-30 18:27:58 +0400 ++++ gnupg-2.1.3/build-aux/potomo 2015-04-30 15:05:06 +0400 +@@ -57,7 +57,7 @@ + ;; + *) + echo "potomo: '$infile' converting from $fromset to utf-8" >&2 +- iconv --silent --from-code=$fromset --to-code=utf-8 < "$infile" |\ ++ iconv -s --from-code=$fromset --to-code=utf-8 < "$infile" |\ + sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=utf-8/"|\ + msgfmt --output-file="$outfile" - + ;; diff --git a/mingw-w64-gnupg/02-mingw-sysconfigdir-under-prefix.patch b/mingw-w64-gnupg/02-mingw-sysconfigdir-under-prefix.patch new file mode 100644 index 0000000000..871a7e0651 --- /dev/null +++ b/mingw-w64-gnupg/02-mingw-sysconfigdir-under-prefix.patch @@ -0,0 +1,29 @@ +--- gnupg-2.1.6/common/homedir.c.orig 2015-07-31 11:43:08.996759600 +0300 ++++ gnupg-2.1.6/common/homedir.c 2015-07-31 11:57:22.125438200 +0300 +@@ -260,6 +260,9 @@ + log_error ("required binary '%s' is not installed\n", fname); + else + { ++#ifdef __MINGW32__ ++ w32_portable_app = 1; ++#else + strcpy (fname + strlen (fname) - 3, "ctl"); + if (!access (fname, F_OK)) + { +@@ -273,6 +276,7 @@ + /* FIXME: We should read the file to detect special flags + and print a warning if we don't understand them */ + } ++#endif + } + xfree (fname); + } +@@ -384,7 +388,7 @@ + if (!name) + { + const char *s1, *s2; +- s1 = w32_commondir (); ++ s1 = w32_rootdir (); + s2 = DIRSEP_S "etc" DIRSEP_S "gnupg"; + name = xmalloc (strlen (s1) + strlen (s2) + 1); + strcpy (stpcpy (name, s1), s2); diff --git a/mingw-w64-gnupg/03-ldap-libraries-check-order.patch b/mingw-w64-gnupg/03-ldap-libraries-check-order.patch new file mode 100644 index 0000000000..062a6a0649 --- /dev/null +++ b/mingw-w64-gnupg/03-ldap-libraries-check-order.patch @@ -0,0 +1,11 @@ +--- gnupg-2.1.6/m4/ldap.m4.orig 2015-07-31 12:17:00.169622000 +0300 ++++ gnupg-2.1.6/m4/ldap.m4 2015-07-31 12:17:29.495689100 +0300 +@@ -34,7 +34,7 @@ + _ldap_save_ldflags=$LDFLAGS + LDFLAGS="${LDAP_LDFLAGS} ${LDFLAGS}" + +- for MY_LDAPLIBS in ${LDAPLIBS+"$LDAPLIBS"} "-lldap" "-lldap -llber" "-lldap -llber -lresolv" "-lwldap32"; do ++ for MY_LDAPLIBS in ${LDAPLIBS+"$LDAPLIBS"} "-lwldap32" "-lldap" "-lldap -llber" "-lldap -llber -lresolv"; do + _ldap_save_libs=$LIBS + LIBS="$MY_LDAPLIBS $1 $LIBS" + diff --git a/mingw-w64-gnupg/04-dos-extra-defs.patch b/mingw-w64-gnupg/04-dos-extra-defs.patch new file mode 100644 index 0000000000..b2ff631777 --- /dev/null +++ b/mingw-w64-gnupg/04-dos-extra-defs.patch @@ -0,0 +1,71 @@ +--- gnupg-2.1.6/configure.ac.orig 2015-07-31 13:32:15.206073200 +0300 ++++ gnupg-2.1.6/configure.ac 2015-07-31 13:32:25.944999200 +0300 +@@ -468,27 +468,6 @@ + #define GNUPG_PRIVATE_KEYS_DIR "private-keys-v1.d" + #define GNUPG_OPENPGP_REVOC_DIR "openpgp-revocs.d" + +-/* For some systems (DOS currently), we hardcode the path here. For +- POSIX systems the values are constructed by the Makefiles, so that +- the values may be overridden by the make invocations; this is to +- comply with the GNU coding standards. Note that these values are +- only defaults. */ +-#ifdef HAVE_DOSISH_SYSTEM +-# ifdef HAVE_DRIVE_LETTERS +-# define GNUPG_BINDIR "c:\\gnupg" +-# define GNUPG_LIBEXECDIR "c:\\gnupg" +-# define GNUPG_LIBDIR "c:\\gnupg" +-# define GNUPG_DATADIR "c:\\gnupg" +-# define GNUPG_SYSCONFDIR "c:\\gnupg" +-# else +-# define GNUPG_BINDIR "\\gnupg" +-# define GNUPG_LIBEXECDIR "\\gnupg" +-# define GNUPG_LIBDIR "\\gnupg" +-# define GNUPG_DATADIR "\\gnupg" +-# define GNUPG_SYSCONFDIR "\\gnupg" +-# endif +-#endif +- + /* Derive some other constants. */ + #if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID)) + #define EXEC_TEMPFILE_ONLY +--- gnupg-2.1.6/am/cmacros.am.orig 2015-07-31 13:41:32.741314100 +0300 ++++ gnupg-2.1.6/am/cmacros.am 2015-07-31 13:41:49.626625400 +0300 +@@ -22,14 +22,12 @@ + # platform to create source files. + AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\" + +-if ! HAVE_DOSISH_SYSTEM + AM_CPPFLAGS += -DGNUPG_BINDIR="\"$(bindir)\"" \ + -DGNUPG_LIBEXECDIR="\"$(libexecdir)\"" \ + -DGNUPG_LIBDIR="\"$(libdir)/@PACKAGE@\"" \ + -DGNUPG_DATADIR="\"$(datadir)/@PACKAGE@\"" \ + -DGNUPG_SYSCONFDIR="\"$(sysconfdir)/@PACKAGE@\"" \ + -DGNUPG_LOCALSTATEDIR="\"$(localstatedir)\"" +-endif + + + # If a specific protect tool program has been defined, pass its name +--- gnupg-2.1.6/doc/mkdefsinc.c.orig 2015-07-31 13:44:21.170469500 +0300 ++++ gnupg-2.1.6/doc/mkdefsinc.c 2015-07-31 13:44:29.263660100 +0300 +@@ -31,21 +31,6 @@ + #include "config.h" + /* When building for Windows the -D macros do not have appropriate + values. We provide replacements here. */ +-#ifdef HAVE_W32_SYSTEM +-# undef GNUPG_BINDIR +-# undef GNUPG_LIBEXECDIR +-# undef GNUPG_LIBDIR +-# undef GNUPG_DATADIR +-# undef GNUPG_SYSCONFDIR +-# undef GNUPG_LOCALSTATEDIR +-# define GNUPG_BINDIR "INSTDIR/bin" +-# define GNUPG_LIBEXECDIR "INSTDIR/bin" +-# define GNUPG_LIBDIR "INSTDIR/lib/" PACKAGE_NAME +-# define GNUPG_DATADIR "INSTDIR/share/" PACKAGE_NAME +-# define GNUPG_SYSCONFDIR "APPDATA/GNU/etc/" PACKAGE_NAME +-# define GNUPG_LOCALSTATEDIR "APPDATA/GNU" +-#endif /*HAVE_W32_SYSTEM*/ +- + + static int verbose; + diff --git a/mingw-w64-gnupg/05-mingw-relocation.patch b/mingw-w64-gnupg/05-mingw-relocation.patch new file mode 100644 index 0000000000..1d99107e3e --- /dev/null +++ b/mingw-w64-gnupg/05-mingw-relocation.patch @@ -0,0 +1,794 @@ +--- gnupg-2.1.6/common/pathtools.h.orig 1970-01-01 03:00:00.000000000 +0300 ++++ gnupg-2.1.6/common/pathtools.h 2015-03-25 12:39:25.647037500 +0300 +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ +--- gnupg-2.1.6/common/pathtools.c.orig 1970-01-01 03:00:00.000000000 +0300 ++++ gnupg-2.1.6/common/pathtools.c 2015-03-25 12:39:25.646037600 +0300 +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +--- gnupg-2.1.6/common/homedir.c.orig 2015-07-31 13:49:13.367246900 +0300 ++++ gnupg-2.1.6/common/homedir.c 2015-07-31 14:02:14.553120500 +0300 +@@ -57,6 +57,7 @@ + + #include "util.h" + #include "sysutils.h" ++#include "pathtools.h" + + #ifdef HAVE_W32_SYSTEM + /* A flag used to indicate that a control file for gpgconf has been +@@ -151,7 +152,7 @@ + const char * + standard_homedir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static const char *dir; + + if (!dir) +@@ -192,7 +193,7 @@ + } + return dir; + #else/*!HAVE_W32_SYSTEM*/ +- return GNUPG_DEFAULT_HOMEDIR; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_DEFAULT_HOMEDIR); + #endif /*!HAVE_W32_SYSTEM*/ + } + +@@ -211,7 +212,7 @@ + #endif /*HAVE_W32_SYSTEM*/ + + dir = getenv ("GNUPGHOME"); +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + if (!dir || !*dir) + { + static const char *saved_dir; +@@ -241,7 +242,7 @@ + } + #endif /*HAVE_W32_SYSTEM*/ + if (!dir || !*dir) +- dir = GNUPG_DEFAULT_HOMEDIR; ++ dir = single_path_relocation(GNUPG_BINDIR, GNUPG_DEFAULT_HOMEDIR); + + return dir; + } +@@ -331,7 +332,7 @@ + if (*dir) + return dir; + /* Fallback to the hardwired value. */ +- return GNUPG_LIBEXECDIR; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_LIBEXECDIR); + } + + static const char * +@@ -382,7 +383,7 @@ + const char * + gnupg_sysconfdir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static char *name; + + if (!name) +@@ -395,7 +396,7 @@ + } + return name; + #else /*!HAVE_W32_SYSTEM*/ +- return GNUPG_SYSCONFDIR; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_SYSCONFDIR); + #endif /*!HAVE_W32_SYSTEM*/ + } + +@@ -409,7 +410,7 @@ + if (!name) + name = xstrconcat (w32_rootdir (), DIRSEP_S "bin", NULL); + return name; +-#elif defined(HAVE_W32_SYSTEM) ++#elif defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + const char *rdir; + + rdir = w32_rootdir (); +@@ -424,7 +425,7 @@ + else + return rdir; + #else /*!HAVE_W32_SYSTEM*/ +- return GNUPG_BINDIR; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_BINDIR); + #endif /*!HAVE_W32_SYSTEM*/ + } + +@@ -434,7 +435,7 @@ + const char * + gnupg_libexecdir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + return gnupg_bindir (); + #else /*!HAVE_W32_SYSTEM*/ + return GNUPG_LIBEXECDIR; +@@ -444,28 +445,28 @@ + const char * + gnupg_libdir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static char *name; + + if (!name) + name = xstrconcat (w32_rootdir (), DIRSEP_S "lib" DIRSEP_S "gnupg", NULL); + return name; + #else /*!HAVE_W32_SYSTEM*/ +- return GNUPG_LIBDIR; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_LIBDIR); + #endif /*!HAVE_W32_SYSTEM*/ + } + + const char * + gnupg_datadir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static char *name; + + if (!name) + name = xstrconcat (w32_rootdir (), DIRSEP_S "share" DIRSEP_S "gnupg", NULL); + return name; + #else /*!HAVE_W32_SYSTEM*/ +- return GNUPG_DATADIR; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_DATADIR); + #endif /*!HAVE_W32_SYSTEM*/ + } + +@@ -473,7 +474,7 @@ + const char * + gnupg_localedir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static char *name; + + if (!name) +@@ -481,7 +482,7 @@ + NULL); + return name; + #else /*!HAVE_W32_SYSTEM*/ +- return LOCALEDIR; ++ return single_path_relocation(GNUPG_BINDIR, LOCALEDIR); + #endif /*!HAVE_W32_SYSTEM*/ + } + +@@ -492,7 +493,7 @@ + const char * + gnupg_cachedir (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static const char *dir; + + if (!dir) +@@ -549,7 +550,7 @@ + } + return dir; + #else /*!HAVE_W32_SYSTEM*/ +- return GNUPG_LOCALSTATEDIR "/cache/" PACKAGE_NAME; ++ return single_path_relocation(GNUPG_BINDIR, GNUPG_LOCALSTATEDIR "/cache/" PACKAGE_NAME); + #endif /*!HAVE_W32_SYSTEM*/ + } + +@@ -558,7 +559,7 @@ + const char * + dirmngr_sys_socket_name (void) + { +-#ifdef HAVE_W32_SYSTEM ++#if defined(HAVE_W32_SYSTEM) && !defined(__MINGW32__) + static char *name; + + if (!name) +@@ -594,7 +595,7 @@ + } + return name; + #else /*!HAVE_W32_SYSTEM*/ +- return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/"DIRMNGR_SOCK_NAME; ++ return single_path_relocation(GNUPG_BINDIR, "/run/" PACKAGE_NAME "/"DIRMNGR_SOCK_NAME); + #endif /*!HAVE_W32_SYSTEM*/ + } + +--- gnupg-2.1.6/common/Makefile.am.orig 2015-07-31 14:04:15.060068600 +0300 ++++ gnupg-2.1.6/common/Makefile.am 2015-07-31 14:04:49.048669400 +0300 +@@ -62,6 +62,7 @@ + init.c init.h \ + sexputil.c \ + sysutils.c sysutils.h \ ++ pathtools.c pathtools.h \ + homedir.c \ + gettime.c gettime.h \ + yesno.c \ diff --git a/mingw-w64-gnupg/PKGBUILD b/mingw-w64-gnupg/PKGBUILD index 4f4c9e9d57..28f167b1d0 100644 --- a/mingw-w64-gnupg/PKGBUILD +++ b/mingw-w64-gnupg/PKGBUILD @@ -1,66 +1,78 @@ # Maintainer: Alexey Pavlov -# uncomment patch fix_seat_check_on_windows.patch to compile on windows -# requires unix2dos (installed using pacman -S dos2unix) - _realname=gnupg +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.18 +pkgver=2.1.9 pkgrel=1 pkgdesc="GNU Privacy Guard - a PGP replacement tool (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") -depends=("${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-libksba" - "${MINGW_PACKAGE_PREFIX}-libgcrypt" - "${MINGW_PACKAGE_PREFIX}-libassuan" - "${MINGW_PACKAGE_PREFIX}-libgnurx" - "${MINGW_PACKAGE_PREFIX}-w32pth") +depends=("${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-libksba" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-libassuan" + "${MINGW_PACKAGE_PREFIX}-libsystre" + "${MINGW_PACKAGE_PREFIX}-libusb-compat" + "${MINGW_PACKAGE_PREFIX}-npth" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("texinfo" "${MINGW_PACKAGE_PREFIX}-gcc") +# REMOVE openldap package before build license=('GPL') +options=(emptydirs) url="http://www.gnupg.org/" -source=(ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-$pkgver.tar.bz2{,.sig} - gnupg-1.4.15-libiconv-dll.patch - fix_seat_check_on_windows.patch) -sha1sums=('41462d1a97f91abc16a0031b5deadc3095ce88ae' +source=(ftp://ftp.gnupg.org/gcrypt/gnupg/${_realname}-${pkgver}.tar.bz2{,.sig} + 01-mingw32-fix-potomo.mingw.patch + 02-mingw-sysconfigdir-under-prefix.patch + 03-ldap-libraries-check-order.patch + 04-dos-extra-defs.patch) +sha1sums=('119bab38d2ff3a849be62914be9bf7333da68883' 'SKIP' - '2ea46a1c24a30016e21b9f16e324798ec2b54d98' - 'a8eb0dec2ca2d23d9fcb4efba9b09ef6724cf053') + 'adca40b456c054db3aae5f112e18f56235322a45' + 'e55b64ef1b1d9e0a224c2b8716d7a490aed6070d' + '18634884e51f93b62a6c8b75233d175ec455f033' + 'afe4c750932c122d7dc182e7a136147f63d1c211') prepare() { - cd "${srcdir}"/gnupg-${pkgver} - patch -p1 -i ${srcdir}/gnupg-1.4.15-libiconv-dll.patch -# patch -p1 -i ../fix_seat_check_on_windows.patch + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/01-mingw32-fix-potomo.mingw.patch + patch -p1 -i ${srcdir}/02-mingw-sysconfigdir-under-prefix.patch + patch -p1 -i ${srcdir}/03-ldap-libraries-check-order.patch + patch -p1 -i ${srcdir}/04-dos-extra-defs.patch - #./autogen.sh - # libtoolize --copy --force - # aclocal -I m4 -I gl/m4 - # automake --add-missing - # autoconf + autoreconf -fiv } build() { - mkdir -p "${srcdir}/gnupg-${pkgver}-build-${CARCH}" - cd "${srcdir}/gnupg-${pkgver}-build-${CARCH}" - "${srcdir}"/gnupg-${pkgver}/configure \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --libexecdir=${MINGW_PREFIX}/lib + --libexecdir=${MINGW_PREFIX}/bin \ + --sbindir=${MINGW_PREFIX}/bin \ + --sysconfdir=${MINGW_PREFIX}/etc/gnupg \ + --enable-maintainer-mode \ + --disable-symcryptrun \ + --enable-gpgtar \ + --disable-g13 + MSYS2_ARG_CONF_EXCL="-DGNUPG_BINDIR=;-DGNUPG_LIBEXECDIR=;-DGNUPG_LIBDIR=;-DGNUPG_DATADIR=;-DGNUPG_SYSCONFDIR=;-DGNUPG_LOCALSTATEDIR=;-DLOCALEDIR=" \ make } check() { - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "${srcdir}/gnupg-${pkgver}-build-${CARCH}" - make DESTDIR=${pkgdir} install - # move conflicting files - #mv ${pkgdir}${MINGW_PREFIX}/share/gnupg{,2} + cd "${srcdir}/build-${MINGW_CHOST}" + MSYS2_ARG_CONF_EXCL="-DGNUPG_BINDIR=;-DGNUPG_LIBEXECDIR=;-DGNUPG_LIBDIR=;-DGNUPG_DATADIR=;-DGNUPG_SYSCONFDIR=;-DGNUPG_LOCALSTATEDIR=;-DLOCALEDIR=" \ + make -j1 DESTDIR=${pkgdir} install + + mkdir -p ${pkgdir}${MINGW_PREFIX}/{etc/gnupg,var/cache/gnupg,home} } diff --git a/mingw-w64-gnupg/fix_seat_check_on_windows.patch b/mingw-w64-gnupg/fix_seat_check_on_windows.patch deleted file mode 100644 index 12ea83dc16..0000000000 --- a/mingw-w64-gnupg/fix_seat_check_on_windows.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/checks/seat.test.orig b/checks/seat.test -index 72ab27f..6dbb542 100755 ---- a/checks/seat.test.orig -+++ b/checks/seat.test -@@ -6,6 +6,8 @@ for i in $plain_files ; do - echo "$usrpass1" | $GPG --passphrase-fd 0 --always-trust -seat \ - -r two -o x --yes $i - $GPG -o y --yes x -- cmp $i y || error "$i: mismatch" -+ cp $i z -+ unix2dos z -+ cmp z y || error "$i: mismatch" - done - diff --git a/mingw-w64-gnupg/gnupg-1.4.15-libiconv-dll.patch b/mingw-w64-gnupg/gnupg-1.4.15-libiconv-dll.patch deleted file mode 100644 index 3817bbc344..0000000000 --- a/mingw-w64-gnupg/gnupg-1.4.15-libiconv-dll.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- gnupg-1.4.15/util/strgutil.c.orig 2013-11-30 23:43:22.412000000 +0400 -+++ gnupg-1.4.15/util/strgutil.c 2013-11-30 23:43:59.368400000 +0400 -@@ -138,7 +138,7 @@ - done = 1; /* Do it right now because we might get called recursivly - through gettext. */ - -- handle = dlopen ("iconv.dll", RTLD_LAZY); -+ handle = dlopen ("libiconv-2.dll", RTLD_LAZY); - if (handle) - { - iconv_open = dlsym (handle, "libiconv_open"); -@@ -150,7 +150,7 @@ - if (!handle || !iconv_close) - { - log_info (_("error loading `%s': %s\n"), -- "iconv.dll", dlerror ()); -+ "libiconv-2.dll", dlerror ()); - log_info(_("please see http://www.gnupg.org/download/iconv.html " - "for more information\n")); - iconv_open = NULL; diff --git a/mingw-w64-gnutls/0001-add-missing-define.patch b/mingw-w64-gnutls/0001-add-missing-define.patch new file mode 100644 index 0000000000..b76a180d40 --- /dev/null +++ b/mingw-w64-gnutls/0001-add-missing-define.patch @@ -0,0 +1,11 @@ +--- gnutls-3.4.0/lib/includes/gnutls/gnutls.h.in.orig 2015-04-09 23:38:42.018400000 +0300 ++++ gnutls-3.4.0/lib/includes/gnutls/gnutls.h.in 2015-04-09 23:39:31.860400000 +0300 +@@ -67,6 +67,8 @@ + #define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC + #define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128 + ++#define GNUTLS_INTERNAL_BUILD 1 ++ + #if !defined(GNUTLS_INTERNAL_BUILD) && defined(_WIN32) + # define _SYM_EXPORT __declspec(dllimport) + #else diff --git a/mingw-w64-gnutls/0002-gnutls-3.4.7-socket.patch b/mingw-w64-gnutls/0002-gnutls-3.4.7-socket.patch new file mode 100644 index 0000000000..2542092053 --- /dev/null +++ b/mingw-w64-gnutls/0002-gnutls-3.4.7-socket.patch @@ -0,0 +1,22 @@ +--- a/src/socket.c 2015-11-08 02:31:10.000000000 -0600 ++++ b/src/socket.c 2015-11-25 10:04:39.287828945 -0600 +@@ -263,7 +263,9 @@ + if (s != NULL) { + return s->s_port; + } ++#ifndef _WIN32 + endservent(); ++#endif + + return 443; + } +@@ -278,7 +280,9 @@ + if (s != NULL) { + return s->s_name; + } ++#ifndef _WIN32 + endservent(); ++#endif + + return "443"; + } diff --git a/mingw-w64-gnutls/0003-gnutls-fix-external-libtasn1-detection.patch b/mingw-w64-gnutls/0003-gnutls-fix-external-libtasn1-detection.patch new file mode 100644 index 0000000000..bde1d2f529 --- /dev/null +++ b/mingw-w64-gnutls/0003-gnutls-fix-external-libtasn1-detection.patch @@ -0,0 +1,11 @@ +--- a/extra/Makefile.in.orig 2013-02-03 19:40:27.000000000 -0600 ++++ b/extra/Makefile.in 2013-02-06 23:08:54.619176090 -0600 +@@ -76,7 +76,7 @@ + @ENABLE_MINITASN1_TRUE@am__append_1 = -I$(srcdir)/../lib/minitasn1 + @ENABLE_OPENSSL_TRUE@am__append_2 = -version-info $(LT_SSL_CURRENT):$(LT_SSL_REVISION):$(LT_SSL_AGE) + @ENABLE_MINITASN1_TRUE@@ENABLE_OPENSSL_TRUE@am__append_3 = ../lib/minitasn1/libminitasn1.la +-@ENABLE_MINITASN1_FALSE@@ENABLE_OPENSSL_TRUE@am__append_4 = $(LTLIBTASN1) ++@ENABLE_MINITASN1_FALSE@@ENABLE_OPENSSL_TRUE@am__append_4 = $(LIBTASN1_LIBS) + @ENABLE_OPENSSL_TRUE@@HAVE_LD_OUTPUT_DEF_TRUE@am__append_5 = \ + @ENABLE_OPENSSL_TRUE@@HAVE_LD_OUTPUT_DEF_TRUE@ -Wl,--output-def,libgnutls-openssl-$(DLL_VERSION).def + diff --git a/mingw-w64-gnutls/0004-fix-gtkdoc.all.patch b/mingw-w64-gnutls/0004-fix-gtkdoc.all.patch deleted file mode 100644 index e76aabdabf..0000000000 --- a/mingw-w64-gnutls/0004-fix-gtkdoc.all.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnutls-3.1.5/gtk-doc.make.orig 2013-04-12 15:09:23 +0400 -+++ gnutls-3.1.5/gtk-doc.make 2013-04-16 20:16:02 +0400 -@@ -92,7 +92,7 @@ - - #### scan #### - --scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) -+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) setup-build.stamp - @echo ' DOC Scanning header files' - @_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ diff --git a/mingw-w64-gnutls/0005-fix-strtok-conflict.mingw.patch b/mingw-w64-gnutls/0005-fix-strtok-conflict.mingw.patch deleted file mode 100644 index 9d55709ef0..0000000000 --- a/mingw-w64-gnutls/0005-fix-strtok-conflict.mingw.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- gnutls-3.1.5/gl/m4/strtok_r.m4.orig 2013-05-03 03:34:40 +0400 -+++ gnutls-3.1.5/gl/m4/strtok_r.m4 2013-05-03 04:34:01 +0400 -@@ -13,6 +13,7 @@ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS([strtok_r]) -+ ac_cv_func_strtok_r=yes - if test $ac_cv_func_strtok_r = yes; then - HAVE_STRTOK_R=1 - dnl glibc 2.7 has a bug in strtok_r that causes a segmentation fault ---- gnutls-3.1.5/lib/verify-tofu.c.orig 2013-05-03 04:35:09 +0400 -+++ gnutls-3.1.5/lib/verify-tofu.c 2013-05-03 05:21:50 +0400 -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - struct gnutls_tdb_int { - gnutls_tdb_store_func store; diff --git a/mingw-w64-gnutls/PKGBUILD b/mingw-w64-gnutls/PKGBUILD index f8f381af80..d673d4487a 100644 --- a/mingw-w64-gnutls/PKGBUILD +++ b/mingw-w64-gnutls/PKGBUILD @@ -1,64 +1,75 @@ # Maintainer: Alexey Pavlov _realname=gnutls +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.3.10 -pkgrel=2 +pkgver=3.4.7 +pkgrel=1 pkgdesc="A library which provides a secure layer over a reliable transport layer (mingw-w64)" arch=('any') license=('GPL3' 'LGPL2.1') url="http://www.gnutls.org/" options=('!zipman') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libtasn1" - "${MINGW_PACKAGE_PREFIX}-gmp" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-nettle" - "${MINGW_PACKAGE_PREFIX}-p11-kit" - "${MINGW_PACKAGE_PREFIX}-libgnurx" - #"${MINGW_PACKAGE_PREFIX}-unbound" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-libsystre" + "${MINGW_PACKAGE_PREFIX}-libtasn1" + "${MINGW_PACKAGE_PREFIX}-nettle>=3.1" + "${MINGW_PACKAGE_PREFIX}-p11-kit>=0.23.1" + "${MINGW_PACKAGE_PREFIX}-zlib" + #"${MINGW_PACKAGE_PREFIX}-unbound" ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -source=(ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/${_realname}-${pkgver}.tar.xz{,.sig} - 0004-fix-gtkdoc.all.patch - 0005-fix-strtok-conflict.mingw.patch) -md5sums=('c0a72b2c0553fe1c4992e30835808012' +# Need remove "autogen" package before building. +source=(ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*}/${_realname}-${pkgver}.tar.xz{,.sig} + 0001-add-missing-define.patch + 0002-gnutls-3.4.7-socket.patch + 0003-gnutls-fix-external-libtasn1-detection.patch) +md5sums=('e7556cec73c8b34fd2ff0b591e24e44c' 'SKIP' - '86cfab6e7c2ccfcfd1dad9d5024627e3' - '77287dc835afbb8cc4e9c4aa6b7adb7b') + '807a79513358a9f4123f62111f1eed59' + 'f23446753bbf74305257fa5aa594ec7f' + '92acc314feaa91e32d69a1a5bf0e279c') +validpgpkeys=('0424D4EE81A0E3D119C6F835EDA21E94B565716F') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - #patch -p1 -i ${srcdir}/0004-fix-gtkdoc.all.patch - #patch -p1 -i ${srcdir}/0005-fix-strtok-conflict.mingw.patch + patch -p1 -i ${srcdir}/0001-add-missing-define.patch + patch -p1 -i ${srcdir}/0002-gnutls-3.4.7-socket.patch + patch -p1 -i ${srcdir}/0003-gnutls-fix-external-libtasn1-detection.patch - #WANT_AUTOMAKE=latest autoreconf -fi -I m4 + WANT_AUTOMAKE=latest autoreconf -fi -I m4 } build() { - # Woraround for localtime_r functions - #CFLAGS+=" -DGNULIB_PORTCHECK=1" - #CXXFLAGS+=" -DGNULIB_PORTCHECK=1" + # Workaround for localtime_r functions + CFLAGS+=" -D_POSIX_C_SOURCE" + CXXFLAGS+=" -D_POSIX_C_SOURCE" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --with-zlib \ - --enable-shared --disable-static \ + --enable-shared --enable-static \ --enable-cxx \ --enable-nls \ --disable-rpath \ --disable-gtk-doc \ --with-libiconv-prefix=${MINGW_PREFIX} \ - --with-libregex-libs=-lgnurx \ + --with-libregex-libs=-lsystre \ --enable-local-libopts \ --disable-guile \ --disable-libdane \ + --disable-tests \ gl_cv_double_slash_root=yes + make } diff --git a/mingw-w64-go/0001-run-proper-go.path b/mingw-w64-go/0001-run-proper-go.path new file mode 100644 index 0000000000..63e4662b10 --- /dev/null +++ b/mingw-w64-go/0001-run-proper-go.path @@ -0,0 +1,11 @@ +--- go.orig/src/cmd/dist/buildtool.go 2015-09-08 21:24:01.000000000 -0400 ++++ go/src/cmd/dist/buildtool.go 2015-09-12 11:34:53.808544100 -0400 +@@ -108,7 +108,7 @@ + os.Setenv("GOHOSTARCH", "") + + // Run Go 1.4 to build binaries. +- run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-v", "bootstrap/...") ++ run(workspace, ShowOutput|CheckExit, "go", "install", "-v", "bootstrap/...") + + // Copy binaries into tool binary directory. + for _, name := range bootstrapDirs { diff --git a/mingw-w64-go/0002-run-proper-go.path b/mingw-w64-go/0002-run-proper-go.path new file mode 100644 index 0000000000..a475d7b8e4 --- /dev/null +++ b/mingw-w64-go/0002-run-proper-go.path @@ -0,0 +1,28 @@ +--- go.org/src/make.bat 2015-09-08 21:24:02.000000000 -0400 ++++ go/src/make.bat 2015-09-12 14:22:08.562197600 -0400 +@@ -59,13 +59,13 @@ + echo ##### Building Go bootstrap tool. + echo cmd/dist + if not exist ..\bin\tool mkdir ..\bin\tool +-if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4 +-if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail ++ ++if not exist "%GOROOT_BOOTSTRAP%\..\..\bin\go.exe" goto bootstrapfail + setlocal + set GOROOT=%GOROOT_BOOTSTRAP% + set GOOS= + set GOARCH= +-"%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist ++go build -o cmd\dist\dist.exe .\cmd\dist + endlocal + if errorlevel 1 goto fail + .\cmd\dist\dist env -w -p >env.bat +@@ -123,7 +123,7 @@ + goto end + + :bootstrapfail +-echo ERROR: Cannot find %GOROOT_BOOTSTRAP%\bin\go.exe ++echo ERROR: Cannot find go.exe + echo "Set GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." + + :fail diff --git a/mingw-w64-go/PKGBUILD b/mingw-w64-go/PKGBUILD index 7c47f81269..9824290c39 100644 --- a/mingw-w64-go/PKGBUILD +++ b/mingw-w64-go/PKGBUILD @@ -1,42 +1,93 @@ # Maintainer: Martell Malone < martell malone at g mail dot com > _realname=go - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.3.3 +pkgver=1.5.1 pkgrel=1 -pkgdesc="Go Lang" +pkgdesc="Go Lang (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('BSD') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") url="http://www.golang.org/" - depends=() +makedepends=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('!strip') - source=("http://golang.org/dl/go${pkgver}.src.tar.gz" - "msys2-unix-files.patch") -sha1sums=('b54b7deb7b7afe9f5d9a3f5dd830c7dede35393a' - 'SKIP') + 0001-run-proper-go.path + 0002-run-proper-go.path) +sha1sums=('0df564746d105f4180c2b576a1553ebca9d9a124' + '385000e119ccf65244b95c869bfe156e9ac703fa' + '59bcd02985f3ede3f527ac74c966abac40f443cd') prepare() { - cd ${srcdir}/go - #patch -p1 -i ${srcdir}/msys2-unix-files.patch + [[ -d "${srcdir}"/${_realname}-${pkgver} ]] && rm -rf "${srcdir}"/${_realname}-${pkgver} + mv "${srcdir}"/${_realname} "${srcdir}"/${_realname}-${pkgver} + + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/0001-run-proper-go.path + patch -p1 -i ${srcdir}/0002-run-proper-go.path } build() { - cd ${srcdir}/go/src - GO_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1" CFLAGS="-D__USE_MINGW_ANSI_STDIO=1" ./make.bat + cd "${srcdir}"/${_realname}-${pkgver}/src + export GOROOT_BOOTSTRAP=/`echo ${MSYSTEM} | tr '[:upper:]' '[:lower:]'`/lib/go + export GOROOT="${srcdir}/${_realname}-${pkgver}" + export GOBIN="${GOROOT}/bin" + export GOPATH="${srcdir}/" + export GOROOT_FINAL=${MINGW_PREFIX}/lib/go + export GO_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + export CFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + ./make.bat } package() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - mkdir -p ${pkgdir}${MINGW_PREFIX}/src + cd "${_realname}-${pkgver}" - mv "${srcdir}/go/bin" "${pkgdir}${MINGW_PREFIX}/" - mv "${srcdir}/go/pkg" "${pkgdir}${MINGW_PREFIX}/" + export GOROOT="${srcdir}/${_realname}-${pkgver}" + export GOBIN="${GOROOT}/bin" - mv "${srcdir}/go/src/pkg" "${pkgdir}${MINGW_PREFIX}/src/" - mv "${srcdir}/go/src/cmd" "${pkgdir}${MINGW_PREFIX}/src/" +# install -Dm755 "${srcdir}/godoc" "${pkgdir}${MINGW_PREFIX}/bin/godoc" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/go" + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENSE \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/go/LICENSE" + + mkdir -p \ + "${pkgdir}${MINGW_PREFIX}/"{share/go,lib/go,lib/go/src,lib/go/site/src} + + cp -r doc misc -t "${pkgdir}${MINGW_PREFIX}/share/go" + cp -a bin "${pkgdir}${MINGW_PREFIX}" + cp -a pkg "${pkgdir}${MINGW_PREFIX}/lib/go" + cp -a "$GOROOT/src" "${pkgdir}${MINGW_PREFIX}/lib/go/" + cp -a "$GOROOT/src/cmd" "${pkgdir}${MINGW_PREFIX}/lib/go/src/cmd" + cp -a "$GOROOT/lib" "${pkgdir}${MINGW_PREFIX}/lib/go/" + + install -Dm644 src/Make.* "${pkgdir}${MINGW_PREFIX}/lib/go/src" + + # Remove object files from target src dir + find "${pkgdir}${MINGW_PREFIX}/lib/go/src/" -type f -name '*.[ao]' -delete + + # Fix for FS#32813 + find "${pkgdir}" -type f -name sql.go -exec chmod -x {} \; + + # Remove all executable source files + find "${pkgdir}${MINGW_PREFIX}/lib/go/src" -type f -executable -delete + + # This is to make go get code.google.com/p/go-tour/gotour and + # then running the gotour executable work out of the box. + # ln -sf ${MINGW_PREFIX}/bin "${pkgdir}${MINGW_PREFIX}/lib/go/bin" + + # For FS#42660 / FS#42661 / gox + install -Dm755 src/make.bash "${pkgdir}${MINGW_PREFIX}/lib/go/src/make.bash" + install -Dm755 src/run.bash "${pkgdir}${MINGW_PREFIX}/lib/go/src/run.bash" + cp -r misc/ "${pkgdir}${MINGW_PREFIX}/lib/go/" + + # For godoc + install -Dm644 favicon.ico "${pkgdir}${MINGW_PREFIX}/lib/go/favicon.ico" + + rm -f "${pkgdir}${MINGW_PREFIX}/share/go/doc/articles/wiki/get.bin" + + install -Dm644 VERSION "${pkgdir}${MINGW_PREFIX}/lib/go/VERSION" + + find "${pkgdir}${MINGW_PREFIX}/"{lib/go/pkg,bin} -type f -exec touch '{}' + } diff --git a/mingw-w64-go/msys2-unix-files.patch b/mingw-w64-go/msys2-unix-files.patch deleted file mode 100644 index 2f35e76f59..0000000000 --- a/mingw-w64-go/msys2-unix-files.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/usr/mingw32/src/pkg/os/exec/lp_windows.go b/usr/mingw32/src/pkg/os/exec/lp_windows.go -index c3efd67..139cf33 100644 ---- a/src/pkg/os/exec/lp_windows.go -+++ b/src/pkg/os/exec/lp_windows.go -@@ -70,6 +70,7 @@ func LookPath(file string) (f string, err error) { - } - exts = append(exts, e) - } -+ exts = append(exts, "") - if strings.IndexAny(file, `:\/`) != -1 { - if f, err = findExecutable(file, exts); err == nil { - return diff --git a/mingw-w64-gobject-introspection/0001-Revert-Windows-port-Work-arount-MSYS-weirdness-where.patch b/mingw-w64-gobject-introspection/0001-Revert-Windows-port-Work-arount-MSYS-weirdness-where.patch new file mode 100644 index 0000000000..d92d33f5f7 --- /dev/null +++ b/mingw-w64-gobject-introspection/0001-Revert-Windows-port-Work-arount-MSYS-weirdness-where.patch @@ -0,0 +1,73 @@ +From 142020d1728dec78a0ffb97b636f459d3184a796 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 30 Dec 2015 17:28:58 +0000 +Subject: [PATCH] Revert "Windows port: Work arount MSYS weirdness where it + changes --libtool= command line arguments." + +A very old version of MSYS performed normalization during path conversion +so "/bin/sh ../../libtool" became "c:/opt/msys/1.0/bin/libtool" ("sh .." +was considered a single folder), it doesn't do this any more; nor does +MSYS2. + +Also, the old comment was incorrect. It claimed: +"This continues to reuse the LIBTOOL variable from automake if it's set, +but works around some MSYS weirdness: When running g-ir-scanner, MSYS +changes a command-line argument --libtool="/bin/sh ../../libtool" into +--libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path +because we already "know" where the libtool configure produced is." + +.. yet the actual code was changed to: +_gir_libtool = $(if $(findstring MINGW,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)")) + +.. so in fact, if $(uname -s) contained "MINGW", then --libtool ignored +the LIBTOOL variable from automake and used $(top_builddir)/libtool +instead, at the very least, removing all trace of $(SHELL) from it. + +Now that $(SHELL) has been re-introduced into libtool, it must not +doubly appear in resolve_windows_libs in ccompiler.py, as otherwise +sh.exe will try to execute sh.exe and that clearly will not work. + +I've left some MSYS-specific hacks in dumper.py, some of which could +probaly be removed safely now (execution through a temporary shell +script), but I've opted to leave it as is for now. + +This reverts commit 33bbdce144d275b693752f0bc2c2f292deda854e. +--- + Makefile.introspection | 8 ++------ + giscanner/ccompiler.py | 1 - + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/Makefile.introspection b/Makefile.introspection +index cd7bd1b..c28d734 100644 +--- a/Makefile.introspection ++++ b/Makefile.introspection +@@ -63,12 +63,8 @@ _gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg)) + _gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include)) + _gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg)) + +-# Reuse the LIBTOOL variable from automake if it's set, but +-# work around MSYS weirdness: When running g-ir-scanner, MSYS changes +-# a command-line argument --libtool="/bin/sh ../../libtool" into +-# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path +-# because we already "know" where the libtool configure produced is. +-_gir_libtool = $(if $(findstring MINGW,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)")) ++# Reuse the LIBTOOL variable from automake if it's set ++_gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)") + + # Macros for AM_SILENT_RULES prettiness + _gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1) +diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py +index 9b27f0e..f9b0b27 100644 +--- a/giscanner/ccompiler.py ++++ b/giscanner/ccompiler.py +@@ -277,7 +277,6 @@ class CCompiler(object): + else: + libtool = utils.get_libtool_command(options) + if libtool: +- args.append(utils.which(os.environ.get('SHELL', 'sh.exe'))) + args.extend(libtool) + args.append('--mode=execute') + # FIXME: it could have prefix (i686-w64-mingw32-dlltool.exe) +-- +2.6.3 + diff --git a/mingw-w64-gobject-introspection/0022-change-pkg-config-invocations.mingw.patch b/mingw-w64-gobject-introspection/0022-change-pkg-config-invocations.mingw.patch new file mode 100644 index 0000000000..d96d455571 --- /dev/null +++ b/mingw-w64-gobject-introspection/0022-change-pkg-config-invocations.mingw.patch @@ -0,0 +1,25 @@ +--- repo/m4/introspection.m4.orig 2014-02-21 11:12:52.824027600 +0000 ++++ repo/m4/introspection.m4 2014-03-18 11:50:45.281823900 +0000 +@@ -56,14 +56,14 @@ + INTROSPECTION_GIRDIR= + INTROSPECTION_TYPELIBDIR= + if test "x$found_introspection" = "xyes"; then +- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` +- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` +- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` +- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` +- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" +- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` +- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` +- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection ++ INTROSPECTION_SCANNER=`$PKG_CONFIG --dont-define-prefix --variable=g_ir_scanner gobject-introspection-1.0` ++ INTROSPECTION_COMPILER=`$PKG_CONFIG --dont-define-prefix --variable=g_ir_compiler gobject-introspection-1.0` ++ INTROSPECTION_GENERATE=`$PKG_CONFIG --dont-define-prefix --variable=g_ir_generate gobject-introspection-1.0` ++ INTROSPECTION_GIRDIR=`$PKG_CONFIG --dont-define-prefix --variable=girdir gobject-introspection-1.0` ++ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --dont-define-prefix --variable=typelibdir gobject-introspection-1.0)" ++ INTROSPECTION_CFLAGS=`$PKG_CONFIG --dont-define-prefix --cflags gobject-introspection-1.0` ++ INTROSPECTION_LIBS=`$PKG_CONFIG --dont-define-prefix --libs gobject-introspection-1.0` ++ INTROSPECTION_MAKEFILE=`$PKG_CONFIG --dont-define-prefix --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection + fi + AC_SUBST(INTROSPECTION_SCANNER) + AC_SUBST(INTROSPECTION_COMPILER) diff --git a/mingw-w64-gobject-introspection/0024-Support-passing-arguments-to-g-ir-scanner-through-a-.all.patch b/mingw-w64-gobject-introspection/0024-Support-passing-arguments-to-g-ir-scanner-through-a-.all.patch new file mode 100644 index 0000000000..84a2a7e721 --- /dev/null +++ b/mingw-w64-gobject-introspection/0024-Support-passing-arguments-to-g-ir-scanner-through-a-.all.patch @@ -0,0 +1,546 @@ +From 0901fd14718189b9679e7669d59ba31be7e4440f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= + =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= +Date: Sat, 28 Mar 2015 12:23:32 +0000 +Subject: [PATCH] Support passing arguments to g-ir-scanner through a file + +to avoid hitting the commandline length limit on W32. + +To ensure that no unnecessary mangling +takes place, only the .gir rule prerequisites (presumably - only filenames) +are affected, other arguments (various flags and options) go as-is. + +Makefile.introspection is modified to dump the filenames into a file +$(1).files (i.e. Glib-2.0.gir.files) and to give the name of that file +as an argument --argfile=$(1).files. + +The scanner_main() function is modified to feed its arguments to a utility +function that pre-processes the arguments, looking for the "--argfile" +argument, and inserts in its place an argument list from the tempfile, +which is parsed by shlex.split() and is mangled by a special mangling +function. + +There is another _get_option_parser() invocation elswhere in scannermain.py, +it remains unaltered. + +Looking for "--argfile", parsing the file and mangling the arguments is +only done for W32 platforms. For non-W32 platforms it's a no-op. +Makefile.introspection (renamed to Makefile.introspection.in) is processed +by autoconf, which comments out the part that is not applicable to +the platform. This way $(1).files is only generated on W32, +and --argfile=$(1).files is only given on W32. + +Files must not have spaces in their names, as Makefile.introspection can't +do any processing on them. + +https://bugzilla.gnome.org/show_bug.cgi?id=620566 +--- + Makefile.am | 2 +- + Makefile.introspection | 162 ---------------------------------------- + Makefile.introspection.in | 183 ++++++++++++++++++++++++++++++++++++++++++++++ + configure.ac | 7 ++ + giscanner/scannermain.py | 3 +- + giscanner/utils.py | 54 +++++++++++++ + tests/offsets/Makefile.am | 2 +- + tests/scanner/Makefile.am | 2 +- + 8 files changed, 253 insertions(+), 170 deletions(-) + delete mode 100644 Makefile.introspection + create mode 100644 Makefile.introspection.in +--- a/Makefile.am ++++ a/Makefile.am +@@ -15,7 +15,7 @@ EXTRA_PROGRAMS = + TESTS = + + include common.mk +-include Makefile.introspection ++include Makefile.introspection.in + + include Makefile-cmph.am + include Makefile-girepository.am +--- a/Makefile.introspection ++++ a/Makefile.introspection +@ -1,168 +0,0 @@ +-# -*- Mode: make -*- +-# Copyright 2009-2010 Johan Dahlin +-# +-# This file is free software; the author(s) gives unlimited +-# permission to copy and/or distribute it, with or without +-# modifications, as long as this notice is preserved. +-# +-# * Input variables: +-# +-# INTROSPECTION_GIRS - List of GIRS that should be generated +-# INTROSPECTION_SCANNER - Command to invoke scanner, normally set by +-# GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4 +-# INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner +-# INTROSPECTION_SCANNER_ENV - Environment variables to set before running +-# the scanner +-# INTROSPECTION_COMPILER - Command to invoke compiler, normally set by +-# GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4 +-# INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler +-# +-# * Simple tutorial +-# +-# Add this to configure.ac: +-# -Wno-portability to AM_INIT_AUTOMAKE +-# GOBJECT_INTROSPECTION_CHECK([0.6.7]) +-# +-# Add this to Makefile.am where your library/program is built: +-# include $(INTROSPECTION_MAKEFILE) +-# INTROSPECTION_GIRS = YourLib-1.0.gir +-# YourLib-1.0.gir: libyourlib.la +-# YourLib_1_0_gir_NAMESPACE = YourLib +-# YourLib_1_0_gir_VERSION = 1.0 +-# YourLib_1_0_gir_LIBS = libyourlib.la +-# YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES) +-# girdir = $(datadir)/gir-1.0 +-# dist_gir_DATA = YourLib-1.0.gir +-# typelibdir = $(libdir)/girepository-1.0 +-# typelib_DATA = YourLib-1.0.typelib +-# CLEANFILES = $(dist_gir_DATA) $(typelib_DATA) +-# +- +-# Make sure the required variables are set, these should under normal +-# circumstances come from introspection.m4 +-$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER)) +-$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER)) +- +-# Private functions +- +-## Transform the gir filename to something which can reference through a variable +-## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir +-_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1)))) +- +-# Namespace and Version is either fetched from the gir filename +-# or the _NAMESPACE/_VERSION variable combo +-_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1))))) +-_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=)))) +- +-# _PROGRAM is an optional variable which needs it's own --program argument +-_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM)) +- +-# Variables which provides a list of things +-_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib)) +-_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg)) +-_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include)) +-_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg)) +- +-# Reuse the LIBTOOL variable from automake if it's set +-_gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)") +- +-# Macros for AM_SILENT_RULES prettiness +-_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1) +- +-_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V)) +-_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity)) +-_gir_silent_scanner_prefix_0 = @echo " GISCAN $(1)"; +-_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V)) +-_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity)) +-_gir_silent_scanner_opts_0 = --quiet +- +-_gir_silent_compiler = $(_gir_silent_compiler_$(V)) +-_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity)) +-_gir_silent_compiler_0 = @echo " GICOMP $(1)"; +- +-_gir_default_scanner_env = CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" +- +-# +-# Creates a GIR by scanning C headers/sources +-# $(1) - Name of the gir file (output) +-# +-# If output is Gtk-2.0.gir then you should name the variables like +-# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc. +-# Required variables: +-# FILES - C sources and headers which should be scanned +-# +-# One of these variables are required: +-# LIBS - Library where the symbol represented in the gir can be found +-# PROGRAM - Program where the symbol represented in the gir can be found +-# +-# Optional variables +-# NAMESPACE - Namespace of the gir, first letter capital, +-# rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'. +-# If not present the namespace will be fetched from the gir filename, +-# the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'. +-# VERSION - Version of the gir, if not present, will be fetched from gir +-# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'. +-# LIBTOOL - Command to invoke libtool, usually set by automake +-# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list +-# CFLAGS - Flags to pass in to the parser when scanning headers +-# LDFLAGS - Linker flags used by the scanner +-# PACKAGES - list of pkg-config names which cflags are required to parse +-# the headers of this gir +-# INCLUDES - Gir files to include without the .gir suffix, for instance +-# GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that +-# provides introspection information. +-# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir. +-# By default the names in the PACKAGES variable will be used. +-# +- +-define introspection-scanner +- +-# Basic sanity check, to make sure required variables are set +-$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES)) +-$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)), +- $($(_gir_name)_LIBS), +- $($(_gir_name)_PROGRAM)),, +- $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM)) +- +-# Only dependencies we know are actually filenames goes into _FILES, make +-# sure these are built before running the scanner. Libraries and programs +-# needs to be added manually. +-$(1): $$($(_gir_name)_FILES) +- @ $(MKDIR_P) $(dir $(1)) +- $(_gir_silent_scanner_prefix) $(_gir_default_scanner_env) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \ +- $(INTROSPECTION_SCANNER_ARGS) \ +- --namespace=$(_gir_namespace) \ +- --nsversion=$(_gir_version) \ +- $(_gir_libtool) \ +- $(_gir_packages) \ +- $(_gir_includes) \ +- $(_gir_export_packages) \ +- $(_gir_program) \ +- $(_gir_libraries) \ +- $($(_gir_name)_SCANNERFLAGS) \ +- --cflags-begin \ +- $($(_gir_name)_CFLAGS) \ +- --cflags-end \ +- $($(_gir_name)_LDFLAGS) \ +- $$^ \ +- --output $(1) +-endef +- +-$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir)))) +- +-# +-# Compiles a gir into a typelib +-# $(1): gir filename (input) +-# $(2): typelib filename (output) +-# +-define introspection-compiler +-$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2) +-endef +- +-# Simple rule to compile a typelib. +-%.typelib: %.gir +- $(call introspection-compiler,$<,$@) +--- a/Makefile.introspection.in ++++ a/Makefile.introspection.in +@@ -0,0 +1,185 @@ ++# -*- Mode: make -*- ++# Copyright 2009-2010 Johan Dahlin ++# ++# This file is free software; the author(s) gives unlimited ++# permission to copy and/or distribute it, with or without ++# modifications, as long as this notice is preserved. ++# ++# * Input variables: ++# ++# INTROSPECTION_GIRS - List of GIRS that should be generated ++# INTROSPECTION_SCANNER - Command to invoke scanner, normally set by ++# GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4 ++# INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner ++# INTROSPECTION_SCANNER_ENV - Environment variables to set before running ++# the scanner ++# INTROSPECTION_COMPILER - Command to invoke compiler, normally set by ++# GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4 ++# INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler ++# ++# * Simple tutorial ++# ++# Add this to configure.ac: ++# -Wno-portability to AM_INIT_AUTOMAKE ++# GOBJECT_INTROSPECTION_CHECK([0.6.7]) ++# ++# Add this to Makefile.am where your library/program is built: ++# include $(INTROSPECTION_MAKEFILE) ++# INTROSPECTION_GIRS = YourLib-1.0.gir ++# YourLib-1.0.gir: libyourlib.la ++# YourLib_1_0_gir_NAMESPACE = YourLib ++# YourLib_1_0_gir_VERSION = 1.0 ++# YourLib_1_0_gir_LIBS = libyourlib.la ++# YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES) ++# girdir = $(datadir)/gir-1.0 ++# dist_gir_DATA = YourLib-1.0.gir ++# typelibdir = $(libdir)/girepository-1.0 ++# typelib_DATA = YourLib-1.0.typelib ++# CLEANFILES = $(dist_gir_DATA) $(typelib_DATA) ++# ++ ++# Make sure the required variables are set, these should under normal ++# circumstances come from introspection.m4 ++$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER)) ++$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER)) ++ ++# Private functions ++ ++## Transform the gir filename to something which can reference through a variable ++## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir ++_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1)))) ++ ++# Namespace and Version is either fetched from the gir filename ++# or the _NAMESPACE/_VERSION variable combo ++_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1))))) ++_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=)))) ++ ++# _PROGRAM is an optional variable which needs it's own --program argument ++_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM)) ++ ++# Variables which provides a list of things ++_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib)) ++_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg)) ++_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include)) ++_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg)) ++ ++# Reuse the LIBTOOL variable from automake if it's set ++_gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)") ++ ++# Macros for AM_SILENT_RULES prettiness ++_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1) ++ ++_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V)) ++_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity)) ++_gir_silent_scanner_prefix_0 = @echo " GISCAN $(1)"; ++_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V)) ++_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity)) ++_gir_silent_scanner_opts_0 = --quiet ++ ++_gir_silent_compiler = $(_gir_silent_compiler_$(V)) ++_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity)) ++_gir_silent_compiler_0 = @echo " GICOMP $(1)"; ++ ++_gir_default_scanner_env = CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" ++ ++# ++# Creates a GIR by scanning C headers/sources ++# $(1) - Name of the gir file (output) ++# ++# If output is Gtk-2.0.gir then you should name the variables like ++# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc. ++# Required variables: ++# FILES - C sources and headers which should be scanned ++# ++# One of these variables are required: ++# LIBS - Library where the symbol represented in the gir can be found ++# PROGRAM - Program where the symbol represented in the gir can be found ++# ++# Optional variables ++# NAMESPACE - Namespace of the gir, first letter capital, ++# rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'. ++# If not present the namespace will be fetched from the gir filename, ++# the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'. ++# VERSION - Version of the gir, if not present, will be fetched from gir ++# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'. ++# LIBTOOL - Command to invoke libtool, usually set by automake ++# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list ++# CFLAGS - Flags to pass in to the parser when scanning headers ++# LDFLAGS - Linker flags used by the scanner ++# PACKAGES - list of pkg-config names which cflags are required to parse ++# the headers of this gir ++# INCLUDES - Gir files to include without the .gir suffix, for instance ++# GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that ++# provides introspection information. ++# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir. ++# By default the names in the PACKAGES variable will be used. ++# ++ ++define introspection-scanner ++ ++# Basic sanity check, to make sure required variables are set ++$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES)) ++$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)), ++ $($(_gir_name)_LIBS), ++ $($(_gir_name)_PROGRAM)),, ++ $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM)) ++ ++# Only dependencies we know are actually filenames goes into _FILES, make ++# sure these are built before running the scanner. Libraries and programs ++# needs to be added manually. ++@COMMENT_ON_W32@$(1): $$($(_gir_name)_FILES) ++@COMMENT_ON_W32@ @ $(MKDIR_P) $(dir $(1)) ++@COMMENT_ON_W32@ $(_gir_silent_scanner_prefix) $(_gir_default_scanner_env) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \ ++@COMMENT_ON_W32@ $(INTROSPECTION_SCANNER_ARGS) \ ++@COMMENT_ON_W32@ --namespace=$(_gir_namespace) \ ++@COMMENT_ON_W32@ --nsversion=$(_gir_version) \ ++@COMMENT_ON_W32@ $(_gir_libtool) \ ++@COMMENT_ON_W32@ $(_gir_packages) \ ++@COMMENT_ON_W32@ $(_gir_includes) \ ++@COMMENT_ON_W32@ $(_gir_export_packages) \ ++@COMMENT_ON_W32@ $(_gir_program) \ ++@COMMENT_ON_W32@ $(_gir_libraries) \ ++@COMMENT_ON_W32@ $($(_gir_name)_SCANNERFLAGS) \ ++@COMMENT_ON_W32@ --cflags-begin \ ++@COMMENT_ON_W32@ $($(_gir_name)_CFLAGS) \ ++@COMMENT_ON_W32@ --cflags-end \ ++@COMMENT_ON_W32@ $($(_gir_name)_LDFLAGS) \ ++@COMMENT_ON_W32@ $$^ \ ++@COMMENT_ON_W32@ --output $(1) ++ ++@COMMENT_ON_NONW32@$(1): $$($(_gir_name)_FILES) ++@COMMENT_ON_NONW32@ @ $(MKDIR_P) $(dir $(1)) ++@COMMENT_ON_NONW32@ @ echo $$^ > $(1).files ++@COMMENT_ON_NONW32@ $(_gir_silent_scanner_prefix) $(_gir_default_scanner_env) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \ ++@COMMENT_ON_NONW32@ $(INTROSPECTION_SCANNER_ARGS) \ ++@COMMENT_ON_NONW32@ --namespace=$(_gir_namespace) \ ++@COMMENT_ON_NONW32@ --nsversion=$(_gir_version) \ ++@COMMENT_ON_NONW32@ $(_gir_libtool) \ ++@COMMENT_ON_NONW32@ $(_gir_packages) \ ++@COMMENT_ON_NONW32@ $(_gir_includes) \ ++@COMMENT_ON_NONW32@ $(_gir_export_packages) \ ++@COMMENT_ON_NONW32@ $(_gir_program) \ ++@COMMENT_ON_NONW32@ $(_gir_libraries) \ ++@COMMENT_ON_NONW32@ $($(_gir_name)_SCANNERFLAGS) \ ++@COMMENT_ON_NONW32@ --cflags-begin \ ++@COMMENT_ON_NONW32@ $($(_gir_name)_CFLAGS) \ ++@COMMENT_ON_NONW32@ --cflags-end \ ++@COMMENT_ON_NONW32@ $($(_gir_name)_LDFLAGS) \ ++@COMMENT_ON_NONW32@ --argfile=$(1).files \ ++@COMMENT_ON_NONW32@ --output $(1) ++endef ++ ++$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir)))) ++ ++# ++# Compiles a gir into a typelib ++# $(1): gir filename (input) ++# $(2): typelib filename (output) ++# ++define introspection-compiler ++$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2) ++endef ++ ++# Simple rule to compile a typelib. ++%.typelib: %.gir ++ $(call introspection-compiler,$<,$@) +--- a/configure.ac ++++ a/configure.ac +@@ -31,12 +31,18 @@ AC_CANONICAL_HOST + case "$host" in + *-*-mingw*) + os_win32=yes ++ COMMENT_ON_W32='#' ++ COMMENT_ON_NONW32= + ;; + *) + os_win32=no ++ COMMENT_ON_W32= ++ COMMENT_ON_NONW32='#' + ;; + esac + AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"]) ++AC_SUBST(COMMENT_ON_W32) ++AC_SUBST(COMMENT_ON_NONW32) + + # Checks for programs. + AC_PROG_CC +@@ -358,6 +364,7 @@ tests/warn/Makefile + docs/Makefile + docs/reference/Makefile + docs/reference/version.xml ++Makefile.introspection + gobject-introspection-1.0.pc + gobject-introspection-no-export-1.0.pc + config.h.win32 +--- a/giscanner/scannermain.py ++++ a/giscanner/scannermain.py +@@ -470,8 +470,9 @@ def write_output(data, options): + + + def scanner_main(args): ++ loaded_args = utils.maybe_load_args_from_file(args) + parser = _get_option_parser() +- (options, args) = parser.parse_args(args) ++ (options, args) = parser.parse_args(loaded_args) + + if options.passthrough_gir: + passthrough_gir(options.passthrough_gir, sys.stdout) +--- a/giscanner/utils.py ++++ a/giscanner/utils.py +@@ -22,6 +22,7 @@ import re + import os + import subprocess + import platform ++import shlex + + + _debugflags = None +@@ -75,6 +76,59 @@ def to_underscores_noprefix(name): + return name + + ++def cygmsys_mangle(arg): ++ shell = which(os.environ.get('SHELL', 'sh.exe')) ++ p = subprocess.Popen([shell, '-c', 'cmd //C echo ' + arg], stdout=subprocess.PIPE) ++ result, _ = p.communicate() ++ return result.rstrip('\n').rstrip('\r') if p.returncode == 0 else None ++ ++ ++def load_args_from_file(filename): ++ with open(filename, 'rb') as source: ++ contents = source.read().decode('UTF-8') ++ result = shlex.split(contents) ++ if os.name == 'nt': ++ args = [] ++ for arg in result: ++ mangled = cygmsys_mangle(arg) ++ if mangled is not None: ++ args.append(mangled) ++ result = args ++ return result ++ ++ ++def maybe_load_args_from_file(args): ++ if os.name != 'nt': ++ return args ++ ++ processed_args = [] ++ skip = False ++ is_input_file = False ++ argfilelen = len('--argfile=') ++ for argn, arg in enumerate(args): ++ if skip: ++ processed_args.append(arg) ++ continue ++ elif arg == '--': ++ skip = True ++ processed_args.append(arg) ++ continue ++ ++ if is_input_file: ++ processed_args.extend(load_args_from_file(arg)) ++ is_input_file = False ++ continue ++ ++ if arg == '--argfile' and argn + 1 < len(args): ++ is_input_file = True ++ continue ++ elif arg.startswith('--argfile=') and len(arg) > argfilelen: ++ processed_args.extend(load_args_from_file(arg[argfilelen:])) ++ continue ++ processed_args.append(arg) ++ return processed_args ++ ++ + _libtool_pat = re.compile("dlname='([A-z0-9\.\-\+]+)'\n") + + +--- a/tests/offsets/Makefile.am ++++ a/tests/offsets/Makefile.am +@@ -1,5 +1,5 @@ + include $(top_srcdir)/common.mk +-include $(top_srcdir)/Makefile.introspection ++include $(top_srcdir)/Makefile.introspection.in + + BUILT_SOURCES = + CLEANFILES = +--- a/tests/scanner/Makefile.am ++++ a/tests/scanner/Makefile.am +@@ -1,7 +1,7 @@ + NULL ?= + + include $(top_srcdir)/common.mk +-include $(top_srcdir)/Makefile.introspection ++include $(top_srcdir)/Makefile.introspection.in + + SUBDIRS = . annotationparser + diff --git a/mingw-w64-gobject-introspection/PKGBUILD b/mingw-w64-gobject-introspection/PKGBUILD index 09b3a861a9..e535ccbb32 100644 --- a/mingw-w64-gobject-introspection/PKGBUILD +++ b/mingw-w64-gobject-introspection/PKGBUILD @@ -1,59 +1,126 @@ # Maintainer: Alexey Pavlov +# Maintainer: Ray Donnelly _realname=gobject-introspection -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.42.0 -pkgrel=1 -pkgdesc="GObject Introspection can scan C header and source files in order to generate introspection typelib files (mingw-w64)" +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-runtime") +pkgver=1.46.0 +pkgrel=3 arch=('any') url="https://live.gnome.org/GObjectIntrospection" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-libffi" - "${MINGW_PACKAGE_PREFIX}-python2") -options=('strip' 'staticlibs') - + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-mako") +# Building this in debug invokes pdb when things go wrong. +# options=('!strip' 'debug') source=(http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 0001-Revert-Windows-port-Work-arount-MSYS-weirdness-where.patch 0018-debug-rmtree-errors.mingw.patch 0021-tests-no-undefined.patch + 0022-change-pkg-config-invocations.mingw.patch + 0024-Support-passing-arguments-to-g-ir-scanner-through-a-.all.patch 0050-dont-load-msvcrt.patch 0055-fix-python-detection.patch) -md5sums=('4fa52f6b67367d9c1b99b98683ced202' +md5sums=('adb40a31c7c80b65b0f4c8fd71b493dc' + '37d1683439e0b31da62220418c8965fb' 'f0ecde986ebf1f0e28b752f9c36fb6c1' '69ef34e2f57abc8afe1b9f6fa3786e97' + '8d3589fb959a0a68ce7ce9051fa441fe' + 'd22ceb61d87fc049373d4589453d4fc3' 'e3598d539258678eef8dde2216419faf' '6d809bf266e42a20b31a7acbaf0384d1') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0018-debug-rmtree-errors.mingw.patch - patch -p1 -i ${srcdir}/0021-tests-no-undefined.patch - patch -p1 -i ${srcdir}/0050-dont-load-msvcrt.patch - patch -p1 -i ${srcdir}/0055-fix-python-detection.patch + patch -p1 -i "${srcdir}"/0001-Revert-Windows-port-Work-arount-MSYS-weirdness-where.patch + patch -p1 -i "${srcdir}"/0018-debug-rmtree-errors.mingw.patch + patch -p1 -i "${srcdir}"/0021-tests-no-undefined.patch + patch -p1 -i "${srcdir}"/0022-change-pkg-config-invocations.mingw.patch + # Source for this patch is: + # http://bazaar.launchpad.net/~lrn1986/stupidbuild/trunk/view/head:/src/mingw/gobject-introspection-1.0-1.44.0-2/patches/0024-Support-passing-arguments-to-g-ir-scanner-through-a-.all.patch + patch -p1 -i "${srcdir}"/0024-Support-passing-arguments-to-g-ir-scanner-through-a-.all.patch + patch -p1 -i "${srcdir}"/0050-dont-load-msvcrt.patch + patch -p1 -i "${srcdir}"/0055-fix-python-detection.patch autoreconf -fi } build() { export PYTHON=${MINGW_PREFIX}/bin/python2 - + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --enable-silent-rules + --disable-silent-rules + make } -package() { +package_gobject-introspection() { + pkgdesc="Introspection system for GObject-based libraries (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime=${pkgver}" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-mako") + options=('!emptydirs') + cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' -o -name '*.manifest' | xargs -rtl1 rm + make -j1 DESTDIR="${pkgdir}" install + make -j1 DESTDIR="${pkgdir}" uninstall-libLTLIBRARIES uninstall-typelibsDATA + + # I've spent too long debugging gobject-introspection and it's too painful each + # time. Therefore, I've taken the decision to copy the .pyd also as a _d.pyd + # in-case I happen to be investigating it with a debug version of Python which + # only loads _d.pyd extensions. + # You will still have to rebuild this package after having built and installed + # the debug mingw-w64-python2 of course .. still one less thing to forget to + # remember. + # There will be a way to communicate the nature of the Python through to Autoconf + # and that would be better, but this will have to do for now. + # (see: + # @OS_WIN32_TRUE@ -shrext ".pyd" + # in gobject-introspection/Makefile.in) + PYDS=$(find "${pkgdir}" -name "*.pyd") + for PYD in "${PYDS}"; do + pushd $(dirname "${PYD}") + cp $(basename "${PYD}") $(basename "${PYD}" .pyd)_d.pyd + popd + done +} + +package_gobject-introspection-runtime() { + pkgdesc="Introspection system for GObject-based libraries - runtime files (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-glib2") + + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="${pkgdir}" install-libLTLIBRARIES install-typelibsDATA +} + +# Wrappers +package_mingw-w64-i686-gobject-introspection() +{ + package_gobject-introspection +} + +package_mingw-w64-i686-gobject-introspection-runtime() +{ + package_gobject-introspection-runtime +} + +package_mingw-w64-x86_64-gobject-introspection() +{ + package_gobject-introspection +} + +package_mingw-w64-x86_64-gobject-introspection-runtime() +{ + package_gobject-introspection-runtime } diff --git a/mingw-w64-goocanvas/001-convert-python-path-to-unix.patch b/mingw-w64-goocanvas/001-convert-python-path-to-unix.patch index 0507ae1afd..0a75fc6b81 100644 --- a/mingw-w64-goocanvas/001-convert-python-path-to-unix.patch +++ b/mingw-w64-goocanvas/001-convert-python-path-to-unix.patch @@ -1,14 +1,18 @@ ---- goocanvas-2.0.2/configure.in.orig 2014-08-20 19:26:32.167400000 +0400 -+++ goocanvas-2.0.2/configure.in 2014-08-20 19:27:30.074600000 +0400 -@@ -95,6 +95,11 @@ +--- ./configure.in.orig 2013-11-03 17:56:29.000000000 +0100 ++++ ./configure.in 2015-02-22 19:47:45.372532600 +0100 +@@ -94,8 +94,13 @@ + if test "x$enable_python" = "xyes"; then PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED]) - pyoverridesdir=`$PYTHON -c "import gi;print gi._overridesdir"` -+case "$host" in -+ *-*-mingw*) -+ pyoverridesdir=`cygpath -u $pyoverridesdir` -+ ;; -+esac - AC_SUBST(pyoverridesdir) +- pyoverridesdir=`$PYTHON -c "import gi;print gi._overridesdir"` +- AC_SUBST(pyoverridesdir) ++ pyoverridesdir=`$PYTHON -c "import gi; from os.path import abspath; print(abspath(gi._overridesdir))"` ++ case "$host" in ++ *-*-mingw*) ++ pyoverridesdir=`cygpath -u $pyoverridesdir` ++ ;; ++ esac ++ AC_SUBST(pyoverridesdir) fi + AM_CONDITIONAL(ENABLE_PYTHON, test x"$enable_python" = "xyes") diff --git a/mingw-w64-goocanvas/002-fix-introspection.patch b/mingw-w64-goocanvas/002-fix-introspection.patch new file mode 100644 index 0000000000..2006ae76a0 --- /dev/null +++ b/mingw-w64-goocanvas/002-fix-introspection.patch @@ -0,0 +1,24 @@ +--- goocanvas-2.0.2/src/Makefile.am.orig 2013-10-25 17:45:33.000000000 +0200 ++++ goocanvas-2.0.2/src/Makefile.am 2015-01-13 00:13:55.110240700 +0100 +@@ -1,9 +1,9 @@ + ## Process this file with automake to produce Makefile.in + + INCLUDES = \ +- -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ +- -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ +- -DG_LOG_DOMAIN=\"GooCanvas\" \ ++ -DPACKAGE_DATA_DIR="$(datadir)" \ ++ -DPACKAGE_LOCALE_DIR="$(prefix)/$(DATADIRNAME)/locale" \ ++ -DG_LOG_DOMAIN=\'GooCanvas\' \ + @PACKAGE_CFLAGS@ + + # -DG_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED \ +@@ -158,7 +158,7 @@ + GooCanvas_2_0_gir_SCANNERFLAGS = --identifier-prefix=Goo --symbol-prefix=goo --warn-all + GooCanvas_2_0_gir_INCLUDES = Gtk-3.0 + GooCanvas_2_0_gir_CFLAGS = $(INCLUDES) +-GooCanvas_2_0_gir_LIBS = goocanvas-2.0 ++GooCanvas_2_0_gir_LIBS = $(srcdir)/$(lib_LTLIBRARIES) + GooCanvas_2_0_gir_FILES = $(introspection_sources) + INTROSPECTION_GIRS += GooCanvas-2.0.gir + diff --git a/mingw-w64-goocanvas/PKGBUILD b/mingw-w64-goocanvas/PKGBUILD index 400adf5322..929fff1c41 100644 --- a/mingw-w64-goocanvas/PKGBUILD +++ b/mingw-w64-goocanvas/PKGBUILD @@ -3,49 +3,60 @@ _realname=goocanvas pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.2 -pkgrel=1 +pkgrel=3 arch=('any') pkgdesc="Canvas widget for GTK+ that uses the Cairo 2D library (mingw-w64)" license=("LGPL 2") url="http://www.gnome.org" depends=("${MINGW_PACKAGE_PREFIX}-gtk3") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-python2" - "make" - "libtool" - "automake-wrapper" - "autoconf" - "gettext" - "libintl" - "patch") + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "make" + "libtool" + "automake-wrapper" + "autoconf" + "gettext" + "libintl" + "patch") options=('strip' '!debug' 'staticlibs') -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:3}/${_realname}-$pkgver.tar.xz - 001-convert-python-path-to-unix.patch) +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz + 001-convert-python-path-to-unix.patch + 002-fix-introspection.patch) sha256sums=('f20e5fbef8d1a2633033edbd886dd13146a1b948d1813a9c353a80a29295d1d0' - '0aabbc30449243076c0533efe54d79b5236e000204d510fdbbcb28d9c452ae5f') + '3e792af4245ebc6a73eb83bf89b2c37734c1c8e8442c84780a8f4ad54e9e8888' + '9c7f57c503986f95b57a5551fdfda9571b4403f9000caf95d881ceff8a729d3c') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-convert-python-path-to-unix.patch - + patch -p1 -i ${srcdir}/002-fix-introspection.patch autoreconf -fi + cp -r ${srcdir}/${_realname}-${pkgver} ${srcdir}/${MINGW_CHOST}-${_realname}-python2 + cp -r ${srcdir}/${_realname}-${pkgver} ${srcdir}/${MINGW_CHOST}-${_realname}-python3 } build() { - mkdir -p build-${MINGW_CHOST} - cd build-${MINGW_CHOST} - - ../${_realname}-${pkgver}/configure \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --build=${MINGW_CHOST} \ - --prefix=${MINGW_PREFIX} \ - --libexecdir=${MINGW_PREFIX}/lib \ - --enable-introspection=no - make + # we must build things twice + for _python in python{2,3}; do + cd ${srcdir}/${MINGW_CHOST}-${_realname}-${_python} + export CC=gcc + ./configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection=yes \ + PYTHON=${MINGW_PREFIX}/bin/${_python} + make + done } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + for _python in python{2,3}; do + cd ${srcdir}/${MINGW_CHOST}-${_realname}-${_python} + make DESTDIR=${pkgdir} install + done } diff --git a/mingw-w64-gperf/PKGBUILD b/mingw-w64-gperf/PKGBUILD index a2c84fe367..431adfe02f 100644 --- a/mingw-w64-gperf/PKGBUILD +++ b/mingw-w64-gperf/PKGBUILD @@ -1,7 +1,6 @@ # Maintainer: Alexey Pavlov _realname=gperf - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=3.0.4 pkgrel=2 @@ -9,7 +8,6 @@ pkgdesc="Perfect hash function generator (mingw-w64)" arch=('any') url="http://www.gnu.org/software/gperf/" license=('GPL3') -#groups=("${MINGW_PACKAGE_PREFIX}") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") source=("http://ftp.gnu.org/pub/gnu/gperf/${_realname}-${pkgver}.tar.gz"{,.sig}) sha1sums=('e32d4aff8f0c730c9a56554377b2c6d82d0951b8' diff --git a/mingw-w64-gpgme/0001-fix-incorrect-fd-pointer-check.patch b/mingw-w64-gpgme/0001-fix-incorrect-fd-pointer-check.patch new file mode 100644 index 0000000000..5b19fb4145 --- /dev/null +++ b/mingw-w64-gpgme/0001-fix-incorrect-fd-pointer-check.patch @@ -0,0 +1,12 @@ +diff -urN a/src/w32-util.c b/src/w32-util.c +--- a/src/w32-util.c 2014-07-30 10:40:16.000000000 +0100 ++++ b/src/w32-util.c 2015-08-04 22:35:22.308898700 +0100 +@@ -709,7 +709,7 @@ + return -1; + strcpy (stpcpy (tmpname, tmp), "\\gpgme-XXXXXX"); + *fd = mkstemp (tmpname); +- if (fd < 0) ++ if (*fd < 0) + { + free (tmpname); + return -1; diff --git a/mingw-w64-gpgme/0002-reopen-mkstemp-files-without-_O_TEMPORARY.patch b/mingw-w64-gpgme/0002-reopen-mkstemp-files-without-_O_TEMPORARY.patch new file mode 100644 index 0000000000..baac622506 --- /dev/null +++ b/mingw-w64-gpgme/0002-reopen-mkstemp-files-without-_O_TEMPORARY.patch @@ -0,0 +1,31 @@ +diff -urN a/src/w32-util.c b/src/w32-util.c +--- a/src/w32-util.c 2015-08-04 22:35:22.574099100 +0100 ++++ b/src/w32-util.c 2015-08-04 22:35:22.948499800 +0100 +@@ -42,6 +42,7 @@ + #endif + #include + #include ++#include + + #if __MINGW64_VERSION_MAJOR >= 2 + # define _WIN32_IE 0x0501 /* Required by mingw64 toolkit. */ +@@ -715,6 +716,19 @@ + return -1; + } + ++ /* mingw-w64's mkstemp implementation opens files with _O_TEMPORARY ++ meaning they get deleted when the last handle to them is closed. ++ While ReOpenFile () could be used to work around this, it is not ++ available until Vista. Instead, close and recreate. */ ++ close (*fd); ++ *fd = _sopen(tmpname, ++ _O_RDWR | _O_CREAT | _O_EXCL | _O_BINARY, ++ _SH_DENYRW, _S_IREAD | _S_IWRITE); ++ if (*fd < 0) ++ { ++ free (tmpname); ++ return -1; ++ } + *name = tmpname; + return 0; + } diff --git a/mingw-w64-gpgme/0003-mingw-mkstemp.patch b/mingw-w64-gpgme/0003-mingw-mkstemp.patch new file mode 100644 index 0000000000..84d9b95ca1 --- /dev/null +++ b/mingw-w64-gpgme/0003-mingw-mkstemp.patch @@ -0,0 +1,20 @@ +diff -urN a/src/w32-util.c b/src/w32-util.c +--- a/src/w32-util.c 2015-08-04 22:35:23.135700100 +0100 ++++ b/src/w32-util.c 2015-08-04 22:35:23.354100500 +0100 +@@ -596,6 +596,7 @@ + static const char letters[] = + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + ++#if __MINGW64_VERSION_MAJOR < 5 + /* Generate a temporary file name based on TMPL. TMPL must match the + rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed + does not exist at the time of the call to mkstemp. TMPL is +@@ -678,7 +679,7 @@ + gpg_err_set_errno (EEXIST); + return -1; + } +- ++#endif + + int + _gpgme_mkstemp (int *fd, char **name) diff --git a/mingw-w64-gpgme/0004-gpgme-find-gnupg.patch b/mingw-w64-gpgme/0004-gpgme-find-gnupg.patch new file mode 100644 index 0000000000..7974bd6649 --- /dev/null +++ b/mingw-w64-gpgme/0004-gpgme-find-gnupg.patch @@ -0,0 +1,53 @@ +diff -urN a/configure.ac b/configure.ac +--- a/configure.ac 2015-08-04 22:35:23.556900900 +0100 ++++ b/configure.ac 2015-08-04 22:35:24.087301800 +0100 +@@ -161,10 +161,10 @@ + *-mingw32ce*|*-mingw32*) + have_dosish_system=yes + have_w32_system=yes +- GPG_DEFAULT='c:\\gnupg\\gpg.exe' +- GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe' +- GPGCONF_DEFAULT='c:\\gnupg\\gpgconf.exe' +- G13_DEFAULT='c:\\gnupg\\g13.exe' ++ GPG_DEFAULT='gpg.exe' ++ GPGSM_DEFAULT='gpgsm.exe' ++ GPGCONF_DEFAULT='gpgconf.exe' ++ G13_DEFAULT='g13.exe' + #component_system='COM+' + + AM_PATH_GLIB_2_0 +diff -urN a/src/w32-util.c b/src/w32-util.c +--- a/src/w32-util.c 2015-08-04 22:35:23.525700800 +0100 ++++ b/src/w32-util.c 2015-08-04 22:35:24.087301800 +0100 +@@ -476,6 +476,7 @@ + gpg = find_program_in_dir (inst_dir, name); + } + ++#ifndef __MINGW32__ + /* 2. Try to find gpg.exe using that ancient registry key. */ + if (!gpg) + { +@@ -497,6 +497,7 @@ + name = default_gpg_name? default_gpg_name : "GNU\\GnuPG\\gpg.exe"; + gpg = find_program_at_standard_place (name); + } ++#endif + + /* 4. Print a debug message if not found. */ + if (!gpg) +@@ -523,6 +523,7 @@ + gpgconf = find_program_in_dir (inst_dir, name); + } + ++#ifndef __MINGW32__ + /* 2. Try to find gpgconf.exe from GnuPG >= 2.1 below CSIDL_PROGRAM_FILES. */ + if (!gpgconf) + { +@@ -552,6 +552,7 @@ + { + gpgconf = find_program_at_standard_place ("GNU\\GnuPG\\gpgconf.exe"); + } ++#endif + + /* 5. Print a debug message if not found. */ + if (!gpgconf) diff --git a/mingw-w64-gpgme/PKGBUILD b/mingw-w64-gpgme/PKGBUILD index 5b0d80e026..f8427207f4 100644 --- a/mingw-w64-gpgme/PKGBUILD +++ b/mingw-w64-gpgme/PKGBUILD @@ -1,48 +1,67 @@ # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=gpgme +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.5.1 +pkgver=1.6.0 pkgrel=1 -pkgdesc="A C wrapper library for GnuPG" +pkgdesc="A C wrapper library for GnuPG (mingw-w64)" arch=('any') url="http://www.gnupg.org/related_software/gpgme/" license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-libgpg-error" - "${MINGW_PACKAGE_PREFIX}-w32pth" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-gnupg") -options=('!emptydirs') -source=(ftp://ftp.gnupg.org/gcrypt/${_realname}/${_realname}-${pkgver}.tar.bz2{,.sig}) -sha1sums=('a91c258e79acf30ec86a667e07f835e5e79342d8' - 'SKIP') +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gnupg" + "${MINGW_PACKAGE_PREFIX}-libassuan" + "${MINGW_PACKAGE_PREFIX}-libgpg-error" + "${MINGW_PACKAGE_PREFIX}-npth" + ) +options=('!emptydirs') # '!strip' 'debug') +source=(https://www.gnupg.org/ftp/gcrypt/${_realname}/${_realname}-${pkgver}.tar.bz2 + 0001-fix-incorrect-fd-pointer-check.patch + 0002-reopen-mkstemp-files-without-_O_TEMPORARY.patch + 0003-mingw-mkstemp.patch + 0004-gpgme-find-gnupg.patch) +sha1sums=('21510323495f6220f8f67610c3c27a23d761d43d' + '1828be3a0fcab854325295bc4a1d026b8d711d82' + '6f70ede9db1c86f7e4d04ade0dc0aee720221ee9' + '471223b20b8181dc6c09278901bb546434d46568' + '18d1e0c0f215f465e7cbd45824f31941623174f9') prepare() { - cd ${srcdir}/${_realname}-${pkgver} + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/0001-fix-incorrect-fd-pointer-check.patch + patch -p1 -i "${srcdir}"/0002-reopen-mkstemp-files-without-_O_TEMPORARY.patch + patch -p1 -i "${srcdir}"/0003-mingw-mkstemp.patch + patch -p1 -i "${srcdir}"/0004-gpgme-find-gnupg.patch + autoreconf -ivf } build() { - mkdir -p "${srcdir}/build-${CARCH}" - cd "${srcdir}/build-${CARCH}" - "${srcdir}"/gpgme-${pkgver}/configure \ + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p "${srcdir}"/build-${MINGW_CHOST} && cd "${srcdir}"/build-${MINGW_CHOST} + + "${srcdir}"/${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --libexecdir=${MINGW_PREFIX}/lib \ + --libexecdir=${MINGW_PREFIX}/bin \ --disable-fd-passing \ - --disable-static \ + --enable-shared \ + --enable-static \ --disable-gpgsm-test + make } check() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}"/build-${MINGW_CHOST} #make check } package() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}"/build-${MINGW_CHOST} make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-gplugin/001-win.patch b/mingw-w64-gplugin/001-win.patch new file mode 100644 index 0000000000..ba578b38d3 --- /dev/null +++ b/mingw-w64-gplugin/001-win.patch @@ -0,0 +1,73 @@ +--- ./cmake/Modules/GObjectIntrospection.cmake.orig 2015-02-22 23:39:10.000000000 +0100 ++++ ./cmake/Modules/GObjectIntrospection.cmake 2015-05-10 19:44:47.568256600 +0200 +@@ -181,7 +181,7 @@ + set(ENV{CFLAGS} ${GIR_REAL_CFLAGS}) + add_custom_command( + OUTPUT ${GIR_FILENAME} +- COMMAND ${GIR_SCANNER} ${GIR_SCANNER_ARGS} ++ COMMAND CC=${CMAKE_C_COMPILER} ${GIR_SCANNER} ${GIR_SCANNER_ARGS} + --namespace=${GIR_NAMESPACE} + --nsversion=${GIR_NSVERSION} + ${GIR_REAL_CFLAGS} +--- ./gplugin/CMakeLists.txt.orig 2015-02-22 23:39:10.000000000 +0100 ++++ ./gplugin/CMakeLists.txt 2015-05-10 19:44:47.620258900 +0200 +@@ -196,14 +196,6 @@ + add_executable(gplugin-query gplugin-query.c) + target_link_libraries(gplugin-query ${GLIB_LIBRARIES} gplugin) + +-help2man( +- TARGET gplugin-query +- OUTPUT gplugin-query.1 +- SECTION 1 +- NAME "Query installed plugins" +- HELP_OPTION --help-all +-) +- + ############################################################################### + # loader-tests static library + ############################################################################### +--- ./gplugin/gplugin-manager.c.orig 2015-05-10 20:02:00.022359200 +0200 ++++ ./gplugin/gplugin-manager.c 2015-05-10 20:02:12.100326200 +0200 +@@ -1119,7 +1119,11 @@ + gplugin_manager_add_default_paths(void) { + gchar *path; + +- path = g_build_filename(PREFIX, LIBDIR, "gplugin", NULL); ++ gchar *dir; ++ ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ path = g_build_filename(dir, "lib", "gplugin", NULL); ++ g_free (dir); + gplugin_manager_prepend_path(path); + g_free(path); + +@@ -1146,7 +1146,11 @@ + + g_return_if_fail(appname != NULL); + +- path = g_build_filename(prefix, LIBDIR, appname, NULL); ++ gchar *dir; ++ ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ path = g_build_filename(dir, "lib", appname, NULL); ++ g_free (dir); + gplugin_manager_prepend_path(path); + g_free(path); + +--- ./gplugin-gtk/gplugin-gtk-plugin-info.c.orig 2015-05-10 20:00:56.780137100 +0200 ++++ ./gplugin-gtk/gplugin-gtk-plugin-info.c 2015-05-10 20:01:16.721412000 +0200 +@@ -239,8 +239,13 @@ + + /* load the ui from the GtkBuilder file */ + priv->builder = gtk_builder_new(); +- filename = g_build_filename(PREFIX, "share", "gplugin", "gplugin-gtk", ++ ++ gchar *dir; ++ ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ filename = g_build_filename(dir, "share", "gplugin", "gplugin-gtk", + "gplugin-gtk-plugin-info.ui", NULL); ++ g_free (dir); + gtk_builder_add_from_file(priv->builder, filename, &error); + if(error) { + g_warning("%s", error->message); diff --git a/mingw-w64-gplugin/PKGBUILD b/mingw-w64-gplugin/PKGBUILD new file mode 100644 index 0000000000..fd5413909c --- /dev/null +++ b/mingw-w64-gplugin/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Andrea Zagli + +_realname=gplugin +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.0.21 +pkgrel=3 +arch=('any') +pkgdesc="A GObject based library that implements a reusable plugin system (mingw-w64)" +license=("LGPL 2") +url="https://bitbucket.org/rw_grim/gplugin" +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libxslt") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "gettext") +options=('strip' '!debug' 'staticlibs') +source=("${_realname}-${pkgver}.tar.bz2"::https://bitbucket.org/rw_grim/${_realname}/get/v${pkgver}.tar.bz2 + 001-win.patch) +sha256sums=('df6c0cb47605c5f38fed6aad216fbaa97bb47378de70103884eaa43252af0314' + '3b5ef908992fe9073a0c14de9b58e81a0a11969f50e28fbd1a34fd7f3bbd13ce') + +prepare() { + cd rw_grim-gplugin-* + + patch -p1 -i ${srcdir}/001-win.patch +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_C_FLAGS="${CFLAGS}" \ + -DBUILD_GJS=OFF \ + -DBUILD_LUA=OFF \ + -DBUILD_PYTHON=ON \ + -DBUILD_SEED=OFF \ + -DTESTING_ENABLED=OFF \ + -DBUILD_GIR=ON \ + ../rw_grim-gplugin-* + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} + cp ${srcdir}/rw_grim-gplugin-*/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + + mv "${pkgdir}${MINGW_PREFIX}"/lib/libgplugin.dll "${pkgdir}${MINGW_PREFIX}"/bin/ + mv "${pkgdir}${MINGW_PREFIX}"/lib/libgplugin-gtk.dll "${pkgdir}${MINGW_PREFIX}"/bin/ +} diff --git a/mingw-w64-gprbuild-gpl/0001_gnat_vmsp.patch b/mingw-w64-gprbuild-gpl/0001_gnat_vmsp.patch new file mode 100644 index 0000000000..a90573203a --- /dev/null +++ b/mingw-w64-gprbuild-gpl/0001_gnat_vmsp.patch @@ -0,0 +1,21 @@ +diff -rup gprbuild-gpl-2014-src-org/src/gprbuild_dummies.c gprbuild-gpl-2014-src/src/gprbuild_dummies.c +--- gprbuild-gpl-2014-src-org/src/gprbuild_dummies.c 2014-04-17 17:50:18.000000000 +0800 ++++ gprbuild-gpl-2014-src/src/gprbuild_dummies.c 2015-11-06 19:01:10.384185700 +0800 +@@ -27,3 +27,5 @@ void set_std_prefix (void) { + void update_path (void) { + abort (); + } ++ ++const int __gnat_vmsp = 0; +diff -rup gprbuild-gpl-2014-src-org/src/gprbuild-compilation-slave.adb gprbuild-gpl-2014-src/src/gprbuild-compilation-slave.adb +--- gprbuild-gpl-2014-src-org/src/gprbuild-compilation-slave.adb 2014-04-17 17:50:17.000000000 +0800 ++++ gprbuild-gpl-2014-src/src/gprbuild-compilation-slave.adb 2015-11-06 19:31:27.816735300 +0800 +@@ -817,7 +817,7 @@ package body Gprbuild.Compilation.Slave + S : Slave := Slave_S.Element (C); + begin + Proc (S); +- Pool (C) := S; ++ Pool.Replace_Element (Position => C, New_Item => S); + end; + end loop; + end Iterate; diff --git a/mingw-w64-gprbuild-gpl/PKGBUILD b/mingw-w64-gprbuild-gpl/PKGBUILD index d910b3fa83..5bde4bb471 100644 --- a/mingw-w64-gprbuild-gpl/PKGBUILD +++ b/mingw-w64-gprbuild-gpl/PKGBUILD @@ -1,32 +1,33 @@ # Maintainer: Jürgen Pfeifer -# -# The 2014 version doesn't comile, need to investigate -# -_basename=gprbuild + _realname=gprbuild-gpl pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgrel=1 -pkgver=2013 +pkgver=2014 pkgdesc="Software tool designed to help automate the construction of multi-language systems" arch=('any') -provides=("${MINGW_PACKAGE_PREFIX}-${_basename}") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname%-*}") license=('GPL3') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-ada" - "${MINGW_PACKAGE_PREFIX}-xmlada") + #"${MINGW_PACKAGE_PREFIX}-xmlada" + ) depends=("${MINGW_PACKAGE_PREFIX}-gcc-ada" - "${MINGW_PACKAGE_PREFIX}-xmlada") + # "${MINGW_PACKAGE_PREFIX}-xmlada" + ) url="http://www.adacore.com/gnatpro/toolsuite/gprbuild/" -source=("http://downloads.dragonlace.net/src/${_realname}-${pkgver}-src.tgz") -sha1sums=('71c6278fd19f80ba4574de2696bfb3cbb9be4b70') +source=("http://downloads.dragonlace.net/src/${_realname}-${pkgver}-src.tar.gz" + "0001_gnat_vmsp.patch") +sha1sums=('bf7f9e6a0efb7f00a0d020d7d2eff5cc1c9b5076') prepare() { - cd ${srcdir}/${_basename}-${pkgver}-src + cd ${srcdir}/${_realname}-${pkgver}-src + + patch -p1 -i "${srcdir}/0001_gnat_vmsp.patch" } build() { - cd ${srcdir}/${_basename}-${pkgver}-src + cd ${srcdir}/${_realname}-${pkgver}-src if [ -f Makefile ]; then make distclean fi @@ -34,16 +35,15 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} - + make } package() { - cd ${srcdir}/${_basename}-${pkgver}-src + cd ${srcdir}/${_realname}-${pkgver}-src make prefix="${pkgdir}${MINGW_PREFIX}" INSTALL=cp install # Copy License Files - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -pf COPYING* \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} + cp -pf COPYING* ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/ } diff --git a/mingw-w64-graphicsmagick/001-relocate.patch b/mingw-w64-graphicsmagick/001-relocate.patch index 38f0d23823..eb2f99ba4e 100644 --- a/mingw-w64-graphicsmagick/001-relocate.patch +++ b/mingw-w64-graphicsmagick/001-relocate.patch @@ -74,7 +74,7 @@ diff -Naur GraphicsMagick-1.3.20-orig/magick/delegate.c GraphicsMagick-1.3.20/ma + } + strcpy(BinPath,exe_path); +# else - strcpy(BinPath,MagickBinPath); + strlcpy(BinPath,MagickBinPath,sizeof(BinPath)); +# endif # else { diff --git a/mingw-w64-graphicsmagick/PKGBUILD b/mingw-w64-graphicsmagick/PKGBUILD index cac9348667..7c487828b4 100644 --- a/mingw-w64-graphicsmagick/PKGBUILD +++ b/mingw-w64-graphicsmagick/PKGBUILD @@ -1,32 +1,32 @@ # Maintainer: Alexey Pavlov _realname=graphicsmagick +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.20 +pkgver=1.3.23 pkgrel=2 pkgdesc="An image viewing/manipulation program (mingw-w64)" arch=('any') url="http://www.graphicsmagick.org/" license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-ghostscript" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libwebp") + "${MINGW_PACKAGE_PREFIX}-ghostscript" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-jbigkit" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-libtool" - "${MINGW_PACKAGE_PREFIX}-xz" - "${MINGW_PACKAGE_PREFIX}-zlib" - #"${MINGW_PACKAGE_PREFIX}-perl" - ) + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-jbigkit" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-libtool" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib") + #"${MINGW_PACKAGE_PREFIX}-perl" optdepends=("${MINGW_PACKAGE_PREFIX}-ghostscript: for Ghostscript support" "${MINGW_PACKAGE_PREFIX}-libxml2: for XML support" "${MINGW_PACKAGE_PREFIX}-jasper: for JPEG-2000 support" @@ -36,13 +36,13 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-ghostscript: for Ghostscript support" options=('staticlibs' 'strip' 'libtool') source=(http://sourceforge.net/projects/graphicsmagick/files/${_realname}/${pkgver}/GraphicsMagick-${pkgver}.tar.xz 001-relocate.patch) -md5sums=('5bb456e3466026ada6f12cc53c9776dc' - '44ebff623519daa9be86ee6a6aaea2b6') +md5sums=('9885ff5d91bc215a0adb3be1185e9777' + '7ff566f64baa2f2e198717aab2d937b5') prepare() { cd GraphicsMagick-${pkgver} patch -p1 -i ${srcdir}/001-relocate.patch - + autoreconf -fiv } @@ -71,6 +71,7 @@ build() { --without-dps \ --without-perl \ --without-x + make } diff --git a/mingw-w64-graphviz/PKGBUILD b/mingw-w64-graphviz/PKGBUILD new file mode 100644 index 0000000000..0e1d584d3f --- /dev/null +++ b/mingw-w64-graphviz/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Ray Donnelly + +_realname=graphviz +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.38.0 +pkgrel=1 +pkgdesc="Graph Visualization Software (mingw-w64)" +arch=('any') +url='http://www.graphviz.org/' +license=('EPL') +source=("http://www.graphviz.org/pub/${_realname}/stable/SOURCES/${_realname}-${pkgver}.tar.gz") +sha1sums=('053c771278909160916ca5464a0a98ebf034c6ef') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} +} + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make +} + +check() { + cd "${srcdir}"/build-${CARCH} + make check +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-grep/PKGBUILD b/mingw-w64-grep/PKGBUILD new file mode 100644 index 0000000000..4a1364eaa6 --- /dev/null +++ b/mingw-w64-grep/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Alexey Pavlov +# Contributor: Paul Moore + +_realname=grep +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.21 +pkgrel=2 +pkgdesc="Grep searches one or more input files for lines containing a match to a specified pattern (mingw-w64)" +arch=('any') +url='http://www.gnu.org/software/grep/' +license=('GPL3') +depends=("${MINGW_PACKAGE_PREFIX}-pcre") +options=('strip' '!libtool' 'staticlibs') +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.xz") +md5sums=('43c48064d6409862b8a850db83c8038a') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} +} + +build() { + cd ${srcdir}/${_realname}-${pkgver} + ./configure --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make install DESTDIR="${pkgdir}" + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-gsasl/PKGBUILD b/mingw-w64-gsasl/PKGBUILD index 014d36efc2..5228f855cd 100644 --- a/mingw-w64-gsasl/PKGBUILD +++ b/mingw-w64-gsasl/PKGBUILD @@ -3,7 +3,7 @@ _realname=gsasl pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.8.0 -pkgrel=1 +pkgrel=3 pkgdesc="Simple Authentication and Security Layer framework and a few common SASL mechanisms (mingw-w64)" arch=('any') url="http://josefsson.org/gsasl/" @@ -28,10 +28,11 @@ prepare() { } build() { - #mkdir -p build-${MINGW_CHOST} - #cd build-${MINGW_CHOST} - cd ${_realname}-${pkgver} - ./configure \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -39,10 +40,11 @@ build() { --enable-shared \ --enable-static \ --disable-kerberos_v5 + make -j1 } package() { - cd ${_realname}-${pkgver} + cd build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-gsettings-desktop-schemas/PKGBUILD b/mingw-w64-gsettings-desktop-schemas/PKGBUILD index 4fc1497e36..f1b8aedcf0 100644 --- a/mingw-w64-gsettings-desktop-schemas/PKGBUILD +++ b/mingw-w64-gsettings-desktop-schemas/PKGBUILD @@ -2,7 +2,7 @@ _realname=gsettings-desktop-schemas pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.16.1 pkgrel=1 arch=('any') url="http://live.gnome.org/" @@ -12,31 +12,31 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" "intltool") license=('GPL') options=('strip' 'staticlibs') install=schemas-${CARCH}.install -source=("http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz") -md5sums=('14df59945fc9027b303ecfa75200a0c9') +source=("http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +sha256sums=('74fe9fdad510c8a6666febeceb7ebafc581ef990b3afcc8c1e8b5d90b24b3461') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" autoreconf -fi } build() { - rm -rf $srcdir/build-${MINGW_CHOST} - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - ../${_realname}-$pkgver/configure \ + rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-schemas-compile \ --enable-introspection + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - mv ${pkgdir}${MINGW_PREFIX}/share/pkgconfig ${pkgdir}${MINGW_PREFIX}/lib/ + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-gsl/PKGBUILD b/mingw-w64-gsl/PKGBUILD index 99ce70ae47..64e6c399a4 100644 --- a/mingw-w64-gsl/PKGBUILD +++ b/mingw-w64-gsl/PKGBUILD @@ -1,30 +1,33 @@ # Maintainer: Alexey Pavlov _realname=gsl - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.16 -pkgrel=2 +pkgver=2.1 +pkgrel=1 pkgdesc="The GNU Scientific Library (GSL) is a modern numerical library for C and C++ programmers (mingw-w64)" arch=('any') url="http://www.gnu.org/software/gsl/gsl.html" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('staticlibs' 'strip') -source=("http://mirror.ibcp.fr/pub/gnu/gsl/gsl-$pkgver.tar.gz") -md5sums=('e49a664db13d81c968415cd53f62bc8b') +source=("http://mirror.ibcp.fr/pub/gnu/gsl/${_realname}-${pkgver}.tar.gz") +md5sums=('d8f70abafd3e9f0bae03c52d1f4e8de5') build() { - cd "$srcdir/gsl-$pkgver" - mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - ../configure \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} - make + + make } package() { - cd "${srcdir}/gsl-${pkgver}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-gsm/PKGBUILD b/mingw-w64-gsm/PKGBUILD index c0bb2c4161..2c4a3ddcb2 100644 --- a/mingw-w64-gsm/PKGBUILD +++ b/mingw-w64-gsm/PKGBUILD @@ -1,20 +1,19 @@ # Maintainer: Alexey Pavlov _realname=gsm - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.13 -pkgrel=2 +pkgrel=3 pkgdesc="Shared libraries for GSM 06.10 lossy speech compression (mingw-w64)" arch=('any') url="http://www.quut.com/gsm/" license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "yasm") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-yasm") options=('strip' 'staticlibs') source=("http://www.quut.com/${_realname}/${_realname}-${pkgver}.tar.gz" - 0001-adapt-makefile-to.mingw.patch - 0002-adapt-config-h-to.mingw.patch - 0003-fix-ln.mingw.patch) + 0001-adapt-makefile-to.mingw.patch + 0002-adapt-config-h-to.mingw.patch + 0003-fix-ln.mingw.patch) md5sums=('c1ba392ce61dc4aff1c29ea4e92f6df4' '7956623dd6ecf75fedbc37acb65ce451' '50841d8e3e1d3c345c719748dc8d8786' @@ -39,8 +38,7 @@ package() { # Prepare directories install -m755 -d "${pkgdir}${MINGW_PREFIX}"/{bin,lib,include,share/{licenses/${_realname},man/man{1,3}}} - make -j1 INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" \ - install + make -j1 INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" install # Install license install -m644 COPYRIGHT ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/license.txt diff --git a/mingw-w64-gspell/PKGBUILD b/mingw-w64-gspell/PKGBUILD new file mode 100644 index 0000000000..d0e8504e3a --- /dev/null +++ b/mingw-w64-gspell/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Andrea Zagli + +_realname=gspell +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.1.1 +pkgrel=1 +arch=('any') +pkgdesc="Spell-checking library for GTK+ (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gtksourceview3" + "${MINGW_PACKAGE_PREFIX}-iso-codes" + "${MINGW_PACKAGE_PREFIX}-enchant" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +license=("GPL 2") +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz) +sha256sums=('fef8cd89d220fc9ad6b69ff625ca2263a09c69ba56fcefcc90cf4422896e4c52') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + autoreconf -sf +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-gss-git/001-autoconf.patch b/mingw-w64-gss/001-autoconf.patch similarity index 59% rename from mingw-w64-gss-git/001-autoconf.patch rename to mingw-w64-gss/001-autoconf.patch index 8165de29a2..4f8ee7ea19 100644 --- a/mingw-w64-gss-git/001-autoconf.patch +++ b/mingw-w64-gss/001-autoconf.patch @@ -9,12 +9,3 @@ gl_EARLY libgl_EARLY srcgl_EARLY -@@ -53,7 +53,7 @@ - - # Internationalization. - AM_GNU_GETTEXT([external]) --AM_GNU_GETTEXT_VERSION([0.18.1]) -+AM_GNU_GETTEXT_VERSION([0.18.3]) - - # For gnulib stuff. - gl_INIT diff --git a/mingw-w64-gss-git/002-gnulib.patch b/mingw-w64-gss/002-gnulib.patch similarity index 83% rename from mingw-w64-gss-git/002-gnulib.patch rename to mingw-w64-gss/002-gnulib.patch index c9b2b8b5f2..e0d3c4c998 100644 --- a/mingw-w64-gss-git/002-gnulib.patch +++ b/mingw-w64-gss/002-gnulib.patch @@ -1,33 +1,3 @@ -diff --git a/src/gl/msvc-inval.c b/src/gl/msvc-inval.c ---- a/src/gl/msvc-inval.c -+++ b/src/gl/msvc-inval.c -@@ -28,7 +28,7 @@ - - # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING - --static void cdecl -+static void __cdecl - gl_msvc_invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, -@@ -45,7 +45,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression, - - # if defined _MSC_VER - --static void cdecl -+static void __cdecl - gl_msvc_invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, -@@ -94,7 +94,7 @@ gl_msvc_inval_current (void) - } - } - --static void cdecl -+static void __cdecl - gl_msvc_invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, --- /dev/null 2014-07-18 12:33:18.000000000 +0400 +++ b/src/gl/getline.c 2014-07-18 12:30:11.369400000 +0400 @@ -0,0 +1,27 @@ diff --git a/mingw-w64-gss-git/PKGBUILD b/mingw-w64-gss/PKGBUILD similarity index 57% rename from mingw-w64-gss-git/PKGBUILD rename to mingw-w64-gss/PKGBUILD index aeea032863..af3975f18e 100644 --- a/mingw-w64-gss-git/PKGBUILD +++ b/mingw-w64-gss/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gss -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=r1479.6fdb450 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +pkgver=1.0.3 pkgrel=1 pkgdesc="GNU Generic Security Service (mingw-w64)" arch=('any') @@ -13,42 +12,36 @@ license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git" "wget" "texinfo") options=('strip' 'staticlibs') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-shishi") -source=("${_realname}"::"git+git://git.sv.gnu.org/gss.git" +source=(ftp://ftp.gnu.org/gnu/gss/${_realname}-${pkgver}.tar.gz{,.sig} 001-autoconf.patch 002-gnulib.patch) -md5sums=('SKIP' - 'c1992b9d05bf29af92d44b84b5b80189' - '4984e4ef1bc87635b9d71cd96b8a3737') - -pkgver() { - cd "$srcdir/$_realname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} +md5sums=('441859b30bed73010d426c087c71aac5' + 'SKIP' + '1d8b5c6304addb6457f62a7a30b3bdce' + '65794ac1b601166816f5266f44126ab6') prepare() { - cd ${_realname} + cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-autoconf.patch patch -p1 -i ${srcdir}/002-gnulib.patch touch doc/Makefile.gdoc - rm -f aclocal.m4 - cp -rf build-aux/snippet ${srcdir}/ + WANT_AUTOMAKE=latest autoreconf -fi - cp -rf ${srcdir}/snippet build-aux/ - cd .. - - cp -rf ${_realname} build-${MINGW_CHOST} + } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ --enable-static - make update-po + make -j1 } diff --git a/mingw-w64-gst-editing-services/0001-make-mingw-find-gir-scanner.patch b/mingw-w64-gst-editing-services/0001-make-mingw-find-gir-scanner.patch deleted file mode 100644 index 004d57b884..0000000000 --- a/mingw-w64-gst-editing-services/0001-make-mingw-find-gir-scanner.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 81271719a4f1737f4a0a7af0ac302d6e4b6507b3 Mon Sep 17 00:00:00 2001 -From: Lubosz Sarnecki -Date: Wed, 30 Jul 2014 15:52:25 +0200 -Subject: [PATCH 1/2] make mingw find gir scanner - ---- - ges/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ges/Makefile.am b/ges/Makefile.am -index 5b341ce..859a33f 100644 ---- a/ges/Makefile.am -+++ b/ges/Makefile.am -@@ -168,6 +168,7 @@ gir_cincludes+=$(patsubst %,--c-include='ges/%',$(nodist_libges_@GST_API_VERSION - - GES-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libges-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GES \ - --nsversion=@GST_API_VERSION@ \ - --identifier-prefix=GES \ --- -2.0.4 - diff --git a/mingw-w64-gst-editing-services/0003-fix-introspection-syntax.patch b/mingw-w64-gst-editing-services/0003-fix-introspection-syntax.patch new file mode 100644 index 0000000000..76d16f4c9e --- /dev/null +++ b/mingw-w64-gst-editing-services/0003-fix-introspection-syntax.patch @@ -0,0 +1,45 @@ +--- gstreamer-editing-services-1.6.1/ges/ges-track-element.c.orig 2015-11-02 12:02:31.273729700 +0300 ++++ gstreamer-editing-services-1.6.1/ges/ges-track-element.c 2015-11-02 12:04:23.608495100 +0300 +@@ -264,15 +264,15 @@ + G_TYPE_NONE, 1, GST_TYPE_CONTROL_BINDING); + + /** +- * GESTrackElement::control-binding-added: ++ * GESTrackElement::control-binding-removed: + * @track_element: a #GESTrackElement +- * @control_binding: the #GstControlBinding that has been added ++ * @control_binding: the #GstControlBinding that has been removed + * +- * The control-bunding-added is emitted each time a control binding +- * is added for a child property of @track_element ++ * The control-binding-removed is emitted each time a control binding ++ * is removed from a child property of @track_element + */ + ges_track_element_signals[CONTROL_BINDING_REMOVED] = +- g_signal_new ("control-binding-reomved", G_TYPE_FROM_CLASS (klass), ++ g_signal_new ("control-binding-removed", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 1, GST_TYPE_CONTROL_BINDING); + +--- gstreamer-editing-services-1.6.1/ges/ges-extractable.c.orig 2015-11-02 12:06:11.201734700 +0300 ++++ gstreamer-editing-services-1.6.1/ges/ges-extractable.c 2015-11-02 12:07:18.658988300 +0300 +@@ -136,7 +136,7 @@ + * ges_extractable_get_id: + * @self: The #GESExtractable + * +- * Returns: (transfer full) The #id of the associated #GESAsset, free with #g_free ++ * Returns: (transfer full): The #id of the associated #GESAsset, free with #g_free + */ + gchar * + ges_extractable_get_id (GESExtractable * self) +--- gstreamer-editing-services-1.6.1/ges/ges-timeline-element.c.orig 2015-11-02 12:15:07.607088800 +0300 ++++ gstreamer-editing-services-1.6.1/ges/ges-timeline-element.c 2015-11-02 12:15:18.545994800 +0300 +@@ -1259,7 +1259,7 @@ + } + + /** +- * ges_track_element_get_child_property_by_pspec: ++ * ges_timeline_element_get_child_property_by_pspec: + * @self: a #GESTrackElement + * @pspec: The #GParamSpec that specifies the property you want to get + * @value: (out): return location for the value diff --git a/mingw-w64-gst-editing-services/PKGBUILD b/mingw-w64-gst-editing-services/PKGBUILD index 5873b05d8a..a26feb234f 100644 --- a/mingw-w64-gst-editing-services/PKGBUILD +++ b/mingw-w64-gst-editing-services/PKGBUILD @@ -1,55 +1,57 @@ # Maintainer: Lubosz Sarnecki +_srcname=gstreamer-editing-services _realname=gst-editing-services +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.2.1 +pkgver=1.6.1 pkgrel=1 pkgdesc="GStreamer Editing Services (mingw-w64)" arch=('any') url="http://gstreamer.freedesktop.org/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" - "git") + "${MINGW_PACKAGE_PREFIX}-python2") depends=("${MINGW_PACKAGE_PREFIX}-gst-plugins-base" "${MINGW_PACKAGE_PREFIX}-gstreamer") options=(!libtool strip staticlibs) -source=("git://anongit.freedesktop.org/gstreamer/$_realname#tag=${pkgver}" - 0001-make-mingw-find-gir-scanner.patch +source=(http://gstreamer.freedesktop.org/src/${_realname}/${_srcname}-${pkgver}.tar.xz 0002-add-cflags-for-gir.patch - ) -md5sums=('SKIP' - '38b10c073e9ccd3dfbeab28e151fdc9a' - '650a069277d5b0e85f8be15948e2d03a') + 0003-fix-introspection-syntax.patch) +md5sums=('2e2041ef576d702014f7f6064ac75d31' + '650a069277d5b0e85f8be15948e2d03a' + 'e9802c5b161902615a49094175e31cc9') prepare() { - cd $_realname - git am ../0001-make-mingw-find-gir-scanner.patch - git am ../0002-add-cflags-for-gir.patch - NOCONFIGURE=1 ./autogen.sh + cd ${_srcname}-${pkgver} + patch -p1 -i ${srcdir}/0002-add-cflags-for-gir.patch + patch -p1 -i ${srcdir}/0003-fix-introspection-syntax.patch + + autoreconf -fiv + #NOCONFIGURE=1 ./autogen.sh } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -rf ${_realname} "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + ../${_srcname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --disable-static \ --enable-shared \ --enable-silent-rules \ - --enable-experimental \ --disable-gtk-doc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gst-libav/PKGBUILD b/mingw-w64-gst-libav/PKGBUILD index 63197f4443..f75ba38d77 100644 --- a/mingw-w64-gst-libav/PKGBUILD +++ b/mingw-w64-gst-libav/PKGBUILD @@ -1,28 +1,29 @@ # Maintainer: AlexWMF _realname=gst-libav +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.4 +pkgver=1.6.1 pkgrel=1 pkgdesc="GStreamer libav (mingw-w64)" arch=('any') url="http://gstreamer.freedesktop.org/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" - "yasm" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + "yasm" ) depends=("${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" - "${MINGW_PACKAGE_PREFIX}-gstreamer") + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" + "${MINGW_PACKAGE_PREFIX}-gstreamer") options=(!libtool strip staticlibs) source=(${url}/src/${_realname}/${_realname}-${pkgver}.tar.xz) -md5sums=('64a3e2cda2687132cadca4efdc63f3b4') +md5sums=('058b22411e1690eee5b71d1ab44eab25') prepare() { cd ${srcdir}/${_realname}-${pkgver} - + NOCONFIGURE=1 ./autogen.sh } @@ -30,6 +31,7 @@ build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + MSYSTEM=mingw32 \ ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -43,6 +45,6 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gst-plugins-bad/0001-give-cc-to-gir-scanner.mingw.patch b/mingw-w64-gst-plugins-bad/0001-give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index 133b105750..0000000000 --- a/mingw-w64-gst-plugins-bad/0001-give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -Naur gst-plugins-bad-1.3.3-orig/gst-libs/gst/insertbin/Makefile.am gst-plugins-bad-1.3.3/gst-libs/gst/insertbin/Makefile.am ---- gst-plugins-bad-1.3.3-orig/gst-libs/gst/insertbin/Makefile.am 2013-09-04 20:27:43.000000000 +0400 -+++ gst-plugins-bad-1.3.3/gst-libs/gst/insertbin/Makefile.am 2014-07-11 01:07:54.704800000 +0400 -@@ -31,13 +31,16 @@ - GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstInsertBin \ - --nsversion=@GST_API_VERSION@ \ -- --strip-prefix=Gst \ -+ --identifier-prefix=Gst \ -+ --symbol-prefix=gst \ - --warn-all \ - --c-include "gst/insertbin/gstinsertbin.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ `$(PKG_CONFIG) --cflags-only-I gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstinsertbin-@GST_API_VERSION@.la \ -@@ @@ -70,6 +70,7 @@ - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -+ --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=includedir gstreamer-@GST_API_VERSION@` \ - --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) -diff -Naur gst-plugins-bad-1.3.3-orig/gst-libs/gst/mpegts/Makefile.am gst-plugins-bad-1.3.3/gst-libs/gst/mpegts/Makefile.am ---- gst-plugins-bad-1.3.3-orig/gst-libs/gst/mpegts/Makefile.am 2014-04-30 10:45:01.000000000 +0400 -+++ gst-plugins-bad-1.3.3/gst-libs/gst/mpegts/Makefile.am 2014-07-11 01:08:17.371600000 +0400 -@@ -65,6 +65,7 @@ - GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstMpegts \ - --nsversion=@GST_API_VERSION@ \ - --identifier-prefix=GstMpegTs \ -@@ -75,6 +75,7 @@ - --c-include "gst/mpegts/mpegts.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ `$(PKG_CONFIG) --cflags-only-I gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \ - --library=libgstmpegts-@GST_API_VERSION@.la \ -@@ -104,6 +104,7 @@ - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -+ --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=includedir gstreamer-@GST_API_VERSION@` \ - --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) diff --git a/mingw-w64-gst-plugins-bad/0004-fix-X-detection.mingw.patch b/mingw-w64-gst-plugins-bad/0004-fix-X-detection.mingw.patch deleted file mode 100644 index 5f6282a4ed..0000000000 --- a/mingw-w64-gst-plugins-bad/0004-fix-X-detection.mingw.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/common/m4/gst-x11.m4.orig 2012-03-27 11:24:15.000000000 +0400 -+++ b/common/m4/gst-x11.m4 2014-07-10 20:46:24.623600000 +0400 -@@ -9,7 +9,9 @@ - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - - dnl now try to find the HEADER -- AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") -+ HAVE_X="yes" -+ AC_CHECK_HEADER([X11/Xlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) -+ AC_CHECK_HEADER([X11/XKBlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) - - if test "x$HAVE_X" = "xno" - then diff --git a/mingw-w64-gst-plugins-bad/0005-Include-glext-h.patch b/mingw-w64-gst-plugins-bad/0005-Include-glext-h.patch new file mode 100644 index 0000000000..51ab258335 --- /dev/null +++ b/mingw-w64-gst-plugins-bad/0005-Include-glext-h.patch @@ -0,0 +1,22 @@ +diff -urN gst-plugins-bad-1.6.1.orig/tests/examples/gl/sdl/sdlshare.c gst-plugins-bad-1.6.1/tests/examples/gl/sdl/sdlshare.c +--- gst-plugins-bad-1.6.1.orig/tests/examples/gl/sdl/sdlshare.c 2015-11-02 18:28:09.641044400 +0000 ++++ gst-plugins-bad-1.6.1/tests/examples/gl/sdl/sdlshare.c 2015-11-02 18:28:12.358449300 +0000 +@@ -26,6 +26,7 @@ + #endif + + #include ++#include + #include "SDL/SDL.h" + #include "SDL/SDL_opengl.h" + +diff -urN gst-plugins-bad-1.6.1.orig/tests/examples/gl/sdl/sdlshare2.c gst-plugins-bad-1.6.1/tests/examples/gl/sdl/sdlshare2.c +--- gst-plugins-bad-1.6.1.orig/tests/examples/gl/sdl/sdlshare2.c 2015-11-02 18:28:09.641044400 +0000 ++++ gst-plugins-bad-1.6.1/tests/examples/gl/sdl/sdlshare2.c 2015-11-02 18:28:12.358449300 +0000 +@@ -26,6 +26,7 @@ + #endif + + #include ++#include + #include "SDL/SDL.h" + #include "SDL/SDL_opengl.h" + diff --git a/mingw-w64-gst-plugins-bad/0005-fix-cast-errors.patch b/mingw-w64-gst-plugins-bad/0005-fix-cast-errors.patch deleted file mode 100644 index b9d90f29ad..0000000000 --- a/mingw-w64-gst-plugins-bad/0005-fix-cast-errors.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- gst-plugins-bad-1.3.3/sys/winks/gstksvideodevice.c.orig 2014-03-21 18:07:47.000000000 +0400 -+++ gst-plugins-bad-1.3.3/sys/winks/gstksvideodevice.c 2014-07-11 12:12:35.533200000 +0400 -@@ -628,7 +628,7 @@ - KSPROPERTY_STREAM_MASTERCLOCK, (gpointer *) & cur_clock_handle, - &cur_clock_handle_size, NULL)) { - GST_DEBUG ("current master clock handle: 0x%08x", -- (guint) * cur_clock_handle); -+ (guint) (guintptr) * cur_clock_handle); - CloseHandle (*cur_clock_handle); - g_free (cur_clock_handle); - } else { ---- gst-plugins-bad-1.3.3/sys/winks/ksvideohelpers.c.orig 2014-03-21 18:07:47.000000000 +0400 -+++ gst-plugins-bad-1.3.3/sys/winks/ksvideohelpers.c 2014-07-11 12:14:49.519200000 +0400 -@@ -183,8 +183,8 @@ - GST_DEBUG ("Unknown DirectShow Video GUID %08x-%04x-%04x-%04x-%08x%04x", - (guint) subtype_guid.Data1, (guint) subtype_guid.Data2, - (guint) subtype_guid.Data3, -- (guint) subtype_guid.Data4, (guint) & subtype_guid.Data4[2], -- (guint) & subtype_guid.Data4[6]); -+ (guint) (guintptr) subtype_guid.Data4, (guint) (guintptr) & subtype_guid.Data4[2], -+ (guint) (guintptr) & subtype_guid.Data4[6]); - } - - return structure; diff --git a/mingw-w64-gst-plugins-bad/0006-No-X11-on-_WIN32.patch b/mingw-w64-gst-plugins-bad/0006-No-X11-on-_WIN32.patch new file mode 100644 index 0000000000..eb16edcda1 --- /dev/null +++ b/mingw-w64-gst-plugins-bad/0006-No-X11-on-_WIN32.patch @@ -0,0 +1,22 @@ +--- gst-plugins-bad-1.6.1/tests/examples/gl/gtk/3dvideo/main.cpp.orig 2015-10-22 09:04:08.000000000 +0100 ++++ gst-plugins-bad-1.6.1/tests/examples/gl/gtk/3dvideo/main.cpp 2015-11-02 18:30:09.348270600 +0000 +@@ -23,7 +23,9 @@ + #endif + + #include ++#if !defined(_WIN32) + #include ++#endif + + #include + #include +@@ -259,7 +261,9 @@ + GtkWidget *area, *combo, *w; + const gchar *uri; + ++#if !defined(_WIN32) + XInitThreads (); ++#endif + + gst_init (&argc, &argv); + gtk_init (&argc, &argv); diff --git a/mingw-w64-gst-plugins-bad/1.txt b/mingw-w64-gst-plugins-bad/1.txt new file mode 100644 index 0000000000..ff3221becf --- /dev/null +++ b/mingw-w64-gst-plugins-bad/1.txt @@ -0,0 +1,34 @@ +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1482:typedef struct __GLsync *GLsync; +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1591:typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1592:typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1593:typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1594:typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1595:typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1597:typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1611:GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1612:GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1613:GLAPI void APIENTRY glDeleteSync (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1614:GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1615:GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:1617:GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:2957:typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glcorearb.h:2959:GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1369:typedef struct __GLsync *GLsync; +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1478:typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1479:typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1480:typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1481:typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1482:typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1484:typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1498:GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1499:GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1500:GLAPI void APIENTRY glDeleteSync (GLsync sync); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1501:GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1502:GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:1504:GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:2929:typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:2931:GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:8456:typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:8458:GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:8640:typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture); +C:/building/msys64/mingw64/x86_64-w64-mingw32/include/GL/glext.h:8644:GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture); diff --git a/mingw-w64-gst-plugins-bad/PKGBUILD b/mingw-w64-gst-plugins-bad/PKGBUILD index f04cca7d5d..03fca0a141 100644 --- a/mingw-w64-gst-plugins-bad/PKGBUILD +++ b/mingw-w64-gst-plugins-bad/PKGBUILD @@ -1,74 +1,70 @@ # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=gst-plugins-bad +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.4 -pkgrel=1 +pkgver=1.6.1 +pkgrel=2 pkgdesc="GStreamer Multimedia Framework Bad Plugins (mingw-w64)" arch=('any') url="http://gstreamer.freedesktop.org/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - ) -depends=( - "${MINGW_PACKAGE_PREFIX}-celt" - "${MINGW_PACKAGE_PREFIX}-chromaprint" - "${MINGW_PACKAGE_PREFIX}-clutter" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-daala" - "${MINGW_PACKAGE_PREFIX}-faad2" - "${MINGW_PACKAGE_PREFIX}-faac" - "${MINGW_PACKAGE_PREFIX}-fluidsynth" - "${MINGW_PACKAGE_PREFIX}-gnutls" - "${MINGW_PACKAGE_PREFIX}-gsm" - "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" - "${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libdca" - "${MINGW_PACKAGE_PREFIX}-libdvdnav" - "${MINGW_PACKAGE_PREFIX}-libexif" - "${MINGW_PACKAGE_PREFIX}-libgme" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libmimic" - "${MINGW_PACKAGE_PREFIX}-libmodplug" - "${MINGW_PACKAGE_PREFIX}-libmpeg2" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-mpg123" - "${MINGW_PACKAGE_PREFIX}-nettle" - "${MINGW_PACKAGE_PREFIX}-openal" - "${MINGW_PACKAGE_PREFIX}-opencv" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-openjpeg2" - "${MINGW_PACKAGE_PREFIX}-opus" - "${MINGW_PACKAGE_PREFIX}-orc" - "${MINGW_PACKAGE_PREFIX}-schroedinger" - "${MINGW_PACKAGE_PREFIX}-soundtouch" - ) + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +depends=("${MINGW_PACKAGE_PREFIX}-celt" + "${MINGW_PACKAGE_PREFIX}-chromaprint" + "${MINGW_PACKAGE_PREFIX}-clutter" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-daala" + "${MINGW_PACKAGE_PREFIX}-faad2" + "${MINGW_PACKAGE_PREFIX}-faac" + "${MINGW_PACKAGE_PREFIX}-fluidsynth" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-gsm" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libdca" + "${MINGW_PACKAGE_PREFIX}-libdvdnav" + "${MINGW_PACKAGE_PREFIX}-libexif" + "${MINGW_PACKAGE_PREFIX}-libgme" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libmimic" + "${MINGW_PACKAGE_PREFIX}-libmodplug" + "${MINGW_PACKAGE_PREFIX}-libmpeg2" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-mpg123" + "${MINGW_PACKAGE_PREFIX}-nettle" + "${MINGW_PACKAGE_PREFIX}-openal" + "${MINGW_PACKAGE_PREFIX}-opencv" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-openjpeg2" + "${MINGW_PACKAGE_PREFIX}-opus" + "${MINGW_PACKAGE_PREFIX}-orc" + "${MINGW_PACKAGE_PREFIX}-schroedinger" + "${MINGW_PACKAGE_PREFIX}-soundtouch") options=(!libtool strip staticlibs) source=(${url}/src/${_realname}/${_realname}-${pkgver}.tar.xz - 0001-give-cc-to-gir-scanner.mingw.patch 0002-better-openjpeg2-checking.all.patch - 0004-fix-X-detection.mingw.patch 0004-port-to-openjpeg-2.1.all.patch - 0005-fix-cast-errors.patch) -md5sums=('972c6e22dd2e44fcf0b04b9d810a56be' - 'f95294f2282016457d38882aff845e39' + 0005-Include-glext-h.patch + 0006-No-X11-on-_WIN32.patch) +md5sums=('c92d7d32de68e7293712bf9b6c99dc77' '4545ec337afbd4d211d4b088b01ed77e' - '027bdbe72b67e7e6d1652d0baf3dcfe1' 'c269630a0a08f750da9db84df1c82c49' - '4b5d2fd35cd443a1eabd609401386457') + '826ddbed83cdeefa6e54b4eb5ae81841' + '62cf56b569c8f41ce6a3969ffc929226') prepare() { - cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0001-give-cc-to-gir-scanner.mingw.patch - patch -p1 -i ${srcdir}/0002-better-openjpeg2-checking.all.patch - patch -p1 -i ${srcdir}/0004-fix-X-detection.mingw.patch - patch -p1 -i ${srcdir}/0004-port-to-openjpeg-2.1.all.patch - patch -p1 -i ${srcdir}/0005-fix-cast-errors.patch + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/0002-better-openjpeg2-checking.all.patch + patch -p1 -i "${srcdir}"/0004-port-to-openjpeg-2.1.all.patch + patch -p1 -i "${srcdir}"/0005-Include-glext-h.patch + patch -p1 -i "${srcdir}"/0006-No-X11-on-_WIN32.patch NOCONFIGURE=1 ./autogen.sh } @@ -76,22 +72,26 @@ build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + #CPPFLAGS+=" --save-temps" + #CFLAGS+=" --save-temps" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --disable-static \ --enable-shared \ - --enable-silent-rules \ + --disable-silent-rules \ --enable-experimental \ --disable-gtk-doc \ --with-gtk=3.0 + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make -j1 DESTDIR="${pkgdir}" install + rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gst-plugins-base/0003-fix-riff-includes.mingw.patch b/mingw-w64-gst-plugins-base/0003-fix-riff-includes.mingw.patch deleted file mode 100644 index f9d5409724..0000000000 --- a/mingw-w64-gst-plugins-base/0003-fix-riff-includes.mingw.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gst-plugins-base-1.1.3/gst-libs/gst/riff/Makefile.am.orig 2013-04-26 06:20:28.000000000 +0000 -+++ gst-plugins-base-1.1.3/gst-libs/gst/riff/Makefile.am 2013-08-01 07:04:48.387735200 +0000 -@@ -48,6 +48,9 @@ - --pkg gstreamer-audio-@GST_API_VERSION@ \ - --pkg-export gstreamer-riff-@GST_API_VERSION@ \ - --add-init-section="gst_init(NULL,NULL);" \ -+ --cflags-begin \ -+ -I $(srcdir)/../../ \ -+ --cflags-end \ - --output $@ \ - $(gir_headers) \ - $(gir_sources) diff --git a/mingw-w64-gst-plugins-base/0004-fix-X-detection.mingw.patch b/mingw-w64-gst-plugins-base/0004-fix-X-detection.mingw.patch deleted file mode 100644 index f42ab1bc61..0000000000 --- a/mingw-w64-gst-plugins-base/0004-fix-X-detection.mingw.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- common/m4/gst-x11.m4.orig 2012-03-27 11:24:15.000000000 +0400 -+++ common/m4/gst-x11.m4 2014-07-10 20:46:24.623600000 +0400 -@@ -9,7 +9,9 @@ - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - - dnl now try to find the HEADER -- AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") -+ HAVE_X="yes" -+ AC_CHECK_HEADER([X11/Xlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) -+ AC_CHECK_HEADER([X11/XKBlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) - - if test "x$HAVE_X" = "xno" - then diff --git a/mingw-w64-gst-plugins-base/0009-fix-casting-error.patch b/mingw-w64-gst-plugins-base/0009-fix-casting-error.patch deleted file mode 100644 index 2fb2de56ab..0000000000 --- a/mingw-w64-gst-plugins-base/0009-fix-casting-error.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gst-plugins-base-1.3.1/gst/playback/gstplaybin2.c.orig 2014-05-18 16:13:43.062000000 +0400 -+++ gst-plugins-base-1.3.1/gst/playback/gstplaybin2.c 2014-05-18 16:14:14.683200000 +0400 -@@ -3213,7 +3213,7 @@ - gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, - _uridecodebin_event_probe, group, NULL); - g_object_set_data (G_OBJECT (pad), "playbin.event_probe_id", -- (gpointer) group_id_probe_handler); -+ (gpointer) (guintptr) group_id_probe_handler); - - if (changed) { - int signal; diff --git a/mingw-w64-gst-plugins-base/PKGBUILD b/mingw-w64-gst-plugins-base/PKGBUILD index 340b975ea6..092ebd7a33 100644 --- a/mingw-w64-gst-plugins-base/PKGBUILD +++ b/mingw-w64-gst-plugins-base/PKGBUILD @@ -1,61 +1,48 @@ # Maintainer: Alexey Pavlov _realname=gst-plugins-base +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.4 +pkgver=1.6.1 pkgrel=1 pkgdesc="GStreamer Multimedia Framework Base Plugins (mingw-w64)" arch=('any') url="http://gstreamer.freedesktop.org/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" ) depends=("${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-libvorbis" - "${MINGW_PACKAGE_PREFIX}-libtheora" - "${MINGW_PACKAGE_PREFIX}-libvorbisidec" - "${MINGW_PACKAGE_PREFIX}-pango" - #"${MINGW_PACKAGE_PREFIX}-libvisual" - #"${MINGW_PACKAGE_PREFIX}-cdparanoia" - "${MINGW_PACKAGE_PREFIX}-gstreamer" - "${MINGW_PACKAGE_PREFIX}-orc" + "${MINGW_PACKAGE_PREFIX}-libvorbis" + "${MINGW_PACKAGE_PREFIX}-libtheora" + "${MINGW_PACKAGE_PREFIX}-libvorbisidec" + "${MINGW_PACKAGE_PREFIX}-pango" + #"${MINGW_PACKAGE_PREFIX}-libvisual" + #"${MINGW_PACKAGE_PREFIX}-cdparanoia" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-orc" ) options=(!libtool strip staticlibs) source=(${url}/src/${_realname}/${_realname}-${pkgver}.tar.xz 0002-fix-test-running.mingw.patch - 0003-fix-riff-includes.mingw.patch - 0004-fix-X-detection.mingw.patch - 0006-disable-sse-detection.mingw.patch - 0009-fix-casting-error.patch - give-cc-to-gir-scanner.mingw.patch) -md5sums=('0c42eca8f9e4efd56d2ce8e9249ce4a1' + 0006-disable-sse-detection.mingw.patch) +md5sums=('a89933afbe45d8f8c92d89c2f1199ecb' '006091acfeedd194fa804ea36958ea3c' - '571194f25c8c765b5b5e5739df1271ae' - 'eb0a27e74755e4ee1c5259c8c4ab40e8' - 'ee35e5a95bdcb9e7f7f5a8848dd6dc4c' - '59679a91af5eea1f303c6ee59441b04a' - '4d45f704f60a5c63b6c4c7d448d2b152') + 'ee35e5a95bdcb9e7f7f5a8848dd6dc4c') prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0002-fix-test-running.mingw.patch - patch -p1 -i ${srcdir}/0003-fix-riff-includes.mingw.patch - patch -p0 -i ${srcdir}/0004-fix-X-detection.mingw.patch patch -p1 -i ${srcdir}/0006-disable-sse-detection.mingw.patch - patch -p1 -i ${srcdir}/0009-fix-casting-error.patch - patch -p1 -i ${srcdir}/give-cc-to-gir-scanner.mingw.patch - NOCONFIGURE=1 ./autogen.sh } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -69,7 +56,7 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gst-plugins-base/give-cc-to-gir-scanner.mingw.patch b/mingw-w64-gst-plugins-base/give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index dee06d219f..0000000000 --- a/mingw-w64-gst-plugins-base/give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,203 +0,0 @@ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/allocators/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/allocators/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/allocators/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/allocators/Makefile.am 2014-04-22 09:19:15.574800000 +0400 -@@ -25,13 +25,15 @@ - GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH="" GST_PLUGIN_PATH="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstAllocators \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/allocators/allocators.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/app/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/app/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/app/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/app/Makefile.am 2014-04-22 09:19:34.792000000 +0400 -@@ -40,13 +40,15 @@ - GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstApp \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/app/app.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstapp-@GST_API_VERSION@.la \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/audio/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/audio/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/audio/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/audio/Makefile.am 2014-04-22 09:19:51.849000000 +0400 -@@ -86,12 +86,14 @@ - GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstAudio \ - --nsversion=@GST_API_VERSION@ \ - --warn-all \ - --strip-prefix=Gst \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --c-include "gst/audio/audio.h" \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/fft/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/fft/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/fft/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/fft/Makefile.am 2014-04-22 09:20:55.135400000 +0400 -@@ -54,13 +54,15 @@ - GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstFft \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/fft/fft.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstfft-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/pbutils/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/pbutils/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/pbutils/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/pbutils/Makefile.am 2014-04-22 09:21:11.617000000 +0400 -@@ -72,13 +72,15 @@ - GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstPbutils \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/pbutils/pbutils.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/riff/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/riff/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/riff/Makefile.am 2014-04-22 09:12:08.460800000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/riff/Makefile.am 2014-04-22 09:21:25.272200000 +0400 -@@ -29,10 +29,12 @@ - GstRiff-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstriff-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstRiff \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ -+ $(GST_BASE_CFLAGS) \ - --c-include "gst/riff/riff.h" \ - --add-include-path=$(builddir)/../tag \ - --add-include-path=$(builddir)/../audio \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/rtp/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/rtp/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/rtp/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/rtp/Makefile.am 2014-04-22 09:21:40.301600000 +0400 -@@ -33,12 +33,14 @@ - GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstRtp \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/rtp/rtp.h" \ - -I$(top_srcdir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstrtp-@GST_API_VERSION@.la \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/rtsp/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/rtsp/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/rtsp/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/rtsp/Makefile.am 2014-04-22 09:21:55.065200000 +0400 -@@ -59,13 +59,15 @@ - GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstRtsp \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/rtsp/rtsp.h" \ - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=$(builddir)/../sdp \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstrtsp-@GST_API_VERSION@.la \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/sdp/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/sdp/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/sdp/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/sdp/Makefile.am 2014-04-22 09:22:08.571800000 +0400 -@@ -21,12 +21,14 @@ - GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstSdp \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/sdp/sdp.h" \ - -I$(top_srcdir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/tag/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/tag/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/tag/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/tag/Makefile.am 2014-04-22 09:22:22.923400000 +0400 -@@ -32,13 +32,15 @@ - GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstTag \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/tag/tag.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgsttag-@GST_API_VERSION@.la \ -diff -Naur gst-plugins-base-1.2.4-orig/gst-libs/gst/video/Makefile.am gst-plugins-base-1.2.4/gst-libs/gst/video/Makefile.am ---- gst-plugins-base-1.2.4-orig/gst-libs/gst/video/Makefile.am 2013-09-24 17:04:27.000000000 +0400 -+++ gst-plugins-base-1.2.4/gst-libs/gst/video/Makefile.am 2014-04-22 09:22:40.899600000 +0400 -@@ -86,13 +86,15 @@ - GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstVideo \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ - --warn-all \ - --c-include "gst/video/video.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -+ $(GST_BASE_CFLAGS) \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstvideo-@GST_API_VERSION@.la \ diff --git a/mingw-w64-gst-plugins-base0.10/PKGBUILD b/mingw-w64-gst-plugins-base0.10/PKGBUILD index 0f35dc8fa0..4003c78dff 100644 --- a/mingw-w64-gst-plugins-base0.10/PKGBUILD +++ b/mingw-w64-gst-plugins-base0.10/PKGBUILD @@ -51,7 +51,7 @@ md5sums=('3d2337841b132fe996e5eb2396ac9438' prepare() { cd ${srcdir}/${_realname}-${pkgver} - + sed -i -e '/AC_PATH_XTRA/d' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac patch -Np1 -i ${srcdir}/fix-crash-0-byte-ogg.patch patch -Np1 -i ${srcdir}/colorbalance-fix-abi.patch @@ -59,15 +59,15 @@ prepare() { patch -Np1 -i ${srcdir}/videoscale-fix-negotiation.patch patch -Np1 -i ${srcdir}/gstaudio-symbols.patch #patch -Rp1 -i ${srcdir}/revert-decodebin-playbin-removal.patch - + patch -Np0 -i ${srcdir}/gst-plugins-base-0.10.36-warnings.patch patch -Np1 -i ${srcdir}/gst-plugins-base-0.10.28-gnomevfswin32.patch - + patch -p1 -i ${srcdir}/0001-fix-test-compilation.mingw.patch patch -p1 -i ${srcdir}/0002-fix-test-running.mingw.patch patch -p1 -i ${srcdir}/0003-fix-riff-includes.mingw.patch patch -p1 -i ${srcdir}/0004-fix-X-detection.mingw.patch - + NOCONFIGURE=1 ./autogen.sh } diff --git a/mingw-w64-gst-plugins-good/0004-fix-X-detection.mingw.patch b/mingw-w64-gst-plugins-good/0004-fix-X-detection.mingw.patch deleted file mode 100644 index f42ab1bc61..0000000000 --- a/mingw-w64-gst-plugins-good/0004-fix-X-detection.mingw.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- common/m4/gst-x11.m4.orig 2012-03-27 11:24:15.000000000 +0400 -+++ common/m4/gst-x11.m4 2014-07-10 20:46:24.623600000 +0400 -@@ -9,7 +9,9 @@ - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - - dnl now try to find the HEADER -- AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") -+ HAVE_X="yes" -+ AC_CHECK_HEADER([X11/Xlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) -+ AC_CHECK_HEADER([X11/XKBlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) - - if test "x$HAVE_X" = "xno" - then diff --git a/mingw-w64-gst-plugins-good/PKGBUILD b/mingw-w64-gst-plugins-good/PKGBUILD index 776aee5296..16a60833d6 100644 --- a/mingw-w64-gst-plugins-good/PKGBUILD +++ b/mingw-w64-gst-plugins-good/PKGBUILD @@ -1,52 +1,50 @@ # Maintainer: Alexey Pavlov _realname=gst-plugins-good +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.4 +pkgver=1.6.1 pkgrel=1 pkgdesc="GStreamer Multimedia Framework Base Plugins (mingw-w64)" arch=('any') url="http://gstreamer.freedesktop.org/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" ) depends=("${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-flac" - "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - "${MINGW_PACKAGE_PREFIX}-gstreamer" - "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" - "${MINGW_PACKAGE_PREFIX}-libcaca" - "${MINGW_PACKAGE_PREFIX}-libshout" - "${MINGW_PACKAGE_PREFIX}-libsoup" - "${MINGW_PACKAGE_PREFIX}-libvpx" - "${MINGW_PACKAGE_PREFIX}-speex" - "${MINGW_PACKAGE_PREFIX}-taglib" - "${MINGW_PACKAGE_PREFIX}-wavpack" + "${MINGW_PACKAGE_PREFIX}-flac" + "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" + "${MINGW_PACKAGE_PREFIX}-libcaca" + "${MINGW_PACKAGE_PREFIX}-libshout" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libvpx" + "${MINGW_PACKAGE_PREFIX}-speex" + "${MINGW_PACKAGE_PREFIX}-taglib" + "${MINGW_PACKAGE_PREFIX}-wavpack" ) options=(!libtool strip staticlibs) source=(${url}/src/${_realname}/${_realname}-${pkgver}.tar.xz - 0002-fix-test-running.mingw.patch - 0004-fix-X-detection.mingw.patch) -md5sums=('673cf9276952bd3937dafd817c9ead2b' - 'b4ff5991217a2544fa84aae471057299' - 'eb0a27e74755e4ee1c5259c8c4ab40e8') + 0002-fix-test-running.mingw.patch) +md5sums=('a930f5ff133f17baf39d2876628b7890' + 'b4ff5991217a2544fa84aae471057299') prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0002-fix-test-running.mingw.patch - patch -p0 -i ${srcdir}/0004-fix-X-detection.mingw.patch - + NOCONFIGURE=1 ./autogen.sh } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + #cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -55,12 +53,13 @@ build() { --enable-silent-rules \ --enable-experimental \ --disable-gtk-doc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gst-plugins-good0.10/PKGBUILD b/mingw-w64-gst-plugins-good0.10/PKGBUILD index ff06e06117..57a9a9a846 100644 --- a/mingw-w64-gst-plugins-good0.10/PKGBUILD +++ b/mingw-w64-gst-plugins-good0.10/PKGBUILD @@ -46,7 +46,7 @@ prepare() { patch -Np0 -i ${srcdir}/mingw64-gst-plugins-good-waveform-git.patch patch -p1 -i ${srcdir}/0001-fix-X-detection.mingw.patch patch -p1 -i ${srcdir}/0002-fix-test-running.mingw.patch - + NOCONFIGURE=1 ./autogen.sh } diff --git a/mingw-w64-gst-plugins-ugly/PKGBUILD b/mingw-w64-gst-plugins-ugly/PKGBUILD index ccaedb097a..2b5bd3c521 100644 --- a/mingw-w64-gst-plugins-ugly/PKGBUILD +++ b/mingw-w64-gst-plugins-ugly/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: AlexWMF _realname=gst-plugins-ugly +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.4 +pkgver=1.6.1 pkgrel=1 pkgdesc="GStreamer Multimedia Framework Ugly Plugins (mingw-w64)" arch=('any') @@ -13,28 +14,29 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2" ) depends=("${MINGW_PACKAGE_PREFIX}-a52dec" - "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" - "${MINGW_PACKAGE_PREFIX}-gstreamer" - "${MINGW_PACKAGE_PREFIX}-lame" - "${MINGW_PACKAGE_PREFIX}-libdvdread" - "${MINGW_PACKAGE_PREFIX}-libmad" - "${MINGW_PACKAGE_PREFIX}-libmpeg2" - "${MINGW_PACKAGE_PREFIX}-libcdio" - "${MINGW_PACKAGE_PREFIX}-opencore-amr" - "${MINGW_PACKAGE_PREFIX}-twolame" - "${MINGW_PACKAGE_PREFIX}-x264" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-lame" + "${MINGW_PACKAGE_PREFIX}-libdvdread" + "${MINGW_PACKAGE_PREFIX}-libmad" + "${MINGW_PACKAGE_PREFIX}-libmpeg2" + "${MINGW_PACKAGE_PREFIX}-libcdio" + "${MINGW_PACKAGE_PREFIX}-opencore-amr" + "${MINGW_PACKAGE_PREFIX}-twolame" + "${MINGW_PACKAGE_PREFIX}-x264" ) options=(!libtool strip staticlibs) source=(${url}/src/${_realname}/${_realname}-${pkgver}.tar.xz) -md5sums=('abd832c5cab1a37fb1d9d15fb08e6e59') +md5sums=('2c20faa2406afb840699e97e913d8fb4') prepare() { cd ${srcdir}/${_realname}-${pkgver} - + NOCONFIGURE=1 ./autogen.sh } build() { + rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -46,6 +48,7 @@ build() { --enable-silent-rules \ --enable-experimental \ --disable-gtk-doc + make } diff --git a/mingw-w64-gst-python-git/PKGBUILD b/mingw-w64-gst-python-git/PKGBUILD deleted file mode 100644 index 63c3bf5257..0000000000 --- a/mingw-w64-gst-python-git/PKGBUILD +++ /dev/null @@ -1,55 +0,0 @@ -# Maintainer: Lubosz Sarnecki - -_realname=gst-python -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.3.0.1.1283.3483187 -pkgrel=1 -pkgdesc='GStreamer GObject Introspection overrides for Python 3' -arch=('any') -license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-gstreamer" - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection") -url='http://gstreamer.freedesktop.org/modules/gst-python.html' -options=(!libtool strip staticlibs) - -source=("git://anongit.freedesktop.org/gstreamer/${_realname}" - '0001-msys2-python3-config-returns-1-so-use-which.patch' - '0002-msys2-fix-linking-errors.patch') -md5sums=('SKIP' - 'eb52a3ef8270c2d263c79799bcaf377a' - 'a1d96c7bf521664a76d424c1b9250ea8') - -pkgver() { - cd $_realname - version=$(grep AC_INIT configure.ac | sed 's/AC_INIT(GStreamer GObject Introspection overrides for Python , //' | sed 's/,//') - hash=$(git log --pretty=format:'%h' -n 1) - revision=$(git rev-list --count HEAD) - echo $version.$revision.$hash -} - -prepare() { - cd $_realname - git am ../0001-msys2-python3-config-returns-1-so-use-which.patch - git am ../0002-msys2-fix-linking-errors.patch - NOCONFIGURE=1 ./autogen.sh -} - -build() { - cd $_realname - PYTHON=${MINGW_PREFIX}/bin/python3 \ - ./autogen.sh --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --disable-silent-rules - make -} - -package() { - cd $_realname - make DESTDIR="$pkgdir" install -} - diff --git a/mingw-w64-gst-python-git/0001-msys2-python3-config-returns-1-so-use-which.patch b/mingw-w64-gst-python/0001-msys2-python3-config-returns-1-so-use-which.patch similarity index 100% rename from mingw-w64-gst-python-git/0001-msys2-python3-config-returns-1-so-use-which.patch rename to mingw-w64-gst-python/0001-msys2-python3-config-returns-1-so-use-which.patch diff --git a/mingw-w64-gst-python-git/0002-msys2-fix-linking-errors.patch b/mingw-w64-gst-python/0002-msys2-fix-linking-errors.patch similarity index 87% rename from mingw-w64-gst-python-git/0002-msys2-fix-linking-errors.patch rename to mingw-w64-gst-python/0002-msys2-fix-linking-errors.patch index ccfa434bb5..4e3105aacf 100644 --- a/mingw-w64-gst-python-git/0002-msys2-fix-linking-errors.patch +++ b/mingw-w64-gst-python/0002-msys2-fix-linking-errors.patch @@ -20,7 +20,7 @@ index ee94f7c..4f04707 100644 common_cflags = $(PYGOBJECT_CFLAGS) $(GST_CFLAGS) -fno-strict-aliasing -common_libadd = $(GST_LIBS) $(PYGOBJECT_LIBS) -common_ldflags = -module -avoid-version -shrext $(PYTHON_SO) -+common_libadd = $(GST_LIBS) $(PYGOBJECT_LIBS) -lpython3.4m ++common_libadd = $(PYTHON_LIBS) $(GST_LIBS) $(PYGOBJECT_LIBS) +common_ldflags = -module -avoid-version -no-undefined -shrext $(PYTHON_SO) # We install everything in the gi/overrides folder @@ -33,9 +33,9 @@ index 042c2bc..4a9b60d 100644 $(PYTHON_INCLUDES) libgstpythonplugin_la_SOURCES = gstpythonplugin.c --libgstpythonplugin_la_LDFLAGS = -avoid-version +-libgstpythonplugin_la_LDFLAGS = -avoid-version -shrext $(PYTHON_SO) -libgstpythonplugin_la_LIBADD = $(PYTHON_LIBS) $(PYGOBJECT_LIBS) $(GST_LIBS) -+libgstpythonplugin_la_LDFLAGS = -avoid-version -no-undefined ++libgstpythonplugin_la_LDFLAGS = -avoid-version -no-undefined -shrext $(PYTHON_SO) +libgstpythonplugin_la_LIBADD = $(PYTHON_LIBS) $(PYGOBJECT_LIBS) $(GST_LIBS) -lgmodule-2.0 libgstpythonplugin_la_CFLAGS = $(GST_CFLAGS) $(PYGOBJECT_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(PYTHON_INCLUDES) -- diff --git a/mingw-w64-gst-python/0004-add-overrides.patch b/mingw-w64-gst-python/0004-add-overrides.patch new file mode 100644 index 0000000000..0cf41006bc --- /dev/null +++ b/mingw-w64-gst-python/0004-add-overrides.patch @@ -0,0 +1,48 @@ +diff --git a/gi/__init__.py b/gi/__init__.py +new file mode 100644 +index 0000000..09d180b +--- /dev/null ++++ b/gi/__init__.py +@@ -0,0 +1,29 @@ ++#!/usr/bin/env python ++# ++# __init__.py ++# ++# Copyright (C) 2012 Thibault Saunier ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this program; if not, write to the ++# Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++# Boston, MA 02111-1307, USA. ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++ ++ ++from pkgutil import extend_path ++ ++__path__ = extend_path(__path__, __name__) +diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py +new file mode 100644 +index 0000000..802630a +--- /dev/null ++++ b/gi/overrides/__init__.py +@@ -0,0 +1,4 @@ ++from pkgutil import extend_path ++ ++__path__ = extend_path(__path__, __name__) ++print __path__, __name__ +-- +cgit v0.10.2 + diff --git a/mingw-w64-gst-python/0005-unix-override-dir.patch b/mingw-w64-gst-python/0005-unix-override-dir.patch new file mode 100644 index 0000000000..2ae86f8b86 --- /dev/null +++ b/mingw-w64-gst-python/0005-unix-override-dir.patch @@ -0,0 +1,14 @@ +--- gst-python-1.4.0/configure.ac.orig 2015-07-21 14:34:06.163625200 +0300 ++++ gst-python-1.4.0/configure.ac 2015-07-21 14:34:25.981643200 +0300 +@@ -101,11 +101,7 @@ + + AC_MSG_CHECKING(for pygobject overrides directory) + if test "x$with_pygi_overrides_dir" = "x" ; then +- overrides_dir="`$PYTHON -c 'import gi; print(gi._overridesdir)' 2>/dev/null`" +- # fallback if the previous failed +- if test "x$overrides_dir" = "x" ; then + overrides_dir="${pyexecdir}/gi/overrides" +- fi + else + overrides_dir="$with_pygi_overrides_dir" + fi diff --git a/mingw-w64-gst-python/PKGBUILD b/mingw-w64-gst-python/PKGBUILD new file mode 100644 index 0000000000..3fda401759 --- /dev/null +++ b/mingw-w64-gst-python/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Lubosz Sarnecki + +_realname=gst-python +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") +pkgver=1.6.1 +pkgrel=1 +pkgdesc="GStreamer GObject Introspection overrides for Python 3 (mingw-w64)" +arch=('any') +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-python3-gobject" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +makedepends=('git') +url='http://gstreamer.freedesktop.org/modules/gst-python.html' +options=(!libtool strip staticlibs) + +source=(http://gstreamer.freedesktop.org/src/gst-python/${_realname}-${pkgver}.tar.xz + '0001-msys2-python3-config-returns-1-so-use-which.patch' + '0002-msys2-fix-linking-errors.patch' + '0004-add-overrides.patch' + '0005-unix-override-dir.patch') +md5sums=('edcaf18228e3289edb8b79c684a49731' + 'eb52a3ef8270c2d263c79799bcaf377a' + '459fd4024782338dfb2348b22f92e9bf' + '9241cc5807a4ef87548b6d5405141bf1' + 'cf4576d2775e01c2147801d5614fa1b2') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-msys2-python3-config-returns-1-so-use-which.patch + patch -p1 -i ${srcdir}/0002-msys2-fix-linking-errors.patch + patch -p1 -i ${srcdir}/0004-add-overrides.patch + patch -p1 -i ${srcdir}/0005-unix-override-dir.patch + + WANT_AUTOMAKE=latest autoreconf -fiv +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + + PYTHON=${MINGW_PREFIX}/bin/python3 \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --bindir=${MINGW_PREFIX}/bin \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --disable-silent-rules + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install + + mv ${pkgdir}${MINGW_PREFIX}/lib/bin/*.dll ${pkgdir}${MINGW_PREFIX}/lib/gstreamer-1.0/ + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/bin +} diff --git a/mingw-w64-gstreamer/0004-fix-X-detection.mingw.patch b/mingw-w64-gstreamer/0004-fix-X-detection.mingw.patch index f42ab1bc61..1cf566b8be 100644 --- a/mingw-w64-gstreamer/0004-fix-X-detection.mingw.patch +++ b/mingw-w64-gstreamer/0004-fix-X-detection.mingw.patch @@ -1,9 +1,9 @@ --- common/m4/gst-x11.m4.orig 2012-03-27 11:24:15.000000000 +0400 +++ common/m4/gst-x11.m4 2014-07-10 20:46:24.623600000 +0400 @@ -9,7 +9,9 @@ - CPPFLAGS="$CPPFLAGS $X_CFLAGS" dnl now try to find the HEADER + HAVE_X="no" - AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") + HAVE_X="yes" + AC_CHECK_HEADER([X11/Xlib.h], [], [HAVE_X="no"], [AC_INCLUDES_DEFAULT]) diff --git a/mingw-w64-gstreamer/PKGBUILD b/mingw-w64-gstreamer/PKGBUILD index 0c0413e5d5..1fa51f8bb5 100644 --- a/mingw-w64-gstreamer/PKGBUILD +++ b/mingw-w64-gstreamer/PKGBUILD @@ -1,39 +1,33 @@ # Maintainer: Alexey Pavlov _realname=gstreamer +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.4 +pkgver=1.6.1 pkgrel=1 pkgdesc="GStreamer Multimedia Framework (mingw-w64)" arch=('any') url="http://gstreamer.freedesktop.org/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "intltool" - "gtk-doc" - "flex" - "bison" - ) + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "intltool" + "gtk-doc" + "flex" + "bison") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-gmp" - "${MINGW_PACKAGE_PREFIX}-gsl") + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-gsl") options=(!libtool strip staticlibs) -source=("${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz" - 'give-cc-to-gir-scanner.mingw.patch' - '0004-fix-X-detection.mingw.patch') -md5sums=('98f4a6d45a28dd195144baef0244ba38' - '59215d83b4c39aac03848cc9b4eb3f25' - 'eb0a27e74755e4ee1c5259c8c4ab40e8') +source=("${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz") +md5sums=('e72e2dc2ee06bfc045bb6010c89de520') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/give-cc-to-gir-scanner.mingw.patch - patch -p0 -i ${srcdir}/0004-fix-X-detection.mingw.patch autoreconf -fi } @@ -44,13 +38,15 @@ build() { else extra_config+=( --enable-debug=no ) fi - + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" - #mkdir -p "${srcdir}/build-${MINGW_CHOST}" + #cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - export PKG_CONFIG_EXPAND_PATHS=1 - ./configure \ + + CPPFLAGS+=" -D_POSIX_C_SOURCE" + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -63,12 +59,13 @@ build() { --enable-check \ --disable-silent-rules \ "${extra_config[@]}" + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-gstreamer/give-cc-to-gir-scanner.mingw.patch b/mingw-w64-gstreamer/give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index c88d2f4869..0000000000 --- a/mingw-w64-gstreamer/give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- gstreamer-1.2.4/gst/Makefile.am.orig 2014-04-22 07:57:37.157600000 +0400 -+++ gstreamer-1.2.4/gst/Makefile.am 2014-04-22 08:01:43.606400000 +0400 -@@ -279,6 +279,7 @@ - - Gst-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_API_VERSION@.la - $(AM_V_GEN)GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace Gst \ - --nsversion=@GST_API_VERSION@ \ - --warn-all \ ---- gstreamer-1.2.4/libs/gst/base/Makefile.am.orig 2014-04-22 08:33:48.034800000 +0400 -+++ gstreamer-1.2.4/libs/gst/base/Makefile.am 2014-04-22 08:35:48.248400000 +0400 -@@ -76,6 +76,7 @@ - GstBase-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstbase-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstBase \ - --nsversion=@GST_API_VERSION@ \ - --warn-all \ ---- gstreamer-1.2.4/libs/gst/check/Makefile.am.orig 2014-04-22 08:34:00.031200000 +0400 -+++ gstreamer-1.2.4/libs/gst/check/Makefile.am 2014-04-22 08:35:41.930400000 +0400 -@@ -133,6 +133,7 @@ - GstCheck-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstcheck-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstCheck \ - --nsversion=@GST_API_VERSION@ \ - --strip-prefix=Gst \ ---- gstreamer-1.2.4/libs/gst/controller/Makefile.am.orig 2014-04-22 08:34:10.264800000 +0400 -+++ gstreamer-1.2.4/libs/gst/controller/Makefile.am 2014-04-22 08:35:35.908800000 +0400 -@@ -50,6 +50,7 @@ - GstController-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstcontroller-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstController \ - --nsversion=@GST_API_VERSION@ \ - --warn-all \ ---- gstreamer-1.2.4/libs/gst/net/Makefile.am.orig 2014-04-22 08:34:41.496000000 +0400 -+++ gstreamer-1.2.4/libs/gst/net/Makefile.am 2014-04-22 08:35:18.655200000 +0400 -@@ -49,6 +49,7 @@ - GstNet-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstnet-@GST_API_VERSION@.la - $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ - GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \ -+ CC="$(CC)" \ - $(INTROSPECTION_SCANNER) -v --namespace GstNet \ - --strip-prefix=Gst \ - --warn-all \ diff --git a/mingw-w64-gstreamer0.10/PKGBUILD b/mingw-w64-gstreamer0.10/PKGBUILD index 928d0b072f..1d1e2a9b50 100644 --- a/mingw-w64-gstreamer0.10/PKGBUILD +++ b/mingw-w64-gstreamer0.10/PKGBUILD @@ -56,7 +56,7 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" make -j1 DESTDIR="$pkgdir" install - + #Remove unversioned gst-* binaries to get rid of conflicts cd "${pkgdir}${MINGW_PREFIX}/bin" for bins in `ls *-0.10.exe`; do diff --git a/mingw-w64-gtk-doc/PKGBUILD b/mingw-w64-gtk-doc/PKGBUILD index 70246495df..9c5cc27bb9 100644 --- a/mingw-w64-gtk-doc/PKGBUILD +++ b/mingw-w64-gtk-doc/PKGBUILD @@ -3,7 +3,7 @@ _realname=gtk-doc pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.20 +pkgver=1.21 pkgrel=1 pkgdesc="Documentation tool for public library API (mingw-w64)" arch=('any') @@ -28,7 +28,7 @@ optdepends=(#"${MINGW_PACKAGE_PREFIX}-jade: SGML support" ) url="http://www.gtk.org/gtk-doc/" source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.xz) -md5sums=('58532fed036f72fc3bfd4fe79473247b') +md5sums=('e361de4750b707590d9ea1b5550fa738') prepare() { cd "${srcdir}/${_realname}-${pkgver}" diff --git a/mingw-w64-gtk-engine-unico/PKGBUILD b/mingw-w64-gtk-engine-unico/PKGBUILD index 4ce7db5317..f4eba498a3 100644 --- a/mingw-w64-gtk-engine-unico/PKGBUILD +++ b/mingw-w64-gtk-engine-unico/PKGBUILD @@ -7,7 +7,7 @@ _realname=gtk-engine-unico pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.2 -pkgrel=1 +pkgrel=2 pkgdesc='Unico GTK3 theme engine' arch=('any') url='https://launchpad.net/unico' @@ -15,23 +15,21 @@ license=('GPL') depends=("${MINGW_PACKAGE_PREFIX}-gtk3") makedepends=("${MINGW_PACKAGE_PREFIX}-gnome-common") source=("gtk-engine-unico-139.tar.gz::http://bazaar.launchpad.net/~unico-team/unico/trunk/tarball/139") -sha256sums=('SKIP') +sha256sums=('9ef0ef5dfbbb5f352a864a3d91f13872d05361343e5d4cc3be48d1f061189251') build() { - cd ~unico-team/unico/trunk + cd \~unico-team/unico/trunk autoreconf -fi mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/~unico-team/unico/trunk/configure --prefix=${MINGW_PREFIX} --disable-static + ${srcdir}/\~unico-team/unico/trunk/configure --prefix=${MINGW_PREFIX} --disable-static make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="${pkgdir}" install } # vim: ts=2 sw=2 et: - diff --git a/mingw-w64-gtk-vnc/001-win.patch b/mingw-w64-gtk-vnc/001-win.patch new file mode 100644 index 0000000000..8e52842cc5 --- /dev/null +++ b/mingw-w64-gtk-vnc/001-win.patch @@ -0,0 +1,12 @@ +--- ./src/Makefile.am.orig 2015-02-22 10:41:30.924804600 +0100 ++++ ./src/Makefile.am 2015-02-22 10:47:02.750957700 +0100 +@@ -353,6 +353,9 @@ + --includedir=$(srcdir) + + if HAVE_INTROSPECTION ++ ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" ++ + GVNC_INTROSPECTION_SRCS = \ + $(srcdir)/vncpixelformat.h \ + $(srcdir)/vncaudioformat.h $(srcdir)/vncaudioformat.c \ diff --git a/mingw-w64-gtk-vnc/PKGBUILD b/mingw-w64-gtk-vnc/PKGBUILD new file mode 100644 index 0000000000..769ac66b37 --- /dev/null +++ b/mingw-w64-gtk-vnc/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Andrea Zagli + +_realname=gtk-vnc +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.5.4 +pkgrel=3 +arch=('any') +pkgdesc="VNC viewer widget for GTK+ (mingw-w64)" +options=('strip' 'staticlibs') +depends=("${MINGW_PACKAGE_PREFIX}-cyrus-sasl" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-libgpg-error" + "${MINGW_PACKAGE_PREFIX}-libview" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala") +options=('strip' 'staticlibs') +license=("GPL 2.1") +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('488aa97a76ce6868160699cd45d4a0ee0fe6f0ad4631737c6ddd84450f6c9ce7' + '503b12e64f6d843fd018e00e3b3221511656d03905516a80a410d44a2deccd40') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-win.patch + autoreconf -isf +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --enable-introspection \ + --with-gtk=3.0 \ + --with-sasl \ + --with-libview=yes + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB" +} diff --git a/mingw-w64-gtk2/0013-gtk-revert-recreatecairosurface-commit.patch b/mingw-w64-gtk2/0013-gtk-revert-recreatecairosurface-commit.patch deleted file mode 100644 index e0d8c708cb..0000000000 --- a/mingw-w64-gtk2/0013-gtk-revert-recreatecairosurface-commit.patch +++ /dev/null @@ -1,89 +0,0 @@ ---- gtk-2.24.23.orig/gdk/win32/gdkdrawable-win32.c 2014-03-18 02:19:03.000000000 +0100 -+++ gtk-2.24.23/gdk/win32/gdkdrawable-win32.c 2014-05-29 15:57:21.843450500 +0200 -@@ -144,7 +144,6 @@ - static void gdk_drawable_impl_win32_finalize (GObject *object); - - static const cairo_user_data_key_t gdk_win32_cairo_key; --static const cairo_user_data_key_t gdk_win32_cairo_hdc_key; - - G_DEFINE_TYPE (GdkDrawableImplWin32, _gdk_drawable_impl_win32, GDK_TYPE_DRAWABLE) - -@@ -1910,33 +1909,13 @@ - } - } - --static void --gdk_win32_cairo_surface_release_hdc (void *data) --{ -- _gdk_win32_drawable_release_dc (GDK_DRAWABLE (data)); --} -- - cairo_surface_t * - _gdk_windowing_create_cairo_surface (GdkDrawable *drawable, - gint width, - gint height) - { -- cairo_surface_t *surface; -- HDC hdc; -- -- hdc = _gdk_win32_drawable_acquire_dc (drawable); -- if (!hdc) -- return NULL; -- -- surface = cairo_win32_surface_create (hdc); -- -- /* Whenever the cairo surface is destroyed, we need to release the -- * HDC that was acquired */ -- cairo_surface_set_user_data (surface, &gdk_win32_cairo_hdc_key, -- drawable, -- gdk_win32_cairo_surface_release_hdc); -- -- return surface; -+ /* width and height are determined from the DC */ -+ return gdk_win32_ref_cairo_surface (drawable); - } - - static void -@@ -1944,6 +1923,7 @@ - { - GdkDrawableImplWin32 *impl = data; - -+ _gdk_win32_drawable_release_dc (GDK_DRAWABLE (impl)); - impl->cairo_surface = NULL; - } - -@@ -1958,14 +1938,14 @@ - - if (!impl->cairo_surface) - { -- /* width and height are determined from the DC */ -- impl->cairo_surface = _gdk_windowing_create_cairo_surface (drawable, 0, 0); -+ HDC hdc = _gdk_win32_drawable_acquire_dc (drawable); -+ if (!hdc) -+ return NULL; -+ -+ impl->cairo_surface = cairo_win32_surface_create (hdc); - -- /* Whenever the cairo surface is destroyed, we need to clear the -- * pointer that we had stored here */ - cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_key, -- drawable, -- gdk_win32_cairo_surface_destroy); -+ drawable, gdk_win32_cairo_surface_destroy); - } - else - cairo_surface_reference (impl->cairo_surface); -@@ -2044,11 +2024,9 @@ - if (impl->cairo_surface) - { - cairo_surface_finish (impl->cairo_surface); -- cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_hdc_key, NULL, NULL); - cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_key, NULL, NULL); - } - -- /* impl->hdc_count doesn't have to be 0 here; as there may still be surfaces -- * created with gdk_windowing_create_cairo_surface() out there, which are not -- * managed internally by the drawable */ -+ g_assert (impl->hdc_count == 0); -+ - } diff --git a/mingw-w64-gtk2/PKGBUILD b/mingw-w64-gtk2/PKGBUILD index d2a15a7002..a4768fb65c 100644 --- a/mingw-w64-gtk2/PKGBUILD +++ b/mingw-w64-gtk2/PKGBUILD @@ -1,26 +1,31 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=gtk2 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.24.25 -pkgrel=1 +pkgver=2.24.28 +pkgrel=2 pkgdesc="GTK+ is a multi-platform toolkit (v2) (mingw-w64)" arch=('any') url="http://www.gtk.org" -license=("LGPL") + +# According to gtk/gtk.h, this is either LGPL2+ or LGPL2.1+, if that makes any +# difference. So let's stick to LGPL2.1+ for safety. +license=(LGPL2.1+) + makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" - "${MINGW_PACKAGE_PREFIX}-shared-mime-info") + "gtk-doc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" "${MINGW_PACKAGE_PREFIX}-atk>=1.29.2" - "${MINGW_PACKAGE_PREFIX}-pango>=1.20" - "${MINGW_PACKAGE_PREFIX}-glib2>=2.28.0" "${MINGW_PACKAGE_PREFIX}-cairo>=1.6" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2>=2.21.0" + "${MINGW_PACKAGE_PREFIX}-glib2>=2.28.0" + "${MINGW_PACKAGE_PREFIX}-pango>=1.20" "${MINGW_PACKAGE_PREFIX}-shared-mime-info") -optdepends=("${MINGW_PACKAGE_PREFIX}-gnome-icon-theme: Default icon theme") +#optdepends=("${MINGW_PACKAGE_PREFIX}-gnome-icon-theme: Default icon theme") install=gtk2-${CARCH}.install options=(!libtool strip staticlibs) source=("http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-${pkgver}.tar.xz" @@ -33,10 +38,9 @@ source=("http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-${pkgver} 0009-give-cc-to-gir-scanner.mingw.patch 0010-put-gtk-dll-into-path.mingw.patch 0011-gir-for-gdkwin32.mingw.patch - 0012-embed-manifest.all.patch - 0013-gtk-revert-recreatecairosurface-commit.patch) + 0012-embed-manifest.all.patch) -md5sums=('612350704dd3aacb95355a4981930c6f' +md5sums=('bfacf87b2ea67e4e5c7866a9003e6526' '5105b21ea13dbfbef8975138b4355e7a' '4f4a6df623209e301b77a0e486f8c43d' '6a40366ed05024e1e93dbb9788c6747e' @@ -46,8 +50,7 @@ md5sums=('612350704dd3aacb95355a4981930c6f' 'e8bd83e4eb9877d009ad57458cf5a6b0' '9e0296da2986be7697cf343563b85d1f' '91d12fc6da9026deb0f94f38ab22a3ec' - '864a719c5fea860ced90cacab5545b1d' - '1dbf362025860675ace96bdfaa96f283') + '864a719c5fea860ced90cacab5545b1d') prepare() { cd gtk+-$pkgver @@ -60,8 +63,7 @@ prepare() { patch -p1 -i ${srcdir}/0010-put-gtk-dll-into-path.mingw.patch patch -p1 -i ${srcdir}/0011-gir-for-gdkwin32.mingw.patch #patch -p1 -i ${srcdir}/0012-embed-manifest.all.patch - patch -p1 -i ${srcdir}/0013-gtk-revert-recreatecairosurface-commit.patch - + autoreconf -fi } @@ -81,7 +83,9 @@ build() { --enable-static \ --enable-shared \ --enable-introspection \ - --disable-glibtest + --disable-glibtest \ + --with-included-immodules=ime + make } @@ -90,4 +94,5 @@ package() { make -j1 DESTDIR="$pkgdir" install install -Dm644 "$srcdir/gtkrc" "${pkgdir}${MINGW_PREFIX}/share/gtk-2.0/gtkrc.example" find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + install -Dm644 "${srcdir}/gtk+-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gtk2/gtk2-i686.install b/mingw-w64-gtk2/gtk2-i686.install index fdc232abe9..b0ef811e17 100644 --- a/mingw-w64-gtk2/gtk2-i686.install +++ b/mingw-w64-gtk2/gtk2-i686.install @@ -1,12 +1,13 @@ post_install() { - mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor - mingw32/bin/gtk-query-immodules-2.0 --update-cache + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/Adwaita + mingw32/bin/gtk-query-immodules-2.0 --update-cache } post_upgrade() { - post_install + post_install } pre_remove() { - rm -f mingw32/lib/gtk-2.0/2.10.0/immodules.cache + rm -f mingw32/lib/gtk-2.0/2.10.0/immodules.cache } diff --git a/mingw-w64-gtk2/gtk2-x86_64.install b/mingw-w64-gtk2/gtk2-x86_64.install index 137a31964f..1aa4ccb042 100644 --- a/mingw-w64-gtk2/gtk2-x86_64.install +++ b/mingw-w64-gtk2/gtk2-x86_64.install @@ -1,12 +1,13 @@ post_install() { - mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor - mingw64/bin/gtk-query-immodules-2.0 --update-cache + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/Adwaita + mingw64/bin/gtk-query-immodules-2.0 --update-cache } post_upgrade() { - post_install + post_install } pre_remove() { - rm -f mingw64/lib/gtk-2.0/2.10.0/immodules.cache + rm -f mingw64/lib/gtk-2.0/2.10.0/immodules.cache } \ No newline at end of file diff --git a/mingw-w64-gtk3/0010-put-gtk-dll-into-path.mingw.patch b/mingw-w64-gtk3/0010-put-gtk-dll-into-path.mingw.patch deleted file mode 100644 index 6c995907b5..0000000000 --- a/mingw-w64-gtk3/0010-put-gtk-dll-into-path.mingw.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gtk+-2.24.20/gtk/Makefile.am.orig 2013-07-28 22:06:06.408145200 +0000 -+++ gtk+-2.24.20/gtk/Makefile.am 2013-07-28 23:02:09.899754400 +0000 -@@ -3,7 +3,8 @@ - -include $(INTROSPECTION_MAKEFILE) - INTROSPECTION_GIRS = - INTROSPECTION_SCANNER_ENV = \ -- CC="$(CC)" -+ CC="$(CC)" \ -+ PATH="$(builddir):$(builddir)/.libs:$${PATH}:" - INTROSPECTION_SCANNER_ARGS = \ - --add-include-path=../gdk - INTROSPECTION_COMPILER_ARGS = \ diff --git a/mingw-w64-gtk3/0035-enable-rgba-w32-windows.all.patch b/mingw-w64-gtk3/0035-enable-rgba-w32-windows.all.patch deleted file mode 100644 index 2bd2cc5891..0000000000 --- a/mingw-w64-gtk3/0035-enable-rgba-w32-windows.all.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- gtk+-3.12.0/gdk/win32/gdkwindow-win32.c.orig 2014-03-24 17:28:56.000000000 +0000 -+++ gtk+-3.12.0/gdk/win32/gdkwindow-win32.c 2014-04-06 19:32:28.642347700 +0000 -@@ -38,6 +38,9 @@ - #include "gdkdisplayprivate.h" - #include "gdkvisualprivate.h" - #include "gdkwin32window.h" -+#ifdef HAVE_W32_DWM -+#include -+#endif - - #include - -@@ -684,6 +687,49 @@ - - if (attributes_mask & GDK_WA_CURSOR) - gdk_window_set_cursor (window, attributes->cursor); -+ -+/* HAVE_W32_DWM means that we have necessary declarations at compile-time, -+ * but we'd still like to be able to run on XP, so we'll load the only non-XP -+ * function we need here at runtime. -+ */ -+#ifdef HAVE_W32_DWM -+ /* Enable blurbehind, but give it an empty region, leaving us -+ with all the transparency with none of the blur */ -+ { -+ typedef HRESULT (WINAPI *PFN_DwmEnableBlurBehindWindow)(HWND, -+ const DWM_BLURBEHIND *); -+ HMODULE dwmdll; -+ PFN_DwmEnableBlurBehindWindow dwmEnableBlurBehindWindow = NULL; -+ -+ dwmdll = GetModuleHandle ("dwmapi.dll"); -+ dwmEnableBlurBehindWindow = (PFN_DwmEnableBlurBehindWindow) -+ GetProcAddress (dwmdll, "DwmEnableBlurBehindWindow"); -+ -+ if (dwmEnableBlurBehindWindow) -+ { -+ /* Enable blurbehind, but give it an empty region, leaving us -+ with all the transparency with none of the blur */ -+ DWM_BLURBEHIND bb; -+ HRGN hRgn; -+ hRgn = CreateRectRgn (0, 0, -1, -1); -+ if (hRgn != NULL) -+ { -+ HRESULT hr; -+ memset (&bb, 0, sizeof (bb)); -+ bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; -+ bb.hRgnBlur = hRgn; -+ bb.fEnable = TRUE; -+ hr = dwmEnableBlurBehindWindow (GDK_WINDOW_HWND (window), &bb); -+ if (S_OK != hr) -+ { -+ g_warning ("%s: %s failed: %" G_GINT64_MODIFIER "x", -+ G_STRLOC, "DwmEnableBlurBehindWindow", (guint64) hr); -+ } -+ DeleteObject (hRgn); -+ } -+ } -+ } -+#endif - } - - GdkWindow * -@@ -3387,7 +3449,7 @@ - if (!hdc) - return NULL; - -- impl->cairo_surface = cairo_win32_surface_create (hdc); -+ impl->cairo_surface = cairo_win32_surface_create_with_alpha (hdc); - - cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_key, - impl, gdk_win32_cairo_surface_destroy); ---- gtk+-3.12.0/configure.ac.orig 2014-03-26 21:41:51.636232000 +0000 -+++ gtk+-3.12.0/configure.ac 2014-03-27 09:22:54.662058000 +0000 -@@ -363,6 +363,25 @@ - AC_SUBST(ENABLE_ON_X11) - - if test "$enable_win32_backend" = "yes"; then -+ AC_MSG_CHECKING([for DWM]) -+ AC_LINK_IFELSE([ -+ AC_LANG_PROGRAM([[ -+ #include -+ #include -+ ]], -+ [[ -+ DWM_BLURBEHIND bb; -+ memset (&bb, 0, sizeof (bb)); -+ bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; -+ ]] -+ )], -+ [dwm_ok=yes], [dwm_ok=no] -+ ) -+ AC_MSG_RESULT($dwm_ok) -+ if test "$dwm_ok" = "yes"; then -+ AC_DEFINE([HAVE_W32_DWM], [1], [Define if W32 DWM API is available]) -+ fi -+ - cairo_backends="$cairo_backends cairo-win32" - GDK_BACKENDS="$GDK_BACKENDS win32" - backend_immodules="$backend_immodules,ime" ---- gtk+-3.11.9/gdk/win32/gdkscreen-win32.c.orig 2014-03-06 04:42:57.000000000 +0000 -+++ gtk+-3.11.9/gdk/win32/gdkscreen-win32.c 2014-03-22 06:47:32.162217700 +0000 -@@ -211,7 +211,7 @@ - screen_class->get_monitor_geometry = gdk_win32_screen_get_monitor_geometry; - screen_class->get_monitor_workarea = gdk_win32_screen_get_monitor_geometry; - screen_class->get_system_visual = _gdk_win32_screen_get_system_visual; -- screen_class->get_rgba_visual = gdk_win32_screen_get_rgba_visual; -+ screen_class->get_rgba_visual = _gdk_win32_screen_get_system_visual; - screen_class->is_composited = gdk_win32_screen_is_composited; - screen_class->make_display_name = gdk_win32_screen_make_display_name; - screen_class->get_active_window = gdk_win32_screen_get_active_window; ---- gtk+-3.12.0/gdk/win32/gdkvisual-win32.c.orig 2014-03-06 04:42:57.000000000 +0000 -+++ gtk+-3.12.0/gdk/win32/gdkvisual-win32.c 2014-03-29 20:26:40.388596200 +0000 -@@ -194,7 +194,6 @@ - } - else if (bitspixel == 24 || bitspixel == 32) - { -- bitspixel = 24; - system_visual->type = GDK_VISUAL_TRUE_COLOR; - system_visual->red_mask = 0x00FF0000; - system_visual->green_mask = 0x0000FF00; diff --git a/mingw-w64-gtk3/0037-W32-better-dwm-loading-and-support-dwm-detection.all.patch b/mingw-w64-gtk3/0037-W32-better-dwm-loading-and-support-dwm-detection.all.patch deleted file mode 100644 index 5f1ff81431..0000000000 --- a/mingw-w64-gtk3/0037-W32-better-dwm-loading-and-support-dwm-detection.all.patch +++ /dev/null @@ -1,198 +0,0 @@ -diff -ur gtk+-3.12.0/gdk/win32/gdkmain-win32.c gtk+-3.12.0.bak2/gdk/win32/gdkmain-win32.c ---- gtk+-3.12.0/gdk/win32/gdkmain-win32.c 2014-03-24 17:28:56.000000000 +0000 -+++ gtk+-3.12.0.bak2/gdk/win32/gdkmain-win32.c 2014-04-08 07:59:05.282205200 +0000 -@@ -48,6 +48,12 @@ - - static gboolean dummy; - -+#ifdef HAVE_W32_DWM -+static HMODULE dwmdll = NULL; -+PFN_DwmEnableBlurBehindWindow dwmEnableBlurBehindWindow = NULL; -+PFN_DwmIsCompositionEnabled dwmIsCompositionEnabled = NULL; -+#endif -+ - const GOptionEntry _gdk_windowing_args[] = { - { "sync", 0, 0, G_OPTION_ARG_NONE, &gdk_synchronize, - /* Description of --sync in --help output */ N_("Don't batch GDI requests"), NULL }, -@@ -132,6 +138,29 @@ - _cf_text_html = RegisterClipboardFormat ("text/html"); - - _gdk_win32_selection_init (); -+ -+/* HAVE_W32_DWM means that we have necessary declarations at compile-time, -+ * but we'd still like to be able to run on XP, so we'll load the functions -+ * we need at runtime. -+ */ -+#ifdef HAVE_W32_DWM -+ if (dwmdll == NULL) -+ { -+ dwmdll = LoadLibraryA ("dwmapi.dll"); -+ if (dwmdll == NULL) -+ { -+ /* This will make sure that we only try this once */ -+ dwmdll = INVALID_HANDLE_VALUE; -+ } -+ else -+ { -+ dwmEnableBlurBehindWindow = (PFN_DwmEnableBlurBehindWindow) -+ GetProcAddress (dwmdll, "DwmEnableBlurBehindWindow"); -+ dwmIsCompositionEnabled = (PFN_DwmIsCompositionEnabled) -+ GetProcAddress (dwmdll, "DwmIsCompositionEnabled"); -+ } -+ } -+#endif - } - - void -diff -ur gtk+-3.12.0/gdk/win32/gdkprivate-win32.h gtk+-3.12.0.bak2/gdk/win32/gdkprivate-win32.h ---- gtk+-3.12.0/gdk/win32/gdkprivate-win32.h 2014-03-06 04:42:57.000000000 +0000 -+++ gtk+-3.12.0.bak2/gdk/win32/gdkprivate-win32.h 2014-04-08 07:46:45.491763700 +0000 -@@ -41,6 +41,15 @@ - - #include "config.h" - -+#ifdef HAVE_W32_DWM -+#include -+typedef HRESULT (WINAPI *PFN_DwmEnableBlurBehindWindow)(HWND, -+ const DWM_BLURBEHIND *); -+typedef HRESULT (WINAPI *PFN_DwmIsCompositionEnabled)(BOOL *pfEnabled); -+extern PFN_DwmEnableBlurBehindWindow dwmEnableBlurBehindWindow; -+extern PFN_DwmIsCompositionEnabled dwmIsCompositionEnabled; -+#endif -+ - /* Make up for some minor w32api or MSVC6 header lossage */ - - #ifndef PS_JOIN_MASK -@@ -496,6 +505,7 @@ - GdkAtom atom); - void _gdk_win32_append_event (GdkEvent *event); - void _gdk_win32_emit_configure_event (GdkWindow *window); -+gboolean _gdk_win32_is_desktop_composition_enabled (); - - /* Initialization */ - void _gdk_win32_windowing_init (void); -diff -ur gtk+-3.12.0/gdk/win32/gdkscreen-win32.c gtk+-3.12.0.bak2/gdk/win32/gdkscreen-win32.c ---- gtk+-3.12.0/gdk/win32/gdkscreen-win32.c 2014-04-09 18:36:35.355754300 +0000 -+++ gtk+-3.12.0.bak2/gdk/win32/gdkscreen-win32.c 2014-04-09 05:55:46.973645900 +0000 -@@ -174,7 +174,7 @@ - { - g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE); - -- return FALSE; -+ return _gdk_win32_is_desktop_composition_enabled (); - } - - static void -@@ -177,6 +177,27 @@ - return _gdk_win32_is_desktop_composition_enabled (); - } - -+ -+gboolean -+_gdk_win32_is_desktop_composition_enabled () -+{ -+ BOOL b; -+ DWORD sysver, major, minor; -+ sysver = GetVersion (); -+ major = (DWORD)(LOBYTE (LOWORD (sysver))); -+ minor = (DWORD)(HIBYTE (LOWORD (sysver))); -+ /* Composition is always enabled in W8 */ -+ if (major >= 6 && minor >= 2) -+ { -+ return TRUE; -+ } -+ if (dwmIsCompositionEnabled && (S_OK == dwmIsCompositionEnabled (&b))) -+ { -+ return b; -+ } -+ return FALSE; -+} -+ - static void - gdk_win32_screen_finalize (GObject *object) - { ---- gtk+-3.12.0/gdk/win32/gdkwindow-win32.c.orig 2014-04-10 07:23:03.093955400 +0000 -+++ gtk+-3.12.0/gdk/win32/gdkwindow-win32.c 2014-04-10 07:25:38.093137800 +0000 -@@ -688,47 +688,32 @@ - if (attributes_mask & GDK_WA_CURSOR) - gdk_window_set_cursor (window, attributes->cursor); - --/* HAVE_W32_DWM means that we have necessary declarations at compile-time, -- * but we'd still like to be able to run on XP, so we'll load the only non-XP -- * function we need here at runtime. -- */ - #ifdef HAVE_W32_DWM - /* Enable blurbehind, but give it an empty region, leaving us - with all the transparency with none of the blur */ -- { -- typedef HRESULT (WINAPI *PFN_DwmEnableBlurBehindWindow)(HWND, -- const DWM_BLURBEHIND *); -- HMODULE dwmdll; -- PFN_DwmEnableBlurBehindWindow dwmEnableBlurBehindWindow = NULL; -- -- dwmdll = GetModuleHandle ("dwmapi.dll"); -- dwmEnableBlurBehindWindow = (PFN_DwmEnableBlurBehindWindow) -- GetProcAddress (dwmdll, "DwmEnableBlurBehindWindow"); -- -- if (dwmEnableBlurBehindWindow) -- { -- /* Enable blurbehind, but give it an empty region, leaving us -- with all the transparency with none of the blur */ -- DWM_BLURBEHIND bb; -- HRGN hRgn; -- hRgn = CreateRectRgn (0, 0, -1, -1); -- if (hRgn != NULL) -- { -- HRESULT hr; -- memset (&bb, 0, sizeof (bb)); -- bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; -- bb.hRgnBlur = hRgn; -- bb.fEnable = TRUE; -- hr = dwmEnableBlurBehindWindow (GDK_WINDOW_HWND (window), &bb); -- if (S_OK != hr) -- { -- g_warning ("%s: %s failed: %" G_GINT64_MODIFIER "x", -- G_STRLOC, "DwmEnableBlurBehindWindow", (guint64) hr); -- } -- DeleteObject (hRgn); -- } -- } -- } -+ if (dwmEnableBlurBehindWindow && \ -+ _gdk_win32_is_desktop_composition_enabled () && \ -+ GDK_WINDOW_HWND (window) != NULL) -+ { -+ DWM_BLURBEHIND bb; -+ HRGN hRgn; -+ hRgn = CreateRectRgn (0, 0, -1, -1); -+ if (hRgn != NULL) -+ { -+ HRESULT hr; -+ memset (&bb, 0, sizeof (bb)); -+ bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; -+ bb.hRgnBlur = hRgn; -+ bb.fEnable = TRUE; -+ hr = dwmEnableBlurBehindWindow (GDK_WINDOW_HWND (window), &bb); -+ if (S_OK != hr) -+ { -+ g_warning ("%s: %s failed: %" G_GINT32_MODIFIER "x", -+ G_STRLOC, "DwmEnableBlurBehindWindow", (guint32) hr); -+ } -+ DeleteObject (hRgn); -+ } -+ } - #endif - } - ---- gtk+-3.12.0/gtk/gtkwindow.c.orig 2014-03-25 00:17:20.000000000 +0000 -+++ gtk+-3.12.0/gtk/gtkwindow.c 2014-04-10 07:26:47.983012700 +0000 -@@ -3629,6 +3629,9 @@ - - screen = gtk_widget_get_screen (widget); - -+ if (!gdk_screen_is_composited (screen)) -+ return FALSE; -+ - /* We need a visual with alpha */ - visual = gdk_screen_get_rgba_visual (screen); - if (!visual) diff --git a/mingw-w64-gtk3/0054-no-transparency-for-children.all.patch b/mingw-w64-gtk3/0054-no-transparency-for-children.all.patch deleted file mode 100644 index d41f4fa61d..0000000000 --- a/mingw-w64-gtk3/0054-no-transparency-for-children.all.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- gtk+-9e11bb3/gdk/win32/gdkwindow-win32.c.orig 2014-07-25 11:05:40.393869900 +0000 -+++ gtk+-9e11bb3/gdk/win32/gdkwindow-win32.c 2014-07-25 11:49:49.131216800 +0000 -@@ -450,6 +450,7 @@ - gint x, y, real_x = 0, real_y = 0; - /* check consistency of redundant information */ - guint remaining_mask = attributes_mask; -+ gboolean suitable_for_alpha; - - GDK_NOTE (MISC, - g_print ("_gdk_window_impl_new: %s %s\n", -@@ -512,6 +513,7 @@ - GDK_NOTE (MISC, g_print ("... GDK_INPUT_ONLY\n")); - } - -+ suitable_for_alpha = TRUE; - switch (window->window_type) - { - case GDK_WINDOW_TOPLEVEL: -@@ -524,6 +526,7 @@ - if (GDK_WINDOW_TYPE (real_parent) == GDK_WINDOW_FOREIGN) - { - dwStyle = WS_CHILDWINDOW | WS_CLIPCHILDREN; -+ suitable_for_alpha = FALSE; - } - else - { -@@ -538,12 +541,21 @@ - break; - - case GDK_WINDOW_CHILD: -+ suitable_for_alpha = FALSE; - dwStyle = WS_CHILDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - break; - - case GDK_WINDOW_TEMP: - /* A temp window is not necessarily a top level window */ -- dwStyle = (_gdk_root == real_parent ? WS_POPUP : WS_CHILDWINDOW); -+ if (_gdk_root == real_parent) -+ { -+ dwStyle = WS_POPUP; -+ } -+ else -+ { -+ dwStyle = WS_CHILDWINDOW; -+ suitable_for_alpha = FALSE; -+ } - dwStyle |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - dwExStyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST; - offset_x = _gdk_offset_x; -@@ -692,6 +704,7 @@ - /* Enable blurbehind, but give it an empty region, leaving us - with all the transparency with none of the blur */ - if (dwmEnableBlurBehindWindow && \ -+ suitable_for_alpha && \ - _gdk_win32_is_desktop_composition_enabled () && \ - GDK_WINDOW_HWND (window) != NULL) - { diff --git a/mingw-w64-gtk3/0055-skip-testsuite.all.patch b/mingw-w64-gtk3/0055-skip-testsuite.all.patch deleted file mode 100644 index e57b058418..0000000000 --- a/mingw-w64-gtk3/0055-skip-testsuite.all.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- Makefile.am.orig 2014-10-24 21:22:13.559889300 +0200 -+++ Makefile.am 2014-10-24 21:22:37.105175200 +0200 -@@ -1,7 +1,7 @@ - ## Makefile.am for GTK+ - include $(top_srcdir)/Makefile.decl - --SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples -+SRC_SUBDIRS = util gdk gtk libgail-util modules - SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build - - ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} ---- Makefile.in.orig 2014-10-24 21:22:20.402924300 +0200 -+++ Makefile.in 2014-10-24 21:22:52.339700600 +0200 -@@ -540,7 +540,7 @@ XVFB_START = \ - || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \ - && DISPLAY=:$$XID && export DISPLAY - --SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples -+SRC_SUBDIRS = util gdk gtk libgail-util modules - SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build - ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} - MAINTAINERCLEANFILES = \ diff --git a/mingw-w64-gtk3/Make-reftest-plugins-W32-compatible.patch b/mingw-w64-gtk3/Make-reftest-plugins-W32-compatible.patch deleted file mode 100644 index c426a14216..0000000000 --- a/mingw-w64-gtk3/Make-reftest-plugins-W32-compatible.patch +++ /dev/null @@ -1,243 +0,0 @@ -From 213a66f27f5a2a09ecc49e45ec82de7aaf059eae Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= - =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= -Date: Tue, 9 Sep 2014 14:49:05 +0000 -Subject: [PATCH] Make reftest plugins W32-compatible - -When a plugin is loaded, see if it has an initialization function. -If it does, call that function, passing snapshot API function table to it. -This way reftest plugins can be built without linking them to gtk-reftest -application (which provides snapshot inhibition API). - -https://bugzilla.gnome.org/show_bug.cgi?id=736338 ---- - testsuite/reftests/Makefile.am | 6 ++- - testsuite/reftests/expand-expander.c | 6 +-- - testsuite/reftests/gtk-reftest.c | 10 +++++ - testsuite/reftests/libreftest.c | 47 ++++++++++++++++++++++ - testsuite/reftests/libreftest.h | 38 +++++++++++++++++ - .../{gtk-reftest.h => libreftest_private.h} | 10 ++--- - 6 files changed, 107 insertions(+), 10 deletions(-) - create mode 100644 testsuite/reftests/libreftest.c - create mode 100644 testsuite/reftests/libreftest.h - rename testsuite/reftests/{gtk-reftest.h => libreftest_private.h} (80%) - -diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am -index 0853a00..539dcf3 100644 ---- a/testsuite/reftests/Makefile.am -+++ b/testsuite/reftests/Makefile.am -@@ -32,8 +32,7 @@ gtk_reftest_LDADD = \ - $(NULL) - - gtk_reftest_SOURCES = \ -- gtk-reftest.c \ -- gtk-reftest.h -+ gtk-reftest.c - - clean-local: - rm -rf output/ || true -@@ -445,6 +444,9 @@ libreftest_la_LDFLAGS += -avoid-version -module $(no_undefined) - libreftest_la_CFLAGS = $(gtk_reftest_CFLAGS) - libreftest_la_LIBADD = $(gtk_reftest_LDADD) - libreftest_la_SOURCES = \ -+ libreftest.c \ -+ libreftest_private.h \ -+ libreftest.h \ - expand-expander.c \ - set-default-direction.c \ - statusbar-remove-all.c \ -diff --git a/testsuite/reftests/expand-expander.c b/testsuite/reftests/expand-expander.c -index 0bb4d9d..1b8ad2b 100644 ---- a/testsuite/reftests/expand-expander.c -+++ b/testsuite/reftests/expand-expander.c -@@ -22,19 +22,19 @@ - - #include - --#include "gtk-reftest.h" -+#include "libreftest_private.h" - - static gboolean - unblock (gpointer data) - { -- reftest_uninhibit_snapshot (); -+ libreftest_uninhibit_snapshot (); - return G_SOURCE_REMOVE; - } - - G_MODULE_EXPORT void - expand_expander (GtkWidget *widget) - { -- reftest_inhibit_snapshot (); -+ libreftest_inhibit_snapshot (); - gtk_expander_set_expanded (GTK_EXPANDER (widget), TRUE); - g_timeout_add (500, unblock, NULL); - } -diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c -index ed0e634..6da068a 100644 ---- a/testsuite/reftests/gtk-reftest.c -+++ b/testsuite/reftests/gtk-reftest.c -@@ -21,6 +21,7 @@ - #include "config.h" - - #include "reftest-module.h" -+#include "libreftest.h" - - #include - #include -@@ -256,6 +257,11 @@ reftest_uninhibit_snapshot (void) - g_idle_add (quit_when_idle, loop); - } - -+reftest_api api = { -+ .reftest_inhibit_snapshot = reftest_inhibit_snapshot, -+ .reftest_uninhibit_snapshot = reftest_uninhibit_snapshot -+}; -+ - static void - check_for_draw (GdkEvent *event, gpointer data) - { -@@ -351,6 +357,7 @@ connect_signals (GtkBuilder *builder, - ReftestModule *module; - const char *directory; - GCallback func; -+ reftest_plugin_init_func init_func; - GClosure *closure; - char **split; - -@@ -397,6 +404,9 @@ connect_signals (GtkBuilder *builder, - g_error ("failed to lookup handler for name '%s' in module '%s'", split[1], split[0]); - return; - } -+ init_func = (reftest_plugin_init_func) reftest_module_lookup (module, "reftest_plugin_init"); -+ if (init_func) -+ init_func (&api); - break; - default: - g_error ("Could not connect signal handler named '%s'", handler_name); -diff --git a/testsuite/reftests/libreftest.c b/testsuite/reftests/libreftest.c -new file mode 100644 -index 0000000..78eba95 ---- /dev/null -+++ b/testsuite/reftests/libreftest.c -@@ -0,0 +1,47 @@ -+/* -+ * Copyright (C) 2014 Red Hat Inc. -+ * -+ * Author: -+ * Matthias Clasen -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Library General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Library General Public License for more details. -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this library. If not, see . -+ */ -+ -+#include "config.h" -+ -+#include -+ -+#include "libreftest.h" -+ -+static reftest_api api; -+ -+void -+libreftest_inhibit_snapshot (void) -+{ -+ if (api.reftest_inhibit_snapshot) -+ api.reftest_inhibit_snapshot (); -+} -+ -+void -+libreftest_uninhibit_snapshot (void) -+{ -+ if (api.reftest_uninhibit_snapshot) -+ api.reftest_uninhibit_snapshot (); -+} -+ -+G_MODULE_EXPORT void -+reftest_plugin_init (reftest_api *app_api) -+{ -+ api = *app_api; -+} -diff --git a/testsuite/reftests/libreftest.h b/testsuite/reftests/libreftest.h -new file mode 100644 -index 0000000..194703a ---- /dev/null -+++ b/testsuite/reftests/libreftest.h -@@ -0,0 +1,38 @@ -+/* GTK - The GIMP Toolkit -+ * Copyright (C) 2014 Red Hat, Inc. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library. If not, see . -+ */ -+ -+#ifndef __LIBREFTEST_H__ -+#define __LIBREFTEST_H__ -+ -+#include -+ -+G_BEGIN_DECLS -+ -+typedef void (* reftest_inhibit_snapshot_func) (void); -+typedef void (* reftest_uninhibit_snapshot_func) (void); -+ -+typedef struct -+{ -+ reftest_inhibit_snapshot_func reftest_inhibit_snapshot; -+ reftest_uninhibit_snapshot_func reftest_uninhibit_snapshot; -+} reftest_api; -+ -+typedef void (* reftest_plugin_init_func) (reftest_api *api); -+ -+G_END_DECLS -+ -+#endif /* __LIBREFTEST_H__ */ -diff --git a/testsuite/reftests/gtk-reftest.h b/testsuite/reftests/libreftest_private.h -similarity index 80% -rename from testsuite/reftests/gtk-reftest.h -rename to testsuite/reftests/libreftest_private.h -index aa527b6..4359cf7 100644 ---- a/testsuite/reftests/gtk-reftest.h -+++ b/testsuite/reftests/libreftest_private.h -@@ -15,14 +15,14 @@ - * License along with this library. If not, see . - */ - --#ifndef __GTK_REFTEST_H__ --#define __GTK_REFTEST_H__ -+#ifndef __LIBREFTEST_PRIVATE_H__ -+#define __LIBREFTEST_PRIVATE_H__ - - G_BEGIN_DECLS - --void reftest_inhibit_snapshot (void); --void reftest_uninhibit_snapshot (void); -+void libreftest_inhibit_snapshot (void); -+void libreftest_uninhibit_snapshot (void); - - G_END_DECLS - --#endif /* __GTK_REFTEST_H__ */ -+#endif /* __LIBREFTEST_PRIVATE_H__ */ --- -1.8.5.3 \ No newline at end of file diff --git a/mingw-w64-gtk3/PKGBUILD b/mingw-w64-gtk3/PKGBUILD index 0f0f2d68ef..c72db7ddcd 100644 --- a/mingw-w64-gtk3/PKGBUILD +++ b/mingw-w64-gtk3/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gtk3 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.4 +pkgver=3.18.6 pkgrel=1 pkgdesc="GObject-based multi-platform GUI toolkit (v3) (mingw-w64)" arch=('any') @@ -17,68 +18,60 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" makedepends+=("autoconf" "automake" "libtool") # autotools are required because several Makefile.am are modified depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" "${MINGW_PACKAGE_PREFIX}-atk" - "${MINGW_PACKAGE_PREFIX}-pango" - "${MINGW_PACKAGE_PREFIX}-glib2>=2.41.0" "${MINGW_PACKAGE_PREFIX}-cairo" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-json-glib" + "${MINGW_PACKAGE_PREFIX}-libepoxy" + "${MINGW_PACKAGE_PREFIX}-pango" "${MINGW_PACKAGE_PREFIX}-shared-mime-info") options=('strip' '!debug' 'staticlibs') source=("http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-${pkgver}.tar.xz" - 0010-put-gtk-dll-into-path.mingw.patch - 0013-fix-mingw-w64-fstat-call.mingw.patch - 0035-enable-rgba-w32-windows.all.patch - 0037-W32-better-dwm-loading-and-support-dwm-detection.all.patch - 0054-no-transparency-for-children.all.patch - 0055-skip-testsuite.all.patch - Make-reftest-plugins-W32-compatible.patch) -md5sums=('103a3521cf792f2ee12d0d1349d79288' - '9e0296da2986be7697cf343563b85d1f' - '21789d52c1debcab59f8b6a99232de68' - '397bf8001d3da75e06b5794e378ae25f' - 'ad383a497a9134355e0a549f844c3a33' - '31d098e6856ddc8dde7259ae572f8bf1' - 'b52eab2ba0da33ae55050b0a68cc996f' - '864d4b2cd6f72115cc78a393ccd96b47') + 0013-fix-mingw-w64-fstat-call.mingw.patch) +md5sums=('e1c41ad4a6012d703a80f7423acf186e' + '21789d52c1debcab59f8b6a99232de68') prepare() { cd "${srcdir}/gtk+-${pkgver}" - patch -Np1 -i "${srcdir}"/0010-put-gtk-dll-into-path.mingw.patch patch -Np1 -i "${srcdir}"/0013-fix-mingw-w64-fstat-call.mingw.patch - patch -Np1 -i "${srcdir}"/0035-enable-rgba-w32-windows.all.patch - patch -Np1 -i "${srcdir}"/0037-W32-better-dwm-loading-and-support-dwm-detection.all.patch - patch -Np1 -i "${srcdir}"/0054-no-transparency-for-children.all.patch - patch -N < "${srcdir}"/0055-skip-testsuite.all.patch - #patch -Np1 -i "${srcdir}"/Make-reftest-plugins-W32-compatible.patch autoreconf -i } build() { + #export GI_SCANNER_DEBUG="save-temps" export MSYS2_ARG_CONV_EXCL="-//OASIS//DTD" - [[ -d "${srcdir}/${CHOST}" ]] && rm -rf "${srcdir}/${CHOST}" - cp -rf ${srcdir}/gtk+-${pkgver} "${srcdir}/${CHOST}" - cd "${srcdir}/${CHOST}" + rm -rf build-${MINGW_CHOST} + cp -rf gtk+-${pkgver} build-${MINGW_CHOST} + #mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/share/pkgconfig" \ ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-win32-backend \ - --disable-gtk2-dependency \ --enable-shared \ --enable-introspection \ + --enable-broadway-backend \ --disable-cups \ - --with-included-immodules - make + --with-included-immodules \ + --enable-silent-rules + + make #V=1 } package() { - export MSYS2_ARG_CONV_EXCL="-//OASIS" - cd "${srcdir}/${CHOST}" - make -j1 DESTDIR="$pkgdir" install + #export MSYS2_ARG_CONV_EXCL="-//OASIS" + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' -o -name '*.manifest' | xargs -rtl1 rm - + mv ${pkgdir}${MINGW_PREFIX}/bin/gtk-update-icon-cache{,-3.0}.exe mv ${pkgdir}${MINGW_PREFIX}/share/man/man1/gtk-update-icon-cache{,-3.0}.1 + + install -Dm644 "${srcdir}/gtk+-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gtk3/gtk3-i686.install b/mingw-w64-gtk3/gtk3-i686.install index 1b09e7f352..9a816e1baf 100644 --- a/mingw-w64-gtk3/gtk3-i686.install +++ b/mingw-w64-gtk3/gtk3-i686.install @@ -1,18 +1,19 @@ post_install() { - mkdir -p mingw32/lib/gtk-3.0 - mingw32/bin/gtk-query-immodules-3.0.exe > mingw32/lib/gtk-3.0/immodules.cache - mingw32/bin/gtk-update-icon-cache-3.0 -f -t mingw32/share/icons/hicolor - mingw32/bin/glib-compile-schemas.exe mingw32/share/glib-2.0/schemas + mkdir -p mingw32/lib/gtk-3.0 + mingw32/bin/gtk-query-immodules-3.0.exe > mingw32/lib/gtk-3.0/immodules.cache + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/Adwaita + mingw32/bin/glib-compile-schemas.exe mingw32/share/glib-2.0/schemas - settingsfile=mingw32/etc/gtk-3.0/settings.ini - if test ! -f $settingsfile - then - echo [Settings]>>$settingsfile - echo gtk-xft-antialias=1>>$settingsfile - echo gtk-xft-hinting=1>>$settingsfile - echo gtk-xft-hintstyle=hintfull>>$settingsfile - echo gtk-xft-rgba=rgb>>$settingsfile - fi + settingsfile=mingw32/etc/gtk-3.0/settings.ini + if test ! -f $settingsfile + then + echo [Settings]>>$settingsfile + echo gtk-xft-antialias=1>>$settingsfile + echo gtk-xft-hinting=1>>$settingsfile + echo gtk-xft-hintstyle=hintfull>>$settingsfile + echo gtk-xft-rgba=rgb>>$settingsfile + fi } post_upgrade() { @@ -20,7 +21,8 @@ post_upgrade() { } post_remove() { - rm -f mingw32/lib/gtk-3.0/immodules.cache - mingw32/bin/glib-compile-schemas.exe mingw32/share/glib-2.0/schemas - mingw32/bin/gtk-update-icon-cache-3.0 -f -t mingw32/share/icons/hicolor + rm -f mingw32/lib/gtk-3.0/immodules.cache + mingw32/bin/glib-compile-schemas.exe mingw32/share/glib-2.0/schemas + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/Adwaita } diff --git a/mingw-w64-gtk3/gtk3-x86_64.install b/mingw-w64-gtk3/gtk3-x86_64.install index 7f0ad01f90..ccb3c37ae7 100644 --- a/mingw-w64-gtk3/gtk3-x86_64.install +++ b/mingw-w64-gtk3/gtk3-x86_64.install @@ -1,18 +1,19 @@ post_install() { - mkdir -p mingw64/lib/gtk-3.0 - mingw64/bin/gtk-query-immodules-3.0.exe > mingw64/lib/gtk-3.0/immodules.cache - mingw64/bin/gtk-update-icon-cache-3.0 -f -t mingw64/share/icons/hicolor - mingw64/bin/glib-compile-schemas.exe mingw64/share/glib-2.0/schemas + mkdir -p mingw64/lib/gtk-3.0 + mingw64/bin/gtk-query-immodules-3.0.exe > mingw64/lib/gtk-3.0/immodules.cache + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/Adwaita + mingw64/bin/glib-compile-schemas.exe mingw64/share/glib-2.0/schemas - settingsfile=mingw64/etc/gtk-3.0/settings.ini - if test ! -f $settingsfile - then - echo [Settings]>>$settingsfile - echo gtk-xft-antialias=1>>$settingsfile - echo gtk-xft-hinting=1>>$settingsfile - echo gtk-xft-hintstyle=hintfull>>$settingsfile - echo gtk-xft-rgba=rgb>>$settingsfile - fi + settingsfile=mingw64/etc/gtk-3.0/settings.ini + if test ! -f $settingsfile + then + echo [Settings]>>$settingsfile + echo gtk-xft-antialias=1>>$settingsfile + echo gtk-xft-hinting=1>>$settingsfile + echo gtk-xft-hintstyle=hintfull>>$settingsfile + echo gtk-xft-rgba=rgb>>$settingsfile + fi } post_upgrade() { @@ -20,7 +21,8 @@ post_upgrade() { } post_remove() { - rm -f mingw64/lib/gtk-3.0/immodules.cache - mingw64/bin/glib-compile-schemas.exe mingw64/share/glib-2.0/schemas - mingw64/bin/gtk-update-icon-cache-3.0 -f -t mingw64/share/icons/hicolor + rm -f mingw64/lib/gtk-3.0/immodules.cache + mingw64/bin/glib-compile-schemas.exe mingw64/share/glib-2.0/schemas + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/Adwaita } diff --git a/mingw-w64-gtkada/PKGBUILD b/mingw-w64-gtkada/PKGBUILD index 73b143b308..68336dd745 100644 --- a/mingw-w64-gtkada/PKGBUILD +++ b/mingw-w64-gtkada/PKGBUILD @@ -2,8 +2,8 @@ _realname=gtkada pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} -pkgrel=1 pkgver=3.8.2 +pkgrel=2 pkgdesc="GtkAda is a Gtk3+ binding for Ada using the OOP and other features of this programming language" arch=('any') conflicts=("${MINGW_PACKAGE_PREFIX}-GtkAda-svn") @@ -11,23 +11,24 @@ provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") url="http://libre.adacore.com/tools/gtkada/" options=('!staticlibs' 'strip') license=('GPL3' 'custom') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-ada") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-ada" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-ada" "${MINGW_PACKAGE_PREFIX}-gtk3") source=("http://www.pfeifers-software.de/files/GNAT/${_realname}-gpl-${pkgver}-src.tgz" - "gtkada-mingw.diff") + "gtkada-mingw.diff" + "space_issue.patch") sha1sums=('84285ea8c016d18bac8860573ff5223ecea8ecf4' - 'ca7dcd32bfbfecdcbd923bb2e12dc5b8b0f91305') + 'ca7dcd32bfbfecdcbd923bb2e12dc5b8b0f91305') prepare() { - cd ${srcdir}/$_realname-$pkgver-src + cd ${srcdir}/${_realname}-${pkgver}-src patch -p0 < contrib/gtkada-3-win32.diff patch -p1 < ${srcdir}/gtkada-mingw.diff + patch -p1 < ${srcdir}/space_issue.patch } build() { - cd ${srcdir}/$_realname-$pkgver-src + cd ${srcdir}/${_realname}-${pkgver}-src if [ -f Makefile ]; then make distclean fi @@ -38,18 +39,18 @@ build() { --enable-shared \ --disable-static \ --with-GL=no - + make -j1 } package() { - cd ${srcdir}/$_realname-$pkgver-src - make DESTDIR="$pkgdir" install + cd ${srcdir}/${_realname}-${pkgver}-src + make DESTDIR="${pkgdir}" install rm -rf ${pkgdir}${MINGW_PREFIX}/share/examples rm -rf ${pkgdir}${MINGW_PREFIX}/share/doc # Copy License Files - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -pf ${srcdir}/${_realname}-$pkgver-src/COPYING* \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} + cp -pf ${srcdir}/${_realname}-${pkgver}-src/COPYING* \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} } diff --git a/mingw-w64-gtkada/space_issue.patch b/mingw-w64-gtkada/space_issue.patch new file mode 100644 index 0000000000..598aafbef3 --- /dev/null +++ b/mingw-w64-gtkada/space_issue.patch @@ -0,0 +1,62 @@ +diff -rup gtkada-3.8.2-src-org/testgtk/create_css_editor.adb gtkada-3.8.2-src/testgtk/create_css_editor.adb +--- gtkada-3.8.2-src-org/testgtk/create_css_editor.adb 2014-01-06 18:22:20.000000000 +0800 ++++ gtkada-3.8.2-src/testgtk/create_css_editor.adb 2015-11-06 11:13:16.881265500 +0800 +@@ -38,28 +38,28 @@ package body Create_Css_Editor is + + CSS : constant String := + "/* You can edit the text in this window to change the" & ASCII.LF +- &" * appearance of this Window." & ASCII.LF +- &" * Be careful, if you screw it up, nothing might be visible" & ASCII.LF +- &" * anymore. :)" & ASCII.LF +- &" */" & ASCII.LF & ASCII.LF ++ & " * appearance of this Window." & ASCII.LF ++ & " * Be careful, if you screw it up, nothing might be visible" & ASCII.LF ++ & " * anymore. :)" & ASCII.LF ++ & " */" & ASCII.LF & ASCII.LF + +- &"/* This CSS resets all properties to their defaults values" & ASCII.LF +- &" * and overrides all user settings and the theme in use */" & ASCII.LF ++ & "/* This CSS resets all properties to their defaults values" & ASCII.LF ++ & " * and overrides all user settings and the theme in use */" & ASCII.LF + & ASCII.LF + +- &"/* Set a very futuristic style by default */" & ASCII.LF & ASCII.LF ++ & "/* Set a very futuristic style by default */" & ASCII.LF & ASCII.LF + +- &"* {" & ASCII.LF +- &" color: green;" & ASCII.LF +- &" font-family: Monospace;" & ASCII.LF +- &" border: 1px solid;" & ASCII.LF +- &"}" & ASCII.LF +- +- &"/* Make sure selections are visible */" & ASCII.LF +- &":selected {" & ASCII.LF +- &" background-color: darkGreen;" & ASCII.LF +- &" color: black;" & ASCII.LF +- &"}"; ++ & "* {" & ASCII.LF ++ & " color: green;" & ASCII.LF ++ & " font-family: Monospace;" & ASCII.LF ++ & " border: 1px solid;" & ASCII.LF ++ & "}" & ASCII.LF ++ ++ & "/* Make sure selections are visible */" & ASCII.LF ++ & ":selected {" & ASCII.LF ++ & " background-color: darkGreen;" & ASCII.LF ++ & " color: black;" & ASCII.LF ++ & "}"; + + Last_Working_Css : Unbounded_String := To_Unbounded_String (CSS); + Error : aliased Glib.Error.GError; +diff -rup gtkada-3.8.2-src-org/testgtk/create_print.adb gtkada-3.8.2-src/testgtk/create_print.adb +--- gtkada-3.8.2-src-org/testgtk/create_print.adb 2014-01-06 18:22:20.000000000 +0800 ++++ gtkada-3.8.2-src/testgtk/create_print.adb 2015-11-06 11:20:56.435618300 +0800 +@@ -127,7 +127,7 @@ package body Create_Print is + Close_Path (Cr); + + Set_Source_Rgb (Cr, 0.0, 0.0, 0.0); +- Set_Line_Width (Cr, 1.0/16.0); ++ Set_Line_Width (Cr, 1.0 / 16.0); + Set_Line_Cap (Cr, Cairo_Line_Cap_Round); + Set_Line_Join (Cr, Cairo_Line_Join_Round); + Cairo.Stroke (Cr); diff --git a/mingw-w64-gtkglext/PKGBUILD b/mingw-w64-gtkglext/PKGBUILD index 87d8616ac0..c94bdf1405 100644 --- a/mingw-w64-gtkglext/PKGBUILD +++ b/mingw-w64-gtkglext/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gtkglext - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="opengl extensions for gtk2 (mingw-w64)" arch=('any') url="http://gtkglext.sourceforge.net" @@ -13,9 +12,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gtk2" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2") options=('staticlibs' 'strip') source=("http://downloads.sourceforge.net/sourceforge/gtkglext/gtkglext-${pkgver}.tar.bz2" - "gtk2.20.patch" - "gtkglext-1.0.6-pangox.patch" - ) + "gtk2.20.patch" + "gtkglext-1.0.6-pangox.patch") md5sums=('ed7ba24ce06a8630c07f2d0ee5f04ab4' 'e5a87ec3f2d0e616c6f32f90c3f7237f' '7e35925b3c722717f969558cc627f39f') @@ -40,12 +38,12 @@ build() { --disable-glibtest \ --disable-gtktest \ --disable-debug + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm - #rm -r "${pkgdir}${MINGW_PREFIX}/share" -} \ No newline at end of file +} diff --git a/mingw-w64-gtkhtml3/PKGBUILD b/mingw-w64-gtkhtml3/PKGBUILD new file mode 100644 index 0000000000..ba371eb4fe --- /dev/null +++ b/mingw-w64-gtkhtml3/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Alexey Pavlov + +_realname=gtkhtml +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}3" +pkgver=4.8.5 +pkgrel=1 +pkgdesc="Library for embedding a lightweight web browser in GTK programs (mingw-w64)" +arch=('any') +url="http://www.gnome.org" +license=("LGPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-iso-codes" + "intltool") +depends=("${MINGW_PACKAGE_PREFIX}-enchant" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libsystre") +options=(!libtool strip staticlibs) +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +md5sums=('a146d2ffdf52f6aa25badb75436b6f4d') + +prepare() { + cd ${_realname}-$pkgver +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --disable-static + + LC_ALL=C make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="$pkgdir" install +} diff --git a/mingw-w64-gtkimageview/PKGBUILD b/mingw-w64-gtkimageview/PKGBUILD index ba7e80adfb..e25a71e748 100644 --- a/mingw-w64-gtkimageview/PKGBUILD +++ b/mingw-w64-gtkimageview/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gtkimageview - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.6.4 -pkgrel=1 +pkgrel=2 pkgdesc="Simple image viewer widget for GTK2 (mingw-w64)" arch=('any') url="https://github.com/GNOME/gtkimageview" @@ -13,7 +12,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gtk2") options=('strip' 'staticlibs') source=("http://trac.bjourne.webfactional.com/chrome/common/releases/${_realname}-${pkgver}.tar.gz") -md5sums=('8346b42012a82d5fe6f1c151bae346c3') +md5sums=('501367b3f50e69a12208dc9c6ad00b18') prepare() { cd "${srcdir}/${_realname}-${pkgver}" diff --git a/mingw-w64-gtkimageview/gtkimageview-1.6.4.tar.gz b/mingw-w64-gtkimageview/gtkimageview-1.6.4.tar.gz new file mode 100644 index 0000000000..4eda1aaaf0 Binary files /dev/null and b/mingw-w64-gtkimageview/gtkimageview-1.6.4.tar.gz differ diff --git a/mingw-w64-gtkmm/PKGBUILD b/mingw-w64-gtkmm/PKGBUILD index 5fff9d7a93..9e33f662f9 100644 --- a/mingw-w64-gtkmm/PKGBUILD +++ b/mingw-w64-gtkmm/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gtkmm - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.24.4 -pkgrel=2 +pkgrel=3 pkgdesc="C++ bindings for gtk2 (mingw-w64)" arch=('any') url="http://www.gtkmm.org" @@ -12,7 +11,7 @@ license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-atkmm" "${MINGW_PACKAGE_PREFIX}-pangomm" "${MINGW_PACKAGE_PREFIX}-gtk2") options=(staticlibs strip) -source=("http://ftp.gnome.org/pub/GNOME/sources/gtkmm/${pkgver%.*}/gtkmm-$pkgver.tar.xz") +source=("http://ftp.gnome.org/pub/GNOME/sources/gtkmm/${pkgver%.*}/gtkmm-${pkgver}.tar.xz") md5sums=('b9ac60c90959a71095f07f84dd39961d') build() { @@ -31,6 +30,6 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-gtkmm3/PKGBUILD b/mingw-w64-gtkmm3/PKGBUILD index 65d34b87f4..52ef1e0eb7 100644 --- a/mingw-w64-gtkmm3/PKGBUILD +++ b/mingw-w64-gtkmm3/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gtkmm3 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.0 +pkgver=3.18.0 pkgrel=1 pkgdesc="C++ bindings for gtk3 (mingw-w64)" arch=('any') @@ -11,8 +12,8 @@ license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-atkmm" "${MINGW_PACKAGE_PREFIX}-pangomm" "${MINGW_PACKAGE_PREFIX}-gtk3") options=('staticlibs' 'strip') -source=("http://ftp.gnome.org/pub/GNOME/sources/gtkmm/${pkgver%.*}/gtkmm-$pkgver.tar.xz") -sha256sums=('d9f528a62c6ec226fa08287c45c7465b2dce5aae5068e9ac48d30a64a378e48b') +source=("http://ftp.gnome.org/pub/GNOME/sources/gtkmm/${pkgver%.*}/gtkmm-${pkgver}.tar.xz") +sha256sums=('829fa113daed74398c49c3f2b7672807f58ba85d0fa463f5bc726e1b0138b86b') build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" @@ -29,6 +30,6 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-gtksourceview2/PKGBUILD b/mingw-w64-gtksourceview2/PKGBUILD index 860b5144a2..292d7234a9 100644 --- a/mingw-w64-gtksourceview2/PKGBUILD +++ b/mingw-w64-gtksourceview2/PKGBUILD @@ -1,25 +1,22 @@ # Maintainer: Alexey Pavlov _realname=gtksourceview - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}2" pkgver=2.10.5 -pkgrel=1 +pkgrel=2 pkgdesc="A text widget adding syntax highlighting and more to GNOME (mingw-w64)" arch=('any') url="http://www.gnome.org" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "intltool") -depends=( - "${MINGW_PACKAGE_PREFIX}-gtk2>=2.22.0" - "${MINGW_PACKAGE_PREFIX}-libxml2>=2.7.7" -) +depends=("${MINGW_PACKAGE_PREFIX}-gtk2>=2.22.0" + "${MINGW_PACKAGE_PREFIX}-libxml2>=2.7.7") options=(!libtool strip staticlibs) source=("http://ftp.gnome.org/pub/gnome/sources/gtksourceview/${pkgver%.*}/gtksourceview-${pkgver}.tar.bz2") md5sums=('1219ad1694df136f126507466aeb41aa') prepare() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} sed -i 's#python#python2#' gtksourceview/language-specs/convert.py } @@ -33,10 +30,11 @@ build() { --enable-shared \ --disable-static \ --enable-compile-warnings=maximum + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-gtksourceview3/PKGBUILD b/mingw-w64-gtksourceview3/PKGBUILD index e4d8dc754d..40f2ac74fd 100644 --- a/mingw-w64-gtksourceview3/PKGBUILD +++ b/mingw-w64-gtksourceview3/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=gtksourceview +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}3" -pkgver=3.14.1 +pkgver=3.18.1 pkgrel=1 pkgdesc="A text widget adding syntax highlighting and more to GNOME (mingw-w64)" arch=('any') @@ -12,25 +13,31 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-glade" - "intltool") + "${MINGW_PACKAGE_PREFIX}-vala" + "intltool" + "gtk-doc") depends=("${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-libxml2") options=(!libtool strip staticlibs) source=("http://ftp.gnome.org/pub/gnome/sources/gtksourceview/${pkgver%.*}/gtksourceview-${pkgver}.tar.xz" 0006-hack-convert-path-back-to-unix.patch) -md5sums=('a769939c7a3e3a07d365740404de1bd7' +md5sums=('b7600b6cc06ec96ce1d028bf7a44d14b' '324c9e3bb2e4fa2a4977653ce6ed6ef9') prepare() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/0006-hack-convert-path-back-to-unix.patch + autoreconf -fi } build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - DATADIRNAME=share \ + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -38,17 +45,20 @@ build() { --enable-shared \ --disable-static \ --enable-glade-catalog - LC_ALL=C make -j1 V=1 + + LC_ALL=C make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - + make -j1 DESTDIR="${pkgdir}" install + for ff in ${pkgdir}/${MINGW_PREFIX}/bin/libgtksourceview*.dll; do local _reallib=$(basename $ff) _reallib=${_reallib%.dll} _reallib=${_reallib#lib} sed -e "s|library=\"gtksourceview-3.0\"|library=\"${_reallib}\"|g" -i ${pkgdir}/${MINGW_PREFIX}/share/glade/catalogs/gtksourceview.xml done + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gtksourceviewmm2/000-C11.patch b/mingw-w64-gtksourceviewmm2/000-C11.patch new file mode 100644 index 0000000000..312aee5833 --- /dev/null +++ b/mingw-w64-gtksourceviewmm2/000-C11.patch @@ -0,0 +1,24 @@ +diff -rup gtksourceviewmm-2.10.3/gtksourceview/gtksourceviewmm/Makefile.am gtksourceviewmm-2.10.3-ricky/gtksourceview/gtksourceviewmm/Makefile.am +--- gtksourceviewmm-2.10.3/gtksourceview/gtksourceviewmm/Makefile.am 2012-05-16 00:25:22.835335900 +0800 ++++ gtksourceviewmm-2.10.3-ricky/gtksourceview/gtksourceviewmm/Makefile.am 2015-10-23 14:59:11.329021800 +0800 +@@ -5,7 +5,7 @@ include $(srcdir)/filelist.am + include $(top_srcdir)/build/compile-binding.am + + AM_CPPFLAGS = $(binding_includes) $(binding_cppflags) $(GTHREAD_CFLAGS) $(GTKSOURCEVIEWMM_CFLAGS) +-AM_CXXFLAGS = $(GTKSOURCEVIEWMM_WXXFLAGS) ++AM_CXXFLAGS = $(GTKSOURCEVIEWMM_WXXFLAGS) -std=c++11 + + libgtksourceviewmm_@GTKSOURCEVIEWMM_API_VERSION@_la_SOURCES = $(binding_sources) + libgtksourceviewmm_@GTKSOURCEVIEWMM_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(GTKSOURCEVIEWMM_SO_VERSION) +diff -rup gtksourceviewmm-2.10.3/gtksourceview/gtksourceviewmm/Makefile.in gtksourceviewmm-2.10.3-ricky/gtksourceview/gtksourceviewmm/Makefile.in +--- gtksourceviewmm-2.10.3/gtksourceview/gtksourceviewmm/Makefile.in 2012-05-16 03:35:31.192869700 +0800 ++++ gtksourceviewmm-2.10.3-ricky/gtksourceview/gtksourceviewmm/Makefile.in 2015-10-23 14:59:54.278595300 +0800 +@@ -344,7 +344,7 @@ binding_private_HEADERS = $(files_built_ + binding_built_sources = $(files_built_cc) $(files_built_h) $(files_built_ph) + MAINTAINERCLEANFILES = $(binding_built_sources) $(addprefix $(srcdir)/,$(binding_built_sources)) + AM_CPPFLAGS = $(binding_includes) $(binding_cppflags) $(GTHREAD_CFLAGS) $(GTKSOURCEVIEWMM_CFLAGS) +-AM_CXXFLAGS = $(GTKSOURCEVIEWMM_WXXFLAGS) ++AM_CXXFLAGS = $(GTKSOURCEVIEWMM_WXXFLAGS) -std=c++11 + libgtksourceviewmm_@GTKSOURCEVIEWMM_API_VERSION@_la_SOURCES = $(binding_sources) + libgtksourceviewmm_@GTKSOURCEVIEWMM_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(GTKSOURCEVIEWMM_SO_VERSION) + libgtksourceviewmm_@GTKSOURCEVIEWMM_API_VERSION@_la_LIBADD = $(GTKSOURCEVIEWMM_LIBS) diff --git a/mingw-w64-gtksourceviewmm2/PKGBUILD b/mingw-w64-gtksourceviewmm2/PKGBUILD new file mode 100644 index 0000000000..57dc4f191c --- /dev/null +++ b/mingw-w64-gtksourceviewmm2/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Ricky Wu + +_realname=gtksourceviewmm +pkgbase="mingw-w64-${_realname}2" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}2" +pkgver=2.10.3 +pkgrel=1 +pkgdesc="A text widget adding syntax highlighting and more to GNOME (mingw-w64)" +arch=('any') +url="http://www.gnome.org" +license=("GPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "intltool") +depends=("${MINGW_PACKAGE_PREFIX}-gtk2>=2.22.0" + "${MINGW_PACKAGE_PREFIX}-libxml2>=2.7.7") +options=(!libtool strip staticlibs) +source=("http://ftp.gnome.org/pub/gnome/sources/gtksourceviewmm/${pkgver%.*}/gtksourceviewmm-${pkgver}.tar.xz" + 000-C11.patch) +md5sums=('1219ad1694df136f126507466aeb41aa') + +prepare() { + cd ${_realname}-${pkgver} + patch -b -V simple -p1 -i ${srcdir}/000-C11.patch +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --disable-static \ + --enable-compile-warnings=maximum + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-gtksourceviewmm3/PKGBUILD b/mingw-w64-gtksourceviewmm3/PKGBUILD new file mode 100644 index 0000000000..235dbb4ac2 --- /dev/null +++ b/mingw-w64-gtksourceviewmm3/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Alexey Pavlov + +_realname=gtksourceviewmm +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}3" +pkgver=3.18.0 +pkgrel=1 +pkgdesc="C++ bindings to gtksourceview3 library (mingw-w64)" +arch=('any') +url="http://www.gnome.org" +license=("LGPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gtksourceview3" "${MINGW_PACKAGE_PREFIX}-gtkmm3") +options=(strip staticlibs) +source=("http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +sha1sums=('5104c6fa2d3082686fffd1e6f5f5977138fb71bc') + +build() { + CPPFLAGS+=" -D_REENTRANT" + export lt_cv_deplibs_check_method='pass_all' + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --disable-documentation + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm +} diff --git a/mingw-w64-gtkspell/PKGBUILD b/mingw-w64-gtkspell/PKGBUILD index d50216d002..8231ef19ae 100644 --- a/mingw-w64-gtkspell/PKGBUILD +++ b/mingw-w64-gtkspell/PKGBUILD @@ -1,14 +1,14 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=gtkspell - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.16 -pkgrel=1 +pkgrel=4 pkgdesc="Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget (mingw-w64)" arch=('any') url="http://gtkspell.sourceforge.net/" -license=("GPL") +license=(GPL2) makedepends=("gtk-doc" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" @@ -22,9 +22,9 @@ md5sums=('f75dcc9338f182c571b321d37c606a94' '0ea2a6801314e22ba8e517fca4ad3066') prepare() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/gtkspell-no-undefined.patch - + WANT_AUTOMAKE=latest autoreconf -fi } @@ -37,10 +37,12 @@ build() { --host=${MINGW_CHOST} \ --enable-shared \ --disable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-gtkspell3/001-win.patch b/mingw-w64-gtkspell3/001-win.patch new file mode 100644 index 0000000000..2994430ce5 --- /dev/null +++ b/mingw-w64-gtkspell3/001-win.patch @@ -0,0 +1,10 @@ +--- ./gtkspell/Makefile.am.orig 2015-01-12 11:51:39.685322000 +0100 ++++ ./gtkspell/Makefile.am 2015-01-12 11:51:05.691346400 +0100 +@@ -52,6 +52,7 @@ + + if HAVE_INTROSPECTION + INTROSPECTION_GIRS = ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if ENABLE_GTK3 + GtkSpell-3.0.gir: libgtkspell3-3.la diff --git a/mingw-w64-gtkspell3/PKGBUILD b/mingw-w64-gtkspell3/PKGBUILD new file mode 100644 index 0000000000..e5087fe521 --- /dev/null +++ b/mingw-w64-gtkspell3/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Alexey Pavlov + +_realname=gtkspell3 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.0.7 +pkgrel=1 +pkgdesc="Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget (mingw-w64)" +arch=('any') +url="http://gtkspell.sourceforge.net/" +license=("GPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-iso-codes" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala" + "gtk-doc" + "intltool") +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-enchant") +options=(!libtool strip staticlibs) +source=(http://gtkspell.sourceforge.net/download/${_realname}-${pkgver}.tar.gz + 001-win.patch) +md5sums=('f15a7c29b71d6ae343c783af3571c8d2' + '761980f7811a41f4dab9a2a797946316') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-win.patch + + WANT_AUTOMAKE=latest autoreconf -fi +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --disable-static \ + --enable-gtk2 + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-guile/PKGBUILD b/mingw-w64-guile/PKGBUILD index ca9f98a03f..04f6111ff9 100644 --- a/mingw-w64-guile/PKGBUILD +++ b/mingw-w64-guile/PKGBUILD @@ -29,7 +29,7 @@ md5sums=('e532c68c6f17822561e3001136635ddd' prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0002-winpthreads-compat.mingw.patch - + autoreconf -fi } diff --git a/mingw-w64-gxml/PKGBUILD b/mingw-w64-gxml/PKGBUILD index d56b727664..106eaabe3d 100644 --- a/mingw-w64-gxml/PKGBUILD +++ b/mingw-w64-gxml/PKGBUILD @@ -1,37 +1,38 @@ # Maintainer: Daniel Espinosa _realname=gxml +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.4.1 -pkgrel=1 +pkgver=0.6.0 +pkgrel=2 arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") -pkgdesc="LibXML2 GObject wrapper version 0.4 (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-xz" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-glib2>=2.34.0" - "${MINGW_PACKAGE_PREFIX}-libgee" - "${MINGW_PACKAGE_PREFIX}-vala" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-libtool") +pkgdesc="LibXML2 GObject wrapper (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libgee" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-libtool" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") options=('strip' 'staticlibs') license=('LGPL') url="http://live.gnome.org/GXml" -source=("http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver:0:3}/${_realname}-$pkgver.tar.xz") -sha256sums=('f821c5b076208aa311151c263b951aaab27991663edd1918c05522aa0463663d') +source=("http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz") +sha256sums=('50f5e1b691fcc2994264565bcbfa4cfcd386bd01ea98c9fbec3ae4ec66ce7fc8') prepare() { cd "${srcdir}"/${_realname}-${pkgver} - + # Get proper unprefixed directories for gobject-introspection files autoreconf -fiv } -build() -{ +build() { mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} @@ -40,12 +41,12 @@ build() --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ - --libexecdir=${MINGW_PREFIX}/lib - make + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + make -j1 } -package() -{ - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-h2o/0001-update-yaml-to-0.1.6-for-security-fix.patch b/mingw-w64-h2o/0001-update-yaml-to-0.1.6-for-security-fix.patch new file mode 100644 index 0000000000..59feb22b8b --- /dev/null +++ b/mingw-w64-h2o/0001-update-yaml-to-0.1.6-for-security-fix.patch @@ -0,0 +1,116 @@ +From 30967875041a0d5797eeed6adaadf3e87885e860 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Fri, 26 Jun 2015 00:16:28 +0100 +Subject: [PATCH 1/8] update yaml to 0.1.6 for security fix + +--- + deps/yaml/configure.ac | 4 ++-- + deps/yaml/include/yaml.h | 12 +----------- + deps/yaml/src/scanner.c | 3 +++ + deps/yaml/src/yaml_private.h | 11 +++++++---- + deps/yaml/win32/config.h | 4 ++-- + 5 files changed, 15 insertions(+), 19 deletions(-) + +diff --git a/deps/yaml/configure.ac b/deps/yaml/configure.ac +index e7db798..dd1aca0 100644 +--- a/deps/yaml/configure.ac ++++ b/deps/yaml/configure.ac +@@ -3,7 +3,7 @@ + # Define the package version numbers and the bug reporting link. + m4_define([YAML_MAJOR], 0) + m4_define([YAML_MINOR], 1) +-m4_define([YAML_PATCH], 5) ++m4_define([YAML_PATCH], 6) + m4_define([YAML_BUGS], [http://pyyaml.org/newticket?component=libyaml]) + + # Define the libtool version numbers; check the Autobook, Section 11.4. +@@ -19,7 +19,7 @@ m4_define([YAML_BUGS], [http://pyyaml.org/newticket?component=libyaml]) + # YAML_AGE = 0 + m4_define([YAML_RELEASE], 0) + m4_define([YAML_CURRENT], 2) +-m4_define([YAML_REVISION], 3) ++m4_define([YAML_REVISION], 4) + m4_define([YAML_AGE], 0) + + # Initialize autoconf & automake. +diff --git a/deps/yaml/include/yaml.h b/deps/yaml/include/yaml.h +index 5a04d36..acd6e87 100644 +--- a/deps/yaml/include/yaml.h ++++ b/deps/yaml/include/yaml.h +@@ -26,17 +26,7 @@ extern "C" { + + /** The public API declaration. */ + +-#ifdef _WIN32 +-# if defined(YAML_DECLARE_STATIC) +-# define YAML_DECLARE(type) type +-# elif defined(YAML_DECLARE_EXPORT) +-# define YAML_DECLARE(type) __declspec(dllexport) type +-# else +-# define YAML_DECLARE(type) __declspec(dllimport) type +-# endif +-#else +-# define YAML_DECLARE(type) type +-#endif ++#define YAML_DECLARE(type) type + + /** @} */ + +diff --git a/deps/yaml/src/scanner.c b/deps/yaml/src/scanner.c +index 8817de2..88d4fa5 100644 +--- a/deps/yaml/src/scanner.c ++++ b/deps/yaml/src/scanner.c +@@ -2629,6 +2629,9 @@ yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive, + /* Check if it is a URI-escape sequence. */ + + if (CHECK(parser->buffer, '%')) { ++ if (!STRING_EXTEND(parser, string)) ++ goto error; ++ + if (!yaml_parser_scan_uri_escapes(parser, + directive, start_mark, &string)) goto error; + } +diff --git a/deps/yaml/src/yaml_private.h b/deps/yaml/src/yaml_private.h +index 73167d4..01ec73d 100644 +--- a/deps/yaml/src/yaml_private.h ++++ b/deps/yaml/src/yaml_private.h +@@ -1,8 +1,8 @@ + + #define YAML_VERSION_MAJOR 0 + #define YAML_VERSION_MINOR 1 +-#define YAML_VERSION_PATCH 5 +-#define YAML_VERSION_STRING "0.1.5" ++#define YAML_VERSION_PATCH 6 ++#define YAML_VERSION_STRING "0.1.6" + + #include + +@@ -144,9 +144,12 @@ yaml_string_join( + (string).start = (string).pointer = (string).end = 0) + + #define STRING_EXTEND(context,string) \ +- (((string).pointer+5 < (string).end) \ ++ ((((string).pointer+5 < (string).end) \ + || yaml_string_extend(&(string).start, \ +- &(string).pointer, &(string).end)) ++ &(string).pointer, &(string).end)) ? \ ++ 1 : \ ++ ((context)->error = YAML_MEMORY_ERROR, \ ++ 0)) + + #define CLEAR(context,string) \ + ((string).pointer = (string).start, \ +diff --git a/deps/yaml/win32/config.h b/deps/yaml/win32/config.h +index c551551..2459f49 100644 +--- a/deps/yaml/win32/config.h ++++ b/deps/yaml/win32/config.h +@@ -1,4 +1,4 @@ + #define YAML_VERSION_MAJOR 0 + #define YAML_VERSION_MINOR 1 +-#define YAML_VERSION_PATCH 5 +-#define YAML_VERSION_STRING "0.1.5" ++#define YAML_VERSION_PATCH 6 ++#define YAML_VERSION_STRING "0.1.6" +-- +2.4.4 + diff --git a/mingw-w64-h2o/0002-basic-windows-support.patch b/mingw-w64-h2o/0002-basic-windows-support.patch new file mode 100644 index 0000000000..b69807c8b8 --- /dev/null +++ b/mingw-w64-h2o/0002-basic-windows-support.patch @@ -0,0 +1,867 @@ +From a8fd6112b32cc1130df54b668fc05b7f65bc92ee Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Thu, 25 Jun 2015 23:43:29 +0100 +Subject: [PATCH 2/8] basic windows support + +--- + CMakeLists.txt | 4 ++ + examples/libh2o/http1client.c | 6 +++ + examples/libh2o/simple.c | 11 ++++- + include/h2o.h | 6 ++- + include/h2o/hostinfo.h | 17 ++++--- + include/h2o/socket.h | 6 ++- + include/h2o/socketpool.h | 2 + + lib/common/http1client.c | 20 ++++++--- + lib/common/multithread.c | 5 +++ + lib/common/socket.c | 15 +++++-- + lib/common/socket/evloop.c.h | 59 +++++++++++++++++++++++- + lib/common/socket/evloop/select.c.h | 2 + + lib/common/socketpool.c | 10 +++++ + lib/core/proxy.c | 4 +- + lib/handler/access_log.c | 12 ++++- + lib/handler/configurator/fastcgi.c | 20 +++++++-- + src/main.c | 90 ++++++++++++++++++++++++++++++++----- + 17 files changed, 252 insertions(+), 37 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 90b6338..c847a2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -217,6 +217,10 @@ LIST(REMOVE_ITEM UNIT_TEST_SOURCE_FILES + + SET(EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) + ++IF (WIN32) ++ SET(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} ws2_32) ++ENDIF() ++ + ADD_LIBRARY(libh2o ${LIB_SOURCE_FILES}) + ADD_LIBRARY(libh2o-evloop ${LIB_SOURCE_FILES}) + SET_TARGET_PROPERTIES(libh2o PROPERTIES OUTPUT_NAME h2o) +diff --git a/examples/libh2o/http1client.c b/examples/libh2o/http1client.c +index 261241f..20a2f1e 100644 +--- a/examples/libh2o/http1client.c ++++ b/examples/libh2o/http1client.c +@@ -141,6 +141,12 @@ h2o_http1client_head_cb on_connect(h2o_http1client_t *client, const char *errstr + + int main(int argc, char **argv) + { ++ ++#ifdef _WIN32 ++ WSADATA wsaData; ++ WSAStartup(MAKEWORD(2, 0), &wsaData); ++#endif ++ + h2o_multithread_queue_t *queue; + h2o_multithread_receiver_t getaddr_receiver; + h2o_timeout_t io_timeout; +diff --git a/examples/libh2o/simple.c b/examples/libh2o/simple.c +index 48d6448..d74dc40 100644 +--- a/examples/libh2o/simple.c ++++ b/examples/libh2o/simple.c +@@ -21,11 +21,15 @@ + */ + #include + #include +-#include + #include + #include + #include ++#ifdef _WIN32 ++#include ++#else ++#include + #include ++#endif + #include + #include "h2o.h" + #include "h2o/http1.h" +@@ -215,7 +219,12 @@ int main(int argc, char **argv) + { + h2o_hostconf_t *hostconf; + ++#ifdef _WIN32 ++ WSADATA wsaData; ++ WSAStartup(MAKEWORD(2, 0), &wsaData); ++#else + signal(SIGPIPE, SIG_IGN); ++#endif + + h2o_config_init(&config); + hostconf = h2o_config_register_host(&config, h2o_iovec_init(H2O_STRLIT("default")), 65535); +diff --git a/include/h2o.h b/include/h2o.h +index 176aa84..0e3b766 100644 +--- a/include/h2o.h ++++ b/include/h2o.h +@@ -32,7 +32,11 @@ extern "C" { + #include + #include + #include +-#include ++#ifdef _WIN32 ++# include ++#else ++# include ++#endif + #include + #include + #include +diff --git a/include/h2o/hostinfo.h b/include/h2o/hostinfo.h +index 14ac30c..d12b4db 100644 +--- a/include/h2o/hostinfo.h ++++ b/include/h2o/hostinfo.h +@@ -22,13 +22,16 @@ + #ifndef h2o__hostinfo_h + #define h2o__hostinfo_h + +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#ifdef _WIN32 ++# include ++#else ++# include ++# include ++# include ++# include ++# include ++# include ++#endif + #include "h2o/multithread.h" + + typedef struct st_h2o_hostinfo_getaddr_req_t h2o_hostinfo_getaddr_req_t; +diff --git a/include/h2o/socket.h b/include/h2o/socket.h +index 2d1e99c..42cd530 100644 +--- a/include/h2o/socket.h ++++ b/include/h2o/socket.h +@@ -27,7 +27,11 @@ extern "C" { + #endif + + #include +-#include ++#ifdef _WIN32 ++# include ++#else ++# include ++#endif + #include + #include "h2o/memory.h" + +diff --git a/include/h2o/socketpool.h b/include/h2o/socketpool.h +index 1220c96..d84091f 100644 +--- a/include/h2o/socketpool.h ++++ b/include/h2o/socketpool.h +@@ -26,8 +26,10 @@ + extern "C" { + #endif + ++#ifndef _WIN32 + #include + #include ++#endif + #include + #include "h2o/linklist.h" + #include "h2o/multithread.h" +diff --git a/lib/common/http1client.c b/lib/common/http1client.c +index fb5dcee..3a60a67 100644 +--- a/lib/common/http1client.c ++++ b/lib/common/http1client.c +@@ -19,11 +19,21 @@ + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +-#include +-#include +-#include +-#include +-#include ++#ifdef _WIN32 ++# include ++# ifndef AI_ADDRCONFIG ++# define AI_ADDRCONFIG 0 ++# endif ++# ifndef AI_NUMERICSERV ++# define AI_NUMERICSERV 8 ++# endif ++#else ++# include ++# include ++# include ++# include ++# include ++#endif + #include "picohttpparser.h" + #include "h2o/string_.h" + #include "h2o/hostinfo.h" +diff --git a/lib/common/multithread.c b/lib/common/multithread.c +index c20ca55..0862829 100644 +--- a/lib/common/multithread.c ++++ b/lib/common/multithread.c +@@ -87,11 +87,16 @@ static void init_async(h2o_multithread_queue_t *queue, h2o_loop_t *loop) + { + int fds[2]; + ++#ifndef _WIN32 + if (cloexec_pipe(fds) != 0) { + perror("pipe"); + abort(); + } + fcntl(fds[1], F_SETFL, O_NONBLOCK); ++#else ++ u_long nonblock = 1; ++ ioctlsocket(fds[1], FIONBIO, &nonblock); ++#endif + queue->async.write = fds[1]; + queue->async.read = h2o_evloop_socket_create(loop, fds[0], NULL, 0, 0); + queue->async.read->data = queue; +diff --git a/lib/common/socket.c b/lib/common/socket.c +index 9a427c0..b0618fe 100644 +--- a/lib/common/socket.c ++++ b/lib/common/socket.c +@@ -22,9 +22,14 @@ + #include + #include + #include +-#include + #include +-#include ++#ifdef _WIN32 ++# include ++# define IOV_MAX 65536 ++#else ++# include ++# include ++#endif + #include + #include + #include "h2o/socket.h" +@@ -404,12 +409,16 @@ int h2o_socket_compare_address(struct sockaddr *x, struct sockaddr *y) + + CMP(x->sa_family, y->sa_family); + ++#ifndef _WIN32 + if (x->sa_family == AF_UNIX) { + struct sockaddr_un *xun = (void *)x, *yun = (void *)y; + int r = strcmp(xun->sun_path, yun->sun_path); + if (r != 0) + return r; +- } else if (x->sa_family == AF_INET) { ++ } else ++#endif ++ ++ if (x->sa_family == AF_INET) { + struct sockaddr_in *xin = (void *)x, *yin = (void *)y; + CMP(ntohl(xin->sin_addr.s_addr), ntohl(yin->sin_addr.s_addr)); + CMP(ntohs(xin->sin_port), ntohs(yin->sin_port)); +diff --git a/lib/common/socket/evloop.c.h b/lib/common/socket/evloop.c.h +index bfb6f62..fb859e1 100644 +--- a/lib/common/socket/evloop.c.h ++++ b/lib/common/socket/evloop.c.h +@@ -19,11 +19,37 @@ + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ ++ ++#include ++#ifdef _WIN32 ++ ++struct iovec { ++ char *buf; ++ unsigned long len; ++}; ++ ++static ssize_t ++writev(SOCKET fd, const struct iovec *iov, int iovcnt) { ++ DWORD sent = 0; ++ h2o_iovec_t* psend = (h2o_iovec_t*) iov; ++ LPWSABUF pbuf = alloca(sizeof(WSABUF) * iovcnt); ++ int i; ++ for (i = 0; i < iovcnt; ++i) { ++ pbuf[i].len = psend[i].len; ++ pbuf[i].buf = psend[i].base; ++ sent += pbuf[i].len; ++ } ++ if (WSASend(fd, pbuf, iovcnt, NULL, 0, NULL, NULL) == 0) ++ return (ssize_t) sent; ++ return -1; ++} ++ ++#else + #include + #include +-#include + #include + #include ++#endif + #include + #include "cloexec.h" + #include "h2o/linklist.h" +@@ -358,7 +384,12 @@ struct st_h2o_evloop_socket_t *create_socket(h2o_evloop_t *loop, int fd, struct + { + struct st_h2o_evloop_socket_t *sock; + ++#ifdef _WIN32 ++ u_long nonblock = 1; ++ ioctlsocket(fd, FIONBIO, &nonblock); ++#else + fcntl(fd, F_SETFL, O_NONBLOCK); ++#endif + + sock = h2o_mem_alloc(sizeof(*sock)); + memset(sock, 0, sizeof(*sock)); +@@ -381,14 +412,23 @@ struct st_h2o_evloop_socket_t *create_socket(h2o_evloop_t *loop, int fd, struct + static struct st_h2o_evloop_socket_t *create_socket_set_nodelay(h2o_evloop_t *loop, int fd, struct sockaddr *addr, + socklen_t addrlen, int flags) + { ++#ifdef _WIN32 ++ char on = 1; ++#else + int on = 1; ++#endif + setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); + return create_socket(loop, fd, addr, addrlen, flags); + } + + h2o_socket_t *h2o_evloop_socket_create(h2o_evloop_t *loop, int fd, struct sockaddr *addr, socklen_t addrlen, int flags) + { ++#ifdef _WIN32 ++ u_long nonblock = 1; ++ ioctlsocket(fd, FIONBIO, &nonblock); ++#else + fcntl(fd, F_SETFL, O_NONBLOCK); ++#endif + return &create_socket(loop, fd, addr, addrlen, flags)->super; + } + +@@ -405,7 +445,13 @@ h2o_socket_t *h2o_evloop_socket_accept(h2o_socket_t *_listener) + #else + if ((fd = cloexec_accept(listener->fd, (void *)&addr, &addrlen)) == -1) + return NULL; ++ ++# ifdef _WIN32 ++ u_long nonblock = 1; ++ ioctlsocket(fd, FIONBIO, &nonblock); ++# else + fcntl(fd, F_SETFL, O_NONBLOCK); ++# endif + #endif + + return &create_socket_set_nodelay(listener->loop, fd, (void *)&addr, addrlen, 0)->super; +@@ -418,7 +464,14 @@ h2o_socket_t *h2o_socket_connect(h2o_loop_t *loop, struct sockaddr *addr, sockle + + if ((fd = cloexec_socket(addr->sa_family, SOCK_STREAM, 0)) == -1) + return NULL; ++ ++#ifdef _WIN32 ++ u_long nonblock = 1; ++ ioctlsocket(fd, FIONBIO, &nonblock); ++#else + fcntl(fd, F_SETFL, O_NONBLOCK); ++#endif ++ + if (!(connect(fd, addr, addrlen) == 0 || errno == EINPROGRESS)) { + close(fd); + return NULL; +@@ -475,7 +528,11 @@ static void run_socket(struct st_h2o_evloop_socket_t *sock) + } + + if (sock->super._cb.write != NULL && sock->_wreq.cnt == 0) { ++#ifdef _WIN32 ++ char status; ++#else + int status; ++#endif + if ((sock->_flags & H2O_SOCKET_FLAG_IS_CONNECTING) != 0) { + socklen_t l = sizeof(status); + getsockopt(sock->fd, SOL_SOCKET, SO_ERROR, &status, &l); +diff --git a/lib/common/socket/evloop/select.c.h b/lib/common/socket/evloop/select.c.h +index 2036178..ef3eac5 100644 +--- a/lib/common/socket/evloop/select.c.h ++++ b/lib/common/socket/evloop/select.c.h +@@ -20,7 +20,9 @@ + * IN THE SOFTWARE. + */ + #include ++#ifndef _WIN32 + #include ++#endif + + #if 0 + #define DEBUG_LOG(...) fprintf(stderr, __VA_ARGS__) +diff --git a/lib/common/socketpool.c b/lib/common/socketpool.c +index 4fb8051..be035fe 100644 +--- a/lib/common/socketpool.c ++++ b/lib/common/socketpool.c +@@ -20,11 +20,21 @@ + * IN THE SOFTWARE. + */ + #include ++#ifdef _WIN32 ++# include ++# ifndef AI_ADDRCONFIG ++# define AI_ADDRCONFIG 0 ++# endif ++# ifndef AI_NUMERICSERV ++# define AI_NUMERICSERV 8 ++# endif ++#else + #include + #include + #include + #include + #include ++#endif + #include "h2o/hostinfo.h" + #include "h2o/linklist.h" + #include "h2o/socketpool.h" +diff --git a/lib/core/proxy.c b/lib/core/proxy.c +index 386d4cc..1d612ac 100644 +--- a/lib/core/proxy.c ++++ b/lib/core/proxy.c +@@ -19,10 +19,12 @@ + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +-#include + #include + #include ++#ifndef _WIN32 ++#include + #include ++#endif + #include "picohttpparser.h" + #include "h2o.h" + #include "h2o/http1client.h" +diff --git a/lib/handler/access_log.c b/lib/handler/access_log.c +index 1100c22..dc1fd2d 100644 +--- a/lib/handler/access_log.c ++++ b/lib/handler/access_log.c +@@ -21,13 +21,15 @@ + */ + #include + #include ++#include ++#include ++#ifndef _WIN32 + #include + #include + #include +-#include +-#include + #include + #include ++#endif + #include "h2o.h" + #include "h2o/serverutil.h" + +@@ -397,6 +399,7 @@ int h2o_access_log_open_log(const char *path) + { + int fd; + ++#ifndef _WIN32 + if (path[0] == '|') { + int pipefds[2]; + pid_t pid; +@@ -422,11 +425,16 @@ int h2o_access_log_open_log(const char *path) + close(pipefds[0]); + fd = pipefds[1]; + } else { ++#else ++#define O_CLOEXEC 0 ++#endif + if ((fd = open(path, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0644)) == -1) { + fprintf(stderr, "failed to open log file:%s:%s\n", path, strerror(errno)); + return -1; + } ++#ifndef _WIN32 + } ++#endif + + return fd; + } +diff --git a/lib/handler/configurator/fastcgi.c b/lib/handler/configurator/fastcgi.c +index 320e401..3bd637a 100644 +--- a/lib/handler/configurator/fastcgi.c ++++ b/lib/handler/configurator/fastcgi.c +@@ -19,15 +19,17 @@ + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +-#include + #include + #include + #include +-#include +-#include + #include + #include ++#ifndef _WIN32 ++#include ++#include ++#include + #include ++#endif + #include "h2o.h" + #include "h2o/configurator.h" + #include "h2o/serverutil.h" +@@ -120,6 +122,7 @@ static int on_config_connect(h2o_configurator_command_t *cmd, h2o_configurator_c + return -1; + } + ++#ifndef _WIN32 + if (strcmp(type, "unix") == 0) { + /* unix socket */ + struct sockaddr_un sun = {}; +@@ -130,7 +133,10 @@ static int on_config_connect(h2o_configurator_command_t *cmd, h2o_configurator_c + sun.sun_family = AF_UNIX; + strcpy(sun.sun_path, servname); + h2o_fastcgi_register_by_address(ctx->pathconf, (void *)&sun, sizeof(sun), self->vars); +- } else if (strcmp(type, "tcp") == 0) { ++ } else ++#endif ++ ++ if (strcmp(type, "tcp") == 0) { + /* tcp socket */ + uint16_t port; + if (sscanf(servname, "%" SCNu16, &port) != 1) { +@@ -146,6 +152,7 @@ static int on_config_connect(h2o_configurator_command_t *cmd, h2o_configurator_c + return 0; + } + ++#ifndef _WIN32 + static int create_spawnproc(h2o_configurator_command_t *cmd, yoml_t *node, const char *dirname, char **argv, + struct sockaddr_un *sun) + { +@@ -206,6 +213,7 @@ Error: + unlink(sun->sun_path); + return -1; + } ++#endif + + void spawnproc_on_dispose(h2o_fastcgi_handler_t *handler, void *data) + { +@@ -213,6 +221,7 @@ void spawnproc_on_dispose(h2o_fastcgi_handler_t *handler, void *data) + close(pipe_fd); + } + ++#ifndef _WIN32 + static int on_config_spawn(h2o_configurator_command_t *cmd, h2o_configurator_context_t *ctx, yoml_t *node) + { + struct fastcgi_configurator_t *self = (void *)cmd->configurator; +@@ -248,6 +257,7 @@ Exit: + free(argv[0]); + return ret; + } ++#endif + + static int on_config_enter(h2o_configurator_t *_self, h2o_configurator_context_t *ctx, yoml_t *node) + { +@@ -282,10 +292,12 @@ void h2o_fastcgi_register_configurator(h2o_globalconf_t *conf) + h2o_configurator_define_command(&c->super, "fastcgi.connect", + H2O_CONFIGURATOR_FLAG_PATH | H2O_CONFIGURATOR_FLAG_EXTENSION | H2O_CONFIGURATOR_FLAG_DEFERRED, + on_config_connect); ++#ifndef _WIN32 + h2o_configurator_define_command(&c->super, "fastcgi.spawn", + H2O_CONFIGURATOR_FLAG_PATH | H2O_CONFIGURATOR_FLAG_EXTENSION | H2O_CONFIGURATOR_FLAG_DEFERRED + | H2O_CONFIGURATOR_FLAG_EXPECT_SCALAR, + on_config_spawn); ++#endif + h2o_configurator_define_command(&c->super, "fastcgi.timeout.io", + H2O_CONFIGURATOR_FLAG_ALL_LEVELS | H2O_CONFIGURATOR_FLAG_EXPECT_SCALAR, on_config_timeout_io); + h2o_configurator_define_command(&c->super, "fastcgi.timeout.keepalive", +diff --git a/src/main.c b/src/main.c +index 82e834d..4ba83db 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -21,35 +21,52 @@ + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +-#include + #include + #include + #include + #include + #include + #include +-#include +-#include +-#include + #include +-#include + #include +-#include + #include + #include +-#include + #include +-#include + #include + #include +-#include +-#include + #include + #include + #include + #ifdef __linux__ + #include + #endif ++#ifdef _WIN32 ++# include ++# ifndef AI_ADDRCONFIG ++# define AI_ADDRCONFIG 0 ++# endif ++# ifndef AI_NUMERICSERV ++# define AI_NUMERICSERV 8 ++# endif ++# include ++# define WEXITSTATUS(val) ((val) & 255) ++# define WIFEXITED(val) (((val) & 0xC0000000) == 0) ++# define WIFSIGNALED(val) (((val) & 0xC0000000) != 0) ++# define WTERMSIG(val) ((val > 0xC0000200) ? val - 0xC0000200 : val) ++# define WIFSTOPPED(val) (0) ++# define WSTOPSIG(var) (0) ++#else ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++#endif + #include "cloexec.h" + #include "yoml-parser.h" + #include "h2o.h" +@@ -155,10 +172,12 @@ static struct { + + static void set_cloexec(int fd) + { ++#ifndef _WIN32 + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { + perror("failed to set FD_CLOEXEC"); + abort(); + } ++#endif + } + + static int on_openssl_print_errors(const char *str, size_t len, void *fp) +@@ -682,6 +701,7 @@ Found: + return conf.server_starter.fds[i]; + } + ++#ifndef _WIN32 + static int open_unix_listener(h2o_configurator_command_t *cmd, yoml_t *node, struct sockaddr_un *sun) + { + struct stat st; +@@ -708,6 +728,7 @@ static int open_unix_listener(h2o_configurator_command_t *cmd, yoml_t *node, str + + return fd; + } ++#endif + + static int open_tcp_listener(h2o_configurator_command_t *cmd, yoml_t *node, const char *hostname, const char *servname, int domain, + int type, int protocol, struct sockaddr *addr, socklen_t addrlen) +@@ -718,13 +739,21 @@ static int open_tcp_listener(h2o_configurator_command_t *cmd, yoml_t *node, cons + goto Error; + set_cloexec(fd); + { /* set reuseaddr */ ++#ifdef _WIN32 ++ char flag = 1; ++#else + int flag = 1; ++#endif + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(flag)) != 0) + goto Error; + } + #ifdef TCP_DEFER_ACCEPT + { /* set TCP_DEFER_ACCEPT */ ++#ifdef _WIN32 ++ char flag = 1; ++#else + int flag = 1; ++#endif + if (setsockopt(fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, &flag, sizeof(flag)) != 0) + goto Error; + } +@@ -732,7 +761,11 @@ static int open_tcp_listener(h2o_configurator_command_t *cmd, yoml_t *node, cons + #ifdef IPV6_V6ONLY + /* set IPv6only */ + if (domain == AF_INET6) { ++#ifdef _WIN32 ++ char flag = 1; ++#else + int flag = 1; ++#endif + if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &flag, sizeof(flag)) != 0) + goto Error; + } +@@ -766,6 +799,12 @@ static int on_config_listen(h2o_configurator_command_t *cmd, h2o_configurator_co + const char *hostname = NULL, *servname = NULL, *type = "tcp"; + yoml_t *ssl_node = NULL; + ++#ifdef _WIN32 ++ hostname = "127.0.0.1"; ++ WSADATA wsaData; ++ WSAStartup(MAKEWORD(2, 0), &wsaData); ++#endif ++ + /* fetch servname (and hostname) */ + switch (node->type) { + case YOML_TYPE_SCALAR: +@@ -804,6 +843,7 @@ static int on_config_listen(h2o_configurator_command_t *cmd, h2o_configurator_co + return -1; + } + ++#ifndef _WIN32 + if (strcmp(type, "unix") == 0) { + + /* unix socket */ +@@ -844,7 +884,10 @@ static int on_config_listen(h2o_configurator_command_t *cmd, h2o_configurator_co + if (listener->hosts != NULL && ctx->hostconf != NULL) + h2o_append_to_null_terminated_list((void *)&listener->hosts, ctx->hostconf); + +- } else if (strcmp(type, "tcp") == 0) { ++ } else ++#endif ++ ++ if (strcmp(type, "tcp") == 0) { + + /* TCP socket */ + struct addrinfo hints, *res, *ai; +@@ -934,6 +977,7 @@ static int on_config_listen_exit(h2o_configurator_t *_configurator, h2o_configur + return 0; + } + ++#ifndef _WIN32 + static int setup_running_user(const char *login) + { + struct passwd *passwdbuf = h2o_mem_alloc(sizeof(*passwdbuf)); +@@ -969,6 +1013,7 @@ static int on_config_user(h2o_configurator_command_t *cmd, h2o_configurator_cont + + return 0; + } ++#endif + + static int on_config_pid_file(h2o_configurator_command_t *cmd, h2o_configurator_context_t *ctx, yoml_t *node) + { +@@ -1115,7 +1160,10 @@ static void on_sigfatal(int signo) + static void setup_signal_handlers(void) + { + h2o_set_signal_handler(SIGTERM, on_sigterm); ++#ifndef _WIN32 + h2o_set_signal_handler(SIGPIPE, SIG_IGN); ++#endif ++ + #ifdef __linux__ + if ((backtrace_symbols_to_fd = popen_annotate_backtrace_symbols()) == -1) + backtrace_symbols_to_fd = 2; +@@ -1320,11 +1368,13 @@ static char **build_server_starter_argv(const char *h2o_cmd, const char *config_ + sprintf(newarg, "--port=%s:%s", host, serv); + } + } break; ++#ifndef _WIN32 + case AF_UNIX: { + struct sockaddr_un *sun = (void *)&conf.listeners[i]->addr; + newarg = h2o_mem_alloc(sizeof("--path=") + strlen(sun->sun_path)); + sprintf(newarg, "--path=%s", sun->sun_path); + } break; ++#endif + } + h2o_vector_reserve(NULL, (void *)&args, sizeof(args.entries[0]), args.size + 1); + args.entries[args.size++] = newarg; +@@ -1343,7 +1393,13 @@ static char **build_server_starter_argv(const char *h2o_cmd, const char *config_ + static int run_using_server_starter(const char *h2o_cmd, const char *config_file) + { + char **args = build_server_starter_argv(h2o_cmd, config_file); ++ ++#ifndef _WIN32 + setenv("H2O_VIA_MASTER", "", 1); ++#else ++ putenv("H2O_VIA_MASTER=1"); ++#endif ++ + execvp(args[0], args); + fprintf(stderr, "failed to spawn %s:%s\n", args[0], strerror(errno)); + return EX_CONFIG; +@@ -1362,8 +1418,10 @@ static void setup_configurators(void) + + { + h2o_configurator_t *c = h2o_configurator_create(&conf.globalconf, sizeof(*c)); ++#ifndef _WIN32 + h2o_configurator_define_command(c, "user", H2O_CONFIGURATOR_FLAG_GLOBAL | H2O_CONFIGURATOR_FLAG_EXPECT_SCALAR, + on_config_user); ++#endif + h2o_configurator_define_command(c, "pid-file", H2O_CONFIGURATOR_FLAG_GLOBAL | H2O_CONFIGURATOR_FLAG_EXPECT_SCALAR, + on_config_pid_file); + h2o_configurator_define_command(c, "error-log", H2O_CONFIGURATOR_FLAG_GLOBAL | H2O_CONFIGURATOR_FLAG_EXPECT_SCALAR, +@@ -1516,7 +1574,11 @@ int main(int argc, char **argv) + } + } + ++#ifndef _WIN32 + unsetenv("SERVER_STARTER_PORT"); ++#else ++ putenv("SERVER_STARTER_PORT="); ++#endif + + /* handle run_mode == MASTER|TEST */ + switch (conf.run_mode) { +@@ -1541,6 +1603,7 @@ int main(int argc, char **argv) + conf.error_log = NULL; + } + ++#ifndef _WIN32 + { /* raise RLIMIT_NOFILE */ + struct rlimit limit; + if (getrlimit(RLIMIT_NOFILE, &limit) == 0) { +@@ -1554,6 +1617,7 @@ int main(int argc, char **argv) + } + } + } ++#endif + + setup_signal_handlers(); + +@@ -1563,6 +1627,7 @@ int main(int argc, char **argv) + return EX_CONFIG; + } + ++#ifndef _WIN32 + /* setuid */ + if (conf.running_user != NULL) { + if (h2o_setuidgid(conf.running_user) != 0) { +@@ -1580,6 +1645,7 @@ int main(int argc, char **argv) + } + } + } ++#endif + + /* pid file must be written after setuid, since we need to remove it */ + if (conf.pid_file != NULL) { +@@ -1594,6 +1660,7 @@ int main(int argc, char **argv) + + /* all setup should be complete by now */ + ++#ifndef _WIN32 + /* replace STDIN to an closed pipe */ + { + int fds[2]; +@@ -1605,6 +1672,7 @@ int main(int argc, char **argv) + dup2(fds[0], 0); + close(fds[0]); + } ++#endif + + /* redirect STDOUT and STDERR to error_log (if specified) */ + if (error_log_fd != -1) { +-- +2.4.4 + diff --git a/mingw-w64-h2o/0003-add-readdir_r-emulation-for-windows.patch b/mingw-w64-h2o/0003-add-readdir_r-emulation-for-windows.patch new file mode 100644 index 0000000000..c523e2a91f --- /dev/null +++ b/mingw-w64-h2o/0003-add-readdir_r-emulation-for-windows.patch @@ -0,0 +1,37 @@ +From f009a269ffa2fc7be012a8c7db5674490f6a6c54 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Thu, 25 Jun 2015 23:45:30 +0100 +Subject: [PATCH 3/8] add readdir_r emulation for windows + +--- + lib/handler/file/templates.c.h | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/lib/handler/file/templates.c.h b/lib/handler/file/templates.c.h +index c75f60e..fec65e3 100644 +--- a/lib/handler/file/templates.c.h ++++ b/lib/handler/file/templates.c.h +@@ -24,6 +24,20 @@ + * picotemplate.pl --conf=misc/picotemplate-conf.pl lib/file/_templates.c.h + */ + ++#ifdef _WIN32 ++static inline ++int readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result) ++{ ++ errno = 0; ++ entry = readdir (dirp); ++ *result = entry; ++ if (entry == NULL && errno != 0) { ++ return -1; ++ } ++ return 0; ++} ++#endif ++ + static h2o_buffer_t *build_dir_listing_html(h2o_mem_pool_t *pool, h2o_iovec_t path_normalized, DIR *dp) + { + h2o_buffer_t *_; +-- +2.4.4 + diff --git a/mingw-w64-h2o/0004-serverutil-hackery-for-windows.patch b/mingw-w64-h2o/0004-serverutil-hackery-for-windows.patch new file mode 100644 index 0000000000..b0c282edac --- /dev/null +++ b/mingw-w64-h2o/0004-serverutil-hackery-for-windows.patch @@ -0,0 +1,174 @@ +From 49e370aec2435420aa5a69920e7519046371ee46 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Thu, 25 Jun 2015 23:48:43 +0100 +Subject: [PATCH 4/8] serverutil hackery for windows + +--- + include/h2o/serverutil.h | 16 ++++++++++++ + lib/common/serverutil.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 79 insertions(+), 1 deletion(-) + +diff --git a/include/h2o/serverutil.h b/include/h2o/serverutil.h +index b084096..92e14b5 100644 +--- a/include/h2o/serverutil.h ++++ b/include/h2o/serverutil.h +@@ -23,7 +23,23 @@ + #define h2o__server_starter_h + + #include ++#ifndef _WIN32 + #include ++#else ++ ++ ++struct passwd { ++ char *pw_name; /* user name */ ++ char *pw_passwd; /* encrypted password */ ++ int pw_uid; /* user uid */ ++ int pw_gid; /* user gid */ ++ char *pw_comment; /* comment */ ++ char *pw_gecos; /* Honeywell login info */ ++ char *pw_dir; /* home directory */ ++ char *pw_shell; /* default shell */ ++}; ++ ++#endif + + /* taken from sysexits.h */ + #ifndef EX_SOFTWARE +diff --git a/lib/common/serverutil.c b/lib/common/serverutil.c +index 0b843b0..a027118 100644 +--- a/lib/common/serverutil.c ++++ b/lib/common/serverutil.c +@@ -21,19 +21,66 @@ + */ + #include + #include +-#include ++#ifndef _WIN32 ++# include ++#endif + #include + #include ++#ifdef _WIN32 ++#define sigemptyset(x) memset((x), 0, sizeof(*(x))) ++#ifndef SIGHUP ++# define SIGHUP -1 ++#endif ++#ifndef SIGPIPE ++# define SIGPIPE -1 ++#endif ++struct sigaction ++{ ++ void (*sa_handler)(int); ++ int sa_flags; ++ int sa_mask; ++}; ++int sigaction(int sig, struct sigaction *action, struct sigaction *old) ++{ ++ if (sig == -1) ++ return 0; ++ if (old == NULL) ++ { ++ if (signal(sig, SIG_DFL) == SIG_ERR) ++ return -1; ++ } ++ else ++ { ++ if (signal(sig, action->sa_handler) == SIG_ERR) ++ return -1; ++ } ++ return 0; ++} ++#define waitpid(a,b,c) _cwait(b,a,c) ++#define pipe(a) _pipe((a), 0, _O_BINARY | _O_NOINHERIT) ++typedef struct ++{ ++ int __allocated; ++ int __used; ++ struct __spawn_action *__actions; ++ int __pad[16]; ++} posix_spawn_file_actions_t; ++#else + #include ++#endif + #include + #include + #include + #include ++#ifndef _WIN32 + #include ++#endif + #include + #if !defined(_SC_NPROCESSORS_ONLN) ++#ifndef _WIN32 + #include + #endif ++#endif + #include "cloexec.h" + #include "h2o/memory.h" + #include "h2o/serverutil.h" +@@ -52,6 +99,7 @@ void h2o_set_signal_handler(int signo, void (*cb)(int signo)) + + int h2o_setuidgid(struct passwd *passwd) + { ++#ifndef _WIN32 + if (setgid(passwd->pw_gid) != 0) { + fprintf(stderr, "setgid(%d) failed:%s\n", (int)passwd->pw_gid, strerror(errno)); + return -1; +@@ -64,6 +112,7 @@ int h2o_setuidgid(struct passwd *passwd) + fprintf(stderr, "setuid(%d) failed:%s\n", (int)passwd->pw_uid, strerror(errno)); + return -1; + } ++#endif + + return 0; + } +@@ -101,6 +150,7 @@ size_t h2o_server_starter_get_fds(int **_fds) + return fds.size; + } + ++#ifndef _WIN32 + pid_t h2o_spawnp(const char *cmd, char **argv, const int *mapped_fds, int cloexec_mutex_is_locked) + { + #if defined(__linux__) +@@ -191,9 +241,14 @@ Error: + + #endif + } ++#endif + + int h2o_read_command(const char *cmd, char **argv, h2o_buffer_t **resp, int *child_status) + { ++#ifdef _WIN32 ++ return -1; ++#else ++ + int respfds[2] = {-1, -1}; + pid_t pid = -1; + int mutex_locked = 0, ret = -1; +@@ -206,7 +261,13 @@ int h2o_read_command(const char *cmd, char **argv, h2o_buffer_t **resp, int *chi + /* create pipe for reading the result */ + if (pipe(respfds) != 0) + goto Exit; ++ ++#ifdef _WIN32 ++ u_long nonblock = 0; ++ ioctlsocket(respfds[0], FIONBIO, &nonblock); ++#else + fcntl(respfds[0], F_SETFD, O_CLOEXEC); ++#endif + + /* spawn */ + int mapped_fds[] = {respfds[1], 1, /* stdout of the child process is read from the pipe */ +@@ -251,6 +312,7 @@ Exit: + h2o_buffer_dispose(resp); + + return ret; ++#endif + } + + size_t h2o_numproc() +-- +2.4.4 + diff --git a/mingw-w64-h2o/0005-mman-hackery-for-windows.patch b/mingw-w64-h2o/0005-mman-hackery-for-windows.patch new file mode 100644 index 0000000000..bd2ae1a008 --- /dev/null +++ b/mingw-w64-h2o/0005-mman-hackery-for-windows.patch @@ -0,0 +1,206 @@ +From 44de0d5b36e93d9e9475c7ae7c8c0c219e794bf7 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Thu, 25 Jun 2015 23:54:36 +0100 +Subject: [PATCH 5/8] mman hackery for windows + +--- + lib/common/memory.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 182 insertions(+) + +diff --git a/lib/common/memory.c b/lib/common/memory.c +index a3ae2d6..b34443a 100644 +--- a/lib/common/memory.c ++++ b/lib/common/memory.c +@@ -27,7 +27,189 @@ + #include + #include + #include ++#ifndef _WIN32 + #include ++#else ++// borrowed from nmap-win32 from googlecode ++#include ++#include ++#include ++#include ++ ++#define PROT_NONE 0 ++#define PROT_READ 1 ++#define PROT_WRITE 2 ++#define PROT_EXEC 4 ++ ++#define MAP_FILE 0 ++#define MAP_SHARED 1 ++#define MAP_PRIVATE 2 ++#define MAP_TYPE 0xf ++#define MAP_FIXED 0x10 ++#define MAP_ANONYMOUS 0x20 ++#define MAP_ANON MAP_ANONYMOUS ++ ++#define MAP_FAILED ((void *)-1) ++ ++/* Flags for msync. */ ++#define MS_ASYNC 1 ++#define MS_SYNC 2 ++#define MS_INVALIDATE 4 ++ ++void* mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off); ++int munmap(void *addr, size_t len); ++int msync(void *addr, size_t len, int flags); ++int mlock(const void *addr, size_t len); ++int munlock(const void *addr, size_t len); ++ ++//#include "mman.h" ++ ++#ifndef FILE_MAP_EXECUTE ++#define FILE_MAP_EXECUTE 0x0020 ++#endif /* FILE_MAP_EXECUTE */ ++ ++static int __map_mman_error(const DWORD err, const int deferr) ++{ ++ if (err == 0) ++ return 0; ++ //TODO: implement ++ return err; ++} ++ ++static DWORD __map_mmap_prot_page(const int prot) ++{ ++ DWORD protect = 0; ++ ++ if (prot == PROT_NONE) ++ return protect; ++ ++ if ((prot & PROT_EXEC) != 0) ++ { ++ protect = ((prot & PROT_WRITE) != 0) ? ++ PAGE_EXECUTE_READWRITE : PAGE_EXECUTE_READ; ++ } ++ else ++ { ++ protect = ((prot & PROT_WRITE) != 0) ? ++ PAGE_READWRITE : PAGE_READONLY; ++ } ++ ++ return protect; ++} ++ ++static DWORD __map_mmap_prot_file(const int prot) ++{ ++ DWORD desiredAccess = 0; ++ ++ if (prot == PROT_NONE) ++ return desiredAccess; ++ ++ if ((prot & PROT_READ) != 0) ++ desiredAccess |= FILE_MAP_READ; ++ if ((prot & PROT_WRITE) != 0) ++ desiredAccess |= FILE_MAP_WRITE; ++ if ((prot & PROT_EXEC) != 0) ++ desiredAccess |= FILE_MAP_EXECUTE; ++ ++ return desiredAccess; ++} ++ ++void* mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off) ++{ ++ HANDLE fm, h; ++ ++ void * map = MAP_FAILED; ++ ++ const DWORD dwFileOffsetLow = (sizeof(off_t) <= sizeof(DWORD)) ? ++ (DWORD)off : (DWORD)(off & 0xFFFFFFFFL); ++ const DWORD dwFileOffsetHigh = (sizeof(off_t) <= sizeof(DWORD)) ? ++ (DWORD)0 : (DWORD)((off >> 32) & 0xFFFFFFFFL); ++ const DWORD protect = __map_mmap_prot_page(prot); ++ const DWORD desiredAccess = __map_mmap_prot_file(prot); ++ ++ errno = 0; ++ ++ if (len == 0 ++ /* Unsupported flag combinations */ ++ || (flags & MAP_FIXED) != 0 ++ /* Usupported protection combinations */ ++ || prot == PROT_EXEC) ++ { ++ errno = EINVAL; ++ return MAP_FAILED; ++ } ++ ++ h = ((flags & MAP_ANONYMOUS) == 0) ? ++ (HANDLE)_get_osfhandle(fildes) : INVALID_HANDLE_VALUE; ++ ++ if ((flags & MAP_ANONYMOUS) == 0 && h == INVALID_HANDLE_VALUE) ++ { ++ errno = EBADF; ++ return MAP_FAILED; ++ } ++ ++ fm = CreateFileMapping(h, NULL, protect, 0, len, NULL); ++ ++ if (fm == NULL) ++ { ++ errno = __map_mman_error(GetLastError(), EPERM); ++ return MAP_FAILED; ++ } ++ ++ map = MapViewOfFile(fm, desiredAccess, dwFileOffsetHigh, dwFileOffsetLow, len); ++ ++ CloseHandle(fm); ++ ++ if (map == NULL) ++ { ++ errno = __map_mman_error(GetLastError(), EPERM); ++ return MAP_FAILED; ++ } ++ ++ return map; ++} ++ ++int munmap(void *addr, size_t len) ++{ ++ if (UnmapViewOfFile(addr)) ++ return 0; ++ ++ errno = __map_mman_error(GetLastError(), EPERM); ++ ++ return -1; ++} ++ ++int msync(void *addr, size_t len, int flags) ++{ ++ if (FlushViewOfFile(addr, len)) ++ return 0; ++ ++ errno = __map_mman_error(GetLastError(), EPERM); ++ ++ return -1; ++} ++ ++int mlock(const void *addr, size_t len) ++{ ++ if (VirtualLock((LPVOID)addr, len)) ++ return 0; ++ ++ errno = __map_mman_error(GetLastError(), EPERM); ++ ++ return -1; ++} ++ ++int munlock(const void *addr, size_t len) ++{ ++ if (VirtualUnlock((LPVOID)addr, len)) ++ return 0; ++ ++ errno = __map_mman_error(GetLastError(), EPERM); ++ ++ return -1; ++} ++ ++#endif + #include + #include "h2o/memory.h" + +-- +2.4.4 + diff --git a/mingw-w64-h2o/0006-fix-gmtime_r-for-mingw-w64.patch b/mingw-w64-h2o/0006-fix-gmtime_r-for-mingw-w64.patch new file mode 100644 index 0000000000..479bd3ad75 --- /dev/null +++ b/mingw-w64-h2o/0006-fix-gmtime_r-for-mingw-w64.patch @@ -0,0 +1,62 @@ +From 32179f547aecfe594579f4797dc598f93c248cbc Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sat, 27 Jun 2015 13:40:38 +0100 +Subject: [PATCH] fix gmtime_r for mingw-w64 + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c847a2d..e473861 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -102,7 +102,7 @@ IF (NOT WSLAY_FOUND) + SET(WSLAY_LIBRARIES -lwslay) + ENDIF (NOT WSLAY_FOUND) + +-SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wno-unused-function ${CMAKE_C_FLAGS} -DH2O_ROOT=\"\\\"${CMAKE_INSTALL_PREFIX}\\\"\"") ++SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wno-unused-function ${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE -DH2O_ROOT=\"\\\"${CMAKE_INSTALL_PREFIX}\\\"\"") + + INCLUDE_DIRECTORIES( + include +diff --git a/include/h2o/time_.h b/include/h2o/time_.h +index ab0db18..8098adc 100644 +--- a/include/h2o/time_.h ++++ b/include/h2o/time_.h +@@ -22,6 +22,9 @@ + #ifndef h2o__time_h + #define h2o__time_h + ++#ifndef _WIN32 ++#define _timezone localt.tm_gmtoff ++#endif + #include + + #ifdef __cplusplus +diff --git a/lib/common/time.c b/lib/common/time.c +index 5308848..42a7cbd 100644 +--- a/lib/common/time.c ++++ b/lib/common/time.c +@@ -139,7 +139,7 @@ void h2o_time2str_log(char *buf, time_t time) + { + struct tm localt; + localtime_r(&time, &localt); +- int gmt_off = (int)(localt.tm_gmtoff / 60); ++ int gmt_off = (int)(_timezone / 60); + int gmt_sign; + + if (gmt_off >= 0) { +diff --git a/lib/core/context.c b/lib/core/context.c +index 4ac9f97..7f3f27d 100644 +--- a/lib/core/context.c ++++ b/lib/core/context.c +@@ -173,7 +173,7 @@ void h2o_get_timestamp(h2o_context_t *ctx, h2o_mem_pool_t *pool, h2o_timestamp_t + if (ctx->_timestamp_cache.value != NULL) + h2o_mem_release_shared(ctx->_timestamp_cache.value); + ctx->_timestamp_cache.value = h2o_mem_alloc_shared(NULL, sizeof(h2o_timestamp_string_t), NULL); +- gmtime_r(&ctx->_timestamp_cache.tv_at.tv_sec, &gmt); ++ gmtime_r((time_t *)&ctx->_timestamp_cache.tv_at.tv_sec, &gmt); + h2o_time2str_rfc1123(ctx->_timestamp_cache.value->rfc1123, &gmt); + h2o_time2str_log(ctx->_timestamp_cache.value->log, ctx->_timestamp_cache.tv_at.tv_sec); + } +-- +2.4.4 + diff --git a/mingw-w64-h2o/0007-cloexec-hackery-for-windows.patch b/mingw-w64-h2o/0007-cloexec-hackery-for-windows.patch new file mode 100644 index 0000000000..f2568007aa --- /dev/null +++ b/mingw-w64-h2o/0007-cloexec-hackery-for-windows.patch @@ -0,0 +1,63 @@ +From ba5305d42a210a07e9f6a18284dc0c07d5e45c14 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Fri, 26 Jun 2015 00:02:23 +0100 +Subject: [PATCH 7/8] cloexec hackery for windows + +--- + deps/cloexec/cloexec.c | 7 +++++++ + deps/cloexec/cloexec.h | 6 +++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/deps/cloexec/cloexec.c b/deps/cloexec/cloexec.c +index 1442526..b9051fc 100644 +--- a/deps/cloexec/cloexec.c ++++ b/deps/cloexec/cloexec.c +@@ -26,7 +26,12 @@ pthread_mutex_t cloexec_mutex = PTHREAD_MUTEX_INITIALIZER; + + static int set_cloexec(int fd) + { ++#ifdef _WIN32 ++ u_long nonblock = 1; ++ return ioctlsocket(fd, FIONBIO, &nonblock) != -1 ? 0 : -1; ++#else + return fcntl(fd, F_SETFD, FD_CLOEXEC) != -1 ? 0 : -1; ++#endif + } + + int cloexec_accept(int socket, struct sockaddr *addr, socklen_t *addrlen) +@@ -51,6 +56,7 @@ Exit: + #endif + } + ++#ifndef _WIN32 + int cloexec_pipe(int fds[2]) + { + #ifdef __linux__ +@@ -70,6 +76,7 @@ Exit: + return ret; + #endif + } ++#endif + + int cloexec_socket(int domain, int type, int protocol) + { +diff --git a/deps/cloexec/cloexec.h b/deps/cloexec/cloexec.h +index 53987ed..1ea9155 100644 +--- a/deps/cloexec/cloexec.h ++++ b/deps/cloexec/cloexec.h +@@ -23,7 +23,11 @@ + #define CLOEXEC_H + + #include +-#include ++#ifdef _WIN32 ++# include ++#else ++# include ++#endif + #include + #include + +-- +2.4.4 + diff --git a/mingw-w64-h2o/0008-ignore-O_CLOEXEC-in-file.c-for-windows.patch b/mingw-w64-h2o/0008-ignore-O_CLOEXEC-in-file.c-for-windows.patch new file mode 100644 index 0000000000..d90b76a232 --- /dev/null +++ b/mingw-w64-h2o/0008-ignore-O_CLOEXEC-in-file.c-for-windows.patch @@ -0,0 +1,27 @@ +From 814d17f05e1d5a0f99ca5b24866189af7d098cbc Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Fri, 26 Jun 2015 00:33:17 +0100 +Subject: [PATCH 8/8] ignore O_CLOEXEC in file.c for windows + +--- + lib/handler/file.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/handler/file.c b/lib/handler/file.c +index aa683ac..e958b03 100644 +--- a/lib/handler/file.c ++++ b/lib/handler/file.c +@@ -34,6 +34,10 @@ + + #include "h2o.h" + ++#ifdef _WIN32 ++#define O_CLOEXEC 0 ++#endif ++ + #define MAX_BUF_SIZE 65000 + #define BOUNDARY_SIZE 20 + #define FIXED_PART_SIZE (sizeof("\r\n--") - 1 + BOUNDARY_SIZE + sizeof("\r\nContent-Range: bytes=-/\r\nContent-Type: \r\n\r\n") - 1) +-- +2.4.4 + diff --git a/mingw-w64-h2o/0009-use-gnu_printf-and-gnu_scanf-in-mingw-w64.patch b/mingw-w64-h2o/0009-use-gnu_printf-and-gnu_scanf-in-mingw-w64.patch new file mode 100644 index 0000000000..750d3ef114 --- /dev/null +++ b/mingw-w64-h2o/0009-use-gnu_printf-and-gnu_scanf-in-mingw-w64.patch @@ -0,0 +1,31 @@ +From 9b5b5fd8d9a0e3fb6f5e0b3e37c84b3c9ffa73f9 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sat, 27 Jun 2015 12:13:52 +0100 +Subject: [PATCH 1/2] use gnu_printf and gnu_scanf in mingw-w64 + + +diff --git a/include/h2o/configurator.h b/include/h2o/configurator.h +index 16e96dd..db6277d 100644 +--- a/include/h2o/configurator.h ++++ b/include/h2o/configurator.h +@@ -119,7 +119,7 @@ int h2o_configurator_apply_commands(h2o_configurator_context_t *ctx, yoml_t *nod + * emits configuration error + */ + void h2o_configurator_errprintf(h2o_configurator_command_t *cmd, yoml_t *node, const char *reason, ...) +- __attribute__((format(printf, 3, 4))); ++ __attribute__((format(gnu_printf, 3, 4))); + /** + * interprets the configuration value using sscanf, or prints an error upon failure + * @param configurator configurator +@@ -128,7 +128,7 @@ void h2o_configurator_errprintf(h2o_configurator_command_t *cmd, yoml_t *node, c + * @return 0 if successful, -1 if not + */ + int h2o_configurator_scanf(h2o_configurator_command_t *cmd, yoml_t *node, const char *fmt, ...) +- __attribute__((format(scanf, 3, 4))); ++ __attribute__((format(gnu_scanf, 3, 4))); + /** + * interprets the configuration value and returns the index of the matched string within the candidate strings, or prints an error + * upon failure +-- +2.4.4 + diff --git a/mingw-w64-h2o/0010-more-socket-work-for-windows-on-evloop.patch b/mingw-w64-h2o/0010-more-socket-work-for-windows-on-evloop.patch new file mode 100644 index 0000000000..da34916daa --- /dev/null +++ b/mingw-w64-h2o/0010-more-socket-work-for-windows-on-evloop.patch @@ -0,0 +1,105 @@ +From 4227b19fd8fa974c7c59431974c92e318a3758b8 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sat, 27 Jun 2015 12:30:40 +0100 +Subject: [PATCH 2/2] more socket work for windows on evloop + + +diff --git a/include/h2o/socket.h b/include/h2o/socket.h +index 42cd530..5f3b6ef 100644 +--- a/include/h2o/socket.h ++++ b/include/h2o/socket.h +@@ -43,10 +43,10 @@ extern "C" { + #endif + #endif + +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(_WIN32) + #define H2O_USE_ALPN 1 + #define H2O_USE_NPN 1 +-#elif OPENSSL_VERSION_NUMBER >= 0x10001000L ++#elif OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(_WIN32) + #define H2O_USE_ALPN 0 + #define H2O_USE_NPN 1 + #else +diff --git a/lib/common/socket/evloop.c.h b/lib/common/socket/evloop.c.h +index fb859e1..899b16f 100644 +--- a/lib/common/socket/evloop.c.h ++++ b/lib/common/socket/evloop.c.h +@@ -44,7 +44,28 @@ writev(SOCKET fd, const struct iovec *iov, int iovcnt) { + return -1; + } + ++# undef socket_error ++# undef read_socket ++# undef close_socket ++# undef EINTR ++# define EINTR WSAEINTR ++# undef EWOULDBLOCK ++# define EWOULDBLOCK WSAEWOULDBLOCK ++# undef EAGAIN ++# define EAGAIN WSAEWOULDBLOCK ++# undef EINPROGRESS ++# define EINPROGRESS WSAEINPROGRESS ++ ++# define socket_error WSAGetLastError() ++# define read_socket(f, d, s) recv(f, d, s, 0) ++# define close_socket(f) closesocket(f) ++ + #else ++ ++# define socket_error errno ++# define read_socket(f, d, s) read(fd, d, s) ++# define close_socket(f) close(f) ++ + #include + #include + #include +@@ -140,10 +161,10 @@ static int on_read_core(int fd, h2o_buffer_t **input) + /* memory allocation failed */ + return -1; + } +- while ((rret = read(fd, buf.base, buf.len)) == -1 && errno == EINTR) ++ while ((rret = read_socket(fd, buf.base, buf.len)) == -1 && socket_error == EINTR) + ; + if (rret == -1) { +- if (errno == EAGAIN) ++ if (socket_error == EAGAIN) + break; + else + return -1; +@@ -182,10 +203,10 @@ static int write_core(int fd, h2o_iovec_t **bufs, size_t *bufcnt) + iovcnt = IOV_MAX; + if (*bufcnt < iovcnt) + iovcnt = (int)*bufcnt; +- while ((wret = writev(fd, (struct iovec *)*bufs, iovcnt)) == -1 && errno == EINTR) ++ while ((wret = writev(fd, (struct iovec *)*bufs, iovcnt)) == -1 && socket_error == EINTR) + ; + if (wret == -1) { +- if (errno != EAGAIN) ++ if (socket_error != EAGAIN) + return -1; + break; + } +@@ -269,7 +290,7 @@ void do_dispose_socket(h2o_socket_t *_sock) + evloop_do_on_socket_close(sock); + wreq_free_buffer_if_allocated(sock); + if (sock->fd != -1) { +- close(sock->fd); ++ close_socket(sock->fd); + sock->fd = -1; + } + sock->_flags = H2O_SOCKET_FLAG_IS_DISPOSED; +@@ -472,8 +493,8 @@ h2o_socket_t *h2o_socket_connect(h2o_loop_t *loop, struct sockaddr *addr, sockle + fcntl(fd, F_SETFL, O_NONBLOCK); + #endif + +- if (!(connect(fd, addr, addrlen) == 0 || errno == EINPROGRESS)) { +- close(fd); ++ if (!(connect(fd, addr, addrlen) == 0 || socket_error == EINPROGRESS)) { ++ close_socket(fd); + return NULL; + } + +-- +2.4.4 + diff --git a/mingw-w64-h2o/PKGBUILD b/mingw-w64-h2o/PKGBUILD new file mode 100644 index 0000000000..dbc7b2e9cc --- /dev/null +++ b/mingw-w64-h2o/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Martell Malone + +_realname=h2o +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.3.1 +pkgrel=1 +pkgdesc="The optimized HTTP/1, HTTP/2 server (mingw-w64)" +arch=('any') +url="https://github.com/h2o/h2o" +license=("MIT") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") +depends=("${MINGW_PACKAGE_PREFIX}-wslay" + "${MINGW_PACKAGE_PREFIX}-libuv") +options=('staticlibs' 'strip') + +source=("https://github.com/h2o/h2o/archive/v$pkgver.tar.gz" + "0001-update-yaml-to-0.1.6-for-security-fix.patch" + "0002-basic-windows-support.patch" + "0003-add-readdir_r-emulation-for-windows.patch" + "0004-serverutil-hackery-for-windows.patch" + "0005-mman-hackery-for-windows.patch" + "0006-fix-gmtime_r-for-mingw-w64.patch" + "0007-cloexec-hackery-for-windows.patch" + "0008-ignore-O_CLOEXEC-in-file.c-for-windows.patch" + "0009-use-gnu_printf-and-gnu_scanf-in-mingw-w64.patch" + "0010-more-socket-work-for-windows-on-evloop.patch") + +sha256sums=('8668a7c70cdb59eef4e67889569a45e0cf75b95eec133bd30435879cbdb77fba' + 'f79055e76acde4a8f7ab5518418f535ef92a4597cf34b6d70e9c652f9a31b05f' + '92b93a4b47b21cc34dabe527cdab978f4c6224b76caf85287560dde6b412395c' + 'e0527b97a8ba668bacf077d2540ae0184339af36571f347b0be81131310ce702' + '8098ac07cddb81fabeb14d701ea9ffe94d3d25b9b3c6c6a97bade926b75f6458' + '3ac1ad8388f65c463d8e2a097ba4087d02c2712b99b13d558dd708f6ae467f92' + '1c704e1e7465a895531dfa5b72ecaaa6da51088d0c3556455f93d96a1c614749' + '6e61ee523048d2fe120397cf8c1619c0f0a920355152d9852c37637abefdacc5' + '9f6f6728e5652fa0b0333c0b052f58310a9391603a0140ab2fb0e2bf3f46f269' + 'fa0028f61d83e89ced9ef1fcbfdac8b87f8e6e60014e3871910a7cb3df3c31b7' + '866c9e8d3304f238c0cefae390d23453e9ab6931ec9a462cb116306116a43ee3') + +prepare() { + cd "$srcdir/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}"/0001-update-yaml-to-0.1.6-for-security-fix.patch + patch -p1 -i "${srcdir}"/0002-basic-windows-support.patch + patch -p1 -i "${srcdir}"/0003-add-readdir_r-emulation-for-windows.patch + patch -p1 -i "${srcdir}"/0004-serverutil-hackery-for-windows.patch + patch -p1 -i "${srcdir}"/0005-mman-hackery-for-windows.patch + patch -p1 -i "${srcdir}"/0006-fix-gmtime_r-for-mingw-w64.patch + patch -p1 -i "${srcdir}"/0007-cloexec-hackery-for-windows.patch + patch -p1 -i "${srcdir}"/0008-ignore-O_CLOEXEC-in-file.c-for-windows.patch + patch -p1 -i "${srcdir}"/0009-use-gnu_printf-and-gnu_scanf-in-mingw-w64.patch + patch -p1 -i "${srcdir}"/0010-more-socket-work-for-windows-on-evloop.patch +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_C_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" \ + -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + ../${_realname}-${pkgver} + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make install +} diff --git a/mingw-w64-harfbuzz/PKGBUILD b/mingw-w64-harfbuzz/PKGBUILD index 3a040da8fb..217f43e477 100644 --- a/mingw-w64-harfbuzz/PKGBUILD +++ b/mingw-w64-harfbuzz/PKGBUILD @@ -1,25 +1,27 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=harfbuzz +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.9.35 +pkgver=1.0.6 pkgrel=2 pkgdesc="OpenType text shaping engine (mingw-w64)" arch=('any') url="http://www.freedesktop.org/wiki/Software/HarfBuzz" license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-icu" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-cairo") + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-glib2") options=('strip' 'staticlibs') -optdepends=("${MINGW_PACKAGE_PREFIX}-icu: harfbuzz-icu") +optdepends=("${MINGW_PACKAGE_PREFIX}-icu: harfbuzz-icu support") source=("http://www.freedesktop.org/software/harfbuzz/release/${_realname}-${pkgver}.tar.bz2") -sha256sums=('0aa1a8aba6f502321cf6fef3c9d2c73dde48389c5ed1d3615a7691944c2a06ed') +sha256sums=('f616a7fbdc78a627043f9029000bf08c0c71df59cde4143fc92a014f6a993b26') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -27,9 +29,10 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -37,6 +40,7 @@ build() { --enable-static \ --enable-introspection \ --with-gobject + make } @@ -47,6 +51,6 @@ check(){ package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-hclient/.gitignore b/mingw-w64-hclient/.gitignore new file mode 100644 index 0000000000..5c6fb78c8c --- /dev/null +++ b/mingw-w64-hclient/.gitignore @@ -0,0 +1 @@ +wds diff --git a/mingw-w64-hclient/01-includes.patch b/mingw-w64-hclient/01-includes.patch new file mode 100644 index 0000000000..18ee7dda8a --- /dev/null +++ b/mingw-w64-hclient/01-includes.patch @@ -0,0 +1,11 @@ +--- a/buffers.h ++++ b/buffers.h +@@ -24,6 +24,8 @@ Revision History: + #ifndef _BUFFERS_H_ + #define _BUFFERS_H_ + ++#include ++ + typedef struct _REPORT_BUFFER + { + _Field_size_(iBufferSize) diff --git a/mingw-w64-hclient/02-intsafe.patch b/mingw-w64-hclient/02-intsafe.patch new file mode 100644 index 0000000000..8266340dd0 --- /dev/null +++ b/mingw-w64-hclient/02-intsafe.patch @@ -0,0 +1,11 @@ +--- a/buffers.c ++++ b/buffers.c +@@ -79,7 +79,7 @@ + return (FALSE); + } + +- if(S_OK != ULongMult(sizeof(REPORT_BUFFER), nBuffers, &reportBuffersSize)) ++ if(__builtin_mul_overflow(sizeof(REPORT_BUFFER), nBuffers, &reportBuffersSize)) + { + free(pNewDisplay); + return (FALSE); diff --git a/mingw-w64-hclient/03-read-thread-proc.patch b/mingw-w64-hclient/03-read-thread-proc.patch new file mode 100644 index 0000000000..4cf0c35ead --- /dev/null +++ b/mingw-w64-hclient/03-read-thread-proc.patch @@ -0,0 +1,45 @@ +--- a/hclient.c ++++ b/hclient.c +@@ -3692,10 +3692,10 @@ DestroyDeviceListCallback( + } + + DWORD WINAPI +-AsynchReadThreadProc( +- PREAD_THREAD_CONTEXT Context +-) ++AsynchReadThreadProc( ++ LPVOID c) + { ++ PREAD_THREAD_CONTEXT Context = c; + HANDLE completionEvent; + BOOL readStatus; + DWORD waitStatus; +@@ -3818,9 +3818,9 @@ AsyncRead_End: + + DWORD WINAPI + SynchReadThreadProc( +- PREAD_THREAD_CONTEXT Context +-) ++ LPVOID c) + { ++ PREAD_THREAD_CONTEXT Context = c; + ULONG numReadsDone = 0; + do + { +--- a/hclient.h ++++ b/hclient.h +@@ -140,12 +140,12 @@ vDisplayValueAttributes( + + DWORD WINAPI + AsynchReadThreadProc( +- PREAD_THREAD_CONTEXT Context ++ LPVOID + ); + + DWORD WINAPI + SynchReadThreadProc( +- PREAD_THREAD_CONTEXT Context ++ LPVOID + ); + + #endif diff --git a/mingw-w64-hclient/04-bad-comparison.patch b/mingw-w64-hclient/04-bad-comparison.patch new file mode 100644 index 0000000000..e62ddfe3cc --- /dev/null +++ b/mingw-w64-hclient/04-bad-comparison.patch @@ -0,0 +1,11 @@ +--- a/hclient.c ++++ b/hclient.c +@@ -3560,7 +3560,7 @@ Routine Description: + // + if(iByteIndex + (UINT)4 > uiBufferSize) + { +- if(sizeof(szString) <= uiStringSize) ++ + { + StringCbPrintf(szString, uiStringSize, "ERR"); + } diff --git a/mingw-w64-hclient/05-other-bad-comparison.patch b/mingw-w64-hclient/05-other-bad-comparison.patch new file mode 100644 index 0000000000..fc64b24e52 --- /dev/null +++ b/mingw-w64-hclient/05-other-bad-comparison.patch @@ -0,0 +1,11 @@ +--- a/strings.c ++++ b/strings.c +@@ -196,7 +196,7 @@ Routine Description: + goto Done; + } + +- if(ByteOffset + DataBuffer > CurrentBufferOffset+ByteOffset) ++ if(ByteOffset + DataBuffer > (PCHAR)CurrentBufferOffset+ByteOffset) + { + goto Done; + } diff --git a/mingw-w64-hclient/06-size-t.patch b/mingw-w64-hclient/06-size-t.patch new file mode 100644 index 0000000000..ce58bce400 --- /dev/null +++ b/mingw-w64-hclient/06-size-t.patch @@ -0,0 +1,11 @@ +--- a/ecdisp.c ++++ b/ecdisp.c +@@ -155,7 +155,7 @@ + #define OUTSTRING(win, str) SendMessage(win, LB_ADDSTRING, 0, (LPARAM) str) + #define OUTWSTRING(win, str) \ + { \ +- SIZE_T nBytes; \ ++ size_t nBytes; \ + \ + errno_t result = wcstombs_s(&nBytes, szTempBuffer, TEMP_BUFFER_SIZE, str, TEMP_BUFFER_SIZE-1); \ + if (0 != result) { \ diff --git a/mingw-w64-hclient/07-dialog-proc.patch b/mingw-w64-hclient/07-dialog-proc.patch new file mode 100644 index 0000000000..7a8fccae75 --- /dev/null +++ b/mingw-w64-hclient/07-dialog-proc.patch @@ -0,0 +1,168 @@ +--- a/ecdisp.c ++++ b/ecdisp.c +@@ -499,7 +499,7 @@ + OUT INT *nReportIDs + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetUsagesDlgProc( + HWND hDlg, + UINT message, +@@ -507,7 +507,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetValueDlgProc( + HWND hDlg, + UINT message, +@@ -515,7 +515,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetInputBuffDlgProc( + HWND hDlg, + UINT message, +@@ -523,7 +523,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetDataDlgProc( + HWND hDlg, + UINT message, +@@ -531,7 +531,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetBufLenDlgProc( + HWND hDlg, + UINT message, +@@ -539,7 +539,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetInputBuffersDlgProc( + HWND hDlg, + UINT message, +@@ -547,7 +547,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bGetIndexedDlgProc( + HWND hDlg, + UINT message, +@@ -555,7 +555,7 @@ + LPARAM lParam + ); + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bGetUsageDiffDlgProc( + HWND hDlg, + UINT message, +@@ -629,7 +629,7 @@ + /* Global function definitions + /*****************************************************************************/ + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bExtCallDlgProc( + HWND hDlg, + UINT message, +@@ -3313,7 +3313,7 @@ + return; + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetUsagesDlgProc( + HWND hDlg, + UINT message, +@@ -3378,7 +3378,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetValueDlgProc( + HWND hDlg, + UINT message, +@@ -3449,7 +3449,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetInputBuffDlgProc( + HWND hDlg, + UINT message, +@@ -3510,7 +3510,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetDataDlgProc( + HWND hDlg, + UINT message, +@@ -3687,7 +3687,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetBufLenDlgProc( + HWND hDlg, + UINT message, +@@ -3749,7 +3749,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bSetInputBuffersDlgProc( + HWND hDlg, + UINT message, +@@ -3810,7 +3810,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bGetIndexedDlgProc( + HWND hDlg, + UINT message, +@@ -3883,7 +3883,7 @@ + return (FALSE); + } + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bGetUsageDiffDlgProc( + HWND hDlg, + UINT message, +diff --git a/hid/hclient/ecdisp.h b/hid/hclient/ecdisp.h +index ea0bd0f..6d13b83 100644 +--- a/ecdisp.h ++++ b/ecdisp.h +@@ -71,7 +71,7 @@ + /* Global Extended Call display function declarations + /*****************************************************************************/ + +-LRESULT CALLBACK ++INT_PTR CALLBACK + bExtCallDlgProc( + HWND hDlg, + UINT message, diff --git a/mingw-w64-hclient/PKGBUILD b/mingw-w64-hclient/PKGBUILD new file mode 100644 index 0000000000..bf310a3969 --- /dev/null +++ b/mingw-w64-hclient/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer: David Grayson + +_realname=hclient +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides="${MINGW_PACKAGE_PREFIX}-${_realname}" +conflicts="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=37.efd8c0a +pkgrel=1 +pkgdesc='Sample GUI for communicating with HIDs (mingw-w64)' +arch=('any') +url='https://github.com/Microsoft/Windows-driver-samples/tree/master/hid/hclient' +license=('custom') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +depends=() +options=('strip') +source=( + "wds::git+https://github.com/Microsoft/Windows-driver-samples" + '01-includes.patch' + '02-intsafe.patch' + '03-read-thread-proc.patch' + '04-bad-comparison.patch' + '05-other-bad-comparison.patch' + '06-size-t.patch' + '07-dialog-proc.patch' +) + +sha256sums=('SKIP' + 'c5e16ddaa76e5d2dbcf3d8b5083f9a2dfca74f869419c2e5be9b7444b05a72db' + '6c73b234ff46a20cae7de86e6d96f53629624c9b3d005d72030500e95616b826' + '6f2f2ffe160cf71c43fb0224efabf045490ef0202921600f79c45b0bab527e45' + '8c879599a1cf95ed838be8030acb2d74d85989de10a61c7ac1e9243266d1c361' + 'e673215729689b21fd4b6b246e70ed4a8d75fea871dac6b0ec410bf4fc87d60c' + '94b4ebd39a372cf105d45daa1be9c5286dc307a82325273c9925253985c736c8' + 'c2caed5841c2212ec43b7799b0140fcdd5e217b0488f8cfe9318a19841e0eb32') + +pkgver() { + cd "${srcdir}/wds" + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/wds/hid/${_realname}" + + patch -p1 -i "${srcdir}/01-includes.patch" + + # GCC distinguishes between unsigned long and unsigned int. + patch -p1 -i "${srcdir}/02-intsafe.patch" + + # GCC distinguishes between void pointers and other pointers. + patch -p1 -i "${srcdir}/03-read-thread-proc.patch" + + # GCC warns about this because sizeof() for an array parameter + # just returns the size of a pointer. + patch -p1 -i "${srcdir}/04-bad-comparison.patch" + + # Fix a compile warning from comparing two different pointer types without a + # cast. + patch -p1 -i "${srcdir}/05-other-bad-comparison.patch" + + # size_t is different from SIZE_T + patch -p1 -i "${srcdir}/06-size-t.patch" + + # DlgProcs are supposed to return INT_PTR, which is different from LRESULT. + patch -p1 -i "${srcdir}/07-dialog-proc.patch" +} + +build() { + cd "${srcdir}" + rm -rf "build-${MINGW_CHOST}" + mkdir -p "build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + + windres ../wds/hid/hclient/hclient.rc rc.so + + gcc -mwindows --std=c99 ${CFLAGS} ${LDFLAGS} \ + ../wds/hid/hclient/*.c rc.so \ + -lsetupapi -lhid \ + -o hclient.exe +} + +package() { + cd "${srcdir}/wds" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + cd "${srcdir}/build-${MINGW_CHOST}" + mkdir "${pkgdir}${MINGW_PREFIX}/bin" + install -Dm755 hclient.exe "${pkgdir}${MINGW_PREFIX}/bin" +} diff --git a/mingw-w64-hdf5/PKGBUILD b/mingw-w64-hdf5/PKGBUILD index 2ebbb73d5d..c10de5f700 100644 --- a/mingw-w64-hdf5/PKGBUILD +++ b/mingw-w64-hdf5/PKGBUILD @@ -3,22 +3,24 @@ _realname=hdf5 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.8.14 -pkgrel=1 +_ver=1.8.15 +patch=-patch1 +pkgver=${_ver}${patch//-/.} +pkgrel=2 pkgdesc="General purpose library and file format for storing scientific data" arch=('any') url="http://www.hdfgroup.org/HDF5/" -source=("http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${pkgver}/src/hdf5-${pkgver}.tar.bz2" +source=("http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${_ver}${patch}/src/hdf5-${_ver}${patch}.tar.bz2" "hdf5-link-ws2_32-mingw.patch" "hdf5-default-import-suffix.patch" "hdf5-install.patch" "hdf5-fix-install-docs.patch" ) -md5sums=('4e31a751ef12f5958e23e4ee548c4ca5' - '35e0198f4ed456ee5673c23a06aa5eb6' +md5sums=('3c0d7a8c38d1abc7b40fc12c1d5f2bb8' + 'a7521a2d777df6cb971d646720f353a9' '4a9a46e98db4a6ed68e0dd2d3e2cf4ac' 'f08826ac66e319190a01d3f82a692c0e' - '44ac9317cb413eca5ed506033fd3b676') + '45267f00ae4feca9862de19f68f487d0') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran" "${MINGW_PACKAGE_PREFIX}-szip" @@ -30,12 +32,12 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" options=('staticlibs' 'strip') prepare() { - cd ${srcdir}/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-${_ver}${patch} patch -p1 -i ${srcdir}/hdf5-link-ws2_32-mingw.patch patch -p1 -i ${srcdir}/hdf5-install.patch patch -p1 -i ${srcdir}/hdf5-default-import-suffix.patch patch -p1 -i ${srcdir}/hdf5-fix-install-docs.patch - + # rename X.dll to X-0.dll echo "IF (BUILD_SHARED_LIBS)" >> CMakeLists.txt echo "SET_TARGET_PROPERTIES (\${HDF5_LIB_TARGET} PROPERTIES SUFFIX -0.dll)">> CMakeLists.txt @@ -47,15 +49,27 @@ prepare() { echo "SET_TARGET_PROPERTIES (\${HDF5_F90_C_LIB_TARGET} PROPERTIES SUFFIX -0.dll)">> CMakeLists.txt echo "SET_TARGET_PROPERTIES (\${HDF5_HL_F90_LIB_TARGET} PROPERTIES SUFFIX -0.dll)">> CMakeLists.txt echo "SET_TARGET_PROPERTIES (\${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES SUFFIX -0.dll)">> CMakeLists.txt + echo "ELSE ()" >> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_HL_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_CPP_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_HL_CPP_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_TOOLS_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_F90_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_F90_C_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_HL_F90_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES PREFIX \"\")">> CMakeLists.txt echo "ENDIF ()" >> CMakeLists.txt } build() { - [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} - mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + # Build shared library + #[[ -d ${srcdir}/build-shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-shared-${MINGW_CHOST} + mkdir -p ${srcdir}/build-shared-${MINGW_CHOST} && cd ${srcdir}/build-shared-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ @@ -66,11 +80,33 @@ build() { -DHDF5_ENABLE_DEPRECATED_SYMBOLS=ON \ -DHDF5_ENABLE_SZIP_SUPPORT=ON \ -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \ - ../${_realname}-${pkgver} + ../${_realname}-${_ver}${patch} + make + + # Build static library + #[[ -d ${srcdir}/build-static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-static-${MINGW_CHOST} + mkdir -p ${srcdir}/build-static-${MINGW_CHOST} && cd ${srcdir}/build-static-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DHDF5_BUILD_HL_LIB=ON \ + -DHDF5_BUILD_CPP_LIB=ON \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_BUILD_TOOLS=ON \ + -DHDF5_ENABLE_DEPRECATED_SYMBOLS=ON \ + -DHDF5_ENABLE_SZIP_SUPPORT=ON \ + -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \ + ../${_realname}-${_ver}${patch} make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 install + cd "${srcdir}/build-static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + cd "${srcdir}/build-shared-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-hdf5/hdf5-fix-install-docs.patch b/mingw-w64-hdf5/hdf5-fix-install-docs.patch index 00c233a94b..0474279a12 100644 --- a/mingw-w64-hdf5/hdf5-fix-install-docs.patch +++ b/mingw-w64-hdf5/hdf5-fix-install-docs.patch @@ -14,7 +14,7 @@ install ( FILES ${release_files} - DESTINATION ${HDF5_INSTALL_DATA_DIR} -+ DESTINATION ${HDF5_INSTALL_DATA_DIR}/doc/hdf5 ++ DESTINATION ${HDF5_INSTALL_DATA_DIR}/doc/hdf5 COMPONENT hdfdocuments ) endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") diff --git a/mingw-w64-hdf5/hdf5-link-ws2_32-mingw.patch b/mingw-w64-hdf5/hdf5-link-ws2_32-mingw.patch index ec8ae0e09e..851fd87eb1 100644 --- a/mingw-w64-hdf5/hdf5-link-ws2_32-mingw.patch +++ b/mingw-w64-hdf5/hdf5-link-ws2_32-mingw.patch @@ -4,7 +4,7 @@ diff -ur hdf5-1.8.12.orig/src/CMakeLists.txt hdf5-1.8.12/src/CMakeLists.txt @@ -615,9 +615,11 @@ #----------------------------------------------------------------------------- add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) - TARGET_C_PROPERTIES (H5detect " " " ") + TARGET_C_PROPERTIES (H5detect STATIC " " " ") -if (MSVC OR MINGW) +if (MSVC) target_link_libraries (H5detect "ws2_32.lib") @@ -18,7 +18,7 @@ diff -ur hdf5-1.8.12.orig/src/CMakeLists.txt hdf5-1.8.12/src/CMakeLists.txt @@ -629,9 +629,11 @@ add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) - TARGET_C_PROPERTIES (H5make_libsettings " " " ") + TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") -if (MSVC OR MINGW) +if (MSVC) target_link_libraries (H5make_libsettings "ws2_32.lib") diff --git a/mingw-w64-headers-git/0002-dxgi-Add-interface-for-IDXGISurface1.patch b/mingw-w64-headers-git/0002-dxgi-Add-interface-for-IDXGISurface1.patch new file mode 100644 index 0000000000..de09588ee9 --- /dev/null +++ b/mingw-w64-headers-git/0002-dxgi-Add-interface-for-IDXGISurface1.patch @@ -0,0 +1,258 @@ +From a02316fd603ffa47e68c700390e66baaa2ffa7f5 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 16 Feb 2015 19:56:22 +0000 +Subject: [PATCH 2/6] dxgi: Add interface for IDXGISurface1 + +--- + mingw-w64-headers/direct-x/include/dxgi.h | 191 ++++++++++++++++++++++++++++ + mingw-w64-headers/direct-x/include/dxgi.idl | 19 +++ + 2 files changed, 210 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/dxgi.h b/mingw-w64-headers/direct-x/include/dxgi.h +index 88e76a2..08def83 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi.h ++++ b/mingw-w64-headers/direct-x/include/dxgi.h +@@ -42,6 +42,11 @@ typedef interface IDXGIKeyedMutex IDXGIKeyedMutex; + typedef interface IDXGISurface IDXGISurface; + #endif + ++#ifndef __IDXGISurface1_FWD_DEFINED__ ++#define __IDXGISurface1_FWD_DEFINED__ ++typedef interface IDXGISurface1 IDXGISurface1; ++#endif ++ + #ifndef __IDXGIOutput_FWD_DEFINED__ + #define __IDXGIOutput_FWD_DEFINED__ + typedef interface IDXGIOutput IDXGIOutput; +@@ -1019,6 +1024,192 @@ void __RPC_STUB IDXGISurface_Unmap_Stub( + #endif /* __IDXGISurface_INTERFACE_DEFINED__ */ + + /***************************************************************************** ++ * IDXGISurface1 interface ++ */ ++#ifndef __IDXGISurface1_INTERFACE_DEFINED__ ++#define __IDXGISurface1_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGISurface1, 0x4ae63092, 0x6327, 0x4c1b, 0x80,0xae, 0xbf,0xe1,0x2e,0xa3,0x2b,0x86); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("4ae63092-6327-4c1b-80ae-bfe12ea32b86") ++IDXGISurface1 : public IDXGISurface ++{ ++ virtual HRESULT STDMETHODCALLTYPE GetDC( ++ WINBOOL Discard, ++ HDC *dc) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE ReleaseDC( ++ RECT *rect) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGISurface1, 0x4ae63092, 0x6327, 0x4c1b, 0x80,0xae, 0xbf,0xe1,0x2e,0xa3,0x2b,0x86) ++#endif ++#else ++typedef struct IDXGISurface1Vtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGISurface1* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGISurface1* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGISurface1* This); ++ ++ /*** IDXGIObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ IDXGISurface1* This, ++ REFGUID guid, ++ UINT data_size, ++ const void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ IDXGISurface1* This, ++ REFGUID guid, ++ const IUnknown *object); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ IDXGISurface1* This, ++ REFGUID guid, ++ UINT *data_size, ++ void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *GetParent)( ++ IDXGISurface1* This, ++ REFIID riid, ++ void **parent); ++ ++ /*** IDXGIDeviceSubObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDevice)( ++ IDXGISurface1* This, ++ REFIID riid, ++ void **device); ++ ++ /*** IDXGISurface methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDesc)( ++ IDXGISurface1* This, ++ DXGI_SURFACE_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *Map)( ++ IDXGISurface1* This, ++ DXGI_MAPPED_RECT *mapped_rect, ++ UINT flags); ++ ++ HRESULT (STDMETHODCALLTYPE *Unmap)( ++ IDXGISurface1* This); ++ ++ /*** IDXGISurface1 methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDC)( ++ IDXGISurface1* This, ++ WINBOOL Discard, ++ HDC *dc); ++ ++ HRESULT (STDMETHODCALLTYPE *ReleaseDC)( ++ IDXGISurface1* This, ++ RECT *rect); ++ ++ END_INTERFACE ++} IDXGISurface1Vtbl; ++interface IDXGISurface1 { ++ CONST_VTBL IDXGISurface1Vtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGISurface1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGISurface1_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGISurface1_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIObject methods ***/ ++#define IDXGISurface1_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) ++#define IDXGISurface1_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) ++#define IDXGISurface1_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) ++#define IDXGISurface1_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) ++/*** IDXGIDeviceSubObject methods ***/ ++#define IDXGISurface1_GetDevice(This,riid,device) (This)->lpVtbl->GetDevice(This,riid,device) ++/*** IDXGISurface methods ***/ ++#define IDXGISurface1_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) ++#define IDXGISurface1_Map(This,mapped_rect,flags) (This)->lpVtbl->Map(This,mapped_rect,flags) ++#define IDXGISurface1_Unmap(This) (This)->lpVtbl->Unmap(This) ++/*** IDXGISurface1 methods ***/ ++#define IDXGISurface1_GetDC(This,Discard,dc) (This)->lpVtbl->GetDC(This,Discard,dc) ++#define IDXGISurface1_ReleaseDC(This,rect) (This)->lpVtbl->ReleaseDC(This,rect) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_QueryInterface(IDXGISurface1* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGISurface1_AddRef(IDXGISurface1* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGISurface1_Release(IDXGISurface1* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIObject methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_SetPrivateData(IDXGISurface1* This,REFGUID guid,UINT data_size,const void *data) { ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGISurface1_SetPrivateDataInterface(IDXGISurface1* This,REFGUID guid,const IUnknown *object) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); ++} ++static FORCEINLINE HRESULT IDXGISurface1_GetPrivateData(IDXGISurface1* This,REFGUID guid,UINT *data_size,void *data) { ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGISurface1_GetParent(IDXGISurface1* This,REFIID riid,void **parent) { ++ return This->lpVtbl->GetParent(This,riid,parent); ++} ++/*** IDXGIDeviceSubObject methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_GetDevice(IDXGISurface1* This,REFIID riid,void **device) { ++ return This->lpVtbl->GetDevice(This,riid,device); ++} ++/*** IDXGISurface methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_GetDesc(IDXGISurface1* This,DXGI_SURFACE_DESC *desc) { ++ return This->lpVtbl->GetDesc(This,desc); ++} ++static FORCEINLINE HRESULT IDXGISurface1_Map(IDXGISurface1* This,DXGI_MAPPED_RECT *mapped_rect,UINT flags) { ++ return This->lpVtbl->Map(This,mapped_rect,flags); ++} ++static FORCEINLINE HRESULT IDXGISurface1_Unmap(IDXGISurface1* This) { ++ return This->lpVtbl->Unmap(This); ++} ++/*** IDXGISurface1 methods ***/ ++static FORCEINLINE HRESULT IDXGISurface1_GetDC(IDXGISurface1* This,WINBOOL Discard,HDC *dc) { ++ return This->lpVtbl->GetDC(This,Discard,dc); ++} ++static FORCEINLINE HRESULT IDXGISurface1_ReleaseDC(IDXGISurface1* This,RECT *rect) { ++ return This->lpVtbl->ReleaseDC(This,rect); ++} ++#endif ++#endif ++ ++#endif ++ ++HRESULT STDMETHODCALLTYPE IDXGISurface1_GetDC_Proxy( ++ IDXGISurface1* This, ++ WINBOOL Discard, ++ HDC *dc); ++void __RPC_STUB IDXGISurface1_GetDC_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGISurface1_ReleaseDC_Proxy( ++ IDXGISurface1* This, ++ RECT *rect); ++void __RPC_STUB IDXGISurface1_ReleaseDC_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGISurface1_INTERFACE_DEFINED__ */ ++ ++/***************************************************************************** + * IDXGIOutput interface + */ + #ifndef __IDXGIOutput_INTERFACE_DEFINED__ +diff --git a/mingw-w64-headers/direct-x/include/dxgi.idl b/mingw-w64-headers/direct-x/include/dxgi.idl +index 009a6b5..41ff7f1 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi.idl ++++ b/mingw-w64-headers/direct-x/include/dxgi.idl +@@ -1,5 +1,6 @@ + /* + * Copyright 2007 Andras Kovacs ++ * Copyright 2015 Martell Malone + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -223,6 +224,24 @@ interface IDXGISurface : IDXGIDeviceSubObject + + [ + object, ++ uuid(4ae63092-6327-4c1b-80ae-bfe12ea32b86), ++ local, ++ pointer_default(unique) ++] ++interface IDXGISurface1 : IDXGISurface ++{ ++ HRESULT GetDC( ++ [in] BOOL Discard, ++ [out] HDC *dc ++ ); ++ ++ HRESULT ReleaseDC( ++ [in] RECT *rect ++ ); ++} ++ ++[ ++ object, + local, + uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa) + ] +-- +2.4.5 + diff --git a/mingw-w64-headers-git/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch b/mingw-w64-headers-git/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch new file mode 100644 index 0000000000..4d77b2292e --- /dev/null +++ b/mingw-w64-headers-git/0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch @@ -0,0 +1,961 @@ +From 0e266c2461defa50a51bda4eab1b1c08d37f698d Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 16 Feb 2015 23:10:00 +0000 +Subject: [PATCH 3/6] dxgi: Add missing dxgi 1.2 structs and interfaces + +--- + mingw-w64-headers/direct-x/include/dxgi1_2.h | 744 +++++++++++++++++++++++++ + mingw-w64-headers/direct-x/include/dxgi1_2.idl | 151 +++++ + 2 files changed, 895 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/dxgi1_2.h b/mingw-w64-headers/direct-x/include/dxgi1_2.h +index de3f359..3af09c7 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi1_2.h ++++ b/mingw-w64-headers/direct-x/include/dxgi1_2.h +@@ -17,6 +17,16 @@ + + /* Forward declarations */ + ++#ifndef __IDXGIDisplayControl_FWD_DEFINED__ ++#define __IDXGIDisplayControl_FWD_DEFINED__ ++typedef interface IDXGIDisplayControl IDXGIDisplayControl; ++#endif ++ ++#ifndef __IDXGIOutputDuplication_FWD_DEFINED__ ++#define __IDXGIOutputDuplication_FWD_DEFINED__ ++typedef interface IDXGIOutputDuplication IDXGIOutputDuplication; ++#endif ++ + #ifndef __IDXGIDevice2_FWD_DEFINED__ + #define __IDXGIDevice2_FWD_DEFINED__ + typedef interface IDXGIDevice2 IDXGIDevice2; +@@ -37,6 +47,11 @@ typedef interface IDXGIFactory2 IDXGIFactory2; + typedef interface IDXGIAdapter2 IDXGIAdapter2; + #endif + ++#ifndef __IDXGIOutput1_FWD_DEFINED__ ++#define __IDXGIOutput1_FWD_DEFINED__ ++typedef interface IDXGIOutput1 IDXGIOutput1; ++#endif ++ + /* Headers for imported files */ + + #include +@@ -45,6 +60,423 @@ typedef interface IDXGIAdapter2 IDXGIAdapter2; + extern "C" { + #endif + ++/***************************************************************************** ++ * IDXGIDisplayControl interface ++ */ ++#ifndef __IDXGIDisplayControl_INTERFACE_DEFINED__ ++#define __IDXGIDisplayControl_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGIDisplayControl, 0xea9dbf1a, 0xc88e, 0x4486, 0x85,0x4a, 0x98,0xaa,0x01,0x38,0xf3,0x0c); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("ea9dbf1a-c88e-4486-854a-98aa0138f30c") ++IDXGIDisplayControl : public IUnknown ++{ ++ virtual WINBOOL STDMETHODCALLTYPE IsStereoEnabled( ++ ) = 0; ++ ++ virtual void STDMETHODCALLTYPE SetStereoEnabled( ++ WINBOOL enabled) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGIDisplayControl, 0xea9dbf1a, 0xc88e, 0x4486, 0x85,0x4a, 0x98,0xaa,0x01,0x38,0xf3,0x0c) ++#endif ++#else ++typedef struct IDXGIDisplayControlVtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGIDisplayControl* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGIDisplayControl* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGIDisplayControl* This); ++ ++ /*** IDXGIDisplayControl methods ***/ ++ WINBOOL (STDMETHODCALLTYPE *IsStereoEnabled)( ++ IDXGIDisplayControl* This); ++ ++ void (STDMETHODCALLTYPE *SetStereoEnabled)( ++ IDXGIDisplayControl* This, ++ WINBOOL enabled); ++ ++ END_INTERFACE ++} IDXGIDisplayControlVtbl; ++interface IDXGIDisplayControl { ++ CONST_VTBL IDXGIDisplayControlVtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGIDisplayControl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGIDisplayControl_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGIDisplayControl_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIDisplayControl methods ***/ ++#define IDXGIDisplayControl_IsStereoEnabled(This) (This)->lpVtbl->IsStereoEnabled(This) ++#define IDXGIDisplayControl_SetStereoEnabled(This,enabled) (This)->lpVtbl->SetStereoEnabled(This,enabled) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGIDisplayControl_QueryInterface(IDXGIDisplayControl* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGIDisplayControl_AddRef(IDXGIDisplayControl* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGIDisplayControl_Release(IDXGIDisplayControl* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIDisplayControl methods ***/ ++static FORCEINLINE WINBOOL IDXGIDisplayControl_IsStereoEnabled(IDXGIDisplayControl* This) { ++ return This->lpVtbl->IsStereoEnabled(This); ++} ++static FORCEINLINE void IDXGIDisplayControl_SetStereoEnabled(IDXGIDisplayControl* This,WINBOOL enabled) { ++ This->lpVtbl->SetStereoEnabled(This,enabled); ++} ++#endif ++#endif ++ ++#endif ++ ++WINBOOL STDMETHODCALLTYPE IDXGIDisplayControl_IsStereoEnabled_Proxy( ++ IDXGIDisplayControl* This); ++void __RPC_STUB IDXGIDisplayControl_IsStereoEnabled_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++void STDMETHODCALLTYPE IDXGIDisplayControl_SetStereoEnabled_Proxy( ++ IDXGIDisplayControl* This, ++ WINBOOL enabled); ++void __RPC_STUB IDXGIDisplayControl_SetStereoEnabled_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGIDisplayControl_INTERFACE_DEFINED__ */ ++ ++typedef struct DXGI_OUTDUPL_MOVE_RECT { ++ POINT SourcePoint; ++ RECT DestinationRect; ++} DXGI_OUTDUPL_MOVE_RECT; ++typedef struct DXGI_OUTDUPL_DESC { ++ DXGI_MODE_DESC ModeDesc; ++ DXGI_MODE_ROTATION Rotation; ++ WINBOOL DesktopImageInSystemMemory; ++} DXGI_OUTDUPL_DESC; ++typedef struct DXGI_OUTDUPL_POINTER_POSITION { ++ POINT Position; ++ WINBOOL Visible; ++} DXGI_OUTDUPL_POINTER_POSITION; ++typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE { ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4 ++} DXGI_OUTDUPL_POINTER_SHAPE_TYPE; ++typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO { ++ UINT Type; ++ UINT Width; ++ UINT Height; ++ UINT Pitch; ++ POINT HotSpot; ++} DXGI_OUTDUPL_POINTER_SHAPE_INFO; ++typedef struct DXGI_OUTDUPL_FRAME_INFO { ++ LARGE_INTEGER LastPresentTime; ++ LARGE_INTEGER LastMouseUpdateTime; ++ UINT AccumulatedFrames; ++ WINBOOL RectsCoalesced; ++ WINBOOL ProtectedContentMaskedOut; ++ DXGI_OUTDUPL_POINTER_POSITION PointerPosition; ++ UINT TotalMetadataBufferSize; ++ UINT PointerShapeBufferSize; ++} DXGI_OUTDUPL_FRAME_INFO; ++/***************************************************************************** ++ * IDXGIOutputDuplication interface ++ */ ++#ifndef __IDXGIOutputDuplication_INTERFACE_DEFINED__ ++#define __IDXGIOutputDuplication_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGIOutputDuplication, 0x191cfac3, 0xa341, 0x470d, 0xb2,0x6e, 0xa8,0x64,0xf4,0x28,0x31,0x9c); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("191cfac3-a341-470d-b26e-a864f428319c") ++IDXGIOutputDuplication : public IDXGIObject ++{ ++ virtual void STDMETHODCALLTYPE GetDesc( ++ DXGI_OUTDUPL_DESC *desc) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE AcquireNextFrame( ++ UINT timeout, ++ DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ IDXGIResource **resource) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetFrameDirtyRects( ++ UINT dirty_size, ++ RECT *buffer, ++ UINT *buffer_size) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetFrameMoveRects( ++ UINT move_size, ++ DXGI_OUTDUPL_MOVE_RECT *rect, ++ UINT *rect_size) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetFramePointerShape( ++ UINT shape_size, ++ void *buffer, ++ UINT *buffer_size, ++ DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE MapDesktopSurface( ++ DXGI_MAPPED_RECT *rect) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE UnMapDesktopSurface( ++ ) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE ReleaseFrame( ++ ) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGIOutputDuplication, 0x191cfac3, 0xa341, 0x470d, 0xb2,0x6e, 0xa8,0x64,0xf4,0x28,0x31,0x9c) ++#endif ++#else ++typedef struct IDXGIOutputDuplicationVtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGIOutputDuplication* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGIOutputDuplication* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGIOutputDuplication* This); ++ ++ /*** IDXGIObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ IDXGIOutputDuplication* This, ++ REFGUID guid, ++ UINT data_size, ++ const void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ IDXGIOutputDuplication* This, ++ REFGUID guid, ++ const IUnknown *object); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ IDXGIOutputDuplication* This, ++ REFGUID guid, ++ UINT *data_size, ++ void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *GetParent)( ++ IDXGIOutputDuplication* This, ++ REFIID riid, ++ void **parent); ++ ++ /*** IDXGIOutputDuplication methods ***/ ++ void (STDMETHODCALLTYPE *GetDesc)( ++ IDXGIOutputDuplication* This, ++ DXGI_OUTDUPL_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *AcquireNextFrame)( ++ IDXGIOutputDuplication* This, ++ UINT timeout, ++ DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ IDXGIResource **resource); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFrameDirtyRects)( ++ IDXGIOutputDuplication* This, ++ UINT dirty_size, ++ RECT *buffer, ++ UINT *buffer_size); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFrameMoveRects)( ++ IDXGIOutputDuplication* This, ++ UINT move_size, ++ DXGI_OUTDUPL_MOVE_RECT *rect, ++ UINT *rect_size); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFramePointerShape)( ++ IDXGIOutputDuplication* This, ++ UINT shape_size, ++ void *buffer, ++ UINT *buffer_size, ++ DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info); ++ ++ HRESULT (STDMETHODCALLTYPE *MapDesktopSurface)( ++ IDXGIOutputDuplication* This, ++ DXGI_MAPPED_RECT *rect); ++ ++ HRESULT (STDMETHODCALLTYPE *UnMapDesktopSurface)( ++ IDXGIOutputDuplication* This); ++ ++ HRESULT (STDMETHODCALLTYPE *ReleaseFrame)( ++ IDXGIOutputDuplication* This); ++ ++ END_INTERFACE ++} IDXGIOutputDuplicationVtbl; ++interface IDXGIOutputDuplication { ++ CONST_VTBL IDXGIOutputDuplicationVtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGIOutputDuplication_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGIOutputDuplication_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGIOutputDuplication_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIObject methods ***/ ++#define IDXGIOutputDuplication_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) ++#define IDXGIOutputDuplication_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) ++#define IDXGIOutputDuplication_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) ++#define IDXGIOutputDuplication_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) ++/*** IDXGIOutputDuplication methods ***/ ++#define IDXGIOutputDuplication_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) ++#define IDXGIOutputDuplication_AcquireNextFrame(This,timeout,frame_info,resource) (This)->lpVtbl->AcquireNextFrame(This,timeout,frame_info,resource) ++#define IDXGIOutputDuplication_GetFrameDirtyRects(This,dirty_size,buffer,buffer_size) (This)->lpVtbl->GetFrameDirtyRects(This,dirty_size,buffer,buffer_size) ++#define IDXGIOutputDuplication_GetFrameMoveRects(This,move_size,rect,rect_size) (This)->lpVtbl->GetFrameMoveRects(This,move_size,rect,rect_size) ++#define IDXGIOutputDuplication_GetFramePointerShape(This,shape_size,buffer,buffer_size,shape_info) (This)->lpVtbl->GetFramePointerShape(This,shape_size,buffer,buffer_size,shape_info) ++#define IDXGIOutputDuplication_MapDesktopSurface(This,rect) (This)->lpVtbl->MapDesktopSurface(This,rect) ++#define IDXGIOutputDuplication_UnMapDesktopSurface(This) (This)->lpVtbl->UnMapDesktopSurface(This) ++#define IDXGIOutputDuplication_ReleaseFrame(This) (This)->lpVtbl->ReleaseFrame(This) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGIOutputDuplication_QueryInterface(IDXGIOutputDuplication* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGIOutputDuplication_AddRef(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGIOutputDuplication_Release(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIObject methods ***/ ++static FORCEINLINE HRESULT IDXGIOutputDuplication_SetPrivateData(IDXGIOutputDuplication* This,REFGUID guid,UINT data_size,const void *data) { ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_SetPrivateDataInterface(IDXGIOutputDuplication* This,REFGUID guid,const IUnknown *object) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetPrivateData(IDXGIOutputDuplication* This,REFGUID guid,UINT *data_size,void *data) { ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetParent(IDXGIOutputDuplication* This,REFIID riid,void **parent) { ++ return This->lpVtbl->GetParent(This,riid,parent); ++} ++/*** IDXGIOutputDuplication methods ***/ ++static FORCEINLINE void IDXGIOutputDuplication_GetDesc(IDXGIOutputDuplication* This,DXGI_OUTDUPL_DESC *desc) { ++ This->lpVtbl->GetDesc(This,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_AcquireNextFrame(IDXGIOutputDuplication* This,UINT timeout,DXGI_OUTDUPL_FRAME_INFO *frame_info,IDXGIResource **resource) { ++ return This->lpVtbl->AcquireNextFrame(This,timeout,frame_info,resource); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetFrameDirtyRects(IDXGIOutputDuplication* This,UINT dirty_size,RECT *buffer,UINT *buffer_size) { ++ return This->lpVtbl->GetFrameDirtyRects(This,dirty_size,buffer,buffer_size); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetFrameMoveRects(IDXGIOutputDuplication* This,UINT move_size,DXGI_OUTDUPL_MOVE_RECT *rect,UINT *rect_size) { ++ return This->lpVtbl->GetFrameMoveRects(This,move_size,rect,rect_size); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_GetFramePointerShape(IDXGIOutputDuplication* This,UINT shape_size,void *buffer,UINT *buffer_size,DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info) { ++ return This->lpVtbl->GetFramePointerShape(This,shape_size,buffer,buffer_size,shape_info); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_MapDesktopSurface(IDXGIOutputDuplication* This,DXGI_MAPPED_RECT *rect) { ++ return This->lpVtbl->MapDesktopSurface(This,rect); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_UnMapDesktopSurface(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->UnMapDesktopSurface(This); ++} ++static FORCEINLINE HRESULT IDXGIOutputDuplication_ReleaseFrame(IDXGIOutputDuplication* This) { ++ return This->lpVtbl->ReleaseFrame(This); ++} ++#endif ++#endif ++ ++#endif ++ ++void STDMETHODCALLTYPE IDXGIOutputDuplication_GetDesc_Proxy( ++ IDXGIOutputDuplication* This, ++ DXGI_OUTDUPL_DESC *desc); ++void __RPC_STUB IDXGIOutputDuplication_GetDesc_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_AcquireNextFrame_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT timeout, ++ DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ IDXGIResource **resource); ++void __RPC_STUB IDXGIOutputDuplication_AcquireNextFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_GetFrameDirtyRects_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT dirty_size, ++ RECT *buffer, ++ UINT *buffer_size); ++void __RPC_STUB IDXGIOutputDuplication_GetFrameDirtyRects_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_GetFrameMoveRects_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT move_size, ++ DXGI_OUTDUPL_MOVE_RECT *rect, ++ UINT *rect_size); ++void __RPC_STUB IDXGIOutputDuplication_GetFrameMoveRects_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_GetFramePointerShape_Proxy( ++ IDXGIOutputDuplication* This, ++ UINT shape_size, ++ void *buffer, ++ UINT *buffer_size, ++ DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info); ++void __RPC_STUB IDXGIOutputDuplication_GetFramePointerShape_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_MapDesktopSurface_Proxy( ++ IDXGIOutputDuplication* This, ++ DXGI_MAPPED_RECT *rect); ++void __RPC_STUB IDXGIOutputDuplication_MapDesktopSurface_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_UnMapDesktopSurface_Proxy( ++ IDXGIOutputDuplication* This); ++void __RPC_STUB IDXGIOutputDuplication_UnMapDesktopSurface_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutputDuplication_ReleaseFrame_Proxy( ++ IDXGIOutputDuplication* This); ++void __RPC_STUB IDXGIOutputDuplication_ReleaseFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGIOutputDuplication_INTERFACE_DEFINED__ */ ++ + typedef enum _DXGI_OFFER_RESOURCE_PRIORITY { + DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, + DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = 2, +@@ -1385,6 +1817,318 @@ void __RPC_STUB IDXGIAdapter2_GetDesc2_Stub( + + #endif /* __IDXGIAdapter2_INTERFACE_DEFINED__ */ + ++typedef struct DXGI_MODE_DESC1 { ++ UINT Width; ++ UINT Height; ++ DXGI_RATIONAL RefreshRate; ++ DXGI_FORMAT Format; ++ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; ++ DXGI_MODE_SCALING Scaling; ++ WINBOOL Stereo; ++} DXGI_MODE_DESC1; ++/***************************************************************************** ++ * IDXGIOutput1 interface ++ */ ++#ifndef __IDXGIOutput1_INTERFACE_DEFINED__ ++#define __IDXGIOutput1_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_IDXGIOutput1, 0x00cddea8, 0x939b, 0x4b83, 0xa3,0x40, 0xa6,0x85,0x22,0x66,0x66,0xcc); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("00cddea8-939b-4b83-a340-a685226666cc") ++IDXGIOutput1 : public IDXGIOutput ++{ ++ virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList1( ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC1 *desc) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode1( ++ const DXGI_MODE_DESC1 *mode, ++ DXGI_MODE_DESC1 *closest_match, ++ IUnknown *device) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData1( ++ IDXGIResource *resource) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE DuplicateOutput( ++ IUnknown *device, ++ IDXGIOutputDuplication **output) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(IDXGIOutput1, 0x00cddea8, 0x939b, 0x4b83, 0xa3,0x40, 0xa6,0x85,0x22,0x66,0x66,0xcc) ++#endif ++#else ++typedef struct IDXGIOutput1Vtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ IDXGIOutput1* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ IDXGIOutput1* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ IDXGIOutput1* This); ++ ++ /*** IDXGIObject methods ***/ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ IDXGIOutput1* This, ++ REFGUID guid, ++ UINT data_size, ++ const void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ IDXGIOutput1* This, ++ REFGUID guid, ++ const IUnknown *object); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ IDXGIOutput1* This, ++ REFGUID guid, ++ UINT *data_size, ++ void *data); ++ ++ HRESULT (STDMETHODCALLTYPE *GetParent)( ++ IDXGIOutput1* This, ++ REFIID riid, ++ void **parent); ++ ++ /*** IDXGIOutput methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDesc)( ++ IDXGIOutput1* This, ++ DXGI_OUTPUT_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *GetDisplayModeList)( ++ IDXGIOutput1* This, ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *FindClosestMatchingMode)( ++ IDXGIOutput1* This, ++ const DXGI_MODE_DESC *mode, ++ DXGI_MODE_DESC *closest_match, ++ IUnknown *device); ++ ++ HRESULT (STDMETHODCALLTYPE *WaitForVBlank)( ++ IDXGIOutput1* This); ++ ++ HRESULT (STDMETHODCALLTYPE *TakeOwnership)( ++ IDXGIOutput1* This, ++ IUnknown *device, ++ WINBOOL exclusive); ++ ++ void (STDMETHODCALLTYPE *ReleaseOwnership)( ++ IDXGIOutput1* This); ++ ++ HRESULT (STDMETHODCALLTYPE *GetGammaControlCapabilities)( ++ IDXGIOutput1* This, ++ DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps); ++ ++ HRESULT (STDMETHODCALLTYPE *SetGammaControl)( ++ IDXGIOutput1* This, ++ const DXGI_GAMMA_CONTROL *gamma_control); ++ ++ HRESULT (STDMETHODCALLTYPE *GetGammaControl)( ++ IDXGIOutput1* This, ++ DXGI_GAMMA_CONTROL *gamma_control); ++ ++ HRESULT (STDMETHODCALLTYPE *SetDisplaySurface)( ++ IDXGIOutput1* This, ++ IDXGISurface *surface); ++ ++ HRESULT (STDMETHODCALLTYPE *GetDisplaySurfaceData)( ++ IDXGIOutput1* This, ++ IDXGISurface *surface); ++ ++ HRESULT (STDMETHODCALLTYPE *GetFrameStatistics)( ++ IDXGIOutput1* This, ++ DXGI_FRAME_STATISTICS *stats); ++ ++ /*** IDXGIOutput1 methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDisplayModeList1)( ++ IDXGIOutput1* This, ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC1 *desc); ++ ++ HRESULT (STDMETHODCALLTYPE *FindClosestMatchingMode1)( ++ IDXGIOutput1* This, ++ const DXGI_MODE_DESC1 *mode, ++ DXGI_MODE_DESC1 *closest_match, ++ IUnknown *device); ++ ++ HRESULT (STDMETHODCALLTYPE *GetDisplaySurfaceData1)( ++ IDXGIOutput1* This, ++ IDXGIResource *resource); ++ ++ HRESULT (STDMETHODCALLTYPE *DuplicateOutput)( ++ IDXGIOutput1* This, ++ IUnknown *device, ++ IDXGIOutputDuplication **output); ++ ++ END_INTERFACE ++} IDXGIOutput1Vtbl; ++interface IDXGIOutput1 { ++ CONST_VTBL IDXGIOutput1Vtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define IDXGIOutput1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define IDXGIOutput1_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define IDXGIOutput1_Release(This) (This)->lpVtbl->Release(This) ++/*** IDXGIObject methods ***/ ++#define IDXGIOutput1_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) ++#define IDXGIOutput1_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) ++#define IDXGIOutput1_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) ++#define IDXGIOutput1_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) ++/*** IDXGIOutput methods ***/ ++#define IDXGIOutput1_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) ++#define IDXGIOutput1_GetDisplayModeList(This,format,flags,mode_count,desc) (This)->lpVtbl->GetDisplayModeList(This,format,flags,mode_count,desc) ++#define IDXGIOutput1_FindClosestMatchingMode(This,mode,closest_match,device) (This)->lpVtbl->FindClosestMatchingMode(This,mode,closest_match,device) ++#define IDXGIOutput1_WaitForVBlank(This) (This)->lpVtbl->WaitForVBlank(This) ++#define IDXGIOutput1_TakeOwnership(This,device,exclusive) (This)->lpVtbl->TakeOwnership(This,device,exclusive) ++#define IDXGIOutput1_ReleaseOwnership(This) (This)->lpVtbl->ReleaseOwnership(This) ++#define IDXGIOutput1_GetGammaControlCapabilities(This,gamma_caps) (This)->lpVtbl->GetGammaControlCapabilities(This,gamma_caps) ++#define IDXGIOutput1_SetGammaControl(This,gamma_control) (This)->lpVtbl->SetGammaControl(This,gamma_control) ++#define IDXGIOutput1_GetGammaControl(This,gamma_control) (This)->lpVtbl->GetGammaControl(This,gamma_control) ++#define IDXGIOutput1_SetDisplaySurface(This,surface) (This)->lpVtbl->SetDisplaySurface(This,surface) ++#define IDXGIOutput1_GetDisplaySurfaceData(This,surface) (This)->lpVtbl->GetDisplaySurfaceData(This,surface) ++#define IDXGIOutput1_GetFrameStatistics(This,stats) (This)->lpVtbl->GetFrameStatistics(This,stats) ++/*** IDXGIOutput1 methods ***/ ++#define IDXGIOutput1_GetDisplayModeList1(This,format,flags,mode_count,desc) (This)->lpVtbl->GetDisplayModeList1(This,format,flags,mode_count,desc) ++#define IDXGIOutput1_FindClosestMatchingMode1(This,mode,closest_match,device) (This)->lpVtbl->FindClosestMatchingMode1(This,mode,closest_match,device) ++#define IDXGIOutput1_GetDisplaySurfaceData1(This,resource) (This)->lpVtbl->GetDisplaySurfaceData1(This,resource) ++#define IDXGIOutput1_DuplicateOutput(This,device,output) (This)->lpVtbl->DuplicateOutput(This,device,output) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_QueryInterface(IDXGIOutput1* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG IDXGIOutput1_AddRef(IDXGIOutput1* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG IDXGIOutput1_Release(IDXGIOutput1* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** IDXGIObject methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_SetPrivateData(IDXGIOutput1* This,REFGUID guid,UINT data_size,const void *data) { ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_SetPrivateDataInterface(IDXGIOutput1* This,REFGUID guid,const IUnknown *object) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetPrivateData(IDXGIOutput1* This,REFGUID guid,UINT *data_size,void *data) { ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetParent(IDXGIOutput1* This,REFIID riid,void **parent) { ++ return This->lpVtbl->GetParent(This,riid,parent); ++} ++/*** IDXGIOutput methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_GetDesc(IDXGIOutput1* This,DXGI_OUTPUT_DESC *desc) { ++ return This->lpVtbl->GetDesc(This,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplayModeList(IDXGIOutput1* This,DXGI_FORMAT format,UINT flags,UINT *mode_count,DXGI_MODE_DESC *desc) { ++ return This->lpVtbl->GetDisplayModeList(This,format,flags,mode_count,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_FindClosestMatchingMode(IDXGIOutput1* This,const DXGI_MODE_DESC *mode,DXGI_MODE_DESC *closest_match,IUnknown *device) { ++ return This->lpVtbl->FindClosestMatchingMode(This,mode,closest_match,device); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_WaitForVBlank(IDXGIOutput1* This) { ++ return This->lpVtbl->WaitForVBlank(This); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_TakeOwnership(IDXGIOutput1* This,IUnknown *device,WINBOOL exclusive) { ++ return This->lpVtbl->TakeOwnership(This,device,exclusive); ++} ++static FORCEINLINE void IDXGIOutput1_ReleaseOwnership(IDXGIOutput1* This) { ++ This->lpVtbl->ReleaseOwnership(This); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetGammaControlCapabilities(IDXGIOutput1* This,DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps) { ++ return This->lpVtbl->GetGammaControlCapabilities(This,gamma_caps); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_SetGammaControl(IDXGIOutput1* This,const DXGI_GAMMA_CONTROL *gamma_control) { ++ return This->lpVtbl->SetGammaControl(This,gamma_control); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetGammaControl(IDXGIOutput1* This,DXGI_GAMMA_CONTROL *gamma_control) { ++ return This->lpVtbl->GetGammaControl(This,gamma_control); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_SetDisplaySurface(IDXGIOutput1* This,IDXGISurface *surface) { ++ return This->lpVtbl->SetDisplaySurface(This,surface); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplaySurfaceData(IDXGIOutput1* This,IDXGISurface *surface) { ++ return This->lpVtbl->GetDisplaySurfaceData(This,surface); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetFrameStatistics(IDXGIOutput1* This,DXGI_FRAME_STATISTICS *stats) { ++ return This->lpVtbl->GetFrameStatistics(This,stats); ++} ++/*** IDXGIOutput1 methods ***/ ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplayModeList1(IDXGIOutput1* This,DXGI_FORMAT format,UINT flags,UINT *mode_count,DXGI_MODE_DESC1 *desc) { ++ return This->lpVtbl->GetDisplayModeList1(This,format,flags,mode_count,desc); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_FindClosestMatchingMode1(IDXGIOutput1* This,const DXGI_MODE_DESC1 *mode,DXGI_MODE_DESC1 *closest_match,IUnknown *device) { ++ return This->lpVtbl->FindClosestMatchingMode1(This,mode,closest_match,device); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_GetDisplaySurfaceData1(IDXGIOutput1* This,IDXGIResource *resource) { ++ return This->lpVtbl->GetDisplaySurfaceData1(This,resource); ++} ++static FORCEINLINE HRESULT IDXGIOutput1_DuplicateOutput(IDXGIOutput1* This,IUnknown *device,IDXGIOutputDuplication **output) { ++ return This->lpVtbl->DuplicateOutput(This,device,output); ++} ++#endif ++#endif ++ ++#endif ++ ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_GetDisplayModeList1_Proxy( ++ IDXGIOutput1* This, ++ DXGI_FORMAT format, ++ UINT flags, ++ UINT *mode_count, ++ DXGI_MODE_DESC1 *desc); ++void __RPC_STUB IDXGIOutput1_GetDisplayModeList1_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_FindClosestMatchingMode1_Proxy( ++ IDXGIOutput1* This, ++ const DXGI_MODE_DESC1 *mode, ++ DXGI_MODE_DESC1 *closest_match, ++ IUnknown *device); ++void __RPC_STUB IDXGIOutput1_FindClosestMatchingMode1_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_GetDisplaySurfaceData1_Proxy( ++ IDXGIOutput1* This, ++ IDXGIResource *resource); ++void __RPC_STUB IDXGIOutput1_GetDisplaySurfaceData1_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE IDXGIOutput1_DuplicateOutput_Proxy( ++ IDXGIOutput1* This, ++ IUnknown *device, ++ IDXGIOutputDuplication **output); ++void __RPC_STUB IDXGIOutput1_DuplicateOutput_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __IDXGIOutput1_INTERFACE_DEFINED__ */ ++ + /* Begin additional prototypes for all interfaces */ + + +diff --git a/mingw-w64-headers/direct-x/include/dxgi1_2.idl b/mingw-w64-headers/direct-x/include/dxgi1_2.idl +index 92f9c0e..838521e 100644 +--- a/mingw-w64-headers/direct-x/include/dxgi1_2.idl ++++ b/mingw-w64-headers/direct-x/include/dxgi1_2.idl +@@ -1,5 +1,6 @@ + /* + * Copyright 2014 Jacek Caban for CodeWeavers ++ * Copyright 2015 Martell Malone + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -18,6 +19,114 @@ + + import "dxgi.idl"; + ++[ ++ object, ++ uuid(ea9dbf1a-c88e-4486-854a-98aa0138f30c), ++ local, ++ pointer_default(unique) ++] ++interface IDXGIDisplayControl : IUnknown ++{ ++ BOOL IsStereoEnabled(); ++ ++ void SetStereoEnabled( ++ BOOL enabled ++ ); ++} ++ ++typedef struct DXGI_OUTDUPL_MOVE_RECT ++{ ++ POINT SourcePoint; ++ RECT DestinationRect; ++} DXGI_OUTDUPL_MOVE_RECT; ++ ++typedef struct DXGI_OUTDUPL_DESC ++{ ++ DXGI_MODE_DESC ModeDesc; ++ DXGI_MODE_ROTATION Rotation; ++ BOOL DesktopImageInSystemMemory; ++} DXGI_OUTDUPL_DESC; ++ ++typedef struct DXGI_OUTDUPL_POINTER_POSITION ++{ ++ POINT Position; ++ BOOL Visible; ++} DXGI_OUTDUPL_POINTER_POSITION; ++ ++typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE ++{ ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2, ++ DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4 ++} DXGI_OUTDUPL_POINTER_SHAPE_TYPE; ++ ++typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO ++{ ++ UINT Type; ++ UINT Width; ++ UINT Height; ++ UINT Pitch; ++ POINT HotSpot; ++} DXGI_OUTDUPL_POINTER_SHAPE_INFO; ++ ++typedef struct DXGI_OUTDUPL_FRAME_INFO ++{ ++ LARGE_INTEGER LastPresentTime; ++ LARGE_INTEGER LastMouseUpdateTime; ++ UINT AccumulatedFrames; ++ BOOL RectsCoalesced; ++ BOOL ProtectedContentMaskedOut; ++ DXGI_OUTDUPL_POINTER_POSITION PointerPosition; ++ UINT TotalMetadataBufferSize; ++ UINT PointerShapeBufferSize; ++} DXGI_OUTDUPL_FRAME_INFO; ++ ++[ ++ object, ++ uuid(191cfac3-a341-470d-b26e-a864f428319c), ++ local, ++ pointer_default(unique) ++] ++interface IDXGIOutputDuplication : IDXGIObject ++{ ++ void GetDesc( ++ [out] DXGI_OUTDUPL_DESC *desc ++ ); ++ ++ HRESULT AcquireNextFrame( ++ [in] UINT timeout, ++ [out] DXGI_OUTDUPL_FRAME_INFO *frame_info, ++ [out] IDXGIResource **resource ++ ); ++ ++ HRESULT GetFrameDirtyRects( ++ [in] UINT dirty_size, ++ [out] RECT *buffer, ++ [out] UINT *buffer_size ++ ); ++ ++ HRESULT GetFrameMoveRects( ++ [in] UINT move_size, ++ [out] DXGI_OUTDUPL_MOVE_RECT *rect, ++ [out] UINT *rect_size ++ ); ++ ++ HRESULT GetFramePointerShape( ++ [in] UINT shape_size, ++ [out] void *buffer, ++ [out] UINT *buffer_size, ++ [out] DXGI_OUTDUPL_POINTER_SHAPE_INFO *shape_info ++ ); ++ ++ HRESULT MapDesktopSurface( ++ [out] DXGI_MAPPED_RECT *rect ++ ); ++ ++ HRESULT UnMapDesktopSurface(); ++ ++ HRESULT ReleaseFrame(); ++} ++ + typedef enum _DXGI_OFFER_RESOURCE_PRIORITY { + DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, + DXGI_OFFER_RESOURCE_PRIORITY_NORMAL, +@@ -232,3 +341,45 @@ interface IDXGIAdapter2 : IDXGIAdapter1 + { + HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc); + } ++ ++typedef struct DXGI_MODE_DESC1 ++{ ++ UINT Width; ++ UINT Height; ++ DXGI_RATIONAL RefreshRate; ++ DXGI_FORMAT Format; ++ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; ++ DXGI_MODE_SCALING Scaling; ++ BOOL Stereo; ++} DXGI_MODE_DESC1; ++ ++[ ++ object, ++ uuid(00cddea8-939b-4b83-a340-a685226666cc), ++ local, ++ pointer_default(unique) ++] ++interface IDXGIOutput1 : IDXGIOutput ++{ ++ HRESULT GetDisplayModeList1( ++ [in] DXGI_FORMAT format, ++ [in] UINT flags, ++ [in, out] UINT *mode_count, ++ [out] DXGI_MODE_DESC1 *desc ++ ); ++ ++ HRESULT FindClosestMatchingMode1( ++ [in] const DXGI_MODE_DESC1 *mode, ++ [out] DXGI_MODE_DESC1 *closest_match, ++ [in] IUnknown *device ++ ); ++ ++ HRESULT GetDisplaySurfaceData1( ++ [in] IDXGIResource *resource ++ ); ++ ++ HRESULT DuplicateOutput( ++ [in] IUnknown *device, ++ [out] IDXGIOutputDuplication **output ++ ); ++} +-- +2.4.5 + diff --git a/mingw-w64-headers-git/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch b/mingw-w64-headers-git/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch new file mode 100644 index 0000000000..4967bbbc4f --- /dev/null +++ b/mingw-w64-headers-git/0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch @@ -0,0 +1,46 @@ +From 72fea0e0d302849b000e89dd9884661aa80f27dd Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 16 Feb 2015 23:40:12 +0000 +Subject: [PATCH 4/6] d3d11: Add missing d3d11 1.1 structs and interfaces + +--- + mingw-w64-headers/direct-x/include/d3d11_1.h | 5 +++++ + mingw-w64-headers/direct-x/include/d3d11_1.idl | 6 ++++++ + 2 files changed, 11 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/d3d11_1.h b/mingw-w64-headers/direct-x/include/d3d11_1.h +index 51ca735..2460b3d 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11_1.h ++++ b/mingw-w64-headers/direct-x/include/d3d11_1.h +@@ -59,6 +59,11 @@ typedef interface ID3D11Device1 ID3D11Device1; + extern "C" { + #endif + ++typedef enum D3D11_COPY_FLAGS { ++ D3D11_COPY_NO_OVERWRITE = 0x1, ++ D3D11_COPY_DISCARD = 0x2 ++} D3D11_COPY_FLAGS; ++ + typedef enum D3D11_LOGIC_OP { + D3D11_LOGIC_OP_CLEAR = 0, + D3D11_LOGIC_OP_SET = 1, +diff --git a/mingw-w64-headers/direct-x/include/d3d11_1.idl b/mingw-w64-headers/direct-x/include/d3d11_1.idl +index 1a46abf..319d522 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11_1.idl ++++ b/mingw-w64-headers/direct-x/include/d3d11_1.idl +@@ -22,6 +22,12 @@ import "dxgi1_2.idl"; + import "d3dcommon.idl"; + import "d3d11.idl"; + ++typedef enum D3D11_COPY_FLAGS ++{ ++ D3D11_COPY_NO_OVERWRITE = 0x1, ++ D3D11_COPY_DISCARD = 0x2, ++} D3D11_COPY_FLAGS; ++ + typedef enum D3D11_LOGIC_OP { + D3D11_LOGIC_OP_CLEAR = 0, + D3D11_LOGIC_OP_SET, +-- +2.4.5 + diff --git a/mingw-w64-headers-git/0006-Add-d3d11-video-context.patch b/mingw-w64-headers-git/0006-Add-d3d11-video-context.patch new file mode 100644 index 0000000000..beab74c429 --- /dev/null +++ b/mingw-w64-headers-git/0006-Add-d3d11-video-context.patch @@ -0,0 +1,385 @@ +From b952e857814e5cfe766626573e2f056ed91ceb09 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sun, 14 Jun 2015 21:07:03 +0100 +Subject: [PATCH 6/6] Add d3d11 video context + +--- + mingw-w64-headers/direct-x/include/d3d11.h | 259 +++++++++++++++++++++++++++ + mingw-w64-headers/direct-x/include/d3d11.idl | 66 ++++++ + 2 files changed, 325 insertions(+) + +diff --git a/mingw-w64-headers/direct-x/include/d3d11.h b/mingw-w64-headers/direct-x/include/d3d11.h +index e49fd99..834a536 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11.h ++++ b/mingw-w64-headers/direct-x/include/d3d11.h +@@ -21,6 +21,11 @@ + #define __ID3D11DeviceChild_FWD_DEFINED__ + typedef interface ID3D11DeviceChild ID3D11DeviceChild; + #endif ++ ++#ifndef __ID3D11VideoContext_FWD_DEFINED__ ++#define __ID3D11VideoContext_FWD_DEFINED__ ++typedef interface ID3D11VideoContext ID3D11VideoContext; ++#endif + + #ifndef __ID3D11Asynchronous_FWD_DEFINED__ + #define __ID3D11Asynchronous_FWD_DEFINED__ +@@ -1366,6 +1366,38 @@ + USHORT ConfigMinRenderTargetBuffCount; + USHORT ConfigDecoderSpecific; + } D3D11_VIDEO_DECODER_CONFIG; ++typedef enum D3D11_VIDEO_DECODER_BUFFER_TYPE { ++ D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, ++ D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1, ++ D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2, ++ D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3, ++ D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4, ++ D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5, ++ D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6, ++ D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7, ++ D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8 ++} D3D11_VIDEO_DECODER_BUFFER_TYPE; ++typedef struct D3D11_ENCRYPTED_BLOCK_INFO { ++ UINT NumEncryptedBytesAtBeginning; ++ UINT NumBytesInSkipPattern; ++ UINT NumBytesInEncryptPattern; ++} D3D11_ENCRYPTED_BLOCK_INFO; ++typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC { ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType; ++ UINT BufferIndex; ++ UINT DataOffset; ++ UINT DataSize; ++ UINT FirstMBaddress; ++ UINT NumMBsInBuffer; ++ UINT Width; ++ UINT Height; ++ UINT Stride; ++ UINT ReservedBits; ++ void *pIV; ++ UINT IVSize; ++ WINBOOL PartialEncryption; ++ D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo; ++} D3D11_VIDEO_DECODER_BUFFER_DESC; + typedef enum D3D11_VIDEO_FRAME_FORMAT { + D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0, + D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1, +@@ -8514,6 +8514,233 @@ + DWORD* pdwStubPhase); + + #endif /* __ID3D11VideoDecoder_INTERFACE_DEFINED__ */ ++ ++/***************************************************************************** ++ * ID3D11VideoContext interface ++ */ ++#ifndef __ID3D11VideoContext_INTERFACE_DEFINED__ ++#define __ID3D11VideoContext_INTERFACE_DEFINED__ ++ ++DEFINE_GUID(IID_ID3D11VideoContext, 0x61f21c45, 0x3c0e, 0x4a74, 0x9c,0xea, 0x67,0x10,0x0d,0x9a,0xd5,0xe4); ++#if defined(__cplusplus) && !defined(CINTERFACE) ++MIDL_INTERFACE("61f21c45-3c0e-4a74-9cea-67100d9ad5e4") ++ID3D11VideoContext : public ID3D11DeviceChild ++{ ++ virtual HRESULT STDMETHODCALLTYPE GetDecoderBuffer( ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ UINT *pBufferSize, ++ void **ppBuffer) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE ReleaseDecoderBuffer( ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE DecoderBeginFrame( ++ ID3D11VideoDecoder *pDecoder, ++ ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ UINT ContentKeySize, ++ const void *pContentKey) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE DecoderEndFrame( ++ ID3D11VideoDecoder *pDecoder) = 0; ++ ++ virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers( ++ ID3D11VideoDecoder *pDecoder, ++ UINT NumBuffers, ++ const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc) = 0; ++ ++}; ++#ifdef __CRT_UUID_DECL ++__CRT_UUID_DECL(ID3D11VideoContext, 0x61f21c45, 0x3c0e, 0x4a74, 0x9c,0xea, 0x67,0x10,0x0d,0x9a,0xd5,0xe4) ++#endif ++#else ++typedef struct ID3D11VideoContextVtbl { ++ BEGIN_INTERFACE ++ ++ /*** IUnknown methods ***/ ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ++ ID3D11VideoContext* This, ++ REFIID riid, ++ void **ppvObject); ++ ++ ULONG (STDMETHODCALLTYPE *AddRef)( ++ ID3D11VideoContext* This); ++ ++ ULONG (STDMETHODCALLTYPE *Release)( ++ ID3D11VideoContext* This); ++ ++ /*** ID3D11DeviceChild methods ***/ ++ void (STDMETHODCALLTYPE *GetDevice)( ++ ID3D11VideoContext* This, ++ ID3D11Device **ppDevice); ++ ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( ++ ID3D11VideoContext* This, ++ REFGUID guid, ++ UINT *pDataSize, ++ void *pData); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( ++ ID3D11VideoContext* This, ++ REFGUID guid, ++ UINT DataSize, ++ const void *pData); ++ ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( ++ ID3D11VideoContext* This, ++ REFGUID guid, ++ const IUnknown *pData); ++ ++ /*** ID3D11VideoContext methods ***/ ++ HRESULT (STDMETHODCALLTYPE *GetDecoderBuffer)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ UINT *pBufferSize, ++ void **ppBuffer); ++ ++ HRESULT (STDMETHODCALLTYPE *ReleaseDecoderBuffer)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType); ++ ++ HRESULT (STDMETHODCALLTYPE *DecoderBeginFrame)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ UINT ContentKeySize, ++ const void *pContentKey); ++ ++ HRESULT (STDMETHODCALLTYPE *DecoderEndFrame)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder); ++ ++ HRESULT (STDMETHODCALLTYPE *SubmitDecoderBuffers)( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ UINT NumBuffers, ++ const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); ++ ++ END_INTERFACE ++} ID3D11VideoContextVtbl; ++interface ID3D11VideoContext { ++ CONST_VTBL ID3D11VideoContextVtbl* lpVtbl; ++}; ++ ++#ifdef COBJMACROS ++#ifndef WIDL_C_INLINE_WRAPPERS ++/*** IUnknown methods ***/ ++#define ID3D11VideoContext_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) ++#define ID3D11VideoContext_AddRef(This) (This)->lpVtbl->AddRef(This) ++#define ID3D11VideoContext_Release(This) (This)->lpVtbl->Release(This) ++/*** ID3D11DeviceChild methods ***/ ++#define ID3D11VideoContext_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice) ++#define ID3D11VideoContext_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData) ++#define ID3D11VideoContext_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData) ++#define ID3D11VideoContext_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData) ++/*** ID3D11VideoContext methods ***/ ++#define ID3D11VideoContext_GetDecoderBuffer(This,pDecoder,BufferType,pBufferSize,ppBuffer) (This)->lpVtbl->GetDecoderBuffer(This,pDecoder,BufferType,pBufferSize,ppBuffer) ++#define ID3D11VideoContext_ReleaseDecoderBuffer(This,pDecoder,BufferType) (This)->lpVtbl->ReleaseDecoderBuffer(This,pDecoder,BufferType) ++#define ID3D11VideoContext_DecoderBeginFrame(This,pDecoder,pVideoDecoderOutputView,ContentKeySize,pContentKey) (This)->lpVtbl->DecoderBeginFrame(This,pDecoder,pVideoDecoderOutputView,ContentKeySize,pContentKey) ++#define ID3D11VideoContext_DecoderEndFrame(This,pDecoder) (This)->lpVtbl->DecoderEndFrame(This,pDecoder) ++#define ID3D11VideoContext_SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) (This)->lpVtbl->SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc) ++#else ++/*** IUnknown methods ***/ ++static FORCEINLINE HRESULT ID3D11VideoContext_QueryInterface(ID3D11VideoContext* This,REFIID riid,void **ppvObject) { ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); ++} ++static FORCEINLINE ULONG ID3D11VideoContext_AddRef(ID3D11VideoContext* This) { ++ return This->lpVtbl->AddRef(This); ++} ++static FORCEINLINE ULONG ID3D11VideoContext_Release(ID3D11VideoContext* This) { ++ return This->lpVtbl->Release(This); ++} ++/*** ID3D11DeviceChild methods ***/ ++static FORCEINLINE void ID3D11VideoContext_GetDevice(ID3D11VideoContext* This,ID3D11Device **ppDevice) { ++ This->lpVtbl->GetDevice(This,ppDevice); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_GetPrivateData(ID3D11VideoContext* This,REFGUID guid,UINT *pDataSize,void *pData) { ++ return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_SetPrivateData(ID3D11VideoContext* This,REFGUID guid,UINT DataSize,const void *pData) { ++ return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_SetPrivateDataInterface(ID3D11VideoContext* This,REFGUID guid,const IUnknown *pData) { ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,pData); ++} ++/*** ID3D11VideoContext methods ***/ ++static FORCEINLINE HRESULT ID3D11VideoContext_GetDecoderBuffer(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType,UINT *pBufferSize,void **ppBuffer) { ++ return This->lpVtbl->GetDecoderBuffer(This,pDecoder,BufferType,pBufferSize,ppBuffer); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_ReleaseDecoderBuffer(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType) { ++ return This->lpVtbl->ReleaseDecoderBuffer(This,pDecoder,BufferType); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_DecoderBeginFrame(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,ID3D11VideoDecoderOutputView *pVideoDecoderOutputView,UINT ContentKeySize,const void *pContentKey) { ++ return This->lpVtbl->DecoderBeginFrame(This,pDecoder,pVideoDecoderOutputView,ContentKeySize,pContentKey); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_DecoderEndFrame(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder) { ++ return This->lpVtbl->DecoderEndFrame(This,pDecoder); ++} ++static FORCEINLINE HRESULT ID3D11VideoContext_SubmitDecoderBuffers(ID3D11VideoContext* This,ID3D11VideoDecoder *pDecoder,UINT NumBuffers,const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc) { ++ return This->lpVtbl->SubmitDecoderBuffers(This,pDecoder,NumBuffers,pBufferDesc); ++} ++#endif ++#endif ++ ++#endif ++ ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_GetDecoderBuffer_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ UINT *pBufferSize, ++ void **ppBuffer); ++void __RPC_STUB ID3D11VideoContext_GetDecoderBuffer_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_ReleaseDecoderBuffer_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType); ++void __RPC_STUB ID3D11VideoContext_ReleaseDecoderBuffer_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderBeginFrame_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ UINT ContentKeySize, ++ const void *pContentKey); ++void __RPC_STUB ID3D11VideoContext_DecoderBeginFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderEndFrame_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder); ++void __RPC_STUB ID3D11VideoContext_DecoderEndFrame_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++HRESULT STDMETHODCALLTYPE ID3D11VideoContext_SubmitDecoderBuffers_Proxy( ++ ID3D11VideoContext* This, ++ ID3D11VideoDecoder *pDecoder, ++ UINT NumBuffers, ++ const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); ++void __RPC_STUB ID3D11VideoContext_SubmitDecoderBuffers_Stub( ++ IRpcStubBuffer* This, ++ IRpcChannelBuffer* pRpcChannelBuffer, ++ PRPC_MESSAGE pRpcMessage, ++ DWORD* pdwStubPhase); ++ ++#endif /* __ID3D11VideoContext_INTERFACE_DEFINED__ */ + + /***************************************************************************** + * ID3D11VideoProcessorEnumerator interface +diff --git a/mingw-w64-headers/direct-x/include/d3d11.idl b/mingw-w64-headers/direct-x/include/d3d11.idl +index 59beafb..cfae7c8 100644 +--- a/mingw-w64-headers/direct-x/include/d3d11.idl ++++ b/mingw-w64-headers/direct-x/include/d3d11.idl +@@ -1246,6 +1246,44 @@ + USHORT ConfigMinRenderTargetBuffCount; + USHORT ConfigDecoderSpecific; + } D3D11_VIDEO_DECODER_CONFIG; ++ ++typedef enum D3D11_VIDEO_DECODER_BUFFER_TYPE ++{ ++ D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, ++ D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL, ++ D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE, ++ D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL, ++ D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX, ++ D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL, ++ D3D11_VIDEO_DECODER_BUFFER_BITSTREAM, ++ D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR, ++ D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN ++} D3D11_VIDEO_DECODER_BUFFER_TYPE; ++ ++typedef struct D3D11_ENCRYPTED_BLOCK_INFO ++{ ++ UINT NumEncryptedBytesAtBeginning; ++ UINT NumBytesInSkipPattern; ++ UINT NumBytesInEncryptPattern; ++} D3D11_ENCRYPTED_BLOCK_INFO; ++ ++typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC ++{ ++ D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType; ++ UINT BufferIndex; ++ UINT DataOffset; ++ UINT DataSize; ++ UINT FirstMBaddress; ++ UINT NumMBsInBuffer; ++ UINT Width; ++ UINT Height; ++ UINT Stride; ++ UINT ReservedBits; ++ void *pIV; ++ UINT IVSize; ++ BOOL PartialEncryption; ++ D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo; ++} D3D11_VIDEO_DECODER_BUFFER_DESC; + + typedef enum D3D11_VIDEO_FRAME_FORMAT + { +@@ -2286,6 +2286,34 @@ + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc); + } + ++[ ++ object, ++ local, ++ uuid(61f21c45-3c0e-4a74-9cea-67100d9ad5e4) ++] ++interface ID3D11VideoContext : ID3D11DeviceChild ++{ ++ HRESULT GetDecoderBuffer( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType, ++ [out] UINT *pBufferSize, ++ [out] void **ppBuffer); ++ HRESULT ReleaseDecoderBuffer( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType); ++ HRESULT DecoderBeginFrame( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] ID3D11VideoDecoderOutputView *pVideoDecoderOutputView, ++ [in] UINT ContentKeySize, ++ [in] const void *pContentKey); ++ HRESULT DecoderEndFrame( ++ [in] ID3D11VideoDecoder *pDecoder); ++ HRESULT SubmitDecoderBuffers( ++ [in] ID3D11VideoDecoder *pDecoder, ++ [in] UINT NumBuffers, ++ [in] const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc); ++} ++ + [ + object, + uuid(10ec4d5b-975a-4689-b9e4-d0aac30fe333), +-- +2.4.5 diff --git a/mingw-w64-headers-git/PKGBUILD b/mingw-w64-headers-git/PKGBUILD index 98d122de6c..e238af64c6 100644 --- a/mingw-w64-headers-git/PKGBUILD +++ b/mingw-w64-headers-git/PKGBUILD @@ -1,42 +1,63 @@ # Maintainer: Alexey Pavlov _realname=headers +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -replaces="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") pkgdesc="MinGW-w64 headers for Windows" -_ver_base=4.0.0 -pkgver=4.0.0.4336.6a4cb01 +pkgver=5.0.0.4598.fc005cd pkgrel=1 arch=('any') url="http://mingw-w64.sourceforge.net" license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain" "${MINGW_PACKAGE_PREFIX}") -makedepends=('git') +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +makedepends=('git' "${MINGW_PACKAGE_PREFIX}-tools") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('!strip' '!libtool' '!emptydirs') -source=("${_realname}"::"git://git.code.sf.net/p/mingw-w64/mingw-w64") -md5sums=('SKIP') +source=("mingw-w64"::"git://git.code.sf.net/p/mingw-w64/mingw-w64" + "0002-dxgi-Add-interface-for-IDXGISurface1.patch" + "0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch" + "0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch" + "0006-Add-d3d11-video-context.patch") +md5sums=('SKIP' + 'ada92acb4a3939bcede26298adc0a5d0' + 'b664667ec276614e62e4ea289c79c4b1' + '79bb56620aaef710ef1d73415dc5bc13' + '6bc79f1f64b8dddd4007c3ddd20c2df4') pkgver() { - cd "$srcdir/$_realname" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/mingw-w64" + local _major=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MAJOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _minor=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MINOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _rev=0 + printf "%s.%s.%s.%s.%s" ${_major} ${_minor} ${_rev} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd ${srcdir}/${_realname} + cd ${srcdir}/mingw-w64 + + git am "${srcdir}/"0002-dxgi-Add-interface-for-IDXGISurface1.patch + git am "${srcdir}/"0003-dxgi-Add-missing-dxgi-1.2-structs-and-interfaces.patch + git am "${srcdir}/"0004-d3d11-Add-missing-d3d11-1.1-structs-and-interfaces.patch + git am "${srcdir}/"0006-Add-d3d11-video-context.patch + + cd ${srcdir}/mingw-w64/mingw-w64-headers + touch include/windows.*.h include/wincrypt.h include/prsht.h } build() { msg "Configuring ${MINGW_CHOST} headers" + [[ -d ${srcdir}/headers-${MINGW_CHOST} ]] && rm -rf ${srcdir}/headers-${MINGW_CHOST} mkdir -p ${srcdir}/headers-${MINGW_CHOST} && cd ${srcdir}/headers-${MINGW_CHOST} - ${srcdir}/${_realname}/mingw-w64-headers/configure \ + ${srcdir}/mingw-w64/mingw-w64-headers/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX}/${MINGW_CHOST} \ --enable-sdk=all \ - --enable-secure-api + --enable-secure-api \ + --enable-idl --without-widl } package() { @@ -49,7 +70,7 @@ package() { rm ${pkgdir}${MINGW_PREFIX}/${MINGW_CHOST}/include/pthread_unistd.h msg "Installing MinGW-w64 licenses" - install -Dm644 ${srcdir}/${_realname}/mingw-w64-headers/ddk/readme.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${pkgname}/ddk-readme.txt - install -Dm644 ${srcdir}/${_realname}/mingw-w64-headers/direct-x/COPYING.LIB ${pkgdir}${MINGW_PREFIX}/share/licenses/${pkgname}/direct-x-COPYING.LIB - install -Dm644 ${srcdir}/${_realname}/mingw-w64-headers/direct-x/readme.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${pkgname}/direct-x-readme.txt + install -Dm644 ${srcdir}/mingw-w64/mingw-w64-headers/ddk/readme.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/ddk-readme.txt + install -Dm644 ${srcdir}/mingw-w64/mingw-w64-headers/direct-x/COPYING.LIB ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/direct-x-COPYING.LIB + install -Dm644 ${srcdir}/mingw-w64/mingw-w64-headers/direct-x/readme.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/direct-x-readme.txt } diff --git a/mingw-w64-hicolor-icon-theme/PKGBUILD b/mingw-w64-hicolor-icon-theme/PKGBUILD index 77153158cd..6a31fdd0da 100644 --- a/mingw-w64-hicolor-icon-theme/PKGBUILD +++ b/mingw-w64-hicolor-icon-theme/PKGBUILD @@ -1,30 +1,34 @@ # Maintainer: Alexey Pavlov _realname=hicolor-icon-theme - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.13 -pkgrel=1 +pkgver=0.15 +pkgrel=2 pkgdesc="Freedesktop.org Hicolor icon theme (mingw-w64)" arch=('any') url="http://icon-theme.freedesktop.org/wiki/HicolorTheme" license=("GPL2") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=() -options=(!libtool strip staticlibs) -source=("http://icon-theme.freedesktop.org/releases/${_realname}-${pkgver}.tar.gz") -md5sums=('21d0f50aa6b8eef02846cda9e5e9324c') +install=${_realname}-${CARCH}.install +options=('!libtool' 'strip' 'staticlibs') +source=("http://icon-theme.freedesktop.org/releases/${_realname}-${pkgver}.tar.xz") +md5sums=('6aa2b3993a883d85017c7cc0cfc0fb73') build() { - cd ${srcdir}/${_realname}-${pkgver} - ./configure \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } package() { - cd "${srcdir}/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}"/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING } diff --git a/mingw-w64-hicolor-icon-theme/hicolor-icon-theme-i686.install b/mingw-w64-hicolor-icon-theme/hicolor-icon-theme-i686.install new file mode 100644 index 0000000000..1220dd8c40 --- /dev/null +++ b/mingw-w64-hicolor-icon-theme/hicolor-icon-theme-i686.install @@ -0,0 +1,21 @@ +post_install() { + [[ -f mingw32/bin/gtk-update-icon-cache.exe ]] && { + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor + } + [[ -f mingw32/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/hicolor + } + [[ -f mingw32/bin/gdk-pixbuf-query-loaders.exe ]] && { + mingw32/bin/gdk-pixbuf-query-loaders.exe --update-cache + } + + return 0 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-hicolor-icon-theme/hicolor-icon-theme-x86_64.install b/mingw-w64-hicolor-icon-theme/hicolor-icon-theme-x86_64.install new file mode 100644 index 0000000000..6a93522e78 --- /dev/null +++ b/mingw-w64-hicolor-icon-theme/hicolor-icon-theme-x86_64.install @@ -0,0 +1,21 @@ +post_install() { + [[ -f mingw64/bin/gtk-update-icon-cache.exe ]] && { + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor + } + [[ -f mingw64/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/hicolor + } + [[ -f mingw64/bin/gdk-pixbuf-query-loaders.exe ]] && { + mingw64/bin/gdk-pixbuf-query-loaders.exe --update-cache + } + + return 0 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-hidapi/PKGBUILD b/mingw-w64-hidapi/PKGBUILD index fafb886b2f..558bee415f 100644 --- a/mingw-w64-hidapi/PKGBUILD +++ b/mingw-w64-hidapi/PKGBUILD @@ -1,11 +1,10 @@ # Maintainer: Alexey Pavlov _realname=hidapi - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" _pre=rc1 pkgver=0.8.0${_pre} -pkgrel=1 +pkgrel=3 pkgdesc="Library for communicating with USB and Bluetooth HID devices (mingw-w64)" arch=('any') url="http://www.signal11.us/oss/hidapi/" @@ -29,13 +28,12 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --disable-static \ + --enable-static \ --disable-testgui make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - #rm -r "$pkgdir/usr/${_arch}/share" + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-hlsl2glsl/0001-CMakeLists.txt-Fixes-and-improvements.patch b/mingw-w64-hlsl2glsl/0001-CMakeLists.txt-Fixes-and-improvements.patch new file mode 100644 index 0000000000..1f2ae7fe00 --- /dev/null +++ b/mingw-w64-hlsl2glsl/0001-CMakeLists.txt-Fixes-and-improvements.patch @@ -0,0 +1,203 @@ +From 5ad09d0e13c80d3987eb5f27040384c39390a7d0 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Thu, 12 Dec 2013 16:52:29 +0000 +Subject: [PATCH 1/4] CMakeLists.txt: Fixes and improvements + +1. main.cpp doesn't exist anymore. +2. hlslang_tab.cpp is now Gen_hlslang_tab.cpp. +3. Remove redundancy in bison and flex execution. +4. Use find_package() to locate them if !windows. +--- + CMakeLists.txt | 137 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 68 insertions(+), 69 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f159a1d..dc30cd5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,6 @@ set(MACHINE_INDEPENDENT_FILES + hlslang/MachineIndependent/intermOut.cpp + hlslang/MachineIndependent/IntermTraverse.cpp + hlslang/MachineIndependent/localintermediate.h +- #hlslang/MachineIndependent/parseConst.cpp + hlslang/MachineIndependent/ParseHelper.cpp + hlslang/MachineIndependent/ParseHelper.h + hlslang/MachineIndependent/PoolAlloc.cpp +@@ -92,9 +91,9 @@ endif () + + + set(MACHINE_INDEPENDENT_GENERATED_SOURCE_FILES +- ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/Gen_hlslang.cpp +- ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/hlslang_tab.cpp +- ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/hlslang_tab.h ++ hlslang/MachineIndependent/Gen_hlslang.cpp ++ hlslang/MachineIndependent/Gen_hlslang_tab.cpp ++ hlslang/MachineIndependent/hlslang_tab.h + ) + + SET_SOURCE_FILES_PROPERTIES(${MACHINE_INDEPENDENT_GENERATED_SOURCE_FILES} PROPERTIES +@@ -107,62 +106,26 @@ source_group("Machine Independent\\Generated Source" FILES ${MACHINE_INDEPENDENT + # Add system specific settings + if (WIN32) + set(OSDEPENDENT_FILES +- hlslang/OSDependent/Windows/main.cpp + hlslang/OSDependent/Windows/osinclude.h + hlslang/OSDependent/Windows/ossource.cpp + ) + source_group("OSDependent\\Windows" FILES ${OSDEPENDENT_FILES}) +- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/hlslang/OSDependent/Windows) ++ include_directories(hlslang/OSDependent/Windows) + +- add_custom_command(OUTPUT hlslang/MachineIndependent/Gen_hlslang_tab.cpp hlslang/MachineIndependent/hlslang_tab.h +- COMMAND set ARGS "BISON_SIMPLE=../../tools/bison.simple" +- COMMAND set ARGS "BISON_HAIRY=../../tools/bison.simple" +- COMMAND ../../tools/bison.exe ARGS -d -t -v hlslang.y +- COMMAND copy ARGS /y hlslang_tab.c Gen_hlslang_tab.cpp +- COMMAND del ARGS hlslang_tab.c +- COMMAND del ARGS hlslang.output +- MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.y +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent +- COMMENT "Executing Bison on hlslang.y" +- ) +- +- add_custom_command(OUTPUT hlslang/MachineIndependent/Gen_hlslang.cpp +- COMMAND ../../tools/flex.exe ARGS hlslang.l +- MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.l +- DEPENDS hlslang/MachineIndependent/hlslang_tab.h +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent +- COMMENT "Executing flex on hlslang.l" +- ) +- +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D\"_HAS_ITERATOR_DEBUGGING=0\" /D\"_SECURE_SCL=0\" /D\"_CRT_SECURE_NO_WARNINGS\"") +- SET(TEST_LIBS opengl32.lib) ++ IF (MSVC) ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D\"_HAS_ITERATOR_DEBUGGING=0\" /D\"_SECURE_SCL=0\" /D\"_CRT_SECURE_NO_WARNINGS\"") ++ ENDIF (MSVC) ++ SET(TEST_LIBS opengl32 gdi32 user32) + elseif (APPLE) + set(OSDEPENDENT_FILES + hlslang/OSDependent/Mac/osinclude.h + hlslang/OSDependent/Mac/ossource.cpp + ) + source_group("OSDependent\\Mac" FILES ${OSDEPENDENT_FILES}) +- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/hlslang/OSDependent/Mac) +- +- add_custom_command(OUTPUT hlslang/MachineIndependent/Gen_hlslang_tab.cpp hlslang/MachineIndependent/hlslang_tab.h +- COMMAND set ARGS "BISON_SIMPLE=../../tools/bison.simple" +- COMMAND set ARGS "BISON_HAIRY=../../tools/bison.simple" +- COMMAND bison ARGS -o hlslang_tab.cpp -d -t -v hlslang.y +- COMMAND mv hlslang_tab.hpp hlslang_tab.h +- MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.y +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent +- COMMENT "Executing Bison on hlslang.y" +- ) +- +- add_custom_command(OUTPUT hlslang/MachineIndependent/Gen_hlslang.cpp +- COMMAND flex ARGS hlslang.l +- MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.l +- DEPENDS hlslang/MachineIndependent/hlslang_tab.h +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent +- COMMENT "Executing flex on hlslang.l" +- ) ++ include_directories(hlslang/OSDependent/Mac) ++ + FIND_LIBRARY(OPENGL_LIBRARY OpenGL) +- FIND_LIBRARY(COCOA_LIBRARY Cocoa) ++ FIND_LIBRARY(COCOA_LIBRARY Cocoa) + SET(TEST_LIBS ${OPENGL_LIBRARY} ${COCOA_LIBRARY}) + elseif (UNIX) + set(OSDEPENDENT_FILES +@@ -170,33 +133,69 @@ elseif (UNIX) + hlslang/OSDependent/Linux/ossource.cpp + ) + source_group("OSDependent\\Linux" FILES ${OSDEPENDENT_FILES}) +- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/hlslang/OSDependent/Linux) +- +- add_custom_command(OUTPUT hlslang/MachineIndependent/hlslang_tab.cpp hlslang/MachineIndependent/hlslang_tab.h +- COMMAND set ARGS "BISON_SIMPLE=../../tools/bison.simple" +- COMMAND set ARGS "BISON_HAIRY=../../tools/bison.simple" +- COMMAND bison ARGS -o hlslang_tab.cpp -d -t -v hlslang.y +- COMMAND mv hlslang_tab.hpp hlslang_tab.h +- MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.y +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent +- COMMENT "Executing Bison on hlslang.y" +- ) +- +- add_custom_command(OUTPUT hlslang/MachineIndependent/Gen_hlslang.cpp +- COMMAND flex ARGS hlslang.l +- MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.l +- DEPENDS hlslang/MachineIndependent/hlslang_tab.h +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent +- COMMENT "Executing flex on hlslang.l" +- ) ++ include_directories(hlslang/OSDependent/Linux) ++ + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb") + SET(TEST_LIBS GL glut GLEW pthread) + endif () + ++# Bison reads two environment variables at build-time (BISON_SIMPLE and BISON_HAIRY): ++# ++# http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_get_or_set_environment_variables.3F ++# "Also, environment variables SET in the CMakeLists.txt only take effect for cmake ++# itself (configure-time), so you cannot use this method to set an environment variable ++# that a custom command might need (build-time). Barring environment variable support ++# by various CMake commands (e.g. add_custom_command(), currently not supported yet), ++# an acceptable workaround may be to invoke shell scripts instead which wrap the ++# commands to be executed." ++# ++# So making that work for both batch files and shell: ++# ++# To be precise, here we want to check for batch file ++# execution rather than that we're using the MSVC IDE ++# or are generating "MinGW Makefiles". ++# ++if ((MSVC_IDE) OR (${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles")) ++ SET(SETENV "set") ++ SET(CONTINUATION &) ++else () ++ SET(SETENV) ++ SET(CONTINUATION) ++endif () ++ ++set(ENV{BISON_SIMPLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/bison.simple) ++set(ENV{BISON_HAIRY} ${CMAKE_CURRENT_SOURCE_DIR}/tools/bison.simple) ++ ++if (WIN32) ++ set(BISON_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/tools/bin/bison.exe) ++ set(FLEX_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/tools/flex.exe) ++else () ++ find_package(BISON REQUIRED) ++ find_package(FLEX REQUIRED) ++endif () ++ ++add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/Gen_hlslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/hlslang_tab.h ++ COMMAND ${SETENV} BISON_SIMPLE=${CMAKE_CURRENT_SOURCE_DIR}/tools/bison.simple ${CONTINUATION} ++ ${SETENV} BISON_HAIRY=${CMAKE_CURRENT_SOURCE_DIR}/tools/bison.simple ${CONTINUATION} ++ ${BISON_EXECUTABLE} ARGS -o hlslang_tab.c -d -t -v hlslang.y ++ COMMAND ${CMAKE_COMMAND} -E copy_if_different hlslang_tab.c Gen_hlslang_tab.cpp ++ COMMAND ${CMAKE_COMMAND} -E remove -f hlslang_tab.c hlslang.output ++ MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.y ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent ++ COMMENT "Executing Bison on hlslang.y" ++ ) ++ ++add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/Gen_hlslang.cpp ++ COMMAND ${FLEX_EXECUTABLE} ARGS hlslang.l ++ MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.l ++ DEPENDS hlslang/MachineIndependent/hlslang_tab.h ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent ++ COMMENT "Executing flex on hlslang.l" ++ ) + + include_directories( +- ${CMAKE_CURRENT_SOURCE_DIR}/hlslang +- ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent ++ hlslang ++ hlslang/MachineIndependent + ) + + add_library(hlsl2glsl +-- +2.5.0 + diff --git a/mingw-w64-hlsl2glsl/0001-Fix-CMakeLists.txt.patch b/mingw-w64-hlsl2glsl/0001-Fix-CMakeLists.txt.patch deleted file mode 100644 index 5f0b3303df..0000000000 --- a/mingw-w64-hlsl2glsl/0001-Fix-CMakeLists.txt.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b0f01ad96a22924aca7ae8b2fc7deccfb041f922 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Thu, 12 Dec 2013 16:49:27 +0000 -Subject: [PATCH 1/3] Fix CMakeLists.txt - -main.cpp is gone and -hlslang_tab.cpp is Gen_hlslang_tab.cpp ---- - CMakeLists.txt | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5769d19..4f10b15 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -103,7 +103,7 @@ EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"") - - set(MACHINE_INDEPENDENT_GENERATED_SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/Gen_hlslang.cpp -- ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/hlslang_tab.cpp -+ ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/Gen_hlslang_tab.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent/hlslang_tab.h - ) - -@@ -117,7 +117,6 @@ source_group("Machine Independent\\Generated Source" FILES ${MACHINE_INDEPENDENT - # Add system specific settings - if (WIN32) - set(OSDEPENDENT_FILES -- hlslang/OSDependent/Windows/main.cpp - hlslang/OSDependent/Windows/osinclude.h - hlslang/OSDependent/Windows/ossource.cpp - ) --- -1.8.4.4 - diff --git a/mingw-w64-hlsl2glsl/0002-Fix-pool_allocator-compile-guards.patch b/mingw-w64-hlsl2glsl/0002-Fix-pool_allocator-compile-guards.patch new file mode 100644 index 0000000000..1384363f76 --- /dev/null +++ b/mingw-w64-hlsl2glsl/0002-Fix-pool_allocator-compile-guards.patch @@ -0,0 +1,40 @@ +From fae0caf73ff5e582e39ed8173b407d8a6a5cde3d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 22 Jul 2015 15:20:09 +0100 +Subject: [PATCH 2/4] Fix pool_allocator compile-guards + +With MinGW-w64 the template variant was not +defined. +--- + hlslang/Include/PoolAlloc.h | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/hlslang/Include/PoolAlloc.h b/hlslang/Include/PoolAlloc.h +index 3418c88..3312221 100644 +--- a/hlslang/Include/PoolAlloc.h ++++ b/hlslang/Include/PoolAlloc.h +@@ -140,18 +140,15 @@ public: + } + #endif + +-#if defined(_MSC_VER) && _MSC_VER >= 1300 + template ++#if defined(_MSC_VER) && _MSC_VER >= 1300 + #ifdef USING_SGI_STL + pool_allocator(const pool_allocator& p) /*: allocator(p.getAllocator())*/ { } + #else + pool_allocator(const pool_allocator& p) : allocator(&p.getAllocator()) { } + #endif +-#endif +- +-#ifndef _WIN32 +- template +- pool_allocator(const pool_allocator& p) : allocator(&p.getAllocator()) { } ++#else ++ pool_allocator(const pool_allocator& p) : allocator(&p.getAllocator()) { } + #endif + + #ifdef USING_SGI_STL +-- +2.5.0 + diff --git a/mingw-w64-hlsl2glsl/0002-Generalize-CMakeLists.txt-a-bit.patch b/mingw-w64-hlsl2glsl/0002-Generalize-CMakeLists.txt-a-bit.patch deleted file mode 100644 index 79b7b50011..0000000000 --- a/mingw-w64-hlsl2glsl/0002-Generalize-CMakeLists.txt-a-bit.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 5b677644f756c685d9c465aa57efc4f51e456b8a Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Thu, 12 Dec 2013 16:51:55 +0000 -Subject: [PATCH 2/3] Generalize CMakeLists.txt a bit .. - -.. so that it works with 'MSYS Makefiles' and -'MinGW Makefiles' generators. - -A warning was added about working around bison -needing BISON_SIMPLE env. var set at build time ---- - CMakeLists.txt | 28 ++++++++++++++++++++++------ - 1 file changed, 22 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4f10b15..dfffaa8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -120,6 +120,21 @@ if (WIN32) - hlslang/OSDependent/Windows/osinclude.h - hlslang/OSDependent/Windows/ossource.cpp - ) -+ -+ # The 'COMMAND set ..' doesn't work on MSYS or MinGW Makefiles because each -+ # command is executed in it's own shell. -+ IF ( MSYS ) -+ message( WARNING "You will probably need to use: -+'BISON_SIMPLE=${CMAKE_CURRENT_SOURCE_DIR}/tools/bison.simple ${CMAKE_MAKE_PROGRAM}' -+.. to build this on MSYS") -+ ENDIF ( MSYS ) -+ -+ IF ( MINGW ) -+ message( WARNING "You will probably need to use: -+'set \"BISON_SIMPLE=%CD%\\tools\\bison.simple\" & ${CMAKE_MAKE_PROGRAM}' -+.. to build this on MinGW") -+ ENDIF ( MINGW ) -+ - source_group("OSDependent\\Windows" FILES ${OSDEPENDENT_FILES}) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/hlslang/OSDependent/Windows) - -@@ -127,9 +142,8 @@ if (WIN32) - COMMAND set ARGS "BISON_SIMPLE=../../tools/bison.simple" - COMMAND set ARGS "BISON_HAIRY=../../tools/bison.simple" - COMMAND ../../tools/bison.exe ARGS -d -t -v hlslang.y -- COMMAND copy ARGS /y hlslang_tab.c Gen_hlslang_tab.cpp -- COMMAND del ARGS hlslang_tab.c -- COMMAND del ARGS hlslang.output -+ COMMAND ${CMAKE_COMMAND} -E copy_if_different hlslang_tab.c Gen_hlslang_tab.cpp -+ COMMAND ${CMAKE_COMMAND} -E remove -f hlslang_tab.c hlslang.output - MAIN_DEPENDENCY hlslang/MachineIndependent/hlslang.y - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent - COMMENT "Executing Bison on hlslang.y" -@@ -142,9 +156,11 @@ if (WIN32) - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hlslang/MachineIndependent - COMMENT "Executing flex on hlslang.l" - ) -- -- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D\"_HAS_ITERATOR_DEBUGGING=0\" /D\"_SECURE_SCL=0\" /D\"_CRT_SECURE_NO_WARNINGS\"") -- SET(TEST_LIBS opengl32.lib) -+ -+ IF ( MSVC ) -+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D\"_HAS_ITERATOR_DEBUGGING=0\" /D\"_SECURE_SCL=0\" /D\"_CRT_SECURE_NO_WARNINGS\"") -+ ENDIF ( MSVC ) -+ SET(TEST_LIBS opengl32 gdi32 user32) - elseif (APPLE) - set(OSDEPENDENT_FILES - hlslang/OSDependent/Mac/osinclude.h --- -1.8.4.4 - diff --git a/mingw-w64-hlsl2glsl/0003-MinGW-w64-build-fixes-for-hlsl2glsltest.cpp.patch b/mingw-w64-hlsl2glsl/0003-MinGW-w64-build-fixes-for-hlsl2glsltest.cpp.patch deleted file mode 100644 index 51f15f2fde..0000000000 --- a/mingw-w64-hlsl2glsl/0003-MinGW-w64-build-fixes-for-hlsl2glsltest.cpp.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 91fd9827119029fb018da907b83009c8c93f8fb7 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Thu, 12 Dec 2013 16:52:29 +0000 -Subject: [PATCH 3/3] MinGW-w64 build fixes for hlsl2glsltest.cpp - ---- - tests/hlsl2glsltest/hlsl2glsltest.cpp | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/tests/hlsl2glsltest/hlsl2glsltest.cpp b/tests/hlsl2glsltest/hlsl2glsltest.cpp -index ba29446..b0efb43 100644 ---- a/tests/hlsl2glsltest/hlsl2glsltest.cpp -+++ b/tests/hlsl2glsltest/hlsl2glsltest.cpp -@@ -1,4 +1,3 @@ --#define _CRT_SECURE_NO_WARNINGS - #include - #include - #include -@@ -96,7 +95,7 @@ static StringVector GetFiles (const std::string& folder, const std::string& ends - { - StringVector res; - -- #ifdef _MSC_VER -+ #ifdef _WIN32 - WIN32_FIND_DATAA FindFileData; - HANDLE hFind = FindFirstFileA ((folder+"/*"+endsWith).c_str(), &FindFileData); - if (hFind == INVALID_HANDLE_VALUE) -@@ -179,7 +178,7 @@ static bool InitializeOpenGL () - - bool hasGLSL = false; - --#ifdef _MSC_VER -+#ifdef _WIN32 - // setup minimal required GL - HWND wnd = CreateWindowA( - "STATIC", --- -1.8.4.4 - diff --git a/mingw-w64-hlsl2glsl/0003-hlsl2glsltest-Change-_MSC_VER-to-_WIN32.patch b/mingw-w64-hlsl2glsl/0003-hlsl2glsltest-Change-_MSC_VER-to-_WIN32.patch new file mode 100644 index 0000000000..fe68a386bf --- /dev/null +++ b/mingw-w64-hlsl2glsl/0003-hlsl2glsltest-Change-_MSC_VER-to-_WIN32.patch @@ -0,0 +1,72 @@ +From d456b8d857ab761523a04834b68d067f600b9f34 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 22 Jul 2015 15:26:23 +0100 +Subject: [PATCH 3/4] hlsl2glsltest: Change _MSC_VER to _WIN32 + +So that it can be build with MinGW-w64 +--- + tests/hlsl2glsltest/hlsl2glsltest.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/hlsl2glsltest/hlsl2glsltest.cpp b/tests/hlsl2glsltest/hlsl2glsltest.cpp +index a9df844..6de5308 100644 +--- a/tests/hlsl2glsltest/hlsl2glsltest.cpp ++++ b/tests/hlsl2glsltest/hlsl2glsltest.cpp +@@ -10,7 +10,7 @@ + static const bool kDumpShaderAST = false; + + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include + #include + #include +@@ -95,7 +95,7 @@ static StringVector GetFiles (const std::string& folder, const std::string& ends + { + StringVector res; + +- #ifdef _MSC_VER ++ #ifdef _WIN32 + WIN32_FIND_DATAA FindFileData; + HANDLE hFind = FindFirstFileA ((folder+"/*"+endsWith).c_str(), &FindFileData); + if (hFind == INVALID_HANDLE_VALUE) +@@ -133,7 +133,7 @@ static StringVector GetFiles (const std::string& folder, const std::string& ends + + static void DeleteFile (const std::string& path) + { +- #ifdef _MSC_VER ++ #ifdef _WIN32 + DeleteFileA (path.c_str()); + #else + unlink (path.c_str()); +@@ -142,15 +142,15 @@ static void DeleteFile (const std::string& path) + + static bool ReadStringFromFile (const char* pathName, std::string& output) + { +-# ifdef _MSC_VER ++# ifdef _WIN32 + wchar_t widePath[MAX_PATH]; + int res = ::MultiByteToWideChar (CP_UTF8, 0, pathName, -1, widePath, MAX_PATH); + if (res == 0) + widePath[0] = 0; + FILE* file = _wfopen(widePath, L"rb"); +-# else // ifdef _MSC_VER ++# else // ifdef _WIN32 + FILE* file = fopen(pathName, "rb"); +-# endif // !ifdef _MSC_VER ++# endif // !ifdef _WIN32 + + if (file == NULL) + return false; +@@ -196,7 +196,7 @@ static bool InitializeOpenGL () + + bool hasGLSL = false; + +-#ifdef _MSC_VER ++#ifdef _WIN32 + // setup minimal required GL + HWND wnd = CreateWindowA( + "STATIC", +-- +2.5.0 + diff --git a/mingw-w64-hlsl2glsl/0004-CMake-Handle-installation.patch b/mingw-w64-hlsl2glsl/0004-CMake-Handle-installation.patch new file mode 100644 index 0000000000..cc28dd6b96 --- /dev/null +++ b/mingw-w64-hlsl2glsl/0004-CMake-Handle-installation.patch @@ -0,0 +1,51 @@ +From 3554bdeaed2b0fe4e8fdff83fd509ab1143b1cdd Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 22 Jul 2015 15:39:03 +0100 +Subject: [PATCH 4/4] CMake: Handle installation + +--- + CMakeLists.txt | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc30cd5..fcc78e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -208,6 +208,7 @@ add_library(hlsl2glsl + ${MACHINE_INDEPENDENT_GENERATED_SOURCE_FILES} + ) + ++set_property(TARGET hlsl2glsl PROPERTY PUBLIC_HEADER include/hlsl2glsl.h) + + include_directories( + ${INCLUDE_FILES} +@@ -215,3 +216,26 @@ include_directories( + add_executable(hlsl2glsltest tests/hlsl2glsltest/hlsl2glsltest.cpp) + + target_link_libraries(hlsl2glsltest hlsl2glsl ${TEST_LIBS}) ++ ++# ++# http://www.cmake.org/pipermail/cmake/2010-February/035466.html ++# compute default library install dir ++set (_DEFAULT_LIBRARY_INSTALL_DIR lib) ++if (EXISTS "${CMAKE_INSTALL_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4) ++ set (_DEFAULT_LIBRARY_INSTALL_DIR lib32) ++elif (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8) ++ set (_DEFAULT_LIBRARY_INSTALL_DIR lib64) ++endif () ++# the library install dir ++set(LIBRARY_INSTALL_DIR "${_DEFAULT_LIBRARY_INSTALL_DIR}" CACHE PATH "Installation directory for libraries") ++# make the library install dir an absolute path (can be important e.g. when using CONFIGURE_FILE to embed ++# the library installation directory into a file) ++if(NOT IS_ABSOLUTE "${LIBRARY_INSTALL_DIR}") ++ set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}") ++endif() ++# ++ ++install(TARGETS hlsl2glsl PUBLIC_HEADER ++ ARCHIVE DESTINATION "${LIBRARY_INSTALL_DIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" ++ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/include") +-- +2.5.0 + diff --git a/mingw-w64-hlsl2glsl/PKGBUILD b/mingw-w64-hlsl2glsl/PKGBUILD index 13cb3a4381..572a606e73 100644 --- a/mingw-w64-hlsl2glsl/PKGBUILD +++ b/mingw-w64-hlsl2glsl/PKGBUILD @@ -1,56 +1,56 @@ # Maintainer: Alexey Pavlov +# Maintainer: Ray Donnelly _realname=hlsl2glsl - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r749.9af03c9 +pkgver=r802.4df4096 pkgrel=1 pkgdesc="HLSL to GLSL shader language translator" arch=('any') -url='https://github.com/mingwandroid/hlsl2glslfork' +url='https://github.com/aras-p/hlsl2glslfork' license=('MIT') -depends=("") makedepends=("git" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") -optdepends=() provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('!strip' 'staticlibs' '!emptydirs') -source=("${_realname}"::"git+https://github.com/mingwandroid/hlsl2glslfork.git#branch=say-hello-to-qbs" - 0001-Fix-CMakeLists.txt.patch - 0002-Generalize-CMakeLists.txt-a-bit.patch - 0003-MinGW-w64-build-fixes-for-hlsl2glsltest.cpp.patch - ) +source=("${_realname}"::"git+https://github.com/aras-p/hlsl2glslfork.git" + 0001-CMakeLists.txt-Fixes-and-improvements.patch + 0002-Fix-pool_allocator-compile-guards.patch + 0003-hlsl2glsltest-Change-_MSC_VER-to-_WIN32.patch + 0004-CMake-Handle-installation.patch) md5sums=('SKIP' - '30240eff0c158e302b34c880dc961bef' - '76d65ee71bc4f32ece29822221c4dd6e' - '493f2b1579556df1211d9df7d0c06d79') + '8e937dcf31b9eef4c7619e4457b9d13d' + 'da95b53b42b266919b0a6bbe33928f8e' + '3d14f44ea9f9216b2c22d557f546ef0c' + '6b41bad2c77e7c13e43550cad485e430') pkgver() { - cd "$srcdir/${_realname}" + cd "${srcdir}"/${_realname} printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/${_realname}" - patch -p1 -i ${srcdir}/0001-Fix-CMakeLists.txt.patch - patch -p1 -i ${srcdir}/0002-Generalize-CMakeLists.txt-a-bit.patch - patch -p1 -i ${srcdir}/0003-MinGW-w64-build-fixes-for-hlsl2glsltest.cpp.patch + cd "${srcdir}"/${_realname} + git am "${srcdir}"/0001-CMakeLists.txt-Fixes-and-improvements.patch + git am "${srcdir}"/0002-Fix-pool_allocator-compile-guards.patch + git am "${srcdir}"/0003-hlsl2glsltest-Change-_MSC_VER-to-_WIN32.patch + git am "${srcdir}"/0004-CMake-Handle-installation.patch } build() { - cd ${srcdir}/${_realname} - - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" - - BISON_SIMPLE=${srcdir}/${_realname}/tools/bison.simple make + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir build-${CARCH} && cd build-${CARCH} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" \ + ${MINGW_PREFIX}/bin/cmake \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -G"MSYS Makefiles" \ + "${srcdir}"/${_realname} + + make } package() { - cd ${srcdir}/${_realname} - mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} - cp *.exe ${pkgdir}${MINGW_PREFIX}/bin/ - cp include/hlsl2glsl.h ${pkgdir}${MINGW_PREFIX}/include/ - cp libhlsl2glsl.a ${pkgdir}${MINGW_PREFIX}/lib/ + cd build-${CARCH} + make install DESTDIR=${pkgdir} } - diff --git a/mingw-w64-http-parser/PKGBUILD b/mingw-w64-http-parser/PKGBUILD index 2f8ff886c0..da3719f7d2 100644 --- a/mingw-w64-http-parser/PKGBUILD +++ b/mingw-w64-http-parser/PKGBUILD @@ -2,26 +2,25 @@ _realname=http-parser pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.3 -pkgrel=2 +pkgver=2.5.0 +pkgrel=1 pkgdesc='Parser for HTTP Request/Response written in C (mingw-w64)' arch=('any') url='http://github.com/joyent/http-parser' license=('MIT') -source=("http://github.com/joyent/http-parser/archive/v${pkgver}.tar.gz" +source=(${_realname}-${pkgver}.tar.gz::"http://github.com/joyent/http-parser/archive/v${pkgver}.tar.gz" makefile.patch) -md5sums=('2c4092f5c2dc99798fe28e9c0647e869' - '8f7d045d19fdbf8132928cfba98e2dce') +md5sums=('6172c0d2fbc10d2b57ff05f03b67312f' + '9d8371b97bc17616a8df6c69f7b75d7f') options=('strip' 'staticlibs') prepare() { - cd ${srcdir}/${_realname}-$pkgver - + cd ${srcdir}/${_realname}-${pkgver} patch -p0 -i ${srcdir}/makefile.patch } build() { - cd ${srcdir}/${_realname}-$pkgver + cd ${srcdir}/${_realname}-${pkgver} CC=gcc \ AR=ar \ make -j1 \ @@ -30,7 +29,7 @@ build() { package() { - cd ${srcdir}/${_realname}-$pkgver + cd ${srcdir}/${_realname}-${pkgver} mkdir -p ${pkgdir}/${MINGW_PREFIX}/{bin,include,lib} install -Dm644 http_parser.h "${pkgdir}/${MINGW_PREFIX}/include/http_parser.h" cp *.a ${pkgdir}/${MINGW_PREFIX}/lib/ diff --git a/mingw-w64-http-parser/makefile.patch b/mingw-w64-http-parser/makefile.patch index 7acb466668..b0ec0f5852 100644 --- a/mingw-w64-http-parser/makefile.patch +++ b/mingw-w64-http-parser/makefile.patch @@ -4,24 +4,19 @@ # IN THE SOFTWARE. PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"') --SONAME ?= libhttp_parser.so.2.3 +-SONAME ?= libhttp_parser.so.2.5.0 +SONAME ?= libhttp_parser-2.dll CC?=gcc AR?=ar -@@ -33,14 +33,8 @@ - CFLAGS += -Wall -Wextra -Werror +@@ -33,9 +33,7 @@ CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA) CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) + CFLAGS_BENCH = $(CFLAGS_FAST) -Wno-unused-parameter -CFLAGS_LIB = $(CFLAGS_FAST) -fPIC - --LDFLAGS_LIB = $(LDFLAGS) -shared - --ifneq (darwin,$(PLATFORM)) --# TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname... --LDFLAGS_LIB += -Wl,-soname=$(SONAME) --endif +-LDFLAGS_LIB = $(LDFLAGS) -shared +LDFLAGS_LIB = $(LDFLAGS) -shared -Wl,--out-implib=libhttp_parser.dll.a - test: test_g test_fast - ./test_g + INSTALL ?= install + PREFIX ?= $(DESTDIR)/usr/local diff --git a/mingw-w64-hub/PKGBUILD b/mingw-w64-hub/PKGBUILD new file mode 100644 index 0000000000..79386761ba --- /dev/null +++ b/mingw-w64-hub/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Øystein Krog + +_realname=hub +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.2.1 +pkgrel=1 +pkgdesc="hub introduces git to GitHub (mingw-w64)" +arch=('any') +url="http://hub.github.com" +license=('MIT') +options=('!strip') +#TODO: change this when git-for-windows is upstreamed +#depends=('${MINGW_PACKAGE_PREFIX}-git') +depends=('git') +makedepends=("git" "${MINGW_PACKAGE_PREFIX}-go") +source=(${_realname}-${pkgver}.tar.gz::https://github.com/github/${_realname}/archive/v${pkgver}.tar.gz) +md5sums=('889a31ee9d10ae9cb333480d8dbe881f') + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + GOROOT=${MINGW_PREFIX}/lib/go ./script/build + gzip --best -c man/${_realname}.1> ${_realname}.1.gz +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" + + install -Dm755 "${_realname}" "${pkgdir}${MINGW_PREFIX}/bin/${_realname}" + + install -Dm644 "LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + install -Dm644 "man/${_realname}.1" "${pkgdir}${MINGWPREFIX}/share/man/man1/${_realname}.1" + + install -Dm644 "etc/hub.bash_completion.sh" "${pkgdir}/usr/share/bash-completion/completions/hub" + install -Dm644 "etc/hub.zsh_completion" "${pkgdir}/usr/share/zsh/site-functions/_hub" +} diff --git a/mingw-w64-hunspell-en/PKGBUILD b/mingw-w64-hunspell-en/PKGBUILD new file mode 100644 index 0000000000..8157b70eb0 --- /dev/null +++ b/mingw-w64-hunspell-en/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Alexey Pavlov + +_realname=hunspell-en +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2014.11.17 +pkgrel=1 +pkgdesc="Hunspell dictionaries (mingw-w64)" +arch=('any') +url="http://wordlist.sourceforge.net/" +license=('LGPL' 'custom:scowl') +makedepends=("unzip") +optdepends=(${MINGW_PACKAGE_PREFIX}-hunspell) +source=(http://downloads.sourceforge.net/wordlist/hunspell-en_US-large-$pkgver.zip + http://downloads.sourceforge.net/wordlist/hunspell-en_CA-large-$pkgver.zip + http://downloads.sourceforge.net/wordlist/hunspell-en_GB-large-$pkgver.zip) +md5sums=('03394d04d58f0557dff6b3c2e0844532' + '539fc4150d0ed5d3e66fd05719c49b98' + '42ea3fe29ad43b4f62a558ad79c73d0d') + +build() { + /bin/true +} + +package() { + cd "$srcdir" + install -dm755 ${pkgdir}${MINGW_PREFIX}/share/hunspell + install -m644 en_*.dic en_*.aff ${pkgdir}${MINGW_PREFIX}/share/hunspell + + pushd ${pkgdir}${MINGW_PREFIX}/share/hunspell/ + en_GB_aliases="en_AG en_AU en_BS en_BW en_BZ en_DK en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW" + for lang in $en_GB_aliases; do + ln -s en_GB-large.aff $lang.aff + ln -s en_GB-large.dic $lang.dic + done + + en_US_aliases="en_PH" + for lang in $en_US_aliases; do + ln -s en_US-large.aff $lang.aff + ln -s en_US-large.dic $lang.dic + done + popd + + # the symlinks + install -dm755 ${pkgdir}${MINGW_PREFIX}/share/myspell/dicts + pushd ${pkgdir}${MINGW_PREFIX}/share/myspell/dicts + for file in ${pkgdir}${MINGW_PREFIX}/share/hunspell/*; do + ln -sv ${pkgdir}${MINGW_PREFIX}/share/hunspell/$(basename $file) . + done + popd + + # docs + install -dm755 ${pkgdir}${MINGW_PREFIX}/share/doc/$_realname + install -m644 README_en_??-large.txt ${pkgdir}${MINGW_PREFIX}/share/doc/$_realname + + # licenses + install -D -m644 README_en_US-large.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/Copyright_en_US + install -D -m644 README_en_CA-large.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/Copyright_en_CA + install -D -m644 README_en_GB-large.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/Copyright_en_GB +} diff --git a/mingw-w64-hunspell/PKGBUILD b/mingw-w64-hunspell/PKGBUILD index d0288a9cae..28dfab668a 100644 --- a/mingw-w64-hunspell/PKGBUILD +++ b/mingw-w64-hunspell/PKGBUILD @@ -1,45 +1,52 @@ # Maintainer: Alexey Pavlov # Contributor: Ray Donnelly +# Contributor: Renato Silva _realname=hunspell pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.3 -pkgrel=6 +pkgrel=10 pkgdesc="Spell checker and morphological analyzer library and program (mingw-w64)" arch=('any') url="http://hunspell.sourceforge.net/" -license=("BSD") + +# We omit MPL because it cannot be applied to the whole source, see COPYING +license=(GPL2+ LGPL2.1+) + makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs - ${MINGW_PACKAGE_PREFIX}-gettext) + ${MINGW_PACKAGE_PREFIX}-gettext) options=('!libtool' 'strip' '!debug') -source=("http://download.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.gz" +source=("http://download.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" "hunspell-1.3.2-canonicalhost.patch" "hunspell-1.3.3-exit-on-MAX_PREFIXES_SUFFIXES.patch" "hunspell-1.3.3-inc-MAX_PREFIXES_SUFFIXES-to-2048.patch" - "hunspell-1.3.3-relocate.patch") + "hunspell-1.3.3-relocate.patch" + "hunspell-1.3.3-windows-sub-dicts-paths.patch") md5sums=('4967da60b23413604c9e563beacc63b4' 'f8a5c0f3692a390d98daf0406da59cdf' 'c6cd1edc5bbfb803a6dc2ef602e048a3' 'ebf66e5be21328c22df969245a9e75a8' - '33eb82b23b50fb4f4821765686c99a38') + '33eb82b23b50fb4f4821765686c99a38' + '7d59a4f3c4c2f6b40cba5c54072cbd67') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -Np1 -i "$srcdir"/hunspell-1.3.2-canonicalhost.patch patch -Np1 -i "$srcdir"/hunspell-1.3.3-exit-on-MAX_PREFIXES_SUFFIXES.patch patch -Np1 -i "$srcdir"/hunspell-1.3.3-inc-MAX_PREFIXES_SUFFIXES-to-2048.patch patch -Np1 -i "$srcdir"/hunspell-1.3.3-relocate.patch + patch -Np1 -i "$srcdir"/hunspell-1.3.3-windows-sub-dicts-paths.patch autoreconf -fi } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - mkdir -p "${srcdir}/build-${CARCH}" - cd "${srcdir}/build-${CARCH}" - - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -54,8 +61,14 @@ build() { } package() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" MSYS2_ARG_CONV_EXCL="-DBINDIR=;-DDATA_DIR=" \ make DESTDIR="${pkgdir}" install cp ${pkgdir}${MINGW_PREFIX}/lib/lib${_realname}-${pkgver%.*}.dll.a ${pkgdir}${MINGW_PREFIX}/lib/lib${_realname}.dll.a + + # Licenses + cd "${srcdir}/${_realname}-${pkgver}" + install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 COPYING.LGPL "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LGPL" + install -Dm644 COPYING.MPL "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.MPL" } diff --git a/mingw-w64-hunspell/hunspell-1.3.3-windows-sub-dicts-paths.patch b/mingw-w64-hunspell/hunspell-1.3.3-windows-sub-dicts-paths.patch new file mode 100644 index 0000000000..b6fa2e1ea3 --- /dev/null +++ b/mingw-w64-hunspell/hunspell-1.3.3-windows-sub-dicts-paths.patch @@ -0,0 +1,35 @@ +--- hunspell-1.3.3/src/tools/hunspell.cxx.orig 2014-12-12 22:39:13.834800000 +0300 ++++ hunspell-1.3.3/src/tools/hunspell.cxx 2014-12-13 00:01:57.899200000 +0300 +@@ -45,6 +45,12 @@ + #define DIRSEP "\\" + #define PATHSEP ";" + ++#ifdef __MINGW32__ ++#include ++#include ++#include ++#include ++#endif + #include "textparser.hxx" + #include "htmlparser.hxx" + #include "latexparser.hxx" +@@ -1523,7 +1537,7 @@ + return NULL; + } + +-#ifndef WIN32 ++#if !defined(WIN32) || defined(__MINGW32__) + int listdicpath(char * dir, int len) { + char buf[MAXLNLEN]; + const char * sep = (len == 0) ? "": DIRSEP; +@@ -1556,8 +1570,8 @@ + if (name) { + res = exist2(begin, end - begin, name, ext); + } else { +-#ifndef WIN32 +- listdicpath(begin, end - begin); ++#if !defined(WIN32) || defined(__MINGW32__) ++ listdicpath(begin, end - begin); + #endif + } + if ((*end == '\0') || res) return res; diff --git a/mingw-w64-icoutils/001-win.patch b/mingw-w64-icoutils/001-win.patch new file mode 100644 index 0000000000..1aa35e50ef --- /dev/null +++ b/mingw-w64-icoutils/001-win.patch @@ -0,0 +1,29 @@ +--- ./lib/msvc-inval.c.orig 2014-12-04 20:59:45.759867900 +0100 ++++ ./lib/msvc-inval.c 2014-12-04 21:00:13.935725900 +0100 +@@ -28,7 +28,7 @@ + + # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + +-static void cdecl ++static void __cdecl + gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, +@@ -45,7 +45,7 @@ + + # if defined _MSC_VER + +-static void cdecl ++static void __cdecl + gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, +@@ -94,7 +94,7 @@ + } + } + +-static void cdecl ++static void __cdecl + gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, diff --git a/mingw-w64-icoutils/PKGBUILD b/mingw-w64-icoutils/PKGBUILD new file mode 100644 index 0000000000..4ce30a8cd1 --- /dev/null +++ b/mingw-w64-icoutils/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Andrea Zagli + +_realname=icoutils +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.31.0 +pkgrel=2 +arch=('any') +pkgdesc="Create and extract MS Windows icons and cursors (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-libpng") +options=('strip' 'staticlibs') +license=("GPL 2") +url="http://www.nongnu.org/icoutils/" +source=(http://savannah.nongnu.org/download/${_realname}/${_realname}-${pkgver}.tar.bz2 + 001-win.patch) +sha256sums=('a895d9d74a418d65d39a667e58ae38be79c9e726711384551d36531696f3af71' + 'e5745ac16fbaeaf5e5ab3af66582982c17326d372406e7dba75b34f33b2b9c10') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-win.patch +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch b/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch index b8882fee69..051673c62f 100644 --- a/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch +++ b/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch @@ -1,6 +1,6 @@ --- icu/source/tools/pkgdata/pkgdata.cpp.orig 2013-10-04 20:49:38.000000000 +0000 +++ icu/source/tools/pkgdata/pkgdata.cpp 2014-02-06 19:09:43.258525500 +0000 -@@ -868,27 +868,16 @@ +@@ -868,21 +868,10 @@ const char* FILE_EXTENSION_SEP = uprv_strlen(pkgDataFlags[SO_EXT]) == 0 ? "" : "."; const char* FILE_SUFFIX = pkgDataFlags[LIB_EXT_ORDER][0] == '.' ? "." : ""; @@ -22,13 +22,6 @@ if(o->verbose) { fprintf(stdout, "# libFileName[LIB_FILE] = %s\n", libFileNames[LIB_FILE]); } - - #if U_PLATFORM == U_PF_MINGW -- sprintf(libFileNames[LIB_FILE_MINGW], "%s%s.lib", pkgDataFlags[LIBPREFIX], libName); -+ sprintf(libFileNames[LIB_FILE_MINGW], "%s%s.a", pkgDataFlags[LIBPREFIX], libName); - #elif U_PLATFORM == U_PF_CYGWIN - sprintf(libFileNames[LIB_FILE_CYGWIN], "cyg%s%s%s", - libName, --- icu/source/tools/pkgdata/pkgtypes.h.orig 2013-10-04 20:49:38.000000000 +0000 +++ icu/source/tools/pkgdata/pkgtypes.h 2014-02-06 19:10:24.970822300 +0000 @@ -138,10 +138,10 @@ diff --git a/mingw-w64-icu/0017-icu-config-versioning.patch b/mingw-w64-icu/0017-icu-config-versioning.patch new file mode 100644 index 0000000000..67cb89b968 --- /dev/null +++ b/mingw-w64-icu/0017-icu-config-versioning.patch @@ -0,0 +1,69 @@ +--- icu/source/config/mh-mingw.orig 2015-07-29 14:31:54.664667600 +0300 ++++ icu/source/config/mh-mingw 2015-07-29 14:34:19.771155500 +0300 +@@ -75,13 +75,16 @@ + I18N_STUBNAME = in + LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + ++# The following is for Makefile.inc's use. ++ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) ++ + #SH### copied from Makefile.inc + #SH## for icu-config to test with + #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" + #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" + +-#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" +-#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" ++#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" ++#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" + #SH# + #SH## ICULIBS is the set of libraries your application should link + #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. +--- icu/source/config/mh-mingw64.orig 2015-07-29 14:32:09.885145400 +0300 ++++ icu/source/config/mh-mingw64 2015-07-29 14:34:34.344698000 +0300 +@@ -75,13 +75,16 @@ + I18N_STUBNAME = in + LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + ++# The following is for Makefile.inc's use. ++ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) ++ + #SH### copied from Makefile.inc + #SH## for icu-config to test with + #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" + #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" + +-#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" +-#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" ++#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" ++#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" + #SH# + #SH## ICULIBS is the set of libraries your application should link + #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. +--- icu/source/config/Makefile.inc.in.orig 2015-07-29 14:34:44.358696500 +0300 ++++ icu/source/config/Makefile.inc.in 2015-07-29 14:35:15.641567900 +0300 +@@ -106,15 +106,15 @@ + # - $(ICULIBS_LAYOUT) - ICU layout library. + # - $(ICULIBS_ICUIO) - ICU stdio equivalent library + +-ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +-ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) ++ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX) ++ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX) ++ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX) ++ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX) ++ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX) ++ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX) ++ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX) ++ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX) + ICULIBS_BASE = -L$(libdir) + + # for icu-config to test with diff --git a/mingw-w64-icu/PKGBUILD b/mingw-w64-icu/PKGBUILD index 84f42ff92d..abc2c3f323 100644 --- a/mingw-w64-icu/PKGBUILD +++ b/mingw-w64-icu/PKGBUILD @@ -2,9 +2,10 @@ # Contributor: Ray Donnelly _realname=icu +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-libs") -pkgver=54.1 -pkgrel=3 +pkgver=56.1 +pkgrel=1 arch=('any') pkgdesc="International Components for Unicode library (mingw-w64)" arch=('any') @@ -25,8 +26,9 @@ source=("http://download.icu-project.org/files/icu4c/${pkgver}/icu4c-${pkgver//. 0012-libprefix.mingw.patch 0014-mingwize-pkgdata.mingw.patch 0015-debug.mingw.patch - 0016-icu-pkgconfig.patch) -md5sums=('e844caed8f2ca24c088505b0d6271bc0' + 0016-icu-pkgconfig.patch + 0017-icu-config-versioning.patch) +md5sums=('c4a2d71ff56aec5ebfab2a3f059be99d' '4c8143786ed499184e64fc5a1a1d0fdf' 'eb56b72df2ca0dc77261c4f2adc5c8ad' '9c63125f7bdd88871c89e13ee62ac02b' @@ -34,11 +36,12 @@ md5sums=('e844caed8f2ca24c088505b0d6271bc0' 'cce2427d95bcb4a364df5ab605c3e9a3' 'ee93f131a132f7e65d11d15a467b7abc' 'f43d08a14a3e723977178fed136e58b1' - 'f7a59e098b2eda845b627137488b0573' + '74415f3f3876b5f2f7cea0c5d367c5c6' 'd1accfbefbcd399a4a28a4a4e0737915' - '3f13cf5733c4a9363c5823a24d3fba85') + '3f13cf5733c4a9363c5823a24d3fba85' + 'da12188a00025605be0c4ee22d1895bb') prepare() { - cd "$srcdir/icu" + cd "${srcdir}/icu" patch -p1 -i "$srcdir"/0004-move-to-bin.mingw.patch patch -p1 -i "$srcdir"/0007-actually-move-to-bin.mingw.patch @@ -50,6 +53,7 @@ prepare() { patch -p1 -i "$srcdir"/0014-mingwize-pkgdata.mingw.patch patch -p1 -i "$srcdir"/0015-debug.mingw.patch patch -p1 -i "$srcdir"/0016-icu-pkgconfig.patch + patch -p1 -i "$srcdir"/0017-icu-config-versioning.patch cd source autoreconf -vfi @@ -57,7 +61,7 @@ prepare() { build() { local -a extra_config - cd "$srcdir/icu/" + cd "${srcdir}/icu/" # For ICU we ignore the options for debug above and always # build both debug and release (and static and shared). # This is because ICU people want the debug libraries be @@ -90,17 +94,17 @@ build() { check() { for _variant in debug release; do - pushd "$srcdir/icu/build-${CARCH}-${_variant}" - PATH=$srcdir/icu/build-${CARCH}/bin:$srcdir/icu/build-${CARCH}/lib:$PATH \ + pushd "${srcdir}/icu/build-${CARCH}-${_variant}" + PATH=${srcdir}/icu/build-${CARCH}/bin:${srcdir}/icu/build-${CARCH}/lib:$PATH \ make V=1 -k check popd done } package_icu() { - pushd "$srcdir/icu/build-${CARCH}-release" - make install DESTDIR="$pkgdir" - + pushd "${srcdir}/icu/build-${CARCH}-release" + make install DESTDIR="${pkgdir}" + mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ mv "${pkgdir}${MINGW_PREFIX}"/bin/*.a "${pkgdir}${MINGW_PREFIX}"/lib/ pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null @@ -115,8 +119,8 @@ package_icu() { package_icu-debug-libs() { options=('debug' '!strip') - pushd "$srcdir/icu/build-${CARCH}-debug" - make install DESTDIR="$pkgdir" + pushd "${srcdir}/icu/build-${CARCH}-debug" + make install DESTDIR="${pkgdir}" mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ mv "${pkgdir}${MINGW_PREFIX}"/bin/*.a "${pkgdir}${MINGW_PREFIX}"/lib/ diff --git a/mingw-w64-id3lib/00-add-libz-to-compilation.patch b/mingw-w64-id3lib/00-add-libz-to-compilation.patch new file mode 100644 index 0000000000..e937877364 --- /dev/null +++ b/mingw-w64-id3lib/00-add-libz-to-compilation.patch @@ -0,0 +1,14 @@ +This patch was first introduced in version 3.8.3-3 + +It fixes http://bugs.debian.org/208672 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -74,6 +74,8 @@ + + if ID3_NEEDZLIB + LDADD = $(top_builddir)/zlib/src/libz.la ++else ++libid3_la_LIBADD = -lz + endif + + libid3_la_LDFLAGS = \ diff --git a/mingw-w64-id3lib/05-create-m4-directory.patch b/mingw-w64-id3lib/05-create-m4-directory.patch new file mode 100644 index 0000000000..d8111205eb --- /dev/null +++ b/mingw-w64-id3lib/05-create-m4-directory.patch @@ -0,0 +1,12 @@ +Create a local m4 subdirectory +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,6 +12,8 @@ + # require automake 1.5 + AUTOMAKE_OPTIONS = 1.5 + ++ACLOCAL_AMFLAGS = -I m4 ++ + EXTRA_DIST = \ + HISTORY \ + config.h.win32 \ diff --git a/mingw-w64-id3lib/10-fix-compilation-with-cpp-headers.patch b/mingw-w64-id3lib/10-fix-compilation-with-cpp-headers.patch new file mode 100644 index 0000000000..a9b45ab02c --- /dev/null +++ b/mingw-w64-id3lib/10-fix-compilation-with-cpp-headers.patch @@ -0,0 +1,22 @@ +This patch imports the proper C++ headers +--- a/include/id3/id3lib_strings.h ++++ b/include/id3/id3lib_strings.h +@@ -30,6 +30,7 @@ + #define _ID3LIB_STRINGS_H_ + + #include ++#include + + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) + namespace std +--- a/include/id3/writers.h ++++ b/include/id3/writers.h +@@ -30,7 +30,7 @@ + + #include "id3/writer.h" + #include "id3/id3lib_streams.h" +-//#include ++#include + + class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer + { diff --git a/mingw-w64-id3lib/100-id3lib-3.8.3-mingw.patch b/mingw-w64-id3lib/100-id3lib-3.8.3-mingw.patch new file mode 100644 index 0000000000..552691b5c9 --- /dev/null +++ b/mingw-w64-id3lib/100-id3lib-3.8.3-mingw.patch @@ -0,0 +1,48 @@ +diff -urN id3lib-3.8.3.old/configure.in id3lib-3.8.3/configure.in +--- id3lib-3.8.3.old/configure.in 2014-02-24 10:21:50.620304728 +0000 ++++ id3lib-3.8.3/configure.in 2014-02-24 11:12:01.406469771 +0000 +@@ -253,7 +253,7 @@ + AC_CHECK_FUNCS(mkstemp) + AC_CHECK_FUNCS( + truncate \ +- ,,AC_MSG_ERROR([Missing a vital function for id3lib]) ++ ,,AC_MSG_WARN([Missing a vital function for id3lib]) + ) + + dnl Checks for typedefs, structures, and compiler characteristics. +diff -urN id3lib-3.8.3.old/include/id3/globals.h id3lib-3.8.3/include/id3/globals.h +--- id3lib-3.8.3.old/include/id3/globals.h 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/include/id3/globals.h 2014-02-24 11:12:27.896670566 +0000 +@@ -41,7 +41,7 @@ + * we prefix variable declarations so they can + * properly get exported in windows dlls. + */ +-#ifdef WIN32 ++#ifdef __MSVC_VER + # define LINKOPTION_STATIC 1 //both for use and creation of static lib + # define LINKOPTION_CREATE_DYNAMIC 2 //should only be used by prj/id3lib.dsp + # define LINKOPTION_USE_DYNAMIC 3 //if your project links id3lib dynamic +@@ -74,11 +74,11 @@ + # define CCONV __stdcall // Added for VB & Delphi Compatibility - By FrogPrince Advised By Lothar + # endif + # endif +-#else /* !WIN32 */ ++#else /* !__MSVC_VER */ + # define ID3_C_EXPORT + # define ID3_CPP_EXPORT + # define CCONV +-#endif /* !WIN32 */ ++#endif /* !__MSVC_VER */ + + #define ID3_C_VAR extern + +diff -urN id3lib-3.8.3.old/src/Makefile.am id3lib-3.8.3/src/Makefile.am +--- id3lib-3.8.3.old/src/Makefile.am 2014-02-24 11:05:44.097853121 +0000 ++++ id3lib-3.8.3/src/Makefile.am 2014-02-24 11:13:00.437688808 +0000 +@@ -79,4 +79,5 @@ + libid3_la_LDFLAGS = \ + -version-info $(LT_VERSION) \ + -release $(LT_RELEASE) \ +- -export-dynamic ++ -export-dynamic \ ++ -no-undefined diff --git a/mingw-w64-id3lib/15-fix-headers-of-main-functions.patch b/mingw-w64-id3lib/15-fix-headers-of-main-functions.patch new file mode 100644 index 0000000000..48e01d145f --- /dev/null +++ b/mingw-w64-id3lib/15-fix-headers-of-main-functions.patch @@ -0,0 +1,45 @@ +This patch fixes some function headers in demo code used during 'make check' +--- a/examples/demo_info.cpp ++++ b/examples/demo_info.cpp +@@ -309,7 +309,7 @@ + + #define DEBUG + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + ID3D_INIT_DOUT(); + +--- a/examples/demo_convert.cpp ++++ b/examples/demo_convert.cpp +@@ -84,7 +84,7 @@ + } + } + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + flags_t ulFlag = ID3TT_ALL; + gengetopt_args_info args; +--- a/examples/demo_copy.cpp ++++ b/examples/demo_copy.cpp +@@ -81,7 +81,7 @@ + } + } + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + int ulFlag = ID3TT_ID3; + ID3D_INIT_DOUT(); +--- a/examples/demo_tag.cpp ++++ b/examples/demo_tag.cpp +@@ -46,7 +46,7 @@ + os << "v2"; + } + +-int main( unsigned int argc, char * const argv[]) ++int main(int argc, char * const argv[]) + { + int ulFlag = ID3TT_ID3; + ID3D_INIT_DOUT(); diff --git a/mingw-w64-id3lib/20-create-manpages.patch b/mingw-w64-id3lib/20-create-manpages.patch new file mode 100644 index 0000000000..cebf3d4d40 --- /dev/null +++ b/mingw-w64-id3lib/20-create-manpages.patch @@ -0,0 +1,198 @@ +This patch adds debian-made man pages +--- /dev/null ++++ b/doc/man/id3info.1 +@@ -0,0 +1,31 @@ ++.TH ID3INFO 1 "May 2000" local "User Command" ++.SH NAME ++id3info \- Display id3 tag information. ++.SH SYNOPSIS ++.B id3info ++.RB [ ++.I OPTION ++.RB ] ++.RB [ ++.I FILE ++.RB ] ++.br ++.SH DESCRIPTION ++.B Id3info ++displays both the id3v1 and id3v2 tag information for a file. ++Id3info will not differentiate between the two types of tags. ++.SH OPTIONS ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++.SH SEE ALSO ++id3convert(1), id3tag(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug . Manual page written for ++Debian GNU/Linux by Robert Woodcock . ++ +--- /dev/null ++++ b/doc/man/id3tag.1 +@@ -0,0 +1,69 @@ ++.TH ID3TAG 1 "May 2000" local "User Command" ++.SH NAME ++id3tag \- Tags an mp3 file with id3v1 and/or id3v2 tags. ++.SH SYNOPSIS ++.B id3tag ++.RB [ ++.I OPTION ++.RB ] ... ++.RB [ ++.I FILE ++.RB ] ... ++.br ++.SH DESCRIPTION ++.B Id3tag ++will render both types of tag by default. Only the last ++tag type indicated in the option list will be used. Non- ++rendered will remain unchanged in the original file. Will ++also parse and convert Lyrics3 v2.0 frames, but will not ++render them. ++ ++.SH OPTIONS ++.TP ++.B \-1, \-\-v1tag ++Render only the id3v1 tag ++.TP ++.B \-2, \-\-v2tag ++Render only the id3v2 tag ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++.TP ++.B \-a, \-\-artist ARTIST ++Set the artist information ++.TP ++.B \-s, \-\-song SONG ++Set the song title information ++.TP ++.B \-A, \-\-album ALBUM ++Set the album title information ++.TP ++.B \-c, \-\-comment COMMENT ++Set the comment information ++.TP ++.B \-C, \-\-desc DESCRIPTION ++Set the comment description ++.TP ++.B \-g, \-\-genre num ++Set the genre number ++.TP ++.B \-y, \-\-year num ++Set the year ++.TP ++.B \-t, \-\-track num ++Set the track number ++.TP ++.B \-T, \-\-total num ++Set the total number of tracks on the album ++ ++.SH SEE ALSO ++id3convert(1), id3info(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug . Manual page written for ++Debian GNU/Linux by Robert Woodcock . ++ +--- /dev/null ++++ b/doc/man/id3convert.1 +@@ -0,0 +1,47 @@ ++.TH ID3CONVERT 1 "May 2000" local "User Command" ++.SH NAME ++id3convert \- Converts between id3v1 and id3v2 tags of an mp3 file. ++.SH SYNOPSIS ++.B id3convert ++.RB [ ++.I OPTION ++.RB ] ++.RB [ ++.I FILE ++.RB ] ++.br ++.SH DESCRIPTION ++.B Id3convert ++converts between id3v1 and id3v2 tags of an mp3 file. Id3convert will render ++both types of tag by default. Only the last tag type indicated in the option ++list will be used. Non-rendered tags will remain unchanged in the original ++file. Id3convert will also parse and convert Lyrics3 v2.0 frames, but will ++not render them. ++ ++.SH OPTIONS ++.TP ++.B \-1, \-\-v1tag ++Render only the id3v1 tag ++.TP ++.B \-2, \-\-v2tag ++Render only the id3v2 tag ++.TP ++.B \-s, \-\-strip ++Strip, rather than render, the tags ++.TP ++.B \-p, \-\-padding ++Use padding in the tag ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++ ++.SH SEE ALSO ++id3tag(1), id3info(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug . Manual page written for ++Debian GNU/Linux by Robert Woodcock . +--- /dev/null ++++ b/doc/man/id3cp.1 +@@ -0,0 +1,38 @@ ++.TH ID3CP 1 "July 2001" local "User Command" ++.SH NAME ++id3cp \- Copies tags from one file to another. ++.SH SYNOPSIS ++.B id3cp ++.RB [ ++.I OPTION ++.RB ] ... ++.RB [ ++.I SOURCE ++.RB ] ++.RB [ ++.I DEST ++.RB ] ++.br ++.SH DESCRIPTION ++.B Id3cp ++copies tags from SOURCE to DEST. ++.SH OPTIONS ++.TP ++.B \-1, \-\-v1tag ++Render only the id3v1 tag ++.TP ++.B \-2, \-\-v2tag ++Render only the id3v2 tag ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++.SH SEE ALSO ++id3convert(1), id3info(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug . Manual page written for ++Debian GNU/Linux by Robert Woodcock . diff --git a/mingw-w64-id3lib/30-fix-utf16.patch b/mingw-w64-id3lib/30-fix-utf16.patch new file mode 100644 index 0000000000..3d3f50fed6 --- /dev/null +++ b/mingw-w64-id3lib/30-fix-utf16.patch @@ -0,0 +1,38 @@ +Patch from 'Spoon' to fix issues with writing certain unicode characters +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++2006-02-17 Jerome Couderc ++ ++ * Patch from Spoon to fix UTF-16 writing bug ++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ + 2003-03-02 Sunday 17:38 Thijmen Klok + + * THANKS (1.20): added more people +--- a/src/io_helpers.cpp ++++ b/src/io_helpers.cpp +@@ -363,11 +363,22 @@ + // Write the BOM: 0xFEFF + unicode_t BOM = 0xFEFF; + writer.writeChars((const unsigned char*) &BOM, 2); ++ // Patch from Spoon : 2004-08-25 14:17 ++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ // Wrong code ++ //for (size_t i = 0; i < size; i += 2) ++ //{ ++ // unicode_t ch = (data[i] << 8) | data[i+1]; ++ // writer.writeChars((const unsigned char*) &ch, 2); ++ //} ++ // Right code ++ unsigned char *pdata = (unsigned char *) data.c_str(); + for (size_t i = 0; i < size; i += 2) + { +- unicode_t ch = (data[i] << 8) | data[i+1]; ++ unicode_t ch = (pdata[i] << 8) | pdata[i+1]; + writer.writeChars((const unsigned char*) &ch, 2); + } ++ // End patch + } + return writer.getCur() - beg; + } diff --git a/mingw-w64-id3lib/40-deal-with-mkstemp.patch b/mingw-w64-id3lib/40-deal-with-mkstemp.patch new file mode 100644 index 0000000000..36c84179fc --- /dev/null +++ b/mingw-w64-id3lib/40-deal-with-mkstemp.patch @@ -0,0 +1,54 @@ +This patch fixes an issues where temporary files were created in an insecure +way. + +It was first intruduced in version 3.8.3-7 and fixes +http://bugs.debian.org/438540 +--- a/src/tag_file.cpp ++++ b/src/tag_file.cpp +@@ -242,8 +242,8 @@ + strcpy(sTempFile, filename.c_str()); + strcat(sTempFile, sTmpSuffix.c_str()); + +-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) +- // This section is for Windows folk && gcc 3.x folk ++#if !defined(HAVE_MKSTEMP) ++ // This section is for Windows folk + fstream tmpOut; + createFile(sTempFile, tmpOut); + +@@ -257,7 +257,7 @@ + tmpOut.write((char *)tmpBuffer, nBytes); + } + +-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) ++#else //!defined(HAVE_MKSTEMP) + + // else we gotta make a temp file, copy the tag into it, copy the + // rest of the old file after the tag, delete the old file, rename +@@ -270,7 +270,7 @@ + //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file"); + } + +- ofstream tmpOut(fd); ++ ofstream tmpOut(sTempFile); + if (!tmpOut) + { + tmpOut.close(); +@@ -285,14 +285,14 @@ + uchar tmpBuffer[BUFSIZ]; + while (file) + { +- file.read(tmpBuffer, BUFSIZ); ++ file.read((char *)tmpBuffer, BUFSIZ); + size_t nBytes = file.gcount(); +- tmpOut.write(tmpBuffer, nBytes); ++ tmpOut.write((char *)tmpBuffer, nBytes); + } + + close(fd); //closes the file + +-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) ++#endif ////!defined(HAVE_MKSTEMP) + + tmpOut.close(); + file.close(); diff --git a/mingw-w64-id3lib/50-remove-outdated-check.patch b/mingw-w64-id3lib/50-remove-outdated-check.patch new file mode 100644 index 0000000000..386da2771b --- /dev/null +++ b/mingw-w64-id3lib/50-remove-outdated-check.patch @@ -0,0 +1,11 @@ +We don't actually need iomanip.h +--- a/configure.in ++++ b/configure.in +@@ -227,7 +227,6 @@ + ) + AC_CHECK_HEADERS( \ + string \ +- iomanip.h \ + ,,AC_MSG_ERROR([Missing a vital header file for id3lib]) + ) + diff --git a/mingw-w64-id3lib/60-add-c-wrapper-functions.patch b/mingw-w64-id3lib/60-add-c-wrapper-functions.patch new file mode 100644 index 0000000000..d72e81c0ec --- /dev/null +++ b/mingw-w64-id3lib/60-add-c-wrapper-functions.patch @@ -0,0 +1,58 @@ +This patch adds C wrapper functions for field encoding. + +It was first introduced in version 3.8.3-8 and fixes +http://bugs.debian.org/281292 +--- a/include/id3.h ++++ b/include/id3.h +@@ -104,6 +104,9 @@ + ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength); + ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName); + ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName); ++ ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc); ++ ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field); ++ ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field); + + /* field-info wrappers */ + ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid); +--- a/src/c_wrapper.cpp ++++ b/src/c_wrapper.cpp +@@ -681,6 +681,39 @@ + } + } + ++ ID3_C_EXPORT bool CCONV ++ ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc) ++ { ++ bool changed = false; ++ if (field) ++ { ++ ID3_CATCH(changed = reinterpret_cast(field)->SetEncoding(enc)); ++ } ++ return changed; ++ } ++ ++ ID3_C_EXPORT ID3_TextEnc CCONV ++ ID3Field_GetEncoding(const ID3Field *field) ++ { ++ ID3_TextEnc enc = ID3TE_NONE; ++ if (field) ++ { ++ ID3_CATCH(enc = reinterpret_cast(field)->GetEncoding()); ++ } ++ return enc; ++ } ++ ++ ID3_C_EXPORT bool CCONV ++ ID3Field_IsEncodable(const ID3Field *field) ++ { ++ bool isEncodable = false; ++ if (field) ++ { ++ ID3_CATCH(isEncodable = reinterpret_cast(field)->IsEncodable()); ++ } ++ return isEncodable; ++ } ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/mingw-w64-id3lib/60-fix_make_check.patch b/mingw-w64-id3lib/60-fix_make_check.patch new file mode 100644 index 0000000000..e2bb1b0518 --- /dev/null +++ b/mingw-w64-id3lib/60-fix_make_check.patch @@ -0,0 +1,50 @@ +This patch fixes some function headers and imports in order for 'make check' +to work. + +It was first introduced in version 3.8.3-9 +diff -Naur id3lib-3.8.3.orig/examples/findeng.cpp id3lib-3.8.3/examples/findeng.cpp +--- id3lib-3.8.3.orig/examples/findeng.cpp 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/examples/findeng.cpp 2009-12-10 00:58:12.173795997 +0100 +@@ -9,7 +9,7 @@ + using std::cout; + using std::endl; + +-int main(unsigned argc, char* argv[]) ++int main(int argc, char* argv[]) + { + ID3D_INIT_DOUT(); + ID3D_INIT_WARNING(); +diff -Naur id3lib-3.8.3.orig/examples/findstr.cpp id3lib-3.8.3/examples/findstr.cpp +--- id3lib-3.8.3.orig/examples/findstr.cpp 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/examples/findstr.cpp 2009-12-10 00:57:48.036819825 +0100 +@@ -9,7 +9,7 @@ + using std::cout; + using std::endl; + +-int main(unsigned argc, char* argv[]) ++int main(int argc, char* argv[]) + { + ID3D_INIT_DOUT(); + ID3D_INIT_WARNING(); +diff -Naur id3lib-3.8.3.orig/examples/test_io.cpp id3lib-3.8.3/examples/test_io.cpp +--- id3lib-3.8.3.orig/examples/test_io.cpp 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/examples/test_io.cpp 2009-12-10 00:57:03.612111640 +0100 +@@ -11,6 +11,9 @@ + #include + #include + ++using std::cin; ++using std::hex; ++using std::dec; + using std::cout; + using std::endl; + using std::cerr; +@@ -18,7 +21,7 @@ + using namespace dami; + + int +-main(size_t argc, const char** argv) ++main(int argc, const char** argv) + { + ID3D_INIT_DOUT(); + ID3D_INIT_WARNING(); diff --git a/mingw-w64-id3lib/60-id3lib-missing-nullpointer-check.patch b/mingw-w64-id3lib/60-id3lib-missing-nullpointer-check.patch new file mode 100644 index 0000000000..d4ca5d292f --- /dev/null +++ b/mingw-w64-id3lib/60-id3lib-missing-nullpointer-check.patch @@ -0,0 +1,12 @@ +This patch adds a check for a null pointer +--- a/src/header_tag.cpp ++++ b/src/header_tag.cpp +@@ -54,7 +54,7 @@ + { + size_t bytesUsed = ID3_TagHeader::SIZE; + +- if (_info->is_extended) ++ if (_info && _info->is_extended) + { + bytesUsed += _info->extended_bytes; + } diff --git a/mingw-w64-id3lib/60-spelling.patch b/mingw-w64-id3lib/60-spelling.patch new file mode 100644 index 0000000000..89040e29ca --- /dev/null +++ b/mingw-w64-id3lib/60-spelling.patch @@ -0,0 +1,107 @@ +This patch fixes some minor spelling mistakes +diff -Naur id3lib-3.8.3.orig//ChangeLog id3lib-3.8.3//ChangeLog +--- id3lib-3.8.3.orig//ChangeLog 2010-06-08 05:21:47.817061336 +0200 ++++ id3lib-3.8.3//ChangeLog 2010-06-08 05:21:05.320811354 +0200 +@@ -2266,7 +2266,7 @@ + * examples/demo_info.cpp (1.19): + (PrintInformation): When printing synced lyrics info, now uses a + MemoryReader, BinaryNumberReader, and TextReader to extract the +- infromation from the binary field. This is a cheat, since these ++ information from the binary field. This is a cheat, since these + classes aren't normally exposed to folks using the library. + Hopefully they will be exposed soon enough for the next major + release. +diff -Naur id3lib-3.8.3.orig//doc/id3v2.3.0.html id3lib-3.8.3//doc/id3v2.3.0.html +--- id3lib-3.8.3.orig//doc/id3v2.3.0.html 2010-06-08 05:21:47.859810543 +0200 ++++ id3lib-3.8.3//doc/id3v2.3.0.html 2010-06-08 05:21:05.373811128 +0200 +@@ -2157,7 +2157,7 @@ + 64.Native American + 65.Cabaret + 66.New Wave +- 67.Psychadelic ++ 67.Psychedelic + 68.Rave + 69.Showtunes + 70.Trailer +@@ -2254,4 +2254,4 @@ + Email: johan@id3.org +

+ +- +\ No newline at end of file ++ +diff -Naur id3lib-3.8.3.orig//doc/id3v2.3.0.txt id3lib-3.8.3//doc/id3v2.3.0.txt +--- id3lib-3.8.3.orig//doc/id3v2.3.0.txt 2010-06-08 05:21:47.860810639 +0200 ++++ id3lib-3.8.3//doc/id3v2.3.0.txt 2010-06-08 05:21:05.374811307 +0200 +@@ -1929,7 +1929,7 @@ + 64.Native American + 65.Cabaret + 66.New Wave +- 67.Psychadelic ++ 67.Psychedelic + 68.Rave + 69.Showtunes + 70.Trailer +diff -Naur id3lib-3.8.3.orig//id3com/id3com.idl id3lib-3.8.3//id3com/id3com.idl +--- id3lib-3.8.3.orig//id3com/id3com.idl 2010-06-08 05:21:47.818060988 +0200 ++++ id3lib-3.8.3//id3com/id3com.idl 2010-06-08 05:21:05.355061546 +0200 +@@ -179,7 +179,7 @@ + /* USER */ ID3_TERMSOFUSE, /**< Terms of use */ + /* USLT */ ID3_UNSYNCEDLYRICS, /**< Unsynchronized lyric/text transcription */ + /* WCOM */ ID3_WWWCOMMERCIALINFO, /**< Commercial information */ +- /* WCOP */ ID3_WWWCOPYRIGHT, /**< Copyright/Legal infromation */ ++ /* WCOP */ ID3_WWWCOPYRIGHT, /**< Copyright/Legal information */ + /* WOAF */ ID3_WWWAUDIOFILE, /**< Official audio file webpage */ + /* WOAR */ ID3_WWWARTIST, /**< Official artist/performer webpage */ + /* WOAS */ ID3_WWWAUDIOSOURCE, /**< Official audio source webpage */ +diff -Naur id3lib-3.8.3.orig//include/id3/globals.h id3lib-3.8.3//include/id3/globals.h +--- id3lib-3.8.3.orig//include/id3/globals.h 2010-06-08 05:21:47.818060988 +0200 ++++ id3lib-3.8.3//include/id3/globals.h 2010-06-08 05:22:27.395811102 +0200 +@@ -313,7 +313,7 @@ + /* USER */ ID3FID_TERMSOFUSE, /**< Terms of use */ + /* USLT */ ID3FID_UNSYNCEDLYRICS, /**< Unsynchronized lyric/text transcription */ + /* WCOM */ ID3FID_WWWCOMMERCIALINFO, /**< Commercial information */ +- /* WCOP */ ID3FID_WWWCOPYRIGHT, /**< Copyright/Legal infromation */ ++ /* WCOP */ ID3FID_WWWCOPYRIGHT, /**< Copyright/Legal information */ + /* WOAF */ ID3FID_WWWAUDIOFILE, /**< Official audio file webpage */ + /* WOAR */ ID3FID_WWWARTIST, /**< Official artist/performer webpage */ + /* WOAS */ ID3FID_WWWAUDIOSOURCE, /**< Official audio source webpage */ +@@ -608,7 +608,7 @@ + "Native American", //64 + "Cabaret", //65 + "New Wave", //66 +- "Psychadelic", //67 ++ "Psychedelic", //67 + "Rave", //68 + "Showtunes", //69 + "Trailer", //70 +@@ -686,7 +686,7 @@ + "Christian Rock ", //141 + "Merengue", //142 + "Salsa", //143 +- "Trash Metal", //144 ++ "Thrash Metal", //144 + "Anime", //145 + "JPop", //146 + "Synthpop" //147 +diff -Naur id3lib-3.8.3.orig//src/field.cpp id3lib-3.8.3//src/field.cpp +--- id3lib-3.8.3.orig//src/field.cpp 2010-06-08 05:21:47.818060988 +0200 ++++ id3lib-3.8.3//src/field.cpp 2010-06-08 05:21:05.373811128 +0200 +@@ -719,7 +719,7 @@ + // USER ID3FID_TERMSOFUSE Terms of use + // USLT ULT ID3FID_UNSYNCEDLYRICS Unsynchronized lyric/text transcription + // WCOM WCM ID3FID_WWWCOMMERCIALINFO Commercial information +-// WCOP WCM ID3FID_WWWCOPYRIGHT Copyright/Legal infromation ++// WCOP WCM ID3FID_WWWCOPYRIGHT Copyright/Legal information + // WOAF WCP ID3FID_WWWAUDIOFILE Official audio file webpage + // WOAR WAF ID3FID_WWWARTIST Official artist/performer webpage + // WOAS WAR ID3FID_WWWAUDIOSOURCE Official audio source webpage +@@ -813,7 +813,7 @@ + {ID3FID_TERMSOFUSE, "" , "USER", false, false, ID3FD_TermsOfUse, "Terms of use"}, + {ID3FID_UNSYNCEDLYRICS, "ULT", "USLT", false, false, ID3FD_GeneralText, "Unsynchronized lyric/text transcription"}, + {ID3FID_WWWCOMMERCIALINFO, "WCM", "WCOM", false, false, ID3FD_URL, "Commercial information"}, +- {ID3FID_WWWCOPYRIGHT, "WCP", "WCOP", false, false, ID3FD_URL, "Copyright/Legal infromation"}, ++ {ID3FID_WWWCOPYRIGHT, "WCP", "WCOP", false, false, ID3FD_URL, "Copyright/Legal information"}, + {ID3FID_WWWAUDIOFILE, "WAF", "WOAF", false, false, ID3FD_URL, "Official audio file webpage"}, + {ID3FID_WWWARTIST, "WAR", "WOAR", false, false, ID3FD_URL, "Official artist/performer webpage"}, + {ID3FID_WWWAUDIOSOURCE, "WAS", "WOAS", false, false, ID3FD_URL, "Official audio source webpage"}, diff --git a/mingw-w64-id3lib/61-fix_vbr_stack_smash.patch b/mingw-w64-id3lib/61-fix_vbr_stack_smash.patch new file mode 100644 index 0000000000..9bf33e9787 --- /dev/null +++ b/mingw-w64-id3lib/61-fix_vbr_stack_smash.patch @@ -0,0 +1,19 @@ +Description: Fix crashes when reading VBR MP3 file. +Bug-Ubuntu: https://launchpad.net/bugs/444466 +Origin: upstream, http://sourceforge.net/tracker/?func=detail&aid=937707&group_id=979&atid=300979 +Forwarded: yes +Author: Urs Fleisch + +Index: id3lib3.8.3-3.8.3/src/mp3_parse.cpp +=================================================================== +--- id3lib3.8.3-3.8.3.orig/src/mp3_parse.cpp 2009-10-06 23:12:10.381250132 +0200 ++++ id3lib3.8.3-3.8.3/src/mp3_parse.cpp 2009-10-06 23:14:09.545252591 +0200 +@@ -465,7 +465,7 @@ + // from http://www.xingtech.com/developer/mp3/ + + const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed +- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional ++ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional + + if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE) + { diff --git a/mingw-w64-id3lib/70-id3lib-3.8.3-autoreconf.patch b/mingw-w64-id3lib/70-id3lib-3.8.3-autoreconf.patch new file mode 100644 index 0000000000..84266d644a --- /dev/null +++ b/mingw-w64-id3lib/70-id3lib-3.8.3-autoreconf.patch @@ -0,0 +1,161 @@ +Patch by FrantiÅ¡ek Dvořák + +https://bugzilla.redhat.com/show_bug.cgi?id=1066559 + +diff -urN id3lib-3.8.3.old/configure.in id3lib-3.8.3/configure.in +--- id3lib-3.8.3.old/configure.in 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/configure.in 2014-02-24 21:46:57.974108875 +0000 +@@ -15,11 +15,13 @@ + # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +-# require autoconf 2.13 +-AC_PREREQ(2.13) ++# require autoconf 2.69 ++AC_PREREQ(2.69) + + # init autoconf (and check for presence fo reconf) +-AC_INIT(reconf) ++AC_INIT([id3lib], [3.8.3]) ++AC_CONFIG_SRCDIR([reconf]) ++AC_CONFIG_MACRO_DIR([m4]) + + ID3LIB_NAME=id3lib + +@@ -83,14 +85,14 @@ + + AC_SUBST(ID3LIB_FULLNAME) + +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + +-AM_INIT_AUTOMAKE($PACKAGE,$VERSION) ++AM_INIT_AUTOMAKE + + AC_ISC_POSIX + + dnl Initialize libtool +-AM_PROG_LIBTOOL ++LT_INIT + + dnl Initialize maintainer mode + AM_MAINTAINER_MODE +@@ -168,7 +170,7 @@ + iconv_oldstyle=1, iconv_oldstyle=0) + if test $iconv_oldstyle = 1; then + AC_MSG_RESULT(const char **) +- AC_DEFINE(ID3LIB_ICONV_OLDSTYLE) ++ AC_DEFINE(ID3LIB_ICONV_OLDSTYLE, [], [Old-style iconv interface]) + #we'll check out the need of + #typecast in the call of iconv_open + AC_MSG_CHECKING(whether to typecast in iconv) +@@ -184,7 +186,7 @@ + iconv_cast=0, iconv_cast=1) + if test $iconv_cast = 1; then + AC_MSG_RESULT(yes) +- AC_DEFINE(ID3LIB_ICONV_CAST_OK) ++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [iconv type cast]) + else + AC_MSG_RESULT(no) + fi +@@ -206,7 +208,7 @@ + iconv_cast=0, iconv_cast=1) + if test $iconv_cast = 1; then + AC_MSG_RESULT(yes) +- AC_DEFINE(ID3LIB_ICONV_CAST_OK) ++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [iconv type cast]) + else + AC_MSG_RESULT(no) + fi +diff -urN id3lib-3.8.3.old/examples/Makefile.am id3lib-3.8.3/examples/Makefile.am +--- id3lib-3.8.3.old/examples/Makefile.am 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/examples/Makefile.am 2014-02-24 21:21:51.645554552 +0000 +@@ -30,7 +30,7 @@ + + LDADD = $(top_builddir)/src/libid3.la $(zlib_lib) $(ID3_DEBUG_LIBS) $(getopt_lib) + +-INCLUDES = @ID3LIB_DEBUG_FLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @ID3LIB_DEBUG_FLAGS@ -I$(top_srcdir)/include + + bin_PROGRAMS = id3info id3convert id3tag id3cp + check_PROGRAMS = \ +diff -urN id3lib-3.8.3.old/m4/id3_cxx.m4 id3lib-3.8.3/m4/id3_cxx.m4 +--- id3lib-3.8.3.old/m4/id3_cxx.m4 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/m4/id3_cxx.m4 2014-02-24 21:21:51.650554401 +0000 +@@ -68,7 +68,7 @@ + dnl #undef CXX_HAS_NO_BOOL + dnl END ACCONFIG + +-AC_DEFUN(ID3_CXX_PORTABILITY,[ ++AC_DEFUN([ID3_CXX_PORTABILITY],[ + + AC_PROVIDE([$0]) + +diff -urN id3lib-3.8.3.old/m4/id3_unicode.m4 id3lib-3.8.3/m4/id3_unicode.m4 +--- id3lib-3.8.3.old/m4/id3_unicode.m4 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/m4/id3_unicode.m4 2014-02-24 21:21:51.654554280 +0000 +@@ -5,7 +5,7 @@ + dnl #undef ID3_ICONV_FORMAT_ASCII + dnl END ACCONFIG + +-AC_DEFUN(ID3_CHECK_ICONV_FORMAT,[ ++AC_DEFUN([ID3_CHECK_ICONV_FORMAT],[ + if eval "test \"x\$$1\" = \"xno\""; then + AC_MSG_CHECKING(whether iconv supports $2) + AC_TRY_RUN([#include +diff -urN id3lib-3.8.3.old/Makefile.am id3lib-3.8.3/Makefile.am +--- id3lib-3.8.3.old/Makefile.am 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/Makefile.am 2014-02-24 21:21:51.659554129 +0000 +@@ -11,6 +11,7 @@ + + # require automake 1.5 + AUTOMAKE_OPTIONS = 1.5 ++ACLOCAL_AMFLAGS = -I m4 + + EXTRA_DIST = \ + HISTORY \ +@@ -30,7 +31,7 @@ + SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples + DIST_SUBDIRS = . m4 zlib doc include id3com src examples prj libprj + +-INCLUDES = @ID3LIB_DEBUG_FLAGS@ ++AM_CPPFLAGS = @ID3LIB_DEBUG_FLAGS@ + + config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status +diff -urN id3lib-3.8.3.old/src/Makefile.am id3lib-3.8.3/src/Makefile.am +--- id3lib-3.8.3.old/src/Makefile.am 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/src/Makefile.am 2014-02-24 21:21:51.664553979 +0000 +@@ -17,7 +17,7 @@ + zlib_include = + endif + +-INCLUDES = \ ++AM_CPPFLAGS = \ + @ID3LIB_DEBUG_FLAGS@ -I$(top_srcdir)/include/id3 -I$(top_srcdir)/include $(zlib_include) + + noinst_HEADERS = \ +diff -urN id3lib-3.8.3.old/zlib/configure.in id3lib-3.8.3/zlib/configure.in +--- id3lib-3.8.3.old/zlib/configure.in 2003-03-02 00:23:00.000000000 +0000 ++++ id3lib-3.8.3/zlib/configure.in 2014-02-24 21:49:18.990854419 +0000 +@@ -14,16 +14,13 @@ + AC_PREREQ(2.13) + + # init autoconf (and check for presence of reconf) +-AC_INIT(reconf) ++AC_INIT([zlib], [1.1.3]) + +-VERSION=1.1.3 +-PACKAGE=zlib +- +-AM_INIT_AUTOMAKE($PACKAGE,$VERSION) +-AM_CONFIG_HEADER(config.h) ++AM_INIT_AUTOMAKE ++AC_CONFIG_HEADERS(config.h) + + dnl Initialize libtool +-AC_PROG_LIBTOOL ++LT_INIT + + dnl Initialize maintainer mode + AM_MAINTAINER_MODE diff --git a/mingw-w64-id3lib/PKGBUILD b/mingw-w64-id3lib/PKGBUILD new file mode 100644 index 0000000000..e24bf565d0 --- /dev/null +++ b/mingw-w64-id3lib/PKGBUILD @@ -0,0 +1,98 @@ +# Maintainer: Alexey Pavlov + +_realname=id3lib +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.8.3 +pkgrel=2 +pkgdesc='Library for reading, writing, and manipulating ID3v1 and ID3v2 tags (mingw-w64)' +arch=('any') +license=('LGPL') +url="http://id3lib.sourceforge.net/" +options=('staticlibs') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-zlib" ) +source=(http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-${pkgver}.tar.gz + 00-add-libz-to-compilation.patch + 05-create-m4-directory.patch + 10-fix-compilation-with-cpp-headers.patch + 15-fix-headers-of-main-functions.patch + 20-create-manpages.patch + 30-fix-utf16.patch + 40-deal-with-mkstemp.patch + 50-remove-outdated-check.patch + 60-add-c-wrapper-functions.patch + 60-fix_make_check.patch + 60-id3lib-missing-nullpointer-check.patch + 60-spelling.patch + 61-fix_vbr_stack_smash.patch + 70-id3lib-3.8.3-autoreconf.patch + 100-id3lib-3.8.3-mingw.patch) + +md5sums=('19f27ddd2dda4b2d26a559a4f0f402a7' + '9428ef38283d13adb6e349089537a63f' + '5a78e0fe586fba334eae2a29e4bf5a28' + '88f21f1bf4f697be8030706bbec11705' + 'b3de841cd2eda0d37c8c8330119e12d4' + '0c7c939943bdfcc3a0f6be95fe9b2367' + '74ba59c03f91fedbe4dd8045b29c7e15' + 'd2d06d46df3867d73746f584d1e6fcc5' + 'd3a61d07a2bfa83f4ac6290794789022' + '93ef4b26ad08027e28d3f80ad6e492b4' + '5c4b53a3d5543c5c50b23d6d5b9f230b' + '964fa0db0da7b1495b34b81bd36539fd' + '96e0aec669434fa5a9838cfb4bd950ef' + '0973e285cdc420130b984a259cdd8ae0' + 'd445d4fa60b98b947969cd24f10eac66' + '5751591c71cfeb7d434666761840b2e7') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + patch -p1 -i ../00-add-libz-to-compilation.patch + patch -p1 -i ../05-create-m4-directory.patch + patch -p1 -i ../10-fix-compilation-with-cpp-headers.patch + patch -p1 -i ../15-fix-headers-of-main-functions.patch + patch -p1 -i ../20-create-manpages.patch + patch -p1 -i ../30-fix-utf16.patch + patch -p1 -i ../40-deal-with-mkstemp.patch + patch -p1 -i ../60-add-c-wrapper-functions.patch + patch -p1 -i ../60-fix_make_check.patch + patch -p1 -i ../60-id3lib-missing-nullpointer-check.patch + patch -p1 -i ../60-spelling.patch + patch -p1 -i ../61-fix_vbr_stack_smash.patch + patch -p1 -i ../50-remove-outdated-check.patch + patch -p1 -i ../70-id3lib-3.8.3-autoreconf.patch + patch -p1 -i ../100-id3lib-3.8.3-mingw.patch + + libtoolize -fc + WANT_AUTOMAKE=latest aclocal + WANT_AUTOMAKE=latest autoconf + WANT_AUTOMAKE=latest automake --add-missing --copy +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + LC_ALL=C make +} + +check() { + cd "${srcdir}/${_realname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -d "${pkgdir}${MINGW_PREFIX}"/share/man/man1 + cp ${srcdir}/${_realname}-${pkgver}/doc/man/* "${pkgdir}${MINGW_PREFIX}"/share/man/man1 +} diff --git a/mingw-w64-ilmbase/PKGBUILD b/mingw-w64-ilmbase/PKGBUILD index e5b0f38aaf..9a4e1ee2c3 100644 --- a/mingw-w64-ilmbase/PKGBUILD +++ b/mingw-w64-ilmbase/PKGBUILD @@ -3,12 +3,12 @@ _realname=ilmbase pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Base libraries from ILM for OpenEXR (mingw-w64)" arch=('any') url="http://http://www.openexr.com/" license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "libtool") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') source=("http://download.savannah.nongnu.org/releases/openexr/${_realname}-${pkgver}.tar.gz" @@ -26,24 +26,26 @@ md5sums=('b540db502c5fa42078249f43d18a4652' 'baaa4fa9467969a611c70e62efa1fe6b' '20447d0f67bbcd7b98d51fd0c37dabec') prepare(){ - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" # Use either one or the other of the ilmthread patches # depending on the sort of threads that you want. - # patch -Np1 -i "$srcdir/ilmthread-mingw-win32.patch" - patch -Np1 -i "$srcdir/ilmthread-mingw-pthreads.patch" - patch -Np1 -i "$srcdir/ilmbase-2.1.0_obsolete-macros.patch" - patch -Np1 -i "$srcdir/cmake-soversion.patch" - patch -Np1 -i "$srcdir/cmake-install-binaries.patch" - patch -Np2 -i "$srcdir/pull93.patch" - #./bootstrap + # patch -p1 -i "${srcdir}/ilmthread-mingw-win32.patch" + patch -p1 -i "${srcdir}/ilmthread-mingw-pthreads.patch" + patch -p1 -i "${srcdir}/ilmbase-2.1.0_obsolete-macros.patch" + patch -p1 -i "${srcdir}/cmake-soversion.patch" + patch -p1 -i "${srcdir}/cmake-install-binaries.patch" + patch -p2 -i "${srcdir}/pull93.patch" } build() { - mkdir build-${CARCH} - cd build-${CARCH} + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=ON \ -DNAMESPACE_VERSIONING=ON \ ../${_realname}-${pkgver} @@ -52,12 +54,6 @@ build() { } package() { - cd "${srcdir}/build-${CARCH}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/IlmBase.pc + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-imagemagick/002-build-fixes.patch b/mingw-w64-imagemagick/002-build-fixes.patch new file mode 100644 index 0000000000..f4b7f58d97 --- /dev/null +++ b/mingw-w64-imagemagick/002-build-fixes.patch @@ -0,0 +1,53 @@ +--- ImageMagick-6.9.0-4/magick/distribute-cache.c.orig 2015-01-18 16:07:04.357600000 +0300 ++++ ImageMagick-6.9.0-4/magick/distribute-cache.c 2015-01-18 16:11:40.668800000 +0300 +@@ -86,6 +86,8 @@ + #define SOCKET_TYPE int + #define MAGICKCORE_HAVE_DISTRIBUTE_CACHE + #elif defined(MAGICKCORE_WINDOWS_SUPPORT) ++#include ++#include + #define CHAR_TYPE_CAST (char *) + #define CLOSE_SOCKET(socket) (void) closesocket(socket) + #define HANDLER_RETURN_TYPE DWORD WINAPI +--- ImageMagick-6.9.0-4/magick/nt-base.h.orig 2015-01-18 16:39:35.182400000 +0300 ++++ ImageMagick-6.9.0-4/magick/nt-base.h 2015-01-18 16:39:37.740800000 +0300 +@@ -38,6 +38,8 @@ + #include + #include + #include ++#include ++#include + #if defined(_DEBUG) && !defined(__MINGW32__) && !defined(__MINGW64__) + #include + #endif +--- ImageMagick-6.9.0-4/magick/nt-base.c.orig 2015-02-22 22:02:34.000000000 +0100 ++++ ImageMagick-6.9.0-4/magick/nt-base.c 2015-05-12 13:31:02.627609000 +0200 +@@ -1625,12 +1625,16 @@ + wchar_t + file_specification[MaxTextExtent]; + ++ wchar_t WCDirectorySeparator[strlen(DirectorySeparator)+1]; ++ MultiByteToWideChar(CP_UTF8,0,DirectorySeparator,-1,WCDirectorySeparator, ++ strlen(DirectorySeparator)+1); ++ + assert(path != (const char *) NULL); + length=MultiByteToWideChar(CP_UTF8,0,path,-1,file_specification, + MaxTextExtent); + if (length == 0) + return((DIR *) NULL); +- if(wcsncat(file_specification,(const wchar_t*) DirectorySeparator, ++ if(wcsncat(file_specification, WCDirectorySeparator, + MaxTextExtent-wcslen(file_specification)-1) == (wchar_t*) NULL) + return((DIR *) NULL); + entry=(DIR *) AcquireMagickMemory(sizeof(DIR)); +--- ImageMagick-6.9.1-2/magick/locale.c.orig 2015-05-12 14:33:17.733600000 +0300 ++++ ImageMagick-6.9.1-2/magick/locale.c 2015-05-12 14:33:31.274400000 +0300 +@@ -254,7 +254,7 @@ + #if defined(MAGICKCORE_HAVE_NEWLOCALE) + if (c_locale != (locale_t) NULL) + freelocale(c_locale); +-#elif defined(MAGICKCORE_WINDOWS_SUPPORT) ++#elif defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__) + if (c_locale != (locale_t) NULL) + _free_locale(c_locale); + #endif diff --git a/mingw-w64-imagemagick/PKGBUILD b/mingw-w64-imagemagick/PKGBUILD index 39aa90912d..0d3b462356 100644 --- a/mingw-w64-imagemagick/PKGBUILD +++ b/mingw-w64-imagemagick/PKGBUILD @@ -1,63 +1,70 @@ # Maintainer: Alexey Pavlov _realname=imagemagick +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.9.0.0 +pkgver=6.9.2.10 pkgrel=1 pkgdesc="An image viewing/manipulation program (mingw-w64)" arch=('any') url="http://www.imagemagick.org/" license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-pango" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-librsvg" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-ghostscript") -depends=("${MINGW_PACKAGE_PREFIX}-libtool" - "${MINGW_PACKAGE_PREFIX}-djvulibre" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-liblqr" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-xz" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-fftw" - "${MINGW_PACKAGE_PREFIX}-openjpeg2" - #"${MINGW_PACKAGE_PREFIX}-perl" +makedepends=("${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-ghostscript" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-pango" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + ) +depends=("${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-djvulibre" + "${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-jbigkit" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-liblqr" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libtool" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-openjpeg2" + #"${MINGW_PACKAGE_PREFIX}-perl" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib" ) optdepends=("${MINGW_PACKAGE_PREFIX}-ghostscript: for Ghostscript support" - "${MINGW_PACKAGE_PREFIX}-openexr: for OpenEXR support" - "${MINGW_PACKAGE_PREFIX}-librsvg: for SVG support" - "${MINGW_PACKAGE_PREFIX}-libxml2: for XML support" - "${MINGW_PACKAGE_PREFIX}-jasper: for JPEG-2000 support" - "${MINGW_PACKAGE_PREFIX}-libpng: for PNG support" - "${MINGW_PACKAGE_PREFIX}-libtiff: for PNG support" - "${MINGW_PACKAGE_PREFIX}-libwebp: for WEBP support") + "${MINGW_PACKAGE_PREFIX}-openexr: for OpenEXR support" + "${MINGW_PACKAGE_PREFIX}-librsvg: for SVG support" + "${MINGW_PACKAGE_PREFIX}-libxml2: for XML support" + #"${MINGW_PACKAGE_PREFIX}-jasper: for JPEG-2000 support" + #"${MINGW_PACKAGE_PREFIX}-libpng: for PNG support" + #"${MINGW_PACKAGE_PREFIX}-libtiff: for PNG support" + #"${MINGW_PACKAGE_PREFIX}-libwebp: for WEBP support" + ) options=('staticlibs' 'strip' '!debug' 'libtool') -source=(ftp://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz{,.asc} +source=(http://www.imagemagick.org/download/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz{,.asc} ImageMagick-6.8.8.1-mingw.patch 001-relocate.patch + 002-build-fixes.patch winpath.patch) -md5sums=('3714e7d5d248c13aee95a7f54970349f' +md5sums=('d3b361617d147d1a8f58a77930db3d0d' 'SKIP' 'c95a23e8562dbab4e6b0e5407da25209' '7821087a00c459c0d3482508fdc1e25e' + '205544b0317bc277ba0945821d4d568b' 'b0b634231da667d7472522fc08fd3519') prepare() { cd ImageMagick-${pkgver%.*}-${pkgver##*.} + rm -f magick/pathtools{.c,.h} > /dev/null 2>&1 || true patch -p1 -i ${srcdir}/ImageMagick-6.8.8.1-mingw.patch patch -p1 -i ${srcdir}/001-relocate.patch + patch -p1 -i ${srcdir}/002-build-fixes.patch #patch -p1 -i ${srcdir}/winpath.patch autoreconf -fi } @@ -66,8 +73,8 @@ build() { export lt_cv_deplibs_check_method='pass_all' [[ $CARCH = "i686" ]] && EXTRAOPTS="--with-gcc-arch=i686" [[ $CARCH = "x86_64" ]] && EXTRAOPTS="--with-gcc-arch=x86-64" - - #cd ImageMagick-${pkgver%.*}-${pkgver##*.} + + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} ../ImageMagick-${pkgver%.*}-${pkgver##*.}/configure \ --prefix=${MINGW_PREFIX} \ @@ -91,15 +98,22 @@ build() { --without-autotrace \ --without-dps \ --without-fpx \ - --without-jbig \ + --with-jbig \ --without-ltdl \ --without-perl \ --without-x \ - $EXTRAOPTS + --with-windows-font-dir=c:/Windows/fonts \ + $EXTRAOPTS \ + CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" - make + if check_option "debug" "y"; then + MAKE_VERBOSE="V=1" + fi + make ${MAKE_VERBOSE} #--enable-opencl \ + # --with-gs-font-dir=${MINGW_PREFIX}/ \ + # --with-dejavu-font-dir= \ #--with-gslib \ #--with-gs-font-dir=/usr/share/fonts/Type1 #--with-perl-options="INSTALLDIRS=vendor" @@ -107,7 +121,10 @@ build() { package() { cd ${srcdir}/build-${MINGW_CHOST} - make -j1 DESTDIR="${pkgdir}" install + if check_option "debug" "y"; then + MAKE_VERBOSE="V=1" + fi + make -j1 DESTDIR="${pkgdir}" install ${MAKE_VERBOSE} #find . -name "*.xml" -exec sed -i "s/${MINGW_PREFIX}/newWord/g" '{}' \; diff --git a/mingw-w64-indent/PKGBUILD b/mingw-w64-indent/PKGBUILD new file mode 100644 index 0000000000..2d7a912d9d --- /dev/null +++ b/mingw-w64-indent/PKGBUILD @@ -0,0 +1,68 @@ +# $Id$ +# Maintainer (MSYS2): Ray Donnelly + +_realname=indent +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.2.11 +pkgrel=4 +pkgdesc="C language source code formatting program (mingw-w64)" +arch=('any') +url="https://www.gnu.org/software/indent/" +license=('GPL3') +makedepends=('texinfo-tex') +source=(http://ftp.de.debian.org/debian/pool/main/i/indent/${_realname}_${pkgver}.orig.tar.gz + indent-2.2.11-segfault.patch + indent-2.2.11-LC_ALL.patch + indent-2.2.11-decimal_format.patch + indent-2.2.11-win32-wildexp-automake-support.patch + indent-2.2.11-disable-documentation.patch) +sha1sums=('9b242528bbc4914464117c69ffae9df24d3fa4a7' + '31a6dcd5edcac4decac81dbb52bc9415b8b148e4' + '91b210b666de59ca44524288a4c1ebd213570daa' + '2b7d5a725fe307ce81565f920a0a66b319b50c91' + '2593b852bcacd5897d7aab5470d36c761c73838e' + '37962fa20909f698eeafec7609020b30b2c26ea6') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + rm -rf regression/input/float-constant-suffix.c \ + regression/standard/float-constant-suffix.c > /dev/null 2>&1 || true + + patch -Np1 -i ../indent-2.2.11-segfault.patch + + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=205692 + patch -Np1 -i ../indent-2.2.11-LC_ALL.patch + + # https://lists.gnu.org/archive/html/bug-indent/2011-08/msg00000.html + patch -Np1 -i ../indent-2.2.11-decimal_format.patch + + patch -Np1 -i ../indent-2.2.11-win32-wildexp-automake-support.patch + + patch -Np1 -i ../indent-2.2.11-disable-documentation.patch + + # sed -i 's/-number/-number-sections/' doc/Makefile.in + + autoreconf -vfi +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --{host,build}=${MINGW_CHOST} + + make -j1 +} + +check() { + cd "${srcdir}"/${_realname}-${pkgver}/regression + make test +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR="${pkgdir}" install + rm "${pkgdir}"${MINGW_PREFIX}/bin/texinfo2man.exe +} diff --git a/mingw-w64-indent/indent-2.2.11-LC_ALL.patch b/mingw-w64-indent/indent-2.2.11-LC_ALL.patch new file mode 100644 index 0000000000..0ffe56d3c9 --- /dev/null +++ b/mingw-w64-indent/indent-2.2.11-LC_ALL.patch @@ -0,0 +1,17 @@ +From: Santiago Vila +Subject: setlocale using LC_ALL, not LC_MESSAGES +Bug-Debian: http://bugs.debian.org/205692 + +--- a/src/indent.c ++++ b/src/indent.c +@@ -1008,8 +1008,8 @@ + BOOLEAN using_stdin = false; + exit_values_ty exit_status; + +-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) && defined (HAVE_LCCTYPES) +- setlocale(LC_MESSAGES, ""); ++#if defined (HAVE_SETLOCALE) ++ setlocale(LC_ALL, ""); + #endif + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); diff --git a/mingw-w64-indent/indent-2.2.11-decimal_format.patch b/mingw-w64-indent/indent-2.2.11-decimal_format.patch new file mode 100644 index 0000000000..ea34d0ea71 --- /dev/null +++ b/mingw-w64-indent/indent-2.2.11-decimal_format.patch @@ -0,0 +1,98 @@ +From ff47ab3b90333bdfaa40b86cb548e92a01787345 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 25 Aug 2011 11:26:24 +0200 +Subject: [PATCH] Do not split decimal float suffix from constant + +N1312 draft of ISO/IEC WDTR24732 defines additional floating types +with given suffixes: + +_Decimal32 DF, df +_Decimal64 DD, dd +_Decimal128 DL, dl + +These suffixes must stick on numeric part of the constant as classic +float or long float does. +--- + regression/TEST | 3 ++- + regression/input/float-constant-suffix.c | 13 +++++++++++++ + regression/standard/float-constant-suffix.c | 13 +++++++++++++ + src/lexi.c | 9 +++++++++ + 4 files changed, 37 insertions(+), 1 deletions(-) + create mode 100644 regression/input/float-constant-suffix.c + create mode 100644 regression/standard/float-constant-suffix.c + +diff --git a/regression/TEST b/regression/TEST +index c860ef2..1402ddf 100755 +--- a/regression/TEST ++++ b/regression/TEST +@@ -35,7 +35,8 @@ EXAMPLES="do.c else.c for.c func-def.c lshift.c ncs.c \ + + BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \ + one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \ +- macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c" ++ macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \ ++ float-constant-suffix.c" + + INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \ + indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \ +diff --git a/regression/input/float-constant-suffix.c b/regression/input/float-constant-suffix.c +new file mode 100644 +index 0000000..58f5310 +--- /dev/null ++++ b/regression/input/float-constant-suffix.c +@@ -0,0 +1,13 @@ ++float foo = 1.0F; ++float foo = 1.0f; ++double foo = 1.0; ++double foo = 1.0; ++long double foo = 1.0L; ++long double foo = 1.0l; ++ ++_Decimal32 foo = 1.0DF; ++_Decimal32 foo = 1.0df; ++_Decimal64 foo = 1.0DD; ++_Decimal64 foo = 1.0dd; ++_Decimal128 foo = 1.0DL; ++_Decimal128 foo = 1.0dl; +diff --git a/regression/standard/float-constant-suffix.c b/regression/standard/float-constant-suffix.c +new file mode 100644 +index 0000000..58f5310 +--- /dev/null ++++ b/regression/standard/float-constant-suffix.c +@@ -0,0 +1,13 @@ ++float foo = 1.0F; ++float foo = 1.0f; ++double foo = 1.0; ++double foo = 1.0; ++long double foo = 1.0L; ++long double foo = 1.0l; ++ ++_Decimal32 foo = 1.0DF; ++_Decimal32 foo = 1.0df; ++_Decimal64 foo = 1.0DD; ++_Decimal64 foo = 1.0dd; ++_Decimal128 foo = 1.0DL; ++_Decimal128 foo = 1.0dl; +diff --git a/src/lexi.c b/src/lexi.c +index abc2bfa..eafb65e 100644 +--- a/src/lexi.c ++++ b/src/lexi.c +@@ -330,6 +330,15 @@ extern codes_ty lexi(void) + { + buf_ptr++; + } ++ else if (*buf_ptr == 'D' || *buf_ptr == 'd') ++ { ++ if (buf_ptr[1] == 'F' || buf_ptr[1] == 'f' || ++ buf_ptr[1] == 'D' || buf_ptr[1] == 'd' || ++ buf_ptr[1] == 'L' || buf_ptr[1] == 'l') ++ { ++ buf_ptr+=2; ++ } ++ } + else + { + while (*buf_ptr == 'U' || *buf_ptr == 'u' || *buf_ptr == 'L' || *buf_ptr == 'l') +-- +1.7.6 + diff --git a/mingw-w64-indent/indent-2.2.11-disable-documentation.patch b/mingw-w64-indent/indent-2.2.11-disable-documentation.patch new file mode 100644 index 0000000000..8a6a6e42c9 --- /dev/null +++ b/mingw-w64-indent/indent-2.2.11-disable-documentation.patch @@ -0,0 +1,21 @@ +--- indent-2.2.11/configure.ac.orig 2015-03-06 22:17:50.197484100 +0000 ++++ indent-2.2.11/configure.ac 2015-03-06 22:18:02.402705900 +0000 +@@ -65,7 +65,6 @@ + po/Makefile.in + Makefile + src/Makefile +- doc/Makefile + man/Makefile + ], + [touch Makefile.in]) +--- indent-2.2.11/Makefile.am.orig 2008-05-21 21:18:40.000000000 +0100 ++++ indent-2.2.11/Makefile.am 2015-03-06 22:23:57.682642900 +0000 +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + AUTOMAKE_OPTIONS = no-texinfo.tex + +-SUBDIRS = intl src doc po man ++SUBDIRS = intl src po man + + BUILT_SOURCES = + diff --git a/mingw-w64-indent/indent-2.2.11-segfault.patch b/mingw-w64-indent/indent-2.2.11-segfault.patch new file mode 100644 index 0000000000..e919224809 --- /dev/null +++ b/mingw-w64-indent/indent-2.2.11-segfault.patch @@ -0,0 +1,16 @@ +--- a/man/texinfo2man.c ++++ b/man/texinfo2man.c +@@ -287,6 +287,13 @@ + char buf[1024]; + int line_no = 0; + ++ if (argc != 3) ++ { ++ fprintf(stderr, "Usage: %s \n", argv[0]); ++ fprintf(stderr, " The man page will be written to stdout.\n"); ++ return -1; ++ } ++ + texinfoname = argv[2]; + + in = fopen (argv[2], "r"); diff --git a/mingw-w64-indent/indent-2.2.11-win32-wildexp-automake-support.patch b/mingw-w64-indent/indent-2.2.11-win32-wildexp-automake-support.patch new file mode 100644 index 0000000000..8aec4e63d1 --- /dev/null +++ b/mingw-w64-indent/indent-2.2.11-win32-wildexp-automake-support.patch @@ -0,0 +1,30 @@ +--- indent-2.2.11/configure.ac.orig 2010-01-31 16:22:49.000000000 +0000 ++++ indent-2.2.11/configure.ac 2015-03-06 22:12:50.392705100 +0000 +@@ -50,6 +50,8 @@ + AC_CHECK_FUNCS(strchr memcpy memmove utime) + AC_CHECK_HEADERS(unistd.h string.h malloc.h utime.h sys/utime.h) + ++AM_CONDITIONAL([WIN32], [test "x$host_os" = xmingw32]) ++ + if test "$ac_cv_func_utime" = yes ; then + if test "$ac_cv_header_utime_h" = yes ; then + indent_UTIMBUF +--- indent-2.2.11/src/Makefile.am.orig 2015-03-06 17:34:02.942327300 +0000 ++++ indent-2.2.11/src/Makefile.am 2015-03-06 17:34:15.723827300 +0000 +@@ -1,10 +1,15 @@ + AUTOMAKE_OPTIONS = 1.2 gnits + + bin_PROGRAMS = indent ++if WIN32 ++indent_SOURCES = indent.c args.c backup.c comments.c lexi.c parse.c globs.c code_io.c output.c utils.c handletoken.c wildexp.c ++else + indent_SOURCES = indent.c args.c backup.c comments.c lexi.c parse.c globs.c code_io.c output.c utils.c handletoken.c ++EXTRA_DIST_WILDEXP_C = wildexp.c ++endif + noinst_HEADERS = indent.h args.h backup.h comments.h lexi.h parse.h globs.h code_io.h output.h utils.h sys.h libgettext.h handletoken.h + indent_LDADD = $(INTLLIBS) +-EXTRA_DIST = @PACKAGE@.gperf @PACKAGE@-cc.gperf wildexp.c gperf.c gperf-cc.c \ ++EXTRA_DIST = @PACKAGE@.gperf @PACKAGE@-cc.gperf $(EXTRA_DIST_WILDEXP_C) gperf.c gperf-cc.c \ + @PACKAGE@.dsp \ + config.h.vc++ \ + config.h.vms diff --git a/mingw-w64-inkscape/PKGBUILD b/mingw-w64-inkscape/PKGBUILD index d7c443b4fb..3edaea4dba 100644 --- a/mingw-w64-inkscape/PKGBUILD +++ b/mingw-w64-inkscape/PKGBUILD @@ -1,36 +1,47 @@ # Maintainer: Alexey Pavlov # Contributor: Ray Donnelly -_realname=inkscape +# gtk3 support is still experimental +# It can be tested via _use_gtk3=yes +_use_gtk3=no +if [ "${_use_gtk3}" = "yes" ]; then + _gtksuff=3 +fi +_realname=inkscape +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.48.5 -pkgrel=2 +pkgver=0.91 +pkgrel=11 pkgdesc="Vector graphics editor using the SVG file format (mingw-w64)" arch=('any') url="http://inkscape.sourceforge.net/" license=("GPL" "LGPL") install=inkscape-${CARCH}.install makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-boost" - "intltool") + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-boost" + "intltool") depends=( - "${MINGW_PACKAGE_PREFIX}-gc" - "${MINGW_PACKAGE_PREFIX}-ghostscript" - "${MINGW_PACKAGE_PREFIX}-gsl" - "${MINGW_PACKAGE_PREFIX}-gtkmm" - "${MINGW_PACKAGE_PREFIX}-gtkspell" - "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" - "${MINGW_PACKAGE_PREFIX}-imagemagick" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-libwpg" - "${MINGW_PACKAGE_PREFIX}-poppler" - "${MINGW_PACKAGE_PREFIX}-popt" - "${MINGW_PACKAGE_PREFIX}-python2" - ) + "${MINGW_PACKAGE_PREFIX}-aspell" + "${MINGW_PACKAGE_PREFIX}-gc" + "${MINGW_PACKAGE_PREFIX}-ghostscript" + "${MINGW_PACKAGE_PREFIX}-gsl" + "${MINGW_PACKAGE_PREFIX}-gtkmm${_gtksuff}" + "${MINGW_PACKAGE_PREFIX}-gtkspell${_gtksuff}" + "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" + "${MINGW_PACKAGE_PREFIX}-imagemagick" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-libcdr" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-libwpg" + "${MINGW_PACKAGE_PREFIX}-poppler" + "${MINGW_PACKAGE_PREFIX}-popt" + "${MINGW_PACKAGE_PREFIX}-python2" + $([[ "${_use_gtk3}" == "yes" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-gdl" ) \ + ) optdepends=(#"${MINGW_PACKAGE_PREFIX}-pstoedit: latex formulas" #"${MINGW_PACKAGE_PREFIX}-texlive-core: latex formulas" "${MINGW_PACKAGE_PREFIX}-python2-numpy: some extensions" @@ -38,70 +49,76 @@ optdepends=(#"${MINGW_PACKAGE_PREFIX}-pstoedit: latex formulas" #"${MINGW_PACKAGE_PREFIX}-uniconvertor: reading/writing to some proprietary formats" ) options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/project/${_realname}/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2" - inkscape-0.48.4-gc74.patch +source=("https://inkscape.global.ssl.fastly.net/media/resources/file/${_realname}-${pkgver}.tar.gz" inkscape-0.48.4-headers-fix.patch inkscape-0.48.4-python.patch inkscape-0.48.4-use-GStatBuf-insted-stat.patch + inkscape-0.48.4-use-GStatBuf-insted-stat-gtk3.patch inkscape-0.48.4-poppler-includes-conflicts.patch - inkscape-0.48.4-mingw-dont-need-dl.patch inkscape-0.48.4-win32-relocatable.patch inkscape-0.48.4-win32-file-dialog.patch inkscape-0.48.4-python-extensions-location.patch - ime-placement.patch) -sha1sums=('83ddb0c96069638f712a869039989bfd7d79c6a8' - '764ec7166c0308a8defcbb450468f15d821929f2' + inkscape-0.91-simulaneous-intltool-gettext.patch) +sha1sums=('e590f3b52c10771ae776a6f8173d21602ad1f261' '12fddb0a0b34b4308de1979d13b26d05a6ec8f77' '4dd0da65e538ba7e73a42ce76efd5e5a155d3bf0' - '2606a83aa0b116e51883543c3aadce6f8c4c2565' + '7e53e26506f22e51b79c50302adcad693c2d1698' + '1ccdc6730fadca589e509fda497b351e80b7238a' '8d65767ed2b291ccae70d8718f0b7a764632c445' - 'db9c1ce6372e8670f9949d2aaef3d27f8ded32ec' - '6a65e95e9d310b48b3caebc98f323183cef60e0c' - 'b4fe07272789c4cd121bcabbd9e3893acbac39fc' + '6c673021dd67e42a5288e14d53275794e3b7417f' + 'f9daedc7c77b4d4a2670044e634594265f3b1926' '185cd8f6e4ad0b55862720c47f80da9dfa8a82ff' - 'b12b948ca5ee7e02703a13aa8b8bccdf67947f12') + '5e0d67e5548501e20f7ed68a1c57b1789dc1bff3') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/inkscape-0.48.4-gc74.patch patch -p1 -i ${srcdir}/inkscape-0.48.4-headers-fix.patch patch -p1 -i ${srcdir}/inkscape-0.48.4-python.patch - patch -p1 -i ${srcdir}/inkscape-0.48.4-use-GStatBuf-insted-stat.patch + if [ "${_use_gtk3}" = "no" ]; then + patch -p1 -i ${srcdir}/inkscape-0.48.4-use-GStatBuf-insted-stat.patch + else + patch -p1 -i ${srcdir}/inkscape-0.48.4-use-GStatBuf-insted-stat-gtk3.patch + fi patch -p1 -i ${srcdir}/inkscape-0.48.4-poppler-includes-conflicts.patch - patch -p1 -i ${srcdir}/inkscape-0.48.4-mingw-dont-need-dl.patch patch -p1 -i ${srcdir}/inkscape-0.48.4-win32-relocatable.patch patch -p1 -i ${srcdir}/inkscape-0.48.4-win32-file-dialog.patch patch -p1 -i ${srcdir}/inkscape-0.48.4-python-extensions-location.patch - patch -p1 -i ${srcdir}/ime-placement.patch - + patch -p1 -i ${srcdir}/inkscape-0.91-simulaneous-intltool-gettext.patch + sed -i 's|/usr/bin/python\>|/usr/bin/python2|g' cxxtest/*.py sed -i 's|/usr/bin/env python\>|/usr/bin/env python2|g' share/*/{test/,}*.py #sed -i 's|"python" },|"python2" },|g' src/extension/implementation/script.cpp sed -i 's|python -c|python2 -c|g' configure share/extensions/uniconv*.py sed -i '/^#include ' src/*{,/*{,/*{,/*}}}.{h,cpp} sed -e "s|export-dynamic|export-all-symbols|g" -i src/Makefile.am - + autoreconf -fi -I m4 } build() { # export lt_cv_deplibs_check_method='pass_all' - rm -rf $srcdir/cd build-${MINGW_CHOST} - mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir -p build-${CARCH} && cd build-${CARCH} + declare -a extra_config + if [ "${_use_gtk3}" = "yes" ]; then + extra_config+=(--enable-gtk3-experimental) + fi + + CXXFLAGS+=" -std=gnu++11" ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --with-python \ - --without-perl \ --enable-lcms \ --enable-poppler-cairo \ - --disable-dependency-tracking + --disable-dependency-tracking \ + ${extra_config[@]} + make } package() { - cd ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${CARCH} make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-inkscape/ime-placement.patch b/mingw-w64-inkscape/ime-placement.patch deleted file mode 100644 index 7f2e13a5ef..0000000000 --- a/mingw-w64-inkscape/ime-placement.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -aur old/src/text-context.cpp new/src/text-context.cpp ---- old/src/text-context.cpp 2011-07-08 08:25:09.468790000 -1000 -+++ new/src/text-context.cpp 2014-04-21 14:48:22.668759004 -1000 -@@ -684,6 +684,17 @@ - // articifically here, for the text object does not exist yet: - double cursor_height = sp_desktop_get_font_size_tool(desktop); - sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), dtp, dtp + Geom::Point(0, cursor_height)); -+ if (tc->imc) { -+ GdkRectangle im_cursor; -+ Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3); -+ Geom::Point const cursor_size(0, cursor_height); -+ Geom::Point const im_position = SP_EVENT_CONTEXT(tc)->desktop->d2w(dtp + cursor_size - top_left); -+ im_cursor.x = (int) floor(im_position[Geom::X]); -+ im_cursor.y = (int) floor(im_position[Geom::Y]); -+ im_cursor.width = 0; -+ im_cursor.height = (int) -floor(SP_EVENT_CONTEXT(tc)->desktop->d2w(cursor_size)[Geom::Y]); -+ gtk_im_context_set_cursor_location(tc->imc, &im_cursor); -+ } - event_context->_message_context->set(Inkscape::NORMAL_MESSAGE, _("Type text; Enter to start new line.")); // FIXME:: this is a copy of a string from _update_cursor below, do not desync - - event_context->within_tolerance = false; -@@ -1560,8 +1571,6 @@ - static void - sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see) - { -- GdkRectangle im_cursor = { 0, 0, 1, 1 }; -- - // due to interruptible display, tc may already be destroyed during a display update before - // the cursor update (can't do both atomically, alas) - if (!tc->desktop) return; -@@ -1586,10 +1595,17 @@ - sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), d0, d1); - - /* fixme: ... need another transformation to get canvas widget coordinate space? */ -- im_cursor.x = (int) floor(d0[Geom::X]); -- im_cursor.y = (int) floor(d0[Geom::Y]); -- im_cursor.width = (int) floor(d1[Geom::X]) - im_cursor.x; -- im_cursor.height = (int) floor(d1[Geom::Y]) - im_cursor.y; -+ if (tc->imc) { -+ GdkRectangle im_cursor = { 0, 0, 1, 1 }; -+ Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3); -+ Geom::Point const im_d0 = SP_EVENT_CONTEXT(tc)->desktop->d2w(d0 - top_left); -+ Geom::Point const im_d1 = SP_EVENT_CONTEXT(tc)->desktop->d2w(d1 - top_left); -+ im_cursor.x = (int) floor(im_d0[Geom::X]); -+ im_cursor.y = (int) floor(im_d1[Geom::Y]); -+ im_cursor.width = (int) floor(im_d1[Geom::X]) - im_cursor.x; -+ im_cursor.height = (int) floor(im_d0[Geom::Y]) - im_cursor.y; -+ gtk_im_context_set_cursor_location(tc->imc, &im_cursor); -+ } - - tc->show = TRUE; - tc->phase = 1; -@@ -1631,9 +1647,6 @@ - } - } - -- if (tc->imc) { -- gtk_im_context_set_cursor_location(tc->imc, &im_cursor); -- } - SP_EVENT_CONTEXT(tc)->desktop->emitToolSubselectionChanged((gpointer)tc); - } - diff --git a/mingw-w64-inkscape/inkscape-0.48.4-gc74.patch b/mingw-w64-inkscape/inkscape-0.48.4-gc74.patch deleted file mode 100644 index ba61b9a96c..0000000000 --- a/mingw-w64-inkscape/inkscape-0.48.4-gc74.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur inkscape-0.48.4/configure.ac.old inkscape-0.48.4/configure.ac ---- inkscape-0.48.4/configure.ac.orig 2012-12-15 17:50:19.205918190 +0100 -+++ inkscape-0.48.4/configure.ac 2013-12-01 17:33:57.903433873 +0100 -@@ -263,8 +263,8 @@ - # include - #endif - #include -- extern unsigned GC_version; - int main(void){ -+ unsigned GC_version = GC_get_version(); - unsigned min = ((6 << 16) | (4 << 8) | 0); - printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF); - if (GC_version>=min) return 0; diff --git a/mingw-w64-inkscape/inkscape-0.48.4-mingw-dont-need-dl.patch b/mingw-w64-inkscape/inkscape-0.48.4-mingw-dont-need-dl.patch deleted file mode 100644 index e848f568c6..0000000000 --- a/mingw-w64-inkscape/inkscape-0.48.4-mingw-dont-need-dl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- inkscape-0.48.4-orig/configure.ac.orig 2012-12-15 20:50:19.205918100 +0400 -+++ inkscape-0.48.4-orig/configure.ac 2014-03-02 10:33:02.384000000 +0400 -@@ -780,7 +780,7 @@ - fi - - dnl Shouldn't we test for libpng and libz? --INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz -lxml2 -ldl" -+INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz -lxml2" - if test "x$openmp_ok" = "xyes"; then - INKSCAPE_LIBS="$INKSCAPE_LIBS -lgomp" - fi diff --git a/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat-gtk3.patch b/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat-gtk3.patch new file mode 100644 index 0000000000..0ae7e0dd1b --- /dev/null +++ b/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat-gtk3.patch @@ -0,0 +1,66 @@ +--- inkscape-0.48.4-orig/src/color-profile.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/color-profile.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -840,7 +841,7 @@ + static bool isIccFile( gchar const *filepath ) + { + bool isIccFile = false; +- struct stat st; ++ GStatBuf st; + if ( g_stat(filepath, &st) == 0 && (st.st_size > 128) ) { + //0-3 == size + //36-39 == 'acsp' 0x61637370 +--- inkscape-0.48.4-orig/src/display/cairo-utils.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/display/cairo-utils.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -291,7 +291,7 @@ + if (!g_file_test(fn.c_str(), G_FILE_TEST_EXISTS)) { + return NULL; + } +- struct stat stdir; ++ GStatBuf stdir; + int val = g_stat(fn.c_str(), &stdir); + if (val == 0 && stdir.st_mode & S_IFDIR){ + return NULL; +--- inkscape-0.48.4-orig/src/inkscape.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/inkscape.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -339,7 +339,7 @@ + if (doc->isModifiedSinceSave()) { + gchar *oldest_autosave = 0; + const gchar *filename = 0; +- struct stat sb; ++ GStatBuf sb; + time_t min_time = 0; + gint count = 0; + +--- inkscape-0.48.4-orig/src/sp-image.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/sp-image.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -804,7 +804,7 @@ + if ( image->href && image->pixbuf && image->pixbuf->modificationTime()) { + // It *might* change + +- struct stat st; ++ GStatBuf st; + memset(&st, 0, sizeof(st)); + int val = 0; + if (g_file_test (image->pixbuf->originalPath().c_str(), G_FILE_TEST_EXISTS)){ +--- inkscape-0.48.4-orig/src/io/sys.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/io/sys.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -226,7 +226,7 @@ + filename = g_filename_from_utf8 ( utf8name, -1, NULL, NULL, NULL ); + } + if ( filename ) { +- struct stat st; ++ GStatBuf st; + if (g_file_test (filename, G_FILE_TEST_EXISTS)){ + if (g_lstat (filename, &st) == 0) { + success = ((st.st_mode & S_IWRITE) != 0); +--- inkscape-0.48.4-orig/src/ui/dialog/filedialogimpl-gtkmm.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/ui/dialog/filedialogimpl-gtkmm.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -513,7 +513,7 @@ + Glib::ustring fileNameUtf8 = Glib::filename_to_utf8(fileName); + gchar *fName = const_cast( + fileNameUtf8.c_str()); // const-cast probably not necessary? (not necessary on Windows version of stat()) +- struct stat info; ++ GStatBuf info; + if (g_stat(fName, &info)) // stat returns 0 upon success + { + g_warning("SVGPreview::set() : %s : %s", fName, strerror(errno)); diff --git a/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat.patch b/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat.patch index 8d73081d12..feb7b90f20 100644 --- a/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat.patch +++ b/mingw-w64-inkscape/inkscape-0.48.4-use-GStatBuf-insted-stat.patch @@ -1,13 +1,13 @@ --- inkscape-0.48.4-orig/src/color-profile.cpp 2012-02-19 05:41:36.476182000 +0400 +++ inkscape-0.48.4/src/color-profile.cpp 2014-03-02 00:11:22.365600000 +0400 -@@ -6,6 +6,7 @@ - +@@ -13,6 +13,7 @@ + #include #include #include +#include - #include #include + #ifdef DEBUG_LCMS @@ -840,7 +841,7 @@ static bool isIccFile( gchar const *filepath ) { @@ -17,6 +17,17 @@ if ( g_stat(filepath, &st) == 0 && (st.st_size > 128) ) { //0-3 == size //36-39 == 'acsp' 0x61637370 +--- inkscape-0.48.4-orig/src/display/cairo-utils.cpp 2012-02-19 05:41:36.476182000 +0400 ++++ inkscape-0.48.4/src/display/cairo-utils.cpp 2014-03-02 00:11:22.365600000 +0400 +@@ -291,7 +291,7 @@ + if (!g_file_test(fn.c_str(), G_FILE_TEST_EXISTS)) { + return NULL; + } +- struct stat stdir; ++ GStatBuf stdir; + int val = g_stat(fn.c_str(), &stdir); + if (val == 0 && stdir.st_mode & S_IFDIR){ + return NULL; --- inkscape-0.48.4-orig/src/inkscape.cpp 2012-02-19 05:41:36.476182000 +0400 +++ inkscape-0.48.4/src/inkscape.cpp 2014-03-02 00:11:22.365600000 +0400 @@ -339,7 +339,7 @@ @@ -30,52 +41,34 @@ --- inkscape-0.48.4-orig/src/sp-image.cpp 2012-02-19 05:41:36.476182000 +0400 +++ inkscape-0.48.4/src/sp-image.cpp 2014-03-02 00:11:22.365600000 +0400 -@@ -441,7 +441,7 @@ - pixPath = NULL; - } - -- struct stat stdir; -+ GStatBuf stdir; - g_stat(filename, &stdir); - if (stdir.st_mode & S_IFDIR){ - //filename is not correct: it is a directory name and hence further code can not return valid results -@@ -453,7 +453,7 @@ - if ( fp ) - { - { -- struct stat st; -+ GStatBuf st; - memset(&st, 0, sizeof(st)); - int val = g_stat(filename, &st); - if ( !val ) { -@@ -1602,7 +1602,7 @@ - if ( image->href && image->lastMod ) { +@@ -804,7 +804,7 @@ + if ( image->href && image->pixbuf && image->pixbuf->modificationTime()) { // It *might* change - struct stat st; + GStatBuf st; memset(&st, 0, sizeof(st)); - int val = g_stat(image->pixPath, &st); - if ( !val ) { + int val = 0; + if (g_file_test (image->pixbuf->originalPath().c_str(), G_FILE_TEST_EXISTS)){ --- inkscape-0.48.4-orig/src/io/sys.cpp 2012-02-19 05:41:36.476182000 +0400 +++ inkscape-0.48.4/src/io/sys.cpp 2014-03-02 00:11:22.365600000 +0400 -@@ -232,7 +232,7 @@ +@@ -226,7 +226,7 @@ filename = g_filename_from_utf8 ( utf8name, -1, NULL, NULL, NULL ); } if ( filename ) { - struct stat st; + GStatBuf st; - if(g_lstat (filename, &st) == 0) { - success = ((st.st_mode & S_IWRITE) != 0); - } + if (g_file_test (filename, G_FILE_TEST_EXISTS)){ + if (g_lstat (filename, &st) == 0) { + success = ((st.st_mode & S_IWRITE) != 0); --- inkscape-0.48.4-orig/src/ui/dialog/filedialogimpl-gtkmm.cpp 2012-02-19 05:41:36.476182000 +0400 +++ inkscape-0.48.4/src/ui/dialog/filedialogimpl-gtkmm.cpp 2014-03-02 00:11:22.365600000 +0400 @@ -513,7 +513,7 @@ - { Glib::ustring fileNameUtf8 = Glib::filename_to_utf8(fileName); - gchar *fName = (gchar *)fileNameUtf8.c_str(); + gchar *fName = const_cast( + fileNameUtf8.c_str()); // const-cast probably not necessary? (not necessary on Windows version of stat()) - struct stat info; + GStatBuf info; - if (g_stat(fName, &info)) - { - g_warning("SVGPreview::set() : %s : %s", + if (g_stat(fName, &info)) // stat returns 0 upon success + { + g_warning("SVGPreview::set() : %s : %s", fName, strerror(errno)); diff --git a/mingw-w64-inkscape/inkscape-0.48.4-win32-file-dialog.patch b/mingw-w64-inkscape/inkscape-0.48.4-win32-file-dialog.patch index 0fd852345f..65b0e45169 100644 --- a/mingw-w64-inkscape/inkscape-0.48.4-win32-file-dialog.patch +++ b/mingw-w64-inkscape/inkscape-0.48.4-win32-file-dialog.patch @@ -5,6 +5,6 @@ #include #include +#include + #include #include - //Inkscape includes diff --git a/mingw-w64-inkscape/inkscape-0.48.4-win32-relocatable.patch b/mingw-w64-inkscape/inkscape-0.48.4-win32-relocatable.patch index d0a5b53b6f..69295d9ac2 100644 --- a/mingw-w64-inkscape/inkscape-0.48.4-win32-relocatable.patch +++ b/mingw-w64-inkscape/inkscape-0.48.4-win32-relocatable.patch @@ -151,10 +151,11 @@ Glib::ustring dir = win32_getDataDir(); --- inkscape-0.48.4-orig/src/path-prefix.h.orig 2014-03-04 07:02:21.005800000 +0400 +++ inkscape-0.48.4-orig/src/path-prefix.h 2014-03-04 07:04:57.427800000 +0400 -@@ -43,20 +43,20 @@ +@@ -43,22 +43,22 @@ #else # ifdef WIN32 # define INKSCAPE_APPICONDIR WIN32_DATADIR("pixmaps") +-# define INKSCAPE_ATTRRELDIR WIN32_DATADIR("share\\attributes") -# define INKSCAPE_BINDDIR WIN32_DATADIR("share\\bind") -# define INKSCAPE_EXAMPLESDIR WIN32_DATADIR("share\\examples") -# define INKSCAPE_EXTENSIONDIR WIN32_DATADIR("share\\extensions") @@ -166,9 +167,11 @@ -# define INKSCAPE_PALETTESDIR WIN32_DATADIR("share\\palettes") -# define INKSCAPE_PATTERNSDIR WIN32_DATADIR("share\\patterns") -# define INKSCAPE_SCREENSDIR WIN32_DATADIR("share\\screens") +-# define INKSCAPE_SYMBOLSDIR WIN32_DATADIR("share\\symbols") -# define INKSCAPE_TUTORIALSDIR WIN32_DATADIR("share\\tutorials") -# define INKSCAPE_TEMPLATESDIR WIN32_DATADIR("share\\templates") -# define INKSCAPE_UIDIR WIN32_DATADIR("share\\ui") ++# define INKSCAPE_ATTRRELDIR WIN32_DATADIR("inkscape\\attributes") +# define INKSCAPE_BINDDIR WIN32_DATADIR("inkscape\\bind") +# define INKSCAPE_EXAMPLESDIR WIN32_DATADIR("inkscape\\examples") +# define INKSCAPE_EXTENSIONDIR WIN32_DATADIR("inkscape\\extensions") @@ -180,37 +183,10 @@ +# define INKSCAPE_PALETTESDIR WIN32_DATADIR("inkscape\\palettes") +# define INKSCAPE_PATTERNSDIR WIN32_DATADIR("inkscape\\patterns") +# define INKSCAPE_SCREENSDIR WIN32_DATADIR("inkscape\\screens") ++# define INKSCAPE_SYMBOLSDIR WIN32_DATADIR("inkscape\\symbols") +# define INKSCAPE_TUTORIALSDIR WIN32_DATADIR("inkscape\\tutorials") +# define INKSCAPE_TEMPLATESDIR WIN32_DATADIR("inkscape\\templates") +# define INKSCAPE_UIDIR WIN32_DATADIR("inkscape\\ui") //CREATE V0.1 WIN32 support # define CREATE_GRADIENTSDIR WIN32_DATADIR("create\\gradients\\gimp") # define CREATE_PALETTESDIR WIN32_DATADIR("create\\swatches") ---- inkscape-0.48.4-orig/src/ui/dialog/inkscape-preferences.cpp.orig 2012-12-13 21:00:46.726633000 +0400 -+++ inkscape-0.48.4-orig/src/ui/dialog/inkscape-preferences.cpp 2014-03-04 11:54:58.192400000 +0400 -@@ -1392,7 +1392,11 @@ - tmp += "\n"; - - tmp += _("DATA: "); -+#ifdef WIN32 -+ tmp += WIN32_DATADIR(""); -+#else - tmp += INKSCAPE_DATADIR; -+#endif - tmp += "\n"; - - tmp += _("UI: "); ---- inkscape-0.48.4-orig/src/util/units.cpp.orig 2011-07-08 22:25:09.468790000 +0400 -+++ inkscape-0.48.4-orig/src/util/units.cpp 2014-03-04 12:00:07.741400000 +0400 -@@ -147,7 +147,11 @@ - if (f == NULL) { - g_warning("Could not open units file '%s': %s\n", - filename.c_str(), strerror(errno)); -+#ifdef WIN32 -+ g_warning("* INKSCAPE_DATADIR is: '%s'\n", WIN32_DATADIR("")); -+#else - g_warning("* INKSCAPE_DATADIR is: '%s'\n", INKSCAPE_DATADIR); -+#endif - g_warning("* INKSCAPE_UIDIR is: '%s'\n", INKSCAPE_UIDIR); - return false; - } diff --git a/mingw-w64-inkscape/inkscape-0.91-simulaneous-intltool-gettext.patch b/mingw-w64-inkscape/inkscape-0.91-simulaneous-intltool-gettext.patch new file mode 100644 index 0000000000..d00a74f91e --- /dev/null +++ b/mingw-w64-inkscape/inkscape-0.91-simulaneous-intltool-gettext.patch @@ -0,0 +1,14 @@ +--- inkscape-0.91pre4/configure.ac.orig 2015-01-19 00:13:59.663800000 +0300 ++++ inkscape-0.91pre4/configure.ac 2015-01-19 00:15:21.608600000 +0300 +@@ -211,10 +211,7 @@ + dnl ****************************** + dnl Gettext stuff + dnl ****************************** +-IT_PROG_INTLTOOL([0.40.0]) +- +-AM_GNU_GETTEXT_VERSION([0.17]) +-AM_GNU_GETTEXT([external]) ++IT_PROG_INTLTOOL([0.50.0]) + + GETTEXT_PACKAGE="AC_PACKAGE_NAME" + AC_SUBST(GETTEXT_PACKAGE) diff --git a/mingw-w64-inkscape/inkscape-i686.install b/mingw-w64-inkscape/inkscape-i686.install index 30b8420eb7..77f4cb0728 100644 --- a/mingw-w64-inkscape/inkscape-i686.install +++ b/mingw-w64-inkscape/inkscape-i686.install @@ -1,11 +1,11 @@ post_install() { - mingw32/bin/gtk-update-icon-cache -f -t mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache -f -t mingw32/share/icons/hicolor } post_upgrade() { - post_install + post_install } post_remove() { - post_install + post_install } diff --git a/mingw-w64-inkscape/inkscape-x86_64.install b/mingw-w64-inkscape/inkscape-x86_64.install index a64dc9ee18..e6737dd337 100644 --- a/mingw-w64-inkscape/inkscape-x86_64.install +++ b/mingw-w64-inkscape/inkscape-x86_64.install @@ -1,11 +1,11 @@ post_install() { - mingw64/bin/gtk-update-icon-cache -f -t mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache -f -t mingw64/share/icons/hicolor } post_upgrade() { - post_install + post_install } post_remove() { - post_install + post_install } diff --git a/mingw-w64-innoextract/PKGBUILD b/mingw-w64-innoextract/PKGBUILD index 609d0d9161..99a09253a0 100644 --- a/mingw-w64-innoextract/PKGBUILD +++ b/mingw-w64-innoextract/PKGBUILD @@ -1,72 +1,54 @@ # Maintainer: Alexey Pavlov _realname=innoextract - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4 +pkgver=1.5 pkgrel=1 pkgdesc="A tool to extract installers created by Inno Setup (mingw-w64)." arch=('any') url="http://constexpr.org/innoextract/" license=("MIT") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-xz" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-libiconv") + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-libiconv") options=('staticlibs' '!strip') -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" - fix-typo-in-comment.patch - fix-crash-on-startup.patch - dont-set-background.patch - fix-flickering-progress-bar.patch - fix-restoring-original-console-color.patch - fix-an-infinite-loop-with-truncated-LZMA-streams.patch) -sha1sums=('3fd3ac98c802c72a1f4ae5f6e6a5dca35747ff98' - '554408d4be410563828d2599db698f0f76cef51e' - 'd35974339a83db0cd04c343d865075d99fc426ba' - 'abebb02453cd1d60afee5f4fb19ad0dc53d09125' - '43454e4e6ef70cd635135e38ead7e596308986c0' - '665c7cbb712d88e0d6506b3de157d7fbf819c239' - '69798ae9a93e0f944201889b6b7000130a7af4d4') +source=("http://constexpr.org/innoextract/files/${_realname}-${pkgver}.tar.gz") +sha1sums=('cd3e3f68213c2730e9db4665b2997f5052f12af7') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/fix-typo-in-comment.patch - patch -p1 -i ${srcdir}/fix-crash-on-startup.patch - patch -p1 -i ${srcdir}/dont-set-background.patch - patch -p1 -i ${srcdir}/fix-flickering-progress-bar.patch - patch -p1 -i ${srcdir}/fix-restoring-original-console-color.patch - patch -p1 -i ${srcdir}/fix-an-infinite-loop-with-truncated-LZMA-streams.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - cd "${srcdir}/${_realname}-${pkgver}" - + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ + -Wno-dev \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ - -DUSE_STATIC_LIBS=OFF + -DUSE_STATIC_LIBS=OFF \ + ../${_realname}-${pkgver} + make } package() { - cd "${srcdir}/${_realname}-${pkgver}" - make install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install - install -Dm644 README.md \ + install -Dm644 ${srcdir}/${_realname}-${pkgver}/README.md \ "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/README.md" - install -Dm644 CHANGELOG \ + install -Dm644 ${srcdir}/${_realname}-${pkgver}/CHANGELOG \ "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/CHANGELOG" - install -Dm644 LICENSE \ + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE \ "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-innoextract/dont-set-background.patch b/mingw-w64-innoextract/dont-set-background.patch deleted file mode 100644 index f021768e95..0000000000 --- a/mingw-w64-innoextract/dont-set-background.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 9e40d651cb6b59582d4ee7c3dba10d8f66568dbd Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Mon, 13 May 2013 21:32:25 +0200 -Subject: [PATCH] Don't set the background color under Windows - -... unless the current background color is too bright. ---- - src/util/console.cpp | 38 ++++++++++++++++++++++++++++---------- - 1 file changed, 28 insertions(+), 10 deletions(-) - -diff --git a/src/util/console.cpp b/src/util/console.cpp -index 72a2830..0f052c0 100644 ---- a/src/util/console.cpp -+++ b/src/util/console.cpp -@@ -46,6 +46,7 @@ - - #include - #include -+#include - - #include "util/output.hpp" - -@@ -193,24 +194,41 @@ void init(is_enabled color, is_enabled progress) { - - // Initialize color output - -+ shell_command * const all_colors[] = { -+ &reset, ¤t, -+ &black, &red, &green, &yellow, &blue, &magenta, &cyan, &white, -+ &dim_black, &dim_red, &dim_green, &dim_yellow, -+ &dim_blue, &dim_magenta, &dim_cyan, &dim_white, -+ }; -+ - if(color == disable || (color == automatic && !is_tty)) { - -- #if defined(_WIN32) -- reset.command = boost::uint16_t(-1); -- #else -- reset.command = ""; -- #endif -- -- black = red = green = yellow = blue = magenta = cyan = white = reset; -- dim_black = dim_red = dim_green = dim_yellow = reset; -- dim_blue = dim_magenta = dim_cyan = dim_white = reset; -- current = reset; -+ BOOST_FOREACH(shell_command * color, all_colors) { -+ #if defined(_WIN32) -+ color->command = boost::uint16_t(-1); -+ #else -+ color->command = ""; -+ #endif -+ } - - } else { -+ - #if defined(_WIN32) -+ // Preserve the original background color if it isn't too bright. -+ if(!(original_color.command & (COMMON_LVB_REVERSE_VIDEO|BACKGROUND_INTENSITY))) { -+ boost::uint16_t bgmask = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE; -+ if((color & bgmask) != bgmask) { -+ boost::uint16_t bg = original_color.command & bgmask; -+ BOOST_FOREACH(shell_command * color, all_colors) { -+ color->command |= bg; -+ } -+ } -+ } -+ // Force dim_white as the default color under Windows, restore original color on exit. - std::cout << reset; - std::atexit(restore_color); - #endif -+ - } - - } --- -1.9.1 - diff --git a/mingw-w64-innoextract/fix-an-infinite-loop-with-truncated-LZMA-streams.patch b/mingw-w64-innoextract/fix-an-infinite-loop-with-truncated-LZMA-streams.patch deleted file mode 100644 index f6ab967b15..0000000000 --- a/mingw-w64-innoextract/fix-an-infinite-loop-with-truncated-LZMA-streams.patch +++ /dev/null @@ -1,49 +0,0 @@ -From b87d69182a637e3cb55a3d792594d842be8ace0d Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Wed, 22 May 2013 15:22:34 +0200 -Subject: [PATCH] Fix an infinite loop with truncated LZMA streams - ---- - src/stream/file.cpp | 2 ++ - src/stream/lzma.cpp | 5 ++++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/stream/file.cpp b/src/stream/file.cpp -index 42d6614..64c266c 100644 ---- a/src/stream/file.cpp -+++ b/src/stream/file.cpp -@@ -69,6 +69,8 @@ file_reader::pointer file_reader::get(base_type & base, const file & file, - - result->push(restrict(base, file.size)); - -+ result->exceptions(std::ios_base::badbit); -+ - return pointer(result.release()); - } - -diff --git a/src/stream/lzma.cpp b/src/stream/lzma.cpp -index 695c799..a771070 100644 ---- a/src/stream/lzma.cpp -+++ b/src/stream/lzma.cpp -@@ -56,7 +56,6 @@ static lzma_stream * init_raw_lzma_stream(lzma_vli filter, lzma_options_lzma & o - - bool lzma_decompressor_impl_base::filter(const char * & begin_in, const char * end_in, - char * & begin_out, char * end_out, bool flush) { -- (void)flush; - - lzma_stream * strm = static_cast(stream); - -@@ -68,6 +67,10 @@ bool lzma_decompressor_impl_base::filter(const char * & begin_in, const char * e - - lzma_ret ret = lzma_code(strm, LZMA_RUN); - -+ if(flush && ret == LZMA_BUF_ERROR && strm->avail_out > 0) { -+ throw lzma_error("truncated lzma stream", ret); -+ } -+ - begin_in = reinterpret_cast(strm->next_in); - begin_out = reinterpret_cast(strm->next_out); - --- -1.9.1 - diff --git a/mingw-w64-innoextract/fix-crash-on-startup.patch b/mingw-w64-innoextract/fix-crash-on-startup.patch deleted file mode 100644 index 7c6c4f76be..0000000000 --- a/mingw-w64-innoextract/fix-crash-on-startup.patch +++ /dev/null @@ -1,49 +0,0 @@ -From b52c4a0699b3801b96cd25567843faa6ab57daf3 Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Mon, 13 May 2013 20:47:16 +0200 -Subject: [PATCH] Fix crash on startup under Windows - -Don't assume that the runtime initializes the __wargv global variable. ---- - src/util/windows.cpp | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/util/windows.cpp b/src/util/windows.cpp -index 7ee7caf..87cbaa9 100644 ---- a/src/util/windows.cpp -+++ b/src/util/windows.cpp -@@ -27,6 +27,7 @@ - #include - - #include -+#include - - #include - -@@ -52,9 +53,11 @@ int main() { - - std::setlocale(LC_ALL, ""); - -- // Get the UTF-16 command-line parameters and convert them to UTF-8 ourself. -- int argc = __argc; -- wchar_t ** wargv = __wargv; -+ // Emulate wmain() as it's nonstandard and not supported by MinGW. -+ int argc = 0; -+ wchar_t ** wargv = CommandLineToArgvW(GetCommandLineW(), &argc); -+ -+ // Convert the UTF-16 command-line parameters to UTF-8 ourself. - char ** argv = new char *[argc + 1]; - argv[argc] = NULL; - for(int i = 0; i < argc; i++) { -@@ -63,6 +66,8 @@ int main() { - WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1, argv[i], n, NULL, NULL); - } - -+ LocalFree(wargv); -+ - // Tell boost::filesystem to interpret our path strings as UTF-8. - std::locale global_locale = std::locale(); - std::locale utf8_locale(global_locale, new utf8_codecvt); --- -1.9.1 - diff --git a/mingw-w64-innoextract/fix-flickering-progress-bar.patch b/mingw-w64-innoextract/fix-flickering-progress-bar.patch deleted file mode 100644 index 026eca1737..0000000000 --- a/mingw-w64-innoextract/fix-flickering-progress-bar.patch +++ /dev/null @@ -1,292 +0,0 @@ -From a144d3fff0e94e19acc098ee4b35503aaeb752ae Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Tue, 14 May 2013 20:10:56 +0200 -Subject: [PATCH] Fix flickering progress bar under Windows - ---- - src/cli/main.cpp | 68 +++++++++++++++++++++++++++------------------------- - src/util/console.cpp | 65 +++++++++++++++++++++++++++++-------------------- - src/util/console.hpp | 13 +++++++--- - 3 files changed, 84 insertions(+), 62 deletions(-) - -diff --git a/src/cli/main.cpp b/src/cli/main.cpp -index b4c72aa..3f90291 100644 ---- a/src/cli/main.cpp -+++ b/src/cli/main.cpp -@@ -326,49 +326,48 @@ static void process_file(const fs::path & file, const options & o) { - } - - // Print filename and size -- if(!o.silent) { -+ if(o.list) { - - extract_progress.clear(); - -- std::cout << " - "; -- bool named = false; -- BOOST_FOREACH(const file_t & path, output_names) { -- if(named) { -- std::cout << ", "; -+ if(!o.silent) { -+ -+ std::cout << " - "; -+ bool named = false; -+ BOOST_FOREACH(const file_t & path, output_names) { -+ if(named) { -+ std::cout << ", "; -+ } -+ std::cout << '"' << color::white << path.first << color::reset << '"'; -+ if(!info.files[path.second].languages.empty()) { -+ std::cout << " [" << color::green << info.files[path.second].languages -+ << color::reset << "]"; -+ } -+ named = true; - } -- std::cout << '"' << color::white << path.first << color::reset << '"'; -- if(!info.files[path.second].languages.empty()) { -- std::cout << " [" << color::green << info.files[path.second].languages -- << color::reset << "]"; -+ if(!named) { -+ std::cout << color::white << "unnamed file" << color::reset; - } -- named = true; -- } -- if(!named) { -- std::cout << color::white << "unnamed file" << color::reset; -- } -- if(!o.quiet) { -- if(logger::debug) { -- std::cout << " @ " << print_hex(file.offset); -+ if(!o.quiet) { -+ if(logger::debug) { -+ std::cout << " @ " << print_hex(file.offset); -+ } -+ std::cout << " (" << color::dim_cyan << print_bytes(file.size) -+ << color::reset << ")"; -+ } -+ std::cout << '\n'; -+ -+ } else { -+ BOOST_FOREACH(const file_t & path, output_names) { -+ std::cout << color::white << path.first << color::reset << '\n'; - } -- std::cout << " (" << color::dim_cyan << print_bytes(file.size) -- << color::reset << ")"; -- } -- std::cout << '\n'; -- if(o.extract || o.test) { -- std::cout.flush(); - } - -- extract_progress.update(0, true); -- -- } else if(o.list) { -- extract_progress.clear(); -- BOOST_FOREACH(const file_t & path, output_names) { -- std::cout << color::white << path.first << color::reset << '\n'; -- } -- if(o.extract || o.test) { -+ bool updated = extract_progress.update(0, true); -+ if(!updated && (o.extract || o.test)) { - std::cout.flush(); - } -- extract_progress.update(0, true); -+ - } - - if(!o.extract && !o.test) { -@@ -568,6 +567,9 @@ int main(int argc, char * argv[]) { - if(!o.extract && !o.test) { - progress::set_enabled(false); - } -+ if(!o.silent) { -+ o.list = true; -+ } - - // Additional actions. - o.filenames.set_expand(options.count("dump") == 0); -diff --git a/src/util/console.cpp b/src/util/console.cpp -index 0f052c0..9129056 100644 ---- a/src/util/console.cpp -+++ b/src/util/console.cpp -@@ -184,13 +184,6 @@ void init(is_enabled color, is_enabled progress) { - show_progress = true; - } - #endif -- #if defined(_WIN32) -- if(show_progress) { -- // Buffer output so that the progress bar won't flicker (we flush after each update) -- static char buffer[BUFSIZ]; -- std::setbuf(stdout, buffer); -- } -- #endif - - // Initialize color output - -@@ -214,7 +207,7 @@ void init(is_enabled color, is_enabled progress) { - } else { - - #if defined(_WIN32) -- // Preserve the original background color if it isn't too bright. -+ // Preserve the original background color if it isn't too bright - if(!(original_color.command & (COMMON_LVB_REVERSE_VIDEO|BACKGROUND_INTENSITY))) { - boost::uint16_t bgmask = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE; - if((color & bgmask) != bgmask) { -@@ -224,7 +217,7 @@ void init(is_enabled color, is_enabled progress) { - } - } - } -- // Force dim_white as the default color under Windows, restore original color on exit. -+ // Force dim_white as the default color under Windows, restore original color on exit - std::cout << reset; - std::atexit(restore_color); - #endif -@@ -288,7 +281,7 @@ static int get_screen_width() { - - static bool progress_cleared = true; - --int progress::clear() { -+int progress::clear(bool reset_only) { - - int width = get_screen_width(); - -@@ -298,18 +291,37 @@ int progress::clear() { - - #if defined(_WIN32) - -- // Overwrite the current line with whitespace -- -- static std::string buffer; -- static int last_width = 0; -- if(width != last_width) { -- size_t cwidth = size_t(std::max(width, 1) - 1); -- buffer.resize(cwidth, ' '); -- last_width = width; -+ if(reset_only) { -+ -+ /* -+ * If we overwrite the whole line with spaces, windows console likes to draw -+ * the empty line, even if it will be overwritten in the same flush(), -+ * causing the progress bar to flicker when updated. -+ * To work around this, don't actually clear the line if we are just going to -+ * overwrite it anyway. -+ * The progress bar still flickers when there is other output printed, but -+ * it seems there is no way around that without using the console API to manually -+ * scroll the output. -+ */ -+ -+ std::cout << '\r'; -+ -+ } else { -+ -+ // Overwrite the current line with whitespace -+ -+ static std::string buffer; -+ static int last_width = 0; -+ if(width != last_width) { -+ size_t cwidth = size_t(std::max(width, 1) - 1); -+ buffer.resize(cwidth, ' '); -+ last_width = width; -+ } -+ -+ std::cout << '\r' << buffer << '\r'; -+ - } - -- std::cout << '\r' << buffer << '\r'; -- - #else - - // Use the ANSI/VT100 control sequence to clear the current line -@@ -329,7 +341,7 @@ void progress::show(float value, const std::string & label) { - return; - } - -- int width = clear(); -+ int width = clear(true); - - std::ios_base::fmtflags flags = std::cout.flags(); - -@@ -366,7 +378,7 @@ void progress::show_unbounded(float value, const std::string & label) { - return; - } - -- int width = clear(); -+ int width = clear(true); - - std::ios_base::fmtflags flags = std::cout.flags(); - -@@ -402,10 +414,10 @@ progress::progress(boost::uint64_t max, bool show_rate) - start_time(boost::posix_time::microsec_clock::universal_time()), - last_status(-1.f), last_time(0), last_rate(0.f) { } - --void progress::update(boost::uint64_t delta, bool force) { -+bool progress::update(boost::uint64_t delta, bool force) { - - if(!show_progress) { -- return; -+ return false; - } - - force = force || progress_cleared; -@@ -417,7 +429,7 @@ void progress::update(boost::uint64_t delta, bool force) { - status = float(std::min(value, max)) / float(max); - status = float(size_t(1000.f * status)) * (1.f / 1000.f); - if(!force && status == last_status) { -- return; -+ return false; - } - } - -@@ -430,7 +442,7 @@ void progress::update(boost::uint64_t delta, bool force) { - const boost::uint64_t update_interval = 50000; - #endif - if(!force && time - last_time < update_interval) { -- return; -+ return false; - } - - last_time = time; -@@ -461,6 +473,7 @@ void progress::update(boost::uint64_t delta, bool force) { - show_unbounded(status, label.str()); - } - -+ return true; - } - - void progress::set_enabled(bool enable) { -diff --git a/src/util/console.hpp b/src/util/console.hpp -index 1f8354c..4c6875d 100644 ---- a/src/util/console.hpp -+++ b/src/util/console.hpp -@@ -132,8 +132,10 @@ public: - * maximum set in the constructor, the bar will be full. - * \param force Force updating the progress bar. Normally, the progress bar. Otherwise, - * updates are rate-limited and small deltas are not displayed immediately. -+ * -+ * \return true if the progres bar was updated - */ -- void update(boost::uint64_t delta = 0, bool force = false); -+ bool update(boost::uint64_t delta = 0, bool force = false); - - /*! - * Draw a bounded progress bar (with a maximum). -@@ -151,8 +153,13 @@ public: - */ - static void show_unbounded(float value, const std::string & label = std::string()); - -- //! Clear any progress bar to make way for other output. -- static int clear(); -+ /*! -+ * Clear any progress bar to make way for other output. -+ * -+ * \param reset_only Only reset the cursor if cleaning the line is expensive. -+ * This should be used if the whole line will be written anyway. -+ */ -+ static int clear(bool reset_only = false); - - //! Enable or disable the progress bar. - static void set_enabled(bool enable); --- -1.9.1 - diff --git a/mingw-w64-innoextract/fix-restoring-original-console-color.patch b/mingw-w64-innoextract/fix-restoring-original-console-color.patch deleted file mode 100644 index a6acabbe7e..0000000000 --- a/mingw-w64-innoextract/fix-restoring-original-console-color.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 507f4c178f8bb085afe830e0772ce79b1b8e771a Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Tue, 14 May 2013 21:00:36 +0200 -Subject: [PATCH] Fix restoring original console color under Windows - ---- - src/util/console.cpp | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/src/util/console.cpp b/src/util/console.cpp -index 9129056..f86a4f1 100644 ---- a/src/util/console.cpp -+++ b/src/util/console.cpp -@@ -118,10 +118,17 @@ shell_command dim_cyan = { FOREGROUND_BLUE | FOREGROUND_GREEN }; - shell_command dim_white = { FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE }; - - shell_command reset = dim_white; --shell_command original_color; - -+boost::uint16_t original_color = boost::uint16_t(-1); - static void restore_color() { -- std::cout << original_color; -+ if(original_color != boost::uint16_t(-1) && console_handle) { -+ SetConsoleTextAttribute(console_handle, original_color); -+ } -+} -+static BOOL WINAPI restore_color_handler(DWORD type) { -+ (void)type; -+ restore_color(); -+ return FALSE; - } - - #else -@@ -163,7 +170,7 @@ void init(is_enabled color, is_enabled progress) { - console_handle = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO info; - if(console_handle && GetConsoleScreenBufferInfo(console_handle, &info)) { -- original_color.command = info.wAttributes; -+ original_color = info.wAttributes; - } else { - is_tty = false; - color = disable; -@@ -208,10 +215,10 @@ void init(is_enabled color, is_enabled progress) { - - #if defined(_WIN32) - // Preserve the original background color if it isn't too bright -- if(!(original_color.command & (COMMON_LVB_REVERSE_VIDEO|BACKGROUND_INTENSITY))) { -+ if(!(original_color & (COMMON_LVB_REVERSE_VIDEO|BACKGROUND_INTENSITY))) { - boost::uint16_t bgmask = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE; - if((color & bgmask) != bgmask) { -- boost::uint16_t bg = original_color.command & bgmask; -+ boost::uint16_t bg = original_color & bgmask; - BOOST_FOREACH(shell_command * color, all_colors) { - color->command |= bg; - } -@@ -220,6 +227,7 @@ void init(is_enabled color, is_enabled progress) { - // Force dim_white as the default color under Windows, restore original color on exit - std::cout << reset; - std::atexit(restore_color); -+ SetConsoleCtrlHandler(restore_color_handler, TRUE); - #endif - - } -@@ -324,6 +332,8 @@ int progress::clear(bool reset_only) { - - #else - -+ (void)reset_only; -+ - // Use the ANSI/VT100 control sequence to clear the current line - - std::cout << "\33[2K\r"; --- -1.9.1 - diff --git a/mingw-w64-innoextract/fix-typo-in-comment.patch b/mingw-w64-innoextract/fix-typo-in-comment.patch deleted file mode 100644 index 7b9d83476d..0000000000 --- a/mingw-w64-innoextract/fix-typo-in-comment.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7358c530490f9595444fcef3e1352905a6b2a366 Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Thu, 11 Apr 2013 17:23:23 +0200 -Subject: [PATCH] Fix typo in comment - ---- - src/util/windows.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/util/windows.cpp b/src/util/windows.cpp -index e25d4bb..7ee7caf 100644 ---- a/src/util/windows.cpp -+++ b/src/util/windows.cpp -@@ -52,7 +52,7 @@ int main() { - - std::setlocale(LC_ALL, ""); - -- // Get the UTF-16 command-line parameters and convert it them to UTF-8 ourself. -+ // Get the UTF-16 command-line parameters and convert them to UTF-8 ourself. - int argc = __argc; - wchar_t ** wargv = __wargv; - char ** argv = new char *[argc + 1]; --- -1.9.1 - diff --git a/mingw-w64-insight/PKGBUILD b/mingw-w64-insight/PKGBUILD index 7dc629a920..8fdfd24796 100644 --- a/mingw-w64-insight/PKGBUILD +++ b/mingw-w64-insight/PKGBUILD @@ -117,5 +117,5 @@ package() { rm -f ${pkgdir}${MINGW_PREFIX}/include/*.h rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.a - + } diff --git a/mingw-w64-intel-tbb/PKGBUILD b/mingw-w64-intel-tbb/PKGBUILD index f5e651eac0..5d0b508880 100644 --- a/mingw-w64-intel-tbb/PKGBUILD +++ b/mingw-w64-intel-tbb/PKGBUILD @@ -2,7 +2,7 @@ _realname=intel-tbb pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.3_20141023 +pkgver=4.3_20150611 pkgrel=1 pkgdesc='High level abstract threading library (mingw-w64)' depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") @@ -11,21 +11,21 @@ options=('!strip' 'staticlibs') arch=('any') url='http://www.threadingbuildingblocks.org/' license=('GPL') -source=("http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${pkgver/\./}oss_src.tgz" +source=(https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${pkgver//./}oss_src.tgz 'tbb-disable_windows_api.patch') -sha1sums=('aaecdc97049fbe3c623be46c4e1261b74a1a41a3' +sha1sums=('5457cd15ad13625442283e67844199a79e88a3a4' '13784f69be6915a0e9d751bfa5b6cc0166449ac7') prepare () { cd tbb${pkgver/\./}oss - + # do not build debug libraries #sed -i "/debug/d" Makefile - + # not not use win32 api #patch -p1 -i "$srcdir"/tbb-disable_windows_api.patch #echo "CPLUS_FLAGS += -DUSE_WIN32_API=0" >> build/windows.gcc.inc - + # platform configuration #sed -i "s|export SHELL = cmd|export SHELL = sh -c|g" build/windows.inc #sed -i "s|CMD=cmd /C|CMD=sh -c|g" build/windows.inc diff --git a/mingw-w64-irrlicht/PKGBUILD b/mingw-w64-irrlicht/PKGBUILD index ad577c59fc..64a417fb92 100644 --- a/mingw-w64-irrlicht/PKGBUILD +++ b/mingw-w64-irrlicht/PKGBUILD @@ -1,22 +1,21 @@ # Maintainer: Alexey Pavlov _realname=irrlicht - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.8.1 -pkgrel=2 -pkgdesc="An open source high performance realtime 3D graphics engine. (mingw-w64)" +pkgrel=3 +pkgdesc="An open source high performance realtime 3D graphics engine (mingw-w64)" arch=('any') url="http://irrlicht.sourceforge.net" license=("ZLIB") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "dos2unix") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip") +source=("http://downloads.sourceforge.net/irrlicht/irrlicht-${pkgver}.zip") md5sums=('f4f7fa33bd1060eb0dd51dcd66b0f6e3') prepare() { - cd "$srcdir" + cd "${srcdir}" find . -type f -exec dos2unix {} \; } diff --git a/mingw-w64-isl/PKGBUILD b/mingw-w64-isl/PKGBUILD index dc52a68317..fda93ef6f9 100644 --- a/mingw-w64-isl/PKGBUILD +++ b/mingw-w64-isl/PKGBUILD @@ -1,47 +1,47 @@ # Maintainer: Alexey Pavlov _realname=isl - +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=0.13 +pkgver=0.15 pkgrel=1 -pkgdesc="Library for manipulating sets and relations of integer points bounded by linear constraints" +pkgdesc="Library for manipulating sets and relations of integer points bounded by linear constraints (mingw-w64)" arch=('any') -url="http://freecode.com/projects/isl" -groups=("${MINGW_PACKAGE_PREFIX}") +url="http://isl.gforge.inria.fr/" #depends=("${MINGW_PACKAGE_PREFIX}-gmp") makedepends=("${MINGW_PACKAGE_PREFIX}-gmp") options=('staticlibs') license=('MIT') -source=(http://isl.gforge.inria.fr/${_realname}-${pkgver}.tar.bz2 - #ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/${_realname}-$pkgver.tar.bz2 - isl-0.13-no-undefined.patch) -md5sums=('e4cf20c4c10d5d613457558b1f46b5e2' - '75cd13d41fb237dbb78daed54c9d50f2') +source=("http://isl.gforge.inria.fr/${_realname}-${pkgver}.tar.xz" + isl-0.14.1-no-undefined.patch) +md5sums=('626d0452f3c9a36aeb3c225ff5e7c642' + '38c67a10e197acb83217be17075070f9') prepare() { - cd "$srcdir/${_realname}-$pkgver" - patch -p1 -i ${srcdir}/isl-0.13-no-undefined.patch - + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/isl-0.14.1-no-undefined.patch autoreconf -fi } build() { - cd "$srcdir/${_realname}-$pkgver" - ./configure --prefix=${MINGW_PREFIX} \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --enable-static \ --disable-shared \ --with-gmp-prefix=${MINGW_PREFIX} + make } check() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "${srcdir}/${_realname}-${pkgver}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-isl/isl-0.13-no-undefined.patch b/mingw-w64-isl/isl-0.13-no-undefined.patch deleted file mode 100644 index 99716cbf78..0000000000 --- a/mingw-w64-isl/isl-0.13-no-undefined.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- isl-0.13/Makefile.am.orig 2014-07-06 00:57:27.063200000 +0400 -+++ isl-0.13/Makefile.am 2014-07-06 00:59:20.587200000 +0400 -@@ -134,7 +134,7 @@ - isl_vertices_private.h \ - isl_vertices.c - libisl_la_LIBADD = @GMP_LIBS@ --libisl_la_LDFLAGS = -version-info @versioninfo@ \ -+libisl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \ - @GMP_LDFLAGS@ - - isl_test_LDFLAGS = @GMP_LDFLAGS@ diff --git a/mingw-w64-isl/isl-0.14.1-no-undefined.patch b/mingw-w64-isl/isl-0.14.1-no-undefined.patch new file mode 100644 index 0000000000..3da3fbb709 --- /dev/null +++ b/mingw-w64-isl/isl-0.14.1-no-undefined.patch @@ -0,0 +1,11 @@ +--- isl-0.14.1/Makefile.am.orig 2015-06-09 00:57:27.063200000 +0400 ++++ isl-0.14.1/Makefile.am 2015-06-09 00:59:20.587200000 +0400 +@@ -164,7 +164,7 @@ + isl_vertices_private.h \ + isl_vertices.c + libisl_la_LIBADD = @MP_LIBS@ +-libisl_la_LDFLAGS = -version-info @versioninfo@ \ ++libisl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \ + @MP_LDFLAGS@ + + isl_test_LDFLAGS = @MP_LDFLAGS@ diff --git a/mingw-w64-iso-codes/PKGBUILD b/mingw-w64-iso-codes/PKGBUILD index f915fef4ad..c2362347b3 100644 --- a/mingw-w64-iso-codes/PKGBUILD +++ b/mingw-w64-iso-codes/PKGBUILD @@ -1,16 +1,16 @@ # Maintainer: Alexey Pavlov _realname=iso-codes - +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.55 +pkgver=3.63 pkgrel=1 pkgdesc="Lists of the country, language, and currency names (mingw-w64)" arch=('any') license=('LGPL') url="http://pkg-isocodes.alioth.debian.org/" -source=(http://pkg-isocodes.alioth.debian.org/downloads/${_realname}-$pkgver.tar.xz{,.sig}) -md5sums=('390291fa7ef954ca1feb4b3340d26c28' +source=(http://pkg-isocodes.alioth.debian.org/downloads/${_realname}-${pkgver}.tar.xz{,.sig}) +md5sums=('129f822fd64c9bf80931cccc269ccb95' 'SKIP') build() { @@ -19,10 +19,11 @@ build() { --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } package() { cd "${srcdir}/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" pkgconfigdir=${MINGW_PREFIX}/lib/pkgconfig install + make DESTDIR="${pkgdir}" pkgconfigdir=${MINGW_PREFIX}/lib/pkgconfig install } diff --git a/mingw-w64-itk/PKGBUILD b/mingw-w64-itk/PKGBUILD index ec3a4473d5..20e27cc6b6 100644 --- a/mingw-w64-itk/PKGBUILD +++ b/mingw-w64-itk/PKGBUILD @@ -2,44 +2,50 @@ _realname=itk pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.6.1 +pkgver=4.8.0 pkgrel=1 -pkgdesc="An open-source C++ toolkit for medical image processing (mingw-w64)" +pkgdesc='An open-source C++ toolkit for medical image processing (mingw-w64)' arch=('any') -url="http://www.itk.org/" -license=("Apache" "GPL") +url='http://www.itk.org/' +license=('Apache') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-fftw" - "${MINGW_PACKAGE_PREFIX}-hdf5" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-opencv" - "${MINGW_PACKAGE_PREFIX}-vtk") + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-opencv" + "${MINGW_PACKAGE_PREFIX}-vtk") optdepends=("${MINGW_PACKAGE_PREFIX}-opencv: ITK-OpenCV bridge" - "${MINGW_PACKAGE_PREFIX}-vtk: ITK-VTK bridge") -source=(https://github.com/InsightSoftwareConsortium/ITK/archive/v$pkgver.tar.gz) -md5sums=('50993b721839f22c8b7a4d76bab23adc') + "${MINGW_PACKAGE_PREFIX}-vtk: ITK-VTK bridge") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/InsightSoftwareConsortium/ITK/archive/v${pkgver}.tar.gz") +sha1sums=('b20c1b1641c436e86dae081937bb36385fe72a65') build() { - CXXFLAGS+=" -std=gnu++11" - [[ "$CARCH" = 'i686' ]] && { - _cmakeopts=('-DITK_USE_64BITS_IDS=OFF' '-DVNL_CONFIG_ENABLE_SSE2_ROUNDING=OFF') - } - [[ "$CARCH" = 'x86_64' ]] && { - _cmakeopts=('-DITK_USE_64BITS_IDS=ON' '-DVNL_CONFIG_ENABLE_SSE2_ROUNDING=ON') - } + CFLAGS+=" ${CPPFLAGS}" + CXXFLAGS+=" ${CPPFLAGS} -std=gnu++11" - [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + local -a _extra_config + if [[ "$CARCH" = 'i686' ]]; then + _extra_config=('-DITK_USE_64BITS_IDS=OFF' + '-DVNL_CONFIG_ENABLE_SSE2_ROUNDING=OFF') + fi + if [[ "$CARCH" = 'x86_64' ]]; then + _extra_config=('-DITK_USE_64BITS_IDS=ON' + '-DVNL_CONFIG_ENABLE_SSE2_ROUNDING=ON') + fi - ${MINGW_PREFIX}/bin/cmake.exe \ + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" + mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + "${MINGW_PREFIX}/bin/cmake.exe" \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ -DBUILD_DOCUMENTATION=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTING=OFF \ @@ -61,24 +67,24 @@ build() { -DITK_USE_SYSTEM_ZLIB=ON \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ - ${_cmakeopts[@]} \ - ../${_realname}-${pkgver} + "${_extra_config[@]}" \ + "../${_realname}-${pkgver}" make } package() { cd "${srcdir}/build-${CARCH}" - make -j1 install + make DESTDIR=${pkgdir} -j1 install - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` + pushd "${pkgdir}${MINGW_PREFIX}" > /dev/null + sed -s "s|${MINGW_PREFIX}|\${_IMPORT_PREFIX}|g" \ + -i "lib/cmake/${_realname}-${pkgver%.*}/ITKTargets-release.cmake" + find "lib/cmake/${_realname}-${pkgver%.*}" -name '*.cmake' -exec \ + sed -s "s|${MINGW_PREFIX}|\${ITK_INSTALL_PREFIX}|g" -i {} \; + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "share/licenses/${_realname}/LICENSE" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/NOTICE" "share/licenses/${_realname}/NOTICE" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/Modules/ThirdParty/KWSys/src/KWSys/Copyright.txt" \ + "share/licenses/${_realname}/KWSys/Copyright.txt" popd > /dev/null - - ITK_SUFFIX=$(echo "${pkgver}" | sed 's|\([0-9]*\.[0-9]*\).*$|\1|') - - sed -s "s|${PREFIX_DEPS}|\${_IMPORT_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}-${ITK_SUFFIX}/ITKTargets-release.cmake - find "${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}-${ITK_SUFFIX}" -name '*.cmake' -exec \ - sed -s "s|${PREFIX_DEPS}|\${ITK_INSTALL_PREFIX}|g" -i {} \; } diff --git a/mingw-w64-jansson/PKGBUILD b/mingw-w64-jansson/PKGBUILD new file mode 100644 index 0000000000..198778e747 --- /dev/null +++ b/mingw-w64-jansson/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Alexey Pavlov +# Maintainer: Chilledheart + +_realname=jansson +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.7 +pkgrel=2 +pkgdesc="A C library for encoding, decoding and manipulating JSON data (mingw-w64)" +arch=('any') +url="http://www.digip.org/jansson/" +license=('MIT') +source=("http://www.digip.org/${_realname}/releases/${_realname}-${pkgver}.tar.gz") +sha1sums=('7d8686d84fd46c7c28d70bf2d5e8961bc002845e') + +prepare() { + cd "${srcdir}/${_realname}-$pkgver" +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-jasper/PKGBUILD b/mingw-w64-jasper/PKGBUILD index e3f6baf6e2..324afe93b6 100644 --- a/mingw-w64-jasper/PKGBUILD +++ b/mingw-w64-jasper/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=jasper - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.900.1 -pkgrel=2 +pkgrel=4 pkgdesc="A software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard (mingw-w64)" arch=('any') url="http://www.ece.uvic.ca/~mdadams/jasper" @@ -13,51 +12,95 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" depends=("${MINGW_PACKAGE_PREFIX}-libjpeg-turbo") options=('staticlibs' 'strip' '!libtool') source=("http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-${pkgver}.zip" - "jpc_dec.c.patch" - "patch-libjasper-stepsizes-overflow.diff" - "jasper-1.900.1-CVE-2008-3520.patch" - "jasper-1.900.1-CVE-2008-3522.patch" - "jasper-1.900.1-mingw32.patch" - "jasper-1.900.1-canonical-target.patch" - "jasper-1.900.1-enable-shared.patch" - "jasper-1.900.1-sleep.patch") + patch-libjasper-stepsizes-overflow.diff + jpc_dec.c.patch + jasper-1.900.1-CVE-2008-3520.patch + jasper-1.900.1-CVE-2008-3522.patch + jasper-pkgconfig.patch + jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch + jasper-CVE-2014-9029.patch + jasper-CVE-2014-8137.patch + jasper-CVE-2014-8138.patch + jasper-CVE-2014-8157.patch + jasper-CVE-2014-8158.patch + jasper-1.900.1-Coverity-BAD_SIZEOF.patch + jasper-1.900.1-Coverity-CHECKED_RETURN.patch + jasper-1.900.1-Coverity-FORWARD_NULL.patch + jasper-1.900.1-Coverity-NULL_RETURNS.patch + jasper-1.900.1-Coverity-RESOURCE_LEAK.patch + jasper-1.900.1-Coverity-UNREACHABLE.patch + jasper-1.900.1-Coverity-UNUSED_VALUE.patch + jasper-1.900.1-mingw32.patch + jasper-1.900.1-enable-shared.patch + jasper-1.900.1-sleep.patch) sha1sums=('9c5735f773922e580bf98c7c7dfda9bbed4c5191' - 'c1a0176a15210c0af14d85e55ce566921957d780' 'f298566fef08c8a589d072582112cd51c72c3983' + 'c1a0176a15210c0af14d85e55ce566921957d780' '2483dba925670bf29f531d85d73c4e5ada513b01' '0e7b6142cd9240ffb15a1ed7297c43c76fa09ee4' - 'ff3bd0235915b89020d345db96e879f669d5e473' - 'ec93341267617d9d75eafc041f4786c16b07f62c' + '2cd4bf95286ec1f8757023f216ba7b839b4ee923' + '06a60d1ee02a2c20a93ba1fb8a04bc3d868216a6' + 'ecae5348b05e0fb304600dc4fecb834208c4c235' + 'bee436561698a339c680e6654252b8bf18643318' + '6086e717af2f0a026f70e399e28fe115f08a8cc1' + 'aaf96946073d2ece35f3695e8cc7956b5cad9a1d' + 'e69b339de43d1dc2fbb98368cee3d20f76d35941' + '184279e0684159462419c4f1dcf67b99e6842bb9' + 'c68961c9071a772cf1cbfec6effa961352e8bb52' + '21d312eb4625050f39cfad0431b47ce225e3c536' + '4f5bc89491670360bebf3b9d1b21a14c2b2f9faf' + '643519f88b7293f2ed20efa8b6222cfe0151708f' + 'f8f7515303107d67f0e86bf42b26b458bfda1701' + '551c5f809d8e9adb16819d73e636a01cae65c8d7' + '2d64229bf71633ec7e1ba0c1d5116dda1fa72468' '54940e11d1b04964a0ed9329a8e1ffbc290353ad' 'd009ecd9d1d0212bcedcf28f483db77ddd3bb1c7') prepare() { cd "$srcdir/jasper-$pkgver" find . -type f -exec dos2unix {} \; - patch -p1 -i "${srcdir}/jpc_dec.c.patch" - patch -p1 -i "${srcdir}/patch-libjasper-stepsizes-overflow.diff" - patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2008-3520.patch" - patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2008-3522.patch" - patch -p1 -i "${srcdir}/jasper-1.900.1-mingw32.patch" - patch -p1 -i "${srcdir}/jasper-1.900.1-canonical-target.patch" - patch -p1 -i "${srcdir}/jasper-1.900.1-enable-shared.patch" - patch -p1 -i "${srcdir}/jasper-1.900.1-sleep.patch" - - libtoolize --copy --force - aclocal - automake --add-missing - autoconf + + patch -p1 -i "${srcdir}"/patch-libjasper-stepsizes-overflow.diff + patch -p1 -i "${srcdir}"/jpc_dec.c.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-CVE-2008-3520.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-CVE-2008-3522.patch + patch -p1 -i "${srcdir}"/jasper-pkgconfig.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch + patch -p1 -i "${srcdir}"/jasper-CVE-2014-9029.patch + patch -p1 -i "${srcdir}"/jasper-CVE-2014-8137.patch + patch -p1 -i "${srcdir}"/jasper-CVE-2014-8138.patch + patch -p1 -i "${srcdir}"/jasper-CVE-2014-8157.patch + patch -p1 -i "${srcdir}"/jasper-CVE-2014-8158.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-BAD_SIZEOF.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-CHECKED_RETURN.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-FORWARD_NULL.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-NULL_RETURNS.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-UNREACHABLE.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-Coverity-UNUSED_VALUE.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-mingw32.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-enable-shared.patch + patch -p1 -i "${srcdir}"/jasper-1.900.1-sleep.patch + + #libtoolize --copy --force + #aclocal + #automake --add-missing + #autoconf + + autoreconf -fiv } build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --enable-static + --enable-static \ + --disable-opengl + make } @@ -68,6 +111,5 @@ check() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-jasper/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch b/mingw-w64-jasper/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch new file mode 100644 index 0000000000..f753080a3a --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch @@ -0,0 +1,23 @@ +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.CERT-VU-887409 jasper-1.900.1/src/libjasper/jpc/jpc_cs.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.CERT-VU-887409 2011-10-25 17:25:39.000000000 +0200 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2011-10-25 17:29:14.379371908 +0200 +@@ -744,6 +744,10 @@ static int jpc_cox_getcompparms(jpc_ms_t + return -1; + } + compparms->numrlvls = compparms->numdlvls + 1; ++ if (compparms->numrlvls > JPC_MAXRLVLS) { ++ jpc_cox_destroycompparms(compparms); ++ return -1; ++ } + if (prtflag) { + for (i = 0; i < compparms->numrlvls; ++i) { + if (jpc_getuint8(in, &tmp)) { +@@ -1331,7 +1335,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms + jpc_crgcomp_t *comp; + uint_fast16_t compno; + crg->numcomps = cstate->numcomps; +- if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) { ++ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(jpc_crgcomp_t)))) { + return -1; + } + for (compno = 0, comp = crg->comps; compno < cstate->numcomps; diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-BAD_SIZEOF.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-BAD_SIZEOF.patch new file mode 100644 index 0000000000..1977400579 --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-BAD_SIZEOF.patch @@ -0,0 +1,17 @@ +Error: BAD_SIZEOF +jpc/jpc_enc.c:2105: bad_sizeof: Taking the size of binary expression "tcmpt->numstepsizes * sizeof (uint_fast16_t) /*8*/" is suspicious. + Did you intend "sizeof(tcmpt->numstepsizes) * sizeof (uint_fast16_t) /*8*/"? + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.bad_sizeof jasper-1.900.1/src/libjasper/jpc/jpc_enc.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.bad_sizeof 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_enc.c 2011-06-23 17:28:17.085690561 +0200 +@@ -2102,8 +2102,7 @@ static jpc_enc_tcmpt_t *tcmpt_create(jpc + + tcmpt->numstepsizes = tcmpt->numbands; + assert(tcmpt->numstepsizes <= JPC_MAXBANDS); +- memset(tcmpt->stepsizes, 0, sizeof(tcmpt->numstepsizes * +- sizeof(uint_fast16_t))); ++ memset(tcmpt->stepsizes, 0, tcmpt->numstepsizes * sizeof(uint_fast16_t)); + + /* Retrieve information about the various bands. */ + jpc_tsfb_getbands(tcmpt->tsfb, jas_seq2d_xstart(tcmpt->data), diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-CHECKED_RETURN.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-CHECKED_RETURN.patch new file mode 100644 index 0000000000..ea330f2c19 --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-CHECKED_RETURN.patch @@ -0,0 +1,141 @@ +Error: CHECKED_RETURN +jpc/jpc_cs.c:924: check_return: Calling function "jpc_putuint16" without checking return value (as is done elsewhere 11 out of 13 times). +jpc/jpc_cs.c:924: unchecked_value: No check of the return value of "jpc_putuint16(out, qcc->compno)". + +jpc/jpc_cs.c:1021: check_return: Calling function "jpc_putuint16" without checking return value (as is done elsewhere 11 out of 13 times). +jpc/jpc_cs.c:1021: unchecked_value: No check of the return value of "jpc_putuint16(out, compparms->stepsizes[i])". + +jpc/jpc_cs.c:994: check_return: Calling function "jpc_getuint16" without checking return value (as is done elsewhere 14 out of 16 times). +jpc/jpc_cs.c:994: unchecked_value: No check of the return value of "jpc_getuint16(in, compparms->stepsizes + i)". + +jpc/jpc_cs.c:905: check_return: Calling function "jpc_getuint16" without checking return value (as is done elsewhere 14 out of 16 times). +jpc/jpc_cs.c:905: unchecked_value: No check of the return value of "jpc_getuint16(in, &qcc->compno)". + +jpc/jpc_cs.c:969: check_return: Calling function "jpc_getuint8" without checking return value (as is done elsewhere 17 out of 20 times). +jpc/jpc_cs.c:969: unchecked_value: No check of the return value of "jpc_getuint8(in, &tmp)". + +jpc/jpc_cs.c:991: check_return: Calling function "jpc_getuint8" without checking return value (as is done elsewhere 17 out of 20 times). +jpc/jpc_cs.c:991: unchecked_value: No check of the return value of "jpc_getuint8(in, &tmp)". + +jpc/jpc_cs.c:901: check_return: Calling function "jpc_getuint8" without checking return value (as is done elsewhere 17 out of 20 times). +jpc/jpc_cs.c:901: unchecked_value: No check of the return value of "jpc_getuint8(in, &tmp)". + +jpc/jpc_t2enc.c:338: check_return: Calling function "jpc_putms" without checking return value (as is done elsewhere 12 out of 13 times). +jpc/jpc_t2enc.c:338: unchecked_value: No check of the return value of "jpc_putms(out, enc->cstate, ms)". + +ras/ras_enc.c:245: check_return: Calling function "jas_image_readcmpt" without checking return value (as is done elsewhere 9 out of 10 times). +ras/ras_enc.c:245: unchecked_value: No check of the return value of "jas_image_readcmpt(image, cmpts[i], 0L, y, image->brx_ - image->tlx_, 1L, data[i])". + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.checked_return jasper-1.900.1/src/libjasper/jpc/jpc_cs.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.checked_return 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2011-06-24 13:52:25.636551844 +0200 +@@ -898,11 +898,15 @@ static int jpc_qcc_getparms(jpc_ms_t *ms + int len; + len = ms->len; + if (cstate->numcomps <= 256) { +- jpc_getuint8(in, &tmp); ++ if (jpc_getuint8(in, &tmp)) { ++ return -1; ++ } + qcc->compno = tmp; + --len; + } else { +- jpc_getuint16(in, &qcc->compno); ++ if (jpc_getuint16(in, &qcc->compno)) { ++ return -1; ++ } + len -= 2; + } + if (jpc_qcx_getcompparms(&qcc->compparms, cstate, in, len)) { +@@ -919,9 +923,13 @@ static int jpc_qcc_putparms(jpc_ms_t *ms + { + jpc_qcc_t *qcc = &ms->parms.qcc; + if (cstate->numcomps <= 256) { +- jpc_putuint8(out, qcc->compno); ++ if (jpc_putuint8(out, qcc->compno)) { ++ return -1; ++ } + } else { +- jpc_putuint16(out, qcc->compno); ++ if (jpc_putuint16(out, qcc->compno)) { ++ return -1; ++ } + } + if (jpc_qcx_putcompparms(&qcc->compparms, cstate, out)) { + return -1; +@@ -966,7 +974,9 @@ static int jpc_qcx_getcompparms(jpc_qcxc + cstate = 0; + + n = 0; +- jpc_getuint8(in, &tmp); ++ if (jpc_getuint8(in, &tmp)) { ++ return -1; ++ } + ++n; + compparms->qntsty = tmp & 0x1f; + compparms->numguard = (tmp >> 5) & 7; +@@ -988,10 +998,14 @@ static int jpc_qcx_getcompparms(jpc_qcxc + assert(compparms->stepsizes); + for (i = 0; i < compparms->numstepsizes; ++i) { + if (compparms->qntsty == JPC_QCX_NOQNT) { +- jpc_getuint8(in, &tmp); ++ if (jpc_getuint8(in, &tmp)) { ++ return -1; ++ } + compparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3); + } else { +- jpc_getuint16(in, &compparms->stepsizes[i]); ++ if (jpc_getuint16(in, &compparms->stepsizes[i])) { ++ return -1; ++ } + } + } + } else { +@@ -1015,10 +1029,14 @@ static int jpc_qcx_putcompparms(jpc_qcxc + jpc_putuint8(out, ((compparms->numguard & 7) << 5) | compparms->qntsty); + for (i = 0; i < compparms->numstepsizes; ++i) { + if (compparms->qntsty == JPC_QCX_NOQNT) { +- jpc_putuint8(out, JPC_QCX_GETEXPN( +- compparms->stepsizes[i]) << 3); ++ if (jpc_putuint8(out, JPC_QCX_GETEXPN( ++ compparms->stepsizes[i]) << 3)) { ++ return -1; ++ } + } else { +- jpc_putuint16(out, compparms->stepsizes[i]); ++ if (jpc_putuint16(out, compparms->stepsizes[i])) { ++ return -1; ++ } + } + } + return 0; +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c.checked_return jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c.checked_return 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c 2011-06-24 12:29:32.069578992 +0200 +@@ -335,7 +335,9 @@ assert(jpc_firstone(datalen) < cblk->num + if (!(ms = jpc_ms_create(JPC_MS_EPH))) { + return -1; + } +- jpc_putms(out, enc->cstate, ms); ++ if (jpc_putms(out, enc->cstate, ms)) { ++ return -1; ++ } + jpc_ms_destroy(ms); + } + +diff -up jasper-1.900.1/src/libjasper/ras/ras_enc.c.checked_return jasper-1.900.1/src/libjasper/ras/ras_enc.c +--- jasper-1.900.1/src/libjasper/ras/ras_enc.c.checked_return 2007-01-19 22:43:04.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/ras/ras_enc.c 2011-06-24 14:05:31.233482612 +0200 +@@ -242,8 +242,10 @@ static int ras_putdatastd(jas_stream_t * + + for (y = 0; y < hdr->height; y++) { + for (i = 0; i < numcmpts; ++i) { +- jas_image_readcmpt(image, cmpts[i], 0, y, jas_image_width(image), +- 1, data[i]); ++ if (jas_image_readcmpt(image, cmpts[i], 0, y, ++ jas_image_width(image), 1, data[i])) { ++ return -1; ++ } + } + z = 0; + nz = 0; diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-FORWARD_NULL.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-FORWARD_NULL.patch new file mode 100644 index 0000000000..ff526b4d1b --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-FORWARD_NULL.patch @@ -0,0 +1,44 @@ +Error: FORWARD_NULL +jpc/jpc_dec.c:2207: var_compare_op: Comparing "streams" to null implies that "streams" might be null. +jpc/jpc_dec.c:2270: var_deref_model: Passing null variable "streams" to function "jpc_streamlist_destroy", which dereferences it. +jpc/jpc_dec.c:2108: deref_parm: Directly dereferencing parameter "streamlist". + +jpc/jpc_t1enc.c:225: assign_zero: Assigning: "cblk->passes" = 0. +jpc/jpc_t1enc.c:228: alias_transfer: Assigning null: "pass" = "cblk->passes". +jpc/jpc_t1enc.c:229: var_deref_op: Dereferencing null variable "pass". + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.forward_null jasper-1.900.1/src/libjasper/jpc/jpc_dec.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.forward_null 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2011-06-24 15:01:39.200600146 +0200 +@@ -2267,7 +2267,9 @@ jpc_streamlist_t *jpc_ppmstabtostreams(j + return streams; + + error: +- jpc_streamlist_destroy(streams); ++ if (streams) { ++ jpc_streamlist_destroy(streams); ++ } + return 0; + } + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c.forward_null jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c.forward_null 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c 2011-06-24 14:58:33.061248133 +0200 +@@ -224,7 +224,7 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_ + } else { + cblk->passes = 0; + } +- endpasses = &cblk->passes[cblk->numpasses]; ++ endpasses = (cblk->passes) ? &cblk->passes[cblk->numpasses] : 0; + for (pass = cblk->passes; pass != endpasses; ++pass) { + pass->start = 0; + pass->end = 0; +@@ -352,7 +352,7 @@ dump_passes(cblk->passes, cblk->numpasse + #endif + + n = 0; +- endpasses = &cblk->passes[cblk->numpasses]; ++ endpasses = (cblk->passes) ? &cblk->passes[cblk->numpasses] : 0; + for (pass = cblk->passes; pass != endpasses; ++pass) { + if (pass->start < n) { + pass->start = n; diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-NULL_RETURNS.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-NULL_RETURNS.patch new file mode 100644 index 0000000000..4c72270284 --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-NULL_RETURNS.patch @@ -0,0 +1,61 @@ +Error: NULL_RETURNS +base/jas_image.c:213: returned_null: Function "jas_image_create0" returns null (checked 6 out of 7 times). +base/jas_image.c:213: var_assigned: Assigning: "newimage" = null return value from "jas_image_create0". +base/jas_image.c:214: dereference: Dereferencing a pointer that might be null "newimage" when calling "jas_image_growcmpts". +base/jas_image.c:777: deref_parm: Directly dereferencing parameter "image". + +base/jas_seq.c:223: returned_null: Function "jas_malloc" returns null (checked 110 out of 119 times). +base/jas_seq.c:223: var_assigned: Assigning: "mat0->rows_" = null return value from "jas_malloc". +base/jas_seq.c:225: dereference: Dereferencing a null pointer "mat0->rows_". + +jp2/jp2_cod.c:484: returned_null: Function "jas_stream_memopen" returns null (checked 12 out of 15 times). +jp2/jp2_cod.c:484: var_assigned: Assigning: "tmpstream" = null return value from "jas_stream_memopen". +jp2/jp2_cod.c:490: dereference: Dereferencing a pointer that might be null "tmpstream" when calling "jas_stream_tell". +base/jas_stream.c:677: deref_parm: Directly dereferencing parameter "stream". + + +diff -up jasper-1.900.1/src/libjasper/base/jas_image.c.NULL_RETURNS jasper-1.900.1/src/libjasper/base/jas_image.c +--- jasper-1.900.1/src/libjasper/base/jas_image.c.NULL_RETURNS 2011-12-08 14:00:05.350020869 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_image.c 2011-12-08 14:00:06.638004766 +0100 +@@ -210,7 +210,10 @@ jas_image_t *jas_image_copy(jas_image_t + jas_image_t *newimage; + int cmptno; + +- newimage = jas_image_create0(); ++ if (!(newimage = jas_image_create0())) { ++ goto error; ++ } ++ + if (jas_image_growcmpts(newimage, image->numcmpts_)) { + goto error; + } +diff -up jasper-1.900.1/src/libjasper/base/jas_seq.c.NULL_RETURNS jasper-1.900.1/src/libjasper/base/jas_seq.c +--- jasper-1.900.1/src/libjasper/base/jas_seq.c.NULL_RETURNS 2011-12-08 14:00:05.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_seq.c 2011-12-08 14:15:12.449680562 +0100 +@@ -220,7 +220,11 @@ void jas_matrix_bindsub(jas_matrix_t *ma + mat0->numrows_ = r1 - r0 + 1; + mat0->numcols_ = c1 - c0 + 1; + mat0->maxrows_ = mat0->numrows_; +- mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)); ++ if (!(mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)))) { ++ jas_matrix_destroy(mat0); ++ return; ++ } ++ + for (i = 0; i < mat0->numrows_; ++i) { + mat0->rows_[i] = mat1->rows_[r0 + i] + c0; + } +diff -up jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.NULL_RETURNS jasper-1.900.1/src/libjasper/jp2/jp2_cod.c +--- jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.NULL_RETURNS 2011-12-08 14:00:05.633017331 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_cod.c 2011-12-08 14:00:06.677004279 +0100 +@@ -481,7 +481,9 @@ int jp2_box_put(jp2_box_t *box, jas_stre + dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA)); + + if (dataflag) { +- tmpstream = jas_stream_memopen(0, 0); ++ if (!(tmpstream = jas_stream_memopen(0, 0))) { ++ goto error; ++ } + if (box->ops->putdata) { + if ((*box->ops->putdata)(box, tmpstream)) { + goto error; diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch new file mode 100644 index 0000000000..76f5da77fc --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch @@ -0,0 +1,202 @@ +Error: RESOURCE_LEAK +src/appl/imgcmp.c:504: var_assign: Assigning: "diffimage" = storage returned from "jas_image_create(3, compparms, 1025)". +src/appl/imgcmp.c:511: leaked_storage: Variable "diffimage" going out of scope leaks the storage it points to. +src/appl/imgcmp.c:537: leaked_storage: Variable "diffimage" going out of scope leaks the storage it points to. + +base/jas_image.c:254: var_assign: Assigning: "newcmpt" = storage returned from "jas_image_cmpt_create0()". +base/jas_image.c:268: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to. +base/jas_image.c:271: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to. +base/jas_image.c:274: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to. +base/jas_image.c:277: leaked_storage: Variable "newcmpt" going out of scope leaks the storage it points to. + +base/jas_cm.c:611: var_assign: Assigning: "newpxformseq" = storage returned from "jas_cmpxformseq_create()". +base/jas_cm.c:617: leaked_storage: Variable "newpxformseq" going out of scope leaks the storage it points to. + +base/jas_cm.c:343: var_assign: Assigning: "newprof" = storage returned from "jas_cmprof_create()". +base/jas_cm.c:358: leaked_storage: Variable "newprof" going out of scope leaks the storage it points to. + +base/jas_cm.c:380: var_assign: Assigning: "xform" = storage returned from "jas_malloc(sizeof (jas_cmxform_t) /*16*/)". +base/jas_cm.c:461: leaked_storage: Variable "xform" going out of scope leaks the storage it points to. + +base/jas_image.c:1379: var_assign: Assigning: "xform" = storage returned from "jas_cmxform_create(inprof, outprof, NULL, 0, intent, 0)". +base/jas_image.c:1444: leaked_storage: Variable "xform" going out of scope leaks the storage it points to. + +base/jas_image.c:1306: var_assign: Assigning: "inimage" = storage returned from "jas_image_copy(image)". +base/jas_image.c:1444: leaked_storage: Variable "inimage" going out of scope leaks the storage it points to. + +base/jas_image.c:1345: var_assign: Assigning: "outimage" = storage returned from "jas_image_create0()". +base/jas_image.c:1444: leaked_storage: Variable "outimage" going out of scope leaks the storage it points to. + +bmp/bmp_enc.c:187: var_assign: Assigning: "info" = storage returned from "bmp_info_create()". +bmp/bmp_enc.c:208: leaked_storage: Variable "info" going out of scope leaks the storage it points to. + +jpc/jpc_tagtree.c:111: var_assign: Assigning: "tree" = storage returned from "jpc_tagtree_alloc()". +jpc/jpc_tagtree.c:129: leaked_storage: Variable "tree" going out of scope leaks the storage it points to. + +jpc/jpc_dec.c:452: var_assign: Assigning: "compinfos" = storage returned from "jas_malloc(dec->numcomps * sizeof (jas_image_cmptparm_t) /*56*/)". +jpc/jpc_dec.c:468: leaked_storage: Variable "compinfos" going out of scope leaks the storage it points to. + +jpc/jpc_dec.c:1483: var_assign: Assigning: "cp" = storage returned from "jas_malloc(sizeof (jpc_dec_cp_t) /*48*/)". +jpc/jpc_dec.c:1493: leaked_storage: Variable "cp" going out of scope leaks the storage it points to. +jpc/jpc_dec.c:1497: leaked_storage: Variable "cp" going out of scope leaks the storage it points to. + +mif/mif_cod.c:523: var_assign: Assigning: "cmpt" = storage returned from "mif_cmpt_create()". +mif/mif_cod.c:568: leaked_storage: Variable "cmpt" going out of scope leaks the storage it points to. + +mif/mif_cod.c:568: leaked_storage: Variable "tvp" going out of scope leaks the storage it points to. + + +diff -up jasper-1.900.1/src/appl/imgcmp.c.RESOURCE_LEAK jasper-1.900.1/src/appl/imgcmp.c +--- jasper-1.900.1/src/appl/imgcmp.c.RESOURCE_LEAK 2007-01-19 22:43:08.000000000 +0100 ++++ jasper-1.900.1/src/appl/imgcmp.c 2011-12-08 14:16:04.727027007 +0100 +@@ -507,6 +507,7 @@ jas_image_t *makediffimage(jas_matrix_t + + for (i = 0; i < 3; ++i) { + if (!(diffdata[i] = jas_matrix_create(height, width))) { ++ jas_image_destroy(diffimage); + fprintf(stderr, "internal error\n"); + return 0; + } +@@ -534,6 +535,7 @@ jas_image_t *makediffimage(jas_matrix_t + + for (i = 0; i < 3; ++i) { + if (jas_image_writecmpt(diffimage, i, 0, 0, width, height, diffdata[i])) { ++ jas_image_destroy(diffimage); + return 0; + } + } +diff -up jasper-1.900.1/src/libjasper/base/jas_cm.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/base/jas_cm.c +--- jasper-1.900.1/src/libjasper/base/jas_cm.c.RESOURCE_LEAK 2011-12-08 14:16:03.387043758 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_cm.c 2011-12-08 14:16:04.728026994 +0100 +@@ -355,6 +355,8 @@ jas_cmprof_t *jas_cmprof_copy(jas_cmprof + } + return newprof; + error: ++ if (newprof) ++ jas_cmprof_destroy(newprof); + return 0; + } + +@@ -458,6 +460,8 @@ jas_cmxform_t *jas_cmxform_create(jas_cm + } + return xform; + error: ++ if (xform) ++ jas_cmxform_destroy(xform); + return 0; + } + +@@ -614,6 +618,8 @@ static jas_cmpxformseq_t *jas_cmpxformse + goto error; + return newpxformseq; + error: ++ if (newpxformseq) ++ jas_cmpxformseq_destroy(newpxformseq); + return 0; + } + +diff -up jasper-1.900.1/src/libjasper/base/jas_image.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/base/jas_image.c +--- jasper-1.900.1/src/libjasper/base/jas_image.c.RESOURCE_LEAK 2011-12-08 14:16:04.635028156 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_image.c 2011-12-08 14:16:04.776026394 +0100 +@@ -268,15 +268,19 @@ static jas_image_cmpt_t *jas_image_cmpt_ + newcmpt->cps_ = cmpt->cps_; + newcmpt->type_ = cmpt->type_; + if (!(newcmpt->stream_ = jas_stream_memopen(0, 0))) { ++ jas_image_cmpt_destroy(newcmpt); + return 0; + } + if (jas_stream_seek(cmpt->stream_, 0, SEEK_SET)) { ++ jas_image_cmpt_destroy(newcmpt); + return 0; + } + if (jas_stream_copy(newcmpt->stream_, cmpt->stream_, -1)) { ++ jas_image_cmpt_destroy(newcmpt); + return 0; + } + if (jas_stream_seek(newcmpt->stream_, 0, SEEK_SET)) { ++ jas_image_cmpt_destroy(newcmpt); + return 0; + } + return newcmpt; +@@ -1443,5 +1447,11 @@ jas_image_dump(outimage, stderr); + #endif + return outimage; + error: ++ if (xform) ++ jas_cmxform_destroy(xform); ++ if (inimage) ++ jas_image_destroy(inimage); ++ if (outimage) ++ jas_image_destroy(outimage); + return 0; + } +diff -up jasper-1.900.1/src/libjasper/bmp/bmp_enc.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/bmp/bmp_enc.c +--- jasper-1.900.1/src/libjasper/bmp/bmp_enc.c.RESOURCE_LEAK 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/bmp/bmp_enc.c 2011-12-08 14:16:04.826025768 +0100 +@@ -205,16 +205,19 @@ int bmp_encode(jas_image_t *image, jas_s + + /* Write the bitmap header. */ + if (bmp_puthdr(out, &hdr)) { ++ bmp_info_destroy(info); + return -1; + } + + /* Write the bitmap information. */ + if (bmp_putinfo(out, info)) { ++ bmp_info_destroy(info); + return -1; + } + + /* Write the bitmap data. */ + if (bmp_putdata(out, info, image, enc->cmpts)) { ++ bmp_info_destroy(info); + return -1; + } + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/jpc/jpc_dec.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.RESOURCE_LEAK 2011-12-08 14:16:04.594028668 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2011-12-08 14:17:25.677014992 +0100 +@@ -465,6 +465,7 @@ static int jpc_dec_process_sot(jpc_dec_t + + if (!(dec->image = jas_image_create(dec->numcomps, compinfos, + JAS_CLRSPC_UNKNOWN))) { ++ jas_free(compinfos); + return -1; + } + jas_free(compinfos); +@@ -1490,10 +1491,11 @@ static jpc_dec_cp_t *jpc_dec_cp_create(u + cp->mctid = 0; + cp->csty = 0; + if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) { ++ jpc_dec_cp_destroy(cp); + return 0; + } + if (!(cp->pchglist = jpc_pchglist_create())) { +- jas_free(cp->ccps); ++ jpc_dec_cp_destroy(cp); + return 0; + } + for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c.RESOURCE_LEAK 2011-12-08 14:16:04.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c 2011-12-08 14:17:55.905637082 +0100 +@@ -126,6 +126,7 @@ jpc_tagtree_t *jpc_tagtree_create(int nu + } while (n > 1); + + if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) { ++ jpc_tagtree_destroy(tree); + return 0; + } + +diff -up jasper-1.900.1/src/libjasper/mif/mif_cod.c.RESOURCE_LEAK jasper-1.900.1/src/libjasper/mif/mif_cod.c +--- jasper-1.900.1/src/libjasper/mif/mif_cod.c.RESOURCE_LEAK 2011-12-08 14:16:04.250032970 +0100 ++++ jasper-1.900.1/src/libjasper/mif/mif_cod.c 2011-12-08 14:16:04.967024005 +0100 +@@ -564,7 +564,7 @@ static int mif_process_cmpt(mif_hdr_t *h + break; + case MIF_DATA: + if (!(cmpt->data = jas_strdup(jas_tvparser_getval(tvp)))) { +- return -1; ++ goto error; + } + break; + } diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-UNREACHABLE.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-UNREACHABLE.patch new file mode 100644 index 0000000000..3cae29403b --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-UNREACHABLE.patch @@ -0,0 +1,37 @@ +Error: UNREACHABLE +jp2/jp2_cod.c:304: unreachable: This code cannot be reached: "abort();". + +jp2/jp2_cod.c:514: unreachable: This code cannot be reached: "abort();". + +jp2/jp2_enc.c:354: unreachable: This code cannot be reached: "abort();". + +diff -up jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.unreachable jasper-1.900.1/src/libjasper/jp2/jp2_cod.c +--- jasper-1.900.1/src/libjasper/jp2/jp2_cod.c.unreachable 2007-01-19 22:43:05.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_cod.c 2011-06-27 15:28:13.083137952 +0200 +@@ -301,7 +301,6 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) + } + + return box; +- abort(); + + error: + if (box) { +@@ -511,7 +510,6 @@ int jp2_box_put(jp2_box_t *box, jas_stre + } + + return 0; +- abort(); + + error: + +diff -up jasper-1.900.1/src/libjasper/jp2/jp2_enc.c.unreachable jasper-1.900.1/src/libjasper/jp2/jp2_enc.c +--- jasper-1.900.1/src/libjasper/jp2/jp2_enc.c.unreachable 2007-01-19 22:43:05.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_enc.c 2011-06-27 15:27:58.858353979 +0200 +@@ -351,7 +351,6 @@ int sgnd; + } + + return 0; +- abort(); + + error: + diff --git a/mingw-w64-jasper/jasper-1.900.1-Coverity-UNUSED_VALUE.patch b/mingw-w64-jasper/jasper-1.900.1-Coverity-UNUSED_VALUE.patch new file mode 100644 index 0000000000..e7d4cb5910 --- /dev/null +++ b/mingw-w64-jasper/jasper-1.900.1-Coverity-UNUSED_VALUE.patch @@ -0,0 +1,41 @@ +Error: UNUSED_VALUE +base/jas_icc.c:328: returned_pointer: Pointer "attrvalinfo" returned by "jas_iccattrvalinfo_lookup(type)" is never used. + +jpc/jpc_enc.c:788: returned_pointer: Pointer "cp" returned by "strchr(s, 66)" is never used. + +diff -up jasper-1.900.1/src/libjasper/base/jas_icc.c.unused_value jasper-1.900.1/src/libjasper/base/jas_icc.c +--- jasper-1.900.1/src/libjasper/base/jas_icc.c.unused_value 2007-01-19 22:43:05.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2011-06-27 15:35:52.815263000 +0200 +@@ -266,7 +266,6 @@ jas_iccprof_t *jas_iccprof_load(jas_stre + jas_iccattrval_t *attrval; + jas_iccattrval_t *prevattrval; + jas_icctagtabent_t *tagtabent; +- jas_iccattrvalinfo_t *attrvalinfo; + int i; + int len; + +@@ -325,7 +324,7 @@ jas_iccprof_t *jas_iccprof_load(jas_stre + goto error; + } + curoff += 8; +- if (!(attrvalinfo = jas_iccattrvalinfo_lookup(type))) { ++ if (!jas_iccattrvalinfo_lookup(type)) { + #if 0 + jas_eprintf("warning: skipping unknown tag type\n"); + #endif +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.unused_value jasper-1.900.1/src/libjasper/jpc/jpc_enc.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_enc.c.unused_value 2007-01-19 22:43:07.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_enc.c 2011-06-27 15:36:17.437900180 +0200 +@@ -781,11 +781,10 @@ void jpc_enc_cp_destroy(jpc_enc_cp_t *cp + + int ratestrtosize(char *s, uint_fast32_t rawsize, uint_fast32_t *size) + { +- char *cp; + jpc_flt_t f; + + /* Note: This function must not modify output size on failure. */ +- if ((cp = strchr(s, 'B'))) { ++ if (strchr(s, 'B')) { + *size = atoi(s); + } else { + f = atof(s); diff --git a/mingw-w64-jasper/jasper-1.900.1-canonical-target.patch b/mingw-w64-jasper/jasper-1.900.1-canonical-target.patch deleted file mode 100644 index c7d47de883..0000000000 --- a/mingw-w64-jasper/jasper-1.900.1-canonical-target.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- jasper-1.900.1/configure.ac 2009-01-15 23:25:33.000000000 +0100 -+++ jasper-1.900.1/configure.ac 2009-01-15 23:25:40.000000000 +0100 -@@ -72,7 +72,7 @@ - # Note: This precedes automake initialization to avoid warnings. - AC_CANONICAL_BUILD - AC_CANONICAL_HOST --AC_CANONICAL_TARGET -+#AC_CANONICAL_TARGET - - # Initialize automake. - AM_INIT_AUTOMAKE diff --git a/mingw-w64-jasper/jasper-1.900.1-mingw32.patch b/mingw-w64-jasper/jasper-1.900.1-mingw32.patch index 02180eace4..059e0cbbd2 100644 --- a/mingw-w64-jasper/jasper-1.900.1-mingw32.patch +++ b/mingw-w64-jasper/jasper-1.900.1-mingw32.patch @@ -8,15 +8,3 @@ diff -rup jasper-1.900.1.orig/src/libjasper/Makefile.am jasper-1.900.1.new/src/l - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -diff -rup jasper-1.900.1.orig/src/libjasper/Makefile.in jasper-1.900.1.new/src/libjasper/Makefile.in ---- jasper-1.900.1.orig/src/libjasper/Makefile.in 2007-01-19 16:54:45.000000000 -0500 -+++ jasper-1.900.1.new/src/libjasper/Makefile.in 2008-09-09 10:08:43.000000000 -0400 -@@ -290,7 +290,7 @@ libjasper_la_LIBADD = \ - - # -release $(LT_RELEASE) - libjasper_la_LDFLAGS = \ -- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) - - all: all-recursive - diff --git a/mingw-w64-jasper/jasper-CVE-2014-8137.patch b/mingw-w64-jasper/jasper-CVE-2014-8137.patch new file mode 100644 index 0000000000..9600cd3231 --- /dev/null +++ b/mingw-w64-jasper/jasper-CVE-2014-8137.patch @@ -0,0 +1,57 @@ +--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2014-12-11 14:06:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2014-12-11 15:16:37.971272386 +0100 +@@ -1009,7 +1009,6 @@ static int jas_icccurv_input(jas_iccattr + return 0; + + error: +- jas_icccurv_destroy(attrval); + return -1; + } + +@@ -1127,7 +1126,6 @@ static int jas_icctxtdesc_input(jas_icca + #endif + return 0; + error: +- jas_icctxtdesc_destroy(attrval); + return -1; + } + +@@ -1206,8 +1204,6 @@ static int jas_icctxt_input(jas_iccattrv + goto error; + return 0; + error: +- if (txt->string) +- jas_free(txt->string); + return -1; + } + +@@ -1328,7 +1324,6 @@ static int jas_icclut8_input(jas_iccattr + goto error; + return 0; + error: +- jas_icclut8_destroy(attrval); + return -1; + } + +@@ -1497,7 +1492,6 @@ static int jas_icclut16_input(jas_iccatt + goto error; + return 0; + error: +- jas_icclut16_destroy(attrval); + return -1; + } + +--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:30:54.193209780 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:36:46.313217814 +0100 +@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in + case JP2_COLR_ICC: + iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp, + dec->colr->data.colr.iccplen); +- assert(iccprof); ++ if (!iccprof) { ++ jas_eprintf("error: failed to parse ICC profile\n"); ++ goto error; ++ } + jas_iccprof_gethdr(iccprof, &icchdr); + jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc); + jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc)); diff --git a/mingw-w64-jasper/jasper-CVE-2014-8138.patch b/mingw-w64-jasper/jasper-CVE-2014-8138.patch new file mode 100644 index 0000000000..5aaf8abb1d --- /dev/null +++ b/mingw-w64-jasper/jasper-CVE-2014-8138.patch @@ -0,0 +1,14 @@ +--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:26.000000000 +0100 +@@ -386,6 +386,11 @@ jas_image_t *jp2_decode(jas_stream_t *in + /* Determine the type of each component. */ + if (dec->cdef) { + for (i = 0; i < dec->numchans; ++i) { ++ /* Is the channel number reasonable? */ ++ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) { ++ jas_eprintf("error: invalid channel number in CDEF box\n"); ++ goto error; ++ } + jas_image_setcmpttype(dec->image, + dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo], + jp2_getct(jas_image_clrspc(dec->image), diff --git a/mingw-w64-jasper/jasper-CVE-2014-8157.patch b/mingw-w64-jasper/jasper-CVE-2014-8157.patch new file mode 100644 index 0000000000..ebfc1b2d0f --- /dev/null +++ b/mingw-w64-jasper/jasper-CVE-2014-8157.patch @@ -0,0 +1,12 @@ +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 jasper-1.900.1/src/libjasper/jpc/jpc_dec.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 2015-01-19 16:59:36.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2015-01-19 17:07:41.609863268 +0100 +@@ -489,7 +489,7 @@ static int jpc_dec_process_sot(jpc_dec_t + dec->curtileendoff = 0; + } + +- if (JAS_CAST(int, sot->tileno) > dec->numtiles) { ++ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) { + jas_eprintf("invalid tile number in SOT marker segment\n"); + return -1; + } diff --git a/mingw-w64-jasper/jasper-CVE-2014-8158.patch b/mingw-w64-jasper/jasper-CVE-2014-8158.patch new file mode 100644 index 0000000000..ce9e4b497f --- /dev/null +++ b/mingw-w64-jasper/jasper-CVE-2014-8158.patch @@ -0,0 +1,329 @@ +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 2015-01-19 17:25:28.730195502 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2015-01-19 17:27:20.214663127 +0100 +@@ -306,11 +306,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + { + + int bufsize = JPC_CEILDIVPOW2(numcols, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize]; +-#endif + jpc_fix_t *buf = splitbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; +@@ -318,7 +314,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + register int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -326,7 +321,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + abort(); + } + } +-#endif + + if (numcols >= 2) { + hstartcol = (numcols + 1 - parity) >> 1; +@@ -360,12 +354,10 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -374,11 +366,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize]; +-#endif + jpc_fix_t *buf = splitbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; +@@ -386,7 +374,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + register int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -394,7 +381,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + abort(); + } + } +-#endif + + if (numrows >= 2) { + hstartcol = (numrows + 1 - parity) >> 1; +@@ -428,12 +414,10 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -442,11 +426,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE]; +-#endif + jpc_fix_t *buf = splitbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -457,7 +437,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -465,7 +444,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + abort(); + } + } +-#endif + + if (numrows >= 2) { + hstartcol = (numrows + 1 - parity) >> 1; +@@ -517,12 +495,10 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -531,11 +507,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize * numcols]; +-#endif + jpc_fix_t *buf = splitbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -546,7 +518,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -554,7 +525,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + abort(); + } + } +-#endif + + if (numrows >= 2) { + hstartcol = (numrows + 1 - parity) >> 1; +@@ -606,12 +576,10 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -619,18 +587,13 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int + { + + int bufsize = JPC_CEILDIVPOW2(numcols, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize]; +-#endif + jpc_fix_t *buf = joinbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; + register int n; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -638,7 +601,6 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int + abort(); + } + } +-#endif + + hstartcol = (numcols + 1 - parity) >> 1; + +@@ -670,12 +632,10 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int + ++srcptr; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -684,18 +644,13 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize]; +-#endif + jpc_fix_t *buf = joinbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; + register int n; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -703,7 +658,6 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + abort(); + } + } +-#endif + + hstartcol = (numrows + 1 - parity) >> 1; + +@@ -735,12 +689,10 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + ++srcptr; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -749,11 +701,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE]; +-#endif + jpc_fix_t *buf = joinbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -763,7 +711,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + register int i; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { +@@ -771,7 +718,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + abort(); + } + } +-#endif + + hstartcol = (numrows + 1 - parity) >> 1; + +@@ -821,12 +767,10 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + srcptr += JPC_QMFB_COLGRPSIZE; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -835,11 +779,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize * numcols]; +-#endif + jpc_fix_t *buf = joinbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -849,7 +789,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + register int i; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) { +@@ -857,7 +796,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + abort(); + } + } +-#endif + + hstartcol = (numrows + 1 - parity) >> 1; + +@@ -907,12 +845,10 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + srcptr += numcols; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + diff --git a/mingw-w64-jasper/jasper-CVE-2014-9029.patch b/mingw-w64-jasper/jasper-CVE-2014-9029.patch new file mode 100644 index 0000000000..98a2035999 --- /dev/null +++ b/mingw-w64-jasper/jasper-CVE-2014-9029.patch @@ -0,0 +1,29 @@ +--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:45:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:44:58.000000000 +0100 +@@ -1281,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t + jpc_coc_t *coc = &ms->parms.coc; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, coc->compno) > dec->numcomps) { ++ if (JAS_CAST(int, coc->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in COC marker segment\n"); + return -1; + } +@@ -1307,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t + jpc_rgn_t *rgn = &ms->parms.rgn; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, rgn->compno) > dec->numcomps) { ++ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in RGN marker segment\n"); + return -1; + } +@@ -1356,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t + jpc_qcc_t *qcc = &ms->parms.qcc; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, qcc->compno) > dec->numcomps) { ++ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in QCC marker segment\n"); + return -1; + } diff --git a/mingw-w64-jasper/jasper-pkgconfig.patch b/mingw-w64-jasper/jasper-pkgconfig.patch new file mode 100644 index 0000000000..c8af5ca83f --- /dev/null +++ b/mingw-w64-jasper/jasper-pkgconfig.patch @@ -0,0 +1,48 @@ +diff -Naur jasper-1.900.1/configure.ac jasper-1.900.1.new/configure.ac +--- jasper-1.900.1/configure.ac 2007-01-19 21:47:11.000000000 +0000 ++++ jasper-1.900.1.new/configure.ac 2009-10-29 13:37:02.000000000 +0000 +@@ -399,6 +399,8 @@ + src/libjasper/pnm/Makefile + src/libjasper/ras/Makefile + src/msvc/Makefile ++pkgconfig/Makefile ++pkgconfig/jasper.pc + jasper.spec + ]) + AC_OUTPUT +diff -Naur jasper-1.900.1/Makefile.am jasper-1.900.1.new/Makefile.am +--- jasper-1.900.1/Makefile.am 2007-01-19 21:43:14.000000000 +0000 ++++ jasper-1.900.1.new/Makefile.am 2009-10-29 13:36:28.000000000 +0000 +@@ -64,7 +64,7 @@ + # Note: We need to put the derived file "jasper.spec" in the distribution + # in order to facilitate RPM building. + +-SUBDIRS = src ++SUBDIRS = src pkgconfig + + rpm: dist + for i in BUILD RPMS SRPMS SOURCES SPECS; do \ +diff -Naur jasper-1.900.1/pkgconfig/jasper.pc.in jasper-1.900.1.new/pkgconfig/jasper.pc.in +--- jasper-1.900.1/pkgconfig/jasper.pc.in 1970-01-01 01:00:00.000000000 +0100 ++++ jasper-1.900.1.new/pkgconfig/jasper.pc.in 2009-10-29 16:30:43.000000000 +0000 +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: Jasper ++Description: JPEG 2000 encoding and decoding library ++Version: @VERSION@ ++ ++Libs: -L${libdir} -ljasper ++Cflags: -I${includedir}/jasper +diff -Naur jasper-1.900.1/pkgconfig/Makefile.am jasper-1.900.1.new/pkgconfig/Makefile.am +--- jasper-1.900.1/pkgconfig/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ jasper-1.900.1.new/pkgconfig/Makefile.am 2009-10-29 13:38:59.000000000 +0000 +@@ -0,0 +1,5 @@ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = jasper.pc ++ ++EXTRA_DIST = \ ++ jasper.pc.in diff --git a/mingw-w64-jbigkit/PKGBUILD b/mingw-w64-jbigkit/PKGBUILD index e3b77dad35..4b86959729 100644 --- a/mingw-w64-jbigkit/PKGBUILD +++ b/mingw-w64-jbigkit/PKGBUILD @@ -1,17 +1,18 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=jbigkit pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.1 -pkgrel=1 +pkgrel=3 pkgdesc="Data compression library/utilities for bi-level high-resolution images (mingw-w64)" arch=('any') url="http://www.cl.cam.ac.uk/~mgk25/jbigkit/" -license=("GPL") +license=(GPL2) depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') -source=("http://www.cl.cam.ac.uk/~mgk25/download/${_realname}-$pkgver.tar.gz" +source=("http://www.cl.cam.ac.uk/~mgk25/download/${_realname}-${pkgver}.tar.gz" allNewMainMakefile.all.patch manfiles.all.patch pbmtoolsMakefile.all.patch @@ -43,4 +44,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" make prefix=${MINGW_PREFIX} DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-jemalloc/001-fix-library-extension.patch b/mingw-w64-jemalloc/001-fix-library-extension.patch new file mode 100644 index 0000000000..9b051bea0d --- /dev/null +++ b/mingw-w64-jemalloc/001-fix-library-extension.patch @@ -0,0 +1,26 @@ +--- jemalloc-3.6.0/configure.ac.orig 2014-12-01 06:22:10.508800000 +0300 ++++ jemalloc-3.6.0/configure.ac 2014-12-01 06:23:07.687000000 +0300 +@@ -341,8 +341,8 @@ + importlib="${so}" + DSO_LDFLAGS="-shared" + fi +- a="lib" +- libprefix="" ++ a="a" ++ libprefix="lib" + SOREV="${so}" + PIC_CFLAGS="" + ;; +--- jemalloc-3.6.0/configure.orig 2014-12-01 06:29:33.067600000 +0300 ++++ jemalloc-3.6.0/configure 2014-12-01 06:29:07.811200000 +0300 +@@ -4924,8 +4924,8 @@ + importlib="${so}" + DSO_LDFLAGS="-shared" + fi +- a="lib" +- libprefix="" ++ a="a" ++ libprefix="lib" + SOREV="${so}" + PIC_CFLAGS="" + ;; diff --git a/mingw-w64-jemalloc/002-makefile.patch b/mingw-w64-jemalloc/002-makefile.patch new file mode 100644 index 0000000000..6ff5d3163f --- /dev/null +++ b/mingw-w64-jemalloc/002-makefile.patch @@ -0,0 +1,38 @@ +--- jemalloc-4.0.4/Makefile.in.orig 2015-11-06 09:45:45.762202300 +0300 ++++ jemalloc-4.0.4/Makefile.in 2015-11-06 09:49:34.682787700 +0300 +@@ -106,8 +106,8 @@ + DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO) + endif + PC := $(objroot)jemalloc.pc +-MAN3 := $(objroot)doc/jemalloc$(install_suffix).3 +-DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml ++MAN3 := $(srcroot)doc/jemalloc$(install_suffix).3 ++DOCS_XML := $(srcroot)doc/jemalloc$(install_suffix).xml + DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.html) + DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.3) + DOCS := $(DOCS_HTML) $(DOCS_MAN3) +@@ -254,7 +254,7 @@ + + $(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(C_PIC_OBJS),$(C_OBJS)) + @mkdir -p $(@D) +- $(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS) ++ $(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) -Wl,--out-implib,$(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB).$(A) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS) + + $(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(C_PIC_OBJS) + $(objroot)lib/$(LIBJEMALLOC).$(A) : $(C_OBJS) +@@ -295,10 +295,12 @@ + done + + install_lib_shared: $(DSOS) +- install -d $(LIBDIR) +- install -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR) ++ install -d $(BINDIR) ++ install -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(BINDIR) ++ install -d $(LIBDIR) ++ install -m 644 $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB).$(A) $(LIBDIR) + ifneq ($(SOREV),$(SO)) +- ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO) ++ ln -sf $(LIBJEMALLOC).$(SOREV) $(BINDIR)/$(LIBJEMALLOC).$(SO) + endif + + install_lib_static: $(STATIC_LIBS) diff --git a/mingw-w64-jemalloc/PKGBUILD b/mingw-w64-jemalloc/PKGBUILD new file mode 100644 index 0000000000..5d0025cbcd --- /dev/null +++ b/mingw-w64-jemalloc/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Alexey Pavlov + +_realname=jemalloc +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=4.0.4 +pkgrel=1 +pkgdesc="General-purpose scalable concurrent malloc implementation (mingw64)" +arch=('any') +url="http://www.canonware.com/jemalloc/" +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +source=(http://www.canonware.com/download/jemalloc/${_realname}-${pkgver}.tar.bz2 + 001-fix-library-extension.patch + 002-makefile.patch) +sha256sums=('3fda8d8d7fcd041aa0bebbecd45c46b28873cf37bd36c56bf44961b36d0f42d0' + '074700fcdb9d0548668d5e1f8a61b3571e35c839f45036146bb2e112ad5a5d9d' + 'bd9598d640f075b93159257614c35e011a3423e6fd4e171f560ee774224488e4') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-fix-library-extension.patch + patch -p1 -i ${srcdir}/002-makefile.patch + + # ./autogen.sh + +} +build() { + cd ${srcdir}/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + CFLAGS+=" -std=gnu11" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR=${pkgdir} install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-jq/PKGBUILD b/mingw-w64-jq/PKGBUILD new file mode 100644 index 0000000000..57226c3c61 --- /dev/null +++ b/mingw-w64-jq/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Gore Liu + +_realname=jq +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.4 +pkgrel=2 +pkgdesc="Command-line JSON processor (mingw-w64)" +arch=('any') +url='http://stedolan.github.io/jq/' +license=('MIT') +makedepends=("autoconf" "automake" "bison" "flex" "python2") +source=("http://stedolan.github.io/jq/download/source/${_realname}-${pkgver}.tar.gz") +md5sums=('e3c75a4f805bb5342c9f4b3603fb248f') + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-json-c/PKGBUILD b/mingw-w64-json-c/PKGBUILD new file mode 100644 index 0000000000..32c7ce65d0 --- /dev/null +++ b/mingw-w64-json-c/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Andrew Chadwick + +_realname=json-c +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.12 +pkgrel=2 +arch=('any') +pkgdesc="A JSON implementation in C." +url='https://github.com/json-c/json-c' +depends=("") +makedepends=("") +options=('strip' '!debug' 'staticlibs') +license=('MIT') +source=("http://s3.amazonaws.com/json-c_releases/releases/${_realname}-${pkgver}.tar.gz") +md5sums=('3ca4bbb881dfc4017e8021b5e0a8c491') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver/_/-}" +} + +build() { + cd "${srcdir}/${_realname}-${pkgver/_/-}" + # sh autogen.sh # only for github release tarballs + CFLAGS="-Wno-error=unused-but-set-variable -Wno-error=unknown-pragmas $CFLAGS" + export CFLAGS + ./configure --prefix="${MINGW_PREFIX}" + make all +} + +package() { + cd "${srcdir}/${_realname}-${pkgver/_/-}" + make DESTDIR="${pkgdir}" install + install -D COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING +} diff --git a/mingw-w64-json-glib/PKGBUILD b/mingw-w64-json-glib/PKGBUILD index d938d53c52..662383d6e4 100644 --- a/mingw-w64-json-glib/PKGBUILD +++ b/mingw-w64-json-glib/PKGBUILD @@ -2,8 +2,8 @@ _realname=json-glib pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.2 -pkgrel=2 +pkgver=1.0.4 +pkgrel=3 arch=('any') pkgdesc="JSON-GLib implements a full suite of JSON-related tools using GLib and GObject (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-glib2") @@ -11,19 +11,16 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection") options=('strip' 'staticlibs') -license=("LGPL2+") +license=('LGPL2.1+') url="https://wiki.gnome.org/Projects/JsonGlib" -source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz" - 0001-Give-CC-to-gir-scanner.patch - fix-enums.patch) -sha256sums=('887bd192da8f5edc53b490ec51bf3ffebd958a671f5963e4f3af32c22e35660a' - 'd3d789fcd1466dde7b42ffe200f699f508bdb477fbabac8c7e0d36703f17a747' - 'f44360c24df92da63d85d8465af28e433a3c5f53905296c1c26835a5f24907dc') +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz" + 0001-Give-CC-to-gir-scanner.patch) +sha256sums=('80f3593cb6bd13f1465828e46a9f740e2e9bd3cd2257889442b3e62bd6de05cd' + 'd3d789fcd1466dde7b42ffe200f699f508bdb477fbabac8c7e0d36703f17a747') prepare() { cd "${srcdir}"/${_realname}-${pkgver} patch -Np1 -i "${srcdir}/0001-Give-CC-to-gir-scanner.patch" - patch -Np1 -i "${srcdir}/fix-enums.patch" autoreconf -f -i } @@ -37,10 +34,12 @@ build() { --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-json-glib/fix-enums.patch b/mingw-w64-json-glib/fix-enums.patch deleted file mode 100644 index fecaf5c6a7..0000000000 --- a/mingw-w64-json-glib/fix-enums.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/json-glib/json-enum-types.c.in b/json-glib/json-enum-types.c.in -index 8b82049..a2a13b4 100644 ---- a/json-glib/json-enum-types.c.in -+++ b/json-glib/json-enum-types.c.in -@@ -1,4 +1,5 @@ - /*** BEGIN file-header ***/ -+#include "config.h" - #include "json-enum-types.h" - /*** END file-header ***/ - -@@ -11,7 +12,8 @@ - - /*** BEGIN value-header ***/ - GType --@enum_name@_get_type(void) { -+@enum_name@_get_type (void) -+{ - static volatile gsize g_enum_type_id__volatile = 0; - - if (g_once_init_enter (&g_enum_type_id__volatile)) -@@ -26,9 +28,8 @@ GType - /*** BEGIN value-tail ***/ - { 0, NULL, NULL } - }; -- GType g_enum_type_id; - -- g_enum_type_id = -+ GType g_enum_type_id = - g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); - - g_once_init_leave (&g_enum_type_id__volatile, g_enum_type_id); diff --git a/mingw-w64-jsoncpp/PKGBUILD b/mingw-w64-jsoncpp/PKGBUILD new file mode 100644 index 0000000000..545334c09e --- /dev/null +++ b/mingw-w64-jsoncpp/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Drew Waranis + +_realname=jsoncpp +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.6.2 +pkgrel=2 +pkgdesc="A C++ library for interacting with JSON (mingw-w64)" +arch=('any') +url="https://github.com/open-source-parsers/jsoncpp" +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-python2" + ) +options=('staticlibs' '!strip' '!buildflags') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/open-source-parsers/jsoncpp/archive/${pkgver}.tar.gz") +md5sums=('5a62da8b5c5b0e46a0e782e7363aee3d') + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DJSONCPP_WITH_CMAKE_PACKAGE=ON \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-jucipp-git/PKGBUILD b/mingw-w64-jucipp-git/PKGBUILD new file mode 100644 index 0000000000..f1969a2076 --- /dev/null +++ b/mingw-w64-jucipp-git/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Ray Donnelly + +_realname=jucipp +pkgbase=mingw-w64-${_realname}-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1164.79f497a +pkgrel=1 +pkgdesc="A lightweight platform independent C++-IDE with support for C++11 and C++14 (mingw-w64)" +arch=('any') +url="https://github.com/cppit/jucipp" +license=('MIT') +validpgpkeys=('gpg_KEY') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + 'git') +depends=("${MINGW_PACKAGE_PREFIX}-clang" + "${MINGW_PACKAGE_PREFIX}-gtkmm3" + "${MINGW_PACKAGE_PREFIX}-gtksourceviewmm3" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-aspell-en") +options=('strip' 'staticlibs') +source=("${_realname}"::"git+https://github.com/cppit/jucipp.git" + "libclangmm"::"git+https://github.com/cppit/libclangmm.git" + "tiny-process-library"::"git+https://github.com/eidheim/tiny-process-library.git") +md5sums=('SKIP' + 'SKIP' + 'SKIP') + +pkgver() { + cd "${srcdir}"/${_realname} + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_realname} + git submodule init + git config submodule.libclangmm.url "${srcdir}"/libclangmm + git config submodule.tiny-process-library.url "${srcdir}"/tiny-process-library + git submodule update +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G'MSYS Makefiles' \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + "${extra_config[@]}" \ + ../${_realname} + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-jxrlib/CMakeLists.txt b/mingw-w64-jxrlib/CMakeLists.txt new file mode 100644 index 0000000000..ccfbe347fd --- /dev/null +++ b/mingw-w64-jxrlib/CMakeLists.txt @@ -0,0 +1,92 @@ +cmake_minimum_required(VERSION 2.8) +project(jxrlib C) + +set(JXRLIB_MAJOR 0) +set(JXRLIB_MINOR 0) + +set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0) +set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR}) + +include(TestBigEndian) +test_big_endian(ISBIGENDIAN) +if(ISBIGENDIAN) + set(DEF_ENDIAN -D_BIG__ENDIAN_) +endif() + +add_definitions(-D__ANSI__ -DDISABLE_PERF_MEASUREMENT ${DEF_ENDIAN}) + +include_directories( + common/include + image/sys + jxrgluelib + jxrtestlib +) + +# JXR Library +file(GLOB jpegxr_SRC image/sys/*.c image/decode/*.c image/encode/*.c) +file(GLOB jpegxr_HDR image/sys/*.h image/decode/*.h image/encode/*.h) + +add_library(jpegxr_obj OBJECT ${jpegxr_SRC} ${jpegxr_HDR}) + +add_library(jpegxr SHARED $) +set_target_properties(jpegxr PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION}) + +add_library(jpegxr_static STATIC $) +set_target_properties(jpegxr_static PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION} OUTPUT_NAME jpegxr RUNTIME_OUTPUT_NAME jpegxr ARCHIVE_OUTPUT_NAME jpegxr) + +install(TARGETS jpegxr + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +) + +install(TARGETS jpegxr_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +) + + +# JXR-GLUE Library +file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c) +file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h) + +add_library(jxr_obj OBJECT ${jxrglue_SRC} ${jxrglue_HDR}) + +add_library(jxrglue SHARED $) +set_target_properties(jxrglue PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION}) +target_link_libraries(jxrglue jpegxr m) + +add_library(jxrglue_static STATIC $) +set_target_properties(jxrglue_static PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION} OUTPUT_NAME jxrglue RUNTIME_OUTPUT_NAME jxrglue ARCHIVE_OUTPUT_NAME jxrglue) +target_link_libraries(jxrglue_static jpegxr_static m) + +install(TARGETS jxrglue + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +) + +install(TARGETS jxrglue_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +) + +# JxrEncApp Executable +add_executable(JxrEncApp jxrencoderdecoder/JxrEncApp.c) +target_link_libraries(JxrEncApp jxrglue) +install(TARGETS JxrEncApp RUNTIME DESTINATION bin) + +# JxrDecApp Executable +add_executable(JxrDecApp jxrencoderdecoder/JxrDecApp.c) +target_link_libraries(JxrDecApp jxrglue) +install(TARGETS JxrDecApp RUNTIME DESTINATION bin) + +# Headers +install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h image/sys/windowsmediaphoto.h + DESTINATION include/jxrlib +) +install(DIRECTORY common/include/ DESTINATION include/jxrlib + FILES_MATCHING PATTERN "*.h" +) diff --git a/mingw-w64-jxrlib/PKGBUILD b/mingw-w64-jxrlib/PKGBUILD new file mode 100644 index 0000000000..6240b7444f --- /dev/null +++ b/mingw-w64-jxrlib/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Alexey Pavlov + +_realname=jxrlib +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.1 +pkgrel=1 +pkgdesc="Open source implementation of jpegxr (mingw-w64)" +arch=('any') +url="https://jxrlib.codeplex.com/" +license=('BSD') +validpgpkeys=('gpg_KEY') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-iconv") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +options=('strip' 'staticlibs') +source=(#jxrlib_${pkgver//./_}.tar.gz::http://jxrlib.codeplex.com/downloads/get/685250 + http://jxrlib.codeplex.com/downloads/get/685250#/jxrlib_${pkgver//./_}.tar.gz + "CMakeLists.txt" + "jxrlib_warnings.patch" + "jxrlib_mingw.patch") +md5sums=('c0a6a4529cb687d127cf52b52f5ec848' + '31c0666ddd914e0683a458c3b6aa3b0e' + '8ee3a08fbba3c74ea394e91d562c8be8' + 'e72528f9e35f5c52a3287b4fd31a0e44') + +prepare() { + cd "${srcdir}"/${_realname} + + # Sanitize charset and line endings + for file in `find . -type f -name '*.c' -or -name '*.h' -or -name '*.txt'`; do + ${MINGW_PREFIX}/bin/iconv -f ISO-8859-15 -t UTF-8 ${file} > ${file}.new && \ + sed -i 's|\r||g' ${file}.new && \ + touch -r ${file} ${file}.new && mv ${file}.new ${file} + done + + # Remove file which already exists as part of the mingw headers + rm -f common/include/guiddef.h + + cp -f ${srcdir}/CMakeLists.txt . + + patch -p1 -i ${srcdir}/jxrlib_warnings.patch + patch -p1 -i ${srcdir}/jxrlib_mingw.patch +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G'MSYS Makefiles' \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + "${extra_config[@]}" \ + ../${_realname} + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-jxrlib/jxrlib_mingw.patch b/mingw-w64-jxrlib/jxrlib_mingw.patch new file mode 100644 index 0000000000..fe19cab194 --- /dev/null +++ b/mingw-w64-jxrlib/jxrlib_mingw.patch @@ -0,0 +1,93 @@ +diff -rupN jxrlib/common/include/wmspecstring.h jxrlib-new/common/include/wmspecstring.h +--- jxrlib/common/include/wmspecstring.h 2013-03-21 18:58:18.000000000 +0100 ++++ jxrlib-new/common/include/wmspecstring.h 2015-09-06 21:10:53.943039237 +0200 +@@ -334,7 +334,7 @@ void __pfx_assume(int, const char *); + + // Some CE versions don't have specstrings.h, some have very old version without + // __specstrings defined. So we handle CE separately in wmasalce.h +-#if defined(UNDER_CE) || defined(NO_WINDOWS) ++#if defined(UNDER_CE) || defined(NO_WINDOWS) || defined(MINGW) + #include "wmspecstringce.h" + #endif + +diff -rupN jxrlib/image/sys/ansi.h jxrlib-new/image/sys/ansi.h +--- jxrlib/image/sys/ansi.h 2013-03-28 18:34:06.000000000 +0100 ++++ jxrlib-new/image/sys/ansi.h 2015-09-06 21:18:54.051637086 +0200 +@@ -44,13 +44,8 @@ + //================================ + #define FORCE_INLINE + #define CDECL +-#if __LP64__ +-#define UINTPTR_T unsigned long long +-#define INTPTR_T long long +-#else +-#define UINTPTR_T unsigned int +-#define INTPTR_T int +-#endif ++#define UINTPTR_T uintptr_t ++#define INTPTR_T intptr_t + + + //================================ +diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h +--- jxrlib/image/sys/strcodec.h 2015-09-06 02:21:20.337316724 +0200 ++++ jxrlib-new/image/sys/strcodec.h 2015-09-06 21:18:44.335483326 +0200 +@@ -40,7 +40,7 @@ + + //================================================================ + #ifdef ENABLE_OPTIMIZATIONS +-#if defined(WIN32) && !defined(_WIN64) ++#if defined(_MSC_VER) && !defined(_WIN64) + #define WMP_OPT_SSE2 + + #define WMP_OPT_CC_ENC +@@ -57,9 +57,9 @@ + + //================================================================ + //#ifdef WIN32 +-#if defined(WIN32) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform ++#if defined(_MSC_VER) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform + #define PLATFORM_X86 +-#include "..\x86\x86.h" ++#include "../x86/x86.h" + #endif + + #ifndef UNREFERENCED_PARAMETER +@@ -89,6 +89,7 @@ typedef unsigned __int64 U64; + + // The following macros depend on UINTPTR_T and INTPTR_T being properly defined + // so that they are equal to pointer width. Confirm and fail if our assumptions are wrong. ++ + CT_ASSERT(sizeof(UINTPTR_T) == sizeof(void*), strcodec1); + CT_ASSERT(sizeof(INTPTR_T) == sizeof(void*), strcodec2); + +@@ -450,7 +451,7 @@ typedef struct CWMImageStrCodec { + + struct WMPStream ** ppWStream; + +-#ifdef WIN32 ++#ifdef _MSC_VER + TCHAR **ppTempFile; + #else + char **ppTempFile; +diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h +--- jxrlib/jxrgluelib/JXRMeta.h 2015-09-06 02:21:20.340316728 +0200 ++++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-06 21:10:53.944039253 +0200 +@@ -28,7 +28,7 @@ + #pragma once + + #include +-#ifndef WIN32 ++#ifndef _MSC_VER + #include + #endif + +@@ -106,7 +106,7 @@ + #define WMP_valWMPhotoID WMP_valCompression + + +-#ifdef WIN32 ++#ifdef _MSC_VER + #define __in_win __in + #define __out_win __out + #endif diff --git a/mingw-w64-jxrlib/jxrlib_warnings.patch b/mingw-w64-jxrlib/jxrlib_warnings.patch new file mode 100644 index 0000000000..f7b8175ccd --- /dev/null +++ b/mingw-w64-jxrlib/jxrlib_warnings.patch @@ -0,0 +1,193 @@ +diff -rupN jxrlib/image/sys/common.h jxrlib-new/image/sys/common.h +--- jxrlib/image/sys/common.h 2013-03-21 17:30:54.000000000 +0100 ++++ jxrlib-new/image/sys/common.h 2015-09-03 10:31:06.528657911 +0200 +@@ -124,8 +124,8 @@ Void Adapt (CAdaptiveHuffman *pAdHuff, B + Void AdaptFixed (CAdaptiveHuffman *pAdHuff); + Void AdaptDiscriminant (CAdaptiveHuffman *pAdHuff); + +-#ifndef _PREFAST_ +-#pragma warning(disable:4068) +-#endif ++// #ifndef _PREFAST_ ++// #pragma warning(disable:4068) ++// #endif + + #endif // WMI_COMMON_H +diff -rupN jxrlib/image/sys/strcodec.c jxrlib-new/image/sys/strcodec.c +--- jxrlib/image/sys/strcodec.c 2013-03-20 19:16:21.000000000 +0100 ++++ jxrlib-new/image/sys/strcodec.c 2015-09-03 10:30:31.018971760 +0200 +@@ -668,9 +668,7 @@ ERR detach_SB(SimpleBitIO* pSB) + // WinCE ARM and Desktop x86 + #else + // other platform +-#ifdef _BIG__ENDIAN_ +-#define _byteswap_ulong(x) (x) +-#else // _BIG__ENDIAN_ ++#ifndef _BIG__ENDIAN_ + U32 _byteswap_ulong(U32 bits) + { + U32 r = (bits & 0xffu) << 24; +diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h +--- jxrlib/image/sys/strcodec.h 2013-03-21 19:22:34.000000000 +0100 ++++ jxrlib-new/image/sys/strcodec.h 2015-09-03 10:30:31.019971779 +0200 +@@ -64,7 +64,7 @@ + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) { (P) = (P); } +-#endif UNREFERENCED_PARAMETER ++#endif // UNREFERENCED_PARAMETER + + #ifdef UNDER_CE + #define PLATFORM_WCE +@@ -673,6 +673,16 @@ void flushToByte(BitIOInfo* pIO); + pIO->cBitsUsed &= 16 - 1;\ + pIO->uiAccumulator = LOAD16(pIO->pbCurrent) << pIO->cBitsUsed;\ + return 0; +-// pIO->uiAccumulator = LOAD16(pIO->pbCurrent) & ((U32)(-1) >> pIO->cBitsUsed);\ + + void OutputPerfTimerReport(CWMImageStrCodec *pState); ++ ++#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_)) ++// WinCE ARM and Desktop x86 ++#else ++// other platform ++#ifdef _BIG__ENDIAN_ ++#define _byteswap_ulong(x) (x) ++#else // _BIG__ENDIAN_ ++U32 _byteswap_ulong(U32 bits); ++#endif // _BIG__ENDIAN_ ++#endif +\ No newline at end of file +diff -rupN jxrlib/jxrencoderdecoder/JxrDecApp.c jxrlib-new/jxrencoderdecoder/JxrDecApp.c +--- jxrlib/jxrencoderdecoder/JxrDecApp.c 2013-05-08 18:45:08.000000000 +0200 ++++ jxrlib-new/jxrencoderdecoder/JxrDecApp.c 2015-09-03 10:30:31.019971779 +0200 +@@ -423,7 +423,7 @@ ERR WmpDecAppCreateEncoderFromExt( + Call(GetTestEncodeIID(szExt, &pIID)); + + // Create encoder +- Call(PKTestFactory_CreateCodec(pIID, ppIE)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE)); + + Cleanup: + return err; +diff -rupN jxrlib/jxrencoderdecoder/JxrEncApp.c jxrlib-new/jxrencoderdecoder/JxrEncApp.c +--- jxrlib/jxrencoderdecoder/JxrEncApp.c 2013-05-28 20:58:22.000000000 +0200 ++++ jxrlib-new/jxrencoderdecoder/JxrEncApp.c 2015-09-03 10:30:31.020971798 +0200 +@@ -578,7 +578,7 @@ main(int argc, char* argv[]) + + //================================ + Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); +- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder)); ++ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder)); + + //---------------------------------------------------------------- + Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION)); +diff -rupN jxrlib/jxrgluelib/JXRGlueJxr.c jxrlib-new/jxrgluelib/JXRGlueJxr.c +--- jxrlib/jxrgluelib/JXRGlueJxr.c 2013-03-20 20:01:13.000000000 +0100 ++++ jxrlib-new/jxrgluelib/JXRGlueJxr.c 2015-09-03 10:30:31.021971818 +0200 +@@ -28,6 +28,7 @@ + //*@@@---@@@@****************************************************************** + #include + #include ++#include + + + static const char szHDPhotoFormat[] = "image/vnd.ms-photo"; +diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h +--- jxrlib/jxrgluelib/JXRMeta.h 2013-03-20 19:06:24.000000000 +0100 ++++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-03 10:30:31.021971818 +0200 +@@ -34,7 +34,7 @@ + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) { (P) = (P); } +-#endif UNREFERENCED_PARAMETER ++#endif // UNREFERENCED_PARAMETER + + //================================================================ + // Container +diff -rupN jxrlib/jxrtestlib/JXRTest.c jxrlib-new/jxrtestlib/JXRTest.c +--- jxrlib/jxrtestlib/JXRTest.c 2013-03-19 20:06:18.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTest.c 2015-09-03 10:30:31.022971837 +0200 +@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile( + ERR err = WMP_errSuccess; + + char *pExt = NULL; +- PKIID* pIID = NULL; ++ const PKIID* pIID = NULL; + + struct WMPStream* pStream = NULL; + PKImageDecode* pDecoder = NULL; +@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile( + Call(CreateWS_File(&pStream, szFilename, "rb")); + + // Create decoder +- Call(PKTestFactory_CreateCodec(pIID, ppDecoder)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppDecoder)); + pDecoder = *ppDecoder; + + // attach stream to decoder +@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory** + + UNREFERENCED_PARAMETER( uVersion ); + +- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory))); ++ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory))); + pCFactory = *ppCFactory; + + pCFactory->CreateCodec = PKTestFactory_CreateCodec; +@@ -287,7 +287,7 @@ ERR PKTestDecode_Release( + + pID->fStreamOwner && pID->pStream->Close(&pID->pStream); + +- return PKFree(ppID); ++ return PKFree((void**)ppID); + } + + ERR PKTestDecode_Create( +@@ -296,7 +296,7 @@ ERR PKTestDecode_Create( + ERR err = WMP_errSuccess; + PKTestDecode* pID = NULL; + +- Call(PKAlloc(ppID, sizeof(**ppID))); ++ Call(PKAlloc((void**)ppID, sizeof(**ppID))); + + pID = *ppID; + pID->Initialize = PKTestDecode_Initialize; +diff -rupN jxrlib/jxrtestlib/JXRTestHdr.c jxrlib-new/jxrtestlib/JXRTestHdr.c +--- jxrlib/jxrtestlib/JXRTestHdr.c 2013-03-20 17:40:08.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTestHdr.c 2015-09-03 10:30:31.022971837 +0200 +@@ -27,7 +27,7 @@ + //*@@@---@@@@****************************************************************** + #ifndef ANSI + #define _CRT_SECURE_NO_WARNINGS +-#endif ANSI ++#endif // ANSI + + #include + #include +diff -rupN jxrlib/jxrtestlib/JXRTestPnm.c jxrlib-new/jxrtestlib/JXRTestPnm.c +--- jxrlib/jxrtestlib/JXRTestPnm.c 2013-03-19 22:43:44.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTestPnm.c 2015-09-03 10:30:31.023971856 +0200 +@@ -27,7 +27,7 @@ + //*@@@---@@@@****************************************************************** + #ifndef ANSI + #define _CRT_SECURE_NO_WARNINGS +-#endif ANSI ++#endif // ANSI + + #include + +diff -rupN jxrlib/jxrtestlib/JXRTestTif.c jxrlib-new/jxrtestlib/JXRTestTif.c +--- jxrlib/jxrtestlib/JXRTestTif.c 2013-03-19 20:17:12.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTestTif.c 2015-09-03 10:30:31.023971856 +0200 +@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDeco + + PKTestDecode *pID = *ppID; + +- Call(WMPFree(&pID->EXT.TIF.uStripOffsets)); +- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts)); + + Call(PKTestDecode_Release(ppID)); + diff --git a/mingw-w64-karchive-qt5/PKGBUILD b/mingw-w64-karchive-qt5/PKGBUILD index 1daa1a0880..56a4af9f5c 100644 --- a/mingw-w64-karchive-qt5/PKGBUILD +++ b/mingw-w64-karchive-qt5/PKGBUILD @@ -2,22 +2,25 @@ # Maintainer (ArchLinux): Andrea Scarpino # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "karchive" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="Qt 5 addon providing access to numerous types of archives (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('0e930e5528bff5d7d8b84b14ab354ac1') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('024f3f34236bd64823a5350ef8670557') prepare() { mkdir -p build-${CARCH}${_variant} @@ -34,15 +37,16 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' make } diff --git a/mingw-w64-kcodecs-qt5/PKGBUILD b/mingw-w64-kcodecs-qt5/PKGBUILD index 63ca00aa76..08962fe626 100644 --- a/mingw-w64-kcodecs-qt5/PKGBUILD +++ b/mingw-w64-kcodecs-qt5/PKGBUILD @@ -2,22 +2,25 @@ # Maintainer (ArchLinux): Andrea Scarpino # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "kcodecs" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="Plugins allowing Qt applications to access further types of images (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('9d0fd6c580c570254d3474858350038c') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('7130e5d439afcfd0f558957a2ff33ee3') prepare() { mkdir -p build-${CARCH}${_variant} @@ -34,15 +37,16 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' make } diff --git a/mingw-w64-kconfig-qt5/PKGBUILD b/mingw-w64-kconfig-qt5/PKGBUILD index efa7ad687c..201bd89c93 100644 --- a/mingw-w64-kconfig-qt5/PKGBUILD +++ b/mingw-w64-kconfig-qt5/PKGBUILD @@ -1,21 +1,24 @@ # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "kconfig" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="KConfig provides an advanced configuration system (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('ca8602ef35b7a884f190be38a335e59d') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('826d84426eb7cf9f2bccd49aca694f96') prepare() { mkdir -p build-${CARCH}${_variant} @@ -32,16 +35,16 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' make } diff --git a/mingw-w64-kcoreaddons-qt5/PKGBUILD b/mingw-w64-kcoreaddons-qt5/PKGBUILD index b6bc6e6e34..38dcf3ee75 100644 --- a/mingw-w64-kcoreaddons-qt5/PKGBUILD +++ b/mingw-w64-kcoreaddons-qt5/PKGBUILD @@ -2,22 +2,25 @@ # Maintainer (ArchLinux): Andrea Scarpino # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "kcoreaddons" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="Classes built on top of QtCore to perform various tasks (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('6123b972897aa5369bd2368c94b5ec95') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('65975642ab8272601df81b738da01e7d') prepare() { mkdir -p build-${CARCH}${_variant} @@ -34,16 +37,16 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' make } diff --git a/mingw-w64-kcrash-qt5/PKGBUILD b/mingw-w64-kcrash-qt5/PKGBUILD new file mode 100644 index 0000000000..c804477ff8 --- /dev/null +++ b/mingw-w64-kcrash-qt5/PKGBUILD @@ -0,0 +1,57 @@ +# $Id$ +# Maintainer (MSYS2): Ray Donnelly +# Maintainer (ArchLinux): Felix Yan +# Contributor (ArchLinux): Andrea Scarpino + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kcrash" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Support for application crash analysis and bug report from apps (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('47ae59a330ec700e0912382ddb951c25') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kcwsh-qt5-git/0001-Add-std-c-11-globally.patch b/mingw-w64-kcwsh-qt5-git/0001-Add-std-c-11-globally.patch new file mode 100644 index 0000000000..d0fc76367a --- /dev/null +++ b/mingw-w64-kcwsh-qt5-git/0001-Add-std-c-11-globally.patch @@ -0,0 +1,31 @@ +From 9056181cf8bfbcc580be3857f4291e040379f7ce Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 6 Jan 2015 11:46:51 +0000 +Subject: [PATCH 1/2] Add -std=c++11 globally + +As suggested by Kevin Funk in: + +http://mail.kde.org/pipermail/kde-windows/2014-November/009044.html +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3df427..dc0ba42 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,6 +20,11 @@ if(MSVC) + add_definitions(/Zc:wchar_t-) + endif() + ++if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR ++CMAKE_CXX_COMPILER_ID STREQUAL "Intel") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ++endif() ++ + set(KCWSH_VERSION "${KCWSH_MAJOR_VERSION}.${KCWSH_MINOR_VERSION}.${KCWSH_PATCH_VERSION}") + + configure_file(cmake/KcwSHConfigVersion.cmake.in +-- +2.2.1 + diff --git a/mingw-w64-kcwsh-qt5-git/0002-qt-frontend-Set-AUTOSTATICPLUGINS-don-t-force-lib-kc.patch b/mingw-w64-kcwsh-qt5-git/0002-qt-frontend-Set-AUTOSTATICPLUGINS-don-t-force-lib-kc.patch new file mode 100644 index 0000000000..aef636180d --- /dev/null +++ b/mingw-w64-kcwsh-qt5-git/0002-qt-frontend-Set-AUTOSTATICPLUGINS-don-t-force-lib-kc.patch @@ -0,0 +1,34 @@ +From 561bffe213fd217b48e27423eec340ef7b77c534 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 6 Jan 2015 12:20:01 +0000 +Subject: [PATCH 2/2] qt-frontend: Set AUTOSTATICPLUGINS, don't force lib + kcwshqt to be SHARED + +--- + frontends/qt/CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/frontends/qt/CMakeLists.txt b/frontends/qt/CMakeLists.txt +index d5eb4ba..51a059d 100644 +--- a/frontends/qt/CMakeLists.txt ++++ b/frontends/qt/CMakeLists.txt +@@ -1,5 +1,7 @@ + # place for a qt based frontend + ++set(CMAKE_AUTOSTATICPLUGINS ON) ++ + if(QT4_FOUND) + include_directories(${QT_INCLUDES}) + +@@ -16,7 +18,7 @@ set(kcwshqt_SRCS + qterminalwidget.cpp + ) + +-add_library(kcwshqt SHARED ${kcwshqt_SRCS} ${kcwshqt_MOCS}) ++add_library(kcwshqt ${kcwshqt_SRCS} ${kcwshqt_MOCS}) + if(Qt5_FOUND) + target_link_libraries(kcwshqt kcwsh Qt5::Widgets Qt5::Core) + else() +-- +2.2.1 + diff --git a/mingw-w64-kcwsh-qt5-git/0003-build-both-static-and-shared-kcwsh-libraries.patch b/mingw-w64-kcwsh-qt5-git/0003-build-both-static-and-shared-kcwsh-libraries.patch new file mode 100644 index 0000000000..b59caf32fd --- /dev/null +++ b/mingw-w64-kcwsh-qt5-git/0003-build-both-static-and-shared-kcwsh-libraries.patch @@ -0,0 +1,95 @@ +From ff2961277b6c418be325b0015f3c080fd646bed7 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 6 Apr 2015 12:47:55 +0100 +Subject: [PATCH 3/3] build both static and shared kcwsh libraries. + +There used to be a comment stating: +"kcwsh library always needs to be shared" + +.. so I'm not sure about the implications of changing +this. + +Currently, cmake/KcwSHConfig.cmake hardcodes to use the +static library only: + +set(KCWSH_LIBRARIES ${KCW_LIBRARIES} kcwsh_STATIC) +--- + CMakeLists.txt | 43 +++++++++++++++++++++++++++++++------------ + cmake/KcwSHConfig.cmake | 2 +- + 2 files changed, 32 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc0ba42..f528609 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,7 @@ + project(kcwsh) + + cmake_minimum_required(VERSION 2.8.12) ++include(GenerateExportHeader) + + option(BUILD_GUI_TEST "build a gui app for testing purposes" ON) + option(BUILD_TESTS "build unittests" ON) +@@ -74,19 +75,37 @@ set(kcwsh_SRCS + ) + + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +-# kcwsh library always needs to be shared +-add_library(kcwsh SHARED ${kcwsh_SRCS}) +-target_link_libraries(kcwsh ${KCW_LIBRARIES}) +-set_target_properties(kcwsh PROPERTIES PREFIX "" AUTOMOC OFF) +- +-install(TARGETS kcwsh EXPORT KcwSHTargets +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION bin +- ARCHIVE DESTINATION lib) +-install(FILES ${kcwsh_HDRS} DESTINATION include/kcwsh) + +-export(TARGETS kcwsh FILE "${CMAKE_CURRENT_BINARY_DIR}/KcwSHTargets.cmake") +-export(PACKAGE kcwsh) ++foreach(library_type STATIC SHARED) ++ add_library(kcwsh_${library_type} ${library_type} ${kcwsh_SRCS}) ++ set_target_properties(kcwsh_${library_type} PROPERTIES OUTPUT_NAME kcwsh) ++ generate_export_header(kcwsh_${library_type} ++ BASE_NAME kcwsh ++ EXPORT_FILE_NAME kcwsh_export.h) ++ # http://www.cmake.org/cmake/help/v3.0/module/GenerateExportHeader.html ++ # "If the same sources are used to create both a shared and a static library, the ++ # uppercased symbol ${BASE_NAME}_STATIC_DEFINE should be used when building the ++ # static library" ++ if(library_type STREQUAL "STATIC") ++ set_target_properties(kcwsh_${library_type} PROPERTIES ++ COMPILE_FLAGS -DKCWSH_STATIC_DEFINE) ++ # .. and the consumers of the static library need to also define this .. is there ++ # no better way than this? It's verbose and brittle. ++ set_target_properties(kcwsh_${library_type} PROPERTIES ++ INTERFACE_COMPILE_DEFINITIONS KCWSH_STATIC_DEFINE) ++ target_link_libraries(kcwsh_STATIC ${KCW_LIBRARIES}) ++ endif() ++ set_target_properties(kcwsh_${library_type} PROPERTIES PREFIX "" AUTOMOC OFF) ++ install(TARGETS kcwsh_${library_type} EXPORT KcwSHTargets ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION bin ++ ARCHIVE DESTINATION lib) ++ ++ export(TARGETS kcwsh_${library_type} FILE "${CMAKE_CURRENT_BINARY_DIR}/KcwSHTargets.cmake") ++ export(PACKAGE kcwsh_${library_type}) ++endforeach(library_type) ++ ++install(FILES ${kcwsh_HDRS} DESTINATION include/kcwsh) + + install(EXPORT KcwSHTargets DESTINATION lib/cmake/kcwsh COMPONENT devel) + +diff --git a/cmake/KcwSHConfig.cmake b/cmake/KcwSHConfig.cmake +index ee368ad..33c5a16 100644 +--- a/cmake/KcwSHConfig.cmake ++++ b/cmake/KcwSHConfig.cmake +@@ -12,4 +12,4 @@ endif() + find_package(Kcw REQUIRED) + + set(KCWSH_INCLUDE_DIRS ${KCW_INCLUDE_DIRS} ${KCWSH_CMAKE_DIR}/../../../include/kcwsh) +-set(KCWSH_LIBRARIES ${KCW_LIBRARIES} kcwsh) ++set(KCWSH_LIBRARIES ${KCW_LIBRARIES} kcwsh_STATIC) +-- +2.3.5 + diff --git a/mingw-w64-kcwsh-qt5-git/PKGBUILD b/mingw-w64-kcwsh-qt5-git/PKGBUILD new file mode 100644 index 0000000000..a6685192c4 --- /dev/null +++ b/mingw-w64-kcwsh-qt5-git/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer (MSYS2): Ray Donnelly + +_variant=-static +#_variant=-shared +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kcwsh" +_ver_base=0.1.0 +pkgver=0.1.0.236.be0e645 +pkgrel=1 +arch=('any') +url=('https://projects.kde.org/projects/frameworks/${_basename}') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules" + "git") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("${_realname}"::"git://anongit.kde.org/${_basename}.git" + "0001-Add-std-c-11-globally.patch" + "0002-qt-frontend-Set-AUTOSTATICPLUGINS-don-t-force-lib-kc.patch" + "0003-build-both-static-and-shared-kcwsh-libraries.patch") +md5sums=('SKIP' + '9a28e07b8f840054141a52c4f1bad6e3' + '9e266e7e507f23b33c15d07813c7d402' + 'e8af9bfbb7053aaf7843df3a3d13184c') + +pkgver() { + cd "${srcdir}"/${_realname} + printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_realname} + git am "${srcdir}"/0001-Add-std-c-11-globally.patch + git am "${srcdir}"/0002-qt-frontend-Set-AUTOSTATICPLUGINS-don-t-force-lib-kc.patch + git am "${srcdir}"/0003-build-both-static-and-shared-kcwsh-libraries.patch +} + +build() { + local -a extra_config + mkdir -p build-${CARCH}${_variant} + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX \ + cmake ../${_realname} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make VERBOSE=1 +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kdbusaddons-qt5/PKGBUILD b/mingw-w64-kdbusaddons-qt5/PKGBUILD index 1d47a97ea1..846e359d0d 100644 --- a/mingw-w64-kdbusaddons-qt5/PKGBUILD +++ b/mingw-w64-kdbusaddons-qt5/PKGBUILD @@ -1,21 +1,24 @@ # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "kdbusaddons" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="KConfig provides an advanced configuration system (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('705495238601ca2c3548815e2e3efae7') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('d7eb58d52123a90f90533bf6691a3f40') prepare() { mkdir -p build-${CARCH}${_variant} @@ -32,17 +35,17 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output - make VERBOSE=1 + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make } package() { diff --git a/mingw-w64-kglobalaccel-qt5/PKGBUILD b/mingw-w64-kglobalaccel-qt5/PKGBUILD index b4fcaaed60..5bc069067f 100644 --- a/mingw-w64-kglobalaccel-qt5/PKGBUILD +++ b/mingw-w64-kglobalaccel-qt5/PKGBUILD @@ -1,22 +1,24 @@ # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "kglobalaccel" -pkgver=5.3.0 +_kde_f5_add_depends "${_variant}" "kconfig" "ki18n" +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="Global desktop keyboard shortcuts (mingw-w64-qt5${_namesuff})" license=('LGPL') -depends=('qt5-base' 'shared-mime-info' 'gamin') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") -depends=() groups=('kf5') # install=${pkgname}.install -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('d2c0e3874d2f2cc55d9012836a115614') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('93b2302fa2587bec638c3e619fac1bd5') prepare() { mkdir -p build-${CARCH}${_variant} @@ -33,18 +35,18 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output - make VERBOSE=1 + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + -DKF5Config_DIR=${MINGW_PREFIX}/lib/cmake/KF5Config \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make } package() { diff --git a/mingw-w64-kguiaddons-qt5/PKGBUILD b/mingw-w64-kguiaddons-qt5/PKGBUILD index 56e7975fb6..4204a3bd95 100644 --- a/mingw-w64-kguiaddons-qt5/PKGBUILD +++ b/mingw-w64-kguiaddons-qt5/PKGBUILD @@ -1,21 +1,24 @@ # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "kguiaddons" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="Utilities for graphical user interfaces (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('9fe384bb0bfbbc392e5c660ec0630245') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('154b8c8a475a18ef1936e53f91ca5dff') prepare() { mkdir -p build-${CARCH}${_variant} @@ -32,17 +35,17 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output - make VERBOSE=1 + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make } package() { diff --git a/mingw-w64-ki18n-qt5/PKGBUILD b/mingw-w64-ki18n-qt5/PKGBUILD index dd8fc510c2..2bf6420a20 100644 --- a/mingw-w64-ki18n-qt5/PKGBUILD +++ b/mingw-w64-ki18n-qt5/PKGBUILD @@ -1,24 +1,31 @@ # Maintainer (MSYS2): Ray Donnelly -_variant=-static -#_variant=-shared +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 _kde_f5_init_package "${_variant}" "ki18n" -pkgver=5.3.0 +pkgver=5.12.0 pkgrel=1 arch=('any') -url=('https://projects.kde.org/projects/frameworks/${_basename}') pkgdesc="KDE Gettext-based UI text internationalization (mingw-w64-qt5${_namesuff})" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") depends=() _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver}/${_basename}-${pkgver}.tar.xz") -md5sums=('d01815a8c04baa90b81e3350805b4c5d') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz" + "build-ktranscript-plugin-statically-if-not-shared.patch") +md5sums=('146da9ecae1e489d462309092011edd2' + 'ee7e57cc7ff1be80a28d5316f9665555') prepare() { mkdir -p build-${CARCH}${_variant} + cd "${srcdir}"/${_basename}-${pkgver} + patch -p1 < "${srcdir}"/build-ktranscript-plugin-statically-if-not-shared.patch } build() { @@ -32,17 +39,17 @@ build() { QT5_PREFIX=${MINGW_PREFIX} fi - cmake ../${_basename}-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ - -DLIB_INSTALL_DIR=lib \ - -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ - -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ - -DBUILD_TESTING=OFF \ - -DECM_DIR=${MINGW_PREFIX}/share/ECM \ - "${extra_config[@]}" \ - -G'MSYS Makefiles' --debug-output - make VERBOSE=1 + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make } package() { diff --git a/mingw-w64-ki18n-qt5/build-ktranscript-plugin-statically-if-not-shared.patch b/mingw-w64-ki18n-qt5/build-ktranscript-plugin-statically-if-not-shared.patch new file mode 100644 index 0000000000..ebe70740b8 --- /dev/null +++ b/mingw-w64-ki18n-qt5/build-ktranscript-plugin-statically-if-not-shared.patch @@ -0,0 +1,21 @@ +--- ki18n-5.3.0/src/CMakeLists.txt.orig 2014-10-04 18:05:12.000000000 +0100 ++++ ki18n-5.3.0/src/CMakeLists.txt 2014-11-19 22:46:33.512553900 +0000 +@@ -42,11 +42,17 @@ + + ### ktranscript plugin + ++if(BUILD_SHARED_LIBS) ++ set(KTRANSCRIPT_LIBTYPE, MODULE) ++else() ++ set(KTRANSCRIPT_LIBTYPE, STATIC) ++endif() ++ + set(ktranscript_LIB_SRCS + ktranscript.cpp + common_helpers.cpp + ) +-add_library(ktranscript MODULE ${ktranscript_LIB_SRCS}) ++add_library(ktranscript ${KTRANSCRIPT_LIBTYPE} ${ktranscript_LIB_SRCS}) + generate_export_header(ktranscript BASE_NAME KTranscript) + target_link_libraries(ktranscript PRIVATE Qt5::Script Qt5::Core) + diff --git a/mingw-w64-kicad-git/001-use-system-openssl.patch b/mingw-w64-kicad-git/001-use-system-openssl.patch deleted file mode 100644 index 95bcc8b8d0..0000000000 --- a/mingw-w64-kicad-git/001-use-system-openssl.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- kicad/pcbnew/github/CMakeLists.txt.orig 2014-09-30 07:49:18.828000000 +0400 -+++ kicad/pcbnew/github/CMakeLists.txt 2014-09-30 07:49:34.880400000 +0400 -@@ -26,10 +26,6 @@ - ################################################# - include( download_avhttp ) - --if( MINGW AND NOT OPENSSL_ROOT_DIR ) -- # download, compile and install to scratch dir a recent OPENSSL library and headers -- include( download_openssl ) --else() - find_package( OpenSSL REQUIRED ) - #message( STATUS "OPENSSL_FOUND:${OPENSSL_FOUND} OPENSSL_LIBRARIES:${OPENSSL_LIBRARIES}" ) - -@@ -37,7 +33,6 @@ - # do it here incase some other link image needs these libraries - set( OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}" CACHE FILEPATH "OpenSSL link libraries" ) - set( OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR}" CACHE FILEPATH "OpenSSL include dir" ) --endif() - - - # These are additions to any inherited from pcbnew dir: diff --git a/mingw-w64-kicad-git/002-fix-python-module-install.patch b/mingw-w64-kicad-git/002-fix-python-module-install.patch deleted file mode 100644 index 50569386b8..0000000000 --- a/mingw-w64-kicad-git/002-fix-python-module-install.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- kicad/CMakeLists.txt.orig 2014-10-02 09:27:42.914800000 +0400 -+++ kicad/CMakeLists.txt 2014-10-02 09:27:50.590000000 +0400 -@@ -564,7 +564,7 @@ - # Get the correct Python site package install path from the Python interpreter found by - # FindPythonInterp unless the user specifically defined a custom path. - if( NOT PYTHON_SITE_PACKAGE_PATH ) -- execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()" -+ execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib(plat_specific=0, standard_lib=0, prefix='')" - OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) diff --git a/mingw-w64-kicad-git/003-unix-files-layout.patch b/mingw-w64-kicad-git/003-unix-files-layout.patch deleted file mode 100644 index 64ebb1efbb..0000000000 --- a/mingw-w64-kicad-git/003-unix-files-layout.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3dda778..953bfec 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -309,7 +309,7 @@ set( KICAD_BIN bin - set( KICAD_FP_LIB_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}" - CACHE PATH "Default path where footprint libraries are installed." ) - --if( UNIX AND NOT APPLE ) -+if( NOT APPLE ) - # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. - set( KICAD_PLUGINS lib/kicad/plugins - CACHE PATH "Location of KiCad plugins." ) -@@ -320,17 +320,6 @@ if( UNIX AND NOT APPLE ) - set( KICAD_FP_LIB_INSTALL_PATH "${KICAD_FP_LIB_INSTALL_PATH}/share/kicad/modules" ) - endif() - --if( MINGW ) -- # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. -- set( KICAD_PLUGINS ${KICAD_BIN}/plugins -- CACHE PATH "Location of KiCad plugins." ) -- set( KICAD_DATA share -- CACHE PATH "Location of KiCad data files." ) -- set( KICAD_DOCS doc -- CACHE PATH "Location of KiCad documentation files." ) -- set( KICAD_FP_LIB_INSTALL_PATH "${KICAD_FP_LIB_INSTALL_PATH}/modules" ) --endif() -- - set( KICAD_DEMOS ${KICAD_DATA}/demos - CACHE PATH "Location of KiCad demo files." ) - set( KICAD_TEMPLATE ${KICAD_DATA}/template diff --git a/mingw-w64-kicad-git/PKGBUILD b/mingw-w64-kicad-git/PKGBUILD index 1502d2d921..bfd3b352b4 100644 --- a/mingw-w64-kicad-git/PKGBUILD +++ b/mingw-w64-kicad-git/PKGBUILD @@ -2,76 +2,98 @@ _realname=kicad pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r6803.0561940 +pkgver=r6328.22fb7da pkgrel=1 -pkgdesc="Software for the creation of electronic schematic diagrams and printed circuit board artwork" +pkgdesc="Software for the creation of electronic schematic diagrams and printed circuit board artwork (mingw-w64)" arch=('any') url="http://www.kicad-pcb.org" license=("GPL2+") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-wxPython" - "${MINGW_PACKAGE_PREFIX}-wxWidgets") + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-glew" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-wxPython" + "${MINGW_PACKAGE_PREFIX}-wxWidgets") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-swig" - "doxygen") + "git") source=("${_realname}"::"git+https://github.com/KiCad/kicad-source-mirror.git" - "${_realname}-docs"::"bzr+https://code.launchpad.net/~kicad-developers/kicad/doc" + "${_realname}-docs"::"git+https://github.com/KiCad/kicad-doc.git" + "${_realname}-libs"::"git+https://github.com/KiCad/kicad-library.git" ) md5sums=('SKIP' 'SKIP' + 'SKIP' ) pkgver() { - cd "$srcdir/$_realname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/${_realname}" + printf "r%s.%s" "$(git rev-list --count --first-parent HEAD)" "$(git rev-parse --short HEAD)" } build() { + cd "${srcdir}" + # Configure and build KiCad. [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ -DCMAKE_PREFIX_PATH=${MINGW_PREFIX} \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DDEFAULT_INSTALL_PATH=${MINGW_PREFIX} \ -DOPENSSL_ROOT_DIR=${MINGW_PREFIX} \ -DKICAD_SKIP_BOOST=ON \ -DKICAD_SCRIPTING=ON \ -DKICAD_SCRIPTING_MODULES=ON \ -DKICAD_SCRIPTING_WXPYTHON=ON \ -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python2.exe \ - ../$_realname - #-DVERBOSE=1 + ../${_realname} make - cd ../ + cd "${srcdir}" # Configure the documentation installation build. - [[ -d build-${MINGW_CHOST}-docs ]] && rm -r build-${MINGW_CHOST}-docs - mkdir build-${MINGW_CHOST}-docs && cd build-${MINGW_CHOST}-docs + [[ -d build-docs ]] && rm -r build-docs + mkdir build-docs && cd build-docs + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G "MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ ../${_realname}-docs + + cd "${srcdir}" + + # Configure the library installation build. + [[ -d build-libs ]] && rm -r build-libs + mkdir build-libs && cd build-libs + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname}-libs + } package() { # Install KiCad. - cd build-${MINGW_CHOST} - make install - - cd ../ + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install # Install KiCad documentation. - cd build-${MINGW_CHOST}-docs - make install + cd "${srcdir}/build-docs" + make DESTDIR=${pkgdir} install + + # Install KiCad libraries. + cd "${srcdir}/build-libs" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-kidletime-qt5/PKGBUILD b/mingw-w64-kidletime-qt5/PKGBUILD new file mode 100644 index 0000000000..d96242d7e6 --- /dev/null +++ b/mingw-w64-kidletime-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kidletime" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Reporting of idle time of user and system (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('f87b44e5acd0c3a0ec891450a11f6c2b') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kimageformats-qt5/PKGBUILD b/mingw-w64-kimageformats-qt5/PKGBUILD new file mode 100644 index 0000000000..203ea133bf --- /dev/null +++ b/mingw-w64-kimageformats-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kimageformats" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('36e1a6fc39c73670b744429a1b3ef288') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kiss_fft/PKGBUILD b/mingw-w64-kiss_fft/PKGBUILD new file mode 100644 index 0000000000..14f6aa6fa1 --- /dev/null +++ b/mingw-w64-kiss_fft/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Alexey Pavlov +# Contributor: Sandro Cumerlato + +_realname=kiss_fft +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +_uglyver=1_3_0 +pkgver=${_uglyver//_/.} +pkgrel=2 +pkgdesc="A Fast Fourier Transform based up on the principle: Keep It Simple, Stupid (mingw-w64)" +url="http://kissfft.sourceforge.net/" +arch=('any') +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://sourceforge.net/projects/kissfft/files/kissfft/v${_uglyver}/kiss_fft${_uglyver//_/}.tar.gz") +md5sums=('8497ac4c6eb423ed2f984516b0906d24') + +prepare() { + cd "kiss_fft${_uglyver//_/}" + make clean +} + +build() { + cd "kiss_fft${_uglyver//_/}" + gcc -shared ${CFLAGS} -ffast-math -fomit-frame-pointer -dA -fverbose-asm -o kiss_fft.dll -Wl,--out-implib,libkiss_fft.dll.a kiss_fft.c +} + +package() { + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} + mkdir -p ${pkgdir}${MINGW_PREFIX}/include/${_realname} + cd "${srcdir}/kiss_fft${_uglyver//_/}" + install -m644 kiss_fft.dll "${pkgdir}${MINGW_PREFIX}/bin/" + install -m644 libkiss_fft.dll.a "${pkgdir}${MINGW_PREFIX}/lib/" + install -m644 kiss_fft.h "${pkgdir}${MINGW_PREFIX}/include/${_realname}" +} diff --git a/mingw-w64-kitemmodels-qt5/PKGBUILD b/mingw-w64-kitemmodels-qt5/PKGBUILD new file mode 100644 index 0000000000..5a5ced1c73 --- /dev/null +++ b/mingw-w64-kitemmodels-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kitemmodels" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('ce9f3e3adefc17848c51f06e96572947') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kitemviews-qt5/PKGBUILD b/mingw-w64-kitemviews-qt5/PKGBUILD new file mode 100644 index 0000000000..563f237f8a --- /dev/null +++ b/mingw-w64-kitemviews-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kitemviews" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('172fcd531af0df4329eaf35b91c7123d') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kjs-qt5/PKGBUILD b/mingw-w64-kjs-qt5/PKGBUILD new file mode 100644 index 0000000000..89b779208f --- /dev/null +++ b/mingw-w64-kjs-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kjs" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/${_basename}-${pkgver}.tar.xz") +md5sums=('988bff4927d2230d8a98f2b9597cfd05') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kplotting-qt5/PKGBUILD b/mingw-w64-kplotting-qt5/PKGBUILD new file mode 100644 index 0000000000..f240f6d8d8 --- /dev/null +++ b/mingw-w64-kplotting-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kplotting" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('9b2a7286c3576155037e2c1d7dc2dd0c') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kqoauth-qt4/PKGBUILD b/mingw-w64-kqoauth-qt4/PKGBUILD index fe222d23f2..891b714ce2 100644 --- a/mingw-w64-kqoauth-qt4/PKGBUILD +++ b/mingw-w64-kqoauth-qt4/PKGBUILD @@ -1,26 +1,23 @@ # Maintainer: AlexWMF _realname=kqoauth - +pkgbase=mingw-w64-${_realname}-qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4" - pkgver=0.98 -pkgrel=1 -pkgdesc="kQOAuth is a library written in C++ for Qt that implements the OAuth 1.0 authentication specification RFC 5849." +pkgrel=3 +pkgdesc="kQOAuth is a library written in C++ for Qt that implements the OAuth 1.0 authentication specification RFC 5849 (mingw-w64)" arch=('any') license=("custom:$pkgname") url="https://github.com/kypeli/kQOAuth" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-qt4") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") - -options=(strip staticlibs !buildflags) - +options=(strip staticlibs) source=(${_realname}-${pkgver}.tar.gz::"https://github.com/kypeli/kQOAuth/archive/${pkgver}.tar.gz" src_pro.patch pcfile_libname.patch) md5sums=('0ce649a1da4ee458dc0ce0d6ca7b26ff' - 'db3bd140361491f2a2192bf856e3722d' + '07ce6cadfc27b1b46425fdd4c365950b' 'a1121e9f81191bde7f80eda22bcde9c8') prepare() { @@ -31,18 +28,17 @@ prepare() { build() { cd ${srcdir}/${_realname}-${pkgver} - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + + local _buildpkgdir=${pkgdirbase}/${pkgname}${MINGW_PREFIX} + mkdir -p ${_buildpkgdir} + local PREFIX_WIN=$(cygpath -am ${_buildpkgdir}) pushd src > /dev/null ./pcfile.sh ${MINGW_PREFIX} ${pkgver} popd > /dev/null - ${MINGW_PREFIX}/bin/qmake PREFIX=${PREFIX_WIN} kqoauth.pro + ${MINGW_PREFIX}/bin/qmake -d PREFIX=${PREFIX_WIN} kqoauth.pro - make ${MAKEFLAGS} # VERBOSE=1 + make -j1 # VERBOSE=1 } package() { diff --git a/mingw-w64-kqoauth-qt4/src_pro.patch b/mingw-w64-kqoauth-qt4/src_pro.patch index c4f4f47c66..0c1a2fbf58 100644 --- a/mingw-w64-kqoauth-qt4/src_pro.patch +++ b/mingw-w64-kqoauth-qt4/src_pro.patch @@ -17,18 +17,19 @@ PUBLIC_HEADERS += kqoauthmanager.h \ kqoauthrequest.h \ -@@ -67,12 +68,12 @@ +@@ -67,12 +68,13 @@ postinstall.path = target.path postinstall.extra = install_name_tool -id $${target.path}/$${QMAKE_FRAMEWORK_BUNDLE_NAME}.framework/Versions/0/$${TARGET} $${target.path}/$${QMAKE_FRAMEWORK_BUNDLE_NAME}.framework/Versions/0/$${TARGET} } -else:unix { -+else:unix|win32-g++ { ++else:if(unix|win32-g++) { isEmpty( PREFIX ):INSTALL_PREFIX = /usr else:INSTALL_PREFIX = $${PREFIX} # this creates a pkgconfig file - system( ./pcfile.sh $${INSTALL_PREFIX} $${VERSION} ) + #system( ./pcfile.sh $${INSTALL_PREFIX} $${VERSION} ) ++ features.path = $${INSTALL_PREFIX}/share/qt4/mkspecs/features pkgconfig.files = kqoauth.pc target.path = $${INSTALL_PREFIX}/lib diff --git a/mingw-w64-krita-git/PKGBUILD b/mingw-w64-krita-git/PKGBUILD new file mode 100644 index 0000000000..87723576c3 --- /dev/null +++ b/mingw-w64-krita-git/PKGBUILD @@ -0,0 +1,85 @@ +# (MSYS2) Maintainer: Ray Donnelly +# (ArchLinux) Maintainer: Gustavo Alvarez +# (ArchLinux) Contributor: Bruno Pagani (a.k.a. ArchangeGabriel) + +# For now as I've not got shared KF5 ready. +_variant=-static +#_variant=-shared + +_basename=krita +_realname=${_basename}-git +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.0.89.r39172.46b0002 +pkgrel=1 +pkgdesc="A free digital painting application. Digital Painting, Creative Freedom!. (GIT Version) (mingw-w64)" +arch=('any') +url="http://www.krita.org" +license=('GPL2') +depends=("${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-gsl" + "${MINGW_PACKAGE_PREFIX}-LibRaw" + "${MINGW_PACKAGE_PREFIX}-opencolorio" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-exiv2" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-poppler" +# "${MINGW_PACKAGE_PREFIX}-kio" + "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules" + "git" + "${MINGW_PACKAGE_PREFIX}-boost" +# "${MINGW_PACKAGE_PREFIX}-vc" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-eigen3" + ) +provides=("${MINGW_PACKAGE_PREFIX}-krita") +conflicts=("${MINGW_PACKAGE_PREFIX}-krita") +install=krita-git.install +source=('git://anongit.kde.org/krita.git') +sha1sums=('SKIP') + +pkgver() { + cd "${srcdir}"/${_basename} + _ver="$(cat CMakeLists.txt | grep -m3 -e CALLIGRA_STABLE_VERSION_MAJOR -e CALLIGRA_STABLE_VERSION_MINOR -e CALLIGRA_VERSION_RELEASE | cut -d ')' -f1 | grep -o "[[:digit:]]*" | paste -sd'.')" + echo "${_ver}.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}"/${_basename} +} + +build() { + local -a extra_config + mkdir -p build-${CARCH}${_variant} + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + cmake ../${_basename} \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-krita-git/krita-git.install b/mingw-w64-krita-git/krita-git.install new file mode 100644 index 0000000000..3b3aff7d9e --- /dev/null +++ b/mingw-w64-krita-git/krita-git.install @@ -0,0 +1,13 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-mime-database usr/share/mime &> /dev/null + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-kwidgetsaddons-qt5/PKGBUILD b/mingw-w64-kwidgetsaddons-qt5/PKGBUILD new file mode 100644 index 0000000000..9d2cbf5249 --- /dev/null +++ b/mingw-w64-kwidgetsaddons-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kwidgetsaddons" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('c65b4f7bac1fcd3fc599d203ab7f15a0') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-kwindowsystem-qt5/PKGBUILD b/mingw-w64-kwindowsystem-qt5/PKGBUILD new file mode 100644 index 0000000000..bd9de20fa9 --- /dev/null +++ b/mingw-w64-kwindowsystem-qt5/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer (MSYS2): Ray Donnelly + +if [ -n ${KF5_VARIANT} ]; then + _variant=-${KF5_VARIANT} +else + _variant=-shared +fi + +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "kwindowsystem" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('001095e87ba8a52932f780bb043429d5') + +prepare() { + mkdir -p build-${CARCH}${_variant} +} + +build() { + local -a extra_config + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-l-smash/PKGBUILD b/mingw-w64-l-smash/PKGBUILD index d633476318..17563211e1 100644 --- a/mingw-w64-l-smash/PKGBUILD +++ b/mingw-w64-l-smash/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Yuta Nakai _realname=l-smash +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgdesc="Loyal to Spec of Mpeg4 and Ad-hoc Simple Hackwork. Yet another opensource mp4 handler (mingw-w64)" -pkgver=2.3.0 +pkgver=2.9.1 pkgrel=1 arch=('any') url="http://l-smash.github.io/l-smash/" @@ -13,7 +14,7 @@ options=('strip' 'staticlibs') source=(${_realname}-${pkgver}.tar.gz::"https://github.com/l-smash/l-smash/archive/v${pkgver}.tar.gz" '0001-configure-Check-whether-SRCDIR-is-git-repo-or-not.patch' '0002-configure-Add-api-version-to-mingw-shared-library-na.patch') -md5sums=('72e68a32e6a671afebbfbbab3b5dd47c' +md5sums=('ccc7f6f0dcfdb01398e0f922f150a0d9' 'c7e017f6451aea9a44636de9328dae49' '8dc7295da0e138ab7e9656c2248144f7') @@ -24,6 +25,7 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} diff --git a/mingw-w64-ladspa-sdk/PKGBUILD b/mingw-w64-ladspa-sdk/PKGBUILD new file mode 100644 index 0000000000..7f91ab000b --- /dev/null +++ b/mingw-w64-ladspa-sdk/PKGBUILD @@ -0,0 +1,19 @@ +# Maintainer: Jeff Hubbard + +_realname=ladspa-sdk +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.13 +pkgrel=2 +pkgdesc="Linux Audio Developer's Simple Plugin API (LADSPA) SDK (mingw-w64)" +arch=('any') +url="http://www.ladspa.org/" +license=("LGPL") +# bsdtar fails to untar their SDK tarball because of a symlink, so just +# download the header directly +source=("http://www.ladspa.org/ladspa_sdk/ladspa.h.txt") +md5sums=('7550280c79d24228361a9762b63e5b7e') + +package() { + install -d "${pkgdir}/${MINGW_PREFIX}/include" + cp "${srcdir}/ladspa.h.txt" "${pkgdir}/${MINGW_PREFIX}/include/ladspa.h" +} diff --git a/mingw-w64-lame/PKGBUILD b/mingw-w64-lame/PKGBUILD index 367ac2119f..1fc8f1c063 100644 --- a/mingw-w64-lame/PKGBUILD +++ b/mingw-w64-lame/PKGBUILD @@ -3,16 +3,16 @@ _realname=lame pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.99.5 -pkgrel=3 +pkgrel=4 pkgdesc="A high quality MPEG Audio Layer III (MP3) encoder (mingw-w64)" arch=('any') url="http://lame.sourceforge.net/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-ncurses" "${MINGW_PACKAGE_PREFIX}-mpg123" - "${MINGW_PACKAGE_PREFIX}-nasm") + "${MINGW_PACKAGE_PREFIX}-nasm" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libiconv") options=('strip' 'staticlibs') source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" @@ -35,11 +35,12 @@ prepare() { patch -p1 -i ${srcdir}/0003-parallel-builds-fix.all.patch patch -p1 -i ${srcdir}/0004-disable-wrong-xmmintrin-detection.all.patch patch -p1 -i ${srcdir}/0005-no-gtk.all.patch - + autoreconf -fi } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ diff --git a/mingw-w64-latexila/001-win.patch b/mingw-w64-latexila/001-win.patch new file mode 100644 index 0000000000..0656b3d257 --- /dev/null +++ b/mingw-w64-latexila/001-win.patch @@ -0,0 +1,85 @@ +--- ./src/liblatexila/latexila-build-tools-default.c.orig 2015-03-28 16:20:54.001369500 +0100 ++++ ./src/liblatexila/latexila-build-tools-default.c 2015-03-28 16:23:21.414277500 +0100 +@@ -171,9 +171,15 @@ + gchar *path; + GFile *file; + +- path = g_build_filename (DATA_DIR, "build_tools.xml", NULL); ++ gchar *datadir; ++ ++ datadir = g_win32_get_package_installation_directory_of_module (NULL); ++ ++ path = g_build_filename (datadir, "share", "latexila", "build_tools.xml", NULL); + file = g_file_new_for_path (path); ++ + g_free (path); ++ g_free (datadir); + + return file; + } +--- ./src/liblatexila/Makefile.am.orig 2015-03-18 13:48:13.000000000 +0100 ++++ ./src/liblatexila/Makefile.am 2015-03-28 15:35:50.719027800 +0100 +@@ -71,6 +71,7 @@ + if HAVE_INTROSPECTION + -include $(INTROSPECTION_MAKEFILE) + ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + INTROSPECTION_SCANNER_ARGS = \ + -I$(top_srcdir) \ + -I$(top_builddir) \ +--- ./src/main.vala.orig 2015-03-18 13:48:13.000000000 +0100 ++++ ./src/main.vala 2015-03-28 15:35:50.938038600 +0100 +@@ -21,6 +21,16 @@ + + using Gtk; + ++namespace Config ++{ ++ public string PACKAGE_NAME; ++ public string PACKAGE_VERSION; ++ public string DATA_DIR; ++ public string LOCALE_DIR; ++ public string GETTEXT_PACKAGE; ++ public string ICONS_DIR; ++} ++ + private struct CmdLineData + { + bool new_document; +@@ -109,6 +119,16 @@ + + int main (string[] args) + { ++ string p = Win32.get_package_installation_directory_of_module (null); ++ ++ Config.PACKAGE_NAME = RealConfig.PACKAGE_NAME; ++ Config.PACKAGE_VERSION = RealConfig.PACKAGE_VERSION; ++ Config.GETTEXT_PACKAGE = RealConfig.GETTEXT_PACKAGE; ++ ++ Config.DATA_DIR = Path.build_filename (p, "share", "latexila"); ++ Config.LOCALE_DIR = Path.build_filename (p, "share", "locale"); ++ Config.ICONS_DIR = Path.build_filename (p, "share", "icons", "hicolor"); ++ + init_i18n (); + + CmdLineData data = parse_cmd_line_options (args); +--- ./src/Makefile.am.orig 2015-03-18 13:48:13.000000000 +0100 ++++ ./src/Makefile.am 2015-03-28 15:35:50.944039500 +0100 +@@ -9,7 +9,7 @@ + --pkg gee-0.8 \ + --pkg posix \ + --target-glib=2.40 \ +- --vapidir liblatexila \ ++ --vapidir $(abs_top_builddir)/src/liblatexila \ + --pkg latexila + + # The valac command is always executed in the sources directory, not the build +--- ./vapi/config.vapi.orig 2015-03-18 13:48:13.000000000 +0100 ++++ ./vapi/config.vapi 2015-03-28 15:35:50.952048500 +0100 +@@ -1,5 +1,5 @@ + [CCode (lower_case_cprefix = "", cheader_filename = "config.h")] +-namespace Config ++namespace RealConfig + { + public const string PACKAGE_NAME; + public const string PACKAGE_VERSION; diff --git a/mingw-w64-latexila/PKGBUILD b/mingw-w64-latexila/PKGBUILD new file mode 100644 index 0000000000..69997a073b --- /dev/null +++ b/mingw-w64-latexila/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Andrea Zagli + +_realname=latexila +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.18.1 +pkgrel=1 +arch=('any') +pkgdesc="LaTeX editor designed for the GNOME desktop (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gtksourceview3" + "${MINGW_PACKAGE_PREFIX}-gspell" + "${MINGW_PACKAGE_PREFIX}-libgee") +makedepends=("${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +license=("GPL 2") +url="http://www.gnome.org" +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('edfd95f321dfff31fb094c243c358cb78d19904164b9ef4fb37c021113044d0a' + '94159afb2c0f0688c375ddcce3bf7750e7179c40d394847c665bc492632e3942') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p1 -b -V simple -i ${srcdir}/001-win.patch + + autoreconf -sf +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p data/build_tools + cp -rf ../${_realname}-${pkgver}/data/build_tools/* data/build_tools + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-latexila/latexila-i686.install b/mingw-w64-latexila/latexila-i686.install new file mode 100644 index 0000000000..b5742c7285 --- /dev/null +++ b/mingw-w64-latexila/latexila-i686.install @@ -0,0 +1,12 @@ +post_install() { + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + mingw32/bin/gtk-update-icon-cache-3.0 -f -t /mingw32/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-latexila/latexila-x86_64.install b/mingw-w64-latexila/latexila-x86_64.install new file mode 100644 index 0000000000..6556035471 --- /dev/null +++ b/mingw-w64-latexila/latexila-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + mingw64/bin/gtk-update-icon-cache-3.0 -f -t /mingw64/share/icons/hicolor + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-lcms/0002-need-jconfig-before-jmoreconfig.mingw.patch b/mingw-w64-lcms/0002-need-jconfig-before-jmoreconfig.mingw.patch new file mode 100644 index 0000000000..e9092e232b --- /dev/null +++ b/mingw-w64-lcms/0002-need-jconfig-before-jmoreconfig.mingw.patch @@ -0,0 +1,11 @@ +--- lcms2-2.5/configure.ac.orig 2013-06-27 16:01:28.000000000 +0000 ++++ lcms2-2.5/configure.ac 2013-07-28 06:17:38.507957900 +0000 +@@ -122,7 +122,7 @@ + passed=0; + AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) + AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) +- AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) ++ AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,[#include ]) + AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) + AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) + diff --git a/mingw-w64-lcms/PKGBUILD b/mingw-w64-lcms/PKGBUILD index 9721de9f0d..5be75a6ff1 100644 --- a/mingw-w64-lcms/PKGBUILD +++ b/mingw-w64-lcms/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=lcms - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.19 -pkgrel=2 +pkgrel=5 pkgdesc="Lightweight color management development library/engine (mingw-w64)" arch=(any) url="http://www.littlecms.com" @@ -13,30 +12,45 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libtiff") options=('staticlibs' 'strip') source=("http://downloads.sourceforge.net/sourceforge/lcms/lcms-${pkgver}.tar.gz" - "cve-2013-4276.patch" - "lcms-1.17-windows.patch") + "cve-2013-4276.patch" + "lcms-1.17-windows.patch" + "lcms-1.19-rhbz1003950.patch" + "lcms-1.19-rhbz675186.patch" + 0002-need-jconfig-before-jmoreconfig.mingw.patch) md5sums=('8af94611baf20d9646c7c2c285859818' 'fa1db4861cfa05f4c4a2c826e1c35502' - '9620be1a5bc2ec407c78f643cab62811') + '9620be1a5bc2ec407c78f643cab62811' + 'c1d1f66f6fffe71e3b8005b1dc8962f1' + '11291f3a345439e0d9e3bb4219f885e2' + '4017f8307298d6f65e1cb5bce9684fa5') prepare(){ - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -Np1 -i "$srcdir/cve-2013-4276.patch" + patch -Np1 -i "$srcdir/lcms-1.19-rhbz1003950.patch" + patch -Np1 -i "$srcdir/lcms-1.19-rhbz675186.patch" #patch -Np1 -i "$srcdir/lcms-1.17-windows.patch" - #autoreconf -f -i + patch -Np1 -i "$srcdir/0002-need-jconfig-before-jmoreconfig.mingw.patch" + + autoreconf -fiv } build() { - cd "${srcdir}/${_realname}-${pkgver}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + cp -rf ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ./configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --prefix=${MINGW_PREFIX} + --prefix=${MINGW_PREFIX} \ + --enable-shared \ + --enable-static make } package() { - cd "${srcdir}/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-lcms/lcms-1.19-rhbz1003950.patch b/mingw-w64-lcms/lcms-1.19-rhbz1003950.patch new file mode 100644 index 0000000000..a7a0704623 --- /dev/null +++ b/mingw-w64-lcms/lcms-1.19-rhbz1003950.patch @@ -0,0 +1,18 @@ +--- lcms-1.19/src/cmsio1.c 2009-11-13 10:02:11.000000000 +0100 ++++ lcms-1.19/src/cmsio1.c 2013-09-03 15:38:05.905867571 +0200 +@@ -1637,13 +1637,13 @@ int ReadEmbeddedTextTag(LPLCMSICCPROFILE + if (Len < 0) Len = 0; + if (Len > 20*1024) Len = 20 * 1024; + +- wchar = (wchar_t*) _cmsMalloc(Len*sizeof(wchar_t)+2); ++ wchar = (wchar_t*) _cmsMalloc(Len*sizeof(wchar_t)+sizeof(wchar_t)); + if (!wchar) return -1; + + if (Icc ->Read(wchar, 1, Len, Icc) != Len) return -1; + AdjustEndianessArray16((LPWORD) wchar, Len / 2); + +- wchar[Len / 2] = L'\0'; ++ wchar[Len / sizeof(wchar_t)] = L'\0'; + i = wcstombs(Name, wchar, size_max ); + if (i == ((size_t) -1)) { + diff --git a/mingw-w64-lcms/lcms-1.19-rhbz675186.patch b/mingw-w64-lcms/lcms-1.19-rhbz675186.patch new file mode 100644 index 0000000000..b10b8948de --- /dev/null +++ b/mingw-w64-lcms/lcms-1.19-rhbz675186.patch @@ -0,0 +1,11 @@ +--- lcms-1.19/samples/icclink.1 2011-01-11 11:59:54.000000000 +0000 ++++ lcms-1.19/samples/icclink.1 2011-02-04 15:03:14.000000000 +0000 +@@ -22,7 +22,7 @@ + Black point compensation. + .TP + .B \-c <0,1,2,3> +-Precission (0=LowRes, 1=Normal, 2=Hi-res). [defaults to 1] ++Precision (0=LowRes, 1=Normal, 2=Hi-res). [defaults to 1] + .TP + .BI \-d\ description + Description text (quotes can be used). diff --git a/mingw-w64-lcms2/0001-fix-testcmd2.mingw.patch b/mingw-w64-lcms2/0001-fix-testcmd2.mingw.patch new file mode 100644 index 0000000000..30aaf8f416 --- /dev/null +++ b/mingw-w64-lcms2/0001-fix-testcmd2.mingw.patch @@ -0,0 +1,11 @@ +--- lcms2-2.4/testbed/testcms2.c.orig 2013-04-04 11:44:04 +0400 ++++ lcms2-2.4/testbed/testcms2.c 2013-04-04 11:47:22 +0400 +@@ -33,6 +33,8 @@ + // On Visual Studio, use debug CRT + #ifdef _MSC_VER + # include "crtdbg.h" ++#endif ++#if defined (_WIN32) + # include + #endif + diff --git a/mingw-w64-lcms2/0002-need-jconfig-before-jmoreconfig.mingw.patch b/mingw-w64-lcms2/0002-need-jconfig-before-jmoreconfig.mingw.patch new file mode 100644 index 0000000000..e9092e232b --- /dev/null +++ b/mingw-w64-lcms2/0002-need-jconfig-before-jmoreconfig.mingw.patch @@ -0,0 +1,11 @@ +--- lcms2-2.5/configure.ac.orig 2013-06-27 16:01:28.000000000 +0000 ++++ lcms2-2.5/configure.ac 2013-07-28 06:17:38.507957900 +0000 +@@ -122,7 +122,7 @@ + passed=0; + AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) + AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) +- AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) ++ AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,[#include ]) + AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) + AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) + diff --git a/mingw-w64-lcms2/0003-install-mans.all.patch b/mingw-w64-lcms2/0003-install-mans.all.patch new file mode 100644 index 0000000000..0973313499 --- /dev/null +++ b/mingw-w64-lcms2/0003-install-mans.all.patch @@ -0,0 +1,45 @@ +diff -ru lcms2-2.5/utils/linkicc/Makefile.am lcms2-2.5.new/utils/linkicc/Makefile.am +--- lcms2-2.5/utils/linkicc/Makefile.am 2013-06-27 16:01:28.000000000 +0000 ++++ lcms2-2.5.new/utils/linkicc/Makefile.am 2013-07-28 06:35:22.305043000 +0000 +@@ -14,6 +14,6 @@ + linkicc_LDADD = $(top_builddir)/src/liblcms2.la + linkicc_LDFLAGS = @LDFLAGS@ + linkicc_SOURCES = linkicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h +-linkicc_MANS = linkicc.1 ++man_MANS = linkicc.1 + + EXTRA_DIST = $(man_MANS) +Only in lcms2-2.5.new/utils/linkicc: Makefile.am.orig +diff -ru lcms2-2.5/utils/psicc/Makefile.am lcms2-2.5.new/utils/psicc/Makefile.am +--- lcms2-2.5/utils/psicc/Makefile.am 2013-06-27 16:01:28.000000000 +0000 ++++ lcms2-2.5.new/utils/psicc/Makefile.am 2013-07-28 06:35:34.624607400 +0000 +@@ -14,6 +14,6 @@ + psicc_LDADD = $(top_builddir)/src/liblcms2.la + psicc_LDFLAGS = @LDFLAGS@ + psicc_SOURCES = psicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h +-psicc_MANS = psicc.1 ++man_MANS = psicc.1 + + EXTRA_DIST = $(man_MANS) +diff -ru lcms2-2.5/utils/samples/Makefile.am lcms2-2.5.new/utils/samples/Makefile.am +--- lcms2-2.5/utils/samples/Makefile.am 2013-06-27 16:01:28.000000000 +0000 ++++ lcms2-2.5.new/utils/samples/Makefile.am 2013-07-28 06:35:46.745146500 +0000 +@@ -14,6 +14,6 @@ + wtpt_LDADD = $(top_builddir)/src/liblcms2.la + wtpt_LDFLAGS = @LDFLAGS@ + wtpt_SOURCES = wtpt.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h +-wtpt_MANS = wtpt.1 ++man_MANS = wtpt.1 + + EXTRA_DIST = $(man_MANS) roundtrip.c mktiff8.c mkgrayer.c mkcmy.c itufax.c +diff -ru lcms2-2.5/utils/transicc/Makefile.am lcms2-2.5.new/utils/transicc/Makefile.am +--- lcms2-2.5/utils/transicc/Makefile.am 2013-06-27 16:01:28.000000000 +0000 ++++ lcms2-2.5.new/utils/transicc/Makefile.am 2013-07-28 06:35:57.328990500 +0000 +@@ -14,6 +14,6 @@ + transicc_LDADD = $(top_builddir)/src/liblcms2.la + transicc_LDFLAGS = @LDFLAGS@ + transicc_SOURCES = transicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h +-transicc_MANS = transicc.1 ++man_MANS = transicc.1 + + EXTRA_DIST = $(man_MANS) diff --git a/mingw-w64-lcms2/PKGBUILD b/mingw-w64-lcms2/PKGBUILD index 7d34f1bf5f..1cadf4bc37 100644 --- a/mingw-w64-lcms2/PKGBUILD +++ b/mingw-w64-lcms2/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=lcms2 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.6 -pkgrel=1 +pkgrel=4 pkgdesc="Small-footprint color management engine, version 2 (mingw-w64)" arch=(any) url="http://www.littlecms.com" @@ -12,25 +11,41 @@ license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libtiff") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/sourceforge/lcms/lcms2-${pkgver}.tar.gz") -md5sums=('f4c08d38ceade4a664ebff7228910a33') +source=("http://downloads.sourceforge.net/sourceforge/lcms/lcms2-${pkgver}.tar.gz" + 0001-fix-testcmd2.mingw.patch + 0002-need-jconfig-before-jmoreconfig.mingw.patch + 0003-install-mans.all.patch) +md5sums=('f4c08d38ceade4a664ebff7228910a33' + '495c11d0c18cd754acaf19740028a919' + '4017f8307298d6f65e1cb5bce9684fa5' + '847c756913571406528a30807374b5a7') + +prepare() { + cd ${_realname}-$pkgver + patch -p1 -i ${srcdir}/0001-fix-testcmd2.mingw.patch + patch -p1 -i ${srcdir}/0002-need-jconfig-before-jmoreconfig.mingw.patch + patch -p1 -i ${srcdir}/0003-install-mans.all.patch + + autoreconf -fiv +} build() { - cd "$srcdir/${_realname}-$pkgver" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + cp -rf ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/${_realname}-${pkgver}" ./configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --prefix=${MINGW_PREFIX} + --prefix=${MINGW_PREFIX} \ + --enable-shared \ + --enable-static make } package() { - cd "${srcdir}/${_realname}-${pkgver}" - make DESTDIR="$pkgdir" install - #rm -r "${pkgdir}${MINGW_PREFIX}/share" - #rm ${pkgdir}${MINGW_PREFIX}/bin/*.exe + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-ldns/PKGBUILD b/mingw-w64-ldns/PKGBUILD index b98e7063ae..73298088d9 100644 --- a/mingw-w64-ldns/PKGBUILD +++ b/mingw-w64-ldns/PKGBUILD @@ -1,47 +1,62 @@ # Maintainer: Alexey Pavlov _realname=ldns - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.6.17 -pkgrel=1 +pkgrel=4 pkgdesc="Fast DNS library supporting recent RFCs (mingw-w64)" arch=('any') url='http://www.nlnetlabs.nl/projects/ldns/' license=('custom:BSD') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=("${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-dnssec-anchors" - ) +makedepends=("${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-python2") +depends=("${MINGW_PACKAGE_PREFIX}-openssl") +optdepends=("${MINGW_PACKAGE_PREFIX}-dnssec-anchors") options=(strip staticlibs) -source=("http://www.nlnetlabs.nl/downloads/${_realname}/${_realname}-${pkgver}.tar.gz") -sha1sums=('4218897b3c002aadfc7280b3f40cda829e05c9a4') +source=("http://www.nlnetlabs.nl/downloads/${_realname}/${_realname}-${pkgver}.tar.gz" + ldns-1.6.17-relocate.patch + doxyparse-deprecations.patch) +sha1sums=('4218897b3c002aadfc7280b3f40cda829e05c9a4' + 'c2ec4d4f4c909a41a16ef868dba4e3d7a5c146ed' + '450af08b785e5f733b6ba666febdec2745f7a245') prepare() { cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/ldns-1.6.17-relocate.patch + patch -p1 -i ${srcdir}/doxyparse-deprecations.patch + + WANT_AUTOMAKE=latest autoreconf -fiv } build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + #mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ + + PYTHON=${MINGW_PREFIX}/bin/python2 \ + ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --disable-static \ + --enable-static \ --sysconfdir=${MINGW_PREFIX}/etc \ --localstatedir=${MINGW_PREFIX}/var \ + --with-trust-anchor=${MINGW_PREFIX}/etc/trusted-key.key \ --with-drill \ - --without-examples \ - --without-pyldns - make + --with-examples \ + --with-ssl=${MINGW_PREFIX} \ + --without-pyldns \ + --without-pyldnsx + + make -j1 } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make -j1 DESTDIR="${pkgdir}" install install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-ldns/doxyparse-deprecations.patch b/mingw-w64-ldns/doxyparse-deprecations.patch new file mode 100644 index 0000000000..e66a364aec --- /dev/null +++ b/mingw-w64-ldns/doxyparse-deprecations.patch @@ -0,0 +1,11 @@ +--- ldns-1.6.17/doc/doxyparse.pl 2015-09-01 16:09:55.429400600 +0300 ++++ ldns-1.6.17/doc/doxyparse.pl.orig 2015-09-01 16:09:40.101933500 +0300 +@@ -273,7 +273,7 @@ + + print MAN $MAN_MIDDLE; + +- if (defined(@$also)) { ++ if (@$also) { + print MAN "\n.SH SEE ALSO\n\\fI"; + print MAN join "\\fR, \\fI", @$also; + print MAN "\\fR.\nAnd "; diff --git a/mingw-w64-ldns/ldns-1.6.17-relocate.patch b/mingw-w64-ldns/ldns-1.6.17-relocate.patch new file mode 100644 index 0000000000..a872995140 --- /dev/null +++ b/mingw-w64-ldns/ldns-1.6.17-relocate.patch @@ -0,0 +1,788 @@ +diff -Naur ldns-1.6.17-orig/configure.ac ldns-1.6.17/configure.ac +--- ldns-1.6.17-orig/configure.ac 2014-01-11 01:04:41.000000000 +0400 ++++ ldns-1.6.17/configure.ac 2014-12-29 10:02:35.502800000 +0300 +@@ -2,6 +2,7 @@ + # Process this file with autoconf to produce a configure script. + AC_PREREQ(2.56) + sinclude(acx_nlnetlabs.m4) ++sinclude(varexpand.m4) + + # must be numbers. ac_defun because of later processing. + m4_define([VERSION_MAJOR],[1]) +@@ -642,6 +642,9 @@ + AC_SUBST(LDNS_TRUST_ANCHOR_FILE) + AC_MSG_NOTICE([Default trust anchor: $LDNS_TRUST_ANCHOR_FILE]) + ++FULL_EXPAND_VARIABLE(ldns_bindir, "$bindir") ++AC_DEFINE_UNQUOTED(LDNS_BINDIR, "$ldns_bindir", [Runtime executables location]) ++ + AC_ARG_WITH(ca-file, AC_HELP_STRING([--with-ca-file=CAFILE], [File containing CA certificates for ldns-dane]), [ + AC_DEFINE([HAVE_DANE_CA_FILE], [1], [Is a CAFILE given at configure time]) + AC_DEFINE_UNQUOTED([LDNS_DANE_CA_FILE], ["$withval"], [Is a CAFILE given at configure time]) +diff -Naur ldns-1.6.17-orig/drill/drill.c ldns-1.6.17/drill/drill.c +--- ldns-1.6.17-orig/drill/drill.c 2014-01-11 01:04:41.000000000 +0400 ++++ ldns-1.6.17/drill/drill.c 2014-12-29 10:03:20.836400000 +0300 +@@ -22,6 +24,7 @@ + static void + usage(FILE *stream, const char *progname) + { ++ const char * _trust_file = ldns_path_relocation(LDNS_BINDIR, LDNS_TRUST_ANCHOR_FILE); + fprintf(stream, " Usage: %s name [@server] [type] [class]\n", progname); + fprintf(stream, "\t can be a domain name or an IP address (-x lookups)\n"); + fprintf(stream, "\t defaults to A\n"); +@@ -58,7 +58,7 @@ + fprintf(stream, "\t\t\tWhen DNSSEC enabled tracing (-TD) or signature\n" + "\t\t\tchasing (-S) and no key files are given, keys are read\n" + "\t\t\tfrom: %s\n", +- LDNS_TRUST_ANCHOR_FILE); ++ _trust_file); + fprintf(stream, "\t-o \tset flags to:" + "\n\t\t\t[QR|qr][AA|aa][TC|tc][RD|rd][CD|cd][RA|ra][AD|ad]\n"); + fprintf(stream, "\t\t\tlowercase: unset bit, uppercase: set bit\n"); +@@ -410,7 +413,8 @@ + if ((PURPOSE == DRILL_CHASE || (PURPOSE == DRILL_TRACE && qdnssec)) && + ldns_rr_list_rr_count(key_list) == 0) { + +- (void) read_key_file(LDNS_TRUST_ANCHOR_FILE, key_list, true); ++ const char * _trust_file = ldns_path_relocation(LDNS_BINDIR, LDNS_TRUST_ANCHOR_FILE); ++ (void) read_key_file(_trust_file, key_list, true); + } + if (ldns_rr_list_rr_count(key_list) > 0) { + printf(";; Number of trusted keys: %d\n", +diff -Naur ldns-1.6.17-orig/examples/ldns-dane.c ldns-1.6.17/examples/ldns-dane.c +--- ldns-1.6.17-orig/examples/ldns-dane.c 2014-01-11 01:04:41.000000000 +0400 ++++ ldns-1.6.17/examples/ldns-dane.c 2014-12-29 09:59:32.063000000 +0300 +@@ -65,7 +65,8 @@ + "use DNSKEY/DS rr(s) in to validate TLSAs\n" + "\t\t\twhen signature chasing (i.e. -S)\n" + ); +- printf("\t\t\tDefault is %s\n", LDNS_TRUST_ANCHOR_FILE); ++ const char * _trust_file = ldns_path_relocation(LDNS_BINDIR, LDNS_TRUST_ANCHOR_FILE); ++ printf("\t\t\tDefault is %s\n", _trust_file); + printf("\t-n\t\tdo *not* verify server name in certificate\n"); + printf("\t-o \t" + "select th certificate from the end of\n" +@@ -1310,7 +1310,8 @@ + + if (do_sigchase) { + if (nkeys == 0) { +- (void) read_key_file(LDNS_TRUST_ANCHOR_FILE, keys); ++ const char * _trust_file = ldns_path_relocation(LDNS_BINDIR, LDNS_TRUST_ANCHOR_FILE); ++ (void) read_key_file(_trust_file, keys); + nkeys = ldns_rr_list_rr_count(keys); + + if (nkeys == 0) { +diff -Naur ldns-1.6.17-orig/examples/ldns-verify-zone.c ldns-1.6.17/examples/ldns-verify-zone.c +--- ldns-1.6.17-orig/examples/ldns-verify-zone.c 2014-01-11 01:04:41.000000000 +0400 ++++ ldns-1.6.17/examples/ldns-verify-zone.c 2014-12-29 09:59:32.063000000 +0300 +@@ -674,6 +674,7 @@ + size_t nkeys = 0; + + check_time = ldns_time(NULL); ++ const char * _trust_file = ldns_path_relocation(LDNS_BINDIR, LDNS_TRUST_ANCHOR_FILE); + myout = stdout; + myerr = stderr; + +@@ -703,7 +703,7 @@ + printf("\t-k \tspecify a file that contains a " + "trusted DNSKEY or DS rr.\n\t\t\t" + "This option may be given more than once.\n" +- "\t\t\tDefault is %s", LDNS_TRUST_ANCHOR_FILE); ++ "\t\t\tDefault is %s", _trust_file); + printf("\t-p [0-100]\tonly checks this percentage of " + "the zone.\n\t\t\tDefaults to 100\n"); + printf("\t-S\t\tchase signature(s) to a known key. " +@@ -816,7 +816,8 @@ + } + } + if (do_sigchase && nkeys == 0) { +- (void) read_key_file(LDNS_TRUST_ANCHOR_FILE, keys); ++ const char * _trust_file = ldns_path_relocation(LDNS_BINDIR, LDNS_TRUST_ANCHOR_FILE); ++ (void) read_key_file(_trust_file, keys); + nkeys = ldns_rr_list_rr_count(keys); + + if (nkeys == 0) { +diff -Naur ldns-1.6.17-orig/pathtools.c ldns-1.6.17/pathtools.c +--- ldns-1.6.17-orig/pathtools.c 1970-01-01 03:00:00.000000000 +0300 ++++ ldns-1.6.17/pathtools.c 1970-01-01 03:00:00.000000000 +0300 +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff -Naur ldns-1.6.17-orig/pathtools.h ldns-1.6.17/pathtools.h +--- ldns-1.6.17-orig/pathtools.h 1970-01-01 03:00:00.000000000 +0300 ++++ ldns-1.6.17/pathtools.h 1970-01-01 03:00:00.000000000 +0300 +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ +diff -Naur ldns-1.6.17-orig/varexpand.m4 ldns-1.6.17/varexpand.m4 +--- ldns-1.6.17-orig/varexpand.m4 1970-01-01 03:00:00.000000000 +0300 ++++ ldns-1.6.17/varexpand.m4 2014-12-29 09:55:37.933600000 +0300 +@@ -0,0 +1,8 @@ ++AC_DEFUN([FULL_EXPAND_VARIABLE], [ ++ $1=$2 ++ $1=`( ++ test "x$prefix" = xNONE && prefix="$ac_default_prefix" ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" ++ eval echo \""[$]$1"\" ++ )` ++]) +diff -Naur ldns-1.6.17-orig/Makefile.in ldns-1.6.17/Makefile.in +--- ldns-1.6.17-orig/Makefile.in 2014-01-11 01:04:41.000000000 +0400 ++++ ldns-1.6.17/Makefile.in 2014-12-29 09:59:32.063000000 +0300 +@@ -65,7 +65,7 @@ + INSTALL = $(srcdir)/install-sh + + LIBLOBJS = $(LIBOBJS:.o=.lo) +-LDNS_LOBJS = buffer.lo dane.lo dname.lo dnssec.lo dnssec_sign.lo dnssec_verify.lo dnssec_zone.lo duration.lo error.lo higher.lo host2str.lo host2wire.lo keys.lo net.lo packet.lo parse.lo radix.lo rbtree.lo rdata.lo resolver.lo rr.lo rr_functions.lo sha1.lo sha2.lo str2host.lo tsig.lo update.lo util.lo wire2host.lo zone.lo ++LDNS_LOBJS = buffer.lo dane.lo dname.lo dnssec.lo dnssec_sign.lo dnssec_verify.lo dnssec_zone.lo duration.lo error.lo higher.lo host2str.lo host2wire.lo keys.lo net.lo packet.lo parse.lo pathtools.lo radix.lo rbtree.lo rdata.lo resolver.lo rr.lo rr_functions.lo sha1.lo sha2.lo str2host.lo tsig.lo update.lo util.lo wire2host.lo zone.lo + LDNS_LOBJS_EX = ^linktest\.c$$ + LDNS_ALL_LOBJS = $(LDNS_LOBJS) $(LIBLOBJS) + LIB = libldns.la +@@ -118,6 +118,7 @@ + @if test ! -d drill ; then mkdir drill ; fi + @if test ! -d examples ; then mkdir examples ; fi + @if test ! -h config.h ; then ln -s ldns/config.h . ; fi ++ @if test ! -d .libs ; then mkdir .libs ; fi + @if test ! -h lib ; then ln -s .libs lib ; fi ; + @if test ! -d include ; then $(INSTALL) -d include; fi + @if test ! -h include/ldns ; then ln -s ../ldns include/ldns || echo "include/ldns exists"; fi +@@ -216,7 +216,7 @@ + lib-export-all: libldns.la-export-all + + libldns.la: $(LDNS_ALL_LOBJS) +- $(LINK_LIB) $(LIBSSL_LDFLAGS) $(LIBSSL_LIBS) -export-symbols-regex '^(ldns_|b32_[pn]to[pn]|mktime_from_utc|qsort_rr_compare_nsec3)' -o libldns.la $(LDNS_ALL_LOBJS) -rpath $(libdir) $(RUNTIME_PATH) ++ $(LINK_LIB) $(LIBSSL_LDFLAGS) $(LIBSSL_LIBS) -export-symbols-regex '^(ldns_|inet_[anp]to[pn]|b64_[pn]to[pn]|b32_[pn]to[pn]|mktime_from_utc|qsort_rr_compare_nsec3)' -o libldns.la $(LDNS_ALL_LOBJS) -rpath $(libdir) $(RUNTIME_PATH) + + libldns.la-export-all: $(LDNS_ALL_LOBJS) + $(LINK_LIB) -o libldns.la $(LDNS_ALL_LOBJS) -rpath $(libdir) $(RUNTIME_PATH) +--- ldns-1.6.17/util.c.orig 2014-12-29 12:10:20.441600000 +0300 ++++ ldns-1.6.17/util.c 2014-12-29 12:11:18.856000000 +0300 +@@ -22,10 +22,31 @@ + #include + #include + ++#include "pathtools.h" ++ + #ifdef HAVE_SSL + #include + #endif + ++char * ++ldns_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ + ldns_lookup_table * + ldns_lookup_by_name(ldns_lookup_table *table, const char *name) + { +--- ldns-1.6.17/ldns/util.h.in.orig 2014-12-29 12:08:51.581000000 +0300 ++++ ldns-1.6.17/ldns/util.h.in 2014-12-29 12:11:09.152800000 +0300 +@@ -385,6 +385,7 @@ + + #endif /* ! LDNS_BUILD_CONFIG_HAVE_B32_PTON */ + ++char * ldns_path_relocation(const char *from, const char *to); + + #ifdef __cplusplus + } diff --git a/mingw-w64-leechcraft-git/PKGBUILD b/mingw-w64-leechcraft-git/PKGBUILD new file mode 100644 index 0000000000..38fc2bcf57 --- /dev/null +++ b/mingw-w64-leechcraft-git/PKGBUILD @@ -0,0 +1,210 @@ +# Maintainer: AlexWMF + +_realname=leechcraft + +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +#provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +#conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") + +pkgver=0.6.70_1886_gba1d0d9 +pkgrel=1 +pkgdesc="LeechCraft is a free open source cross-platform modular live environment." +arch=('any') +license=('Boost') +url="http://leechcraft.org/" +depends=("${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-djvulibre" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-good" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-ugly" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-hunspell" + "${MINGW_PACKAGE_PREFIX}-libguess" + "${MINGW_PACKAGE_PREFIX}-liblastfm-qt4" + "${MINGW_PACKAGE_PREFIX}-libtorrent-rasterbar-git" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-pcre" + "${MINGW_PACKAGE_PREFIX}-poppler-qt4" + "${MINGW_PACKAGE_PREFIX}-qca-qt4-git" + "${MINGW_PACKAGE_PREFIX}-qjson-qt4" + # "${MINGW_PACKAGE_PREFIX}-qt-mobility-qt4" + "${MINGW_PACKAGE_PREFIX}-qwt-qt4" + "${MINGW_PACKAGE_PREFIX}-qxmpp-qt4" + "${MINGW_PACKAGE_PREFIX}-speex" + "${MINGW_PACKAGE_PREFIX}-taglib" + "${MINGW_PACKAGE_PREFIX}-tidyhtml") + +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") + +options=(!strip !buildflags) + +#source=(${_realname}.tar.gz::"https://github.com/0xd34df00d/${_realname}/archive/${pkgver}.tar.gz" +source=("${_realname}"::"git+https://github.com/0xd34df00d/leechcraft.git" + win_rc.patch + xtazy_cmake.patch + lmp_gst_paths.patch + find_otr.patch + find_poppler_cmake.patch + find_azoth_multimediakit_cmake.patch + azoth_xoox_multimediakit.patch + htthare_cmake.patch + azoth_find_qca2.patch + find_gstreamer_cmake.patch + find_qwt_cmake_common.patch + find_rbtorrent_cmake.patch + find_lmp_libguess_cmake.patch + find_lhtr_libtidy_cmake.patch + find_qjson_cmake_common.patch) +md5sums=('SKIP' + '4d0dadd4c21c0aa3445bd692f53cd710' + '37c053b55190fc4a0982f523da622778' + '928ec6660b81dcd972b9c0b965500a3d' + '26f30fad2a37195700a63026ca98140c' + '1ab74591ea02c8b963635c29f7c96aa4' + '39c8f3bb218d90ee18e3d00145b6cc4d' + '9842ee627c186acfd8bfe41246d11021' + '339e312cf94e227a15d97eedfcf47ad6' + '315a55250f864e4f8309e67ca9788b75' + '8a99a49f9c8ddf52e85f449864c25ce1' + 'd65acc9c21d2bbf96cbd524f17e7e9a6' + 'c3ed67e1e343a1eb0787be5600306769' + '0bd91269a65429173ad14df4dd095036' + '31b73bc20ee1cdfb310101fc7b640b7f' + '6400ac872a9cd3d575435ab766cc1ab8') + +pkgver() { + cd "$srcdir/$_realname" + printf "%s" "$(git describe | sed 's/-/_/g')" +} + +prepare() { + cd "${srcdir}/${_realname}" + patch -p0 -i ${srcdir}/win_rc.patch + patch -p0 -i ${srcdir}/xtazy_cmake.patch + patch -p0 -i ${srcdir}/lmp_gst_paths.patch + patch -p0 -i ${srcdir}/find_otr.patch + patch -p0 -i ${srcdir}/find_poppler_cmake.patch + #patch -p1 -i ${srcdir}/find_azoth_multimediakit_cmake.patch + #patch -p0 -i ${srcdir}/azoth_xoox_multimediakit.patch + patch -p0 -i ${srcdir}/htthare_cmake.patch + patch -p0 -i ${srcdir}/azoth_find_qca2.patch + patch -p1 -i ${srcdir}/find_gstreamer_cmake.patch + patch -p1 -i ${srcdir}/find_qwt_cmake_common.patch + patch -p1 -i ${srcdir}/find_rbtorrent_cmake.patch + patch -p1 -i ${srcdir}/find_lmp_libguess_cmake.patch + patch -p1 -i ${srcdir}/find_lhtr_libtidy_cmake.patch + patch -p1 -i ${srcdir}/find_qjson_cmake_common.patch + + cd ${srcdir} + mv ${_realname} "${srcdir}/${CARCH}" +} + +build() { + #if [ "${CARCH}" != "x86_64" ]; then + # return + #fi + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${pkgdir}${MINGW_PREFIX} + pushd ${pkgdir}${MINGW_PREFIX} > /dev/null + export PREFIX_WIN=`pwd -W` + popd > /dev/null + + #pushd ${MINGW_PREFIX} > /dev/null + #export PREFIX_DEP=`pwd -W` + #popd > /dev/null + + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DMINGW_PREFIX="${MINGW_PREFIX}" \ + -DWITH_PLUGINS=True \ + -DENABLE_SB2=True \ + -DENABLE_AZOTH=True \ + -DENABLE_CRYPT=True \ + -DENABLE_AZOTH_VADER=True \ + -DENABLE_MEDIACALLS=False \ + -DENABLE_AZOTH_AUTOPASTE=True \ + -DENABLE_AZOTH_ROSENTHAL=True \ + -DENABLE_AZOTH_WOODPECKER=True \ + -DENABLE_SECMAN=True \ + -DENABLE_AUSCRIE=True \ + -DENABLE_IMGASTE=True \ + -DENABLE_LACKMAN=True \ + -DENABLE_POSHUKU=True \ + -DENABLE_POSHUKU_CLEANWEB=True \ + -DENABLE_HISTORYHOLDER=True \ + -DENABLE_HTTP=True \ + -DENABLE_SYNCER=False \ + -DENABLE_TABSESSMANAGER=True \ + -DENABLE_CPULOAD=True \ + -DENABLE_DOLOZHEE=True \ + -DENABLE_HARBINGER=True \ + -DENABLE_NETSTOREMANAGER=True \ + -DENABLE_OORONEE=True \ + -DENABLE_TOUCHSTREAMS=True \ + -DENABLE_CEMENTO=True \ + -DENABLE_ROSENTHAL=True \ + -DENABLE_LASTFMSCROBBLE=True \ + -DENABLE_MONOCLE=True \ + -DENABLE_BLASQ=True \ + -DENABLE_LEMON=False \ + -DENABLE_VTYULC=False \ + -DENABLE_HTTHARE=True \ + -DGIT_CMD=`which git` \ + -DENABLE_POLEEMERY=True \ + -DENABLE_LHTR=True \ + -DENABLE_OTLOZHU=True \ + -DENABLE_OTLOZHU_SYNC=False \ + -DENABLE_LMP=True \ + -DUSE_GSTREAMER_10=True \ + -DENABLE_LMP_LIBGUESS=True \ + -DENABLE_LMP_BRAINSLUGZ=True \ + -DENABLE_LMP_DUMBSYNC=True \ + -DENABLE_LMP_GRAFFITI=True \ + -DENABLE_LMP_HTTSTREAM=True \ + -DENABLE_LMP_JOS=False \ + -DENABLE_LMP_MP3TUNES=True \ + -DENABLE_LMP_MTPSYNC=False \ + -DWITH_X11=False \ + -DENABLE_TORRENT=True \ + -DENABLE_AZOTH_OTROID=True \ + -DENABLE_SNAILS=False \ + -DENABLE_AZOTH_TRACOLOR=True \ + -DUSE_CPP14=True \ + ${srcdir}/${CARCH}/src/ + + + # -DQJSON_DIR="${PREFIX_DEP}/" \ + # -DQTMULTIMEDIAKIT_PREFIX="${PREFIX_DEP}/" \ + # -DLIBTIDY_DIR="${PREFIX_DEP}/" \ + # -DLibGuess_DIR="${PREFIX_DEP}/" \ + # -DRBTorrent_DIR="${PREFIX_DEP}/" \ + # -DRBTorrent_LIBRARY="${PREFIX_DEP}/lib/libtorrent-rasterbar.dll.a" \ + # -DQWT_DIR="${PREFIX_DEP}/" \ + # -DQWT_INCLUDE_DIRS="${PREFIX_DEP}/include/qwt" \ + # -DQWT_LIBRARIES="${PREFIX_DEP}/lib/libqwt.a" \ + # -DPC_GSTREAMER_LIBRARY_DIRS="${PREFIX_DEP}/lib" \ + # -DGSTREAMER_INCLUDE_DIR="${PREFIX_DEP}/include/gstreamer-1.0" \ + # -DGSTREAMER_DIR="${PREFIX_DEP}/" \ + # ENABLE_SYNCER - laretz + # ENABLE_LEMON - netlink (nl) + + make ${MAKEFLAGS} # VERBOSE=1 +} + +package() { + #if [ "${CARCH}" != "x86_64" ]; then + # return + #fi + cd $srcdir/build-${MINGW_CHOST} + make -j1 install +} diff --git a/mingw-w64-leechcraft-git/azoth_find_qca2.patch b/mingw-w64-leechcraft-git/azoth_find_qca2.patch new file mode 100644 index 0000000000..4e1f3dace3 --- /dev/null +++ b/mingw-w64-leechcraft-git/azoth_find_qca2.patch @@ -0,0 +1,11 @@ +--- src/plugins/azoth/cmake/FindQCA2.cmake.orig 2014-07-15 19:51:49.513240700 +0300 ++++ src/plugins/azoth/cmake/FindQCA2.cmake 2014-07-19 17:26:25.387095400 +0300 +@@ -31,7 +31,7 @@ + + find_library_with_debug(QCA2_LIBRARIES + WIN32_DEBUG_POSTFIX d +- NAMES qca ++ NAMES qca qca2 + HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS} ${QCA2_DIR}/lib + ) + diff --git a/mingw-w64-leechcraft-git/azoth_xoox_multimediakit.patch b/mingw-w64-leechcraft-git/azoth_xoox_multimediakit.patch new file mode 100644 index 0000000000..1475487851 --- /dev/null +++ b/mingw-w64-leechcraft-git/azoth_xoox_multimediakit.patch @@ -0,0 +1,10 @@ +--- src/plugins/azoth/plugins/xoox/CMakeLists.txt.orig 2014-07-18 23:55:42.420365000 +0300 ++++ src/plugins/azoth/plugins/xoox/CMakeLists.txt 2014-07-18 23:56:02.860534100 +0300 +@@ -167,6 +167,7 @@ + ${QXMPP_LIBRARIES} + ${SPEEX_LIBRARIES} + ${QCA2_LIBRARIES} ++ ${QTMULTIMEDIAKIT_LIBRARIES} + ) + install (TARGETS leechcraft_azoth_xoox DESTINATION ${LC_PLUGINS_DEST}) + install (FILES azothxooxsettings.xml DESTINATION ${LC_SETTINGS_DEST}) diff --git a/mingw-w64-leechcraft-git/find_azoth_multimediakit_cmake.patch b/mingw-w64-leechcraft-git/find_azoth_multimediakit_cmake.patch new file mode 100644 index 0000000000..d67920af96 --- /dev/null +++ b/mingw-w64-leechcraft-git/find_azoth_multimediakit_cmake.patch @@ -0,0 +1,30 @@ +--- x86_64/src/plugins/azoth/cmake/FindQtMultimediaKit.cmake.orig 2014-12-13 17:50:06.112839800 +0300 ++++ x86_64/src/plugins/azoth/cmake/FindQtMultimediaKit.cmake 2014-12-13 17:52:02.482495800 +0300 +@@ -16,6 +16,7 @@ + /usr/local/include/QtMultimediaKit + /usr/include/qt4/QtMultimediaKit + /usr/local/include/qt4/QtMultimediaKit ++ ${MINGW_PREFIX}/include/QtMultimediaKit + ) + + find_path (QTMOBILITY_INCLUDE_DIR +@@ -26,16 +27,18 @@ + /usr/local/include/QtMobility + /usr/include/qt4/QtMobility + /usr/local/include/qt4/QtMobility ++ ${MINGW_PREFIX}/include/QtMobility + ) + + find_library (QTMULTIMEDIAKIT_LIBRARIES + NAMES +- QtMultimediaKit ++ QtMultimediaKit QtMultimediaKit1 + PATHS + /usr/lib + /usr/local/lib + /usr/lib/qt4 + /usr/local/lib/qt4 ++ ${MINGW_PREFIX}/lib + ) + + if (QTMULTIMEDIAKIT_INCLUDE_DIR AND QTMOBILITY_INCLUDE_DIR AND QTMULTIMEDIAKIT_LIBRARIES) diff --git a/mingw-w64-leechcraft-git/find_gstreamer_cmake.patch b/mingw-w64-leechcraft-git/find_gstreamer_cmake.patch new file mode 100644 index 0000000000..d71150196a --- /dev/null +++ b/mingw-w64-leechcraft-git/find_gstreamer_cmake.patch @@ -0,0 +1,20 @@ +--- x86_64/src/plugins/lmp/cmake/FindGStreamer.cmake.orig 2014-12-13 15:55:16.107754000 +0300 ++++ x86_64/src/plugins/lmp/cmake/FindGStreamer.cmake 2014-12-13 16:17:21.848582100 +0300 +@@ -20,7 +20,7 @@ + SET(GStreamer_FIND_QUIETLY FALSE) + ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) + +-IF (NOT WIN32) ++#IF (NOT WIN32 OR MINGW) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + FIND_PACKAGE(PkgConfig) +@@ -33,7 +33,7 @@ + #MESSAGE(STATUS "DEBUG: GStreamer link directory = ${GSTREAMER_LIBRARY_DIRS}") + #MESSAGE(STATUS "DEBUG: GStreamer CFlags = ${GSTREAMER_CFLAGS_OTHER}") + SET(GSTREAMER_DEFINITIONS ${PC_GSTREAMER_CFLAGS_OTHER}) +-ENDIF (NOT WIN32) ++#ENDIF (NOT WIN32 OR MINGW) + + IF (WIN32 OR APPLE) + SET (USE_GSTREAMER_10 TRUE) diff --git a/mingw-w64-leechcraft-git/find_lhtr_libtidy_cmake.patch b/mingw-w64-leechcraft-git/find_lhtr_libtidy_cmake.patch new file mode 100644 index 0000000000..30e46de622 --- /dev/null +++ b/mingw-w64-leechcraft-git/find_lhtr_libtidy_cmake.patch @@ -0,0 +1,22 @@ +--- x86_64/src/plugins/lhtr/cmake/FindLibTidy.cmake.orig 2014-12-13 17:43:06.245824800 +0300 ++++ x86_64/src/plugins/lhtr/cmake/FindLibTidy.cmake 2014-12-13 17:45:55.087482000 +0300 +@@ -12,11 +12,17 @@ + endif (LIBTIDY_INCLUDE_DIR) + + # Look for the header file. +-find_path(LIBTIDY_INCLUDE_DIR tidy.h PATH_SUFFIXES tidy PATHS ${LIBTIDY_DIR}/include) ++find_path(LIBTIDY_INCLUDE_DIR tidy.h PATH_SUFFIXES tidy ++ PATHS ++ ${MINGW_PREFIX}/include ++ ${LIBTIDY_DIR}/include) + mark_as_advanced(LIBTIDY_INCLUDE_DIR) + + # Look for the library. +-find_library(LIBTIDY_LIBRARY NAMES tidy PATHS ${LIBTIDY_DIR}/lib) ++find_library(LIBTIDY_LIBRARY NAMES tidy ++ PATHS ++ ${MINGW_PREFIX}/lib ++ ${LIBTIDY_DIR}/lib) + mark_as_advanced(LIBTIDY_LIBRARY) + + if (LIBTIDY_INCLUDE_DIR AND LIBTIDY_LIBRARY) diff --git a/mingw-w64-leechcraft-git/find_lmp_libguess_cmake.patch b/mingw-w64-leechcraft-git/find_lmp_libguess_cmake.patch new file mode 100644 index 0000000000..287dca6ff0 --- /dev/null +++ b/mingw-w64-leechcraft-git/find_lmp_libguess_cmake.patch @@ -0,0 +1,38 @@ +--- x86_64/src/plugins/lmp/cmake/FindLibGuess.cmake.orig 2014-12-13 17:40:38.292362300 +0300 ++++ x86_64/src/plugins/lmp/cmake/FindLibGuess.cmake 2014-12-13 17:41:24.025978100 +0300 +@@ -10,11 +10,12 @@ + # Already in cache + set (LibGuess_FOUND TRUE) + else () +- if (NOT WIN32) ++ if (NOT WIN32 OR MINGW) + find_library (LibGuess_LIBRARY + NAMES + guess + PATHS ++ ${MINGW_PREFIX}/lib + ENV + ) + else () +@@ -27,7 +28,8 @@ + endif () + + if (MINGW) +- find_library (LibGuess_LIBRARIES NAMES libguess.a PATHS ${LibGuess_DIR}/lib) ++ find_library (LibGuess_LIBRARY NAMES guess libguess PATHS ${LibGuess_DIR}/lib) ++ message (STATUS "LIBGUESS LIB: ${LibGuess_LIBRARY}") + endif () + endif () + +@@ -35,9 +37,11 @@ + NAMES + libguess/libguess.h + PATHS ++ ${MINGW_PREFIX}/include + ${LibGuess_DIR}/include + ${INCLUDE_INSTALL_DIR} + ) ++ message (STATUS "LIBGUESS INC: ${LibGuess_INCLUDE_DIR}") + + if (LibGuess_INCLUDE_DIR AND LibGuess_LIBRARY) + set (LibGuess_FOUND 1) diff --git a/mingw-w64-leechcraft-git/find_otr.patch b/mingw-w64-leechcraft-git/find_otr.patch new file mode 100644 index 0000000000..94521e514e --- /dev/null +++ b/mingw-w64-leechcraft-git/find_otr.patch @@ -0,0 +1,46 @@ +--- src/plugins/azoth/plugins/otroid/cmake/FindLibOTR.cmake.orig 2014-07-12 23:40:52.923459600 +0300 ++++ src/plugins/azoth/plugins/otroid/cmake/FindLibOTR.cmake 2014-07-13 00:57:33.387591100 +0300 +@@ -8,29 +8,18 @@ + include(MacroEnsureVersion) + include(FindPackageHandleStandardArgs) + +-if (LIBOTR_INCLUDE_DIR AND LIBOTR_LIBRARY) +- # Already in cache, be silent +- set(LIBOTR_FIND_QUIETLY TRUE) +-endif () ++find_package (PkgConfig) ++pkg_check_modules (PC_LIBOTR REQUIRED libotr>=3.2) + +-find_path(LIBOTR_INCLUDE_DIR libotr/version.h) +- +-find_library(LIBOTR_LIBRARY NAMES otr libotr) +- +-# Determine version information from libotr/version.h +-if( LIBOTR_INCLUDE_DIR AND LIBOTR_LIBRARY ) +- execute_process(COMMAND grep "OTRL_VERSION" "${LIBOTR_INCLUDE_DIR}/libotr/version.h" OUTPUT_VARIABLE output) +- string(REGEX MATCH "OTRL_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+" LIBOTR_VERSION "${output}") +- string(REGEX REPLACE "^OTRL_VERSION \"" "" LIBOTR_VERSION "${LIBOTR_VERSION}") +- # Check if version is at least 3.2.0 +- MACRO_ENSURE_VERSION("3.2.0" ${LIBOTR_VERSION} LIBOTR_FOUND) +- +- if( LIBOTR_FOUND ) +- if( NOT LIBOTR_FIND_QUIETLY ) +- message( STATUS "Found libotr: ${LIBOTR_LIBRARY}") +- endif() +- else() +- message(STATUS "libotr version 3.2.0 or greater required but found ${LIBOTR_VERSION}.") +- endif() +- +-endif() ++find_path (LIBOTR_INCLUDE_DIR libotr/version.h ++ HINTS ${PC_LIBOTR_INCLUDEDIR} ${PC_LIBOTR_INCLUDE_DIRS} ++ PATH_SUFFIXES libotr) ++ ++find_library(LIBOTR_LIBRARY NAMES libotr ++ HINTS ${PC_LIBOTR_LIBDIR} ${PC_LIBOTR_LIBRARY_DIRS} ) ++find_library(LIBGCRYPT_LIBRARY NAMES libgcrypt ++ HINTS ${PC_LIBOTR_LIBDIR} ${PC_LIBOTR_LIBRARY_DIRS} ) ++find_library(LIBGPG_ERROR NAMES libgpg-error ++ HINTS ${PC_LIBOTR_LIBDIR} ${PC_LIBOTR_LIBRARY_DIRS} ) ++set (LIBOTR_LIBRARY ${LIBOTR_LIBRARY} ${LIBGCRYPT_LIBRARY} ${LIBGPG_ERROR}) ++message (STATUS "libor found: ${LIBOTR_LIBRARY}, includedir: ${LIBOTR_INCLUDE_DIR}") diff --git a/mingw-w64-leechcraft-git/find_poppler_cmake.patch b/mingw-w64-leechcraft-git/find_poppler_cmake.patch new file mode 100644 index 0000000000..ba39a19c72 --- /dev/null +++ b/mingw-w64-leechcraft-git/find_poppler_cmake.patch @@ -0,0 +1,11 @@ +--- src/plugins/monocle/plugins/pdf/cmake/FindPopplerQt4.cmake.orig 2014-07-15 19:51:51.304343200 +0300 ++++ src/plugins/monocle/plugins/pdf/cmake/FindPopplerQt4.cmake 2014-07-15 21:36:54.437861800 +0300 +@@ -15,7 +15,7 @@ + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +-if (UNIX) ++if (UNIX OR MINGW) + find_package(PkgConfig) + pkg_check_modules(PC_POPPLERQT4 QUIET poppler-qt4) + diff --git a/mingw-w64-leechcraft-git/find_qjson_cmake_common.patch b/mingw-w64-leechcraft-git/find_qjson_cmake_common.patch new file mode 100644 index 0000000000..6c0f200fdc --- /dev/null +++ b/mingw-w64-leechcraft-git/find_qjson_cmake_common.patch @@ -0,0 +1,19 @@ +--- x86_64/src/cmake/FindQJSON.cmake.orig 2014-12-14 00:40:10.259116500 +0300 ++++ x86_64/src/cmake/FindQJSON.cmake 2014-12-14 00:42:52.264382600 +0300 +@@ -11,7 +11,7 @@ + # Already in cache + set (QJSON_FOUND TRUE) + else () +- if (NOT WIN32) ++ if (NOT WIN32 OR MINGW) + find_library (QJSON_LIBRARIES + NAMES + qjson +@@ -19,6 +19,7 @@ + ${QJSON_DIR} + ${LIB_INSTALL_DIR} + ${KDE4_LIB_DIR} ++ ${MINGW_PREFIX} + ) + else () + if (NOT DEFINED QJSON_DIR) diff --git a/mingw-w64-leechcraft-git/find_qwt_cmake_common.patch b/mingw-w64-leechcraft-git/find_qwt_cmake_common.patch new file mode 100644 index 0000000000..3765ccaef0 --- /dev/null +++ b/mingw-w64-leechcraft-git/find_qwt_cmake_common.patch @@ -0,0 +1,26 @@ +--- x86_64/src/cmake/FindQwt.cmake.orig 2014-12-13 16:52:50.274321100 +0300 ++++ x86_64/src/cmake/FindQwt.cmake 2014-12-13 17:08:22.775657100 +0300 +@@ -13,6 +13,7 @@ + /usr/include/qwt6 + /usr/include/qwt + /usr/local/lib/qwt.framework/Headers ++ ${MINGW_PREFIX}/include/qwt + ) + + if (NOT USE_QT5) +@@ -22,6 +23,7 @@ + /usr/local/lib + /usr/lib + /usr/local/lib/qwt.framework ++ ${MINGW_PREFIX}/lib + ) + else () + find_library (QWT_LIBRARIES +@@ -30,6 +32,7 @@ + /usr/local/lib + /usr/lib + /usr/local/lib/qwt.framework ++ ${MINGW_PREFIX}/lib + ) + endif () + diff --git a/mingw-w64-leechcraft-git/find_rbtorrent_cmake.patch b/mingw-w64-leechcraft-git/find_rbtorrent_cmake.patch new file mode 100644 index 0000000000..dd41bf954a --- /dev/null +++ b/mingw-w64-leechcraft-git/find_rbtorrent_cmake.patch @@ -0,0 +1,32 @@ +--- x86_64/src/plugins/bittorrent/cmake/FindRBTorrent.cmake.orig 2014-12-13 17:11:13.669431700 +0300 ++++ x86_64/src/plugins/bittorrent/cmake/FindRBTorrent.cmake 2014-12-13 17:29:02.581569900 +0300 +@@ -15,7 +15,7 @@ + message(FATAL_ERROR "We currently support only MSVC 2010 version") + endif () + endif () +- if (NOT DEFINED RBTorrent_DIR) ++ if (NOT DEFINED RBTorrent_DIR AND NOT MINGW) + if (RBTorrent_FIND_REQUIRED) + message(FATAL_ERROR "Please set RBTorrent_DIR variable") + else () +@@ -28,6 +28,7 @@ + NAMES + libtorrent/torrent.hpp + PATHS ++ ${MINGW_PREFIX}/include + ${RBTorrent_DIR}/include + ENV PATH + ) +@@ -46,7 +47,11 @@ + win32_tune_libs_names (RBTorrent) + set (RBTorrent_LIBRARY ${RBTorrent_LIBRARIES}) + else () +- find_library (RBTorrent_LIBRARY NAMES libtorrent.dll.a PATHS ${RBTorrent_DIR}/lib) ++ find_library (RBTorrent_LIBRARY ++ NAMES libtorrent.dll.a libtorrent-rasterbar.dll.a ++ PATHS ++ ${MINGW_PREFIX}/lib ++ ${RBTorrent_DIR}/lib) + endif () + else () + find_library (RBTorrent_LIBRARY NAMES torrent-rasterbar PATH ENV) diff --git a/mingw-w64-leechcraft-git/htthare_cmake.patch b/mingw-w64-leechcraft-git/htthare_cmake.patch new file mode 100644 index 0000000000..6d36ba8e74 --- /dev/null +++ b/mingw-w64-leechcraft-git/htthare_cmake.patch @@ -0,0 +1,11 @@ +--- src/plugins/htthare/CMakeLists.txt.orig 2014-07-20 13:29:40.973786900 +0300 ++++ src/plugins/htthare/CMakeLists.txt 2014-07-20 13:30:28.943530600 +0300 +@@ -32,6 +32,8 @@ + ${QT_LIBRARIES} + ${Boost_SYSTEM_LIBRARY} + ${LEECHCRAFT_LIBRARIES} ++ ws2_32 ++ mswsock + ) + install (TARGETS leechcraft_htthare DESTINATION ${LC_PLUGINS_DEST}) + install (FILES httharesettings.xml DESTINATION ${LC_SETTINGS_DEST}) diff --git a/mingw-w64-leechcraft-git/lmp_gst_paths.patch b/mingw-w64-leechcraft-git/lmp_gst_paths.patch new file mode 100644 index 0000000000..d5eecbe970 --- /dev/null +++ b/mingw-w64-leechcraft-git/lmp_gst_paths.patch @@ -0,0 +1,24 @@ +--- src/plugins/lmp/lmp.cpp.orig 2014-07-12 17:41:32.553911000 +0300 ++++ src/plugins/lmp/lmp.cpp 2014-07-12 17:43:32.342762500 +0300 +@@ -83,6 +83,21 @@ + + qputenv ("GST_REGISTRY_FORK", "no"); + } ++#elif defined (Q_OS_WIN) ++ auto updateEnv = [] (const char *name, const QByteArray& relpath) ++ { ++ if (qgetenv (name).isEmpty ()) ++ qputenv (name, ++ QDir::toNativeSeparators (QCoreApplication::applicationDirPath () + relpath).toUtf8()); ++ }; ++ updateEnv ("GST_PLUGIN_SYSTEM_PATH", "/gstreamer-1.0"); ++ updateEnv ("GST_PLUGIN_SCANNER", "gst-plugin-scanner"); ++ updateEnv ("GTK_PATH", "/gstreamer-1.0"); ++ updateEnv ("GIO_EXTRA_MODULES", "/gio-modules"); ++ updateEnv ("GSETTINGS_SCHEMA_DIR", "/gstreamer-1.0/schemas"); ++ //updateEnv ("GST_DEBUG", "7"); ++ ++ qputenv ("GST_REGISTRY_FORK", "no"); + #endif + + gint argc = 1; diff --git a/mingw-w64-leechcraft-git/win_rc.patch b/mingw-w64-leechcraft-git/win_rc.patch new file mode 100644 index 0000000000..bb5595cac0 --- /dev/null +++ b/mingw-w64-leechcraft-git/win_rc.patch @@ -0,0 +1,11 @@ +--- src/core/CMakeLists.txt.orig 2014-04-03 16:35:13.000000000 +0300 ++++ src/core/CMakeLists.txt 2014-07-12 02:15:43.981020500 +0300 +@@ -151,7 +151,7 @@ + + set (WIN_RESOURCES) + if (WIN32) +- set (WIN_RESOURCES ../../../tools/win32/leechcraft.rc) ++ set (WIN_RESOURCES ../../tools/win32/leechcraft.rc) + endif () + + add_executable (leechcraft WIN32 diff --git a/mingw-w64-leechcraft-git/xtazy_cmake.patch b/mingw-w64-leechcraft-git/xtazy_cmake.patch new file mode 100644 index 0000000000..a4ac1246b0 --- /dev/null +++ b/mingw-w64-leechcraft-git/xtazy_cmake.patch @@ -0,0 +1,11 @@ +--- src/plugins/xtazy/CMakeLists.txt.orig 2014-07-12 15:57:38.049317700 +0300 ++++ src/plugins/xtazy/CMakeLists.txt 2014-07-12 15:58:50.619468500 +0300 +@@ -19,7 +19,7 @@ + lcsource.cpp + ) + +-if (QT_QTDBUS_FOUND) ++if (QT_QTDBUS_FOUND AND NOT WIN32) + add_definitions (-DHAVE_DBUS) + + set (SRCS diff --git a/mingw-w64-lensfun/PKGBUILD b/mingw-w64-lensfun/PKGBUILD index 2c437a827f..7c8498964d 100644 --- a/mingw-w64-lensfun/PKGBUILD +++ b/mingw-w64-lensfun/PKGBUILD @@ -1,53 +1,46 @@ # Maintainer: Alexey Pavlov _realname=lensfun - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.2.8 +pkgver=0.3.1 pkgrel=2 pkgdesc="Database of photographic lenses and a library that allows advanced access to the database (mingw-w64)" arch=('any') -url="http://lensfun.berlios.de/" +url="http://lensfun.sourceforge.net" license=("LGPL3") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2") depends=("${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libgnurx" - "${MINGW_PACKAGE_PREFIX}-zlib" - ) + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libsystre" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') -source=("http://download.berlios.de/${_realname}/${_realname}-${pkgver}.tar.bz2" - lensfun-0.2.8-make-4.0.patch - cmake-mingw.patch) -md5sums=('db2988505e7432c6b331aa597789c639' - '9464d933a5e4ccefed7fc38656a9ec18' - 'a048b433caf35cce363c631fd6ad559b') +source=(http://sourceforge.net/projects/lensfun/files/${pkgver}/${_realname}-${pkgver}.tar.gz + cmake-mingw.patch) +md5sums=('7f577385f98b260ea5384b99c6eb03aa' + '44c20404014c73b33e92d89d61d6afdf') prepare(){ - cd "$srcdir/${_realname}-$pkgver" - sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' configure - # fix configure script for make 4.0 - patch -Np0 -i "${srcdir}/lensfun-0.2.8-make-4.0.patch" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i "${srcdir}/cmake-mingw.patch" } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} [[ $CARCH == x86_64 ]] && ENABLESSE2="-DBUILD_FOR_SSE2=ON" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_STATIC=OFF \ -DBUILD_AUXFUN=ON \ -DBUILD_TESTS=OFF \ -DBUILD_FOR_SSE=ON \ + -DBUILD_DOC=OFF \ $ENABLESSE2 \ ../${_realname}-${pkgver} @@ -55,12 +48,6 @@ build() { } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - sed -i "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/lensfun.pc + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-lensfun/cmake-mingw.patch b/mingw-w64-lensfun/cmake-mingw.patch index b233bcaf8c..4d3b25c356 100644 --- a/mingw-w64-lensfun/cmake-mingw.patch +++ b/mingw-w64-lensfun/cmake-mingw.patch @@ -9,6 +9,15 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libs/getopt) # base path for searching for glib on windows IF(NOT GLIB2_BASE_DIR) +@@ -74,7 +74,7 @@ + FIND_PACKAGE(GLIB2 REQUIRED) + INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) + # install glib dll on windows next to lensfun.dll +-IF (GLIB2_DLL) ++IF (GLIB2_DLL AND NOT MINGW) + INSTALL(FILES ${GLIB2_DLL} DESTINATION ${BINDIR}) + ENDIF() + @@ -82,7 +82,7 @@ SET(DOCDIR share/doc/lensfun-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUGFIX} CACHE PATH "Directory to put library documentation in") ENDIF(BUILD_DOC) @@ -24,9 +33,9 @@ -IF(WIN32 AND NOT BUILD_STATIC) +IF(WIN32 AND NOT BUILD_STATIC AND NOT MINGW) - FIND_FILE(GLIB2_DLL - NAMES glib-2.dll glib-2-vs9.dll - PATHS "${GLIB2_BASE_DIR}/bin" + FIND_FILE(GLIB2_DLL + NAMES glib-2.dll glib-2-vs9.dll + PATHS "${GLIB2_BASE_DIR}/bin" --- lensfun-0.2.8/libs/lensfun/CMakeLists.txt.orig 2014-01-17 00:56:47.952600000 +0400 +++ lensfun-0.2.8/libs/lensfun/CMakeLists.txt 2014-01-17 00:56:59.746200000 +0400 @@ -19,6 +19,8 @@ diff --git a/mingw-w64-lensfun/lensfun-0.2.8-make-4.0.patch b/mingw-w64-lensfun/lensfun-0.2.8-make-4.0.patch deleted file mode 100644 index c7694457d7..0000000000 --- a/mingw-w64-lensfun/lensfun-0.2.8-make-4.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old 2013-12-06 16:55:09.098654166 +0100 -+++ configure 2013-12-06 16:55:20.298676545 +0100 -@@ -45,7 +45,7 @@ - } - - # Check for tools --tibs.check_program ("GNU Make", "make --version", ".*?([0-9\.]+).*", "3.81", True) -+tibs.check_program ("GNU Make", "make --version", ".*?([0-9\.]+).*", "4.0", True) - if tibs.check_program ("makedep", "makedep -V", ".*Version.*?([0-9\.]+).*", "0.1.0"): - tibs.add_config_mak ("MAKEDEP", "makedep") - makedep = "yes" diff --git a/mingw-w64-leptonica/PKGBUILD b/mingw-w64-leptonica/PKGBUILD index ae2f5f682e..7dc9e679d1 100644 --- a/mingw-w64-leptonica/PKGBUILD +++ b/mingw-w64-leptonica/PKGBUILD @@ -2,38 +2,38 @@ _realname=leptonica pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.71 -pkgrel=1 +pkgver=1.72 +pkgrel=2 pkgdesc="Leptonica library (mingw-w64)" arch=('any') url="http://www.leptonica.org" license=("Leptonica") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs - ${MINGW_PACKAGE_PREFIX}-openjpeg2 - ${MINGW_PACKAGE_PREFIX}-libtiff - ${MINGW_PACKAGE_PREFIX}-libpng - ${MINGW_PACKAGE_PREFIX}-giflib - ${MINGW_PACKAGE_PREFIX}-libwebp - ${MINGW_PACKAGE_PREFIX}-zlib) + ${MINGW_PACKAGE_PREFIX}-giflib + ${MINGW_PACKAGE_PREFIX}-libtiff + ${MINGW_PACKAGE_PREFIX}-libpng + ${MINGW_PACKAGE_PREFIX}-libwebp + ${MINGW_PACKAGE_PREFIX}-openjpeg2 + ${MINGW_PACKAGE_PREFIX}-zlib) options=('!libtool' 'strip') source=("http://www.leptonica.org/source/${_realname}-${pkgver}.tar.gz") -md5sums=('790f34d682e6150c12c54bfe4a824f7f') +md5sums=('7581db29f8442197ce68e766c6047c4b') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "$srcdir/${_realname}-${pkgver}" } build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} - + make } @@ -44,5 +44,5 @@ check() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-leptonica/giflib.patch b/mingw-w64-leptonica/giflib.patch deleted file mode 100644 index fc3797db38..0000000000 --- a/mingw-w64-leptonica/giflib.patch +++ /dev/null @@ -1,110 +0,0 @@ ---- leptonica-1.70/src/gifio.c.orig 2013-11-24 01:57:40.000000000 +0400 -+++ leptonica-1.70/src/gifio.c 2014-05-28 08:25:21.995400000 +0400 -@@ -121,12 +121,12 @@ - - /* Read all the data, but use only the first image found */ - if (DGifSlurp(gif) != GIF_OK) { -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - return (PIX *)ERROR_PTR("failed to read GIF data", procName, NULL); - } - - if (gif->SavedImages == NULL) { -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - return (PIX *)ERROR_PTR("no images found in GIF", procName, NULL); - } - -@@ -134,12 +134,12 @@ - w = si.ImageDesc.Width; - h = si.ImageDesc.Height; - if (w <= 0 || h <= 0) { -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - return (PIX *)ERROR_PTR("invalid image dimensions", procName, NULL); - } - - if (si.RasterBits == NULL) { -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - return (PIX *)ERROR_PTR("no raster data in GIF", procName, NULL); - } - -@@ -151,7 +151,7 @@ - gif_cmap = gif->SColorMap; - } else { - /* don't know where to take cmap from */ -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - return (PIX *)ERROR_PTR("color map is missing", procName, NULL); - } - -@@ -175,7 +175,7 @@ - } - - if ((pixd = pixCreate(w, h, d)) == NULL) { -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - pixcmapDestroy(&cmap); - return (PIX *)ERROR_PTR("failed to allocate pixd", procName, NULL); - } -@@ -207,7 +207,7 @@ - pixTransferAllData(pixd, &pixdi, 0, 0); - } - -- DGifCloseFile(gif); -+ DGifCloseFile(gif, NULL); - return pixd; - } - -@@ -356,14 +356,14 @@ - != GIF_OK) { - pixDestroy(&pixd); - GifFreeMapObject(gif_cmap); -- EGifCloseFile(gif); -+ EGifCloseFile(gif, NULL); - return ERROR_INT("failed to write screen description", procName, 1); - } - GifFreeMapObject(gif_cmap); /* not needed after this point */ - - if (EGifPutImageDesc(gif, 0, 0, w, h, FALSE, NULL) != GIF_OK) { - pixDestroy(&pixd); -- EGifCloseFile(gif); -+ EGifCloseFile(gif, NULL); - return ERROR_INT("failed to image screen description", procName, 1); - } - -@@ -371,13 +371,13 @@ - wpl = pixGetWpl(pixd); - if (d != 1 && d != 2 && d != 4 && d != 8) { - pixDestroy(&pixd); -- EGifCloseFile(gif); -+ EGifCloseFile(gif, NULL); - return ERROR_INT("image depth is not in {1, 2, 4, 8}", procName, 1); - } - - if ((gif_line = (GifByteType *)CALLOC(sizeof(GifByteType), w)) == NULL) { - pixDestroy(&pixd); -- EGifCloseFile(gif); -+ EGifCloseFile(gif, NULL); - return ERROR_INT("mem alloc fail for data line", procName, 1); - } - -@@ -406,7 +406,7 @@ - if (EGifPutLine(gif, gif_line, w) != GIF_OK) { - FREE(gif_line); - pixDestroy(&pixd); -- EGifCloseFile(gif); -+ EGifCloseFile(gif, NULL); - return ERROR_INT("failed to write data line into GIF", procName, 1); - } - } -@@ -422,7 +422,7 @@ - - FREE(gif_line); - pixDestroy(&pixd); -- EGifCloseFile(gif); -+ EGifCloseFile(gif, NULL); - return 0; - } - diff --git a/mingw-w64-lfcbase/PKGBUILD b/mingw-w64-lfcbase/PKGBUILD new file mode 100644 index 0000000000..10bfee8fc6 --- /dev/null +++ b/mingw-w64-lfcbase/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Björn Lemke + +_realname=lfcbase +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.7.0 +pkgrel=1 +pkgdesc="LFC C++ base classes (mingw-w64)" +arch=('any') +url='http://www.lemke-it.com/' +license=('GPL3') + +source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz") + +sha256sums=("79d2b07d8d2a76b811e7ce2a80bc717c58b77e8751d97bb3c8b1d7f397b6ffd1") + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make +} + +check() { + cd "${srcdir}"/build-${CARCH} + make check +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-lfcxml/PKGBUILD b/mingw-w64-lfcxml/PKGBUILD new file mode 100644 index 0000000000..d61babbd71 --- /dev/null +++ b/mingw-w64-lfcxml/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Bjoern Lemke + +_realname=lfcxml +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.2.1 +pkgrel=1 +pkgdesc="LFC C++ xml classes (mingw-w64)" +arch=('any') +url='http://www.lemke-it.com/' +license=('GPL3') + +source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz") + +depends=("${MINGW_PACKAGE_PREFIX}-lfcbase") +validpgpkeys=('gpg_KEY') +source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz") + +sha256sums=("e71ff822639b91837a5c0100db7b1936330c73655ff5b6190b3d7e1f1bb85448") + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + make +} + +check() { + cd "${srcdir}"/build-${CARCH} + make check +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-libarchive/PKGBUILD b/mingw-w64-libarchive/PKGBUILD index fb34a8ea62..f2f070cb02 100644 --- a/mingw-w64-libarchive/PKGBUILD +++ b/mingw-w64-libarchive/PKGBUILD @@ -1,34 +1,34 @@ # Maintainer: Alexey Pavlov _realname=libarchive - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.1.2 -pkgrel=3 +pkgrel=7 pkgdesc="library that can create and read several streaming archive formats (mingw-w64)" arch=('any') -url="http://libarchive.googlecode.com" +url="http://www.libarchive.org" license=("BSD") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libgnurx" "${MINGW_PACKAGE_PREFIX}-pkg-config") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs - ${MINGW_PACKAGE_PREFIX}-bzip2 - ${MINGW_PACKAGE_PREFIX}-expat - ${MINGW_PACKAGE_PREFIX}-lzo2 - ${MINGW_PACKAGE_PREFIX}-nettle - ${MINGW_PACKAGE_PREFIX}-openssl - ${MINGW_PACKAGE_PREFIX}-libiconv - ${MINGW_PACKAGE_PREFIX}-xz - ${MINGW_PACKAGE_PREFIX}-zlib) + ${MINGW_PACKAGE_PREFIX}-bzip2 + ${MINGW_PACKAGE_PREFIX}-expat + ${MINGW_PACKAGE_PREFIX}-libiconv + ${MINGW_PACKAGE_PREFIX}-lzo2 + ${MINGW_PACKAGE_PREFIX}-libsystre + ${MINGW_PACKAGE_PREFIX}-nettle + ${MINGW_PACKAGE_PREFIX}-openssl + ${MINGW_PACKAGE_PREFIX}-xz + ${MINGW_PACKAGE_PREFIX}-zlib) options=('!libtool' 'strip') -source=("http://libarchive.org/downloads/libarchive-$pkgver.tar.gz" - "0001-mtree-fix-line-filename-length-calculation.patch" - 'libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch') +source=("http://libarchive.org/downloads/${_realname}-${pkgver}.tar.gz" + "0001-mtree-fix-line-filename-length-calculation.patch" + 'libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch') md5sums=('efad5a503f66329bb9d2f4308b5de98a' '9727baf88b928417d5d1269891b1209a' '6954a585c309dc548d1f2b05f2f3cfcb') prepare() { - cd "$srcdir/libarchive-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -Np1 -i "$srcdir/0001-mtree-fix-line-filename-length-calculation.patch" patch -Np1 -i "$srcdir/libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch" } @@ -37,19 +37,18 @@ build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ - --with-expat \ - --without-xml2 - + --with-expat \ + --without-xml2 + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - #rm -r "${pkgdir}${MINGW_PREFIX}/share" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libart_lgpl/0001-Fix-an-installation-path-bug.patch b/mingw-w64-libart_lgpl/0001-Fix-an-installation-path-bug.patch new file mode 100644 index 0000000000..8c08a6bb39 --- /dev/null +++ b/mingw-w64-libart_lgpl/0001-Fix-an-installation-path-bug.patch @@ -0,0 +1,26 @@ +From 6d7c1a8ba616351711829f26b36ff18f5e18ee10 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Fri, 3 Apr 2015 20:45:14 +0800 +Subject: [PATCH] Fix an installation path bug + +Signed-off-by: Junjie Mao +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index f60343d..4501dd8 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -919,7 +919,7 @@ art_config.h: gen_art_config$(EXEEXT) + ./gen_art_config > art_config.h + + @OS_WIN32_TRUE@install-libtool-import-lib: +-@OS_WIN32_TRUE@ $(INSTALL) .libs/libart_lgpl_2.dll.a $(DESTDIR)$(libdir) ++@OS_WIN32_TRUE@ $(INSTALL) -D .libs/libart_lgpl_2.dll.a $(DESTDIR)$(libdir)/libart_lgpl_2.dll.a + @OS_WIN32_TRUE@uninstall-libtool-import-lib: + @OS_WIN32_TRUE@ -rm $(DESTDIR)$(libdir)/libart_lgpl_2.dll.a + @OS_WIN32_FALSE@install-libtool-import-lib: +-- +2.3.4 + diff --git a/mingw-w64-libart_lgpl/PKGBUILD b/mingw-w64-libart_lgpl/PKGBUILD new file mode 100644 index 0000000000..14280d2c11 --- /dev/null +++ b/mingw-w64-libart_lgpl/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Junjie Mao + +_realname=libart_lgpl +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.3.21 +pkgrel=1 +pkgdesc="Library for high-performance 2D graphics (mingw-w64)" +depends=() +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +arch=('any') +url='http://www.levien.com/libart' +license=('custom') +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.bz2" + "0001-Fix-an-installation-path-bug.patch") +sha1sums=('dbac185c65696381ef188de1f98b348b530e22f9' + '1079fcc8b813ce55b445278493fb831a91e347e6') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-Fix-an-installation-path-bug.patch +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --exec-prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared + + cp ../${_realname}-${pkgver}/libart.def libart.def + make +} + +check() { + # The package ships with some test tools but provides no automatic check mechanisms + plain "skip" +} + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" + + cd "${srcdir}"/${_realname}-${pkgver} + [[ -f COPYING ]] && install -Dm644 COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + [[ -f AUTHORS ]] && install -Dm644 AUTHORS ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/AUTHORS + [[ -f NEWS ]] && install -Dm644 NEWS ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/NEWS +} diff --git a/mingw-w64-libass/PKGBUILD b/mingw-w64-libass/PKGBUILD index ba2f7559dc..09145577e9 100644 --- a/mingw-w64-libass/PKGBUILD +++ b/mingw-w64-libass/PKGBUILD @@ -1,9 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libass - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.12.0 +pkgver=0.13.1 pkgrel=1 pkgdesc="A portable library for SSA/ASS subtitles rendering (mingw-w64)" arch=('any') @@ -13,20 +13,15 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-yasm" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-fribidi" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-harfbuzz" - "${MINGW_PACKAGE_PREFIX}-enca") + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-harfbuzz") options=('strip' 'staticlibs') -source=(https://github.com/libass/${_realname}/archive/${pkgver}.tar.gz) -md5sums=('80917075df8dda2779e83e092c81ed16') - -prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - ./autogen.sh -} +source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz) +md5sums=('43b5f379e70b3aef15b2435e21e5b73c') build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -35,9 +30,9 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ + --enable-static \ --enable-harfbuzz \ --enable-fontconfig \ - --enable-enca \ --enable-asm make } diff --git a/mingw-w64-libassuan/0003-remove-redef.mingw.patch b/mingw-w64-libassuan/0003-remove-redef.mingw.patch deleted file mode 100644 index d46c5ddee7..0000000000 --- a/mingw-w64-libassuan/0003-remove-redef.mingw.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- libassuan-2.1.1/src/w32-sock-nonce.inc.h.orig 2010-12-23 11:32:06.000000000 +0000 -+++ libassuan-2.1.1/src/w32-sock-nonce.inc.h 2013-10-13 14:41:57.405204200 +0000 -@@ -37,7 +37,9 @@ - # ifndef AF_LOCAL - # define AF_LOCAL AF_UNIX - # endif --# define EADDRINUSE WSAEADDRINUSE -+# ifndef EADDRINUSE -+# define EADDRINUSE WSAEADDRINUSE -+# endif - struct sockaddr_un - { - short sun_family; diff --git a/mingw-w64-libassuan/PKGBUILD b/mingw-w64-libassuan/PKGBUILD index 70a5805366..d9b01e2235 100644 --- a/mingw-w64-libassuan/PKGBUILD +++ b/mingw-w64-libassuan/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libassuan +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.1.3 +pkgver=2.3.0 pkgrel=1 pkgdesc="A IPC library used by some GnuPG related software (mingw-w64)" arch=('any') @@ -11,18 +12,16 @@ url="http://www.gnupg.org/related_software/libassuan" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libgpg-error") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -source=(ftp://ftp.gnupg.org/gcrypt/$_realname/$_realname-$pkgver.tar.bz2{,.sig} +source=(ftp://ftp.gnupg.org/gcrypt/${_realname}/${_realname}-${pkgver}.tar.bz2{,.sig} 0001-fix-def-files.mingw.patch 0002-enable-silent-rules.mingw.patch - 0003-remove-redef.mingw.patch 0004-enable-gnu.mingw.patch 0005-better-check-for-stpcpy.mingw.patch) -sha1sums=('56ac91973c2818a91d4f16ed48265a2b5daf45d3' +sha1sums=('23f7ea010983b869f765c36d169dec51c8296cff' 'SKIP' '9e1e65633f643a853283caf21adb9b8f9001c38b' 'a380ea3781f95a3fd30e8d6b469d870f85f0ea29' - '3a8f898b6adfe5c820d5ed0f90cae1522d5f5c72' 'b329ac86f3c908a2753ccd896a0c78de7c8eef7a' '5a76f6d350b887c88eb49afec21490fe6103e4ac') @@ -30,18 +29,19 @@ prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-fix-def-files.mingw.patch patch -p1 -i ${srcdir}/0002-enable-silent-rules.mingw.patch - patch -p1 -i ${srcdir}/0003-remove-redef.mingw.patch patch -p1 -i ${srcdir}/0004-enable-gnu.mingw.patch patch -p1 -i ${srcdir}/0005-better-check-for-stpcpy.mingw.patch - + autoreconf -fi } build() { - if [ $MINGW_CHOST = "x86_64-w64-mingw32" ]; then + if [ ${MINGW_CHOST} = "x86_64-w64-mingw32" ]; then CFLAGS+=" -DHAVE_DOSISH_SYSTEM=1" fi - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -49,15 +49,16 @@ build() { --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } check() { - cd ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${MINGW_CHOST} #make check } package() { - cd ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libatomic_ops/PKGBUILD b/mingw-w64-libatomic_ops/PKGBUILD index 39c4fccfb7..af1671aa3f 100644 --- a/mingw-w64-libatomic_ops/PKGBUILD +++ b/mingw-w64-libatomic_ops/PKGBUILD @@ -1,11 +1,10 @@ # Maintainer: Alexey Pavlov _realname=libatomic_ops - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=7.4.2 -pkgrel=1 -pkgdesc="Provides semi-portable access to hardware provided atomic memory operations" +pkgrel=2 +pkgdesc="Provides semi-portable access to hardware provided atomic memory operations (mingw-w64)" arch=('any') url="https://github.com/ivmai/libatomic_ops" license=('GPL2' 'MIT') @@ -39,5 +38,5 @@ check() { package() { cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install - install -D -m644 ${srcdir}/${_realname}-${_realname}-${pkgver//./_}/doc/LICENSING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/LICENSE" + install -D -m644 ${srcdir}/${_realname}-${_realname}-${pkgver//./_}/doc/LICENSING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-libblueray/PKGBUILD b/mingw-w64-libblueray/PKGBUILD index c059666884..238278e570 100644 --- a/mingw-w64-libblueray/PKGBUILD +++ b/mingw-w64-libblueray/PKGBUILD @@ -1,43 +1,48 @@ # Maintainer: Alexey Pavlov _realname=libbluray +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.6.2 +pkgver=0.9.0 pkgrel=1 -pkgdesc='Library to access Blu-Ray disks for video playback (mingw-w64)' +pkgdesc="Library to access Blu-Ray disks for video playback (mingw-w64)" arch=('any') url='http://www.videolan.org/developers/libbluray.html' license=('LGPL2.1') depends=("${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-freetype") options=('strip' 'staticlibs') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -source=(ftp://ftp.videolan.org/pub/videolan/libbluray/$pkgver/${_realname}-$pkgver.tar.bz2 +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=(ftp://ftp.videolan.org/pub/videolan/libbluray/${pkgver}/${_realname}-${pkgver}.tar.bz2 no-undefined.patch) -md5sums=('f4d2f2cab53f976cbb22cbae069057bd' - 'ee52bd46e6b5db5969c31397cf26776f') +md5sums=('a4e8077b9fd82349c767cef2ba9bd750' + 'abefd822b6db0a042640e9a6dda06254') prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/no-undefined.patch - + autoreconf -fiv } build() { - mkdir -p ${srcdir}/build-${MINGW_CHOST} - cd ${srcdir}/build-${MINGW_CHOST} + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" export lt_cv_deplibs_check_method='pass_all' - - ../${_realname}-$pkgver/configure \ + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --disable-examples + --enable-examples \ + --disable-bdjava + make } package() { cd ${srcdir}/build-${MINGW_CHOST} - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libblueray/no-undefined.patch b/mingw-w64-libblueray/no-undefined.patch index 249165accd..77370339b5 100644 --- a/mingw-w64-libblueray/no-undefined.patch +++ b/mingw-w64-libblueray/no-undefined.patch @@ -1,23 +1,12 @@ -diff -ru libbluray-0.4.0/src/Makefile.am patched/src/Makefile.am ---- libbluray-0.4.0/src/Makefile.am 2013-09-17 10:05:56.000000000 +0200 -+++ patched/src/Makefile.am 2013-11-02 14:35:10.123235113 +0100 -@@ -109,7 +109,10 @@ +diff -ru libbluray-0.8.0/Makefile.am.orig libbluray-0.8.0/Makefile.am +--- libbluray-0.8.0/Makefile.am.orig 2013-09-17 10:05:56.000000000 +0200 ++++ libbluray-0.8.0/Makefile.am 2013-11-02 14:35:10.123235113 +0100 +@@ -149,7 +149,7 @@ + endif endif +-libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO) -export-symbols-regex "^bd_" ++libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO) -export-symbols-regex "^bd_" + libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS) --libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO) -+libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO) -+#if HAVE_WIN32 -+#libbluray_la_LDFLAGS+=-no-undefined -+#endif - libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) - - pkginclude_HEADERS = \ -@@ -149,6 +152,7 @@ - libbluray/bdj/native/register_native.c - - AM_CFLAGS += $(BDJAVA_CFLAGS) -+libbluray_la_LDFLAGS= -no-undefined - - all-local: - ant -f $(top_srcdir)/src/libbluray/bdj/build.xml \ + noinst_HEADERS = \ diff --git a/mingw-w64-libbotan/PKGBUILD b/mingw-w64-libbotan/PKGBUILD new file mode 100644 index 0000000000..17841f6b50 --- /dev/null +++ b/mingw-w64-libbotan/PKGBUILD @@ -0,0 +1,81 @@ +# Maintainer: Nazar Mishturak + +_realname=libbotan +pkgbase="mingw-w64-${_realname}" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.11.25 +pkgrel=1 +arch=('any') +url='http://botan.randombit.net/' +pkgdesc='Botan is a C++ cryptography library released under the permissive Simplified BSD license. (mingw-w64)' +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-bzip2" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-xz") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx" + "${MINGW_PACKAGE_PREFIX}-doxygen") +license=('BSD') +options=('strip' 'staticlibs' 'docs') +source=(http://botan.randombit.net/releases/Botan-${pkgver}.tgz{,.asc} + 'boost-link.patch' + 'winsock-link.patch' + 'disable-mkgmtime.patch') +sha1sums=('4eddd22c5a8d0846dc7c84c991d0ae0334d52562' + 'SKIP' + '407e623b46ef1b288b90195d9acadb34611b088b' + '867667533df37c6b88b267c0e95b979d8115dea7' + '57289f42ad28111d5a5a05eab58ac5887d7e1f84') +validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC') + +prepare() { + cd "${srcdir}/Botan-${pkgver}" + patch -p1 -i "${srcdir}/boost-link.patch" + patch -p1 -i "${srcdir}/winsock-link.patch" + patch -p1 -i "${srcdir}/disable-mkgmtime.patch" +} + +build() { + rm -rf build-${MINGW_CHOST} + cp -rf Botan-${pkgver} build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + sed -i "s|/mingw|${MINGW_PREFIX}|g" src/build-data/os/mingw.txt + + local BUILD_TYPE_FLAGS='' + if check_option 'debug' 'y'; then + BUILD_TYPE_FLAGS='--with-debug-info' + fi + + # Set prefix to mingw{32,64} not full path. Remove starting slash + ${MINGW_PREFIX}/bin/python3 configure.py \ + --disable-shared \ + --os=mingw \ + --cc=gcc \ + --cpu=${CARCH} \ + --destdir='$(DESTDIR)' \ + ${BUILD_TYPE_FLAGS} \ + --makefile-style=gmake \ + --link-method=copy \ + --with-doxygen \ + --with-boost \ + --with-bzip2 \ + --with-lzma \ + --with-sqlite3 \ + --with-zlib + + make +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + ./botan-test +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}${MINGW_PREFIX}" install +} diff --git a/mingw-w64-libbotan/boost-link.patch b/mingw-w64-libbotan/boost-link.patch new file mode 100644 index 0000000000..522e14d0d9 --- /dev/null +++ b/mingw-w64-libbotan/boost-link.patch @@ -0,0 +1,11 @@ +--- Botan-1.11.21/src/lib/utils/boost/info.txt.orig 2015-10-12 08:53:49.742291300 +0300 ++++ Botan-1.11.21/src/lib/utils/boost/info.txt 2015-10-12 08:53:54.340367300 +0300 +@@ -5,7 +5,7 @@ + load_on vendor + + +-all -> boost_system,boost_filesystem ++all -> boost_system-mt,boost_filesystem-mt + + + diff --git a/mingw-w64-libbotan/disable-mkgmtime.patch b/mingw-w64-libbotan/disable-mkgmtime.patch new file mode 100644 index 0000000000..c6e901993c --- /dev/null +++ b/mingw-w64-libbotan/disable-mkgmtime.patch @@ -0,0 +1,34 @@ +--- Botan-1.11.21/src/lib/utils/calendar.cpp.orig 2015-10-11 14:31:25.000000000 +0300 ++++ Botan-1.11.21/src/lib/utils/calendar.cpp 2015-10-12 19:59:06.522921000 +0300 +@@ -39,8 +39,6 @@ + return tm; + } + +-#if !defined(BOTAN_TARGET_OS_HAS_TIMEGM) && !defined(BOTAN_TARGET_OS_HAS_MKGMTIME) +- + #if defined(BOTAN_HAS_BOOST_DATETIME) + + std::time_t boost_timegm(std::tm *tm) +@@ -109,8 +107,6 @@ + } + #endif // BOTAN_HAS_BOOST_DATETIME + +-#endif +- + } + + std::chrono::system_clock::time_point calendar_point::to_std_timepoint() +@@ -136,12 +132,7 @@ + tm.tm_year = year - 1900; + + // Define a function alias `botan_timegm` +- #if defined(BOTAN_TARGET_OS_HAS_TIMEGM) +- std::time_t (&botan_timegm)(std::tm *tm) = timegm; +- #elif defined(BOTAN_TARGET_OS_HAS_MKGMTIME) +- // http://stackoverflow.com/questions/16647819/timegm-cross-platform +- std::time_t (&botan_timegm)(std::tm *tm) = _mkgmtime; +- #elif defined(BOTAN_HAS_BOOST_DATETIME) ++ #if defined(BOTAN_HAS_BOOST_DATETIME) + std::time_t (&botan_timegm)(std::tm *tm) = boost_timegm; + #else + std::time_t (&botan_timegm)(std::tm *tm) = fallback_timegm; diff --git a/mingw-w64-libbotan/winsock-link.patch b/mingw-w64-libbotan/winsock-link.patch new file mode 100644 index 0000000000..d7a18c9c23 --- /dev/null +++ b/mingw-w64-libbotan/winsock-link.patch @@ -0,0 +1,9 @@ +--- Botan-1.11.21/src/lib/entropy/cryptoapi_rng/info.txt.orig 2015-10-12 09:13:49.188061800 +0300 ++++ Botan-1.11.21/src/lib/entropy/cryptoapi_rng/info.txt 2015-10-12 09:14:09.519021200 +0300 +@@ -18,5 +18,5 @@ + + + windows -> advapi32.lib +-mingw -> advapi32 ++mingw -> advapi32,ws2_32,mswsock + diff --git a/mingw-w64-libc++/PKGBUILD b/mingw-w64-libc++/PKGBUILD index 9c23d12768..ebf5bb18b2 100644 --- a/mingw-w64-libc++/PKGBUILD +++ b/mingw-w64-libc++/PKGBUILD @@ -26,7 +26,7 @@ prepare() { build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + export CXX="${MINGW_PREFIX}/bin/clang++" export CC="${MINGW_PREFIX}/bin/clang" ${MINGW_PREFIX}/bin/cmake.exe \ diff --git a/mingw-w64-libc++abi/PKGBUILD b/mingw-w64-libc++abi/PKGBUILD index bd62fe532b..2c3e51b308 100644 --- a/mingw-w64-libc++abi/PKGBUILD +++ b/mingw-w64-libc++abi/PKGBUILD @@ -26,7 +26,7 @@ prepare() { build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + export CXX="${MINGW_PREFIX}/bin/clang++" export CC="${MINGW_PREFIX}/bin/clang" ${MINGW_PREFIX}/bin/cmake.exe \ diff --git a/mingw-w64-libcaca/PKGBUILD b/mingw-w64-libcaca/PKGBUILD index 0acb3ef0ec..09781114d9 100644 --- a/mingw-w64-libcaca/PKGBUILD +++ b/mingw-w64-libcaca/PKGBUILD @@ -1,24 +1,22 @@ # Maintainer: Alexey Pavlov _realname=libcaca - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.99.beta19 -pkgrel=1 +pkgrel=2 pkgdesc="Color AsCii Art library (mingw-w64)" arch=('any') url="http://caca.zoy.org/wiki/libcaca" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - #"${MINGW_PACKAGE_PREFIX}-ncurses" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-ruby" - ) -depends=("${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + #"${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-ruby") +depends=("${MINGW_PACKAGE_PREFIX}-cppunit" "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-cppunit") + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-zlib") options=(!libtool strip staticlibs) source=(http://libcaca.zoy.org/files/libcaca/${_realname}-${pkgver}.tar.gz 0001-win32-is-not-msvc-it-could-be.mingw.patch @@ -40,27 +38,26 @@ prepare() { patch -p1 -i ${srcdir}/0004-msc-only-please.all.patch patch -p1 -i ${srcdir}/0005-ruby-paths.mingw.patch patch -p1 -i ${srcdir}/0006-no-undefined.all.patch - + autoreconf -fi } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ --enable-shared \ --disable-ncurses + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-libcddb/PKGBUILD b/mingw-w64-libcddb/PKGBUILD index 5f7efa24c0..373e64125b 100644 --- a/mingw-w64-libcddb/PKGBUILD +++ b/mingw-w64-libcddb/PKGBUILD @@ -4,15 +4,15 @@ _realname=libcddb pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.2 -pkgrel=1 +pkgrel=3 pkgdesc="Library that implements the different protocols (CDDBP, HTTP, SMTP) to access data on a CDDB server (e.g. http://freedb.org)." arch=('any') license=('LGPL') url="http://sourceforge.net/projects/libcddb/" options=('staticlibs' 'strip') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-libsystre") source=(http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-${pkgver}.tar.bz2 0001-include-winsock2-before-windows.mingw.patch 0002-fix-header-conflict.mingw.patch @@ -39,7 +39,7 @@ prepare() { patch -p1 -i ${srcdir}/0005-fix-m4-dir.all.patch patch -p1 -i ${srcdir}/0006-update-gettext-req.mingw.patch patch -p1 -i ${srcdir}/0007-link-to-libiconv-properly.mingw.patch - + WANT_AUTOMAKE=latest autoreconf -fi } @@ -52,6 +52,7 @@ build() { --host=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } diff --git a/mingw-w64-libcdio-paranoia/PKGBUILD b/mingw-w64-libcdio-paranoia/PKGBUILD index 0ddedc0e42..b15276bc78 100644 --- a/mingw-w64-libcdio-paranoia/PKGBUILD +++ b/mingw-w64-libcdio-paranoia/PKGBUILD @@ -5,19 +5,18 @@ _realname=libcdio-paranoia pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=10.2+0.93+1 -pkgrel=1 +pkgrel=2 pkgdesc="CD paranoia libraries from libcdio (mingw-w64)" arch=('any') license=('GPL' 'LGPL') url="http://www.gnu.org/software/libcdio/" -depends=("${MINGW_PACKAGE_PREFIX}-libcdio" -"${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-libcdio") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") source=(http://ftp.gnu.org/gnu/libcdio/${_realname}-${pkgver}.tar.bz2) sha256sums=('ec1d9b1d5a28cc042f2cb33a7cc0a2b5ce5525f102bc4c15db1fac322559a493') build() { - cd "${_realname}-${pkgver}" - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ @@ -25,8 +24,10 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-cpp-progs \ - --disable-static \ + --enable-shared \ + --enable-static \ --disable-example-progs + make } diff --git a/mingw-w64-libcdio/PKGBUILD b/mingw-w64-libcdio/PKGBUILD index 5d0d2da7f9..57e7f78d00 100644 --- a/mingw-w64-libcdio/PKGBUILD +++ b/mingw-w64-libcdio/PKGBUILD @@ -4,14 +4,14 @@ _realname=libcdio pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.93 -pkgrel=1 +pkgrel=2 pkgdesc="GNU Compact Disc Input and Control Library" arch=('any') license=('GPL3') url="http://www.gnu.org/software/libcdio/" options=('staticlibs' 'strip') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config") + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-libcddb") source=(http://ftp.gnu.org/gnu/libcdio/${_realname}-${pkgver}.tar.gz{,.sig} @@ -23,13 +23,15 @@ md5sums=('d154476feaac5a7b5f180e83eaf3d689' prepare() { cd ${_realname}-${pkgver} patch -Np1 -i "${srcdir}/libcdio-0.83-linking.patch" - + autoreconf -fi } build() { - cd ${_realname}-${pkgver} - ./configure \ + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -37,13 +39,14 @@ build() { --enable-cpp-progs \ --enable-shared \ --enable-static + make } package() { - cd ${_realname}-${pkgver} + cd build-${MINGW_CHOST} make -j1 DESTDIR="${pkgdir}" install - + sed -i "/LIBCDIO_SOURCE_PATH/s|.*|/* #undef LIBCDIO_SOURCE_PATH */|" \ ${pkgdir}${MINGW_PREFIX}/include/cdio/cdio_config.h } diff --git a/mingw-w64-libcdr/PKGBUILD b/mingw-w64-libcdr/PKGBUILD new file mode 100644 index 0000000000..2a6bdf694a --- /dev/null +++ b/mingw-w64-libcdr/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Alexey Pavlov + +_realname=libcdr +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.1.2 +pkgrel=1 +pkgdesc="CorelDraw file format importer library for LibreOffice (mingw-w64)" +arch=('any') +license=('GPL2' 'LGPL2.1' 'MPL') +url="https://wiki.documentfoundation.org/DLP/Libraries/libcdr" +options=('staticlibs' 'strip') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-doxygen") +depends=("${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-librevenge" + "${MINGW_PACKAGE_PREFIX}-libwpd") +source=(http://dev-www.libreoffice.org/src/${_realname}/${_realname}-${pkgver}.tar.xz) +md5sums=('c8f6c5e3b5769c9814e07ce5b9d07fba') + +prepare() { + cd ${_realname}-${pkgver} +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --disable-silent-rules + + make -j1 +} + +check() { + cd build-${MINGW_CHOST} + make -k check +} + +package() { + cd build-${MINGW_CHOST} + make -j1 DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libchamplain/002-give-cc-to-gir-scanner.mingw.patch b/mingw-w64-libchamplain/002-give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index 393269eea0..0000000000 --- a/mingw-w64-libchamplain/002-give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- libchamplain-0.12.9/champlain/Makefile.am.orig 2014-10-19 14:00:19.413400000 +0400 -+++ libchamplain-0.12.9/champlain/Makefile.am 2014-10-19 14:00:28.430200000 +0400 -@@ -159,6 +159,7 @@ - INTROSPECTION_GIRS = - INTROSPECTION_SCANNER_ARGS = --warn-all - INTROSPECTION_COMPILER_ARGS = -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - introspection_sources = \ - $(filter-out $(srcdir)/champlain-version.h,$(libchamplain_headers_public)) \ - $(libchamplain_sources) ---- libchamplain-0.12.9/champlain-gtk/Makefile.am.orig 2014-10-19 14:00:59.708000000 +0400 -+++ libchamplain-0.12.9/champlain-gtk/Makefile.am 2014-10-19 14:01:02.547200000 +0400 -@@ -70,6 +70,7 @@ - INTROSPECTION_GIRS = - INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(top_builddir)/champlain - INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/champlain -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - introspection_sources = $(libchamplain_gtk_@CHAMPLAIN_API_VERSION@_la_SOURCES) - diff --git a/mingw-w64-libchamplain/PKGBUILD b/mingw-w64-libchamplain/PKGBUILD index 62fad54cfb..9652ca5471 100644 --- a/mingw-w64-libchamplain/PKGBUILD +++ b/mingw-w64-libchamplain/PKGBUILD @@ -1,36 +1,34 @@ # Maintainer: Andrea Zagli _realname=libchamplain +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.12.9 +pkgver=0.12.11 pkgrel=1 arch=('any') pkgdesc="C library providing ClutterActor to display maps (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-clutter" "${MINGW_PACKAGE_PREFIX}-clutter-gtk" "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-sqlite3" "${MINGW_PACKAGE_PREFIX}-libsoup" - "${MINGW_PACKAGE_PREFIX}-memphis") + "${MINGW_PACKAGE_PREFIX}-memphis" + "${MINGW_PACKAGE_PREFIX}-sqlite3") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-vala" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection") + "gtk-doc") options=('strip' 'staticlibs') license=("LGPL 2.1") url="http://www.gnome.org/" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz - 001-win.patch - 002-give-cc-to-gir-scanner.mingw.patch) -sha256sums=('b25ce832334976c07bf9564bf7f31e628881c69cf871a256cf4530cb277917e3' - '6aba93f69b14ac384b65dbca00933728cbfe9c34cdd4d562037638b074a7a3e9' - '721fb1d7c51ee1c54eebea06bce43fc1a1a8ae44eaae6111dd81a61dc8fcf4a1') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('851e24888d967c10acb8fd878df1292a84b8180eb4c48fc5bfbf1a48896d4aa5' + '6aba93f69b14ac384b65dbca00933728cbfe9c34cdd4d562037638b074a7a3e9') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-win.patch - patch -p1 -i ${srcdir}/002-give-cc-to-gir-scanner.mingw.patch autoreconf -fi } @@ -39,6 +37,11 @@ build() { mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + mkdir -p docs/reference-gtk/html + cp -rf ../${_realname}-${pkgver}/docs/reference-gtk/html/* docs/reference-gtk/html + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ @@ -48,10 +51,13 @@ build() { --enable-memphis \ --enable-introspection \ --enable-vala + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libconfig/PKGBUILD b/mingw-w64-libconfig/PKGBUILD new file mode 100644 index 0000000000..70f875a47c --- /dev/null +++ b/mingw-w64-libconfig/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Martell Malone + +_realname=libconfig +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.5 +pkgrel=1 +pkgdesc="C/C++ Configuration File Library (mingw-w64)" +arch=('any') +url="http://hyperrealm.com/libconfig/libconfig.html" +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=('!libtool' '!emptydirs') +source=("http://www.hyperrealm.com/libconfig/${_realname}-${pkgver}.tar.gz") +md5sums=('a939c4990d74e6fc1ee62be05716f633') + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make lib +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}/lib" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libcroco/PKGBUILD b/mingw-w64-libcroco/PKGBUILD index 60e70ff16e..72735edb70 100644 --- a/mingw-w64-libcroco/PKGBUILD +++ b/mingw-w64-libcroco/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=libcroco - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.6.8 -pkgrel=2 +pkgver=0.6.11 +pkgrel=1 pkgdesc="A CSS parsing library (mingw-w64)" arch=('any') url="http://www.gnome.org" @@ -12,21 +12,20 @@ license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-libxml2") options=('staticlibs' 'strip') -source=("http://ftp.gnome.org/pub/gnome/sources/libcroco/${pkgver%.*}/${_realname}-$pkgver.tar.xz") -sha256sums=('ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570') +source=("http://ftp.gnome.org/pub/gnome/sources/libcroco/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +sha256sums=('132b528a948586b0dfa05d7e9e059901bca5a3be675b6071a90a90b81ae5a056') build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-$pkgver/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} - make + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-$pkgver/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + make } package() { - mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libdca-svn/0005-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch b/mingw-w64-libdca-svn/0005-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch new file mode 100644 index 0000000000..4545395bb7 --- /dev/null +++ b/mingw-w64-libdca-svn/0005-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch @@ -0,0 +1,11 @@ +diff -urN libdca.orig/configure.ac libdca/configure.ac +--- libdca.orig/configure.ac 2015-07-12 13:15:51.803347900 +0100 ++++ libdca/configure.ac 2015-07-12 13:16:11.160455100 +0100 +@@ -105,7 +105,6 @@ + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +-AC_C_ALWAYS_INLINE + AC_C_RESTRICT + AC_C_BUILTIN_EXPECT + AC_TYPE_SIZE_T diff --git a/mingw-w64-libdca-svn/PKGBUILD b/mingw-w64-libdca-svn/PKGBUILD index 4f1a05c898..d1fb764b77 100644 --- a/mingw-w64-libdca-svn/PKGBUILD +++ b/mingw-w64-libdca-svn/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=libdca - +pkgbase=mingw-w64-${_realname}-svn pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" pkgver=r91 -pkgrel=1 +pkgrel=2 pkgdesc="Free library for decoding DTS Coherent Acoustics streams (mingw-w64)" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libdts") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libdts") @@ -17,15 +17,17 @@ source=("${_realname}"::"svn://svn.videolan.org/libdca/trunk" 0001-Proper-use-of-destdir.all.patch 0002-fix-bootstrap.mingw.patch 0003-fix-symlink.mingw.patch - 0004-fix-regex.all.patch) + 0004-fix-regex.all.patch + 0005-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch) md5sums=('SKIP' '168b6a93e0ad60af0c261b8ad7cbf1c3' '74e72d3df921d187377e716b1852df42' '724beececd673be8cfcfd53356d38e5d' - '5ca23f28028357bbe5569c821360fb7b') + '5ca23f28028357bbe5569c821360fb7b' + '5864491a27a68cd394bb71d21b5fc684') pkgver() { - cd "$srcdir/${_realname}" + cd "${srcdir}/${_realname}" local ver="$(svnversion)" printf "r%s" "${ver//[[:alpha:]]}" } @@ -36,7 +38,8 @@ prepare() { patch -p1 -i ${srcdir}/0002-fix-bootstrap.mingw.patch patch -p1 -i ${srcdir}/0003-fix-symlink.mingw.patch patch -p1 -i ${srcdir}/0004-fix-regex.all.patch - + patch -p1 -i ${srcdir}/0005-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch + autoreconf -fi } @@ -50,6 +53,7 @@ build() { --enable-static \ --enable-shared \ --mandir=${MINGW_PREFIX}/share/man + make } diff --git a/mingw-w64-libdvbpsi/PKGBUILD b/mingw-w64-libdvbpsi/PKGBUILD index 9749c4c458..195769adf3 100644 --- a/mingw-w64-libdvbpsi/PKGBUILD +++ b/mingw-w64-libdvbpsi/PKGBUILD @@ -2,7 +2,7 @@ _realname=libdvbpsi pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.1.2 +pkgver=1.3.0 pkgrel=1 pkgdesc="A library designed for decoding and generation of MPEG TS and DVB PSI tables (mingw-w64)" arch=('any') @@ -11,21 +11,22 @@ license=("LGPL2.1") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') -source=("http://download.videolan.org/pub/${_realname}/$pkgver/${_realname}-$pkgver.tar.bz2") -sha256sums=('22436366beaa1bff27b3f6d80e43de1012b16d3b63b1e22d37d4a6fcb5db8933') +source=("http://download.videolan.org/pub/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2") +sha256sums=('a2fed1d11980662f919bbd1f29e2462719e0f6227e1a531310bd5a706db0a1fe') build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/${_realname}-$pkgver" - ./configure \ + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-release + make SUBDIRS=src } package() { - cd "${srcdir}/${_realname}-$pkgver" - make SUBDIRS=src DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make SUBDIRS=src DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libdvdcss/PKGBUILD b/mingw-w64-libdvdcss/PKGBUILD index 6ce9cf604d..91289cd2b5 100644 --- a/mingw-w64-libdvdcss/PKGBUILD +++ b/mingw-w64-libdvdcss/PKGBUILD @@ -1,30 +1,44 @@ # Maintainer: Alexey Pavlov _realname=libdvdcss +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.0 +pkgver=1.3.99 pkgrel=1 pkgdesc="Portable abstraction library for DVD decryption (mingw-w64)" arch=('any') url="http://www.videolan.org/libdvdcss" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') -source=("http://download.videolan.org/pub/${_realname}/$pkgver/${_realname}-$pkgver.tar.bz2") -sha256sums=('7c414acd520c4e4dd7267952f72d738ff50321a7869af4d75c65aefad44f1395') +source=(#"http://download.videolan.org/pub/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2" + "${_realname}-${pkgver}"::"git://git.videolan.org/${_realname}.git#tag=${pkgver}") +sha256sums=('SKIP') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + autoreconf -fi +} build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + #mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-$pkgver/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} + --host=${MINGW_CHOST} \ + --disable-doc + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libdvdnav/PKGBUILD b/mingw-w64-libdvdnav/PKGBUILD index 2fc63c68b2..430df7ff59 100644 --- a/mingw-w64-libdvdnav/PKGBUILD +++ b/mingw-w64-libdvdnav/PKGBUILD @@ -1,17 +1,21 @@ # Maintainer: Alexey Pavlov _realname=libdvdnav +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.0.1 +pkgver=5.0.3 pkgrel=1 pkgdesc="The library for xine-dvdnav plugin (mingw-w64)" arch=('any') url="http://dvdnav.mplayerhq.hu/" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "git") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") depends=("${MINGW_PACKAGE_PREFIX}-libdvdread") options=('staticlibs' 'strip') -source=("${_realname}-${pkgver}"::"git://git.videolan.org/libdvdnav.git#tag=$pkgver" +source=("${_realname}-${pkgver}"::"git://git.videolan.org/${_realname}.git#tag=${pkgver}" #"http://dvdnav.mplayerhq.hu/releases/${_realname}-${pkgver}.tar.xz" 001-no-undefined.patch) sha256sums=('SKIP' @@ -24,17 +28,20 @@ prepare() { } build() { - cd "${srcdir}/${_realname}-$pkgver" - ./configure \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --enable-static + --enable-static \ + --disable-doc make } package() { - cd "${srcdir}/${_realname}-$pkgver" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libdvdread/PKGBUILD b/mingw-w64-libdvdread/PKGBUILD index 60df91600a..766b07c126 100644 --- a/mingw-w64-libdvdread/PKGBUILD +++ b/mingw-w64-libdvdread/PKGBUILD @@ -1,17 +1,23 @@ # Maintainer: Alexey Pavlov _realname=libdvdread +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.0.0 +pkgver=5.0.4 pkgrel=1 pkgdesc="Provides a simple foundation for reading DVD video disks (mingw-w64)" arch=('any') url="http://dvdnav.mplayerhq.hu" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "git") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") depends=("${MINGW_PACKAGE_PREFIX}-libdvdcss") options=('staticlibs' 'strip') -source=("${_realname}-${pkgver}"::"git://git.videolan.org/libdvdread.git#tag=$pkgver" +source=(#"http://download.videolan.org/pub/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2" + #ftp://ftp.videolan.org/pub/videolan/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2 + "${_realname}-${pkgver}"::"git://git.videolan.org/${_realname}.git#tag=${pkgver}" 0001-no-undefined-on.all.patch) sha256sums=('SKIP' '0a9664cce3a2e001445d150edfe5d8f06f3ca0d1affb91b50b1b5bde90c2713e') @@ -19,24 +25,27 @@ sha256sums=('SKIP' prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-no-undefined-on.all.patch - autoreconf -fi } build() { - cd "${srcdir}/${_realname}-$pkgver" - ./configure \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ --disable-dlfcn \ - --with-libdvdcss + --with-libdvdcss \ + --disable-doc + make } package() { - cd "${srcdir}/${_realname}-$pkgver" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libebml/001-makefile.patch b/mingw-w64-libebml/001-makefile.patch deleted file mode 100644 index 59bb9ee977..0000000000 --- a/mingw-w64-libebml/001-makefile.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- libebml-1.3.0/make/mingw32/Makefile.orig 2014-09-25 12:52:00.900800000 +0500 -+++ libebml-1.3.0/make/mingw32/Makefile 2014-09-25 13:14:22.953200000 +0500 -@@ -9,6 +9,11 @@ - # Compile with debug information? - #DEBUG = yes - -+prefix=/mingw -+bindir=$(prefix)/bin -+libdir=$(prefix)/lib -+includedir=$(prefix)/include/ebml -+INCLUDE_DIR=../../ebml - - # - # Don't change anything below this line. -@@ -22,6 +26,11 @@ - WINDRES = $(CROSS)windres - RANLIB = $(CROSS)ranlib - AR = $(CROSS)ar -+INSTALL = install -+INSTALL_OPTS = -m 644 -+INSTALL_OPTS_LIB = -m 644 -+INSTALL_DIR_OPTS = -m 755 -+ - RES = - SRC = $(wildcard ../../src/*.cpp) - OBJ = $(patsubst %.cpp,%.o,$(SRC)) -@@ -66,6 +75,32 @@ - $(CXX) $(CXXFLAGS) -MM -MT $$o $$i >> .depend ; \ - done - -+ifeq (yes,$(SHARED)) -+install: install_sharedlib install_headers -+else -+install: install_staticlib install_headers -+endif -+ -+install_headers: -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir) -+ for i in $(INCLUDE_DIR)/*.h; do \ -+ $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \ -+ done -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c -+ for i in $(INCLUDE_DIR)/c/*.h; do \ -+ $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \ -+ done -+ -+install_staticlib: libebml.a -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir) -+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBS) $(libdir) -+ -+install_sharedlib: libebml.dll -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(bindir) -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir) -+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBS) $(bindir) -+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBS).a $(libdir) -+ - # - # include dependency files if they exist - # diff --git a/mingw-w64-libebml/PKGBUILD b/mingw-w64-libebml/PKGBUILD index d296dbe4e8..ed22913272 100644 --- a/mingw-w64-libebml/PKGBUILD +++ b/mingw-w64-libebml/PKGBUILD @@ -1,33 +1,40 @@ # Maintainer: Alexey Pavlov _realname=libebml +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.3.0 +pkgver=1.3.3 pkgrel=1 pkgdesc="Extensible Binary Meta Language library (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('LGPL') -url="http://dl.matroska.org/downloads/libebml/" +url="http://matroska.org" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "automake" "autoconf") options=('staticlibs') -source=("http://dl.matroska.org/downloads/${_realname}/${_realname}-${pkgver}.tar.bz2" - 001-makefile.patch) -md5sums=('efec729bf5a51e649e1d9d1f61c0ae7a' - '07ccb8987d1eb1da45d7cf4cfeeec692') +source=("http://dl.matroska.org/downloads/${_realname}/${_realname}-${pkgver}.tar.bz2") +md5sums=('a8b270482620970d9891958618b54d77') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-makefile.patch } build() { - cd ${srcdir}/${_realname}-${pkgver}/make/mingw32 - + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } package() { - cd ${srcdir}/${_realname}-${pkgver}/make/mingw32 - make install prefix="${pkgdir}${MINGW_PREFIX}" + cd "${srcdir}/build-${MINGW_CHOST}" + make install DESTDIR="${pkgdir}" } diff --git a/mingw-w64-libelf/PKGBUILD b/mingw-w64-libelf/PKGBUILD index 3db419518b..0bc4d8a8e4 100644 --- a/mingw-w64-libelf/PKGBUILD +++ b/mingw-w64-libelf/PKGBUILD @@ -1,13 +1,11 @@ # Maintainer: Martell Malone _realname=libelf - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=0.8.13 -pkgrel=1 +pkgrel=2 pkgdesc="ELF object file access library (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('LGPL') url="http://www.mr511.de/software/english.html" options=('staticlibs') diff --git a/mingw-w64-libepoxy/0001-135f7bf1043ca2a48d88d920fd46f3fe0097f359.all.patch b/mingw-w64-libepoxy/0001-135f7bf1043ca2a48d88d920fd46f3fe0097f359.all.patch new file mode 100755 index 0000000000..156075605b --- /dev/null +++ b/mingw-w64-libepoxy/0001-135f7bf1043ca2a48d88d920fd46f3fe0097f359.all.patch @@ -0,0 +1,24 @@ +From 135f7bf1043ca2a48d88d920fd46f3fe0097f359 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Sat, 10 Jan 2015 11:18:50 +1300 +Subject: [PATCH] wgl: Fix an extra break statement. + +This would have leaked our TLS indices on process exit. + +Fixes #32 +--- + src/dispatch_wgl.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/dispatch_wgl.c b/src/dispatch_wgl.c +index 5b3a8ef..2bc5fc1 100644 +--- a/src/dispatch_wgl.c ++++ b/src/dispatch_wgl.c +@@ -130,7 +130,6 @@ DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved) + + data = TlsGetValue(wgl_tls_index); + LocalFree(data); +- break; + + if (reason == DLL_PROCESS_DETACH) { + TlsFree(gl_tls_index); diff --git a/mingw-w64-libepoxy/0002-e9ce388f746f6c0557b863a38648ae1646658951.all.patch b/mingw-w64-libepoxy/0002-e9ce388f746f6c0557b863a38648ae1646658951.all.patch new file mode 100755 index 0000000000..9ef09b5628 --- /dev/null +++ b/mingw-w64-libepoxy/0002-e9ce388f746f6c0557b863a38648ae1646658951.all.patch @@ -0,0 +1,7915 @@ +From e9ce388f746f6c0557b863a38648ae1646658951 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Sat, 10 Jan 2015 11:59:10 +1300 +Subject: [PATCH] Import registry from SVN 29350 + +--- + registry/egl.xml | 302 ++++- + registry/gl.xml | 3305 ++++++++++++++++++++++++++++++++++++++++++++++++------ + registry/glx.xml | 127 ++- + registry/wgl.xml | 408 +++---- + 4 files changed, 3593 insertions(+), 549 deletions(-) + +diff --git a/registry/egl.xml b/registry/egl.xml +index 6f6ebc3..a407a61 100644 +--- a/registry/egl.xml ++++ b/registry/egl.xml +@@ -54,22 +54,25 @@ + typedef unsigned int EGLenum; + typedef intptr_t EGLAttribKHR; + typedef intptr_t EGLAttrib; ++ typedef void *EGLClientBuffer; + typedef void *EGLConfig; + typedef void *EGLContext; ++ typedef void *EGLDeviceEXT; + typedef void *EGLDisplay; +- typedef void *EGLSurface; +- typedef void *EGLClientBuffer; +- typedef void (*__eglMustCastToProperFunctionPointerType)(void); +- typedef void *EGLImageKHR; + typedef void *EGLImage; +- typedef void *EGLSyncKHR; ++ typedef void *EGLImageKHR; ++ typedef void *EGLOutputLayerEXT; ++ typedef void *EGLOutputPortEXT; ++ typedef void *EGLStreamKHR; ++ typedef void *EGLSurface; + typedef void *EGLSync; ++ typedef void *EGLSyncKHR; ++ typedef void *EGLSyncNV; ++ typedef void (*__eglMustCastToProperFunctionPointerType)(void); + typedef khronos_utime_nanoseconds_t EGLTimeKHR; + typedef khronos_utime_nanoseconds_t EGLTime; +- typedef void *EGLSyncNV; + typedef khronos_utime_nanoseconds_t EGLTimeNV; + typedef khronos_utime_nanoseconds_t EGLuint64NV; +- typedef void *EGLStreamKHR; + typedef khronos_uint64_t EGLuint64KHR; + typedef int EGLNativeFileDescriptorKHR; + typedef khronos_ssize_t EGLsizeiANDROID; +@@ -172,10 +175,14 @@ + + + ++ + ++ + + + ++ ++ + + + +@@ -370,6 +377,7 @@ + + + ++ + + + +@@ -453,8 +461,10 @@ + + + +- ++ ++ + ++ + + + +@@ -549,7 +559,8 @@ + + + +- ++ ++ + + + +@@ -572,7 +583,25 @@ + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -611,7 +640,9 @@ + + + +- ++ ++ ++ + + + +@@ -623,8 +654,24 @@ + + + +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + +- +- +- ++ ++ ++ + + + +@@ -715,6 +761,14 @@ + const EGLint *attrib_list +
+ ++ EGLImage eglCreateImage ++ EGLDisplay dpy ++ EGLContext ctx ++ EGLenum target ++ EGLClientBuffer buffer ++ const EGLAttrib *attrib_list ++ ++ + EGLImageKHR eglCreateImageKHR + EGLDisplay dpy + EGLContext ctx +@@ -833,9 +887,15 @@ + EGLContext ctx + + ++ EGLBoolean eglDestroyImage ++ EGLDisplay dpy ++ EGLImage image ++ ++ + EGLBoolean eglDestroyImageKHR + EGLDisplay dpy + EGLImageKHR image ++ + + + EGLBoolean eglDestroyStreamKHR +@@ -911,6 +971,22 @@ + EGLint eglGetError + + ++ EGLBoolean eglGetOutputLayersEXT ++ EGLDisplay dpy ++ const EGLAttrib *attrib_list ++ EGLOutputLayerEXT *layers ++ EGLint max_layers ++ EGLint *num_layers ++ ++ ++ EGLBoolean eglGetOutputPortsEXT ++ EGLDisplay dpy ++ const EGLAttrib *attrib_list ++ EGLOutputPortEXT *ports ++ EGLint max_ports ++ EGLint *num_ports ++ ++ + EGLDisplay eglGetPlatformDisplay + EGLenum platform + void *native_display +@@ -977,6 +1053,20 @@ + EGLContext ctx + + ++ EGLBoolean eglOutputLayerAttribEXT ++ EGLDisplay dpy ++ EGLOutputLayerEXT layer ++ EGLint attribute ++ EGLAttrib value ++ ++ ++ EGLBoolean eglOutputPortAttribEXT ++ EGLDisplay dpy ++ EGLOutputPortEXT port ++ EGLint attribute ++ EGLAttrib value ++ ++ + EGLBoolean eglPostSubBufferNV + EGLDisplay dpy + EGLSurface surface +@@ -996,6 +1086,29 @@ + EGLint *value + + ++ EGLBoolean eglQueryDeviceAttribEXT ++ EGLDeviceEXT device ++ EGLint attribute ++ EGLAttrib *value ++ ++ ++ const char *eglQueryDeviceStringEXT ++ EGLDeviceEXT device ++ EGLint name ++ ++ ++ EGLBoolean eglQueryDevicesEXT ++ EGLint max_devices ++ EGLDeviceEXT *devices ++ EGLint *num_devices ++ ++ ++ EGLBoolean eglQueryDisplayAttribEXT ++ EGLDisplay dpy ++ EGLint attribute ++ EGLAttrib *value ++ ++ + EGLBoolean eglQueryNativeDisplayNV + EGLDisplay dpy + EGLNativeDisplayType *display_id +@@ -1013,6 +1126,32 @@ + EGLNativeWindowType *window + + ++ EGLBoolean eglQueryOutputLayerAttribEXT ++ EGLDisplay dpy ++ EGLOutputLayerEXT layer ++ EGLint attribute ++ EGLAttrib *value ++ ++ ++ const char *eglQueryOutputLayerStringEXT ++ EGLDisplay dpy ++ EGLOutputLayerEXT layer ++ EGLint name ++ ++ ++ EGLBoolean eglQueryOutputPortAttribEXT ++ EGLDisplay dpy ++ EGLOutputPortEXT port ++ EGLint attribute ++ EGLAttrib *value ++ ++ ++ const char *eglQueryOutputPortStringEXT ++ EGLDisplay dpy ++ EGLOutputPortEXT port ++ EGLint name ++ ++ + EGLBoolean eglQueryStreamKHR + EGLDisplay dpy + EGLStreamKHR stream +@@ -1075,6 +1214,13 @@ + EGLGetBlobFuncANDROID get + + ++ EGLBoolean eglSetDamageRegionKHR ++ EGLDisplay dpy ++ EGLSurface surface ++ EGLint *rects ++ EGLint n_rects ++ ++ + EGLBoolean eglSignalSyncKHR + EGLDisplay dpy + EGLSyncKHR sync +@@ -1103,6 +1249,12 @@ + EGLStreamKHR stream + + ++ EGLBoolean eglStreamConsumerOutputEXT ++ EGLDisplay dpy ++ EGLStreamKHR stream ++ EGLOutputLayerEXT layer ++ ++ + EGLBoolean eglStreamConsumerReleaseKHR + EGLDisplay dpy + EGLStreamKHR stream +@@ -1127,6 +1279,13 @@ + EGLint n_rects + + ++ EGLBoolean eglSwapBuffersWithDamageKHR ++ EGLDisplay dpy ++ EGLSurface surface ++ EGLint *rects ++ EGLint n_rects ++ ++ + EGLBoolean eglSwapBuffersRegionNOK + EGLDisplay dpy + EGLSurface surface +@@ -1424,6 +1583,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + +@@ -1481,6 +1646,11 @@ + + + ++ ++ ++ ++ ++ + + + +@@ -1500,6 +1670,27 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1531,6 +1722,38 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1538,6 +1761,11 @@ + + + ++ ++ ++ ++ ++ + + + +@@ -1554,6 +1782,11 @@ + + + ++ ++ ++ ++ ++ + + + +@@ -1747,6 +1980,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + +@@ -1841,6 +2080,11 @@ + + + ++ ++ ++ ++ ++ + + + +@@ -1902,6 +2146,13 @@ + + + ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1909,6 +2160,11 @@ + + + ++ ++ ++ ++ ++ + + + +@@ -1962,5 +2218,15 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +diff --git a/registry/gl.xml b/registry/gl.xml +index 6d63b4d..ccff497 100644 +--- a/registry/gl.xml ++++ b/registry/gl.xml +@@ -1726,9 +1726,11 @@ typedef unsigned int GLhandleARB; + + + ++ + + + ++ + + + +@@ -1990,8 +1992,11 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + + + +@@ -2054,6 +2059,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -2078,6 +2084,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -2132,8 +2139,11 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + + + +@@ -2203,6 +2213,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -2320,10 +2331,24 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + ++ + + + +@@ -2364,6 +2389,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -2379,6 +2405,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -2430,7 +2457,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + + + +@@ -2537,11 +2566,15 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + + + ++ + ++ + + + +@@ -2659,12 +2692,15 @@ typedef unsigned int GLhandleARB; + + + ++ + + + + ++ + + ++ + + + +@@ -2725,9 +2761,11 @@ typedef unsigned int GLhandleARB; + + + ++ + + +- ++ ++ + + + +@@ -2754,8 +2792,11 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + + + +@@ -2795,7 +2836,9 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + + + +@@ -2859,7 +2902,9 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + + + +@@ -2907,23 +2952,31 @@ typedef unsigned int GLhandleARB; + + + ++ + + + ++ + + + ++ + + + ++ + + + ++ + + + ++ + ++ + ++ + + + +@@ -2939,9 +2992,7 @@ typedef unsigned int GLhandleARB; + + + +- +- +- ++ + + + +@@ -3335,7 +3386,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3412,7 +3463,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3459,6 +3510,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -3507,7 +3559,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3527,13 +3579,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + +- ++ + + + +@@ -3652,7 +3704,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3663,7 +3715,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3709,7 +3761,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3735,8 +3787,8 @@ typedef unsigned int GLhandleARB; + + + +- +- ++ ++ + + + +@@ -3745,9 +3797,11 @@ typedef unsigned int GLhandleARB; + + + ++ + + + ++ + + + +@@ -3768,7 +3822,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3822,16 +3876,26 @@ typedef unsigned int GLhandleARB; + + + ++ + + ++ ++ + + ++ ++ + + ++ ++ + + ++ ++ + + ++ + + + +@@ -3840,13 +3904,24 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ ++ + ++ ++ + ++ + ++ ++ + ++ ++ + + ++ + + + +@@ -3926,7 +4001,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3934,7 +4009,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -3978,9 +4053,13 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + ++ + + + +@@ -3998,7 +4077,28 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -4050,7 +4150,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4131,10 +4231,12 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ ++ ++ + + + +@@ -4143,7 +4245,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4159,7 +4261,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4192,7 +4294,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4217,13 +4319,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + +- ++ + + + +@@ -4249,7 +4351,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4321,21 +4423,25 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ + + +- ++ ++ ++ + + + + +- ++ + + +- ++ ++ ++ + + + +@@ -4410,8 +4516,10 @@ typedef unsigned int GLhandleARB; + + + ++ + + ++ + + + +@@ -4463,7 +4571,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4624,7 +4732,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4649,6 +4757,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -4737,7 +4846,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -4766,14 +4875,14 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + + +- ++ + + + +@@ -4806,14 +4915,14 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +- ++ + + +- ++ + + + +@@ -4944,7 +5053,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + + + +@@ -4984,7 +5095,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5137,7 +5248,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5165,7 +5276,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5202,7 +5313,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5353,7 +5464,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5407,7 +5518,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5495,13 +5606,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ + +- ++ + + + +- ++ + + + +@@ -5590,9 +5701,11 @@ typedef unsigned int GLhandleARB; + + + +- ++ + ++ + ++ + + + +@@ -5607,15 +5720,16 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + + +- ++ + ++ + + + +@@ -5745,14 +5859,14 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + + +- ++ + + + +@@ -5811,13 +5925,16 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ + ++ + ++ + ++ + + + +@@ -5923,7 +6040,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5945,9 +6062,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + +- ++ ++ ++ + + + +@@ -5966,7 +6087,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -5974,26 +6095,28 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + +- ++ + +- ++ + + + + + ++ + + + + + + ++ + + + +@@ -6014,13 +6137,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +- ++ + +- ++ + + + +@@ -6028,12 +6151,16 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ ++ ++ + +- ++ ++ ++ + + + +@@ -6159,7 +6286,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6183,7 +6310,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + + + +@@ -6204,7 +6333,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6216,7 +6345,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6231,7 +6360,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6264,7 +6393,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6275,6 +6404,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -6288,22 +6418,26 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + + +- ++ + ++ + + ++ + + + ++ + + ++ + + + +@@ -6344,7 +6478,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6411,10 +6545,10 @@ typedef unsigned int GLhandleARB; + + +- ++ + + +- ++ + + + +@@ -6460,10 +6594,12 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ ++ ++ + + + +@@ -6491,7 +6627,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6507,7 +6643,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6561,15 +6697,15 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +- ++ + + + +- ++ + + + +@@ -6585,7 +6721,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6597,7 +6733,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6626,7 +6762,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6634,7 +6770,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6645,7 +6781,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6740,7 +6876,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6835,7 +6971,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6856,7 +6992,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6871,11 +7007,18 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ ++ ++ ++ + ++ + ++ + +- ++ + + + +@@ -6898,7 +7041,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -6924,6 +7067,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -6938,6 +7082,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -6953,34 +7098,60 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ ++ + + + +@@ -6992,14 +7163,20 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ ++ ++ + +- ++ ++ ++ + +- ++ ++ ++ + + + +@@ -7010,7 +7187,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7085,23 +7262,29 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + + + + +- ++ + + + + + +- ++ + + +- ++ ++ ++ + +- ++ ++ ++ + + + +@@ -7113,9 +7296,13 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + ++ + + + +@@ -7124,14 +7311,14 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + +- ++ + +- ++ + + + +@@ -7171,7 +7358,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7182,21 +7369,27 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + ++ + + ++ + + + + ++ + + ++ + + ++ + + ++ + + + +@@ -7245,7 +7438,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7404,14 +7597,17 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + ++ + ++ + ++ + + + +@@ -7422,17 +7618,20 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + + + + + + +- ++ + +- ++ + + + +@@ -7443,11 +7642,13 @@ typedef unsigned int GLhandleARB; + + + ++ + +- ++ ++ + + +- ++ + + + +@@ -7504,7 +7705,9 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + + + +@@ -7521,18 +7724,18 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + + +- ++ + + + +- ++ + + + +@@ -7573,9 +7776,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ + +- ++ + + + +@@ -7594,30 +7797,33 @@ typedef unsigned int GLhandleARB; + + + +- + + + ++ + ++ + ++ + +- ++ + + + + + + +- ++ ++ + +- ++ + + + + + + +- ++ + + + +@@ -7626,17 +7832,20 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + +- ++ ++ ++ ++ + + + + +- ++ + + + +@@ -7660,7 +7869,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7681,10 +7890,10 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + +- ++ + + + +@@ -7703,14 +7912,14 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + + + + +- ++ + + + +@@ -7718,7 +7927,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7731,7 +7940,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + + + +@@ -7746,14 +7957,20 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + + + + ++ + ++ + ++ + + + +@@ -7761,7 +7978,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ + + + +@@ -7771,6 +7990,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -7803,8 +8023,11 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + ++ + + + +@@ -7814,31 +8037,76 @@ typedef unsigned int GLhandleARB; + + + ++ + + + + + ++ + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +- ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ ++ ++ ++ + + + +- ++ ++ ++ ++ ++ ++ + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + +- ++ + + + +@@ -7847,9 +8115,9 @@ typedef unsigned int GLhandleARB; + + + +- ++ + +- ++ + + + +@@ -7867,7 +8135,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7878,7 +8146,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7893,7 +8161,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7904,11 +8172,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +- ++ ++ ++ + + + +@@ -7918,7 +8188,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -7928,7 +8198,15 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + +- +- ++ ++ + + + +@@ -8505,6 +8783,11 @@ typedef unsigned int GLhandleARB; + + + ++ void glBindTextureUnit ++ GLuint unit ++ GLuint texture ++ ++ + GLuint glBindTextureUnitParameterEXT + GLenum unit + GLenum value +@@ -8657,10 +8940,10 @@ typedef unsigned int GLhandleARB; + const GLubyte *bitmap + + +- void glBlendBarrierNV ++ void glBlendBarrierKHR + + +- void glBlendBarrierKHR ++ void glBlendBarrierNV + + + void glBlendColor +@@ -8746,6 +9029,13 @@ typedef unsigned int GLhandleARB; + + + ++ void glBlendEquationSeparateiEXT ++ GLuint buf ++ GLenum modeRGB ++ GLenum modeAlpha ++ ++ ++ + void glBlendEquationi + GLuint buf + GLenum mode +@@ -8757,6 +9047,12 @@ typedef unsigned int GLhandleARB; + + + ++ void glBlendEquationiEXT ++ GLuint buf ++ GLenum mode ++ ++ ++ + void glBlendFunc + GLenum sfactor + GLenum dfactor +@@ -8829,6 +9125,15 @@ typedef unsigned int GLhandleARB; + + + ++ void glBlendFuncSeparateiEXT ++ GLuint buf ++ GLenum srcRGB ++ GLenum dstRGB ++ GLenum srcAlpha ++ GLenum dstAlpha ++ ++ ++ + void glBlendFunci + GLuint buf + GLenum src +@@ -8842,6 +9147,13 @@ typedef unsigned int GLhandleARB; + + + ++ void glBlendFunciEXT ++ GLuint buf ++ GLenum src ++ GLenum dst ++ ++ ++ + void glBlendParameteriNV + GLenum pname + GLint value +@@ -8903,6 +9215,21 @@ typedef unsigned int GLhandleARB; + + + ++ void glBlitNamedFramebuffer ++ GLuint readFramebuffer ++ GLuint drawFramebuffer ++ GLint srcX0 ++ GLint srcY0 ++ GLint srcX1 ++ GLint srcY1 ++ GLint dstX0 ++ GLint dstY0 ++ GLint dstX1 ++ GLint dstY1 ++ GLbitfield mask ++ GLenum filter ++ ++ + void glBufferAddressRangeNV + GLenum pname + GLuint index +@@ -8925,6 +9252,13 @@ typedef unsigned int GLhandleARB; + + + ++ void glBufferPageCommitmentARB ++ GLenum target ++ GLintptr offset ++ GLsizeiptr size ++ GLboolean commit ++ ++ + void glBufferParameteriAPPLE + GLenum target + GLenum pname +@@ -8980,6 +9314,11 @@ typedef unsigned int GLhandleARB; + GLenum target + + ++ GLenum glCheckNamedFramebufferStatus ++ GLuint framebuffer ++ GLenum target ++ ++ + GLenum glCheckNamedFramebufferStatusEXT + GLuint framebuffer + GLenum target +@@ -9132,6 +9471,14 @@ typedef unsigned int GLhandleARB; + + + ++ void glClearNamedBufferData ++ GLuint buffer ++ GLenum internalformat ++ GLenum format ++ GLenum type ++ const void *data ++ ++ + void glClearNamedBufferDataEXT + GLuint buffer + GLenum internalformat +@@ -9140,6 +9487,16 @@ typedef unsigned int GLhandleARB; + const void *data + + ++ void glClearNamedBufferSubData ++ GLuint buffer ++ GLenum internalformat ++ GLintptr offset ++ GLsizei size ++ GLenum format ++ GLenum type ++ const void *data ++ ++ + void glClearNamedBufferSubDataEXT + GLuint buffer + GLenum internalformat +@@ -9150,6 +9507,34 @@ typedef unsigned int GLhandleARB; + const void *data + + ++ void glClearNamedFramebufferfi ++ GLuint framebuffer ++ GLenum buffer ++ const GLfloat depth ++ GLint stencil ++ ++ ++ void glClearNamedFramebufferfv ++ GLuint framebuffer ++ GLenum buffer ++ GLint drawbuffer ++ const GLfloat *value ++ ++ ++ void glClearNamedFramebufferiv ++ GLuint framebuffer ++ GLenum buffer ++ GLint drawbuffer ++ const GLint *value ++ ++ ++ void glClearNamedFramebufferuiv ++ GLuint framebuffer ++ GLenum buffer ++ GLint drawbuffer ++ const GLuint *value ++ ++ + void glClearStencil + GLint s + +@@ -9207,6 +9592,11 @@ typedef unsigned int GLhandleARB; + + + ++ void glClipControl ++ GLenum origin ++ GLenum depth ++ ++ + void glClipPlane + GLenum plane + const GLdouble *equation +@@ -9629,6 +10019,15 @@ typedef unsigned int GLhandleARB; + GLboolean a + + ++ void glColorMaskiEXT ++ GLuint index ++ GLboolean r ++ GLboolean g ++ GLboolean b ++ GLboolean a ++ ++ ++ + void glColorMaterial + GLenum face + GLenum mode +@@ -10138,6 +10537,16 @@ typedef unsigned int GLhandleARB; + const void *bits + + ++ void glCompressedTextureSubImage1D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLsizei width ++ GLenum format ++ GLsizei imageSize ++ const void *data ++ ++ + void glCompressedTextureSubImage1DEXT + GLuint texture + GLenum target +@@ -10149,6 +10558,18 @@ typedef unsigned int GLhandleARB; + const void *bits + + ++ void glCompressedTextureSubImage2D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLsizei width ++ GLsizei height ++ GLenum format ++ GLsizei imageSize ++ const void *data ++ ++ + void glCompressedTextureSubImage2DEXT + GLuint texture + GLenum target +@@ -10162,6 +10583,20 @@ typedef unsigned int GLhandleARB; + const void *bits + + ++ void glCompressedTextureSubImage3D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLint zoffset ++ GLsizei width ++ GLsizei height ++ GLsizei depth ++ GLenum format ++ GLsizei imageSize ++ const void *data ++ ++ + void glCompressedTextureSubImage3DEXT + GLuint texture + GLenum target +@@ -10407,6 +10842,25 @@ typedef unsigned int GLhandleARB; + GLsizei srcDepth + + ++ void glCopyImageSubDataEXT ++ GLuint srcName ++ GLenum srcTarget ++ GLint srcLevel ++ GLint srcX ++ GLint srcY ++ GLint srcZ ++ GLuint dstName ++ GLenum dstTarget ++ GLint dstLevel ++ GLint dstX ++ GLint dstY ++ GLint dstZ ++ GLsizei srcWidth ++ GLsizei srcHeight ++ GLsizei srcDepth ++ ++ ++ + void glCopyImageSubDataNV + GLuint srcName + GLenum srcTarget +@@ -10484,6 +10938,14 @@ typedef unsigned int GLhandleARB; + GLsizei height + + ++ void glCopyNamedBufferSubData ++ GLuint readBuffer ++ GLuint writeBuffer ++ GLintptr readOffset ++ GLintptr writeOffset ++ GLsizei size ++ ++ + void glCopyPathNV + GLuint resultPath + GLuint srcPath +@@ -10662,6 +11124,15 @@ typedef unsigned int GLhandleARB; + GLsizei sourceLevelCount + + ++ void glCopyTextureSubImage1D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint x ++ GLint y ++ GLsizei width ++ ++ + void glCopyTextureSubImage1DEXT + GLuint texture + GLenum target +@@ -10672,6 +11143,17 @@ typedef unsigned int GLhandleARB; + GLsizei width + + ++ void glCopyTextureSubImage2D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLint x ++ GLint y ++ GLsizei width ++ GLsizei height ++ ++ + void glCopyTextureSubImage2DEXT + GLuint texture + GLenum target +@@ -10684,6 +11166,18 @@ typedef unsigned int GLhandleARB; + GLsizei height + + ++ void glCopyTextureSubImage3D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLint zoffset ++ GLint x ++ GLint y ++ GLsizei width ++ GLsizei height ++ ++ + void glCopyTextureSubImage3DEXT + GLuint texture + GLenum target +@@ -10735,6 +11229,16 @@ typedef unsigned int GLhandleARB; + GLenum operation + + ++ void glCreateBuffers ++ GLsizei n ++ GLuint *buffers ++ ++ ++ void glCreateFramebuffers ++ GLsizei n ++ GLuint *framebuffers ++ ++ + void glCreatePerfQueryINTEL + GLuint queryId + GLuint *queryHandle +@@ -10747,6 +11251,27 @@ typedef unsigned int GLhandleARB; + + + ++ void glCreateProgramPipelines ++ GLsizei n ++ GLuint *pipelines ++ ++ ++ void glCreateQueries ++ GLenum target ++ GLsizei n ++ GLuint *ids ++ ++ ++ void glCreateRenderbuffers ++ GLsizei n ++ GLuint *renderbuffers ++ ++ ++ void glCreateSamplers ++ GLsizei n ++ GLuint *samplers ++ ++ + GLuint glCreateShader + GLenum type + +@@ -10779,6 +11304,22 @@ typedef unsigned int GLhandleARB; + GLbitfield flags +
+ ++ void glCreateTextures ++ GLenum target ++ GLsizei n ++ GLuint *textures ++ ++ ++ void glCreateTransformFeedbacks ++ GLsizei n ++ GLuint *ids ++ ++ ++ void glCreateVertexArrays ++ GLsizei n ++ GLuint *arrays ++ ++ + void glCullFace + GLenum mode + +@@ -11190,12 +11731,24 @@ typedef unsigned int GLhandleARB; + const GLdouble *v + + ++ void glDepthRangeArrayfvNV ++ GLuint first ++ GLsizei count ++ const GLfloat *v ++ ++ + void glDepthRangeIndexed + GLuint index + GLdouble n + GLdouble f + + ++ void glDepthRangeIndexedfNV ++ GLuint index ++ GLfloat n ++ GLfloat f ++ ++ + void glDepthRangedNV + GLdouble zNear + GLdouble zFar +@@ -11275,6 +11828,11 @@ typedef unsigned int GLhandleARB; + GLuint id + + ++ void glDisableVertexArrayAttrib ++ GLuint vaobj ++ GLuint index ++ ++ + void glDisableVertexArrayAttribEXT + GLuint vaobj + GLuint index +@@ -11304,6 +11862,18 @@ typedef unsigned int GLhandleARB; + GLuint index + + ++ void glDisableiEXT ++ GLenum target ++ GLuint index ++ ++ ++ ++ void glDisableiNV ++ GLenum target ++ GLuint index ++ ++ ++ + void glDiscardFramebufferEXT + GLenum target + GLsizei numAttachments +@@ -11379,6 +11949,15 @@ typedef unsigned int GLhandleARB; + GLsizei instancecount + GLuint baseinstance + ++ ++ void glDrawArraysInstancedBaseInstanceEXT ++ GLenum mode ++ GLint first ++ GLsizei count ++ GLsizei instancecount ++ GLuint baseinstance ++ ++ + + void glDrawArraysInstancedEXT + GLenum mode +@@ -11397,7 +11976,7 @@ typedef unsigned int GLhandleARB; + + + void glDrawBuffer +- GLenum mode ++ GLenum buf + + + +@@ -11463,6 +12042,15 @@ typedef unsigned int GLhandleARB; + GLint basevertex + + ++ void glDrawElementsBaseVertexEXT ++ GLenum mode ++ GLsizei count ++ GLenum type ++ const void *indices ++ GLint basevertex ++ ++ ++ + void glDrawElementsIndirect + GLenum mode + GLenum type +@@ -11504,6 +12092,16 @@ typedef unsigned int GLhandleARB; + GLuint baseinstance + + ++ void glDrawElementsInstancedBaseInstanceEXT ++ GLenum mode ++ GLsizei count ++ GLenum type ++ const void *indices ++ GLsizei instancecount ++ GLuint baseinstance ++ ++ ++ + void glDrawElementsInstancedBaseVertex + GLenum mode + GLsizei count +@@ -11513,6 +12111,16 @@ typedef unsigned int GLhandleARB; + GLint basevertex + + ++ void glDrawElementsInstancedBaseVertexEXT ++ GLenum mode ++ GLsizei count ++ GLenum type ++ const void *indices ++ GLsizei instancecount ++ GLint basevertex ++ ++ ++ + void glDrawElementsInstancedBaseVertexBaseInstance + GLenum mode + GLsizei count +@@ -11522,6 +12130,17 @@ typedef unsigned int GLhandleARB; + GLint basevertex + GLuint baseinstance + ++ ++ void glDrawElementsInstancedBaseVertexBaseInstanceEXT ++ GLenum mode ++ GLsizei count ++ GLenum type ++ const void *indices ++ GLsizei instancecount ++ GLint basevertex ++ GLuint baseinstance ++ ++ + + void glDrawElementsInstancedEXT + GLenum mode +@@ -11592,6 +12211,17 @@ typedef unsigned int GLhandleARB; + GLint basevertex + + ++ void glDrawRangeElementsBaseVertexEXT ++ GLenum mode ++ GLuint start ++ GLuint end ++ GLsizei count ++ GLenum type ++ const void *indices ++ GLint basevertex ++ ++ ++ + void glDrawRangeElementsEXT + GLenum mode + GLuint start +@@ -11778,6 +12408,11 @@ typedef unsigned int GLhandleARB; + GLuint id + + ++ void glEnableVertexArrayAttrib ++ GLuint vaobj ++ GLuint index ++ ++ + void glEnableVertexArrayAttribEXT + GLuint vaobj + GLuint index +@@ -11807,6 +12442,18 @@ typedef unsigned int GLhandleARB; + GLuint index + + ++ void glEnableiNV ++ GLenum target ++ GLuint index ++ ++ ++ ++ void glEnableiEXT ++ GLenum target ++ GLuint index ++ ++ ++ + void glEnd + + +@@ -12147,6 +12794,12 @@ typedef unsigned int GLhandleARB; + +
+ ++ void glFlushMappedNamedBufferRange ++ GLuint buffer ++ GLintptr offset ++ GLsizei length ++ ++ + void glFlushMappedNamedBufferRangeEXT + GLuint buffer + GLintptr offset +@@ -12855,6 +13508,10 @@ typedef unsigned int GLhandleARB; + GLenum target + + ++ void glGenerateTextureMipmap ++ GLuint texture ++ ++ + void glGenerateTextureMipmapEXT + GLuint texture + GLenum target +@@ -12947,7 +13604,7 @@ typedef unsigned int GLhandleARB; + GLuint program + GLuint uniformBlockIndex + GLenum pname +- GLint *params ++ GLint *params + + + void glGetActiveUniformName +@@ -12961,9 +13618,9 @@ typedef unsigned int GLhandleARB; + void glGetActiveUniformsiv + GLuint program + GLsizei uniformCount +- const GLuint *uniformIndices ++ const GLuint *uniformIndices + GLenum pname +- GLint *params ++ GLint *params + + + void glGetActiveVaryingNV +@@ -13249,6 +13906,13 @@ typedef unsigned int GLhandleARB; + + + ++ void glGetCompressedTextureImage ++ GLuint texture ++ GLint level ++ GLsizei bufSize ++ void *pixels ++ ++ + void glGetCompressedTextureImageEXT + GLuint texture + GLenum target +@@ -13256,6 +13920,19 @@ typedef unsigned int GLhandleARB; + void *img + + ++ void glGetCompressedTextureSubImage ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLint zoffset ++ GLsizei width ++ GLsizei height ++ GLsizei depth ++ GLsizei bufSize ++ void *pixels ++ ++ + void glGetConvolutionFilter + GLenum target + GLenum format +@@ -13374,7 +14051,7 @@ typedef unsigned int GLhandleARB; + void glGetDoublei_vEXT + GLenum pname + GLuint index +- GLdouble *params ++ GLdouble *params + + + +@@ -13449,10 +14126,17 @@ typedef unsigned int GLhandleARB; + GLfloat *data + + ++ void glGetFloati_vNV ++ GLenum target ++ GLuint index ++ GLfloat *data ++ ++ ++ + void glGetFloati_vEXT + GLenum pname + GLuint index +- GLfloat *params ++ GLfloat *params + + + +@@ -13542,12 +14226,19 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ GLenum glGetGraphicsResetStatus ++ ++ + GLenum glGetGraphicsResetStatusARB + + + GLenum glGetGraphicsResetStatusEXT + + ++ GLenum glGetGraphicsResetStatusKHR ++ ++ ++ + GLhandleARB glGetHandleARB + GLenum pname + +@@ -13713,6 +14404,15 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetInternalformatSampleivNV ++ GLenum target ++ GLenum internalformat ++ GLsizei samples ++ GLenum pname ++ GLsizei bufSize ++ GLint *params ++ ++ + void glGetInvariantBooleanvEXT + GLuint id + GLenum value +@@ -14036,6 +14736,18 @@ typedef unsigned int GLhandleARB; + + + ++ void glGetNamedBufferParameteri64v ++ GLuint buffer ++ GLenum pname ++ GLint64 *params ++ ++ ++ void glGetNamedBufferParameteriv ++ GLuint buffer ++ GLenum pname ++ GLint *params ++ ++ + void glGetNamedBufferParameterivEXT + GLuint buffer + GLenum pname +@@ -14048,12 +14760,25 @@ typedef unsigned int GLhandleARB; + GLuint64EXT *params + + ++ void glGetNamedBufferPointerv ++ GLuint buffer ++ GLenum pname ++ void **params ++ ++ + void glGetNamedBufferPointervEXT + GLuint buffer + GLenum pname + void **params + + ++ void glGetNamedBufferSubData ++ GLuint buffer ++ GLintptr offset ++ GLsizei size ++ void *data ++ ++ + void glGetNamedBufferSubDataEXT + GLuint buffer + GLintptr offset +@@ -14061,6 +14786,13 @@ typedef unsigned int GLhandleARB; + void *data + + ++ void glGetNamedFramebufferAttachmentParameteriv ++ GLuint framebuffer ++ GLenum attachment ++ GLenum pname ++ GLint *params ++ ++ + void glGetNamedFramebufferAttachmentParameterivEXT + GLuint framebuffer + GLenum attachment +@@ -14068,6 +14800,12 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetNamedFramebufferParameteriv ++ GLuint framebuffer ++ GLenum pname ++ GLint *param ++ ++ + void glGetNamedFramebufferParameterivEXT + GLuint framebuffer + GLenum pname +@@ -14116,6 +14854,12 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetNamedRenderbufferParameteriv ++ GLuint renderbuffer ++ GLenum pname ++ GLint *params ++ ++ + void glGetNamedRenderbufferParameterivEXT + GLuint renderbuffer + GLenum pname +@@ -14645,6 +15389,17 @@ typedef unsigned int GLhandleARB; + GLchar *name + + ++ void glGetProgramResourcefvNV ++ GLuint program ++ GLenum programInterface ++ GLuint index ++ GLsizei propCount ++ const GLenum *props ++ GLsizei bufSize ++ GLsizei *length ++ GLfloat *params ++ ++ + void glGetProgramResourceiv + GLuint program + GLenum programInterface +@@ -14702,6 +15457,34 @@ typedef unsigned int GLhandleARB; + + + ++ void glGetQueryBufferObjecti64v ++ GLuint id ++ GLuint buffer ++ GLenum pname ++ GLintptr offset ++ ++ ++ void glGetQueryBufferObjectiv ++ GLuint id ++ GLuint buffer ++ GLenum pname ++ GLintptr offset ++ ++ ++ void glGetQueryBufferObjectui64v ++ GLuint id ++ GLuint buffer ++ GLenum pname ++ GLintptr offset ++ ++ ++ void glGetQueryBufferObjectuiv ++ GLuint id ++ GLuint buffer ++ GLenum pname ++ GLintptr offset ++ ++ + void glGetQueryIndexediv + GLenum target + GLuint index +@@ -14825,12 +15608,26 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetSamplerParameterIivEXT ++ GLuint sampler ++ GLenum pname ++ GLint *params ++ ++ ++ + void glGetSamplerParameterIuiv + GLuint sampler + GLenum pname + GLuint *params + + ++ void glGetSamplerParameterIuivEXT ++ GLuint sampler ++ GLenum pname ++ GLuint *params ++ ++ ++ + void glGetSamplerParameterfv + GLuint sampler + GLenum pname +@@ -15129,6 +15926,15 @@ typedef unsigned int GLhandleARB; + GLuint texture + + ++ void glGetTextureImage ++ GLuint texture ++ GLint level ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *pixels ++ ++ + void glGetTextureImageEXT + GLuint texture + GLenum target +@@ -15138,6 +15944,13 @@ typedef unsigned int GLhandleARB; + void *pixels + + ++ void glGetTextureLevelParameterfv ++ GLuint texture ++ GLint level ++ GLenum pname ++ GLfloat *params ++ ++ + void glGetTextureLevelParameterfvEXT + GLuint texture + GLenum target +@@ -15146,6 +15959,13 @@ typedef unsigned int GLhandleARB; + GLfloat *params + + ++ void glGetTextureLevelParameteriv ++ GLuint texture ++ GLint level ++ GLenum pname ++ GLint *params ++ ++ + void glGetTextureLevelParameterivEXT + GLuint texture + GLenum target +@@ -15154,6 +15974,12 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetTextureParameterIiv ++ GLuint texture ++ GLenum pname ++ GLint *params ++ ++ + void glGetTextureParameterIivEXT + GLuint texture + GLenum target +@@ -15161,6 +15987,12 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetTextureParameterIuiv ++ GLuint texture ++ GLenum pname ++ GLuint *params ++ ++ + void glGetTextureParameterIuivEXT + GLuint texture + GLenum target +@@ -15168,6 +16000,12 @@ typedef unsigned int GLhandleARB; + GLuint *params + + ++ void glGetTextureParameterfv ++ GLuint texture ++ GLenum pname ++ GLfloat *params ++ ++ + void glGetTextureParameterfvEXT + GLuint texture + GLenum target +@@ -15175,6 +16013,12 @@ typedef unsigned int GLhandleARB; + GLfloat *params + + ++ void glGetTextureParameteriv ++ GLuint texture ++ GLenum pname ++ GLint *params ++ ++ + void glGetTextureParameterivEXT + GLuint texture + GLenum target +@@ -15192,6 +16036,21 @@ typedef unsigned int GLhandleARB; + GLuint sampler + + ++ void glGetTextureSubImage ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLint zoffset ++ GLsizei width ++ GLsizei height ++ GLsizei depth ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *pixels ++ ++ + void glGetTrackMatrixivNV + GLenum target + GLuint address +@@ -15227,6 +16086,26 @@ typedef unsigned int GLhandleARB; + GLint *location + + ++ void glGetTransformFeedbacki64_v ++ GLuint xfb ++ GLenum pname ++ GLuint index ++ GLint64 *param ++ ++ ++ void glGetTransformFeedbacki_v ++ GLuint xfb ++ GLenum pname ++ GLuint index ++ GLint *param ++ ++ ++ void glGetTransformFeedbackiv ++ GLuint xfb ++ GLenum pname ++ GLint *param ++ ++ + void glGetTranslatedShaderSourceANGLE + GLuint shader + GLsizei bufsize +@@ -15276,38 +16155,38 @@ typedef unsigned int GLhandleARB; + void glGetUniformdv + GLuint program + GLint location +- GLdouble *params ++ GLdouble *params + + + void glGetUniformfv + GLuint program + GLint location +- GLfloat *params ++ GLfloat *params + + + void glGetUniformfvARB + GLhandleARB programObj + GLint location +- GLfloat *params ++ GLfloat *params + + + + void glGetUniformi64vNV + GLuint program + GLint location +- GLint64EXT *params ++ GLint64EXT *params + + + void glGetUniformiv + GLuint program + GLint location +- GLint *params ++ GLint *params + + + void glGetUniformivARB + GLhandleARB programObj + GLint location +- GLint *params ++ GLint *params + + + +@@ -15371,6 +16250,20 @@ typedef unsigned int GLhandleARB; + const GLchar *name + + ++ void glGetVertexArrayIndexed64iv ++ GLuint vaobj ++ GLuint index ++ GLenum pname ++ GLint64 *param ++ ++ ++ void glGetVertexArrayIndexediv ++ GLuint vaobj ++ GLuint index ++ GLenum pname ++ GLint *param ++ ++ + void glGetVertexArrayIntegeri_vEXT + GLuint vaobj + GLuint index +@@ -15397,6 +16290,12 @@ typedef unsigned int GLhandleARB; + void **param + + ++ void glGetVertexArrayiv ++ GLuint vaobj ++ GLenum pname ++ GLint *param ++ ++ + void glGetVertexAttribArrayObjectfvATI + GLuint index + GLenum pname +@@ -15607,6 +16506,14 @@ typedef unsigned int GLhandleARB; + GLuint *params + + ++ void glGetnColorTable ++ GLenum target ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *table ++ ++ + void glGetnColorTableARB + GLenum target + GLenum format +@@ -15615,6 +16522,13 @@ typedef unsigned int GLhandleARB; + void *table + + ++ void glGetnCompressedTexImage ++ GLenum target ++ GLint lod ++ GLsizei bufSize ++ void *pixels ++ ++ + void glGetnCompressedTexImageARB + GLenum target + GLint lod +@@ -15622,6 +16536,14 @@ typedef unsigned int GLhandleARB; + void *img + + ++ void glGetnConvolutionFilter ++ GLenum target ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *image ++ ++ + void glGetnConvolutionFilterARB + GLenum target + GLenum format +@@ -15630,6 +16552,15 @@ typedef unsigned int GLhandleARB; + void *image + + ++ void glGetnHistogram ++ GLenum target ++ GLboolean reset ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *values ++ ++ + void glGetnHistogramARB + GLenum target + GLboolean reset +@@ -15639,6 +16570,13 @@ typedef unsigned int GLhandleARB; + void *values + + ++ void glGetnMapdv ++ GLenum target ++ GLenum query ++ GLsizei bufSize ++ GLdouble *v ++ ++ + void glGetnMapdvARB + GLenum target + GLenum query +@@ -15646,6 +16584,13 @@ typedef unsigned int GLhandleARB; + GLdouble *v + + ++ void glGetnMapfv ++ GLenum target ++ GLenum query ++ GLsizei bufSize ++ GLfloat *v ++ ++ + void glGetnMapfvARB + GLenum target + GLenum query +@@ -15653,6 +16598,13 @@ typedef unsigned int GLhandleARB; + GLfloat *v + + ++ void glGetnMapiv ++ GLenum target ++ GLenum query ++ GLsizei bufSize ++ GLint *v ++ ++ + void glGetnMapivARB + GLenum target + GLenum query +@@ -15660,6 +16612,15 @@ typedef unsigned int GLhandleARB; + GLint *v + + ++ void glGetnMinmax ++ GLenum target ++ GLboolean reset ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *values ++ ++ + void glGetnMinmaxARB + GLenum target + GLboolean reset +@@ -15669,29 +16630,63 @@ typedef unsigned int GLhandleARB; + void *values + + ++ void glGetnPixelMapfv ++ GLenum map ++ GLsizei bufSize ++ GLfloat *values ++ ++ + void glGetnPixelMapfvARB + GLenum map + GLsizei bufSize + GLfloat *values + + ++ void glGetnPixelMapuiv ++ GLenum map ++ GLsizei bufSize ++ GLuint *values ++ ++ + void glGetnPixelMapuivARB + GLenum map + GLsizei bufSize + GLuint *values + + ++ void glGetnPixelMapusv ++ GLenum map ++ GLsizei bufSize ++ GLushort *values ++ ++ + void glGetnPixelMapusvARB + GLenum map + GLsizei bufSize + GLushort *values + + ++ void glGetnPolygonStipple ++ GLsizei bufSize ++ GLubyte *pattern ++ ++ + void glGetnPolygonStippleARB + GLsizei bufSize + GLubyte *pattern + + ++ void glGetnSeparableFilter ++ GLenum target ++ GLenum format ++ GLenum type ++ GLsizei rowBufSize ++ void *row ++ GLsizei columnBufSize ++ void *column ++ void *span ++ ++ + void glGetnSeparableFilterARB + GLenum target + GLenum format +@@ -15703,6 +16698,15 @@ typedef unsigned int GLhandleARB; + void *span + + ++ void glGetnTexImage ++ GLenum target ++ GLint level ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *pixels ++ ++ + void glGetnTexImageARB + GLenum target + GLint level +@@ -15712,6 +16716,13 @@ typedef unsigned int GLhandleARB; + void *img + + ++ void glGetnUniformdv ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLdouble *params ++ ++ + void glGetnUniformdvARB + GLuint program + GLint location +@@ -15719,6 +16730,13 @@ typedef unsigned int GLhandleARB; + GLdouble *params + + ++ void glGetnUniformfv ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLfloat *params ++ ++ + void glGetnUniformfvARB + GLuint program + GLint location +@@ -15733,6 +16751,21 @@ typedef unsigned int GLhandleARB; + GLfloat *params + + ++ void glGetnUniformfvKHR ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLfloat *params ++ ++ ++ ++ void glGetnUniformiv ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLint *params ++ ++ + void glGetnUniformivARB + GLuint program + GLint location +@@ -15747,6 +16780,21 @@ typedef unsigned int GLhandleARB; + GLint *params + + ++ void glGetnUniformivKHR ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLint *params ++ ++ ++ ++ void glGetnUniformuiv ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLuint *params ++ ++ + void glGetnUniformuivARB + GLuint program + GLint location +@@ -15754,6 +16802,14 @@ typedef unsigned int GLhandleARB; + GLuint *params + + ++ void glGetnUniformuivKHR ++ GLuint program ++ GLint location ++ GLsizei bufSize ++ GLuint *params ++ ++ ++ + void glGlobalAlphaFactorbSUN + GLbyte factor + +@@ -15998,6 +17054,22 @@ typedef unsigned int GLhandleARB; + const GLenum *attachments + + ++ void glInvalidateNamedFramebufferData ++ GLuint framebuffer ++ GLsizei numAttachments ++ const GLenum *attachments ++ ++ ++ void glInvalidateNamedFramebufferSubData ++ GLuint framebuffer ++ GLsizei numAttachments ++ const GLenum *attachments ++ GLint x ++ GLint y ++ GLsizei width ++ GLsizei height ++ ++ + void glInvalidateSubFramebuffer + GLenum target + GLsizei numAttachments +@@ -16057,6 +17129,18 @@ typedef unsigned int GLhandleARB; + GLuint index + + ++ GLboolean glIsEnablediEXT ++ GLenum target ++ GLuint index ++ ++ ++ ++ GLboolean glIsEnablediNV ++ GLenum target ++ GLuint index ++ ++ ++ + GLboolean glIsFenceAPPLE + GLuint fence + +@@ -16715,11 +17799,23 @@ typedef unsigned int GLhandleARB; + GLfixed v2 + + ++ void *glMapNamedBuffer ++ GLuint buffer ++ GLenum access ++ ++ + void *glMapNamedBufferEXT + GLuint buffer + GLenum access + + ++ void *glMapNamedBufferRange ++ GLuint buffer ++ GLintptr offset ++ GLsizei length ++ GLbitfield access ++ ++ + void *glMapNamedBufferRangeEXT + GLuint buffer + GLintptr offset +@@ -16893,10 +17989,25 @@ typedef unsigned int GLhandleARB; + + + ++ void glMatrixLoad3x2fNV ++ GLenum matrixMode ++ const GLfloat *m ++ ++ ++ void glMatrixLoad3x3fNV ++ GLenum matrixMode ++ const GLfloat *m ++ ++ + void glMatrixLoadIdentityEXT + GLenum mode + + ++ void glMatrixLoadTranspose3x3fNV ++ GLenum matrixMode ++ const GLfloat *m ++ ++ + void glMatrixLoadTransposedEXT + GLenum mode + const GLdouble *m +@@ -16922,6 +18033,21 @@ typedef unsigned int GLhandleARB; + + + ++ void glMatrixMult3x2fNV ++ GLenum matrixMode ++ const GLfloat *m ++ ++ ++ void glMatrixMult3x3fNV ++ GLenum matrixMode ++ const GLfloat *m ++ ++ ++ void glMatrixMultTranspose3x3fNV ++ GLenum matrixMode ++ const GLfloat *m ++ ++ + void glMatrixMultTransposedEXT + GLenum mode + const GLdouble *m +@@ -17116,6 +18242,23 @@ typedef unsigned int GLhandleARB; + + + ++ void glMultiDrawArraysIndirectEXT ++ GLenum mode ++ const void *indirect ++ GLsizei drawcount ++ GLsizei stride ++ ++ ++ ++ void glMultiDrawArraysIndirectBindlessCountNV ++ GLenum mode ++ const void *indirect ++ GLsizei drawCount ++ GLsizei maxDrawCount ++ GLsizei stride ++ GLint vertexBufferCount ++ ++ + void glMultiDrawArraysIndirectBindlessNV + GLenum mode + const void *indirect +@@ -17156,6 +18299,16 @@ typedef unsigned int GLhandleARB; + const GLint *basevertex + + ++ void glMultiDrawElementsBaseVertexEXT ++ GLenum mode ++ const GLsizei *count ++ GLenum type ++ const void *const*indices ++ GLsizei primcount ++ const GLint *basevertex ++ ++ ++ + void glMultiDrawElementsEXT + GLenum mode + const GLsizei *count +@@ -17173,6 +18326,15 @@ typedef unsigned int GLhandleARB; + GLsizei stride + + ++ void glMultiDrawElementsIndirectEXT ++ GLenum mode ++ GLenum type ++ const void *indirect ++ GLsizei drawcount ++ GLsizei stride ++ ++ ++ + void glMultiDrawElementsIndirectAMD + GLenum mode + GLenum type +@@ -17182,6 +18344,16 @@ typedef unsigned int GLhandleARB; + + + ++ void glMultiDrawElementsIndirectBindlessCountNV ++ GLenum mode ++ GLenum type ++ const void *indirect ++ GLsizei drawCount ++ GLsizei maxDrawCount ++ GLsizei stride ++ GLint vertexBufferCount ++ ++ + void glMultiDrawElementsIndirectBindlessNV + GLenum mode + GLenum type +@@ -18110,6 +19282,13 @@ typedef unsigned int GLhandleARB; + const void *pixels + + ++ void glNamedBufferData ++ GLuint buffer ++ GLsizei size ++ const void *data ++ GLenum usage ++ ++ + void glNamedBufferDataEXT + GLuint buffer + GLsizeiptr size +@@ -18117,6 +19296,27 @@ typedef unsigned int GLhandleARB; + GLenum usage + + ++ void glNamedBufferPageCommitmentARB ++ GLuint buffer ++ GLintptr offset ++ GLsizeiptr size ++ GLboolean commit ++ ++ ++ void glNamedBufferPageCommitmentEXT ++ GLuint buffer ++ GLintptr offset ++ GLsizeiptr size ++ GLboolean commit ++ ++ ++ void glNamedBufferStorage ++ GLuint buffer ++ GLsizei size ++ const void *data ++ GLbitfield flags ++ ++ + void glNamedBufferStorageEXT + GLuint buffer + GLsizeiptr size +@@ -18124,6 +19324,13 @@ typedef unsigned int GLhandleARB; + GLbitfield flags + + ++ void glNamedBufferSubData ++ GLuint buffer ++ GLintptr offset ++ GLsizei size ++ const void *data ++ ++ + void glNamedBufferSubDataEXT + GLuint buffer + GLintptr offset +@@ -18139,12 +19346,41 @@ typedef unsigned int GLhandleARB; + GLsizeiptr size + + ++ void glNamedFramebufferDrawBuffer ++ GLuint framebuffer ++ GLenum buf ++ ++ ++ void glNamedFramebufferDrawBuffers ++ GLuint framebuffer ++ GLsizei n ++ const GLenum *bufs ++ ++ ++ void glNamedFramebufferParameteri ++ GLuint framebuffer ++ GLenum pname ++ GLint param ++ ++ + void glNamedFramebufferParameteriEXT + GLuint framebuffer + GLenum pname + GLint param + + ++ void glNamedFramebufferReadBuffer ++ GLuint framebuffer ++ GLenum src ++ ++ ++ void glNamedFramebufferRenderbuffer ++ GLuint framebuffer ++ GLenum attachment ++ GLenum renderbuffertarget ++ GLuint renderbuffer ++ ++ + void glNamedFramebufferRenderbufferEXT + GLuint framebuffer + GLenum attachment +@@ -18152,6 +19388,13 @@ typedef unsigned int GLhandleARB; + GLuint renderbuffer + + ++ void glNamedFramebufferTexture ++ GLuint framebuffer ++ GLenum attachment ++ GLuint texture ++ GLint level ++ ++ + void glNamedFramebufferTexture1DEXT + GLuint framebuffer + GLenum attachment +@@ -18192,6 +19435,14 @@ typedef unsigned int GLhandleARB; + GLenum face + + ++ void glNamedFramebufferTextureLayer ++ GLuint framebuffer ++ GLenum attachment ++ GLuint texture ++ GLint level ++ GLint layer ++ ++ + void glNamedFramebufferTextureLayerEXT + GLuint framebuffer + GLenum attachment +@@ -18304,6 +19555,13 @@ typedef unsigned int GLhandleARB; + const void *string + + ++ void glNamedRenderbufferStorage ++ GLuint renderbuffer ++ GLenum internalformat ++ GLsizei width ++ GLsizei height ++ ++ + void glNamedRenderbufferStorageEXT + GLuint renderbuffer + GLenum internalformat +@@ -18311,6 +19569,14 @@ typedef unsigned int GLhandleARB; + GLsizei height + + ++ void glNamedRenderbufferStorageMultisample ++ GLuint renderbuffer ++ GLsizei samples ++ GLenum internalformat ++ GLsizei width ++ GLsizei height ++ ++ + void glNamedRenderbufferStorageMultisampleCoverageEXT + GLuint renderbuffer + GLsizei coverageSamples +@@ -18672,6 +19938,12 @@ typedef unsigned int GLhandleARB; + GLint value + + ++ void glPatchParameteriEXT ++ GLenum pname ++ GLint value ++ ++ ++ + void glPathColorGenNV + GLenum color + GLenum genMode +@@ -18709,6 +19981,26 @@ typedef unsigned int GLhandleARB; + GLenum genMode + + ++ GLenum glPathGlyphIndexArrayNV ++ GLuint firstPathName ++ GLenum fontTarget ++ const void *fontName ++ GLbitfield fontStyle ++ GLuint firstGlyphIndex ++ GLsizei numGlyphs ++ GLuint pathParameterTemplate ++ GLfloat emScale ++ ++ ++ GLenum glPathGlyphIndexRangeNV ++ GLenum fontTarget ++ const void *fontName ++ GLbitfield fontStyle ++ GLuint pathParameterTemplate ++ GLfloat emScale ++ GLuint baseAndCount[2] ++ ++ + void glPathGlyphRangeNV + GLuint firstPathName + GLenum fontTarget +@@ -18734,6 +20026,18 @@ typedef unsigned int GLhandleARB; + GLfloat emScale + + ++ GLenum glPathMemoryGlyphIndexArrayNV ++ GLuint firstPathName ++ GLenum fontTarget ++ GLsizeiptr fontSize ++ const void *fontData ++ GLsizei faceIndex ++ GLuint firstGlyphIndex ++ GLsizei numGlyphs ++ GLuint pathParameterTemplate ++ GLfloat emScale ++ ++ + void glPathParameterfNV + GLuint path + GLenum pname +@@ -19104,6 +20408,13 @@ typedef unsigned int GLhandleARB; + GLfixed units + + ++ void glPolygonOffsetClampEXT ++ GLfloat factor ++ GLfloat units ++ GLfloat clamp ++ ++ ++ + void glPolygonStipple + const GLubyte *mask + +@@ -19165,6 +20476,17 @@ typedef unsigned int GLhandleARB; + GLuint key1 + + ++ void glPrimitiveBoundingBoxEXT ++ GLfloat minX ++ GLfloat minY ++ GLfloat minZ ++ GLfloat minW ++ GLfloat maxX ++ GLfloat maxY ++ GLfloat maxZ ++ GLfloat maxW ++ ++ + void glPrimitiveRestartIndex + GLuint index + +@@ -19516,6 +20838,14 @@ typedef unsigned int GLhandleARB; + + + ++ void glProgramPathFragmentInputGenNV ++ GLuint program ++ GLint location ++ GLenum genMode ++ GLint components ++ const GLfloat *coeffs ++ ++ + void glProgramStringARB + GLenum target + GLenum format +@@ -20723,7 +22053,7 @@ typedef unsigned int GLhandleARB; + + + void glReadBuffer +- GLenum mode ++ GLenum src + + + +@@ -20753,6 +22083,17 @@ typedef unsigned int GLhandleARB; + + + ++ void glReadnPixels ++ GLint x ++ GLint y ++ GLsizei width ++ GLsizei height ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *data ++ ++ + void glReadnPixelsARB + GLint x + GLint y +@@ -20762,6 +22103,7 @@ typedef unsigned int GLhandleARB; + GLenum type + GLsizei bufSize + void *data ++ + + + void glReadnPixelsEXT +@@ -20773,6 +22115,19 @@ typedef unsigned int GLhandleARB; + GLenum type + GLsizei bufSize + void *data ++ ++ ++ ++ void glReadnPixelsKHR ++ GLint x ++ GLint y ++ GLsizei width ++ GLsizei height ++ GLenum format ++ GLenum type ++ GLsizei bufSize ++ void *data ++ + + + void glRectd +@@ -21253,12 +22608,26 @@ typedef unsigned int GLhandleARB; + const GLint *param + + ++ void glSamplerParameterIivEXT ++ GLuint sampler ++ GLenum pname ++ const GLint *param ++ ++ ++ + void glSamplerParameterIuiv + GLuint sampler + GLenum pname + const GLuint *param + + ++ void glSamplerParameterIuivEXT ++ GLuint sampler ++ GLenum pname ++ const GLuint *param ++ ++ ++ + void glSamplerParameterf + GLuint sampler + GLenum pname +@@ -21323,6 +22692,13 @@ typedef unsigned int GLhandleARB; + const GLint *v + + ++ void glScissorArrayvNV ++ GLuint first ++ GLsizei count ++ const GLint *v ++ ++ ++ + void glScissorIndexed + GLuint index + GLint left +@@ -21331,11 +22707,26 @@ typedef unsigned int GLhandleARB; + GLsizei height + + ++ void glScissorIndexedNV ++ GLuint index ++ GLint left ++ GLint bottom ++ GLsizei width ++ GLsizei height ++ ++ ++ + void glScissorIndexedv + GLuint index + const GLint *v + + ++ void glScissorIndexedvNV ++ GLuint index ++ const GLint *v ++ ++ ++ + void glSecondaryColor3b + GLbyte red + GLbyte green +@@ -21863,6 +23254,44 @@ typedef unsigned int GLhandleARB; + GLuint mask + + ++ void glStencilThenCoverFillPathInstancedNV ++ GLsizei numPaths ++ GLenum pathNameType ++ const void *paths ++ GLuint pathBase ++ GLenum fillMode ++ GLuint mask ++ GLenum coverMode ++ GLenum transformType ++ const GLfloat *transformValues ++ ++ ++ void glStencilThenCoverFillPathNV ++ GLuint path ++ GLenum fillMode ++ GLuint mask ++ GLenum coverMode ++ ++ ++ void glStencilThenCoverStrokePathInstancedNV ++ GLsizei numPaths ++ GLenum pathNameType ++ const void *paths ++ GLuint pathBase ++ GLint reference ++ GLuint mask ++ GLenum coverMode ++ GLenum transformType ++ const GLfloat *transformValues ++ ++ ++ void glStencilThenCoverStrokePathNV ++ GLuint path ++ GLint reference ++ GLuint mask ++ GLenum coverMode ++ ++ + void glStopInstrumentsSGIX + GLint marker + +@@ -22005,6 +23434,15 @@ typedef unsigned int GLhandleARB; + GLsizeiptr size + + ++ void glTexBufferRangeEXT ++ GLenum target ++ GLenum internalformat ++ GLuint buffer ++ GLintptr offset ++ GLsizeiptr size ++ ++ ++ + void glTexBumpParameterfvATI + GLenum pname + const GLfloat *param +@@ -23092,10 +24530,19 @@ typedef unsigned int GLhandleARB; + + + ++ void glTextureBarrier ++ ++ + void glTextureBarrierNV + + + ++ void glTextureBuffer ++ GLuint texture ++ GLenum internalformat ++ GLuint buffer ++ ++ + void glTextureBufferEXT + GLuint texture + GLenum target +@@ -23103,6 +24550,14 @@ typedef unsigned int GLhandleARB; + GLuint buffer + + ++ void glTextureBufferRange ++ GLuint texture ++ GLenum internalformat ++ GLuint buffer ++ GLintptr offset ++ GLsizei size ++ ++ + void glTextureBufferRangeEXT + GLuint texture + GLenum target +@@ -23228,6 +24683,12 @@ typedef unsigned int GLhandleARB; + GLboolean resident + + ++ void glTextureParameterIiv ++ GLuint texture ++ GLenum pname ++ const GLint *params ++ ++ + void glTextureParameterIivEXT + GLuint texture + GLenum target +@@ -23235,6 +24696,12 @@ typedef unsigned int GLhandleARB; + const GLint *params + + ++ void glTextureParameterIuiv ++ GLuint texture ++ GLenum pname ++ const GLuint *params ++ ++ + void glTextureParameterIuivEXT + GLuint texture + GLenum target +@@ -23242,6 +24709,12 @@ typedef unsigned int GLhandleARB; + const GLuint *params + + ++ void glTextureParameterf ++ GLuint texture ++ GLenum pname ++ GLfloat param ++ ++ + void glTextureParameterfEXT + GLuint texture + GLenum target +@@ -23250,6 +24723,12 @@ typedef unsigned int GLhandleARB; + + + ++ void glTextureParameterfv ++ GLuint texture ++ GLenum pname ++ const GLfloat *param ++ ++ + void glTextureParameterfvEXT + GLuint texture + GLenum target +@@ -23257,6 +24736,12 @@ typedef unsigned int GLhandleARB; + const GLfloat *params + + ++ void glTextureParameteri ++ GLuint texture ++ GLenum pname ++ GLint param ++ ++ + void glTextureParameteriEXT + GLuint texture + GLenum target +@@ -23265,6 +24750,12 @@ typedef unsigned int GLhandleARB; + + + ++ void glTextureParameteriv ++ GLuint texture ++ GLenum pname ++ const GLint *param ++ ++ + void glTextureParameterivEXT + GLuint texture + GLenum target +@@ -23284,6 +24775,13 @@ typedef unsigned int GLhandleARB; + GLuint renderbuffer + + ++ void glTextureStorage1D ++ GLuint texture ++ GLsizei levels ++ GLenum internalformat ++ GLsizei width ++ ++ + void glTextureStorage1DEXT + GLuint texture + GLenum target +@@ -23292,6 +24790,14 @@ typedef unsigned int GLhandleARB; + GLsizei width + + ++ void glTextureStorage2D ++ GLuint texture ++ GLsizei levels ++ GLenum internalformat ++ GLsizei width ++ GLsizei height ++ ++ + void glTextureStorage2DEXT + GLuint texture + GLenum target +@@ -23301,6 +24807,15 @@ typedef unsigned int GLhandleARB; + GLsizei height + + ++ void glTextureStorage2DMultisample ++ GLuint texture ++ GLsizei samples ++ GLenum internalformat ++ GLsizei width ++ GLsizei height ++ GLboolean fixedsamplelocations ++ ++ + void glTextureStorage2DMultisampleEXT + GLuint texture + GLenum target +@@ -23311,6 +24826,15 @@ typedef unsigned int GLhandleARB; + GLboolean fixedsamplelocations + + ++ void glTextureStorage3D ++ GLuint texture ++ GLsizei levels ++ GLenum internalformat ++ GLsizei width ++ GLsizei height ++ GLsizei depth ++ ++ + void glTextureStorage3DEXT + GLuint texture + GLenum target +@@ -23321,6 +24845,16 @@ typedef unsigned int GLhandleARB; + GLsizei depth + + ++ void glTextureStorage3DMultisample ++ GLuint texture ++ GLsizei samples ++ GLenum internalformat ++ GLsizei width ++ GLsizei height ++ GLsizei depth ++ GLboolean fixedsamplelocations ++ ++ + void glTextureStorage3DMultisampleEXT + GLuint texture + GLenum target +@@ -23343,6 +24877,16 @@ typedef unsigned int GLhandleARB; + GLbitfield flags + + ++ void glTextureSubImage1D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLsizei width ++ GLenum format ++ GLenum type ++ const void *pixels ++ ++ + void glTextureSubImage1DEXT + GLuint texture + GLenum target +@@ -23354,6 +24898,18 @@ typedef unsigned int GLhandleARB; + const void *pixels + + ++ void glTextureSubImage2D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLsizei width ++ GLsizei height ++ GLenum format ++ GLenum type ++ const void *pixels ++ ++ + void glTextureSubImage2DEXT + GLuint texture + GLenum target +@@ -23367,6 +24923,20 @@ typedef unsigned int GLhandleARB; + const void *pixels + + ++ void glTextureSubImage3D ++ GLuint texture ++ GLint level ++ GLint xoffset ++ GLint yoffset ++ GLint zoffset ++ GLsizei width ++ GLsizei height ++ GLsizei depth ++ GLenum format ++ GLenum type ++ const void *pixels ++ ++ + void glTextureSubImage3DEXT + GLuint texture + GLenum target +@@ -23393,6 +24963,18 @@ typedef unsigned int GLhandleARB; + GLuint numlayers + + ++ void glTextureViewEXT ++ GLuint texture ++ GLenum target ++ GLuint origtexture ++ GLenum internalformat ++ GLuint minlevel ++ GLuint numlevels ++ GLuint minlayer ++ GLuint numlayers ++ ++ ++ + void glTrackMatrixNV + GLenum target + GLuint address +@@ -23402,11 +24984,25 @@ typedef unsigned int GLhandleARB; + + + void glTransformFeedbackAttribsNV +- GLuint count ++ GLsizei count + const GLint *attribs + GLenum bufferMode + + ++ void glTransformFeedbackBufferBase ++ GLuint xfb ++ GLuint index ++ GLuint buffer ++ ++ ++ void glTransformFeedbackBufferRange ++ GLuint xfb ++ GLuint index ++ GLuint buffer ++ GLintptr offset ++ GLsizei size ++ ++ + void glTransformFeedbackStreamAttribsNV + GLsizei count + const GLint *attribs +@@ -23478,7 +25074,7 @@ typedef unsigned int GLhandleARB; + void glUniform1dv + GLint location + GLsizei count +- const GLdouble *value ++ const GLdouble *value + + + void glUniform1f +@@ -23495,13 +25091,13 @@ typedef unsigned int GLhandleARB; + void glUniform1fv + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + void glUniform1fvARB + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + +@@ -23518,7 +25114,7 @@ typedef unsigned int GLhandleARB; + void glUniform1i64vNV + GLint location + GLsizei count +- const GLint64EXT *value ++ const GLint64EXT *value + + + void glUniform1iARB +@@ -23530,13 +25126,13 @@ typedef unsigned int GLhandleARB; + void glUniform1iv + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + void glUniform1ivARB + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + +@@ -23553,7 +25149,7 @@ typedef unsigned int GLhandleARB; + void glUniform1ui64vNV + GLint location + GLsizei count +- const GLuint64EXT *value ++ const GLuint64EXT *value + + + void glUniform1uiEXT +@@ -23565,13 +25161,13 @@ typedef unsigned int GLhandleARB; + void glUniform1uiv + GLint location + GLsizei count +- const GLuint *value ++ const GLuint *value + + + void glUniform1uivEXT + GLint location + GLsizei count +- const GLuint *value ++ const GLuint *value + + + +@@ -23584,7 +25180,7 @@ typedef unsigned int GLhandleARB; + void glUniform2dv + GLint location + GLsizei count +- const GLdouble *value ++ const GLdouble *value + + + void glUniform2f +@@ -23603,13 +25199,13 @@ typedef unsigned int GLhandleARB; + void glUniform2fv + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + void glUniform2fvARB + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + +@@ -23641,13 +25237,13 @@ typedef unsigned int GLhandleARB; + void glUniform2iv + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + void glUniform2ivARB + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + +@@ -23699,7 +25295,7 @@ typedef unsigned int GLhandleARB; + void glUniform3dv + GLint location + GLsizei count +- const GLdouble *value ++ const GLdouble *value + + + void glUniform3f +@@ -23720,13 +25316,13 @@ typedef unsigned int GLhandleARB; + void glUniform3fv + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + void glUniform3fvARB + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + +@@ -23761,13 +25357,13 @@ typedef unsigned int GLhandleARB; + void glUniform3iv + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + void glUniform3ivARB + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + +@@ -23823,7 +25419,7 @@ typedef unsigned int GLhandleARB; + void glUniform4dv + GLint location + GLsizei count +- const GLdouble *value ++ const GLdouble *value + + + void glUniform4f +@@ -23846,13 +25442,13 @@ typedef unsigned int GLhandleARB; + void glUniform4fv + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + void glUniform4fvARB + GLint location + GLsizei count +- const GLfloat *value ++ const GLfloat *value + + + +@@ -23890,13 +25486,13 @@ typedef unsigned int GLhandleARB; + void glUniform4iv + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + void glUniform4ivARB + GLint location + GLsizei count +- const GLint *value ++ const GLint *value + + + +@@ -23982,21 +25578,21 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix2fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + void glUniformMatrix2fvARB + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24004,14 +25600,14 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix2x3fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24019,7 +25615,7 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24027,14 +25623,14 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix2x4fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24042,7 +25638,7 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24050,21 +25646,21 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix3fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + void glUniformMatrix3fvARB + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24072,14 +25668,14 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix3x2fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24087,7 +25683,7 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24095,14 +25691,14 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix3x4fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24110,7 +25706,7 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24118,21 +25714,21 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix4fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + void glUniformMatrix4fvARB + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24140,14 +25736,14 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix4x2fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24155,7 +25751,7 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24163,14 +25759,14 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLdouble *value ++ const GLdouble *value + + + void glUniformMatrix4x3fv + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24178,7 +25774,7 @@ typedef unsigned int GLhandleARB; + GLint location + GLsizei count + GLboolean transpose +- const GLfloat *value ++ const GLfloat *value + + + +@@ -24196,7 +25792,7 @@ typedef unsigned int GLhandleARB; + void glUniformui64vNV + GLint location + GLsizei count +- const GLuint64EXT *value ++ const GLuint64EXT *value + + + void glUnlockArraysEXT +@@ -24216,6 +25812,10 @@ typedef unsigned int GLhandleARB; + + + ++ GLboolean glUnmapNamedBuffer ++ GLuint buffer ++ ++ + GLboolean glUnmapNamedBufferEXT + GLuint buffer + +@@ -24390,6 +25990,7 @@ typedef unsigned int GLhandleARB; + + void glVertex2bOES + GLbyte x ++ GLbyte y + + + void glVertex2bvOES +@@ -24462,6 +26063,7 @@ typedef unsigned int GLhandleARB; + void glVertex3bOES + GLbyte x + GLbyte y ++ GLbyte z + + + void glVertex3bvOES +@@ -24541,6 +26143,7 @@ typedef unsigned int GLhandleARB; + GLbyte x + GLbyte y + GLbyte z ++ GLbyte w + + + void glVertex4bvOES +@@ -24622,6 +26225,37 @@ typedef unsigned int GLhandleARB; + const GLfixed *coords + + ++ void glVertexArrayAttribBinding ++ GLuint vaobj ++ GLuint attribindex ++ GLuint bindingindex ++ ++ ++ void glVertexArrayAttribFormat ++ GLuint vaobj ++ GLuint attribindex ++ GLint size ++ GLenum type ++ GLboolean normalized ++ GLuint relativeoffset ++ ++ ++ void glVertexArrayAttribIFormat ++ GLuint vaobj ++ GLuint attribindex ++ GLint size ++ GLenum type ++ GLuint relativeoffset ++ ++ ++ void glVertexArrayAttribLFormat ++ GLuint vaobj ++ GLuint attribindex ++ GLint size ++ GLenum type ++ GLuint relativeoffset ++ ++ + void glVertexArrayBindVertexBufferEXT + GLuint vaobj + GLuint bindingindex +@@ -24630,6 +26264,12 @@ typedef unsigned int GLhandleARB; + GLsizei stride + + ++ void glVertexArrayBindingDivisor ++ GLuint vaobj ++ GLuint bindingindex ++ GLuint divisor ++ ++ + void glVertexArrayColorOffsetEXT + GLuint vaobj + GLuint buffer +@@ -24646,6 +26286,11 @@ typedef unsigned int GLhandleARB; + GLintptr offset + + ++ void glVertexArrayElementBuffer ++ GLuint vaobj ++ GLuint buffer ++ ++ + void glVertexArrayFogCoordOffsetEXT + GLuint vaobj + GLuint buffer +@@ -24787,6 +26432,23 @@ typedef unsigned int GLhandleARB; + GLuint divisor + + ++ void glVertexArrayVertexBuffer ++ GLuint vaobj ++ GLuint bindingindex ++ GLuint buffer ++ GLintptr offset ++ GLsizei stride ++ ++ ++ void glVertexArrayVertexBuffers ++ GLuint vaobj ++ GLuint first ++ GLsizei count ++ const GLuint *buffers ++ const GLintptr *offsets ++ const GLsizei *strides ++ ++ + void glVertexArrayVertexOffsetEXT + GLuint vaobj + GLuint buffer +@@ -26670,6 +28332,13 @@ typedef unsigned int GLhandleARB; + const GLfloat *v + + ++ void glViewportArrayvNV ++ GLuint first ++ GLsizei count ++ const GLfloat *v ++ ++ ++ + void glViewportIndexedf + GLuint index + GLfloat x +@@ -26678,11 +28347,26 @@ typedef unsigned int GLhandleARB; + GLfloat h + + ++ void glViewportIndexedfNV ++ GLuint index ++ GLfloat x ++ GLfloat y ++ GLfloat w ++ GLfloat h ++ ++ ++ + void glViewportIndexedfv + GLuint index + const GLfloat *v + + ++ void glViewportIndexedfvNV ++ GLuint index ++ const GLfloat *v ++ ++ ++ + void glWaitSync + GLsync sync + GLbitfield flags +@@ -27121,6 +28805,51 @@ typedef unsigned int GLhandleARB; + GLenum outZ + GLenum outW + ++ ++ void glCoverageModulationNV ++ GLenum components ++ ++ ++ void glCoverageModulationTableNV ++ GLsizei n ++ const GLfloat *v ++ ++ ++ void glFragmentCoverageColorNV ++ GLuint color ++ ++ ++ void glFramebufferSampleLocationsfvNV ++ GLenum target ++ GLuint start ++ GLsizei count ++ const GLfloat *v ++ ++ ++ void glGetCoverageModulationTableNV ++ GLsizei bufsize ++ GLfloat *v ++ ++ ++ void glNamedFramebufferSampleLocationsfvNV ++ GLuint framebuffer ++ GLuint start ++ GLsizei count ++ const GLfloat *v ++ ++ ++ void glRasterSamplesEXT ++ GLuint samples ++ GLboolean fixedsamplelocations ++ ++ ++ void glResolveDepthValuesNV ++ ++ ++ void glSubpixelPrecisionBiasNV ++ GLuint xbits ++ GLuint ybits ++ + + + +@@ -28955,11 +30684,13 @@ typedef unsigned int GLhandleARB; + + + ++ + + + + + ++ + + + +@@ -28978,6 +30709,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -30303,6 +32035,12 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ + + + +@@ -30523,6 +32261,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -30940,6 +32679,192 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -32675,6 +34600,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -32757,7 +34683,6 @@ typedef unsigned int GLhandleARB; + + + +- + + + +@@ -32885,8 +34810,31 @@ typedef unsigned int GLhandleARB; + + + +- +- ++ ++ ++ ++ + + + +@@ -32968,6 +34916,20 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -33099,10 +35061,7 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ + + + +@@ -33116,6 +35075,14 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -33209,6 +35176,12 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ + + + +@@ -33300,6 +35273,17 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -33359,12 +35343,18 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ + + + +- + +- + + + +@@ -33374,6 +35364,12 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ + + + +@@ -33425,6 +35421,140 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -33638,11 +35768,6 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- +- + + + +@@ -33721,8 +35846,6 @@ typedef unsigned int GLhandleARB; + + + +- +- + + + +@@ -33769,6 +35892,12 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ + + + +@@ -34252,6 +36381,21 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -34730,10 +36874,8 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ ++ + + + +@@ -34766,11 +36908,24 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + +- ++ + + + +@@ -34856,6 +37011,11 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ + + + +@@ -35148,9 +37308,7 @@ typedef unsigned int GLhandleARB; + + + +- + +- + + + +@@ -35178,6 +37336,12 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ + + + +@@ -36069,6 +38233,13 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ + + + +@@ -36087,6 +38258,13 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ + + + +@@ -36264,6 +38442,11 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ + + + +@@ -36745,6 +38928,54 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -36876,6 +39107,45 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -36950,6 +39220,9 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ + + + +@@ -37006,10 +39279,7 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ + + + +@@ -37047,16 +39317,19 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ + + + + + + ++ ++ ++ ++ ++ ++ + + + +@@ -37184,10 +39457,7 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ + + + +@@ -37206,6 +39476,19 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37221,6 +39504,19 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37230,6 +39526,18 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37367,6 +39675,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -37428,7 +39737,9 @@ typedef unsigned int GLhandleARB; + + + ++ + ++ + + + +@@ -37451,6 +39762,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -37477,6 +39789,59 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37550,6 +39915,41 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37608,10 +40008,20 @@ typedef unsigned int GLhandleARB; + + + +- ++ + ++ ++ ++ ++ ++ ++ ++ ++ ++ + + ++ + + + +@@ -37649,6 +40059,17 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37725,6 +40146,18 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -37867,6 +40300,16 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -38428,25 +40871,41 @@ typedef unsigned int GLhandleARB; + + + +- ++ + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -38561,6 +41020,41 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -38701,7 +41195,13 @@ typedef unsigned int GLhandleARB; + + + +- ++ ++ ++ ++ ++ ++ ++ + + + +@@ -38787,7 +41287,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -38797,6 +41297,15 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -38996,6 +41505,11 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ + + + +@@ -39023,6 +41537,13 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ + + + +@@ -39052,6 +41573,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -39061,6 +41583,28 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -39103,10 +41647,8 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ ++ + + + +@@ -39269,12 +41811,25 @@ typedef unsigned int GLhandleARB; + + + ++ + + + + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -39342,7 +41897,7 @@ typedef unsigned int GLhandleARB; + + + +- ++ + + + +@@ -39396,13 +41951,11 @@ typedef unsigned int GLhandleARB; + + + +- + + + + + +- + + + +@@ -39471,9 +42024,6 @@ typedef unsigned int GLhandleARB; + + + +- +- +- + + + +@@ -39500,9 +42050,6 @@ typedef unsigned int GLhandleARB; + + + +- +- +- + + + +@@ -39515,15 +42062,80 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- + + + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -39653,6 +42265,11 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ + + + +@@ -39674,8 +42291,26 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + ++ ++ + + + +@@ -39704,6 +42339,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -39713,7 +42349,6 @@ typedef unsigned int GLhandleARB; + + + +- + + + +@@ -39787,10 +42422,7 @@ typedef unsigned int GLhandleARB; + + + +- +- +- +- ++ + + + +@@ -39966,6 +42598,13 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ + + + +@@ -40303,6 +42942,31 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -40348,6 +43012,10 @@ typedef unsigned int GLhandleARB; + + + ++ ++ ++ ++ + + + +@@ -40372,6 +43040,7 @@ typedef unsigned int GLhandleARB; + + + ++ + + + +@@ -40713,22 +43382,18 @@ typedef unsigned int GLhandleARB; + + + +- +- +- ++ ++ ++ + + +- +- +- +- +- +- ++ ++ + + +- +- +- ++ ++ ++ + + + +@@ -40887,8 +43552,8 @@ typedef unsigned int GLhandleARB; + + + +- +- ++ ++ + + + +diff --git a/registry/glx.xml b/registry/glx.xml +index 224f893..025e9f9 100644 +--- a/registry/glx.xml ++++ b/registry/glx.xml +@@ -84,11 +84,14 @@ typedef unsigned __int64 uint64_t; + + + ++ + + + + ++ + ++ + + + +@@ -331,6 +334,7 @@ typedef unsigned __int64 uint64_t; + + + ++ + + + +@@ -385,7 +389,9 @@ typedef unsigned __int64 uint64_t; + + + +- ++ ++ ++ + + + +@@ -677,6 +683,20 @@ typedef unsigned __int64 uint64_t; + int iVideoBuffer + + ++ void glXBlitContextFramebufferAMD ++ GLXContext dstCtx ++ GLint srcX0 ++ GLint srcY0 ++ GLint srcX1 ++ GLint srcY1 ++ GLint dstX0 ++ GLint dstY0 ++ GLint dstX1 ++ GLint dstY1 ++ GLbitfield mask ++ GLenum filter ++ ++ + int glXChannelRectSGIX + Display *display + int screen +@@ -714,6 +734,28 @@ typedef unsigned __int64 uint64_t; + int *attribList + + ++ void glXCopyBufferSubDataNV ++ Display *dpy ++ GLXContext readCtx ++ GLXContext writeCtx ++ GLenum readTarget ++ GLenum writeTarget ++ GLintptr readOffset ++ GLintptr writeOffset ++ GLsizeiptr size ++ ++ ++ void glXNamedCopyBufferSubDataNV ++ Display *dpy ++ GLXContext readCtx ++ GLXContext writeCtx ++ GLuint readBuffer ++ GLuint writeBuffer ++ GLintptr readOffset ++ GLintptr writeOffset ++ GLsizeiptr size ++ ++ + void glXCopyContext + Display *dpy + GLXContext src +@@ -751,6 +793,17 @@ typedef unsigned __int64 uint64_t; + int height + + ++ GLXContext glXCreateAssociatedContextAMD ++ unsigned int id ++ GLXContext share_list ++ ++ ++ GLXContext glXCreateAssociatedContextAttribsAMD ++ unsigned int id ++ GLXContext share_context ++ const int *attribList ++ ++ + GLXContext glXCreateContextAttribsARB + Display *dpy + GLXFBConfig config +@@ -850,6 +903,10 @@ typedef unsigned __int64 uint64_t; + GLfloat seconds + + ++ Bool glXDeleteAssociatedContextAMD ++ GLXContext ctx ++ ++ + void glXDestroyContext + Display *dpy + GLXContext ctx +@@ -896,11 +953,21 @@ typedef unsigned __int64 uint64_t; + int *nelements + + ++ unsigned int *glXEnumerateVideoDevicesNV ++ Display *dpy ++ int screen ++ int *nelements ++ ++ + void glXFreeContextEXT + Display *dpy + GLXContext context + + ++ unsigned int glXGetAGPOffsetMESA ++ const void *pointer ++ ++ + const char *glXGetClientString + Display *dpy + int name +@@ -913,10 +980,17 @@ typedef unsigned __int64 uint64_t; + int *value + + ++ unsigned int glXGetContextGPUIDAMD ++ GLXContext ctx ++ ++ + GLXContextID glXGetContextIDEXT + const GLXContext context + + ++ GLXContext glXGetCurrentAssociatedContextAMD ++ ++ + GLXContext glXGetCurrentContext + + +@@ -960,6 +1034,19 @@ typedef unsigned __int64 uint64_t; + int *nelements + + ++ unsigned int glXGetGPUIDsAMD ++ unsigned int maxCount ++ unsigned int *ids ++ ++ ++ int glXGetGPUInfoAMD ++ unsigned int id ++ int property ++ GLenum dataType ++ unsigned int size ++ void *data ++ ++ + Bool glXGetMscRateOML + Display *dpy + GLXDrawable drawable +@@ -1074,6 +1161,10 @@ typedef unsigned __int64 uint64_t; + GLXVideoCaptureDeviceNV device + + ++ Bool glXMakeAssociatedContextCurrentAMD ++ GLXContext ctx ++ ++ + Bool glXMakeContextCurrent + Display *dpy + GLXDrawable draw +@@ -1367,16 +1458,6 @@ typedef unsigned __int64 uint64_t; + + void glXWaitX + +- +- unsigned int *glXEnumerateVideoDevicesNV +- Display *dpy +- int screen +- int *nelements +- +- +- unsigned int glXGetAGPOffsetMESA +- const void *pointer +- + + + +@@ -1559,6 +1640,22 @@ typedef unsigned __int64 uint64_t; + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1803,6 +1900,12 @@ typedef unsigned __int64 uint64_t; + + + ++ ++ ++ ++ ++ ++ + + + +@@ -1853,7 +1956,7 @@ typedef unsigned __int64 uint64_t; + + + +- ++ + + + +diff --git a/registry/wgl.xml b/registry/wgl.xml +index 102185a..55569d9 100644 +--- a/registry/wgl.xml ++++ b/registry/wgl.xml +@@ -168,6 +168,7 @@ + extensions and API versions). --> + + ++ + + + +@@ -326,11 +327,11 @@ + + + +- ++ + + + +- ++ + + + +@@ -372,7 +373,9 @@ + + + +- ++ ++ ++ + + + +@@ -1373,6 +1376,44 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1385,15 +1426,80 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + + + +- ++ + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1452,29 +1558,9 @@ + + + +- +- +- +- +- +- +- +- +- ++ + +- +- +- +- +- +- +- +- +- +- +- +- +- ++ + + + +@@ -1517,52 +1603,34 @@ + + + +- +- +- +- +- +- ++ + +- ++ + + +- ++ + +- +- +- +- +- +- +- +- ++ + + +- ++ + +- +- +- +- ++ + + +- ++ + +- +- +- +- ++ + + +- ++ + +- ++ + + +- ++ + +- ++ + + + +@@ -1578,6 +1646,11 @@ + + + ++ ++ ++ ++ ++ + + + +@@ -1585,6 +1658,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + +@@ -1655,43 +1734,19 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ + +- +- ++ + + +- ++ + +- +- ++ ++ + + +- ++ + +- +- +- +- +- +- + + + +@@ -1765,9 +1820,33 @@ + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- + + + +@@ -1783,23 +1862,21 @@ + + + +- +- +- +- +- +- +- +- +- +- ++ + +- ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- ++ ++ + + + +@@ -1810,29 +1887,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + +@@ -1859,40 +1913,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + +@@ -1904,53 +1924,43 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + ++ ++ + + +- ++ + +- ++ ++ ++ ++ ++ ++ + + + diff --git a/mingw-w64-libepoxy/PKGBUILD b/mingw-w64-libepoxy/PKGBUILD new file mode 100644 index 0000000000..8fcd77e50c --- /dev/null +++ b/mingw-w64-libepoxy/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Ignacio Casal Quinteiro + +_realname=libepoxy +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.3.1 +pkgrel=1 +pkgdesc="A library for handling OpenGL function pointer management for you. (mingw-w64)" +arch=('any') +url="https://github.com/anholt/libepoxy" +license=("MIT") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python3" + "util-macros") +options=('strip' 'staticlibs') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/anholt/${_realname}/archive/v${pkgver}.tar.gz) +sha256sums=('6700ddedffb827b42c72cce1e0be6fba67b678b19bf256e1b5efd3ea38cc2bb4') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + + autoreconf -fi +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libevent/PKGBUILD b/mingw-w64-libevent/PKGBUILD new file mode 100644 index 0000000000..e14514f623 --- /dev/null +++ b/mingw-w64-libevent/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Alexey Pavlov +# Maintainer: Chilledheart + +_realname=libevent +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.0.22 +pkgrel=2 +pkgdesc="An event notification library" +arch=('any') +url="http://www.monkey.org/~provos/libevent/" +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-python2") +optdepends=("${MINGW_PACKAGE_PREFIX}-python2") +source=(https://sourceforge.net/projects/levent/files/${_realname}/${_realname}-2.0/${_realname}-${pkgver}-stable.tar.gz) +md5sums=('c4c56f986aa985677ca1db89630a2e11') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}-stable" +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}-stable/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --sysconfdir=${MINGW_PREFIX}/etc + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libexif/PKGBUILD b/mingw-w64-libexif/PKGBUILD index c51c89bc7b..b2ba1a5859 100644 --- a/mingw-w64-libexif/PKGBUILD +++ b/mingw-w64-libexif/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libexif - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.6.21 -pkgrel=2 +pkgrel=3 pkgdesc="A library to parse an EXIF file and read the data from those tags (mingw-w64)" arch=('any') url="http://sourceforge.net/projects/libexif" @@ -16,21 +15,23 @@ source=("http://downloads.sf.net/sourceforge/libexif/libexif-${pkgver}.tar.bz2") md5sums=('27339b89850f28c8f1c237f233e05b27') build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-docs \ --enable-shared \ - --disable-static + --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-libfbclient/PKGBUILD b/mingw-w64-libfbclient/PKGBUILD deleted file mode 100644 index 989b557a33..0000000000 --- a/mingw-w64-libfbclient/PKGBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Maintainer: Alexey Pavlov - -_realname=libfbclient - -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.5.2.26540 -pkgrel=1 -pkgdesc="Firebird client libraries (mingw-w64)" -arch=('any') -url="http://firebirdsql.org" -license=('GPL') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=("${MINGW_PACKAGE_PREFIX}-crt") -options=('!strip' 'staticlibs') -source=("http://sourceforge.net/projects/firebird/files/firebird-win32/2.5.2-Release/Firebird-2.5.2.26540-0_Win32.zip" - "http://sourceforge.net/projects/firebird/files/firebird-win64/2.5.2-Release/Firebird-2.5.2.26540-0_x64.zip") -sha256sums=('4cb43b9b1906418980622a18c313a35196b896821fbaeb61742971f79f32b951' - 'b7074980e4dcd4880ac0385ed272bb40d1eb33b4f047c1cb10bb42fefdb864f0') -noextract=("Firebird-2.5.2.26540-0_Win32.zip" "Firebird-2.5.2.26540-0_x64.zip") - -prepare() { - mkdir ${srcdir}/${MINGW_CHOST} - case ${MINGW_CHOST} in - i686*) - [ -d $srcdir/$pkgname-$_ver ] || /bin/bsdtar -xf ${startdir}/Firebird-2.5.2.26540-0_Win32.zip -C ${srcdir}/${MINGW_CHOST} - ;; - x86_64*) - [ -d $srcdir/$pkgname-$_ver ] || /bin/bsdtar -xf ${startdir}/Firebird-2.5.2.26540-0_x64.zip -C ${srcdir}/${MINGW_CHOST} - ;; - esac -} - -package() { - cd "${srcdir}/${MINGW_CHOST}" - mkdir -p "${pkgdir}${MINGW_PREFIX}/"{bin,include,lib} - cp -R include "${pkgdir}${MINGW_PREFIX}" - install -Dm644 lib/fbclient_ms.lib "${pkgdir}${MINGW_PREFIX}/lib/fbclient_ms.lib" - install -Dm644 bin/fbclient.dll "${pkgdir}${MINGW_PREFIX}/bin/fbclient.dll" -} diff --git a/mingw-w64-libffi/PKGBUILD b/mingw-w64-libffi/PKGBUILD index 98c80ddbe7..29b3f8324e 100644 --- a/mingw-w64-libffi/PKGBUILD +++ b/mingw-w64-libffi/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=libffi pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.2.1 -pkgrel=1 +pkgrel=3 pkgdesc="A portable, high level programming interface to various calling conventions (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') license=('MIT') @@ -19,6 +19,7 @@ prepare() { } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ @@ -32,4 +33,5 @@ build() { package() { cd "${srcdir}/build-${CARCH}" make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-libfreexl/PKGBUILD b/mingw-w64-libfreexl/PKGBUILD index d7fb510ded..43cf16d65c 100644 --- a/mingw-w64-libfreexl/PKGBUILD +++ b/mingw-w64-libfreexl/PKGBUILD @@ -5,17 +5,17 @@ _realname=libfreexl pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.0g -pkgrel=4 +pkgver=1.0.2 +pkgrel=1 pkgdesc="Library to extract valid data from within an Excel (.xls) spreadsheet" arch=('any') url="https://www.gaia-gis.it/fossil/freexl" license=('MPL' 'GPL' 'LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libiconv") options=(strip) -source=("http://www.gaia-gis.it/gaia-sins/freexl-$pkgver.tar.gz" +source=("http://www.gaia-gis.it/gaia-sins/freexl-${pkgver}.tar.gz" "01-fix-pkgconfig.patch") -sha256sums=('cf2b110f5fc7089fa61c7421f59caa4125b13087b4686ed82dba7abedf2ec266' +sha256sums=('b39a4814a0f53f5e09a9192c41e3e51bd658843f770399023a963eb064f6409d' 'bc6facd7b0bde308d442962b350fa1894cd6605412ae4665775be745069e4ea5') prepare() { diff --git a/mingw-w64-libftdi/PKGBUILD b/mingw-w64-libftdi/PKGBUILD new file mode 100644 index 0000000000..a26b02c825 --- /dev/null +++ b/mingw-w64-libftdi/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: David Grayson + +_realname=libftdi +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.2 +pkgrel=1 +pkgdesc='Library to talk to FTDI chips, with Python 2 bindings (mingw-w64)' +arch=('any') +url="https://www.intra2net.com/en/developer/libftdi/" +license=('LGPL', 'GPL') +makedepends=( + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-swig" + "${MINGW_PACKAGE_PREFIX}-python2" +) +depends=( + "${MINGW_PACKAGE_PREFIX}-libusb" + "${MINGW_PACKAGE_PREFIX}-confuse" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-libiconv" +) +options=('staticlibs' 'strip') +source=( + "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-${pkgver}.tar.bz2" +) + +sha256sums=('a6ea795c829219015eb372b03008351cee3fb39f684bff3bf8a4620b558488d6') + +build() { + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DEXAMPLES=Off \ + -DPYTHON_BINDINGS=On \ + "../${_realname}1-${pkgver}/" + + make +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + PATH=$PATH:"${srcdir}/build-${MINGW_CHOST}/src" make check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + cd "${srcdir}/${_realname}1-${pkgver}" + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" + cp COPYING* "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" + + sed -i "s;$(cygpath -m /);/;" \ + "${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}1"/*.cmake +} diff --git a/mingw-w64-libgadu/PKGBUILD b/mingw-w64-libgadu/PKGBUILD index 0bf0e49492..eb9495554a 100644 --- a/mingw-w64-libgadu/PKGBUILD +++ b/mingw-w64-libgadu/PKGBUILD @@ -2,7 +2,7 @@ _realname=libgadu pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.12.0 +pkgver=1.12.1 pkgrel=1 pkgdesc="This library implements the client side of the Gadu-Gadu protocol (mingw-w64)" arch=('any') @@ -10,22 +10,18 @@ url="http://libgadu.net" license=("LGPL2.1") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gnutls" "${MINGW_PACKAGE_PREFIX}-protobuf-c") -groups=("${MINGW_PACKAGE_PREFIX}") options=('staticlibs' 'strip') -source=("http://github.com/wojtekka/libgadu/releases/download/${pkgver}/${_realname}-${pkgver}.tar.gz" - protobuf-c.patch) -md5sums=('e4569a0ed26136c4634fa8c4013910e3' - '893ce50093458407ad688f12f999b106') +source=("http://github.com/wojtekka/libgadu/releases/download/${pkgver}/${_realname}-${pkgver}.tar.gz") +md5sums=('6de8b26f3b9155a67f549ced6da93c56') prepare() { - cd "$srcdir/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/protobuf-c.patch - - ./protobufgen.sh + cd "${srcdir}/${_realname}-${pkgver}" } build() { - mkdir -p $srcdir/build-${CARCH} && cd $srcdir/build-${CARCH} + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -38,11 +34,11 @@ build() { } check() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libgcrypt/PKGBUILD b/mingw-w64-libgcrypt/PKGBUILD index b401078648..2806ba2e89 100644 --- a/mingw-w64-libgcrypt/PKGBUILD +++ b/mingw-w64-libgcrypt/PKGBUILD @@ -1,31 +1,28 @@ # Maintainer: Alexey Pavlov _realname=libgcrypt +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.6.2 +pkgver=1.6.4 pkgrel=1 pkgdesc="General purpose cryptographic library based on the code from GnuPG (mingw-w64)" arch=('any') url="http://www.gnupg.org" license=('LGPL') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libgpg-error") -groups=("${MINGW_PACKAGE_PREFIX}") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libgpg-error" "${MINGW_PACKAGE_PREFIX}-ghostscript") # "transfig" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libgpg-error") # "transfig" "${MINGW_PACKAGE_PREFIX}-ghostscript" options=('staticlibs' 'strip') -source=("ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${pkgver}.tar.bz2" - 'libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch' +source=("ftp://ftp.gnupg.org/gcrypt/libgcrypt/${_realname}-${pkgver}.tar.bz2" 'libgcrypt-use-correct-def-file.patch' 'libgcrypt-use-correct-asm-code-for-win64.patch' 'Smarter-fig2dev-detection.all.patch') -md5sums=('b54395a93cb1e57619943c082da09d5f' - '7bb247584a66a83677c618aec812ca9b' +md5sums=('4c13c5fa43147866f993d73ee62af176' '531e089caca74b5daf130b7173c2a5c5' '5c7326890ac7b6304d31edfdc97063f6' 'c29a3e3e1664229eca2198c2328af5f4') prepare() { - cd "${srcdir}/libgcrypt-${pkgver}" - patch -p0 -i "$srcdir"/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch + cd "${srcdir}/${_realname}-${pkgver}" patch -p0 -i "$srcdir"/libgcrypt-use-correct-def-file.patch #patch -p0 -i "$srcdir"/libgcrypt-use-correct-asm-code-for-win64.patch patch -p1 -i "$srcdir"/Smarter-fig2dev-detection.all.patch @@ -34,8 +31,8 @@ prepare() { } build() { - cp -r "$srcdir/libgcrypt-${pkgver}" "$srcdir/build-${CARCH}" - cd "$srcdir/build-${CARCH}" + cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" [[ $CARCH == x86_64 ]] && BUILD_ASM="--disable-asm --disable-padlock-support" || BUILD_ASM="" ./configure \ --prefix=${MINGW_PREFIX} \ @@ -43,14 +40,14 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ - --disable-static \ + --enable-static \ $BUILD_ASM \ --with-gpg-error-prefix=${MINGW_PREFIX} make } package() { - cd "$srcdir/build-${CARCH}" - make DESTDIR="$pkgdir" install -j1 + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install -j1 find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-libgcrypt/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch b/mingw-w64-libgcrypt/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch deleted file mode 100644 index 86924eb483..0000000000 --- a/mingw-w64-libgcrypt/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- random/rndw32.c.orig 2011-07-04 19:11:18.137525831 +0200 -+++ random/rndw32.c 2011-07-04 19:11:40.785404249 +0200 -@@ -887,7 +887,7 @@ - { - HANDLE handle; - FILETIME creationTime, exitTime, kernelTime, userTime; -- DWORD minimumWorkingSetSize, maximumWorkingSetSize; -+ SIZE_T minimumWorkingSetSize, maximumWorkingSetSize; - - handle = GetCurrentThread (); - GetThreadTimes (handle, &creationTime, &exitTime, diff --git a/mingw-w64-libgda/PKGBUILD b/mingw-w64-libgda/PKGBUILD index 7efbe6eba0..24e550460a 100644 --- a/mingw-w64-libgda/PKGBUILD +++ b/mingw-w64-libgda/PKGBUILD @@ -2,45 +2,46 @@ _realname=libgda pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.2.2 +pkgver=5.2.4 pkgrel=1 arch=('any') pkgdesc="Data abstraction library based on GLib (mingw-w64)" license=("LGPL 2") url="http://www.gnome.org" depends=("${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-gtksourceview3" "${MINGW_PACKAGE_PREFIX}-goocanvas" - "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-iso-codes" "${MINGW_PACKAGE_PREFIX}-json-glib" "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" "${MINGW_PACKAGE_PREFIX}-glade") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" - "${MINGW_PACKAGE_PREFIX}-gnome-doc-utils" "${MINGW_PACKAGE_PREFIX}-iso-codes" - "${MINGW_PACKAGE_PREFIX}-db" - "${MINGW_PACKAGE_PREFIX}-libfbclient" + #"${MINGW_PACKAGE_PREFIX}-db" + "${MINGW_PACKAGE_PREFIX}-firebird2" "${MINGW_PACKAGE_PREFIX}-postgresql" "${MINGW_PACKAGE_PREFIX}-libmariadbclient" "${MINGW_PACKAGE_PREFIX}-openldap" - "flex" - "make" - "libtool" "automake-wrapper" "autoconf" + "flex" "gettext" + "gnome-doc-utils" + "gtk-doc" "libintl" + "libtool" + "make" "patch") options=('strip' '!debug' 'staticlibs') -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:3}/${_realname}-$pkgver.tar.xz +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz 001-lemon.patch 002-mysql-m4.patch 003-give-cc-to-gir-scanner.all.patch 004-add-missing-symbols.patch 005-hack-convert-path-back-to-unix.patch) -sha256sums=('c9b8b1c32f1011e47b73c5dcf36649aaef2f1edaa5f5d75be20d9caadc2bc3e4' +sha256sums=('2cee38dd583ccbaa5bdf6c01ca5f88cc08758b9b144938a51a478eb2684b765e' 'e61c10e41ea2b343c6a50d0cbf1f2912b9d9273882249a998f60cda2f4a94d4c' '5a9959715e63a82e5bf62bb3e6ffbe4d4b587094d13b671e2a676720c765e048' 'a0a2e3ca548feedc6502f29ff0ef5f047bf2a7dabd7722011147872a5aea733b' @@ -60,8 +61,9 @@ prepare() { } build() { - mkdir -p build-${MINGW_CHOST} - cd build-${MINGW_CHOST} + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ @@ -77,11 +79,15 @@ build() { --enable-gi-system-install=no \ --with-ldap=${MINGW_PREFIX} \ --with-mysql=${MINGW_PREFIX} \ - --with-mysql-libdir-name=lib + --with-mysql-libdir-name=lib \ + --with-postgres=${MINGW_PREFIX} \ + --with-firebird=${MINGW_PREFIX} \ + --with-bdb=${MINGW_PREFIX} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libgdata/0001-give-cc-to-gir-scanner.all.patch b/mingw-w64-libgdata/0001-give-cc-to-gir-scanner.all.patch deleted file mode 100644 index d05d903b54..0000000000 --- a/mingw-w64-libgdata/0001-give-cc-to-gir-scanner.all.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libgdata-0.15.2/Makefile.am.orig 2014-06-22 14:53:43.996077200 +0400 -+++ libgdata-0.15.2/Makefile.am 2014-08-12 19:36:46.908800000 +0400 -@@ -545,6 +545,7 @@ - INTROSPECTION_GIRS = - INTROSPECTION_SCANNER_ARGS = --warn-all - INTROSPECTION_COMPILER_ARGS = -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - DISTCHECK_CONFIGURE_FLAGS += --enable-introspection - EXTRA_DIST += m4/introspection.m4 - diff --git a/mingw-w64-libgdata/0002-symbols.patch b/mingw-w64-libgdata/0002-symbols.patch index 0929bb37d4..ef0c9cb262 100644 --- a/mingw-w64-libgdata/0002-symbols.patch +++ b/mingw-w64-libgdata/0002-symbols.patch @@ -10,12 +10,3 @@ gdata_documents_document_get_thumbnail_uri gdata_tasks_task_get_type gdata_tasks_task_new -@@ -1087,8 +1084,6 @@ - gdata_freebase_topic_result_get_type - gdata_freebase_topic_result_new - gdata_freebase_topic_result_dup_object --gdata_freebase_result_error_get_type --gdata_freebase_result_error_quark - gdata_freebase_result_get_type - gdata_freebase_result_new - gdata_freebase_result_dup_variant diff --git a/mingw-w64-libgdata/PKGBUILD b/mingw-w64-libgdata/PKGBUILD index 2b83933ad2..fbe14fc15b 100644 --- a/mingw-w64-libgdata/PKGBUILD +++ b/mingw-w64-libgdata/PKGBUILD @@ -1,56 +1,56 @@ # Maintainer: Andrea Zagli _realname=libgdata +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.16.1 +pkgver=0.17.3 pkgrel=1 arch=('any') pkgdesc="Library for accessing GData webservices (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-libsoup" - "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - "${MINGW_PACKAGE_PREFIX}-liboauth" "${MINGW_PACKAGE_PREFIX}-json-glib" + "${MINGW_PACKAGE_PREFIX}-liboauth" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-uhttpmock") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "make" - "libtool" - "intltool" - "automake-wrapper" - "autoconf" - "patch") + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "make" + "libtool" + "intltool" + "automake-wrapper" + "autoconf" + "patch") options=('strip' 'staticlibs') license=("LGPL 2.1") url="http://www.gnome.org/" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz - 0001-give-cc-to-gir-scanner.all.patch +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz 0002-symbols.patch - 0003-wsock.patch - 0004-localedir-fix.patch) -sha256sums=('8740e071ecb2ae0d2a4b9f180d2ae5fdf9dc4c41e7ff9dc7e057f62442800827' - '2184839b01d19afebf10b8ca91c79682b834c9e812e0fdeb683c69b851689d1f' - '3f9d5f53a2d1be337686a83d3b33f111e294dcbc4f78ed1facbfb048f6c5973a' - 'ed4c9c441ee3bf4a5279c5d212b2c1116ce443763151b71975611406310575df' - '0d035c44f80b0bfb6ed28b14dc908bf98ac11c943a99281cd93c5d8ed26b51a8') + 0003-wsock.patch) +sha256sums=('ff280b031c50a99ed735c3fa18fbea9ae3e4cc5e3d7dd58ebae09994b01b513b' + 'be45b535d0d8cfb05d35ffb984b72de82130dea87e34a3a706ccc448397e102b' + 'ed4c9c441ee3bf4a5279c5d212b2c1116ce443763151b71975611406310575df') prepare() { cd ${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0001-give-cc-to-gir-scanner.all.patch + patch -p1 -i ${srcdir}/0002-symbols.patch patch -p1 -i ${srcdir}/0003-wsock.patch - patch -p1 -i ${srcdir}/0004-localedir-fix.patch autoreconf -fi } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -58,10 +58,13 @@ build() { --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ --disable-gnome + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libgee/PKGBUILD b/mingw-w64-libgee/PKGBUILD index ab3e28e207..b6c4350f05 100644 --- a/mingw-w64-libgee/PKGBUILD +++ b/mingw-w64-libgee/PKGBUILD @@ -2,8 +2,8 @@ _realname=libgee pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.16.1 -pkgrel=1 +pkgver=0.18.0 +pkgrel=2 arch=('any') pkgdesc="A collection library providing GObject-based interfaces and classes for commonly used data structures (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-glib2") @@ -14,12 +14,12 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" options=('strip' 'staticlibs') license=("LGPL2+") url="https://wiki.gnome.org/Projects/Libgee" -source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz") -sha256sums=('d95f8ea8e78f843c71b1958fa2fb445e4a325e4821ec23d0d5108d8170e564a5') +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +sha256sums=('4ad99ef937d071b4883c061df40bfe233f7649d50c354cf81235f180b4244399') prepare() { cd "${srcdir}"/${_realname}-${pkgver} - + # Get proper unprefixed directories for gobject-introspection files autoreconf -fiv } @@ -34,10 +34,11 @@ build() { --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib + make -j1 } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libgeotiff/PKGBUILD b/mingw-w64-libgeotiff/PKGBUILD index 0f622bf69e..6d11187d43 100644 --- a/mingw-w64-libgeotiff/PKGBUILD +++ b/mingw-w64-libgeotiff/PKGBUILD @@ -1,20 +1,18 @@ # Maintainer: Alexey Pavlov _realname=libgeotiff - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="Cartographic projection software (PROJ.4) (mingw-w64)" arch=(any) url="http://trac.osgeo.org/geotiff/" license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-proj" - "${MINGW_PACKAGE_PREFIX}-zlib") -groups=("${MINGW_PACKAGE_PREFIX}") + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-proj" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libtool") options=('staticlibs' 'strip') source=("http://download.osgeo.org/geotiff/${_realname}/${_realname}-${pkgver}.tar.gz" @@ -25,7 +23,7 @@ md5sums=('efa7b418bc00228fcda4da63557e40c2' prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/libgeotiff_buildsys.patch - + # fix wrongly encoded files from tarball for f in $(find . -type f); do if file $f | grep -q ISO-8859 ; then @@ -41,37 +39,40 @@ prepare() { } build() { - [[ -d "$srcdir/build-${MINGW_CHOST}" ]] && rm -rf "$srcdir/build-${MINGW_CHOST}" - mkdir "$srcdir/build-${MINGW_CHOST}" - cd "$srcdir/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --with-proj \ --with-jpeg \ --with-zip - make + + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ + cat > ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/${_realname}.pc < _realname=libgit2-glib +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.0.24 +pkgver=0.23.8 pkgrel=1 arch=('any') pkgdesc="A glib wrapper library around the libgit2 git access library (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-libgit2" +depends=("${MINGW_PACKAGE_PREFIX}-libgit2>=0.23" "${MINGW_PACKAGE_PREFIX}-glib2") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-vala" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection") + "gtk-doc") options=('strip' 'staticlibs') license=("LGPL") url="https://wiki.gnome.org/Projects/Libgit2-glib" -source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz") -sha256sums=('8a0a6f65d86f2c8cb9bcb20c5e0ea6fd02271399292a71fc7e6852f13adbbdb8') +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +sha256sums=('50853d1fbdabcdf67c14d3295a973c1c6f625b7d298459e494135a31984f140b') prepare() { cd "${srcdir}"/${_realname}-${pkgver} + autoreconf -f -i } @@ -28,6 +31,9 @@ build() { mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + export PYTHON=${MINGW_PREFIX}/bin/python3 ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ @@ -36,10 +42,13 @@ build() { --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ --enable-python - make V=1 -j1 + + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libgit2/001-fix-pkg-config.patch b/mingw-w64-libgit2/001-fix-pkg-config.patch deleted file mode 100644 index 51404dc9d6..0000000000 --- a/mingw-w64-libgit2/001-fix-pkg-config.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libgit2-0.21.2/libgit2.pc.in.orig 2014-11-12 00:51:20.573000000 +0300 -+++ libgit2-0.21.2/libgit2.pc.in 2014-11-12 00:51:55.173800000 +0300 -@@ -1,5 +1,6 @@ --libdir=@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@ --includedir=@CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@ -+prefix=@CMAKE_INSTALL_PREFIX@ -+libdir=${prefix}/@LIB_INSTALL_DIR@ -+includedir=${prefix}/@INCLUDE_INSTALL_DIR@ - - Name: libgit2 - Description: The git library, take 2 diff --git a/mingw-w64-libgit2/PKGBUILD b/mingw-w64-libgit2/PKGBUILD index d86c987996..2428a72d0b 100644 --- a/mingw-w64-libgit2/PKGBUILD +++ b/mingw-w64-libgit2/PKGBUILD @@ -1,55 +1,48 @@ # Maintainer: Martell Malone _realname=libgit2 -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=0.21.2 -pkgrel=1 +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.23.4 +pkgrel=2 pkgdesc='A linkable library for Git (mingw-w64)' arch=('any') url='https://github.com/libgit2/libgit2' license=('GPL2' 'custom') -_pkgfqn=v${pkgver}.tar.gz -source=("https://github.com/libgit2/libgit2/archive/${_pkgfqn}" - 001-fix-pkg-config.patch) -md5sums=('78848987afcde08c9954f17370dc0a8c' - '341f5b8f48d1a489b157dc5300628960') options=('strip') -depends=("${MINGW_PACKAGE_PREFIX}-http-parser" - "${MINGW_PACKAGE_PREFIX}-libssh2" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-zlib") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" 'p7zip') - -noextract=(${_pkgfqn}) +depends=("${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-http-parser" + "${MINGW_PACKAGE_PREFIX}-libssh2" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") +source=(${_realname}-${pkgver}.tar.gz::"https://github.com/libgit2/libgit2/archive/v${pkgver}.tar.gz" + libgit2-error-string.patch) +md5sums=('b7db3ab71dfa19fe1dc7fef76d6af216' + '3ba35235bca627b630df75304b506ff8') prepare() { - cd ${srcdir} - msg "Extracting ${_pkgfqn} due to git folder tag" - 7z x "$startdir/${_pkgfqn}" -so | 7z x -aoa -si -ttar -o"${srcdir}" cd ${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-fix-pkg-config.patch + patch -p1 -i ${srcdir}/libgit2-error-string.patch } build() { - mkdir -p ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DTHREADSAFE:BOOL=1 \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ - ${srcdir}/${_realname}-${pkgver} + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DPKG_CONFIG_WITHOUT_PREFIX=ON \ + -DTHREADSAFE=ON \ + -DWINHTTP=OFF \ + ../${_realname}-${pkgver} make } package() { cd ${srcdir}/build-${MINGW_CHOST} - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libgit2.pc + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libgit2/libgit2-error-string.patch b/mingw-w64-libgit2/libgit2-error-string.patch new file mode 100644 index 0000000000..2d7e1c2bc5 --- /dev/null +++ b/mingw-w64-libgit2/libgit2-error-string.patch @@ -0,0 +1,14 @@ +diff --git a/src/openssl_stream.c b/src/openssl_stream.c +index 54dd761..1e2edee 100644 +--- a/src/openssl_stream.c ++++ b/src/openssl_stream.c +@@ -446,7 +446,8 @@ int git_openssl_stream_new(git_stream **out, const char *host, const char *port) + + st->ssl = SSL_new(git__ssl_ctx); + if (st->ssl == NULL) { +- giterr_set(GITERR_SSL, "failed to create ssl object"); ++ giterr_set(GITERR_SSL, "failed to create ssl object: %s", ++ ERR_error_string(ERR_get_error(), NULL)); + return -1; + } + diff --git a/mingw-w64-libglade/PKGBUILD b/mingw-w64-libglade/PKGBUILD index 599314f31a..6062fd01bc 100644 --- a/mingw-w64-libglade/PKGBUILD +++ b/mingw-w64-libglade/PKGBUILD @@ -1,23 +1,24 @@ # Maintainer: Alexey Pavlov _realname=libglade - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.6.4 -pkgrel=2 +pkgrel=4 pkgdesc="Allows you to load glade interface files in a program at runtime (mingw-w64)" arch=(any) url="http://www.gnome.org" license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-gtk2>=2.16.0" "${MINGW_PACKAGE_PREFIX}-libxml2>=2.7.3") -groups=("${MINGW_PACKAGE_PREFIX}") -makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gtk2>=2.16.0" + "${MINGW_PACKAGE_PREFIX}-libxml2>=2.7.3") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-pkg-config") optdepends=("${MINGW_PACKAGE_PREFIX}-python2: libglade-convert script") options=('staticlibs' 'strip') source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/2.6/${_realname}-${pkgver}.tar.bz2 - libglade-2.0.1-nowarning.patch - libglade-secondary.patch - libglade-link-against-gmodule.patch) + libglade-2.0.1-nowarning.patch + libglade-secondary.patch + libglade-link-against-gmodule.patch) md5sums=('d1776b40f4e166b5e9c107f1c8fe4139' '4f879c0ce550004905aa0fb24f25c353' '833d0feb0ffb01d99577b7ab92dbea89' @@ -25,17 +26,17 @@ md5sums=('d1776b40f4e166b5e9c107f1c8fe4139' prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i "$srcdir"/libglade-2.0.1-nowarning.patch - patch -p1 -i "$srcdir"/libglade-link-against-gmodule.patch - patch -p1 -i "$srcdir"/libglade-secondary.patch + patch -p1 -i "${srcdir}"/libglade-2.0.1-nowarning.patch + patch -p1 -i "${srcdir}"/libglade-link-against-gmodule.patch + patch -p1 -i "${srcdir}"/libglade-secondary.patch WANT_AUTOMAKE=latest autoreconf -fi } build() { - [[ -d "$srcdir/build-${MINGW_CHOST}" ]] && rm -rf "$srcdir/build-${MINGW_CHOST}" - cp -r "$srcdir/${_realname}-${pkgver}" "$srcdir/build-${MINGW_CHOST}" - cd "$srcdir/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" PYTHON=${MINGW_PREFIX}/bin/python2 \ ./configure \ @@ -43,12 +44,12 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install -j1 + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install -j1 install -m755 libglade-convert "${pkgdir}${MINGW_PREFIX}/bin/" - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-libgme/PKGBUILD b/mingw-w64-libgme/PKGBUILD index 888789eb4c..ab5751b8ed 100644 --- a/mingw-w64-libgme/PKGBUILD +++ b/mingw-w64-libgme/PKGBUILD @@ -6,15 +6,15 @@ pkgver=0.6.0 pkgrel=1 pkgdesc="Video game music file emulation/playback library (mingw-w64)" arch=('any') -url="http://game-music-emu.googlecode.com/" +url="https://bitbucket.org/mpyne/game-music-emu/wiki/Home" license=('LGPL') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkgconf" + "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-cmake" ) options=('strip' '!emptydirs') -source=("https://game-music-emu.googlecode.com/files/game-music-emu-${pkgver}.tar.bz2") +source=("https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-${pkgver}.tar.bz2") md5sums=('b98fafb737bc889dc65e7a8b94bd1bf5') prepare() { @@ -22,12 +22,14 @@ prepare() { } build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ ../game-music-emu-${pkgver} @@ -36,11 +38,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libgme.pc + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libgnomecanvas/PKGBUILD b/mingw-w64-libgnomecanvas/PKGBUILD new file mode 100644 index 0000000000..f36860e9a5 --- /dev/null +++ b/mingw-w64-libgnomecanvas/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Junjie Mao + +_realname=libgnomecanvas +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.30.3 +pkgrel=2 +pkgdesc="The GNOME canvas library (mingw-w64)" +arch=('any') +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-libart_lgpl" + "${MINGW_PACKAGE_PREFIX}-libglade") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "intltool") +url='https://developer.gnome.org/libgnomecanvas/stable/GnomeCanvas.html' +license=('LGPL2') +source=("http://ftp.gnome.org/pub/gnome/sources/libgnomecanvas/${pkgver%.*}/${_realname}-${pkgver}.tar.gz") +sha1sums=('e73e0739d28c0772728621ae151c9a7d9b6d3dfd') + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --exec-prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-static \ + --enable-shared \ + --enable-glade + + make +} + +check() { + # The test case fails due to a warning on a deprecated property + plain "skip" +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR="${pkgdir}" install + + cd "${srcdir}"/${_realname}-${pkgver} + [[ -f COPYING.LIB ]] && install -Dm644 COPYING.LIB ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB + [[ -f AUTHORS ]] && install -Dm644 AUTHORS ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/AUTHORS + [[ -f NEWS ]] && install -Dm644 NEWS ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/NEWS +} diff --git a/mingw-w64-libgnurx/PKGBUILD b/mingw-w64-libgnurx/PKGBUILD index eff14e978f..50ef0daee0 100644 --- a/mingw-w64-libgnurx/PKGBUILD +++ b/mingw-w64-libgnurx/PKGBUILD @@ -23,7 +23,7 @@ md5sums=('35c8fed3101ca1f253e9b6b1966661f6' prepare() { cd "$srcdir/mingw-libgnurx-${pkgver}" patch -Np0 -i $srcdir/mingw-w64-libgnurx-honor-destdir.patch - + cp $srcdir/mingw32-libgnurx-configure.ac configure.ac cp $srcdir/mingw32-libgnurx-Makefile.am Makefile.am touch NEWS diff --git a/mingw-w64-libgoom2/PKGBUILD b/mingw-w64-libgoom2/PKGBUILD index dc194f0aca..214cbe7c09 100644 --- a/mingw-w64-libgoom2/PKGBUILD +++ b/mingw-w64-libgoom2/PKGBUILD @@ -3,16 +3,15 @@ _realname=libgoom2 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2k4 -pkgrel=1 +pkgrel=2 pkgdesc="Shared library part of the Goom visualization plugin (mingw-w64)" arch=('any') url="http://www.fovea.cc/?page=details_produits&id=goom" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "flex") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -groups=("${MINGW_PACKAGE_PREFIX}") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/project/goom/goom2k4/0/goom-2k4-0-src.tar.gz" +source=("http://downloads.sourceforge.net/project/goom/goom2k4/0/goom-${pkgver}-0-src.tar.gz" 001-no-undefined.patch 002-fix-random.patch) md5sums=('8100dd07e0c6784fdf079eeaa53a5c7f' @@ -20,7 +19,7 @@ md5sums=('8100dd07e0c6784fdf079eeaa53a5c7f' 'fc40ea7df842ec732a846e03320b6aa0') prepare() { - cd "$srcdir/goom2k4-0" + cd "${srcdir}/goom2k4-0" patch -p1 -i ${srcdir}/001-no-undefined.patch patch -p1 -i ${srcdir}/002-fix-random.patch @@ -31,7 +30,7 @@ prepare() { } build() { - mkdir -p $srcdir/build-${CARCH} && cd $srcdir/build-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} ../goom2k4-0/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -41,6 +40,7 @@ build() { --enable-static \ --without-xmms \ --without-sdl + make } @@ -51,5 +51,5 @@ check() { package() { cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libgpg-error/PKGBUILD b/mingw-w64-libgpg-error/PKGBUILD index 12c8803734..43f442ca7d 100644 --- a/mingw-w64-libgpg-error/PKGBUILD +++ b/mingw-w64-libgpg-error/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libgpg-error +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.17 +pkgver=1.20 pkgrel=1 pkgdesc="Support library for libgcrypt (mingw-w64)" arch=('any') @@ -10,16 +11,15 @@ url="http://www.gnupg.org" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext") -groups=("${MINGW_PACKAGE_PREFIX}") options=('staticlibs' 'strip') -source=("ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${pkgver}.tar.bz2" +source=("ftp://ftp.gnupg.org/gcrypt/libgpg-error/${_realname}-${pkgver}.tar.bz2" 01-mingw32-fix-potomo.mingw.patch 02-fix-symbollist-on.mingw.patch 04-use-winpthreads.mingw.patch 05-w32-gen.all.patch 07-windows-build.patch 09-fix-generating-union.patch) -md5sums=('b4f8d8b9ff14aed41f279aa844563539' +md5sums=('9997d9203b672402a04760176811589d' '4865ce481ec9aa5efc0a4979f197a686' 'a69b0fd4c8e4ebda9ddeb68e565bf1b1' 'f7650decafae57ef791318b6a7e8f7e7' @@ -28,7 +28,7 @@ md5sums=('b4f8d8b9ff14aed41f279aa844563539' '14cc65006c4c19919182c56759be7b95') prepare() { - cd "$srcdir/libgpg-error-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/01-mingw32-fix-potomo.mingw.patch patch -p1 -i ${srcdir}/02-fix-symbollist-on.mingw.patch #patch -p1 -i ${srcdir}/03-fix-config-on.mingw.patch @@ -40,19 +40,20 @@ prepare() { } build() { - cd "$srcdir/libgpg-error-$pkgver" - mkdir -p $srcdir/build-${CARCH} && cd $srcdir/build-${CARCH} - ../libgpg-error-$pkgver/configure \ + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } package() { - cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libgsf/001-win.patch b/mingw-w64-libgsf/001-win.patch new file mode 100644 index 0000000000..a980dae4b2 --- /dev/null +++ b/mingw-w64-libgsf/001-win.patch @@ -0,0 +1,76 @@ +--- ./gsf/Makefile.am.orig 2014-12-15 05:31:48.000000000 +0100 ++++ ./gsf/Makefile.am 2015-03-28 16:52:56.424200300 +0100 +@@ -150,6 +150,8 @@ + + if HAVE_INTROSPECTION + ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" ++ + INTROSPECTION_GIRS += Gsf-1.gir + + Gsf-1.gir: $(INTROSPECTION_SCANNER) libgsf-1.la Makefile +--- ./m4/intltool.m4.orig 2015-02-05 00:40:27.000000000 +0100 ++++ ./m4/intltool.m4 2015-03-28 16:52:56.434201100 +0100 +@@ -155,31 +155,6 @@ + # Substitute ALL_LINGUAS so we can use it in po/Makefile + AC_SUBST(ALL_LINGUAS) + +-# Set DATADIRNAME correctly if it is not set yet +-# (copied from glib-gettext.m4) +-if test -z "$DATADIRNAME"; then +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[]], +- [[extern int _nl_msg_cat_cntr; +- return _nl_msg_cat_cntr]])], +- [DATADIRNAME=share], +- [case $host in +- *-*-solaris*) +- dnl On Solaris, if bind_textdomain_codeset is in libc, +- dnl GNU format message catalog is always supported, +- dnl since both are added to the libc all together. +- dnl Hence, we'd like to go with DATADIRNAME=share +- dnl in this case. +- AC_CHECK_FUNC(bind_textdomain_codeset, +- [DATADIRNAME=share], [DATADIRNAME=lib]) +- ;; +- *) +- [DATADIRNAME=lib] +- ;; +- esac]) +-fi +-AC_SUBST(DATADIRNAME) +- + IT_PO_SUBDIR([po]) + + ]) +--- ./po/Makefile.in.in.orig 2015-03-28 16:53:16.017219400 +0100 ++++ ./po/Makefile.in.in 2015-03-28 16:53:42.228125500 +0100 +@@ -34,7 +34,7 @@ + datarootdir = @datarootdir@ + libdir = @libdir@ + DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +108,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +142,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot diff --git a/mingw-w64-libgsf/002-get-unix-path-for-git.patch b/mingw-w64-libgsf/002-get-unix-path-for-git.patch new file mode 100644 index 0000000000..08c0298cdc --- /dev/null +++ b/mingw-w64-libgsf/002-get-unix-path-for-git.patch @@ -0,0 +1,15 @@ +--- libgsf-1.14.32/configure.ac.orig 2015-03-29 20:26:00.811400000 +0300 ++++ libgsf-1.14.32/configure.ac 2015-03-29 20:28:13.752800000 +0300 +@@ -126,10 +126,10 @@ + INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` + INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` + if test "x$INTROSPECTION_GIRDIR" = x; then +- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` ++ INTROSPECTION_GIRDIR=`$PKG_CONFIG --dont-define-prefix --variable=girdir gobject-introspection-1.0` + fi + if test "x$INTROSPECTION_TYPELIBDIR" = x; then +- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" ++ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --dont-define-prefix --variable=typelibdir gobject-introspection-1.0)" + fi + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` diff --git a/mingw-w64-libgsf/PKGBUILD b/mingw-w64-libgsf/PKGBUILD new file mode 100644 index 0000000000..b1f83f2a60 --- /dev/null +++ b/mingw-w64-libgsf/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Andrea Zagli + +_realname=libgsf +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.14.34 +pkgrel=1 +arch=('any') +pkgdesc="An extensible I/O abstraction library for dealing with structured file formats (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "gtk-doc" + "intltool") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://www.gnome.org/" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch + 002-get-unix-path-for-git.patch) +sha256sums=('f0fea447e0374a73df45b498fd1701393f8e6acb39746119f8a292fb4a0cb528' + 'a6408ee4cca51afb8c910d467d0036c7aa5520e0486366aad47a5a39b5ecdc1b' + 'f08db8333d2b4a369737a77969b5896d408a4d9992fab6f1c9c44ddeae25c516') + +prepare() { + cd ${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + patch -b -V simple -p1 -i ${srcdir}/002-get-unix-path-for-git.patch + + autoreconf -fiv +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p doc/html + cp -rf ../${_realname}-${pkgver}/doc/html/* doc/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB" +} diff --git a/mingw-w64-libguess/PKGBUILD b/mingw-w64-libguess/PKGBUILD index 2792ee51af..4769b98312 100644 --- a/mingw-w64-libguess/PKGBUILD +++ b/mingw-w64-libguess/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libguess - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.1 -pkgrel=1 +pkgver=1.2 +pkgrel=2 pkgdesc="High-speed character set detection library (mingw-w64)" arch=('any') url="http://atheme.org/projects/libguess.html" @@ -12,27 +11,29 @@ license=('custom') depends=("${MINGW_PACKAGE_PREFIX}-libmowgli") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') -source=("http://distfiles.atheme.org/libguess-${pkgver}.tar.gz") -md5sums=('efc2d53c30e47ffccae7148e53433396') +source=("http://rabbit.dereferenced.org/%7Enenolod/distfiles/${_realname}-${pkgver}.tar.bz2") +md5sums=('7633fbfbeb75b1ded7f33cca3d8d4762') prepare() { cd ${srcdir}/${_realname}-${pkgver} - + sed 's/libmowgli >= 0.9.50/libmowgli-2/g' -i configure } build() { - cd ${srcdir}/${_realname}-${pkgver} + cp -rf ${_realname}-${pkgver} ${srcdir}/build-${MINGW_CHOST} + cd build-${MINGW_CHOST} ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} + make } package() { - cd ${srcdir}/${_realname}-${pkgver} + cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="$pkgdir" install install -D -m644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libgusb/PKGBUILD b/mingw-w64-libgusb/PKGBUILD new file mode 100644 index 0000000000..8a627a8c22 --- /dev/null +++ b/mingw-w64-libgusb/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Ignacio Casal Quinteiro + +_realname=libgusb +_tarballname=gusb +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.2.6 +pkgrel=1 +arch=('any') +pkgdesc="GLib wrapper around libusb1 (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-libusb" + "${MINGW_PACKAGE_PREFIX}-glib2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +options=('strip' 'staticlibs') +license=("LGPL") +url="https://github.com/hughsie/libgusb" +source=("https://github.com/hughsie/${_realname}/archive/${_tarballname}_${pkgver//./_}.tar.gz") +sha256sums=('d996e8b8adc8438fb7a19bbfae25a0d6b71e06b3ac40274baf6005a4befa2d41') + +prepare() { + cd "${srcdir}"/${_realname}-${_tarballname}_${pkgver//./_} + gtkdocize + autoreconf -f -i +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${_tarballname}_${pkgver//./_}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-libgweather/001-win.patch b/mingw-w64-libgweather/001-win.patch index 0548e495c0..6139b9fe46 100644 --- a/mingw-w64-libgweather/001-win.patch +++ b/mingw-w64-libgweather/001-win.patch @@ -112,19 +112,6 @@ tz = g_time_zone_new (tzid); dt = g_date_time_new (tz, ---- ./libgweather/weather-priv.h.orig 2014-09-07 17:09:34.535003100 +0200 -+++ ./libgweather/weather-priv.h 2014-09-07 17:09:36.914103100 +0200 -@@ -31,10 +31,6 @@ - #include "gweather-weather.h" - #include "gweather-location.h" - --#ifdef _WIN32 --#include "gweather-win32.h" --#endif -- - void _gweather_gettext_init (void); - - struct _GWeatherLocation { --- ./libgweather/weather-sun.c.orig 2014-09-07 17:53:39.134081200 +0200 +++ ./libgweather/weather-sun.c 2014-09-07 17:54:30.044591900 +0200 @@ -322,7 +322,14 @@ @@ -250,8 +237,8 @@ tz = g_time_zone_new (tzid); dt = g_date_time_new (tz, ---- ./libgweather/weather.c.orig 2014-09-07 17:18:05.621641500 +0200 -+++ ./libgweather/weather.c 2014-09-07 17:27:17.789137400 +0200 +--- ./libgweather/gweather-weather.c.orig 2014-09-07 17:18:05.621641500 +0200 ++++ ./libgweather/gweather-weather.c 2014-09-07 17:27:17.789137400 +0200 @@ -28,12 +28,15 @@ #include #include @@ -266,6 +253,6 @@ +#include +#endif + - #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE #include "gweather-weather.h" - #include "weather-priv.h" + #include "gweather-private.h" + #include "gweather-enum-types.h" diff --git a/mingw-w64-libgweather/002-relocation.patch b/mingw-w64-libgweather/002-relocation.patch new file mode 100644 index 0000000000..a580e7382d --- /dev/null +++ b/mingw-w64-libgweather/002-relocation.patch @@ -0,0 +1,80 @@ +--- ./libgweather/gweather-parser.c.orig 2015-04-20 17:42:37.500600900 +0200 ++++ ./libgweather/gweather-parser.c 2015-04-20 17:44:52.715146100 +0200 +@@ -131,19 +131,34 @@ + time_t now; + struct tm tm; + ++ gchar *gweather_xml_location_dir; ++ + _gweather_gettext_init (); + + parser = g_slice_new0 (GWeatherParser); + + zlib_support = xmlHasFeature (XML_WITH_ZLIB); + +- filename = g_build_filename (GWEATHER_XML_LOCATION_DIR, "Locations.xml", NULL); ++#ifdef G_OS_WIN32 ++ gchar *dir; ++ ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ gweather_xml_location_dir = g_build_filename (dir, "share", "libgweather", NULL); ++ ++ g_free (dir); ++#else ++ gweather_xml_location_dir = g_strdup (GWEATHER_XML_LOCATION_DIR); ++#endif ++ ++ filename = g_build_filename (gweather_xml_location_dir, "Locations.xml", NULL); + + if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR) && zlib_support) { + g_free (filename); +- filename = g_build_filename (GWEATHER_XML_LOCATION_DIR, "Locations.xml.gz", NULL); ++ filename = g_build_filename (gweather_xml_location_dir, "Locations.xml.gz", NULL); + } + ++ g_free (gweather_xml_location_dir); ++ + /* Open the xml file containing the different locations */ + parser->xml = xmlNewTextReaderFilename (filename); + g_free (filename); +--- ./libgweather/gweather-weather.c.orig 2015-04-20 17:41:19.049620900 +0200 ++++ ./libgweather/gweather-weather.c 2015-04-20 17:41:53.096893500 +0200 +@@ -84,21 +84,36 @@ + void + _gweather_gettext_init (void) + { ++ gchar *gnomelocaledir; ++ ++#ifdef G_OS_WIN32 ++ gchar *dir; ++ ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ gnomelocaledir = g_build_filename (dir, "share", "locale", NULL); ++ ++ g_free (dir); ++#else ++ gnomelocaledir = g_strdup (GNOMELOCALEDIR); ++#endif ++ + static gsize gweather_gettext_initialized = FALSE; + + if (G_UNLIKELY (g_once_init_enter (&gweather_gettext_initialized))) { +- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); ++ bindtextdomain (GETTEXT_PACKAGE, gnomelocaledir); + #ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + #endif + +- bindtextdomain ("libgweather-locations", GNOMELOCALEDIR); ++ bindtextdomain ("libgweather-locations", gnomelocaledir); + #ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset ("libgweather-locations", "UTF-8"); + #endif + + g_once_init_leave (&gweather_gettext_initialized, TRUE); + } ++ ++ g_free (gnomelocaledir); + } + + static void diff --git a/mingw-w64-libgweather/003-hack-unixy-paths.patch b/mingw-w64-libgweather/003-hack-unixy-paths.patch deleted file mode 100644 index 74b8a030f0..0000000000 --- a/mingw-w64-libgweather/003-hack-unixy-paths.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- libgweather-3.13.91/configure.orig 2014-09-08 20:13:05.662800000 +0400 -+++ libgweather-3.13.91/configure 2014-09-08 20:14:44.426400000 +0400 -@@ -16953,7 +16953,9 @@ - INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` - INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` - INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` -+ INTROSPECTION_GIRDIR=`cygpath -u $INTROSPECTION_GIRDIR` - INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" -+ INTROSPECTION_TYPELIBDIR=`cygpath -u $INTROSPECTION_TYPELIBDIR` - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` - INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection -@@ -17223,6 +17225,7 @@ - VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name` - - fi -+ VAPIGEN_VAPIDIR=`cygpath -u $VAPIGEN_VAPIDIR` - ;; #( - *) : - ;; diff --git a/mingw-w64-libgweather/PKGBUILD b/mingw-w64-libgweather/PKGBUILD index 6c6f4bda93..2f9a070942 100644 --- a/mingw-w64-libgweather/PKGBUILD +++ b/mingw-w64-libgweather/PKGBUILD @@ -1,58 +1,67 @@ # Maintainer: Andrea Zagli _realname=libgweather +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.14.1 +pkgver=3.18.1 pkgrel=1 arch=('any') pkgdesc="GWeather shared library (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libsystre" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-geocode-glib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" - "${MINGW_PACKAGE_PREFIX}-vala" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-glade" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-vala" + "gtk-doc" "intltool") options=('strip' 'staticlibs') license=("LGPL 2.1") url="http://www.gnome.org/" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz 001-win.patch - 002-localedir-fix.patch - 003-hack-unixy-paths.patch) -sha256sums=('4db10404ac91bc1f85ae977bdaa98413836429c3de6244dc68567c402afed800' - '54aafa1ec47f818855cb8d17bb4f7f4458505a54b08c9fc51bfd4bbc1d6c37a2' - '6677acc97b0322170339479df46435f14eb232df2d36e607029af3bd1f1a4eb0' - 'bfc78c118d966b8fcd557b3d5a2d372532fc5ec47884a44df6fbe5c987e01592') + 002-relocation.patch) +sha256sums=('94b2292f8f7616e2aa81b1516befd7b27682b20acecbd5d656b6954990ca7ad0' + '090eb5c8306737a20850f0a52ab57a70d3cd9afcf55649d3bd4a2c0dc2236484' + 'b84ead0a59db1d315e7de7bea76a162e69fa43242bc5480e6149271304991381') prepare() { cd ${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-win.patch - patch -p1 -i ${srcdir}/002-localedir-fix.patch - AUTOPOINT='intltoolize --automake --copy' autoreconf -fi - - patch -p1 -i ${srcdir}/003-hack-unixy-paths.patch + patch -p1 -i ${srcdir}/001-win.patch + patch -b -V simple -p1 -i ${srcdir}/002-relocation.patch + + AUTOPOINT='intltoolize --automake --copy' autoreconf -fiv } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p doc/html + cp -rf ../${_realname}-${pkgver}/doc/html/* doc/html + ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ - --enable-introspection + --enable-introspection \ + --enable-shared \ + --enable-static + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libgweather/libgweather-i686.install b/mingw-w64-libgweather/libgweather-i686.install new file mode 100644 index 0000000000..375e708c36 --- /dev/null +++ b/mingw-w64-libgweather/libgweather-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-libgweather/libgweather-x86_64.install b/mingw-w64-libgweather/libgweather-x86_64.install new file mode 100644 index 0000000000..d43ee14ce7 --- /dev/null +++ b/mingw-w64-libgweather/libgweather-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/mingw-w64-libgxps/0001-give-cc-to-gir-scanner.all.patch b/mingw-w64-libgxps/0001-give-cc-to-gir-scanner.all.patch deleted file mode 100644 index fb46a749a0..0000000000 --- a/mingw-w64-libgxps/0001-give-cc-to-gir-scanner.all.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libgxps-0.2.2/libgxps/Makefile.am.orig 2011-11-19 16:44:03.000000000 +0400 -+++ libgxps-0.2.2/libgxps/Makefile.am 2014-08-07 23:06:42.482600000 +0400 -@@ -86,6 +86,7 @@ - INTROSPECTION_GIRS = - INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --identifier-prefix=GXPS --symbol-prefix=gxps - INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - - if HAVE_INTROSPECTION - introspection_sources = $(filter-out $(NOINST_H_FILES) gxps-archive.c gxps-fonts.c gxps-images.c gxps-parse-utils.c gxps-version.h, $(libgxps_la_SOURCES)) diff --git a/mingw-w64-libgxps/0003-missing-cflags-libs.patch b/mingw-w64-libgxps/0003-missing-cflags-libs.patch new file mode 100644 index 0000000000..5c9d5f051a --- /dev/null +++ b/mingw-w64-libgxps/0003-missing-cflags-libs.patch @@ -0,0 +1,35 @@ +--- libgxps-0.2.3.2/libgxps/Makefile.am.orig 2015-09-24 21:02:52.477919700 +0200 ++++ libgxps-0.2.3.2/libgxps/Makefile.am 2015-09-24 21:06:22.835977000 +0200 +@@ -63,7 +63,11 @@ + $(LCMS2_CFLAGS) \ + $(LIBPNG_CFLAGS) \ + $(WARN_CFLAGS) \ +- $(AM_CFLAGS) ++ $(AM_CFLAGS) \ ++ $(LIBPNG_CFLAGS) \ ++ $(CAIRO_PDF_CFLAGS) \ ++ $(CAIRO_PS_CFLAGS) \ ++ $(CAIRO_SVG_CFLAGS) + + libgxps_la_LDFLAGS = \ + -version-info $(GXPS_LT_VERSION_INFO) \ +@@ -77,7 +81,11 @@ + $(LIBPNG_LIBS) \ + $(LIBJPEG) \ + $(LIBM) \ +- $(LIBTIFF) ++ $(LIBTIFF) \ ++ $(LIBPNG_LIBS) \ ++ $(CAIRO_PDF_LIBS) \ ++ $(CAIRO_PS_LIBS) \ ++ $(CAIRO_SVG_LIBS) + + EXTRA_DIST = \ + gxps-version.h.in +@@ -111,4 +119,4 @@ + typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + + CLEANFILES += $(gir_DATA) $(typelib_DATA) +-endif +\ Manca newline alla fine del file ++endif diff --git a/mingw-w64-libgxps/PKGBUILD b/mingw-w64-libgxps/PKGBUILD index 1ce9d37aec..139625af06 100644 --- a/mingw-w64-libgxps/PKGBUILD +++ b/mingw-w64-libgxps/PKGBUILD @@ -1,55 +1,64 @@ # Maintainer: Andrea Zagli _realname=libgxps +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.2.2 +pkgver=0.2.3.2 pkgrel=1 arch=('any') pkgdesc="A library to handling and rendering XPS documents (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-libarchive" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libjpeg") + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-libarchive" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-libpng") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "make" - "intltool" - "gettext-devel") + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "make" + "intltool" + "gettext-devel") options=('strip' 'staticlibs') license=("LGPL 2.1") url="http://www.gnome.org" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:3}/${_realname}-$pkgver.tar.xz - 0001-give-cc-to-gir-scanner.all.patch - 0002-missing-include.patch) -sha256sums=('39d104739bf0db43905c315de1d8002460f1a098576f4418f69294013a5820be' - '93043f118701f0b668ca567875c3f6d4f3f1036680e76bc6f160b6263dd2d6c5' - '85e7ce99a0286510f44dad9468faf991b4852f0e6e19c70842a4b38fc6f71919') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz + 0002-missing-include.patch + 0003-missing-cflags-libs.patch) +sha256sums=('6ea5f0ed85665a4e6702e31e38b5f1b2e5ae4f3d316a55d7f1fb1799224b4127' + '85e7ce99a0286510f44dad9468faf991b4852f0e6e19c70842a4b38fc6f71919' + '880cd116af31be5108a45d524b371058553c27504e8c1b513d13d021d1259dfc') prepare() { cd ${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0001-give-cc-to-gir-scanner.all.patch patch -p1 -i ${srcdir}/0002-missing-include.patch - + patch -p1 -i ${srcdir}/0003-missing-cflags-libs.patch + autoreconf -fi } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libharu/PKGBUILD b/mingw-w64-libharu/PKGBUILD new file mode 100644 index 0000000000..2a0f5812ec --- /dev/null +++ b/mingw-w64-libharu/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Rémi BERTHO + +_realname=libharu +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.3.0 +pkgrel=1 +pkgdesc="C library for generating PDF documents (mingw-w64)" +url="https://github.com/libharu/libharu" +arch=('any') +license=('custom:ZLIB') +depends=("${MINGW_PACKAGE_PREFIX}-libpng") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/libharu/libharu/archive/RELEASE_${pkgver//./_}.tar.gz" + "win_various_install_files.patch" + "win_lib.patch") +md5sums=('4f916aa49c3069b3a10850013c507460' + 'cde4ba6d18174097801aba1ac65d3efa' + '20267023a191192ddb313d625bdf8037') + +prepare() { + cd "${srcdir}/${_realname}-RELEASE_${pkgver//./_}" + patch -p1 -i "${srcdir}/win_various_install_files.patch" + patch -p1 -i "${srcdir}/win_lib.patch" +} + +build() { + rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=ON \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname}-RELEASE_${pkgver//./_} + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-libharu/win_lib.patch b/mingw-w64-libharu/win_lib.patch new file mode 100644 index 0000000000..4e8f01c8b5 --- /dev/null +++ b/mingw-w64-libharu/win_lib.patch @@ -0,0 +1,14 @@ +--- libharu-RELEASE_2_3_0/src/CMakeLists.txt.orig 2013-10-30 14:11:59.000000000 +0100 ++++ libharu-RELEASE_2_3_0/src/CMakeLists.txt 2015-10-10 21:13:27.080689969 +0200 +@@ -79,11 +79,6 @@ + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + ) +- if(WIN32 AND NOT CYGWIN) +- foreach(addlib ${ADDITIONAL_LIBRARIES}) +- install(FILES ${addlib} DESTINATION lib) +- endforeach(addlib) +- endif(WIN32 AND NOT CYGWIN) + endif(LIBHPDF_STATIC) + if(LIBHPDF_SHARED) + add_library(${LIBHPDF_NAME} SHARED ${LIBHPDF_SRCS}) diff --git a/mingw-w64-libharu/win_various_install_files.patch b/mingw-w64-libharu/win_various_install_files.patch new file mode 100644 index 0000000000..86ec59d648 --- /dev/null +++ b/mingw-w64-libharu/win_various_install_files.patch @@ -0,0 +1,18 @@ +--- libharu-RELEASE_2_3_0/CMakeLists.txt.orig 2013-10-30 14:11:59.000000000 +0100 ++++ libharu-RELEASE_2_3_0/CMakeLists.txt 2015-10-11 15:24:05.099693992 +0200 +@@ -209,15 +209,6 @@ + # install header files + install(FILES ${haru_HDRS} DESTINATION include) + +-# install various files +-install(FILES README CHANGES INSTALL DESTINATION .) +-if(NOT DEVPAK) +- install(DIRECTORY if DESTINATION .) +-endif(NOT DEVPAK) +-if(DEVPAK) +- install(FILES ${CMAKE_BINARY_DIR}/libharu.DevPackage DESTINATION .) +-endif(DEVPAK) +- + # ======================================================================= + # print out some information + # ======================================================================= diff --git a/mingw-w64-libical-glib/001-win.patch b/mingw-w64-libical-glib/001-win.patch new file mode 100644 index 0000000000..c1e4f9a4ed --- /dev/null +++ b/mingw-w64-libical-glib/001-win.patch @@ -0,0 +1,21 @@ +--- ./src/build-tools/generator.c.orig 2015-03-25 17:48:37.812068900 +0100 ++++ ./src/build-tools/generator.c 2015-03-25 17:48:40.060777800 +0100 +@@ -84,7 +84,7 @@ + + if (iter == strlen (full_flag)) { + full_comment = g_new (gchar, strlen (para->comment) - strlen (full_flag) + 1); +- stpcpy (full_comment, para->comment + strlen(full_flag)); ++ g_stpcpy (full_comment, para->comment + strlen(full_flag)); + buffer = g_strconcat (res, "\n * ", full_comment, NULL); + g_free (res); + res = buffer; +--- ./src/libical-glib/Makefile.am.orig 2015-03-25 17:47:15.849595300 +0100 ++++ ./src/libical-glib/Makefile.am 2015-03-25 17:47:22.483886100 +0100 +@@ -131,6 +131,7 @@ + INTROSPECTION_COMPILER_ARGS = \ + --includedir=$(srcdir) \ + $(NULL) ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + introspection_sources = $(libical_glib_1_0_la_SOURCES) diff --git a/mingw-w64-libical-glib/PKGBUILD b/mingw-w64-libical-glib/PKGBUILD new file mode 100644 index 0000000000..a5fe763de6 --- /dev/null +++ b/mingw-w64-libical-glib/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Andrea Zagli + +_realname=libical-glib +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0.3 +pkgrel=2 +arch=('any') +pkgdesc="An iCalendar library based on libical and introspectable by GObject Introspection (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-libical" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("gtk-doc" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://www.gnome.org/" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('75373fb778352656c6368ffa7b371afa2fd2e2579874b0ec653a443da7a72d36' + '4e34ccb69bd5356071b4d0ee96cf5b7148f6ae7dd3815861dee4fbb8e99156fd') + +prepare() { + cd ${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-win.patch + + autoreconf -fi +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/${_realname}/html + cp -rf ../${_realname}-${pkgver}/docs/reference/${_realname}/html/* docs/reference/${_realname}/html + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-introspection=yes + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-libical/002-introspection.patch b/mingw-w64-libical/002-introspection.patch new file mode 100644 index 0000000000..a067baaadd --- /dev/null +++ b/mingw-w64-libical/002-introspection.patch @@ -0,0 +1,11 @@ +--- ./cmake/modules/GObjectIntrospectionMacros.cmake.orig 2015-05-22 08:36:36.673111400 +0200 ++++ ./cmake/modules/GObjectIntrospectionMacros.cmake 2015-05-22 08:36:38.510219500 +0200 +@@ -50,7 +50,7 @@ + set(_gir_libtool "--no-libtool") + + add_custom_command( +- COMMAND ${INTROSPECTION_SCANNER} ++ COMMAND CC=${CMAKE_C_COMPILER} ${INTROSPECTION_SCANNER} + ${INTROSPECTION_SCANNER_ARGS} + --namespace=${_gir_namespace} + --nsversion=${_gir_version} diff --git a/mingw-w64-libical/PKGBUILD b/mingw-w64-libical/PKGBUILD index 37deb4ee6d..d76ba53191 100644 --- a/mingw-w64-libical/PKGBUILD +++ b/mingw-w64-libical/PKGBUILD @@ -3,7 +3,7 @@ _realname=libical pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.1 -pkgrel=1 +pkgrel=3 arch=('any') pkgdesc="An Open Source implementation of the iCalendar protocols and protocol data units (mingw-w64)" license=("LGPL 2.1") @@ -11,37 +11,43 @@ url="https://github.com/libical/libical" depends=() makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") options=('strip' '!debug' 'staticlibs') -source=(https://github.com/${_realname}/${_realname}/archive/v$pkgver.tar.gz - 001-win.patch) +source=("${_realname}-${pkgver}.tar.gz"::https://github.com/${_realname}/${_realname}/archive/v${pkgver}.tar.gz + 001-win.patch + 002-introspection.patch) +noextract=(${_realname}-${pkgver}.tar.gz) sha256sums=('7d5f613454ec6c7d1bcfb441c919215be53292aa15cd1cb14249d1413d6c610c' - 'f080396da2203af16ed770141595fed86934df51c2ce40edfeccea23eaf25e00') + 'f080396da2203af16ed770141595fed86934df51c2ce40edfeccea23eaf25e00' + '9dcd3c8fe152a5ce3e2a0b7983df879fb09bab6f3b81497b2530f274c744d31b') prepare() { + tar --exclude=ReadMe.md -zxf ${_realname}-${pkgver}.tar.gz + cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-win.patch + patch -p1 -i ${srcdir}/002-introspection.patch } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ -DCMAKE_C_FLAGS="${CFLAGS}" \ - -G "MSYS Makefiles" \ + -DGOBJECT_INTROSPECTION=OFF \ ../${_realname}-${pkgver} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - local PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libical.pc + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libiconv/PKGBUILD b/mingw-w64-libiconv/PKGBUILD index dbd5c0058d..0e0d9be6af 100644 --- a/mingw-w64-libiconv/PKGBUILD +++ b/mingw-w64-libiconv/PKGBUILD @@ -1,15 +1,13 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=libiconv - -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname} + ${MINGW_PACKAGE_PREFIX}-iconv) pkgver=1.14 -pkgrel=2 -pkgdesc='Libiconv is a conversion library' -groups=("${MINGW_PACKAGE_PREFIX}") +pkgrel=5 arch=('any') url='http://www.gnu.org/software/libiconv/' -license=('LGPL') source=("http://ftp.gnu.org/pub/gnu/${_realname}/${_realname}-${pkgver}.tar.gz" 0001-compile-relocatable-in-gnulib.mingw.patch 0002-fix-cr-for-awk-in-configure.all.patch) @@ -17,6 +15,7 @@ md5sums=('e34509b1623cec449dfeb73d7ce9c6c6' '8818b7fe31286f589d180713329eb893' '9e955ee7135d39970a086451d4b87520') options=('!libtool' 'staticlibs') +makedepends=(${MINGW_PACKAGE_PREFIX}-gcc) prepare() { cd $srcdir/${_realname}-${pkgver} @@ -25,8 +24,10 @@ prepare() { } build() { - cd $srcdir/${_realname}-${pkgver} - ./configure --prefix=${MINGW_PREFIX} \ + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -37,16 +38,54 @@ build() { --disable-rpath \ --enable-silent-rules \ --enable-nls + make } check() { - cd ${srcdir}/${_realname}-${pkgver} + cd "${srcdir}/build-${MINGW_CHOST}" make check } -package() { - cd ${srcdir}/${_realname}-${pkgver} +_package_libiconv() { + pkgdesc='Character encoding conversion library (mingw-w64)' + license=(LGPL2 documentation:'GPL3') # This is LGPL except for documentation, see README + + cd "${srcdir}/build-${MINGW_CHOST}" make install DESTDIR="${pkgdir}" - rm -f ${pkgdir}${MINGW_PREFIX}/lib/charset.alias + rm -fr "${pkgdir}${MINGW_PREFIX}"/bin/*.exe + rm -f "${pkgdir}${MINGW_PREFIX}"/lib/charset.alias + rm -fr "${pkgdir}${MINGW_PREFIX}"/share/locale + rm -f "${pkgdir}${MINGW_PREFIX}"/share/doc/libiconv/*.1.* + rm -fr "${pkgdir}${MINGW_PREFIX}"/share/man/man1 + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/libcharset/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/libcharset/COPYING.LIB" } + +_package_iconv() { + pkgdesc='Character encoding conversion utility (mingw-w64)' + depends=("${MINGW_PACKAGE_PREFIX}-libiconv=${pkgver}-${pkgrel}" + "${MINGW_PACKAGE_PREFIX}-gettext") + license=('GPL3') + + cd "${srcdir}/build-${MINGW_CHOST}" + make install DESTDIR="${pkgdir}" + rm -f "${pkgdir}${MINGW_PREFIX}"/bin/*.dll + rm -fr "${pkgdir}${MINGW_PREFIX}"/include + rm -fr "${pkgdir}${MINGW_PREFIX}"/lib + rm -f "${pkgdir}${MINGW_PREFIX}"/share/doc/libiconv/*.3.* + rm -fr "${pkgdir}${MINGW_PREFIX}"/share/man/man3 + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/iconv/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/iconv/COPYING" +} + +package_mingw-w64-i686-iconv() { _package_iconv; } +package_mingw-w64-i686-libiconv() { _package_libiconv; } +package_mingw-w64-x86_64-iconv() { _package_iconv; } +package_mingw-w64-x86_64-libiconv() { _package_libiconv; } diff --git a/mingw-w64-libid3tag/PKGBUILD b/mingw-w64-libid3tag/PKGBUILD index b64ce735ed..17b263c25e 100644 --- a/mingw-w64-libid3tag/PKGBUILD +++ b/mingw-w64-libid3tag/PKGBUILD @@ -1,7 +1,6 @@ # Maintainer: Alexey Pavlov _realname=libid3tag - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.15.1b pkgrel=1 @@ -11,17 +10,16 @@ url="http://www.underbit.com/products/mad/" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-zlib") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -groups=("${MINGW_PACKAGE_PREFIX}") options=('staticlibs' 'strip' '!makeflags') source=(#"ftp://ftp.mars.org/pub/mpeg/${_realname}-${pkgver}.tar.gz" - http://sourceforge.net/projects/mad/files/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz - 0001-no-undefined.mingw.patch - 0002-update-ac-and-silent-rules.mingw.patch - '10_utf16.patch' - '11_unknown_encoding.patch' - 'CVE-2008-2109.patch' - 'id3tag.pc' - ) + http://sourceforge.net/projects/mad/files/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz + 0001-no-undefined.mingw.patch + 0002-update-ac-and-silent-rules.mingw.patch + '10_utf16.patch' + '11_unknown_encoding.patch' + 'CVE-2008-2109.patch' + 'id3tag.pc' + ) md5sums=('e5808ad997ba32c498803822078748c3' 'd6e03d565052d2267e382e811304ef87' '2daec906976c5316db171cc117fb697d' @@ -31,13 +29,13 @@ md5sums=('e5808ad997ba32c498803822078748c3' '9ee16beebe53f8b89f27504ea3d37385') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/0001-no-undefined.mingw.patch patch -p1 -i ${srcdir}/0002-update-ac-and-silent-rules.mingw.patch patch -p1 -i ${srcdir}/10_utf16.patch patch -p1 -i ${srcdir}/11_unknown_encoding.patch patch -Np0 -i ${srcdir}/CVE-2008-2109.patch - + touch NEWS AUTHORS ChangeLog rm aclocal.m4 rm Makefile.in @@ -46,18 +44,19 @@ prepare() { build() { mkdir -p $srcdir/build-${MINGW_CHOST} && cd $srcdir/build-${MINGW_CHOST} - ../${_realname}-$pkgver/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --enable-shared + --enable-shared + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - install -D -m644 "${srcdir}/id3tag.pc" "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/id3tag.pc" + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + install -D -m644 "${srcdir}/id3tag.pc" "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/id3tag.pc" sed -e "s|/usr|${MINGW_PREFIX}|g" -i "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/id3tag.pc" } diff --git a/mingw-w64-libidn/PKGBUILD b/mingw-w64-libidn/PKGBUILD index 19758b5f44..0194ef28ea 100644 --- a/mingw-w64-libidn/PKGBUILD +++ b/mingw-w64-libidn/PKGBUILD @@ -1,25 +1,26 @@ # Maintainer: Alexey Pavlov _realname=libidn +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.29 -pkgrel=1 +pkgver=1.32 +pkgrel=2 pkgdesc="Implementation of the Stringprep, Punycode and IDNA specifications (mingw-w64)" arch=('any') url="http://www.gnu.org/software/libidn" license=("GPL3, LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gtk-doc") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "gtk-doc") depends=("${MINGW_PACKAGE_PREFIX}-gettext") options=('staticlibs' 'strip') -source=("ftp://ftp.gnu.org/gnu/libidn/libidn-${pkgver}.tar.gz" - 0001-fix-gtkdoc.all.patch - 0002-fix-gdoc.all.patch) -sha1sums=('e0959eec9a03fd8053379b0aeab447c546c05ab2' +source=("ftp://ftp.gnu.org/gnu/libidn/${_realname}-${pkgver}.tar.gz" + 0001-fix-gtkdoc.all.patch + 0002-fix-gdoc.all.patch) +sha1sums=('ddd018611b98af7c67d434aa42d15d39f45129f5' '42baea83d76aeaa99e50f551d98dade8a5394fe3' '730dfdfdf3c2878113224c104f9c6c213010d7f0') prepare() { - cd "${srcdir}"/libidn-${pkgver} + cd "${srcdir}"/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-fix-gtkdoc.all.patch patch -p1 -i ${srcdir}/0002-fix-gdoc.all.patch @@ -28,20 +29,23 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/libidn-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX}\ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-csharp \ --disable-java \ + --disable-rpath \ --enable-threads=win32 + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libimobiledevice/0002-PyString_AsString-now-PyBytes_AsString.patch b/mingw-w64-libimobiledevice/0002-PyString_AsString-now-PyBytes_AsString.patch new file mode 100644 index 0000000000..a307296c61 --- /dev/null +++ b/mingw-w64-libimobiledevice/0002-PyString_AsString-now-PyBytes_AsString.patch @@ -0,0 +1,19 @@ +diff -urN libimobiledevice-1.2.0.orig/cython/debugserver.pxi libimobiledevice-1.2.0/cython/debugserver.pxi +--- libimobiledevice-1.2.0.orig/cython/debugserver.pxi 2015-07-22 22:43:52.357279900 +0100 ++++ libimobiledevice-1.2.0/cython/debugserver.pxi 2015-07-22 22:44:40.303768000 +0100 +@@ -44,13 +44,13 @@ + + + # from http://stackoverflow.com/a/17511714 +-from cpython.string cimport PyString_AsString ++from cpython.bytes cimport PyBytes_AsString + cdef char ** to_cstring_array(list_str): + if not list_str: + return NULL + cdef char **ret = malloc(len(list_str) * sizeof(char *)) + for i in xrange(len(list_str)): +- ret[i] = PyString_AsString(list_str[i]) ++ ret[i] = PyBytes_AsString(list_str[i]) + return ret + + diff --git a/mingw-w64-libimobiledevice/001-cython-includes.patch b/mingw-w64-libimobiledevice/001-cython-includes.patch new file mode 100644 index 0000000000..557305ff74 --- /dev/null +++ b/mingw-w64-libimobiledevice/001-cython-includes.patch @@ -0,0 +1,11 @@ +--- libimobiledevice-1.1.7/cython/Makefile.am.orig 2015-01-17 20:47:09.573200000 +0300 ++++ libimobiledevice-1.1.7/cython/Makefile.am 2015-01-17 20:48:25.781600000 +0300 +@@ -39,6 +39,8 @@ + imobiledevice_la_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(PYTHON_CPPFLAGS) $(AM_CFLAGS) -Wno-shadow -Wno-redundant-decls -Wno-switch-default -Wno-strict-aliasing -Wno-implicit-function-declaration -fvisibility=default + imobiledevice_la_LDFLAGS = -module -avoid-version -L$(libdir) $(PYTHON_LDFLAGS) $(AM_LDFLAGS) -no-undefined + imobiledevice_la_LIBADD = $(top_builddir)/src/libimobiledevice.la ++otherincludedir = $(includedir)/libimobiledevice/cython ++otherinclude_HEADERS = imobiledevice.pxd + + imobiledevice.c: imobiledevice.pyx $(PXDINCLUDES) $(PXIINCLUDES) + diff --git a/mingw-w64-libimobiledevice/PKGBUILD b/mingw-w64-libimobiledevice/PKGBUILD index bcc7f7c23f..73c0043782 100644 --- a/mingw-w64-libimobiledevice/PKGBUILD +++ b/mingw-w64-libimobiledevice/PKGBUILD @@ -2,28 +2,36 @@ _realname=libimobiledevice pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.1.7 +pkgver=1.2.0 pkgrel=1 pkgdesc='A cross-platform protocol library to communicate with iOS devices (mingw-w64)' -groups=("${MINGW_PACKAGE_PREFIX}" "xdev") arch=('any') url='http://www.libimobiledevice.org/' license=('GPL2+') -source=("http://www.libimobiledevice.org/downloads/${_realname}-${pkgver}.tar.bz2") +options=('staticlibs') +source=("http://www.libimobiledevice.org/downloads/${_realname}-${pkgver}.tar.bz2" + 001-cython-includes.patch + 0002-PyString_AsString-now-PyBytes_AsString.patch) depends=("${MINGW_PACKAGE_PREFIX}-libusbmuxd" "${MINGW_PACKAGE_PREFIX}-libplist" "${MINGW_PACKAGE_PREFIX}-openssl") -sha1sums=('ac47ba39e7f8d8cb9379756773ece30458b93c80') +sha1sums=('a8e3f21180b1d6df754d04a4080a29cf6891e701' + '9d091cf73ce1477db7b78fc8e47572e2e3031e79' + 'e54edd0b3b061ac8531c03b13a6b9336b5927a20') prepare() { - cd $srcdir/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-cython-includes.patch + patch -p1 -i ${srcdir}/0002-PyString_AsString-now-PyBytes_AsString.patch + + autoreconf -fiv } build() { - cd "$srcdir"/${_realname}-${pkgver} - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + PYTHON=${MINGW_PREFIX}/bin/python3 \ ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -31,6 +39,7 @@ build() { --target=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } @@ -42,4 +51,6 @@ check() { package() { cd "${srcdir}"/build-${CARCH} make install DESTDIR="${pkgdir}" + + rm -f ${pkgdir}${MINGW_PREFIX}/lib/python*/site-packages/*.a } diff --git a/mingw-w64-libjpeg-turbo/0001-header-compat.mingw.patch b/mingw-w64-libjpeg-turbo/0001-header-compat.mingw.patch index 7938e56235..b54267f232 100644 --- a/mingw-w64-libjpeg-turbo/0001-header-compat.mingw.patch +++ b/mingw-w64-libjpeg-turbo/0001-header-compat.mingw.patch @@ -13,19 +13,16 @@ /* * Define BITS_IN_JSAMPLE as either -@@ -154,14 +154,18 @@ - /* INT16 must hold at least the values -32768..32767. */ +@@ -118,6 +118,7 @@ + #endif /* HAVE_UNSIGNED_CHAR */ - #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ -+#ifndef _BASETSD_H_ /* basestd.h from mingw-w64 defines INT16 */ - typedef short INT16; - #endif -+#endif - /* INT32 must hold at least signed 32-bit values. */ - - #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -+#ifndef _BASETSD_H_ /* basestd.h from mingw-w64 defines INT32 */ ++#ifndef _BASETSD_H_ /* basestd.h from mingw-w64 defines UINT8, UINT16, INT16, INT32 */ + /* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special +@@ -158,6 +158,7 @@ + #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ typedef long INT32; #endif +#endif diff --git a/mingw-w64-libjpeg-turbo/PKGBUILD b/mingw-w64-libjpeg-turbo/PKGBUILD index 0a43f75ab2..ca06ab5dfb 100644 --- a/mingw-w64-libjpeg-turbo/PKGBUILD +++ b/mingw-w64-libjpeg-turbo/PKGBUILD @@ -1,58 +1,65 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=libjpeg-turbo - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.1 -pkgrel=4 +pkgver=1.4.2 +pkgrel=1 pkgdesc="JPEG image codec with accelerated baseline compression and decompression (mingw-w64)" arch=('any') url="http://libjpeg-turbo.virtualgl.org" -license=("GPL, custom") +license=(custom:'BSD-like') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-nasm" "${MINGW_PACKAGE_PREFIX}-gcc") provides=("${MINGW_PACKAGE_PREFIX}-libjpeg") conflicts=("${MINGW_PACKAGE_PREFIX}-libjpeg") replaces=("${MINGW_PACKAGE_PREFIX}-libjpeg") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$pkgver.tar.gz" +source=("http://downloads.sourceforge.net/libjpeg-turbo/${_realname}-${pkgver}.tar.gz" "0001-header-compat.mingw.patch" - "jpeg-typedefs.patch" "libjpeg-turbo-1.3.1-libmng-compatibility.patch") -md5sums=('2c3a68129dac443a72815ff5bb374b05' - '4cd30dbda4e54a6875e74ed437e41b49' - 'b758ab3ac6a0604c6ed5fb9d850c9a73' +md5sums=('86b0d5f7507c2e6c21c00219162c3c44' + '11e4818dd682ae73cd75f11013a97e72' 'b54c2ab69837e1b72605184364360af0') prepare() { - cd "$srcdir/libjpeg-turbo-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/0001-header-compat.mingw.patch - #patch -p1 -i ${srcdir}/jpeg-typedefs.patch patch -p1 -i ${srcdir}/libjpeg-turbo-1.3.1-libmng-compatibility.patch } build() { - mkdir -p "${srcdir}/build-${CARCH}" - cd "${srcdir}/build-${CARCH}" + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --with-jpeg8 \ + --enable-shared \ + --enable-static \ --mandir=${MINGW_PREFIX}/share/man make } check() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" make test } package() { - cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + cp "${srcdir}"/${_realname}-${pkgver}/{jinclude,transupp}.h ${pkgdir}${MINGW_PREFIX}/include/ + + # Licenses + # See http://www.libjpeg-turbo.org/About/License + cd "${srcdir}/${_realname}-${pkgver}" + install -Dm644 README "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 README-turbo.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README-turbo.txt" + install -Dm644 simd/jsimdext.inc "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/simd/jsimdext.inc" } diff --git a/mingw-w64-libjpeg-turbo/jpeg-7-tiff-ojpeg.patch b/mingw-w64-libjpeg-turbo/jpeg-7-tiff-ojpeg.patch deleted file mode 100644 index 388449532c..0000000000 --- a/mingw-w64-libjpeg-turbo/jpeg-7-tiff-ojpeg.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/jdhuff.c 2012-05-03 10:41:17 +0400 -+++ b/jdhuff.c 2012-05-03 10:43:15 +0400 -@@ -806,3 +806,36 @@ - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; - } - } -+ -+/* -+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in- -+ * TIFF encapsulations produced by Microsoft's Wang Imaging -+ * for Windows application with the public-domain TIFF Library. Based upon an -+ * examination of selected output files, this program apparently divides a JPEG -+ * bit-stream into consecutive horizontal TIFF "strips", such that the JPEG -+ * encoder's/decoder's DC coefficients for each image component are reset before -+ * each "strip". Moreover, a "strip" is not necessarily encoded in a multiple -+ * of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip" -+ * for alignment to the next input-Byte storage boundary. IJG JPEG Library -+ * decoder state is not normally exposed to client applications, so this sub- -+ * routine provides the TIFF Library with a "hook" to make these corrections. -+ * It should be called after "jpeg_start_decompress()" and before -+ * "jpeg_finish_decompress()", just before decoding each "strip" using -+ * "jpeg_read_raw_data()" or "jpeg_read_scanlines()". -+ * -+ * This kludge is not sanctioned or supported by the Independent JPEG Group, and -+ * future changes to the IJG JPEG Library might invalidate it. Do not send bug -+ * reports about this code to IJG developers. Instead, contact the author for -+ * advice: Scott B. Marovich , Hewlett-Packard Labs, 6/01. -+ */ -+GLOBAL(void) -+jpeg_reset_huff_decode (register j_decompress_ptr cinfo,register float *refbw) -+{ register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy; -+ register int ci = 0; -+ -+ /* Re-initialize DC predictions */ -+ do entropy->saved.last_dc_val[ci] = -refbw[ci << 1]; -+ while (++ci < cinfo->comps_in_scan); -+ /* Discard encoded input bits, up to the next Byte boundary */ -+ entropy->bitstate.bits_left &= ~7; -+} diff --git a/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch b/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch deleted file mode 100644 index b7c5ccca5a..0000000000 --- a/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/jmorecfg.h 2012-02-10 06:47:55 +0300 -+++ b/jmorecfg.h 2012-05-03 10:29:13 +0400 -@@ -159,7 +159,7 @@ - /* INT32 must hold at least signed 32-bit values. */ - - #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ --typedef long INT32; -+typedef int INT32; - #endif - - /* Datatype used for image dimensions. The JPEG standard only supports -@@ -224,7 +224,13 @@ - * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. - */ - --#ifndef HAVE_BOOLEAN -+#if defined(_WIN32) && !defined(HAVE_BOOLEAN) -+#ifndef __RPCNDR_H__ -+typedef unsigned char boolean; -+#endif -+#define HAVE_BOOLEAN -+#endif -+#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__) - typedef int boolean; - #endif - #ifndef FALSE /* in case these macros already exist */ diff --git a/mingw-w64-libjpeg-turbo/libjpeg-buf-oflo.patch b/mingw-w64-libjpeg-turbo/libjpeg-buf-oflo.patch deleted file mode 100644 index b2ddb8979d..0000000000 --- a/mingw-w64-libjpeg-turbo/libjpeg-buf-oflo.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/wrjpgcom.c 2012-05-03 10:37:26 +0400 -+++ b/wrjpgcom.c 2012-05-03 10:38:10 +0400 -@@ -446,6 +446,8 @@ - } else if (keymatch(arg, "comment", 1)) { - if (++argn >= argc) usage(); - comment_arg = argv[argn]; -+#if 0 -+#error "There is a buffer overflow in the code below" - /* If the comment text starts with '"', then we are probably running - * under MS-DOG and must parse out the quoted string ourselves. Sigh. - */ -@@ -466,6 +468,7 @@ - strcat(comment_arg, argv[argn]); - } - } -+#endif - comment_length = (unsigned int) strlen(comment_arg); - } else - usage(); diff --git a/mingw-w64-libjpeg-turbo/libjpeg-turbo-match-autoconf-behavior.patch b/mingw-w64-libjpeg-turbo/libjpeg-turbo-match-autoconf-behavior.patch deleted file mode 100644 index d18a449603..0000000000 --- a/mingw-w64-libjpeg-turbo/libjpeg-turbo-match-autoconf-behavior.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- libjpeg-turbo-1.3.0/win/jconfig.h.in.orig 2013-08-03 21:52:45.115856655 +0200 -+++ libjpeg-turbo-1.3.0/win/jconfig.h.in 2013-08-03 21:53:40.335912080 +0200 -@@ -7,14 +7,14 @@ - #cmakedefine D_ARITH_CODING_SUPPORTED - #cmakedefine MEM_SRCDST_SUPPORTED - --#define HAVE_PROTOTYPES --#define HAVE_UNSIGNED_CHAR --#define HAVE_UNSIGNED_SHORT -+#define HAVE_PROTOTYPES 1 -+#define HAVE_UNSIGNED_CHAR 1 -+#define HAVE_UNSIGNED_SHORT 1 - /* #define void char */ - /* #define const */ - #undef CHAR_IS_UNSIGNED --#define HAVE_STDDEF_H --#define HAVE_STDLIB_H -+#define HAVE_STDDEF_H 1 -+#define HAVE_STDLIB_H 1 - #undef NEED_BSD_STRINGS - #undef NEED_SYS_TYPES_H - #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ -@@ -25,7 +25,7 @@ - #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ - typedef unsigned char boolean; - #endif --#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -+#define HAVE_BOOLEAN 1 /* prevent jmorecfg.h from redefining it */ - - /* Define "INT32" as int, not long, per Windows custom */ - #if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ diff --git a/mingw-w64-libkcw-qt5-git/PKGBUILD b/mingw-w64-libkcw-qt5-git/PKGBUILD new file mode 100644 index 0000000000..661979941c --- /dev/null +++ b/mingw-w64-libkcw-qt5-git/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer (MSYS2): Ray Donnelly + +_variant=-static +#_variant=-shared +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "libkcw" +_ver_base=0.1.0 +pkgver=0.1.0.70.810b71c +pkgrel=1 +arch=('any') +url=('https://projects.kde.org/projects/frameworks/${_basename}') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules" "git") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("${_realname}"::"git://anongit.kde.org/${_basename}.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + local -a extra_config + mkdir -p build-${CARCH}${_variant} + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX \ + cmake ../${_realname} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make VERBOSE=1 +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libksba/PKGBUILD b/mingw-w64-libksba/PKGBUILD index 8faa897c10..40c98305bc 100644 --- a/mingw-w64-libksba/PKGBUILD +++ b/mingw-w64-libksba/PKGBUILD @@ -2,43 +2,45 @@ _realname=libksba pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.1 -pkgrel=1 +pkgver=1.3.3 +pkgrel=2 pkgdesc="A CMS and X.509 access library (mingw-w64)" arch=('any') license=('GPL') url="ftp://ftp.gnupg.org/gcrypt/alpha/libksba" depends=("${MINGW_PACKAGE_PREFIX}-libgpg-error") -groups=("${MINGW_PACKAGE_PREFIX}") options=('strip' 'staticlibs') -source=(ftp://ftp.gnupg.org/gcrypt/$_realname/$_realname-$pkgver.tar.bz2 +source=(ftp://ftp.gnupg.org/gcrypt/${_realname}/${_realname}-${pkgver}.tar.bz2 0001-fix-def.mingw.patch) -md5sums=('9be95245fcfa9d56f56853078ef2650b' +md5sums=('a5dd3c57fca254935f5cf8db26e39065' '437ad992a8ac21ba7646f707b2b4a4f2') prepare() { - cd $srcdir/$_realname-$pkgver + cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-fix-def.mingw.patch } build() { - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - ../$_realname-$pkgver/configure \ + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } check() { - cd ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${MINGW_CHOST} make check -} +} package() { - cd ${srcdir}/build-${CARCH} - make -j1 DESTDIR=$pkgdir install + cd ${srcdir}/build-${MINGW_CHOST} + make -j1 DESTDIR=${pkgdir} install } diff --git a/mingw-w64-liblastfm-qt4/PKGBUILD b/mingw-w64-liblastfm-qt4/PKGBUILD index b756c0e601..4a95ca0198 100644 --- a/mingw-w64-liblastfm-qt4/PKGBUILD +++ b/mingw-w64-liblastfm-qt4/PKGBUILD @@ -2,50 +2,47 @@ # Contributor: AlexWMF _realname=liblastfm - +pkgbase=mingw-w64-${_realname}-qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4" - -pkgver=1.0.8 -pkgrel=2 -pkgdesc="A Qt C++ library for the Last.fm webservices http://www.last.fm" +pkgver=1.0.9 +pkgrel=1 +pkgdesc="A Qt C++ library for the Last.fm webservices http://www.last.fm (mingw-w64)" arch=('any') license=('Boost') url="http://www.rasterbar.com/products/libtorrent" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-qt4" - "${MINGW_PACKAGE_PREFIX}-fftw" - "${MINGW_PACKAGE_PREFIX}-libsamplerate") - + "${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-libsamplerate") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake") - + "${MINGW_PACKAGE_PREFIX}-cmake") options=(!strip staticlibs !buildflags) - source=(${_realname}-${pkgver}.tar.gz::"https://github.com/lastfm/liblastfm/archive/${pkgver}.tar.gz" versioned-dlls-mingw.patch) -md5sums=('5f7c1d15c0be57d73ec480f74c1d4592' +md5sums=('8748f423f66f2fbc38c39f9153d01a71' 'dd9996ec2896883acef6b90d8cd22302') prepare() { - cd ${srcdir}/${_realname}-${pkgver} - patch -p0 -i ${srcdir}/versioned-dlls-mingw.patch + cd ${srcdir}/${_realname}-${pkgver} + patch -p0 -i ${srcdir}/versioned-dlls-mingw.patch } build() { mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_TESTS=False \ - ${srcdir}/${_realname}-${pkgver}/ + ${srcdir}/${_realname}-${pkgver} - make ${MAKEFLAGS} # VERBOSE=1 + make ${MAKEFLAGS} # VERBOSE=1 } -package() { +package() { cd ${srcdir}/build-${MINGW_CHOST} - make -j1 install + make DESTDIR=${pkgdir} -j1 install } diff --git a/mingw-w64-liblastfm/PKGBUILD b/mingw-w64-liblastfm/PKGBUILD index 9573f56cb9..8e7c6e8721 100644 --- a/mingw-w64-liblastfm/PKGBUILD +++ b/mingw-w64-liblastfm/PKGBUILD @@ -2,27 +2,22 @@ # Contributor: AlexWMF _realname=liblastfm - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" - -pkgver=1.0.8 +pkgver=1.0.9 pkgrel=2 pkgdesc="A Qt C++ library for the Last.fm webservices http://www.last.fm" arch=('any') license=('Boost') -url="http://www.rasterbar.com/products/libtorrent" +url="http://www.lastfm.ru/download" depends=("${MINGW_PACKAGE_PREFIX}-qt5" "${MINGW_PACKAGE_PREFIX}-fftw" "${MINGW_PACKAGE_PREFIX}-libsamplerate") - makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake") - + "${MINGW_PACKAGE_PREFIX}-cmake") options=(!strip staticlibs !buildflags) - source=(${_realname}-${pkgver}.tar.gz::"https://github.com/lastfm/liblastfm/archive/${pkgver}.tar.gz" versioned-dlls-mingw.patch) -md5sums=('5f7c1d15c0be57d73ec480f74c1d4592' +md5sums=('8748f423f66f2fbc38c39f9153d01a71' 'dd9996ec2896883acef6b90d8cd22302') prepare() { @@ -31,20 +26,22 @@ prepare() { } build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_TESTS=False \ - ${srcdir}/${_realname}-${pkgver}/ + ${srcdir}/${_realname}-${pkgver} - make ${MAKEFLAGS} # VERBOSE=1 + make ${MAKEFLAGS} # VERBOSE=1 } -package() { +package() { cd ${srcdir}/build-${MINGW_CHOST} - make -j1 install + make DESTDIR=${pkgdir} -j1 install } diff --git a/mingw-w64-liblqr/PKGBUILD b/mingw-w64-liblqr/PKGBUILD index 8850b53038..7f1b339662 100644 --- a/mingw-w64-liblqr/PKGBUILD +++ b/mingw-w64-liblqr/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=liblqr - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.4.2 -pkgrel=2 +pkgrel=3 pkgdesc="A seam-carving C/C++ library called Liquid Rescale (mingw-w64)" arch=('any') url="http://liblqr.wikidot.com/" @@ -12,20 +11,21 @@ license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-glib2") options=('staticlibs' 'strip') -source=("http://liblqr.wikidot.com/local--files/en:download-page/${_realname}-1-$pkgver.tar.bz2") -md5sums=('915643d993da97e10665d48c0bf8f3d0') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/carlobaldassi/liblqr/archive/v${pkgver}.tar.gz) +md5sums=('f7b4ecddd8a038f057e236347fd7767c') build() { - cd "$srcdir/${_realname}-1-$pkgver" + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - ../configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } package() { - cd "$srcdir/${_realname}-1-$pkgver/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libmad/PKGBUILD b/mingw-w64-libmad/PKGBUILD index 346750e973..f6d013a1ef 100644 --- a/mingw-w64-libmad/PKGBUILD +++ b/mingw-w64-libmad/PKGBUILD @@ -1,19 +1,19 @@ # Maintainer: Alexey Pavlov # Contributor: AlexWMF - + _realname=libmad pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.15.1b -pkgrel=1 -pkgdesc="A high-quality MPEG audio decoder" +pkgrel=2 +pkgdesc="A high-quality MPEG audio decoder (mingw-w64)" arch=('any') url="http://www.underbit.com/products/mad/" license=('GPL') depends=() makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "autoconf" - "m4") + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "autoconf" + "m4") source=(http://downloads.sourceforge.net/sourceforge/mad/${_realname}-${pkgver}.tar.gz 0001-no-undefined.mingw.patch 0003-update-ac-and-silent-rules.mingw.patch @@ -28,7 +28,7 @@ sha1sums=('cac19cd00e1a907f3150cc040ccc077783496d76' 'b9c61ecacc6a6d47425d66f33327e0634cd8a33c' '3d5b958244ef0395ccdcb00344f2cf301ca07e34' '448a6d597ce61bb5ea38be6e56f66196d3be6515') - + prepare() { cd ${_realname}-${pkgver} patch -p1 -i "${srcdir}/0001-no-undefined.mingw.patch" @@ -37,22 +37,23 @@ prepare() { patch -p1 -i "${srcdir}/0005-frame_length.diff" patch -p1 -i "${srcdir}/0006-optimize.diff" patch -p1 -i "${srcdir}/0007-libmad.patch" - + touch NEWS AUTHORS ChangeLog rm aclocal.m4 rm Makefile.in WANT_AUTOMAKE=latest autoreconf -fi } - + build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - + --host=${MINGW_CHOST} + make } diff --git a/mingw-w64-libmangle-git/PKGBUILD b/mingw-w64-libmangle-git/PKGBUILD index 48f5070a24..e6d642a40d 100644 --- a/mingw-w64-libmangle-git/PKGBUILD +++ b/mingw-w64-libmangle-git/PKGBUILD @@ -1,41 +1,48 @@ # Maintainer: Alexey Pavlov _realname=libmangle - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -_ver_base=4.0.0 -pkgver=4.0.0.4328.a913346 +pkgver=5.0.0.4509.2e5a9a2 pkgrel=1 pkgdesc="MinGW-w64 libmangle" arch=('any') url="http://mingw-w64.sourceforge.net" license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain" "${MINGW_PACKAGE_PREFIX}") -makedepends=("git" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-binutils" "${MINGW_PACKAGE_PREFIX}-crt" "${MINGW_PACKAGE_PREFIX}-headers") +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +makedepends=("git" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-binutils" + "${MINGW_PACKAGE_PREFIX}-crt-git" + "${MINGW_PACKAGE_PREFIX}-headers-git") options=('strip' 'staticlibs' '!emptydirs') -source=("${_realname}"::"git://git.code.sf.net/p/mingw-w64/mingw-w64") -md5sums=(SKIP) +source=("mingw-w64"::"git://git.code.sf.net/p/mingw-w64/mingw-w64") +md5sums=('SKIP') pkgver() { - cd "${srcdir}/${_realname}" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/mingw-w64" + local _major=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MAJOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _minor=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MINOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _rev=0 + printf "%s.%s.%s.%s.%s" ${_major} ${_minor} ${_rev} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { - mkdir -p ${srcdir}/build-${MINGW_CHOST} - cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}/mingw-w64-libraries/libmangle/configure \ + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + ${srcdir}/mingw-w64/mingw-w64-libraries/libmangle/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} - make + + make } package() { cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR=${pkgdir} install - install -Dm644 ${srcdir}/${_realname}/mingw-w64-libraries/libmangle/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/mingw-w64-libraries/COPYING.${_realname} + install -Dm644 ${srcdir}/mingw-w64/mingw-w64-libraries/libmangle/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/mingw-w64-libraries/COPYING.${_realname} } diff --git a/mingw-w64-libmariadbclient/PKGBUILD b/mingw-w64-libmariadbclient/PKGBUILD index efd236d9f8..707d9d0b30 100644 --- a/mingw-w64-libmariadbclient/PKGBUILD +++ b/mingw-w64-libmariadbclient/PKGBUILD @@ -1,49 +1,65 @@ # Maintainer: Alexey Pavlov _realname=libmariadbclient - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.0.0 -pkgrel=1 +pkgver=2.2.0 +pkgrel=2 pkgdesc="MariaDB client libraries (mingw-w64)" arch=('any') url="http://mariadb.org" license=('LGPL') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-zlib") #"${MINGW_PACKAGE_PREFIX}-sqlite3" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") #"${MINGW_PACKAGE_PREFIX}-curl" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-zlib") +#optdepends=("${MINGW_PACKAGE_PREFIX}-curl") options=('!strip' 'staticlibs') -source=("ftp://ftp.osuosl.org/pub/mariadb/client-native-${pkgver}/src/mariadb_client-${pkgver}-src.tar.gz" - fix-libnames-mingw.patch) -sha256sums=('fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60' - '5a713fff49bdb7aadebda130d5ea4416a05fb9ebe4b0abe19ef6ecc1b05e2ab6') +source=(#"https://downloads.mariadb.org/interstitial/connector-c-${pkgver}/source-tgz/mariadb-connector-c-${pkgver}-src.tar.gz" + http://mirror.mephi.ru/mariadb/connector-c-${pkgver}/mariadb-connector-c-${pkgver}-src.tar.gz{,.asc} + 'fix-libnames-mingw.patch' + 'use_fopen_for_xp_compatibility.patch' + 'fix-size-t-defined.patch' + 'fix-redefinitions.patch') +sha256sums=('3825b068d38bc19d6ad1eaecdd74bcd49d6ddd9d00559fb150e4e851a55bbbd4' + 'SKIP' + '2872bbfef721ebcdfa970ea57ad81888a4f29a6f55fed140c38b53f52b2b5d78' + '8069bc0c7f4204fe2b1ea54c610c27aebd0c54d7a21ecf6352c9bdd9cf1c4062' + 'e84d3ac9b2e716dc1581d82c34001d8561bb0d09750d1d57d4b448a8cc259ff0' + 'ddb20e474ba1a63f65f28ee76bb74074316b15cc90ecdae6d2aa1febf0803d72') prepare() { - cd ${srcdir}/mariadb_client-${pkgver}-src + cd ${srcdir}/mariadb-connector-c-${pkgver}-src patch -p1 -i ${srcdir}/fix-libnames-mingw.patch + patch -p1 -i ${srcdir}/use_fopen_for_xp_compatibility.patch + patch -p1 -i ${srcdir}/fix-size-t-defined.patch + patch -p1 -i ${srcdir}/fix-redefinitions.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} - mkdir -p ${srcdir}/${MINGW_CHOST} - cd ${srcdir}/${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G "MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=RELEASE \ -DWITH_EXTERNAL_ZLIB=ON \ - -DWITH_SQLITE=OFF \ + -DWITH_REMOTEIO=OFF \ -DWITH_OPENSSL=ON \ - ../mariadb_client-${pkgver}-src + -DWITH_MYSQLCOMPAT=OFF \ + ../mariadb-connector-c-${pkgver}-src + make } package() { - cd "${srcdir}/${MINGW_CHOST}" - make install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + ln -s "${pkgdir}${MINGW_PREFIX}"/include/mariadb "${pkgdir}${MINGW_PREFIX}"/include/mysql cp "${pkgdir}${MINGW_PREFIX}"/lib/{libmariadb,libmysqlclient}.dll.a cp "${pkgdir}${MINGW_PREFIX}"/lib/{libmariadb,libmysqlclient_r}.dll.a diff --git a/mingw-w64-libmariadbclient/fix-libnames-mingw.patch b/mingw-w64-libmariadbclient/fix-libnames-mingw.patch index 74dda3de3a..f427422c58 100644 --- a/mingw-w64-libmariadbclient/fix-libnames-mingw.patch +++ b/mingw-w64-libmariadbclient/fix-libnames-mingw.patch @@ -1,34 +1,27 @@ ---- mariadb_client-2.0.0-src/libmariadb/CMakeLists.txt.orig 2014-04-04 14:21:01.000000000 +0400 -+++ mariadb_client-2.0.0-src/libmariadb/CMakeLists.txt 2014-04-18 12:08:42.907600000 +0400 -@@ -149,31 +149,32 @@ - TARGET_LINK_LIBRARIES(mariadbclient ${SSL_LIBRARIES}) +--- mariadb-connector-c-2.2.0-src/libmariadb/CMakeLists.txt.orig 2015-09-29 22:21:13.000000000 +0300 ++++ mariadb-connector-c-2.2.0-src/libmariadb/CMakeLists.txt 2015-10-30 12:42:38.140347000 +0300 +@@ -375,27 +375,26 @@ + SET(EMPTY_FILE ${CMAKE_SOURCE_DIR}/libmariadb/empty.c) ENDIF() --ADD_LIBRARY(libmariadb SHARED ${LIBMARIADB_SOURCES}) --TARGET_LINK_LIBRARIES(libmariadb ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${MATH_LIBRARY} ${ICONV_LIBRARIES}) -+ADD_LIBRARY(mariadb SHARED ${LIBMARIADB_SOURCES}) -+TARGET_LINK_LIBRARIES(mariadb ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${MATH_LIBRARY} ${ICONV_LIBRARIES}) +-ADD_LIBRARY(mariadbclient STATIC $ ${EMPTY_FILE} ${EXPORT_LINK}) ++ADD_LIBRARY(mariadbclient STATIC $ ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) - IF(OPENSSL_FOUND) -- TARGET_LINK_LIBRARIES(libmariadb ${SSL_LIBRARIES}) -+ TARGET_LINK_LIBRARIES(mariadb ${SSL_LIBRARIES}) - ENDIF() - - IF(WIN32) -- TARGET_LINK_LIBRARIES(libmariadb ws2_32 advapi32 kernel32) -+ TARGET_LINK_LIBRARIES(mariadb ws2_32 advapi32 kernel32) - TARGET_LINK_LIBRARIES(mariadbclient ws2_32 advapi32 kernel32) - ELSE() -- TARGET_LINK_LIBRARIES(libmariadb m) -+ TARGET_LINK_LIBRARIES(mariadb m) - TARGET_LINK_LIBRARIES(mariadbclient m) +-ADD_LIBRARY(libmariadb SHARED $ ${EMPTY_FILE} ${EXPORT_LINK}) +-TARGET_LINK_LIBRARIES(libmariadb ${SYSTEM_LIBS}) ++ADD_LIBRARY(mariadb SHARED $ ${EMPTY_FILE}) ++TARGET_LINK_LIBRARIES(mariadb ${SYSTEM_LIBS}) + IF(UNIX) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") ENDIF() IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - TARGET_LINK_LIBRARIES (libmariadb "-Wl,--no-undefined") -- TARGET_LINK_LIBRARIES (libmariadb "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/version_script.txt") +- TARGET_LINK_LIBRARIES (libmariadb "-Wl,--version-script=${EXPORT_FILE}") + TARGET_LINK_LIBRARIES (mariadb "-Wl,--no-undefined") -+ TARGET_LINK_LIBRARIES (mariadb "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/version_script.txt") + TARGET_LINK_LIBRARIES (mariadbclient "-Wl,--no-undefined") +- TARGET_LINK_LIBRARIES (mariadbclient "-Wl,--version-script=${EXPORT_FILE}") ENDIF() -SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "") @@ -43,18 +36,32 @@ # # Installation -@@ -209,10 +210,10 @@ +@@ -408,20 +409,20 @@ + # There are still several projects which don't make use + # of the config program. To make sure these programs can + # use mariadb client library we provide libmysql symlinks +-IF(NOT WIN32 AND WITH_MYSQLCOMPAT) +- SET(INSTALL_PATH ${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}) +- create_symlink(libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX} libmariadb ${INSTALL_PATH}) +- create_symlink(libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX} libmariadb ${INSTALL_PATH}) ++IF(WITH_MYSQLCOMPAT) ++ SET(INSTALL_PATH ${BIN_INSTALL_DIR}) ++ create_symlink(libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX} mariadb ${INSTALL_PATH}) ++ create_symlink(libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX} mariadb ${INSTALL_PATH}) + create_symlink(libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_PATH}) + create_symlink(libmysqlclient_r${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_PATH}) + ENDIF() INSTALL(TARGETS - libmariadb mariadbclient -- RUNTIME DESTINATION "lib/mariadb" -- LIBRARY DESTINATION "lib/mariadb" -- ARCHIVE DESTINATION "lib/mariadb") +- RUNTIME DESTINATION "${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}" +- LIBRARY DESTINATION "${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}" +- ARCHIVE DESTINATION "${LIB_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}") + mariadb mariadbclient -+ RUNTIME DESTINATION "bin" -+ LIBRARY DESTINATION "lib" -+ ARCHIVE DESTINATION "lib") - IF(NOT WIN32 AND WITH_MYSQLCOMPAT) - INSTALL(FILES "${CMAKE_BINARY_DIR}/libmariadb/libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}" ++ RUNTIME DESTINATION "${BIN_INSTALL_DIR}" ++ LIBRARY DESTINATION "${LIB_INSTALL_DIR}" ++ ARCHIVE DESTINATION "${LIB_INSTALL_DIR}") + + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ + DESTINATION ${INCLUDE_INSTALL_DIR}/${SUFFIX_INSTALL_DIR}) diff --git a/mingw-w64-libmariadbclient/fix-redefinitions.patch b/mingw-w64-libmariadbclient/fix-redefinitions.patch new file mode 100644 index 0000000000..5c714a8576 --- /dev/null +++ b/mingw-w64-libmariadbclient/fix-redefinitions.patch @@ -0,0 +1,12 @@ +--- mariadb-connector-c-2.2.0-src/include/config-win.h.orig 2015-11-09 09:36:10.157148000 +0300 ++++ mariadb-connector-c-2.2.0-src/include/config-win.h 2015-11-09 09:36:14.742989400 +0300 +@@ -56,7 +56,9 @@ + #define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */ + #define F_OK 0 /* parameter to access() */ + ++#ifndef __MINGW64_VERSION_MAJOR + #define S_IROTH S_IREAD /* for my_lib */ ++#endif + + #ifdef __BORLANDC__ + #define FILE_BINARY O_BINARY /* my_fopen in binary mode */ diff --git a/mingw-w64-libmariadbclient/fix-size-t-defined.patch b/mingw-w64-libmariadbclient/fix-size-t-defined.patch new file mode 100644 index 0000000000..9b9bc4c0b8 --- /dev/null +++ b/mingw-w64-libmariadbclient/fix-size-t-defined.patch @@ -0,0 +1,11 @@ +--- mariadb-connector-c-2.2.0-src/include/my_global.h.orig 2015-02-02 22:18:57.873440040 -0700 ++++ mariadb-connector-c-2.2.0-src/include/my_global.h 2015-02-02 22:17:45.125574689 -0700 +@@ -451,7 +451,7 @@ + #define NO_PISAM /* Not needed anymore */ + #define NO_MISAM /* Not needed anymore */ + #define NO_HASH /* Not needed anymore */ +-#ifdef _WIN32 ++#if defined(_WIN32) && !defined(__MINGW32__) + #define NO_DIR_LIBRARY /* Not standar dir-library */ + #define USE_MY_STAT_STRUCT /* For my_lib */ + #ifdef _SIZE_T_DEFINED diff --git a/mingw-w64-libmariadbclient/use_fopen_for_xp_compatibility.patch b/mingw-w64-libmariadbclient/use_fopen_for_xp_compatibility.patch new file mode 100644 index 0000000000..f4ddbc9f4b --- /dev/null +++ b/mingw-w64-libmariadbclient/use_fopen_for_xp_compatibility.patch @@ -0,0 +1,28 @@ +--- mariadb-connector-c-2.2.0-src/libmariadb/dbug.c 2014-04-04 04:21:01.000000000 -0600 ++++ mariadb-connector-c-2.2.0-src/libmariadb/dbug.c 2015-01-24 16:47:13.316693150 -0700 +@@ -2050,11 +2050,7 @@ + } + else + { +-#ifdef _WIN32 +- if (fopen_s(&fp, name, append ? "a+" : "w")) +-#else + if (!(fp= fopen(name, append ? "a+" : "w"))) +-#endif + { + (void) fprintf(stderr, ERR_OPEN, cs->process, name); + perror(""); +--- mariadb-connector-c-2.2.0-src/libmariadb/my_fopen.c 2014-04-04 04:21:01.000000000 -0600 ++++ mariadb-connector-c-2.2.0-src/libmariadb/my_fopen.c 2015-01-24 16:46:10.735766900 -0700 +@@ -36,11 +36,7 @@ + FileName, Flags, MyFlags)); + + make_ftype(type,Flags); +-#ifdef _WIN32 +- if (fopen_s(&fd, FileName, type) == 0) +-#else + if ((fd = fopen(FileName, type)) != 0) +-#endif + { + /* + The test works if MY_NFILE < 128. The problem is that fileno() is char diff --git a/mingw-w64-libmatroska/001-makefile.patch b/mingw-w64-libmatroska/001-makefile.patch deleted file mode 100644 index 889e958440..0000000000 --- a/mingw-w64-libmatroska/001-makefile.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- libmatroska-1.4.1/make/mingw32/Makefile.orig 2013-09-17 22:15:34.000000000 +0500 -+++ libmatroska-1.4.1/make/mingw32/Makefile 2014-09-25 13:46:28.214600000 +0500 -@@ -9,12 +9,19 @@ - # Compile with debug information? - #DEBUG = yes - -+prefix=/mingw -+bindir=$(prefix)/bin -+libdir=$(prefix)/lib -+includedir=$(prefix)/include/matroska -+ - # Where libebml resides - EBML_DIR = ../../../libebml - - # Has libebml been compiled as a DLL? - EBML_DLL = yes - -+LIBEBML_INCLUDE_DIR=../../../libebml -+INCLUDE_DIR=../../matroska - # - # Don't change anything below this line. - # -@@ -27,6 +34,11 @@ - WINDRES = $(CROSS)windres - RANLIB = $(CROSS)ranlib - AR = $(CROSS)ar -+INSTALL = install -+INSTALL_OPTS = -m 644 -+INSTALL_OPTS_LIB = -m 644 -+INSTALL_DIR_OPTS = -m 755 -+ - RES = - SRC = $(wildcard ../../src/*.cpp) - OBJ = $(patsubst %.cpp,%.o,$(SRC)) -@@ -104,6 +116,32 @@ - $(CXX) $(COMPILEFLAGS) -MM -MT $$o $$i >> .depend ; \ - done - -+ifeq (yes,$(SHARED)) -+install: install_sharedlib install_headers -+else -+install: install_staticlib install_headers -+endif -+ -+install_headers: -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir) -+ for i in $(INCLUDE_DIR)/*.h; do \ -+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \ -+ done -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c -+ for i in $(INCLUDE_DIR)/c/*.h; do \ -+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \ -+ done -+ -+install_staticlib: $(LIBS) -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir) -+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBS) $(DESTDIR)$(libdir) -+ -+install_sharedlib: $(LIBS) -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(bindir) -+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir) -+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBS) $(DESTDIR)$(bindir) -+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBS).a $(DESTDIR)$(libdir) -+ - # - # include dependency files if they exist - # diff --git a/mingw-w64-libmatroska/PKGBUILD b/mingw-w64-libmatroska/PKGBUILD index 870bf5280c..fa3276047d 100644 --- a/mingw-w64-libmatroska/PKGBUILD +++ b/mingw-w64-libmatroska/PKGBUILD @@ -1,33 +1,36 @@ # Maintainer: Alexey Pavlov _realname=libmatroska +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.4.1 +pkgver=1.4.4 pkgrel=1 pkgdesc="Matroska library (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('LGPL') -url="http://dl.matroska.org/downloads/libebml/" +url="http://matroska.org" depends=("${MINGW_PACKAGE_PREFIX}-libebml") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "automake" "autoconf") options=('staticlibs') -source=("http://dl.matroska.org/downloads/${_realname}/${_realname}-${pkgver}.tar.bz2" - 001-makefile.patch) -md5sums=('f61b2e5086f4bb9d24a43cc8af43a719' - '3c86865729825b06bb3e00a14f1674e7') - -prepare() { - cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-makefile.patch -} +source=("http://dl.matroska.org/downloads/${_realname}/${_realname}-${pkgver}.tar.bz2") +md5sums=('6a8e4528f713ec33faf4d793e61f883c') build() { - cd ${srcdir}/${_realname}-${pkgver}/make/mingw32 - + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } package() { - cd ${srcdir}/${_realname}-${pkgver}/make/mingw32 - make install prefix="${pkgdir}${MINGW_PREFIX}" + cd "${srcdir}/build-${MINGW_CHOST}" + make install DESTDIR="${pkgdir}" } diff --git a/mingw-w64-libmaxminddb/PKGBUILD b/mingw-w64-libmaxminddb/PKGBUILD new file mode 100644 index 0000000000..722097b4ab --- /dev/null +++ b/mingw-w64-libmaxminddb/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Alexey Pavlov + +_realname=libmaxminddb +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0.4 +pkgrel=1 +pkgdesc="C library for reading MaxMind DB files, including the GeoIP2 databases from MaxMind (mingw-w64)" +arch=('any') +url="http://dev.maxmind.com/geoip/" +license=('Apache-2.0') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-geoip2-database") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libtool" + "autoconf" + "git" + "patch") +options=('!emptydirs') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/maxmind/${_realname}/archive/${pkgver}.tar.gz + "MaxMind-DB"::git+https://github.com/maxmind/MaxMind-DB.git + libtap::git+https://github.com/zorgnax/libtap.git + mingw-no-undefined.patch) +sha256sums=('39ccc2c296bcc989c86513967a8cc9cb7e4efe0153ef61f07a3d7d1e931e3d02' + 'SKIP' + 'SKIP' + 'f3246d235bd6dfcb6fd8e89fa63de95b0384283fce12a0ebef56e1b2fe9bd248') + +prepare() { + cp -rf ${srcdir}/libtap ${srcdir}/${_realname}-${pkgver}/t/ + cp -rf ${srcdir}/MaxMind-DB ${srcdir}/${_realname}-${pkgver}/t/ + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/mingw-no-undefined.patch + autoreconf -fiv +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libmaxminddb/mingw-no-undefined.patch b/mingw-w64-libmaxminddb/mingw-no-undefined.patch new file mode 100644 index 0000000000..00a5f96d6d --- /dev/null +++ b/mingw-w64-libmaxminddb/mingw-no-undefined.patch @@ -0,0 +1,9 @@ +--- libmaxminddb-1.0.3/src/Makefile.am.orig 2015-01-03 00:36:04.463200000 +0300 ++++ libmaxminddb-1.0.3/src/Makefile.am 2015-01-03 00:36:14.915200000 +0300 +@@ -3,5 +3,5 @@ + lib_LTLIBRARIES = libmaxminddb.la + + libmaxminddb_la_SOURCES = maxminddb.c +-libmaxminddb_la_LDFLAGS = -version-info 0:7:0 ++libmaxminddb_la_LDFLAGS = -no-undefined -version-info 0:7:0 + include_HEADERS = $(top_srcdir)/include/maxminddb.h diff --git a/mingw-w64-libmicrohttpd/PKGBUILD b/mingw-w64-libmicrohttpd/PKGBUILD new file mode 100644 index 0000000000..2eb02868f0 --- /dev/null +++ b/mingw-w64-libmicrohttpd/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Alexey Pavlov +# Contributor: Nicolas Bats + +_realname=libmicrohttpd +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.9.42 +pkgrel=2 +pkgdesc="GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application (mingw-w64)" +arch=('any') +url="http://www.gnu.org/software/libmicrohttpd" +license=("LGPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libtool" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-libgcrypt") +source=("http://ftp.gnu.org/gnu/libmicrohttpd/${_realname}-${pkgver}.tar.gz") +md5sums=('3b9cf0b67fc8ebc9e69f53c6bc84a88d') + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-libmikmod/PKGBUILD b/mingw-w64-libmikmod/PKGBUILD new file mode 100644 index 0000000000..ccde5d63bb --- /dev/null +++ b/mingw-w64-libmikmod/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Alexey Pavlov + +_realname=libmikmod +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.3.8 +pkgrel=1 +pkgdesc="A portable sound library (mingw-w64)" +arch=('any') +url="http://mikmod.sourceforge.net" +license=("GPL" "LGPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + #"${MINGW_PACKAGE_PREFIX}-SDL" + #"${MINGW_PACKAGE_PREFIX}-SDL2" + "${MINGW_PACKAGE_PREFIX}-openal") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +options=('strip' 'staticlibs') +source=(http://downloads.sourceforge.net/mikmod/${_realname}-${pkgver}.tar.gz) +sha256sums=('4acf6634a477d8b95f18b55a3e2e76052c149e690d202484e8b0ac7589cf37a2') + +build() { + export lt_cv_deplibs_check_method='pass_all' + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --disable-sdl \ + --disable-sdl2 \ + --enable-openal + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + # Install license + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING.LIB ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING.LESSER ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LESSER + + local PREFIX_WIN=$(cygpath -m ${MINGW_PREFIX}) + sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ + -i ${pkgdir}${MINGW_PREFIX}/bin/libmikmod-config +} diff --git a/mingw-w64-libmimic/PKGBUILD b/mingw-w64-libmimic/PKGBUILD index 02702ea03a..aa3c8e06e0 100644 --- a/mingw-w64-libmimic/PKGBUILD +++ b/mingw-w64-libmimic/PKGBUILD @@ -1,15 +1,14 @@ # Maintainer: Alexey Pavlov _realname=libmimic - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.4 -pkgrel=1 +pkgrel=2 pkgdesc="An open source video encoding/decoding library for Mimic V2.x (mingw-w64)" arch=('any') url="ttp://farsight.sourceforge.net" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-doxygen") depends=("${MINGW_PACKAGE_PREFIX}-glib2") options=('strip' 'staticlibs') source=("http://downloads.sourceforge.net/sourceforge/farsight/${_realname}-${pkgver}.tar.gz" @@ -22,27 +21,33 @@ md5sums=('94f0dbb1d3c253201553a4069555fb84' 'e7eedf26c42f266010ef18d4498e2c33') prepare() { - cd "$srcdir/${_realname}-${pkgver}" - patch -p1 -i "$srcdir"/0001-update-ac-and-silent-rules.mingw.patch - patch -p1 -i "$srcdir"/0002-no-undefined.mingw.patch - patch -p1 -i "$srcdir"/0003-link-to-glib.mingw.patch - + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}"/0001-update-ac-and-silent-rules.mingw.patch + patch -p1 -i "${srcdir}"/0002-no-undefined.mingw.patch + patch -p1 -i "${srcdir}"/0003-link-to-glib.mingw.patch + WANT_AUTOMAKE=latest autoreconf -fi } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static + + cd doc + ${MINGW_PREFIX}/bin/doxygen -u + cd .. + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libmng/PKGBUILD b/mingw-w64-libmng/PKGBUILD index 351354718e..a9c1f22781 100644 --- a/mingw-w64-libmng/PKGBUILD +++ b/mingw-w64-libmng/PKGBUILD @@ -1,52 +1,60 @@ # Maintainer: Alexey Pavlov _realname=libmng - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.0.2 -pkgrel=1 -pkgdesc="Simple, small, C++ XML parser that can be easily integrated into other programs (mingw-w64)" +pkgver=2.0.3 +pkgrel=3 +pkgdesc="A collection of routines used to create and manipulate MNG format graphics files (mingw-w64)" arch=('any') url="http://sourceforge.net/projects/libmng" license=("zlib") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=("${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" "${MINGW_PACKAGE_PREFIX}-lcms2" "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") +depends=("${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' 'staticlibs') source=("http://downloads.sourceforge.net/libmng/${_realname}-${pkgver}.tar.xz"{,.asc} - libmng-1.0.10-mingw.patch - libmng-1.0.9-dont-leak-zlib-streams.diff - no-undefined.patch) -md5sums=('3804bf2523af9b4e0670b5982b3bf984' + libmng-1.0.10-mingw.patch + libmng-1.0.9-dont-leak-zlib-streams.diff + no-undefined.patch + libmng-2.0.3-cmake-versioning.patch + fix-mng-version-cmake.patch + pkg-config-extra-flags.patch) +md5sums=('e9e899adb1b681b17f14d91e261878c5' 'SKIP' 'cb375eee738835855615afd5c056252e' '9a3638775d5efaa1111973b40f4f96a4' - 'e4614f8cd3c813b38340468b2277c3ae') + 'e4614f8cd3c813b38340468b2277c3ae' + '3dff90a06b3ddb372d0a3dd15e08c713' + '3fd61b6c7814bb30dc03cf2b65280a0b' + 'eab95494c678f84164a6b6bd418732b9') prepare() { - cd "$srcdir/${_realname}-${pkgver}" + cd "${srcdir}/${_realname}-${pkgver}" patch -p0 -i "$srcdir"/libmng-1.0.9-dont-leak-zlib-streams.diff patch -p1 -i "$srcdir"/libmng-1.0.10-mingw.patch patch -p1 -i "$srcdir"/no-undefined.patch + patch -p1 -i "$srcdir"/libmng-2.0.3-cmake-versioning.patch + patch -p1 -i "$srcdir"/fix-mng-version-cmake.patch + patch -p1 -i "$srcdir"/pkg-config-extra-flags.patch } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd ${srcdir}/${_realname}-${pkgver} - make distclean - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-shared \ - --enable-static \ - --with-lcms2 - make + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd ${srcdir}/build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=ON \ + ../${_realname}-${pkgver} + + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm - rm -r "${pkgdir}${MINGW_PREFIX}/share" + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libmng/fix-mng-version-cmake.patch b/mingw-w64-libmng/fix-mng-version-cmake.patch new file mode 100644 index 0000000000..4a24a0bcae --- /dev/null +++ b/mingw-w64-libmng/fix-mng-version-cmake.patch @@ -0,0 +1,7 @@ +--- libmng-2.0.3/cmake/vers.cmake.orig 2013-03-05 15:14:32.000000000 +0400 ++++ libmng-2.0.3/cmake/vers.cmake 2015-07-14 14:57:28.455000000 +0300 +@@ -1,3 +1,3 @@ + SET(MNG_VERSION_MAJOR 2) + SET(MNG_VERSION_MINOR 0) +-SET(MNG_VERSION_PATCH 2) ++SET(MNG_VERSION_PATCH 3) diff --git a/mingw-w64-libmng/libmng-2.0.3-cmake-versioning.patch b/mingw-w64-libmng/libmng-2.0.3-cmake-versioning.patch new file mode 100644 index 0000000000..6160162afc --- /dev/null +++ b/mingw-w64-libmng/libmng-2.0.3-cmake-versioning.patch @@ -0,0 +1,29 @@ +--- libmng-2.0.3/CMakeLists.txt.orig 2015-04-28 15:48:37.037800000 +0300 ++++ libmng-2.0.3/CMakeLists.txt 2015-04-28 15:50:35.161000000 +0300 +@@ -423,6 +423,8 @@ + SET_TARGET_PROPERTIES(${MNG_LIBRARY_NAME}-shared + PROPERTIES + OUTPUT_NAME ${MNG_LIBRARY_NAME} ++ RUNTIME_OUTPUT_NAME ${MNG_LIBRARY_NAME}-${MNG_VERSION_MAJOR} ++ ARCHIVE_OUTPUT_NAME ${MNG_LIBRARY_NAME} + ${MNG_LIBRARY_PROPERTIES} ) + # + INSTALL(TARGETS ${MNG_LIBRARY_NAME}-shared +@@ -434,7 +436,7 @@ + # + ENDIF(BUILD_SHARED_LIBS) + #------------ libmng.pc --------------- +-IF(UNIX) ++IF(UNIX OR MINGW) + SET(MNG_LIBS_PRIVATE "") + IF(JPEG_FOUND) + SET(MNG_LIBS_PRIVATE "${MNG_LIBS_PRIVATE} -ljpeg") +@@ -458,7 +458,7 @@ + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmng.pc DESTINATION + ${MNG_INSTALL_PKGCONFIG_DIR} ) + +-ENDIF(UNIX) ++ENDIF(UNIX OR MINGW) + # + INSTALL(EXPORT MNG_TARGETS DESTINATION ${MNG_INSTALL_PACKAGE_DIR}) + # \ No newline at end of file diff --git a/mingw-w64-libmng/pkg-config-extra-flags.patch b/mingw-w64-libmng/pkg-config-extra-flags.patch new file mode 100644 index 0000000000..2b9a37a00a --- /dev/null +++ b/mingw-w64-libmng/pkg-config-extra-flags.patch @@ -0,0 +1,26 @@ +--- libmng-2.0.3/cmake/libmng.pc.cmake.orig 2015-07-14 14:58:28.186600000 +0300 ++++ libmng-2.0.3/cmake/libmng.pc.cmake 2015-07-14 14:58:41.977000000 +0300 +@@ -8,4 +8,4 @@ + Version: @MNG_VERSION@ + Libs: -L${libdir} -lmng + Libs.private: @MNG_LIBS_PRIVATE@ +-Cflags: -I${includedir} ++Cflags: -I${includedir} @MNG_DEFINES@ +--- libmng-2.0.3/CMakeLists.txt.orig 2012-07-29 23:28:11.000000000 +0400 ++++ libmng-2.0.3/CMakeLists.txt 2015-07-14 14:59:15.095800000 +0300 +@@ -342,6 +342,7 @@ + # + #------------------ STATIC --------------------- + IF(BUILD_STATIC_LIBS) ++ SET(MNG_DEFINES "") + ADD_LIBRARY(${MNG_LIBRARY_NAME} STATIC + ${TARGET_FILES}) + # +@@ -387,6 +388,7 @@ + IF(WIN32) + #-DMNG_BUILD_DLL or -DMNG_DLL or -DMNG_USE_DLL : cnf. libmng_types.h + ADD_DEFINITIONS(-DMNG_BUILD_DLL) ++ SET(MNG_DEFINES "-DMNG_USE_DLL") + ENDIF(WIN32) + + ADD_LIBRARY(${MNG_LIBRARY_NAME}-shared diff --git a/mingw-w64-libmodbus-git/PKGBUILD b/mingw-w64-libmodbus-git/PKGBUILD new file mode 100644 index 0000000000..b3bd64077f --- /dev/null +++ b/mingw-w64-libmodbus-git/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: LI Xuzhang +# Contributor: Stas Elensky + +_realname=libmodbus +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=658.0e2f470 +pkgrel=1 +pkgdesc="A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32 (mingw-w64)" +url="http://libmodbus.org/" +arch=('any') +license=('LGPL') +makedepends=("git" "asciidoc" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +options=('strip' 'staticlibs' '!buildflags' '!emptydirs' '!debug') +source=("${_realname}::git+https://github.com/stephane/libmodbus") +md5sums=('SKIP') + +pkgver() { + cd ${_realname} + echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) + #git describe --tags |sed 's+-+.+g' +} + +prepare() { + cd ${_realname} + ./autogen.sh +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libmodplug/PKGBUILD b/mingw-w64-libmodplug/PKGBUILD index 44888cf56b..0565c6120c 100644 --- a/mingw-w64-libmodplug/PKGBUILD +++ b/mingw-w64-libmodplug/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libmodplug - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.8.8.5 -pkgrel=2 +pkgrel=3 pkgdesc="A MOD playing library (mingw-w64)" arch=('any') url="http://modplug-xmms.sourceforge.net/" @@ -26,6 +25,7 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -35,6 +35,7 @@ build() { --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } diff --git a/mingw-w64-libmongoose-git/Makefile b/mingw-w64-libmongoose-git/Makefile new file mode 100644 index 0000000000..b12985a761 --- /dev/null +++ b/mingw-w64-libmongoose-git/Makefile @@ -0,0 +1,67 @@ +SONAME_MAJOR=5 +SONAME_MINOR=6 +LIBNAME=libmongoose + +SHARED_LIB=$(LIBNAME)-$(SONAME_MAJOR).dll +STATIC_LIB=$(LIBNAME).a +IMPORT_LIB=$(LIBNAME).dll.a + +ifndef CC + CC=gcc +endif + +ifndef AR + AR=ar +endif + +ifndef PREFIX + PREFIX=/usr/local +endif + +ifndef BINDIR + BINDIR=$(PREFIX)/bin +endif + +ifndef LIBDIR + LIBDIR=$(PREFIX)/lib +endif + +ifndef DOCDIR + DOCDIR=$(PREFIX)/share/$(LIBNAME)/doc +endif + +CPPFLAGS+= #-DNS_ENABLE_SSL -DNS_ENABLE_IPV6 +CFLAGS+=-c -Wall +LDFLAGS+=-shared -Wl,--out-implib,$(IMPORT_LIB) -lws2_32 #-lssl + +SRCS=mongoose.c +OBJS=mongoose.o +INCLUDE=. + +all: $(STATIC_LIB) $(SHARED_LIB) + +$(SHARED_LIB): $(OBJS) + $(CC) $(OBJS) $(LDFLAGS) -o $(SHARED_LIB) + +$(STATIC_LIB): $(OBJS) + $(AR) rcs $(STATIC_LIB) $(OBJS) + +$(OBJS): $(SRCS) + $(CC) $(CPPFLAGS) $(CFLAGS) -I$(INCLUDE) $(SRCS) -o $(OBJS) + +install: $(SHARED_LIB) + install -Dm655 $(SHARED_LIB) $(DESTDIR)$(BINDIR)/$(SHARED_LIB) + install -Dm644 $(STATIC_LIB) $(DESTDIR)$(LIBDIR)/$(STATIC_LIB) + install -Dm644 $(IMPORT_LIB) $(DESTDIR)$(LIBDIR)/$(IMPORT_LIB) + install -Dm644 mongoose.h $(DESTDIR)$(PREFIX)/include/mongoose.h + install -dm755 $(DESTDIR)$(DOCDIR) + cp -a examples $(DESTDIR)$(DOCDIR) + cp -a docs/* $(DESTDIR)$(DOCDIR)/ + +test: + $(MAKE) -C test/ +clean: + rm -f $(OBJS) $(SHARED_LIB) $(STATIC_LIB) + $(MAKE) -C test/ clean + +.PHONY: clean test all diff --git a/mingw-w64-libmongoose-git/PKGBUILD b/mingw-w64-libmongoose-git/PKGBUILD new file mode 100644 index 0000000000..6ad17f5155 --- /dev/null +++ b/mingw-w64-libmongoose-git/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Renato Silva + +_realname=libmongoose +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}-git) +provides=(${MINGW_PACKAGE_PREFIX}-${_realname}) +conflicts=(${MINGW_PACKAGE_PREFIX}-${_realname}) +pkgver=r1793.41b405d +pkgrel=3 +url="https://github.com/cesanta/mongoose" +pkgdesc='Embedded web server for C/C++ (mingw-w64)' +license=('GPL2') +arch=('any') +depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs) #${MINGW_PACKAGE_PREFIX}-openssl +makedepends=(${MINGW_PACKAGE_PREFIX}-gcc) +source=(${_realname}::"git+https://github.com/cesanta/mongoose" + mongoose.pc + Makefile) +sha1sums=('SKIP' + '92c82813e7c1b277a0078c0e67addc7e159aec81' + '94385286bcb7e3639d03ba283dc43111062c4a23') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cp Makefile ${_realname}/ + cp mongoose.pc ${_realname}/ +} + +build() { + cd "${srcdir}/${_realname}" + make PREFIX=${MINGW_PREFIX} CC=gcc AR=ar -j1 +} + +package() { + cd "${srcdir}/${_realname}" + make PREFIX=${MINGW_PREFIX} DESTDIR=${pkgdir} install + install -D -m644 mongoose.pc "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/mongoose.pc" + install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + + sed -e "s|@@PREFIX@@|${MINGW_PREFIX}|g" \ + -e "s|@@VERSION@@|5.6|g" \ + -i "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/mongoose.pc" +} diff --git a/mingw-w64-libmongoose-git/mongoose.pc b/mingw-w64-libmongoose-git/mongoose.pc new file mode 100644 index 0000000000..8e76057c2d --- /dev/null +++ b/mingw-w64-libmongoose-git/mongoose.pc @@ -0,0 +1,11 @@ +prefix=@@PREFIX@@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: mongoose +Description: embedded library, to start a web server in few lines of code +Version: @@VERSION@@ +Requires: libssl +Libs: -L${libdir} -lmongoose +Cflags: -I${includedir} -pthread diff --git a/mingw-w64-libmowgli/PKGBUILD b/mingw-w64-libmowgli/PKGBUILD index 1fd4858d6e..41afeae25d 100644 --- a/mingw-w64-libmowgli/PKGBUILD +++ b/mingw-w64-libmowgli/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libmowgli - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.0 -pkgrel=1 +pkgrel=3 pkgdesc="Performance and usability-oriented extensions to C (mingw-w64)" arch=('any') url="http://www.atheme.org/project/mowgli" @@ -12,20 +11,22 @@ license=('GPL') depends=("${MINGW_PACKAGE_PREFIX}-openssl") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git") options=('staticlibs' 'strip') -source=("${_realname}-${pkgver}::git+https://github.com/atheme/libmowgli-2.git#tag=${_realname}-${pkgver}" +source=(#"${_realname}-${pkgver}::git+https://github.com/atheme/libmowgli-2.git#tag=${_realname}-${pkgver}" + https://github.com/atheme/libmowgli-2/archive/${_realname}-${pkgver}.tar.gz libmowgli-2.0.0-mingw-have-declarations.patch) -md5sums=('SKIP' +md5sums=('0b8cf8b66d745d40f186e3cbd22fdc0e' '47ee3521d81255a675ff83f2c48b4909') prepare() { - cd ${srcdir}/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-2-${_realname}-${pkgver} patch -p1 -i ${srcdir}/libmowgli-2.0.0-mingw-have-declarations.patch #autoreconf -fi } build() { - cd ${srcdir}/${_realname}-${pkgver} + cp -rf ${_realname}-2-${_realname}-${pkgver} ${srcdir}/build-${MINGW_CHOST} + cd build-${MINGW_CHOST} ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -33,11 +34,12 @@ build() { --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } package() { - cd ${srcdir}/${_realname}-${pkgver} - make DESTDIR="$pkgdir" install + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install install -D -m644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libmpcdec/PKGBUILD b/mingw-w64-libmpcdec/PKGBUILD index 2aedc26a13..6cb0f5cf85 100644 --- a/mingw-w64-libmpcdec/PKGBUILD +++ b/mingw-w64-libmpcdec/PKGBUILD @@ -3,7 +3,7 @@ _realname=libmpcdec pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.2.6 -pkgrel=1 +pkgrel=2 pkgdesc="Musepack decoding library (mingw-w64)" arch=("any") url="http://musepack.net/" @@ -19,10 +19,9 @@ prepare() { } build() { - [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - #cd ${_realname}-${pkgver} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -30,6 +29,7 @@ build() { --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } diff --git a/mingw-w64-libmpeg2-svn/0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch b/mingw-w64-libmpeg2-svn/0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch new file mode 100644 index 0000000000..b2918cb8a7 --- /dev/null +++ b/mingw-w64-libmpeg2-svn/0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch @@ -0,0 +1,11 @@ +diff -urN libmpeg2.orig/configure.ac libmpeg2/configure.ac +--- libmpeg2.orig/configure.ac 2015-07-12 12:53:19.295988900 +0100 ++++ libmpeg2/configure.ac 2015-07-12 12:53:27.344449300 +0100 +@@ -142,7 +142,6 @@ + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +-AC_C_ALWAYS_INLINE + AC_C_RESTRICT + AC_C_BUILTIN_EXPECT + AC_C_BIGENDIAN diff --git a/mingw-w64-libmpeg2-svn/PKGBUILD b/mingw-w64-libmpeg2-svn/PKGBUILD index d2b7954cd8..5a517b3399 100644 --- a/mingw-w64-libmpeg2-svn/PKGBUILD +++ b/mingw-w64-libmpeg2-svn/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=libmpeg2 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" pkgver=r1206 -pkgrel=1 +pkgrel=2 pkgdesc="Library for decoding MPEG-1 and MPEG-2 video streams (mingw-w64)" arch=('any') url="http://libmpeg2.sourceforge.net/" @@ -16,13 +16,15 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') source=("${_realname}"::"svn+svn://svn.videolan.org/libmpeg2/trunk" 0001-fix-bootstrap.mingw.patch - 0002-libmpeg2-fix-deprecated.patch) + 0002-libmpeg2-fix-deprecated.patch + 0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch) sha256sums=('SKIP' '0ba11aa8ee1aa185dec49790d6c12ed364345fe2ea78616caafa96f1cbd91766' - '4dca32a82a5845f4fcbc26d79ae4fdc5d9ab27cca5c2ae5ea5fa9078a0077eb6') + '4dca32a82a5845f4fcbc26d79ae4fdc5d9ab27cca5c2ae5ea5fa9078a0077eb6' + '8beb78faac22b9a6c37b4ff23663cd83ce894443c02337e427729acd8bd6cce0') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" local ver="$(svnversion)" printf "r%s" "${ver//[[:alpha:]]}" } @@ -31,23 +33,26 @@ prepare() { cd ${srcdir}/${_realname} patch -p1 -i ${srcdir}/0001-fix-bootstrap.mingw.patch patch -p1 -i ${srcdir}/0002-libmpeg2-fix-deprecated.patch - + patch -p1 -i ${srcdir}/0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch + ./bootstrap } build() { - cd "${srcdir}/${_realname}" - ./configure \ + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir build-${CARCH} && cd build-${CARCH} + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ --disable-sdl + make } package() { - cd "${srcdir}/${_realname}" - make DESTDIR="$pkgdir" install + cd "${srcdir}"/build-${CARCH} + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libnice/0002-no-undefined.patch b/mingw-w64-libnice/0002-no-undefined.patch deleted file mode 100644 index c31fba5ce5..0000000000 --- a/mingw-w64-libnice/0002-no-undefined.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libnice-0.1.7/gst/Makefile.am.orig 2014-01-07 03:05:13.000000000 +0400 -+++ libnice-0.1.7/gst/Makefile.am 2014-07-17 19:12:50.397600000 +0400 -@@ -33,7 +33,7 @@ - - libgstnice_la_LIBADD = $(COMMON_LIBADD) $(GST_LIBS) - --libgstnice_la_LDFLAGS = -module -avoid-version -+libgstnice_la_LDFLAGS = -module -avoid-version -no-undefined - endif - - diff --git a/mingw-w64-libnice/0003-give-cc-to-gir-scanner.all.patch b/mingw-w64-libnice/0003-give-cc-to-gir-scanner.all.patch new file mode 100644 index 0000000000..9506f7e59b --- /dev/null +++ b/mingw-w64-libnice/0003-give-cc-to-gir-scanner.all.patch @@ -0,0 +1,10 @@ +--- libnice-0.1.8/agent/Makefile.am.orig 2015-01-01 19:43:03.942400000 +0300 ++++ libnice-0.1.8/agent/Makefile.am 2015-01-01 19:44:15.187600000 +0300 +@@ -86,6 +86,7 @@ + # + -include $(INTROSPECTION_MAKEFILE) + INTROSPECTION_GIRS = ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --accept-unprefixed + INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + diff --git a/mingw-w64-libnice/0004-mingw-w64-types.patch b/mingw-w64-libnice/0004-mingw-w64-types.patch new file mode 100644 index 0000000000..fa2b7f730a --- /dev/null +++ b/mingw-w64-libnice/0004-mingw-w64-types.patch @@ -0,0 +1,19 @@ +--- libnice-0.1.8/stun/win32_common.h.orig 2014-10-09 23:28:21.000000000 +0400 ++++ libnice-0.1.8/stun/win32_common.h 2015-01-01 20:23:32.299200000 +0300 +@@ -72,14 +72,14 @@ + + /* Using the [S]SIZE_T definitions from: + * http://msdn.microsoft.com/en-gb/library/windows/desktop/aa383751%28v=vs.85%29.aspx#SSIZE_T */ +-#ifndef HAVE_SIZE_T ++#if !defined(HAVE_SIZE_T) && !defined(_SIZE_T_DEFINED) + #if defined(_WIN64) + typedef unsigned __int64 size_t; + #else + typedef unsigned long size_t; + #endif + #endif /* !HAVE_SSIZE_T */ +-#ifndef HAVE_SSIZE_T ++#if !defined(HAVE_SSIZE_T) && !defined(_SSIZE_T_DEFINED) + #if defined(_WIN64) + typedef signed __int64 ssize_t; + #else diff --git a/mingw-w64-libnice/PKGBUILD b/mingw-w64-libnice/PKGBUILD index 5f739cafef..0b3fd98397 100644 --- a/mingw-w64-libnice/PKGBUILD +++ b/mingw-w64-libnice/PKGBUILD @@ -1,30 +1,35 @@ # Maintainer: Alexey Pavlov _realname=libnice - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.1.7 +pkgver=0.1.13 pkgrel=1 pkgdesc="An implementation of the IETF's draft ICE (for p2p UDP data streams) (mingw-w64)" arch=('any') url="http://nice.freedesktop.org" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gstreamer") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "gtk-doc") depends=("${MINGW_PACKAGE_PREFIX}-glib2") optdepends=("${MINGW_PACKAGE_PREFIX}-gstreamer") options=('staticlibs' 'strip') -source=("http://nice.freedesktop.org/releases/${_realname}-$pkgver.tar.gz" +source=("http://nice.freedesktop.org/releases/${_realname}-${pkgver}.tar.gz" 0001-fix-redefinition-mingw-w64.patch - 0002-no-undefined.patch) -md5sums=('ed74abea19b3f049baf095f137388f2a' + 0003-give-cc-to-gir-scanner.all.patch + 0004-mingw-w64-types.patch) +md5sums=('3226faeaf48a9150ada00da2e2865959' 'b817c8a7c4cbb405341de75b9824204f' - '5c937f7c3a5857038f27a009d33b0757') + 'aa92989cd75e24fd2ead5a4e6f334cc7' + '2663a220cc777082096610353d7051f2') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-fix-redefinition-mingw-w64.patch - patch -p1 -i ${srcdir}/0002-no-undefined.patch - + patch -p1 -i ${srcdir}/0003-give-cc-to-gir-scanner.all.patch + patch -p1 -i ${srcdir}/0004-mingw-w64-types.patch + NOCONFIGURE=1 ./autogen.sh } @@ -36,13 +41,14 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --enable-static + --enable-static \ + --enable-introspection make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install rm -f ${pkgdir}${MINGW_PREFIX}/lib/gstreamer*/*.a } diff --git a/mingw-w64-libnotify/PKGBUILD b/mingw-w64-libnotify/PKGBUILD index 878119fc7c..ba03c443cd 100644 --- a/mingw-w64-libnotify/PKGBUILD +++ b/mingw-w64-libnotify/PKGBUILD @@ -5,7 +5,7 @@ _realname=libnotify pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=0.7.6 -pkgrel=1 +pkgrel=2 pkgdesc="Desktop notification library (mingw-w64)" arch=('any') url="http://library.gnome.org/devel/notification-spec/" @@ -29,8 +29,8 @@ prepare() { } build() { - cd "$srcdir"/${_realname}-${pkgver} - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + cd "${srcdir}"/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ diff --git a/mingw-w64-libntlm/PKGBUILD b/mingw-w64-libntlm/PKGBUILD index a3449c1737..4e4b87a706 100644 --- a/mingw-w64-libntlm/PKGBUILD +++ b/mingw-w64-libntlm/PKGBUILD @@ -3,7 +3,7 @@ _realname=libntlm pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.4 -pkgrel=1 +pkgrel=2 pkgdesc="Library that implement Microsoft's NTLM authentication (mingw-w64)" arch=('any') url="http://www.nongnu.org/libntlm/" @@ -11,15 +11,12 @@ license=("LGPL2.1") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -source=("http://www.nongnu.org/libntlm/releases/libntlm-1.4.tar.gz"{,.sig}) +source=("http://www.nongnu.org/libntlm/releases/${_realname}-${pkgver}.tar.gz"{,.sig}) md5sums=('54793488450e9085c57e0d859ff3bc8c' 'SKIP') -prepare() { - cd ${_realname}-${pkgver} -} - build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ diff --git a/mingw-w64-liboauth/PKGBUILD b/mingw-w64-liboauth/PKGBUILD index 16191c98bd..847a901d7e 100644 --- a/mingw-w64-liboauth/PKGBUILD +++ b/mingw-w64-liboauth/PKGBUILD @@ -1,24 +1,27 @@ # Maintainer: Andrea Zagli _realname=liboauth +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.3 -pkgrel=2 +pkgrel=5 arch=('any') pkgdesc="liboauth is a collection of POSIX-c functions implementing the OAuth Core RFC 5849 standard (mingw-w64)" license=("GPL 2") url="http://liboauth.sourceforge.net/" -depends=("${MINGW_PACKAGE_PREFIX}-nss" - "${MINGW_PACKAGE_PREFIX}-curl") +depends=("${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-nss" + ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "make" - "libtool" - "automake-wrapper" - "autoconf" - "patch") + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "make" + "libtool" + "automake-wrapper" + "autoconf" + "patch") options=('strip' '!debug' 'staticlibs') -source=(http://downloads.sourceforge.net/project/${_realname}/${_realname}-$pkgver.tar.gz +source=(http://downloads.sourceforge.net/project/${_realname}/${_realname}-${pkgver}.tar.gz noundefined.patch) sha256sums=('0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f' 'ae77e26395eedd19e27359579ace90976e6d7746bb3fcfa56493c2b1a60f9970') @@ -26,11 +29,12 @@ sha256sums=('0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f' prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/noundefined.patch - + autoreconf -fi } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} @@ -41,10 +45,12 @@ build() { --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib \ --enable-nss + make + # make dox # Generate doxygen docs } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libodfgen/PKGBUILD b/mingw-w64-libodfgen/PKGBUILD new file mode 100644 index 0000000000..7225067ca3 --- /dev/null +++ b/mingw-w64-libodfgen/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Andrea Zagli + +_realname=libodfgen +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.1.5 +pkgrel=1 +pkgdesc="Library to generate ODF documents (mingw-w64)" +arch=('any') +url="http://sf.net/p/libwpd/libodfgen/" +license=("LGPL 2.1") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-doxygen") +depends=("${MINGW_PACKAGE_PREFIX}-librevenge") +options=(staticlibs strip) +source=("http://sourceforge.net/projects/libwpd/files/libodfgen/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.xz" + enum-without-api-attributes.patch) +sha256sums=('fb8706e38f6acf019f8b50262af2bf850821c6d10dad8708f13e54f1a08294dd' + '3148d825f0d0778cf1b65445919b5fb89ea0c738d6c560893830f08dd5dfebfc') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + #patch -p1 -i ${srcdir}/enum-without-api-attributes.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -r ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --with-docs=yes + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LGPL" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LGPL" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.MPL" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.MPL" +} diff --git a/mingw-w64-libodfgen/enum-without-api-attributes.patch b/mingw-w64-libodfgen/enum-without-api-attributes.patch new file mode 100644 index 0000000000..54378b5cc1 --- /dev/null +++ b/mingw-w64-libodfgen/enum-without-api-attributes.patch @@ -0,0 +1,11 @@ +--- libodfgen-0.1.4/inc/libodfgen/OdfDocumentHandler.hxx.orig 2015-07-31 15:11:11.557378700 +0300 ++++ libodfgen-0.1.4/inc/libodfgen/OdfDocumentHandler.hxx 2015-07-31 15:11:15.657968600 +0300 +@@ -32,7 +32,7 @@ + * + * @sa OdgGenerator, OdpGenerator, OdtGenerator + */ +-enum ODFGENAPI OdfStreamType { ODF_FLAT_XML, ODF_CONTENT_XML, ODF_STYLES_XML, ODF_SETTINGS_XML, ODF_META_XML, ODF_MANIFEST_XML }; ++enum OdfStreamType { ODF_FLAT_XML, ODF_CONTENT_XML, ODF_STYLES_XML, ODF_SETTINGS_XML, ODF_META_XML, ODF_MANIFEST_XML }; + + class OdfDocumentHandler; + diff --git a/mingw-w64-libogg/PKGBUILD b/mingw-w64-libogg/PKGBUILD index e2d94363e6..8e8964566b 100644 --- a/mingw-w64-libogg/PKGBUILD +++ b/mingw-w64-libogg/PKGBUILD @@ -3,7 +3,7 @@ _realname=libogg pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.2 -pkgrel=1 +pkgrel=2 pkgdesc="Ogg bitstream and framing library (mingw-w64)" arch=('any') url="http://xiph.org" @@ -18,9 +18,10 @@ prepare() { } build() { + [[ -d"${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} - cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/libogg-${pkgver}/configure \ + cd ${srcdir}/build-${MINGW_CHOST} + ../libogg-${pkgver}/configure \ --enable-shared \ --enable-static \ --prefix=${MINGW_PREFIX} \ @@ -31,6 +32,6 @@ build() { } package() { - cd ${srcdir}/build-${MINGW_CHOST} - make DESTDIR="$pkgdir" install + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libosmpbf-git/PKGBUILD b/mingw-w64-libosmpbf-git/PKGBUILD index 76380d9d6e..7ee032b98a 100644 --- a/mingw-w64-libosmpbf-git/PKGBUILD +++ b/mingw-w64-libosmpbf-git/PKGBUILD @@ -2,7 +2,7 @@ _realname=libosmpbf pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=1.3.3.10.g3730430 +pkgver=1.3.3.13.g4edb4f0 pkgrel=1 pkgdesc="A library to support OpenStreetMap's protocolbuffer binary .pbf format (mingw-w64)" arch=('any') @@ -15,22 +15,26 @@ source=("${_realname}::git+https://github.com/scrosby/OSM-binary.git") md5sums=('SKIP') pkgver() { - cd "$_realname" + cd "${_realname}" git describe --tags | sed -e 's|-|.|g' -e 's|v||g' } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ ../${_realname} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libotr/001-kopete.patch b/mingw-w64-libotr/001-kopete.patch deleted file mode 100644 index 110e4eec2e..0000000000 --- a/mingw-w64-libotr/001-kopete.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur old/src/message.c new/src/message.c ---- old/src/message.c 2012-08-31 02:15:35.000000000 -1000 -+++ new/src/message.c 2014-01-06 01:22:43.316831758 -1000 -@@ -441,7 +441,7 @@ - /* Fragment and send according to policy */ - if (!err && messagep && *messagep) { - if (context) { -- err = fragment_and_send(ops, NULL, context, *messagep, -+ err = fragment_and_send(ops, opdata, context, *messagep, - fragPolicy, messagep); - } - } diff --git a/mingw-w64-libotr/002-libotr-no-undefined.patch b/mingw-w64-libotr/002-libotr-no-undefined.patch index 6c0dd559b8..29b928b029 100644 --- a/mingw-w64-libotr/002-libotr-no-undefined.patch +++ b/mingw-w64-libotr/002-libotr-no-undefined.patch @@ -14,8 +14,8 @@ diff -Naur libotr-4.0.0-orig/toolkit/Makefile.am libotr-4.0.0/toolkit/Makefile.a --- libotr-4.0.0-orig/toolkit/Makefile.am 2012-05-03 17:52:22.000000000 +0400 +++ libotr-4.0.0/toolkit/Makefile.am 2014-07-09 22:42:43.687000000 +0400 @@ -1,4 +1,4 @@ --INCLUDES = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@ -+INCLUDES = -I$(includedir) -I$(top_srcdir)/src @LIBGCRYPT_CFLAGS@ +-AM_CPPFLAGS = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@ ++AM_CPPFLAGS = -I$(includedir) -I$(top_srcdir)/src @LIBGCRYPT_CFLAGS@ noinst_HEADERS = aes.h ctrmode.h parse.h sesskeys.h readotr.h sha1hmac.h diff --git a/mingw-w64-libotr/PKGBUILD b/mingw-w64-libotr/PKGBUILD index 8fba397062..a9dfddd91b 100644 --- a/mingw-w64-libotr/PKGBUILD +++ b/mingw-w64-libotr/PKGBUILD @@ -2,8 +2,8 @@ _realname=libotr pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.0.0 -pkgrel=2 +pkgver=4.1.0 +pkgrel=1 pkgdesc="Off-the-Record Messaging Library and Toolkit (mingw-w64)" arch=('any') url="http://www.cypherpunks.ca/otr/" @@ -11,18 +11,16 @@ license=('GPL') depends=("${MINGW_PACKAGE_PREFIX}-libgcrypt") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') -source=("http://www.cypherpunks.ca/otr/${_realname}-${pkgver}.tar.gz" - '001-kopete.patch' +source=(https://otr.cypherpunks.ca/${_realname}-${pkgver}.tar.gz{,.asc} '002-libotr-no-undefined.patch' '003-fix-symlinks.patch') -md5sums=('00979dca82d70383fcd1b01f3974363c' - '6ef0928ce2946bd039c89d59fa28707a' - '83a5e2e8cd03aab67143826025469a1d' +md5sums=('6589f81e7ccbe244f265e8db372814a2' + 'SKIP' + 'f8bdedeb824a6394d0c5061c0aaf7f08' '4bedcda46f566ccece54cd68585b04f8') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-kopete.patch patch -p1 -i ${srcdir}/002-libotr-no-undefined.patch patch -p1 -i ${srcdir}/003-fix-symlinks.patch @@ -30,9 +28,10 @@ prepare() { } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} - cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}-${pkgver}/configure \ + cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -40,10 +39,11 @@ build() { --enable-shared \ --enable-static \ --mandir=${MINGW_PREFIX}/share/man + make } package() { - cd ${srcdir}/build-${MINGW_CHOST} - make -j1 DESTDIR="$pkgdir" install + cd ${srcdir}/build-${MINGW_CHOST} + make -j1 DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libpeas/0002-give-cc-to-gir-scanner.all.patch b/mingw-w64-libpeas/0002-give-cc-to-gir-scanner.all.patch deleted file mode 100644 index c85f5bc99b..0000000000 --- a/mingw-w64-libpeas/0002-give-cc-to-gir-scanner.all.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- libpeas-1.10.0/libpeas/Makefile.am.orig 2014-02-09 23:55:50.000000000 +0400 -+++ libpeas-1.10.0/libpeas/Makefile.am 2014-05-18 21:09:07.722800000 +0400 -@@ -88,6 +88,7 @@ - if HAVE_INTROSPECTION - -include $(INTROSPECTION_MAKEFILE) - INTROSPECTION_GIRS = Peas-1.0.gir -+ INTROSPECTION_SCANNER_ENV = CC="$(CC)" - INTROSPECTION_SCANNER_ARGS = \ - -I$(top_srcdir) \ - --c-include=libpeas/peas.h \ ---- libpeas-1.10.0/libpeas-gtk/Makefile.am.orig 1970-01-01 03:00:00.000000000 +0300 -+++ libpeas-1.10.0/libpeas-gtk/Makefile.am 2014-05-18 21:09:34.204800000 +0400 -@@ -47,6 +47,7 @@ - if HAVE_INTROSPECTION - -include $(INTROSPECTION_MAKEFILE) - INTROSPECTION_GIRS = PeasGtk-1.0.gir -+ INTROSPECTION_SCANNER_ENV = CC="$(CC)" - INTROSPECTION_SCANNER_ARGS = \ - --add-include-path=$(top_builddir)/libpeas \ - --c-include=libpeas-gtk/peas-gtk.h \ ---- libpeas-1.10.0/tests/libpeas/introspection/Makefile.am.orig 1970-01-01 03:00:00.000000000 +0300 -+++ libpeas-1.10.0/tests/libpeas/introspection/Makefile.am 2014-05-18 21:09:34.204800000 +0400 -@@ -31,6 +31,7 @@ - -include $(INTROSPECTION_MAKEFILE) - INTROSPECTION_GIRS = Introspection-1.0.gir - INTROSPECTION_TYPELIBS = $(INTROSPECTION_GIRS:.gir=.typelib) -+ INTROSPECTION_SCANNER_ENV = CC="$(CC)" - INTROSPECTION_SCANNER_ARGS = \ - --add-include-path=$(top_builddir)/libpeas \ - --warn-all diff --git a/mingw-w64-libgweather/002-localedir-fix.patch b/mingw-w64-libpeas/0004-localedir-fix.patch similarity index 90% rename from mingw-w64-libgweather/002-localedir-fix.patch rename to mingw-w64-libpeas/0004-localedir-fix.patch index fe9675ba0e..516bacea95 100644 --- a/mingw-w64-libgweather/002-localedir-fix.patch +++ b/mingw-w64-libpeas/0004-localedir-fix.patch @@ -1,6 +1,5 @@ -=== modified file 'Makefile.in.in' ---- a/po-locations/Makefile.in.in 2012-01-18 16:37:06 +0000 -+++ b/po-locations/Makefile.in.in 2013-05-12 17:12:40 +0000 +--- a/po/Makefile.in.in 2012-01-18 16:37:06 +0000 ++++ b/po/Makefile.in.in 2013-05-12 17:12:40 +0000 @@ -33,8 +33,7 @@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -8,7 +7,7 @@ -DATADIRNAME = @DATADIRNAME@ -itlocaledir = $(prefix)/$(DATADIRNAME)/locale +localedir = @localedir@ - subdir = po-locations + subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. @@ -108,7 +107,7 @@ @@ -31,7 +30,6 @@ done check: all $(GETTEXT_PACKAGE).pot -=== modified file 'intltool.m4' --- a/m4/intltool.m4 2012-02-20 14:50:33 +0000 +++ b/m4/intltool.m4 2013-05-12 17:12:40 +0000 @@ -155,31 +155,6 @@ diff --git a/mingw-w64-libpeas/PKGBUILD b/mingw-w64-libpeas/PKGBUILD index 0c8d64e4b8..3c0a9554fa 100644 --- a/mingw-w64-libpeas/PKGBUILD +++ b/mingw-w64-libpeas/PKGBUILD @@ -1,62 +1,63 @@ # Maintainer: Alexey Pavlov _realname=libpeas +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.12.1 -pkgrel=1 +pkgver=1.16.0 +pkgrel=2 pkgdesc="A GObject-based plugins engine (mingw-w64)" arch=('any') url="http://www.gtk.org" license=("LGPL2") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" - "intltool" - "${MINGW_PACKAGE_PREFIX}-python3-gobject" - "${MINGW_PACKAGE_PREFIX}-python2-gobject" - "${MINGW_PACKAGE_PREFIX}-glade") + "${MINGW_PACKAGE_PREFIX}-glade" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python3-gobject" + "${MINGW_PACKAGE_PREFIX}-python2-gobject" + "gtk-doc" + "intltool") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" ) options=('strip' 'staticlibs') install=${_realname}-${CARCH}.install source=(http://download.gnome.org/sources/${_realname}/${pkgver:0:4}/${_realname}-${pkgver}.tar.xz - 0002-give-cc-to-gir-scanner.all.patch) -md5sums=('2bd146e4cb2335843c6145f81e0a8d0e' - 'b79cae8a6794dc2511f6fcceaa809111') + 0004-localedir-fix.patch) +md5sums=('48c5b3da391da1ae390e9d45d88a6aeb' + 'ee2cc56c1448c32020288c817b81ff7f') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0002-give-cc-to-gir-scanner.all.patch + patch -p1 -i ${srcdir}/0004-localedir-fix.patch autoreconf -fi } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --sysconfdir=${MINGW_PREFIX}/etc \ - --localstatedir=${MINGW_PREFIX}/var \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-static \ - --enable-shared \ - --enable-python2 \ - --enable-python3 \ - --enable-glade-catalog \ - --enable-gtk \ - DATADIRNAME=share - - # https://bugzilla.gnome.org/show_bug.cgi?id=655517 - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool - make -j1 V=1 + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --sysconfdir=${MINGW_PREFIX}/etc \ + --localstatedir=${MINGW_PREFIX}/var \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-static \ + --enable-shared \ + --enable-python2 \ + --enable-python3 \ + --enable-glade-catalog \ + --enable-gtk + + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libpeas/libpeas-i686.install b/mingw-w64-libpeas/libpeas-i686.install index da50a72875..62459f29d3 100644 --- a/mingw-w64-libpeas/libpeas-i686.install +++ b/mingw-w64-libpeas/libpeas-i686.install @@ -1,5 +1,5 @@ post_install() { - mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/hicolor } post_upgrade() { diff --git a/mingw-w64-libpeas/libpeas-x86_64.install b/mingw-w64-libpeas/libpeas-x86_64.install index 4a2bb1bb75..f2f0233676 100644 --- a/mingw-w64-libpeas/libpeas-x86_64.install +++ b/mingw-w64-libpeas/libpeas-x86_64.install @@ -1,5 +1,5 @@ post_install() { - mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/hicolor } post_upgrade() { diff --git a/mingw-w64-libplist/001-cython-module.patch b/mingw-w64-libplist/001-cython-module.patch new file mode 100644 index 0000000000..d1fc3618b5 --- /dev/null +++ b/mingw-w64-libplist/001-cython-module.patch @@ -0,0 +1,14 @@ +--- libplist-1.12/cython/Makefile.am.orig 2015-01-17 19:17:30.724800000 +0300 ++++ libplist-1.12/cython/Makefile.am 2015-01-17 19:17:43.813200000 +0300 +@@ -20,8 +20,10 @@ + plist_LTLIBRARIES = plist.la + plist_la_SOURCES = plist_util.c plist_util.h plist.pyx + plist_la_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(PYTHON_CPPFLAGS) $(AM_CFLAGS) -Wno-shadow -Wno-redundant-decls -Wno-switch-default -Wno-strict-aliasing -Wno-implicit-function-declaration -fvisibility=default +-plist_la_LDFLAGS = -module -avoid-version -L$(libdir) $(PYTHON_LDFLAGS) $(AM_LDFLAGS) ++plist_la_LDFLAGS = -module -avoid-version -no-undefined -L$(libdir) $(PYTHON_LDFLAGS) $(AM_LDFLAGS) + plist_la_LIBADD = $(top_builddir)/src/libplist.la ++otherincludedir = $(includedir)/plist/cython ++otherinclude_HEADERS = plist_util.h plist.pxd + + plist.c: plist.pyx $(PXDINCLUDES) $(PXIINCLUDES) + diff --git a/mingw-w64-libplist/PKGBUILD b/mingw-w64-libplist/PKGBUILD index 1c087589c2..68a899ecdf 100644 --- a/mingw-w64-libplist/PKGBUILD +++ b/mingw-w64-libplist/PKGBUILD @@ -3,35 +3,40 @@ _realname=libplist pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.12 -pkgrel=1 +pkgrel=3 pkgdesc='A library to handle Apple Property List format in binary or XML (mingw-w64)' -groups=("${MINGW_PACKAGE_PREFIX}" "xdev") arch=('any') url='http://www.libimobiledevice.org/' license=('GPL2+') -source=("http://www.libimobiledevice.org/downloads/${_realname}-${pkgver}.tar.bz2") +source=("http://www.libimobiledevice.org/downloads/${_realname}-${pkgver}.tar.bz2" + 001-cython-module.patch) depends=("${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-cython") +options=('staticlibs') makedepends=("${MINGW_PACKAGE_PREFIX}-python3") -sha1sums=('48f071c723387637ef2cc2980d4ca0627aab067b') +sha1sums=('48f071c723387637ef2cc2980d4ca0627aab067b' + '974595d36c8ddfcf97aab0d3f2b4ee36b1440351') prepare() { - cd $srcdir/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-cython-module.patch + + autoreconf -fiv } build() { - cd "$srcdir"/${_realname}-${pkgver} - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} PYTHON=${MINGW_PREFIX}/bin/python3 \ - ../${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } @@ -44,4 +49,6 @@ check() { package() { cd "${srcdir}"/build-${CARCH} make install DESTDIR="${pkgdir}" + + rm -f ${pkgdir}${MINGW_PREFIX}/lib/python*/site-packages/*.a } diff --git a/mingw-w64-libpng/PKGBUILD b/mingw-w64-libpng/PKGBUILD index be09ae6e89..83a8eeaf02 100644 --- a/mingw-w64-libpng/PKGBUILD +++ b/mingw-w64-libpng/PKGBUILD @@ -1,37 +1,37 @@ # Maintainer: Alexey Pavlov _realname=libpng +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.6.14 +pkgver=1.6.20 pkgrel=1 arch=('any') pkgdesc="A collection of routines used to create PNG format graphics (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-gcc-libs") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -groups=("${MINGW_PACKAGE_PREFIX}") license=('custom') url="http://www.libpng.org/pub/png/libpng.html" options=('strip' '!libtool' 'staticlibs') -source=("http://downloads.sourceforge.net/sourceforge/libpng/libpng-$pkgver.tar.xz" - "http://downloads.sourceforge.net/project/libpng-apng/libpng16/$pkgver/libpng-$pkgver-apng.patch.gz") +source=("http://downloads.sourceforge.net/sourceforge/libpng/${_realname}-${pkgver}.tar.xz" + "http://downloads.sourceforge.net/project/libpng-apng/libpng16/${pkgver}/${_realname}-${pkgver}-apng.patch.gz") -md5sums=('aefd9fda2178acab908707737174a0cd' - '39f35cde00159c24b5a10258d8f2c5ce') +md5sums=('3968acb7c66ef81a9dab867f35d0eb4b' + 'b2186d5e7853890e25b34b03c7f2ddde') prepare() { - cd "$srcdir/libpng-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" # Add animated PNG (apng) support # see http://sourceforge.net/projects/libpng-apng/ - patch -p1 -i "${srcdir}/libpng-$pkgver-apng.patch" + patch -p1 -i "${srcdir}/${_realname}-${pkgver}-apng.patch" } build() { - cd "$srcdir/libpng-$pkgver" - - mkdir -p "${srcdir}/build-${CARCH}" - cd "${srcdir}/build-${CARCH}" - ../libpng-${pkgver}/configure \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -42,7 +42,7 @@ build() { } package () { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" make install DESTDIR="${pkgdir}" install -D -m644 "${srcdir}/libpng-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/LICENSE" diff --git a/mingw-w64-libproxy/006-python-site-package-dir.patch b/mingw-w64-libproxy/006-python-site-package-dir.patch new file mode 100644 index 0000000000..2d928d456f --- /dev/null +++ b/mingw-w64-libproxy/006-python-site-package-dir.patch @@ -0,0 +1,11 @@ +--- libproxy-0.4.11/bindings/python/CMakeLists.txt.orig 2015-07-23 12:46:27.038511800 +0300 ++++ libproxy-0.4.11/bindings/python/CMakeLists.txt 2015-07-23 12:47:10.174197800 +0300 +@@ -14,7 +14,7 @@ + + execute_process(COMMAND + ${PYTHON_EXECUTABLE} +- -c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib(plat_specific=0)" ++ -c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib(prefix='')" + OUTPUT_VARIABLE PYTHON_SITEPKG_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE) + endif() diff --git a/mingw-w64-libproxy/PKGBUILD b/mingw-w64-libproxy/PKGBUILD index 6d8f218f0d..a9b2997ca4 100644 --- a/mingw-w64-libproxy/PKGBUILD +++ b/mingw-w64-libproxy/PKGBUILD @@ -3,15 +3,15 @@ _realname=libproxy pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.4.11 -pkgrel=1 +pkgrel=3 pkgdesc="A library that provides automatic proxy configuration management (mingw-w64)" arch=('any') url="http://libproxy.googlecode.com" license=("LGPL") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-python2") options=('staticlibs' 'strip') source=("http://libproxy.googlecode.com/files/${_realname}-${pkgver}.tar.gz" @@ -19,54 +19,49 @@ source=("http://libproxy.googlecode.com/files/${_realname}-${pkgver}.tar.gz" 002-fix-win32-close-scoket.patch 003-fix-leaks.patch 004-allow-bindings.patch - 005-modules.patch) + 005-modules.patch + 006-python-site-package-dir.patch) md5sums=('3cd1ae2a4abecf44b3f24d6639d2cd84' '6c8423fb0b2595d5254c8aac3797a36a' - 'e8f9219bf9e0e6311419cd96a85b4c9d' + '3fe1d50d8a4bccdc14a58166ec7f9b59' '275ae951b6fcb2608498549c493810d7' '35bcd97f6f79d83b0689907f97476e4b' - '74adbf77b1ba5b99ea11600d9e43c8f9') + '74adbf77b1ba5b99ea11600d9e43c8f9' + '504bbca53bd2213e70214f12c81192ab') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/001-fix-casting-error.patch patch -p1 -i ${srcdir}/002-fix-win32-close-scoket.patch patch -p1 -i ${srcdir}/003-fix-leaks.patch patch -p1 -i ${srcdir}/004-allow-bindings.patch patch -p1 -i ${srcdir}/005-modules.patch + patch -p1 -i ${srcdir}/006-python-site-package-dir.patch } build() { - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} - [[ -d $srcdir/build-${MINGW_CHOST} ]] && rm -rf $srcdir/build-${MINGW_CHOST} - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;-DLIBEXEC_INSTALL_DIR=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DLIBEXEC_INSTALL_DIR=${pkgdir}${MINGW_PREFIX}/lib/libproxy \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DLIBEXEC_INSTALL_DIR=${MINGW_PREFIX}/lib/libproxy \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ -DCMAKE_C_FLAGS="${CFLAGS}" \ -DWITH_PERL=OFF \ -DWITH_PYTHON=ON \ - ../${_realname}-$pkgver + ../${_realname}-${pkgver} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - local PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libproxy-1.0.pc + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-librescl/PKGBUILD b/mingw-w64-librescl/PKGBUILD new file mode 100644 index 0000000000..440ad46501 --- /dev/null +++ b/mingw-w64-librescl/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Daniel Espinosa + +_realname=librescl +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.3.3 +pkgrel=1 +arch=('any') +pkgdesc="Reader/Writer SCL IEC 61850-6 files (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-glib2>=2.34.0" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-gxml" + "${MINGW_PACKAGE_PREFIX}-libgee" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-libtool") +options=('strip' 'staticlibs') +license=('LGPL') +url="https://github.com/pwmediaconsulting/librescl" +source=("https://github.com/pwmediaconsulting/librescl/archive/LIBRESCL_${pkgver//./_}.tar.gz") +sha256sums=('9b1ffec7a11cd92e36bfb590b3a9b99d0bf39d2895a5e4c76c65998a19fb57c5') + +prepare() { + cd "${srcdir}"/librescl-LIBRESCL_${pkgver//./_} + + NOCONFIGURE=1 ./autogen.sh + #make distclean + #autoreconf -fiv +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../librescl-LIBRESCL_${pkgver//./_}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-librest/001-win.patch b/mingw-w64-librest/001-win.patch new file mode 100644 index 0000000000..d037747683 --- /dev/null +++ b/mingw-w64-librest/001-win.patch @@ -0,0 +1,20 @@ +--- ./rest/Makefile.am.orig 2014-09-03 14:01:16.000000000 +0200 ++++ ./rest/Makefile.am 2015-03-27 18:20:11.647583400 +0100 +@@ -124,6 +124,7 @@ + Rest_@API_VERSION_AM@_gir_EXPORT_PACKAGES = rest-@API_VERSION@ + REST_CINCLUDES=$(patsubst %,--c-include='rest/%',$(shell echo $(lib_headers))) + INTROSPECTION_SCANNER_ARGS = $(REST_CINCLUDES) ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + girdir = $(datadir)/gir-1.0 + dist_gir_DATA = $(INTROSPECTION_GIRS) +--- ./rest-extras/Makefile.am.orig 2015-03-27 18:19:35.128554000 +0100 ++++ ./rest-extras/Makefile.am 2015-03-27 18:20:01.215165100 +0100 +@@ -51,6 +51,7 @@ + # need to include ../rest when scanning/compiling + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_builddir)/rest --identifier-prefix= + INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/rest ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + REST_EXTRAS_CINCLUDES=$(patsubst %,--c-include='rest/%',$(shell echo $(lib_headers))) + INTROSPECTION_SCANNER_ARGS += $(REST_EXTRAS_CINCLUDES) diff --git a/mingw-w64-librest/PKGBUILD b/mingw-w64-librest/PKGBUILD new file mode 100644 index 0000000000..6fd5033887 --- /dev/null +++ b/mingw-w64-librest/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Andrea Zagli + +_realname=rest +pkgname="${MINGW_PACKAGE_PREFIX}-lib${_realname}" +pkgver=0.7.93 +pkgrel=2 +arch=('any') +pkgdesc="Helper library for RESTful services (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "gtk-doc" + "intltool") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://www.gnome.org/" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('c710644455340a44ddc005c645c466f05c0d779993138ea21a62c6082108b216' + 'c7b1ebbc45071b08493758b6953e19cec4d7eac1b8e95fdb67011797b4a26a93') + +prepare() { + cd ${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + autoreconf -fiv +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/rest/html + cp -rf ../${_realname}-${pkgver}/docs/reference/rest/html/* docs/reference/rest/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-introspection \ + --without-ca-certificates + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/lib${_realname}/COPYING" +} diff --git a/mingw-w64-librevenge/PKGBUILD b/mingw-w64-librevenge/PKGBUILD index 8632ec3324..ac11e98605 100644 --- a/mingw-w64-librevenge/PKGBUILD +++ b/mingw-w64-librevenge/PKGBUILD @@ -1,20 +1,25 @@ # Maintainer: Alexey Pavlov _realname=librevenge - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.0.1 +pkgver=0.0.3 pkgrel=1 -pkgdesc="library for REVerses ENGineered formats filters (mingw-w64)" +pkgdesc="Library for REVerses ENGineered formats filters (mingw-w64)" arch=('any') -url="ttp://sf.net/p/libwpd/librevenge/" +url="http://sf.net/p/libwpd/librevenge/" license=("MPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-boost") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-doxygen") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-zlib") checkdepends=("${MINGW_PACKAGE_PREFIX}-cppunit") options=(staticlibs strip) source=("http://sourceforge.net/projects/libwpd/files/librevenge/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.xz") -md5sums=('7c397d6eb39d906dacacd74cc1f0d749') +md5sums=('b777d64bbe13830627c7bda69e5f3e31') prepare() { cd ${srcdir}/${_realname}-${pkgver} @@ -22,6 +27,7 @@ prepare() { build() { export lt_cv_deplibs_check_method='pass_all' + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} cp -r ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ./configure \ @@ -30,12 +36,16 @@ build() { --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ - --with-boost-filesystem=boost_filesystem-mt + --with-docs=yes + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LGPL" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LGPL" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.MPL" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.MPL" } diff --git a/mingw-w64-librocket-git/003-fix-typo.patch b/mingw-w64-librocket-git/003-fix-typo.patch new file mode 100644 index 0000000000..346e26cd9e --- /dev/null +++ b/mingw-w64-librocket-git/003-fix-typo.patch @@ -0,0 +1,11 @@ +--- librocket/Samples/shell/src/win32/ShellRenderInterfaceExtensionsOpenGL_Win32.cpp.orig 2015-07-20 14:59:44.514453800 +0300 ++++ librocket/Samples/shell/src/win32/ShellRenderInterfaceExtensionsOpenGL_Win32.cpp 2015-07-20 14:59:48.544010500 +0300 +@@ -119,7 +119,7 @@ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + RECT crect; +- GetClientRect(this->window_handle, &crect) ++ GetClientRect(this->window_handle, &crect); + glOrtho(0, (crect.right - crect.left), (crect.bottom - crect.top), 0, -1, 1); + + glMatrixMode(GL_MODELVIEW); diff --git a/mingw-w64-librocket-git/PKGBUILD b/mingw-w64-librocket-git/PKGBUILD index 4c6ff1e9f5..f3a09fba9f 100644 --- a/mingw-w64-librocket-git/PKGBUILD +++ b/mingw-w64-librocket-git/PKGBUILD @@ -2,7 +2,7 @@ _realname=librocket pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r494.761d05a +pkgver=r559.e6a9715 pkgrel=1 pkgdesc="The HTML/CSS User Interface Library (mingw-w64)" arch=('any') @@ -10,52 +10,55 @@ url="http://http://librocket.com/" license=("MIT") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -depends=("${MINGW_PACKAGE_PREFIX}-freetype" +depends=("${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-boost") + "${MINGW_PACKAGE_PREFIX}-sfml") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" - "make") - + "make" "git") options=('staticlibs' 'strip') - source=("${_realname}"::"git+https://github.com/libRocket/libRocket.git" "001-dll-exports.patch" - "002-fix-cast-errors.patch") - + "002-fix-cast-errors.patch" + "003-fix-typo.patch") md5sums=('SKIP' 'e36e68efc51581353795088d33c7d6e3' - 'c1f3a4decff61fc117197a5287f7f870') + 'c1f3a4decff61fc117197a5287f7f870' + '84fd27cb70375190c4c4ad3d98478a76') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/$_realname" - patch -p1 -i ${srcdir}/001-dll-exports.patch + cd "${srcdir}/${_realname}" + #patch -p1 -i ${srcdir}/001-dll-exports.patch patch -p1 -i "$srcdir"/002-fix-cast-errors.patch + patch -p1 -i "$srcdir"/003-fix-typo.patch } build() { - [ -d build-${CARCH} ] && rm -rf build-${CARCH} + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_PYTHON_BINDINGS=ON \ -DBUILD_SHARED_LIBS=ON \ -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python2.exe \ -DBUILD_SAMPLES=ON \ -DCMAKE_GNUtoMS=0 \ - ../$_realname/Build + ../${_realname}/Build + make } package() { cd "${srcdir}/build-${CARCH}" - make install + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-librsvg/0001-give-cc-to-gir-scanner.mingw.patch b/mingw-w64-librsvg/0001-give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index 6bab333edc..0000000000 --- a/mingw-w64-librsvg/0001-give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- librsvg-2.40.2/Makefile.am.orig 2014-04-17 01:22:10.962400000 +0400 -+++ librsvg-2.40.2/Makefile.am 2014-04-17 01:23:09.634000000 +0400 -@@ -214,6 +214,8 @@ - -include $(INTROSPECTION_MAKEFILE) - - INTROSPECTION_GIRS = Rsvg-@RSVG_API_VERSION@.gir -+INTROSPECTION_SCANNER_ENV = \ -+ CC="$(CC)" - INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg - INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) - -@@ -238,7 +238,7 @@ - pango \ - libxml-2.0 \ - $(NULL) --Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) -DRSVG_COMPILATION -+Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) $(LIBRSVG_CFLAGS) -DRSVG_COMPILATION - Rsvg_@RSVG_API_VERSION_U@_gir_LIBS = librsvg-@RSVG_API_MAJOR_VERSION@.la - Rsvg_@RSVG_API_VERSION_U@_gir_SCANNERFLAGS = --c-include="librsvg/rsvg.h" - diff --git a/mingw-w64-librsvg/0002-gio-windows.patch b/mingw-w64-librsvg/0002-gio-windows.patch deleted file mode 100644 index c6c04fdf4b..0000000000 --- a/mingw-w64-librsvg/0002-gio-windows.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- librsvg-2.40.4/configure.in.orig 2014-09-23 22:39:35.261400000 +0500 -+++ librsvg-2.40.4/configure.in 2014-09-23 22:39:58.879800000 +0500 -@@ -111,7 +111,14 @@ - - PKG_CHECK_MODULES([GMODULE],[gmodule-2.0]) - --PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 gio-unix-2.0 gdk-pixbuf-2.0 cairo pangocairo]) -+case "$host" in -+ *-*-mingw*) -+ PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 gio-windows-2.0 gdk-pixbuf-2.0 cairo pangocairo]) -+ ;; -+ *) -+ PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 gio-unix-2.0 gdk-pixbuf-2.0 cairo pangocairo]) -+ ;; -+esac - - dnl =========================================================================== - ---- librsvg-2.40.4/rsvg-convert.c.orig 2014-09-01 23:28:33.000000000 +0500 -+++ librsvg-2.40.4/rsvg-convert.c 2014-09-23 22:56:02.514400000 +0500 -@@ -36,7 +36,11 @@ - #include - #include - #include -+#ifdef _WIN32 -+#include -+#else - #include -+#endif - - #include "rsvg-css.h" - #include "rsvg.h" -@@ -217,7 +217,11 @@ - - if (using_stdin) { - file = NULL; -+#ifdef _WIN32 -+ stream = g_win32_input_stream_new (STDIN_FILENO, FALSE); -+#else - stream = g_unix_input_stream_new (STDIN_FILENO, FALSE); -+#endif - } else { - GFileInfo *file_info; - gboolean compressed = FALSE; diff --git a/mingw-w64-librsvg/0004-fix-fullpath-invocation-and-use-it.mingw.patch b/mingw-w64-librsvg/0004-fix-fullpath-invocation-and-use-it.mingw.patch deleted file mode 100644 index 806074c978..0000000000 --- a/mingw-w64-librsvg/0004-fix-fullpath-invocation-and-use-it.mingw.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- librsvg-2.40.3/rsvg-base.c -+++ librsvg-2.40.3/rsvg-base.c -@@ -2207,22 +2207,22 @@ - if (base == NULL) - goto deny; - - dir = g_file_get_path (base); - g_object_unref (base); - -- cdir = realpath (dir, NULL); -+ cdir = _fullpath (NULL, dir, _MAX_PATH); - g_free (dir); - if (cdir == NULL) - goto deny; - - path = g_filename_from_uri (uri, NULL, NULL); - if (path == NULL) - goto deny; - -- cpath = realpath (path, NULL); -+ cpath = _fullpath (NULL, path, _MAX_PATH); - g_free (path); - - if (cpath == NULL) - goto deny; - - /* Now check that @cpath is below @cdir */ diff --git a/mingw-w64-librsvg/0005-hack-unixy-paths.patch b/mingw-w64-librsvg/0005-hack-unixy-paths.patch index cdf6aa33e1..883cc28c23 100644 --- a/mingw-w64-librsvg/0005-hack-unixy-paths.patch +++ b/mingw-w64-librsvg/0005-hack-unixy-paths.patch @@ -1,5 +1,5 @@ ---- librsvg-2.40.4/configure.in.orig 2014-09-24 12:24:57.276600000 +0500 -+++ librsvg-2.40.4/configure.in 2014-09-24 12:25:51.939000000 +0500 +--- librsvg-2.40.4/configure.ac.orig 2014-09-24 12:24:57.276600000 +0500 ++++ librsvg-2.40.4/configure.ac 2014-09-24 12:25:51.939000000 +0500 @@ -165,6 +165,9 @@ gdk_pixbuf_binarydir="`$PKG_CONFIG --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0`" gdk_pixbuf_moduledir=`$PKG_CONFIG --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0` diff --git a/mingw-w64-librsvg/PKGBUILD b/mingw-w64-librsvg/PKGBUILD index cc4f7108f2..22ebd520f0 100644 --- a/mingw-w64-librsvg/PKGBUILD +++ b/mingw-w64-librsvg/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=librsvg +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.40.5 +pkgver=2.40.12 pkgrel=1 pkgdesc="A SVG viewing library (mingw-w64)" arch=('any') @@ -14,35 +15,33 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-vala" "setconf") -depends=("${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" "${MINGW_PACKAGE_PREFIX}-pango" "${MINGW_PACKAGE_PREFIX}-libcroco") +depends=("${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-pango" + "${MINGW_PACKAGE_PREFIX}-libcroco") optdepends=("${MINGW_PACKAGE_PREFIX}-gtk3: for rsvg-view-3") options=('staticlibs' 'strip') -source=("http://ftp.gnome.org/pub/gnome/sources/librsvg/${pkgver%.*}/${_realname}-$pkgver.tar.xz" - "0001-give-cc-to-gir-scanner.mingw.patch" - "0002-gio-windows.patch" - "0004-fix-fullpath-invocation-and-use-it.mingw.patch" +source=("http://ftp.gnome.org/pub/gnome/sources/librsvg/${pkgver%.*}/${_realname}-${pkgver}.tar.xz" "0005-hack-unixy-paths.patch") -sha256sums=('d14d7b3e25023ce34302022fd7c9b3a468629c94dff6c177874629686bfc71a7' - '854f36c9bc1ad0f3a85ca2ec4e8b5c7d75ba035c45ad4915601210acf0321776' - '9387edb852cade567c54b004690068922ca88fd783628b42d606188340dd2ba2' - '41ffb473d8b1102c5098fa3172b358e4bc65f96df7a7953874b3ab6965fd9ccb' - 'eff60ec631f08ea69a26d216c41beea502c68614278a15eb4c73213a64f76ed4') +sha256sums=('ffe40c4378bf3899f4d679a475726bab03a127a5bdccddec86404cc329ffb550' + 'b23b094c0cb65fcbbbb952350448de6f3430b30f273e05acdbf7a56d634212dc') prepare() { - cd "$srcdir/${_realname}-$pkgver" - patch -p1 -i "$srcdir/0001-give-cc-to-gir-scanner.mingw.patch" - patch -p1 -i "$srcdir/0002-gio-windows.patch" - patch -p1 -i "$srcdir/0004-fix-fullpath-invocation-and-use-it.mingw.patch" - patch -p1 -i "$srcdir/0005-hack-unixy-paths.patch" - + cd "${srcdir}/${_realname}-${pkgver}" + + patch -p1 -i "${srcdir}/0005-hack-unixy-paths.patch" + autoreconf -fi } build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r ${srcdir}/${_realname}-$pkgver "${srcdir}/build-${MINGW_CHOST}" + cp -r ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" #mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + + mkdir -p doc/html + cp -rf ../${_realname}-${pkgver}/doc/html/* doc/html + CXXFLAGS+=" -D_POSIX_SOURCE" CFLAGS+=" -D_POSIX_SOURCE" ./configure \ @@ -58,5 +57,7 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libsamplerate/PKGBUILD b/mingw-w64-libsamplerate/PKGBUILD index 009022d53d..5088b9eec0 100644 --- a/mingw-w64-libsamplerate/PKGBUILD +++ b/mingw-w64-libsamplerate/PKGBUILD @@ -4,19 +4,16 @@ _realname=libsamplerate pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.1.8 -pkgrel=1 -pkgdesc="Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for audio." +pkgrel=2 +pkgdesc="Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for audio (mingw-w64)" arch=('any') license=('GGPL') url="http://www.mega-nerd.com" depends=("${MINGW_PACKAGE_PREFIX}-libsndfile" - "${MINGW_PACKAGE_PREFIX}-fftw") - + "${MINGW_PACKAGE_PREFIX}-fftw") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config") - + "${MINGW_PACKAGE_PREFIX}-pkg-config") options=(!strip staticlibs !buildflags) - source=("http://www.mega-nerd.com/SRC/${_realname}-${pkgver}.tar.gz") md5sums=('1c7fb25191b4e6e3628d198a66a84f47') @@ -24,12 +21,12 @@ build() { mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} - make ${MAKEFLAGS} # VERBOSE=1 + make ${MAKEFLAGS} # VERBOSE=1 } package() { diff --git a/mingw-w64-libsecret/PKGBUILD b/mingw-w64-libsecret/PKGBUILD index f40e344f7f..91259c6658 100644 --- a/mingw-w64-libsecret/PKGBUILD +++ b/mingw-w64-libsecret/PKGBUILD @@ -3,7 +3,7 @@ _realname=libsecret pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.18 -pkgrel=1 +pkgrel=3 pkgdesc="Library for storing and retrieving passwords and other secrets (mingw-w64)" arch=('any') url="https://wiki.gnome.org/Projects/Libsecret" @@ -14,19 +14,19 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-vala" "intltool") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs - ${MINGW_PACKAGE_PREFIX}-glib2 - ${MINGW_PACKAGE_PREFIX}-libgcrypt) + ${MINGW_PACKAGE_PREFIX}-glib2 + ${MINGW_PACKAGE_PREFIX}-libgcrypt) options=('!libtool' 'strip') -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/$pkgver/${_realname}-$pkgver.tar.xz +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.xz 0001-port-to.mingw.patch) md5sums=('279d723cd005e80d1d304f74a3488acc' '32d12d84dc3ae5b108e67f12a512bd3c') prepare() { - cd "$srcdir/${_realname}-${pkgver}" - + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/0001-port-to.mingw.patch - + autoreconf -fi } @@ -43,7 +43,8 @@ build() { --enable-shared \ --enable-static \ --enable-introspection \ - --enable-vala + --enable-vala \ + --disable-manpages make } diff --git a/mingw-w64-libshout/PKGBUILD b/mingw-w64-libshout/PKGBUILD index b482a512df..1a0fd7ba6b 100644 --- a/mingw-w64-libshout/PKGBUILD +++ b/mingw-w64-libshout/PKGBUILD @@ -3,7 +3,7 @@ _realname=libshout pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="Library for accessing a shoutcast/icecast server (mingw-w64)" arch=("any") url="http://www.icecast.org/" @@ -35,10 +35,9 @@ prepare() { } build() { - [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - #cd ${_realname}-${pkgver} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -46,6 +45,7 @@ build() { --target=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } diff --git a/mingw-w64-libsigc++/PKGBUILD b/mingw-w64-libsigc++/PKGBUILD index b5564a2f9f..391e63eaba 100644 --- a/mingw-w64-libsigc++/PKGBUILD +++ b/mingw-w64-libsigc++/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libsigc++ +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.4.0 +pkgver=2.6.2 pkgrel=1 pkgdesc="Libsigc++ implements a full callback system for use in widget libraries - V2 (mingw-w64)" arch=('any') @@ -12,22 +13,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') source=("http://ftp.gnome.org/pub/GNOME/sources/libsigc++/${pkgver%.*}/libsigc++-${pkgver}.tar.xz") -sha256sums=('7593d5fa9187bbad7c6868dce375ce3079a805f3f1e74236143bceb15a37cd30') +sha256sums=('fdace7134c31de792c17570f9049ca0657909b28c4c70ec4882f91a03de54437') build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-static \ --enable-shared \ --disable-documentation + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libsndfile/PKGBUILD b/mingw-w64-libsndfile/PKGBUILD index d266a3016c..5240b3d434 100644 --- a/mingw-w64-libsndfile/PKGBUILD +++ b/mingw-w64-libsndfile/PKGBUILD @@ -1,22 +1,21 @@ # Maintainer: Alexey Pavlov _realname=libsndfile - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.0.25 -pkgrel=2 +pkgrel=3 pkgdesc="A C library for reading and writing files containing sampled sound (mingw-w64)" arch=('any') url="http://www.mega-nerd.com/libsndfile" license=('LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=("${MINGW_PACKAGE_PREFIX}-flac" "${MINGW_PACKAGE_PREFIX}-libvorbis") +depends=("${MINGW_PACKAGE_PREFIX}-flac" "${MINGW_PACKAGE_PREFIX}-libvorbis" "${MINGW_PACKAGE_PREFIX}-speex") options=('staticlibs' 'strip') source=(http://www.mega-nerd.com/libsndfile/files/${_realname}-${pkgver}.tar.gz - 0001-more-elegant-and-foolproof-autogen-fallback.all.patch - 0002-conditional-truncate.mingw.patch - 0003-fix-source-searches.mingw.patch - 0004-fix-linking-external-libs.patch) + 0001-more-elegant-and-foolproof-autogen-fallback.all.patch + 0002-conditional-truncate.mingw.patch + 0003-fix-source-searches.mingw.patch + 0004-fix-linking-external-libs.patch) md5sums=('e2b7bb637e01022c7d20f95f9c3990a2' '9b4254acf1cfc17a1e94af29f7260d30' 'c9ac8330da543496b0b5cb6ae081a7b6' @@ -36,18 +35,20 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ - --enable-shared \ - --enable-static \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --disable-sqlite \ --disable-test-coverage \ - --enable-external-libs - #--enable-experimental # speex support + --enable-external-libs \ + --enable-experimental \ + --enable-shared \ + --enable-static + make } diff --git a/mingw-w64-libsodium/PKGBUILD b/mingw-w64-libsodium/PKGBUILD index d56f8b2b0e..f5ebebf01c 100644 --- a/mingw-w64-libsodium/PKGBUILD +++ b/mingw-w64-libsodium/PKGBUILD @@ -1,34 +1,42 @@ # Maintainer: Alexey Pavlov _realname=libsodium +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.0 -pkgrel=1 +pkgver=1.0.3 +pkgrel=3 pkgdesc="P(ortable|ackageable) NaCl-based crypto library (mingw-w64)" arch=("any") url="https://github.com/jedisct1/libsodium" license=('custom:ISC') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -source=("http://download.dnscrypt.org/${_realname}/releases/${_realname}-${pkgver}.tar.gz") -md5sums=('3093dabe4e038d09f0d150cef064b2f7') +source=("https://download.libsodium.org/libsodium/releases/${_realname}-${pkgver}.tar.gz"{,.sig}) +md5sums=('b3bcc98e34d3250f55ae196822307fab' + 'SKIP') build() { - cd ${_realname}-${pkgver} - ./configure \ + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } check() { - cd $_realname-$pkgver + cd build-${MINGW_CHOST} make -k check } package() { - cd ${_realname}-${pkgver} + cd build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install - install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-libsoup/0001-give-cc-to-gir-scanner.mingw.patch b/mingw-w64-libsoup/0001-give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index 34e40b6771..0000000000 --- a/mingw-w64-libsoup/0001-give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libsoup-2.45.90/libsoup/Makefile.am.orig 2013-07-28 21:56:07.983654900 +0000 -+++ libsoup-2.45.90/libsoup/Makefile.am 2013-07-28 22:00:08.786733000 +0000 -@@ -237,6 +237,7 @@ - # - include $(INTROSPECTION_MAKEFILE) - INTROSPECTION_GIRS = -+INTROSPECTION_SCANNER_ENV = CC="$(CC)" - INTROSPECTION_SCANNER_ARGS = --add-include-path=. - INTROSPECTION_COMPILER_ARGS = --includedir=. - diff --git a/mingw-w64-libsoup/0002-fix-keyword-conflict.patch b/mingw-w64-libsoup/0002-fix-keyword-conflict.patch deleted file mode 100644 index 299b131c90..0000000000 --- a/mingw-w64-libsoup/0002-fix-keyword-conflict.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -Naur libsoup-2.48.0-orig/libsoup/soup-cache.c libsoup-2.48.0/libsoup/soup-cache.c ---- libsoup-2.48.0-orig/libsoup/soup-cache.c 2014-09-23 03:02:43.000000000 +0500 -+++ libsoup-2.48.0/libsoup/soup-cache.c 2014-09-23 15:15:23.836600000 +0500 -@@ -51,7 +51,7 @@ - static void soup_cache_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); - - static SoupContentProcessorInterface *soup_cache_default_content_processor_interface; --static void soup_cache_content_processor_init (SoupContentProcessorInterface *interface, gpointer interface_data); -+static void soup_cache_content_processor_init (SoupContentProcessorInterface *interface_name, gpointer interface_data); - - #define DEFAULT_MAX_SIZE 50 * 1024 * 1024 - #define MAX_ENTRY_DATA_PERCENTAGE 10 /* Percentage of the total size -diff -Naur libsoup-2.48.0-orig/libsoup/soup-content-decoder.c libsoup-2.48.0/libsoup/soup-content-decoder.c ---- libsoup-2.48.0-orig/libsoup/soup-content-decoder.c 2014-06-18 19:42:51.000000000 +0500 -+++ libsoup-2.48.0/libsoup/soup-content-decoder.c 2014-09-23 15:15:43.508200000 +0500 -@@ -59,7 +59,7 @@ - static void soup_content_decoder_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); - - static SoupContentProcessorInterface *soup_content_decoder_default_content_processor_interface; --static void soup_content_decoder_content_processor_init (SoupContentProcessorInterface *interface, gpointer interface_data); -+static void soup_content_decoder_content_processor_init (SoupContentProcessorInterface *interface_name, gpointer interface_data); - - - G_DEFINE_TYPE_WITH_CODE (SoupContentDecoder, soup_content_decoder, G_TYPE_OBJECT, -diff -Naur libsoup-2.48.0-orig/libsoup/soup-content-processor.c libsoup-2.48.0/libsoup/soup-content-processor.c ---- libsoup-2.48.0-orig/libsoup/soup-content-processor.c 2014-06-18 19:42:51.000000000 +0500 -+++ libsoup-2.48.0/libsoup/soup-content-processor.c 2014-09-23 15:16:35.081800000 +0500 -@@ -11,7 +11,7 @@ - #include "soup-content-processor.h" - #include "soup.h" - --static void soup_content_processor_default_init (SoupContentProcessorInterface *interface); -+static void soup_content_processor_default_init (SoupContentProcessorInterface *interface_name); - - G_DEFINE_INTERFACE (SoupContentProcessor, soup_content_processor, G_TYPE_OBJECT) - -@@ -25,10 +25,10 @@ - } - - static void --soup_content_processor_default_init (SoupContentProcessorInterface *interface) -+soup_content_processor_default_init (SoupContentProcessorInterface *interface_name) - { -- interface->processing_stage = SOUP_STAGE_INVALID; -- interface->wrap_input = soup_content_processor_real_wrap_input; -+ interface_name->processing_stage = SOUP_STAGE_INVALID; -+ interface_name->wrap_input = soup_content_processor_real_wrap_input; - } - - GInputStream * -diff -Naur libsoup-2.48.0-orig/libsoup/soup-content-sniffer.c libsoup-2.48.0/libsoup/soup-content-sniffer.c ---- libsoup-2.48.0-orig/libsoup/soup-content-sniffer.c 2014-06-18 19:42:51.000000000 +0500 -+++ libsoup-2.48.0/libsoup/soup-content-sniffer.c 2014-09-23 15:16:58.232200000 +0500 -@@ -38,7 +38,7 @@ - static void soup_content_sniffer_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); - - static SoupContentProcessorInterface *soup_content_sniffer_default_content_processor_interface; --static void soup_content_sniffer_content_processor_init (SoupContentProcessorInterface *interface, gpointer interface_data); -+static void soup_content_sniffer_content_processor_init (SoupContentProcessorInterface *interface_name, gpointer interface_data); - - - G_DEFINE_TYPE_WITH_CODE (SoupContentSniffer, soup_content_sniffer, G_TYPE_OBJECT, -diff -Naur libsoup-2.48.0-orig/libsoup/soup-server.h libsoup-2.48.0/libsoup/soup-server.h ---- libsoup-2.48.0-orig/libsoup/soup-server.h 2014-09-23 03:02:43.000000000 +0500 -+++ libsoup-2.48.0/libsoup/soup-server.h 2014-09-23 15:13:34.844000000 +0500 -@@ -80,7 +80,7 @@ - - SOUP_AVAILABLE_IN_2_48 - gboolean soup_server_listen (SoupServer *server, -- GSocketAddress *interface, -+ GSocketAddress *interface_name, - SoupServerListenOptions options, - GError **error); - SOUP_AVAILABLE_IN_2_48 diff --git a/mingw-w64-libsoup/0003-fix-missing-symbol.patch b/mingw-w64-libsoup/0003-fix-missing-symbol.patch deleted file mode 100644 index fbac28b249..0000000000 --- a/mingw-w64-libsoup/0003-fix-missing-symbol.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libsoup-2.48.0/libsoup/libsoup-2.4.sym.orig 2014-09-23 17:36:58.531800000 +0500 -+++ libsoup-2.48.0/libsoup/libsoup-2.4.sym 2014-09-23 17:37:07.938600000 +0500 -@@ -348,7 +348,6 @@ - soup_server_get_async_context - soup_server_get_listener - soup_server_get_listeners --soup_server_get_gsocket - soup_server_get_port - soup_server_get_type - soup_server_get_uris diff --git a/mingw-w64-libgdata/0004-localedir-fix.patch b/mingw-w64-libsoup/0004-localedir-fix.patch similarity index 86% rename from mingw-w64-libgdata/0004-localedir-fix.patch rename to mingw-w64-libsoup/0004-localedir-fix.patch index efea498db9..516bacea95 100644 --- a/mingw-w64-libgdata/0004-localedir-fix.patch +++ b/mingw-w64-libsoup/0004-localedir-fix.patch @@ -1,5 +1,37 @@ ---- libgdata-0.15.2/m4/intltool.m4.orig 2014-08-15 23:20:04.371400000 +0400 -+++ libgdata-0.15.2/m4/intltool.m4 2014-08-15 23:21:28.549000000 +0400 +--- a/po/Makefile.in.in 2012-01-18 16:37:06 +0000 ++++ b/po/Makefile.in.in 2013-05-12 17:12:40 +0000 +@@ -33,8 +33,7 @@ + datadir = @datadir@ + datarootdir = @datarootdir@ + libdir = @libdir@ +-DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +107,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +141,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot +--- a/m4/intltool.m4 2012-02-20 14:50:33 +0000 ++++ b/m4/intltool.m4 2013-05-12 17:12:40 +0000 @@ -155,31 +155,6 @@ # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) @@ -32,35 +64,3 @@ IT_PO_SUBDIR([po]) ]) ---- libgdata-0.15.2/po/Makefile.in.in.orig 2014-08-15 23:15:13.750400000 +0400 -+++ libgdata-0.15.2/po/Makefile.in.in 2014-08-15 23:19:03.934000000 +0400 -@@ -33,8 +33,7 @@ - datadir = @datadir@ - datarootdir = @datarootdir@ - libdir = @libdir@ --DATADIRNAME = @DATADIRNAME@ --itlocaledir = $(prefix)/$(DATADIRNAME)/locale -+localedir = @localedir@ - subdir = po - install_sh = @install_sh@ - # Automake >= 1.8 provides @mkdir_p@. -@@ -108,7 +107,7 @@ - install-data-yes: all - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ -- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ -+ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $$dir; \ - if test -r $$lang.gmo; then \ - $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ -@@ -142,8 +141,8 @@ - uninstall: - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ -- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ -- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ -+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ -+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ - done - - check: all $(GETTEXT_PACKAGE).pot diff --git a/mingw-w64-libsoup/0006-change-pkg-config-invocations.mingw.patch b/mingw-w64-libsoup/0006-change-pkg-config-invocations.mingw.patch new file mode 100644 index 0000000000..807e6683cc --- /dev/null +++ b/mingw-w64-libsoup/0006-change-pkg-config-invocations.mingw.patch @@ -0,0 +1,17 @@ +--- libsoup-2.52.0/m4/vapigen.m4.orig 2015-01-14 14:51:42.117600000 +0300 ++++ libsoup-2.52.0/m4/vapigen.m4 2015-01-14 14:52:07.297000000 +0300 +@@ -85,11 +85,11 @@ + [yes], [ + VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen` + VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen +- VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` ++ VAPIDIR=`$PKG_CONFIG --dont-define-prefix --variable=vapidir vapigen` + AS_IF([ test "x$2" = "x"], [ +- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` ++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --dont-define-prefix --variable=vapidir $vapigen_pkg_name` + ], [ +- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` ++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --dont-define-prefix --variable=vapidir_versioned $vapigen_pkg_name` + ]) + ], + [no], [ diff --git a/mingw-w64-libsoup/0007-missing-prototype.patch b/mingw-w64-libsoup/0007-missing-prototype.patch new file mode 100644 index 0000000000..1f645a12fe --- /dev/null +++ b/mingw-w64-libsoup/0007-missing-prototype.patch @@ -0,0 +1,15 @@ +diff --git a/libsoup/soup-init.c b/libsoup/soup-init.c +index 92eb837..c4950ce 100644 +--- a/libsoup/soup-init.c ++++ b/libsoup/soup-init.c +@@ -38,6 +38,10 @@ soup_init (void) + + #if defined (G_OS_WIN32) + ++BOOL WINAPI DllMain (HINSTANCE hinstDLL, ++ DWORD fdwReason, ++ LPVOID lpvReserved); ++ + BOOL WINAPI + DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, diff --git a/mingw-w64-libsoup/PKGBUILD b/mingw-w64-libsoup/PKGBUILD index 5337314776..22eb35401f 100644 --- a/mingw-w64-libsoup/PKGBUILD +++ b/mingw-w64-libsoup/PKGBUILD @@ -1,52 +1,66 @@ # Maintainer: Alexey Pavlov _realname=libsoup +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.48.0 +pkgver=2.52.2 pkgrel=1 pkgdesc="HTTP client/server library (mingw-w64)" arch=(any) url="http://ftp.gnome.org/pub/GNOME/sources/libsoup" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "intltool") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala" + "intltool") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-glib-networking") + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-glib-networking" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-sqlite3") options=('staticlibs' 'strip') -source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz" - 0001-give-cc-to-gir-scanner.mingw.patch - 0002-fix-keyword-conflict.patch - 0003-fix-missing-symbol.patch) -md5sums=('51ccb76f5262945e1f0316fdc46de567' - 'a1ddc19ab3f73bbddda1d41a6a7de399' - '6b449ba6f360871f18577e6b3e90b8fe' - 'da12af3cca187a76f5493c120c4ed79f') +source=("http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz" + 0004-localedir-fix.patch + 0006-change-pkg-config-invocations.mingw.patch) +md5sums=('e4757d09012ed93822b1ee41435fec24' + 'ee2cc56c1448c32020288c817b81ff7f' + '412394f65ad3153aa9587b888acf2f96') prepare() { - cd "$srcdir/${_realname}-$pkgver" - patch -p1 -i ${srcdir}/0001-give-cc-to-gir-scanner.mingw.patch - patch -p1 -i ${srcdir}/0002-fix-keyword-conflict.patch - patch -p1 -i ${srcdir}/0003-fix-missing-symbol.patch + cd "${srcdir}/${_realname}-${pkgver}" + + patch -p1 -i ${srcdir}/0004-localedir-fix.patch + patch -p1 -i ${srcdir}/0006-change-pkg-config-invocations.mingw.patch + autoreconf -fi } build() { + #CPPFLAGS+=" --save-temps" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-$pkgver/configure \ + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --without-apache-httpd \ --without-apache-module-dir \ --with-gnome \ - --enable-introspection - make + --enable-vala \ + --enable-introspection \ + --disable-silent-rules + + make #-j1 V=1 } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-libspatialite/01-fix-pkgconfig.patch b/mingw-w64-libspatialite/01-fix-pkgconfig.patch index 4eeb354116..749e87c86f 100644 --- a/mingw-w64-libspatialite/01-fix-pkgconfig.patch +++ b/mingw-w64-libspatialite/01-fix-pkgconfig.patch @@ -1,10 +1,8 @@ --- a/spatialite.pc.in 2014-10-28 12:53:37.868503600 +0300 +++ b/spatialite.pc.in 2014-10-28 12:56:36.391156800 +0300 -@@ -8,5 +8,6 @@ - Name: spatialite +@@ -8,4 +8,5 @@ Description: Spatial SQL database engine based on SQLite Version: @VERSION@ --Libs: -L${libdir} -lspatialite -lsqlite3 -lm -lz -+Libs: -L${libdir} -lspatialite -lsqlite3 + Libs: -L${libdir} -lspatialite +Libs.private: -liconv -lz -lm Cflags: -I${includedir} diff --git a/mingw-w64-libspatialite/PKGBUILD b/mingw-w64-libspatialite/PKGBUILD index 4b2da0feb9..13f1989dc7 100644 --- a/mingw-w64-libspatialite/PKGBUILD +++ b/mingw-w64-libspatialite/PKGBUILD @@ -5,19 +5,24 @@ _realname=libspatialite pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.2.0 -pkgrel=3 +pkgver=4.3.0 +pkgrel=1 pkgdesc="SQLite extension to support spatial data types and operations (mingw-w64)" arch=('any') -url="http://www.gaia-gis.it/fossil/libspatialite" +url="https://www.gaia-gis.it/fossil/libspatialite/index" license=('MPL' 'GPL' 'LGPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "automake" "autoconf") -depends=("${MINGW_PACKAGE_PREFIX}-geos" "${MINGW_PACKAGE_PREFIX}-libfreexl" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-proj" "${MINGW_PACKAGE_PREFIX}-sqlite3" "${MINGW_PACKAGE_PREFIX}-libiconv") +depends=("${MINGW_PACKAGE_PREFIX}-geos" + "${MINGW_PACKAGE_PREFIX}-libfreexl" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-proj" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-libiconv") options=('strip') -source=("https://www.gaia-gis.it/gaia-sins/${_realname}-$pkgver.tar.gz" +source=("https://www.gaia-gis.it/gaia-sins/${_realname}-${pkgver}.tar.gz" "01-fix-pkgconfig.patch") -sha256sums=('9f138a6854740c7827fdee53845eb1485fce3e805a7aa9fc9151f8046ebd312d' - '8036b7b7645801611100d74d55674c6a4979a1af70721479c984c5e840914576') +sha256sums=('4acf2d2b891989e61351584fe28514a6561f8f6a1901b988990513be5fe1bdfe' + '50dace4542a2f378131be76c9dfe45fd78e7cf135f1339df8665b5f26c8ad6cc') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -36,6 +41,7 @@ build() { --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-libxml2 + make } diff --git a/mingw-w64-libspectre/PKGBUILD b/mingw-w64-libspectre/PKGBUILD index a9da693cc5..a299a92871 100644 --- a/mingw-w64-libspectre/PKGBUILD +++ b/mingw-w64-libspectre/PKGBUILD @@ -3,22 +3,22 @@ _realname=libspectre pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.2.7 -pkgrel=1 +pkgrel=2 arch=('any') -pkgdesc="libspectre is a small library for rendering PostScript documents. It provides a convenient easy to use API for handling and rendering PostScript documents. (mingw-w64)" +pkgdesc="libspectre is a small library for rendering PostScript documents. It provides a convenient easy to use API for handling and rendering PostScript documents (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-ghostscript" "${MINGW_PACKAGE_PREFIX}-cairo") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-pkg-config" "libtool" "automake-wrapper" "autoconf" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-libidn" "make") options=('strip' 'staticlibs') license=("GPL 2") url="http://libspectre.freedesktop.org/" -source=(http://libspectre.freedesktop.org/releases/${_realname}-$pkgver.tar.gz) +source=(http://libspectre.freedesktop.org/releases/${_realname}-${pkgver}.tar.gz) sha256sums=('e81b822a106beed14cf0fec70f1b890c690c2ffa150fa2eee41dc26518a6c3ec') prepare() { @@ -37,10 +37,11 @@ build() { --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libspiro/PKGBUILD b/mingw-w64-libspiro/PKGBUILD index 021a4abb9d..c7e6f59d7d 100644 --- a/mingw-w64-libspiro/PKGBUILD +++ b/mingw-w64-libspiro/PKGBUILD @@ -1,34 +1,46 @@ # Maintainer: Alexey Pavlov _realname=libspiro - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=20071029 -pkgrel=2 +_pkgver=0.5 +_pkgdate=20150702 +pkgver=${_pkgver}.${_pkgdate} +pkgrel=1 +epoch=1 pkgdesc="Simplifies the drawing of beautiful curves (mingw-w64)" arch=(any) url="http://libspiro.sourceforge.net/" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}_src-${pkgver}.tar.bz2") -md5sums=('ab6aaa50bbd8fa55e78f8b8b0112f6cd') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/fontforge/libspiro/archive/${pkgver}.tar.gz) +md5sums=('0ea5983578628807d07e61c6b0c7c889') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" + autoreconf -fiv } build() { - cd "${srcdir}/${_realname}-$pkgver" - ./configure \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + #cd "${srcdir}/${_realname}-${pkgver}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } package() { - cd "${srcdir}/${_realname}-$pkgver" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-libssh/PKGBUILD b/mingw-w64-libssh/PKGBUILD index 18658b1ebc..e18ac89332 100644 --- a/mingw-w64-libssh/PKGBUILD +++ b/mingw-w64-libssh/PKGBUILD @@ -1,59 +1,55 @@ # Maintainer: Alexey Pavlov _realname=libssh - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.6.3 -pkgrel=1 +pkgver=0.7.0 +pkgrel=2 pkgdesc="Library for accessing ssh client services through C libraries (mingw-w64)" arch=('any') url="http://www.libssh.org/" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-cmake") -depends=("${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-openssl") -groups=("${MINGW_PACKAGE_PREFIX}") +install=libssh-${CARCH}.install +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-cmake") +depends=("${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') -source=("https://red.libssh.org/attachments/download/87/${_realname}-0.6.3.tar.xz" - mingw-w64-pthreads.patch - mingw-w64-paths-as-unix.patch) -md5sums=('66cf16e77f60913b4d54f18c92cdbf71' - 'ca268e1366633f988e21cbcf5a4d8145' - '53fd88870e2ad09d2e69b34c839b1c8c') +validpgpkeys=('8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D') # Andreas Schneider +source=(https://red.libssh.org/attachments/download/140/${_realname}-${pkgver}.tar.xz + https://red.libssh.org/attachments/download/139/${_realname}-${pkgver}.tar.asc + mingw-as-unix.patch + mingw-DATADIR-conflict.patch + fix-threads-libraryname-in-config.patch) +md5sums=('cf20c3bb6edfc853187985c3f649ca80' + 'SKIP' + 'd819f18cb4ae07ad2a6589b02765b6c2' + '7be13e00d27ce77f862012ee0654019b' + '34899219c2804f81a2218ba13847122b') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/mingw-w64-pthreads.patch - #patch -p1 -i ${srcdir}/mingw-w64-paths-as-unix.patch + patch -p1 -i ${srcdir}/mingw-as-unix.patch + patch -p1 -i ${srcdir}/mingw-DATADIR-conflict.patch + patch -p1 -i ${srcdir}/fix-threads-libraryname-in-config.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ + -DWITH_STATIC_LIB=ON \ ../${_realname}-${pkgver} + make all } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install - - sed -e "s|-Iinclude|-I${MINGW_PREFIX}/include|g" \ - -e "s|-Llib|-L${MINGW_PREFIX}/lib|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libssh.pc \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libssh_threads.pc - rm -rf ${pkgdir}/${MINGW_PREFIX}/CMake + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libssh/fix-threads-libraryname-in-config.patch b/mingw-w64-libssh/fix-threads-libraryname-in-config.patch new file mode 100644 index 0000000000..1000a852f1 --- /dev/null +++ b/mingw-w64-libssh/fix-threads-libraryname-in-config.patch @@ -0,0 +1,11 @@ +--- libssh-0.6.4/CMakeLists.txt.orig 2014-12-25 14:25:19.999000000 +0300 ++++ libssh-0.6.4/CMakeLists.txt 2014-12-25 14:25:41.278000000 +0300 +@@ -98,7 +98,7 @@ + + # cmake config files + set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX}) +-set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX}) ++set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh_threads${CMAKE_SHARED_LIBRARY_SUFFIX}) + + configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY) + configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY) diff --git a/mingw-w64-libssh/libssh-i686.install b/mingw-w64-libssh/libssh-i686.install new file mode 100644 index 0000000000..99e9541da2 --- /dev/null +++ b/mingw-w64-libssh/libssh-i686.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/libssh/*.cmake; do + sed -e "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-libssh/libssh-x86_64.install b/mingw-w64-libssh/libssh-x86_64.install new file mode 100644 index 0000000000..ce178ef75f --- /dev/null +++ b/mingw-w64-libssh/libssh-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/libssh/*.cmake; do + sed -e "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-libssh/mingw-DATADIR-conflict.patch b/mingw-w64-libssh/mingw-DATADIR-conflict.patch new file mode 100644 index 0000000000..ee3ce8ef85 --- /dev/null +++ b/mingw-w64-libssh/mingw-DATADIR-conflict.patch @@ -0,0 +1,24 @@ +diff -Naur libssh-0.6.4-orig/config.h.cmake libssh-0.6.4/config.h.cmake +--- libssh-0.6.4-orig/config.h.cmake 2014-12-19 11:11:17.000000000 +0300 ++++ libssh-0.6.4/config.h.cmake 2014-12-25 14:10:49.834000000 +0300 +@@ -5,7 +5,7 @@ + #cmakedefine VERSION "${APPLICATION_VERSION}" + + #cmakedefine LOCALEDIR "${LOCALE_INSTALL_DIR}" +-#cmakedefine DATADIR "${DATADIR}" ++#cmakedefine DATA_DIR "${DATA_DIR}" + #cmakedefine LIBDIR "${LIBDIR}" + #cmakedefine PLUGINDIR "${PLUGINDIR}" + #cmakedefine SYSCONFDIR "${SYSCONFDIR}" +diff -Naur libssh-0.6.4-orig/ConfigureChecks.cmake libssh-0.6.4/ConfigureChecks.cmake +--- libssh-0.6.4-orig/ConfigureChecks.cmake 2014-12-19 11:11:17.000000000 +0300 ++++ libssh-0.6.4/ConfigureChecks.cmake 2014-12-25 14:11:05.297000000 +0300 +@@ -8,7 +8,7 @@ + + set(PACKAGE ${APPLICATION_NAME}) + set(VERSION ${APPLICATION_VERSION}) +-set(DATADIR ${DATA_INSTALL_DIR}) ++set(DATA_DIR ${DATA_INSTALL_DIR}) + set(LIBDIR ${LIB_INSTALL_DIR}) + set(PLUGINDIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}") + set(SYSCONFDIR ${SYSCONF_INSTALL_DIR}) diff --git a/mingw-w64-libssh/mingw-as-unix.patch b/mingw-w64-libssh/mingw-as-unix.patch new file mode 100644 index 0000000000..7996412280 --- /dev/null +++ b/mingw-w64-libssh/mingw-as-unix.patch @@ -0,0 +1,61 @@ +diff -Naur libssh-0.6.4-orig/cmake/Modules/DefineInstallationPaths.cmake libssh-0.6.4/cmake/Modules/DefineInstallationPaths.cmake +--- libssh-0.6.4-orig/cmake/Modules/DefineInstallationPaths.cmake 2014-09-15 22:54:34.000000000 +0400 ++++ libssh-0.6.4/cmake/Modules/DefineInstallationPaths.cmake 2014-12-25 12:45:52.735000000 +0300 +@@ -1,4 +1,4 @@ +-if (UNIX OR OS2) ++if (UNIX OR OS2 OR MINGW) + IF (NOT APPLICATION_NAME) + MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME") + SET(APPLICATION_NAME ${PROJECT_NAME}) +diff -Naur libssh-0.6.4-orig/CMakeLists.txt libssh-0.6.4/CMakeLists.txt +--- libssh-0.6.4-orig/CMakeLists.txt 2014-12-19 11:11:27.000000000 +0300 ++++ libssh-0.6.4/CMakeLists.txt 2014-12-25 12:41:43.298000000 +0300 +@@ -84,8 +84,8 @@ + add_subdirectory(src) + + # pkg-config file +-configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc) +-configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc) ++configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY) ++configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc @ONLY) + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc +diff -Naur libssh-0.6.4-orig/libssh.pc.cmake libssh-0.6.4/libssh.pc.cmake +--- libssh-0.6.4-orig/libssh.pc.cmake 2013-02-07 22:23:14.000000000 +0400 ++++ libssh-0.6.4/libssh.pc.cmake 2014-12-25 12:44:04.023000000 +0300 +@@ -1,6 +1,11 @@ +-Name: ${APPLICATION_NAME} ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix}/bin ++libdir=@LIB_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ ++ ++Name: @APPLICATION_NAME@ + Description: The SSH Library +-Version: ${APPLICATION_VERSION} +-Libs: -L${LIB_INSTALL_DIR} -lssh +-Cflags: -I${INCLUDE_INSTALL_DIR} ++Version: @APPLICATION_VERSION@ ++Libs: -L${libdir} -lssh ++Cflags: -I${includedir} + +diff -Naur libssh-0.6.4-orig/libssh_threads.pc.cmake libssh-0.6.4/libssh_threads.pc.cmake +--- libssh-0.6.4-orig/libssh_threads.pc.cmake 2014-09-15 22:54:34.000000000 +0400 ++++ libssh-0.6.4/libssh_threads.pc.cmake 2014-12-25 12:43:12.932000000 +0300 +@@ -1,6 +1,11 @@ +-Name: ${APPLICATION_NAME}_threads ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix}/bin ++libdir=@LIB_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ ++ ++Name: @APPLICATION_NAME@_threads + Description: The SSH Library Thread Extension +-Version: ${APPLICATION_VERSION} +-Libs: -L${LIB_INSTALL_DIR} -lssh_threads +-Cflags: -I${INCLUDE_INSTALL_DIR} ++Version: @APPLICATION_VERSION@ ++Libs: -L${libdir} -lssh_threads ++Cflags: -I${includedir} + diff --git a/mingw-w64-libssh/mingw-w64-paths-as-unix.patch b/mingw-w64-libssh/mingw-w64-paths-as-unix.patch deleted file mode 100644 index 299dc5e958..0000000000 --- a/mingw-w64-libssh/mingw-w64-paths-as-unix.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- libssh-0.6.3/cmake/Modules/DefineInstallationPaths.cmake.orig 2014-03-16 23:52:34.130000000 +0400 -+++ libssh-0.6.3/cmake/Modules/DefineInstallationPaths.cmake 2014-03-16 23:52:40.838000000 +0400 -@@ -1,4 +1,4 @@ --if (UNIX OR OS2) -+if (UNIX OR OS2 OR MINGW) - IF (NOT APPLICATION_NAME) - MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME") - SET(APPLICATION_NAME ${PROJECT_NAME}) diff --git a/mingw-w64-libssh/mingw-w64-pthreads.patch b/mingw-w64-libssh/mingw-w64-pthreads.patch deleted file mode 100644 index 36c60451b3..0000000000 --- a/mingw-w64-libssh/mingw-w64-pthreads.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libssh-0.6.3/src/threads/pthread.c.orig 2014-03-16 23:41:28.498600000 +0400 -+++ libssh-0.6.3/src/threads/pthread.c 2014-03-16 23:41:53.318200000 +0400 -@@ -75,7 +75,7 @@ - } - - static unsigned long ssh_pthread_thread_id (void){ --#if _WIN32 -+#if defined(_WIN32) && !defined(__MINGW32__) - return (unsigned long) pthread_self().p; - #else - return (unsigned long) pthread_self(); diff --git a/mingw-w64-libssh2/PKGBUILD b/mingw-w64-libssh2/PKGBUILD index 79605400a9..52f8e31074 100644 --- a/mingw-w64-libssh2/PKGBUILD +++ b/mingw-w64-libssh2/PKGBUILD @@ -1,34 +1,36 @@ # Maintainer: Alexey Pavlov _realname=libssh2 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.3 +pkgver=1.6.0 pkgrel=2 pkgdesc="A library implementing the SSH2 protocol as defined by Internet Drafts (mingw-w64)" arch=('any') url="http://www.libssh2.org" license=("BSD") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-zlib") -groups=("${MINGW_PACKAGE_PREFIX}") options=('staticlibs' 'strip') -source=("$url/download/${_realname}-$pkgver.tar.gz") -md5sums=('071004c60c5d6f90354ad1b701013a0b') +source=("$url/download/${_realname}-${pkgver}.tar.gz") +md5sums=('00aabd6e714a5f42a4fb82ace20db1dd') build() { - mkdir -p "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" + mkdir -p "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --with-openssl + make } package() { - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-libsystre/PKGBUILD b/mingw-w64-libsystre/PKGBUILD new file mode 100644 index 0000000000..e8fe227aae --- /dev/null +++ b/mingw-w64-libsystre/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Alexey Pavlov + +_realname=libsystre +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +provides="${MINGW_PACKAGE_PREFIX}-libgnurx" +conflicts="${MINGW_PACKAGE_PREFIX}-libgnurx" +replaces="${MINGW_PACKAGE_PREFIX}-libgnurx" +pkgver=1.0.1 +pkgrel=2 +pkgdesc="Wrapper library around TRE that provides POSIX API (mingw-w64)" +arch=('any') +url="" +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-libtre") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=(systre-${pkgver}.tar.xz) +sha1sums=('a1d5c6f6a06113bb2aa0e86603cec3d209650253') + +prepare() { + cd systre-${pkgver} + autoreconf -fiv +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../systre-${pkgver}/configure\ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install + install -D -m644 ${srcdir}/systre-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-libsystre/systre-1.0.1.tar.xz b/mingw-w64-libsystre/systre-1.0.1.tar.xz new file mode 100644 index 0000000000..37ea4f96fe Binary files /dev/null and b/mingw-w64-libsystre/systre-1.0.1.tar.xz differ diff --git a/mingw-w64-libtasn1/PKGBUILD b/mingw-w64-libtasn1/PKGBUILD index aa603f66cf..e2984fc065 100644 --- a/mingw-w64-libtasn1/PKGBUILD +++ b/mingw-w64-libtasn1/PKGBUILD @@ -1,18 +1,19 @@ # Maintainer: Alexey Pavlov _realname=libtasn1 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.2 +pkgver=4.7 pkgrel=1 -pkgdesc="Implementation of the Stringprep, Punycode and IDNA specifications (mingw-w64)" +pkgdesc="A library for Abstract Syntax Notation One (ASN.1) and Distinguish Encoding Rules (DER) manipulation (mingw-w64)" arch=('any') -url="http://www.gnu.org/software/libidn" +url="http://www.gnu.org/software/libtasn1/" license=("GPL3, LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-libwinpthread") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') source=("http://ftp.gnu.org/gnu/libtasn1/${_realname}-${pkgver}.tar.gz"{,.sig}) -md5sums=('414df906df421dee0a5cf7548788d153' +md5sums=('12d10ca4ae0a3b95f7aa06a076da39ec' 'SKIP') prepare() { @@ -20,17 +21,24 @@ prepare() { } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX}\ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING.LIB "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.LIB" } diff --git a/mingw-w64-libtheora/001-example.patch b/mingw-w64-libtheora/001-example.patch new file mode 100644 index 0000000000..49bec25a04 --- /dev/null +++ b/mingw-w64-libtheora/001-example.patch @@ -0,0 +1,24 @@ +--- libtheora-1.1.1/examples/encoder_example.c.orig 2015-01-19 20:00:34.333600000 +0300 ++++ libtheora-1.1.1/examples/encoder_example.c 2015-01-19 20:02:00.570400000 +0300 +@@ -47,11 +47,12 @@ + #include "vorbis/codec.h" + #include "vorbis/vorbisenc.h" + +-#ifdef _WIN32 ++#if defined(_WIN32) + /*supply missing headers and functions to Win32. going to hell, I know*/ + #include + #include + ++#if !defined(__MINGW64_VERSION_MAJOR) + static double rint(double x) + { + if (x < 0.0) +@@ -60,6 +61,7 @@ + return (double)(int)(x + 0.5); + } + #endif ++#endif + + const char *optstring = "b:e:o:a:A:v:V:s:S:f:F:ck:d:z:\1\2\3\4"; + struct option options [] = { diff --git a/mingw-w64-libtheora/PKGBUILD b/mingw-w64-libtheora/PKGBUILD index 52e29de622..dec806cc33 100644 --- a/mingw-w64-libtheora/PKGBUILD +++ b/mingw-w64-libtheora/PKGBUILD @@ -1,42 +1,46 @@ # Maintainer: Alexey Pavlov _realname=libtheora - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.1.1 -pkgrel=1 +pkgrel=3 pkgdesc="An open video codec developed by the Xiph.org (mingw-w64)" arch=('any') url="http://xiph.org" license=('BSD') -depends=("${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libogg" "${MINGW_PACKAGE_PREFIX}-libvorbis" "${MINGW_PACKAGE_PREFIX}-SDL" "${MINGW_PACKAGE_PREFIX}-libpng") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libogg" + "${MINGW_PACKAGE_PREFIX}-libvorbis") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-SDL") source=("http://downloads.xiph.org/releases/theora/${_realname}-${pkgver}.tar.bz2" - libtheora-1.1.1-libpng16.patch) + libtheora-1.1.1-libpng16.patch + 001-example.patch) md5sums=('292ab65cedd5021d6b7ddd117e07cd8e' - '08edd81c7a1be2c4edfd2cd3c112a8c6') + '08edd81c7a1be2c4edfd2cd3c112a8c6' + '79cb71a82524a9b574ad403c65d9f06d') prepare() { cd ${srcdir}/${_realname}-${pkgver} sed -i "s,EXPORTS,," "win32/xmingw32/libtheoradec-all.def" sed -i "s,EXPORTS,," "win32/xmingw32/libtheoraenc-all.def" patch -p0 -i ${srcdir}/libtheora-1.1.1-libpng16.patch + patch -p1 -i ${srcdir}/001-example.patch } build() { - mkdir -p $srcdir/build-$MINGW_CHOST - cd "$srcdir/build-$MINGW_CHOST" - ../$_realname-$pkgver/configure \ + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-$MINGW_CHOST + cd "${srcdir}/build-$MINGW_CHOST" + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} - make -j1 + make } package() { - cd "$srcdir/build-$MINGW_CHOST" + cd "${srcdir}/build-$MINGW_CHOST" make install DESTDIR="${pkgdir}" - #rm -r "${pkgdir}${MINGW_PREFIX}/share" } diff --git a/mingw-w64-libtiff/PKGBUILD b/mingw-w64-libtiff/PKGBUILD index 23821ce50f..20f70a06dd 100644 --- a/mingw-w64-libtiff/PKGBUILD +++ b/mingw-w64-libtiff/PKGBUILD @@ -1,29 +1,36 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=libtiff +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.0.3 -pkgrel=3 +pkgver=4.0.6 +pkgrel=1 pkgdesc="Library for manipulation of TIFF images (mingw-w64)" arch=('any') url="http://www.remotesensing.org/libtiff" -license=("custom") +license=(MIT) depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-jbigkit" + #"${MINGW_PACKAGE_PREFIX}-jbigkit" "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" "${MINGW_PACKAGE_PREFIX}-xz" "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') source=("ftp://ftp.remotesensing.org/pub/libtiff/tiff-${pkgver}.tar.gz") -md5sums=('051c1068e6a0627f461948c365290410') +md5sums=('d1d2e940dea0b5ad435f21f03d96dd72') + +prepare() { + cd tiff-${pkgver} +} build() { - cd "${srcdir}/tiff-${pkgver}" export CFLAGS+=" -fno-strict-aliasing" export CXXFLAGS+=" -fno-strict-aliasing" - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../tiff-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -31,20 +38,25 @@ build() { --target=${MINGW_CHOST} \ --enable-static \ --enable-shared \ + --disable-jbig \ --without-x + make } check() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install - #rm -rf "${pkgdir}${MINGW_PREFIX}/share" cp ${srcdir}/tiff-${pkgver}/libtiff/{tiffiop,tif_dir}.h ${pkgdir}${MINGW_PREFIX}/include/ cp libtiff/tif_config.h ${pkgdir}${MINGW_PREFIX}/include/ + + # License + # See https://fedoraproject.org/wiki/Licensing:MIT#Hylafax_Variant + install -Dm644 ${srcdir}/tiff-${pkgver}/COPYRIGHT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYRIGHT" } diff --git a/mingw-w64-libtommath/002-libtommath-0.42.0-makefile.patch b/mingw-w64-libtommath/002-libtommath-0.42.0-makefile.patch new file mode 100644 index 0000000000..97f9d6ddff --- /dev/null +++ b/mingw-w64-libtommath/002-libtommath-0.42.0-makefile.patch @@ -0,0 +1,47 @@ +--- a/makefile.shared 2010-07-23 22:27:20.000000000 +0800 ++++ b/makefile.shared 2014-08-11 20:25:06.482017927 +0800 +@@ -1,9 +1,9 @@ + #Makefile for GCC + # + #Tom St Denis +-VERSION=0:41 ++VERSION=0:42 + +-CC = libtool --mode=compile --tag=CC gcc ++LTCOMPILE = libtool --mode=compile --tag=CC $(CC) + + CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare + +@@ -82,21 +82,24 @@ + + objs: $(OBJECTS) + ++.c.o: ++ $(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $< ++ + $(LIBNAME): $(OBJECTS) +- libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) ++ libtool --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) -no-undefined + + install: $(LIBNAME) +- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) ++ install -d $(DESTDIR)$(LIBPATH) + libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) +- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) +- install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) ++ install -d $(DESTDIR)$(INCPATH) ++ install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH) + + test: $(LIBNAME) demo/demo.o +- gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o +- libtool --mode=link gcc -o test demo/demo.o $(LIBNAME_S) ++ $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o ++ libtool --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S) + + mtest: test +- cd mtest ; gcc $(CFLAGS) mtest.c -o mtest ++ cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest + + timing: $(LIBNAME) +- gcc $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest ++ libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest diff --git a/mingw-w64-libtommath/PKGBUILD b/mingw-w64-libtommath/PKGBUILD new file mode 100644 index 0000000000..cd962684d7 --- /dev/null +++ b/mingw-w64-libtommath/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Alexey Pavlov + +_realname=libtommath +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.42.0 +pkgrel=2 +pkgdesc="Highly optimized and portable routines for integer based number theoretic applications (mingw-w64)" +url="http://www.libtom.org/" +arch=('any') +license=("custom") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=('staticlibs' 'strip') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/libtom/libtommath/archive/v${pkgver}.tar.gz + 002-libtommath-0.42.0-makefile.patch) +md5sums=('6e2a82a6073388e4d14d30e8eb0d4fe3' + '0bf4d7eaf45e67dfc38c25e39510111a') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -Np1 -i ${srcdir}/002-libtommath-0.42.0-makefile.patch +} + +build() { + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + CFLAGS+=" -I${srcdir}/build-${MINGW_CHOST}" + CC="${MINGW_PREFIX}/bin/gcc" \ + make -f makefile.shared IGNORE_SPEED=1 +} + +check() { + cd ${srcdir}/build-${MINGW_CHOST} + + CC=${MINGW_PREFIX}/bin/gcc \ + make -f makefile.shared mtest +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + + CC="${MINGW_PREFIX}/bin/gcc" \ + make -f makefile.shared \ + DESTDIR=${pkgdir} \ + INSTALL_GROUP=root \ + LIBPATH=${MINGW_PREFIX}/lib \ + INCPATH=${MINGW_PREFIX}/include \ + DATAPATH=${MINGW_PREFIX}/share/doc/libtommath/pdf \ + install + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + chmod 644 ${pkgdir}${MINGW_PREFIX}/lib/libtommath{.dll,}.a +} diff --git a/mingw-w64-libtool/0008-tests.patch b/mingw-w64-libtool/0008-tests.patch new file mode 100644 index 0000000000..a07b682fdb --- /dev/null +++ b/mingw-w64-libtool/0008-tests.patch @@ -0,0 +1,132 @@ +diff -Naur libtool-2.4.6-old/tests/demo.at libtool-2.4.6/tests/demo.at +--- libtool-2.4.6-old/tests/demo.at 2015-01-17 03:52:04.000000000 +0900 ++++ libtool-2.4.6/tests/demo.at 2015-07-14 13:39:52.802179800 +0900 +@@ -271,6 +271,13 @@ + + #define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols + ++#if defined(__MINGW64__) && defined(__x86_64__) && \ ++ !defined(LT_MINGW_STATIC_TESTSUITE_HACK) ++#define NOTHING "__nm_nothing" ++#else ++#define NOTHING "nothing" ++#endif ++ + typedef struct + { + const char *name; +@@ -301,7 +308,7 @@ + phello = (int(*)())s->address; + else if (STREQ ("foo", name)) + pfoo = (int(*)())s->address; +- else if (STREQ ("nothing", name)) ++ else if (STREQ (NOTHING, name)) + #ifndef _WIN32 + /* In an ideal world we could do this... */ + pnothing = (int*)s->address; +diff -Naur libtool-2.4.6-old/m4/ltoptions.m4 libtool-2.4.6/m4/ltoptions.m4 +--- libtool-2.4.6-old/m4/ltoptions.m4 2015-01-17 03:52:04.000000000 +0900 ++++ libtool-2.4.6/m4/ltoptions.m4 2015-07-14 12:57:21.299381300 +0900 +@@ -170,7 +170,11 @@ + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; +- no) enable_shared=no ;; ++ no) ++ enable_shared=no ++ AC_DEFINE([LT_MINGW_STATIC_TESTSUITE_HACK], [1], ++ [Define if running the test suite so that test #27 works on MinGW.]) ++ ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. +diff -Naur libtool-2.4.6-old/tests/testsuite.at libtool-2.4.6/tests/testsuite.at +--- libtool-2.4.6-old/tests/testsuite.at 2015-01-21 00:24:15.000000000 +0900 ++++ libtool-2.4.6/tests/testsuite.at 2015-07-14 16:35:02.495236200 +0900 +@@ -320,6 +320,8 @@ + # to unify different possible exit status values. + m4_define([LT_AT_EXEC_CHECK], + [lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi ++m4_ifval([$3], [m4_if([$3], [ignore], [], [LT_AT_UNIFY_NL([$3])])]) ++m4_ifval([$4], [m4_if([$4], [ignore], [], [LT_AT_UNIFY_NL([$4])])]) + AT_CHECK([if "$lt_exe" $5; then :; else lt_status=$?; ]dnl + [ m4_ifval([$2], [test "$lt_status" != $2 && ])]dnl + [ test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl +@@ -339,6 +341,8 @@ + # to unify different possible exit status values. + m4_define([LT_AT_NOINST_EXEC_CHECK], + [lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi ++m4_ifval([$4], [m4_if([$4], [ignore], [], [LT_AT_UNIFY_NL([$4])])]) ++m4_ifval([$5], [m4_if([$5], [ignore], [], [LT_AT_UNIFY_NL([$5])])]) + AT_CHECK([if $LIBTOOL --mode=execute $2 "$lt_exe" $6; then :; else lt_status=$?; ]dnl + [ m4_ifval([$3], [test "$lt_status" != $3 && ])]dnl + [ test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl +diff -Naur libtool-2.4.6-old/build-aux/ltmain.in libtool-2.4.6/build-aux/ltmain.in +--- libtool-2.4.6-old/build-aux/ltmain.in 2015-02-06 21:57:56.000000000 +0900 ++++ libtool-2.4.6/build-aux/ltmain.in 2015-07-18 05:47:02.820124000 +0900 +@@ -3054,7 +3054,7 @@ + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in +- *MS\ Windows\ PE\ Intel*) ++ *PE32*Intel\ 80386,\ for\ MS\ Windows*) + win32_libid_type="x86 DLL" + ;; + esac +diff -Naur libtool-2.4.6-old/tests/mdemo.at libtool-2.4.6/tests/mdemo.at +--- libtool-2.4.6-old/tests/mdemo.at 2015-01-17 03:52:04.000000000 +0900 ++++ libtool-2.4.6/tests/mdemo.at 2015-07-19 05:21:53.373111100 +0900 +@@ -342,6 +342,10 @@ + [[#include + #include + #include ++/* XXX needed for i386 crash-at-exit workaround on mingw-w64 */ ++#ifdef __MINGW32__ ++#include ++#endif + + #include "foo.h" + #include "ltdl.h" +@@ -573,6 +577,12 @@ + } + + lt_dlexit(); ++ /* XXX this test crashes at exit, but only on i386; should figure out why */ ++#ifdef __MINGW32__ ++ fflush(stdout); ++ fflush(stderr); ++ _exit(ret); ++#endif + return ret; + } + ]]) +diff -Naur libtool-2.4.6-old/tests/darwin.at libtool-2.4.6/tests/darwin.at +--- libtool-2.4.6-old/tests/darwin.at 2015-07-19 06:01:21.670510000 +0900 ++++ libtool-2.4.6/tests/darwin.at 2015-07-19 06:10:41.764128900 +0900 +@@ -101,7 +101,10 @@ + + + AT_SETUP([darwin concurrent library extraction]) +- ++AT_CHECK([case $host_os in ++darwin*) ;; ++*) exit 77 ;; ++esac]) + AT_DATA([foo.c], [[ + int foo (void) { return 0; } + ]]) +diff -Naur libtool-2.4.6-old/tests/cmdline_wrap.at libtool-2.4.6/tests/cmdline_wrap.at +--- libtool-2.4.6-old/tests/cmdline_wrap.at 2015-01-17 03:52:04.000000000 +0900 ++++ libtool-2.4.6/tests/cmdline_wrap.at 2015-07-19 08:01:45.110423400 +0900 +@@ -27,6 +27,11 @@ + + AT_SETUP([Run tests with low max_cmd_len]) + AT_KEYWORDS([recursive expensive]) ++dnl XXX some of the tests run by this test fail on mingw-w64; how to fix? ++AT_CHECK([case $host_os in ++mingw*) exit 77 ;; ++*) ;; ++esac]) + dnl If we already have failures, then reruns will fail too! + fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do test -f "$f" && echo "$f"; done` + echo "DEBUG: fail_list='$fail_list'" diff --git a/mingw-w64-libtool/PKGBUILD b/mingw-w64-libtool/PKGBUILD index 40bbe74290..274caae421 100644 --- a/mingw-w64-libtool/PKGBUILD +++ b/mingw-w64-libtool/PKGBUILD @@ -1,43 +1,47 @@ # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=libtool pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.4.3 -pkgrel=1 +pkgver=2.4.6 +pkgrel=3 pkgdesc="A system independent dlopen wrapper for GNU libtool (mingw-w64)" arch=('any') url="http://www.gnu.org/software/libtool" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -groups=("${MINGW_PACKAGE_PREFIX}") options=('staticlibs' 'strip') -source=("http://ftp.gnu.org/pub/gnu/libtool/libtool-${pkgver}.tar.xz"{,.sig} - #ftp://alpha.gnu.org/gnu/libtool/libtool-${pkgver}.tar.xz{,.sig} +source=("http://ftp.gnu.org/pub/gnu/libtool/${_realname}-${pkgver}.tar.xz"{,.sig} + #ftp://alpha.gnu.org/gnu/libtool/${_realname}-${pkgver}.tar.xz{,.sig} 0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch 0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch 0005-Fix-seems-to-be-moved.patch 0006-Fix-strict-ansi-vs-posix.patch - 0007-fix-cr-for-awk-in-configure.all.patch) -md5sums=('b5699a6d58f5594cdb0992c5e1f5e57e' + 0007-fix-cr-for-awk-in-configure.all.patch + 0008-tests.patch) +md5sums=('1bfb9b923f2c1339b4d2ce1807064aa5' 'SKIP' '091163f2cc8c2dd8c8d5574181eb53e1' '2396f4f169edb316d8d076897ff03347' 'bb4e559afa91865c0f9e489e19507922' 'cfc5378b9d8ac56800489841b8b90101' - '2200a7e2cfa8f5f3f9811f03ed41c46a') + '2200a7e2cfa8f5f3f9811f03ed41c46a' + '06762c5fdd0f3b57eec2cc02dafdbb68') prepare() { - cd ${srcdir}/libtool-${pkgver} + cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch patch -p1 -i ${srcdir}/0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch patch -p1 -i ${srcdir}/0005-Fix-seems-to-be-moved.patch patch -p1 -i ${srcdir}/0006-Fix-strict-ansi-vs-posix.patch patch -p1 -i ${srcdir}/0007-fix-cr-for-awk-in-configure.all.patch + patch -p1 -i ${srcdir}/0008-tests.patch } build() { - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - ../libtool-${pkgver}/configure \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -45,8 +49,16 @@ build() { make } -package() { - cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install -} +#check() { +# cd ${srcdir}/build-${MINGW_CHOST} +# make check +#} +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + # Because libtool will have queried native compilers, + # it'll contain native paths, so sed them back again. + local MINGW_PREFIX_W=$(cygpath -m "${MINGW_PREFIX}") + sed -i "s#${MINGW_PREFIX_W}#${MINGW_PREFIX}#g" "${pkgdir}${MINGW_PREFIX}"/bin/libtool +} diff --git a/mingw-w64-libtorrent-rasterbar/PKGBUILD b/mingw-w64-libtorrent-rasterbar/PKGBUILD index baebd976b8..c109925ff6 100644 --- a/mingw-w64-libtorrent-rasterbar/PKGBUILD +++ b/mingw-w64-libtorrent-rasterbar/PKGBUILD @@ -1,55 +1,69 @@ # Maintainer: Alexey Pavlov # Contributor: AlexWMF +# Contributor: Zach Bacon <11doctorwhocanada@gmail.com> _realname=libtorrent-rasterbar +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.16.17 +pkgver=1.0.7 pkgrel=1 -pkgdesc="libtorrent is a feature complete C++ bittorrent implementation focusing on efficiency and scalability." +pkgdesc="libtorrent is a feature complete C++ bittorrent implementation focusing on efficiency and scalability (mingw-w64)" arch=('any') license=('BSD') url="http://www.rasterbar.com/products/libtorrent" depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-openssl") - makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-pkg-config") + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-pkg-config") options=(staticlibs strip) - -source=("http://downloads.sourceforge.net/sourceforge/libtorrent/${_realname}-${pkgver}.tar.gz" +source=("https://github.com/arvidn/libtorrent/releases/download/libtorrent-${pkgver//./_}/${_realname}-${pkgver}.tar.gz" cmake_pkg_config.patch) -md5sums=('34f01b9f755d1822cb761f8d8eb07bb8' - '49a025de76b8f525de6a2d2c58d53b43') +md5sums=('c1a5b8aee18640cbe01826403525dd14' + '6e57f2a497401c7ec77fcefeb27fec5b') prepare() { - cd "$srcdir/$_realname-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p0 -i ${srcdir}/cmake_pkg_config.patch } build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -Dbuild_tests=False \ -Dbuild_examples=False \ - ${srcdir}/${_realname}-${pkgver} + ../${_realname}-${pkgver} + + make + + [[ -d "${srcdir}/build-${MINGW_CHOST}-static" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}-static" + mkdir ${srcdir}/build-${MINGW_CHOST}-static + cd ${srcdir}/build-${MINGW_CHOST}-static + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -Dbuild_tests=False \ + -Dbuild_examples=False \ + -Dshared=OFF \ + ../${_realname}-${pkgver} make } -package() { - cd $srcdir/build-${MINGW_CHOST} - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libtorrent-rasterbar.pc +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + cd ${srcdir}/build-${MINGW_CHOST}-static + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libtorrent-rasterbar/cmake_pkg_config.patch b/mingw-w64-libtorrent-rasterbar/cmake_pkg_config.patch index 0909779c35..0ea2af09a8 100644 --- a/mingw-w64-libtorrent-rasterbar/cmake_pkg_config.patch +++ b/mingw-w64-libtorrent-rasterbar/cmake_pkg_config.patch @@ -1,22 +1,10 @@ --- CMakeLists.txt.orig 2014-07-10 23:30:19.099760500 +0300 +++ CMakeLists.txt 2014-07-11 16:38:53.144106400 +0300 -@@ -255,9 +255,9 @@ - set (COMPILETIME_OPTIONS "${COMPILETIME_OPTIONS} -D${s}") - endforeach (s) - --if (MSVC) -+if (MSVC OR MINGW) - configure_file(libtorrent-rasterbar-cmake.pc.in libtorrent-rasterbar.pc) --endif (MSVC) -+endif (MSVC OR MINGW) - - string (COMPARE EQUAL "${CMAKE_SIZEOF_VOID_P}" "8" IS64BITS) - -@@ -267,7 +267,7 @@ +@@ -327,7 +327,7 @@ set (LIBDIR "lib") - endif (IS64BITS AND RESPECTLIB64) + endif() --install(TARGETS torrent-rasterbar DESTINATION ${LIBDIR} CONFIGURATIONS release) +-install(TARGETS torrent-rasterbar DESTINATION ${LIBDIR}) +install(TARGETS torrent-rasterbar RUNTIME DESTINATION bin LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR} CONFIGURATIONS release) install(DIRECTORY include/libtorrent DESTINATION include diff --git a/mingw-w64-libtre-git/001-autotools.patch b/mingw-w64-libtre-git/001-autotools.patch new file mode 100644 index 0000000000..9d1d4709c8 --- /dev/null +++ b/mingw-w64-libtre-git/001-autotools.patch @@ -0,0 +1,59 @@ +diff -Naur libtre-orig/configure.ac libtre/configure.ac +--- libtre-orig/configure.ac 2015-01-13 21:37:45.236000000 +0300 ++++ libtre/configure.ac 2015-01-13 22:03:05.152200000 +0300 +@@ -2,10 +2,11 @@ + AC_INIT(TRE, 0.8.0, [tre-general@lists.laurikari.net]) + AC_CONFIG_SRCDIR([lib/regcomp.c]) + AC_CONFIG_AUX_DIR(utils) ++AC_CONFIG_MACRO_DIRS([m4]) + AC_CANONICAL_TARGET +-AM_INIT_AUTOMAKE(1.9.0) +-AC_PREREQ(2.59) +-AM_GNU_GETTEXT_VERSION(0.17) ++AM_INIT_AUTOMAKE([subdir-objects]) ++AC_PREREQ(2.69) ++AM_GNU_GETTEXT_VERSION(0.18) + + dnl Checks for programs. + AC_PROG_CC +@@ -433,16 +433,6 @@ + [ $tre_includes ]) + fi + fi +- +-case $host in +- *-mingw*) +- dnl wcsrtombs and wcstombs don't seem to work at all on MinGW. +- if test "$tre_libutf8" != "yes"; then +- tre_wchar_reason="Not supported on MinGW" +- tre_wchar="no ($tre_wchar_reason)" +- fi +- ;; +-esac + + # Fail if wide character support was specifically requested but is + # not supported on this system. +diff -Naur libtre-orig/src/Makefile.am libtre/src/Makefile.am +--- libtre-orig/src/Makefile.am 2015-01-13 21:37:45.267200000 +0300 ++++ libtre/src/Makefile.am 2015-01-13 21:54:03.773400000 +0300 +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + + localedir = $(datadir)/locale +-INCLUDES = -I$(top_srcdir)/lib ++AM_CPPFLAGS = -I$(top_srcdir)/lib + + if TRE_AGREP + bin_PROGRAMS = agrep +diff -Naur libtre-orig/tests/Makefile.am libtre/tests/Makefile.am +--- libtre-orig/tests/Makefile.am 2015-01-13 21:37:45.267200000 +0300 ++++ libtre/tests/Makefile.am 2015-01-13 21:52:35.508600000 +0300 +@@ -59,7 +59,7 @@ + randtest_LDADD = libxtre.la $(LDADD) + endif !TRE_DEBUG + +-INCLUDES = -I$(top_srcdir)/lib ++AM_CPPFLAGS = -I$(top_srcdir)/lib + + EXTRA_DIST = build-tests.sh + diff --git a/mingw-w64-libtre-git/002-pointer-cast.patch b/mingw-w64-libtre-git/002-pointer-cast.patch new file mode 100644 index 0000000000..4df924ce8b --- /dev/null +++ b/mingw-w64-libtre-git/002-pointer-cast.patch @@ -0,0 +1,13 @@ +--- libtre/lib/tre-internal.h.orig 2015-01-13 23:45:59.325000000 +0300 ++++ libtre/lib/tre-internal.h 2015-01-14 00:12:06.954200000 +0300 +@@ -127,8 +127,8 @@ + /* Returns number of bytes to add to (char *)ptr to make it + properly aligned for the type. */ + #define ALIGN(ptr, type) \ +- ((((long)ptr) % sizeof(type)) \ +- ? (sizeof(type) - (((long)ptr) % sizeof(type))) \ ++ ((((intptr_t)ptr) % sizeof(type)) \ ++ ? (sizeof(type) - (((intptr_t)ptr) % sizeof(type))) \ + : 0) + + #undef MAX diff --git a/mingw-w64-libtre-git/PKGBUILD b/mingw-w64-libtre-git/PKGBUILD new file mode 100644 index 0000000000..b34a401d91 --- /dev/null +++ b/mingw-w64-libtre-git/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Alexey Pavlov +# Contributor: Renato Silva + +_realname=libtre +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=r122.c2f5d13 +pkgrel=4 +pkgdesc="The approximate regex matching library and agrep command line tool (mingw-w64)" +url="https://github.com/laurikari/tre" +arch=('any') +license=('BSD') +options=(strip staticlibs) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext") +source=("${_realname}"::"git+https://github.com/laurikari/tre.git" + 001-autotools.patch + 002-pointer-cast.patch) +md5sums=('SKIP' + '2446ff21ecf7aed969d6cbfdf85f3b74' + 'eb7c4c23c61b59bdb9a2257e13244110') + +pkgver() { + cd "$srcdir/$_realname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${_realname}" + patch -p1 -i ${srcdir}/001-autotools.patch + patch -p1 -i ${srcdir}/002-pointer-cast.patch + mv ChangeLog{.old,} + autoreconf -fiv +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --enable-shared \ + --enable-static \ + --without-libintl-prefix + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + install -Dm644 "${srcdir}/${_realname}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-libunistring/PKGBUILD b/mingw-w64-libunistring/PKGBUILD index 7beabae532..92f1ff2564 100644 --- a/mingw-w64-libunistring/PKGBUILD +++ b/mingw-w64-libunistring/PKGBUILD @@ -2,32 +2,35 @@ _realname=libunistring pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.9.4 +pkgver=0.9.6 pkgrel=1 pkgdesc="Library for manipulating Unicode strings and C strings. (mingw-w64)" arch=('any') url="http://www.gnu.org/software/libunistring" -license=("GPL") +license=("GPL3") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-libiconv") options=('staticlibs' 'strip') -source=("ftp://ftp.gnu.org/gnu/libunistring/libunistring-${pkgver}.tar.gz") -md5sums=('c24a6a3838d9ad4a41a62549312c4226') +source=("ftp://ftp.gnu.org/gnu/libunistring/${_realname}-${pkgver}.tar.gz") +md5sums=('dfae4ff5583649ed24d8f368f1d0543b') build() { - export lt_cv_deplibs_check_method='pass_all' - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/libunistring-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --enable-threads=win32 + #export lt_cv_deplibs_check_method='pass_all' + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../libunistring-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-threads=win32 - make + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-libunwind-svn/0001-libunwind-add-support-for-mingw-w64.patch b/mingw-w64-libunwind-svn/0001-libunwind-add-support-for-mingw-w64.patch new file mode 100644 index 0000000000..9a9a73e7eb --- /dev/null +++ b/mingw-w64-libunwind-svn/0001-libunwind-add-support-for-mingw-w64.patch @@ -0,0 +1,126 @@ +From 81b5dabfed88d2976faf587598361c054630ef95 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Tue, 21 Jul 2015 04:35:55 +0100 +Subject: [PATCH] libunwind add support for mingw-w64 + + +diff --git a/include/unwind.h b/include/unwind.h +index 31fb871..e8c63d7 100644 +--- a/include/unwind.h ++++ b/include/unwind.h +@@ -121,7 +121,7 @@ struct _Unwind_Exception { + _Unwind_Exception *exc); + uintptr_t private_1; // non-zero means forced unwind + uintptr_t private_2; // holds sp that phase1 found for phase2 to use +-#ifndef __LP64__ ++#if !defined(__LP64__) && !defined(_WIN64) + // The gcc implementation of _Unwind_Exception used attribute mode on the + // above fields which had the side effect of causing this whole struct to + // round up to 32 bytes in size. To be more explicit, we add pad fields +diff --git a/src/AddressSpace.hpp b/src/AddressSpace.hpp +index 567cbda..fd0b233 100644 +--- a/src/AddressSpace.hpp ++++ b/src/AddressSpace.hpp +@@ -18,7 +18,7 @@ + #include + #include + +-#ifndef _LIBUNWIND_IS_BAREMETAL ++#if !defined(_LIBUNWIND_IS_BAREMETAL) && !defined(_WIN32) + #include + #endif + +@@ -104,7 +104,7 @@ struct UnwindInfoSections { + /// making local unwinds fast. + class __attribute__((visibility("hidden"))) LocalAddressSpace { + public: +-#ifdef __LP64__ ++#if defined(__LP64__) || defined(_WIN64) + typedef uint64_t pint_t; + typedef int64_t sint_t; + #else +@@ -156,7 +156,7 @@ public: + }; + + inline uintptr_t LocalAddressSpace::getP(pint_t addr) { +-#ifdef __LP64__ ++#if defined(__LP64__) || defined(_WIN64) + return get64(addr); + #else + return get32(addr); +@@ -434,6 +434,7 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, + }, + &cb_data); + return static_cast(found); ++#elif defined(_WIN32) + #else + #error "_LIBUNWIND_SUPPORT_DWARF_UNWIND requires _LIBUNWIND_SUPPORT_DWARF_INDEX on this platform." + #endif +@@ -457,7 +458,9 @@ inline bool LocalAddressSpace::findOtherFDE(pint_t targetAddr, pint_t &fde) { + inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf, + size_t bufLen, + unw_word_t *offset) { +-#ifndef _LIBUNWIND_IS_BAREMETAL ++#ifdef _WIN32 ++// FIXME: support DLLs on Windows. ++#elif !defined(_LIBUNWIND_IS_BAREMETAL) + Dl_info dyldInfo; + if (dladdr((void *)addr, &dyldInfo)) { + if (dyldInfo.dli_sname != NULL) { +diff --git a/src/UnwindLevel1-gcc-ext.c b/src/UnwindLevel1-gcc-ext.c +index 28ba092..0decf77 100644 +--- a/src/UnwindLevel1-gcc-ext.c ++++ b/src/UnwindLevel1-gcc-ext.c +@@ -29,7 +29,7 @@ + _LIBUNWIND_EXPORT _Unwind_Reason_Code + _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) { + #if _LIBUNWIND_ARM_EHABI +- _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld\n", ++ _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%" PRIdPTR "\n", + (void *)exception_object, + (long)exception_object->unwinder_cache.reserved1); + #else +diff --git a/src/assembly.h b/src/assembly.h +index f46a24d..4d6c3e1 100644 +--- a/src/assembly.h ++++ b/src/assembly.h +@@ -26,6 +26,8 @@ + + #if defined(__APPLE__) + #define HIDDEN_DIRECTIVE .private_extern ++#elif defined(_WIN32) ++#define HIDDEN_DIRECTIVE .globl + #else + #define HIDDEN_DIRECTIVE .hidden + #endif +diff --git a/src/config.h b/src/config.h +index c9ec087..6f14e92 100644 +--- a/src/config.h ++++ b/src/config.h +@@ -60,6 +60,23 @@ + #define _LIBUNWIND_SUPPORT_DWARF_INDEX 0 + #endif + ++#elif defined(_WIN32) ++ // Note! the assembler files must be .S and not .s. ++ #define _LIBUNWIND_BUILD_ZERO_COST_APIS 1 ++ ++ // #define _LIBUNWIND_BUILD_SJLJ_APIS ++ // #define _LIBUNWIND_SUPPORT_FRAME_APIS ++ #define _LIBUNWIND_EXPORT ++ #define _LIBUNWIND_HIDDEN ++ #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__) ++ #define _LIBUNWIND_ABORT(msg) do { fprintf(stderr, msg); abort(); } while(0) ++ #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1 ++ #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1 ++ // #define _LIBUNWIND_SUPPORT_DWARF_INDEX ++ #define bzero(s,n) memset(s,0,n) ++ // libcxx may have defined __USE_MINGW_ANSI_STDIO. ++ // Here we would like to get the regular versions, not the _mingw ones. ++ #undef __USE_MINGW_ANSI_STDIO + #else + #include + +-- +2.4.5 + diff --git a/mingw-w64-libunwind-svn/PKGBUILD b/mingw-w64-libunwind-svn/PKGBUILD new file mode 100644 index 0000000000..bdef2839db --- /dev/null +++ b/mingw-w64-libunwind-svn/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Martell Malone + +_realname=libunwind +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" +pkgver=17.6127858 +pkgrel=1 +pkgdesc='A new implementation of a stack unwinder for C++ exceptions' +url='http://llvm.org' +license=('custom:University of Illinois/NCSA Open Source License') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-llvm") +source=("libunwind"::"git+http://llvm.org/git/libunwind.git" + 0001-libunwind-add-support-for-mingw-w64.patch) + +md5sums=('SKIP' + 'bf4b1d784310e6a38886a47e0a065e61') + +pkgver_internal() { + if [ ! -d "$1" ]; then + plain "No such directory $1" + exit 1 + fi + pushd "$1" > /dev/null 2>&1 + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + popd > /dev/null 2>&1 +} + +pkgver() { + pkgver_internal "${srcdir}"/libunwind +} + +prepare() { + cd ${srcdir}/libunwind + git am "${srcdir}/"0001-libunwind-add-support-for-mingw-w64.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DLLVM_CONFIG="${MINGW_PREFIX}/bin/llvm-config.exe" \ + -DCMAKE_C_COMPILER="${MINGW_PREFIX}/bin/gcc.exe" \ + -DCMAKE_CXX_COMPILER="${MINGW_PREFIX}/bin/g++.exe" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DLIBUNWIND_ENABLE_SHARED=OFF \ + ../libunwind + make + +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="$pkgdir" install +} diff --git a/mingw-w64-libusb-compat-git/.gitignore b/mingw-w64-libusb-compat-git/.gitignore new file mode 100644 index 0000000000..8ab62e6b24 --- /dev/null +++ b/mingw-w64-libusb-compat-git/.gitignore @@ -0,0 +1 @@ +/libusb-compat diff --git a/mingw-w64-libusb-compat-git/PKGBUILD b/mingw-w64-libusb-compat-git/PKGBUILD new file mode 100644 index 0000000000..210acc81ea --- /dev/null +++ b/mingw-w64-libusb-compat-git/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Andrew Leech +# Contributor: Ray Donnelly + +_realname=libusb-compat +pkgbase="mingw-w64-${_realname}-git" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=r67.272388e +pkgrel=1 +pkgdesc="Allows applications written for libusb-0.1 to work with libusb-1.0 (mingw-w64)" +arch=('any') +url="http://libusb.info" +depends=(${MINGW_PACKAGE_PREFIX}-libusb) +options=('staticlibs') +makedepends=("git" + "pkgconfig" + "m4") +source=(${_realname}::git+https://github.com/libusb/libusb-compat-0.1.git) +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_realname}" + + ./bootstrap.sh +} + +build() { + [ -d ${srcdir}/build-${CARCH} ] && rm -rf ${srcdir}/build-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${CARCH} + + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --{host,build}=${MINGW_CHOST} \ + --includedir=${MINGW_PREFIX}/include/libusb-compat \ + --disable-dependency-tracking \ + --enable-static \ + --enable-shared + + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-libusb/PKGBUILD b/mingw-w64-libusb/PKGBUILD index d381d29ec9..851038e59b 100644 --- a/mingw-w64-libusb/PKGBUILD +++ b/mingw-w64-libusb/PKGBUILD @@ -1,31 +1,31 @@ # Maintainer: Alexey Pavlov _realname=libusb - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.19 +pkgver=1.0.20 pkgrel=1 -pkgdesc="Library that provides generic access to USB devices'. (mingw-w64)" +pkgdesc="Library that provides generic access to USB devices (mingw-w64)" arch=('any') url="http://libusb.info/" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.bz2") -md5sums=('f9e2bb5879968467e5ca756cb4e1fa7e') +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.bz2") +md5sums=('1d4eb194eaaa2bcfbba28102768c7dbf') build() { #export lt_cv_deplibs_check_method='pass_all' mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static - make + make -j1 } check() { @@ -35,5 +35,5 @@ check() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libusbmuxd/PKGBUILD b/mingw-w64-libusbmuxd/PKGBUILD index 240b09f4a9..4087eaca05 100644 --- a/mingw-w64-libusbmuxd/PKGBUILD +++ b/mingw-w64-libusbmuxd/PKGBUILD @@ -3,23 +3,23 @@ _realname=libusbmuxd pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.0.10 -pkgrel=1 +pkgrel=3 pkgdesc='A client library to multiplex connections from and to iOS devices (mingw-w64)' -groups=("${MINGW_PACKAGE_PREFIX}" "xdev") arch=('any') url='http://www.libimobiledevice.org/' license=('GPL2+') +options=('staticlibs') source=("http://www.libimobiledevice.org/downloads/${_realname}-${pkgver}.tar.bz2") depends=("${MINGW_PACKAGE_PREFIX}-libplist") sha1sums=('9d4ce8ac058cfea66e6785d2bad5bb9c93681b16') prepare() { - cd $srcdir/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-${pkgver} } build() { - cd "$srcdir"/${_realname}-${pkgver} - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + cd "${srcdir}"/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} ../${_realname}-${pkgver}/configure \ @@ -29,6 +29,7 @@ build() { --target=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } diff --git a/mingw-w64-libuv/0001-Revert-fs-pipe-no-trailing-terminator-in-exact-sized.patch b/mingw-w64-libuv/0001-Revert-fs-pipe-no-trailing-terminator-in-exact-sized.patch new file mode 100644 index 0000000000..13ffcaea35 --- /dev/null +++ b/mingw-w64-libuv/0001-Revert-fs-pipe-no-trailing-terminator-in-exact-sized.patch @@ -0,0 +1,181 @@ +From 2165edb245f11031ec7606a7541f4b87388dbec9 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Sat, 27 Jun 2015 23:41:22 +0100 +Subject: [PATCH] Revert "fs, pipe: no trailing terminator in exact sized + buffers" + +This reverts commit 1e59ab1d49bace6d43726b076d2e820f318c53f9. + +diff --git a/docs/src/fs_event.rst b/docs/src/fs_event.rst +index 681ae52..e09dbad 100644 +--- a/docs/src/fs_event.rst ++++ b/docs/src/fs_event.rst +@@ -102,7 +102,4 @@ API + is not big enough UV_ENOBUFS will be returned and len will be set to the + required size. + +- .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, +- and the buffer is not null terminated. +- + .. seealso:: The :c:type:`uv_handle_t` API functions also apply. +diff --git a/docs/src/fs_poll.rst b/docs/src/fs_poll.rst +index 4efb244..9f694f1 100644 +--- a/docs/src/fs_poll.rst ++++ b/docs/src/fs_poll.rst +@@ -66,7 +66,4 @@ API + is not big enough UV_ENOBUFS will be returned and len will be set to the + required size. + +- .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, +- and the buffer is not null terminated. +- + .. seealso:: The :c:type:`uv_handle_t` API functions also apply. +diff --git a/docs/src/pipe.rst b/docs/src/pipe.rst +index df896a0..1a7d6b8 100644 +--- a/docs/src/pipe.rst ++++ b/docs/src/pipe.rst +@@ -69,9 +69,6 @@ API + output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and + len will contain the required size. + +- .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, +- and the buffer is not null terminated. +- + .. c:function:: int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) + + Get the name of the Unix domain socket or the named pipe to which the handle +diff --git a/src/fs-poll.c b/src/fs-poll.c +index 44d47b8..a940ca7 100644 +--- a/src/fs-poll.c ++++ b/src/fs-poll.c +@@ -137,7 +137,7 @@ int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) { + ctx = handle->poll_ctx; + assert(ctx != NULL); + +- required_len = strlen(ctx->path); ++ required_len = strlen(ctx->path) + 1; + if (required_len > *size) { + *size = required_len; + return UV_ENOBUFS; +diff --git a/src/unix/pipe.c b/src/unix/pipe.c +index 7f87a71..2ed75a6 100644 +--- a/src/unix/pipe.c ++++ b/src/unix/pipe.c +@@ -231,7 +231,7 @@ static int uv__pipe_getsockpeername(const uv_pipe_t* handle, + addrlen -= offsetof(struct sockaddr_un, sun_path); + else + #endif +- addrlen = strlen(sa.sun_path); ++ addrlen = strlen(sa.sun_path) + 1; + + + if (addrlen > *size) { +diff --git a/src/uv-common.c b/src/uv-common.c +index 4b9901f..c6fb575 100644 +--- a/src/uv-common.c ++++ b/src/uv-common.c +@@ -437,7 +437,7 @@ int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size) { + return UV_EINVAL; + } + +- required_len = strlen(handle->path); ++ required_len = strlen(handle->path) + 1; + if (required_len > *size) { + *size = required_len; + return UV_ENOBUFS; +diff --git a/src/win/pipe.c b/src/win/pipe.c +index 06cf0db..e64f726 100644 +--- a/src/win/pipe.c ++++ b/src/win/pipe.c +@@ -2030,9 +2030,9 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) + *size = 0; + err = uv_translate_sys_error(GetLastError()); + goto error; +- } else if (pipe_prefix_len + addrlen > *size) { +- /* "\\\\.\\pipe" + name */ +- *size = pipe_prefix_len + addrlen; ++ } else if (pipe_prefix_len + addrlen + 1 > *size) { ++ /* "\\\\.\\pipe" + name + '\0' */ ++ *size = pipe_prefix_len + addrlen + 1; + err = UV_ENOBUFS; + goto error; + } +@@ -2053,6 +2053,7 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) + } + + addrlen += pipe_prefix_len; ++ buffer[addrlen++] = '\0'; + *size = addrlen; + + err = 0; +diff --git a/test/test-fs-event.c b/test/test-fs-event.c +index 0a2ba33..5fd8da4 100644 +--- a/test/test-fs-event.c ++++ b/test/test-fs-event.c +@@ -642,7 +642,6 @@ TEST_IMPL(fs_event_getpath) { + len = sizeof buf; + r = uv_fs_event_getpath(&fs_event, buf, &len); + ASSERT(r == 0); +- ASSERT(buf[len - 1] != 0); + ASSERT(memcmp(buf, "watch_dir", len) == 0); + r = uv_fs_event_stop(&fs_event); + ASSERT(r == 0); +diff --git a/test/test-fs-poll.c b/test/test-fs-poll.c +index dbc1515..f4eb084 100644 +--- a/test/test-fs-poll.c ++++ b/test/test-fs-poll.c +@@ -172,7 +172,6 @@ TEST_IMPL(fs_poll_getpath) { + ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); + len = sizeof buf; + ASSERT(0 == uv_fs_poll_getpath(&poll_handle, buf, &len)); +- ASSERT(buf[len - 1] != 0); + ASSERT(0 == memcmp(buf, FIXTURE, len)); + + uv_close((uv_handle_t*) &poll_handle, close_cb); +diff --git a/test/test-pipe-getsockname.c b/test/test-pipe-getsockname.c +index 5e036f9..2634b09 100644 +--- a/test/test-pipe-getsockname.c ++++ b/test/test-pipe-getsockname.c +@@ -63,7 +63,6 @@ static void pipe_client_connect_cb(uv_connect_t* req, int status) { + r = uv_pipe_getpeername(&pipe_client, buf, &len); + ASSERT(r == 0); + +- ASSERT(buf[len - 1] != 0); + ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); + + len = sizeof buf; +@@ -113,7 +112,6 @@ TEST_IMPL(pipe_getsockname) { + r = uv_pipe_getsockname(&pipe_server, buf, &len); + ASSERT(r == 0); + +- ASSERT(buf[len - 1] != 0); + ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); + + len = sizeof buf; +@@ -144,7 +142,6 @@ TEST_IMPL(pipe_getsockname) { + r = uv_pipe_getpeername(&pipe_client, buf, &len); + ASSERT(r == 0); + +- ASSERT(buf[len - 1] != 0); + ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); + + r = uv_run(loop, UV_RUN_DEFAULT); +@@ -230,7 +227,6 @@ TEST_IMPL(pipe_getsockname_blocking) { + len1 = sizeof buf1; + r = uv_pipe_getsockname(&pipe_client, buf1, &len1); + ASSERT(r == 0); +- ASSERT(buf1[len1 - 1] != 0); + + r = uv_read_start((uv_stream_t*)&pipe_client, NULL, NULL); + ASSERT(r == 0); +@@ -239,7 +235,6 @@ TEST_IMPL(pipe_getsockname_blocking) { + len2 = sizeof buf2; + r = uv_pipe_getsockname(&pipe_client, buf2, &len2); + ASSERT(r == 0); +- ASSERT(buf2[len2 - 1] != 0); + + r = uv_read_stop((uv_stream_t*)&pipe_client); + ASSERT(r == 0); +-- +2.4.4 + diff --git a/mingw-w64-libuv/PKGBUILD b/mingw-w64-libuv/PKGBUILD index 92c58fd4b8..5815e3693a 100644 --- a/mingw-w64-libuv/PKGBUILD +++ b/mingw-w64-libuv/PKGBUILD @@ -1,37 +1,43 @@ # Maintainer: Alexey Pavlov +# Contributor: Martell Malone _realname=libuv pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.11.29 -pkgrel=1 -pkgdesc="A new platform layer for Node.JS (mingw-w64)" +pkgver=1.6.1 +pkgrel=3 +pkgdesc="Cross-platform asychronous I/O (mingw-w64)" arch=('any') -url="https://github.com/joyent/libuv" +url="https://github.com/libuv/libuv" license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') -source=("https://github.com/joyent/libuv/archive/v$pkgver.tar.gz") -sha256sums=('fac45e72c2df30ddc9cbdf5002fc1363281d0e433831e3d43acb1036c2cabfc6') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/libuv/libuv/archive/v${pkgver}.tar.gz" + "0001-Revert-fs-pipe-no-trailing-terminator-in-exact-sized.patch") +sha256sums=('f558ede285878d6a69f6a6d43b5df0241f3c35d62ac989477bdbd418badd83d7' + '432203e598cefbad2193a3fbb98c2b4be59f256f26f6fe1ee98e80422e142aee') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/0001-Revert-fs-pipe-no-trailing-terminator-in-exact-sized.patch ./autogen.sh } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install install -D -m644 "${srcdir}"/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-libview/001-win.patch b/mingw-w64-libview/001-win.patch new file mode 100644 index 0000000000..79440bcb5d --- /dev/null +++ b/mingw-w64-libview/001-win.patch @@ -0,0 +1,12 @@ +--- ./libview/Makefile.am.orig 2014-12-04 22:21:54.598078100 +0100 ++++ ./libview/Makefile.am 2014-12-04 22:21:37.764460800 +0100 +@@ -54,7 +54,8 @@ + + libview_la_LIBADD = $(VIEW_LIBS) + libview_la_LDFLAGS = \ +- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) ++ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ ++ -no-undefined + + + INCLUDES = \ diff --git a/mingw-w64-libview/002-missing-execprefix.patch b/mingw-w64-libview/002-missing-execprefix.patch new file mode 100644 index 0000000000..30c9ce89bd --- /dev/null +++ b/mingw-w64-libview/002-missing-execprefix.patch @@ -0,0 +1,19 @@ +--- ./libview.pc.in.orig 2015-01-12 09:55:44.051292400 +0100 ++++ ./libview.pc.in 2015-01-12 09:56:29.968892700 +0100 +@@ -1,10 +1,11 @@ +-prefix=${prefix} +-libdir=${exec_prefix}/lib +-includedir=${prefix}/include ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ + + Name: libview + Description: VMware's Incredibly Exciting Widgets for GTK+ + Version: @VERSION@ +-Libs: -L${libdir} -lview @PACKAGE_LIBS@ +-Cflags: -I${includedir} @PACKAGE_CFLAGS@ ++Libs: -L${libdir} -lview ++Cflags: -I${includedir} + diff --git a/mingw-w64-libview/PKGBUILD b/mingw-w64-libview/PKGBUILD new file mode 100644 index 0000000000..b995875926 --- /dev/null +++ b/mingw-w64-libview/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Andrea Zagli + +_realname=libview +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.6.6 +pkgrel=3 +arch=('any') +pkgdesc="VMware's Incredibly Exciting Widgets (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-gtkmm") +options=('strip' 'staticlibs') +license=("GPL 2") +url="http://view.sourceforge.net" +source=(http://downloads.sourceforge.net/view/${_realname}-${pkgver}.tar.bz2 + 001-win.patch + 002-missing-execprefix.patch) +sha256sums=('2b991bf150c5488b43f807e89bdbd64b2eb3bd433abbdfb68c3eec52cbaa59ab' + '7e7506735bf4c86c52aee2066955f18d539496cee9a41ed126cdb98b19bff24e' + '20ff38d461360fe3062f70d27f2d9f9b0e3d3db6de3042e9893a0660ab6cab4a') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-win.patch + patch -p1 -i ${srcdir}/002-missing-execprefix.patch + + autoreconf -isf +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-libvirt/PKGBUILD b/mingw-w64-libvirt/PKGBUILD index b4ff6c9bf5..a06fab2019 100644 --- a/mingw-w64-libvirt/PKGBUILD +++ b/mingw-w64-libvirt/PKGBUILD @@ -55,6 +55,6 @@ build() { } package() { - cd ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="$pkgdir" install } diff --git a/mingw-w64-libvmime-git/PKGBUILD b/mingw-w64-libvmime-git/PKGBUILD index 698f33c665..c51f0b577e 100644 --- a/mingw-w64-libvmime-git/PKGBUILD +++ b/mingw-w64-libvmime-git/PKGBUILD @@ -1,24 +1,28 @@ # Maintainer: AlexWMF - + _realname=libvmime +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=r1001.f3c9002 +pkgver=r1032.7e36a74 pkgrel=1 -pkgdesc="An open source solution for working with MIME messages and Internet messaging services like IMAP, POP or SMTP." +pkgdesc="An open source solution for working with MIME messages and Internet messaging services like IMAP, POP or SMTP (mingw-w64)" url="http://www.vmime.org/" arch=('any') license=('GPL3') -options=(strip staticlibs) -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") -depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-icu" - "${MINGW_PACKAGE_PREFIX}-gnutls" - "${MINGW_PACKAGE_PREFIX}-gsasl" - "${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-openssl") +options=('strip' 'staticlibs') +makedepends=("${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gcc" + "git") +depends=("${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-gsasl" + "${MINGW_PACKAGE_PREFIX}-libiconv" + #"${MINGW_PACKAGE_PREFIX}-openssl" + ) source=("${_realname}"::"git+https://github.com/kisli/vmime.git" cmake_mlang.patch libvmime-versioning.patch) @@ -27,7 +31,7 @@ md5sums=('SKIP' '510196ab043824bb0780ccf5e02cf323') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } @@ -36,35 +40,26 @@ prepare() { patch -p0 -i ${srcdir}/cmake_mlang.patch patch -p1 -i ${srcdir}/libvmime-versioning.patch } - + build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DVMIME_HAVE_MESSAGING_PROTO_SENDMAIL:BOOL=OFF \ - -DVMIME_BUILD_SAMPLES:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DVMIME_HAVE_MESSAGING_PROTO_SENDMAIL=OFF \ + -DVMIME_BUILD_SAMPLES=OFF \ + -DVMIME_TLS_SUPPORT_LIB=gnutls \ ../${_realname} - + make } - + package() { cd build-${MINGW_CHOST} - make install - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEP=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/vmime.pc - sed -s "s|${PREFIX_DEP}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/vmime.pc + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-libvorbis/PKGBUILD b/mingw-w64-libvorbis/PKGBUILD index ed26749eef..7098ffeea3 100644 --- a/mingw-w64-libvorbis/PKGBUILD +++ b/mingw-w64-libvorbis/PKGBUILD @@ -1,9 +1,9 @@ # Maintainer: Alexey Pavlov _realname=libvorbis - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.4 +pkgver=1.3.5 pkgrel=1 pkgdesc="Vorbis codec library (mingw-w64)" arch=('any') @@ -13,23 +13,24 @@ depends=("${MINGW_PACKAGE_PREFIX}-libogg" "${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' 'staticlibs') source=(http://downloads.xiph.org/releases/vorbis/${_realname}-${pkgver}.tar.gz) -md5sums=('8851c593a52d1ef9c526d95174873852') +md5sums=('7220e089f3be3412a2317d6fde9e3944') build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ - --enable-shared \ - --enable-static \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + make } package() { - cd ${srcdir}/build-${MINGW_CHOST} - make DESTDIR="$pkgdir" install - rm -r ${pkgdir}${MINGW_PREFIX}/share/doc + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libvorbisidec-svn/PKGBUILD b/mingw-w64-libvorbisidec-svn/PKGBUILD index b72423c3b6..ed53bfec7c 100644 --- a/mingw-w64-libvorbisidec-svn/PKGBUILD +++ b/mingw-w64-libvorbisidec-svn/PKGBUILD @@ -5,13 +5,12 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" _revision= _fragment= [[ -n ${_revision} ]] && _fragment="#revision=${_revision}" -pkgver=r19222 +pkgver=r19494 pkgrel=1 pkgdesc='Integer-only Ogg Vorbis decoder, AKA \"tremor\" (mingw-w64)' arch=('any') url='http://svn.xiph.org/trunk/Tremor' license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}") depends=("${MINGW_PACKAGE_PREFIX}-libogg") makedepends=("subversion" "${MINGW_PACKAGE_PREFIX}-gcc") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") @@ -27,7 +26,7 @@ md5sums=('SKIP' '43fba0fb6b12e663841c40f8e4f5fc4f') pkgver() { - cd "$srcdir/${_realname}" + cd "${srcdir}/${_realname}" local ver="$(svnversion)" printf "r%s" "${ver//[[:alpha:]]}" } @@ -45,7 +44,7 @@ build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}/configure \ + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ diff --git a/mingw-w64-libvpx/0001-enable-shared-on.mingw.patch b/mingw-w64-libvpx/0001-enable-shared-on.mingw.patch index 94082f1f7f..4807686d9c 100644 --- a/mingw-w64-libvpx/0001-enable-shared-on.mingw.patch +++ b/mingw-w64-libvpx/0001-enable-shared-on.mingw.patch @@ -1,8 +1,83 @@ ---- libvpx-v1.2.0/configure.orig 2013-09-04 18:49:22.000000000 +0000 -+++ libvpx-v1.2.0/configure 2013-10-02 08:57:41.927885400 +0000 -@@ -458,9 +459,13 @@ +diff -Naur libvpx-1.5.0-orig/build/make/configure.sh libvpx-1.5.0/build/make/configure.sh +--- libvpx-1.5.0-orig/build/make/configure.sh 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.5.0/build/make/configure.sh 2015-04-07 09:41:34.049400000 +0300 +@@ -572,11 +572,14 @@ + --libdir=*) + libdir="${optval}" + ;; ++ --bindir=*) ++ bindir="${optval}" ++ ;; + --sdk-path=*) + [ -d "${optval}" ] || die "Not a directory: ${optval}" + sdk_path="${optval}" + ;; +- --libc|--as|--prefix|--libdir|--sdk-path) ++ --libc|--as|--prefix|--libdir|--bindir|--sdk-path) + die "Option ${opt} requires argument" + ;; + --help|-h) +@@ -605,9 +608,14 @@ + prefix="${prefix%/}" + libdir="${libdir:-${prefix}/lib}" + libdir="${libdir%/}" ++ bindir="${bindir:-${prefix}/bin}" ++ bindir="${bindir%/}" + if [ "${libdir#${prefix}}" = "${libdir}" ]; then + die "Libdir ${libdir} must be a subdirectory of ${prefix}" + fi ++ if [ "${bindir#${prefix}}" = "${bindir}" ]; then ++ die "Bindir ${bindir} must be a subdirectory of ${prefix}" ++ fi + } + + post_process_cmdline() { +diff -Naur libvpx-1.5.0-orig/build/make/Makefile libvpx-1.5.0/build/make/Makefile +--- libvpx-1.5.0-orig/build/make/Makefile 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.5.0/build/make/Makefile 2015-04-07 09:41:34.049400000 +0300 +@@ -303,6 +303,20 @@ + -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \ + $$(filter %.o,$$^) $$(extralibs) + endef ++ ++define dll_gnu_template ++# Not using a pattern rule here because we don't want to generate empty ++# archives when they are listed as a dependency in files not responsible ++# for creating them. ++# ++# This needs further abstraction for dealing with non-GNU linkers. ++$(1): ++ $(if $(quiet),@echo " [LD] $$@") ++ $(qexec)$$(LD) -shared $$(LDFLAGS) \ ++ -Wl,--no-undefined \ ++ -o $$@ \ ++ -Wl,--out-implib=$$(subst $(2),.dll.a,$(1)) $$(filter %.o,$$^) $$(extralibs) ++endef + + define dl_template + # Not using a pattern rule here because we don't want to generate empty +@@ -386,6 +387,7 @@ + $(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) + $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) + $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib)))) ++$(foreach lib,$(filter %-$(VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_gnu_template,$(lib),-$(VERSION_MAJOR).dll))) + + INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) + ifeq ($(MAKECMDGOALS),dist) +diff -Naur libvpx-1.5.0-orig/configure libvpx-1.5.0/configure +--- libvpx-1.5.0-orig/configure 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.5.0/configure 2015-04-07 09:41:34.049400000 +0300 +@@ -476,6 +476,7 @@ + DIST_DIR?=\$(DESTDIR)${prefix} + endif + LIBSUBDIR=${libdir##${prefix}/} ++BINSUBDIR=${bindir##${prefix}/} + + VERSION_STRING=${VERSION_STRING} + +@@ -509,9 +510,13 @@ # magic happens after the command line has been parsed. - if ! enabled linux; then + if ! enabled linux && ! enabled os2; then if enabled gnu; then - echo "--enable-shared is only supported on ELF; assuming this is OK" + echo "--enable-shared is only supported on ELF and PE; assuming this is OK" @@ -11,68 +86,32 @@ + elif enabled win64; then + echo "--enable-shared is only supported on ELF and PE; assuming this is OK" else -- die "--enable-shared only supported on ELF for now" -+ die "--enable-shared only supported on ELF and PE for now" +- die "--enable-shared only supported on ELF and OS/2 for now" ++ die "--enable-shared only supported on ELF, OS/2 and PE for now" fi fi fi ---- libvpx-v1.0.0/build/make/Makefile.orig 2012-01-27 22:36:39 +0400 -+++ libvpx-v1.0.0/build/make/Makefile 2012-04-16 01:33:19 +0400 -@@ -316,7 +316,7 @@ - .libs: $(LIBS) - @touch $@ - $(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) --$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) -+$(foreach lib,$(filter %-$(VERSION_MAJOR).dll,$(LIBS)),$(eval $(call so_template,$(lib)))) - $(foreach lib,$(filter %$(VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) - - INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) ---- libvpx-v1.0.0/configure.orig 2012-04-16 01:18:31 +0400 -+++ libvpx-v1.0.0/configure 2012-04-16 02:01:35 +0400 -@@ -406,6 +406,7 @@ - DIST_DIR?=\$(DESTDIR)${prefix} +diff -Naur libvpx-1.5.0-orig/examples.mk libvpx-1.5.0/examples.mk +--- libvpx-1.5.0-orig/examples.mk 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.5.0/examples.mk 2015-04-07 09:41:34.065000000 +0300 +@@ -291,9 +291,13 @@ + ifneq ($(filter os2%,$(TGT_OS)),) + SHARED_LIB_SUF=_dll.a + else ++ifneq ($(filter win%,$(TGT_OS)),) ++SHARED_LIB_SUF=.dll.a ++else + SHARED_LIB_SUF=.so endif - LIBSUBDIR=${libdir##${prefix}/} -+BINSUBDIR=${bindir##${prefix}/} - - VERSION_STRING=${VERSION_STRING} - ---- libvpx-v1.0.0/build/make/configure.sh.orig 2012-01-27 22:36:39 +0400 -+++ libvpx-v1.0.0/build/make/configure.sh 2012-04-16 02:15:12 +0400 -@@ -477,11 +477,14 @@ - --libdir=*) - libdir="${optval}" - ;; -+ --bindir=*) -+ bindir="${optval}" -+ ;; - --sdk-path=*) - [ -d "${optval}" ] || die "Not a directory: ${optval}" - sdk_path="${optval}" - ;; -- --libc|--as|--prefix|--libdir|--sdk-path) -+ --libc|--as|--prefix|--libdir|--bindir|--sdk-path) - die "Option ${opt} requires argument" - ;; - --help|-h) show_help -@@ -508,9 +511,14 @@ - prefix="${prefix%/}" - libdir="${libdir:-${prefix}/lib}" - libdir="${libdir%/}" -+ bindir="${bindir:-${prefix}/bin}" -+ bindir="${bindir%/}" - if [ "${libdir#${prefix}}" = "${libdir}" ]; then - die "Libdir ${libdir} must be a subdirectory of ${prefix}" - fi -+ if [ "${bindir#${prefix}}" = "${bindir}" ]; then -+ die "Bindir ${bindir} must be a subdirectory of ${prefix}" -+ fi - } - - ---- libvpx-v1.3.0/libs.mk.orig 2014-01-10 20:12:42.000000000 +0000 -+++ libvpx-v1.3.0/libs.mk 2014-02-09 17:56:21.946849800 +0000 -@@ -162,6 +162,7 @@ + endif ++endif + CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) + $(foreach bin,$(BINS-yes),\ + $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\ +diff -Naur libvpx-1.5.0-orig/libs.mk libvpx-1.5.0/libs.mk +--- libvpx-1.5.0-orig/libs.mk 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.5.0/libs.mk 2015-04-07 09:41:34.065000000 +0300 +@@ -164,6 +164,7 @@ INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx/% INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx_ports/% INSTALL_MAPS += $(LIBSUBDIR)/% % @@ -80,57 +119,53 @@ INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% ifeq ($(CONFIG_MSVS),yes) INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Release/%) -@@ -271,19 +272,19 @@ - LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ - libvpx.dylib ) +@@ -277,6 +278,13 @@ + LIBVPX_SO_SYMLINKS := + LIBVPX_SO_IMPLIB := libvpx_dll.a else --LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH) ++ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS)) +LIBVPX_SO := libvpx-$(VERSION_MAJOR).dll ++SHARED_LIB_SUF := .dll.a ++EXPORT_FILE := ++LIBVPX_SO_SYMLINKS := ++LIBVPX_SO_IMPLIB := libvpx.dll.a ++else + LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH) + SHARED_LIB_SUF := .so EXPORT_FILE := libvpx.ver - SYM_LINK := libvpx.so --LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ -- libvpx.so libvpx.so.$(VERSION_MAJOR) \ -- libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR)) -+LIBVPX_SO_SYMLINKS := $(addprefix $(BINSUBDIR)/, \ -+ libvpx.dll libvpx-$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH).dll \ -+ libvpx-$(VERSION_MAJOR).$(VERSION_MINOR).dll) +@@ -285,13 +293,14 @@ + libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) endif + endif ++endif - LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)\ - $(notdir $(LIBVPX_SO_SYMLINKS)) + LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\ + $(notdir $(LIBVPX_SO_SYMLINKS)) \ + $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB)) $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE) $(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm --$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR) -+$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx-$(VERSION_MAJOR).dll +-$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR) ++$(BUILD_PFX)$(LIBVPX_SO): SONAME = $(LIBVPX_SO) $(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE) libvpx.ver: $(call enabled,CODEC_EXPORTS) -@@ -314,7 +315,7 @@ +@@ -319,6 +328,10 @@ + $(qexec)emximp -o $@ $< + CLEAN-OBJS += libvpx_dll.a + ++libvpx.dll.a: $(LIBVPX_SO) ++ @echo " [IMPLIB] $@" ++CLEAN-OBJS += libvpx.dll.a ++ + define libvpx_symlink_template + $(1): $(2) + @echo " [LN] $(2) $$@" +@@ -335,7 +348,7 @@ - INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBVPX_SO_SYMLINKS) --INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBSUBDIR)/$(LIBVPX_SO) -+INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(BINSUBDIR)/$(LIBVPX_SO) + INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS) +-INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO) ++INSTALL-LIBS-$(CONFIG_SHARED) += $(BINSUBDIR)/$(LIBVPX_SO) + INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_SO_IMPLIB)) - LIBS-$(BUILD_LIBVPX) += vpx.pc -@@ -476,7 +477,7 @@ - INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS) - - CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) --CODEC_LIB_SUF=$(if $(CONFIG_SHARED),.so,.a) -+CODEC_LIB_SUF=$(if $(CONFIG_SHARED),.dll,.a) - $(foreach bin,$(LIBVPX_TEST_BINS),\ - $(if $(BUILD_LIBVPX),$(eval $(bin): \ - lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\ ---- libvpx-v1.3.0/examples.mk.orig 2014-02-09 17:35:42.615974800 +0000 -+++ libvpx-v1.3.0/examples.mk 2014-02-09 17:58:15.301744100 +0000 -@@ -191,7 +191,7 @@ - - # Instantiate linker template for all examples. - CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) --SHARED_LIB_SUF=$(if $(filter darwin%,$(TGT_OS)),.dylib,.so) -+SHARED_LIB_SUF=$(if $(filter darwin%,$(TGT_OS)),.dylib,.dll) - CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) - $(foreach bin,$(BINS-yes),\ - $(if $(BUILD_OBJS),$(eval $(bin):\ diff --git a/mingw-w64-libvpx/0002-no-pthreads.mingw.patch b/mingw-w64-libvpx/0002-no-pthreads.mingw.patch index 327af598b2..b9e5095a10 100644 --- a/mingw-w64-libvpx/0002-no-pthreads.mingw.patch +++ b/mingw-w64-libvpx/0002-no-pthreads.mingw.patch @@ -1,23 +1,25 @@ ---- libvpx-v1.1.0/configure.orig 2012-09-15 16:20:38 +0400 -+++ libvpx-v1.1.0/configure 2012-09-15 16:24:16 +0400 -@@ -224,7 +224,6 @@ +diff -Naur libvpx-1.4.0-orig/configure libvpx-1.4.0/configure +--- libvpx-1.4.0-orig/configure 2015-04-07 09:41:34.642200000 +0300 ++++ libvpx-1.4.0/configure 2015-04-07 09:41:34.720200000 +0300 +@@ -256,7 +256,6 @@ + ${ARCH_EXT_LIST} vpx_ports stdint_h - alt_tree_layout - pthread_h sys_mman_h unistd_h " -@@ -487,7 +486,6 @@ +@@ -611,7 +610,6 @@ EOF # check system headers check_header stdint.h - check_header pthread.h check_header sys/mman.h + check_header unistd.h # for sysconf(3) and friends. - check_header vpx/vpx_integer.h -I${source_path} && enable vpx_ports ---- libvpx-v1.1.0/vp8/common/generic/systemdependent.c.orig 2012-05-09 03:14:00 +0400 -+++ libvpx-v1.1.0/vp8/common/generic/systemdependent.c 2012-09-15 16:44:06 +0400 +diff -Naur libvpx-1.4.0-orig/vp8/common/generic/systemdependent.c libvpx-1.4.0/vp8/common/generic/systemdependent.c +--- libvpx-1.4.0-orig/vp8/common/generic/systemdependent.c 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.4.0/vp8/common/generic/systemdependent.c 2015-04-07 09:41:34.720200000 +0300 @@ -21,7 +21,8 @@ #if CONFIG_MULTITHREAD #if HAVE_UNISTD_H && !defined(__OS2__) diff --git a/mingw-w64-libvpx/0003-cross-with-native-binutils.mingw.patch b/mingw-w64-libvpx/0003-cross-with-native-binutils.mingw.patch index 15ce4a9daf..90072e7a2b 100644 --- a/mingw-w64-libvpx/0003-cross-with-native-binutils.mingw.patch +++ b/mingw-w64-libvpx/0003-cross-with-native-binutils.mingw.patch @@ -1,23 +1,24 @@ ---- libvpx-v1.2.0/build/make/configure.sh.orig 2013-10-02 08:59:30.678194900 +0000 -+++ libvpx-v1.2.0/build/make/configure.sh 2013-10-02 09:00:28.811576900 +0000 -@@ -584,13 +584,13 @@ +diff -Naur libvpx-1.4.0-orig/build/make/configure.sh libvpx-1.4.0/build/make/configure.sh +--- libvpx-1.4.0-orig/build/make/configure.sh 2015-04-07 09:41:34.626600000 +0300 ++++ libvpx-1.4.0/build/make/configure.sh 2015-04-07 09:41:35.172600000 +0300 +@@ -607,13 +607,13 @@ } setup_gnu_toolchain() { -- CC=${CC:-${CROSS}gcc} -- CXX=${CXX:-${CROSS}g++} -- AR=${AR:-${CROSS}ar} -- LD=${LD:-${CROSS}${link_with_cc:-ld}} -- AS=${AS:-${CROSS}as} -- STRIP=${STRIP:-${CROSS}strip} -- NM=${NM:-${CROSS}nm} -+ CC=${CC:-gcc} -+ CXX=${CXX:-g++} -+ AR=${AR:-ar} -+ LD=${LD:-${link_with_cc:-ld}} -+ AS=${AS:-as} -+ STRIP=${STRIP:-strip} -+ NM=${NM:-nm} - AS_SFX=.s - EXE_SFX= +- CC=${CC:-${CROSS}gcc} +- CXX=${CXX:-${CROSS}g++} +- AR=${AR:-${CROSS}ar} +- LD=${LD:-${CROSS}${link_with_cc:-ld}} +- AS=${AS:-${CROSS}as} +- STRIP=${STRIP:-${CROSS}strip} +- NM=${NM:-${CROSS}nm} ++ CC=${CC:-gcc} ++ CXX=${CXX:-g++} ++ AR=${AR:-ar} ++ LD=${LD:-${link_with_cc:-ld}} ++ AS=${AS:-as} ++ STRIP=${STRIP:-strip} ++ NM=${NM:-nm} + AS_SFX=.s + EXE_SFX= } diff --git a/mingw-w64-libvpx/0004-implib.mingw.patch b/mingw-w64-libvpx/0004-implib.mingw.patch deleted file mode 100644 index 50d19bafa2..0000000000 --- a/mingw-w64-libvpx/0004-implib.mingw.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- libvpx-v1.3.0/build/make/Makefile.orig 2014-02-09 17:58:58.119181200 +0000 -+++ libvpx-v1.3.0/build/make/Makefile 2014-02-09 18:01:00.974781900 +0000 -@@ -270,7 +270,7 @@ - $(qexec)$$(LD) -shared $$(LDFLAGS) \ - -Wl,--no-undefined -Wl,-soname,$$(SONAME) \ - -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \ -- $$(filter %.o,$$^) $$(extralibs) -+ -Wl,--out-implib=$$(subst $(2),.dll.a,$(1)) $$(filter %.o,$$^) $$(extralibs) - endef - - define dl_template -@@ -351,7 +351,7 @@ - .libs: $(LIBS) - @touch $@ - $(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) --$(foreach lib,$(filter %-$(VERSION_MAJOR).dll,$(LIBS)),$(eval $(call so_template,$(lib)))) -+$(foreach lib,$(filter %-$(VERSION_MAJOR).dll,$(LIBS)),$(eval $(call so_template,$(lib),-$(VERSION_MAJOR).dll))) - $(foreach lib,$(filter %$(VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) - - INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) diff --git a/mingw-w64-libvpx/0005-fix-exports.mingw.patch b/mingw-w64-libvpx/0005-fix-exports.mingw.patch index 0bba2916c6..17bff59377 100644 --- a/mingw-w64-libvpx/0005-fix-exports.mingw.patch +++ b/mingw-w64-libvpx/0005-fix-exports.mingw.patch @@ -1,8 +1,9 @@ ---- libvpx-v1.1.0/vpx/exports_enc.orig 2012-05-08 23:14:00.000000000 +0000 -+++ libvpx-v1.1.0/vpx/exports_enc 2013-07-31 12:26:36.692171900 +0000 -@@ -1,6 +1,7 @@ - text vpx_codec_enc_config_default +diff -Naur libvpx-1.4.0-orig/vpx/exports_enc libvpx-1.4.0/vpx/exports_enc +--- libvpx-1.4.0-orig/vpx/exports_enc 2015-04-03 21:49:19.000000000 +0300 ++++ libvpx-1.4.0/vpx/exports_enc 2015-04-07 09:41:36.904200000 +0300 +@@ -2,6 +2,7 @@ text vpx_codec_enc_config_set + text vpx_codec_enc_init_multi_ver text vpx_codec_enc_init_ver +text vpx_codec_enc_init_multi_ver text vpx_codec_encode diff --git a/mingw-w64-libvpx/0006-instll-implib.mingw.patch b/mingw-w64-libvpx/0006-instll-implib.mingw.patch deleted file mode 100644 index f8c2824304..0000000000 --- a/mingw-w64-libvpx/0006-instll-implib.mingw.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libvpx-v1.1.0/libs.mk.orig 2013-07-31 12:18:41.045772500 +0000 -+++ libvpx-v1.1.0/libs.mk 2013-07-31 12:56:22.862986800 +0000 -@@ -126,6 +126,7 @@ - endif - else - INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a -+INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/libvpx.dll.a - INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a - endif - diff --git a/mingw-w64-libvpx/0008-fix-ln-on-install.mingw.patch b/mingw-w64-libvpx/0008-fix-ln-on-install.mingw.patch deleted file mode 100644 index d8d51acbb1..0000000000 --- a/mingw-w64-libvpx/0008-fix-ln-on-install.mingw.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- libvpx-v1.3.0/libs.mk.orig 2014-02-09 18:20:42.290790000 +0000 -+++ libvpx-v1.3.0/libs.mk 2014-02-09 18:38:54.500983000 +0000 -@@ -301,7 +301,7 @@ - CLEAN-OBJS += libvpx.syms - - define libvpx_symlink_template --$(1): $(2) -+$(1): $(3) - @echo " [LN] $(2) $$@" - $(qexec)mkdir -p $$(dir $$@) - $(qexec)ln -sf $(2) $$@ -@@ -309,10 +309,12 @@ - - $(eval $(call libvpx_symlink_template,\ - $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\ -- $(BUILD_PFX)$(LIBVPX_SO))) -+ $(BUILD_PFX)$(LIBVPX_SO),\ -+ $(BUILD_PFX)$(LIBVPX_SO))) - $(eval $(call libvpx_symlink_template,\ - $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\ -- $(LIBVPX_SO))) -+ $(LIBVPX_SO),\ -+ $(DIST_DIR)/bin/$(LIBVPX_SO))) - - - INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBVPX_SO_SYMLINKS) diff --git a/mingw-w64-libvpx/PKGBUILD b/mingw-w64-libvpx/PKGBUILD index c19498dd53..9a26e044a7 100644 --- a/mingw-w64-libvpx/PKGBUILD +++ b/mingw-w64-libvpx/PKGBUILD @@ -1,49 +1,38 @@ # Maintainer: Alexey Pavlov _realname=libvpx - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.0 -pkgrel=4 +pkgver=1.5.0 +pkgrel=1 pkgdesc="The VP8 Codec SDK (mingw-w64)" arch=('any') license=('BSD') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-yasm") -url=('http://www.webmproject.org/') -source=(https://webm.googlecode.com/files/${_realname}-v${pkgver}.tar.bz2 +url="http://www.webmproject.org/" +source=(${_realname}-${pkgver}.tar.gz::https://github.com/webmproject/libvpx/archive/v${pkgver}.tar.gz 0001-enable-shared-on.mingw.patch 0002-no-pthreads.mingw.patch 0003-cross-with-native-binutils.mingw.patch - 0004-implib.mingw.patch 0005-fix-exports.mingw.patch 0006-instll-implib.mingw.patch - 0007-fix-mingw-w64-strtok.mingw.patch - 0007-winxp-dont-have-strtok_s.patch 0008-fix-ln-on-install.mingw.patch) options=('strip' 'staticlibs') -md5sums=('14783a148872f2d08629ff7c694eb31f' - '91e8e57bd26acb1acf5b0df5fbf36532' - '8799da31817a2d0d6a3db4717e80ac24' - '76677cf7a34fa84db945ecca2e8efaed' - '33f066c4d11a928bad02f5877b36d148' - 'ccfc3e6d0bd8aeea89b29605ad783242' - '816bb55c8593e639c2b083bf13509542' - '5b1411bb3a36f8f126a6da74d3dcb305' - 'b21aaa85f12c88f83311d3cec1c29a04' - '4fa75aed4f5929a6630f59b2b3114ff7') +md5sums=('0c662bc7525afe281badb3175140d35c' + '6fb5ae049d34259ef403f2dfad997974' + '8f8ae828cbe1803136611d5fa9a04acf' + '9f66ab98dbbe170ca7dc0c820f56558a' + 'd33bd15169b21f5c6cba379d6c76397f' + 'c91d82639fee7d82cf69b13a34c05179' + '1a5f3e0e8ff8126fbfd8bb133e7e1c87') prepare() { - cd ${srcdir}/$_realname-v$pkgver + cd ${srcdir}/${_realname}-${pkgver} patch -Np1 -i ${srcdir}/0001-enable-shared-on.mingw.patch patch -Np1 -i ${srcdir}/0002-no-pthreads.mingw.patch patch -Np1 -i ${srcdir}/0003-cross-with-native-binutils.mingw.patch - patch -Np1 -i ${srcdir}/0004-implib.mingw.patch patch -Np1 -i ${srcdir}/0005-fix-exports.mingw.patch - patch -Np1 -i ${srcdir}/0006-instll-implib.mingw.patch - #patch -Np1 -i ${srcdir}/0007-fix-mingw-w64-strtok.mingw.patch - patch -Np1 -i ${srcdir}/0007-winxp-dont-have-strtok_s.patch - patch -Np1 -i ${srcdir}/0008-fix-ln-on-install.mingw.patch } build() { @@ -52,9 +41,9 @@ build() { else _targetarch="x86_64-win64-gcc" fi - mkdir -p $srcdir/build-$MINGW_CHOST - cd "$srcdir/build-$MINGW_CHOST" - ../$_realname-v$pkgver/configure \ + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --target=${_targetarch} \ --enable-vp8 \ @@ -63,6 +52,9 @@ build() { --enable-postproc \ --enable-pic \ --enable-shared \ + --enable-static \ + --enable-experimental \ + --enable-spatial-svc \ --disable-examples \ --disable-docs \ --disable-install-docs \ @@ -71,12 +63,10 @@ build() { for _ff in *.mk; do sed -i "s/HAVE_GNU_STRIP=yes/HAVE_GNU_STRIP=no/g" $_ff done - make -j1 + make #-j1 } package() { cd "${srcdir}/build-$MINGW_CHOST" make DIST_DIR="${pkgdir}${MINGW_PREFIX}" install - - rm ${pkgdir}${MINGW_PREFIX}/bin/libvpx{.dll,-1.3}* } diff --git a/mingw-w64-libwebp/PKGBUILD b/mingw-w64-libwebp/PKGBUILD index 87a452c18b..ec69469127 100644 --- a/mingw-w64-libwebp/PKGBUILD +++ b/mingw-w64-libwebp/PKGBUILD @@ -1,26 +1,31 @@ # Maintainer: Alexey Pavlov _realname=libwebp +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.4.2 +pkgver=0.5.0 pkgrel=1 -pkgdesc="the WebP library. Includes conversion tools. (mingw-w64)" +pkgdesc="the WebP library. Includes conversion tools (mingw-w64)" arch=('any') -url="https://code.google.com/p/webp/" +url="https://developers.google.com/speed/webp/" license=('BSD') -depends=("${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" "${MINGW_PACKAGE_PREFIX}-libtiff" "${MINGW_PACKAGE_PREFIX}-giflib") +depends=("${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -source=("http://downloads.webmproject.org/releases/webp/$_realname-$pkgver.tar.gz") -md5sums=('404f45a7d695217db2bb49e1e22ad49f') +source=(http://downloads.webmproject.org/releases/webp/${_realname}-${pkgver}.tar.gz{,.asc}) +md5sums=('ba81eb9bf23e3c69a2f5cc8dcdb5938f' + 'SKIP') prepare() { - cd $srcdir/$_realname-$pkgver + cd ${srcdir}/${_realname}-${pkgver} } build() { - mkdir -p $srcdir/$MINGW_CHOST - cd "$srcdir/$MINGW_CHOST" - ../$_realname-$pkgver/configure \ + mkdir -p ${srcdir}/${MINGW_CHOST} + cd "${srcdir}/${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ @@ -30,11 +35,11 @@ build() { --enable-libwebpmux \ --enable-libwebpdemux \ --enable-libwebpdecoder - make + + make -j1 } package() { - cd "$srcdir/$MINGW_CHOST" + cd "${srcdir}/$MINGW_CHOST" make install DESTDIR="${pkgdir}" - rm -r "${pkgdir}${MINGW_PREFIX}/share" } diff --git a/mingw-w64-libwebsockets/PKGBUILD b/mingw-w64-libwebsockets/PKGBUILD index f037ed30b8..51526fc6ee 100644 --- a/mingw-w64-libwebsockets/PKGBUILD +++ b/mingw-w64-libwebsockets/PKGBUILD @@ -1,20 +1,21 @@ # Maintainer: Martell Malone _realname=libwebsockets -_srcbase=chrome37-firefox30 +_srcbase=chrome43-firefox-36 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3 +pkgver=1.4 pkgrel=1 arch=('any') pkgdesc="A lightweight pure C library for websockets (mingw-w64)" -url=('http://libwebsockets.org/') +url='http://libwebsockets.org/' license=('LGPL 2.1 - custom') depends=("${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-openssl") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") source=("https://github.com/warmcat/${_realname}/archive/v${pkgver}-${_srcbase}.tar.gz" + #http://git.libwebsockets.org/cgi-bin/cgit/${_realname}/snapshot/${_realname}-${pkgver}-${_srcbase}.tar.gz fix-cmake-files-location.patch) options=(!strip !buildflags staticlibs) -md5sums=('63117f35174a5fe4ec062f6baa411638' +md5sums=('0452c278a5cd4349135df2a693f35c28' '1223de5b20e776c823f27b62ab352249') prepare() { @@ -23,23 +24,26 @@ prepare() { } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - ${MINGW_PREFIX}/bin/cmake.exe \ + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DLWS_USE_EXTERNAL_ZLIB=ON \ -DCMAKE_C_COMPILER=${MINGW_PREFIX}/bin/gcc.exe \ -DCMAKE_CXX_COMPILER=${MINGW_PREFIX}/bin/g++.exe \ -DLWS_WITHOUT_DAEMONIZE=ON \ -DLWS_WITHOUT_TESTAPPS=ON \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=RELEASE \ ../${_realname}-${pkgver}-${_srcbase} - make + + make } package() { cd ${srcdir}/build-${MINGW_CHOST} - make -j1 install - mkdir -p ${pkgdir}${MINGW_PREFIX}/bin + make DESTDIR=${pkgdir} -j1 install install -Dm644 "${srcdir}/${_realname}-${pkgver}-${_srcbase}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-libwmf/PKGBUILD b/mingw-w64-libwmf/PKGBUILD index 78f3498f96..8bf04621bf 100644 --- a/mingw-w64-libwmf/PKGBUILD +++ b/mingw-w64-libwmf/PKGBUILD @@ -1,27 +1,24 @@ # Maintainer: Alexey Pavlov _realname=libwmf - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.2.8.4 -pkgrel=2 +pkgrel=3 pkgdesc="Library for Converting Metafile Images (mingw-w64)" arch=('any') url="http://wvWare.sourceforge.net" license=("GPL" "LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "libtool" - ) + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "libtool") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" - "${MINGW_PACKAGE_PREFIX}-gtk2" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-zlib" - ) + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' 'staticlibs') source=(http://downloads.sourceforge.net/wvware/libwmf-${pkgver}.tar.gz libwmf-0.2.8.4-libpng.patch) diff --git a/mingw-w64-libwpd/PKGBUILD b/mingw-w64-libwpd/PKGBUILD index e7a0c77afd..2ebdb248f6 100644 --- a/mingw-w64-libwpd/PKGBUILD +++ b/mingw-w64-libwpd/PKGBUILD @@ -1,41 +1,48 @@ # Maintainer: Alexey Pavlov _realname=libwpd - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.10.0 -pkgrel=1 +pkgrel=3 pkgdesc="Library for Importing WordPerfect (tm) Documents (mingw-w64)" arch=('any') url="http://libwpd.sourceforge.net/" license=("LGPL-2.1+" "MPL-2.0+") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-librevenge" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-xz") -options=(staticlibs strip) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-librevenge" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib") +options=(staticlibs strip !buildflags) source=("http://downloads.sourceforge.net/project/${_realname}/${_realname}/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.xz") md5sums=('f7abb9b3ea96faf02ae019af68b1f07c') prepare() { cd ${srcdir}/${_realname}-${pkgver} + autoreconf -fiv } build() { export lt_cv_deplibs_check_method='pass_all' - cp -r ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + + mkdir -p ${srcdir}/build-${MINGW_CHOST} cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ --without-docs \ - --disable-werror + --disable-werror \ + --enable-silent-rules + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libwpg/PKGBUILD b/mingw-w64-libwpg/PKGBUILD index 025479d644..231615b27d 100644 --- a/mingw-w64-libwpg/PKGBUILD +++ b/mingw-w64-libwpg/PKGBUILD @@ -1,29 +1,32 @@ # Maintainer: Alexey Pavlov _realname=libwpg - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.3.0 +pkgver=0.3.1 pkgrel=1 pkgdesc="Library to read and parse graphics in WordPerfect Graphics format (mingw-w64)" arch=('any') url="http://libwpg.sourceforge.net/" license=("LGPL-2.1+" "MPL-2.0+") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libwpd" "${MINGW_PACKAGE_PREFIX}-librevenge") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-librevenge" + "${MINGW_PACKAGE_PREFIX}-libwpd") options=(staticlibs strip) source=("http://downloads.sourceforge.net/project/${_realname}/${_realname}/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.xz") -md5sums=('00f2db157d130c1334ef36da2e9f20a3') +md5sums=('62cf22e05cc6afa3f7384e9487cd255d') prepare() { cd ${srcdir}/${_realname}-${pkgver} } build() { - export lt_cv_deplibs_check_method='pass_all' - cp -r ${srcdir}/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + + mkdir -p ${srcdir}/build-${MINGW_CHOST} cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -31,11 +34,11 @@ build() { --enable-static \ --without-docs \ --disable-werror + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libxml++/PKGBUILD b/mingw-w64-libxml++/PKGBUILD index 600a990360..a4d03b1ca0 100644 --- a/mingw-w64-libxml++/PKGBUILD +++ b/mingw-w64-libxml++/PKGBUILD @@ -1,31 +1,31 @@ # Maintainer: Alexey Pavlov _realname=libxml++ - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.37.1 +pkgver=2.40.0 pkgrel=1 arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") pkgdesc="C++ wrapper for the libxml2 XML parser library (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-glibmm") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-glibmm") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' 'staticlibs') license=('LGPL') url="http://libxmlplusplus.sourceforge.net/" source=("http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") -md5sums=('2f9372a6eba6e40206c11f558a8fbc32') +md5sums=('c4a0a131cf149300b8edbb7fe1c19202') prepare() { cd "${srcdir}/${_realname}-${pkgver}" } -build() -{ +build() { [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -34,15 +34,12 @@ build() --enable-shared # Hack for mingw python - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX}) find . -type f -name "Makefile" -exec sed -i "s|${PREFIX_DEPS}|${MINGW_PREFIX}|g" {} \; make } -package() -{ +package() { cd "${srcdir}/build-${MINGW_CHOST}" make install DESTDIR="${pkgdir}" } diff --git a/mingw-w64-libxml2/0014-fix-prototype-warning.all.patch b/mingw-w64-libxml2/0014-fix-prototype-warning.all.patch deleted file mode 100644 index d9b10249bd..0000000000 --- a/mingw-w64-libxml2/0014-fix-prototype-warning.all.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- libxml2-2.9.0/threads.c.orig 2013-03-31 15:26:36 +0400 -+++ libxml2-2.9.0/threads.c 2013-03-31 15:27:37 +0400 -@@ -994,11 +994,16 @@ - */ - #ifdef HAVE_PTHREAD_H - #elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) -+/* First prototype, then definition - to placate GCC */ - #if defined(LIBXML_STATIC_FOR_DLL) - BOOL XMLCALL --xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -+xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved); -+BOOL XMLCALL -+xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved) - #else - BOOL WINAPI -+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); -+BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) - #endif - { diff --git a/mingw-w64-libxml2/PKGBUILD b/mingw-w64-libxml2/PKGBUILD index b67c0e88d3..609e9e9ff9 100644 --- a/mingw-w64-libxml2/PKGBUILD +++ b/mingw-w64-libxml2/PKGBUILD @@ -1,25 +1,24 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=libxml2 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.9.2 -pkgrel=1 +pkgrel=6 arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") pkgdesc="XML parsing library, version 2 (mingw-w64)" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-xz") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python2") options=('strip' 'staticlibs') -license=('LGPL') +license=(MIT) url="http://www.xmlsoft.org/" install=${_realname}-${CARCH}.install -source=("http://xmlsoft.org/sources/libxml2-${pkgver}.tar.gz" +source=("http://xmlsoft.org/sources/${_realname}-${pkgver}.tar.gz" "mingw32-libxml2-static-build-compile-fix.patch" - "libxml2-2.8.0_rc1-winnt.patch" - "libxml2-2.9.0-largefile.patch" - "libxml2-2.9.0-man_fixes.patch" - "libxml2-2.9.0-open.gz.patch" - "libxml2-2.9.1-disable_static_modules.patch" + "libxml2-2.9.2-catalog-revert.patch" 0004-detect-ws2tcpip.mingw.patch 0005-fix-char-cast-warning.mingw.patch 0006-fix-unused-var-warning.mingw.patch @@ -30,7 +29,6 @@ source=("http://xmlsoft.org/sources/libxml2-${pkgver}.tar.gz" 0011-more-winsock-inclusion-order-fixes.mingw.patch 0012-socklen-is-signed-on-mingw-w64.mingw.patch 0013-fix-field-type-signedness.all.patch - 0014-fix-prototype-warning.all.patch 0015-fix-unused-parameters-warning.all.patch 0016-WARNING-to-be-fixed.all.patch 0017-fix-const-warning.all.patch @@ -42,11 +40,7 @@ source=("http://xmlsoft.org/sources/libxml2-${pkgver}.tar.gz" 0025-mingw-python-dont-remove-dot.patch) md5sums=('9e6a9aca9d155737868b3dc5fd82f788' '0df377025082cd93cccbca547f048011' - '2a38e25bead58e4b4dc4550317369c90' - '59ace31958bc1e824fc4f1434c778469' - 'eb14f4ce77ac4c55d0262b6be3011913' - '9fd252fcb751fdf72688fe0cddeb373e' - '98ba4981c95bb51a854232dd098a99e8' + '29913184b0072167ae427fa91b2edd4a' 'e3584e2079ba68c4c4c71208663602e0' '6db61e81820ad584b9cd6c7d0bae2d51' 'e526d4e285579c5c8b9c61e889338454' @@ -57,7 +51,6 @@ md5sums=('9e6a9aca9d155737868b3dc5fd82f788' 'ad9137ca850b62ada756a1706bcc65e1' '6b65d303079b21e1c93ec169d5f3f4d0' '543b01b756fa64fafb20819d20c984e6' - '9a56b69cc5b1a7fc5d4eb0bab17ee4df' '6adb6886030e33bd40c29724bece6ee8' 'd9e7c8cbc18c76575fd870ca2e39b66a' 'de11e27ada1d7408aae9b54ed77aafe6' @@ -69,15 +62,11 @@ md5sums=('9e6a9aca9d155737868b3dc5fd82f788' '4a7a5b6027a5dbbfa1a3d7b5787e97bc') prepare() { - cd "${srcdir}/libxml2-${pkgver}" + cd "${srcdir}/${_realname}-${pkgver}" + + patch -Np0 -i "${srcdir}"/mingw32-libxml2-static-build-compile-fix.patch + patch -p1 -i ${srcdir}/libxml2-2.9.2-catalog-revert.patch - #patch -Np0 -i "${srcdir}"/mingw32-libxml2-static-build-compile-fix.patch - #patch -p1 -i ${srcdir}/libxml2-2.9.1-disable_static_modules.patch - #patch -p1 -i ${srcdir}/libxml2-2.8.0_rc1-winnt.patch - patch -p1 -i ${srcdir}/libxml2-2.9.0-largefile.patch - patch -p1 -i ${srcdir}/libxml2-2.9.0-man_fixes.patch - patch -p1 -i ${srcdir}/libxml2-2.9.0-open.gz.patch - patch -p1 -i ${srcdir}/0004-detect-ws2tcpip.mingw.patch patch -p1 -i ${srcdir}/0005-fix-char-cast-warning.mingw.patch patch -p1 -i ${srcdir}/0006-fix-unused-var-warning.mingw.patch @@ -88,7 +77,6 @@ prepare() { patch -p1 -i ${srcdir}/0011-more-winsock-inclusion-order-fixes.mingw.patch patch -p1 -i ${srcdir}/0012-socklen-is-signed-on-mingw-w64.mingw.patch patch -p1 -i ${srcdir}/0013-fix-field-type-signedness.all.patch - patch -p1 -i ${srcdir}/0014-fix-prototype-warning.all.patch patch -p1 -i ${srcdir}/0015-fix-unused-parameters-warning.all.patch patch -p1 -i ${srcdir}/0016-WARNING-to-be-fixed.all.patch patch -p1 -i ${srcdir}/0017-fix-const-warning.all.patch @@ -98,21 +86,18 @@ prepare() { patch -p1 -i ${srcdir}/0023-fix-sitedir-detection.mingw.patch patch -p1 -i ${srcdir}/0024-shrext-pyd.mingw.patch patch -p1 -i ${srcdir}/0025-mingw-python-dont-remove-dot.patch - + libtoolize --copy --force aclocal automake --add-missing autoconf } -build() -{ - export LDFLAGS+=" -Wl,-no-undefined" - export CFLAGS+=" -fexceptions --param=ssp-buffer-size=4" +build() { # Static build mkdir -p ${srcdir}/build-static-${CARCH} && cd ${srcdir}/build-static-${CARCH} - ../libxml2-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -122,12 +107,12 @@ build() --enable-static \ --disable-shared \ --with-threads=win32 \ - CFLAGS="${CFLAGS} -DLIBXML_STATIC_FOR_DLL" + CFLAGS="${CFLAGS} -DLIBXML_STATIC_FOR_DLL" make # Shared build mkdir -p ${srcdir}/build-shared-${CARCH} && cd ${srcdir}/build-shared-${CARCH} - ${srcdir}/libxml2-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -139,17 +124,12 @@ build() --with-threads=win32 # Hack for mingw python - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX}) find . -type f -name "Makefile" -exec sed -i "s|${PREFIX_DEPS}|${MINGW_PREFIX}|g" {} \; make } -package() -{ - cd "${srcdir}/libxml2-${pkgver}" - +package() { # First install shared cd ${srcdir}/build-shared-${CARCH} @@ -159,4 +139,8 @@ package() cd ${srcdir}/build-static-${CARCH} install -m 0644 .libs/libxml2.a "${pkgdir}${MINGW_PREFIX}"/lib/ + + # License + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + rm "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}-${pkgver}/Copyright" # This is the same file as COPYING } diff --git a/mingw-w64-libxml2/libxml2-2.8.0_rc1-winnt.patch b/mingw-w64-libxml2/libxml2-2.8.0_rc1-winnt.patch deleted file mode 100644 index cce3ecb058..0000000000 --- a/mingw-w64-libxml2/libxml2-2.8.0_rc1-winnt.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 168e20836fe9614dd2dd4b42006c17a783f11c48 Mon Sep 17 00:00:00 2001 -From: Markus Duft -Date: Thu, 20 Nov 2008 11:04:33 -0500 -Subject: [PATCH] Fix for ~x86-winnt - -[Alexandre Rostovtsev : port to 2.8.0-rc1] ---- - dict.c | 2 +- - include/wsockcompat.h | 2 +- - nanohttp.c | 2 +- - xmlIO.c | 4 ++++ - 4 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/dict.c b/dict.c -index 3579f64..71e7bc6 100644 ---- a/dict.c -+++ b/dict.c -@@ -47,7 +47,7 @@ - #else - #ifdef HAVE_INTTYPES_H - #include --#elif defined(WIN32) -+#elif defined(WIN32) || defined (__PARITY__) - typedef unsigned __int32 uint32_t; - #endif - #endif -diff --git a/include/wsockcompat.h b/include/wsockcompat.h -index c762a64..1ed822b 100644 ---- a/include/wsockcompat.h -+++ b/include/wsockcompat.h -@@ -27,7 +27,7 @@ - #endif - #endif - --#if defined( __MINGW32__ ) || defined( _MSC_VER ) -+#if defined( __MINGW32__ ) || defined( _MSC_VER ) || defined(__PARITY__) - /* Include here to ensure that it doesn't get included later - * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */ - #include -diff --git a/nanohttp.c b/nanohttp.c -index 2437fed..dbe97a7 100644 ---- a/nanohttp.c -+++ b/nanohttp.c -@@ -74,7 +74,7 @@ - #define XML_SOCKLEN_T unsigned int - #endif - --#if defined(__MINGW32__) || defined(_WIN32_WCE) -+#if defined(__MINGW32__) || defined(_WIN32_WCE) || defined(__PARITY__) - #ifndef _WINSOCKAPI_ - #define _WINSOCKAPI_ - #endif -diff --git a/xmlIO.c b/xmlIO.c -index 73a995d..99562f6 100644 ---- a/xmlIO.c -+++ b/xmlIO.c -@@ -47,6 +47,7 @@ - #include /* for CP_UTF8 */ - #endif - -+#ifndef __PARITY__ - /* Figure a portable way to know if a file is a directory. */ - #ifndef HAVE_STAT - # ifdef HAVE__STAT -@@ -82,6 +83,7 @@ - # endif - # endif - #endif -+#endif /* __PARITY__ */ - - #include - #include -@@ -657,6 +659,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info) - { - #ifdef HAVE_STAT - int retval = -1; -+#ifndef __PARITY__ - wchar_t *wPath; - - wPath = __xmlIOWin32UTF8ToWChar(path); -@@ -665,6 +668,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info) - retval = _wstat(wPath,info); - xmlFree(wPath); - } -+#endif - /* maybe path in native encoding */ - if(retval < 0) - retval = stat(path,info); --- -1.7.8.6 - diff --git a/mingw-w64-libxml2/libxml2-2.9.0-largefile.patch b/mingw-w64-libxml2/libxml2-2.9.0-largefile.patch deleted file mode 100644 index 1022809456..0000000000 --- a/mingw-w64-libxml2/libxml2-2.9.0-largefile.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- libxml2-2.7.6/libxml.h.orig 2009-09-24 17:31:59.000000000 +0200 -+++ libxml2-2.7.6/libxml.h 2009-10-10 18:57:55.681981813 +0200 -@@ -13,6 +13,9 @@ - #ifndef _LARGEFILE_SOURCE - #define _LARGEFILE_SOURCE - #endif -+#ifndef _LARGEFILE64_SOURCE -+#define _LARGEFILE64_SOURCE -+#endif - #ifndef _FILE_OFFSET_BITS - #define _FILE_OFFSET_BITS 64 - #endif diff --git a/mingw-w64-libxml2/libxml2-2.9.0-man_fixes.patch b/mingw-w64-libxml2/libxml2-2.9.0-man_fixes.patch deleted file mode 100644 index 959505d83d..0000000000 --- a/mingw-w64-libxml2/libxml2-2.9.0-man_fixes.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -aurN libxml2-2.6.23.orig/libxml.3 libxml2-2.6.23/libxml.3 ---- libxml2-2.6.23.orig/libxml.3 2005-10-28 18:13:58.000000000 +0200 -+++ libxml2-2.6.23/libxml.3 2006-01-06 23:00:43.000000000 +0100 -@@ -48,14 +48,14 @@ - library exports Push and Pull type parser interfaces for both XML and - .IR html . - .SH FILES --.TP 2.2i --.B /depot/lib/libxml_2.0.0/libxml.a -+.TP -+.B libxml.a - static library - .TP --.B /depot/lib/libxml_2.0.0/libxml.so -+.B libxml.so - shared library - .TP --.B /depot/package/libxml_2.0.0/bin/xmllint -+.B xmllint - binary application for parsing XML files - .SH AUTHORS - Daniel Veillard (daniel@veillard.com). diff --git a/mingw-w64-libxml2/libxml2-2.9.0-open.gz.patch b/mingw-w64-libxml2/libxml2-2.9.0-open.gz.patch deleted file mode 100644 index 342e8b880e..0000000000 --- a/mingw-w64-libxml2/libxml2-2.9.0-open.gz.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -ur libxml2-2.4.20/xmlIO.c libxml2-2.4.20-/xmlIO.c ---- libxml2-2.4.20/xmlIO.c Wed Mar 27 04:35:12 2002 -+++ libxml2-2.4.20-/xmlIO.c Thu May 23 20:35:12 2002 -@@ -465,8 +465,35 @@ - - if (path == NULL) - return(NULL); -- if (!xmlCheckFilename(path)) -- return(NULL); -+ -+ if (!xmlCheckFilename(path)) { -+ /* If we cannot open `foo.xml', we try `foo.xml.gz'. However we i -+ * append .gz only if filename doesn't alreay end with .gz. */ -+ if (strlen(path) < 3 || strcmp(path + strlen(path) - 3, ".gz") != 0) { -+ char *gz_filename = xmlMalloc(strlen(path) + 4); -+ -+ if (gz_filename == NULL) { -+ xmlGenericError(xmlGenericErrorContext, -+ "xmlGzfileOpen: %s\n", -+ "Failure allocating buffer for filename."); -+ return NULL; -+ } -+ -+ strcpy(gz_filename, path); -+ strcat(gz_filename, ".gz"); -+ -+ fd = NULL; -+ -+ if (xmlCheckFilename(gz_filename)) -+ fd = gzopen(gz_filename, "rb"); -+ -+ xmlFree(gz_filename); -+ -+ return((void *) fd); -+ } else { -+ return NULL; -+ } -+ } - - fd = gzopen(path, "rb"); - return((void *) fd); diff --git a/mingw-w64-libxml2/libxml2-2.9.1-disable_static_modules.patch b/mingw-w64-libxml2/libxml2-2.9.1-disable_static_modules.patch deleted file mode 100644 index cd85d240b0..0000000000 --- a/mingw-w64-libxml2/libxml2-2.9.1-disable_static_modules.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- libxml2-2.9.1/python/Makefile.am.orig 2013-04-19 09:56:45 +0300 -+++ libxml2-2.9.1/python/Makefile.am 2013-05-13 10:14:25 +0300 -@@ -24,7 +24,8 @@ - python_LTLIBRARIES = libxml2mod.la - - libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c --libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ -+libxml2mod_la_CPPFLAGS = -shared -+libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version -shared \ - $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) - - BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c diff --git a/mingw-w64-libxml2/libxml2-2.9.2-catalog-revert.patch b/mingw-w64-libxml2/libxml2-2.9.2-catalog-revert.patch new file mode 100644 index 0000000000..57f26a5863 --- /dev/null +++ b/mingw-w64-libxml2/libxml2-2.9.2-catalog-revert.patch @@ -0,0 +1,30 @@ +From 0e6659ec960734b0b01aad196d4bdb4a3800b493 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Thu, 16 Oct 2014 19:10:59 +0200 +Subject: [PATCH] Revert "Missing initialization for the catalog module" + +It's not correct to always load the default catalog. +https://bugzilla.redhat.com/show_bug.cgi?id=1153753 + +This reverts commit 054c716ea1bf001544127a4ab4f4346d1b9947e7. + +--- + parser.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/parser.c b/parser.c +index 1d93967..67c9dfd 100644 +--- a/parser.c ++++ b/parser.c +@@ -14830,9 +14830,6 @@ xmlInitParser(void) { + #ifdef LIBXML_XPATH_ENABLED + xmlXPathInit(); + #endif +-#ifdef LIBXML_CATALOG_ENABLED +- xmlInitializeCatalog(); +-#endif + xmlParserInitialized = 1; + #ifdef LIBXML_THREAD_ENABLED + } +-- +1.9.3 diff --git a/mingw-w64-libxslt/PKGBUILD b/mingw-w64-libxslt/PKGBUILD index 28a1554ea4..a432de4ccf 100644 --- a/mingw-w64-libxslt/PKGBUILD +++ b/mingw-w64-libxslt/PKGBUILD @@ -1,30 +1,28 @@ # Maintainer: Alexey Pavlov _realname=libxslt - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.1.28 -pkgrel=4 +pkgrel=5 pkgdesc="XML stylesheet transformation library (mingw-w64)" arch=('any') url="http://xmlsoft.org/XSLT/" license=('custom') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-libgcrypt") -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' 'staticlibs') install=${_realname}-${CARCH}.install -source=("http://xmlsoft.org/sources/libxslt-${pkgver}.tar.gz" - "libxslt-1.1.26-w64.patch" - "libxslt-1.1.27-disable_static_modules.patch" - "libxslt-1.1.28-win32-shared.patch" - "libxslt.m4-libxslt-1.1.26.patch" - '0002-python-linking-on.mingw.patch' - '0003-fix-concurrent-directory-creation.all.patch' - '0004-add-missing-include-for-python.all.patch' - '0005-fix-freelocales-export.all.patch' - '0006-no-undefined-tests.patch' - '0007-use-mingw-C99-compatible-functions-{v}snprintf.patch') +source=("http://xmlsoft.org/sources/${_realname}-${pkgver}.tar.gz" + "libxslt-1.1.26-w64.patch" + "libxslt-1.1.27-disable_static_modules.patch" + "libxslt-1.1.28-win32-shared.patch" + "libxslt.m4-libxslt-1.1.26.patch" + '0002-python-linking-on.mingw.patch' + '0003-fix-concurrent-directory-creation.all.patch' + '0004-add-missing-include-for-python.all.patch' + '0005-fix-freelocales-export.all.patch' + '0006-no-undefined-tests.patch' + '0007-use-mingw-C99-compatible-functions-{v}snprintf.patch') md5sums=('9667bf6f9310b957254fdcf6596600b7' 'b994c0d9df0f644e219cf63561ee0d4e' '05498030f492ffb0774869bacafe5fc1' @@ -38,7 +36,7 @@ md5sums=('9667bf6f9310b957254fdcf6596600b7' '4fc5c9dc73cb6e4d8d35e58c0d447f2a') prepare() { - cd "$srcdir/libxslt-${pkgver}" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i "${srcdir}/libxslt-1.1.26-w64.patch" patch -p1 -i "${srcdir}/libxslt-1.1.27-disable_static_modules.patch" patch -p1 -i "${srcdir}/libxslt-1.1.28-win32-shared.patch" @@ -55,8 +53,9 @@ prepare() { } build() { - mkdir -p "$srcdir/build-${CARCH}" && cd "$srcdir/build-${CARCH}" - $srcdir/libxslt-${pkgver}/configure \ + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" + mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -68,17 +67,14 @@ build() { --with-python=${MINGW_PREFIX}/bin/python2 # Hack for mingw python - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX}) find . -type f -name "Makefile" -exec sed -i "s|${PREFIX_DEPS}|${MINGW_PREFIX}|g" {} \; make } package() { export MSYS2_ARG_CONV_EXCL="-//OASIS" - cd "$srcdir/build-${CARCH}" - make DESTDIR="$pkgdir" install - #rm -r "${pkgdir}${MINGW_PREFIX}"/share + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libyaml/0002-libyaml-no-undefined.patch b/mingw-w64-libyaml/0002-libyaml-no-undefined.patch new file mode 100644 index 0000000000..30c71238e7 --- /dev/null +++ b/mingw-w64-libyaml/0002-libyaml-no-undefined.patch @@ -0,0 +1,9 @@ +--- a/src/Makefile.am 2015-04-22 14:10:00.418785980 +0200 ++++ b/src/Makefile.am 2015-04-22 14:10:10.562836277 +0200 +@@ -1,4 +1,4 @@ +-AM_CPPFLAGS = -I$(top_srcdir)/include ++AM_CPPFLAGS = -I$(top_srcdir)/include -DYAML_DECLARE_EXPORT + lib_LTLIBRARIES = libyaml.la + libyaml_la_SOURCES = yaml_private.h api.c reader.c scanner.c parser.c loader.c writer.c emitter.c dumper.c +-libyaml_la_LDFLAGS = -release $(YAML_LT_RELEASE) -version-info $(YAML_LT_CURRENT):$(YAML_LT_REVISION):$(YAML_LT_AGE) ++libyaml_la_LDFLAGS = -no-undefined -release $(YAML_LT_RELEASE) -version-info $(YAML_LT_CURRENT):$(YAML_LT_REVISION):$(YAML_LT_AGE) diff --git a/mingw-w64-libyaml/PKGBUILD b/mingw-w64-libyaml/PKGBUILD index 10a251900a..34b4307f16 100644 --- a/mingw-w64-libyaml/PKGBUILD +++ b/mingw-w64-libyaml/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=libyaml - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.1.4 +pkgver=0.1.6 pkgrel=2 pkgdesc="YAML 1.1 library (mingw-w64)" arch=('any') @@ -11,31 +10,35 @@ url="http://pyyaml.org/wiki/LibYAML" license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('staticlibs' 'strip') -source=("http://pyyaml.org/download/libyaml/yaml-$pkgver.tar.gz" -"0001-Proper-mingw-YAML_DECLARE-definition.patch") -md5sums=('36c852831d02cf90508c29852361d01b' - '62993ee836b420adc99bc42dff09436b') +source=(${_realname}-${pkgver}.tar.bz2::https://bitbucket.org/xi/libyaml/get/${pkgver}.tar.bz2 + "0001-Proper-mingw-YAML_DECLARE-definition.patch" + "0002-libyaml-no-undefined.patch") +md5sums=('5b2d2f8c889fed55e98d6b1a0a89f607' + '62993ee836b420adc99bc42dff09436b' + 'fb8fcb80f89abeee56310b2568749276') prepare() { - cd "$srcdir/yaml-$pkgver" - patch -Np1 -i "$srcdir/0001-Proper-mingw-YAML_DECLARE-definition.patch" + cd ${srcdir}/xi-libyaml-* + patch -Np1 -i "$srcdir/0001-Proper-mingw-YAML_DECLARE-definition.patch" + patch -Np1 -i "$srcdir/0002-libyaml-no-undefined.patch" + + autoreconf -fiv } build() { - mkdir -p "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - "${srcdir}"/yaml-$pkgver/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} - make - gcc -shared src/.libs/*.o -o libyaml.dll -Xlinker --out-implib -Xlinker libyaml.dll.a + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + ../xi-libyaml-*/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make } package() { - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - make DESTDIR="$pkgdir" install - install -Dm644 "libyaml.dll" "${pkgdir}${MINGW_PREFIX}/bin/libyaml.dll" - install -m644 "libyaml.dll.a" "${pkgdir}${MINGW_PREFIX}/lib/libyaml.dll.a" + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-libzip/PKGBUILD b/mingw-w64-libzip/PKGBUILD new file mode 100644 index 0000000000..857158b20b --- /dev/null +++ b/mingw-w64-libzip/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Jianfeng Liu + +_realname=libzip +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0.1 +pkgrel=2 +pkgdesc="A C library for reading, creating, and modifying zip archives (mingw-w64)" +url="http://www.nih.at/libzip/index.html" +license=('BSD') +arch=('any') +depends=("${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=('staticlibs' '!libtool') +source=("http://www.nih.at/${_realname}/${_realname}-${pkgver}.tar.xz") +md5sums=('e2371fc6f04a46efdaf8cbf4118ffafd') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + autoreconf -fi +} + +build() { + mkdir -p "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + + make DESTDIR="${pkgdir}" install + + # preserve old header path for compatibility + # ln -s ${MINGW_PREFIX}/lib/libzip/include/zipconf.h "${pkgdir}${MINGW_PREFIX}/include/zipconf.h" + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENSE "${pkgdir}/${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-live-media/PKGBUILD b/mingw-w64-live-media/PKGBUILD index e52306dbb1..c42235f889 100644 --- a/mingw-w64-live-media/PKGBUILD +++ b/mingw-w64-live-media/PKGBUILD @@ -5,7 +5,7 @@ _realname=live-media pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2014.10.21 +pkgver=2015.06.25 pkgrel=1 pkgdesc="A set of C++ libraries for multimedia streaming (mingw-w64)" arch=('any') @@ -14,7 +14,7 @@ url="http://live555.com/liveMedia" depends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs') source=("http://live555.com/liveMedia/public/live.${pkgver}.tar.gz") -md5sums=('c07bbbe7be3add603879431b624b8092') +md5sums=('7c13d58c020efa42369b5f23a839be0c') build() { cd ${srcdir}/live diff --git a/mingw-w64-lua-lpeg/LICENSE b/mingw-w64-lua-lpeg/LICENSE new file mode 100644 index 0000000000..71163fb9db --- /dev/null +++ b/mingw-w64-lua-lpeg/LICENSE @@ -0,0 +1,7 @@ +Copyright © 2008 Lua.org, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/mingw-w64-lua-lpeg/PKGBUILD b/mingw-w64-lua-lpeg/PKGBUILD new file mode 100644 index 0000000000..57fc5d32f3 --- /dev/null +++ b/mingw-w64-lua-lpeg/PKGBUILD @@ -0,0 +1,90 @@ +# Maintainer: David Macek +# Contributor (Arch Linux): Gustavo Alvarez +# Contributor: Felix Huettner + +_realname=lpeg +pkgname=("${MINGW_PACKAGE_PREFIX}-lua-${_realname}" + "${MINGW_PACKAGE_PREFIX}-lua51-${_realname}") +pkgver=0.12 +pkgrel=2 +arch=('any') +url='http://www.inf.puc-rio.br/~roberto/lpeg' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-lua51" + "${MINGW_PACKAGE_PREFIX}-gcc") +source=(#"http://www.inf.puc-rio.br/~roberto/${_realname}/${_realname}-${pkgver}.tar.gz" + ${_realname}-${pkgver}.tar.gz::https://github.com/lua/lpeg/archive/${pkgver}.tar.gz + "lpeg-0.12-makefile.patch" + "lptypes-lua-503.patch" + "LICENSE") +md5sums=('96a468edb8c51087e15600a2a6c714d6' + '8f2f06957131ccb64413433c08e18d65' + '1b876fcf29e29dafae1ca8c5362236c3' + 'dccb97b431c3a3ccaacc216c6242e9fd') + +prepare() { + cd "${_realname}-${pkgver}" + patch -p1 -i "${srcdir}/lpeg-0.12-makefile.patch" + patch -p1 -i "${srcdir}/lptypes-lua-503.patch" + sed -i 's/lpeg.so/lpeg.dll/' makefile + + mkdir -p "${srcdir}/build-${CARCH}" "${srcdir}/build-51-${CARCH}" + cp -rf * "${srcdir}/build-${CARCH}" + sed -i 's/env lua5.1/env lua/' "${srcdir}/build-${CARCH}/test.lua" + cp -rf * "${srcdir}/build-51-${CARCH}" +} + +build() { + cd "${srcdir}/build-${CARCH}" + make LUADIR=${MINGW_PREFIX}/include LDFLAGS="$(pkg-config lua --libs)" + + cd "${srcdir}/build-51-${CARCH}" + make LUADIR=${MINGW_PREFIX}/include/lua5.1 LDFLAGS="$(pkg-config lua5.1 --libs)" +} + +check() { + cd "${srcdir}/build-${CARCH}" + make test + + cd "${srcdir}/build-51-${CARCH}" + make test +} + +package_mingw-w64-lua-lpeg() { + pkgdesc='Pattern-matching library for Lua (mingw-w64)' + depends=("${MINGW_PACKAGE_PREFIX}-lua") + + cd "${srcdir}/build-${CARCH}" + + local luaver=$(pkg-config lua --modversion | sed -r 's/^([0-9]+[.][0-9]+)[.][0-9]+$/\1/') + install -Dm755 lpeg.dll "${pkgdir}${MINGW_PREFIX}/lib/lua/${luaver}/lpeg.dll" + install -Dm644 re.lua "${pkgdir}${MINGW_PREFIX}/share/lua/${luaver}/re.lua" + install -Dm644 "${srcdir}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/lua-lpeg/LICENSE" +} + +package_mingw-w64-lua51-lpeg() { + pkgdesc='Pattern-matching library for Lua 5.1 (mingw-w64)' + depends=("${MINGW_PACKAGE_PREFIX}-lua51") + + cd "${srcdir}/build-51-${CARCH}" + install -Dm755 lpeg.dll "${pkgdir}${MINGW_PREFIX}/lib/lua/5.1/lpeg.dll" + install -Dm644 re.lua "${pkgdir}${MINGW_PREFIX}/share/lua/5.1/re.lua" + install -Dm644 "${srcdir}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/lua51-lpeg/LICENSE" +} + +package_mingw-w64-i686-lua-lpeg() { + package_mingw-w64-lua-lpeg +} + +package_mingw-w64-x86_64-lua-lpeg() { + package_mingw-w64-lua-lpeg +} + +package_mingw-w64-i686-lua51-lpeg() { + package_mingw-w64-lua51-lpeg +} + +package_mingw-w64-x86_64-lua51-lpeg() { + package_mingw-w64-lua51-lpeg +} diff --git a/mingw-w64-lua-lpeg/lpeg-0.12-makefile.patch b/mingw-w64-lua-lpeg/lpeg-0.12-makefile.patch new file mode 100644 index 0000000000..62eb497ce7 --- /dev/null +++ b/mingw-w64-lua-lpeg/lpeg-0.12-makefile.patch @@ -0,0 +1,37 @@ +--- lpeg-0.12/makefile ++++ lpeg-0.12/makefile +@@ -1,7 +1,7 @@ + LIBNAME = lpeg + LUADIR = /usr/include/lua5.1/ + +-COPT = -O2 ++#COPT = -O2 + # COPT = -DLPEG_DEBUG -g + + CWARNS = -Wall -Wextra -pedantic \ +@@ -22,21 +22,21 @@ + # -Wunreachable-code \ + + +-CFLAGS = $(CWARNS) $(COPT) -ansi -I$(LUADIR) -fPIC ++CFLAGS += $(CWARNS) $(COPT) -ansi -I$(LUADIR) -fPIC + CC = gcc + + FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o + + # For Linux + linux: +- make lpeg.so "DLLFLAGS = -shared -fPIC" ++ $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC" + + # For Mac OS + macosx: +- make lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" ++ $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" + + lpeg.so: $(FILES) +- env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so ++ env $(CC) $(CFLAGS) $(DLLFLAGS) $(FILES) -o lpeg.so $(LDFLAGS) + + $(FILES): makefile + diff --git a/mingw-w64-lua-lpeg/lptypes-lua-503.patch b/mingw-w64-lua-lpeg/lptypes-lua-503.patch new file mode 100644 index 0000000000..c667128484 --- /dev/null +++ b/mingw-w64-lua-lpeg/lptypes-lua-503.patch @@ -0,0 +1,30 @@ +--- lpeg-0.12/lptypes.h 2015-04-08 08:39:37.670848100 +0200 ++++ lpeg-0.12/lptypes.h 2015-04-08 08:41:08.649094600 +0200 +@@ -27,9 +27,9 @@ + + + /* +-** compatibility with Lua 5.2 ++** compatibility with Lua 5.2 and higher + */ +-#if (LUA_VERSION_NUM == 502) ++#if (LUA_VERSION_NUM >= 502) + + #undef lua_equal + #define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) +@@ -48,6 +48,15 @@ + + #endif + ++/* ++** compatibility with Lua 5.3 and higher ++*/ ++#if (LUA_VERSION_NUM >= 503) ++ ++#undef luaL_checkint ++#define luaL_checkint luaL_checkinteger ++ ++#endif + + /* default maximum size for call/backtrack stack */ + #if !defined(MAXBACK) diff --git a/mingw-w64-lua/PKGBUILD b/mingw-w64-lua/PKGBUILD index 1b45693fed..17a90646a3 100644 --- a/mingw-w64-lua/PKGBUILD +++ b/mingw-w64-lua/PKGBUILD @@ -1,44 +1,68 @@ # Maintainer: Alexey Pavlov +# Contributor: David Macek +# Contributor: Felix Huettner _realname=lua pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.2.3 -pkgrel=4 -pkgdesc="A powerful light-weight programming language designed for extending applications. (mingw-w64)" +pkgver=5.3.1 +pkgrel=2 +pkgdesc="A powerful light-weight programming language designed for extending applications. (mingw-w64)" arch=('any') -url="http://www.lua.org/" +url="http://www.lua.org/" license=('MIT') +depends=('winpty') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip' 'emptydirs') -source=($url/ftp/lua-$pkgver.tar.gz - 'lua.pc') -md5sums=('dc7f94ec6ff15c985d2d6ad0f1b35654' - 'e7ba6c2b695b0b84a5ea0cbff5fc9067') +source=("${url}/ftp/lua-${pkgver}.tar.gz" + 'lua.pc' + 'searchpath.patch' + 'implib.patch') +md5sums=('797adacada8d85761c079390ff1d9961' + 'e7ba6c2b695b0b84a5ea0cbff5fc9067' + 'd326b414c07e71140eca36644139ed5c' + '311bd695726bd42279e7d786a494b9cf') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + cp "${srcdir}/lua.pc" . + patch -p0 -i "${srcdir}/implib.patch" + patch -p0 -i "${srcdir}/searchpath.patch" +} build() { - cp ${srcdir}/lua.pc ${srcdir}/${_realname}-${pkgver}/ - cd ${srcdir}/${_realname}-${pkgver} - sed -e "s|%VER%|${pkgver%.*}|g;s|%REL%|$pkgver|g" \ + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" + cp -rf "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" + sed -e "s|%VER%|${pkgver%.*}|g;s|%REL%|${pkgver}|g" \ -e "s|/usr|${MINGW_PREFIX}|g" \ -i lua.pc - make -j1 \ AR="ar rcu" \ RANLIB="ranlib" \ STRIP="strip" \ CC="${MINGW_CHOST}-gcc" \ - INSTALL_TOP="${pkgdir}${MINGW_PREFIX}" \ - INSTALL_MAN="${pkgdir}${MINGW_PREFIX}"/share/man/man1 \ - TO_BIN="lua.exe luac.exe lua52.dll" \ - mingw install - make clean + mingw } package() { - cd ${srcdir}/${_realname}-${pkgver} + cd "${srcdir}/build-${CARCH}" + make \ + TO_BIN="lua.exe luac.exe lua53.dll" \ + TO_LIB="liblua.a liblua.dll.a" \ + INSTALL_TOP="${pkgdir}${MINGW_PREFIX}" \ + INSTALL_MAN="${pkgdir}${MINGW_PREFIX}"/share/man/man1 \ + install + + # Use winpty to wrap the exe when executed from bash. Please don't move this into a patch as hopefully one day we won't need this hack. + local _exename="lua" + mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe + echo "#!/usr/bin/env bash" > "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + echo '/usr/bin/winpty "$( dirname ${BASH_SOURCE[0]} )/'${_exename}'.exe" "$@"' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe + install -Dm644 lua.pc "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/lua.pc - install -Dm644 lua.pc "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/lua5.2.pc + install -Dm644 lua.pc "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/lua5.3.pc # Install the documentation install -d "${pkgdir}${MINGW_PREFIX}"/share/doc/lua diff --git a/mingw-w64-lua/implib.patch b/mingw-w64-lua/implib.patch new file mode 100644 index 0000000000..4447c59596 --- /dev/null +++ b/mingw-w64-lua/implib.patch @@ -0,0 +1,11 @@ +--- src/Makefile.orig 2015-04-07 11:24:43.263584500 +0200 ++++ src/Makefile 2015-04-07 11:27:47.791263800 +0200 +@@ -114,7 +114,7 @@ + + mingw: + $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ +- "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \ ++ "AR=$(CC) -shared -Wl,--out-implib,liblua.dll.a -o" "RANLIB=strip --strip-unneeded" \ + "SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe + $(MAKE) "LUAC_T=luac.exe" luac.exe + diff --git a/mingw-w64-lua/searchpath.patch b/mingw-w64-lua/searchpath.patch new file mode 100644 index 0000000000..eb0de8d72f --- /dev/null +++ b/mingw-w64-lua/searchpath.patch @@ -0,0 +1,14 @@ +--- src/luaconf.h.orig 2015-04-07 11:28:32.057058000 +0200 ++++ src/luaconf.h 2015-04-07 11:31:03.305023800 +0200 +@@ -160,8 +160,9 @@ + ** In Windows, any exclamation mark ('!') in the path is replaced by the + ** path of the directory of the executable file of the current process. + */ +-#define LUA_LDIR "!\\lua\\" +-#define LUA_CDIR "!\\" ++#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "\\" ++#define LUA_LDIR "!\\..\\share\\lua\\" LUA_VDIR ++#define LUA_CDIR "!\\..\\lib\\lua\\" LUA_VDIR + #define LUA_SHRDIR "!\\..\\share\\lua\\" LUA_VDIR "\\" + #define LUA_PATH_DEFAULT \ + LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ diff --git a/mingw-w64-lua51/PKGBUILD b/mingw-w64-lua51/PKGBUILD index dfbfb9f4df..e3f5707ac7 100644 --- a/mingw-w64-lua51/PKGBUILD +++ b/mingw-w64-lua51/PKGBUILD @@ -1,26 +1,26 @@ # Maintainer: Alexey Pavlov +# Contributor: David Macek _realname=lua51 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=5.1.5 -pkgrel=2 -pkgdesc="A powerful light-weight programming language designed for extending applications. Version 5.1.x. (mingw-w64)" +pkgrel=4 +pkgdesc="A powerful light-weight programming language designed for extending applications. Version 5.1.x (mingw-w64)" arch=('any') -url="http://www.lua.org/" +url="http://www.lua.org/" license=('MIT') +depends=('winpty') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip' 'emptydirs') -source=($url/ftp/lua-$pkgver.tar.gz) -md5sums=('2e115fe26e435e33b0d5c022e4490567') +source=("${url}/ftp/lua-${pkgver}.tar.gz" + 'searchpath.patch' + 'implib.patch') +md5sums=('2e115fe26e435e33b0d5c022e4490567' + '6eaf36fb486420035acbd82ce94743bb' + 'cfbde7b555098a85e3b3fede0822d25a') -build() { - cd ${srcdir}/lua-${pkgver} - - sed -e 's:llua:llua5.1:' \ - -e 's:/include:/include/lua5.1:' \ - -e "s:/usr/local:${MINGW_PREFIX}:" \ - -i etc/lua.pc\ +prepare() { + cd "${srcdir}/lua-${pkgver}" sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' \ -e '/^LUAC_T=/ s/luac/luac5.1/' \ @@ -28,29 +28,50 @@ build() { -e 's/luac.exe/luac5.1.exe/' \ -e 's/luac.exe/luac5.1.exe/' \ -i src/Makefile - + patch -p0 -i "${srcdir}/implib.patch" + patch -p0 -i "${srcdir}/searchpath.patch" + + mkdir -p "${srcdir}/build-${CARCH}" + cp -r * "${srcdir}/build-${CARCH}" +} + +build() { + cd "${srcdir}/build-${CARCH}" + sed -e 's:llua:llua5.1:' \ + -e 's:/include:/include/lua5.1:' \ + -e "s:/usr/local:${MINGW_PREFIX}:" \ + -i etc/lua.pc + make -j1 \ AR="ar rcu" \ RANLIB="ranlib" \ STRIP="strip" \ CC="${MINGW_CHOST}-gcc" \ - INSTALL_TOP="${pkgdir}${MINGW_PREFIX}" \ - INSTALL_DATA='cp -d' \ - INSTALL_INC="${pkgdir}${MINGW_PREFIX}"/include/lua5.1 \ - INSTALL_MAN="${pkgdir}${MINGW_PREFIX}"/share/man/man1 \ - TO_BIN="lua5.1.exe luac5.1.exe lua51.dll" \ - TO_LIB="liblua5.1.a" \ - mingw install - make clean + mingw } -package(){ - cd ${srcdir}/lua-${pkgver} - install -Dm644 etc/lua.pc ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/lua5.1.pc - install -d "${pkgdir}${MINGW_PREFIX}/share/doc/$_realname" +package() { + cd "${srcdir}/build-${CARCH}" + make \ + TO_BIN="lua5.1.exe luac5.1.exe lua51.dll" \ + TO_LIB="liblua5.1.a liblua5.1.dll.a" \ + INSTALL_DATA='cp -d' \ + INSTALL_TOP="${pkgdir}${MINGW_PREFIX}" \ + INSTALL_INC="${pkgdir}${MINGW_PREFIX}"/include/lua5.1 \ + INSTALL_MAN="${pkgdir}${MINGW_PREFIX}"/share/man/man1 \ + install + install -Dm644 etc/lua.pc "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/lua5.1.pc + install -d "${pkgdir}${MINGW_PREFIX}"/share/doc/$_realname install -m644 doc/*.{gif,png,css,html} "${pkgdir}${MINGW_PREFIX}"/share/doc/${_realname} install -Dm644 COPYRIGHT "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/COPYRIGHT - + + # Use winpty to wrap the exe when executed from bash. Please don't move this into a patch as hopefully one day we won't need this hack. + local _exename="lua5.1" + mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe + echo "#!/usr/bin/env bash" > "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + echo '/usr/bin/winpty "$( dirname ${BASH_SOURCE[0]} )/'${_exename}'.exe" "$@"' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe + cd "${pkgdir}${MINGW_PREFIX}"/share/man/man1 mv lua.1 lua5.1.1 mv luac.1 luac5.1.1 diff --git a/mingw-w64-lua51/implib.patch b/mingw-w64-lua51/implib.patch new file mode 100644 index 0000000000..04013b8c61 --- /dev/null +++ b/mingw-w64-lua51/implib.patch @@ -0,0 +1,11 @@ +--- src/Makefile.orig 2015-03-21 02:28:50.676835400 +0100 ++++ src/Makefile 2015-03-21 02:30:35.989929400 +0100 +@@ -105,7 +105,7 @@ + + mingw: + $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua5.1.exe" \ +- "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \ ++ "AR=$(CC) -shared -Wl,--out-implib=liblua5.1.dll.a -o" "RANLIB=strip --strip-unneeded" \ + "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua5.1.exe + $(MAKE) "LUAC_T=luac5.1.exe" luac5.1.exe + diff --git a/mingw-w64-lua51/searchpath.patch b/mingw-w64-lua51/searchpath.patch new file mode 100644 index 0000000000..3003e21e01 --- /dev/null +++ b/mingw-w64-lua51/searchpath.patch @@ -0,0 +1,13 @@ +--- src/luaconf.h.orig 2008-02-11 17:25:08.000000000 +0100 ++++ src/luaconf.h 2015-03-21 13:04:23.674094700 +0100 +@@ -85,8 +85,8 @@ + ** In Windows, any exclamation mark ('!') in the path is replaced by the + ** path of the directory of the executable file of the current process. + */ +-#define LUA_LDIR "!\\lua\\" +-#define LUA_CDIR "!\\" ++#define LUA_LDIR "!\\..\\share\\lua\\5.1\\" ++#define LUA_CDIR "!\\..\\lib\\lua\\5.1\\" + #define LUA_PATH_DEFAULT \ + ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua" diff --git a/mingw-w64-luabind-git/PKGBUILD b/mingw-w64-luabind-git/PKGBUILD index da9b9a11ee..ba3273502b 100644 --- a/mingw-w64-luabind-git/PKGBUILD +++ b/mingw-w64-luabind-git/PKGBUILD @@ -2,7 +2,7 @@ _realname=luabind pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=0.9.1.142.g2b904b3 +pkgver=0.9.1.144.ge414c57 pkgrel=1 pkgdesc="A library that helps you create bindings between C++ and Lua (mingw-w64)" arch=('any') @@ -15,24 +15,25 @@ source=("${_realname}"::"git+https://github.com/DennisOSRM/luabind.git") md5sums=(SKIP) pkgver() { - cd "$_realname" + cd "${_realname}" git describe --tags | sed -e 's|-|.|g' -e 's|v||g' } build() { - echo "Build static version..." - [[ -d ${srcdir}/static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/static-${MINGW_CHOST} - mkdir ${srcdir}/static-${MINGW_CHOST} - cd "${srcdir}/static-${MINGW_CHOST}" + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ ../${_realname} + make } package() { - cd "${srcdir}/static-${MINGW_CHOST}" - make install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-luajit-git/001-make-import-library.patch b/mingw-w64-luajit-git/001-make-import-library.patch new file mode 100644 index 0000000000..04ababe7a3 --- /dev/null +++ b/mingw-w64-luajit-git/001-make-import-library.patch @@ -0,0 +1,11 @@ +--- luajit/src/Makefile.orig 2014-12-04 10:17:07.822800000 +0300 ++++ luajit/src/Makefile 2014-12-04 10:17:48.273600000 +0300 +@@ -287,7 +287,7 @@ + TARGET_SYS?= $(HOST_SYS) + ifeq (Windows,$(TARGET_SYS)) + TARGET_STRIP+= --strip-unneeded +- TARGET_XSHLDFLAGS= -shared ++ TARGET_XSHLDFLAGS= -shared -Wl,--out-implib,libluajit-${ABIVER}.dll.a + TARGET_DYNXLDOPTS= + else + ifeq (Darwin,$(TARGET_SYS)) diff --git a/mingw-w64-luajit-git/002-fix-pkg-config-file.patch b/mingw-w64-luajit-git/002-fix-pkg-config-file.patch new file mode 100644 index 0000000000..a61d1b5766 --- /dev/null +++ b/mingw-w64-luajit-git/002-fix-pkg-config-file.patch @@ -0,0 +1,9 @@ +--- luajit/etc/luajit.pc.orig 2015-07-13 09:32:17.569800000 +0300 ++++ luajit/etc/luajit.pc 2015-07-13 09:32:22.858200000 +0300 +@@ -21,5 +21,5 @@ + Version: ${version} + Requires: + Libs: -L${libdir} -l${libname} +-Libs.private: -Wl,-E -lm -ldl ++Libs.private: -Wl,-E -lm + Cflags: -I${includedir} diff --git a/mingw-w64-luajit-git/PKGBUILD b/mingw-w64-luajit-git/PKGBUILD new file mode 100644 index 0000000000..a58adbfa37 --- /dev/null +++ b/mingw-w64-luajit-git/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Martell Malone + +_realname=luajit +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=v2.0.4.3.g575bfe5 +pkgrel=1 +pkgdesc="Just-in-time compiler and drop-in replacement for Lua 5.1 (mingw-w64)" +arch=('any') +url="http://luajit.org/" +license=('MIT') +depends=('winpty-git') +conflicts=("${MINGW_PACKAGE_PREFIX}-lua51") +provides=("${MINGW_PACKAGE_PREFIX}-lua51") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git") +options=('strip' 'staticlibs') +source=("${_realname}"::"git+http://luajit.org/git/luajit-2.0.git" + 001-make-import-library.patch + 002-fix-pkg-config-file.patch) +md5sums=('SKIP' + '668114665f129fa461bdebc53d9952c2' + '2b3aec6c289fbfc40a32762e0e36324e') + +pkgver() { + cd "${srcdir}/${_realname}" + git describe --tags | sed 's|-|.|g' +} + +prepare() { + cd "${srcdir}/${_realname}" + patch -p1 -i ${srcdir}/001-make-import-library.patch + patch -p1 -i ${srcdir}/002-fix-pkg-config-file.patch + sed -i "s|export PREFIX= /usr/local|export PREFIX="${MINGW_PREFIX}"|g" ${srcdir}/${_realname}/Makefile +} + +build() { + cd "${srcdir}/${_realname}" + make +} + +package() { + cd "${srcdir}/${_realname}" + make DESTDIR=${pkgdir} install + + _exename=${_realname} + echo "#!/usr/bin/env bash" > "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + echo '/usr/bin/winpty "$( dirname ${BASH_SOURCE[0]} )/'${_exename}'.exe" "$@"' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + + install -v -Dm644 "${srcdir}/${_realname}/src/lua51.dll" "${pkgdir}${MINGW_PREFIX}/bin/lua51.dll" || exit 1 + install -v -Dm644 "${srcdir}/${_realname}/src/luajit.exe" "${pkgdir}${MINGW_PREFIX}/bin/luajit.exe" || exit 1 + install -v -Dm644 "${srcdir}/${_realname}/src/libluajit-5.1.dll.a" "${pkgdir}${MINGW_PREFIX}/lib/libluajit-5.1.dll.a" || exit 1 + + #cp ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/lua{jit,51}.pc + cp ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/lua{jit,5.1}.pc +} diff --git a/mingw-w64-luatex-svn/0001-Add-missing-kpathsea-win32-mktex.h-and-mkpaths.c.patch b/mingw-w64-luatex-svn/0001-Add-missing-kpathsea-win32-mktex.h-and-mkpaths.c.patch new file mode 100644 index 0000000000..83425ee7bf --- /dev/null +++ b/mingw-w64-luatex-svn/0001-Add-missing-kpathsea-win32-mktex.h-and-mkpaths.c.patch @@ -0,0 +1,157 @@ +diff -urN build-x86_64.orig/source/texk/kpathsea/win32/mkpaths.c build-x86_64/source/texk/kpathsea/win32/mkpaths.c +--- build-x86_64.orig/source/texk/kpathsea/win32/mkpaths.c 1970-01-01 01:00:00.000000000 +0100 ++++ build-x86_64/source/texk/kpathsea/win32/mkpaths.c 2015-08-05 22:32:42.035330000 +0100 +@@ -0,0 +1,95 @@ ++/* mkpaths.c ++ ++ Copyright 2015 Akira Kakuto. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this library; if not, see . ++*/ ++ ++#include ++#include "mktex.h" ++ ++char ** ++mkpaths (int *numptr) ++{ ++ char **pathbuff; ++ char *texmfdbs; ++ char *p, *pa, *pc; ++ int i; ++ ++ if (!(p = kpse_var_value ("TEXMFDBS"))) { ++ fprintf (stderr, "No definition of TEXMFDBS.\n"); ++ return NULL; ++ } ++ ++ texmfdbs = kpse_brace_expand (p); ++ free (p); ++ if (!texmfdbs) { ++ fprintf (stderr, "I cannot expand braces in TEXMFDBS.\n"); ++ return NULL; ++ } ++ ++ p = texmfdbs; ++ i = 0; ++ ++ while(*p) { ++ if(*p == '!' && *(p+1) == '!') ++ p += 2; ++ if(*p == ';') ++ while(*p == ';') ++ p++; ++ if(*p && *p != '!') { ++ while(*p != ';' && *p) ++ p++; ++ i++; ++ while(*p == ';') ++ p++; ++ } ++ } ++ ++ if (!i) { ++ free (texmfdbs); ++ fprintf (stderr, "No database paths in TEXMFDBS.\n"); ++ return NULL; ++ } ++ ++ *numptr = i; ++ pathbuff = xmalloc(i * sizeof(char *)); ++ ++ p = texmfdbs; ++ i = 0; ++ ++ while (*p) { ++ if (*p == '!' && *(p + 1) == '!') ++ p += 2; ++ if (*p == ';') { ++ while (*p == ';') ++ p++; ++ } ++ if(*p && *p != '!') { ++ pa = p; ++ while(*p != ';' && *p) ++ p++; ++ pc = p; ++ pathbuff[i] = xmalloc(pc - pa + 1); ++ strncpy(pathbuff[i], pa, pc - pa); ++ pathbuff[i][pc - pa] = 0; ++ i++; ++ while(*p == ';') ++ p++; ++ } ++ } ++ ++ free(texmfdbs); ++ return pathbuff; ++} +diff -urN build-x86_64.orig/source/texk/kpathsea/win32/mktex.h build-x86_64/source/texk/kpathsea/win32/mktex.h +--- build-x86_64.orig/source/texk/kpathsea/win32/mktex.h 1970-01-01 01:00:00.000000000 +0100 ++++ build-x86_64/source/texk/kpathsea/win32/mktex.h 2015-08-05 22:32:42.050930000 +0100 +@@ -0,0 +1,54 @@ ++/* mktex.h ++ ++ Copyright 2000, 2015 Akira Kakuto. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this library; if not, see . ++*/ ++ ++#ifndef MKTEX_H ++#define MKTEX_H ++ ++static inline void ++normalize (char *p) { ++ for (; *p; p++) { ++ if (IS_KANJI(p)) ++ p++; ++ else if (*p == '\\') ++ *p = '/'; ++ } ++} ++ ++/* dirutil.c */ ++extern int is_dir (char *buff); ++extern int make_dir (char *buff); ++extern int make_dir_p (char *buff); ++ ++/* getdestdir.c ++ ++ from mktexmf: ++ argv[0] = "Dummy", argv[1] = "source", argv[2] = path ++ from mktexpk: ++ argv[0] = "Dummy", argv[1] = "pk", argv[2] = path, argv[3] = mode ++ from mktextfm: ++ argv[0] = "Dummy", argv[1] = "tfm", argv[2] = path ++*/ ++extern char *getdestdir (int ac, char **av); ++ ++/* mkpaths.c */ ++extern char **mkpaths (int *numptr); ++ ++/* mktexupd.c*/ ++extern void mktexupd (char *s); ++ ++#endif diff --git a/mingw-w64-luatex-svn/PKGBUILD b/mingw-w64-luatex-svn/PKGBUILD new file mode 100644 index 0000000000..0dc3b91069 --- /dev/null +++ b/mingw-w64-luatex-svn/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Ray Donnelly + +_realname=luatex +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0 +pkgrel=1 +url="https://foundry.supelec.fr/projects/luatex" +arch=('any') +makedepends=('svn') +# source=(xetex-code::git://git.code.sf.net/p/xetex/code) +source=('0001-Add-missing-kpathsea-win32-mktex.h-and-mkpaths.c.patch') +sha1sums=('552d40b8045fa34f06d83395dde7be18bac21ceb') +_svntrunk=https://foundry.supelec.fr/svn/luatex/trunk + +prepare() { + msg "Connecting to $_svntrunk SVN server...." + if [[ -d ${_realname}/.svn ]]; then + (cd ${_realname} && svn up --username anonsvn --password anonsvn) + else + svn co --username anonsvn --password anonsvn $_svntrunk --config-dir ./ ${_realname} + fi + # [[ -d ${_realname}/source/src/texk/texlive ]] && rm -rf ${_realname}/source/src/texk/texlive + # cp -rf xetex-code/source/texk/texlive ${_realname}/source/src/texk/ + patch -p1 -i "${srcdir}"/0001-Add-missing-kpathsea-win32-mktex.h-and-mkpaths.c.patch +} + +build() { + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mv "${srcdir}"/${_realname} build-${CARCH} + cd build-${CARCH} + ./build.sh +} + +package() { + msg "lol" +} diff --git a/mingw-w64-lz4/001-mingw-install-over-msys.patch b/mingw-w64-lz4/001-mingw-install-over-msys.patch new file mode 100644 index 0000000000..b3f96e5527 --- /dev/null +++ b/mingw-w64-lz4/001-mingw-install-over-msys.patch @@ -0,0 +1,108 @@ +--- build-i686-w64-mingw32/Makefile.orig 2015-01-15 20:34:15.599200000 +0300 ++++ build-i686-w64-mingw32/Makefile 2015-01-15 20:34:58.733200000 +0300 +@@ -86,10 +86,6 @@ + @echo Cleaning completed + + +-#------------------------------------------------------------------------ +-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU)) +- + install: + @cd $(LZ4DIR); $(MAKE) -e install + @cd $(PRGDIR); $(MAKE) -e install +@@ -132,5 +128,3 @@ + + prg-travis: + @cd $(PRGDIR); $(MAKE) -e test-travis +- +-endif +--- build-i686-w64-mingw32/lib/Makefile.orig 2015-01-15 20:39:30.808200000 +0300 ++++ build-i686-w64-mingw32/lib/Makefile 2015-01-15 20:39:39.715800000 +0300 +@@ -43,6 +43,7 @@ + CFLAGS ?= -O3 + CFLAGS += -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -pedantic + ++BINDIR=$(PREFIX)/bin + LIBDIR?= $(PREFIX)/lib + INCLUDEDIR=$(PREFIX)/include + +@@ -55,11 +55,18 @@ + SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT) + SONAME_FLAGS = -install_name $(PREFIX)/lib/liblz4.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER) + else ++ifneq (,$(filter Windows%,$(OS))) ++ SHARED_EXT = dll ++ SONAME_FLAGS = -Wl,--out-implib,liblz4.$(SHARED_EXT).a ++ SHARED_EXT_MAJOR = $(SHARED_EXT) ++ SHARED_EXT_VER = $(SHARED_EXT) ++else + SONAME_FLAGS = -Wl,-soname=liblz4.$(SHARED_EXT).$(LIBVER_MAJOR) + SHARED_EXT = so + SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR) + SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) + endif ++endif + + default: liblz4 + +@@ -71,19 +78,11 @@ + @$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o + @echo compiling dynamic library $(LIBVER) + @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) +- @echo creating versioned links +- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) +- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) + + clean: + @rm -f core *.o *.a *.$(SHARED_EXT) *.$(SHARED_EXT).* liblz4.pc + @echo Cleaning library completed + +- +-#------------------------------------------------------------------------ +-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU)) +- + liblz4.pc: liblz4.pc.in Makefile + @echo creating pkgconfig + @sed -e 's|@PREFIX@|$(PREFIX)|' \ +@@ -88,10 +92,9 @@ + $< >$@ + + install: liblz4 liblz4.pc +- @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/ +- @install -m 755 liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER) +- @cp -a liblz4.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR) +- @cp -a liblz4.$(SHARED_EXT) $(DESTDIR)$(LIBDIR) ++ @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/ $(DESTDIR)$(BINDIR)/ ++ @install -m 755 liblz4.$(SHARED_EXT) $(DESTDIR)$(BINDIR)/liblz4.$(SHARED_EXT_VER) ++ @cp -a liblz4.$(SHARED_EXT).a $(DESTDIR)$(LIBDIR) + @cp -a liblz4.pc $(DESTDIR)$(LIBDIR)/pkgconfig/ + @install -m 644 liblz4.a $(DESTDIR)$(LIBDIR)/liblz4.a + @install -m 644 lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h +@@ -113,5 +108,3 @@ + @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4.h + @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4hc.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4hc.h + @echo lz4 libraries successfully uninstalled +- +-endif +--- build-i686-w64-mingw32/programs/Makefile.orig 2015-01-15 20:38:56.379000000 +0300 ++++ build-i686-w64-mingw32/programs/Makefile 2015-01-15 20:39:13.102200000 +0300 +@@ -105,11 +105,6 @@ + datagen$(EXT) + @echo Cleaning completed + +- +-#------------------------------------------------------------------------ +-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU)) +- + install: lz4 lz4c + @echo Installing binaries + @install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/ +@@ -202,5 +197,3 @@ + + test-mem32: lz4c32 datagen + # unfortunately, valgrind doesn't seem to work with non-native binary. If someone knows how to do a valgrind-test on a 32-bits exe with a 64-bits system... +- +-endif diff --git a/mingw-w64-lz4/PKGBUILD b/mingw-w64-lz4/PKGBUILD new file mode 100644 index 0000000000..e15304c4f1 --- /dev/null +++ b/mingw-w64-lz4/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Alexey Pavlov + +_realname=lz4 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.7.1.r656 +pkgrel=1 +pkgdesc="Very fast lossless compression algorithm (mingw-w64)" +arch=('any') +url="http://www.lz4.info/" +license=("GPL2") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git") +checkdepends=('diffutils') +options=('staticlibs' 'strip') +source=("${_realname}::git+https://github.com/Cyan4973/lz4.git" + 001-mingw-install-over-msys.patch) +md5sums=('SKIP' + '99b3643a9fee86ee89e991a682edb3c5') + +pkgver() { + cd ${_realname} + local _MAJOR=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h` + local _MINOR=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h` + local _PATCH=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h` + local _REV="$(git rev-list --count HEAD)" + printf "%s.%s.%s.r%s" "${_MAJOR}" "${_MINOR}" "${_PATCH}" "${_REV//[[:alpha:]]}" + +} + +prepare() { + cd ${_realname} + patch -p1 -i ${srcdir}/001-mingw-install-over-msys.patch + cd - + + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + cp -rf "${srcdir}/${_realname}" "${srcdir}/build-${MINGW_CHOST}" +} + +build() { + cd "${srcdir}/build-${MINGW_CHOST}" + make CC=${MINGW_PREFIX}/bin/gcc +} + +check() { + build-${MINGW_CHOST}/programs/lz4 /etc/profile profile.lz4 + build-${MINGW_CHOST}/programs/lz4 -d profile.lz4 profile + diff -q /etc/profile profile + rm profile + + cd "${srcdir}/build-${MINGW_CHOST}" + make CC=${MINGW_PREFIX}/bin/gcc test +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make CC=${MINGW_PREFIX}/bin/gcc DESTDIR="${pkgdir}" PREFIX=${MINGW_PREFIX} install +} diff --git a/mingw-w64-lzo2/PKGBUILD b/mingw-w64-lzo2/PKGBUILD index 3c50baf71f..5189bdfb34 100644 --- a/mingw-w64-lzo2/PKGBUILD +++ b/mingw-w64-lzo2/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=lzo2 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.08 -pkgrel=1 +pkgver=2.09 +pkgrel=2 pkgdesc="Portable lossless data compression library (mingw-w64)" arch=(any) url="http://www.oberhumer.com/opensource/lzo" @@ -12,14 +11,15 @@ license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') source=("$url/download/lzo-${pkgver}.tar.gz") -md5sums=('fcec64c26a0f4f4901468f360029678f') +md5sums=('c7ffc9a103afe2d1bba0b015e7aa887f') prepare() { cd "${srcdir}/lzo-${pkgver}" } build() { - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} ../lzo-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ @@ -31,6 +31,6 @@ build() { } package() { - cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-make/PKGBUILD b/mingw-w64-make/PKGBUILD index 73d654a1b8..43bd4de462 100644 --- a/mingw-w64-make/PKGBUILD +++ b/mingw-w64-make/PKGBUILD @@ -1,27 +1,27 @@ # Maintainer: Alexey Pavlov _realname=make - +_autotools=yes pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -_ver_base=4.0 -pkgver=4.0.2289.432cb65 +_ver_base=4.1 +pkgver=4.1.2366.168f123 pkgrel=1 -pkgdesc="GNU make utility to maintain groups of programs" +pkgdesc="GNU make utility to maintain groups of programs (mingw-w64)" arch=('any') url="http://www.gnu.org/software/make" license=('GPL3') groups=("${MINGW_PACKAGE_PREFIX}-toolchain") depends=() makedepends=('git' 'wget') -source=("$_realname"::'git://git.savannah.gnu.org/make.git' +source=("${_realname}"::'git://git.savannah.gnu.org/make.git' 'make-getopt.patch' 'make-linebuf-mingw.patch') md5sums=('SKIP' '5ce314a61bbb0b5b0f1f4613babc83d2' - 'a6c10267a37c4ff2d48c697ca0580c3c') + '7747139a747a9fe21b1099375ce72052') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}"/${_realname} printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } @@ -29,17 +29,37 @@ prepare() { cd ${srcdir}/${_realname} patch -p1 -i ${srcdir}/make-getopt.patch patch -p1 -i ${srcdir}/make-linebuf-mingw.patch + if [[ "${_autotools}" = "yes" ]]; then + autoreconf -fi + fi } build() { - cd ${srcdir}/${_realname} - cmd /c 'build_w32.bat --without-guile gcc' + if [[ "${_autotools}" = "yes" ]]; then + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --without-libintl-prefix \ + --without-libiconv-prefix \ + ac_cv_dos_paths=yes + make -j1 scm-update do-po-update all + else + cmd /c 'build_w32.bat --without-guile gcc' + fi } package() { - cd ${srcdir}/${_realname} mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} - cp -f gnumake.exe ${pkgdir}${MINGW_PREFIX}/bin/mingw32-make.exe - cp -f libgnumake-1.dll.a ${pkgdir}${MINGW_PREFIX}/lib/ - cp -f gnumake.h ${pkgdir}${MINGW_PREFIX}/include/ + if [[ "${_autotools}" = "yes" ]]; then + cd ${srcdir}/build-${MINGW_CHOST} + cp -f make.exe ${pkgdir}${MINGW_PREFIX}/bin/mingw32-make.exe + cp -f ${srcdir}/${_realname}/gnumake.h ${pkgdir}${MINGW_PREFIX}/include/ + else + cd ${srcdir}/${_realname} + cp -f gnumake.exe ${pkgdir}${MINGW_PREFIX}/bin/mingw32-make.exe + cp -f libgnumake-1.dll.a ${pkgdir}${MINGW_PREFIX}/lib/ + cp -f gnumake.h ${pkgdir}${MINGW_PREFIX}/include/ + fi } diff --git a/mingw-w64-mbedtls/PKGBUILD b/mingw-w64-mbedtls/PKGBUILD new file mode 100644 index 0000000000..a09d4349ed --- /dev/null +++ b/mingw-w64-mbedtls/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Nazar Mishturak + +_realname=mbedtls +pkgbase="mingw-w64-${_realname}" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.2.0 +pkgrel=1 +arch=('any') +url='https://tls.mbed.org/' +pkgdesc='mbed TLS is an open source and commercial SSL library licensed by ARM Limited. (mingw-w64)' +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen") +checkdepends=("${MINGW_PACKAGE_PREFIX}-perl") +license=('Apache License 2.0') +options=('strip' 'staticlibs' 'docs') +source=(${_realname}-${pkgver}.tar.gz::"https://tls.mbed.org/download/mbedtls-${pkgver}-apache.tgz" + 'symlink-test.patch' + 'dll-location.patch' + 'enable-features.patch') +sha256sums=('3c6d3487ab056da94450cf907afc84f026aff7880182baffe137c98e3d00fb55' + '5c5382ff266e5cc293f31a46e1f10782c765c5cc1476dfc21d5c4ad405f647a0' + '89eb82f9e9fb456d0595035925d2d512aa2ca9b9e283b9c51d5524bfc8dbf996' + '1be88267b045a8728fe4dde663faf328ad788eeefcb43915beeb364b4d2dd2e8') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}/symlink-test.patch" + patch -p1 -i "${srcdir}/dll-location.patch" + patch -p1 -i "${srcdir}/enable-features.patch" +} + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + + local BUILD_TYPE="Release" + if check_option "debug" "y"; then + BUILD_TYPE="Debug" + fi + + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_C_COMPILER=${MINGW_CHOST}-gcc \ + -DENABLE_TESTING=ON \ + -DENABLE_PROGRAMS=OFF \ + -DUSE_SHARED_MBEDTLS_LIBRARY=ON \ + -DUSE_STATIC_MBEDTLS_LIBRARY=ON \ + ../${_realname}-${pkgver} + make + # Generate the documentation + make apidoc +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + cp -p library/*.dll tests/ # Tests are dynamically linked + make test +} + +package () { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + # Install the documentation + cd "${srcdir}/${_realname}-${pkgver}" + mkdir -p "${pkgdir}/${MINGW_PREFIX}/share/doc/${_realname}" + cp -Rp apidoc "${pkgdir}/${MINGW_PREFIX}/share/doc/${_realname}/html" +} diff --git a/mingw-w64-mbedtls/dll-location.patch b/mingw-w64-mbedtls/dll-location.patch new file mode 100644 index 0000000000..33765c6fae --- /dev/null +++ b/mingw-w64-mbedtls/dll-location.patch @@ -0,0 +1,24 @@ +--- mbedtls-2.1.0/library/CMakeLists.txt.orig 2015-09-04 15:38:26.000000000 +0300 ++++ mbedtls-2.1.0/library/CMakeLists.txt 2015-09-14 17:32:04.783122700 +0300 +@@ -132,7 +132,9 @@ + target_link_libraries(${mbedtls_static_target} ${libs} ${mbedx509_static_target}) + + install(TARGETS ${mbedtls_static_target} ${mbedx509_static_target} ${mbedcrypto_static_target} +- DESTINATION ${LIB_INSTALL_DIR} ++ RUNTIME DESTINATION "bin" ++ LIBRARY DESTINATION "lib" ++ ARCHIVE DESTINATION "lib" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif(USE_STATIC_MBEDTLS_LIBRARY) + +@@ -150,7 +152,9 @@ + target_link_libraries(mbedtls ${libs} mbedx509) + + install(TARGETS mbedtls mbedx509 mbedcrypto +- DESTINATION ${LIB_INSTALL_DIR} ++ RUNTIME DESTINATION "bin" ++ LIBRARY DESTINATION "lib" ++ ARCHIVE DESTINATION "lib" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif(USE_SHARED_MBEDTLS_LIBRARY) + diff --git a/mingw-w64-mbedtls/enable-features.patch b/mingw-w64-mbedtls/enable-features.patch new file mode 100644 index 0000000000..7789c99b9e --- /dev/null +++ b/mingw-w64-mbedtls/enable-features.patch @@ -0,0 +1,47 @@ +--- mbedtls-2.1.1/include/mbedtls/config.h.orig 2015-09-26 18:53:50.950970200 +0300 ++++ mbedtls-2.1.1/include/mbedtls/config.h 2015-09-26 19:01:45.088633900 +0300 +@@ -63,7 +63,7 @@ + * + * Uncomment if the CPU supports SSE2 (IA-32 specific). + */ +-//#define MBEDTLS_HAVE_SSE2 ++#define MBEDTLS_HAVE_SSE2 + + /** + * \def MBEDTLS_HAVE_TIME +@@ -170,7 +170,7 @@ + * + * Uncomment to get warnings on using deprecated functions. + */ +-//#define MBEDTLS_DEPRECATED_WARNING ++#define MBEDTLS_DEPRECATED_WARNING + + /** + * \def MBEDTLS_DEPRECATED_REMOVED +@@ -721,7 +721,7 @@ + * Disable if you run into name conflicts and want to really remove the + * mbedtls_strerror() + */ +-#define MBEDTLS_ERROR_STRERROR_DUMMY ++//#define MBEDTLS_ERROR_STRERROR_DUMMY + + /** + * \def MBEDTLS_GENPRIME +@@ -1215,7 +1215,7 @@ + * + * Uncomment this to enable pthread mutexes. + */ +-//#define MBEDTLS_THREADING_PTHREAD ++#define MBEDTLS_THREADING_PTHREAD + + /** + * \def MBEDTLS_VERSION_FEATURES +@@ -2208,7 +2208,7 @@ + * + * Enable this layer to allow use of mutexes within mbed TLS + */ +-//#define MBEDTLS_THREADING_C ++#define MBEDTLS_THREADING_C + + /** + * \def MBEDTLS_TIMING_C diff --git a/mingw-w64-mbedtls/symlink-test.patch b/mingw-w64-mbedtls/symlink-test.patch new file mode 100644 index 0000000000..9c85a5d978 --- /dev/null +++ b/mingw-w64-mbedtls/symlink-test.patch @@ -0,0 +1,11 @@ +--- mbedtls-2.1.0/tests/CMakeLists.txt.orig 2015-09-04 15:38:26.000000000 +0300 ++++ mbedtls-2.1.0/tests/CMakeLists.txt 2015-09-13 21:45:47.677244800 +0300 +@@ -101,7 +101,7 @@ + file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data_files" target) + + if (NOT EXISTS ${link}) +- if (CMAKE_HOST_UNIX) ++ if (CMAKE_HOST_UNIX OR MSYS) + set(command ln -s ${target} ${link}) + else() + set(command cmd.exe /c mklink /d ${link} ${target}) diff --git a/mingw-w64-mcpp/PKGBUILD b/mingw-w64-mcpp/PKGBUILD new file mode 100644 index 0000000000..dbc333f333 --- /dev/null +++ b/mingw-w64-mcpp/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Martell Malone + +_realname=mcpp +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.7.2 +pkgrel=2 +pkgdesc="Matsui's CPP implementation precisely conformed to standards (mingw-w64)" +arch=('any') +license=('custom') +url="http://mcpp.sourceforge.net" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libiconv") +options=('staticlibs' 'strip') +source=("http://downloads.sourceforge.net/mcpp/${_realname}-${pkgver}.tar.gz") +md5sums=('512de48c87ab023a69250edc7a0c7b05') + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-mcpplib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-meanwhile/PKGBUILD b/mingw-w64-meanwhile/PKGBUILD index 4c74819aad..aa702d52c9 100644 --- a/mingw-w64-meanwhile/PKGBUILD +++ b/mingw-w64-meanwhile/PKGBUILD @@ -2,18 +2,19 @@ # Contributor: Marek Skrobacki # Contributor: Alasdair Haswell # Maintainer: Zach Bacon <11doctorwhocanada@gmail.com> +# Contributor: Renato Silva _realname=meanwhile pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.0.2 -pkgrel=1 +pkgrel=3 pkgdesc="Meanwhile libraries (mingw64)" arch=('any') url="http://sourceforge.net/projects/meanwhile" -license=('GPL') +license=(LGPL2) depends=("${MINGW_PACKAGE_PREFIX}-glib2") conflicts=('meanwhile-svn') -source=(http://downloads.sourceforge.net/sourceforge/meanwhile/${_realname}-$pkgver.tar.gz +source=(http://downloads.sourceforge.net/sourceforge/meanwhile/${_realname}-${pkgver}.tar.gz broken-status.patch fix_glib_includes.patch fix_groupchat.patch) @@ -23,18 +24,18 @@ sha256sums=('38a8059eaa549cbcb45ca0a5b453e9608ceadab360db2ae14581fb22ddabdf23' '90467c648c18086a3f7989b7bab8f21eb44631c19a7d531121e927a0a1e74e9c') prepare() { - cd $srcdir/${_realname}-$pkgver/src + cd ${srcdir}/${_realname}-${pkgver}/src patch -Np0 -i "${srcdir}/broken-status.patch" patch -Np2 -i "${srcdir}/fix_glib_includes.patch" patch -Np2 -i "${srcdir}/fix_groupchat.patch" } build() { - cd $srcdir/${_realname}-$pkgver - [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + cd ${srcdir}/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} - CFLAGS+=" -fno-stack-protector --param=ssp-buffer-size=4" - CXXFLAGS+=" -fno-stack-protector --param=ssp-buffer-size=4" + #CFLAGS+=" -fno-stack-protector --param=ssp-buffer-size=4" + #CXXFLAGS+=" -fno-stack-protector --param=ssp-buffer-size=4" export lt_cv_deplibs_check_method='pass_all' ../${_realname}-${pkgver}/configure \ @@ -45,10 +46,12 @@ build() { --disable-mailme \ --enable-static \ --enable-shared + make } package() { cd "${srcdir}"/build-${CARCH} - make DESTDIR=$pkgdir install + make DESTDIR=${pkgdir} install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-meld3/0001-fixes-for-MinGW-w64-symlinks-and-use-sh-to-spawn.patch b/mingw-w64-meld3/0001-fixes-for-MinGW-w64-symlinks-and-use-sh-to-spawn.patch index c9f1a5200d..bd55d9119b 100644 --- a/mingw-w64-meld3/0001-fixes-for-MinGW-w64-symlinks-and-use-sh-to-spawn.patch +++ b/mingw-w64-meld3/0001-fixes-for-MinGW-w64-symlinks-and-use-sh-to-spawn.patch @@ -1,6 +1,5 @@ -diff -Naur meld-3.11.4-orig/meld/build_helpers.py meld-3.11.4/meld/build_helpers.py ---- meld-3.11.4-orig/meld/build_helpers.py 2014-09-10 02:21:07.000000000 +0500 -+++ meld-3.11.4/meld/build_helpers.py 2014-09-24 13:04:24.217600000 +0500 +--- meld-3.15.1/meld/build_helpers.py.orig 2015-12-20 18:56:22.449947800 +0000 ++++ meld-3.15.1/meld/build_helpers.py 2015-12-20 18:53:32.964253800 +0000 @@ -31,6 +31,8 @@ import os.path import platform @@ -19,26 +18,29 @@ diff -Naur meld-3.11.4-orig/meld/build_helpers.py meld-3.11.4/meld/build_helpers return self.frozen_gschemas else: return self.gschemas -@@ -136,13 +138,16 @@ - msgfmt = ['msgfmt', po_file, '-o', mo_file] +@@ -140,14 +142,19 @@ self.spawn(msgfmt) for page in self.C_PAGES: -- itstool = ['itstool', '-m', mo_file, '-o', build_path, page] -+ itstool = ['sh', '-c', "itstool -m %s -o %s %s" % (mo_file, build_path, page)] + itstool = [ +- 'itstool', '-m', mo_file, '-o', build_path, page] ++ 'sh', '-c', ++ "itstool -m %s -o %s %s" % (mo_file, build_path, page)] self.spawn(itstool) for extra in self.C_EXTRA: - extra_path = os.path.join(build_path, os.path.basename(extra)) + extra_path = os.path.join( + build_path, os.path.basename(extra)) if os.path.exists(extra_path): os.unlink(extra_path) - os.symlink(os.path.relpath(extra, source_path), extra_path) -+ try: -+ os.symlink(os.path.relpath(extra, source_path), extra_path) -+ except: ++ # symlinks require special privileges on Windows :-( ++ if os.name == 'nt': + shutil.copy(extra, extra_path) ++ else: ++ os.symlink(os.path.relpath(extra, source_path), extra_path) else: distutils.dir_util.copy_tree(source_path, build_path) -@@ -244,14 +249,14 @@ +@@ -251,14 +258,14 @@ # If we're on Windows, assume we're building frozen and make a bunch # of insane assumptions. @@ -55,7 +57,7 @@ diff -Naur meld-3.11.4-orig/meld/build_helpers.py meld-3.11.4/meld/build_helpers wd = os.getcwd() os.chdir(self.po_dir) self.spawn(cmd) -@@ -265,7 +270,7 @@ +@@ -272,7 +279,7 @@ mo_file = os.path.join(mo_dir, "%s.mo" % self.domain) if not os.path.exists(mo_dir): os.makedirs(mo_dir) @@ -64,7 +66,7 @@ diff -Naur meld-3.11.4-orig/meld/build_helpers.py meld-3.11.4/meld/build_helpers po_mtime = os.path.getmtime(po_file) mo_mtime = os.path.exists(mo_file) and os.path.getmtime(mo_file) or 0 if po_mtime > max_po_mtime: -@@ -302,8 +307,8 @@ +@@ -309,8 +316,8 @@ if file_merged.endswith(".in"): file_merged = file_merged[:-3] file_merged = os.path.join(build_target, file_merged) @@ -75,3 +77,12 @@ diff -Naur meld-3.11.4-orig/meld/build_helpers.py meld-3.11.4/meld/build_helpers mtime_merged = (os.path.exists(file_merged) and os.path.getmtime(file_merged) or 0) mtime_file = os.path.getmtime(file) +@@ -354,7 +361,7 @@ + elif line.startswith('# END'): + end = i + +- if start and end: ++ if start and end and not get_platform().startswith('mingw'): + lines[start:end + 1] = [ + self.data_line % datadir, + self.locale_line % localedir, diff --git a/mingw-w64-meld3/PKGBUILD b/mingw-w64-meld3/PKGBUILD index e3abf30b11..824da4d10c 100644 --- a/mingw-w64-meld3/PKGBUILD +++ b/mingw-w64-meld3/PKGBUILD @@ -1,33 +1,33 @@ # Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly _realname=meld +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}3" -pkgver=3.12.0 -pkgrel=2 +pkgver=3.15.1 +pkgrel=1 pkgdesc="Visual diff and merge tool (mingw-w64)" arch=('any') url="http://meldmerge.org/" license=("GPL" "LGPL") options=('strip' 'staticlibs') -depends=( - "${MINGW_PACKAGE_PREFIX}-gtk3" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-python2-gobject" - "${MINGW_PACKAGE_PREFIX}-gtksourceview3" - "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" - "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" - ) +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gtksourceview3" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-python2-gobject") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - #"${MINGW_PACKAGE_PREFIX}-python2-cx_freeze" - 'intltool' - 'itstool') + "${MINGW_PACKAGE_PREFIX}-pkg-config" + #"${MINGW_PACKAGE_PREFIX}-python2-cx_freeze" + 'intltool' + 'itstool') install=meld-${CARCH}.install -source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz +source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz '0001-fixes-for-MinGW-w64-symlinks-and-use-sh-to-spawn.patch' "0002-build-exe.patch") -md5sums=('9dbdb3306dc5d2415baeae3892bcec8e' - '57d46e2eacc34e8d22f63a59b6297253' +md5sums=('238c3eba59290d5128675c88c1849e05' + 'c3272464b68c2118f19be3f4290034c1' 'c4770167f70e061c1f94d8c3fa3e7150') prepare() { @@ -39,8 +39,7 @@ prepare() { build() { cd "${srcdir}/${_realname}-${pkgver}" - #export PYTHON=${MINGW_PREFIX}/bin/python2 - DISTUTILS_DEBUG=1 ${MINGW_PREFIX}/bin/python2 setup.py build + PYTHON=${MINGW_PREFIX}/bin/python2 DISTUTILS_DEBUG=1 ${MINGW_PREFIX}/bin/python2 setup.py build } package() { @@ -49,7 +48,7 @@ package() { MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py --no-update-icon-cache --no-compile-schemas \ install --prefix=${MINGW_PREFIX} --root="${pkgdir}" - PREFIX_WIN=$(pwd -W) + PREFIX_WIN=$(cygpath -m ${MINGW_PREFIX}) sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ -i ${pkgdir}${MINGW_PREFIX}/bin/meld } diff --git a/mingw-w64-meld3/meld-i686.install b/mingw-w64-meld3/meld-i686.install index 422f41d0d1..4843eff7f8 100644 --- a/mingw-w64-meld3/meld-i686.install +++ b/mingw-w64-meld3/meld-i686.install @@ -1,13 +1,13 @@ post_install() { - mingw32/bin/gtk-update-icon-cache-3.0 -f -t mingw32/share/icons/hicolor - mingw32/bin/glib-compile-schemas.exe mingw32/share/glib-2.0/schemas - mingw32/bin/update-mime-database mingw32/share/mime &> /dev/null + mingw32/bin/gtk-update-icon-cache-3.0 -f -t mingw32/share/icons/hicolor + mingw32/bin/glib-compile-schemas.exe mingw32/share/glib-2.0/schemas + mingw32/bin/update-mime-database mingw32/share/mime &> /dev/null } post_upgrade() { - post_install + post_install } post_remove() { - post_install + post_install } diff --git a/mingw-w64-meld3/meld-x86_64.install b/mingw-w64-meld3/meld-x86_64.install index 349b3e8ad2..de7d5f8b09 100644 --- a/mingw-w64-meld3/meld-x86_64.install +++ b/mingw-w64-meld3/meld-x86_64.install @@ -1,13 +1,13 @@ post_install() { - mingw64/bin/gtk-update-icon-cache-3.0 -f -t mingw64/share/icons/hicolor - mingw64/bin/glib-compile-schemas.exe mingw64/share/glib-2.0/schemas - mingw64/bin/update-mime-database mingw64/share/mime &> /dev/null + mingw64/bin/gtk-update-icon-cache-3.0 -f -t mingw64/share/icons/hicolor + mingw64/bin/glib-compile-schemas.exe mingw64/share/glib-2.0/schemas + mingw64/bin/update-mime-database mingw64/share/mime &> /dev/null } post_upgrade() { - post_install + post_install } post_remove() { - post_install + post_install } diff --git a/mingw-w64-memphis/PKGBUILD b/mingw-w64-memphis/PKGBUILD index 45d35255f3..90e55855c0 100644 --- a/mingw-w64-memphis/PKGBUILD +++ b/mingw-w64-memphis/PKGBUILD @@ -3,20 +3,20 @@ _realname=memphis pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.2.3 -pkgrel=1 +pkgrel=2 arch=('any') pkgdesc="A map-rendering library for OpenStreetMap (mingw-w64)" options=(strip staticlibs) depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-cairo" "${MINGW_PACKAGE_PREFIX}-expat") -makedepends=("${MINGW_PACKAGE_PREFIX}-gtk-doc" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-vala") +makedepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-vala" + "gtk-doc") options=('strip' 'staticlibs') license=("GPL 2") url="https://github.com/jiuka/" -source=(https://github.com/jiuka/memphis/archive/${pkgver}.tar.gz +source=(${_realname}-${pkgver}.tar.gz::"https://github.com/jiuka/memphis/archive/${pkgver}.tar.gz" 001-win.patch 002-give-cc-to-gir-scanner.mingw.patch) sha256sums=('10b43b2325ce9937ce33a7afdc247e926cc515ac612b50eb0520e1ac1455e1ab' @@ -47,10 +47,11 @@ build() { --target=${MINGW_CHOST} \ --enable-introspection \ --enable-vala=no + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-mesa/001-extra-libs.patch b/mingw-w64-mesa/001-extra-libs.patch new file mode 100644 index 0000000000..df6ca1f14b --- /dev/null +++ b/mingw-w64-mesa/001-extra-libs.patch @@ -0,0 +1,11 @@ +--- Mesa-10.4.3/scons/llvm.py.orig 2015-01-26 15:04:25.957800000 +0300 ++++ Mesa-10.4.3/scons/llvm.py 2015-01-26 15:05:28.623000000 +0300 +@@ -66,7 +66,7 @@ + + env.PrependENVPath('PATH', llvm_bin_dir) + +- if env['platform'] == 'windows': ++ if env['msvc']: + # XXX: There is no llvm-config on Windows, so assume a standard layout + if llvm_dir is None: + print 'scons: LLVM environment variable must be specified when building for windows' diff --git a/mingw-w64-mesa/PKGBUILD b/mingw-w64-mesa/PKGBUILD index af9ba87818..5b70cfb086 100644 --- a/mingw-w64-mesa/PKGBUILD +++ b/mingw-w64-mesa/PKGBUILD @@ -1,21 +1,26 @@ # Maintainer: Alexey Pavlov _realname=mesa - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=10.2.4 +pkgver=11.0.5 pkgrel=1 pkgdesc="Open-source implementation of the OpenGL specification (mingw-w64)" arch=('any') depends=("") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-clang" "scons" "libxml2-python" "python2") -#groups=("${MINGW_PACKAGE_PREFIX}") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-clang" + "scons" + "libxml2-python" + "python2-mako") url="http://www.mesa3d.org" license=('MIT') options=('staticlibs' 'strip') -source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2) -md5sums=('11d3542da1b703618634be840a87b0b2') -noextract=("MesaLib-${pkgver}.tar.bz2") +source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/${_realname}-${pkgver}.tar.xz{,.sig} + 001-extra-libs.patch) +md5sums=('b71b5e6c437cd8c85a61a476ab840f9f' + 'SKIP' + '3eaea880ab48f851c392c2106a616e21') case ${MINGW_CHOST} in i686*) @@ -25,25 +30,29 @@ case ${MINGW_CHOST} in _mach=x86_64 ;; esac - + prepare() { - cd ${startdir} - [ -d $srcdir/$_realname-$pkgver ] || tar -xjvf MesaLib-${pkgver}.tar.bz2 -C $srcdir + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-extra-libs.patch } build() { - cd ${srcdir}/Mesa-$pkgver + cd ${srcdir}/${_realname}-${pkgver} - LLVM=${MINGW_PREFIX} CFLAGS="-march=core2 -pipe" LDFLAGS="-static -s" scons build=release platform=windows toolchain=mingw machine=${_mach} libgl-gdi #mesagdi + LLVM=${MINGW_PREFIX} \ + CFLAGS="-march=core2 -pipe -D_USE_MATH_DEFINES" \ + CXXFLAGS="-march=core2 -pipe -std=c++11 -D_USE_MATH_DEFINES" \ + LDFLAGS="-static -s" \ + scons build=release platform=windows toolchain=mingw machine=${_mach} libgl-gdi #mesagdi } package() { - cd ${srcdir}/Mesa-$pkgver + cd ${srcdir}/${_realname}-${pkgver} mkdir -p ${pkgdir}${MINGW_PREFIX}/bin #mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/mesa - local _dll_files=( $(find ${srcdir}/Mesa-$pkgver -type f -name "*.dll") ) + local _dll_files=( $(find ${srcdir}/${_realname}-${pkgver} -type f -name "*.dll") ) cp -f ${_dll_files[@]} ${pkgdir}${MINGW_PREFIX}/bin/ - #local _dlla_files=( $(find ${srcdir}/Mesa-$pkgver -type f -name "*.a") ) + #local _dlla_files=( $(find ${srcdir}/Mesa-${pkgver} -type f -name "*.a") ) #cp -f ${_dlla_files[@]} ${pkgdir}${MINGW_PREFIX}/lib/mesa/ } diff --git a/mingw-w64-mhook/PKGBUILD b/mingw-w64-mhook/PKGBUILD index 16e257785e..90801d3e54 100644 --- a/mingw-w64-mhook/PKGBUILD +++ b/mingw-w64-mhook/PKGBUILD @@ -1,32 +1,34 @@ # Maintainer: Jürgen Pfeifer _realname=mhook - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=r7.a159eed pkgrel=1 arch=('any') pkgdesc="An API hooking library (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -makedepends=("git" - "${MINGW_PACKAGE_PREFIX}-cmake") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "git") options=('strip' 'staticlibs') license=('custom') url="https://github.com/SirAnthony/mhook" -source=("$_realname"::"git+https://github.com/SirAnthony/mhook.git") +source=("${_realname}"::"git+https://github.com/SirAnthony/mhook.git") sha1sums=('SKIP') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { - cd "$srcdir" + cd "${srcdir}" mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DMHOOK_TESTS=ON \ ../${_realname} @@ -35,12 +37,12 @@ build() { check() { - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ./mhook-tests } package() { - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/ mkdir -p ${pkgdir}${MINGW_PREFIX}/include/ diff --git a/mingw-w64-midori/0001-ValaPrecompile-abs-path-regex-win-friendly.patch b/mingw-w64-midori/0001-ValaPrecompile-abs-path-regex-win-friendly.patch new file mode 100644 index 0000000000..3a6477b8be --- /dev/null +++ b/mingw-w64-midori/0001-ValaPrecompile-abs-path-regex-win-friendly.patch @@ -0,0 +1,22 @@ +--- midori-0.5.11/cmake/ValaPrecompile.cmake.orig 2015-09-06 22:37:09.710116600 +0100 ++++ midori-0.5.11/cmake/ValaPrecompile.cmake 2015-09-06 22:37:58.036880700 +0100 +@@ -133,8 +133,8 @@ + set(${output} "") + + foreach(src ${ARGS_DEFAULT_ARGS}) +- string(REGEX MATCH "^/" IS_MATCHED ${src}) +- if(${IS_MATCHED} MATCHES "/") ++ string(REGEX MATCH "^(/|[a-zA-Z]:)" IS_MATCHED ${src}) ++ if(NOT IS_MATCHED STREQUAL "") + set(src_file_path ${src}) + else() + set(src_file_path ${CMAKE_CURRENT_SOURCE_DIR}/${src}) +@@ -142,7 +142,7 @@ + list(APPEND in_files ${src_file_path}) + string(REPLACE ".vala" ".c" src ${src}) + string(REPLACE ".gs" ".c" src ${src}) +- if(${IS_MATCHED} MATCHES "/") ++ if(NOT IS_MATCHED STREQUAL "") + get_filename_component(VALA_FILE_NAME ${src} NAME) + set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${VALA_FILE_NAME}") + list(APPEND out_files "${CMAKE_CURRENT_BINARY_DIR}/${VALA_FILE_NAME}") diff --git a/mingw-w64-midori/PKGBUILD b/mingw-w64-midori/PKGBUILD new file mode 100644 index 0000000000..a8b79c5943 --- /dev/null +++ b/mingw-w64-midori/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Zach Bacon <11doctorwhocanada@gmail.com> +# Contributor: Ray Donnelly + +_realname=midori +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.5.11 +pkgrel=1 +pkgdesc="midori web browser (mingw-w64)" +arch=('any') +url='http://www.midori-browser.org/' +license=('LGPL2.1') +options=('debug' '!strip') +depends=("${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-webkitgtk3" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +optdepends=("${MINGW_PACKAGE_PREFIX}-gst-plugins-good: HTML5 OGG videos support" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base: HTML5 H264 and WebM videos support" + "${MINGW_PACKAGE_PREFIX}-gst-libav: HTML5 H264 videos support" + "${MINGW_PACKAGE_PREFIX}-aria2: download utility" + "${MINGW_PACKAGE_PREFIX}-drmingw: debugging support") +source=("http://www.midori-browser.org/downloads/${_realname}_${pkgver}_all_.tar.bz2" + "0001-ValaPrecompile-abs-path-regex-win-friendly.patch") +sha1sums=('64c86935028feb5f89d799c2acacaad67764da6f' + '2d7d764a4ca633a30279cac3e85b1c772701b711') + +prepare() { + cd $srcdir/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/0001-ValaPrecompile-abs-path-regex-win-friendly.patch +} + +build() { + cd "$srcdir"/${_realname}-${pkgver} + [ -d "${srcdir}"/build-${CARCH} ] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + local -a extra_config + + if check_option "debug" "y"; then + extra_config+=( -DCMAKE_BUILD_TYPE=Debug ) + else + extra_config+=( -DCMAKE_BUILD_TYPE=Release ) + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DUSE_GTK3=1 \ + -DUSE_ZEITGEIST=0 \ + "${extra_config[@]}" \ + ../${_realname}-${pkgver} + make +} + +# check() { +# cd "${srcdir}"/build-${CARCH} +# make check +# } + +package() { + cd "${srcdir}"/build-${CARCH} + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-miniupnpc/001-link-libraries.patch b/mingw-w64-miniupnpc/001-link-libraries.patch new file mode 100644 index 0000000000..1aa0fab3f1 --- /dev/null +++ b/mingw-w64-miniupnpc/001-link-libraries.patch @@ -0,0 +1,13 @@ +--- miniupnpc-1.9.20141128/CMakeLists.txt.orig 2015-01-16 12:07:41.100000000 +0300 ++++ miniupnpc-1.9.20141128/CMakeLists.txt 2015-01-16 12:08:11.644800000 +0300 +@@ -92,9 +92,7 @@ + endif (WIN32) + + if (WIN32) +- find_library (WINSOCK2_LIBRARY NAMES ws2_32 WS2_32 Ws2_32) +- find_library (IPHLPAPI_LIBRARY NAMES iphlpapi) +- set (LDLIBS ${WINSOCK2_LIBRARY} ${IPHLPAPI_LIBRARY} ${LDLIBS}) ++ set (LDLIBS -lws2_32 -liphlpapi ${LDLIBS}) + #elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris") + # find_library (SOCKET_LIBRARY NAMES socket) + # find_library (NSL_LIBRARY NAMES nsl) diff --git a/mingw-w64-miniupnpc/PKGBUILD b/mingw-w64-miniupnpc/PKGBUILD new file mode 100644 index 0000000000..8aff9acf1b --- /dev/null +++ b/mingw-w64-miniupnpc/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Alexey Pavlov + +_realname=miniupnpc +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=1.9.20150609 +pkgrel=1 +pkgdesc="A small UPnP client library/tool to access Internet Gateway Devices (mingw-w64)" +arch=('any') +url="http://miniupnp.free.fr" +license=('BSD') +options=('staticlibs') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +source=(#"http://miniupnp.free.fr/files/${_realname}-${pkgver}.tar.gz" + http://miniupnp.tuxfamily.org/files/${_realname}-${pkgver}.tar.gz + 001-link-libraries.patch) +sha256sums=('86e6ccec5b660ba6889893d1f3fca21db087c6466b1a90f495a1f87ab1cd1c36' + '3ac8b46b15ab48415cbbfa759d968873b315a96120d4dcbe062fbc39a909726d') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-link-libraries.patch +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + #mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DUPNPC_BUILD_SHARED=ON \ + -DUPNPC_BUILD_STATIC=ON \ + . + + make + + for pyt in 2 3; do + msg "Build Python${pyt} extension..." + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python${pyt} setupmingw32.py build + done +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/man3/miniupnpc.3 \ + "${pkgdir}${MINGW_PREFIX}/share/man/man3/miniupnpc.3" + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + + for pyt in 2 3; do + msg "Install Python${pyt} extension..." + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python${pyt} setupmingw32.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + done +} diff --git a/mingw-w64-mlpack/0001-mingw-w64-cmake.patch b/mingw-w64-mlpack/0001-mingw-w64-cmake.patch new file mode 100644 index 0000000000..9cdac9b708 --- /dev/null +++ b/mingw-w64-mlpack/0001-mingw-w64-cmake.patch @@ -0,0 +1,74 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2015-01-07 22:53:12.000000000 +0600 ++++ b/CMakeLists.txt 2015-05-17 14:07:51.473444100 +0600 +@@ -99,7 +99,7 @@ + # because then we are required to have a FORTRAN compiler (argh!) so we will try + # and find LAPACK and BLAS ourselves, using a slightly modified variant of the + # script Armadillo uses to find these. +-if (WIN32) ++if (WIN32 AND NOT MINGW) + find_library(LAPACK_LIBRARY + NAMES lapack liblapack lapack_win32_MT lapack_win32 + PATHS "C:/Program Files/Armadillo" +@@ -121,14 +121,14 @@ + # Piggyback LAPACK and BLAS linking into Armadillo link. + set(ARMADILLO_LIBRARIES + "${ARMADILLO_LIBRARIES};${BLAS_LIBRARY};${LAPACK_LIBRARY}") +-endif (WIN32) ++endif (WIN32 AND NOT MINGW) + + find_package(LibXml2 2.6.0 REQUIRED) + + # On Windows, LibXml2 has a couple dependencies and we want to make sure they + # exist. We don't need the include directory, so we just use a find_library + # call, looking for .dlls. +-if (WIN32) ++if (WIN32 AND NOT MINGW) + # Find a .dll, not a .lib, because libxml2 is probably dynamically linked. + set(CMAKE_OLD_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") +@@ -161,7 +161,7 @@ + + # Reset suffixes. + set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_OLD_SUFFIXES}") +-endif (WIN32) ++endif (WIN32 AND NOT MINGW) + + # Include directories for the previous dependencies. + include_directories(${ARMADILLO_INCLUDE_DIRS}) +@@ -185,10 +185,10 @@ + # On Windows, automatic linking is performed, so we don't need to worry about + # it. Clear the list of libraries to link against and let Visual Studio handle + # it. +-if (WIN32) ++if (WIN32 AND NOT MINGW) + link_directories(${Boost_LIBRARY_DIRS}) + set(Boost_LIBRARIES "") +-endif (WIN32) ++endif (WIN32 AND NOT MINGW) + + # For Boost testing framework (will have no effect on non-testing executables). + # This specifies to Boost that we are dynamically linking to the Boost test +@@ -202,11 +202,11 @@ + include_directories(${CMAKE_SOURCE_DIR}) + + # On Windows, things end up under Debug/ or Release/. +-if (WIN32) ++if (WIN32 AND NOT MINGW) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +-else (WIN32) ++else (WIN32 AND NOT MINGW) + # If not on Windows, put them under more standard UNIX-like places. This is + # necessary, otherwise they would all end up in + # ${CMAKE_BINARY_DIR}/src/mlpack/methods/... or somewhere else random like +@@ -214,7 +214,7 @@ + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/) +-endif (WIN32) ++endif (WIN32 AND NOT MINGW) + + # Determine whether or not this is a subversion repository, so that we can set + # the trunk revision if necessary for --version (#309). diff --git a/mingw-w64-mlpack/PKGBUILD b/mingw-w64-mlpack/PKGBUILD new file mode 100644 index 0000000000..5aa33eeaf6 --- /dev/null +++ b/mingw-w64-mlpack/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Sergey Popov + +_realname=mlpack +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0.12 +pkgrel=2 +pkgdesc='An intuitive, fast, scalable C++ machine learning library (mingw-w64)' +arch=('any') +url='http://mlpack.org/' +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-armadillo" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-doxygen") +source=("https://github.com/mlpack/mlpack/archive/${_realname}-${pkgver}.tar.gz" + "0001-mingw-w64-cmake.patch") +sha1sums=('2c2c34e74ce8ea994e055b4aa8d627bc4661ea40' + '2680dd0058fa952df8ec0b7c0617c7d30468016b') +_src="mlpack-mlpack-${pkgver}" + +prepare() { + cd "${srcdir}/${_src}" + patch -Np1 -i "${srcdir}/0001-mingw-w64-cmake.patch" +} + +build() { + CFLAGS+=" ${CPPFLAGS}" + CXXFLAGS+=" ${CPPFLAGS} -std=gnu++11" + + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" + mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe -Wno-dev \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + ../${_src} + + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + make DESTDIR=${pkgdir} -j1 install + + pushd "${pkgdir}${MINGW_PREFIX}" > /dev/null + install -Dm644 "${srcdir}/${_src}/COPYRIGHT.txt" "share/licenses/${_realname}/COPYRIGHT.txt" + install -Dm644 "${srcdir}/${_src}/LICENSE.txt" "share/licenses/${_realname}/LICENSE.txt" + popd > /dev/null +} diff --git a/mingw-w64-mpc/PKGBUILD b/mingw-w64-mpc/PKGBUILD index b1dbc00791..64ea3c1f94 100644 --- a/mingw-w64-mpc/PKGBUILD +++ b/mingw-w64-mpc/PKGBUILD @@ -1,24 +1,22 @@ # Maintainer: Alexey Pavlov _realname=mpc - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.2 +pkgver=1.0.3 pkgrel=2 pkgdesc="Multiple precision complex arithmetic library (mingw-w64)" -groups=("${MINGW_PACKAGE_PREFIX}") url='http://www.multiprecision.org' license=('LGPL') arch=('any') depends=("${MINGW_PACKAGE_PREFIX}-mpfr") -makedepends=("${MINGW_PACKAGE_PREFIX}-gmp>=5.0" "${MINGW_PACKAGE_PREFIX}-mpfr") +makedepends=("${MINGW_PACKAGE_PREFIX}-gmp" "${MINGW_PACKAGE_PREFIX}-mpfr") options=('staticlibs' '!emptydirs') source=("http://www.multiprecision.org/mpc/download/${_realname}-${pkgver}.tar.gz") -sha1sums=('5072d82ab50ec36cc8c0e320b5c377adb48abe70') +sha1sums=('b8be66396c726fdc36ebb0f692ed8a8cca3bcc66') build() { - mkdir -p ${srcdir}/build-${MINGW_CHOST} - cd "${srcdir}/build-${MINGW_CHOST}" + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-static \ diff --git a/mingw-w64-mpfr/PKGBUILD b/mingw-w64-mpfr/PKGBUILD index b7b66258d9..689fd6df04 100644 --- a/mingw-w64-mpfr/PKGBUILD +++ b/mingw-w64-mpfr/PKGBUILD @@ -1,48 +1,46 @@ # Maintainer: Alexey Pavlov _realname=mpfr - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -_pkgver=3.1.2 -_patchlevel=p10 +_pkgver=3.1.3 +_patchlevel=p0 pkgver=${_pkgver}.${_patchlevel} -pkgrel=1 -pkgdesc="Multiple-precision floating-point library" +pkgrel=2 +pkgdesc="Multiple-precision floating-point library (mingw-w64)" arch=('any') -url="http://www.mpfr.org/" -groups=("${MINGW_PACKAGE_PREFIX}") license=('LGPL') options=('staticlibs') -depends=("${MINGW_PACKAGE_PREFIX}-gmp>=5.0") -makedepends=("${MINGW_PACKAGE_PREFIX}-gmp>=5.0") -source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz{,.asc} - mpfr-${_pkgver}-${_patchlevel}.patch) -md5sums=('e3d203d188b8fe60bb6578dd3152e05c' - 'SKIP' - '43121795ef12f1b29ada4508d9186ea9') +depends=("${MINGW_PACKAGE_PREFIX}-gmp") +makedepends=("${MINGW_PACKAGE_PREFIX}-gmp") +source=(http://www.mpfr.org/mpfr-current/${_realname}-${_pkgver}.tar.xz{,.asc}) +md5sums=('6969398cd2fbc56a6af570b5273c56a9' + 'SKIP') prepare() { cd "${srcdir}/${_realname}-${_pkgver}" - patch -p1 -i $srcdir/${_realname}-${_pkgver}-${_patchlevel}.patch + #patch -p1 -i $srcdir/${_realname}-${_pkgver}-${_patchlevel}.patch } build() { - cd "${srcdir}/${_realname}-${_pkgver}" + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - ./configure --build=${MINGW_CHOST} \ + ../${_realname}-${_pkgver}/configure \ + --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-static \ --disable-shared \ --with-gmp=${MINGW_PREFIX} + make } check() { - cd "${srcdir}/${_realname}-${_pkgver}" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "${srcdir}/${_realname}-${_pkgver}" + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-mpfr/mpfr-3.1.2-p10.patch b/mingw-w64-mpfr/mpfr-3.1.2-p10.patch deleted file mode 100644 index d42e62bf1b..0000000000 --- a/mingw-w64-mpfr/mpfr-3.1.2-p10.patch +++ /dev/null @@ -1,1577 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:52:52.000000000 +0000 -@@ -0,0 +1 @@ -+exp_2 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-03-13 15:37:28.000000000 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-09-26 10:52:52.000000000 +0000 -@@ -1 +1 @@ --3.1.2 -+3.1.2-p1 -diff -Naurd mpfr-3.1.2-a/src/exp_2.c mpfr-3.1.2-b/src/exp_2.c ---- mpfr-3.1.2-a/src/exp_2.c 2013-03-13 15:37:28.000000000 +0000 -+++ mpfr-3.1.2-b/src/exp_2.c 2013-09-26 10:52:52.000000000 +0000 -@@ -204,7 +204,7 @@ - for (k = 0; k < K; k++) - { - mpz_mul (ss, ss, ss); -- exps <<= 1; -+ exps *= 2; - exps += mpz_normalize (ss, ss, q); - } - mpfr_set_z (s, ss, MPFR_RNDN); -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-03-13 15:37:37.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2" -+#define MPFR_VERSION_STRING "3.1.2-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-03-13 15:37:34.000000000 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:52:52.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2"; -+ return "3.1.2-p1"; - } -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-09-26 10:56:55.000000000 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:56:55.000000000 +0000 -@@ -0,0 +1 @@ -+fits-smallneg -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-09-26 10:56:55.000000000 +0000 -@@ -1 +1 @@ --3.1.2-p1 -+3.1.2-p2 -diff -Naurd mpfr-3.1.2-a/src/fits_u.h mpfr-3.1.2-b/src/fits_u.h ---- mpfr-3.1.2-a/src/fits_u.h 2013-03-13 15:37:35.000000000 +0000 -+++ mpfr-3.1.2-b/src/fits_u.h 2013-09-26 10:56:55.000000000 +0000 -@@ -32,17 +32,20 @@ - int res; - - if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) -- /* Zero always fit */ -- return MPFR_IS_ZERO (f) ? 1 : 0; -- else if (MPFR_IS_NEG (f)) -- /* Negative numbers don't fit */ -- return 0; -- /* now it fits if -- (a) f <= MAXIMUM -- (b) round(f, prec(slong), rnd) <= MAXIMUM */ -+ return MPFR_IS_ZERO (f) ? 1 : 0; /* Zero always fits */ - - e = MPFR_GET_EXP (f); - -+ if (MPFR_IS_NEG (f)) -+ return e >= 1 ? 0 /* f <= -1 does not fit */ -+ : rnd != MPFR_RNDN ? MPFR_IS_LIKE_RNDU (rnd, -1) /* directed mode */ -+ : e < 0 ? 1 /* f > -1/2 fits in MPFR_RNDN */ -+ : mpfr_powerof2_raw(f); /* -1/2 fits, -1 < f < -1/2 don't */ -+ -+ /* Now it fits if -+ (a) f <= MAXIMUM -+ (b) round(f, prec(slong), rnd) <= MAXIMUM */ -+ - /* first compute prec(MAXIMUM); fits in an int */ - for (s = MAXIMUM, prec = 0; s != 0; s /= 2, prec ++); - -diff -Naurd mpfr-3.1.2-a/src/fits_uintmax.c mpfr-3.1.2-b/src/fits_uintmax.c ---- mpfr-3.1.2-a/src/fits_uintmax.c 2013-03-13 15:37:33.000000000 +0000 -+++ mpfr-3.1.2-b/src/fits_uintmax.c 2013-09-26 10:56:55.000000000 +0000 -@@ -27,51 +27,19 @@ - #include "mpfr-intmax.h" - #include "mpfr-impl.h" - --#ifdef _MPFR_H_HAVE_INTMAX_T -- --/* We can't use fits_u.h <= mpfr_cmp_ui */ --int --mpfr_fits_uintmax_p (mpfr_srcptr f, mpfr_rnd_t rnd) --{ -- mpfr_exp_t e; -- int prec; -- uintmax_t s; -- mpfr_t x; -- int res; -- -- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) -- /* Zero always fit */ -- return MPFR_IS_ZERO (f) ? 1 : 0; -- else if (MPFR_IS_NEG (f)) -- /* Negative numbers don't fit */ -- return 0; -- /* now it fits if -- (a) f <= MAXIMUM -- (b) round(f, prec(slong), rnd) <= MAXIMUM */ -- -- e = MPFR_GET_EXP (f); -- -- /* first compute prec(MAXIMUM); fits in an int */ -- for (s = MPFR_UINTMAX_MAX, prec = 0; s != 0; s /= 2, prec ++); -- -- /* MAXIMUM needs prec bits, i.e. MAXIMUM = 2^prec - 1 */ -- -- /* if e <= prec - 1, then f < 2^(prec-1) < MAXIMUM */ -- if (e <= prec - 1) -- return 1; -+/* Note: though mpfr-impl.h is included in fits_u.h, we also include it -+ above so that it gets included even when _MPFR_H_HAVE_INTMAX_T is not -+ defined; this is necessary to avoid an empty translation unit, which -+ is forbidden by ISO C. Without this, a failing test can be reproduced -+ by creating an invalid stdint.h somewhere in the default include path -+ and by compiling MPFR with "gcc -ansi -pedantic-errors". */ - -- /* if e >= prec + 1, then f >= 2^prec > MAXIMUM */ -- if (e >= prec + 1) -- return 0; -+#ifdef _MPFR_H_HAVE_INTMAX_T - -- MPFR_ASSERTD (e == prec); -+#define FUNCTION mpfr_fits_uintmax_p -+#define MAXIMUM MPFR_UINTMAX_MAX -+#define TYPE uintmax_t - -- /* hard case: first round to prec bits, then check */ -- mpfr_init2 (x, prec); -- mpfr_set (x, f, rnd); -- res = MPFR_GET_EXP (x) == e; -- mpfr_clear (x); -- return res; --} -+#include "fits_u.h" - - #endif -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:56:55.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p1" -+#define MPFR_VERSION_STRING "3.1.2-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:56:55.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p1"; -+ return "3.1.2-p2"; - } -diff -Naurd mpfr-3.1.2-a/tests/tfits.c mpfr-3.1.2-b/tests/tfits.c ---- mpfr-3.1.2-a/tests/tfits.c 2013-03-13 15:37:45.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tfits.c 2013-09-26 10:56:55.000000000 +0000 -@@ -33,155 +33,176 @@ - #include "mpfr-intmax.h" - #include "mpfr-test.h" - --#define ERROR1 { printf("Initial error for x="); mpfr_dump(x); exit(1); } --#define ERROR2 { printf("Error for x="); mpfr_dump(x); exit(1); } -+#define ERROR1(N) \ -+ do \ -+ { \ -+ printf("Error %d for rnd = %s and x = ", N, \ -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \ -+ mpfr_dump(x); \ -+ exit(1); \ -+ } \ -+ while (0) - - static void check_intmax (void); - - int - main (void) - { -- mpfr_t x; -+ mpfr_t x, y; -+ int i, r; - - tests_start_mpfr (); - - mpfr_init2 (x, 256); -+ mpfr_init2 (y, 8); - -- /* Check NAN */ -- mpfr_set_nan (x); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR1; -+ RND_LOOP (r) -+ { - -- /* Check INF */ -- mpfr_set_inf (x, 1); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check NAN */ -+ mpfr_set_nan (x); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (1); -+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (2); -+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (3); -+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (4); -+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (5); -+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (6); - -- /* Check Zero */ -- MPFR_SET_ZERO (x); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check INF */ -+ mpfr_set_inf (x, 1); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (7); -+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (8); -+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (9); -+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (10); -+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (11); -+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (12); - -- /* Check small op */ -- mpfr_set_str1 (x, "1@-1"); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check Zero */ -+ MPFR_SET_ZERO (x); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (13); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (14); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (15); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (16); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (17); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (18); - -- /* Check 17 */ -- mpfr_set_ui (x, 17, MPFR_RNDN); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check small positive op */ -+ mpfr_set_str1 (x, "1@-1"); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (19); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (20); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (21); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (22); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (23); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (24); - -- /* Check all other values */ -- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -- mpfr_mul_2exp (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR1; -- mpfr_mul_2exp (x, x, 40, MPFR_RNDN); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check 17 */ -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (25); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (26); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (27); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (28); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (29); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (30); - -- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, LONG_MAX, MPFR_RNDN); -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, UINT_MAX, MPFR_RNDN); -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, INT_MAX, MPFR_RNDN); -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN); -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN); -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check all other values */ -+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -+ mpfr_mul_2exp (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (31); -+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (32); -+ mpfr_mul_2exp (x, x, 40, MPFR_RNDN); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (33); -+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (34); -+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (35); -+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (36); -+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (37); - -- mpfr_set_si (x, 1, MPFR_RNDN); -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (38); -+ mpfr_set_ui (x, LONG_MAX, MPFR_RNDN); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (39); -+ mpfr_set_ui (x, UINT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (40); -+ mpfr_set_ui (x, INT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (41); -+ mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (42); -+ mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (43); - -- /* Check negative value */ -- mpfr_set_si (x, -1, MPFR_RNDN); -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -+ mpfr_set_si (x, 1, MPFR_RNDN); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (44); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (45); -+ -+ /* Check negative op */ -+ for (i = 1; i <= 4; i++) -+ { -+ int inv; -+ -+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); -+ mpfr_rint (y, x, (mpfr_rnd_t) r); -+ inv = MPFR_NOTZERO (y); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (46); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (47); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (48); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (49); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (50); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (51); -+ } -+ } - - mpfr_clear (x); -+ mpfr_clear (y); - - check_intmax (); - -@@ -189,85 +210,98 @@ - return 0; - } - --static void check_intmax (void) -+static void -+check_intmax (void) - { - #ifdef _MPFR_H_HAVE_INTMAX_T -- mpfr_t x; -+ mpfr_t x, y; -+ int i, r; - -- mpfr_init2 (x, sizeof (uintmax_t)*CHAR_BIT); -+ mpfr_init2 (x, sizeof (uintmax_t) * CHAR_BIT); -+ mpfr_init2 (y, 8); - -- /* Check NAN */ -- mpfr_set_nan (x); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ RND_LOOP (r) -+ { -+ /* Check NAN */ -+ mpfr_set_nan (x); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (52); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (53); - -- /* Check INF */ -- mpfr_set_inf (x, 1); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check INF */ -+ mpfr_set_inf (x, 1); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (54); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (55); - -- /* Check Zero */ -- MPFR_SET_ZERO (x); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check Zero */ -+ MPFR_SET_ZERO (x); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (56); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (57); - -- /* Check small op */ -- mpfr_set_str1 (x, "1@-1"); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check positive small op */ -+ mpfr_set_str1 (x, "1@-1"); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (58); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (59); - -- /* Check 17 */ -- mpfr_set_ui (x, 17, MPFR_RNDN); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check 17 */ -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (60); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (61); - -- /* Check hugest */ -- mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check hugest */ -+ mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (62); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (63); - -- /* Check all other values */ -- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -- mpfr_add_ui (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -- mpfr_add_ui (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN); -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_sub_ui (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check all other values */ -+ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -+ mpfr_add_ui (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (64); -+ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (65); -+ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -+ mpfr_add_ui (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (66); -+ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (67); -+ mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (68); -+ mpfr_sub_ui (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (69); - -- /* Check negative value */ -- mpfr_set_si (x, -1, MPFR_RNDN); -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check negative op */ -+ for (i = 1; i <= 4; i++) -+ { -+ int inv; -+ -+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); -+ mpfr_rint (y, x, (mpfr_rnd_t) r); -+ inv = MPFR_NOTZERO (y); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (70); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (71); -+ } -+ } - - mpfr_clear (x); -+ mpfr_clear (y); - #endif - } -- -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-10-09 13:34:21.000000000 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-10-09 13:34:21.000000000 +0000 -@@ -0,0 +1 @@ -+clang-divby0 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-10-09 13:34:21.000000000 +0000 -@@ -1 +1 @@ --3.1.2-p2 -+3.1.2-p3 -diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h ---- mpfr-3.1.2-a/src/mpfr-impl.h 2013-03-13 15:37:36.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000 -@@ -468,8 +468,16 @@ - #define MPFR_LIMBS_PER_FLT ((IEEE_FLT_MANT_DIG-1)/GMP_NUMB_BITS+1) - - /* Visual C++ doesn't support +1.0/0.0, -1.0/0.0 and 0.0/0.0 -- at compile time. */ --#if defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200) -+ at compile time. -+ Clang with -fsanitize=undefined is a bit similar due to a bug: -+ http://llvm.org/bugs/show_bug.cgi?id=17381 -+ but even without its sanitizer, it may be better to use the -+ double_zero version until IEEE 754 division by zero is properly -+ supported: -+ http://llvm.org/bugs/show_bug.cgi?id=17000 -+*/ -+#if (defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)) || \ -+ defined(__clang__) - static double double_zero = 0.0; - # define DBL_NAN (double_zero/double_zero) - # define DBL_POS_INF ((double) 1.0/double_zero) -@@ -501,6 +509,8 @@ - (with Xcode 2.4.1, i.e. the latest one). */ - #define LVALUE(x) (&(x) == &(x) || &(x) != &(x)) - #define DOUBLE_ISINF(x) (LVALUE(x) && ((x) > DBL_MAX || (x) < -DBL_MAX)) -+/* The DOUBLE_ISNAN(x) macro is also valid on long double x -+ (assuming that the compiler isn't too broken). */ - #ifdef MPFR_NANISNAN - /* Avoid MIPSpro / IRIX64 / gcc -ffast-math (incorrect) optimizations. - The + must not be replaced by a ||. With gcc -ffast-math, NaN is -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-10-09 13:34:21.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p2" -+#define MPFR_VERSION_STRING "3.1.2-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-10-09 13:34:21.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p2"; -+ return "3.1.2-p3"; - } -diff -Naurd mpfr-3.1.2-a/tests/tget_flt.c mpfr-3.1.2-b/tests/tget_flt.c ---- mpfr-3.1.2-a/tests/tget_flt.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tget_flt.c 2013-10-09 13:34:21.000000000 +0000 -@@ -28,9 +28,17 @@ - main (void) - { - mpfr_t x, y; -- float f, g, infp; -+ float f, g; - int i; -+#if !defined(MPFR_ERRDIVZERO) -+ float infp; -+#endif -+ -+ tests_start_mpfr (); - -+#if !defined(MPFR_ERRDIVZERO) -+ /* The definition of DBL_POS_INF involves a division by 0. This makes -+ "clang -O2 -fsanitize=undefined -fno-sanitize-recover" fail. */ - infp = (float) DBL_POS_INF; - if (infp * 0.5 != infp) - { -@@ -38,8 +46,7 @@ - fprintf (stderr, "(this is probably a compiler bug, please report)\n"); - exit (1); - } -- -- tests_start_mpfr (); -+#endif - - mpfr_init2 (x, 24); - mpfr_init2 (y, 24); -@@ -353,6 +360,7 @@ - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } -+#if !defined(MPFR_ERRDIVZERO) - f = mpfr_get_flt (x, MPFR_RNDN); /* first round to 2^128 (even rule), - thus we should get +Inf */ - g = infp; -@@ -376,6 +384,7 @@ - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } -+#endif - - mpfr_clear (x); - mpfr_clear (y); -diff -Naurd mpfr-3.1.2-a/tests/tset_ld.c mpfr-3.1.2-b/tests/tset_ld.c ---- mpfr-3.1.2-a/tests/tset_ld.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tset_ld.c 2013-10-09 13:34:21.000000000 +0000 -@@ -47,8 +47,11 @@ - static int - Isnan_ld (long double d) - { -- double e = (double) d; -- if (DOUBLE_ISNAN (e)) -+ /* Do not convert d to double as this can give an overflow, which -+ may confuse compilers without IEEE 754 support (such as clang -+ -fsanitize=undefined), or trigger a trap if enabled. -+ The DOUBLE_ISNAN macro should work fine on long double. */ -+ if (DOUBLE_ISNAN (d)) - return 1; - LONGDOUBLE_NAN_ACTION (d, goto yes); - return 0; -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-11-15 00:51:49.323334999 +0000 -@@ -0,0 +1 @@ -+printf-alt0 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-11-15 00:51:49.323334999 +0000 -@@ -1 +1 @@ --3.1.2-p3 -+3.1.2-p4 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-11-15 00:51:49.323334999 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p3" -+#define MPFR_VERSION_STRING "3.1.2-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c ---- mpfr-3.1.2-a/src/vasprintf.c 2013-03-13 15:37:37.000000000 +0000 -+++ mpfr-3.1.2-b/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 -@@ -1040,7 +1040,7 @@ - } - - /* Determine the different parts of the string representation of the regular -- number P when SPEC.SPEC is 'e', 'E', 'g', or 'G'. -+ number P when spec.spec is 'e', 'E', 'g', or 'G'. - DEC_INFO contains the previously computed exponent and string or is NULL. - - return -1 if some field > INT_MAX */ -@@ -1167,7 +1167,7 @@ - } - - /* Determine the different parts of the string representation of the regular -- number P when SPEC.SPEC is 'f', 'F', 'g', or 'G'. -+ number P when spec.spec is 'f', 'F', 'g', or 'G'. - DEC_INFO contains the previously computed exponent and string or is NULL. - - return -1 if some field of number_parts is greater than INT_MAX */ -@@ -1559,7 +1559,7 @@ - /* fractional part */ - { - np->point = MPFR_DECIMAL_POINT; -- np->fp_trailing_zeros = (spec.spec == 'g' && spec.spec == 'G') ? -+ np->fp_trailing_zeros = (spec.spec == 'g' || spec.spec == 'G') ? - spec.prec - 1 : spec.prec; - } - else if (spec.alt) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-11-15 00:51:49.323334999 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p3"; -+ return "3.1.2-p4"; - } -diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c ---- mpfr-3.1.2-a/tests/tsprintf.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 -@@ -456,10 +456,16 @@ - check_sprintf ("1.999900 ", "%-#10.7RG", x); - check_sprintf ("1.9999 ", "%-10.7RG", x); - mpfr_set_ui (x, 1, MPFR_RNDN); -+ check_sprintf ("1.", "%#.1Rg", x); -+ check_sprintf ("1. ", "%-#5.1Rg", x); -+ check_sprintf (" 1.0", "%#5.2Rg", x); - check_sprintf ("1.00000000000000000000000000000", "%#.30Rg", x); - check_sprintf ("1", "%.30Rg", x); - mpfr_set_ui (x, 0, MPFR_RNDN); -- check_sprintf ("0.000000000000000000000000000000", "%#.30Rg", x); -+ check_sprintf ("0.", "%#.1Rg", x); -+ check_sprintf ("0. ", "%-#5.1Rg", x); -+ check_sprintf (" 0.0", "%#5.2Rg", x); -+ check_sprintf ("0.00000000000000000000000000000", "%#.30Rg", x); - check_sprintf ("0", "%.30Rg", x); - - /* following tests with precision 53 bits */ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-12-01 11:07:49.575329762 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-12-01 11:07:49.751331625 +0000 -@@ -0,0 +1 @@ -+custom_init_set -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-12-01 11:07:49.571329714 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-12-01 11:07:49.747331585 +0000 -@@ -1 +1 @@ --3.1.2-p4 -+3.1.2-p5 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-12-01 11:07:49.571329714 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-12-01 11:07:49.747331585 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p4" -+#define MPFR_VERSION_STRING "3.1.2-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -861,7 +861,7 @@ - _t = (mpfr_kind_t) _k; \ - _s = 1; \ - } else { \ -- _t = (mpfr_kind_t) -k; \ -+ _t = (mpfr_kind_t) - _k; \ - _s = -1; \ - } \ - _e = _t == MPFR_REGULAR_KIND ? (e) : \ -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-12-01 11:07:49.575329762 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-12-01 11:07:49.747331585 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p4"; -+ return "3.1.2-p5"; - } -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-04-15 21:56:49.697059857 +0000 -@@ -0,0 +1 @@ -+li2-return -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-04-15 21:56:49.697059857 +0000 -@@ -1 +1 @@ --3.1.2-p5 -+3.1.2-p6 -diff -Naurd mpfr-3.1.2-a/src/li2.c mpfr-3.1.2-b/src/li2.c ---- mpfr-3.1.2-a/src/li2.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/li2.c 2014-04-15 21:56:49.653058661 +0000 -@@ -630,5 +630,5 @@ - return mpfr_check_range (y, inexact, rnd_mode); - } - -- MPFR_ASSERTN (0); /* should never reach this point */ -+ MPFR_RET_NEVER_GO_HERE (); - } -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 21:56:49.697059857 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p5" -+#define MPFR_VERSION_STRING "3.1.2-p6" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-04-15 21:56:49.697059857 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p5"; -+ return "3.1.2-p6"; - } -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-04-15 22:04:57.090286262 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:04:57.162288198 +0000 -@@ -0,0 +1 @@ -+exp3 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-04-15 22:04:57.086286154 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:04:57.162288198 +0000 -@@ -1 +1 @@ --3.1.2-p6 -+3.1.2-p7 -diff -Naurd mpfr-3.1.2-a/src/exp3.c mpfr-3.1.2-b/src/exp3.c ---- mpfr-3.1.2-a/src/exp3.c 2013-03-13 15:37:34.000000000 +0000 -+++ mpfr-3.1.2-b/src/exp3.c 2014-04-15 22:04:57.126287230 +0000 -@@ -283,7 +283,7 @@ - } - } - -- if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDD, MPFR_RNDZ, -+ if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDN, MPFR_RNDZ, - MPFR_PREC(y) + (rnd_mode == MPFR_RNDN))) - { - inexact = mpfr_set (y, shift_x > 0 ? t : tmp, rnd_mode); -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:04:57.086286154 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:04:57.162288198 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p6" -+#define MPFR_VERSION_STRING "3.1.2-p7" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-04-15 22:04:57.090286262 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:04:57.162288198 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p6"; -+ return "3.1.2-p7"; - } -diff -Naurd mpfr-3.1.2-a/tests/texp.c mpfr-3.1.2-b/tests/texp.c ---- mpfr-3.1.2-a/tests/texp.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/texp.c 2014-04-15 22:04:57.126287230 +0000 -@@ -150,6 +150,22 @@ - exit (1); - } - -+ mpfr_set_prec (x, 118); -+ mpfr_set_str_binary (x, "0.1110010100011101010000111110011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E-86"); -+ mpfr_set_prec (y, 118); -+ mpfr_exp_2 (y, x, MPFR_RNDU); -+ mpfr_exp_3 (x, x, MPFR_RNDU); -+ if (mpfr_cmp (x, y)) -+ { -+ printf ("mpfr_exp_2 and mpfr_exp_3 differ for prec=118\n"); -+ printf ("mpfr_exp_2 gives "); -+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN); -+ printf ("\nmpfr_exp_3 gives "); -+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ - mpfr_clear (x); - mpfr_clear (y); - return 0; -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-04-15 22:20:32.243481506 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:22:32.418722707 +0000 -@@ -0,0 +1 @@ -+gmp6-compat -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-04-15 22:20:20.755171478 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:21:45.225450147 +0000 -@@ -1 +1 @@ --3.1.2-p7 -+3.1.2-p8 -diff -Naurd mpfr-3.1.2-a/configure mpfr-3.1.2-b/configure ---- mpfr-3.1.2-a/configure 2013-03-13 15:38:20.000000000 +0000 -+++ mpfr-3.1.2-b/configure 2014-04-15 22:21:38.821277476 +0000 -@@ -14545,26 +14545,30 @@ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --if test "$use_gmp_build" = yes ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid GMP_NUMB_BITS" >&5 --$as_echo_n "checking for valid GMP_NUMB_BITS... " >&6; } -- if test "$cross_compiling" = yes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency" >&5 -+$as_echo_n "checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... " >&6; } -+if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't test" >&5 - $as_echo "can't test" >&6; } - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+#include - #include - #include "gmp.h" --#include "gmp-impl.h" - - int - main () - { - -- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT -- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; -+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT) -+ return 0; -+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS); -+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t)); -+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n", -+ (long) (sizeof(mp_limb_t) * CHAR_BIT)); -+ return 1; - - ; - return 0; -@@ -14577,14 +14581,14 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- as_fn_error $? "GMP_NUMB_BITS is incorrect. --You probably need to change some of the GMP or MPFR compile options." "$LINENO" 5 -+ as_fn_error $? "GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. -+You probably need to change some of the GMP or MPFR compile options. -+See 'config.log' for details (search for GMP_NUMB_BITS)." "$LINENO" 5 - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - --fi - - - if test "$dont_link_with_gmp" = yes ; then -diff -Naurd mpfr-3.1.2-a/configure.ac mpfr-3.1.2-b/configure.ac ---- mpfr-3.1.2-a/configure.ac 2013-03-13 15:37:46.000000000 +0000 -+++ mpfr-3.1.2-b/configure.ac 2013-03-13 15:37:46.000000000 +0000 -@@ -435,23 +435,29 @@ - ]) - fi - --dnl Check for valid GMP_NUMB_BITS and BYTES_PER_MP_LIMB -+dnl Check for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency. -+dnl Problems may occur if gmp.h was generated with some ABI -+dnl and is used with another ABI (or if nails are used). - dnl This test doesn't need to link with libgmp (at least it shouldn't). --if test "$use_gmp_build" = yes ; then -- AC_MSG_CHECKING(for valid GMP_NUMB_BITS) -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+AC_MSG_CHECKING(for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency) -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+#include - #include - #include "gmp.h" --#include "gmp-impl.h" - ]], [[ -- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT -- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; -+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT) -+ return 0; -+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS); -+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t)); -+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n", -+ (long) (sizeof(mp_limb_t) * CHAR_BIT)); -+ return 1; - ]])], [AC_MSG_RESULT(yes)], [ - AC_MSG_RESULT(no) -- AC_MSG_ERROR([GMP_NUMB_BITS is incorrect. --You probably need to change some of the GMP or MPFR compile options.])], -+ AC_MSG_ERROR([GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. -+You probably need to change some of the GMP or MPFR compile options. -+See 'config.log' for details (search for GMP_NUMB_BITS).])], - [AC_MSG_RESULT([can't test])]) --fi - - - dnl We really need to link using libtool. But it is impossible with the current -diff -Naurd mpfr-3.1.2-a/src/init2.c mpfr-3.1.2-b/src/init2.c ---- mpfr-3.1.2-a/src/init2.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/init2.c 2014-04-15 22:21:06.220398489 +0000 -@@ -30,11 +30,11 @@ - - /* Check if we can represent the number of limbs - * associated to the maximum of mpfr_prec_t*/ -- MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/BYTES_PER_MP_LIMB) ); -+ MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/MPFR_BYTES_PER_MP_LIMB) ); - -- /* Check for correct GMP_NUMB_BITS and BYTES_PER_MP_LIMB */ -- MPFR_ASSERTN( GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT -- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ); -+ /* Check for correct GMP_NUMB_BITS and MPFR_BYTES_PER_MP_LIMB */ -+ MPFR_ASSERTN( GMP_NUMB_BITS == MPFR_BYTES_PER_MP_LIMB * CHAR_BIT -+ && sizeof(mp_limb_t) == MPFR_BYTES_PER_MP_LIMB ); - - MPFR_ASSERTN (mp_bits_per_limb == GMP_NUMB_BITS); - -diff -Naurd mpfr-3.1.2-a/src/mpfr-gmp.h mpfr-3.1.2-b/src/mpfr-gmp.h ---- mpfr-3.1.2-a/src/mpfr-gmp.h 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr-gmp.h 2014-04-15 22:21:06.220398489 +0000 -@@ -72,7 +72,6 @@ - #endif - - /* Define some macros */ --#define BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT) - - #define MP_LIMB_T_MAX (~(mp_limb_t)0) - -@@ -96,19 +95,19 @@ - #define SHRT_HIGHBIT SHRT_MIN - - /* MP_LIMB macros */ --#define MPN_ZERO(dst, n) memset((dst), 0, (n)*BYTES_PER_MP_LIMB) --#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB) --#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB) -+#define MPN_ZERO(dst, n) memset((dst), 0, (n)*MPFR_BYTES_PER_MP_LIMB) -+#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB) -+#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB) - #define MPN_COPY(dst,src,n) \ - do \ - { \ - if ((dst) != (src)) \ - { \ - MPFR_ASSERTD ((char *) (dst) >= (char *) (src) + \ -- (n) * BYTES_PER_MP_LIMB || \ -+ (n) * MPFR_BYTES_PER_MP_LIMB || \ - (char *) (src) >= (char *) (dst) + \ -- (n) * BYTES_PER_MP_LIMB); \ -- memcpy ((dst), (src), (n) * BYTES_PER_MP_LIMB); \ -+ (n) * MPFR_BYTES_PER_MP_LIMB); \ -+ memcpy ((dst), (src), (n) * MPFR_BYTES_PER_MP_LIMB); \ - } \ - } \ - while (0) -diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h ---- mpfr-3.1.2-a/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr-impl.h 2014-04-15 22:21:06.220398489 +0000 -@@ -191,7 +191,7 @@ - # endif - #endif - -- -+#define MPFR_BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT) - - /****************************************************** - ******************** Check GMP *********************** -@@ -930,7 +930,7 @@ - #define MPFR_SET_ALLOC_SIZE(x, n) \ - ( ((mp_size_t*) MPFR_MANT(x))[-1] = n) - #define MPFR_MALLOC_SIZE(s) \ -- ( sizeof(mpfr_size_limb_t) + BYTES_PER_MP_LIMB * ((size_t) s) ) -+ ( sizeof(mpfr_size_limb_t) + MPFR_BYTES_PER_MP_LIMB * ((size_t) s) ) - #define MPFR_SET_MANT_PTR(x,p) \ - (MPFR_MANT(x) = (mp_limb_t*) ((mpfr_size_limb_t*) p + 1)) - #define MPFR_GET_REAL_PTR(x) \ -@@ -964,7 +964,7 @@ - #endif - - #define MPFR_TMP_LIMBS_ALLOC(N) \ -- ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * BYTES_PER_MP_LIMB)) -+ ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * MPFR_BYTES_PER_MP_LIMB)) - - /* temporary allocate 1 limb at xp, and initialize mpfr variable x */ - /* The temporary var doesn't have any size field, but it doesn't matter -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:20:20.755171478 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:21:45.225450147 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p7" -+#define MPFR_VERSION_STRING "3.1.2-p8" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/mul.c mpfr-3.1.2-b/src/mul.c ---- mpfr-3.1.2-a/src/mul.c 2013-03-13 15:37:37.000000000 +0000 -+++ mpfr-3.1.2-b/src/mul.c 2014-04-15 22:21:06.224398597 +0000 -@@ -106,7 +106,7 @@ - MPFR_ASSERTD(tn <= k); - - /* Check for no size_t overflow*/ -- MPFR_ASSERTD((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB); -+ MPFR_ASSERTD((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB); - MPFR_TMP_MARK(marker); - tmp = MPFR_TMP_LIMBS_ALLOC (k); - -@@ -301,7 +301,7 @@ - MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */ - - /* Check for no size_t overflow*/ -- MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB); -+ MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB); - MPFR_TMP_MARK (marker); - tmp = MPFR_TMP_LIMBS_ALLOC (k); - -diff -Naurd mpfr-3.1.2-a/src/stack_interface.c mpfr-3.1.2-b/src/stack_interface.c ---- mpfr-3.1.2-a/src/stack_interface.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/stack_interface.c 2014-04-15 22:21:06.220398489 +0000 -@@ -26,7 +26,7 @@ - size_t - mpfr_custom_get_size (mpfr_prec_t prec) - { -- return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB; -+ return MPFR_PREC2LIMBS (prec) * MPFR_BYTES_PER_MP_LIMB; - } - - #undef mpfr_custom_init -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-04-15 22:20:20.755171478 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:21:45.225450147 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p7"; -+ return "3.1.2-p8"; - } -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-06-30 15:15:25.533266905 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:15:25.617269178 +0000 -@@ -0,0 +1 @@ -+div-overflow -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-06-30 15:15:25.529266797 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:15:25.617269178 +0000 -@@ -1 +1 @@ --3.1.2-p8 -+3.1.2-p9 -diff -Naurd mpfr-3.1.2-a/src/div.c mpfr-3.1.2-b/src/div.c ---- mpfr-3.1.2-a/src/div.c 2013-03-13 15:37:33.000000000 +0000 -+++ mpfr-3.1.2-b/src/div.c 2014-06-30 15:15:25.585268312 +0000 -@@ -750,7 +750,9 @@ - truncate_check_qh: - if (qh) - { -- qexp ++; -+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) -+ qexp ++; -+ /* else qexp is now incorrect, but one will still get an overflow */ - q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; - } - goto truncate; -@@ -765,7 +767,9 @@ - inex = 1; /* always here */ - if (mpn_add_1 (q0p, q0p, q0size, MPFR_LIMB_ONE << sh)) - { -- qexp ++; -+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) -+ qexp ++; -+ /* else qexp is now incorrect, but one will still get an overflow */ - q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; - } - -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:15:25.533266905 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:15:25.613269070 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p8" -+#define MPFR_VERSION_STRING "3.1.2-p9" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-06-30 15:15:25.533266905 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:15:25.613269070 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p8"; -+ return "3.1.2-p9"; - } -diff -Naurd mpfr-3.1.2-a/tests/tdiv.c mpfr-3.1.2-b/tests/tdiv.c ---- mpfr-3.1.2-a/tests/tdiv.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tdiv.c 2014-06-30 15:15:25.585268312 +0000 -@@ -1104,6 +1104,96 @@ - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) - #include "tgeneric.c" - -+static void -+test_extreme (void) -+{ -+ mpfr_t x, y, z; -+ mpfr_exp_t emin, emax; -+ mpfr_prec_t p[4] = { 8, 32, 64, 256 }; -+ int xi, yi, zi, j, r; -+ unsigned int flags, ex_flags; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ mpfr_set_emin (MPFR_EMIN_MIN); -+ mpfr_set_emax (MPFR_EMAX_MAX); -+ -+ for (xi = 0; xi < 4; xi++) -+ { -+ mpfr_init2 (x, p[xi]); -+ mpfr_setmax (x, MPFR_EMAX_MAX); -+ MPFR_ASSERTN (mpfr_check (x)); -+ for (yi = 0; yi < 4; yi++) -+ { -+ mpfr_init2 (y, p[yi]); -+ mpfr_setmin (y, MPFR_EMIN_MIN); -+ for (j = 0; j < 2; j++) -+ { -+ MPFR_ASSERTN (mpfr_check (y)); -+ for (zi = 0; zi < 4; zi++) -+ { -+ mpfr_init2 (z, p[zi]); -+ RND_LOOP (r) -+ { -+ mpfr_clear_flags (); -+ mpfr_div (z, x, y, (mpfr_rnd_t) r); -+ flags = __gmpfr_flags; -+ MPFR_ASSERTN (mpfr_check (z)); -+ ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; -+ if (flags != ex_flags) -+ { -+ printf ("Bad flags in test_extreme on z = a/b" -+ " with %s and\n", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); -+ printf ("a = "); -+ mpfr_dump (x); -+ printf ("b = "); -+ mpfr_dump (y); -+ printf ("Expected flags:"); -+ flags_out (ex_flags); -+ printf ("Got flags: "); -+ flags_out (flags); -+ printf ("z = "); -+ mpfr_dump (z); -+ exit (1); -+ } -+ mpfr_clear_flags (); -+ mpfr_div (z, y, x, (mpfr_rnd_t) r); -+ flags = __gmpfr_flags; -+ MPFR_ASSERTN (mpfr_check (z)); -+ ex_flags = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; -+ if (flags != ex_flags) -+ { -+ printf ("Bad flags in test_extreme on z = a/b" -+ " with %s and\n", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); -+ printf ("a = "); -+ mpfr_dump (y); -+ printf ("b = "); -+ mpfr_dump (x); -+ printf ("Expected flags:"); -+ flags_out (ex_flags); -+ printf ("Got flags: "); -+ flags_out (flags); -+ printf ("z = "); -+ mpfr_dump (z); -+ exit (1); -+ } -+ } -+ mpfr_clear (z); -+ } /* zi */ -+ mpfr_nextabove (y); -+ } /* j */ -+ mpfr_clear (y); -+ } /* yi */ -+ mpfr_clear (x); -+ } /* xi */ -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -1130,6 +1220,7 @@ - test_20070603 (); - test_20070628 (); - test_generic (2, 800, 50); -+ test_extreme (); - - tests_end_mpfr (); - return 0; -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:17:53.417270314 +0000 -@@ -0,0 +1 @@ -+vasprintf -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:17:53.413270206 +0000 -@@ -1 +1 @@ --3.1.2-p9 -+3.1.2-p10 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:17:53.413270206 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p9" -+#define MPFR_VERSION_STRING "3.1.2-p10" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c ---- mpfr-3.1.2-a/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 -+++ mpfr-3.1.2-b/src/vasprintf.c 2014-06-30 15:17:53.377269231 +0000 -@@ -884,14 +884,18 @@ - first digit, we want the exponent for radix two and the decimal - point AFTER the first digit. */ - { -- MPFR_ASSERTN (exp > MPFR_EMIN_MIN /4); /* possible overflow */ -+ /* An integer overflow is normally not possible since MPFR_EXP_MIN -+ is twice as large as MPFR_EMIN_MIN. */ -+ MPFR_ASSERTN (exp > (MPFR_EXP_MIN + 3) / 4); - exp = (exp - 1) * 4; - } - else - /* EXP is the exponent for decimal point BEFORE the first digit, we - want the exponent for decimal point AFTER the first digit. */ - { -- MPFR_ASSERTN (exp > MPFR_EMIN_MIN); /* possible overflow */ -+ /* An integer overflow is normally not possible since MPFR_EXP_MIN -+ is twice as large as MPFR_EMIN_MIN. */ -+ MPFR_ASSERTN (exp > MPFR_EXP_MIN); - --exp; - } - } -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:17:53.413270206 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p9"; -+ return "3.1.2-p10"; - } -diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c ---- mpfr-3.1.2-a/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 -+++ mpfr-3.1.2-b/tests/tsprintf.c 2014-06-30 15:17:53.377269231 +0000 -@@ -1184,6 +1184,69 @@ - check_emax_aux (MPFR_EMAX_MAX); - } - -+static void -+check_emin_aux (mpfr_exp_t e) -+{ -+ mpfr_t x; -+ char *s1, s2[256]; -+ int i; -+ mpfr_exp_t emin; -+ mpz_t ee; -+ -+ MPFR_ASSERTN (e >= LONG_MIN); -+ emin = mpfr_get_emin (); -+ set_emin (e); -+ -+ mpfr_init2 (x, 16); -+ mpz_init (ee); -+ -+ mpfr_setmin (x, e); -+ mpz_set_si (ee, e); -+ mpz_sub_ui (ee, ee, 1); -+ -+ i = mpfr_asprintf (&s1, "%Ra", x); -+ MPFR_ASSERTN (i > 0); -+ -+ gmp_snprintf (s2, 256, "0x1p%Zd", ee); -+ -+ if (strcmp (s1, s2) != 0) -+ { -+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e); -+ printf ("Expected %s\n", s2); -+ printf ("Got %s\n", s1); -+ exit (1); -+ } -+ -+ mpfr_free_str (s1); -+ -+ i = mpfr_asprintf (&s1, "%Rb", x); -+ MPFR_ASSERTN (i > 0); -+ -+ gmp_snprintf (s2, 256, "1p%Zd", ee); -+ -+ if (strcmp (s1, s2) != 0) -+ { -+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e); -+ printf ("Expected %s\n", s2); -+ printf ("Got %s\n", s1); -+ exit (1); -+ } -+ -+ mpfr_free_str (s1); -+ -+ mpfr_clear (x); -+ mpz_clear (ee); -+ set_emin (emin); -+} -+ -+static void -+check_emin (void) -+{ -+ check_emin_aux (-15); -+ check_emin_aux (mpfr_get_emin ()); -+ check_emin_aux (MPFR_EMIN_MIN); -+} -+ - int - main (int argc, char **argv) - { -@@ -1203,6 +1266,7 @@ - decimal (); - mixed (); - check_emax (); -+ check_emin (); - - #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) - locale_da_DK (); diff --git a/mingw-w64-mpg123/PKGBUILD b/mingw-w64-mpg123/PKGBUILD index 928022d93a..fc65e8ca1f 100644 --- a/mingw-w64-mpg123/PKGBUILD +++ b/mingw-w64-mpg123/PKGBUILD @@ -1,54 +1,59 @@ # Maintainer: Alexey Pavlov _realname=mpg123 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.21.0 -pkgrel=1 +pkgver=1.22.4 +pkgrel=2 pkgdesc="A console based real time MPEG Audio Player for Layer 1, 2 and 3 (mingw-w64)" arch=('any') url="http://sourceforge.net/projects/mpg123" license=("LGPL2.1") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-portaudio" - "${MINGW_PACKAGE_PREFIX}-openal" - "${MINGW_PACKAGE_PREFIX}-SDL") + "${MINGW_PACKAGE_PREFIX}-openal" + "${MINGW_PACKAGE_PREFIX}-portaudio" + "${MINGW_PACKAGE_PREFIX}-SDL") depends=("${MINGW_PACKAGE_PREFIX}-libtool" "${MINGW_PACKAGE_PREFIX}-gcc-libs") -optdepends=("${MINGW_PACKAGE_PREFIX}-portaudio" - "${MINGW_PACKAGE_PREFIX}-openal" +optdepends=("${MINGW_PACKAGE_PREFIX}-openal" + "${MINGW_PACKAGE_PREFIX}-portaudio" "${MINGW_PACKAGE_PREFIX}-SDL") -options=('strip' 'staticlibs') +options=('strip' 'staticlibs' 'libtool') source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.bz2"{,.sig} 0001-update-ac-and-silent-rules.mingw.patch 0002-openal-library.patch) -md5sums=('13a9df5d4e7aa110e4ae27cf30128ce9' +md5sums=('2dfafae3bbc532b4c8b04a77c6a6de89' 'SKIP' '5d01842fa623f7bb53bf22be64aa042d' '9ac9a255f3ab3043915ceec455ccdbec') prepare() { - cd "$srcdir/${_realname}-${pkgver}" - patch -p1 -i "$srcdir"/0001-update-ac-and-silent-rules.mingw.patch - patch -p1 -i "$srcdir"/0002-openal-library.patch - + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}"/0001-update-ac-and-silent-rules.mingw.patch + #patch -p1 -i "${srcdir}"/0002-openal-library.patch + autoreconf -fi } build() { + export lt_cv_deplibs_check_method='pass_all' + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - export lt_cv_deplibs_check_method='pass_all' - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ --enable-silent-rules - make + + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-mpv/PKGBUILD b/mingw-w64-mpv/PKGBUILD new file mode 100644 index 0000000000..5a82f910b0 --- /dev/null +++ b/mingw-w64-mpv/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Alexey Pavlov +# Contributor: James Ross-Gowan + +_realname=mpv +pkgbase="mingw-w64-${_realname}" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.14.0 +pkgrel=1 +pkgdesc="Video player based on MPlayer/mplayer2 (mingw-w64)" +url="http://mpv.io" +arch=('any') +license=('GPL3') +depends=("${MINGW_PACKAGE_PREFIX}-angleproject-git" + "${MINGW_PACKAGE_PREFIX}-enca" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-libarchive" + "${MINGW_PACKAGE_PREFIX}-libcaca" + #"${MINGW_PACKAGE_PREFIX}-libcdio-paranoia" + "${MINGW_PACKAGE_PREFIX}-libdvdnav" + "${MINGW_PACKAGE_PREFIX}-libdvdread" + "${MINGW_PACKAGE_PREFIX}-libguess" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-lua51" + "${MINGW_PACKAGE_PREFIX}-rubberband" + "${MINGW_PACKAGE_PREFIX}-uchardet-git" + "winpty-git") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-python3-docutils" + "perl" + "pkg-config" + "python") +source=(${_realname}-${pkgver}.tar.gz::https://github.com/mpv-player/${_realname}/archive/v${pkgver}.tar.gz) +md5sums=('9f78599b52d9e603f2481d36746ddd0c') + +# strip doesn't work well with the mpv.com wrapper, so strip manually instead +options=(!strip !emptydirs) + +prepare() { + cd ${_realname}-${pkgver} + [[ -x ./waf ]] || /usr/bin/python3 ./bootstrap.py + sed -i 's:bin/env python$:bin/env python3:' waf +} + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + + DEST_OS=win32 \ + TARGET=${MINGW_CHOST} \ + PKG_CONFIG=/usr/bin/pkg-config \ + CC=gcc PERL=/usr/bin/perl \ + AR=${MINGW_PREFIX}/bin/ar \ + WINDRES=${MINGW_PREFIX}/bin/windres \ + RST2MAN=${MINGW_PREFIX}/bin/rst2man3 \ + /usr/bin/python3 ./waf configure \ + --prefix=${MINGW_PREFIX} \ + --check-c-compiler=gcc \ + --enable-libmpv-shared \ + --disable-cdda \ + --enable-caca \ + --enable-dvdnav \ + --enable-dvdread \ + --enable-egl-angle \ + --enable-enca \ + --enable-gpl3 \ + --enable-jpeg \ + --enable-lcms2 \ + --enable-libarchive \ + --enable-libass \ + --enable-libbluray \ + --enable-libguess \ + --enable-lua \ + --enable-rubberband \ + --enable-uchardet \ + --out="${srcdir}/build-${MINGW_CHOST}" + + /usr/bin/python3 ./waf build +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" + export PYTHON=${MINGW_PREFIX}/bin/python3 + /usr/bin/python3 ./waf install --destdir="${pkgdir}" + + # For some reason waf installs import libraries to /bin, so move to /lib + mkdir "${pkgdir}${MINGW_PREFIX}/lib" + mv "${pkgdir}${MINGW_PREFIX}/bin/pkgconfig" "${pkgdir}${MINGW_PREFIX}/lib/" + mv "${pkgdir}${MINGW_PREFIX}/bin/"*.a "${pkgdir}${MINGW_PREFIX}/lib/" + sed -i "s:${MINGW_PREFIX}/bin:${MINGW_PREFIX}/lib:" "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/mpv.pc" + + # Strip binaries manually + ${MINGW_PREFIX}/bin/strip "${STRIP_BINARIES}" "${pkgdir}${MINGW_PREFIX}/bin/mpv.exe" + ${MINGW_PREFIX}/bin/strip "${STRIP_BINARIES}" "${pkgdir}${MINGW_PREFIX}/bin/mpv.com" + ${MINGW_PREFIX}/bin/strip "${STRIP_SHARED}" "${pkgdir}${MINGW_PREFIX}/bin/mpv-1.dll" + + # Move encoding-profiles.conf to share/doc alongside the example .conf files. + # mpv doesn't search /etc for configuration on MinGW. + mv "${pkgdir}${MINGW_PREFIX}/etc/mpv/"*.conf "${pkgdir}${MINGW_PREFIX}/share/doc/mpv/" + + # mpv needs winpty for key bindings to work on the terminal + mv "${pkgdir}${MINGW_PREFIX}/bin/mpv.exe" "${pkgdir}${MINGW_PREFIX}/bin/mpv_exe" + _exename=mpv + echo '#!/usr/bin/env bash' > "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + echo 'export _started_from_console=yes' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + echo '/usr/bin/winpty "$( dirname ${BASH_SOURCE[0]} )/'${_exename}'.exe" "$@"' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" + mv "${pkgdir}${MINGW_PREFIX}/bin/mpv_exe" "${pkgdir}${MINGW_PREFIX}/bin/mpv.exe" +} diff --git a/mingw-w64-msmtp/0001-include-winsock2.patch b/mingw-w64-msmtp/0001-include-winsock2.patch new file mode 100644 index 0000000000..974e98484e --- /dev/null +++ b/mingw-w64-msmtp/0001-include-winsock2.patch @@ -0,0 +1,13 @@ +diff --git a/src/msmtp.c b/src/msmtp.c +index 3c21d2e..fc1d408 100644 +--- a/src/msmtp.c ++++ b/src/msmtp.c +@@ -78,6 +78,8 @@ extern int optind; + + /* Default file names. */ + #ifdef W32_NATIVE ++#include ++ + #define SYSCONFFILE "msmtprc.txt" + #define USERCONFFILE "msmtprc.txt" + #define SYSNETRCFILE "netrc.txt" diff --git a/mingw-w64-msmtp/0002-dont-redefine-winver-constant.patch b/mingw-w64-msmtp/0002-dont-redefine-winver-constant.patch new file mode 100644 index 0000000000..3e672411e7 --- /dev/null +++ b/mingw-w64-msmtp/0002-dont-redefine-winver-constant.patch @@ -0,0 +1,30 @@ +diff --git a/src/net.c b/src/net.c +index 8793180..706bb51 100644 +--- a/src/net.c ++++ b/src/net.c +@@ -44,7 +44,9 @@ + #endif + #ifdef W32_NATIVE + # define WIN32_LEAN_AND_MEAN /* do not include more than necessary */ +-# define _WIN32_WINNT 0x0502 /* Windows XP SP2 or later */ ++# ifndef _WIN32_WINNT ++# define _WIN32_WINNT 0x0502 /* Windows XP SP2 or later */ ++# endif + # include + # include + #endif +diff --git a/src/tools.c b/src/tools.c +index 8c9efe1..6a8be58 100644 +--- a/src/tools.c ++++ b/src/tools.c +@@ -35,7 +35,9 @@ + #include + #ifdef W32_NATIVE + # define WIN32_LEAN_AND_MEAN /* do not include more than necessary */ +-# define _WIN32_WINNT 0x0502 /* Windows XP SP2 or later */ ++# ifndef _WIN32_WINNT ++# define _WIN32_WINNT 0x0502 /* Windows XP SP2 or later */ ++# endif + # include + # include + # include diff --git a/mingw-w64-msmtp/PKGBUILD b/mingw-w64-msmtp/PKGBUILD new file mode 100644 index 0000000000..5e94fcaa0e --- /dev/null +++ b/mingw-w64-msmtp/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Johannes Schindelin + +_realname=msmtp +pkgbase="mingw-w64-${_realname}" +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.6.2 +tag=msmtp-${pkgver} +pkgrel=1 +pkgdesc="An SMTP client (mingw-w64)" +arch=('any') +license=('GPL2+') +url="http://msmtp.sourceforge.net/" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-gsasl" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-libwinpthread-git") +options=('strip') +source=(${_realname}::"git://git.code.sf.net/p/msmtp/code#tag=${tag}" + '0001-include-winsock2.patch' + '0002-dont-redefine-winver-constant.patch') +sha1sums=('SKIP' + 'dbca2cf777e5c591f021168c83cb128f703153fe' + '295758aa2ad31540a4c0adde725d568210c2b356') + +prepare () { + cd ${srcdir}/${_realname} + + patch -p1 -i "${srcdir}/0001-include-winsock2.patch" + patch -p1 -i "${srcdir}/0002-dont-redefine-winver-constant.patch" + autoreconf -i +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}/configure --prefix=${MINGW_PREFIX} + sed -i 's/-R\/mingw..\/lib//' src/Makefile + touch ${srcdir}/${_realname}/src/*.c + make +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-muparser/CMakeLists.txt b/mingw-w64-muparser/CMakeLists.txt new file mode 100644 index 0000000000..030731e93a --- /dev/null +++ b/mingw-w64-muparser/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 2.6) + +project(muparser CXX) + +include_directories( + include +) + +file( + GLOB + source_files + src/*.cpp +) + +add_library( + muparser + SHARED + ${source_files} +) + +file( + GLOB + header_files + include/* +) + +install( + TARGETS muparser + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + FILES ${header_files} DESTINATION include +) \ No newline at end of file diff --git a/mingw-w64-muparser/PKGBUILD b/mingw-w64-muparser/PKGBUILD new file mode 100644 index 0000000000..4e112cfead --- /dev/null +++ b/mingw-w64-muparser/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Rémi BERTHO + +_realname=muparser +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.2.5 +pkgrel=1 +pkgdesc="A fast math parser library (mingw-w64)" +arch=('any') +url="http://muparser.beltoforion.de/" +license=('custom') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") +options=('!makeflags') +source=("${_realname}-${pkgver}.tar.gz"::https://github.com/beltoforion/muparser/archive/v${pkgver}.tar.gz + "CMakeLists.txt") +sha1sums=('d86946f8bc5f5d74063313a00c16798a418e308b' + '76f802239c1a5e0bff713db99ce60a9956a20257') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + cp "${srcdir}/CMakeLists.txt" . +} + +build() { + rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + # license + install -D -m644 ${srcdir}/${_realname}-${pkgver}/License.txt \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} + diff --git a/mingw-w64-mypaint/PKGBUILD b/mingw-w64-mypaint/PKGBUILD new file mode 100644 index 0000000000..5d7374d0a9 --- /dev/null +++ b/mingw-w64-mypaint/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Andrew Chadwick + +_realname=mypaint +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.2.0_beta.0 +pkgrel=1 +arch=('any') +pkgdesc="Simple drawing & painting program that works well with Wacom-style graphics tablets" +depends=( + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-json-c" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-python2-cairo" + "${MINGW_PACKAGE_PREFIX}-python2-gobject" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-librsvg" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" +) +makedepends=( + "${MINGW_PACKAGE_PREFIX}-swig" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-pygobject-devel" + "scons" + "swig" +) +options=('strip' '!debug' 'staticlibs') +license=("GPL2" "ISC") +url="http://mypaint.org" +install=mypaint-${CARCH}.install +source=(https://github.com/mypaint/mypaint/releases/download/v${pkgver/_/-}/mypaint-${pkgver/_/-}.tar.xz) +sha256sums=('7a76e2f309da1ec7b41e7ef9a443a376cbb79e0edbfbebc5954b63148c30c6b1') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver/_/-} +} + +build() { + cd "${srcdir}"/${_realname}-${pkgver/_/-} + echo "prefix: ${MINGW_PREFIX}" + scons prefix="${MINGW_PREFIX}" +} + +package() { + cd "${srcdir}"/${_realname}-${pkgver/_/-} + echo "prefix: ${MINGW_PREFIX}" + echo "sandbox: ${pkgdir}" + echo "target: ${pkgdir}${MINGW_PREFIX}" + scons prefix="${MINGW_PREFIX}" --install-sandbox="${pkgdir}" \ + "${pkgdir}${MINGW_PREFIX}" + install -Dm644 COPYING \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.mypaint" + install -Dm644 brushlib/COPYING \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.libmypaint" + install -Dm644 LICENSE \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-mypaint/mypaint-i686.install b/mingw-w64-mypaint/mypaint-i686.install new file mode 100644 index 0000000000..7a3e929906 --- /dev/null +++ b/mingw-w64-mypaint/mypaint-i686.install @@ -0,0 +1,23 @@ +post_install() { + # gedit's does it, so I guess we must too + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas + # From hicolor-icon-theme: + [[ -f mingw32/bin/gtk-update-icon-cache.exe ]] && { + mingw32/bin/gtk-update-icon-cache -q -t -f mingw32/share/icons/hicolor + } + [[ -f mingw32/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw32/bin/gtk-update-icon-cache-3.0 -q -t -f mingw32/share/icons/hicolor + } + [[ -f mingw32/bin/gdk-pixbuf-query-loaders.exe ]] && { + mingw32/bin/gdk-pixbuf-query-loaders.exe --update-cache + } + return 0 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-mypaint/mypaint-x86_64.install b/mingw-w64-mypaint/mypaint-x86_64.install new file mode 100644 index 0000000000..8d480b30a7 --- /dev/null +++ b/mingw-w64-mypaint/mypaint-x86_64.install @@ -0,0 +1,23 @@ +post_install() { + # gedit's does it, so I guess we must too + mingw64/bin/glib-compile-schemas mingw64/share/glib-2.0/schemas + # From hicolor-icon-theme: + [[ -f mingw64/bin/gtk-update-icon-cache.exe ]] && { + mingw64/bin/gtk-update-icon-cache -q -t -f mingw64/share/icons/hicolor + } + [[ -f mingw64/bin/gtk-update-icon-cache-3.0.exe ]] && { + mingw64/bin/gtk-update-icon-cache-3.0 -q -t -f mingw64/share/icons/hicolor + } + [[ -f mingw64/bin/gdk-pixbuf-query-loaders.exe ]] && { + mingw64/bin/gdk-pixbuf-query-loaders.exe --update-cache + } + return 0 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/mingw-w64-nanovg-git/PKGBUILD b/mingw-w64-nanovg-git/PKGBUILD new file mode 100644 index 0000000000..18f139fdae --- /dev/null +++ b/mingw-w64-nanovg-git/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Martell Malone + +_realname=nanovg +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=r259.6ae0873 +pkgrel=1 +pkgdesc="Small antialiased vector graphics rendering library for OpenGL" +arch=('any') +url="https://github.com/memononen/nanovg" +license=('ZLIB') +makedepends=("git" "${MINGW_PACKAGE_PREFIX}-premake") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") + +source=("${_realname}"::'git://github.com/memononen/nanovg.git') +md5sums=('SKIP') +options=('staticlibs') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + mv ${_realname} ${MINGW_CHOST} +} + +build() { + cd "${srcdir}/${MINGW_CHOST}" + premake4 gmake + cd build + CC=gcc CXX=g++ make nanovg +} + +package() { + install -v -Dm644 "${srcdir}/$MINGW_CHOST/build/libnanovg.a" "${pkgdir}${MINGW_PREFIX}/lib/libnanovg.a" || exit 1 + install -v -Dm644 "${srcdir}/$MINGW_CHOST/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/LICENSE.txt" || exit 1 + install -v -Dm644 "${srcdir}/$MINGW_CHOST/src/nanovg.h" "${pkgdir}${MINGW_PREFIX}/include/nanovg/nanovg.h" || exit 1 + install -v -Dm644 "${srcdir}/$MINGW_CHOST/src/nanovg_gl.h" "${pkgdir}${MINGW_PREFIX}/include/nanovg/nanovg_gl.h" || exit 1 + install -v -Dm644 "${srcdir}/$MINGW_CHOST/src/nanovg_gl_utils.h" "${pkgdir}${MINGW_PREFIX}/include/nanovg/nanovg_gl_utils.h" || exit 1 + install -v -Dm644 "${srcdir}/$MINGW_CHOST/src/fontstash.h" "${pkgdir}${MINGW_PREFIX}/include/nanovg/fontstash.h" || exit 1 +} \ No newline at end of file diff --git a/mingw-w64-nasm/PKGBUILD b/mingw-w64-nasm/PKGBUILD index 1a51b89af9..1cace97252 100644 --- a/mingw-w64-nasm/PKGBUILD +++ b/mingw-w64-nasm/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=nasm - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.11.02 -pkgrel=1 +pkgver=2.11.08 +pkgrel=2 pkgdesc="An 80x86 assembler designed for portability and modularity (mingw-w64)" arch=('any') license=('BSD') @@ -13,14 +12,14 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' '!libtool' 'staticlibs' '!makeflags') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") source=(http://www.nasm.us/pub/nasm/releasebuilds/${pkgver}/${_realname}-${pkgver}.tar.xz) -sha1sums=('d0525883abc6a8a9c0d2207b6872442ee26bfe1b') +sha1sums=('6908296ac437b3ade79fadfaad0efcfd99582f70') prepare() { cd ${srcdir}/${_realname}-${pkgver} } build() { - export MSYS2_ARG_CONV_EXCL="-//OASIS" + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} cp -rf ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} ./configure \ diff --git a/mingw-w64-ncurses/001-use-libsystre.patch b/mingw-w64-ncurses/001-use-libsystre.patch new file mode 100644 index 0000000000..9acec64740 --- /dev/null +++ b/mingw-w64-ncurses/001-use-libsystre.patch @@ -0,0 +1,14 @@ +--- ncurses-5.9-20150321/configure.orig 2015-03-24 11:53:12.221966500 +0200 ++++ ncurses-5.9-20150321/configure 2015-03-24 11:53:18.504338200 +0200 +@@ -14915,6 +14915,11 @@ + if test `eval echo '${'$as_ac_Lib'}'` = yes; then + + cf_add_libs="-l$cf_regex_lib" ++case $host_os in #(vi ++mingw*) ++ cf_add_libs="$cf_add_libs -ltre -lintl -liconv" ++ ;; ++esac + # Filter out duplicates - this happens with badly-designed ".pc" files... + for cf_add_1lib in $LIBS + do diff --git a/mingw-w64-ncurses/PKGBUILD b/mingw-w64-ncurses/PKGBUILD index d5a6334074..d4b42fd99f 100644 --- a/mingw-w64-ncurses/PKGBUILD +++ b/mingw-w64-ncurses/PKGBUILD @@ -1,31 +1,43 @@ # Maintainer: Alexey Pavlov _realname=ncurses - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.9 -pkgrel=3 +_base_ver=6.0 +_date_rev=20150627 +pkgver=${_base_ver}.${_date_rev} +pkgrel=2 pkgdesc="System V Release 4.0 curses emulation library" arch=('any') -depends=("${MINGW_PACKAGE_PREFIX}-libgnurx") -makedepends=("${MINGW_PACKAGE_PREFIX}-libgnurx" "${MINGW_PACKAGE_PREFIX}-gcc") -#groups=("${MINGW_PACKAGE_PREFIX}") +depends=("${MINGW_PACKAGE_PREFIX}-libsystre") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") url="http://www.gnu.org/software/ncurses/" license=('MIT') options=('staticlibs' 'strip') -source=(http://ftp.gnu.org/pub/gnu/ncurses/${_realname}-${pkgver}.tar.gz) -md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1') +source=("${_realname}-${pkgver}.tar.gz"::http://invisible-island.net/datafiles/current/${_realname}.tar.gz + 001-use-libsystre.patch) +md5sums=('a2bed858184157081aa433671d9a02c4' + 'b669861903d0699b6535b7c6e028880d') + +prepare() { + cd $_realname-${_base_ver}-${_date_rev} + patch -p1 -i ${srcdir}/001-use-libsystre.patch +} build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} - ../$_realname-$pkgver/configure \ + ../$_realname-${_base_ver}-${_date_rev}/configure \ --prefix=${MINGW_PREFIX} \ + --mandir=${MINGW_PREFIX}/share/man \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ --without-ada \ --with-cxx \ + --without-shared \ + --without-pthread \ --enable-pc-files \ --disable-rpath \ --enable-colorfgbg \ @@ -47,5 +59,4 @@ package() { make DESTDIR=${pkgdir} install cp -r ${pkgdir}${MINGW_PREFIX}/include/ncursesw ${pkgdir}${MINGW_PREFIX}/include/ncurses cp ${pkgdir}${MINGW_PREFIX}/lib/libncursesw.a ${pkgdir}${MINGW_PREFIX}/lib/libncurses.a - mv ${pkgdir}${MINGW_PREFIX}/man ${pkgdir}${MINGW_PREFIX}/share/ } diff --git a/mingw-w64-netcdf/0001-ocinternal-mkdir-patch.patch b/mingw-w64-netcdf/0001-ocinternal-mkdir-patch.patch new file mode 100644 index 0000000000..86a4278497 --- /dev/null +++ b/mingw-w64-netcdf/0001-ocinternal-mkdir-patch.patch @@ -0,0 +1,25 @@ +From e7c15d23f013709bc10a61ba2ebbb0ed3031d85e Mon Sep 17 00:00:00 2001 +From: "Robert T. McGibbon" +Date: Sun, 6 Dec 2015 15:11:57 -0800 +Subject: [PATCH 1/1] ocinternal mkdir patch + +--- + oc2/ocinternal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/oc2/ocinternal.c b/oc2/ocinternal.c +index 0623e6a..3eb5205 100644 +--- a/oc2/ocinternal.c ++++ b/oc2/ocinternal.c +@@ -610,7 +610,7 @@ ocset_curlproperties(OCstate* state) + char tmp[OCPATHMAX+1]; + int stat; + snprintf(tmp,sizeof(tmp)-1,"%s/%s/",ocglobalstate.tempdir,OCDIR); +-#ifdef _MSC_VER ++#ifdef _WIN32 + stat = mkdir(tmp); + #else + stat = mkdir(tmp,S_IRUSR | S_IWUSR | S_IXUSR); +-- +2.3.4 + diff --git a/mingw-w64-netcdf/0002-onstack.patch b/mingw-w64-netcdf/0002-onstack.patch new file mode 100644 index 0000000000..29454b675c --- /dev/null +++ b/mingw-w64-netcdf/0002-onstack.patch @@ -0,0 +1,25 @@ +From 424b09d3c7ab02329d54875e372611666ccf33f2 Mon Sep 17 00:00:00 2001 +From: "Robert T. McGibbon" +Date: Tue, 8 Dec 2015 05:14:08 +0000 +Subject: [PATCH 1/1] patch + +--- + include/onstack.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/onstack.h b/include/onstack.h +index 28414eb..c09529d 100644 +--- a/include/onstack.h ++++ b/include/onstack.h +@@ -19,7 +19,7 @@ + * The macro ALLOC_ONSTACK wraps a call to alloca() on most systems. + */ + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #ifdef HAVE_MALLOC_H + #undef HAVE_ALLOCA + #define HAVE_ALLOCA 1 +-- +2.6.3 + diff --git a/mingw-w64-netcdf/PKGBUILD b/mingw-w64-netcdf/PKGBUILD new file mode 100644 index 0000000000..405d352c38 --- /dev/null +++ b/mingw-w64-netcdf/PKGBUILD @@ -0,0 +1,70 @@ +# Contributor: Robert T. McGibbon + +_realname=netcdf +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=4.3.3 +pkgrel=1 +pkgdesc="Interface for scientific data access to large binary data (mingw-w64)" +arch=('any') +license=('custom') +url="http://www.unidata.ucar.edu/software/netcdf/" +depends=("${MINGW_PACKAGE_PREFIX}-hdf5") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake") +source=("ftp://ftp.unidata.ucar.edu/pub/netcdf/${_realname}-${pkgver}.zip" + "0001-ocinternal-mkdir-patch.patch" + "0002-onstack.patch") +md5sums=('24b9bdc8f430e16eb5c9f6f131b2214b' + '5700bcd1fa06ceeb43112f28a45f7b0d' + '662dc94415cc5acb36220dfbbebe6734') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}"/0001-ocinternal-mkdir-patch.patch + patch -p1 -i "${srcdir}"/0002-onstack.patch +} + +build() { + [[ -d ${srcdir}/build-static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-static-${MINGW_CHOST} + mkdir -p ${srcdir}/build-static-${MINGW_CHOST} && cd ${srcdir}/build-static-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_DLL=OFF \ + -DENABLE_DAP=OFF \ + -DBUILD_TESTING=OFF \ + -DENABLE_DYNAMIC_LOADING=OFF \ + -DENABLE_NETCDF_4=ON \ + "${srcdir}/${_realname}-${pkgver}" + make || make + + [[ -d ${srcdir}/build-shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-shared-${MINGW_CHOST} + mkdir -p ${srcdir}/build-shared-${MINGW_CHOST} && cd ${srcdir}/build-shared-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_DAP=OFF \ + -DBUILD_TESTING=OFF \ + -DENABLE_DYNAMIC_LOADING=OFF \ + -DENABLE_NETCDF_4=ON \ + "${srcdir}/${_realname}-${pkgver}" + make || make +} + +package() { + cd ${srcdir}/build-static-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + cd ${srcdir}/build-shared-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYRIGHT \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYRIGHT +} diff --git a/mingw-w64-nettle/PKGBUILD b/mingw-w64-nettle/PKGBUILD index 1122acf780..247e331085 100644 --- a/mingw-w64-nettle/PKGBUILD +++ b/mingw-w64-nettle/PKGBUILD @@ -1,34 +1,39 @@ # Maintainer: Alexey Pavlov _realname=nettle - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.7.1 -pkgrel=3 +pkgver=3.1.1 +pkgrel=2 pkgdesc="A low-level cryptographic library (mingw-w64)" arch=('any') url="http://www.lysator.liu.se/~nisse/nettle" license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-gmp") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gmp") options=('staticlibs' 'strip') source=("http://www.lysator.liu.se/~nisse/archive/nettle-$pkgver.tar.gz") -md5sums=('003d5147911317931dd453520eb234a5') +md5sums=('b40fa88dc32f37a182b6b42092ebb144') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" +} build() { - mkdir -p "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - "${srcdir}"/${_realname}-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --enable-shared \ - --enable-public-key - make -j1 + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-public-key + + make -j1 } package() { - cd "${srcdir}/${_realname}-${pkgver}-build-${CARCH}" - make -j1 DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-nim/0001-Use-unixy-filenames-even-on-Windows.patch b/mingw-w64-nim/0001-Use-unixy-filenames-even-on-Windows.patch new file mode 100644 index 0000000000..fe6f43e59a --- /dev/null +++ b/mingw-w64-nim/0001-Use-unixy-filenames-even-on-Windows.patch @@ -0,0 +1,29 @@ +From 9f3ebed8efebc45b74fa3baf2a4295352465ade9 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Tue, 13 Jan 2015 17:48:53 +0100 +Subject: [PATCH] Use unixy filenames even on Windows + +--- + compiler/platform.nim | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/compiler/platform.nim b/compiler/platform.nim +index c6cb3d2..b0e0862 100644 +--- a/compiler/platform.nim ++++ b/compiler/platform.nim +@@ -43,9 +43,9 @@ const + parDir: "..", dllFrmt: "$1.dll", altDirSep: "/", objExt: ".obj", + newLine: "\x0D\x0A", pathSep: ";", dirSep: "\\", scriptExt: ".bat", + curDir: ".", exeExt: ".exe", extSep: ".", props: {ospCaseInsensitive}), +- (name: "Windows", parDir: "..", dllFrmt: "$1.dll", altDirSep: "/", +- objExt: ".obj", newLine: "\x0D\x0A", pathSep: ";", dirSep: "\\", +- scriptExt: ".bat", curDir: ".", exeExt: ".exe", extSep: ".", ++ (name: "Windows", parDir: "..", dllFrmt: "lib$1.dll", altDirSep: "/", ++ objExt: ".a", newLine: "\x0D\x0A", pathSep: ";", dirSep: "\\", ++ scriptExt: ".cmd", curDir: ".", exeExt: ".exe", extSep: ".", + props: {ospCaseInsensitive}), + (name: "OS2", parDir: "..", + dllFrmt: "$1.dll", altDirSep: "/", +-- +1.9.4.msysgit.2 + diff --git a/mingw-w64-nim/0002-Recognize-mingw-in-build.sh.patch b/mingw-w64-nim/0002-Recognize-mingw-in-build.sh.patch new file mode 100644 index 0000000000..8534115a73 --- /dev/null +++ b/mingw-w64-nim/0002-Recognize-mingw-in-build.sh.patch @@ -0,0 +1,26 @@ +From 8a3cf726ddca9485bd693c4a55767ca88fefc2b7 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Tue, 13 Jan 2015 16:05:13 +0100 +Subject: [PATCH] Recognize mingw in build.sh + +--- + build.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/build.sh b/build.sh +index 8f22788..19ad63e 100644 +--- a/build.sh ++++ b/build.sh +@@ -85,6 +85,9 @@ case $uos in + *haiku* ) + myos="haiku" + ;; ++ *mingw* ) ++ myos="windows" ++ ;; + *) + echo "Error: unknown operating system: $uos" + exit 1 +-- +1.9.4.msysgit.2 + diff --git a/mingw-w64-nim/PKGBUILD b/mingw-w64-nim/PKGBUILD new file mode 100644 index 0000000000..3cc27c0162 --- /dev/null +++ b/mingw-w64-nim/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer: David Macek + +# TODO: include more stuff from tools/? + +_realname=nim +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.11.2 +pkgrel=1 +pkgdesc='Imperative, multi-paradigm, compiled programming language (mingw-w64)' +arch=('any') +url='http://nim-lang.org/' +license=('MIT') +makedepends=('git') +options=(!emptydirs) +source=("${_realname}::git://github.com/Araq/Nim.git#tag=v${pkgver}" + "${_realname}-build::git://github.com/nim-lang/csources" + "0001-Use-unixy-filenames-even-on-Windows.patch" + "0002-Recognize-mingw-in-build.sh.patch") +md5sums=('SKIP' + 'SKIP' + 'becec4d7ad692f113ab2a5fbbbadf27f' + '0c13cf30e123b57d55d687cf18d5bf56') + +prepare() { + cd "${srcdir}" + + rm "${_realname}/build/empty.txt" && rmdir "${_realname}/build" + cp -R "${_realname}-build" "${_realname}/build" + + cd "${_realname}" + patch -p1 -i "${srcdir}/0001-Use-unixy-filenames-even-on-Windows.patch" + + pushd build + patch -p1 -i "${srcdir}/0002-Recognize-mingw-in-build.sh.patch" + popd +} + +build() { + cd "${srcdir}/${_realname}" + + pushd build + sh build.sh + popd + + ./bin/nim c koch + ./koch boot -d:release -d:useGnuReadline + + export PATH="${srcdir}/${_realname}/bin:$PATH" + + pushd lib + nim c --app:lib -d:createNimRtl -d:release nimrtl.nim + popd + + pushd tools + nim c -d:release nimgrep.nim + popd +} + +package() { + cd "${srcdir}/${_realname}" + + export PATH="${srcdir}/${_realname}/bin:$PATH" + + ./koch install "${pkgdir}" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" + # mv "${pkgdir}/nim/bin"/* "${pkgdir}${MINGW_PREFIX}/bin/" + cp "bin/nim.exe" "${pkgdir}${MINGW_PREFIX}/bin/" + cp "tools/nimgrep.exe" "${pkgdir}${MINGW_PREFIX}/bin/" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/nim" + mv "${pkgdir}/nim/lib"/* "${pkgdir}${MINGW_PREFIX}/lib/nim/" + cp -a "lib/packages" "${pkgdir}${MINGW_PREFIX}/lib/nim/" + cp "lib/libnimrtl.dll" "${pkgdir}${MINGW_PREFIX}/lib/" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/etc" + mv "${pkgdir}/nim/config"/* "${pkgdir}${MINGW_PREFIX}/etc/" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/nim/doc" + cp -r "examples" "web" "${pkgdir}${MINGW_PREFIX}/share/nim/doc/" + cp -r "doc"/* "${pkgdir}${MINGW_PREFIX}/share/nim/doc/" + + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" + cp "copying.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + + # clean up after koch install + rm -r "${pkgdir}/nim" +} diff --git a/mingw-w64-nimble/PKGBUILD b/mingw-w64-nimble/PKGBUILD new file mode 100644 index 0000000000..22a80c226e --- /dev/null +++ b/mingw-w64-nimble/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: David Macek + +_realname=nimble +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.6.2 +pkgrel=1 +pkgdesc='Package manager for the Nim programming language (mingw-w64)' +arch=('any') +url='https://github.com/nim-lang/nimble' +license=('BSD') +makedepends=('git' + "${MINGW_PACKAGE_PREFIX}-nim") +source=("${_realname}::git://github.com/nim-lang/nimble.git#tag=v${pkgver}") +md5sums=('SKIP') + +build() { + cd "${srcdir}/${_realname}/src" + + nim c -d:release nimble.nim +} + +package() { + cd "${srcdir}/${_realname}" + + cp "src/nimble.exe" "${pkgdir}${MINGW_PREFIX}/bin" + cp "license.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-ninja/PKGBUILD b/mingw-w64-ninja/PKGBUILD index c0d5df9f95..6fba21e951 100644 --- a/mingw-w64-ninja/PKGBUILD +++ b/mingw-w64-ninja/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Martell Malone _realname=ninja - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.5.1 +pkgver=1.6.0 pkgrel=1 pkgdesc="Ninja is a small build system with a focus on speed (mingw-w64)" arch=('any') @@ -12,19 +11,24 @@ license=('Apache') depends=() options=('strip' 'staticlibs') makedepends=("python2") -source=("https://github.com/martine/ninja/archive/v${pkgver}.tar.gz") -md5sums=('59f4f1cf5d9bb0d7877a6d5a5afd770a') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/martine/ninja/archive/v${pkgver}.tar.gz") +md5sums=('254133059f2da79d8727f654d7198f43') prepare () { cd ${srcdir}/ninja-${pkgver} + #linking assumes windows cmd line but we are bash :) + sed -i 's|cmd /c $ar cqs $out.tmp $in && move /Y $out.tmp $out|$ar crs $out $in|g' ${srcdir}/ninja-${pkgver}/configure.py } build() { mkdir -p "${pkgdir}${MINGW_PREFIX}"/bin cd ${srcdir}/ninja-${pkgver} - ./bootstrap.py --platform mingw + ./configure.py --bootstrap --platform mingw } package() { - mv "${srcdir}/ninja-${pkgver}/ninja.exe" "${pkgdir}${MINGW_PREFIX}"/bin/ + mkdir -p "${pkgdir}${MINGW_PREFIX}"/bin + mv "${srcdir}/ninja-${pkgver}/ninja.exe" "${pkgdir}${MINGW_PREFIX}"/bin/ + #mkdir -p "${pkgdir}${MINGW_PREFIX}"/lib + #mv "${srcdir}/ninja-${pkgver}/build/libninja.a" "${pkgdir}${MINGW_PREFIX}"/lib/ } diff --git a/mingw-w64-nodejs/0004-Win32-Determine-and-use-EXEEXT.patch b/mingw-w64-nodejs/0004-Win32-Determine-and-use-EXEEXT.patch index 821832a297..631b314b22 100644 --- a/mingw-w64-nodejs/0004-Win32-Determine-and-use-EXEEXT.patch +++ b/mingw-w64-nodejs/0004-Win32-Determine-and-use-EXEEXT.patch @@ -8,9 +8,9 @@ Subject: [PATCH 4/5] Win32: Determine and use EXEEXT tools/install.py | 4 +++- 2 files changed, 36 insertions(+), 31 deletions(-) -diff -urN node-v0.10.32.orig/Makefile node-v0.10.32/Makefile ---- node-v0.10.32.orig/Makefile 2014-09-22 15:08:42.250329000 +0100 -+++ node-v0.10.32/Makefile 2014-09-22 15:08:54.220849100 +0100 +diff -urN node-v0.10.35.orig/Makefile node-v0.10.35/Makefile +--- node-v0.10.35/Makefile.orig 2014-12-22 21:22:32.000000000 +0000 ++++ node-v0.10.35/Makefile 2015-01-13 22:11:43.244268800 +0000 @@ -6,7 +6,10 @@ DESTDIR ?= SIGN ?= @@ -118,9 +118,9 @@ diff -urN node-v0.10.32.orig/Makefile node-v0.10.32/Makefile -doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node +doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node$(EXEEXT) - $(apidoc_dirs): - mkdir -p $@ -@@ -152,24 +155,24 @@ + doc-branch: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.) + doc-branch: doc +@@ -155,24 +158,24 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/ cp $< $@ @@ -132,14 +132,14 @@ diff -urN node-v0.10.32.orig/Makefile node-v0.10.32/Makefile cp -r $< $@ -out/doc/api/%.json: doc/api/%.markdown node -- out/Release/node tools/doc/generate.js --format=json $< > $@ +- NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=json $< > $@ +out/doc/api/%.json: doc/api/%.markdown node$(EXEEXT) -+ out/Release/node$(EXEEXT) tools/doc/generate.js --format=json $< > $@ ++ NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node$(EXEEXT) tools/doc/generate.js --format=json $< > $@ -out/doc/api/%.html: doc/api/%.markdown node -- out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@ +- NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@ +out/doc/api/%.html: doc/api/%.markdown node$(EXEEXT) -+ out/Release/node$(EXEEXT) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ ++ NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node$(EXEEXT) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ email.md: ChangeLog tools/email-footer.md bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@ @@ -151,7 +151,7 @@ diff -urN node-v0.10.32.orig/Makefile node-v0.10.32/Makefile website-upload: doc rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/ -@@ -270,7 +273,7 @@ +@@ -279,7 +282,7 @@ --out $(PKG) SIGN="$(INT_SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh @@ -160,7 +160,7 @@ diff -urN node-v0.10.32.orig/Makefile node-v0.10.32/Makefile git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 -@@ -357,9 +360,9 @@ +@@ -366,9 +369,9 @@ benchmark/http_simple_bench.sh bench-idle: diff --git a/mingw-w64-nodejs/0008-Add-output-dir-option-to-configure-node_gyp-py.patch b/mingw-w64-nodejs/0008-Add-output-dir-option-to-configure-node_gyp-py.patch index 079c8582ec..cec0d80945 100644 --- a/mingw-w64-nodejs/0008-Add-output-dir-option-to-configure-node_gyp-py.patch +++ b/mingw-w64-nodejs/0008-Add-output-dir-option-to-configure-node_gyp-py.patch @@ -122,8 +122,8 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile -rm -f config.gypi -rm -f config.mk -rm -rf node$(EXEEXT) node_g$(EXEEXT) blog.html email.md -@@ -129,36 +130,36 @@ - npm_package_config_publishtest=true ./node$(EXEEXT) deps/npm/test/run.js +@@ -136,18 +137,18 @@ + $(MAKE) --directory=tools clean apidoc_sources = $(wildcard doc/api/*.markdown) -apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \ @@ -146,6 +146,9 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile -doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node$(EXEEXT) +doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ $(OUTDIR)/doc/changelog.html node$(EXEEXT) + doc-branch: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.) + doc-branch: doc +@@ -155,20 +156,20 @@ $(apidoc_dirs): mkdir -p $@ @@ -162,18 +165,18 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile cp -r $< $@ -out/doc/api/%.json: doc/api/%.markdown node$(EXEEXT) -- out/Release/node$(EXEEXT) tools/doc/generate.js --format=json $< > $@ +- NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node$(EXEEXT) tools/doc/generate.js --format=json $< > $@ +$(OUTDIR)/doc/api/%.json: doc/api/%.markdown node$(EXEEXT) -+ $(OUTDIR)/Release/node$(EXEEXT) tools/doc/generate.js --format=json $< > $@ ++ NODE_DOC_VERSION=$(NODE_DOC_VERSION) $(OUTDIR)/Release/node$(EXEEXT) tools/doc/generate.js --format=json $< > $@ -out/doc/api/%.html: doc/api/%.markdown node$(EXEEXT) -- out/Release/node$(EXEEXT) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ +- NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node$(EXEEXT) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ +$(OUTDIR)/doc/api/%.html: doc/api/%.markdown node$(EXEEXT) -+ $(OUTDIR)/Release/node$(EXEEXT) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ ++ NODE_DOC_VERSION=$(NODE_DOC_VERSION) $(OUTDIR)/Release/node$(EXEEXT) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ email.md: ChangeLog tools/email-footer.md bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@ -@@ -168,7 +169,7 @@ +@@ -178,7 +179,7 @@ cat $< | ./node$(EXEEXT) tools/doc/node_modules/.bin/marked > $@ website-upload: doc @@ -182,9 +185,12 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile ssh node@nodejs.org '\ rm -f ~/web/nodejs.org/dist/latest &&\ ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\ -@@ -177,11 +178,11 @@ - rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\ - ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz' +@@ -190,13 +191,13 @@ + doc-branch-upload: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.) + doc-branch-upload: doc-branch + echo $(NODE_DOC_VERSION) +- rsync -r out/doc/api/ node@nodejs.org:~/web/nodejs.org/$(NODE_DOC_VERSION) ++ rsync -r $(OUTDIR)/doc/api/ node@nodejs.org:~/web/nodejs.org/$(NODE_DOC_VERSION) -docopen: out/doc/api/all.html - -google-chrome out/doc/api/all.html @@ -197,16 +203,16 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile RAWVER=$(shell $(PYTHON) tools/getnodeversion.py) VERSION=v$(RAWVER) -@@ -209,7 +210,7 @@ +@@ -225,7 +226,7 @@ TARBALL=$(TARNAME).tar.gz BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) BINARYTAR=$(BINARYNAME).tar.gz -PKG=out/$(TARNAME).pkg +PKG=$(OUTDIR)/$(TARNAME).pkg - packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker + PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz -@@ -219,7 +220,7 @@ +@@ -235,7 +236,7 @@ dist: doc $(TARBALL) $(PKG) @@ -215,7 +221,7 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile release-only: @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \ -@@ -247,10 +248,10 @@ +@@ -263,10 +264,10 @@ $(PKG): release-only rm -rf $(PKGDIR) @@ -228,7 +234,7 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile $(PYTHON) ./configure --without-snapshot --dest-cpu=x64 --tag=$(TAG) $(MAKE) install V=$(V) DESTDIR=$(PKGDIR) SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh -@@ -270,7 +271,7 @@ +@@ -286,7 +287,7 @@ git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 @@ -237,7 +243,7 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile rm -rf $(TARNAME)/deps/v8/test # too big rm -rf $(TARNAME)/doc/images # too big find $(TARNAME)/ -type l | xargs rm # annoying on windows -@@ -282,7 +283,7 @@ +@@ -298,7 +299,7 @@ $(BINARYTAR): release-only rm -rf $(BINARYNAME) @@ -246,7 +252,7 @@ diff -urN node-v0.10.29.orig/Makefile node-v0.10.29/Makefile $(PYTHON) ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS) $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1 cp README.md $(BINARYNAME) -@@ -295,7 +296,7 @@ +@@ -311,7 +312,7 @@ binary: $(BINARYTAR) $(PKGSRC): release-only diff --git a/mingw-w64-nodejs/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64-for-node-gyp.patch b/mingw-w64-nodejs/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64-for-node-gyp.patch new file mode 100644 index 0000000000..8f81c946b7 --- /dev/null +++ b/mingw-w64-nodejs/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64-for-node-gyp.patch @@ -0,0 +1,72 @@ +diff -urN x86_64.orig/deps/npm/node_modules/node-gyp/lib/configure.js x86_64/deps/npm/node_modules/node-gyp/lib/configure.js +--- x86_64.orig/deps/npm/node_modules/node-gyp/lib/configure.js 2015-01-16 14:46:11.711250800 +0000 ++++ x86_64/deps/npm/node_modules/node-gyp/lib/configure.js 2015-02-03 01:05:43.082851900 +0000 +@@ -16,9 +16,9 @@ + , extend = require('util')._extend + , spawn = cp.spawn + , execFile = cp.execFile +- , win = process.platform == 'win32' ++ , winMsvc = process.platform == 'win32' && process.wintoolchain == 'msvc' + +-exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' ++exports.usage = 'Generates ' + (winMsvc ? 'MSVC project files' : 'a Makefile') + ' for the current module' + + function configure (gyp, argv, callback) { + +@@ -36,7 +36,7 @@ + which(python, function (err, execPath) { + if (err) { + log.verbose('`which` failed', python, err) +- if (win) { ++ if (winMsvc) { + guessPython() + } else { + failNoPython() +@@ -266,7 +266,7 @@ + if (err) return callback(err) + + if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) { +- if (win) { ++ if (winMsvc) { + log.verbose('gyp', 'gyp format was not specified; forcing "msvs"') + // force the 'make' target for non-Windows + argv.push('-f', 'msvs') +@@ -283,7 +283,7 @@ + }) + } + +- if (win && !hasMsvsVersion()) { ++ if (winMsvc && !hasMsvsVersion()) { + if ('msvs_version' in gyp.opts) { + argv.push('-G', 'msvs_version=' + gyp.opts.msvs_version) + } else { +@@ -301,7 +301,7 @@ + var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi') + var common_gypi = path.resolve(nodeDir, 'common.gypi') + var output_dir = 'build' +- if (win) { ++ if (winMsvc) { + // Windows expects an absolute path + output_dir = buildDir + } +diff -urN x86_64.orig/src/node.cc x86_64/src/node.cc +--- x86_64.orig/src/node.cc 2014-12-22 21:22:32.000000000 +0000 ++++ x86_64/src/node.cc 2015-02-03 01:02:41.994856700 +0000 +@@ -2321,6 +2321,17 @@ + // process.platform + process->Set(String::NewSymbol("platform"), String::New(PLATFORM)); + ++#if defined(_WIN32) ++ // distinguish between msvc and mingw-w64 for node-gyp ++ #if defined(_MSC_VER) ++ process->Set(String::NewSymbol("wintoolchain"), String::New("msvc")); ++ #elif defined(__MINGW32__) ++ process->Set(String::NewSymbol("wintoolchain"), String::New("mingw-w64")); ++ #else ++ #error "Cannot determine wintoolchain" ++ #endif ++#endif ++ + // process.argv + Local arguments = Array::New(argc - option_end_index + 1); + arguments->Set(Integer::New(0), String::New(argv[0])); diff --git a/mingw-w64-nodejs/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64.patch b/mingw-w64-nodejs/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64.patch new file mode 100644 index 0000000000..8f81c946b7 --- /dev/null +++ b/mingw-w64-nodejs/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64.patch @@ -0,0 +1,72 @@ +diff -urN x86_64.orig/deps/npm/node_modules/node-gyp/lib/configure.js x86_64/deps/npm/node_modules/node-gyp/lib/configure.js +--- x86_64.orig/deps/npm/node_modules/node-gyp/lib/configure.js 2015-01-16 14:46:11.711250800 +0000 ++++ x86_64/deps/npm/node_modules/node-gyp/lib/configure.js 2015-02-03 01:05:43.082851900 +0000 +@@ -16,9 +16,9 @@ + , extend = require('util')._extend + , spawn = cp.spawn + , execFile = cp.execFile +- , win = process.platform == 'win32' ++ , winMsvc = process.platform == 'win32' && process.wintoolchain == 'msvc' + +-exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' ++exports.usage = 'Generates ' + (winMsvc ? 'MSVC project files' : 'a Makefile') + ' for the current module' + + function configure (gyp, argv, callback) { + +@@ -36,7 +36,7 @@ + which(python, function (err, execPath) { + if (err) { + log.verbose('`which` failed', python, err) +- if (win) { ++ if (winMsvc) { + guessPython() + } else { + failNoPython() +@@ -266,7 +266,7 @@ + if (err) return callback(err) + + if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) { +- if (win) { ++ if (winMsvc) { + log.verbose('gyp', 'gyp format was not specified; forcing "msvs"') + // force the 'make' target for non-Windows + argv.push('-f', 'msvs') +@@ -283,7 +283,7 @@ + }) + } + +- if (win && !hasMsvsVersion()) { ++ if (winMsvc && !hasMsvsVersion()) { + if ('msvs_version' in gyp.opts) { + argv.push('-G', 'msvs_version=' + gyp.opts.msvs_version) + } else { +@@ -301,7 +301,7 @@ + var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi') + var common_gypi = path.resolve(nodeDir, 'common.gypi') + var output_dir = 'build' +- if (win) { ++ if (winMsvc) { + // Windows expects an absolute path + output_dir = buildDir + } +diff -urN x86_64.orig/src/node.cc x86_64/src/node.cc +--- x86_64.orig/src/node.cc 2014-12-22 21:22:32.000000000 +0000 ++++ x86_64/src/node.cc 2015-02-03 01:02:41.994856700 +0000 +@@ -2321,6 +2321,17 @@ + // process.platform + process->Set(String::NewSymbol("platform"), String::New(PLATFORM)); + ++#if defined(_WIN32) ++ // distinguish between msvc and mingw-w64 for node-gyp ++ #if defined(_MSC_VER) ++ process->Set(String::NewSymbol("wintoolchain"), String::New("msvc")); ++ #elif defined(__MINGW32__) ++ process->Set(String::NewSymbol("wintoolchain"), String::New("mingw-w64")); ++ #else ++ #error "Cannot determine wintoolchain" ++ #endif ++#endif ++ + // process.argv + Local arguments = Array::New(argc - option_end_index + 1); + arguments->Set(Integer::New(0), String::New(argv[0])); diff --git a/mingw-w64-nodejs/0301-uv-Set-WIN32_WINNT_to_0x501_for_XP.patch b/mingw-w64-nodejs/0301-uv-Set-WIN32_WINNT_to_0x501_for_XP.patch new file mode 100644 index 0000000000..fd52db20f1 --- /dev/null +++ b/mingw-w64-nodejs/0301-uv-Set-WIN32_WINNT_to_0x501_for_XP.patch @@ -0,0 +1,22 @@ +--- uv/config-mingw.mk.orig 2015-01-12 13:49:48.669668300 +0000 ++++ uv/config-mingw.mk 2015-01-12 13:53:37.714253300 +0000 +@@ -24,7 +24,7 @@ + AR = $(PREFIX)ar + E=.exe + +-CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0600 ++CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0501 + LDFLAGS=-lm + + WIN_SRCS=$(wildcard $(SRCDIR)/src/win/*.c) +--- uv/uv.gyp.orig 2015-01-12 14:08:34.044072700 +0000 ++++ uv/uv.gyp 2015-01-12 14:08:38.683661900 +0000 +@@ -70,7 +70,7 @@ + 'conditions': [ + [ 'OS=="win"', { + 'defines': [ +- '_WIN32_WINNT=0x0600', ++ '_WIN32_WINNT=0x0501', + '_GNU_SOURCE', + ], + 'sources': [ diff --git a/mingw-w64-nodejs/PKGBUILD b/mingw-w64-nodejs/PKGBUILD index 0d7fdd3ef1..fecf12387e 100644 --- a/mingw-w64-nodejs/PKGBUILD +++ b/mingw-w64-nodejs/PKGBUILD @@ -3,10 +3,9 @@ # Contributor: David Macek _realname=nodejs - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.10.32 -pkgrel=4 +pkgver=0.10.40 +pkgrel=1 pkgdesc="Evented I/O for V8 javascript (mingw-w64)" arch=('any') url="http://nodejs.org/" @@ -22,7 +21,7 @@ makedepends=("python2" "make" "gyp-svn") # "${MINGW_PACKAGE_PREFIX}-libuv" # "${MINGW_PACKAGE_PREFIX}-openssl" # "${MINGW_PACKAGE_PREFIX}-zlib") -depends=("${MINGW_PACKAGE_PREFIX}-openssl" "winpty-git") +depends=("${MINGW_PACKAGE_PREFIX}-openssl" "winpty") #options=('!emptydirs' '!strip') # 'debug') source=("http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz" @@ -41,36 +40,45 @@ source=("http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz" "0103-Mat_Sutcliffe-node_mingw64-MSYS-path-conversion.patch" "0104-Use-system-gyp.patch" "0105-Add-gyp-debug-option-to-configure.patch" + "0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64-for-node-gyp.patch" "0200-v8-3.26.33-Disable-USING_V8_SHARED-for-v8_snapshot-static-lib.patch" "0201-v8-3.26.33-Include-win32-headers-h-then-undef-MemoryBarrier.patch" "0203-v8-3.26.33-Use-soname_version.dll-not-so.soname_version-on-Windows.patch" - "0300-uv-Use-4-arg-swprintf-on-MinGW-w64.patch") + "0300-uv-Use-4-arg-swprintf-on-MinGW-w64.patch" + "0301-uv-Set-WIN32_WINNT_to_0x501_for_XP.patch" + 'node-gyp' + 'node-gyp.cmd') -md5sums=('f5fd3a03948ec5d12b49fdc7c49a5cac' +md5sums=('f6ef20f327ecd6cb1586c41c7184290c' '0f5ef2b9965f6e921f5f41a21055d170' '10092533b62eb3e8cd48dcf816f222de' 'f7013391c658d50d4568bfce7a6f4cd8' - '169890d1920dc345334b039ebb391a4a' + '641144b54ca953884c0d45c1706dba69' '73fecf70ba4f34f6924f2fa89b8c6412' '70947a3999da983c0ede82fb4cee3550' '331e39ee6dd81b718026b268fee9a840' - '5f0f5b7140a49f99c2d1ecabc61733c4' + '0ac2e4aa48ab105e01248dfd89134539' 'd06f47617aa37a625f68ef72c1cdcad8' 'cd5870bc8911fe4113d83407257ced4c' 'afb4b2fb4d658f8689de33ee9c1157bf' '64bcb6ddfdd7863f10a302dedbe13d85' 'c79481c9c5010e4bcd7b4389cf44b7f9' '63013c0eeaee90e0985266fba9023a3e' + '6274ba9c699f62da783b6d2a0446e2ae' 'dd82d12b16a416470bf73b56f0684163' '9828f204d7068faa656b83c738b67f5e' '0be71da4648801fba9aef222919cf611' - '1f389190a61075b31675090fa4a60f53') + '1f389190a61075b31675090fa4a60f53' + '389ff9955ef2b7b3414551dc7f9e34e5' + '5062d922c98b26608d1107c820880ee0' + '38f2c7558ef3d3160d97964ac2553bc3') prepare() { - cd ${srcdir}/node-v${pkgver} + git init + # Using perfctrs makes Vista the minimum OS. MinGW-w64's perflib.h is missing lots # of stuff too, so the patches aren't enough. patch -p1 -i "${srcdir}"/0001-Win32-Update-NODE_NET_SOCKET_-READ-WRITE-macros.patch @@ -90,6 +98,7 @@ prepare() { # patch -p1 -i "${srcdir}"/0103-Mat_Sutcliffe-node_mingw64-MSYS-path-conversion.patch patch -p1 -i "${srcdir}"/0104-Use-system-gyp.patch patch -p1 -i "${srcdir}"/0105-Add-gyp-debug-option-to-configure.patch + patch -p1 -i "${srcdir}"/0106-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w64-for-node-gyp.patch pushd deps/v8 patch -p1 -i "${srcdir}"/0200-v8-3.26.33-Disable-USING_V8_SHARED-for-v8_snapshot-static-lib.patch @@ -99,6 +108,7 @@ prepare() { pushd deps/uv patch -p1 -i "${srcdir}"/0300-uv-Use-4-arg-swprintf-on-MinGW-w64.patch + patch -p1 -i "${srcdir}"/0301-uv-Set-WIN32_WINNT_to_0x501_for_XP.patch popd } @@ -108,7 +118,7 @@ build() { cd ${srcdir} - [ -d ${CARCH} ] && rm -rf ${CARCH} + [[ -d ${CARCH} ]] && rm -rf ${CARCH} mv node-v${pkgver} ${CARCH} pushd ${CARCH} @@ -161,56 +171,29 @@ build() { } package() { - cd "${srcdir}/${CARCH}" make DESTDIR="${pkgdir}" install - install -d "$pkgdir"/${MINGW_PREFIX}/share/doc/nodejs + install -d "${pkgdir}"/${MINGW_PREFIX}/share/doc/nodejs cp -r doc/api/{*.html,assets} \ - "$pkgdir"/${MINGW_PREFIX}/share/doc/nodejs + "${pkgdir}"/${MINGW_PREFIX}/share/doc/nodejs install -D -m644 LICENSE \ - "$pkgdir"/${MINGW_PREFIX}/share/licenses/nodejs/LICENSE + "${pkgdir}"/${MINGW_PREFIX}/share/licenses/nodejs/LICENSE - cat > "${pkgdir}"${MINGW_PREFIX}/bin/node-gyp <<< '#!/bin/sh - (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + install -m755 "${srcdir}/node-gyp" "${pkgdir}"${MINGW_PREFIX}/bin/node-gyp + install -m755 "${srcdir}/node-gyp.cmd" "${pkgdir}"${MINGW_PREFIX}/bin/node-gyp.cmd + install -m755 "${pkgdir}${MINGW_PREFIX}/lib/node_modules/npm/bin/npm.cmd" "${pkgdir}${MINGW_PREFIX}/bin/npm.cmd" - basedir=`dirname "$0"` - - case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; - esac - - if [ -x "$basedir/node.exe" ]; then - "$basedir/node.exe" "$basedir/../lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "$@" - else - node "$basedir/../lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "$@" - fi' - - cat > "${pkgdir}"${MINGW_PREFIX}/bin/node-gyp.cmd <<< ' - @IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" %* - ) ELSE ( - node "%~dp0\..\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" %* - )' - - # Use winpty-git script to invoke node. Please don't move this into a patch as - # hopefully one day we won't need this hack. - mv "${pkgdir}"${MINGW_PREFIX}/bin/node.exe "${pkgdir}"${MINGW_PREFIX}/bin/node_exe - _exename="node" + # Use winpty to wrap the exe when executed from bash. Please don't move this into a patch as hopefully one day we won't need this hack. + local _exename="node" + mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe echo "#!/usr/bin/env bash" > "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" echo '/usr/bin/winpty "$( dirname ${BASH_SOURCE[0]} )/'${_exename}'.exe" "$@"' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" - mv "${pkgdir}"${MINGW_PREFIX}/bin/node_exe "${pkgdir}"${MINGW_PREFIX}/bin/node.exe - - cp "${pkgdir}${MINGW_PREFIX}/lib/node_modules/npm/bin/npm.cmd" "${pkgdir}${MINGW_PREFIX}/bin/npm.cmd" + mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe # copy missing manpages - cp -R "${pkgdir}${MINGW_PREFIX}/lib/node_modules/npm/man" "${pkgdir}${MINGW_PREFIX}/share" + cp -r "${pkgdir}${MINGW_PREFIX}/lib/node_modules/npm/man" "${pkgdir}${MINGW_PREFIX}/share" - # It seems that some paths need fixing: - # npm does the right thing with these files if you install a package globally. - # node /mingw64/lib/node_modules/npm/bin/npm-cli.js -g install coffee-script - # Creates correct coffee and coffee.cmd. - # But it installs the packages in /mingw64/bin/node_modules instead of /mingw64/lib/node_modules. # /mingw64/lib/node_modules/npm/lib/npm.js is ridden with tests for win32, so that should probably be changed someday. } diff --git a/mingw-w64-nodejs/node-gyp b/mingw-w64-nodejs/node-gyp new file mode 100644 index 0000000000..27831904db --- /dev/null +++ b/mingw-w64-nodejs/node-gyp @@ -0,0 +1,17 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node.exe" ]; then + "$basedir/node.exe" "$basedir/../lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "$@" + ret=$? +else + node "$basedir/../lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "$@" + ret=$? +fi +exit $ret diff --git a/mingw-w64-nodejs/node-gyp.cmd b/mingw-w64-nodejs/node-gyp.cmd new file mode 100644 index 0000000000..2e6859a2e9 --- /dev/null +++ b/mingw-w64-nodejs/node-gyp.cmd @@ -0,0 +1,5 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" %* +) ELSE ( + node "%~dp0\..\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" %* +) diff --git a/mingw-w64-npth/PKGBUILD b/mingw-w64-npth/PKGBUILD new file mode 100644 index 0000000000..7e72b249c1 --- /dev/null +++ b/mingw-w64-npth/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Alexey Pavlov + +_realname=npth +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.2 +pkgrel=2 +pkgdesc="New portable threads library (mingw-w64)" +arch=('any') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +license=('LGPL') +url="http://www.gnupg.org/" +validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6') +source=("ftp://ftp.gnupg.org/gcrypt/${_realname}/${_realname}-${pkgver}.tar.bz2"{,.sig}) +sha1sums=('3bfa2a2d7521d6481850e8a611efe5bf5ed75200' + 'SKIP') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} +} + +build() { + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +check() { + cd "${srcdir}/build-${MINGW_CHOST}" + make check +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make -j1 DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-nspr/PKGBUILD b/mingw-w64-nspr/PKGBUILD index 1102670ef9..8072362517 100644 --- a/mingw-w64-nspr/PKGBUILD +++ b/mingw-w64-nspr/PKGBUILD @@ -1,17 +1,19 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=nspr +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.10.7 +pkgver=4.10.10 pkgrel=1 pkgdesc="Netscape Portable Runtime (mingw-w64)" arch=('any') url="http://www.mozilla.org/projects/nspr/" -license=('MPL') +license=(MPL2) depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "zip") options=('staticlibs' 'strip' '!emptydirs') -source=(ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${_realname}-${pkgver}.tar.gz +source=(https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${_realname}-${pkgver}.tar.gz http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip nspr-4.10.6-mswsock.patch nspr-4.10.2_autotools.patch @@ -19,10 +21,10 @@ source=(ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${_re nspr-4.10.2_staticbuild.patch nspr-4.10.2_x64.patch manifest) -md5sums=('6e06919e4b56efed501e05d8b45ec10e' +md5sums=('cf43d04668ab20f12cd0b5fa24315354' 'd9c6516eb4dca209e4b7ae46a4758ffa' - '5d99dd3b898f615b58d111f7b55a4217' - 'cd783e78938678ffa91a4131c9c4f7a9' + '43c68c49f28be6ebc3ff7e4f5552a8c0' + '09a990b21309ff8a1297e628afc782ff' '93d379011339c994fd242c9628df0bdf' 'e8b657f34a43d60db96761a924c46a9c' 'c337834e9092cffa3cd448c0702efd82' @@ -35,22 +37,21 @@ prepare() { patch -p0 -i ${srcdir}/nspr-4.10.2_mingw.patch patch -p0 -i ${srcdir}/nspr-4.10.2_staticbuild.patch patch -p0 -i ${srcdir}/nspr-4.10.2_x64.patch - - cp ${srcdir}/moztools/bin/nsinstall.exe ../ - cp ${srcdir}/manifest ../nsinstall.exe.manifest + + cp ${srcdir}/moztools/bin/nsinstall.exe ${srcdir}/${_realname}-${pkgver}/ + cp ${srcdir}/manifest ${srcdir}/${_realname}-${pkgver}/nsinstall.exe.manifest } build() { - #mkdir -p ${srcdir}/build-${MINGW_CHOST} - #cd ${srcdir}/build-${MINGW_CHOST} - cd ${srcdir}/${_realname}-${pkgver} + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} if [ "$CARCH" = "x86_64" ]; then _confflags="--enable-64bit" else _confflags="" fi - ./nspr/configure \ + "${srcdir}"/${_realname}-${pkgver}/nspr/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -59,17 +60,19 @@ build() { --enable-optimize \ --disable-debug \ ${_confflags} - + PATH="$PATH:${srcdir}/${_realname}-${pkgver}" make } package() { - cd ${srcdir}/${_realname}-${pkgver} - PATH="$PATH:${srcdir}/${_realname}-${pkgver}" make DESTDIR="$pkgdir" install + cd "${srcdir}"/build-${CARCH} + PATH="$PATH:${srcdir}/${_realname}-${pkgver}" make DESTDIR="${pkgdir}" install mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/ ln -s nspr.pc "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/mozilla-nspr.pc" rm -r ${pkgdir}${MINGW_PREFIX}/bin/{compile-et.pl,prerr.properties} \ ${pkgdir}${MINGW_PREFIX}/include/nspr/md + + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/nspr/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-nspr/nspr-4.10.2_autotools.patch b/mingw-w64-nspr/nspr-4.10.2_autotools.patch index f4fde36146..26099c740e 100644 --- a/mingw-w64-nspr/nspr-4.10.2_autotools.patch +++ b/mingw-w64-nspr/nspr-4.10.2_autotools.patch @@ -20,21 +20,26 @@ +Cflags: -I${includedir} --- config/rules.mk Tue Nov 12 04:52:34 2013 +++ config/rules.mk Tue Nov 26 11:22:37 2013 -@@ -83,12 +83,12 @@ - ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET))) - LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) - SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) --IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) -+IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX) +@@ -85,16 +85,16 @@ SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb + ifdef MSC_VER + LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) +-IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) ++IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX) + else + LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) +-IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) ++IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX) + endif else - LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) --IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) -+IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX) SHARED_LIB_PDB = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb + LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) +-IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) ++IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX) endif + else --- configure Tue Nov 12 04:54:52 2013 +++ configure Tue Nov 26 11:22:37 2013 @@ -665,6 +665,7 @@ diff --git a/mingw-w64-nspr/nspr-4.10.6-mswsock.patch b/mingw-w64-nspr/nspr-4.10.6-mswsock.patch index f3b298167c..ff83be389c 100644 --- a/mingw-w64-nspr/nspr-4.10.6-mswsock.patch +++ b/mingw-w64-nspr/nspr-4.10.6-mswsock.patch @@ -1,17 +1,3 @@ ---- nspr/pr/src/Makefile.in.orig 2014-06-06 01:42:08.000000000 +0400 -+++ nspr/pr/src/Makefile.in 2014-07-10 12:17:22.755000000 +0400 -@@ -165,9 +165,9 @@ - - ifeq ($(OS_ARCH),WINNT) - ifdef NS_USE_GCC --OS_LIBS = -ladvapi32 -lws2_32 -lwinmm -+OS_LIBS = -ladvapi32 -lws2_32 -lmswsock -lwinmm - else --OS_LIBS = advapi32.lib ws2_32.lib winmm.lib -+OS_LIBS = advapi32.lib ws2_32.lib mswsock.lib winmm.lib - endif - endif - --- nspr/tools/Makefile.in.orig 2014-06-06 01:42:08.000000000 +0400 +++ nspr/tools/Makefile.in 2014-07-10 12:19:41.479000000 +0400 @@ -167,7 +167,7 @@ diff --git a/mingw-w64-nss/PKGBUILD b/mingw-w64-nss/PKGBUILD index caa14b4a1c..243f499694 100644 --- a/mingw-w64-nss/PKGBUILD +++ b/mingw-w64-nss/PKGBUILD @@ -1,20 +1,22 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=nss +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.17.2 -_nsprver=4.10.7 +pkgver=3.20.1 +_nsprver=4.10.10 pkgrel=1 pkgdesc="Mozilla Network Security Services (mingw-w64)" arch=('any') url="http://www.mozilla.org/projects/security/pki/nss/" -license=('MPL') +license=(MPL2) depends=("${MINGW_PACKAGE_PREFIX}-nspr" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "zip" "perl") options=('staticlibs' 'strip' '!emptydirs') -source=(ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${_realname}-${pkgver}.tar.gz +source=(https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${_realname}-${pkgver}.tar.gz http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip nss.pc.in nss-config.in @@ -24,12 +26,12 @@ source=(ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/s blank-cert8.db blank-key3.db blank-secmod.db) -md5sums=('d3edb6f6c3688b2fde67ec9c9a8c1214' +md5sums=('c285ef92de0031cb0a8caa60d396d618' 'd9c6516eb4dca209e4b7ae46a4758ffa' 'c547b030c57fe1ed8b77c73bf52b3ded' '46bee81908f1e5b26d6a7a2e14c64d9f' 'd83c7b61abb7e9f8f7bcd157183d1ade' - 'bab1bb522443127b6eba75e46b1260b7' + 'e0fabc913e4874f2218120bb5902eea0' '9634847026a86bbfc395c7be23d30458' 'a5ae49867124ac75f029a9a33af31bad' '9315689bbd9f28ceebd47894f99fccbd' @@ -37,7 +39,7 @@ md5sums=('d3edb6f6c3688b2fde67ec9c9a8c1214' prepare() { cd ${srcdir}/${_realname}-${pkgver} - + # Adds transitional SSL renegotiate support - patch from Debian patch -Np3 -i ${srcdir}/ssl-renegotiate-transitional.patch patch -Np1 -i ${srcdir}/nss-3.14.3-build.patch @@ -45,17 +47,18 @@ prepare() { # Respect LDFLAGS sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/' \ -i nss/coreconf/rules.mk - - cp ${srcdir}/moztools/bin/nsinstall.exe . - cp ${srcdir}/manifest nsinstall.exe.manifest + + cp ${srcdir}/moztools/bin/nsinstall.exe ${srcdir}/${_realname}-${pkgver}/ + cp ${srcdir}/manifest ${srcdir}/${_realname}-${pkgver}/nsinstall.exe.manifest } build() { cd ${srcdir}/${_realname}-${pkgver} - + export BUILD_OPT=1 export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 + export NSS_DISABLE_DBM=1 export NSPR_INCLUDE_DIR="`nspr-config --includedir`" export NSPR_LIB_DIR="`nspr-config --libdir`" export SQLITE_LIB_DIR=${MINGW_PREFIX}/lib @@ -88,7 +91,7 @@ package() { -e "s,%NSPR_VERSION%,${_nsprver},g" \ -e "s,%NSS_VERSION%,${pkgver},g" \ > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/nss.pc" - cp -f ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/nss.pc "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/mozilla-nss.pc" + cp -f ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/nss.pc ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/mozilla-nss.pc sed ../nss-config.in \ -e "s,@libdir@,${MINGW_PREFIX}/lib,g" \ @@ -99,12 +102,11 @@ package() { -e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \ -e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \ > "${pkgdir}${MINGW_PREFIX}/bin/nss-config" - chmod 755 "${pkgdir}${MINGW_PREFIX}/bin/nss-config" + chmod 755 ${pkgdir}${MINGW_PREFIX}/bin/nss-config + - # Copy the binary libraries we want - for file in softokn nss nssutil \ - ssl smime nssdbm + for file in softokn nss nssutil ssl smime #nssdbm do install -m 755 dist/*.OBJ/lib/${file}3.dll ${pkgdir}${MINGW_PREFIX}/bin/ install -m 644 dist/*.OBJ/lib/lib${file}3.dll.a ${pkgdir}${MINGW_PREFIX}/lib/lib${file}3.dll.a @@ -122,26 +124,28 @@ package() { # Copy the development libraries we want for file in libcrmf.dll.a libnssb.dll.a libnssckfw.dll.a do - install -m 644 dist/*.OBJ/lib/$file ${pkgdir}${MINGW_PREFIX}/lib/ + install -m 644 dist/*.OBJ/lib/${file} ${pkgdir}${MINGW_PREFIX}/lib/ done # Copy the binaries we want for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap do - install -m 755 dist/*.OBJ/bin/$file.exe ${pkgdir}${MINGW_PREFIX}/bin/ + install -m 755 dist/*.OBJ/bin/${file}.exe ${pkgdir}${MINGW_PREFIX}/bin/ done # Copy the binaries we ship as unsupported for file in atob btoa derdump ocspclnt pp selfserv shlibsign strsclnt symkeyutil \ tstclnt vfyserv vfychain do - install -m 755 dist/*.OBJ/bin/$file.exe ${pkgdir}${MINGW_PREFIX}/lib/nss/ + install -m 755 dist/*.OBJ/bin/${file}.exe ${pkgdir}${MINGW_PREFIX}/lib/nss/ done # Copy the include files we want for file in dist/public/nss/*.h do - install -m 644 $file ${pkgdir}${MINGW_PREFIX}/include/nss3 + install -m 644 ${file} ${pkgdir}${MINGW_PREFIX}/include/nss3 done + # License + install -Dm644 nss/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING } diff --git a/mingw-w64-nss/nss-3.14.3-build.patch b/mingw-w64-nss/nss-3.14.3-build.patch index a7e1660b0c..a2990b2fe6 100644 --- a/mingw-w64-nss/nss-3.14.3-build.patch +++ b/mingw-w64-nss/nss-3.14.3-build.patch @@ -68,7 +68,7 @@ else --- nss-3.14.3/nss/cmd/platlibs.mk 2013-01-08 18:16:03.000000000 +0100 +++ nss-3.14.3/nss/cmd/platlibs.mk 2013-04-09 11:04:28.265194341 +0200 -@@ -72,22 +72,21 @@ +@@ -72,14 +72,13 @@ $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ @@ -84,15 +84,6 @@ $(SOFTOKENLIB) \ $(CRYPTOLIB) \ $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ - $(PKIXLIB) \ - $(DBMLIB) \ -- $(DIST)/lib/$(LIB_PREFIX)$(SQLITE_LIB_NAME).$(LIB_SUFFIX) \ -+ $(SQLITE_LIB_DIR)/$(LIB_PREFIX)$(SQLITE_LIB_NAME).$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \ - $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \ - $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \ --- nss-3.14.3/nss/cmd/shlibsign/Makefile 2013-01-08 18:16:03.000000000 +0100 +++ nss-3.14.3/nss/cmd/shlibsign/Makefile 2013-04-09 11:04:28.265194341 +0200 @@ -27,9 +27,9 @@ diff --git a/mingw-w64-ntldd-git/PKGBUILD b/mingw-w64-ntldd-git/PKGBUILD new file mode 100644 index 0000000000..216b0ed604 --- /dev/null +++ b/mingw-w64-ntldd-git/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: David Macek + +_realname=ntldd +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=r15.e7622f6 +pkgrel=2 +pkgdesc="Tracks dependencides in Windows PE binaries (mingw-w64)" +arch=('any') +url="https://github.com/LRN/ntldd" +license=("GPL3") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "git") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +source=("git+http://github.com/LRN/ntldd.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "${srcdir}/${_realname}" + ./makeldd.sh +} + +package() { + cd "${srcdir}/${_realname}" + install -Dm755 ntldd.exe "${pkgdir}${MINGW_PREFIX}/bin/ntldd.exe" + install -Dm644 libntldd.h "${pkgdir}${MINGW_PREFIX}/include/libntldd.h" + install -Dm644 libntldd.a "${pkgdir}${MINGW_PREFIX}/lib/libntldd.a" + install -Dm644 README "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/README" +} diff --git a/mingw-w64-nvidia-cg-toolkit/PKGBUILD b/mingw-w64-nvidia-cg-toolkit/PKGBUILD index a02d375b8d..7a87641132 100644 --- a/mingw-w64-nvidia-cg-toolkit/PKGBUILD +++ b/mingw-w64-nvidia-cg-toolkit/PKGBUILD @@ -9,7 +9,7 @@ pkgdesc="NVIDIA Cg libraries (mingw-w64)" arch=('any') url="http://developer.nvidia.com/object/cg_toolkit.html" license=("custom") -makedepends=("dos2unix" "${MINGW_PACKAGE_PREFIX}-tools" "${MINGW_PACKAGE_PREFIX}-binutils") #"${MINGW_PACKAGE_PREFIX}-innoextract" +makedepends=("dos2unix" "${MINGW_PACKAGE_PREFIX}-tools" "${MINGW_PACKAGE_PREFIX}-binutils") #"${MINGW_PACKAGE_PREFIX}-innoextract" depends=("${MINGW_PACKAGE_PREFIX}-crt") options=('!strip' 'staticlibs') source=("http://developer.download.nvidia.com/cg/Cg_3.1/Cg-3.1_April2012_Setup.exe") @@ -42,8 +42,8 @@ build() { package() { cd "$srcdir/app" - find "include/" -name '*.h' | xargs -rtl1 -I {} install -Dm644 {} "${pkgdir}${MINGW_PREFIX}/"{} - + find "include/" -name '*.h' | xargs -rtl1 -I {} install -Dm644 {} "${pkgdir}${MINGW_PREFIX}/"{} + case ${MINGW_CHOST} in i686*) cd "$srcdir/app/bin" diff --git a/mingw-w64-ocaml-camlp4/0001-Properly-quote-preprocessor-command-to-ocamldep.patch b/mingw-w64-ocaml-camlp4/0001-Properly-quote-preprocessor-command-to-ocamldep.patch new file mode 100644 index 0000000000..9b94d530f1 --- /dev/null +++ b/mingw-w64-ocaml-camlp4/0001-Properly-quote-preprocessor-command-to-ocamldep.patch @@ -0,0 +1,29 @@ +From b50f443639a6d6c36d5cd492d8f8da81b5beb5ce Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Fri, 3 Apr 2015 09:58:18 +0800 +Subject: [PATCH] Properly quote preprocessor command to ocamldep + +Build in msys2 fails with not able to execute +''''camlp4\boot\camlp4boot.native' -D OPT' as the preprocessor for +ocamldep because the path is outside the quotes. + +Signed-off-by: Junjie Mao +--- + myocamlbuild.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/myocamlbuild.ml b/myocamlbuild.ml +index 0573bef..d318c64 100644 +--- a/myocamlbuild.ml ++++ b/myocamlbuild.ml +@@ -84,7 +84,7 @@ let () = + let dep = "camlp4"/"boot"/exe in + let cmd = + let ( / ) = Filename.concat in +- "camlp4"/"boot"/exe ++ "'" ^ "camlp4"/"boot"/exe ^ "'" + in + (Some dep, cmd) + in +-- +2.3.4 diff --git a/mingw-w64-ocaml-camlp4/0002-Add-DESTDIR-in-configure.patch b/mingw-w64-ocaml-camlp4/0002-Add-DESTDIR-in-configure.patch new file mode 100644 index 0000000000..976838d949 --- /dev/null +++ b/mingw-w64-ocaml-camlp4/0002-Add-DESTDIR-in-configure.patch @@ -0,0 +1,83 @@ +From 528dc19da11d3b35e61a81b142430252db1db30b Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Fri, 3 Apr 2015 10:53:09 +0800 +Subject: [PATCH] Add DESTDIR in configure + +Signed-off-by: Junjie Mao +--- + Makefile | 4 ++-- + build/install.sh | 4 ++-- + configure | 8 +++++++- + 3 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index c8bd7a4..0ee0046 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,8 +23,8 @@ install: + + .PHONY: install-META + install-META: camlp4/META +- mkdir -p ${PKGDIR}/camlp4/ +- cp -f camlp4/META ${PKGDIR}/camlp4/ ++ mkdir -p ${DESTDIR}${PKGDIR}/camlp4/ ++ cp -f camlp4/META ${DESTDIR}${PKGDIR}/camlp4/ + + camlp4/META: camlp4/META.in + sed -e s/@@VERSION@@/${version}/g $? > $@ +diff --git a/build/install.sh b/build/install.sh +index 9d98d6c..220e878 100644 +--- a/build/install.sh ++++ b/build/install.sh +@@ -26,8 +26,8 @@ SAVED_LIBDIR="${LIBDIR}" + + . ./config.sh + +-BINDIR="${SAVED_BINDIR:-${BINDIR}}" +-LIBDIR="${SAVED_LIBDIR:-${LIBDIR}}" ++BINDIR="$DESTDIR${SAVED_BINDIR:-${BINDIR}}" ++LIBDIR="$DESTDIR${SAVED_LIBDIR:-${LIBDIR}}" + + not_installed=$PWD/_build/not_installed + +diff --git a/configure b/configure +index e859501..551f46e 100644 +--- a/configure ++++ b/configure +@@ -17,8 +17,11 @@ for i in "$@"; do + --pkgdir=*) + PKGDIR=${i##*=} + ;; ++ --destdir=*) ++ DESTDIR=${i##*=} ++ ;; + *) +- echo "usage: ./configure [--bindir=] [--libdir=] [--pkgdir=]" 1>&2 ++ echo "usage: ./configure [--bindir=] [--libdir=] [--pkgdir=] [--destdir=]" 1>&2 + exit 2 + ;; + esac +@@ -44,6 +47,7 @@ OCAMLC="`which ocamlc`" + LIBDIR="${LIBDIR:-$standard_library}" + BINDIR="${BINDIR:-`dirname $OCAMLC`}" + PKGDIR="${PKGDIR:-$standard_library}" ++DESTDIR="${DESTDIR}" + + if [ -x "`which ocamlopt`" ]; then + OB_FLAGS="" +@@ -58,6 +62,7 @@ EXE="$ext_exe" + LIBDIR="$LIBDIR" + BINDIR="$BINDIR" + PKGDIR="$PKGDIR" ++DESTDIR="$DESTDIR" + OB_FLAGS=$OB_FLAGS + EOF + +@@ -65,4 +70,5 @@ cat >> myocamlbuild_config.ml < +Date: Thu, 9 Apr 2015 07:52:23 +0800 +Subject: [PATCH] Guess the library path on msys2 + +Signed-off-by: Junjie Mao +--- + camlp4/config/Camlp4_config.ml | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/camlp4/config/Camlp4_config.ml b/camlp4/config/Camlp4_config.ml +index 88e14d6..4e7f245 100644 +--- a/camlp4/config/Camlp4_config.ml ++++ b/camlp4/config/Camlp4_config.ml +@@ -17,12 +17,27 @@ + * - Nicolas Pouillard: refactoring + *) + +-let ocaml_standard_library = Camlp4_import.standard_library;; ++let canonical_path_name p = ++ let current = Sys.getcwd () in ++ try ++ Sys.chdir p; ++ let p' = Sys.getcwd () in ++ Sys.chdir current; ++ p' ++ with Sys_error _ -> ++ (* We give up to find a canonical name and just return it... *) ++ p ++ ++let camlp4bin = Filename.dirname (canonical_path_name Sys.executable_name) ++ ++let camlp4root = Filename.dirname camlp4bin ++ ++let ocaml_standard_library = List.fold_left (fun base dir -> Filename.concat base dir) camlp4root ["lib";"ocaml"];; + + let camlp4_standard_library = + try Sys.getenv "CAMLP4LIB" + with Not_found -> +- Camlp4_import.camlp4_standard_library;; ++ Filename.concat ocaml_standard_library "camlp4";; + + let version = Sys.ocaml_version;; + let program_name = ref "camlp4";; +-- +2.3.4 + diff --git a/mingw-w64-ocaml-camlp4/PKGBUILD b/mingw-w64-ocaml-camlp4/PKGBUILD new file mode 100644 index 0000000000..e486a07465 --- /dev/null +++ b/mingw-w64-ocaml-camlp4/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Junjie Mao + +_realname=ocaml-camlp4 +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=4.02.1 +pkgrel=5 +pkgdesc="Pre-Processor-Pretty-Printer for OCaml (mingw-w64)" +arch=('any') +url='https://github.com/ocaml/camlp4' +license=('LGPL2') +depends=("${MINGW_PACKAGE_PREFIX}-ocaml") +makedepends=("${MINGW_PACKAGE_PREFIX}-flexdll") +source=("${_realname}-${pkgver}.tar.gz::https://github.com/ocaml/camlp4/archive/${pkgver}.tar.gz" + "0001-Properly-quote-preprocessor-command-to-ocamldep.patch" + "0002-Add-DESTDIR-in-configure.patch" + "0003-Guess-the-library-path-on-msys2.patch") +sha1sums=('c16d9ae3693612c71e12d2880ec911772b8d23c3' + 'eb7a59d2e184f368d735670bea96571aa861f97b' + '6aa01135f05a5e943412bf728f90ced871c6a064' + 'db42cb6d7dfd3862d057d1771a3cb7b4e44d930d') + +prepare() { + cd ${srcdir}/camlp4-${pkgver} + + patch -p1 -i ${srcdir}/0001-Properly-quote-preprocessor-command-to-ocamldep.patch + patch -p1 -i ${srcdir}/0002-Add-DESTDIR-in-configure.patch + patch -p1 -i ${srcdir}/0003-Guess-the-library-path-on-msys2.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf camlp4-${pkgver} build-${MINGW_CHOST} + + cd ${srcdir}/build-${MINGW_CHOST} + ./configure --bindir=${MINGW_PREFIX}/bin \ + --libdir=${MINGW_PREFIX}/lib/ocaml \ + --pkgdir=${MINGW_PREFIX}/lib/ocaml \ + --destdir=${pkgdir} + make all -j1 +} + +check() { + # The package does not include an automatic test process + plain "skip" +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make install -j1 + make install-META -j1 + [ -f LICENSE ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-ocaml-findlib/PKGBUILD b/mingw-w64-ocaml-findlib/PKGBUILD new file mode 100644 index 0000000000..23f2e7e7e5 --- /dev/null +++ b/mingw-w64-ocaml-findlib/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Junjie Mao + +_realname=ocaml-findlib +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.5.5 +pkgrel=2 +pkgdesc="OCaml library manager (mingw-w64)" +arch=('any') +url='http://projects.camlcity.org/projects/findlib.html' +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-ocaml") +source=("http://download.camlcity.org/download/findlib-${pkgver}.tar.gz") +sha1sums=('3221121c4b5adacc050aa361475eee59b2698afa') + +prepare() { + plain "skip" +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf findlib-${pkgver} build-${MINGW_CHOST} + + unset FLEXDIR + unset OCAMLDIR + + cd ${srcdir}/build-${MINGW_CHOST} + PATH=${MINGW_PREFIX}/lib/ocaml/stublibs:$PATH \ + ./configure -system win32 \ + -sitelib ${MINGW_PREFIX}/lib/ocaml \ + -mandir ${MINGW_PREFIX}/share/man \ + -no-camlp4 + + make all -j1 + make opt -j1 +} + +check() { + # The package does not include a testsuite + plain "skip" +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make install prefix=${pkgdir} + [ -f LICENSE ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-ocaml-lablgtk/0001-Fix-a-path-issue-during-installation.patch b/mingw-w64-ocaml-lablgtk/0001-Fix-a-path-issue-during-installation.patch new file mode 100644 index 0000000000..de1498a003 --- /dev/null +++ b/mingw-w64-ocaml-lablgtk/0001-Fix-a-path-issue-during-installation.patch @@ -0,0 +1,29 @@ +From 322d53d676ec55a4b28e8d24787e54e97c2fc140 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Sun, 5 Apr 2015 10:51:34 +0800 +Subject: [PATCH] Fix a path issue during installation + +Signed-off-by: Junjie Mao +--- + configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 8cdc264..39f59e5 100644 +--- a/configure ++++ b/configure +@@ -2677,9 +2677,9 @@ if test "$OCAMLFIND" = no; then + FINDLIBDIR="" + OCAMLLDCONF="" + else +-FINDLIBDIR="`ocamlfind printconf destdir | tr -d '\\r'`" ++FINDLIBDIR="`ocamlfind printconf destdir | sed 's/\\\\/\\\\\\\\/g' | xargs cygpath -u`" + echo "$OCAMLFIND library path is $FINDLIBDIR" +-OCAMLLDCONF="`ocamlfind printconf ldconf | tr -d '\\r'`" ++OCAMLLDCONF="`ocamlfind printconf ldconf | sed 's/\\\\/\\\\\\\\/g' | xargs cygpath -u`" + echo "$OCAMLFIND ldconf path is $OCAMLLDCONF" + fi + +-- +2.3.4 + diff --git a/mingw-w64-ocaml-lablgtk/PKGBUILD b/mingw-w64-ocaml-lablgtk/PKGBUILD new file mode 100644 index 0000000000..ae3f024f18 --- /dev/null +++ b/mingw-w64-ocaml-lablgtk/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Junjie Mao + +_realname=ocaml-lablgtk +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.18.3 +pkgrel=2 +pkgdesc="An Ocaml interface to the GIMP Tool Kit (mingw-w64)" +arch=('any') +url='http://lablgtk.forge.ocamlcore.org/' +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-gtksourceview2" + "${MINGW_PACKAGE_PREFIX}-gtkspell" + "${MINGW_PACKAGE_PREFIX}-libglade" + "${MINGW_PACKAGE_PREFIX}-libgnomecanvas" + "${MINGW_PACKAGE_PREFIX}-libglade" + "${MINGW_PACKAGE_PREFIX}-ocaml" + "${MINGW_PACKAGE_PREFIX}-ocaml-findlib" + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-flexdll" + "${MINGW_PACKAGE_PREFIX}-ocaml-camlp4" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=("https://forge.ocamlcore.org/frs/download.php/1479/lablgtk-${pkgver}.tar.gz" + "0001-Fix-a-path-issue-during-installation.patch") +sha1sums=('b8ecc3b160fcbce73062f3bad23a2a3b1c2735d3' + '8aae142b4c50038f9284c3427b22d75df6f3018e') + +prepare() { + cd ${srcdir}/lablgtk-${pkgver} + patch -p1 -i ${srcdir}/0001-Fix-a-path-issue-during-installation.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf lablgtk-${pkgver} build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --disable-gtktest + + sed -i "s/-pthread/-lpthread/g" config.make + make + make opt +} + +check() { + # The package does not include an automatic test process + plain "skip" +} + +package() { + cd ${srcdir}/${_pkgsrc} + make install DESTDIR="${pkgdir}" + + for f in COPYING LGPL; do + [ -f ${f} ] && install -Dm644 ${f} ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/${f} + done + + # do not append to ld.conf + rm ${pkgdir}${MINGW_PREFIX}/lib/ocaml/ld.conf +} diff --git a/mingw-w64-ocaml/0002-Adapt-to-msys2-directory-layout.patch b/mingw-w64-ocaml/0002-Adapt-to-msys2-directory-layout.patch new file mode 100644 index 0000000000..27393fd84f --- /dev/null +++ b/mingw-w64-ocaml/0002-Adapt-to-msys2-directory-layout.patch @@ -0,0 +1,81 @@ +From aba4874ac9db486398a83608bbbce0bb5223b1b5 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Wed, 1 Apr 2015 08:53:36 +0800 +Subject: [PATCH] Adapt to msys2 directory layout + +Signed-off-by: Junjie Mao +--- + config/Makefile.mingw32 | 11 +++++++---- + config/Makefile.mingw64 | 11 +++++++---- + 2 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/config/Makefile.mingw32 b/config/Makefile.mingw32 +index c204980..032b8ed 100644 +--- a/config/Makefile.mingw32 ++++ b/config/Makefile.mingw32 +@@ -15,7 +15,7 @@ + + ######### General configuration + +-PREFIX=C:/ocamlmgw ++PREFIX?=/mingw32 + + ### Remove this to disable compiling ocamldebug + WITH_DEBUGGER=ocamldebugger +@@ -108,13 +108,16 @@ NATIVECCLIBS=-lws2_32 + ### How to invoke the C preprocessor + CPP=$(BYTECC) -E + ++### Additional link-time options for $(MKEXE). ++MKEXELINKOPTS=-L$(shell cygpath -m /mingw32/i686-w64-mingw32/lib) ++ + ### Flexlink + FLEXLINK=flexlink -chain mingw -stack 16777216 -link -static-libgcc +-FLEXDIR:=$(shell $(FLEXLINK) -where) ++FLEXDIR:=$(PREFIX)/lib/flexdll + IFLEXDIR=-I"$(FLEXDIR)" +-MKDLL=$(FLEXLINK) +-MKEXE=$(FLEXLINK) -exe +-MKMAINDLL=$(FLEXLINK) -maindll ++MKDLL=$(FLEXLINK) $(MKEXELINKOPTS) ++MKEXE=$(FLEXLINK) -exe $(MKEXELINKOPTS) ++MKMAINDLL=$(FLEXLINK) -maindll $(MKEXELINKOPTS) + + ### How to build a static library + MKLIB=rm -f $(1); $(TOOLPREF)ar rc $(1) $(2); $(RANLIB) $(1) +diff --git a/config/Makefile.mingw64 b/config/Makefile.mingw64 +index 0a3bdfb..566aab3 100644 +--- a/config/Makefile.mingw64 ++++ b/config/Makefile.mingw64 +@@ -15,7 +15,7 @@ + + ######### General configuration + +-PREFIX=C:/ocamlmgw64 ++PREFIX?=/mingw64 + + ### Remove this to disable compiling ocamldebug + WITH_DEBUGGER=ocamldebugger +@@ -108,13 +108,16 @@ NATIVECCLIBS=-lws2_32 + ### How to invoke the C preprocessor + CPP=$(BYTECC) -E + ++### Additional link-time options for $(MKEXE). ++MKEXELINKOPTS=-L$(shell cygpath -m /mingw64/x86_64-w64-mingw32/lib) ++ + ### Flexlink + FLEXLINK=flexlink -chain mingw64 -stack 33554432 +-FLEXDIR:=$(shell $(FLEXLINK) -where) ++FLEXDIR:=$(PREFIX)/lib/flexdll + IFLEXDIR=-I"$(FLEXDIR)" +-MKDLL=$(FLEXLINK) +-MKEXE=$(FLEXLINK) -exe +-MKMAINDLL=$(FLEXLINK) -maindll ++MKDLL=$(FLEXLINK) $(MKEXELINKOPTS) ++MKEXE=$(FLEXLINK) -exe $(MKEXELINKOPTS) ++MKMAINDLL=$(FLEXLINK) -maindll $(MKEXELINKOPTS) + + ### How to build a static library + MKLIB=rm -f $(1); $(TOOLPREF)ar rc $(1) $(2); $(RANLIB) $(1) +-- +2.3.4 diff --git a/mingw-w64-ocaml/0003-Install-manuals-in-msys2.patch b/mingw-w64-ocaml/0003-Install-manuals-in-msys2.patch new file mode 100644 index 0000000000..73139d4cc3 --- /dev/null +++ b/mingw-w64-ocaml/0003-Install-manuals-in-msys2.patch @@ -0,0 +1,60 @@ +From 0eb523e80cfa15e7b77c250bc1b2fa8e49cfa5e6 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Fri, 3 Apr 2015 07:54:14 +0800 +Subject: [PATCH] Install manuals in msys2 + +Signed-off-by: Junjie Mao +--- + Makefile.nt | 2 ++ + config/Makefile.mingw32 | 2 +- + config/Makefile.mingw64 | 2 +- + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Makefile.nt b/Makefile.nt +index 16b53fe..cbc5618 100644 +--- a/Makefile.nt ++++ b/Makefile.nt +@@ -237,6 +237,7 @@ installbyt: + mkdir -p $(INSTALL_LIBDIR) + mkdir -p $(INSTALL_STUBLIBDIR) + mkdir -p $(INSTALL_COMPLIBDIR) ++ mkdir -p $(INSTALL_MANDIR)/man$(MANEXT); + cp VERSION $(INSTALL_LIBDIR)/ + cd byterun ; $(MAKEREC) install + cp ocamlc $(INSTALL_BINDIR)/ocamlc.exe +@@ -252,6 +253,7 @@ installbyt: + cp expunge $(INSTALL_LIBDIR)/expunge.exe + cp toplevel/topdirs.cmi $(INSTALL_LIBDIR) + cd tools ; $(MAKEREC) install ++ cd man; $(MAKE) install + for i in $(OTHERLIBRARIES); do \ + $(MAKEREC) -C otherlibs/$$i install || exit $$?; \ + done +diff --git a/config/Makefile.mingw32 b/config/Makefile.mingw32 +index 032b8ed..c283724 100644 +--- a/config/Makefile.mingw32 ++++ b/config/Makefile.mingw32 +@@ -39,7 +39,7 @@ STUBLIBDIR=$(LIBDIR)/stublibs + DISTRIB=$(PREFIX) + + ### Where to install the man pages +-MANDIR=$(PREFIX)/man ++MANDIR=$(PREFIX)/share/man + + ########## Toolchain and OS dependencies + +diff --git a/config/Makefile.mingw64 b/config/Makefile.mingw64 +index 566aab3..a7ca30e 100644 +--- a/config/Makefile.mingw64 ++++ b/config/Makefile.mingw64 +@@ -39,7 +39,7 @@ STUBLIBDIR=$(LIBDIR)/stublibs + DISTRIB=$(PREFIX) + + ### Where to install the man pages +-MANDIR=$(PREFIX)/man ++MANDIR=$(PREFIX)/share/man + + ########## Toolchain and OS dependencies + +-- +2.3.4 diff --git a/mingw-w64-ocaml/0004-camlheader-has-the-extension-.exe-in-msys2.patch b/mingw-w64-ocaml/0004-camlheader-has-the-extension-.exe-in-msys2.patch new file mode 100644 index 0000000000..099499751e --- /dev/null +++ b/mingw-w64-ocaml/0004-camlheader-has-the-extension-.exe-in-msys2.patch @@ -0,0 +1,33 @@ +From 027aac26cd33573e20f843a5ec3217c061359921 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Fri, 3 Apr 2015 08:18:50 +0800 +Subject: [PATCH] camlheader has the extension .exe in msys2 + +Signed-off-by: Junjie Mao +--- + bytecomp/bytelink.ml | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml +index c0f8f6a..f3216e0 100644 +--- a/bytecomp/bytelink.ml ++++ b/bytecomp/bytelink.ml +@@ -304,7 +304,15 @@ let link_bytecode ppf tolink exec_name standalone = + let inchan = open_in_bin (find_in_path !load_path header) in + copy_file inchan outchan; + close_in inchan +- with Not_found | Sys_error _ -> () ++ with Not_found | Sys_error _ -> ++ try ++ let header = ++ if String.length !Clflags.use_runtime > 0 ++ then "camlheader_ur.exe" else "camlheader" ^ !Clflags.runtime_variant ^ ".exe" in ++ let inchan = open_in_bin (find_in_path !load_path header) in ++ copy_file inchan outchan; ++ close_in inchan ++ with Not_found | Sys_error _ -> () + end; + Bytesections.init_record outchan; + (* The path to the bytecode interpreter (in use_runtime mode) *) +-- +2.3.4 diff --git a/mingw-w64-ocaml/0005-Install-libraries-to-lib-ocaml-instead-of-lib.patch b/mingw-w64-ocaml/0005-Install-libraries-to-lib-ocaml-instead-of-lib.patch new file mode 100644 index 0000000000..24e8ad2544 --- /dev/null +++ b/mingw-w64-ocaml/0005-Install-libraries-to-lib-ocaml-instead-of-lib.patch @@ -0,0 +1,39 @@ +From 63eb66c59e70a8137b260e8e911350e4fd653d15 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Sat, 4 Apr 2015 10:38:46 +0800 +Subject: [PATCH] Install libraries to /lib/ocaml instead of /lib + +Signed-off-by: Junjie Mao +--- + config/Makefile.mingw32 | 2 +- + config/Makefile.mingw64 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config/Makefile.mingw32 b/config/Makefile.mingw32 +index c283724..1faf861 100644 +--- a/config/Makefile.mingw32 ++++ b/config/Makefile.mingw32 +@@ -30,7 +30,7 @@ WITH_OCAMLDOC=ocamldoc + BINDIR=$(PREFIX)/bin + + ### Where to install the standard library +-LIBDIR=$(PREFIX)/lib ++LIBDIR=$(PREFIX)/lib/ocaml + + ### Where to install the stub DLLs + STUBLIBDIR=$(LIBDIR)/stublibs +diff --git a/config/Makefile.mingw64 b/config/Makefile.mingw64 +index a7ca30e..7442363 100644 +--- a/config/Makefile.mingw64 ++++ b/config/Makefile.mingw64 +@@ -30,7 +30,7 @@ WITH_OCAMLDOC=ocamldoc + BINDIR=$(PREFIX)/bin + + ### Where to install the standard library +-LIBDIR=$(PREFIX)/lib ++LIBDIR=$(PREFIX)/lib/ocaml + + ### Where to install the stub DLLs + STUBLIBDIR=$(LIBDIR)/stublibs +-- +2.3.4 diff --git a/mingw-w64-ocaml/0006-Configure-the-relative-paths-for-ocaml-libraries-on-.patch b/mingw-w64-ocaml/0006-Configure-the-relative-paths-for-ocaml-libraries-on-.patch new file mode 100644 index 0000000000..d0bfcc7965 --- /dev/null +++ b/mingw-w64-ocaml/0006-Configure-the-relative-paths-for-ocaml-libraries-on-.patch @@ -0,0 +1,70 @@ +From 667abbecdaed7107c981b6527e129cc3546b8d7c Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Tue, 7 Apr 2015 11:32:02 +0800 +Subject: [PATCH] Configure the relative paths for ocaml libraries on msys2 + +Signed-off-by: Junjie Mao +--- + utils/config.mlbuild | 17 ++++++++++++++++- + utils/config.mlp | 17 ++++++++++++++++- + 2 files changed, 32 insertions(+), 2 deletions(-) + +diff --git a/utils/config.mlbuild b/utils/config.mlbuild +index c887ac2..82ccd32 100644 +--- a/utils/config.mlbuild ++++ b/utils/config.mlbuild +@@ -25,7 +25,22 @@ let version = Sys.ocaml_version + + module C = Myocamlbuild_config + +-let standard_library_default = C.libdir ++let canonical_path_name p = ++ let current = Sys.getcwd () in ++ try ++ Sys.chdir p; ++ let p' = Sys.getcwd () in ++ Sys.chdir current; ++ p' ++ with Sys_error _ -> ++ (* We give up to find a canonical name and just return it... *) ++ p ++ ++let ocamlbin = Filename.dirname (canonical_path_name Sys.executable_name) ++ ++let ocamlroot = Filename.dirname ocamlbin ++ ++let standard_library_default = List.fold_left (fun base dir -> Filename.concat base dir) ocamlroot ["lib";"ocaml"] + + let standard_library = + try +diff --git a/utils/config.mlp b/utils/config.mlp +index db6fd20..ac97e9c 100644 +--- a/utils/config.mlp ++++ b/utils/config.mlp +@@ -23,7 +23,22 @@ + (* The main OCaml version string has moved to ../VERSION *) + let version = Sys.ocaml_version + +-let standard_library_default = "%%LIBDIR%%" ++let canonical_path_name p = ++ let current = Sys.getcwd () in ++ try ++ Sys.chdir p; ++ let p' = Sys.getcwd () in ++ Sys.chdir current; ++ p' ++ with Sys_error _ -> ++ (* We give up to find a canonical name and just return it... *) ++ p ++ ++let ocamlbin = Filename.dirname (canonical_path_name Sys.executable_name) ++ ++let ocamlroot = Filename.dirname ocamlbin ++ ++let standard_library_default = List.fold_left (fun base dir -> Filename.concat base dir) ocamlroot ["lib";"ocaml"] + + let standard_library = + try +-- +2.3.4 + diff --git a/mingw-w64-ocaml/0007-Convert-to-windows-path-before-checking-stats.patch b/mingw-w64-ocaml/0007-Convert-to-windows-path-before-checking-stats.patch new file mode 100644 index 0000000000..ab20f6a4d7 --- /dev/null +++ b/mingw-w64-ocaml/0007-Convert-to-windows-path-before-checking-stats.patch @@ -0,0 +1,48 @@ +From 6d9ecfddb197ff4fcfb8404f03d502501bafe411 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Tue, 7 Apr 2015 21:25:35 +0800 +Subject: [PATCH] Convert to windows path before checking stats + +Signed-off-by: Junjie Mao +--- + byterun/win32.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/byterun/win32.c b/byterun/win32.c +index 67e9683..02d060e 100644 +--- a/byterun/win32.c ++++ b/byterun/win32.c +@@ -59,9 +59,10 @@ char * caml_decompose_path(struct ext_table * tbl, char * path) + + char * caml_search_in_path(struct ext_table * path, char * name) + { +- char * p, * dir, * fullname; ++ char * p, * dir, * fullname, * cmd, * output; + int i; + struct stat st; ++ FILE *pipe = NULL; + + for (p = name; *p != 0; p++) { + if (*p == '/' || *p == '\\') goto not_found; +@@ -71,6 +72,18 @@ char * caml_search_in_path(struct ext_table * path, char * name) + if (dir[0] == 0) continue; + /* not sure what empty path components mean under Windows */ + fullname = caml_strconcat(3, dir, "\\", name); ++ cmd = caml_strconcat(2, "cygpath -w ", fullname); ++ pipe = popen(cmd, "r"); ++ output = caml_stat_alloc(strlen(cmd) + 128); ++ fscanf(pipe, "%s", output); ++ pclose(pipe); ++ caml_stat_free(cmd); ++ if (output[0] != '\0') { ++ caml_stat_free(fullname); ++ fullname = output; ++ } else { ++ caml_stat_free(output); ++ } + caml_gc_message(0x100, "Searching %s\n", (uintnat) fullname); + if (stat(fullname, &st) == 0 && S_ISREG(st.st_mode)) + return fullname; +-- +2.3.4 + diff --git a/mingw-w64-ocaml/0008-Use-the-standard-paths-as-default-in-ocamlbuild.patch b/mingw-w64-ocaml/0008-Use-the-standard-paths-as-default-in-ocamlbuild.patch new file mode 100644 index 0000000000..bb171ac578 --- /dev/null +++ b/mingw-w64-ocaml/0008-Use-the-standard-paths-as-default-in-ocamlbuild.patch @@ -0,0 +1,28 @@ +From 4b50b7e0f754239a40e3070cbf28d27d5bddffb5 Mon Sep 17 00:00:00 2001 +From: Junjie Mao +Date: Sun, 12 Apr 2015 09:39:22 +0800 +Subject: [PATCH] Use the standard paths as default in ocamlbuild + +Signed-off-by: Junjie Mao +--- + ocamlbuild/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ocamlbuild/Makefile b/ocamlbuild/Makefile +index b40d0ea..1d65ada 100644 +--- a/ocamlbuild/Makefile ++++ b/ocamlbuild/Makefile +@@ -134,8 +134,8 @@ ocamlbuild_pack.cmx: $(PACK_CMX) + # The config file + + ocamlbuild_config.ml: ../config/Makefile +- (echo 'let bindir = "$(BINDIR)"'; \ +- echo 'let libdir = "$(LIBDIR)"'; \ ++ (echo 'let bindir = Filename.dirname Sys.executable_name'; \ ++ echo 'let libdir = List.fold_left (fun base dir -> Filename.concat base dir) bindir ["..";"lib";"ocaml"]'; \ + echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\ + echo 'let a = "$(A)"'; \ + echo 'let o = "$(O)"'; \ +-- +2.3.4 + diff --git a/mingw-w64-ocaml/PKGBUILD b/mingw-w64-ocaml/PKGBUILD new file mode 100644 index 0000000000..52748dfe84 --- /dev/null +++ b/mingw-w64-ocaml/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: Junjie Mao + +_realname=ocaml +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=4.02.2 +pkgrel=1 +pkgdesc="An industrial strength programming language supporting functional, imperative and object-oriented styles (mingw-w64)" +arch=('any') +url='http://ocaml.org/' +license=('Q Public Licence 1.0' 'GPL2') +depends=("${MINGW_PACKAGE_PREFIX}-flexdll") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "diffutils") +source=("http://caml.inria.fr/pub/distrib/ocaml-${pkgver%.*}/${_realname}-${pkgver}.tar.gz" + "0002-Adapt-to-msys2-directory-layout.patch" + "0003-Install-manuals-in-msys2.patch" + "0004-camlheader-has-the-extension-.exe-in-msys2.patch" + "0005-Install-libraries-to-lib-ocaml-instead-of-lib.patch" + "0006-Configure-the-relative-paths-for-ocaml-libraries-on-.patch" + "0007-Convert-to-windows-path-before-checking-stats.patch" + "0008-Use-the-standard-paths-as-default-in-ocamlbuild.patch") +sha1sums=('7fb6571972635b00dfda204ca38a4b9dce79a354' + '75b14de1f4ea982ddbb86f49576aa0be10f9286a' + 'a780a6c94aaedcd0d19a7fbc26e09776b581a8af' + 'e1f6b201c25b61d39404406c82684f6c8d70d23a' + '17010515bd9715ed36300165643d8f3ad01288cf' + '78b69527ce8a78fbb31f7b9f3e0e04bf3ffcc165' + 'cff96df7caef78097ac73a382e4ef50418a7583b' + '27424a66536b8b1965291a91bc66bcc2234d2838') +install=ocaml-${CARCH}.install + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + + mv config/Makefile.mingw{,32} + cp config/m-nt.h config/m.h + cp config/s-nt.h config/s.h + + patch -p1 -i ${srcdir}/0002-Adapt-to-msys2-directory-layout.patch + patch -p1 -i ${srcdir}/0003-Install-manuals-in-msys2.patch + patch -p1 -i ${srcdir}/0004-camlheader-has-the-extension-.exe-in-msys2.patch + patch -p1 -i ${srcdir}/0005-Install-libraries-to-lib-ocaml-instead-of-lib.patch + patch -p1 -i ${srcdir}/0006-Configure-the-relative-paths-for-ocaml-libraries-on-.patch + patch -p1 -i ${srcdir}/0007-Convert-to-windows-path-before-checking-stats.patch + patch -p1 -i ${srcdir}/0008-Use-the-standard-paths-as-default-in-ocamlbuild.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + + unset FLEXDIR + unset OCAMLDIR + cd ${srcdir}/build-${MINGW_CHOST} + cp config/Makefile.${MINGW_PREFIX#/} config/Makefile + + make -f Makefile.nt world TOOLPREF= -j1 + make -f Makefile.nt bootstrap TOOLPREF= -j1 + make -f Makefile.nt opt TOOLPREF= -j1 + make -f Makefile.nt opt.opt TOOLPREF= -j1 +} + +check() { + # The testsuite refuses to compile due to lack of headers such as sys/resource.h + plain "skip" +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make -f Makefile.nt install TOOLPREF= PREFIX="${pkgdir}${MINGW_PREFIX}" -j1 + [ -f LICENSE ] && install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-ocaml/ocaml-i686.install b/mingw-w64-ocaml/ocaml-i686.install new file mode 100644 index 0000000000..60053112dc --- /dev/null +++ b/mingw-w64-ocaml/ocaml-i686.install @@ -0,0 +1,10 @@ +post_install() { + cd /mingw32/lib/ocaml + mv ld.conf ld.conf.old + cat ld.conf.old | while read line; do cygpath -m $line >> ld.conf; done + rm ld.conf.old +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-ocaml/ocaml-x86_64.install b/mingw-w64-ocaml/ocaml-x86_64.install new file mode 100644 index 0000000000..bcf795d97c --- /dev/null +++ b/mingw-w64-ocaml/ocaml-x86_64.install @@ -0,0 +1,10 @@ +post_install() { + cd /mingw64/lib/ocaml + mv ld.conf ld.conf.old + cat ld.conf.old | while read line; do cygpath -m $line >> ld.conf; done + rm ld.conf.old +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-octave-hg/0001-Port-to-Qt5.patch b/mingw-w64-octave-hg/0001-Port-to-Qt5.patch new file mode 100644 index 0000000000..c8c3f09368 --- /dev/null +++ b/mingw-w64-octave-hg/0001-Port-to-Qt5.patch @@ -0,0 +1,431 @@ +diff -urN octave.orig/configure.ac octave/configure.ac +--- octave.orig/configure.ac 2015-02-05 12:35:51.102143700 +0000 ++++ octave/configure.ac 2015-02-05 13:07:58.632643700 +0000 +@@ -2800,7 +2800,7 @@ + + warn_gui="" + ## Check for Qt libraries +- QT_MODULES="QtCore QtGui QtNetwork QtOpenGL" ++ QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport" + PKG_CHECK_MODULES(QT, [$QT_MODULES], + [], + [warn_gui="Qt libraries not found -- disabling GUI" +@@ -2826,18 +2826,18 @@ + ;; + esac + +- ## Check for Qt4 +- if ! `$PKG_CONFIG --atleast-version=4.0.0 QtCore`; then +- warn_gui="Qt >= 4.0.0 not found -- disabling GUI" ++ ## Check for Qt5 ++ if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then ++ warn_gui="Qt >= 5.0.0 not found -- disabling GUI" + build_gui=no + fi + fi + + if test $build_gui = yes; then +- AC_CHECK_TOOLS(MOC, [moc-qt5 moc-qt4 moc]) +- AC_CHECK_TOOLS(UIC, [uic-qt5 uic-qt4 uic]) +- AC_CHECK_TOOLS(RCC, [rcc-qt5 rcc-qt4 rcc]) +- AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease-qt4 lrelease]) ++ AC_CHECK_TOOLS(MOC, [moc-qt5 moc moc-qt4]) ++ AC_CHECK_TOOLS(UIC, [uic-qt5 uic uic-qt4]) ++ AC_CHECK_TOOLS(RCC, [rcc-qt5 rcc rcc-qt4]) ++ AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease lrelease-qt4]) + if test -n "$MOC" && test -n "$UIC" && test -n "$RCC" && test -n "$LRELEASE"; then + AC_DEFINE(HAVE_QT, 1, + [Define to 1 if Qt is available (libraries, developer header files, utility programs (moc, uic, rcc, and lrelease))]) +diff -urN octave.orig/libgui/graphics/Canvas.cc octave/libgui/graphics/Canvas.cc +--- octave.orig/libgui/graphics/Canvas.cc 2015-02-05 12:35:51.107143700 +0000 ++++ octave/libgui/graphics/Canvas.cc 2015-02-05 13:07:58.636143700 +0000 +@@ -210,7 +210,7 @@ + QRectF r (bb(0), bb(1), bb(2), bb(3)); + + r.adjust (-5, -5, 5, 5); +- if (r.contains (event->posF ())) ++ if (r.contains (event->localPos ())) + { + currentObj = childObj; + break; +@@ -237,7 +237,7 @@ + Matrix bb = it->get_properties ().get_boundingbox (true); + QRectF r (bb(0), bb(1), bb(2), bb(3)); + +- if (r.contains (event->posF ())) ++ if (r.contains (event->localPos ())) + axesObj = *it; + } + +diff -urN octave.orig/libgui/graphics/Object.cc octave/libgui/graphics/Object.cc +--- octave.orig/libgui/graphics/Object.cc 2015-02-05 12:35:51.111143700 +0000 ++++ octave/libgui/graphics/Object.cc 2015-02-05 13:07:58.640143700 +0000 +@@ -154,7 +154,7 @@ + QVariant v = obj->property ("QtHandles::Object"); + + if (v.isValid ()) +- return reinterpret_cast (qVariantValue (v)); ++ return reinterpret_cast (v.value ()); + + return 0; + } +diff -urN octave.orig/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp octave/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp +--- octave.orig/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp 2015-02-05 12:34:50.434143700 +0000 ++++ octave/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp 2015-02-05 13:07:58.686143700 +0000 +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -urN octave.orig/libgui/src/find-files-dialog.cc octave/libgui/src/find-files-dialog.cc +--- octave.orig/libgui/src/find-files-dialog.cc 2015-02-05 12:35:51.116143700 +0000 ++++ octave/libgui/src/find-files-dialog.cc 2015-02-05 13:07:58.643143700 +0000 +@@ -125,7 +125,7 @@ + _file_list->horizontalHeader ()->restoreState ( + settings->value ("findfiles/column_state").toByteArray ()); + _file_list->horizontalHeader ()->setSortIndicatorShown (true); +- _file_list->horizontalHeader ()->setClickable (true); ++ _file_list->horizontalHeader ()->setSectionsClickable (true); + _file_list->horizontalHeader ()->setStretchLastSection (true); + _file_list->sortByColumn ( + settings->value ("findfiles/sort_files_by_column",0).toInt (), +diff -urN octave.orig/libgui/src/m-editor/file-editor.cc octave/libgui/src/m-editor/file-editor.cc +--- octave.orig/libgui/src/m-editor/file-editor.cc 2015-02-05 12:35:51.121143700 +0000 ++++ octave/libgui/src/m-editor/file-editor.cc 2015-02-05 13:07:58.646643700 +0000 +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + #include + + #include "octave-link.h" +diff -urN octave.orig/libgui/src/m-editor/file-editor-tab.cc octave/libgui/src/m-editor/file-editor-tab.cc +--- octave.orig/libgui/src/m-editor/file-editor-tab.cc 2015-02-05 12:35:51.126143700 +0000 ++++ octave/libgui/src/m-editor/file-editor-tab.cc 2015-02-05 13:07:58.651143700 +0000 +@@ -445,9 +445,8 @@ + bool update_apis_file = false; // flag, whether update of apis files + + // get path to prepared api info +- QDesktopServices desktopServices; + QString prep_apis_path +- = desktopServices.storageLocation (QDesktopServices::HomeLocation) ++ = QStandardPaths::writableLocation (QStandardPaths::HomeLocation) + + "/.config/octave/" + QString(OCTAVE_VERSION) + "/qsci/"; + + // get settings which infos are used for octave +@@ -482,7 +481,7 @@ + // compare to local package list + // FIXME: How to get user chosen location? + QFileInfo local_pkg_list = QFileInfo ( +- desktopServices.storageLocation (QDesktopServices::HomeLocation) ++ QStandardPaths::writableLocation (QStandardPaths::HomeLocation) + + "/.octave_packages"); + if (local_pkg_list.exists () + & (apis_date < local_pkg_list.lastModified ()) ) +@@ -1351,7 +1350,7 @@ + QsciScintilla::EolMode + file_editor_tab::detect_eol_mode () + { +- char *text = _edit_area->text ().toAscii ().data (); ++ char *text = _edit_area->text ().toLatin1 ().data (); + int text_size = _edit_area->text ().length (); + + char eol_lf = 0x0a; +diff -urN octave.orig/libgui/src/m-editor/find-dialog.cc octave/libgui/src/m-editor/find-dialog.cc +--- octave.orig/libgui/src/m-editor/find-dialog.cc 2015-02-05 12:35:51.131143700 +0000 ++++ octave/libgui/src/m-editor/find-dialog.cc 2015-02-05 13:07:58.659643700 +0000 +@@ -66,6 +66,13 @@ + + #include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include "find-dialog.h" + + find_dialog::find_dialog (QsciScintilla* edit_area, QWidget *p) +diff -urN octave.orig/libgui/src/octave-gui.cc octave/libgui/src/octave-gui.cc +--- octave.orig/libgui/src/octave-gui.cc 2015-02-05 12:35:51.135143700 +0000 ++++ octave/libgui/src/octave-gui.cc 2015-02-05 13:07:58.662643700 +0000 +@@ -89,7 +89,7 @@ + // Disable all Qt messages by default. + + static void +-message_handler (QtMsgType, const char *) ++message_handler (QtMsgType, const QMessageLogContext&, const QString&) + { + } + +@@ -105,7 +105,7 @@ + + // Installing our handler suppresses the messages. + if (show_gui_msgs.empty ()) +- qInstallMsgHandler (message_handler); ++ qInstallMessageHandler (message_handler); + + if (start_gui) + { +@@ -113,7 +113,7 @@ + QTranslator gui_tr, qt_tr, qsci_tr; + + // Set the codec for all strings (before wizard) +- QTextCodec::setCodecForCStrings (QTextCodec::codecForName ("UTF-8")); ++ QTextCodec::setCodecForLocale (QTextCodec::codecForName ("UTF-8")); + + // show wizard if this is the first run + if (resource_manager::is_first_run ()) +diff -urN octave.orig/libgui/src/resource-manager.cc octave/libgui/src/resource-manager.cc +--- octave.orig/libgui/src/resource-manager.cc 2015-02-05 12:35:51.138143700 +0000 ++++ octave/libgui/src/resource-manager.cc 2015-02-05 13:07:58.666143700 +0000 +@@ -61,10 +61,8 @@ + : settings_directory (), settings_file (), settings (0), + default_settings (0) + { +- QDesktopServices desktopServices; +- + QString home_path +- = desktopServices.storageLocation (QDesktopServices::HomeLocation); ++ = QStandardPaths::writableLocation (QStandardPaths::HomeLocation); + + settings_directory = home_path + "/.config/octave"; + +diff -urN octave.orig/libgui/src/resource-manager.h octave/libgui/src/resource-manager.h +--- octave.orig/libgui/src/resource-manager.h 2015-02-05 12:35:51.141143700 +0000 ++++ octave/libgui/src/resource-manager.h 2015-02-05 13:07:58.669643700 +0000 +@@ -24,6 +24,7 @@ + #define RESOURCEMANAGER_H + + #include ++#include + #include + #include + #include +diff -urN octave.orig/libgui/src/shortcut-manager.cc octave/libgui/src/shortcut-manager.cc +--- octave.orig/libgui/src/shortcut-manager.cc 2015-02-05 12:35:51.145143700 +0000 ++++ octave/libgui/src/shortcut-manager.cc 2015-02-05 13:07:58.674143700 +0000 +@@ -86,7 +86,7 @@ + void + shortcut_manager::do_init_data () + { +- QKeySequence ctrl; ++ Qt::KeyboardModifier ctrl; + int prefix; + #if defined (Q_OS_MAC) + // Use CMD key as an equivalent of Ctrl key on other platforms +@@ -100,15 +100,14 @@ + prefix = Qt::NoModifier; + #endif + +- QKeySequence ctrl_shift = ctrl + Qt::ShiftModifier; +- QKeySequence ctrl_alt = ctrl + Qt::AltModifier; +- ++ Qt::KeyboardModifier shift = Qt::ShiftModifier; ++ + // actions of the main window + + // file + init (tr ("New File"), "main_file:new_file", QKeySequence::New); + init (tr ("New Function"), "main_file:new_function", +- QKeySequence (ctrl_shift + Qt::Key_N)); ++ QKeySequence (ctrl + shift + Qt::Key_N)); + init (tr ("New Figure"), "main_file:new_figure", QKeySequence ()); + init (tr ("Open File"), "main_file:open_file", QKeySequence::Open); + init (tr ("Load Workspace"), "main_file:load_workspace", QKeySequence ()); +@@ -123,7 +122,7 @@ + init (tr ("Select All"), "main_edit:select_all", QKeySequence ()); + init (tr ("Clear Clipboard"), "main_edit:clear_clipboard", QKeySequence ()); + init (tr ("Find in Files"), "main_edit:find_in_files", +- QKeySequence (ctrl_shift + Qt::Key_F)); ++ QKeySequence (ctrl + shift + Qt::Key_F)); + init (tr ("Clear Command Window"), "main_edit:clear_command_window", + QKeySequence ()); + init (tr ("Clear Command History"), "main_edit:clear_history", +@@ -144,17 +143,17 @@ + + // window + init (tr ("Show Command Window"), "main_window:show_command", +- prefix + ctrl_shift + Qt::Key_0); ++ prefix + ctrl + shift + Qt::Key_0); + init (tr ("Show Command History"), "main_window:show_history", +- prefix + ctrl_shift + Qt::Key_1); ++ prefix + ctrl + shift + Qt::Key_1); + init (tr ("Show File Browser"), "main_window:show_file_browser", +- prefix + ctrl_shift + Qt::Key_2); ++ prefix + ctrl + shift + Qt::Key_2); + init (tr ("Show Workspace"), "main_window:show_workspace", +- prefix + ctrl_shift + Qt::Key_3); ++ prefix + ctrl + shift + Qt::Key_3); + init (tr ("Show Editor"), "main_window:show_editor", +- prefix + ctrl_shift + Qt::Key_4); ++ prefix + ctrl + shift + Qt::Key_4); + init (tr ("Show Documentation"), "main_window:show_doc", +- prefix + ctrl_shift + Qt::Key_5); ++ prefix + ctrl + shift + Qt::Key_5); + init (tr ("Command Window"), "main_window:command", + prefix + ctrl + Qt::Key_0); + init (tr ("Command History"), "main_window:history", +@@ -209,15 +208,15 @@ + init (tr ("Delete to End of Word"), "editor_edit:delete_end_word", + QKeySequence::DeleteEndOfWord); + init (tr ("Delete to Start of Line"), "editor_edit:delete_start_line", +- QKeySequence (ctrl_shift + Qt::Key_Backspace)); ++ QKeySequence (ctrl + shift + Qt::Key_Backspace)); + init (tr ("Delete to End of Line"), "editor_edit:delete_end_line", +- QKeySequence (ctrl_shift + Qt::Key_Delete)); ++ QKeySequence (ctrl + shift + Qt::Key_Delete)); + init (tr ("Delete Line"), "editor_edit:delete_line", +- QKeySequence (ctrl_shift + Qt::Key_L)); ++ QKeySequence (ctrl + shift + Qt::Key_L)); + init (tr ("Copy Line"), "editor_edit:copy_line", +- QKeySequence (ctrl_shift + Qt::Key_C)); ++ QKeySequence (ctrl + shift + Qt::Key_C)); + init (tr ("Cut Line"), "editor_edit:cut_line", +- QKeySequence (ctrl_shift + Qt::Key_X)); ++ QKeySequence (ctrl + shift + Qt::Key_X)); + init (tr ("Duplicate Selection/Line"), "editor_edit:duplicate_selection", + QKeySequence (ctrl + Qt::Key_D)); + init (tr ("Transpose Line"), "editor_edit:transpose_line", +@@ -228,22 +227,22 @@ + init (tr ("Comment Selection"), "editor_edit:comment_selection", + QKeySequence (ctrl + Qt::Key_R)); + init (tr ("Uncomment Selection"), "editor_edit:uncomment_selection", +- QKeySequence (ctrl_shift + Qt::Key_R)); ++ QKeySequence (ctrl + shift + Qt::Key_R)); + init (tr ("Uppercase Selection"), "editor_edit:upper_case", + QKeySequence (ctrl + Qt::Key_U)); + init (tr ("Lowercase Selection"), "editor_edit:lower_case", +- QKeySequence (ctrl_alt + Qt::Key_U)); ++ QKeySequence (ctrl + Qt::AltModifier + Qt::Key_U)); + + #if defined (Q_OS_MAC) + init (tr ("Indent Selection"), "editor_edit:indent_selection", + QKeySequence (prefix + Qt::Key_Tab)); + init (tr ("Unindent Selection"), "editor_edit:unindent_selection", +- QKeySequence (prefix + Qt::ShiftModifier + Qt::Key_Tab)); ++ QKeySequence (prefix + shift + Qt::Key_Tab)); + #else + init (tr ("Indent Selection"), "editor_edit:indent_selection", + QKeySequence (ctrl + Qt::Key_Tab)); + init (tr ("Unindent Selection"), "editor_edit:unindent_selection", +- QKeySequence (ctrl_shift + Qt::Key_Tab)); ++ QKeySequence (ctrl + shift + Qt::Key_Tab)); + #endif + + init (tr ("Convert Line Ednings to Windows"), "editor_edit:conv_eol_winows", +@@ -258,7 +257,7 @@ + init (tr ("Move to Matching Brace"), "editor_edit:move_to_brace", + QKeySequence (ctrl + Qt::Key_M)); + init (tr ("Select to Matching Brace"), "editor_edit:select_to_brace", +- QKeySequence (ctrl_shift + Qt::Key_M)); ++ QKeySequence (ctrl + shift + Qt::Key_M)); + init (tr ("Toggle Bookmark"), "editor_edit:toggle_bookmark", + QKeySequence (prefix + Qt::Key_F7)); + init (tr ("Next Bookmark"), "editor_edit:next_bookmark", +@@ -285,7 +284,7 @@ + QKeySequence (ctrl + Qt::Key_Underscore)); + #else + init (tr ("Zoom Normal"), "editor_view:zoom_normal", +- QKeySequence (ctrl_alt + Qt::Key_0)); ++ QKeySequence (ctrl + Qt::AltModifier + Qt::Key_0)); + #endif + + // debug +@@ -340,7 +339,7 @@ + _dialog = 0; + _level_hash.clear (); + +- tree_view->header ()->setResizeMode (QHeaderView::ResizeToContents); ++ tree_view->header ()->setSectionResizeMode (QHeaderView::ResizeToContents); + + QTreeWidgetItem *main = new QTreeWidgetItem (tree_view); + main->setText (0, tr ("Main")); +@@ -406,10 +405,10 @@ + + // write the shortcuts + tree_item->setText (0, sc.description); +- tree_item->setText (1, sc.default_sc [0]); +- tree_item->setText (2, sc.actual_sc [0]); +- tree_item->setText (3, sc.default_sc [1]); +- tree_item->setText (4, sc.actual_sc [1]); ++ tree_item->setText (1, sc.default_sc [0].toString ()); ++ tree_item->setText (2, sc.actual_sc [0].toString ()); ++ tree_item->setText (3, sc.default_sc [1].toString ()); ++ tree_item->setText (4, sc.actual_sc [1].toString ()); + + _item_index_hash[tree_item] = i + 1; // index+1 to avoid 0 + _index_item_hash[i] = tree_item; +@@ -549,8 +548,8 @@ + + } + +- _edit_actual->setText (_sc.at (index).actual_sc[_selected_set]); +- _label_default->setText (_sc.at (index).default_sc[_selected_set]); ++ _edit_actual->setText (_sc.at (index).actual_sc[_selected_set].toString ()); ++ _label_default->setText (_sc.at (index).default_sc[_selected_set].toString ()); + _handled_index = index; + + _edit_actual->setFocus (); +@@ -591,7 +590,7 @@ + shortcut_t double_shortcut = _sc.at (double_index); + double_shortcut.actual_sc[_selected_set] = QKeySequence (); + _sc.replace (double_index, double_shortcut); +- _index_item_hash[double_index]->setText ((_selected_set + 1)*2, QKeySequence ()); ++ _index_item_hash[double_index]->setText ((_selected_set + 1)*2, QKeySequence ().toString ()); + } + else + return; +@@ -604,7 +603,7 @@ + _sc.replace (_handled_index, shortcut); + + _index_item_hash[_handled_index]->setText ((_selected_set + 1)*2, +- shortcut.actual_sc[_selected_set]); ++ shortcut.actual_sc[_selected_set].toString ()); + + if (! shortcut.actual_sc[_selected_set].isEmpty ()) + _shortcut_hash[widget + sep + shortcut.actual_sc[_selected_set].toString ()] = +@@ -632,7 +631,7 @@ + + // update the tree view + QTreeWidgetItem* tree_item = _index_item_hash[i]; // get related tree item +- tree_item->setText (2*set, sc.actual_sc [set-1]); // display new shortcut ++ tree_item->setText (2*set, sc.actual_sc [set-1].toString ()); // display new shortcut + } + } + +@@ -723,6 +722,6 @@ + if(modifiers & Qt::MetaModifier) + key += Qt::META; + +- setText (QKeySequence(key)); ++ setText (QKeySequence(key).toString ()); + } + } +diff -urN octave.orig/libgui/src/workspace-model.cc octave/libgui/src/workspace-model.cc +--- octave.orig/libgui/src/workspace-model.cc 2015-02-05 12:35:51.149143700 +0000 ++++ octave/libgui/src/workspace-model.cc 2015-02-05 13:07:58.682143700 +0000 +@@ -132,7 +132,7 @@ + { + QString class_chars = resource_manager::storage_class_chars (); + int actual_class +- = class_chars.indexOf (_scopes[idx.row ()].toAscii ()); ++ = class_chars.indexOf (_scopes[idx.row ()].toLatin1 ()); + if (actual_class >= 0) + return QVariant (_storage_class_colors.at (actual_class)); + else +@@ -172,7 +172,7 @@ + QString class_chars = resource_manager::storage_class_chars (); + + int actual_class +- = class_chars.indexOf (_scopes[idx.row ()].toAscii ()); ++ = class_chars.indexOf (_scopes[idx.row ()].toLatin1 ()); + + if (actual_class >= 0) + { diff --git a/mingw-w64-octave-hg/0001-tempname.h-Rename-try-to-try_.patch b/mingw-w64-octave-hg/0001-tempname.h-Rename-try-to-try_.patch new file mode 100644 index 0000000000..2f09a4f6e8 --- /dev/null +++ b/mingw-w64-octave-hg/0001-tempname.h-Rename-try-to-try_.patch @@ -0,0 +1,24 @@ +From 2a308d0791f653220a22b824abe436860ce3519c Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 4 Feb 2015 23:11:31 +0000 +Subject: [PATCH] tempname.h: Rename try to try_ + +--- + lib/tempname.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/tempname.h b/lib/tempname.h +index f7c98d0..158c22e 100644 +--- a/lib/tempname.h ++++ b/lib/tempname.h +@@ -52,6 +52,6 @@ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); + returns with this value. Otherwise, if errno is set to EEXIST, another + name is tried, or else TRY_GEN_TEMPNAME returns -1. */ + extern int try_tempname(char *tmpl, int suffixlen, void *args, +- int (*try) (char *, void *)); ++ int (*try_) (char *, void *)); + + #endif /* GL_TEMPNAME_H */ +-- +2.2.2 + diff --git a/mingw-w64-octave-hg/0002-OCTAVE_CHECK_LIB-for-suitesparseconfig.patch b/mingw-w64-octave-hg/0002-OCTAVE_CHECK_LIB-for-suitesparseconfig.patch new file mode 100644 index 0000000000..8113392aed --- /dev/null +++ b/mingw-w64-octave-hg/0002-OCTAVE_CHECK_LIB-for-suitesparseconfig.patch @@ -0,0 +1,22 @@ +--- octave/configure.ac.orig 2015-02-02 12:23:39.496467500 +0000 ++++ octave/configure.ac 2015-02-02 12:46:44.459509600 +0000 +@@ -1512,6 +1512,19 @@ + UMFPACK_TAG="_zi_" + fi + ++### Check for suitespareconfig library .. ++ ++OCTAVE_CHECK_LIB(suitesparseconfig, SUITESPARSECONFIG, ++ [suitesparseconfig library not found. This will result in some lack of functionality for sparse matrices.], ++ [], ++ [SuiteSparse_version], ++ [], [don't use suitesparseconfig library, disable some sparse matrix functionality]) ++ ++### .. it's needed by all the other suitesparse libraries. ++ ++if test x"$SUITESPARSECONFIG_LIBS" != x""; then ++ LIBS="$SUITESPARSECONFIG_LIBS $LIBS" ++fi + ### Check for AMD library + + OCTAVE_CHECK_LIB(amd, AMD, diff --git a/mingw-w64-octave-hg/PKGBUILD b/mingw-w64-octave-hg/PKGBUILD new file mode 100644 index 0000000000..472175dfae --- /dev/null +++ b/mingw-w64-octave-hg/PKGBUILD @@ -0,0 +1,101 @@ +# Maintainer (ArchLinux): Stefan Husmann +# Contributor (ArchLinux): Benjamin van der Burgh +# Maintainer (MSYS2): Ray Donnelly + +_realname=octave-hg +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=r19590.6d75f1683ce8 +pkgrel=1 +pkgdesc="A high-level language, primarily intended for numerical computations (mingw-w64)" +url="http://www.octave.org" +arch=('any') +license=('GPL') +# Some of these may be optional, e.g. arpack, lapack, qhull, but if they +# are installed, octave will be linked against them. +depends=("${MINGW_PACKAGE_PREFIX}-arpack" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-fftw>=3.2.2" + "${MINGW_PACKAGE_PREFIX}-fltk" + "${MINGW_PACKAGE_PREFIX}-glpk" + "${MINGW_PACKAGE_PREFIX}-gl2ps" + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-qhull" + "${MINGW_PACKAGE_PREFIX}-qrupdate" + "${MINGW_PACKAGE_PREFIX}-qscintilla" + "${MINGW_PACKAGE_PREFIX}-graphicsmagick") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-fortran" + 'pcre' + 'mercurial' + 'git' + 'gperf' + 'rsync' + # ArchLinux uses suitesparse-octavecompat. + "${MINGW_PACKAGE_PREFIX}-suitesparse") +# 'transfig' +# 'epstool') +# 'texlive-core') +optdepends=('texinfo: for help-support in octave' + 'gnuplot: alternative plotting' + 'portaudio: for using audiodevinfo.oct') +conflicts=('octave') +install=octave.install +options=('!emptydirs' '!makeflags') +source=("git://git.sv.gnu.org/gnulib" +# "hg+http://hg.savannah.gnu.org/hgweb/octave" + "http://hg.savannah.gnu.org/hgweb/octave/archive/tip.tar.bz2" + # gnulib + "0001-tempname.h-Rename-try-to-try_.patch" + # octave + "0001-Port-to-Qt5.patch" + "0002-OCTAVE_CHECK_LIB-for-suitesparseconfig.patch") +md5sums=('SKIP' + 'aee5720ead892c04b79b1357e467ae54' + 'a3daca07660767db23de75bb5e087bfa' + '106b7b1d39fe0630c21640417b29315b' + '1e0ee378516c514517f2e4649f171f98') +_hgrepo=octave +_appver=4.1.0+ +provides=("${MINGW_PACKAGE_PREFIX}-octave=${_appver}") + +# pkgver() { +# cd ${srcdir}/${_hgrepo} +# hg update > /dev/null +# printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)" +# } + +# perpare() { +# cd $srcdir/${_hgrepo} +# patch -p1 -i "${srcdir}"/0001-Port-to-Qt5.patch +# } + +prepare() { + [[ -d ${srcdir}/octave ]] && rm -rf "${srcdir}"/octave + mv "${srcdir}"/octave-* "${srcdir}"/octave + cd "${srcdir}"/gnulib + patch -p1 -i "${srcdir}"/0001-tempname.h-Rename-try-to-try_.patch + cd "${srcdir}"/octave + patch -p1 -i "${srcdir}"/0001-Port-to-Qt5.patch + patch -p1 -i "${srcdir}"/0002-OCTAVE_CHECK_LIB-for-suitesparseconfig.patch + ./bootstrap --no-git --gnulib-srcdir=$srcdir/gnulib + } + +build() { + cd "${srcdir}" + [[ -d build-${CARCH} ]] && rm -rf build-${CARCH} + mkdir build-${CARCH} + cd build-${CARCH} + [[ $CARCH == "x86_64" ]] && _arch=amd64 + [[ $CARCH == "i686" ]] && _arch=i386 + CPPFLAGS+=" -D_POSIX -D_POSIX_C_SOURCE " \ + "${srcdir}"/${_hgrepo}/configure \ + --prefix=${MINGW_PREFIX} \ + --enable-shared --enable-jit \ + --enable-qhull --with-umfpack \ + --with-quantum-depth=16 --disable-java + make +} + +package() { + cd ${srcdir}/${_hgrepo}/build-${CARCH} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-octave-hg/octave.install b/mingw-w64-octave-hg/octave.install new file mode 100644 index 0000000000..dc8baaf6cd --- /dev/null +++ b/mingw-w64-octave-hg/octave.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(octave liboctave) + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info "$infodir/$file.info.gz" "$infodir/dir" 2> /dev/null + done +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info --delete "$infodir/$file.info.gz" "$infodir/dir" 2> /dev/null + done +} diff --git a/mingw-w64-octopi-git/0001-Use-Q_PID-instead-of-int-reducing-QProcess-repititio.patch b/mingw-w64-octopi-git/0001-Use-Q_PID-instead-of-int-reducing-QProcess-repititio.patch index 125120403c..e1caba91bd 100644 --- a/mingw-w64-octopi-git/0001-Use-Q_PID-instead-of-int-reducing-QProcess-repititio.patch +++ b/mingw-w64-octopi-git/0001-Use-Q_PID-instead-of-int-reducing-QProcess-repititio.patch @@ -1,7 +1,7 @@ -From 0d523be2643f8e72568ab821776abfb29c5b09e5 Mon Sep 17 00:00:00 2001 +From 3bb321ebabf364f14b94eaba1aea787e8334bf67 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 14:57:41 +0100 -Subject: [PATCH 01/13] Use Q_PID instead of int, reducing QProcess repitition +Subject: [PATCH 01/14] Use Q_PID instead of int, reducing QProcess repitition Process ids are not ints on all systems --- @@ -10,10 +10,10 @@ Process ids are not ints on all systems 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp -index 2161190..04ad195 100644 +index 30ca38e..711c20f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp -@@ -77,6 +77,38 @@ void utils::ProcessWrapper::onProcessStarted() +@@ -83,6 +83,38 @@ void utils::ProcessWrapper::onProcessStarted() emit startedTerminal(); } @@ -52,7 +52,7 @@ index 2161190..04ad195 100644 /* * We need this to search for the SH process pid (which spaws AUR tool) */ -@@ -86,21 +118,11 @@ void utils::ProcessWrapper::onSingleShot() +@@ -92,21 +124,11 @@ void utils::ProcessWrapper::onSingleShot() QProcess pAux; QString saux; @@ -76,7 +76,7 @@ index 2161190..04ad195 100644 } QStringList slist; -@@ -109,12 +131,10 @@ void utils::ProcessWrapper::onSingleShot() +@@ -115,12 +137,10 @@ void utils::ProcessWrapper::onSingleShot() { int candidatePid = list.at(c).trimmed().toInt(); @@ -92,7 +92,7 @@ index 2161190..04ad195 100644 if (UnixCommand::getLinuxDistro() == ectn_KAOS) { -@@ -131,8 +151,8 @@ void utils::ProcessWrapper::onSingleShot() +@@ -137,8 +157,8 @@ void utils::ProcessWrapper::onSingleShot() if (candidatePid < candidatePid2) { @@ -103,7 +103,7 @@ index 2161190..04ad195 100644 m_timer->start(); return; -@@ -155,8 +175,8 @@ void utils::ProcessWrapper::onSingleShot() +@@ -161,8 +181,8 @@ void utils::ProcessWrapper::onSingleShot() if (candidatePid < candidatePid2) { @@ -114,7 +114,7 @@ index 2161190..04ad195 100644 m_timer->start(); return; -@@ -175,16 +195,10 @@ void utils::ProcessWrapper::onSingleShot() +@@ -181,16 +201,10 @@ void utils::ProcessWrapper::onSingleShot() void utils::ProcessWrapper::onTimer() { QProcess proc; @@ -133,7 +133,7 @@ index 2161190..04ad195 100644 if (!out.contains(".qt_temp_", Qt::CaseInsensitive)) diff --git a/src/utils.h b/src/utils.h -index 54a8edc..a1f79a9 100644 +index e4ab291..516e9e3 100644 --- a/src/utils.h +++ b/src/utils.h @@ -34,9 +34,9 @@ class ProcessWrapper : public QObject @@ -150,5 +150,5 @@ index 54a8edc..a1f79a9 100644 QTimer *m_timer; QTimer *m_timerSingleShot; -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0002-Use-a-shared-QProcessEnvironment.patch b/mingw-w64-octopi-git/0002-Use-a-shared-QProcessEnvironment.patch index 26f30fe33e..1e8a0a1061 100644 --- a/mingw-w64-octopi-git/0002-Use-a-shared-QProcessEnvironment.patch +++ b/mingw-w64-octopi-git/0002-Use-a-shared-QProcessEnvironment.patch @@ -1,31 +1,17 @@ -From acebc7722066ef3885ee2b425ffe36f8116370b6 Mon Sep 17 00:00:00 2001 +From 144def0f5437c6f53c87397e33f799b118ea0cff Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:23:27 +0100 -Subject: [PATCH 02/13] Use a shared QProcessEnvironment +Subject: [PATCH 02/14] Use a shared QProcessEnvironment This reduces a lot of repetition. Environment variables LANG, LC_MESSAGES, LC_ALL are set to "C" for all cases. --- - octopi.pro | 2 ++ - src/unixcommand.cpp | 88 +++++++++++------------------------------------------ - src/unixcommand.h | 15 +++++++++ - 3 files changed, 35 insertions(+), 70 deletions(-) + src/unixcommand.cpp | 78 +++++++++++------------------------------------------ + src/unixcommand.h | 15 +++++++++++ + 2 files changed, 31 insertions(+), 62 deletions(-) -diff --git a/octopi.pro b/octopi.pro -index cac9348..0531b6d 100644 ---- a/octopi.pro -+++ b/octopi.pro -@@ -120,6 +120,8 @@ TRANSLATIONS += resources/translations/octopi_pt_BR.ts \ - resources/translations/octopi_ja.ts \ - resources/translations/octopi_eu.ts - -+win32: LIBS += -lwtsapi32 -+ - greaterThan(QT_MAJOR_VERSION, 4){ - TRANSLATIONS += resources/translations/octopi_ast.ts - } diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp -index a32b775..6ab57b9 100644 +index 9878bb9..cac4356 100644 --- a/src/unixcommand.cpp +++ b/src/unixcommand.cpp @@ -36,6 +36,7 @@ @@ -50,7 +36,7 @@ index a32b775..6ab57b9 100644 proc.start(commandToRun); proc.waitForStarted(); proc.waitForFinished(-1); -@@ -63,10 +59,7 @@ QString UnixCommand::runCommand(const QString& commandToRun) +@@ -64,10 +60,7 @@ QString UnixCommand::runCommand(const QString& commandToRun) */ QString UnixCommand::runCurlCommand(const QString& commandToRun){ QProcess proc; @@ -62,7 +48,7 @@ index a32b775..6ab57b9 100644 proc.start(commandToRun); proc.waitForStarted(); proc.waitForFinished(-1); -@@ -87,10 +80,7 @@ QString UnixCommand::runCurlCommand(const QString& commandToRun){ +@@ -88,10 +81,7 @@ QString UnixCommand::runCurlCommand(const QString& commandToRun){ */ QString UnixCommand::discoverBinaryPath(const QString& binary){ QProcess proc; @@ -74,19 +60,7 @@ index a32b775..6ab57b9 100644 proc.start("/bin/sh -c \"which " + binary + "\""); proc.waitForFinished(); -@@ -117,10 +107,7 @@ QString UnixCommand::discoverBinaryPath(const QString& binary){ - bool UnixCommand::cleanPacmanCache() - { - QProcess pacman; -- QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); -- env.insert("LANG", "C"); -- env.insert("LC_MESSAGES", "C"); -- pacman.setProcessEnvironment(env); -+ pacman.setProcessEnvironment(getEnv()); - QString commandStr = "\"yes | pacman -Scc\""; - - QString command = WMHelper::getSUCommand() + " " + commandStr; -@@ -138,11 +125,7 @@ QByteArray UnixCommand::performQuery(const QStringList args) +@@ -139,11 +129,7 @@ QByteArray UnixCommand::performQuery(const QStringList args) QByteArray result(""); QProcess pacman; @@ -99,7 +73,7 @@ index a32b775..6ab57b9 100644 pacman.start("pacman", args); pacman.waitForFinished(); -@@ -161,11 +144,7 @@ QByteArray UnixCommand::performQuery(const QString &args) +@@ -162,11 +148,7 @@ QByteArray UnixCommand::performQuery(const QString &args) QByteArray result(""); QProcess pacman; @@ -112,7 +86,7 @@ index a32b775..6ab57b9 100644 pacman.start("pacman " + args); pacman.waitForFinished(); -@@ -182,10 +161,7 @@ QByteArray UnixCommand::performAURCommand(const QString &args) +@@ -183,10 +165,7 @@ QByteArray UnixCommand::performAURCommand(const QString &args) QByteArray result(""); QProcess aur; @@ -123,8 +97,8 @@ index a32b775..6ab57b9 100644 + aur.setProcessEnvironment(getEnv()); aur.start(StrConstants::getForeignRepositoryToolName() + " " + args); - aur.waitForFinished(); -@@ -202,11 +178,8 @@ QByteArray UnixCommand::getAURPackageList(const QString &searchString) + aur.waitForFinished(-1); +@@ -203,11 +182,8 @@ QByteArray UnixCommand::getAURPackageList(const QString &searchString) { QByteArray result(""); QProcess aur; @@ -136,8 +110,8 @@ index a32b775..6ab57b9 100644 + aur.setProcessEnvironment(getEnv()); if (UnixCommand::getLinuxDistro() == ectn_KAOS) - aur.start(StrConstants::getForeignRepositoryToolName() + " -s " + searchString); -@@ -341,8 +314,7 @@ bool UnixCommand::isPkgfileInstalled() + aur.start(StrConstants::getForeignRepositoryToolName() + " -l "); +@@ -363,8 +339,7 @@ bool UnixCommand::isPkgfileInstalled() { QProcess pkgfile; @@ -147,7 +121,7 @@ index a32b775..6ab57b9 100644 pkgfile.start("pkgfile -V"); pkgfile.waitForFinished(); -@@ -359,10 +331,7 @@ QByteArray UnixCommand::getPackageContentsUsingPkgfile(const QString &pkgName) +@@ -381,10 +356,7 @@ QByteArray UnixCommand::getPackageContentsUsingPkgfile(const QString &pkgName) { QByteArray result(""); QProcess pkgfile; @@ -159,7 +133,7 @@ index a32b775..6ab57b9 100644 pkgfile.start("pkgfile -l " + pkgName); pkgfile.waitForFinished(); -@@ -397,10 +366,7 @@ QString UnixCommand::getPackageByFilePath(const QString &filePath) +@@ -419,10 +391,7 @@ QString UnixCommand::getPackageByFilePath(const QString &filePath) QStringList UnixCommand::getFilePathSuggestions(const QString &file) { QProcess slocate; @@ -171,7 +145,7 @@ index a32b775..6ab57b9 100644 slocate.start("slocate -l 8 " + file); slocate.waitForFinished(); -@@ -467,10 +433,7 @@ QString UnixCommand::getSystemArchitecture() +@@ -489,10 +458,7 @@ QString UnixCommand::getSystemArchitecture() { QStringList slParam; QProcess proc; @@ -183,7 +157,7 @@ index a32b775..6ab57b9 100644 slParam << "-m"; proc.start("uname", slParam); -@@ -524,10 +487,7 @@ bool UnixCommand::hasInternetConnection() +@@ -546,10 +512,7 @@ bool UnixCommand::hasInternetConnection() bool UnixCommand::doInternetPingTest() { QProcess ping; @@ -195,19 +169,7 @@ index a32b775..6ab57b9 100644 if (UnixCommand::getLinuxDistro() == ectn_MOOOSLINUX) ping.start("torsocks ping -c 1 -W 3 www.google.com"); -@@ -549,10 +509,7 @@ bool UnixCommand::isKtsussVersionOK() - { - QProcess proc; - -- QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); -- env.insert("LANG", "C"); -- env.insert("LC_MESSAGES", "C"); -- proc.setProcessEnvironment(env); -+ proc.setProcessEnvironment(getEnv()); - - QStringList slParam("-v"); - proc.start("ktsuss", slParam ); -@@ -621,10 +578,7 @@ void UnixCommand::removeTemporaryFiles() +@@ -628,10 +591,7 @@ void UnixCommand::execCommandAsNormalUser(const QString &pCommand) void UnixCommand::execCommand(const QString &pCommand) { QProcess p; @@ -219,7 +181,7 @@ index a32b775..6ab57b9 100644 p.start(WMHelper::getSUCommand() + "\"" + pCommand + "\""); p.waitForFinished(-1); -@@ -637,10 +591,7 @@ void UnixCommand::execCommand(const QString &pCommand) +@@ -660,10 +620,7 @@ QByteArray UnixCommand::getCommandOutput(const QString &pCommand) bool UnixCommand::isTextFile(const QString& fileName) { QProcess *p = new QProcess(); @@ -231,7 +193,7 @@ index a32b775..6ab57b9 100644 QStringList s(fileName); p->start( "file", s ); -@@ -760,10 +711,7 @@ UnixCommand::UnixCommand(QObject *parent): QObject() +@@ -793,10 +750,7 @@ UnixCommand::UnixCommand(QObject *parent): QObject() m_process = new QProcess(parent); m_terminal = new Terminal(parent, SettingsManager::getTerminal()); @@ -244,10 +206,10 @@ index a32b775..6ab57b9 100644 QObject::connect(m_process, SIGNAL( started() ), this, SIGNAL( started() )); diff --git a/src/unixcommand.h b/src/unixcommand.h -index 3105307..89b0f31 100644 +index 59fb5d9..b3dd169 100644 --- a/src/unixcommand.h +++ b/src/unixcommand.h -@@ -54,6 +54,7 @@ private: +@@ -56,6 +56,7 @@ private: Terminal *m_terminal; QProcess *m_process; static QFile *m_temporaryFile; @@ -255,7 +217,7 @@ index 3105307..89b0f31 100644 public: UnixCommand(QObject *parent); -@@ -114,6 +115,20 @@ public: +@@ -119,6 +120,20 @@ public: return (uid == 0); //Returns TRUE if root is running Octopi } @@ -277,5 +239,5 @@ index 3105307..89b0f31 100644 QTime time = QTime::currentTime(); qsrand(time.minute() + time.second() + time.msec()); -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0003-Win32-Link-to-Windows-Terminal-Services-wtsapi32.patch b/mingw-w64-octopi-git/0003-Win32-Link-to-Windows-Terminal-Services-wtsapi32.patch new file mode 100644 index 0000000000..fbcbb1661e --- /dev/null +++ b/mingw-w64-octopi-git/0003-Win32-Link-to-Windows-Terminal-Services-wtsapi32.patch @@ -0,0 +1,25 @@ +From ec19782fca68db8786850049d206cde36d73cade Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 27 Dec 2014 14:58:27 +0000 +Subject: [PATCH 03/14] Win32: Link to Windows Terminal Services (wtsapi32) + +--- + octopi.pro | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/octopi.pro b/octopi.pro +index ccf88bf..535fa96 100644 +--- a/octopi.pro ++++ b/octopi.pro +@@ -14,6 +14,8 @@ TRANSLATIONS += resources/translations/octopi_pt_BR.ts \ + MOC_DIR += build + UI_DIR += build + ++win32: LIBS += -lwtsapi32 ++ + HEADERS += src/QtSolutions/qtsingleapplication.h \ + src/QtSolutions/qtlocalpeer.h \ + repoeditor/repoentry.h \ +-- +2.4.2 + diff --git a/mingw-w64-octopi-git/0003-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch b/mingw-w64-octopi-git/0004-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch similarity index 71% rename from mingw-w64-octopi-git/0003-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch rename to mingw-w64-octopi-git/0004-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch index ab76f7ad89..8a76fed776 100644 --- a/mingw-w64-octopi-git/0003-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch +++ b/mingw-w64-octopi-git/0004-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch @@ -1,21 +1,21 @@ -From b56f1e751c60bc9b386942cb0491df394406491e Mon Sep 17 00:00:00 2001 +From 8ef11cc5fd5f0d6c3c879e239571e649a86b3ace Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 30 Sep 2014 14:43:39 +0100 -Subject: [PATCH 03/13] Remove redundancy in UnixCommand's exe checking +Subject: [PATCH 04/14] Remove redundancy in UnixCommand's exe checking functions Check the result of UnixCommand::discoverBinaryPath() not being empty in UnixCommand::hasTheExecutable() instead of repeating much the same code. --- - src/unixcommand.cpp | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) + src/unixcommand.cpp | 20 +++++++------------- + 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp -index 6ab57b9..dff3ffb 100644 +index cac4356..438333d 100644 --- a/src/unixcommand.cpp +++ b/src/unixcommand.cpp -@@ -81,6 +81,7 @@ QString UnixCommand::runCurlCommand(const QString& commandToRun){ +@@ -82,6 +82,7 @@ QString UnixCommand::runCurlCommand(const QString& commandToRun){ QString UnixCommand::discoverBinaryPath(const QString& binary){ QProcess proc; proc.setProcessEnvironment(getEnv()); @@ -23,7 +23,7 @@ index 6ab57b9..dff3ffb 100644 proc.start("/bin/sh -c \"which " + binary + "\""); proc.waitForFinished(); -@@ -89,6 +90,11 @@ QString UnixCommand::discoverBinaryPath(const QString& binary){ +@@ -90,6 +91,11 @@ QString UnixCommand::discoverBinaryPath(const QString& binary){ proc.close(); res = res.remove('\n'); @@ -35,10 +35,12 @@ index 6ab57b9..dff3ffb 100644 //If it still didn't find it, try "/sbin" dir... if (res.isEmpty()){ QFile fbin("/sbin/" + binary); -@@ -529,17 +535,7 @@ bool UnixCommand::isKtsussVersionOK() +@@ -532,19 +538,7 @@ bool UnixCommand::doInternetPingTest() */ bool UnixCommand::hasTheExecutable( const QString& exeName ) { +- //std::cout << "Searching for the executable: " << exeName.toLatin1().data() << std::endl; +- - QProcess proc; - proc.setProcessChannelMode(QProcess::MergedChannels); - QString sParam = "\"which " + exeName + "\""; @@ -55,5 +57,5 @@ index 6ab57b9..dff3ffb 100644 /* -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0004-Use-instead-of-QDir-separator.patch b/mingw-w64-octopi-git/0005-Use-instead-of-QDir-separator.patch similarity index 78% rename from mingw-w64-octopi-git/0004-Use-instead-of-QDir-separator.patch rename to mingw-w64-octopi-git/0005-Use-instead-of-QDir-separator.patch index c5a4166edf..e972044064 100644 --- a/mingw-w64-octopi-git/0004-Use-instead-of-QDir-separator.patch +++ b/mingw-w64-octopi-git/0005-Use-instead-of-QDir-separator.patch @@ -1,17 +1,17 @@ -From 2ec0488322caf88eab092956ef1769d67469a5f7 Mon Sep 17 00:00:00 2001 +From 8a13242cceca4dae688065e4332b56e646683425 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 28 Sep 2014 23:12:28 +0100 -Subject: [PATCH 04/13] Use '/' instead of QDir::separator() +Subject: [PATCH 05/14] Use '/' instead of QDir::separator() --- src/utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp -index 04ad195..522a9bd 100644 +index 711c20f..65fee86 100644 --- a/src/utils.cpp +++ b/src/utils.cpp -@@ -230,17 +230,17 @@ QString utils::showFullPathOfItem( const QModelIndex &index ){ +@@ -236,17 +236,17 @@ QString utils::showFullPathOfItem( const QModelIndex &index ){ if ( nindex != sim->invisibleRootItem()->index() ) sl << sim->itemFromIndex( nindex )->text(); else break; } @@ -33,5 +33,5 @@ index 04ad195..522a9bd 100644 } -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0005-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch b/mingw-w64-octopi-git/0006-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch similarity index 70% rename from mingw-w64-octopi-git/0005-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch rename to mingw-w64-octopi-git/0006-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch index 0a9551145b..7189d4465b 100644 --- a/mingw-w64-octopi-git/0005-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch +++ b/mingw-w64-octopi-git/0006-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch @@ -1,17 +1,17 @@ -From 43e2e0cb559605e3fab7c708b54e360b688dd752 Mon Sep 17 00:00:00 2001 +From 451ffd86a8f7dae3675db0863f599f399447c39a Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 28 Sep 2014 23:15:23 +0100 -Subject: [PATCH 05/13] Append to instead of overwrite m_readAllStandardOutput +Subject: [PATCH 06/14] Append to instead of overwrite m_readAllStandardOutput --- src/unixcommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp -index dff3ffb..7badd37 100644 +index 438333d..70b739b 100644 --- a/src/unixcommand.cpp +++ b/src/unixcommand.cpp -@@ -660,7 +660,7 @@ void UnixCommand::executeCommandAsNormalUser(const QString &pCommand) +@@ -697,7 +697,7 @@ void UnixCommand::executeCommandAsNormalUser(const QString &pCommand) void UnixCommand::processReadyReadStandardOutput() { if (m_process->isOpen()) @@ -21,5 +21,5 @@ index dff3ffb..7badd37 100644 /* -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0006-Define-QT_WA.patch b/mingw-w64-octopi-git/0007-Define-QT_WA.patch similarity index 86% rename from mingw-w64-octopi-git/0006-Define-QT_WA.patch rename to mingw-w64-octopi-git/0007-Define-QT_WA.patch index e60c575c3a..ff6635038c 100644 --- a/mingw-w64-octopi-git/0006-Define-QT_WA.patch +++ b/mingw-w64-octopi-git/0007-Define-QT_WA.patch @@ -1,7 +1,7 @@ -From cecc10020b4189b1a94144104c83149c15472b4e Mon Sep 17 00:00:00 2001 +From c24436489710386d457de6ae3bbded36c6f6f7fa Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:02:24 +0100 -Subject: [PATCH 06/13] Define QT_WA +Subject: [PATCH 07/14] Define QT_WA --- src/QtSolutions/qtlockedfile_win.cpp | 2 ++ @@ -21,5 +21,5 @@ index 4cd2003..c28aae8 100755 { if (mutexname.isEmpty()) { -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0007-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch b/mingw-w64-octopi-git/0008-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch similarity index 66% rename from mingw-w64-octopi-git/0007-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch rename to mingw-w64-octopi-git/0008-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch index b3b9cc5f98..6b70b7c2f2 100644 --- a/mingw-w64-octopi-git/0007-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch +++ b/mingw-w64-octopi-git/0008-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch @@ -1,7 +1,7 @@ -From 17856a5266bb270f255ca29bd64ababadf919fc7 Mon Sep 17 00:00:00 2001 +From ce323bff2c89db23ad4be5c7018d804f4ce3d8f1 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:31:32 +0100 -Subject: [PATCH 07/13] MSYS2: Add ectn_MSYS2 as a LinuxDistro +Subject: [PATCH 08/14] MSYS2: Add ectn_MSYS2 as a LinuxDistro --- src/unixcommand.cpp | 4 ++++ @@ -9,10 +9,10 @@ Subject: [PATCH 07/13] MSYS2: Add ectn_MSYS2 as a LinuxDistro 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp -index 7badd37..e315306 100644 +index 70b739b..5248fbb 100644 --- a/src/unixcommand.cpp +++ b/src/unixcommand.cpp -@@ -863,6 +863,9 @@ QStringList UnixCommand::getIgnorePkg() +@@ -935,6 +935,9 @@ QStringList UnixCommand::getIgnorePkgsFromPacmanConf() LinuxDistro UnixCommand::getLinuxDistro() { static LinuxDistro ret; @@ -22,7 +22,7 @@ index 7badd37..e315306 100644 static bool firstTime = true; if (firstTime) -@@ -922,6 +925,7 @@ LinuxDistro UnixCommand::getLinuxDistro() +@@ -994,6 +997,7 @@ LinuxDistro UnixCommand::getLinuxDistro() file.close(); } } @@ -31,18 +31,18 @@ index 7badd37..e315306 100644 return ret; } diff --git a/src/unixcommand.h b/src/unixcommand.h -index 89b0f31..9efebd2 100644 +index b3dd169..cc45e0b 100644 --- a/src/unixcommand.h +++ b/src/unixcommand.h @@ -37,7 +37,7 @@ enum CommandExecuting { ectn_NONE, ectn_MIRROR_CHECK, ectn_SYNC_DATABASE, ectn_RUN_IN_TERMINAL }; enum LinuxDistro { ectn_ANTERGOS, ectn_ARCHBANGLINUX, ectn_ARCHBSD, ectn_ARCHLINUX, ectn_CHAKRA, -- ectn_KAOS, ectn_MANJAROLINUX, ectn_MOOOSLINUX, ectn_NETRUNNER, ectn_UNKNOWN }; -+ ectn_KAOS, ectn_MANJAROLINUX, ectn_MOOOSLINUX, ectn_NETRUNNER, ectn_MSYS2, ectn_UNKNOWN }; +- ectn_KAOS, ectn_MANJAROLINUX, ectn_MOOOSLINUX, ectn_NETRUNNER, ectn_PARABOLA, ectn_UNKNOWN }; ++ ectn_KAOS, ectn_MANJAROLINUX, ectn_MOOOSLINUX, ectn_NETRUNNER, ectn_PARABOLA, ectn_MSYS2, ectn_UNKNOWN }; + + enum Language { ectn_LANG_ENGLISH, ectn_LANG_USER_DEFINED }; - //Forward class declarations. - class QString; -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0008-MSYS2-Add-getMSYS2Root.patch b/mingw-w64-octopi-git/0009-MSYS2-Add-getMSYS2Root.patch similarity index 88% rename from mingw-w64-octopi-git/0008-MSYS2-Add-getMSYS2Root.patch rename to mingw-w64-octopi-git/0009-MSYS2-Add-getMSYS2Root.patch index 452cdc7bc2..412c639be9 100644 --- a/mingw-w64-octopi-git/0008-MSYS2-Add-getMSYS2Root.patch +++ b/mingw-w64-octopi-git/0009-MSYS2-Add-getMSYS2Root.patch @@ -1,7 +1,7 @@ -From 2d12eebb560c360c7fe166c20dea349e3407f14e Mon Sep 17 00:00:00 2001 +From 074cad793e552e94b61ca79a3e266ea84b5b4c82 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:38:23 +0100 -Subject: [PATCH 08/13] MSYS2: Add getMSYS2Root() +Subject: [PATCH 09/14] MSYS2: Add getMSYS2Root() Because MSYS2 can be installed anywhere, the real location is determined using a relative path from octopi.exe @@ -11,7 +11,7 @@ is determined using a relative path from octopi.exe 2 files changed, 20 insertions(+) diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp -index e315306..c7ee8ee 100644 +index 5248fbb..eab2e3b 100644 --- a/src/unixcommand.cpp +++ b/src/unixcommand.cpp @@ -37,6 +37,7 @@ @@ -23,7 +23,7 @@ index e315306..c7ee8ee 100644 /* * Executes given command and returns the StandardError Output. diff --git a/src/unixcommand.h b/src/unixcommand.h -index 9efebd2..833716b 100644 +index cc45e0b..7560c2a 100644 --- a/src/unixcommand.h +++ b/src/unixcommand.h @@ -24,6 +24,7 @@ @@ -34,7 +34,7 @@ index 9efebd2..833716b 100644 #include #include "package.h" -@@ -55,6 +56,7 @@ private: +@@ -57,6 +58,7 @@ private: QProcess *m_process; static QFile *m_temporaryFile; static QProcessEnvironment *m_env; @@ -42,7 +42,7 @@ index 9efebd2..833716b 100644 public: UnixCommand(QObject *parent); -@@ -115,6 +117,14 @@ public: +@@ -120,6 +122,14 @@ public: return (uid == 0); //Returns TRUE if root is running Octopi } @@ -57,7 +57,7 @@ index 9efebd2..833716b 100644 static QProcessEnvironment const& getEnv(){ if (!m_env) { -@@ -125,6 +135,15 @@ public: +@@ -130,6 +140,15 @@ public: m_env->insert("LANG", "C"); m_env->insert("LC_MESSAGES", "C"); m_env->insert("LC_ALL", "C"); @@ -74,5 +74,5 @@ index 9efebd2..833716b 100644 return *m_env; } -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0009-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch b/mingw-w64-octopi-git/0010-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch similarity index 73% rename from mingw-w64-octopi-git/0009-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch rename to mingw-w64-octopi-git/0010-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch index 6312988ad3..5cbc9becbc 100644 --- a/mingw-w64-octopi-git/0009-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch +++ b/mingw-w64-octopi-git/0010-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch @@ -1,7 +1,7 @@ -From 053addd81cc0ee73faf3fc308294069acb982d10 Mon Sep 17 00:00:00 2001 +From e2837dc12fd8351670bdc9c62f57dbf5f359cba0 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:40:36 +0100 -Subject: [PATCH 09/13] MSYS2: hasPacmanDatabase() getMSYS2Root() changes +Subject: [PATCH 10/14] MSYS2: hasPacmanDatabase() getMSYS2Root() changes --- src/package.cpp | 11 ++++++++++- @@ -9,10 +9,10 @@ Subject: [PATCH 09/13] MSYS2: hasPacmanDatabase() getMSYS2Root() changes 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/package.cpp b/src/package.cpp -index 3795e54..648edb6 100644 +index 5e3db85..5e17c8b 100644 --- a/src/package.cpp +++ b/src/package.cpp -@@ -1210,7 +1210,16 @@ bool Package::hasPacmanDatabase() +@@ -1246,7 +1246,16 @@ bool Package::hasPacmanDatabase() if (!done) { @@ -31,13 +31,13 @@ index 3795e54..648edb6 100644 done = true; } diff --git a/src/package.h b/src/package.h -index 173f714..cb2b4f0 100644 +index ac1beb8..5d85975 100644 --- a/src/package.h +++ b/src/package.h -@@ -40,8 +40,9 @@ const QString ctn_STRING_RELEASES = "(alfa|beta|rc|pre|patch|^[0-9]{8}$|(^[rR] - const QString ctn_DATE_RELEASE = "^[0-9]{8}$"; - const QString ctn_NO_MATCH = "not found!"; +@@ -32,8 +32,9 @@ + #include + const QString ctn_TEMP_ACTIONS_FILE ( QDir::tempPath() + QDir::separator() + ".qt_temp_" ); -const QString ctn_PACMAN_DATABASE_DIR = "/var/lib/pacman"; -const QString ctn_PACMAN_CORE_DB_FILE = "/var/lib/pacman/sync/core.db"; +const QString ctn_PACMAN_DATABASE_DIR = "/var/lib/pacman"; @@ -47,5 +47,5 @@ index 173f714..cb2b4f0 100644 enum PackageStatus { ectn_INSTALLED, ectn_NON_INSTALLED, ectn_OUTDATED, ectn_NEWER, ectn_FOREIGN, ectn_FOREIGN_OUTDATED }; -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0010-MSYS2-Changes-to-various-system-calls.patch b/mingw-w64-octopi-git/0011-MSYS2-Changes-to-various-system-calls.patch similarity index 81% rename from mingw-w64-octopi-git/0010-MSYS2-Changes-to-various-system-calls.patch rename to mingw-w64-octopi-git/0011-MSYS2-Changes-to-various-system-calls.patch index f8adf9439d..985e7a1d14 100644 --- a/mingw-w64-octopi-git/0010-MSYS2-Changes-to-various-system-calls.patch +++ b/mingw-w64-octopi-git/0011-MSYS2-Changes-to-various-system-calls.patch @@ -1,7 +1,7 @@ -From fd2fc2c3355b5ed7a362133d6f1197e1a98a4cb3 Mon Sep 17 00:00:00 2001 +From f907ae04e12bd93b0bc0bdd2daf07e245d260faf Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:42:50 +0100 -Subject: [PATCH 10/13] MSYS2: Changes to various system calls +Subject: [PATCH 11/14] MSYS2: Changes to various system calls openRootTerminal(), runCommandInTerminal() getSUCommand(), isRootRunning() @@ -14,14 +14,14 @@ isRootRunning() returns false src/terminal.cpp | 12 +++++++++++- src/unixcommand.h | 6 ++++++ src/wmhelper.cpp | 5 ++++- - src/wmhelper.h | 2 ++ - 4 files changed, 23 insertions(+), 2 deletions(-) + src/wmhelper.h | 1 + + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/terminal.cpp b/src/terminal.cpp -index 5085007..a026994 100644 +index bec9273..eb4293c 100644 --- a/src/terminal.cpp +++ b/src/terminal.cpp -@@ -198,7 +198,12 @@ void Terminal::openRootTerminal() +@@ -205,7 +205,12 @@ void Terminal::openRootTerminal() { if (m_selectedTerminal == ctn_AUTOMATIC) { @@ -35,7 +35,7 @@ index 5085007..a026994 100644 { QString cmd = WMHelper::getSUCommand() + " \"" + ctn_RXVT_TERMINAL + " -name Urxvt -title Urxvt \""; -@@ -344,6 +349,11 @@ void Terminal::runCommandInTerminal(const QStringList &commandList) +@@ -359,6 +364,11 @@ void Terminal::runCommandInTerminal(const QStringList &commandList) if (m_selectedTerminal == ctn_AUTOMATIC) { @@ -48,10 +48,10 @@ index 5085007..a026994 100644 { QString cmd = diff --git a/src/unixcommand.h b/src/unixcommand.h -index 833716b..81eed8c 100644 +index 7560c2a..056a776 100644 --- a/src/unixcommand.h +++ b/src/unixcommand.h -@@ -112,10 +112,16 @@ public: +@@ -117,10 +117,16 @@ public: static bool hasTheExecutable( const QString& exeName ); static bool isAppRunning(const QString &appName, bool justOneInstance = false); @@ -69,10 +69,10 @@ index 833716b..81eed8c 100644 static QString getMSYS2Root(){ if (m_msys2Root.isEmpty()) diff --git a/src/wmhelper.cpp b/src/wmhelper.cpp -index 187087e..4ce7e1a 100644 +index 487c41d..9eaabe3 100644 --- a/src/wmhelper.cpp +++ b/src/wmhelper.cpp -@@ -292,7 +292,10 @@ QString WMHelper::getGKSUCommand(){ +@@ -298,7 +298,10 @@ QString WMHelper::getGKSUCommand(){ QString WMHelper::getSUCommand(){ QString result(ctn_NO_SU_COMMAND); @@ -85,18 +85,17 @@ index 187087e..4ce7e1a 100644 } else if (isKDERunning() && UnixCommand::hasTheExecutable(ctn_KDESU)){ diff --git a/src/wmhelper.h b/src/wmhelper.h -index e96e0b4..ae9405c 100644 +index 8a941a4..aaff77e 100644 --- a/src/wmhelper.h +++ b/src/wmhelper.h -@@ -25,6 +25,8 @@ +@@ -25,6 +25,7 @@ const QString ctn_NO_SU_COMMAND("none"); const QString ctn_ROOT_SH("/bin/sh -c "); +const QString ctn_MSYS2_SH("cmd.exe /c "); -+ + const QString ctn_KDESU("kdesu"); - const QString ctn_KDE_DESKTOP("kwin"); - const QString ctn_KDE_EDITOR("kwrite"); + -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0011-MSYS2-Process-id-changes-WIP.patch b/mingw-w64-octopi-git/0012-MSYS2-Process-id-changes-WIP.patch similarity index 83% rename from mingw-w64-octopi-git/0011-MSYS2-Process-id-changes-WIP.patch rename to mingw-w64-octopi-git/0012-MSYS2-Process-id-changes-WIP.patch index 8a3b40d5a7..4244404bfc 100644 --- a/mingw-w64-octopi-git/0011-MSYS2-Process-id-changes-WIP.patch +++ b/mingw-w64-octopi-git/0012-MSYS2-Process-id-changes-WIP.patch @@ -1,7 +1,7 @@ -From 04b82c70625fefea765893c9ca2512de00edc10c Mon Sep 17 00:00:00 2001 +From 634078881b2797b237ed29c51afcf241ce397225 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Sep 2014 15:44:22 +0100 -Subject: [PATCH 11/13] MSYS2: Process id changes (WIP) +Subject: [PATCH 12/14] MSYS2: Process id changes (WIP) --- notifier/octopi-notifier/octopi-notifier.pro | 2 + @@ -9,20 +9,20 @@ Subject: [PATCH 11/13] MSYS2: Process id changes (WIP) 2 files changed, 79 insertions(+) diff --git a/notifier/octopi-notifier/octopi-notifier.pro b/notifier/octopi-notifier/octopi-notifier.pro -index fc942b1..262822a 100644 +index 2792ecb..ab62b67 100644 --- a/notifier/octopi-notifier/octopi-notifier.pro +++ b/notifier/octopi-notifier/octopi-notifier.pro -@@ -49,6 +49,8 @@ HEADERS += \ - ../../src/utils.h \ - ../../src/transactiondialog.h +@@ -51,6 +51,8 @@ HEADERS += \ + ../../src/transactiondialog.h \ + ../../src/argumentlist.h +win32: LIBS += -lwtsapi32 + - FORMS += ../../ui/transactiondialog.ui + FORMS += ../../ui/transactiondialog.ui \ + ui/setupdialog.ui - RESOURCES += \ diff --git a/src/utils.cpp b/src/utils.cpp -index 522a9bd..bd18a79 100644 +index 65fee86..f0a5c5e 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -35,6 +35,12 @@ @@ -38,7 +38,7 @@ index 522a9bd..bd18a79 100644 /* * The needed constructor -@@ -77,8 +83,63 @@ void utils::ProcessWrapper::onProcessStarted() +@@ -83,8 +89,63 @@ void utils::ProcessWrapper::onProcessStarted() emit startedTerminal(); } @@ -102,7 +102,7 @@ index 522a9bd..bd18a79 100644 QString out; QProcess proc; proc.start(ps_args); -@@ -87,6 +148,7 @@ QString Ps_To_Q_PIDs(QString ps_args) +@@ -93,6 +154,7 @@ QString Ps_To_Q_PIDs(QString ps_args) proc.close(); return out; } @@ -110,7 +110,7 @@ index 522a9bd..bd18a79 100644 QStringList Ps_To_Q_PIDs_SL(QString ps_args) { -@@ -95,6 +157,20 @@ QStringList Ps_To_Q_PIDs_SL(QString ps_args) +@@ -101,6 +163,20 @@ QStringList Ps_To_Q_PIDs_SL(QString ps_args) return list; } @@ -131,7 +131,7 @@ index 522a9bd..bd18a79 100644 /* * Returns the _PROCESS_INFORMATION* on Windows, does nothing on * others. -@@ -108,6 +184,7 @@ int Q_PID_to_int(Q_PID in_pid) +@@ -114,6 +190,7 @@ int Q_PID_to_int(Q_PID in_pid) { return in_pid; } @@ -140,5 +140,5 @@ index 522a9bd..bd18a79 100644 /* * We need this to search for the SH process pid (which spaws AUR tool) -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0012-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch b/mingw-w64-octopi-git/0013-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch similarity index 73% rename from mingw-w64-octopi-git/0012-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch rename to mingw-w64-octopi-git/0013-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch index 7891638fd0..9bdbb8a387 100644 --- a/mingw-w64-octopi-git/0012-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch +++ b/mingw-w64-octopi-git/0013-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch @@ -1,7 +1,7 @@ -From 7fda7d9ca5ffd6cd5c27fb338f740e2753438234 Mon Sep 17 00:00:00 2001 +From 98649d2a3d0182b5f907bbb67876c88e6cbd1b8f Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 28 Sep 2014 23:14:17 +0100 -Subject: [PATCH 12/13] MSYS2: Prepend getMSYS2Root() to file checks +Subject: [PATCH 13/14] MSYS2: Prepend getMSYS2Root() to file checks --- src/mainwindow_refresh.cpp | 2 +- @@ -9,10 +9,10 @@ Subject: [PATCH 12/13] MSYS2: Prepend getMSYS2Root() to file checks 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mainwindow_refresh.cpp b/src/mainwindow_refresh.cpp -index a94bfe7..8b3403d 100644 +index 11c242a..ec592a4 100644 --- a/src/mainwindow_refresh.cpp +++ b/src/mainwindow_refresh.cpp -@@ -995,7 +995,7 @@ void MainWindow::refreshTabFiles(bool clearContents, bool neverQuit) +@@ -1318,7 +1318,7 @@ void MainWindow::refreshTabFiles(bool clearContents, bool neverQuit) //Let's test if it is not a symbolic link to a dir if(!isDir) { @@ -22,10 +22,10 @@ index a94bfe7..8b3403d 100644 { QFileInfo fiTestForDir(fiTestForSymLink.symLinkTarget()); diff --git a/src/utils.cpp b/src/utils.cpp -index bd18a79..2f21988 100644 +index f0a5c5e..2d22df3 100644 --- a/src/utils.cpp +++ b/src/utils.cpp -@@ -314,7 +314,7 @@ QString utils::showFullPathOfItem( const QModelIndex &index ){ +@@ -320,7 +320,7 @@ QString utils::showFullPathOfItem( const QModelIndex &index ){ str += sl[i]; } @@ -35,5 +35,5 @@ index bd18a79..2f21988 100644 { str += QLatin1Char('/'); -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/0013-MSYS2-Support-discoverBinaryPath.patch b/mingw-w64-octopi-git/0014-MSYS2-Support-discoverBinaryPath.patch similarity index 77% rename from mingw-w64-octopi-git/0013-MSYS2-Support-discoverBinaryPath.patch rename to mingw-w64-octopi-git/0014-MSYS2-Support-discoverBinaryPath.patch index 78ac9802ea..a4f1f50926 100644 --- a/mingw-w64-octopi-git/0013-MSYS2-Support-discoverBinaryPath.patch +++ b/mingw-w64-octopi-git/0014-MSYS2-Support-discoverBinaryPath.patch @@ -1,17 +1,17 @@ -From eca5466d4591b75e7f095a99759b9f3fcdff1ee6 Mon Sep 17 00:00:00 2001 +From 6d14274356878c972774e467387e4b031169a219 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 30 Sep 2014 19:12:30 +0100 -Subject: [PATCH 13/13] MSYS2: Support discoverBinaryPath() +Subject: [PATCH 14/14] MSYS2: Support discoverBinaryPath() --- src/unixcommand.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/unixcommand.cpp b/src/unixcommand.cpp -index c7ee8ee..afeb60b 100644 +index eab2e3b..776d660 100644 --- a/src/unixcommand.cpp +++ b/src/unixcommand.cpp -@@ -84,7 +84,12 @@ QString UnixCommand::discoverBinaryPath(const QString& binary){ +@@ -85,7 +85,12 @@ QString UnixCommand::discoverBinaryPath(const QString& binary){ proc.setProcessEnvironment(getEnv()); proc.setProcessChannelMode(QProcess::MergedChannels); @@ -26,5 +26,5 @@ index c7ee8ee..afeb60b 100644 QString res = proc.readAllStandardOutput(); -- -2.1.1 +2.4.2 diff --git a/mingw-w64-octopi-git/PKGBUILD b/mingw-w64-octopi-git/PKGBUILD index e6c588b684..fc6b6a6fa8 100644 --- a/mingw-w64-octopi-git/PKGBUILD +++ b/mingw-w64-octopi-git/PKGBUILD @@ -1,73 +1,75 @@ # Maintainer: Ray Donnelly _realname=octopi - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" #_qmake=${MINGW_PREFIX}/bin/qmake _qmake=${MINGW_PREFIX}/qt5-static/bin/qmake -pkgver=r671.97ec878 +pkgver=r941.6df0f8a pkgrel=1 pkgdesc="a powerful Pacman frontend using Qt libs" arch=('any') url="https://github.com/aarnt/octopi" license=('GPL2') -makedepends=('git' "${MINGW_PACKAGE_PREFIX}-qt5-static" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-make") +makedepends=('git' "${MINGW_PACKAGE_PREFIX}-qt5-static" "${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-git") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") _gitroot="git://github.com/aarnt/octopi.git" _gitname="octopi" #options=('debug' '!strip') source=("${_gitname}"::"${_gitroot}" "0001-Use-Q_PID-instead-of-int-reducing-QProcess-repititio.patch" "0002-Use-a-shared-QProcessEnvironment.patch" - "0003-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch" - "0004-Use-instead-of-QDir-separator.patch" - "0005-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch" - "0006-Define-QT_WA.patch" - "0007-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch" - "0008-MSYS2-Add-getMSYS2Root.patch" - "0009-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch" - "0010-MSYS2-Changes-to-various-system-calls.patch" - "0011-MSYS2-Process-id-changes-WIP.patch" - "0012-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch" - "0013-MSYS2-Support-discoverBinaryPath.patch") + "0003-Win32-Link-to-Windows-Terminal-Services-wtsapi32.patch" + "0004-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch" + "0005-Use-instead-of-QDir-separator.patch" + "0006-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch" + "0007-Define-QT_WA.patch" + "0008-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch" + "0009-MSYS2-Add-getMSYS2Root.patch" + "0010-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch" + "0011-MSYS2-Changes-to-various-system-calls.patch" + "0012-MSYS2-Process-id-changes-WIP.patch" + "0013-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch" + "0014-MSYS2-Support-discoverBinaryPath.patch") md5sums=('SKIP' - 'f5baf34e5834b95f04a1bbd6885dc8ab' - 'b80912396c5be0e2ef450f3a75945027' - '194ae04782fa018f2ceb64ddc0c1b087' - '24423cf4a7c532035e4f6fa6bd86bc9f' - '84eb736c06916a2d05c5fab44f5feab5' - '9a261ef5f6b084fb9319664a74bfe7c0' - 'ecdc6eff22e0f05ac90f5bec6dc33634' - 'c46a14fe574e2644dec65e86df8d2668' - '0fb8880f45775600bbfc82975c539470' - '5a75614737395d6b298f0a6b81592526' - '5376cfe7257c9f955da81bbfa32d27f8' - '3d153445783441dfa6e0e5aa3002c61d' - '927a964d6b3d4ee3ac1f56a43b008839') + '1cb74f8e0fddd37c7bd94ac79e365ca4' + 'fffcff427d949030c2bdfcf9cc6a383e' + '549978deb104c3ecdc3c07253def0b00' + '49ce3162b59bcd18e28114c836f624fe' + '3cc3fbfa53a2b7ac630e47ab8bdc3cea' + '1dda8e7fe382c4a1ad6b103a773700a2' + '7dde701345087616e0dcb628ab4c4995' + '0c52f5a446e9e0ac8075b8fd54911e45' + '2ee70444f597172699539233b6c1047e' + 'e5fda93d08711ffa949ba8d38886a3ba' + '6f721589e2a09e18f5b74f814dfb2086' + '4e6d08fcb40bd9d4ad95b5976abb553b' + 'ab664cb066c31013d760797f2c293e08' + 'c4a96a9fced38262754d226168ae344b') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/$_gitname" + cd "${srcdir}/${_gitname}" git am "${srcdir}"/0001-Use-Q_PID-instead-of-int-reducing-QProcess-repititio.patch git am "${srcdir}"/0002-Use-a-shared-QProcessEnvironment.patch - git am "${srcdir}"/0003-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch - git am "${srcdir}"/0004-Use-instead-of-QDir-separator.patch - git am "${srcdir}"/0005-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch - git am "${srcdir}"/0006-Define-QT_WA.patch - git am "${srcdir}"/0007-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch - git am "${srcdir}"/0008-MSYS2-Add-getMSYS2Root.patch - git am "${srcdir}"/0009-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch - git am "${srcdir}"/0010-MSYS2-Changes-to-various-system-calls.patch - git am "${srcdir}"/0011-MSYS2-Process-id-changes-WIP.patch - git am "${srcdir}"/0012-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch - git am "${srcdir}"/0013-MSYS2-Support-discoverBinaryPath.patch + git am "${srcdir}"/0003-Win32-Link-to-Windows-Terminal-Services-wtsapi32.patch + git am "${srcdir}"/0004-Remove-redundancy-in-UnixCommand-s-exe-checking-func.patch + git am "${srcdir}"/0005-Use-instead-of-QDir-separator.patch + git am "${srcdir}"/0006-Append-to-instead-of-overwrite-m_readAllStandardOutp.patch + git am "${srcdir}"/0007-Define-QT_WA.patch + git am "${srcdir}"/0008-MSYS2-Add-ectn_MSYS2-as-a-LinuxDistro.patch + git am "${srcdir}"/0009-MSYS2-Add-getMSYS2Root.patch + git am "${srcdir}"/0010-MSYS2-hasPacmanDatabase-getMSYS2Root-changes.patch + git am "${srcdir}"/0011-MSYS2-Changes-to-various-system-calls.patch + git am "${srcdir}"/0012-MSYS2-Process-id-changes-WIP.patch + git am "${srcdir}"/0013-MSYS2-Prepend-getMSYS2Root-to-file-checks.patch + git am "${srcdir}"/0014-MSYS2-Support-discoverBinaryPath.patch } build() { @@ -84,41 +86,38 @@ build() { cd build-${MINGW_CHOST} msg "Building Octopi..." - ${_qmake} ../$_gitname/$_gitname.pro CONFIG+="c++11 ${_config}" - mingw32-make ${_config} + ${_qmake} ../${_gitname}/${_gitname}.pro CONFIG+="c++11 ${_config}" + make ${_config} mkdir -p notifier/pacmanhelper pushd notifier/pacmanhelper msg "Building pacmanhelper..." - ${_qmake} ../../../$_gitname/notifier/pacmanhelper/pacmanhelper.pro CONFIG+="${_config}" - mingw32-make ${_config} + ${_qmake} ../../../${_gitname}/notifier/pacmanhelper/pacmanhelper.pro CONFIG+="${_config}" + make ${_config} popd - mkdir -p notifier/$_gitname-notifier - pushd notifier/$_gitname-notifier - msg "Building $_gitname-notifier..." - ${_qmake} ../../../$_gitname/notifier/$_gitname-notifier/$_gitname-notifier.pro CONFIG+="release" - mingw32-make ${_config} + mkdir -p notifier/${_gitname}-notifier + pushd notifier/${_gitname}-notifier + msg "Building ${_gitname}-notifier..." + ${_qmake} ../../../${_gitname}/notifier/${_gitname}-notifier/${_gitname}-notifier.pro CONFIG+="release" + make ${_config} popd } package() { mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - PREFIX_WIN=$(pwd -W) - popd > /dev/null - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - install -D -m755 bin/$_gitname ${pkgdir}${MINGW_PREFIX}/bin/$_gitname - install -D -m755 notifier/bin/$_gitname-notifier ${pkgdir}${MINGW_PREFIX}/bin/$_gitname-notifier - install -D -m644 $srcdir/$_gitname/resources/images/${_gitname}_red.png ${pkgdir}${MINGW_PREFIX}/share/icons/$_gitname.png + install -D -m755 bin/${_gitname} ${pkgdir}${MINGW_PREFIX}/bin/${_gitname} + install -D -m755 notifier/bin/${_gitname}-notifier ${pkgdir}${MINGW_PREFIX}/bin/${_gitname}-notifier + install -D -m644 ${srcdir}/${_gitname}/resources/images/${_gitname}_red.png ${pkgdir}${MINGW_PREFIX}/share/icons/$}_gitname}.png #services - install -D -m755 notifier/bin/pacmanhelper ${pkgdir}${MINGW_PREFIX}/lib/octopi/pacmanhelper + install -D -m755 notifier/bin/pacmanhelper ${pkgdir}${MINGW_PREFIX}/lib/octopi/pacmanhelper - install -D -m644 $srcdir/$_gitname/notifier/pacmanhelper/polkit/org.octopi.pacman.policy ${pkgdir}${MINGW_PREFIX}/share/polkit-1/actions/org.octopi.pacman.policy - install -D -m644 $srcdir/$_gitname/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf ${pkgdir}${MINGW_PREFIX}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf - install -D -m644 $srcdir/$_gitname/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml ${pkgdir}${MINGW_PREFIX}/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml - install -D -m644 $srcdir/$_gitname/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service ${pkgdir}${MINGW_PREFIX}/share/dbus-1/system-services/org.octopi.pacmanhelper.service + install -D -m644 ${srcdir}/${_gitname}/notifier/pacmanhelper/polkit/org.octopi.pacman.policy ${pkgdir}${MINGW_PREFIX}/share/polkit-1/actions/org.octopi.pacman.policy + install -D -m644 ${srcdir}/${_gitname}/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf ${pkgdir}${MINGW_PREFIX}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf + install -D -m644 ${srcdir}/${_gitname}/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml ${pkgdir}${MINGW_PREFIX}/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml + install -D -m644 ${srcdir}/${_gitname}/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service ${pkgdir}${MINGW_PREFIX}/share/dbus-1/system-services/org.octopi.pacmanhelper.service } diff --git a/mingw-w64-ogitor/PKGBUILD b/mingw-w64-ogitor/PKGBUILD index 7fbbcc737e..77a536a294 100644 --- a/mingw-w64-ogitor/PKGBUILD +++ b/mingw-w64-ogitor/PKGBUILD @@ -79,14 +79,14 @@ build() { pushd ${pkgdir}${MINGW_PREFIX} > /dev/null export PREFIX_WIN=`pwd -W` popd > /dev/null - + pushd ${MINGW_PREFIX} > /dev/null export PREFIX_DEPS=`pwd -W` popd > /dev/null - + export OGRE_HOME=${PREFIX_DEPS} export QTDIR=${PREFIX_DEPS} - + cd "${srcdir}/${_realname}-${pkgver}" ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ diff --git a/mingw-w64-ogre/PKGBUILD b/mingw-w64-ogre/PKGBUILD index a02b81c6ef..3380a741cc 100644 --- a/mingw-w64-ogre/PKGBUILD +++ b/mingw-w64-ogre/PKGBUILD @@ -90,11 +90,11 @@ build() { pushd ${pkgdir}${MINGW_PREFIX} > /dev/null export PREFIX_WIN=`pwd -W` popd > /dev/null - + pushd ${MINGW_PREFIX} > /dev/null export PREFIX_DEPS=`pwd -W` popd > /dev/null - + case ${MINGW_CHOST} in i686*) local _march=pentium4 #i686 @@ -122,7 +122,7 @@ build() { -DFREETYPE_FT2BUILD_INCLUDE_DIR=${PREFIX_DEPS}/include/freetype2 \ -DDirectX9_DXERR_LIBRARY=${PREFIX_DEPS}/${MINGW_CHOST}/lib/libdxerr9.a \ ../${_realname}-${pkgver} - + make } @@ -130,12 +130,12 @@ package() { cd "${srcdir}/build-${MINGW_CHOST}" make -j1 install #DESTDIR="$pkgdir" pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - + mv bin/${_buildtype}/* bin/ rm -r bin/${_buildtype} mv lib/${_buildtype}/* lib/ rm -r lib/${_buildtype} - + sed -i "s|../../|../|g" \ bin/plugins.cfg \ bin/resources.cfg \ @@ -147,7 +147,7 @@ package() { #rm -r media/CMakeFiles #rm media/cmake_install.cmake #rm media/Makefile - + #rm -r Docs/CMakeFiles #rm Docs/cmake_install.cmake #rm Docs/Makefile diff --git a/mingw-w64-ogre3d-hg/001-remove-march-from-cflags.patch b/mingw-w64-ogre3d-hg/001-remove-march-from-cflags.patch deleted file mode 100644 index c30bde8aef..0000000000 --- a/mingw-w64-ogre3d-hg/001-remove-march-from-cflags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- ogre3d-1.9.0/CMakeLists.txt.orig 2013-12-10 14:50:35.000000000 +0400 -+++ ogre3d-1.9.0/CMakeLists.txt 2013-12-11 00:03:24.029600000 +0400 -@@ -145,9 +145,6 @@ - endif () - if (MINGW) - add_definitions(-D_WIN32_WINNT=0x0500) -- # set architecture to i686, since otherwise some versions of MinGW can't link -- # the atomic primitives -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686") - # Fpermissive required to let some "non-standard" casting operations in the plugins pass - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") - # disable this optimisation because it breaks release builds (reason unknown) diff --git a/mingw-w64-ogre3d-hg/004-use-mingw-w64-directx.patch b/mingw-w64-ogre3d-hg/004-use-mingw-w64-directx.patch index c225c0e29a..8935a59c03 100644 --- a/mingw-w64-ogre3d-hg/004-use-mingw-w64-directx.patch +++ b/mingw-w64-ogre3d-hg/004-use-mingw-w64-directx.patch @@ -1,407 +1,26 @@ --- ogre3d-1.9.0/RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h.orig 2013-12-20 22:01:31.257800000 +0400 +++ ogre3d-1.9.0/RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h 2013-12-20 22:01:52.177400000 +0400 -@@ -72,7 +72,7 @@ +@@ -72,7 +72,12 @@ #endif #include #include --#include -+#include ++#ifdef __MINGW64_VERSION_MAJOR ++#include ++#define DXGetErrorDescription DXGetErrorDescription9 ++#else + #include ++#endif namespace Ogre ---- ogre3d-1.9.0/CMake/Packages/FindDirectX.cmake.orig 2013-12-20 22:02:56.585400000 +0400 -+++ ogre3d-1.9.0/CMake/Packages/FindDirectX.cmake 2013-12-20 22:02:59.674200000 +0400 -@@ -55,7 +55,7 @@ - endif(CMAKE_CL_64) - find_library(DirectX9_LIBRARY NAMES d3d9 HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) - find_library(DirectX9_D3DX9_LIBRARY NAMES d3dx9 HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) -- find_library(DirectX9_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) -+ find_library(DirectX9_DXERR_LIBRARY NAMES DxErr9 HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) - find_library(DirectX9_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) - - findpkg_finish(DirectX9) ---- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareIndexBuffer.cpp.orig 2013-12-21 00:19:04.505600000 +0400 -+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareIndexBuffer.cpp 2013-12-21 00:19:43.776800000 +0400 -@@ -294,7 +294,7 @@ +--- ogre3d-1.9.0/CMake/Packages/FindDirectX11.cmake.orig 2013-12-20 22:02:56.585400000 +0400 ++++ ogre3d-1.9.0/CMake/Packages/FindDirectX11.cmake 2013-12-20 22:02:59.674200000 +0400 +@@ -82,7 +82,7 @@ - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot create D3D9 Index buffer: " + msg, - "D3D9HardwareIndexBuffer::createBuffer"); -@@ -303,7 +303,7 @@ - hr = bufferResources->mBuffer->GetDesc(&mBufferDesc); - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot get D3D9 Index buffer desc: " + msg, - "D3D9HardwareIndexBuffer::createBuffer"); -@@ -399,7 +399,7 @@ - - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot lock D3D9 vertex buffer: " + msg, - "D3D9HardwareVertexBuffer::_lockBuffer"); -@@ -417,7 +417,7 @@ - hr = bufferResources->mBuffer->Unlock(); - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot unlock D3D9 vertex buffer: " + msg, - "D3D9HardwareVertexBuffer::_unlockBuffer"); ---- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareVertexBuffer.cpp.orig 2013-12-20 19:30:44.000000000 +0400 -+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareVertexBuffer.cpp 2013-12-21 00:20:32.651600000 +0400 -@@ -290,7 +290,7 @@ - - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot restore D3D9 vertex buffer: " + msg, - "D3D9HardwareVertexBuffer::createBuffer"); -@@ -299,7 +299,7 @@ - hr = bufferResources->mBuffer->GetDesc(&mBufferDesc); - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot get D3D9 Vertex buffer desc: " + msg, - "D3D9HardwareVertexBuffer::createBuffer"); -@@ -396,7 +396,7 @@ - - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot lock D3D9 vertex buffer: " + msg, - "D3D9HardwareVertexBuffer::_lockBuffer"); -@@ -414,7 +414,7 @@ - hr = bufferResources->mBuffer->Unlock(); - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, - "Cannot unlock D3D9 vertex buffer: " + msg, - "D3D9HardwareVertexBuffer::_unlockBuffer"); ---- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9RenderSystem.cpp.orig 2013-12-20 19:30:44.000000000 +0400 -+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9RenderSystem.cpp 2013-12-21 20:02:33.748800000 +0400 -@@ -1594,7 +1594,7 @@ - //--------------------------------------------------------------------- - String D3D9RenderSystem::getErrorDescription( long errorNumber ) const - { -- const String errMsg = DXGetErrorDescription( errorNumber ); -+ const String errMsg = DXGetErrorDescription9( errorNumber ); - return errMsg; - } - //--------------------------------------------------------------------- -@@ -2923,7 +2923,7 @@ - &depthBufferSurface, NULL); - if( FAILED(hr) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT( Exception::ERR_RENDERINGAPI_ERROR, - "Error CreateDepthStencilSurface : " + msg, - "D3D9RenderSystem::_createDepthBufferFor" ); -@@ -3110,14 +3110,14 @@ - hr = getActiveD3D9Device()->SetRenderTarget(x, pBack[x]); - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Failed to setRenderTarget : " + msg, "D3D9RenderSystem::_setViewport" ); - } - } - hr = getActiveD3D9Device()->SetDepthStencilSurface( depthSurface ); - if (FAILED(hr)) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Failed to setDepthStencil : " + msg, "D3D9RenderSystem::_setViewport" ); - } - } -@@ -3182,7 +3182,7 @@ - - if( FAILED( hr = getActiveD3D9Device()->BeginScene() ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error beginning frame :" + msg, "D3D9RenderSystem::_beginFrame" ); - } - -@@ -3532,7 +3532,7 @@ - - if( FAILED( hr ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Failed to DrawPrimitive : " + msg, "D3D9RenderSystem::_render" ); - } - -@@ -3906,7 +3906,7 @@ - depth, - stencil ) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error clearing frame buffer : " - + msg, "D3D9RenderSystem::clearFrameBuffer" ); - } ---- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9Texture.cpp.orig 2013-12-20 19:30:44.000000000 +0400 -+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9Texture.cpp 2013-12-21 20:07:57.551800000 +0400 -@@ -119,7 +119,7 @@ - IDirect3DSurface9 *pSrcSurface = 0; - if( FAILED( hr = srcTextureResource->pNormTex->GetSurfaceLevel(0, &pSrcSurface) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" ); - } - -@@ -127,7 +127,7 @@ - IDirect3DSurface9 *pDstSurface = 0; - if( FAILED( hr = dstTextureResource->pNormTex->GetSurfaceLevel(0, &pDstSurface) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - SAFE_RELEASE(pSrcSurface); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" ); - } -@@ -135,7 +135,7 @@ - // do the blit, it's called StretchRect in D3D9 :) - if( FAILED( hr = it->first->StretchRect( pSrcSurface, NULL, pDstSurface, &dstRC, D3DTEXF_NONE) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - SAFE_RELEASE(pSrcSurface); - SAFE_RELEASE(pDstSurface); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" ); -@@ -156,7 +156,7 @@ - IDirect3DSurface9 *pSrcSurface = 0; - if( FAILED( hr =srcTextureResource->pCubeTex->GetCubeMapSurface((D3DCUBEMAP_FACES)face, 0, &pSrcSurface) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" ); - } - -@@ -164,7 +164,7 @@ - IDirect3DSurface9 *pDstSurface = 0; - if( FAILED( hr = dstTextureResource->pCubeTex->GetCubeMapSurface((D3DCUBEMAP_FACES)face, 0, &pDstSurface) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - SAFE_RELEASE(pSrcSurface); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" ); - } -@@ -172,7 +172,7 @@ - // do the blit, it's called StretchRect in D3D9 :) - if( FAILED( hr = it->first->StretchRect( pSrcSurface, NULL, pDstSurface, &dstRC, D3DTEXF_NONE) ) ) - { -- String msg = DXGetErrorDescription(hr); -+ String msg = DXGetErrorDescription9(hr); - SAFE_RELEASE(pSrcSurface); - SAFE_RELEASE(pDstSurface); - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" ); -@@ -564,7 +564,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create cube texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create cube texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_loadCubeTex" ); - } - -@@ -573,7 +573,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_loadCubeTex" ); - } - -@@ -698,7 +698,7 @@ - if (FAILED(hr)) - { - OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, -- "Unable to load volume texture from " + getName() + ": " + String(DXGetErrorDescription(hr)), -+ "Unable to load volume texture from " + getName() + ": " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_loadVolumeTex"); - } - -@@ -707,7 +707,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_loadVolumeTex" ); - } - -@@ -860,7 +860,7 @@ - if (FAILED(hr)) - { - OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, -- "Unable to load texture from " + getName() + " :" + String(DXGetErrorDescription(hr)), -+ "Unable to load texture from " + getName() + " :" + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_loadNormTex"); - } - -@@ -869,7 +869,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_loadNormTex" ); - } - -@@ -1107,7 +1107,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createNormTex" ); - } - -@@ -1116,7 +1116,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createNormTex" ); - } - -@@ -1127,7 +1127,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createNormTex" ); - } - -@@ -1143,7 +1143,7 @@ - if (FAILED(hr)) - { - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, -- "Unable to create AA render target: " + String(DXGetErrorDescription(hr)), -+ "Unable to create AA render target: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createNormTex"); - } - -@@ -1158,7 +1158,7 @@ - hr = textureResources->pBaseTex->SetAutoGenFilterType(_getBestFilterMethod(d3d9Device)); - if(FAILED(hr)) - { -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createNormTex" ); - } - } -@@ -1264,7 +1264,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createCubeTex" ); - } - -@@ -1273,7 +1273,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createCubeTex" ); - } - -@@ -1284,7 +1284,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createCubeTex" ); - } - -@@ -1300,7 +1300,7 @@ - if (FAILED(hr)) - { - OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, -- "Unable to create AA render target: " + String(DXGetErrorDescription(hr)), -+ "Unable to create AA render target: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createCubeTex"); - } - } -@@ -1314,7 +1314,7 @@ - hr = textureResources->pBaseTex->SetAutoGenFilterType(_getBestFilterMethod(d3d9Device)); - if(FAILED(hr)) - { -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createCubeTex" ); - } - } -@@ -1416,7 +1416,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createVolumeTex" ); - } - -@@ -1425,7 +1425,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createVolumeTex" ); - } - -@@ -1436,7 +1436,7 @@ - if (FAILED(hr)) - { - freeInternalResources(); -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createVolumeTex" ); - } - _setFinalAttributes(d3d9Device, textureResources, -@@ -1448,7 +1448,7 @@ - hr = textureResources->pBaseTex->SetAutoGenFilterType(_getBestFilterMethod(d3d9Device)); - if(FAILED(hr)) - { -- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription(hr)), -+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription9(hr)), - "D3D9Texture::_createCubeTex" ); - } - } -@@ -2104,7 +2104,7 @@ - if (FAILED(hr)) - { - OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, -- "Unable to copy AA buffer to final buffer: " + String(DXGetErrorDescription(hr)), -+ "Unable to copy AA buffer to final buffer: " + String(DXGetErrorDescription9(hr)), - "D3D9RenderTexture::swapBuffers"); - } - } + # look for D3D11 components + find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS ${DirectX11_INC_SEARCH_PATH}) +- find_library(DirectX11_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX}) ++ find_library(DirectX11_DXERR_LIBRARY NAMES DxErr dxerr9 HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX}) + find_library(DirectX11_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX}) + find_library(DirectX11_DXGI_LIBRARY NAMES dxgi HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX}) + find_library(DirectX11_D3DCOMPILER_LIBRARY NAMES d3dcompiler HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX}) diff --git a/mingw-w64-ogre3d-hg/005-mingw-w64-redeclarations.patch b/mingw-w64-ogre3d-hg/005-mingw-w64-redeclarations.patch index 815b915e2a..0ce30ad367 100644 --- a/mingw-w64-ogre3d-hg/005-mingw-w64-redeclarations.patch +++ b/mingw-w64-ogre3d-hg/005-mingw-w64-redeclarations.patch @@ -7,33 +7,32 @@ +#ifndef __MINGW64_VERSION_MAJOR void _fastcall __security_check_cookie(intptr_t i); +#endif - } + } #endif -@@ -60,7 +62,9 @@ - // in dynamic AND static builds +@@ -60,7 +60,9 @@ + // in dynamic AND static builds #ifdef __MINGW32__ _chkstk(); -- __security_check_cookie((intptr_t)NULL); +#ifndef __MINGW64_VERSION_MAJOR -+ __security_check_cookie((intptr_t)NULL); -+#endif + __security_check_cookie((intptr_t)NULL); ++#endif #endif - // Create the DirectX 9 rendering api + // Create the DirectX 9 rendering api --- ogre3d-1.9.0/OgreMain/src/WIN32/OgreMinGWSupport.cpp.orig 2013-12-20 19:30:47.000000000 +0400 +++ ogre3d-1.9.0/OgreMain/src/WIN32/OgreMinGWSupport.cpp 2013-12-21 20:48:37.613800000 +0400 -@@ -41,6 +41,7 @@ - //_alloca(); - } - +@@ -41,11 +41,13 @@ + //_alloca(); + } + +#ifndef __MINGW64_VERSION_MAJOR - // MSVC uses security cookies to prevent some buffer overflow attacks. - // provide dummy implementations. - intptr_t __security_cookie; -@@ -48,4 +49,5 @@ - void _fastcall __security_check_cookie(intptr_t i) - { - } + // MSVC uses security cookies to prevent some buffer overflow attacks. + // provide dummy implementations. + intptr_t __security_cookie; + + void _fastcall __security_check_cookie(intptr_t i) + { + } +#endif } diff --git a/mingw-w64-ogre3d-hg/010-missing-include.patch b/mingw-w64-ogre3d-hg/010-missing-include.patch new file mode 100644 index 0000000000..0c22b5d8ce --- /dev/null +++ b/mingw-w64-ogre3d-hg/010-missing-include.patch @@ -0,0 +1,23 @@ +--- ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Texture.h.orig 2015-02-17 10:17:20.838400000 +0300 ++++ ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Texture.h 2015-02-17 10:17:25.768000000 +0300 +@@ -31,6 +31,7 @@ + #include "OgreTexture.h" + #include "OgreRenderTexture.h" + #include "OgreSharedPtr.h" ++#include "OgreD3D11Device.h" + + #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined(_WIN32_WINNT_WIN8) + #ifndef USE_D3DX11_LIBRARY +--- ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Device.h.orig 2015-02-17 10:17:20.838400000 +0300 ++++ ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Device.h 2015-02-17 10:17:25.768000000 +0300 +@@ -30,6 +30,10 @@ + + + #include "OgreD3D11Prerequisites.h" ++#if (_WIN32_WINNT < 0x600) ++#define _WIN32_WINNT 0x600 ++#endif ++#include + + namespace Ogre + { diff --git a/mingw-w64-ogre3d-hg/011-fix-typo.patch b/mingw-w64-ogre3d-hg/011-fix-typo.patch new file mode 100644 index 0000000000..dd5d938b77 --- /dev/null +++ b/mingw-w64-ogre3d-hg/011-fix-typo.patch @@ -0,0 +1,19 @@ +--- ogre3d-2.0.0.r7490.07ad8061ec8d/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp.orig 2015-02-17 15:53:51.196000000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp 2015-02-17 15:54:12.427600000 +0300 +@@ -78,12 +78,12 @@ + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, +- /*_In_reads_opt_( FeatureLevels )*/ CONST D3D_FEATURE_LEVEL* pFeatureLevels, ++ const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, +- _Out_opt_ ID3D11DeviceN** ppDevice, +- _Out_opt_ D3D_FEATURE_LEVEL* pFeatureLevel, +- _Out_opt_ ID3D11DeviceContextN** ppImmediateContext ) ++ _Out_ ID3D11DeviceN** ppDevice, ++ _Out_ D3D_FEATURE_LEVEL* pFeatureLevel, ++ _Out_ ID3D11DeviceContextN** ppImmediateContext ) + { + #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 + return D3D11CreateDevice(pAdapter, DriverType, Software, Flags, pFeatureLevels, FeatureLevels, SDKVersion, ppDevice, pFeatureLevel, ppImmediateContext); diff --git a/mingw-w64-ogre3d-hg/012-add-link-library.patch b/mingw-w64-ogre3d-hg/012-add-link-library.patch new file mode 100644 index 0000000000..2460c32346 --- /dev/null +++ b/mingw-w64-ogre3d-hg/012-add-link-library.patch @@ -0,0 +1,12 @@ +--- ogre3d-2.0.0.r7490.07ad8061ec8d/RenderSystems/Direct3D11/CMakeLists.txt.orig 2015-02-17 17:14:01.858800000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/RenderSystems/Direct3D11/CMakeLists.txt 2015-02-17 17:14:34.821600000 +0300 +@@ -31,6 +31,9 @@ + if(OGRE_PROFILING AND DirectX9_FOUND) + target_link_libraries(RenderSystem_Direct3D11 ${DirectX9_LIBRARY}) + endif() ++if (MINGW) ++ target_link_libraries(RenderSystem_Direct3D11 psapi) ++endif () + + if(WINDOWS_STORE OR WINDOWS_PHONE) + set_target_properties(RenderSystem_Direct3D11 PROPERTIES VS_WINRT_COMPONENT "true") diff --git a/mingw-w64-ogre3d-hg/013-mingw-stringconverter.patch b/mingw-w64-ogre3d-hg/013-mingw-stringconverter.patch new file mode 100644 index 0000000000..bc888b2b9c --- /dev/null +++ b/mingw-w64-ogre3d-hg/013-mingw-stringconverter.patch @@ -0,0 +1,22 @@ +--- ogre3d-2.0.0.r7490.07ad8061ec8d/OgreMain/include/OgreStringConverter.h.orig 2015-02-18 00:20:40.288600000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/OgreMain/include/OgreStringConverter.h 2015-02-18 00:21:01.223800000 +0300 +@@ -107,7 +107,7 @@ + static String toString(size_t val, + unsigned short width = 0, char fill = ' ', + std::ios::fmtflags flags = std::ios::fmtflags(0)); +- #if OGRE_COMPILER == OGRE_COMPILER_MSVC ++ #if OGRE_COMPILER == OGRE_COMPILER_MSVC || defined(__MINGW32__) + /** Converts an unsigned long to a String. */ + static String toString(unsigned long val, + unsigned short width = 0, char fill = ' ', +--- ogre3d-2.0.0.r7490.07ad8061ec8d/OgreMain/src/OgreStringConverter.cpp.orig 2015-02-18 00:21:25.996600000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/OgreMain/src/OgreStringConverter.cpp 2015-02-18 00:21:36.479800000 +0300 +@@ -128,7 +128,7 @@ + stream << val; + return stream.str(); + } +-#if OGRE_COMPILER == OGRE_COMPILER_MSVC ++#if OGRE_COMPILER == OGRE_COMPILER_MSVC || defined(__MINGW32__) + //----------------------------------------------------------------------- + String StringConverter::toString(unsigned long val, + unsigned short width, char fill, std::ios::fmtflags flags) diff --git a/mingw-w64-ogre3d-hg/014-custom-install.patch b/mingw-w64-ogre3d-hg/014-custom-install.patch new file mode 100644 index 0000000000..2e3c05e846 --- /dev/null +++ b/mingw-w64-ogre3d-hg/014-custom-install.patch @@ -0,0 +1,128 @@ +--- ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/CMakeLists.txt.orig 2015-02-18 06:49:28.643600000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/CMakeLists.txt 2015-02-18 06:50:00.389600000 +0300 +@@ -13,7 +13,7 @@ + # directory, but can also be used for custom projects. + ############################################################# + +-if(WIN32 OR APPLE) ++if(MSVC OR APPLE) + set(OGRE_CMAKE_DIR "CMake") + else() + set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") +--- ogre3d-2.0.0.r7490.07ad8061ec8d/Docs/CMakeLists.txt.orig 2015-02-18 06:46:47.946600000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/Docs/CMakeLists.txt 2015-02-18 06:47:05.325000000 +0300 +@@ -13,9 +13,9 @@ + ############################################################### + + # Set docs target directory +-if (WIN32 OR APPLE) ++if (MSVC OR APPLE) + set(OGRE_DOCS_PATH "Docs") +-elseif (UNIX) ++elseif (UNIX OR MINGW) + set(OGRE_DOCS_PATH "share/OGRE/docs") + endif () + +--- ogre3d-2.0.0.r7490.07ad8061ec8d/Samples/CMakeLists.txt.orig 2015-02-18 06:44:38.858000000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/Samples/CMakeLists.txt 2015-02-18 06:45:31.445600000 +0300 +@@ -183,9 +183,9 @@ + + # Install sample sources + if (OGRE_INSTALL_SAMPLES_SOURCE) +- if (WIN32 OR APPLE) ++ if (MSVC OR APPLE) + set(OGRE_SAMPLES_DIR Samples) +- elseif (UNIX) ++ elseif (UNIX OR MINGW) + set(OGRE_SAMPLES_DIR share/OGRE/Samples) + endif () + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OGRE_SAMPLES_DIR} +--- ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/InstallResources.cmake.orig 2015-02-18 06:34:55.206800000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/InstallResources.cmake 2015-02-18 06:42:48.448400000 +0300 +@@ -12,22 +12,26 @@ + ################################################################## + + if (WIN32) +- set(OGRE_MEDIA_PATH "Media") ++ set(OGRE_MEDIA_PATH "share/OGRE/Media") + if (WINDOWS_STORE OR WINDOWS_PHONE) + set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}") + set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}") + set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}") + set(OGRE_TEST_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}") + else() +- set(OGRE_MEDIA_DIR_REL "../../${OGRE_MEDIA_PATH}") +- set(OGRE_MEDIA_DIR_DBG "../../${OGRE_MEDIA_PATH}") +- set(OGRE_TEST_MEDIA_DIR_REL "../../Tests/${OGRE_MEDIA_PATH}") +- set(OGRE_TEST_MEDIA_DIR_DBG "../../Tests/${OGRE_MEDIA_PATH}") ++ set(OGRE_MEDIA_DIR_REL "../${OGRE_MEDIA_PATH}") ++ set(OGRE_MEDIA_DIR_DBG "../${OGRE_MEDIA_PATH}") ++ set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}") ++ set(OGRE_TEST_MEDIA_DIR_DBG "../Tests/${OGRE_MEDIA_PATH}") + endif() + set(OGRE_PLUGIN_DIR_REL ".") + set(OGRE_PLUGIN_DIR_DBG ".") + set(OGRE_SAMPLES_DIR_REL ".") + set(OGRE_SAMPLES_DIR_DBG ".") ++ #set(OGRE_PLUGIN_DIR_REL "../lib/OGRE") ++ #set(OGRE_PLUGIN_DIR_DBG "../lib/OGRE") ++ #set(OGRE_SAMPLES_DIR_REL "../lib/OGRE/Samples") ++ #set(OGRE_SAMPLES_DIR_DBG "../lib/OGRE/Samples") + set(OGRE_CFG_INSTALL_PATH "bin") + elseif (APPLE) + set(OGRE_MEDIA_PATH "Media") +--- ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/ConfigureBuild.cmake.orig 2015-02-18 06:56:58.156600000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/ConfigureBuild.cmake 2015-02-18 06:58:52.333000000 +0300 +@@ -209,10 +209,14 @@ + + + # Create the pkg-config package files on Unix systems +-if (UNIX) ++if (UNIX OR MINGW) + set(OGRE_LIB_SUFFIX "") + set(OGRE_PLUGIN_PREFIX "") +- set(OGRE_PLUGIN_EXT ".so") ++ if (MINGW) ++ set(OGRE_PLUGIN_EXT ".dll") ++ else() ++ set(OGRE_PLUGIN_EXT ".so") ++ endif() + set(OGRE_PAGING_ADDITIONAL_PACKAGES "") + if (OGRE_STATIC) + set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}Static") +--- ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/Utils/OgreConfigTargets.cmake.orig 2015-02-18 07:07:53.761600000 +0300 ++++ ogre3d-2.0.0.r7490.07ad8061ec8d/CMake/Utils/OgreConfigTargets.cmake 2015-02-18 07:22:59.553800000 +0300 +@@ -41,7 +41,7 @@ + set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin) + endif () + +-if (WIN32) ++if (MSVC) + set(OGRE_RELEASE_PATH "/Release") + set(OGRE_RELWDBG_PATH "/RelWithDebInfo") + set(OGRE_MINSIZE_PATH "/MinSizeRel") +@@ -52,7 +52,7 @@ + set(OGRE_LIB_DEBUG_PATH "/Debug") + set(OGRE_PLUGIN_PATH "/opt") + set(OGRE_SAMPLE_PATH "/opt/samples") +-elseif (UNIX) ++elseif (UNIX OR MINGW) + set(OGRE_RELEASE_PATH "") + set(OGRE_RELWDBG_PATH "") + set(OGRE_MINSIZE_PATH "") +--- ogre3d-2.0.0.r7497.fe6459e817c4/Samples/Media/CMakeLists.txt.orig 2015-02-18 13:59:42.807600000 +0300 ++++ ogre3d-2.0.0.r7497.fe6459e817c4/Samples/Media/CMakeLists.txt 2015-02-18 13:59:57.800200000 +0300 +@@ -12,11 +12,11 @@ + ############################################################### + + # Set media target directory +-if (WIN32) ++if (MSVC) + set(OGRE_MEDIA_PATH "media") + elseif (APPLE) + set(OGRE_MEDIA_PATH "Media") +-elseif (UNIX) ++elseif (UNIX OR MINGW) + set(OGRE_MEDIA_PATH "share/OGRE/Media") + endif () + diff --git a/mingw-w64-ogre3d-hg/PKGBUILD b/mingw-w64-ogre3d-hg/PKGBUILD index 63ed1061c6..c03b2322dc 100644 --- a/mingw-w64-ogre3d-hg/PKGBUILD +++ b/mingw-w64-ogre3d-hg/PKGBUILD @@ -2,10 +2,10 @@ _realname=ogre3d pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-hg" -_rev=r6858.dd4dd5572adc -_base_ver=1.9.0 +_rev=r7529.1ea8087257eb +_base_ver=2.0.0 pkgver=${_base_ver}.${_rev} -pkgrel=2 +pkgrel=1 pkgdesc="A cross-platform 3D game engine (mingw-w64)" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") @@ -21,29 +21,37 @@ depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-hlsl2glsl" "${MINGW_PACKAGE_PREFIX}-intel-tbb" "${MINGW_PACKAGE_PREFIX}-nvidia-cg-toolkit" - "${MINGW_PACKAGE_PREFIX}-ois" + "${MINGW_PACKAGE_PREFIX}-ois-git" "${MINGW_PACKAGE_PREFIX}-tinyxml" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-zziplib" ) options=('staticlibs' '!strip') # '!buildflags' source=("${_realname}-${pkgver}.tar.xz"{,.sig} - 001-remove-march-from-cflags.patch 002-endlessworld-fix-cast.patch 003-freeimage-link-with-shared.patch 004-use-mingw-w64-directx.patch 005-mingw-w64-redeclarations.patch 006-cmake-wrong-command.patch - 007-fix-_WIN32-defines2.patch) -md5sums=('43ef5dcd7f157debc8a66994a221ab0d' + 007-fix-_WIN32-defines2.patch + 010-missing-include.patch + 011-fix-typo.patch + 012-add-link-library.patch + 013-mingw-stringconverter.patch + 014-custom-install.patch) +md5sums=('0e4932c50b16425514100ecbadd467d4' 'SKIP' - 'a2cbfc846906bbb80c7b05d2d60a2779' '3c00c5584a8edcb4dc07a57697a73d59' '166486655cd358be175f3b32b63e0ca5' - '07a29692ee7b30b90c8388af865078da' - '56477180dc083746de83ea2aae3efd90' + '51cf86561d243f3564758c6255b1b0a5' + '57ca4bf629fec2df4aeccb617ad187ac' '31dbe883b2d9d03e767e2e2e7365795e' - '9af326a7f9c7863e25ea265de4a2a223') + '9af326a7f9c7863e25ea265de4a2a223' + '2ada87678777366fa9cdcb5e7d12b650' + 'f7d17b37f835d20a4fd6262d77d9b00a' + '769784029b7059ef89da7ec0186da9cd' + 'abc014b040b651d762d519d7079f19b7' + '10768fba9873f2bfe923e9a7e416c964') # source PKGBUILD && mksource mksource() { @@ -52,7 +60,7 @@ mksource() { __hgroot='https://bitbucket.org/sinbad' __hgrepo='ogre' __hgbranch='default' - __hgrev="v1-9" + __hgrev="v2-0" hg clone -u ${__hgrev} "${__hgroot}/${__hgrepo}/" ${__hgrepo} #hg clone -b ${__hgbranch} "${__hgroot}${__hgrepo}#${__hgrev}" ${__hgrepo} @@ -79,13 +87,17 @@ mksource() { prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/001-remove-march-from-cflags.patch patch -p0 -i ${srcdir}/002-endlessworld-fix-cast.patch patch -p1 -i ${srcdir}/003-freeimage-link-with-shared.patch patch -p1 -i ${srcdir}/004-use-mingw-w64-directx.patch patch -p1 -i ${srcdir}/005-mingw-w64-redeclarations.patch patch -p1 -i ${srcdir}/006-cmake-wrong-command.patch patch -p1 -i ${srcdir}/007-fix-_WIN32-defines2.patch + patch -p1 -i ${srcdir}/010-missing-include.patch + patch -p1 -i ${srcdir}/011-fix-typo.patch + patch -p1 -i ${srcdir}/012-add-link-library.patch + patch -p1 -i ${srcdir}/013-mingw-stringconverter.patch + patch -p1 -i ${srcdir}/014-custom-install.patch } build() { @@ -99,7 +111,7 @@ build() { CFLAGS+=" -O3 -fno-devirtualize" CXXFLAGS+=" -O3 -fno-devirtualize" - export DXSDK_DIR=${PREFIX_DEPS}/${MINGW_CHOST} + export DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ @@ -109,9 +121,8 @@ build() { -DOGRE_COPY_DEPENDENCIES=OFF \ -DOGRE_INSTALL_DEPENDENCIES=OFF \ -DOGRE_BUILD_RENDERSYSTEM_D3D9=ON \ - -DOGRE_BUILD_RENDERSYSTEM_D3D11=OFF \ + -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON \ -DFREETYPE_FT2BUILD_INCLUDE_DIR=${MINGW_PREFIX}/include/freetype2 \ - -DDirectX9_DXERR_LIBRARY=${MINGW_PREFIX}/${MINGW_CHOST}/lib/libdxerr9.a \ "${extra_config[@]}" \ ../${_realname}-${pkgver} @@ -128,21 +139,5 @@ package() { fi cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 install #DESTDIR="$pkgdir" - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - - mv bin/${_buildtype}/* bin/ - rm -r bin/${_buildtype} - mv lib/${_buildtype}/* lib/ - rm -r lib/${_buildtype} - - sed -i "s|../../|../|g" \ - bin/plugins.cfg \ - bin/resources.cfg \ - bin/quakemap.cfg - - mkdir -p share/cmake-3.0/Modules - mv CMake/* share/cmake-3.0/Modules/ - rm -r CMake - popd > /dev/null + make -j1 install } diff --git a/mingw-w64-ogre3d-hg/fix-_WIN32-defines.patch b/mingw-w64-ogre3d-hg/fix-_WIN32-defines.patch deleted file mode 100644 index 8a0309c384..0000000000 --- a/mingw-w64-ogre3d-hg/fix-_WIN32-defines.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ogre3d-1.9.0.r6858.dd4dd5572adc/OgreMain/src/nedmalloc/malloc.c.h.orig 2014-11-16 22:18:12.340400000 +0300 -+++ ogre3d-1.9.0.r6858.dd4dd5572adc/OgreMain/src/nedmalloc/malloc.c.h 2014-11-16 22:34:15.010800000 +0300 -@@ -1330,7 +1330,7 @@ - - /* Declarations for locking */ - #if USE_LOCKS --#ifndef WIN32 -+#ifndef _WIN32 - #include - #if defined (__SVR4) && defined (__sun) /* solaris */ - #include -@@ -1351,7 +1351,7 @@ - #pragma intrinsic (_InterlockedExchange) - #define interlockedcompareexchange _InterlockedCompareExchange - #define interlockedexchange _InterlockedExchange --#endif /* Win32 */ -+#endif /* _WIN32 */ - // --- BEGIN OGRE MODIFICATION --- - // MinGW compatibility - #ifdef __MINGW32__ diff --git a/mingw-w64-ois-git/PKGBUILD b/mingw-w64-ois-git/PKGBUILD index 2eb2b09a59..3caa4c5796 100644 --- a/mingw-w64-ois-git/PKGBUILD +++ b/mingw-w64-ois-git/PKGBUILD @@ -3,7 +3,7 @@ _realname=ois pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" _base_ver=1.4.0 -pkgver=1.4.0.65.b3e596c +pkgver=1.4.0.68.af406d9 pkgrel=1 provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") @@ -19,7 +19,7 @@ source=("${_realname}"::"git+https://github.com/Alexpux/Object-oriented-Input-Sy md5sums=('SKIP') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "%s.%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } @@ -27,25 +27,27 @@ prepare() { cd ${srcdir}/${_realname} libtoolize --copy --force - aclocal $ACLOCAL_FLAGS + aclocal ${ACLOCAL_FLAGS} autoheader automake --include-deps --add-missing --foreign --copy autoconf } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - - ${srcdir}/${_realname}/configure \ + + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared=yes \ --enable-static=yes + make } package() { - cd ${srcdir}/build-${MINGW_CHOST} - make DESTDIR=${pkgdir} install + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-ois/PKGBUILD b/mingw-w64-ois/PKGBUILD index e0b298633a..7db6b5ffdb 100644 --- a/mingw-w64-ois/PKGBUILD +++ b/mingw-w64-ois/PKGBUILD @@ -1,7 +1,6 @@ # Maintainer: Alexey Pavlov _realname=ois - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3 _oisver=${pkgver/./-} @@ -45,16 +44,17 @@ prepare() { patch -Nbp1 < ${srcdir}/win32prereqs.patch libtoolize --copy --force - aclocal $ACLOCAL_FLAGS + aclocal ${ACLOCAL_FLAGS} autoheader automake --include-deps --add-missing --foreign --copy - autoconf + autoconf } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - - ${srcdir}/ois-v${_oisver}/configure \ + + ../ois-v${_oisver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -64,6 +64,6 @@ build() { } package() { - cd ${srcdir}/build-${MINGW_CHOST} - make DESTDIR=${pkgdir} install + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-oniguruma/PKGBUILD b/mingw-w64-oniguruma/PKGBUILD index 1400775105..3065122942 100644 --- a/mingw-w64-oniguruma/PKGBUILD +++ b/mingw-w64-oniguruma/PKGBUILD @@ -3,18 +3,17 @@ _realname=onig _fullname=oniguruma pkgname=("${MINGW_PACKAGE_PREFIX}-${_fullname}") -pkgver=5.9.5 -pkgrel=2 +pkgver=5.9.6 +pkgrel=1 pkgdesc="A regular expressions library (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('BSD') url="http://www.geocities.jp/kosako3/oniguruma" options=('staticlibs') source=("http://www.geocities.jp/kosako3/${_fullname}/archive/${_realname}-${pkgver}.tar.gz" 001-no-undefined.patch 002-autoconf.patch) -md5sums=('970f98a4cd10021b545d84e34c34aae4' +md5sums=('d08f10ea5c94919780e6b7bed1ef9830' 'f3e53db45e17dacc3c380751be2f2030' 'de6f42a1b58d18850dde64747925bf00') @@ -22,15 +21,19 @@ prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-no-undefined.patch patch -p1 -i ${srcdir}/002-autoconf.patch - + touch NEWS touch ChangeLog autoreconf -fi } build() { - cd ${srcdir}/${_realname}-${pkgver} - ./configure --prefix=${MINGW_PREFIX} \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -41,6 +44,6 @@ build() { } package() { - cd ${srcdir}/${_realname}-${pkgver} + cd ${srcdir}/build-${MINGW_CHOST} make install DESTDIR="${pkgdir}" } diff --git a/mingw-w64-openal/0001-versioned-w32-dll.mingw.patch b/mingw-w64-openal/0001-versioned-w32-dll.mingw.patch new file mode 100644 index 0000000000..3087b1f52c --- /dev/null +++ b/mingw-w64-openal/0001-versioned-w32-dll.mingw.patch @@ -0,0 +1,14 @@ +--- openal-soft-1.16.0/CMakeLists.txt.orig 2015-01-18 13:05:08.929760500 +0000 ++++ openal-soft-1.16.0/CMakeLists.txt 2015-01-18 13:07:41.788171100 +0000 +@@ -1066,7 +1066,10 @@ + SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION} + SOVERSION ${LIB_MAJOR_VERSION}) + IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC") +- SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES PREFIX "") ++ SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES ++ OUTPUT_NAME openal ++ RUNTIME_OUTPUT_NAME openal-${LIB_MAJOR_VERSION} ++ ARCHIVE_OUTPUT_NAME openal) + + IF(MINGW AND ALSOFT_BUILD_IMPORT_LIB) + FIND_PROGRAM(SED_EXECUTABLE NAMES sed DOC "sed executable") diff --git a/mingw-w64-openal/0002-w32ize-fluidsynth-loading.mingw.patch b/mingw-w64-openal/0002-w32ize-fluidsynth-loading.mingw.patch new file mode 100644 index 0000000000..bc1f57121e --- /dev/null +++ b/mingw-w64-openal/0002-w32ize-fluidsynth-loading.mingw.patch @@ -0,0 +1,11 @@ +--- openal-soft-1.16.0/Alc/midi/fluidsynth.c.orig 2014-08-15 07:06:59.000000000 +0000 ++++ openal-soft-1.16.0/Alc/midi/fluidsynth.c 2015-01-18 13:14:18.962605800 +0000 +@@ -96,7 +96,7 @@ + ALboolean ret = AL_TRUE; + if(!fsynth_handle) + { +- fsynth_handle = LoadLib("libfluidsynth.so.1"); ++ fsynth_handle = LoadLib("libfluidsynth-1.dll"); + if(!fsynth_handle) return AL_FALSE; + + #define LOAD_FUNC(x) do { \ diff --git a/mingw-w64-openal/0003-openal-not-32.mingw.patch b/mingw-w64-openal/0003-openal-not-32.mingw.patch new file mode 100644 index 0000000000..6f4271cfdd --- /dev/null +++ b/mingw-w64-openal/0003-openal-not-32.mingw.patch @@ -0,0 +1,11 @@ +--- openal-soft-1.16.0/CMakeLists.txt.orig 2015-01-18 20:37:01.724148200 +0000 ++++ openal-soft-1.16.0/CMakeLists.txt 2015-01-18 20:38:05.120698500 +0000 +@@ -40,7 +40,7 @@ + + + IF(WIN32) +- SET(LIBNAME OpenAL32) ++ SET(LIBNAME openal) + ADD_DEFINITIONS("-D_WIN32 -D_WIN32_WINNT=0x0502") + + # This option is mainly for static linking OpenAL Soft into another project diff --git a/mingw-w64-openal/0004-disable-OSS-windows.patch b/mingw-w64-openal/0004-disable-OSS-windows.patch new file mode 100644 index 0000000000..9c96890e22 --- /dev/null +++ b/mingw-w64-openal/0004-disable-OSS-windows.patch @@ -0,0 +1,18 @@ +--- openal-soft-1.16.0/CMakeLists.txt.orig 2015-11-03 09:47:33.546783000 +0300 ++++ openal-soft-1.16.0/CMakeLists.txt 2015-11-03 09:48:28.685268600 +0300 +@@ -758,6 +758,7 @@ + + # Check OSS backend + OPTION(ALSOFT_REQUIRE_OSS "Require OSS backend" OFF) ++IF(NOT WIN32) + FIND_PACKAGE(OSS) + IF(OSS_FOUND) + OPTION(ALSOFT_BACKEND_OSS "Enable OSS backend" ON) +@@ -773,6 +774,7 @@ + IF(ALSOFT_REQUIRE_OSS AND NOT HAVE_OSS) + MESSAGE(FATAL_ERROR "Failed to enabled required OSS backend") + ENDIF() ++ENDIF() + + # Check Solaris backend + OPTION(ALSOFT_REQUIRE_SOLARIS "Require Solaris backend" OFF) diff --git a/mingw-w64-openal/PKGBUILD b/mingw-w64-openal/PKGBUILD index 6df2a7e926..59d11d344c 100644 --- a/mingw-w64-openal/PKGBUILD +++ b/mingw-w64-openal/PKGBUILD @@ -1,39 +1,70 @@ # Maintainer: Alexey Pavlov _realname=openal - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.16.0 -pkgrel=1 +pkgrel=4 pkgdesc="OpenAL audio library for use with opengl (mingw-w64)" arch=('any') -url="http://connect.creativelabs.com/openal/" +url="http://kcat.strangesoft.net/openal.html" license=('GPL2') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-portaudio") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-fluidsynth" + "${MINGW_PACKAGE_PREFIX}-portaudio") options=('strip' 'staticlibs') -source=(http://kcat.strangesoft.net/openal-releases/openal-soft-$pkgver.tar.bz2) -md5sums=('14db4b0d12f07252070b4fe5eb5911f6') +source=(http://kcat.strangesoft.net/openal-releases/openal-soft-${pkgver}.tar.bz2 + 0001-versioned-w32-dll.mingw.patch + 0002-w32ize-fluidsynth-loading.mingw.patch + 0003-openal-not-32.mingw.patch + 0004-disable-OSS-windows.patch) +md5sums=('14db4b0d12f07252070b4fe5eb5911f6' + 'dbca6b0d267c4ac05af1971199707574' + '97f1a24464157afa4cdbccf2da68fb31' + 'de53fb57938402929fad165ab896efe1' + 'f7cdafe8ff057ce15096941b6dafa927') + +prepare() { + cd openal-soft-${pkgver} + patch -p1 -i ${srcdir}/0001-versioned-w32-dll.mingw.patch + patch -p1 -i ${srcdir}/0002-w32ize-fluidsynth-loading.mingw.patch + patch -p1 -i ${srcdir}/0003-openal-not-32.mingw.patch + patch -p1 -i ${srcdir}/0004-disable-OSS-windows.patch +} build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + export DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} + mkdir -p "${srcdir}/build-shared-${MINGW_CHOST}" && cd "${srcdir}/build-shared-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DEXAMPLES=OFF \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DALSOFT_EXAMPLES=OFF \ + -DLIBTYPE=SHARED \ + -DDSOUND_INCLUDE_DIR=${MINGW_PREFIX}/${MINGW_CHOST}/include \ + -DDSOUND_LIBRARY=${MINGW_PREFIX}/${MINGW_CHOST}/lib/libdsound.a \ + ../openal-soft-${pkgver} + make + + mkdir -p "${srcdir}/build-static-${MINGW_CHOST}" && cd "${srcdir}/build-static-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DALSOFT_EXAMPLES=OFF \ + -DLIBTYPE=STATIC \ + -DDSOUND_INCLUDE_DIR=${MINGW_PREFIX}/${MINGW_CHOST}/include \ + -DDSOUND_LIBRARY=${MINGW_PREFIX}/${MINGW_CHOST}/lib/libdsound.a \ ../openal-soft-${pkgver} make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/openal.pc + cd "${srcdir}/build-static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + cd "${srcdir}/build-shared-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-openblas/PKGBUILD b/mingw-w64-openblas/PKGBUILD index e1fdc7ee1d..ae6665f61a 100644 --- a/mingw-w64-openblas/PKGBUILD +++ b/mingw-w64-openblas/PKGBUILD @@ -3,13 +3,12 @@ _realname=OpenBLAS pkgname="${MINGW_PACKAGE_PREFIX}-openblas" -pkgver=0.2.11 +pkgver=0.2.14 pkgrel=2 -pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD, providing optimized blas, lapack, and cblas. (mingw-w64)" +pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD, providing optimized blas, lapack, and cblas (mingw-w64)" arch=('any') url="http://xianyi.github.com/OpenBLAS/" license=('BSD') -groups=("${MINGW_PACKAGE_PREFIX}") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-openblas-git") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}" @@ -17,19 +16,19 @@ replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran" "${MINGW_PACKAGE_PREFIX}-libwinpthread") -makedepends=("perl" +makedepends=("perl" "${MINGW_PACKAGE_PREFIX}-gcc-fortran") options=('!buildflags' '!makeflags' 'strip' 'staticlibs') -source=(${_realname}-v${pkgver}.tar.gz::http://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz) +source=(${_realname}-${pkgver}.tar.gz::http://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz) install=(${_realname}.install) -md5sums=('c456f3c5e84c3ab69ef89b22e616627a') +md5sums=('53cda7f420e1ba0ea55de536b24c9701') build() { - cd "$srcdir/$_realname-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" unset CFLAGS unset CXXFLAGS - + make LIBNAME=libopenblasp.a NO_LAPACK=0 DYNAMIC_ARCH=1 USE_THREAD=1 \ MAJOR_VERSION=3 NO_AFFINITY=1 CC=gcc FC=gfortran \ OPENBLAS_INCLUDE_DIR=${MINGW_PREFIX}/include/${_realname} \ @@ -37,8 +36,8 @@ build() { } package() { - cd "$srcdir/$_realname-$pkgver" - + cd "${srcdir}/${_realname}-${pkgver}" + if [ -f libopenblas.dll ]; then if [ -f exports/libopenblas.def ]; then dlltool -D libopenblas.dll -d exports/libopenblas.def -l libopenblas.dll.a @@ -59,14 +58,14 @@ package() { install if [ -f libopenblas.dll ]; then - cp -f libopenblas.dll "${pkgdir}$MINGW_PREFIX/bin/" + cp -f libopenblas.dll "${pkgdir}${MINGW_PREFIX}/bin/" else echo "DLL not found" >&2 exit 1 fi if [ -f libopenblas.dll.a ]; then - cp -f libopenblas.dll.a "${pkgdir}$MINGW_PREFIX/lib/" + cp -f libopenblas.dll.a "${pkgdir}${MINGW_PREFIX}/lib/" else echo "Export library not found" >&2 exit 1 @@ -75,16 +74,16 @@ package() { if [ -f libopenblasp.a ]; then rm -f "${pkgdir}$MINGW_PREFIX/lib/libopenblasp.a" rm -f "${pkgdir}$MINGW_PREFIX/lib/libopenblas.a" - cp -f libopenblasp.a "${pkgdir}$MINGW_PREFIX/lib/libopenblas.a" + cp -f libopenblasp.a "${pkgdir}${MINGW_PREFIX}/lib/libopenblas.a" else echo "Static library not found" >&2 exit 1 fi # Copy Licencse - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -f ${srcdir}/${_realname}-$pkgver/LICENSE \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -f ${srcdir}/${_realname}-$pkgver/lapack-netlib/LICENSE \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/LICENSE-lapack + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} + cp -f ${srcdir}/${_realname}-${pkgver}/LICENSE \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} + cp -f ${srcdir}/${_realname}-${pkgver}/lapack-netlib/LICENSE \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-lapack } diff --git a/mingw-w64-opencl-headers/PKGBUILD b/mingw-w64-opencl-headers/PKGBUILD index 11a2b75ce7..8e635831a6 100644 --- a/mingw-w64-opencl-headers/PKGBUILD +++ b/mingw-w64-opencl-headers/PKGBUILD @@ -5,7 +5,7 @@ _mingw_suff=mingw-w64-${CARCH} pkgname="${_mingw_suff}-${_realname}" _clbasever=2.0 pkgver=${_clbasever}.0 -pkgrel=1 +pkgrel=2 pkgdesc="OpenCL (Open Computing Language) header files (mingw-w64)" arch=('any') url="http://www.khronos.org/registry/cl/" @@ -21,8 +21,9 @@ _headers=("http://www.khronos.org/registry/cl/api/${_clbasever}/opencl.h" "http://www.khronos.org/registry/cl/api/${_clbasever}/cl_dx9_media_sharing.h" "http://www.khronos.org/registry/cl/api/${_clbasever}/cl_d3d10.h" "http://www.khronos.org/registry/cl/api/${_clbasever}/cl_d3d11.h" - "http://www.khronos.org/registry/cl/api/${_clbasever}/cl_gl.h") -md5sums=('87f2794a10f1489c17457201992e07ba' + "http://www.khronos.org/registry/cl/api/${_clbasever}/cl_gl.h" + "http://www.khronos.org/registry/cl/api/${_clbasever}/cl_gl_ext.h") +md5sums=('a50062f2ca7b977ffa526b0598f5b7aa' '8e59f0e0f64326e826007b49700fba76') # source PKGBUILD && mksource diff --git a/mingw-w64-opencl-headers/opencl-headers-2.0.0.src.tar.xz b/mingw-w64-opencl-headers/opencl-headers-2.0.0.src.tar.xz index 1eb170c723..3488286156 100644 Binary files a/mingw-w64-opencl-headers/opencl-headers-2.0.0.src.tar.xz and b/mingw-w64-opencl-headers/opencl-headers-2.0.0.src.tar.xz differ diff --git a/mingw-w64-opencollada-git/PKGBUILD b/mingw-w64-opencollada-git/PKGBUILD index 4f16606de3..2590da355a 100644 --- a/mingw-w64-opencollada-git/PKGBUILD +++ b/mingw-w64-opencollada-git/PKGBUILD @@ -2,7 +2,7 @@ _realname=opencollada pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r1027.729147d +pkgver=r1184.0496c15 pkgrel=1 pkgdesc="Stream based reader and writer library for COLLADA files (mingw-w64)" arch=('any') @@ -22,7 +22,7 @@ md5sums=('SKIP' '11ff58142f0feb1dca80f004615a01ca') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } @@ -33,11 +33,14 @@ prepare() { } build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} mkdir -p "${srcdir}"/build-${MINGW_CHOST} cd "${srcdir}"/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ ../${_realname} make @@ -45,5 +48,9 @@ build() { package() { cd "${srcdir}"/build-${MINGW_CHOST} - make -j1 install + make DESTDIR=${pkgdir} install + + # replace absolute paths in .cmake scripts + sed -i '1i get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)' "${pkgdir}${MINGW_PREFIX}/lib/${_realname}/cmake"/*Targets*.cmake + sed -i "s;$(cygpath -ma "${pkgdir}${MINGW_PREFIX}");\${PACKAGE_PREFIX_DIR};" "${pkgdir}${MINGW_PREFIX}/lib/${_realname}/cmake"/*Targets*.cmake } diff --git a/mingw-w64-opencolorio/PKGBUILD b/mingw-w64-opencolorio-git/PKGBUILD similarity index 72% rename from mingw-w64-opencolorio/PKGBUILD rename to mingw-w64-opencolorio-git/PKGBUILD index 029e93b288..90cd0d6538 100644 --- a/mingw-w64-opencolorio/PKGBUILD +++ b/mingw-w64-opencolorio-git/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=opencolorio +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" pkgver=701.a557a85 -pkgrel=1 +pkgrel=3 pkgdesc="A color management framework for visual effects and animation (mingw-w64)" arch=('any') url="http://opencolorio.org" @@ -11,16 +12,17 @@ license=('BSD') provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-tinyxml") + "${MINGW_PACKAGE_PREFIX}-glew" + "${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-tinyxml") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-yaml-cpp" - "${MINGW_PACKAGE_PREFIX}-pkg-config") + "${MINGW_PACKAGE_PREFIX}-yaml-cpp" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") options=('strip') source=("${_realname}"::"git+https://github.com/imageworks/OpenColorIO.git" - #http://github.com/imageworks/OpenColorIO/tarball/v$pkgver + #${_realname}-${pkgver}.tar.gz::http://github.com/imageworks/OpenColorIO/tarball/v${pkgver}.tar.gz mingw-w64.patch fix-redefinitions.patch detect-mingw-python.patch) @@ -30,24 +32,26 @@ sha1sums=('SKIP' 'ff94a1cbfc4935d4f04e5225d078158d5bcaedcc') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd $_realname + cd ${_realname} patch -p1 -i ${srcdir}/mingw-w64.patch patch -p1 -i ${srcdir}/fix-redefinitions.patch patch -p1 -i ${srcdir}/detect-mingw-python.patch } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DGLEW_INCLUDES=${MINGW_PREFIX}/include \ -DGLEW_LIBRARIES=${MINGW_PREFIX}/lib/libglew32.dll.a \ -DUSE_EXTERNAL_TINYXML=ON \ @@ -60,19 +64,15 @@ build() { -DOCIO_BUILD_TRUELIGHT=OFF \ ../$_realname - make + make } package() { cd build-${MINGW_CHOST} - make install + make DESTDIR=${pkgdir} install install -Dm644 ${srcdir}/${_realname}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE cd ${pkgdir}${MINGW_PREFIX} - export PREFIX_WIN=`pwd -W` mkdir -p bin mv lib/*.dll bin/ - for ff in lib/pkgconfig/*.pc; do - sed -i "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" $ff - done } diff --git a/mingw-w64-opencolorio/detect-mingw-python.patch b/mingw-w64-opencolorio-git/detect-mingw-python.patch similarity index 100% rename from mingw-w64-opencolorio/detect-mingw-python.patch rename to mingw-w64-opencolorio-git/detect-mingw-python.patch diff --git a/mingw-w64-opencolorio/fix-redefinitions.patch b/mingw-w64-opencolorio-git/fix-redefinitions.patch similarity index 100% rename from mingw-w64-opencolorio/fix-redefinitions.patch rename to mingw-w64-opencolorio-git/fix-redefinitions.patch diff --git a/mingw-w64-opencolorio/mingw-w64.patch b/mingw-w64-opencolorio-git/mingw-w64.patch similarity index 100% rename from mingw-w64-opencolorio/mingw-w64.patch rename to mingw-w64-opencolorio-git/mingw-w64.patch diff --git a/mingw-w64-opencore-amr/PKGBUILD b/mingw-w64-opencore-amr/PKGBUILD index 869507c057..b14c77d888 100644 --- a/mingw-w64-opencore-amr/PKGBUILD +++ b/mingw-w64-opencore-amr/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=opencore-amr - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.1.3 -pkgrel=2 +pkgrel=3 pkgdesc="Open source implementation of the Adaptive Multi Rate (AMR) speech codec (mingw-w64)" arch=('any') url="http://opencore-amr.sourceforge.net/" @@ -19,6 +18,7 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -26,7 +26,8 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --disable-static + --enable-shared \ + --enable-static make } diff --git a/mingw-w64-opencsg/01-makefile-mingw.patch b/mingw-w64-opencsg/01-makefile-mingw.patch new file mode 100644 index 0000000000..08c5a0eead --- /dev/null +++ b/mingw-w64-opencsg/01-makefile-mingw.patch @@ -0,0 +1,171 @@ +--- x86_64-w64-mingw32/src/Makefile.orig 2014-12-16 01:25:46.470600000 +0300 ++++ x86_64-w64-mingw32/src/Makefile 2014-12-16 06:59:47.119800000 +0300 +@@ -3,7 +3,7 @@ + # Generated by qmake (2.01a) (Qt 4.8.6) on: Mo. Sep 15 22:00:30 2014 + # Project: src.pro + # Template: lib +-# Command: /usr/lib/x86_64-linux-gnu/qt4/bin/qmake -o Makefile src.pro ++# Command: qmake -o Makefile src.pro + ############################################################################# + + ####### Compiler, tools and options +@@ -11,15 +11,15 @@ + CC = gcc + CXX = g++ + DEFINES = +-CFLAGS = -pipe -O2 -Wall -W -fPIC $(DEFINES) +-CXXFLAGS = -pipe -O2 -Wall -W -fPIC $(DEFINES) +-INCPATH = -I. -I../include -I.. -I/usr/X11R6/include ++CFLAGS = -pipe -O2 -Wall -W $(DEFINES) ++CXXFLAGS = -pipe -O2 -Wall -W $(DEFINES) ++INCPATH = -I. -I../include -I.. + LINK = g++ +-LFLAGS = -Wl,-O1 -shared -Wl,-soname,libopencsg.so.1 +-LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 -lGLEW -lGL ++LFLAGS = -Wl,-O1 -shared -Wl,--out-implib,../lib/$(TARGETI) ++LIBS = $(SUBLIBS) -lglu32 -lopengl32 -lgdi32 -luser32 -lglew32 + AR = ar cqs + RANLIB = +-QMAKE = /usr/lib/x86_64-linux-gnu/qt4/bin/qmake ++QMAKE = qmake + TAR = tar -cf + COMPRESS = gzip -9f + COPY = cp -f +@@ -37,6 +37,12 @@ + CHK_DIR_EXISTS= test -d + MKDIR = mkdir -p + ++####### Install directories ++ ++prefix ?= /usr/local/ ++bindir = $(prefix)/bin ++includedir = $(prefix)/include ++libdir = $(prefix)/lib + ####### Output directory + + OBJECTS_DIR = ./ +@@ -82,12 +88,9 @@ + DIST = src.pro + QMAKE_TARGET = opencsg + DESTDIR = ../lib/ +-TARGET = libopencsg.so.1.4.0 +-TARGETA = ../lib/libopencsg.a +-TARGETD = libopencsg.so.1.4.0 +-TARGET0 = libopencsg.so +-TARGET1 = libopencsg.so.1 +-TARGET2 = libopencsg.so.1.4 ++TARGET = libopencsg-1.dll ++TARGETA = libopencsg.a ++TARGETI = libopencsg.dll.a + + first: all + ####### Implicit rules +@@ -111,28 +114,29 @@ + + ####### Build rules + +-all: Makefile ../lib/$(TARGET) ++all: shared staticlib ++ ++shared: ../lib/$(TARGET) + + ../lib/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) + @$(CHK_DIR_EXISTS) ../lib/ || $(MKDIR) ../lib/ +- -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) ++ @$(CHK_DIR_EXISTS) ../bin/ || $(MKDIR) ../bin/ ++ -$(DEL_FILE) ../bin/$(TARGET) ++ -$(DEL_FILE) ../lib/$(TARGETI) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) +- -ln -s $(TARGET) $(TARGET0) +- -ln -s $(TARGET) $(TARGET1) +- -ln -s $(TARGET) $(TARGET2) +- -$(DEL_FILE) ../lib/$(TARGET) +- -$(DEL_FILE) ../lib/$(TARGET0) +- -$(DEL_FILE) ../lib/$(TARGET1) +- -$(DEL_FILE) ../lib/$(TARGET2) +- -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) ../lib/ ++ -$(DEL_FILE) ../bin/$(TARGET) ++ -$(MOVE) $(TARGET) ../bin/ + + ++staticlib: ../lib/$(TARGETA) + +-staticlib: $(TARGETA) +- +-$(TARGETA): $(OBJECTS) $(OBJCOMP) ++../lib/$(TARGETA): $(OBJECTS) $(OBJCOMP) ++ @$(CHK_DIR_EXISTS) ../lib/ || $(MKDIR) ../lib/ ++ -$(DEL_FILE) ../lib/$(TARGETA) + -$(DEL_FILE) $(TARGETA) + $(AR) $(TARGETA) $(OBJECTS) ++ -$(DEL_FILE) ../lib/$(TARGETA) ++ -$(MOVE) $(TARGETA) ../lib/ + + dist: + @$(CHK_DIR_EXISTS) .tmp/opencsg1.4.0 || $(MKDIR) .tmp/opencsg1.4.0 +@@ -147,8 +152,8 @@ + ####### Sub-libraries + + distclean: clean +- -$(DEL_FILE) ../lib/$(TARGET) +- -$(DEL_FILE) ../lib/$(TARGET0) ../lib/$(TARGET1) ../lib/$(TARGET2) $(TARGETA) ++ -$(DEL_FILE) ../bin/$(TARGET) ++ -$(DEL_FILE) ../lib/$(TARGETI) ../lib/$(TARGETA) + -$(DEL_FILE) Makefile + + +@@ -285,34 +290,38 @@ + ####### Install + + install_target: first FORCE +- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/lib/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/lib/ +- -$(INSTALL_PROGRAM) "../lib/$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET)" +- -$(STRIP) --strip-unneeded "$(INSTALL_ROOT)/usr/local/lib/$(TARGET)" +- -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET0)" +- -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET1)" +- -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET2)" ++ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(libdir) || $(MKDIR) $(INSTALL_ROOT)$(libdir) ++ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(bindir) || $(MKDIR) $(INSTALL_ROOT)$(bindir) ++ -$(INSTALL_PROGRAM) "../bin/$(TARGET)" "$(INSTALL_ROOT)$(bindir)/$(TARGET)" ++ -$(INSTALL_PROGRAM) "../lib/$(TARGETA)" "$(INSTALL_ROOT)$(libdir)/$(TARGETA)" ++ -$(INSTALL_PROGRAM) "../lib/$(TARGETI)" "$(INSTALL_ROOT)$(libdir)/$(TARGETI)" ++ -$(STRIP) --strip-unneeded "$(INSTALL_ROOT)$(bindir)/$(TARGET)" ++ ++install_static: first FORCE ++ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(libdir) || $(MKDIR) $(INSTALL_ROOT)$(libdir) ++ -$(INSTALL_PROGRAM) "../lib/$(TARGETA)" "$(INSTALL_ROOT)$(libdir)/$(TARGETA)" + + uninstall_target: FORCE +- -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET)" +- -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET0)" +- -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET1)" +- -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET2)" +- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/lib/ ++ -$(DEL_FILE) "$(INSTALL_ROOT)$(bindir)/$(TARGET)" ++ -$(DEL_FILE) "$(INSTALL_ROOT)$(bindir)/$(TARGETI)" ++ -$(DEL_DIR) $(INSTALL_ROOT)$(bindir)/ + ++uninstall_static: FORCE ++ -$(DEL_FILE) "$(INSTALL_ROOT)$(bindir)/$(TARGETA)" + + install_headers: first FORCE +- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/include/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/include/ +- -$(INSTALL_FILE) ../include/opencsg.h $(INSTALL_ROOT)/usr/local/include/ ++ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(includedir)/ || $(MKDIR) $(INSTALL_ROOT)$(includedir)/ ++ -$(INSTALL_FILE) ../include/opencsg.h $(INSTALL_ROOT)$(includedir)/ + + + uninstall_headers: FORCE +- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/include/opencsg.h ++ -$(DEL_FILE) -r $(INSTALL_ROOT)$(includedir)/opencsg.h + -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/include/ + + +-install: install_target install_headers FORCE ++install: install_target install_static install_headers FORCE + +-uninstall: uninstall_target uninstall_headers FORCE ++uninstall: uninstall_target uninstall_static uninstall_headers FORCE + + FORCE: + diff --git a/mingw-w64-opencsg/02-qmake-mingw.patch b/mingw-w64-opencsg/02-qmake-mingw.patch new file mode 100644 index 0000000000..123fd0e2bf --- /dev/null +++ b/mingw-w64-opencsg/02-qmake-mingw.patch @@ -0,0 +1,49 @@ +--- x86_64-w64-mingw32/src/src.pro.orig 2014-12-16 07:06:13.178400000 +0300 ++++ x86_64-w64-mingw32/src/src.pro 2014-12-16 07:07:03.301200000 +0300 +@@ -5,13 +5,18 @@ + CONFIG += opengl warn_on release + INCLUDEPATH += ../include ../ + CONFIG -= qt +-LIBS += -lGLEW ++win32 { ++ LIBS += -lglew32 ++} ++else { ++ LIBS += -lGLEW ++} + + DESTDIR = ../lib + INSTALLDIR = /usr/local + headers.files = ../include/opencsg.h + headers.path = $$INSTALLDIR/include +-target.path = /usr/local/lib ++target.path = $$INSTALLDIR/lib + INSTALLS += target headers + + HEADERS = ../include/opencsg.h \ +--- x86_64-w64-mingw32/example/example.pro.orig 2014-12-16 07:03:05.367000000 +0300 ++++ x86_64-w64-mingw32/example/example.pro 2014-12-16 07:05:29.422400000 +0300 +@@ -4,7 +4,12 @@ + CONFIG += opengl warn_on release + CONFIG -= qt + INCLUDEPATH += ../include +-LIBS += -L../lib -lopencsg -lGLEW ++win32 { ++ LIBS += -L../lib -lopencsg -lglew32 ++} ++else { ++ LIBS += -L../lib -lopencsg -lGLEW ++} + + INSTALLDIR = /usr/local + INSTALLS += target +@@ -14,6 +19,9 @@ + INCLUDEPATH += /opt/local/include + LIBS += -framework GLUT -L/opt/local/lib + } ++win32 { ++ LIBS += -lfreeglut ++} + else { + LIBS += -lGLU -lglut + } diff --git a/mingw-w64-opencsg/PKGBUILD b/mingw-w64-opencsg/PKGBUILD new file mode 100644 index 0000000000..24c018e4eb --- /dev/null +++ b/mingw-w64-opencsg/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Alexey Pavlov + +_realname=opencsg +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.4.0 +pkgrel=2 +pkgdesc="Library for image-based CSG rendering using OpenGL (mingw-w64)" +arch=('any') +license=("GPL2") +url="http://www.opencsg.org" +depends=("${MINGW_PACKAGE_PREFIX}-glew" + # "${MINGW_PACKAGE_PREFIX}-freeglut" # need for building example + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=(!strip staticlibs !buildflags) +source=("http://www.opencsg.org/OpenCSG-${pkgver}.tar.gz" + 01-makefile-mingw.patch + 02-qmake-mingw.patch) +md5sums=('e7fe5fa2bfa1b466f470699da41eb0a2' + '02ec2405b99d22dd1c417de085615b08' + 'f4cc246fc0c25c59ff6067018de06f34') + +prepare() { + cd "${srcdir}/OpenCSG-${pkgver}" + patch -p1 -i ${srcdir}/01-makefile-mingw.patch + patch -p1 -i ${srcdir}/02-qmake-mingw.patch +} + +build() { + mv "${srcdir}/OpenCSG-${pkgver}" "${srcdir}/${MINGW_CHOST}" + cd "${srcdir}/${MINGW_CHOST}" + #rm -f example/Makefile src/Makefile + #${MINGW_PREFIX}/bin/qmake -recursive opencsg.pro + #make + + cd "${srcdir}/${MINGW_CHOST}/src" + make all staticlib +} + +package() { + cd "${srcdir}/${MINGW_CHOST}/src" + + make prefix=${MINGW_PREFIX} INSTALL_ROOT=${pkgdir} install + #install -D lib/libopencsg.so.$pkgver "${pkgdir}${MINGW_PREFIX}/lib/libopencsg.so.$pkgver" + #install -D include/opencsg.h "${pkgdir}${MINGW_PREFIX}/include/opencsg.h" +} diff --git a/mingw-w64-opencv/PKGBUILD b/mingw-w64-opencv/PKGBUILD index e101f0bbed..e1334b9b7d 100644 --- a/mingw-w64-opencv/PKGBUILD +++ b/mingw-w64-opencv/PKGBUILD @@ -1,54 +1,62 @@ # Maintainer: Alexey Pavlov _realname=opencv +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.4.10 -pkgrel=2 +pkgver=3.0.0 +pkgrel=3 pkgdesc="Open Source Computer Vision Library (mingw-w64)" arch=('any') url="http://opencv.org/" depends=(#"${MINGW_PACKAGE_PREFIX}-gst-plugins-base0.10" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-intel-tbb" - "${MINGW_PACKAGE_PREFIX}-zlib" - #"${MINGW_PACKAGE_PREFIX}-qt5" - #"${MINGW_PACKAGE_PREFIX}-gtkglext" - #"${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-intel-tbb" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-zlib" + #"${MINGW_PACKAGE_PREFIX}-qt5" + #"${MINGW_PACKAGE_PREFIX}-gtkglext" + #"${MINGW_PACKAGE_PREFIX}-gtk2" ) makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - #"${MINGW_PACKAGE_PREFIX}-qt5" - "${MINGW_PACKAGE_PREFIX}-eigen3" - "${MINGW_PACKAGE_PREFIX}-ffmpeg" - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-vtk" + #"${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-eigen3" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-vtk" ) optdepends=("${MINGW_PACKAGE_PREFIX}-eigen3" "${MINGW_PACKAGE_PREFIX}-ffmpeg: support to read and write video files" "${MINGW_PACKAGE_PREFIX}-python2-numpy: Python 2.x interface" + "${MINGW_PACKAGE_PREFIX}-python3-numpy: Python 3.x interface" "${MINGW_PACKAGE_PREFIX}-vtk: opencv_viz module") -source=(#"http://downloads.sourceforge.net/opencvlibrary/${_realname}-$pkgver.zip" - https://github.com/Itseez/opencv/archive/$pkgver.tar.gz +source=("${_realname}-${pkgver}.tar.gz"::https://github.com/Itseez/opencv/archive/${pkgver}.tar.gz 'mingw-w64-cmake.patch' - 'free-tls-keys-on-dll-unload.patch' 'solve_deg3-underflow.patch' - 'upstream-40efd17.patch') -md5sums=('3346a59310d788d3845f4fd6043a108a' - '94672506dd30d8113904cd0514047da7' - '91fcecdc23a870cafad6f51c2a45e647' + 'issue-4107.patch' + 'remove-bindings-generation-DetectionBasedTracker.patch' + 'generate-proper-pkg-config-file.patch' + 'opencv-support-python-3.5.patch') +md5sums=('e6c72f54f7127161b371ef798f34d5c9' + '8ff3af2593c9c92f48c2e9f59adaaa3d' 'ae03a59cf1202d5eafa94c2aac419ae6' - '4099f3949fc7215d34e5ef09d6bbe36c') + '49b6e0d5a376300238a769074cd5d32c' + '232993e4a053e1014b513c39b789188a' + 'e3102a8339b25bffabd47e46c33807e4' + 'f1bac1d090f0812dd05e14a4adf56b94') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -Np1 -i "$srcdir/mingw-w64-cmake.patch" - patch -Np1 -i "$srcdir/free-tls-keys-on-dll-unload.patch" - patch -Np1 -i "$srcdir/solve_deg3-underflow.patch" - patch -Np1 -i "$srcdir/upstream-40efd17.patch" + patch -Np1 -i "${srcdir}/mingw-w64-cmake.patch" + patch -Np1 -i "${srcdir}/solve_deg3-underflow.patch" + patch -Np1 -i "${srcdir}/issue-4107.patch" + patch -Np1 -i "${srcdir}/remove-bindings-generation-DetectionBasedTracker.patch" + patch -Np1 -i "${srcdir}/generate-proper-pkg-config-file.patch" + patch -Np1 -i "${srcdir}/opencv-support-python-3.5.patch" } build() { @@ -62,7 +70,7 @@ build() { } # all x64 CPUs support SSE2 but not SSE3 - [[ "$CARCH" = 'x86_64' ]] && { + [[ "${CARCH}" = "x86_64" ]] && { _cmakeopts+=('-DENABLE_SSE3=OFF') _ffmpeg_plugin='opencv_ffmpeg_64.dll' } @@ -70,15 +78,19 @@ build() { pushd ${srcdir}/${_realname}-${pkgver}/3rdparty/ffmpeg > /dev/null rm -f ./*.dll gcc -Wall -shared -o ${_ffmpeg_plugin} ${CXXFLAGS} -x c++ \ - -I../include -I../../modules/highgui/src ffopencv.c \ + -I../include -I../../modules/highgui/src -I../../modules/videoio/src ffopencv.c \ -lavformat -lavcodec -lavdevice -lswscale -lavutil -lws2_32 popd > /dev/null [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe -Wno-dev \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DPKG_CONFIG_WITHOUT_PREFIX=ON \ -DWITH_OPENCL=ON \ -DWITH_OPENGL=ON \ -DWITH_TBB=ON \ @@ -106,11 +118,5 @@ build() { package() { cd "${srcdir}/build-${CARCH}" - make -j1 install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/opencv.pc + make DESTDIR=${pkgdir} -j1 install } diff --git a/mingw-w64-opencv/free-tls-keys-on-dll-unload.patch b/mingw-w64-opencv/free-tls-keys-on-dll-unload.patch deleted file mode 100644 index 0221ce9241..0000000000 --- a/mingw-w64-opencv/free-tls-keys-on-dll-unload.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -Naur a/modules/core/src/alloc.cpp b/modules/core/src/alloc.cpp ---- a/modules/core/src/alloc.cpp 2014-10-01 14:33:36.000000000 +0700 -+++ b/modules/core/src/alloc.cpp 2014-10-02 23:40:21.133326500 +0700 -@@ -56,7 +56,7 @@ - #if CV_USE_SYSTEM_MALLOC - - #if defined WIN32 || defined _WIN32 --void deleteThreadAllocData() {} -+void deleteThreadAllocData(unsigned long) {} - #endif - - void* fastMalloc( size_t size ) -diff -Naur a/modules/core/src/precomp.hpp b/modules/core/src/precomp.hpp ---- a/modules/core/src/precomp.hpp 2014-10-01 14:33:36.000000000 +0700 -+++ b/modules/core/src/precomp.hpp 2014-10-02 23:40:21.133326500 +0700 -@@ -83,8 +83,8 @@ - - - #if defined WIN32 || defined _WIN32 --void deleteThreadAllocData(); --void deleteThreadRNGData(); -+void deleteThreadAllocData(unsigned long); -+void deleteThreadRNGData(unsigned long); - #endif - - template struct OpAdd -diff -Naur a/modules/core/src/rand.cpp b/modules/core/src/rand.cpp ---- a/modules/core/src/rand.cpp 2014-10-01 14:33:36.000000000 +0700 -+++ b/modules/core/src/rand.cpp 2014-10-02 23:40:21.133326500 +0700 -@@ -752,10 +752,15 @@ - #endif - static DWORD tlsRNGKey = TLS_OUT_OF_INDEXES; - -- void deleteThreadRNGData() -- { -- if( tlsRNGKey != TLS_OUT_OF_INDEXES ) -- delete (RNG*)TlsGetValue( tlsRNGKey ); -+void deleteThreadRNGData(unsigned long reason) -+{ -+ if( tlsRNGKey != TLS_OUT_OF_INDEXES ) -+ delete (RNG*)TlsGetValue( tlsRNGKey ); -+ if( reason == DLL_PROCESS_DETACH && tlsRNGKey != TLS_OUT_OF_INDEXES ) -+ { -+ TlsFree(tlsRNGKey); -+ tlsRNGKey = TLS_OUT_OF_INDEXES; -+ } - } - - RNG& theRNG() -diff -Naur a/modules/core/src/system.cpp b/modules/core/src/system.cpp ---- a/modules/core/src/system.cpp 2014-10-01 14:33:36.000000000 +0700 -+++ b/modules/core/src/system.cpp 2014-10-02 23:40:21.133326500 +0700 -@@ -1079,8 +1079,8 @@ - { - if (fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH) - { -- cv::deleteThreadAllocData(); -- cv::deleteThreadRNGData(); -+ cv::deleteThreadAllocData(fdwReason); -+ cv::deleteThreadRNGData(fdwReason); - cv::deleteThreadData(); - } - return TRUE; diff --git a/mingw-w64-opencv/generate-proper-pkg-config-file.patch b/mingw-w64-opencv/generate-proper-pkg-config-file.patch new file mode 100644 index 0000000000..3526f1c458 --- /dev/null +++ b/mingw-w64-opencv/generate-proper-pkg-config-file.patch @@ -0,0 +1,21 @@ +--- opencv-3.0.0/cmake/OpenCVGenPkgconfig.cmake.orig 2015-07-15 12:59:24.381598000 +0300 ++++ opencv-3.0.0/cmake/OpenCVGenPkgconfig.cmake 2015-07-15 13:09:57.506279200 +0300 +@@ -17,6 +17,7 @@ + if("${isown}") + get_filename_component(item "${item}" NAME_WE) + string(REGEX REPLACE "^lib(.*)" "\\1" item "${item}") ++ string(REGEX REPLACE "${OPENCV_DLLVERSION}" "" item "${item}") + endif() + endif() + if(item MATCHES "^-l") +@@ -25,8 +26,10 @@ + get_filename_component(libdir "${item}" PATH) + get_filename_component(libname "${item}" NAME_WE) + string(REGEX REPLACE "^lib(.*)" "\\1" libname "${libname}") ++ string(REGEX REPLACE "${OPENCV_DLLVERSION}" "" item "${item}") + list(APPEND _lst "-L${libdir}" "-l${libname}") + else() ++ string(REGEX REPLACE "${OPENCV_DLLVERSION}" "" item "${item}") + list(APPEND _lst "-l${item}") + endif() + endforeach() diff --git a/mingw-w64-opencv/issue-4107.patch b/mingw-w64-opencv/issue-4107.patch new file mode 100644 index 0000000000..2befda41eb --- /dev/null +++ b/mingw-w64-opencv/issue-4107.patch @@ -0,0 +1,13 @@ +http://code.opencv.org/issues/4107 + +diff -Naur a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake +--- a/cmake/OpenCVCompilerOptions.cmake 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/OpenCVCompilerOptions.cmake 2015-03-05 22:18:10.532856700 +0600 +@@ -64,7 +64,6 @@ + add_extra_compiler_option(-W) + add_extra_compiler_option(-Wall) + add_extra_compiler_option(-Werror=return-type) +- add_extra_compiler_option(-Werror=non-virtual-dtor) + add_extra_compiler_option(-Werror=address) + add_extra_compiler_option(-Werror=sequence-point) + add_extra_compiler_option(-Wformat) diff --git a/mingw-w64-opencv/mingw-w64-cmake.patch b/mingw-w64-opencv/mingw-w64-cmake.patch index 12fd266ee9..b43d02a18d 100644 --- a/mingw-w64-opencv/mingw-w64-cmake.patch +++ b/mingw-w64-opencv/mingw-w64-cmake.patch @@ -1,18 +1,6 @@ -diff -Naur a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake ---- a/cmake/OpenCVDetectPython.cmake 2014-10-01 14:33:36.000000000 +0700 -+++ b/cmake/OpenCVDetectPython.cmake 2014-10-02 23:18:25.505210700 +0700 -@@ -52,7 +52,7 @@ - endif() - - if(NOT ANDROID AND NOT IOS) -- if(CMAKE_HOST_UNIX) -+ if(CMAKE_HOST_UNIX OR MINGW) - execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_python_lib()" - RESULT_VARIABLE PYTHON_CVPY_PROCESS - OUTPUT_VARIABLE PYTHON_STD_PACKAGES_PATH diff -Naur a/cmake/OpenCVFindOpenEXR.cmake b/cmake/OpenCVFindOpenEXR.cmake ---- a/cmake/OpenCVFindOpenEXR.cmake 2014-10-01 14:33:36.000000000 +0700 -+++ b/cmake/OpenCVFindOpenEXR.cmake 2014-10-02 23:18:25.505210700 +0700 +--- a/cmake/OpenCVFindOpenEXR.cmake 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/OpenCVFindOpenEXR.cmake 2015-03-05 22:18:10.517256700 +0600 @@ -13,7 +13,7 @@ SET(OPENEXR_LIBSEARCH_SUFFIXES "") file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH) @@ -22,9 +10,21 @@ diff -Naur a/cmake/OpenCVFindOpenEXR.cmake b/cmake/OpenCVFindOpenEXR.cmake SET(OPENEXR_ROOT "C:/Deploy" CACHE STRING "Path to the OpenEXR \"Deploy\" folder") if(CMAKE_CL_64) SET(OPENEXR_LIBSEARCH_SUFFIXES x64/Release x64 x64/Debug) +diff -Naur a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake +--- a/cmake/OpenCVDetectPython.cmake 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/OpenCVDetectPython.cmake 2015-03-05 22:18:10.517256700 +0600 +@@ -125,7 +125,7 @@ + endif() + + if(NOT ANDROID AND NOT IOS) +- if(CMAKE_HOST_UNIX) ++ if(CMAKE_HOST_UNIX OR MINGW) + execute_process(COMMAND ${_executable} -c "from distutils.sysconfig import *; print(get_python_lib())" + RESULT_VARIABLE _cvpy_process + OUTPUT_VARIABLE _std_packages_path diff -Naur a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake ---- a/cmake/OpenCVGenConfig.cmake 2014-10-01 14:33:36.000000000 +0700 -+++ b/cmake/OpenCVGenConfig.cmake 2014-10-02 23:18:25.505210700 +0700 +--- a/cmake/OpenCVGenConfig.cmake 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/OpenCVGenConfig.cmake 2015-03-05 22:18:10.532856700 +0600 @@ -101,7 +101,7 @@ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" @ONLY) configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake" @ONLY) @@ -44,53 +44,20 @@ diff -Naur a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"") diff -Naur a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake ---- a/cmake/OpenCVGenPkgconfig.cmake 2014-10-01 14:33:36.000000000 +0700 -+++ b/cmake/OpenCVGenPkgconfig.cmake 2014-10-02 23:18:25.505210700 +0700 -@@ -10,7 +10,7 @@ - # ------------------------------------------------------------------------------------------- - set(prefix "${CMAKE_INSTALL_PREFIX}") - set(exec_prefix "\${prefix}") --set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS -+set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}") - set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}") - - if(CMAKE_BUILD_TYPE MATCHES "Release") -@@ -35,10 +35,11 @@ - ocv_list_reverse(OpenCV_EXTRA_COMPONENTS) - - #build the list of components --set(OpenCV_LIB_COMPONENTS_ "") -+set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}") - foreach(CVLib ${OpenCV_LIB_COMPONENTS}) - get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE}) - get_filename_component(libname "${libpath}" NAME) -+ get_filename_component(lname "${libpath}" NAME_WE) - - if(INSTALL_TO_MANGLED_PATHS) - set(libname "${libname}.${OPENCV_VERSION}") -@@ -51,7 +52,9 @@ - set(installDir "${OPENCV_LIB_INSTALL_PATH}") - endif() - -- set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}") -+ string(REPLACE "libopencv" "-lopencv" lname "${lname}") -+ string(REPLACE "${OPENCV_DLLVERSION}" "" lname "${lname}") -+ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${lname}") - endforeach() - - # add extra dependencies required for OpenCV -@@ -80,6 +83,6 @@ +--- a/cmake/OpenCVGenPkgconfig.cmake 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/OpenCVGenPkgconfig.cmake 2015-03-05 22:18:10.532856700 +0600 +@@ -100,6 +100,6 @@ "${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME}" @ONLY) -if(UNIX AND NOT ANDROID) -+if(UNIX OR MINGW AND NOT ANDROID) ++if((UNIX AND NOT ANDROID) OR MINGW) install(FILES ${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME} DESTINATION ${OPENCV_LIB_INSTALL_PATH}/pkgconfig COMPONENT dev) endif() diff -Naur a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake ---- a/cmake/OpenCVModule.cmake 2014-10-01 14:33:36.000000000 +0700 -+++ b/cmake/OpenCVModule.cmake 2014-10-02 23:18:25.505210700 +0700 -@@ -585,7 +585,9 @@ +--- a/cmake/OpenCVModule.cmake 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/OpenCVModule.cmake 2015-03-05 22:18:10.532856700 +0600 +@@ -584,7 +584,9 @@ endif() set_target_properties(${the_module} PROPERTIES @@ -102,9 +69,9 @@ diff -Naur a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} diff -Naur a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in ---- a/cmake/templates/OpenCVConfig.cmake.in 2014-10-01 14:33:36.000000000 +0700 -+++ b/cmake/templates/OpenCVConfig.cmake.in 2014-10-02 23:20:38.776244800 +0700 -@@ -75,7 +75,7 @@ +--- a/cmake/templates/OpenCVConfig.cmake.in 2015-02-25 18:10:31.000000000 +0600 ++++ b/cmake/templates/OpenCVConfig.cmake.in 2015-03-05 22:18:10.532856700 +0600 +@@ -97,7 +97,7 @@ # Extract the directory where *this* file has been installed (determined at cmake run-time) get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE) @@ -114,9 +81,9 @@ diff -Naur a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfi set(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../..") else() diff -Naur a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2014-10-01 14:33:36.000000000 +0700 -+++ b/CMakeLists.txt 2014-10-02 23:18:25.505210700 +0700 -@@ -104,20 +104,6 @@ +--- a/CMakeLists.txt 2015-02-25 18:10:31.000000000 +0600 ++++ b/CMakeLists.txt 2015-03-05 22:18:10.532856700 +0600 +@@ -111,20 +111,6 @@ endif() endif() @@ -137,8 +104,17 @@ diff -Naur a/CMakeLists.txt b/CMakeLists.txt # ---------------------------------------------------------------------------- # OpenCV cmake options # ---------------------------------------------------------------------------- -@@ -184,12 +170,12 @@ - OCV_OPTION(BUILD_ANDROID_PACKAGE "Build platform-specific package for Google Play" OFF IF ANDROID ) +@@ -156,7 +156,7 @@ + OCV_OPTION(WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF ) + OCV_OPTION(WITH_GTK "Include GTK support" ON IF (UNIX AND NOT APPLE AND NOT ANDROID) ) + OCV_OPTION(WITH_GTK_2_X "Use GTK version 2" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) ) +-OCV_OPTION(WITH_IPP "Include Intel IPP support" ON IF (X86_64 OR X86) AND NOT WINRT) ++OCV_OPTION(WITH_IPP "Include Intel IPP support" ON IF (X86_64 OR X86) AND NOT WINRT AND NOT MINGW) + OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON IF (NOT IOS) ) + OCV_OPTION(WITH_JPEG "Include JPEG support" ON) + OCV_OPTION(WITH_WEBP "Include WebP support" ON IF (NOT IOS AND NOT WINRT) ) +@@ -191,12 +177,12 @@ + OCV_OPTION(BUILD_CUDA_STUBS "Build CUDA modules stubs when no CUDA SDK" OFF IF (NOT IOS) ) # 3rd party libs -OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR APPLE ) @@ -146,61 +122,56 @@ diff -Naur a/CMakeLists.txt b/CMakeLists.txt -OCV_OPTION(BUILD_JASPER "Build libjasper from source" WIN32 OR ANDROID OR APPLE ) -OCV_OPTION(BUILD_JPEG "Build libjpeg from source" WIN32 OR ANDROID OR APPLE ) -OCV_OPTION(BUILD_PNG "Build libpng from source" WIN32 OR ANDROID OR APPLE ) --OCV_OPTION(BUILD_OPENEXR "Build openexr from source" WIN32 OR ANDROID OR APPLE ) +-OCV_OPTION(BUILD_OPENEXR "Build openexr from source" (WIN32 OR ANDROID OR APPLE) AND NOT WINRT) +OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 AND NOT MINGW OR APPLE ) +OCV_OPTION(BUILD_TIFF "Build libtiff from source" WIN32 AND NOT MINGW OR ANDROID OR APPLE ) +OCV_OPTION(BUILD_JASPER "Build libjasper from source" WIN32 AND NOT MINGW OR ANDROID OR APPLE ) +OCV_OPTION(BUILD_JPEG "Build libjpeg from source" WIN32 AND NOT MINGW OR ANDROID OR APPLE ) +OCV_OPTION(BUILD_PNG "Build libpng from source" WIN32 AND NOT MINGW OR ANDROID OR APPLE ) -+OCV_OPTION(BUILD_OPENEXR "Build openexr from source" WIN32 AND NOT MINGW OR ANDROID OR APPLE ) ++OCV_OPTION(BUILD_OPENEXR "Build openexr from source" (WIN32 OR ANDROID OR APPLE) AND NOT WINRT AND NOT MINGW ) OCV_OPTION(BUILD_TBB "Download and build TBB from source" ANDROID ) # OpenCV installation options -@@ -261,7 +247,7 @@ +@@ -268,13 +254,13 @@ endif() endif() -if(ANDROID OR WIN32) -+if(ANDROID OR WIN32 AND NOT MINGW) ++if((ANDROID OR WIN32) AND NOT MINGW) set(OPENCV_DOC_INSTALL_PATH doc) - elseif(INSTALL_TO_MANGLED_PATHS) - set(OPENCV_DOC_INSTALL_PATH share/OpenCV-${OPENCV_VERSION}/doc) -@@ -269,7 +255,7 @@ + else() set(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) endif() --if(WIN32) -+if(WIN32 AND NOT MINGW) +-if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) ++if((WIN32 AND NOT MINGW) AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) set(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") else() -@@ -309,7 +295,7 @@ +@@ -305,7 +305,7 @@ + if(ANDROID) + set(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}samples/${ANDROID_NDK_ABI_NAME}") else() +- set(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}samples") ++ set(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}share/OpenCV/samples") + endif() + + if(ANDROID) +@@ -345,7 +345,7 @@ set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib") set(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") -- if(WIN32) -+ if(WIN32 AND NOT MINGW) + +- if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) ++ if((WIN32 AND NOT MINGW) AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) if(OpenCV_STATIC) set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") else() -@@ -635,7 +621,7 @@ +@@ -652,7 +638,7 @@ endif() # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically -if(ANDROID OR NOT UNIX) -+if(ANDROID OR NOT UNIX AND NOT MINGW) ++if((ANDROID OR NOT UNIX) AND NOT MINGW) install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ - DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs) -diff -Naur opencv.a/cmake/OpenCVDetectCXXCompiler.cmake opencv.b/cmake/OpenCVDetectCXXCompiler.cmake ---- opencv.a/cmake/OpenCVDetectCXXCompiler.cmake 2014-10-01 14:33:36.000000000 +0700 -+++ opencv.b/cmake/OpenCVDetectCXXCompiler.cmake 2014-10-28 03:46:24.726004000 +0600 -@@ -145,7 +145,7 @@ - execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine - OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE - OUTPUT_STRIP_TRAILING_WHITESPACE) -- if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64") -+ if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64") - set(MINGW64 1) - set(OpenCV_ARCH x64) - else() + DESTINATION . COMPONENT libs) diff --git a/mingw-w64-opencv/opencv-support-python-3.5.patch b/mingw-w64-opencv/opencv-support-python-3.5.patch new file mode 100644 index 0000000000..6bc9a53f3b --- /dev/null +++ b/mingw-w64-opencv/opencv-support-python-3.5.patch @@ -0,0 +1,11 @@ +--- opencv-3.0.0/cmake/OpenCVDetectPython.cmake.orig 2015-10-12 11:18:55.233433400 +0300 ++++ opencv-3.0.0/cmake/OpenCVDetectPython.cmake 2015-10-12 11:19:02.848433400 +0300 +@@ -224,7 +224,7 @@ + PYTHON2_INCLUDE_DIR PYTHON2_INCLUDE_DIR2 PYTHON2_PACKAGES_PATH + PYTHON2_NUMPY_INCLUDE_DIRS PYTHON2_NUMPY_VERSION) + +-find_python(3.4 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR ++find_python(3.5 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR + PYTHON3INTERP_FOUND PYTHON3_EXECUTABLE PYTHON3_VERSION_STRING + PYTHON3_VERSION_MAJOR PYTHON3_VERSION_MINOR PYTHON3LIBS_FOUND + PYTHON3LIBS_VERSION_STRING PYTHON3_LIBRARIES PYTHON3_LIBRARY diff --git a/mingw-w64-opencv/remove-bindings-generation-DetectionBasedTracker.patch b/mingw-w64-opencv/remove-bindings-generation-DetectionBasedTracker.patch new file mode 100644 index 0000000000..5edac6ba12 --- /dev/null +++ b/mingw-w64-opencv/remove-bindings-generation-DetectionBasedTracker.patch @@ -0,0 +1,34 @@ +From caaf60ba008bb7b61e2a791aab31dafe5267ab33 Mon Sep 17 00:00:00 2001 +From: Alexander Alekhin +Date: Tue, 9 Jun 2015 16:58:58 +0300 +Subject: [PATCH] remove bindings generation for DetectionBasedTracker + +--- + modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp | 1 + + modules/python/common.cmake | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp b/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp +index 54117fd..1f5f1d3 100644 +--- a/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp ++++ b/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp +@@ -44,6 +44,7 @@ + #ifndef __OPENCV_OBJDETECT_DBT_HPP__ + #define __OPENCV_OBJDETECT_DBT_HPP__ + ++// After this condition removal update blacklist for bindings: modules/python/common.cmake + #if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__) || \ + (defined(__cplusplus) && __cplusplus > 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1700) + +diff --git a/modules/python/common.cmake b/modules/python/common.cmake +index 5743980..2444b77 100644 +--- a/modules/python/common.cmake ++++ b/modules/python/common.cmake +@@ -28,6 +28,7 @@ endforeach(m) + ocv_list_filterout(opencv_hdrs ".h$") + ocv_list_filterout(opencv_hdrs "cuda") + ocv_list_filterout(opencv_hdrs "cudev") ++ocv_list_filterout(opencv_hdrs "detection_based_tracker.hpp") # Conditional compilation + + set(cv2_generated_hdrs + "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_include.h" diff --git a/mingw-w64-opencv/upstream-40efd17.patch b/mingw-w64-opencv/upstream-40efd17.patch deleted file mode 100644 index 9cfd19af9b..0000000000 --- a/mingw-w64-opencv/upstream-40efd17.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0f2b7fbc451a34c9eba34616e726985b7a0d14b1 Mon Sep 17 00:00:00 2001 -From: Anatoly Baksheev -Date: Sat, 18 Oct 2014 18:12:36 +0400 -Subject: [PATCH] viz: fixed memory leak, issue 3961 - ---- - modules/viz/src/vtk/vtkImageMatSource.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/viz/src/vtk/vtkImageMatSource.cpp b/modules/viz/src/vtk/vtkImageMatSource.cpp -index 58a5642..6586175 100644 ---- a/modules/viz/src/vtk/vtkImageMatSource.cpp -+++ b/modules/viz/src/vtk/vtkImageMatSource.cpp -@@ -52,7 +52,7 @@ namespace cv { namespace viz - cv::viz::vtkImageMatSource::vtkImageMatSource() - { - this->SetNumberOfInputPorts(0); -- this->ImageData = vtkImageData::New(); -+ this->ImageData = vtkSmartPointer::New(); - } - - int cv::viz::vtkImageMatSource::RequestInformation(vtkInformation *, vtkInformationVector**, vtkInformationVector *outputVector) --- -1.8.3.msysgit.0 - diff --git a/mingw-w64-openexr/PKGBUILD b/mingw-w64-openexr/PKGBUILD index e4288d6e2a..0f7f41f0bd 100644 --- a/mingw-w64-openexr/PKGBUILD +++ b/mingw-w64-openexr/PKGBUILD @@ -3,13 +3,13 @@ _realname=openexr pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Openexr library for EXR images (mingw-w64)" arch=('any') -url="http://http://www.openexr.com/" +url="http://www.openexr.com/" license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-ilmbase") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-ilmbase" "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') source=("http://download.savannah.nongnu.org/releases/openexr/${_realname}-${pkgver}.tar.gz" mingw-w64-fix.patch @@ -35,19 +35,19 @@ md5sums=('b64e931c82aa3790329c21418373db4e' 'e913e6fa443d2ae28951ed22ae680653') prepare(){ - cd "$srcdir/${_realname}-$pkgver" - + cd "${srcdir}/${_realname}-$pkgver" + sed -i 's/#define ZLIB_WINAPI/\/\/#define ZLIB_WINAPI/g' IlmImf/ImfZipCompressor.cpp sed -i 's/#define ZLIB_WINAPI/\/\/#define ZLIB_WINAPI/g' IlmImf/ImfPxr24Compressor.cpp - patch -Np1 -i "$srcdir/mingw-w64-fix.patch" - patch -Np1 -i "$srcdir/openexr-2.1.0-headers.patch" - #patch -Np1 -i "$srcdir/openexr-2.1.0_bb44ExpLogTable.patch" - patch -Np1 -i "$srcdir/openexr-2.1.0_aligned-malloc.patch" - patch -Np1 -i "$srcdir/openexr-2.1.0_cast.patch" - patch -Np1 -i "$srcdir/openexr_obsolete-macros.patch" - patch -Np1 -i "$srcdir/cmake-soversion.patch" - patch -Np2 -i "$srcdir/pull93.patch" + patch -p1 -i "${srcdir}/mingw-w64-fix.patch" + patch -p1 -i "${srcdir}/openexr-2.1.0-headers.patch" + #patch -p1 -i "${srcdir}/openexr-2.1.0_bb44ExpLogTable.patch" + patch -p1 -i "${srcdir}/openexr-2.1.0_aligned-malloc.patch" + patch -p1 -i "${srcdir}/openexr-2.1.0_cast.patch" + patch -p1 -i "${srcdir}/openexr_obsolete-macros.patch" + patch -p1 -i "${srcdir}/cmake-soversion.patch" + patch -p2 -i "${srcdir}/pull93.patch" patch -p2 -i ${srcdir}/change-suffixes-for-64bit-literals.patch patch -p1 -i ${srcdir}/win-dwalookups.patch @@ -55,13 +55,14 @@ prepare(){ build() { CXXFLAGS+=" -I${MINGW_PREFIX}/include/OpenEXR" - [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - mkdir "${srcdir}/build-${MINGW_CHOST}" + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=ON \ -DNAMESPACE_VERSIONING=ON \ -DUSE_ZLIB_WINAPI=OFF \ @@ -73,11 +74,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/OpenEXR.pc + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-openimageio/0001-MinGW-w64-include-winbase-h-early-for-TCHAR-types.patch b/mingw-w64-openimageio/0001-MinGW-w64-include-winbase-h-early-for-TCHAR-types.patch new file mode 100644 index 0000000000..7d4c2bc1d5 --- /dev/null +++ b/mingw-w64-openimageio/0001-MinGW-w64-include-winbase-h-early-for-TCHAR-types.patch @@ -0,0 +1,12 @@ +--- oiio-Release-1.5.16/src/include/OpenImageIO/SHA1.h.orig 2015-07-10 13:06:07.858304300 +0100 ++++ oiio-Release-1.5.16/src/include/OpenImageIO/SHA1.h 2015-07-10 13:06:31.503304300 +0100 +@@ -88,6 +88,9 @@ + #endif + #endif + ++#ifdef WIN32 ++#include ++#endif + #include + + #ifdef SHA1_UTILITY_FUNCTIONS diff --git a/mingw-w64-openimageio/0002-Also-link-to-opencv_videoio-library.patch b/mingw-w64-openimageio/0002-Also-link-to-opencv_videoio-library.patch new file mode 100644 index 0000000000..311d0241a9 --- /dev/null +++ b/mingw-w64-openimageio/0002-Also-link-to-opencv_videoio-library.patch @@ -0,0 +1,11 @@ +--- oiio-Release-1.5.16/src/libOpenImageIO/CMakeLists.txt.orig 2015-07-10 13:11:48.682388900 +0100 ++++ oiio-Release-1.5.16/src/libOpenImageIO/CMakeLists.txt 2015-07-10 13:28:23.918980400 +0100 +@@ -231,7 +231,7 @@ + # Include OpenCV if using it + if (OpenCV_FOUND) + include_directories (${OpenCV_INCLUDE_DIR}) +- target_link_libraries (OpenImageIO opencv_core opencv_highgui) ++ target_link_libraries (OpenImageIO opencv_core opencv_highgui opencv_videoio) + endif () + + # Include OpenSSL if using it diff --git a/mingw-w64-openimageio/PKGBUILD b/mingw-w64-openimageio/PKGBUILD index b238e65f00..a23e72b223 100644 --- a/mingw-w64-openimageio/PKGBUILD +++ b/mingw-w64-openimageio/PKGBUILD @@ -1,31 +1,33 @@ # Maintainer: Alexey Pavlov _realname=openimageio +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4.13 -pkgrel=2 +pkgver=1.5.20 +#pkgver=1.6.3dev +pkgrel=1 pkgdesc="A library for reading and writing images, including classes, utilities, and applications (mingw-w64)" arch=('any') url="http://www.openimageio.org/" license=("custom") depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-field3d" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-giflib" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-hdf5" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-LibRaw" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-opencolorio" - "${MINGW_PACKAGE_PREFIX}-opencv" - "${MINGW_PACKAGE_PREFIX}-openexr" - "${MINGW_PACKAGE_PREFIX}-openjpeg" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-field3d" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-glew" + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-LibRaw" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-opencolorio" + "${MINGW_PACKAGE_PREFIX}-opencv" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-openjpeg" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-qt5" "${MINGW_PACKAGE_PREFIX}-python2" @@ -33,30 +35,35 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" optdepends=(#"${MINGW_PACKAGE_PREFIX}-qt4: iv image viewer" "${MINGW_PACKAGE_PREFIX}-python2: bindings support") options=('strip' 'buildflags') -source=(https://github.com/OpenImageIO/oiio/archive/Release-$pkgver.tar.gz +source=(${_realname}-${pkgver}.tar.gz::https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz fix-mingw-w64.patch workaround-ansidecl-h-PTR-define-conflict.patch - giflib.patch) -md5sums=('7df68cad0f79f5eea33209f63b2e8b3d' - 'cbd33e44aa073bb58b0371d311e0fc36' + 0001-MinGW-w64-include-winbase-h-early-for-TCHAR-types.patch + 0002-Also-link-to-opencv_videoio-library.patch) +md5sums=('5ccb9da38b7b56bcfaba12f7f267efa5' + '58f3082fc728e7cc3ba6ec4d4368e4fe' '1bf4c840ee73d37ebdfc98d3ea527ed4' - 'f5cef862b0700c80cb574bfec9625b85') + '35107a59495961ba8301b8beb158b2dd' + 'a446aac9182de3d59b43649e754e8bae') prepare() { cd ${srcdir}/oiio-Release-${pkgver} patch -p1 -i ${srcdir}/fix-mingw-w64.patch patch -p1 -i ${srcdir}/workaround-ansidecl-h-PTR-define-conflict.patch - patch -p1 -i ${srcdir}/giflib.patch + patch -p1 -i ${srcdir}/0001-MinGW-w64-include-winbase-h-early-for-TCHAR-types.patch + patch -p1 -i ${srcdir}/0002-Also-link-to-opencv_videoio-library.patch } build() { export OPENJPEG_HOME=${MINGW_PREFIX} - [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} - mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DPYLIB_INSTALL_DIR=lib/python2.7/site-packages \ -DUSE_FREETYPE=ON \ -DFREETYPE_INCLUDE_PATH=${MINGW_PREFIX}/include/freetype2 \ @@ -72,10 +79,10 @@ build() { } package() { - cd "$srcdir"/build-${MINGW_CHOST} + cd "${srcdir}"/build-${MINGW_CHOST} - make install + make DESTDIR=${pkgdir} install rm -r ${pkgdir}${MINGW_PREFIX}/doc - install -Dm644 ${srcdir}/oiio-Release-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/LICENSE" + install -Dm644 ${srcdir}/oiio-Release-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-openimageio/fix-mingw-w64.patch b/mingw-w64-openimageio/fix-mingw-w64.patch index a819aa39c3..04145ab091 100644 --- a/mingw-w64-openimageio/fix-mingw-w64.patch +++ b/mingw-w64-openimageio/fix-mingw-w64.patch @@ -9,46 +9,17 @@ if (VERBOSE) message (STATUS "Boost found ${Boost_FOUND} ") message (STATUS "Boost version ${Boost_VERSION}") ---- a/src/include/OpenImageIO/fmath.h -+++ b/src/include/OpenImageIO/fmath.h -@@ -46,6 +46,7 @@ - #include - #include - #include -+#include - - #if defined(_MSC_VER) && _MSC_VER < 1600 - typedef __int8 int8_t; -@@ -912,7 +913,7 @@ - +--- a/src/include/OpenImageIO/missing_math.h ++++ b/src/include/OpenImageIO/missing_math.h +@@ -106,7 +106,7 @@ + OIIO_NAMESPACE_ENTER { -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__GNUC__) // Windows doesn't define these functions from math.h #define hypotf _hypotf #define copysign(x,y) _copysign(x,y) -@@ -1065,7 +1066,7 @@ - #endif /* _WIN32 */ - - --#ifndef _MSC_VER -+#ifdef __GNUC__ - // Some systems have isnan, isinf and isfinite in the std namespace. - // FIXME: remove these later - using std::isnan; -@@ -1277,9 +1278,11 @@ - // For certain platforms, direct them to use OIIO's implementations. - - #ifdef _WIN32 -+#ifndef __GNUC__ - using OIIO::truncf; - using OIIO::log2f; - using OIIO::exp2f; -+#endif - # if defined(_MSC_VER) && _MSC_VER < 1800 /* Needed for MSVS prior to 2013 */ - using OIIO::isnan; - using OIIO::isfinite; --- a/src/include/OpenImageIO/osdep.h +++ b/src/include/OpenImageIO/osdep.h @@ -33,7 +33,9 @@ @@ -92,16 +63,6 @@ #include ---- a/src/libOpenImageIO/imagebufalgo.cpp -+++ b/src/libOpenImageIO/imagebufalgo.cpp -@@ -47,6 +47,7 @@ - #include - #include - #include -+#include - - #include "imagebuf.h" - #include "imagebufalgo.h" --- a/src/libOpenImageIO/imageinput.cpp +++ b/src/libOpenImageIO/imageinput.cpp @@ -32,6 +32,7 @@ @@ -279,6 +240,15 @@ --- a/CMakeLists.txt 2013-12-30 01:06:13.042400000 +0400 +++ b/CMakeLists.txt 2013-12-30 01:06:22.293200000 +0400 +@@ -70,7 +70,7 @@ + # include_directories(SYSTEM...) when using clang or gcc. + set (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") + # Ensure this macro is set for stdint.h +- add_definitions ("-D__STDC_LIMIT_MACROS") ++ add_definitions ("-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS") + # this allows native instructions to be used for sqrtf instead of a function call + add_definitions ("-fno-math-errno") + endif () @@ -423,7 +423,7 @@ set (CPACK_GENERATOR "TGZ;STGZ;PackageMaker") set (CPACK_SOURCE_GENERATOR "TGZ") diff --git a/mingw-w64-openimageio/giflib.patch b/mingw-w64-openimageio/giflib.patch deleted file mode 100644 index 2871f696d1..0000000000 --- a/mingw-w64-openimageio/giflib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- oiio-Release-1.4.8/src/gif.imageio/gifinput.cpp.orig 2014-05-23 20:21:53.000000000 +0400 -+++ oiio-Release-1.4.8/src/gif.imageio/gifinput.cpp 2014-05-29 09:37:42.109200000 +0400 -@@ -437,7 +437,7 @@ - GIFInput::close (void) - { - if (m_gif_file) { -- if (DGifCloseFile (m_gif_file) == GIF_ERROR) { -+ if (DGifCloseFile (m_gif_file, NULL) == GIF_ERROR) { - error ("Error trying to close the file."); - return false; - } diff --git a/mingw-w64-openjpeg/PKGBUILD b/mingw-w64-openjpeg/PKGBUILD index 234fa6c9a0..87247193df 100644 --- a/mingw-w64-openjpeg/PKGBUILD +++ b/mingw-w64-openjpeg/PKGBUILD @@ -1,25 +1,28 @@ # Maintainer: Alexey Pavlov _realname=openjpeg - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.5.2 -pkgrel=1 +pkgrel=4 pkgdesc="An open source JPEG 2000 codec (mingw-w64)" arch=('any') url="http://www.openjpeg.org" license=("BSD") -depends=("${MINGW_PACKAGE_PREFIX}-lcms2" "${MINGW_PACKAGE_PREFIX}-libtiff" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-zlib") +depends=("${MINGW_PACKAGE_PREFIX}-lcms2" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("dos2unix" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('staticlibs' 'strip') source=(http://sourceforge.net/projects/openjpeg.mirror/files/${_realname}-${pkgver}.tar.gz - "cdecl.patch" - "openjpeg-1.5.1_tiff-pkgconfig.patch" - mingw-install-pkgconfig-files.patch - versioned-dlls-mingw.patch) + "cdecl.patch" + "openjpeg-1.5.1_tiff-pkgconfig.patch" + "mingw-install-pkgconfig-files.patch" + "versioned-dlls-mingw.patch") md5sums=('c41772c30fb1c272358b3707233134a1' '673edf457f9b4f3fdc9a083e1857a76a' @@ -28,57 +31,65 @@ md5sums=('c41772c30fb1c272358b3707233134a1' 'e68263246b76758903bfcc2c9de3601f') prepare() { - cd "$srcdir/openjpeg-$pkgver" + cd "${srcdir}/openjpeg-${pkgver}" # Fix CRLF line endings dos2unix libopenjpeg/opj_malloc.h #rm -r thirdparty - patch -Np1 -i "$srcdir"/cdecl.patch - patch -Np1 -i "$srcdir"/openjpeg-1.5.1_tiff-pkgconfig.patch - patch -Np1 -i "$srcdir"/mingw-install-pkgconfig-files.patch - patch -Np1 -i "$srcdir"/versioned-dlls-mingw.patch + patch -Np1 -i "${srcdir}"/cdecl.patch + patch -Np1 -i "${srcdir}"/openjpeg-1.5.1_tiff-pkgconfig.patch + patch -Np1 -i "${srcdir}"/mingw-install-pkgconfig-files.patch + patch -Np1 -i "${srcdir}"/versioned-dlls-mingw.patch #autoreconf -i } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + msg "Build shared version..." + [[ -d ${srcdir}/build-shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-shared-${MINGW_CHOST} + mkdir ${srcdir}/build-shared-${MINGW_CHOST} + cd ${srcdir}/build-shared-${MINGW_CHOST} - [[ -d $srcdir/build-${MINGW_CHOST} ]] && rm -rf $srcdir/build-${MINGW_CHOST} - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_SYSTEM_PREFIX_PATH=${PREFIX_DEPS} \ + -DCMAKE_SYSTEM_PREFIX_PATH=${MINGW_PREFIX} \ -DOPENJPEG_INSTALL_SUBDIR="openjpeg/${ver}" \ -DBUILD_MJ2=ON \ -DBUILD_JPWL=ON \ -DBUILD_JPIP=ON \ - ../${_realname}-$pkgver + ../${_realname}-${pkgver} + make + + msg "Build static version..." + [[ -d $srcdir/build-static-${MINGW_CHOST} ]] && rm -rf $srcdir/build-static-${MINGW_CHOST} + mkdir $srcdir/build-static-${MINGW_CHOST} + cd $srcdir/build-static-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING:BOOL=OFF \ + -DCMAKE_SYSTEM_PREFIX_PATH=${MINGW_PREFIX} \ + -DOPENJPEG_INSTALL_SUBDIR="openjpeg/${ver}" \ + -DBUILD_MJ2=ON \ + -DBUILD_JPWL=ON \ + -DBUILD_JPIP=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + ../${_realname}-${pkgver} make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install # DESTDIR="$pkgdir" + cd "${srcdir}/build-static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libopenjpeg.pc \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libopenjpeg1.pc + cd "${srcdir}/build-shared-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install # Fix conflict with openjpeg2 mv ${pkgdir}${MINGW_PREFIX}/bin/opj_dec_server{,1}.exe diff --git a/mingw-w64-openjpeg2/PKGBUILD b/mingw-w64-openjpeg2/PKGBUILD index 3caf06c32e..d2b442b0ef 100644 --- a/mingw-w64-openjpeg2/PKGBUILD +++ b/mingw-w64-openjpeg2/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=openjpeg +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}2" pkgver=2.1.0 -pkgrel=2 +pkgrel=4 pkgdesc="An open source JPEG 2000 codec (mingw-w64)" arch=('any') url="http://www.openjpeg.org" @@ -30,7 +31,7 @@ md5sums=('f6419fcc233df84f9a81eb36633c6db6' '46704c1ed92e81dbe9e341872b4ef261') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-$pkgver" patch -p1 -i ${srcdir}/0001-fix-install-for-dlls.all.patch patch -p1 -i ${srcdir}/0003-versioned-dlls.mingw.patch patch -p1 -i ${srcdir}/0005-sock-jpip.all.patch @@ -38,66 +39,53 @@ prepare() { } build() { - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - msg "Build static version" - [[ -d $srcdir/build-static-${MINGW_CHOST} ]] && rm -rf $srcdir/build-static-${MINGW_CHOST} - mkdir $srcdir/build-static-${MINGW_CHOST} - cd $srcdir/build-static-${MINGW_CHOST} - + [[ -d ${srcdir}/build-static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-static-${MINGW_CHOST} + mkdir ${srcdir}/build-static-${MINGW_CHOST} + cd ${srcdir}/build-static-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_TESTING:BOOL=OFF \ - -DCMAKE_SYSTEM_PREFIX_PATH=${PREFIX_DEPS} \ - -DBUILD_MJ2:bool=ON \ - -DBUILD_JPWL:bool=ON \ - -DBUILD_JPIP:bool=OFF \ - -DBUILD_JP3D:bool=ON \ - ../${_realname}-$pkgver + -DBUILD_TESTING=OFF \ + -DCMAKE_SYSTEM_PREFIX_PATH=${MINGW_PREFIX} \ + -DBUILD_MJ2=ON \ + -DBUILD_JPWL=ON \ + -DBUILD_JPIP=OFF \ + -DBUILD_JP3D=ON \ + ../${_realname}-${pkgver} make - + msg "Build shared version" - [[ -d $srcdir/build-shared-${MINGW_CHOST} ]] && rm -rf $srcdir/build-shared-${MINGW_CHOST} - mkdir $srcdir/build-shared-${MINGW_CHOST} - cd $srcdir/build-shared-${MINGW_CHOST} - + [[ -d ${srcdir}/build-shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-shared-${MINGW_CHOST} + mkdir ${srcdir}/build-shared-${MINGW_CHOST} + cd ${srcdir}/build-shared-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_SYSTEM_PREFIX_PATH=${PREFIX_DEPS} \ - -DBUILD_MJ2:bool=ON \ - -DBUILD_JPWL:bool=ON \ - -DBUILD_JPIP:bool=ON \ - -DBUILD_JP3D:bool=ON \ - -DBUILD_DOC:bool=OFF \ + -DCMAKE_SYSTEM_PREFIX_PATH=${MINGW_PREFIX} \ + -DBUILD_MJ2=ON \ + -DBUILD_JPWL=ON \ + -DBUILD_JPIP=ON \ + -DBUILD_JP3D=ON \ + -DBUILD_DOC=OFF \ -DBUILD_PKGCONFIG_FILES=ON \ - ../${_realname}-$pkgver + ../${_realname}-${pkgver} make } package() { - cd "$srcdir/build-static-${MINGW_CHOST}" - make install - - cd "$srcdir/build-shared-${MINGW_CHOST}" - make install - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libopenjp2.pc \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libopenjp3d.pc \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libopenjpip.pc \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libopenjpwl.pc + cd "${srcdir}/build-static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + cd "${srcdir}/build-shared-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-openldap/PKGBUILD b/mingw-w64-openldap/PKGBUILD index 6166272445..8043cf496c 100644 --- a/mingw-w64-openldap/PKGBUILD +++ b/mingw-w64-openldap/PKGBUILD @@ -1,28 +1,31 @@ # Maintainer: Andrea Zagli _realname=openldap +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.4.39 +pkgver=2.4.42 pkgrel=1 arch=('any') pkgdesc="OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol (only client) (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-cyrus-sasl" "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-libtool" "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-db") -makedepends=("groff" - "${MINGW_PACKAGE_PREFIX}-gcc" - "libintl" - "libtool" - "make") + #"${MINGW_PACKAGE_PREFIX}-db<6.0.20" + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "groff" + "libintl" + "libtool" + "make") options=('strip' 'staticlibs' '!makeflags') license=("The OpenLDAP Public License") url="http://www.openldap.org/" -source=(http://www.openldap.org/software/download/OpenLDAP/openldap-release/${_realname}-$pkgver.tgz +source=(http://www.openldap.org/software/download/OpenLDAP/openldap-release/${_realname}-${pkgver}.tgz 001-backmdb.patch 002-link-with-icu.patch 003-symdummy-error.patch) -sha256sums=('8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7' +sha256sums=('eeb7b0e2c5852bfd2650e83909bb6152835c0b862fab10b63954dc1bcbba8e63' 'b462bfab9362cf5cab61d67cd24902a1800fb498a152b681ee182c713b79146c' '450cc9e42fb6ed2af4a16b217c77f95d1a18b353b887cab3107f9b350d8b42c5' 'd697fe51361a5129a5af3ca317031ff6f4ca5ddd247ff53043880660154a4708') @@ -39,6 +42,7 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} @@ -54,13 +58,18 @@ build() { --with-tls=openssl \ --with-cyrus-sasl \ --enable-modules=yes \ + --enable-hdb=no \ + --enable-bdb=no \ CC=${MINGW_PREFIX}/bin/gcc + sed -i "s/#define socklen_t int/\/*#define socklen_t int*\//" include/portable.h make depend make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-openocd-git/PKGBUILD b/mingw-w64-openocd-git/PKGBUILD new file mode 100644 index 0000000000..c6a8c2ceaa --- /dev/null +++ b/mingw-w64-openocd-git/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Andrew Leech +# Contributor: Ray Donnelly + +_realname=openocd +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides="${MINGW_PACKAGE_PREFIX}-${_realname}" +conflicts="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.9.0.r2.g79fdeb3 +pkgrel=1 +pkgdesc="OpenOCD - Open On-Chip Debugger (mingw-w64)" +arch=('any') +url="http://openocd.sourceforge.net" +options=('!ccache') +# What about ftdi? +depends=("${MINGW_PACKAGE_PREFIX}-hidapi" + "${MINGW_PACKAGE_PREFIX}-libusb" + "${MINGW_PACKAGE_PREFIX}-libusb-compat") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "pkg-config" + "git") +source=("${_realname}::git+http://git.code.sf.net/p/openocd/code") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}"/${_realname} + git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}"/${_realname} + ./bootstrap +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} + cd "${srcdir}"/build-${CARCH} + + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --{build,host}=${MINGW_CHOST} \ + --disable-dependency-tracking \ + --disable-werror \ + --enable-dummy \ + --enable-jtag_vpi \ + --enable-remote-bitbang \ + --enable-amtjtagaccel \ + --enable-gw16012 \ + --enable-parport \ + --enable-parport-giveio + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR="${pkgdir}" install + + # bsdtar can't convert non-ascii filenames to UTF-8 when run in + # non-UTF-8 locale. It proceeds to pack them anyway embedding raw + # binary filenames in the traditional tar headers. +} diff --git a/mingw-w64-openscad-git/PKGBUILD b/mingw-w64-openscad-git/PKGBUILD new file mode 100644 index 0000000000..1d72ce3209 --- /dev/null +++ b/mingw-w64-openscad-git/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Alexey Pavlov + +_realname=openscad +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=r5638.68e41af +pkgrel=1 +pkgdesc="The programmers solid 3D CAD modeller (mingw-w64)" +arch=('any') +license=("GPL2") +url="http://openscad.org/" +depends=("${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-cgal" + "${MINGW_PACKAGE_PREFIX}-opencsg" + "${MINGW_PACKAGE_PREFIX}-qscintilla" + "${MINGW_PACKAGE_PREFIX}-shared-mime-info") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-eigen3" + "${MINGW_PACKAGE_PREFIX}-imagemagick" + "git") +options=(!strip staticlibs !buildflags) +source=("${_realname}"::"git+https://github.com/openscad/openscad.git") +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/$_realname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_realname}" + rm -f libraries/MCAD/*.py +} + +build() { + cd ${srcdir}/${_realname} + ${MINGW_PREFIX}/bin/qmake \ + CONFIG+=release \ + PREFIX="${pkgdir}${MINGW_PREFIX}" + + make -j1 +} + +package() { + cd ${srcdir}/${_realname} + make INSTALL_ROOT= install + install -Dm644 "icons/${_realname}.xml" "${pkgdir}${MINGW_PREFIX}/share/mime/packages/${_realname}.xml" +} diff --git a/mingw-w64-openscad/PKGBUILD b/mingw-w64-openscad/PKGBUILD new file mode 100644 index 0000000000..7532a61c4c --- /dev/null +++ b/mingw-w64-openscad/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Alexey Pavlov + +_realname=openscad +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2015.03 +pkgrel=2 +pkgdesc="The programmers solid 3D CAD modeller (mingw-w64)" +arch=('any') +license=("GPL2") +url="http://openscad.org/" +depends=("${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-cgal" + "${MINGW_PACKAGE_PREFIX}-opencsg" + "${MINGW_PACKAGE_PREFIX}-qscintilla" + "${MINGW_PACKAGE_PREFIX}-shared-mime-info") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-eigen3" + "${MINGW_PACKAGE_PREFIX}-imagemagick") +options=(!strip staticlibs !buildflags) +source=("http://files.openscad.org/${_realname}-${pkgver}.src.tar.gz") +md5sums=('d1daed0ba048141bb910cfcadf8838e3') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + rm -f libraries/MCAD/*.py +} + +build() { + cd ${srcdir}/${_realname}-${pkgver} + BOOSTDIR=${MINGW_PREFIX} \ + CGALDIR=${MINGW_PREFIX} \ + EIGENDIR=${MINGW_PREFIX} \ + GLEWDIR=${MINGW_PREFIX} \ + OPENCSGDIR=${MINGW_PREFIX} \ + ${MINGW_PREFIX}/bin/qmake CONFIG+=release PREFIX="${pkgdir}${MINGW_PREFIX}" VERSION="${pkgver}" + + make -j1 + convert "icons/${_realname}.png" -resize 128x128\> "icons/${_realname}-128.png" +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make INSTALL_ROOT= install + install -Dm644 "icons/${_realname}.xml" "${pkgdir}${MINGW_PREFIX}/share/mime/packages/${_realname}.xml" +} diff --git a/mingw-w64-openscenegraph-git/PKGBUILD b/mingw-w64-openscenegraph-git/PKGBUILD index 37e72e5b9d..af21976f47 100644 --- a/mingw-w64-openscenegraph-git/PKGBUILD +++ b/mingw-w64-openscenegraph-git/PKGBUILD @@ -2,7 +2,7 @@ _realname=OpenSceneGraph pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-git") -pkgver=r12893.a61d2f2 +pkgver=r13264.f81f47b pkgrel=1 pkgdesc="Open source high performance 3D graphics toolkit (mingw-w64)" arch=('any') @@ -39,15 +39,15 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" #conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") options=('staticlibs' '!strip') source=("${_realname}"::"git+https://github.com/openscenegraph/osg.git" - osg-collada-dae-fixes.patch find-collada.patch find-freetype.patch - giflib.patch) + additional-gl-header.patch + fix-cast-error.patch) md5sums=('SKIP' - '45d0668f56c5e4ca58002f38fd3eb4a0' - '668def9c99f044db9a8215fa927d6ac2' + '18ce956c1889babc6515828b8200e864' '9ab69e1cd26826196fac5b3f01e6cb95' - '849f641c915f17db85a49b355bf63a17') + 'e889e10100a1f3e07212c01603712594' + '5599204490bf9f03cdd5871b938e3338') pkgver() { cd "$srcdir/$_realname" @@ -56,15 +56,15 @@ pkgver() { prepare() { cd "${srcdir}/${_realname}" - patch -p1 -i ${srcdir}/osg-collada-dae-fixes.patch patch -p1 -i ${srcdir}/find-collada.patch patch -p1 -i ${srcdir}/find-freetype.patch - patch -p1 -i ${srcdir}/giflib.patch + patch -p1 -i ${srcdir}/additional-gl-header.patch + patch -p1 -i ${srcdir}/fix-cast-error.patch } build() { export FREETYPE_DIR=${MINGW_PREFIX} - + for builddir in {Release,Debug}-${MINGW_CHOST}; do [[ -d $builddir ]] && rm -rf $builddir mkdir -p $builddir @@ -76,14 +76,14 @@ build() { local _opts="-DBUILD_OSG_EXAMPLES:BOOL=OFF -DBUILD_OSG_APPLICATIONS=OFF" local _postfix="-debug" } - + msg "Building ${builddir%-${MINGW_CHOST}} version..." - + + COLLADA_DIR=${MINGW_PREFIX} \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir%-git}${_postfix}-git${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=${builddir%-${MINGW_CHOST}} \ - -DACTUAL_3DPARTY_DIR=${MINGW_PREFIX} \ ${_opts} \ ../${_realname} @@ -95,7 +95,7 @@ build() { package_release() { provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") - + cd Release-${MINGW_CHOST} make -j1 install @@ -112,7 +112,7 @@ package_debug() { depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-git=$pkgver") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") - + cd Debug-${MINGW_CHOST} make -j1 install diff --git a/mingw-w64-openscenegraph-git/additional-gl-header.patch b/mingw-w64-openscenegraph-git/additional-gl-header.patch new file mode 100644 index 0000000000..333cf52dd3 --- /dev/null +++ b/mingw-w64-openscenegraph-git/additional-gl-header.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph/CMakeLists.txt.orig 2015-01-25 14:09:28.105400000 +0300 ++++ OpenSceneGraph/CMakeLists.txt 2015-01-25 14:09:37.496600000 +0300 +@@ -508,7 +508,7 @@ + SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required") + ELSE() + SET(OPENGL_HEADER1 "#include " CACHE STRING "#include<> line for OpenGL Header") +- SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required") ++ SET(OPENGL_HEADER2 "#include " CACHE STRING "#include<> line for additional OpenGL Headers if required") + ENDIF() + ENDIF() + diff --git a/mingw-w64-openscenegraph-git/find-collada.patch b/mingw-w64-openscenegraph-git/find-collada.patch index a31c92ba78..debfd702c5 100644 --- a/mingw-w64-openscenegraph-git/find-collada.patch +++ b/mingw-w64-openscenegraph-git/find-collada.patch @@ -1,20 +1,19 @@ --- OpenSceneGraph-3.2.1-rc1/CMakeModules/FindCOLLADA.cmake.orig 2013-12-25 00:28:48.219200000 +0400 +++ OpenSceneGraph-3.2.1-rc1/CMakeModules/FindCOLLADA.cmake 2013-12-25 01:05:55.671600000 +0400 -@@ -19,7 +19,7 @@ +@@ -17,7 +17,7 @@ + # Check if COLLADA_DIR is set, otherwise use ACTUAL_3DPARTY_DIR: + SET( COLLADA_ENV_VAR_AVAILABLE $ENV{COLLADA_DIR} ) IF ( COLLADA_ENV_VAR_AVAILABLE ) - SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory" FORCE) - ELSE ( COLLADA_ENV_VAR_AVAILABLE ) -- SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) -+ SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/collada-dom2.4/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) - ENDIF( COLLADA_ENV_VAR_AVAILABLE ) - - -@@ -66,7 +66,7 @@ - ) - - FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY -- NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 -+ NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 libcolladadom141 libcollada-dom141 - PATHS - ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4 - $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4 +- SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory" FORCE) ++ SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/include/collada-dom2.4/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) + ELSE () + SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) + ENDIF() +@@ -46,6 +46,7 @@ + FIND_PATH(COLLADA_INCLUDE_DIR dae.h + ${COLLADA_DOM_ROOT}/include + $ENV{COLLADA_DIR}/include ++ $ENV{COLLADA_DIR}/include/collada-dom2.4 + $ENV{COLLADA_DIR} + ~/Library/Frameworks + /Library/Frameworks diff --git a/mingw-w64-openscenegraph-git/fix-cast-error.patch b/mingw-w64-openscenegraph-git/fix-cast-error.patch new file mode 100644 index 0000000000..1f8dd88886 --- /dev/null +++ b/mingw-w64-openscenegraph-git/fix-cast-error.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph/src/osgPlugins/osgjs/WriteVisitor.cpp.orig 2015-05-08 12:19:06.415757900 +0300 ++++ OpenSceneGraph/src/osgPlugins/osgjs/WriteVisitor.cpp 2015-05-08 12:19:00.109388600 +0300 +@@ -225,7 +225,7 @@ + // no image file so use this inline name image and create a file + std::stringstream ss; + ss << osgDB::getFilePath(baseName) << osgDB::getNativePathSeparator(); +- ss << (long int)image << ".inline_conv_generated.png"; // write the pointer location ++ ss << (intptr_t)image << ".inline_conv_generated.png"; // write the pointer location + std::string filename = ss.str(); + if (osgDB::writeImageFile(*image, filename)) { + image->setFileName(filename); diff --git a/mingw-w64-openscenegraph-git/giflib.patch b/mingw-w64-openscenegraph-git/giflib.patch deleted file mode 100644 index 0091cf5d60..0000000000 --- a/mingw-w64-openscenegraph-git/giflib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- OpenSceneGraph-3.2.1-rc3/src/osgPlugins/gif/ReaderWriterGIF.cpp.orig 2013-06-03 18:04:02.000000000 +0400 -+++ OpenSceneGraph-3.2.1-rc3/src/osgPlugins/gif/ReaderWriterGIF.cpp 2014-05-30 07:29:09.498200000 +0400 -@@ -561,7 +561,7 @@ - *width_ret = giffile->SWidth; - *height_ret = giffile->SHeight; - *numComponents_ret = 4; -- DGifCloseFile(giffile); -+ DGifCloseFile(giffile, NULL); - return buffer; - } - diff --git a/mingw-w64-openscenegraph-git/osg-collada-dae-fixes.patch b/mingw-w64-openscenegraph-git/osg-collada-dae-fixes.patch deleted file mode 100644 index 63c18ad970..0000000000 --- a/mingw-w64-openscenegraph-git/osg-collada-dae-fixes.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff -urN a/src/osgPlugins/dae/CMakeLists.txt b/src/osgPlugins/dae/CMakeLists.txt ---- a/src/osgPlugins/dae/CMakeLists.txt 2010-02-26 14:41:50.000000000 +0000 -+++ b/src/osgPlugins/dae/CMakeLists.txt 2013-09-10 01:57:49.547196400 +0100 -@@ -35,6 +35,8 @@ - ENDIF() - - ADD_DEFINITIONS(-DNO_BOOST) -+ADD_DEFINITIONS(-DCOLLADA_DOM_USING_141) -+ADD_DEFINITIONS(-DCOLLADA_DOM_SUPPORT141) - - IF(COLLADA_USE_STATIC) - IF(WIN32) -diff -urN a/src/osgPlugins/dae/daeReader.cpp b/src/osgPlugins/dae/daeReader.cpp ---- a/src/osgPlugins/dae/daeReader.cpp 2013-01-07 15:03:22.000000000 +0000 -+++ b/src/osgPlugins/dae/daeReader.cpp 2013-09-10 01:28:39.529472400 +0100 -@@ -12,8 +12,7 @@ - */ - - #include "daeReader.h" --#include --#include -+#include - #include - #include - #include -diff -urN a/src/osgPlugins/dae/daeReader.h b/src/osgPlugins/dae/daeReader.h ---- a/src/osgPlugins/dae/daeReader.h 2012-10-08 13:54:40.000000000 +0100 -+++ b/src/osgPlugins/dae/daeReader.h 2013-09-10 01:25:45.195834800 +0100 -@@ -35,26 +35,6 @@ - #include - #include - --class domBind_material; --class domCamera; --//class domCommon_color_or_texture_type; --class domCommon_float_or_param_type; --class domGeometry; --class domInstance_controller; --class domInstance_geometry; --class domInstanceWithExtra; --class domLight; --class domLookat; --class domMatrix; --class domNode; --class domP; --class domProfile_COMMON; --class domScale; --class domSkew; --class domTranslate; --class domRotate; --class domVisual_scene; -- - namespace osgDAE - { - -diff -urN a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp ---- a/src/osgPlugins/dae/daeRMaterials.cpp 2013-06-21 12:59:04.000000000 +0100 -+++ b/src/osgPlugins/dae/daeRMaterials.cpp 2013-09-10 01:46:09.370785300 +0100 -@@ -12,11 +12,11 @@ - */ - - #include "daeReader.h" --#include "ReaderWriterDAE.h" -+#include "ReaderWriterDAE.h" - - #include - #include --#include -+#include - #include - #include - #include -diff -urN a/src/osgPlugins/dae/daeRSceneObjects.cpp b/src/osgPlugins/dae/daeRSceneObjects.cpp ---- a/src/osgPlugins/dae/daeRSceneObjects.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/daeRSceneObjects.cpp 2013-09-10 01:46:38.028424300 +0100 -@@ -13,7 +13,7 @@ - - #include "daeReader.h" - #include --#include -+#include - #include - - #include -diff -urN a/src/osgPlugins/dae/daeRTransforms.cpp b/src/osgPlugins/dae/daeRTransforms.cpp ---- a/src/osgPlugins/dae/daeRTransforms.cpp 2012-02-09 14:11:36.000000000 +0000 -+++ b/src/osgPlugins/dae/daeRTransforms.cpp 2013-09-10 01:47:00.755310300 +0100 -@@ -13,7 +13,7 @@ - - #include "daeReader.h" - #include --#include -+#include - #include - - #include -diff -urN a/src/osgPlugins/dae/daeWAnimations.cpp b/src/osgPlugins/dae/daeWAnimations.cpp ---- a/src/osgPlugins/dae/daeWAnimations.cpp 2011-05-16 12:07:20.000000000 +0100 -+++ b/src/osgPlugins/dae/daeWAnimations.cpp 2013-09-10 01:47:19.941746700 +0100 -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - //#include - //#include - -diff -urN a/src/osgPlugins/dae/daeWMaterials.cpp b/src/osgPlugins/dae/daeWMaterials.cpp ---- a/src/osgPlugins/dae/daeWMaterials.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/daeWMaterials.cpp 2013-09-10 01:48:30.573715800 +0100 -@@ -14,7 +14,7 @@ - #include "daeWriter.h" - #include "ReaderWriterDAE.h" - --#include -+#include - #include - #include - #include -diff -urN a/src/osgPlugins/dae/daeWriter.h b/src/osgPlugins/dae/daeWriter.h ---- a/src/osgPlugins/dae/daeWriter.h 2011-05-16 12:07:20.000000000 +0100 -+++ b/src/osgPlugins/dae/daeWriter.h 2013-09-10 01:47:58.002079700 +0100 -@@ -51,23 +51,6 @@ - #include - - --class domCOLLADA; --class domGeometry; --class domInstance_geometry; --class domLibrary_cameras; --class domLibrary_effects; --class domLibrary_geometries; --class domLibrary_lights; --class domLibrary_materials; --class domLibrary_visual_scenes; --class domLibrary_animations; --class domMaterial; --class domMesh; --class domNode; --class domSource; --class domVisual_scene; --class domP; -- - namespace osgDAE { - - /// Convert value to string using it's stream operator -diff -urN a/src/osgPlugins/dae/daeWSceneObjects.cpp b/src/osgPlugins/dae/daeWSceneObjects.cpp ---- a/src/osgPlugins/dae/daeWSceneObjects.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/daeWSceneObjects.cpp 2013-09-10 01:48:54.747785500 +0100 -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - //#include - //#include - -diff -urN a/src/osgPlugins/dae/daeWTransforms.cpp b/src/osgPlugins/dae/daeWTransforms.cpp ---- a/src/osgPlugins/dae/daeWTransforms.cpp 2011-05-16 12:07:20.000000000 +0100 -+++ b/src/osgPlugins/dae/daeWTransforms.cpp 2013-09-10 01:49:16.801085900 +0100 -@@ -17,7 +17,7 @@ - - #include - #include --#include -+#include - - #include - #include -diff -urN a/src/osgPlugins/dae/domSourceReader.cpp b/src/osgPlugins/dae/domSourceReader.cpp ---- a/src/osgPlugins/dae/domSourceReader.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/domSourceReader.cpp 2013-09-10 01:50:57.512874700 +0100 -@@ -15,7 +15,7 @@ - - #include - --using namespace osgDAE; -+namespace osgDAE { - - domSourceReader::domSourceReader() : m_array_type( None ), m_count( 0 ), srcInit( NULL )//, initialized( false ) - {} -@@ -160,3 +160,4 @@ - OSG_WARN << "No float array found" << std::endl; - } - } -+} -diff -urN a/src/osgPlugins/dae/domSourceReader.h b/src/osgPlugins/dae/domSourceReader.h ---- a/src/osgPlugins/dae/domSourceReader.h 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/domSourceReader.h 2013-09-10 01:53:55.857021500 +0100 -@@ -14,11 +14,11 @@ - #ifndef _DOM_SRC_CONV_H_ - #define _DOM_SRC_CONV_H_ - -+#include -+ - #include - #include - --class domSource; -- - namespace osgDAE { - - /** diff --git a/mingw-w64-openscenegraph/PKGBUILD b/mingw-w64-openscenegraph/PKGBUILD index 15dc3633b2..8bc81c1287 100644 --- a/mingw-w64-openscenegraph/PKGBUILD +++ b/mingw-w64-openscenegraph/PKGBUILD @@ -1,108 +1,111 @@ # Maintainer: Alexey Pavlov _realname=OpenSceneGraph - +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug") -_pkgver=3.2.1 +_pkgver=3.5.1 pkgver=${_pkgver//-/} pkgrel=1 pkgdesc="Open source high performance 3D graphics toolkit (mingw-w64)" arch=('any') url="http://www.openscenegraph.org/" license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-cmake") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-cmake") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-collada-dom-svn" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-lua" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-SDL" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-qt5" - "${MINGW_PACKAGE_PREFIX}-gtkglext" - "${MINGW_PACKAGE_PREFIX}-giflib" - "${MINGW_PACKAGE_PREFIX}-coin3d" - "${MINGW_PACKAGE_PREFIX}-wxWidgets" - ) -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-collada-dom-svn" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-fltk" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-gdal" + "${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-gtkglext" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-SDL" + "${MINGW_PACKAGE_PREFIX}-SDL2" + "${MINGW_PACKAGE_PREFIX}-poppler" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-wxWidgets" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') -source=(http://www.openscenegraph.org/downloads/developer_releases/${_realname}-${_pkgver}.zip - osg-collada-dae-fixes.patch +source=(http://trac.openscenegraph.org/downloads/developer_releases/${_realname}-${_pkgver}.zip find-collada.patch + find-ffmpeg.patch find-freetype.patch - giflib.patch) -md5sums=('4f95206a1eef218bd007c3b43e1334f5' - '45d0668f56c5e4ca58002f38fd3eb4a0' - '668def9c99f044db9a8215fa927d6ac2' + additional-gl-header.patch + fix-cast-error.patch + add-gstreamer-cflags.patch) +md5sums=('71b97b18f11b6c361631fc3e34fb4b67' + '18ce956c1889babc6515828b8200e864' + 'a3b612082a47d6a7b4b41f8c576fda7e' '9ab69e1cd26826196fac5b3f01e6cb95' - '849f641c915f17db85a49b355bf63a17') + 'e889e10100a1f3e07212c01603712594' + '5599204490bf9f03cdd5871b938e3338' + '347e2d4d74a3b4a6a24e4264b27e2798') prepare() { cd "${srcdir}/${_realname}-${_pkgver}" - patch -p1 -i ${srcdir}/osg-collada-dae-fixes.patch patch -p1 -i ${srcdir}/find-collada.patch + patch -p1 -i ${srcdir}/find-ffmpeg.patch patch -p1 -i ${srcdir}/find-freetype.patch - patch -p1 -i ${srcdir}/giflib.patch + patch -p1 -i ${srcdir}/additional-gl-header.patch + patch -p1 -i ${srcdir}/fix-cast-error.patch + patch -p1 -i ${srcdir}/add-gstreamer-cflags.patch } build() { export FREETYPE_DIR=${MINGW_PREFIX} - - for builddir in {Release,Debug}-${MINGW_CHOST}; do - [[ -d $builddir ]] && rm -rf $builddir - mkdir -p $builddir - pushd $builddir - [[ "${builddir%-${MINGW_CHOST}}" == "Release" ]] && { - local _opts="-DBUILD_OSG_EXAMPLES:BOOL=ON" - local _postfix= - } || { - local _opts="-DBUILD_OSG_EXAMPLES:BOOL=OFF -DBUILD_OSG_APPLICATIONS=OFF" - local _postfix="-debug" - } - - msg "Building ${builddir%-${MINGW_CHOST}} version..." - - ${MINGW_PREFIX}/bin/cmake.exe \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${_postfix}${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=${builddir%-${MINGW_CHOST}} \ - -DACTUAL_3DPARTY_DIR=${MINGW_PREFIX} \ - ${_opts} \ - ../${_realname}-${_pkgver} - make + for builddir in {Release,Debug}-${MINGW_CHOST}; do + [[ -d ${builddir} ]] && rm -rf ${builddir} + mkdir -p ${builddir} + pushd ${builddir} + [[ "${builddir%-${MINGW_CHOST}}" == "Release" ]] && { + local _opts="-DBUILD_OSG_EXAMPLES:BOOL=ON" + } || { + local _opts="-DBUILD_OSG_EXAMPLES:BOOL=OFF -DBUILD_OSG_APPLICATIONS=OFF" + } + + msg "Building ${builddir%-${MINGW_CHOST}} version..." + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + COLLADA_DIR=${MINGW_PREFIX} \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=${builddir%-${MINGW_CHOST}} \ + ${_opts} \ + ../${_realname}-${_pkgver} + + make popd done } package_release() { - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - cd Release-${MINGW_CHOST} - make -j1 install - - for ff in ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/*.pc; do - sed -i "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" $ff - done + make DESTDIR=${pkgdir} -j1 install + } package_debug() { depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=$pkgver") options=('staticlibs' '!strip') pkgdesc="Open source high performance 3D graphics toolkit (debug) (mingw-w64)" - + cd Debug-${MINGW_CHOST} - make -j1 install + make DESTDIR=${pkgdir} -j1 install rm -rf ${pkgdir}${MINGW_PREFIX}/include rm -rf ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig diff --git a/mingw-w64-openscenegraph/add-gstreamer-cflags.patch b/mingw-w64-openscenegraph/add-gstreamer-cflags.patch new file mode 100644 index 0000000000..bc89e923e7 --- /dev/null +++ b/mingw-w64-openscenegraph/add-gstreamer-cflags.patch @@ -0,0 +1,32 @@ +--- OpenSceneGraph-3.5.1/CMakeLists.txt.orig 2015-11-09 18:52:06.000000000 +0300 ++++ OpenSceneGraph-3.5.1/CMakeLists.txt 2015-11-11 14:14:03.911230800 +0300 +@@ -668,6 +668,9 @@ + FIND_PACKAGE(OurDCMTK) + FIND_PACKAGE(FFmpeg) + FIND_PACKAGE(GStreamer COMPONENTS app pbutils) ++ IF(GStreamer_FOUND) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GStreamer_CFLAGS}") ++ ENDIF() + FIND_PACKAGE(GLIB COMPONENTS gobject) + FIND_PACKAGE(DirectShow) + FIND_PACKAGE(SDL2) +--- OpenSceneGraph-3.5.1/CMakeModules/FindGStreamer.cmake.orig 2015-11-11 14:26:56.738940300 +0300 ++++ OpenSceneGraph-3.5.1/CMakeModules/FindGStreamer.cmake 2015-11-11 14:27:12.773336700 +0300 +@@ -65,7 +65,7 @@ + # ) + #endmacro() + +-if (WIN32) ++if (WIN32 AND NOT MINGW) + macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library) + find_path(${_component_prefix}_INCLUDE_DIRS + NAMES ${_header} +@@ -83,7 +83,7 @@ + find_package(PkgConfig) + + macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library) +- pkg_check_modules(${_component_prefix} QUIET ${_pkgconfig_name}) ++ pkg_check_modules(${_component_prefix} ${_pkgconfig_name}) + + # find_path(${_component_prefix}_INCLUDE_DIRS + # NAMES ${_header} diff --git a/mingw-w64-openscenegraph/additional-gl-header.patch b/mingw-w64-openscenegraph/additional-gl-header.patch new file mode 100644 index 0000000000..333cf52dd3 --- /dev/null +++ b/mingw-w64-openscenegraph/additional-gl-header.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph/CMakeLists.txt.orig 2015-01-25 14:09:28.105400000 +0300 ++++ OpenSceneGraph/CMakeLists.txt 2015-01-25 14:09:37.496600000 +0300 +@@ -508,7 +508,7 @@ + SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required") + ELSE() + SET(OPENGL_HEADER1 "#include " CACHE STRING "#include<> line for OpenGL Header") +- SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required") ++ SET(OPENGL_HEADER2 "#include " CACHE STRING "#include<> line for additional OpenGL Headers if required") + ENDIF() + ENDIF() + diff --git a/mingw-w64-openscenegraph/find-collada.patch b/mingw-w64-openscenegraph/find-collada.patch index a31c92ba78..debfd702c5 100644 --- a/mingw-w64-openscenegraph/find-collada.patch +++ b/mingw-w64-openscenegraph/find-collada.patch @@ -1,20 +1,19 @@ --- OpenSceneGraph-3.2.1-rc1/CMakeModules/FindCOLLADA.cmake.orig 2013-12-25 00:28:48.219200000 +0400 +++ OpenSceneGraph-3.2.1-rc1/CMakeModules/FindCOLLADA.cmake 2013-12-25 01:05:55.671600000 +0400 -@@ -19,7 +19,7 @@ +@@ -17,7 +17,7 @@ + # Check if COLLADA_DIR is set, otherwise use ACTUAL_3DPARTY_DIR: + SET( COLLADA_ENV_VAR_AVAILABLE $ENV{COLLADA_DIR} ) IF ( COLLADA_ENV_VAR_AVAILABLE ) - SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory" FORCE) - ELSE ( COLLADA_ENV_VAR_AVAILABLE ) -- SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) -+ SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/collada-dom2.4/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) - ENDIF( COLLADA_ENV_VAR_AVAILABLE ) - - -@@ -66,7 +66,7 @@ - ) - - FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY -- NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 -+ NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 libcolladadom141 libcollada-dom141 - PATHS - ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4 - $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4 +- SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory" FORCE) ++ SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/include/collada-dom2.4/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) + ELSE () + SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) + ENDIF() +@@ -46,6 +46,7 @@ + FIND_PATH(COLLADA_INCLUDE_DIR dae.h + ${COLLADA_DOM_ROOT}/include + $ENV{COLLADA_DIR}/include ++ $ENV{COLLADA_DIR}/include/collada-dom2.4 + $ENV{COLLADA_DIR} + ~/Library/Frameworks + /Library/Frameworks diff --git a/mingw-w64-openscenegraph/find-ffmpeg.patch b/mingw-w64-openscenegraph/find-ffmpeg.patch new file mode 100644 index 0000000000..4aea7b48b2 --- /dev/null +++ b/mingw-w64-openscenegraph/find-ffmpeg.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph-3.4.0/CMakeModules/FindFFmpeg.cmake.orig 2015-09-04 12:00:20.413110800 +0300 ++++ OpenSceneGraph-3.4.0/CMakeModules/FindFFmpeg.cmake 2015-09-04 12:00:25.354393500 +0300 +@@ -96,7 +96,7 @@ + SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG") + + # find stdint.h +-IF(WIN32) ++IF(MSVC) + + FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h + PATHS diff --git a/mingw-w64-openscenegraph/fix-cast-error.patch b/mingw-w64-openscenegraph/fix-cast-error.patch new file mode 100644 index 0000000000..1f8dd88886 --- /dev/null +++ b/mingw-w64-openscenegraph/fix-cast-error.patch @@ -0,0 +1,11 @@ +--- OpenSceneGraph/src/osgPlugins/osgjs/WriteVisitor.cpp.orig 2015-05-08 12:19:06.415757900 +0300 ++++ OpenSceneGraph/src/osgPlugins/osgjs/WriteVisitor.cpp 2015-05-08 12:19:00.109388600 +0300 +@@ -225,7 +225,7 @@ + // no image file so use this inline name image and create a file + std::stringstream ss; + ss << osgDB::getFilePath(baseName) << osgDB::getNativePathSeparator(); +- ss << (long int)image << ".inline_conv_generated.png"; // write the pointer location ++ ss << (intptr_t)image << ".inline_conv_generated.png"; // write the pointer location + std::string filename = ss.str(); + if (osgDB::writeImageFile(*image, filename)) { + image->setFileName(filename); diff --git a/mingw-w64-openscenegraph/giflib.patch b/mingw-w64-openscenegraph/giflib.patch deleted file mode 100644 index 0091cf5d60..0000000000 --- a/mingw-w64-openscenegraph/giflib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- OpenSceneGraph-3.2.1-rc3/src/osgPlugins/gif/ReaderWriterGIF.cpp.orig 2013-06-03 18:04:02.000000000 +0400 -+++ OpenSceneGraph-3.2.1-rc3/src/osgPlugins/gif/ReaderWriterGIF.cpp 2014-05-30 07:29:09.498200000 +0400 -@@ -561,7 +561,7 @@ - *width_ret = giffile->SWidth; - *height_ret = giffile->SHeight; - *numComponents_ret = 4; -- DGifCloseFile(giffile); -+ DGifCloseFile(giffile, NULL); - return buffer; - } - diff --git a/mingw-w64-openscenegraph/osg-collada-dae-fixes.patch b/mingw-w64-openscenegraph/osg-collada-dae-fixes.patch deleted file mode 100644 index 63c18ad970..0000000000 --- a/mingw-w64-openscenegraph/osg-collada-dae-fixes.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff -urN a/src/osgPlugins/dae/CMakeLists.txt b/src/osgPlugins/dae/CMakeLists.txt ---- a/src/osgPlugins/dae/CMakeLists.txt 2010-02-26 14:41:50.000000000 +0000 -+++ b/src/osgPlugins/dae/CMakeLists.txt 2013-09-10 01:57:49.547196400 +0100 -@@ -35,6 +35,8 @@ - ENDIF() - - ADD_DEFINITIONS(-DNO_BOOST) -+ADD_DEFINITIONS(-DCOLLADA_DOM_USING_141) -+ADD_DEFINITIONS(-DCOLLADA_DOM_SUPPORT141) - - IF(COLLADA_USE_STATIC) - IF(WIN32) -diff -urN a/src/osgPlugins/dae/daeReader.cpp b/src/osgPlugins/dae/daeReader.cpp ---- a/src/osgPlugins/dae/daeReader.cpp 2013-01-07 15:03:22.000000000 +0000 -+++ b/src/osgPlugins/dae/daeReader.cpp 2013-09-10 01:28:39.529472400 +0100 -@@ -12,8 +12,7 @@ - */ - - #include "daeReader.h" --#include --#include -+#include - #include - #include - #include -diff -urN a/src/osgPlugins/dae/daeReader.h b/src/osgPlugins/dae/daeReader.h ---- a/src/osgPlugins/dae/daeReader.h 2012-10-08 13:54:40.000000000 +0100 -+++ b/src/osgPlugins/dae/daeReader.h 2013-09-10 01:25:45.195834800 +0100 -@@ -35,26 +35,6 @@ - #include - #include - --class domBind_material; --class domCamera; --//class domCommon_color_or_texture_type; --class domCommon_float_or_param_type; --class domGeometry; --class domInstance_controller; --class domInstance_geometry; --class domInstanceWithExtra; --class domLight; --class domLookat; --class domMatrix; --class domNode; --class domP; --class domProfile_COMMON; --class domScale; --class domSkew; --class domTranslate; --class domRotate; --class domVisual_scene; -- - namespace osgDAE - { - -diff -urN a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp ---- a/src/osgPlugins/dae/daeRMaterials.cpp 2013-06-21 12:59:04.000000000 +0100 -+++ b/src/osgPlugins/dae/daeRMaterials.cpp 2013-09-10 01:46:09.370785300 +0100 -@@ -12,11 +12,11 @@ - */ - - #include "daeReader.h" --#include "ReaderWriterDAE.h" -+#include "ReaderWriterDAE.h" - - #include - #include --#include -+#include - #include - #include - #include -diff -urN a/src/osgPlugins/dae/daeRSceneObjects.cpp b/src/osgPlugins/dae/daeRSceneObjects.cpp ---- a/src/osgPlugins/dae/daeRSceneObjects.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/daeRSceneObjects.cpp 2013-09-10 01:46:38.028424300 +0100 -@@ -13,7 +13,7 @@ - - #include "daeReader.h" - #include --#include -+#include - #include - - #include -diff -urN a/src/osgPlugins/dae/daeRTransforms.cpp b/src/osgPlugins/dae/daeRTransforms.cpp ---- a/src/osgPlugins/dae/daeRTransforms.cpp 2012-02-09 14:11:36.000000000 +0000 -+++ b/src/osgPlugins/dae/daeRTransforms.cpp 2013-09-10 01:47:00.755310300 +0100 -@@ -13,7 +13,7 @@ - - #include "daeReader.h" - #include --#include -+#include - #include - - #include -diff -urN a/src/osgPlugins/dae/daeWAnimations.cpp b/src/osgPlugins/dae/daeWAnimations.cpp ---- a/src/osgPlugins/dae/daeWAnimations.cpp 2011-05-16 12:07:20.000000000 +0100 -+++ b/src/osgPlugins/dae/daeWAnimations.cpp 2013-09-10 01:47:19.941746700 +0100 -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - //#include - //#include - -diff -urN a/src/osgPlugins/dae/daeWMaterials.cpp b/src/osgPlugins/dae/daeWMaterials.cpp ---- a/src/osgPlugins/dae/daeWMaterials.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/daeWMaterials.cpp 2013-09-10 01:48:30.573715800 +0100 -@@ -14,7 +14,7 @@ - #include "daeWriter.h" - #include "ReaderWriterDAE.h" - --#include -+#include - #include - #include - #include -diff -urN a/src/osgPlugins/dae/daeWriter.h b/src/osgPlugins/dae/daeWriter.h ---- a/src/osgPlugins/dae/daeWriter.h 2011-05-16 12:07:20.000000000 +0100 -+++ b/src/osgPlugins/dae/daeWriter.h 2013-09-10 01:47:58.002079700 +0100 -@@ -51,23 +51,6 @@ - #include - - --class domCOLLADA; --class domGeometry; --class domInstance_geometry; --class domLibrary_cameras; --class domLibrary_effects; --class domLibrary_geometries; --class domLibrary_lights; --class domLibrary_materials; --class domLibrary_visual_scenes; --class domLibrary_animations; --class domMaterial; --class domMesh; --class domNode; --class domSource; --class domVisual_scene; --class domP; -- - namespace osgDAE { - - /// Convert value to string using it's stream operator -diff -urN a/src/osgPlugins/dae/daeWSceneObjects.cpp b/src/osgPlugins/dae/daeWSceneObjects.cpp ---- a/src/osgPlugins/dae/daeWSceneObjects.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/daeWSceneObjects.cpp 2013-09-10 01:48:54.747785500 +0100 -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - //#include - //#include - -diff -urN a/src/osgPlugins/dae/daeWTransforms.cpp b/src/osgPlugins/dae/daeWTransforms.cpp ---- a/src/osgPlugins/dae/daeWTransforms.cpp 2011-05-16 12:07:20.000000000 +0100 -+++ b/src/osgPlugins/dae/daeWTransforms.cpp 2013-09-10 01:49:16.801085900 +0100 -@@ -17,7 +17,7 @@ - - #include - #include --#include -+#include - - #include - #include -diff -urN a/src/osgPlugins/dae/domSourceReader.cpp b/src/osgPlugins/dae/domSourceReader.cpp ---- a/src/osgPlugins/dae/domSourceReader.cpp 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/domSourceReader.cpp 2013-09-10 01:50:57.512874700 +0100 -@@ -15,7 +15,7 @@ - - #include - --using namespace osgDAE; -+namespace osgDAE { - - domSourceReader::domSourceReader() : m_array_type( None ), m_count( 0 ), srcInit( NULL )//, initialized( false ) - {} -@@ -160,3 +160,4 @@ - OSG_WARN << "No float array found" << std::endl; - } - } -+} -diff -urN a/src/osgPlugins/dae/domSourceReader.h b/src/osgPlugins/dae/domSourceReader.h ---- a/src/osgPlugins/dae/domSourceReader.h 2012-03-21 17:36:20.000000000 +0000 -+++ b/src/osgPlugins/dae/domSourceReader.h 2013-09-10 01:53:55.857021500 +0100 -@@ -14,11 +14,11 @@ - #ifndef _DOM_SRC_CONV_H_ - #define _DOM_SRC_CONV_H_ - -+#include -+ - #include - #include - --class domSource; -- - namespace osgDAE { - - /** diff --git a/mingw-w64-openshadinglanguage-git/0001-mingw-w64-fix.patch b/mingw-w64-openshadinglanguage-git/0001-mingw-w64-fix.patch deleted file mode 100644 index cd84a7a1ab..0000000000 --- a/mingw-w64-openshadinglanguage-git/0001-mingw-w64-fix.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- OpenShadingLanguage-Release-1.4.0/src/liboslcomp/CMakeLists.txt.orig 2013-12-30 03:09:12.982200000 +0400 -+++ OpenShadingLanguage-Release-1.4.0/src/liboslcomp/CMakeLists.txt 2013-12-30 03:09:24.869400000 +0400 -@@ -23,9 +23,4 @@ - TARGET_LINK_LIBRARIES ( oslcomp ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS}) - LINK_ILMBASE ( oslcomp ) - --if (BUILDSTATIC) -- INSTALL ( TARGETS oslcomp LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) --else () -- INSTALL ( TARGETS oslcomp LIBRARY DESTINATION lib ) --endif () -- -+INSTALL ( TARGETS oslcomp LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ---- OpenShadingLanguage-Release-1.4.0/src/liboslquery/CMakeLists.txt.orig 2013-11-25 22:41:29.000000000 +0400 -+++ OpenShadingLanguage-Release-1.4.0/src/liboslquery/CMakeLists.txt 2013-12-30 03:16:20.074200000 +0400 -@@ -14,8 +14,4 @@ - TARGET_LINK_LIBRARIES ( oslquery ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ) - LINK_ILMBASE ( oslquery ) - --if (BUILDSTATIC) -- INSTALL ( TARGETS oslquery LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) --else () -- INSTALL ( TARGETS oslquery LIBRARY DESTINATION lib ) --endif () -+INSTALL ( TARGETS oslquery LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ---- OpenShadingLanguage-Release-1.4.0/src/liboslexec/CMakeLists.txt.orig 2013-12-30 03:15:11.207600000 +0400 -+++ OpenShadingLanguage-Release-1.4.0/src/liboslexec/CMakeLists.txt 2013-12-30 03:15:43.577600000 +0400 -@@ -129,11 +129,7 @@ - ADD_DEPENDENCIES (oslexec "${CMAKE_CURRENT_SOURCE_DIR}/liboslcexec.map") - LINK_ILMBASE ( oslexec ) - --if (BUILDSTATIC) -- INSTALL ( TARGETS oslexec LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) --else () -- INSTALL ( TARGETS oslexec LIBRARY DESTINATION lib ) --endif () -+INSTALL ( TARGETS oslexec LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - - # Unit tests - add_executable (closure_test closure_test.cpp) ---- OpenShadingLanguage-Release-1.4.0/src/testshade/CMakeLists.txt.orig 2013-12-30 03:16:54.039600000 +0400 -+++ OpenShadingLanguage-Release-1.4.0/src/testshade/CMakeLists.txt 2013-12-30 03:17:18.561400000 +0400 -@@ -15,11 +15,7 @@ - TARGET_LINK_LIBRARIES (libtestshade oslexec oslcomp oslquery ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LIBRARY} ) - SET_TARGET_PROPERTIES (libtestshade PROPERTIES PREFIX "") - --if (BUILDSTATIC) -- INSTALL ( TARGETS libtestshade LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) --else () -- INSTALL (TARGETS libtestshade LIBRARY DESTINATION lib ) --endif () -+INSTALL ( TARGETS libtestshade LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - - # The 'testshade_dso' executable - ADD_EXECUTABLE ( testshade_dso testshade_dso.cpp ) diff --git a/mingw-w64-openshadinglanguage-git/0001-osolex-Define-isatty-as-_isatty-for-_WIN32.patch b/mingw-w64-openshadinglanguage-git/0001-osolex-Define-isatty-as-_isatty-for-_WIN32.patch new file mode 100644 index 0000000000..8de2e4845b --- /dev/null +++ b/mingw-w64-openshadinglanguage-git/0001-osolex-Define-isatty-as-_isatty-for-_WIN32.patch @@ -0,0 +1,28 @@ +From 931587b3c4ef03a0c9a7c86b85a531a1c13e0dc3 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 11 Oct 2015 21:35:24 +0100 +Subject: [PATCH 1/3] osolex: Define isatty as _isatty for _WIN32 + +--- + src/liboslexec/osolex.l | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/liboslexec/osolex.l b/src/liboslexec/osolex.l +index 2414e8b..6e50519 100644 +--- a/src/liboslexec/osolex.l ++++ b/src/liboslexec/osolex.l +@@ -106,6 +106,11 @@ using namespace OSL::pvt; + #define YY_NO_UNISTD_H + #endif + ++#ifdef _WIN32 ++#include ++#define isatty _isatty ++#endif ++ + %} + + /* Declare modes */ +-- +2.6.0 + diff --git a/mingw-w64-openshadinglanguage-git/0002-Use-getcwd-for-older-OIIO.patch b/mingw-w64-openshadinglanguage-git/0002-Use-getcwd-for-older-OIIO.patch new file mode 100644 index 0000000000..f92efe7568 --- /dev/null +++ b/mingw-w64-openshadinglanguage-git/0002-Use-getcwd-for-older-OIIO.patch @@ -0,0 +1,57 @@ +From 7d85462a08c0084a76f29d6c8183fd3ac94544cf Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 11 Oct 2015 22:04:44 +0100 +Subject: [PATCH 2/3] Use getcwd() for older OIIO + +.. and _getcwd() for _WIN32 +--- + src/liboslcomp/oslcomp.cpp | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp +index 93ff580..1503a32 100644 +--- a/src/liboslcomp/oslcomp.cpp ++++ b/src/liboslcomp/oslcomp.cpp +@@ -50,6 +50,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + ++#if defined(_WIN32) ++#include ++#define getcwd _getcwd ++#endif + + OSL_NAMESPACE_ENTER + +@@ -341,7 +345,13 @@ OSLCompilerImpl::compile (string_view filename, + + std::vector defines; + std::vector includepaths; ++#if OPENIMAGEIO_VERSION >= 10600 + m_cwd = OIIO::Filesystem::current_path(); ++#else ++ char tmpcwd[PATH_MAX]; ++ getcwd(tmpcwd, PATH_MAX - 1); ++ m_cwd = std::string(tmpcwd); ++#endif + m_main_filename = filename; + + // Determine where the installed shader include directory is, and +@@ -430,8 +440,13 @@ OSLCompilerImpl::compile_buffer (string_view sourcecode, + string_view stdoslpath) + { + string_view filename (""); +- ++#if OPENIMAGEIO_VERSION >= 10600 + m_cwd = OIIO::Filesystem::current_path(); ++#else ++ char tmpcwd[PATH_MAX]; ++ getcwd(tmpcwd, PATH_MAX - 1); ++ m_cwd = std::string(tmpcwd); ++#endif + m_main_filename = filename; + + // Determine where the installed shader include directory is, and +-- +2.6.0 + diff --git a/mingw-w64-openshadinglanguage-git/0003-Fix-unsigned-signed-compares.patch b/mingw-w64-openshadinglanguage-git/0003-Fix-unsigned-signed-compares.patch new file mode 100644 index 0000000000..4b287cf03e --- /dev/null +++ b/mingw-w64-openshadinglanguage-git/0003-Fix-unsigned-signed-compares.patch @@ -0,0 +1,74 @@ +From ffc29ce77e83fc312b97e424a64a1bd2a7f01d39 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 11 Oct 2015 22:20:32 +0100 +Subject: [PATCH 3/3] Fix unsigned/signed compares + +--- + src/liboslexec/shadeimage.cpp | 2 +- + src/liboslexec/shadingsys.cpp | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/liboslexec/shadeimage.cpp b/src/liboslexec/shadeimage.cpp +index 3e9c244..10a85e3 100644 +--- a/src/liboslexec/shadeimage.cpp ++++ b/src/liboslexec/shadeimage.cpp +@@ -198,7 +198,7 @@ shade_image (ShadingSystem &shadingsys, ShaderGroup &group, + for (int c = 0; c < tvals; ++c) + p[chan++] = ((const float *)data)[c]; + } else if (t.basetype == TypeDesc::INT) { +- for (int c = 0; c < t.numelements()*t.aggregate; ++c) ++ for (size_t c = 0; c < t.numelements()*t.aggregate; ++c) + p[chan++] = ((const int *)data)[c]; + } + // N.B. Drop any outputs that aren't float- or int-based +diff --git a/src/liboslexec/shadingsys.cpp b/src/liboslexec/shadingsys.cpp +index d21f0a3..15046dd 100644 +--- a/src/liboslexec/shadingsys.cpp ++++ b/src/liboslexec/shadingsys.cpp +@@ -1298,14 +1298,14 @@ ShadingSystemImpl::getattribute (ShaderGroup *group, string_view name, + } + if (name == "num_entry_layers" && type.basetype == TypeDesc::INT) { + size_t n = 0; +- for (size_t i = 0; i < group->nlayers(); ++i) ++ for (size_t i = 0; i < (size_t)group->nlayers(); ++i) + n += group->layer(i)->entry_layer(); + *(int *)val = n; + return true; + } + if (name == "entry_layers" && type.basetype == TypeDesc::STRING) { + size_t n = 0; +- for (size_t i = 0; i < group->nlayers() && i < type.numelements(); ++i) ++ for (size_t i = 0; i < (size_t)group->nlayers() && i < type.numelements(); ++i) + if (group->layer(i)->entry_layer()) + ((ustring *)val)[n++] = (*group)[i]->layername(); + for (size_t i = n; i < type.numelements(); ++i) +@@ -2097,7 +2097,7 @@ ShadingSystemImpl::ShaderGroupBegin (string_view groupname, + } + // Zero-pad if we parsed fewer values than we needed + intvals.resize (type.numelements()*type.aggregate, 0); +- ASSERT (type.numelements()*type.aggregate == int(intvals.size())); ++ ASSERT (type.numelements()*type.aggregate == intvals.size()); + Parameter (paramname, type, &intvals[0], lockgeom); + } else if (type.basetype == TypeDesc::FLOAT) { + floatvals.clear (); +@@ -2117,7 +2117,7 @@ ShadingSystemImpl::ShaderGroupBegin (string_view groupname, + } + // Zero-pad if we parsed fewer values than we needed + floatvals.resize (type.numelements()*type.aggregate, 0); +- ASSERT (type.numelements()*type.aggregate == int(floatvals.size())); ++ ASSERT (type.numelements()*type.aggregate == floatvals.size()); + Parameter (paramname, type, &floatvals[0], lockgeom); + } else if (type.basetype == TypeDesc::STRING) { + stringvals.clear (); +@@ -2147,7 +2147,7 @@ ShadingSystemImpl::ShaderGroupBegin (string_view groupname, + } + // Zero-pad if we parsed fewer values than we needed + stringvals.resize (type.numelements()*type.aggregate, ustring()); +- ASSERT (type.numelements()*type.aggregate == int(stringvals.size())); ++ ASSERT (type.numelements()*type.aggregate == stringvals.size()); + Parameter (paramname, type, &stringvals[0], lockgeom); + } + +-- +2.6.0 + diff --git a/mingw-w64-openshadinglanguage-git/0004-use-find_package-for-LLVM.patch b/mingw-w64-openshadinglanguage-git/0004-use-find_package-for-LLVM.patch deleted file mode 100644 index d9cb3e7ab1..0000000000 --- a/mingw-w64-openshadinglanguage-git/0004-use-find_package-for-LLVM.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- OpenShadingLanguage-Release-1.4.0/src/liboslexec/CMakeLists.txt.orig 2014-01-06 01:46:24.519674100 +0000 -+++ OpenShadingLanguage-Release-1.4.0/src/liboslexec/CMakeLists.txt 2014-01-06 01:46:49.636363500 +0000 -@@ -68,6 +68,20 @@ - LIST (APPEND LLVM_COMPILE_FLAGS "-D${def}") - endforeach() - -+ # From http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project -+ find_package(LLVM) -+ -+ if( NOT LLVM_FOUND ) -+ message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.") -+ endif() -+ -+ include_directories( ${LLVM_INCLUDE_DIRS} ) -+ link_directories( ${LLVM_LIBRARY_DIRS} ) -+ -+ llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native) -+ -+ target_link_libraries(${REQ_LLVM_LIBRARIES}) -+ - # First try looking in their build (clang++ first, then llvm-g++) - FIND_PROGRAM(LLVM_BC_GENERATOR NAMES "clang++" "llvm-g++" PATHS "${LLVM_DIRECTORY}/bin" NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH) - diff --git a/mingw-w64-openshadinglanguage-git/0006-Fix-weird-array-out-of-bounds-error.patch b/mingw-w64-openshadinglanguage-git/0006-Fix-weird-array-out-of-bounds-error.patch deleted file mode 100644 index 189c880edd..0000000000 --- a/mingw-w64-openshadinglanguage-git/0006-Fix-weird-array-out-of-bounds-error.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- openshadinglanguage/src/liboslexec/llvm_ops.cpp.orig 2014-01-08 03:14:01.832821800 +0000 -+++ openshadinglanguage/src/liboslexec/llvm_ops.cpp 2014-01-08 03:14:27.816307900 +0000 -@@ -1388,14 +1388,15 @@ - ((float *)alpha)[0] = local_result[chans]; - - // Correct our str texture space gradients into xyz-space gradients -+ int max_chans = std::min(chans, 4); - if (dresultdx) -- for (int i = 0; i < chans; ++i) -+ for (int i = 0; i < max_chans; ++i) - ((float *)dresultdx)[i] = dresultds[i] * dPdx[0] + dresultdt[i] * dPdx[1] + dresultdr[i] * dPdx[2]; - if (dresultdy) -- for (int i = 0; i < chans; ++i) -+ for (int i = 0; i < max_chans; ++i) - ((float *)dresultdy)[i] = dresultds[i] * dPdy[0] + dresultdt[i] * dPdy[1] + dresultdr[i] * dPdy[2]; - if (dresultdz) -- for (int i = 0; i < chans; ++i) -+ for (int i = 0; i < max_chans; ++i) - ((float *)dresultdz)[i] = dresultds[i] * dPdz[0] + dresultdt[i] * dPdz[1] + dresultdr[i] * dPdz[2]; - if (dalphadx) - ((float *)dalphadx)[0] = dresultds[chans] * dPdx[0] + dresultdt[chans] * dPdx[1] + dresultdr[chans] * dPdx[2]; diff --git a/mingw-w64-openshadinglanguage-git/0008-Install-dlls.patch b/mingw-w64-openshadinglanguage-git/0008-Install-dlls.patch deleted file mode 100644 index 460c77e065..0000000000 --- a/mingw-w64-openshadinglanguage-git/0008-Install-dlls.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- openshadinglanguage/src/liboslcomp/CMakeLists.txt.orig 2014-01-08 18:46:41.676194700 +0000 -+++ openshadinglanguage/src/liboslcomp/CMakeLists.txt 2014-01-08 19:11:05.339740900 +0000 -@@ -23,4 +23,4 @@ - TARGET_LINK_LIBRARIES ( oslcomp ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS}) - LINK_ILMBASE ( oslcomp ) - --INSTALL ( TARGETS oslcomp LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+INSTALL ( TARGETS oslcomp LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) ---- openshadinglanguage/src/liboslexec/CMakeLists.txt.orig 2014-01-08 18:46:41.743201400 +0000 -+++ openshadinglanguage/src/liboslexec/CMakeLists.txt 2014-01-08 19:10:57.563740900 +0000 -@@ -136,7 +136,7 @@ - ADD_DEPENDENCIES (oslexec "${CMAKE_CURRENT_SOURCE_DIR}/liboslcexec.map") - LINK_ILMBASE ( oslexec ) - --INSTALL ( TARGETS oslexec LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+INSTALL ( TARGETS oslexec LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) - - # Unit tests - add_executable (accum_test accum_test.cpp) ---- openshadinglanguage/src/testshade/CMakeLists.txt.orig 2014-01-08 18:46:41.679195000 +0000 -+++ openshadinglanguage/src/testshade/CMakeLists.txt 2014-01-08 19:11:39.321740900 +0000 -@@ -14,7 +14,7 @@ - TARGET_LINK_LIBRARIES (libtestshade oslexec oslcomp oslquery ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LIBRARY} ) - SET_TARGET_PROPERTIES (libtestshade PROPERTIES PREFIX "") - --INSTALL ( TARGETS libtestshade LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+INSTALL ( TARGETS libtestshade LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) - - # The 'testshade_dso' executable - ADD_EXECUTABLE ( testshade_dso testshade_dso.cpp ) ---- openshadinglanguage/src/liboslquery/CMakeLists.txt.orig 2014-01-08 18:46:41.679195000 +0000 -+++ openshadinglanguage/src/liboslquery/CMakeLists.txt 2014-01-08 19:11:39.321740900 +0000 -@@ -14,4 +14,4 @@ - TARGET_LINK_LIBRARIES ( oslquery ${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ) - LINK_ILMBASE ( oslquery ) - --INSTALL ( TARGETS oslquery LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+INSTALL ( TARGETS oslquery LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) diff --git a/mingw-w64-openshadinglanguage-git/0009-Fix-shader_is_defined.patch b/mingw-w64-openshadinglanguage-git/0009-Fix-shader_is_defined.patch deleted file mode 100644 index 38bb7c570a..0000000000 --- a/mingw-w64-openshadinglanguage-git/0009-Fix-shader_is_defined.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- openshadinglanguage/src/liboslcomp/oslcomp_pvt.h.orig 2014-04-16 17:05:16.783394800 +0000 -+++ openshadinglanguage/src/liboslcomp/oslcomp_pvt.h 2014-04-16 17:05:38.243394800 +0000 -@@ -107,7 +107,7 @@ - bool error_encountered () const { return m_err; } - - /// Has a shader already been defined? -- bool shader_is_defined () const { return m_shader; } -+ bool shader_is_defined () const { return m_shader ? true : false; } - - /// Define the shader we're compiling with the given AST root. - /// diff --git a/mingw-w64-openshadinglanguage-git/0009-llvm-35.patch b/mingw-w64-openshadinglanguage-git/0009-llvm-35.patch deleted file mode 100644 index 2420fe4b87..0000000000 --- a/mingw-w64-openshadinglanguage-git/0009-llvm-35.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- openshadinglanguage/src/liboslexec/llvm_util.cpp.orig 2014-04-16 17:05:16.783394800 +0000 -+++ openshadinglanguage/src/liboslexec/llvm_util.cpp 2014-04-16 17:05:38.243394800 +0000 -@@ -46,7 +46,11 @@ - # include - # include - # include --# include -+# if OSL_LLVM_VERSION > 34 -+# include -+# else -+# include -+# endif - # if OSL_LLVM_VERSION >= 34 - # include - # else -@@ -92,7 +92,11 @@ - #include - #include - #include --#include -+# if OSL_LLVM_VERSION > 34 -+# include -+# else -+# include -+# endif - #include - #include - #include -@@ -380,7 +380,9 @@ - // than opt-out, and the following variable was removed. - llvm::DisablePrettyStackTrace = true; - #endif -+#if OSL_LLVM_VERSION <= 34 - llvm::llvm_start_multithreaded (); // enable it to be thread-safe -+#endif - - #if USE_MCJIT - llvm::InitializeAllTargets(); \ No newline at end of file diff --git a/mingw-w64-openshadinglanguage-git/0010-fix-compare-ints.patch b/mingw-w64-openshadinglanguage-git/0010-fix-compare-ints.patch deleted file mode 100644 index 199efcc935..0000000000 --- a/mingw-w64-openshadinglanguage-git/0010-fix-compare-ints.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -Naur openshadinglanguage-orig/src/liboslcomp/symtab.cpp openshadinglanguage/src/liboslcomp/symtab.cpp ---- openshadinglanguage-orig/src/liboslcomp/symtab.cpp 2014-08-31 21:12:36.509200000 +0400 -+++ openshadinglanguage/src/liboslcomp/symtab.cpp 2014-08-31 21:28:41.286000000 +0400 -@@ -343,7 +343,7 @@ - std::cout << " (" << s->name() - << " in scope " << s->scope() << ")"; - std::cout << " :\n"; -- for (size_t i = 0; i < s->numfields(); ++i) { -+ for (int i = 0; i < s->numfields(); ++i) { - const StructSpec::FieldSpec & f (s->field(i)); - std::cout << "\t" << f.name << " : " - << f.type.string() << "\n"; -diff -Naur openshadinglanguage-orig/src/liboslexec/shadingsys.cpp openshadinglanguage/src/liboslexec/shadingsys.cpp ---- openshadinglanguage-orig/src/liboslexec/shadingsys.cpp 2014-08-31 21:12:36.587200000 +0400 -+++ openshadinglanguage/src/liboslexec/shadingsys.cpp 2014-08-31 21:31:52.245600000 +0400 -@@ -1647,7 +1647,7 @@ - // as connections between their respective fields. - StructSpec *srcstruct = srccon.type.structspec(); - StructSpec *dststruct = dstcon.type.structspec(); -- for (size_t i = 0; i < srcstruct->numfields(); ++i) { -+ for (int i = 0; i < srcstruct->numfields(); ++i) { - std::string s = Strutil::format("%s.%s", srcparam, srcstruct->field(i).name.c_str()); - std::string d = Strutil::format("%s.%s", dstparam, dststruct->field(i).name.c_str()); - ConnectShaders (srclayer, s.c_str(), dstlayer, d.c_str()); -diff -Naur openshadinglanguage-orig/src/liboslexec/typespec.cpp openshadinglanguage/src/liboslexec/typespec.cpp ---- openshadinglanguage-orig/src/liboslexec/typespec.cpp 2014-08-31 21:12:36.587200000 +0400 -+++ openshadinglanguage/src/liboslexec/typespec.cpp 2014-08-31 21:27:42.218600000 +0400 -@@ -101,7 +101,7 @@ - ASSERT (a && b); - if (a->numfields() != b->numfields()) - return false; -- for (size_t i = 0; i < a->numfields(); ++i) -+ for (int i = 0; i < a->numfields(); ++i) - if (! equivalent (a->field(i).type, b->field(i).type)) - return false; - return true; -diff -Naur openshadinglanguage-orig/src/liboslexec/lpeparse.cpp openshadinglanguage/src/liboslexec/lpeparse.cpp ---- openshadinglanguage-orig/src/liboslexec/lpeparse.cpp 2014-08-31 21:44:27.475800000 +0400 -+++ openshadinglanguage/src/liboslexec/lpeparse.cpp 2014-08-31 22:42:14.737400000 +0400 -@@ -72,13 +72,13 @@ - m_minus_stop.insert(Labels::STOP); - - if (user_events) -- for (int i = 0; i < user_events->size(); ++i) -+ for (size_t i = 0; i < user_events->size(); ++i) - { - m_label_position[(*user_events)[i]] = 0; - m_basic_labels.insert((*user_events)[i]); - } - if (user_scatterings) -- for (int i = 0; i < user_scatterings->size(); ++i) -+ for (size_t i = 0; i < user_scatterings->size(); ++i) - { - m_label_position[(*user_scatterings)[i]] = 1; - m_basic_labels.insert((*user_scatterings)[i]); diff --git a/mingw-w64-openshadinglanguage-git/PKGBUILD b/mingw-w64-openshadinglanguage-git/PKGBUILD index 8fd66a34cc..69a73f3504 100644 --- a/mingw-w64-openshadinglanguage-git/PKGBUILD +++ b/mingw-w64-openshadinglanguage-git/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=openshadinglanguage +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -_ver_base=1.5 -pkgver=1.5.1381.52ba3ae +_ver_base=1.6 +pkgver=1.6.1644.9b7a1cc pkgrel=1 pkgdesc="Advanced shading language for production GI renderers (mingw-w64)" arch=('any') @@ -12,92 +13,89 @@ license=("custom") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-openimageio" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-intel-tbb" - "${MINGW_PACKAGE_PREFIX}-ilmbase" - "${MINGW_PACKAGE_PREFIX}-openexr" - ) + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-glew" + "${MINGW_PACKAGE_PREFIX}-ilmbase" + "${MINGW_PACKAGE_PREFIX}-intel-tbb" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-openexr" + "${MINGW_PACKAGE_PREFIX}-openimageio") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-clang" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-pkg-config") + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") source=("${_realname}"::"git+https://github.com/imageworks/OpenShadingLanguage.git" - 0001-mingw-w64-fix.patch + 0001-osolex-Define-isatty-as-_isatty-for-_WIN32.patch + 0002-Use-getcwd-for-older-OIIO.patch + 0003-Fix-unsigned-signed-compares.patch 0002-dont-add-flex-include-dir.patch 0003-fix-OIIO-windows.patch 0005-Fix-cast-from-void-ptr.patch - 0006-Fix-weird-array-out-of-bounds-error.patch - 0007-Fix-bad-casts-with-intptr_t.patch - 0008-Install-dlls.patch - 0009-llvm-35.patch - 0010-fix-compare-ints.patch) + 0007-Fix-bad-casts-with-intptr_t.patch) md5sums=('SKIP' - 'c225e66cd0a59a674b331b26374ba082' + 'b2e8450898924c5181760ec75dea2341' + '2609345e71e365781b5314927616a25d' + 'e1dc9dd8ee31abca83f1111d9c2f950c' '78526dd22cea1d42238609a9cdfef816' '9c73b150c2696024a44397ef94584463' '73851a8ec414f099fe1195ea18d756f9' - '33d03ef6eb6433c0df111098a6c7b177' - '85ed91acdd3bd974a18b8d1c9ae3e79b' - '7816fd1cd6d2fcbb2547384aa14c7760' - '9c996fd52bef0ecd5b34db1c930b5173' - '662f4003eade3afd4e00ea3dd39d4d21') + '8652b94a0aed2a8441df99e85e55e981') pkgver() { - cd "$srcdir/$_realname" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/${_realname}" + printf "%s.%s.%s" "${_ver_base}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd ${srcdir}/$_realname - patch -p1 -i ${srcdir}/0001-mingw-w64-fix.patch + cd ${srcdir}/${_realname} + git am "${srcdir}"/0001-osolex-Define-isatty-as-_isatty-for-_WIN32.patch + git am "${srcdir}"/0002-Use-getcwd-for-older-OIIO.patch + git am "${srcdir}"/0003-Fix-unsigned-signed-compares.patch patch -p1 -i ${srcdir}/0002-dont-add-flex-include-dir.patch patch -p1 -i ${srcdir}/0003-fix-OIIO-windows.patch patch -p1 -i ${srcdir}/0005-Fix-cast-from-void-ptr.patch - patch -p1 -i ${srcdir}/0006-Fix-weird-array-out-of-bounds-error.patch patch -p1 -i ${srcdir}/0007-Fix-bad-casts-with-intptr_t.patch - patch -p1 -i ${srcdir}/0008-Install-dlls.patch - #patch -p1 -i ${srcdir}/0009-llvm-35.patch - patch -p1 -i ${srcdir}/0010-fix-compare-ints.patch } build() { export OPENIMAGEIOHOME=${MINGW_PREFIX} export LLVM_DIRECTORY=${MINGW_PREFIX} + local _extra_libs=$(${MINGW_PREFIX}/bin/llvm-config --system-libs) + CFLAGS+=" -std=c++11 -D_USE_MATH_DEFINES" + CXXFLAGS+=" -std=c++11 -DTINYFORMAT_ALLOW_WCHAR_STRINGS -D_USE_MATH_DEFINES" + [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DILMBASE_CUSTOM=True \ + -DILMBASE_CUSTOM_INCLUDE_DIR=${MINGW_PREFIX}/include \ + -DILMBASE_CUSTOM_LIB_DIR=${MINGW_PREFIX}/lib \ + -DILMBASE_CUSTOM_LIBRARIES="Half Iex Imath IlmThread" \ + -DEXTRA_OSLEXEC_LIBRARIES="${_extra_libs}" \ -DLLVM_STATIC=1 \ - -DCMAKE_CXX_FLAGS="-DTINYFORMAT_ALLOW_WCHAR_STRINGS -Wno-error=unused-but-set-variable -std=gnu++11" \ - -DEXTRA_OSLEXEC_LIBRARIES="-lz -lffi -lncurses -lshell32 -lpsapi -limagehlp -lm" \ + -DOSL_BUILD_CPP11=1 \ ../$_realname - #-DVERBOSE=1 - - # -DILMBASE_CUSTOM=True \ - # -DILMBASE_CUSTOM_INCLUDE_DIR=${MINGW_PREFIX}/include \ - # -DILMBASE_CUSTOM_LIB_DIR=${MINGW_PREFIX}/lib \ - # -DILMBASE_CUSTOM_LIBRARIES="Half Iex Imath IlmThread" \ + # $PWD/src/liboslcomp PATH addition needed for running oslc.exe during the build (for liboslcomp.dll) - # ${MINGW_PREFIX}/bin PATH addition needed for finding libboost_system-mt.dll when running oslc.exe. - #PATH=$PWD/src/liboslcomp:${MINGW_PREFIX}/bin:"${PATH}" make VERBOSE=1 + # ${MINGW_PREFIX}/bin PATH addition needed for finding libboost_system-mt.dll when running oslc.exe. PATH="$PWD/src/liboslcomp:${PATH}" make } package() { cd build-${MINGW_CHOST} - make install + make DESTDIR=${pkgdir} install mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/OSL/ - mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/licenses/$pkgname - mv "${pkgdir}${MINGW_PREFIX}"/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/$pkgname # TODO: Tell upstream about this shit + mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname} + mv "${pkgdir}${MINGW_PREFIX}"/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname} # TODO: Tell upstream about this shit mv "${pkgdir}${MINGW_PREFIX}"/{CHANGES,README.md,INSTALL} "${pkgdir}${MINGW_PREFIX}"/share/OSL/ mv "${pkgdir}${MINGW_PREFIX}"/doc "${pkgdir}${MINGW_PREFIX}"/share/OSL/doc - #mv "${pkgdir}${MINGW_PREFIX}"/shaders "${pkgdir}${MINGW_PREFIX}"/share/OSL/shadersE } diff --git a/mingw-w64-openshadinglanguage/PKGBUILD b/mingw-w64-openshadinglanguage/PKGBUILD index ec34543ed6..dd14f51e15 100644 --- a/mingw-w64-openshadinglanguage/PKGBUILD +++ b/mingw-w64-openshadinglanguage/PKGBUILD @@ -2,14 +2,14 @@ _realname=openshadinglanguage pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.5.11 -pkgrel=2 +pkgver=1.5.12 +pkgrel=1 pkgdesc="Advanced shading language for production GI renderers (mingw-w64)" arch=('any') url="https://github.com/imageworks/OpenShadingLanguage/" license=("custom") depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-glew" "${MINGW_PACKAGE_PREFIX}-libtiff" "${MINGW_PACKAGE_PREFIX}-openimageio" @@ -31,7 +31,7 @@ source=(https://github.com/imageworks/OpenShadingLanguage/archive/Release-${pkgv 0006-Fix-weird-array-out-of-bounds-error.patch 0007-Fix-bad-casts-with-intptr_t.patch 0008-Install-dlls.patch) -md5sums=('ec241cb96d2a51d89db4e5cf7b858e18' +md5sums=('484752a0f97df55962c3a667075deddc' 'c225e66cd0a59a674b331b26374ba082' '78526dd22cea1d42238609a9cdfef816' '9c73b150c2696024a44397ef94584463' @@ -57,7 +57,7 @@ build() { local _extra_libs=$(${MINGW_PREFIX}/bin/llvm-config --system-libs) CFLAGS+=" -std=c++11 -D_USE_MATH_DEFINES" CXXFLAGS+=" -std=c++11 -DTINYFORMAT_ALLOW_WCHAR_STRINGS -D_USE_MATH_DEFINES" - + [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} @@ -76,7 +76,7 @@ build() { #-DVERBOSE=1 # $PWD/src/liboslcomp PATH addition needed for running oslc.exe during the build (for liboslcomp.dll) - # ${MINGW_PREFIX}/bin PATH addition needed for finding libboost_system-mt.dll when running oslc.exe. + # ${MINGW_PREFIX}/bin PATH addition needed for finding libboost_system-mt.dll when running oslc.exe. PATH=$PWD/src/liboslcomp:${MINGW_PREFIX}/bin:"${PATH}" make #VERBOSE=1 } diff --git a/mingw-w64-openssl/PKGBUILD b/mingw-w64-openssl/PKGBUILD index 12e5010f92..82e5381ffe 100644 --- a/mingw-w64-openssl/PKGBUILD +++ b/mingw-w64-openssl/PKGBUILD @@ -1,8 +1,11 @@ # Maintainer: Alexey Pavlov _realname=openssl +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.0.1j +_ver=1.0.2e +# use a pacman compatible version scheme +pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} pkgrel=1 arch=('any') pkgdesc="The Open Source toolkit for Secure Sockets Layer and Transport Layer Security (mingw-w64)" @@ -11,58 +14,52 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' '!buildflags' 'staticlibs') license=('BSD') url="http://www.openssl.org" -noextract=(${_realname}-${pkgver}.tar.gz) -source=(http://www.openssl.org/source/${_realname}-$pkgver.tar.gz{,.asc} +noextract=(${_realname}-${_ver}.tar.gz) +source=(http://www.openssl.org/source/${_realname}-${_ver}.tar.gz{,.asc} 'openssl-1.0.0a-ldflags.patch' 'openssl-1.0.0d-windres.patch' - 'openssl-1.0.0h-pkg-config.patch' - 'openssl-1.0.1-parallel-build.patch' + 'openssl-1.0.2a-parallel-build.patch' 'openssl-1.0.1-x32.patch' 'openssl-0.9.6-x509.patch' 'openssl-1.0.1i-relocation.patch') -md5sums=('f7175c9cd3c39bb1907ac8bba9df8ed3' +md5sums=('5262bfa25b60ed9de9f28d5d52d77fc5' 'SKIP' - '9e0abad8dd17079815d9e92345c5adcb' - '835a78dbe9c8690dbdd9190aaf5432e7' - 'a3d056be1047c7fd6cf8a74bbe8e4192' - '60ca340e32944e4825747e3681ccd553' - '10d0cebf2d9c0f64c307e82542f519e3' - 'cf00f216c47f33272d281e302ab1906a' - '170f80b2fb479fc422557a48d566f432') + 'dd616e53eba607f5ab46634f93d5c5a5' + 'df46ea89a28b0bd18f13b9ab63d1ade3' + '7ea5aaac21cee0f89dfb58b03219caaa' + '7400927e547cd4c68d2af2fe0b322345' + '990d027cc82ff8b2acffead24073d43c' + '43e1787d8891f990e8fbe7dd4f6a258b') +validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491') prepare() { - cd $startdir/ # Clean up old sources so re-patching doesn't fail. - [ -d $srcdir/${_realname}-$pkgver ] && rm -rf $srcdir/${_realname}-$pkgver - tar -xzvf ${_realname}-${pkgver}.tar.gz -C $srcdir - cd $srcdir/${_realname}-$pkgver - + [[ -d ${srcdir}/${_realname}-${_ver} ]] && rm -rf ${srcdir}/${_realname}-${_ver} + tar -xzvf ${_realname}-${_ver}.tar.gz -C ${srcdir} || true + cd ${srcdir}/${_realname}-${_ver} + patch -p1 -i ${srcdir}/openssl-1.0.0a-ldflags.patch patch -p1 -i ${srcdir}/openssl-1.0.0d-windres.patch - patch -p1 -i ${srcdir}/openssl-1.0.0h-pkg-config.patch - patch -p1 -i ${srcdir}/openssl-1.0.1-parallel-build.patch + patch -p1 -i ${srcdir}/openssl-1.0.2a-parallel-build.patch patch -p1 -i ${srcdir}/openssl-1.0.1-x32.patch patch -p1 -i ${srcdir}/openssl-0.9.6-x509.patch patch -p1 -i ${srcdir}/openssl-1.0.1i-relocation.patch +} + +build() { # No support for out-of-source builds - mkdir -p $srcdir/build-${CARCH} - cp -a ${srcdir}/${_realname}-${pkgver}/* ${srcdir}/build-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} + cp -a ${srcdir}/${_realname}-${_ver}/* ${srcdir}/build-${CARCH} # Use mingw cflags instead of hardcoded ones sed -i -e '/^"mingw"/ s/-fomit-frame-pointer -O3 -march=i486 -Wall/-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4/' ${srcdir}/build-${CARCH}/Configure -} - -build() -{ - cd "${srcdir}/build-${CARCH}" - _mingw=mingw if $(echo ${CARCH} | grep -q x86_64); then _mingw=mingw64 fi - cd "$srcdir/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" export MSYS2_ARG_CONV_EXCL="--prefix=" ./Configure \ --prefix=${MINGW_PREFIX} \ @@ -74,12 +71,16 @@ build() enable-mdc2 \ enable-tlsext \ enable-rfc3779 - make ZLIB_INCLUDE=-"I${MINGW_PREFIX}/include" depend all -j1 + + make -j1 ZLIB_INCLUDE=-I"${MINGW_PREFIX}"/include depend all } package() { - cd "$srcdir/build-${CARCH}" - make -j1 INSTALL_PREFIX="$pkgdir" MANDIR=${MINGW_PREFIX}/share/man MANSUFFIX=ssl install + cd "${srcdir}/build-${CARCH}" + make -j1 INSTALL_PREFIX="${pkgdir}" MANDIR=${MINGW_PREFIX}/share/man MANSUFFIX=ssl install + + install -D -m644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + chmod -R 755 "${pkgdir}${MINGW_PREFIX}"/bin chmod -R 644 "${pkgdir}${MINGW_PREFIX}"/lib chmod -R 755 "${pkgdir}${MINGW_PREFIX}"/lib/engines diff --git a/mingw-w64-openssl/openssl-0.9.6-x509.patch b/mingw-w64-openssl/openssl-0.9.6-x509.patch index 7d9a3f22c1..4c3222533b 100644 --- a/mingw-w64-openssl/openssl-0.9.6-x509.patch +++ b/mingw-w64-openssl/openssl-0.9.6-x509.patch @@ -2,34 +2,36 @@ Do not treat duplicate certs as an error. --- openssl-0.9.6/crypto/x509/by_file.c Wed Sep 27 15:09:05 2000 +++ openssl-0.9.6/crypto/x509/by_file.c Wed Sep 27 14:21:20 2000 -@@ -163,8 +163,12 @@ - } - } - i=X509_STORE_add_cert(ctx->store_ctx,x); -- if (!i) goto err; -- count++; -+ /* ignore any problems with current certificate -+ and continue with the next one */ -+ if (i) -+ count++; -+ else -+ ERR_clear_error(); - X509_free(x); - x=NULL; - } -@@ -179,7 +183,8 @@ - goto err; - } - i=X509_STORE_add_cert(ctx->store_ctx,x); -- if (!i) goto err; -+ if (!i) -+ ERR_clear_error(); - ret=i; - } - else +@@ -152,9 +152,12 @@ + } + } + i = X509_STORE_add_cert(ctx->store_ctx, x); +- if (!i) +- goto err; +- count++; ++ /* ignore any problems with current certificate ++ and continue with the next one */ ++ if (i) ++ count++; ++ else ++ ERR_clear_error(); + X509_free(x); + x = NULL; + } +@@ -166,8 +169,8 @@ + goto err; + } + i = X509_STORE_add_cert(ctx->store_ctx, x); +- if (!i) +- goto err; ++ if (!i) ++ ERR_clear_error(); + ret = i; + } else { + X509err(X509_F_X509_LOAD_CERT_FILE, X509_R_BAD_X509_FILETYPE); --- openssl-0.9.6/crypto/store/store.h 2009-08-12 00:57:20.000000000 +0200 +++ openssl-0.9.6/crypto/store/store.h 2009-08-12 01:00:27.000000000 +0200 -@@ -70,6 +70,13 @@ +@@ -77,6 +77,13 @@ extern "C" { #endif @@ -56,6 +58,6 @@ Do not treat duplicate certs as an error. +#undef X509_EXTENSIONS +#endif + - #define PEM_BUFSIZE 1024 + # define PEM_BUFSIZE 1024 - #define PEM_OBJ_UNDEF 0 + # define PEM_OBJ_UNDEF 0 diff --git a/mingw-w64-openssl/openssl-1.0.0a-ldflags.patch b/mingw-w64-openssl/openssl-1.0.0a-ldflags.patch index ffe36fb6dd..ca74241a94 100644 --- a/mingw-w64-openssl/openssl-1.0.0a-ldflags.patch +++ b/mingw-w64-openssl/openssl-1.0.0a-ldflags.patch @@ -2,7 +2,7 @@ http://bugs.gentoo.org/327421 --- a/Makefile.org +++ b/Makefile.org -@@ -189,6 +189,7 @@ +@@ -216,6 +216,7 @@ MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \ DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \ MAKEDEPPROG='$(MAKEDEPPROG)' \ diff --git a/mingw-w64-openssl/openssl-1.0.0d-windres.patch b/mingw-w64-openssl/openssl-1.0.0d-windres.patch index 428012c2db..2ef540e8fb 100644 --- a/mingw-w64-openssl/openssl-1.0.0d-windres.patch +++ b/mingw-w64-openssl/openssl-1.0.0d-windres.patch @@ -12,7 +12,7 @@ retrieving revision 1.621.2.40 diff -u -p -r1.621.2.40 Configure --- a/Configure 30 Nov 2010 22:19:26 -0000 1.621.2.40 +++ b/Configure 4 Jul 2011 23:12:32 -0000 -@@ -1094,6 +1094,7 @@ my $shared_extension = $fields[$idx_shar +@@ -1244,6 +1244,7 @@ my $shared_extension = $fields[$idx_shar my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; my $ar = $ENV{'AR'} || "ar"; my $arflags = $fields[$idx_arflags]; @@ -20,7 +20,7 @@ diff -u -p -r1.621.2.40 Configure my $multilib = $fields[$idx_multilib]; # if $prefix/lib$multilib is not an existing directory, then -@@ -1511,12 +1512,14 @@ while () +@@ -1706,12 +1707,14 @@ while () s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; @@ -50,7 +50,7 @@ diff -u -p -r1.295.2.10 Makefile.org NM= nm PERL= perl TAR= tar -@@ -180,6 +181,7 @@ BUILDENV= PLATFORM='$(PLATFORM)' PROCESS +@@ -207,6 +208,7 @@ BUILDENV= PLATFORM='$(PLATFORM)' PROCESS CC='$(CC)' CFLAG='$(CFLAG)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ diff --git a/mingw-w64-openssl/openssl-1.0.0h-pkg-config.patch b/mingw-w64-openssl/openssl-1.0.0h-pkg-config.patch deleted file mode 100644 index 6c0218256d..0000000000 --- a/mingw-w64-openssl/openssl-1.0.0h-pkg-config.patch +++ /dev/null @@ -1,32 +0,0 @@ -depend on other pc files rather than encoding library info directly in -every pkg-config file - ---- a/Makefile.org -+++ b/Makefile.org -@@ -335,11 +335,11 @@ libssl.pc: Makefile - echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ - echo 'includedir=$${prefix}/include'; \ - echo ''; \ -- echo 'Name: OpenSSL'; \ -+ echo 'Name: OpenSSL-libssl'; \ - echo 'Description: Secure Sockets Layer and cryptography libraries'; \ - echo 'Version: '$(VERSION); \ -- echo 'Requires: '; \ -- echo 'Libs: -L$${libdir} -lssl -lcrypto'; \ -+ echo 'Requires.private: libcrypto'; \ -+ echo 'Libs: -L$${libdir} -lssl'; \ - echo 'Libs.private: $(EX_LIBS)'; \ - echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc - -@@ -352,10 +353,7 @@ openssl.pc: Makefile - echo 'Name: OpenSSL'; \ - echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ - echo 'Version: '$(VERSION); \ -- echo 'Requires: '; \ -- echo 'Libs: -L$${libdir} -lssl -lcrypto'; \ -- echo 'Libs.private: $(EX_LIBS)'; \ -- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc -+ echo 'Requires: libssl libcrypto' ) > openssl.pc - - Makefile: Makefile.org Configure config - @echo "Makefile is older than Makefile.org, Configure or config." diff --git a/mingw-w64-openssl/openssl-1.0.1-ipv6.patch b/mingw-w64-openssl/openssl-1.0.1-ipv6.patch deleted file mode 100644 index 4955c65d31..0000000000 --- a/mingw-w64-openssl/openssl-1.0.1-ipv6.patch +++ /dev/null @@ -1,678 +0,0 @@ -http://rt.openssl.org/Ticket/Display.html?id=2051 -user/pass: guest/guest - -Index: apps/s_apps.h -=================================================================== -RCS file: /v/openssl/cvs/openssl/apps/s_apps.h,v -retrieving revision 1.21.2.1 -diff -u -r1.21.2.1 s_apps.h ---- apps/s_apps.h 4 Sep 2009 17:42:04 -0000 1.21.2.1 -+++ apps/s_apps.h 28 Dec 2011 00:28:14 -0000 -@@ -148,7 +148,7 @@ - #define PORT_STR "4433" - #define PROTOCOL "tcp" - --int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); -+int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context, int use_ipv4, int use_ipv6); - #ifdef HEADER_X509_H - int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); - #endif -@@ -156,7 +156,7 @@ - int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file); - int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key); - #endif --int init_client(int *sock, char *server, int port, int type); -+int init_client(int *sock, char *server, int port, int type, int use_ipv4, int use_ipv6); - int should_retry(int i); - int extract_port(char *str, short *port_ptr); - int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); -Index: apps/s_cb.c -=================================================================== -RCS file: /v/openssl/cvs/openssl/apps/s_cb.c,v -retrieving revision 1.27.2.8.2.2 -diff -u -r1.27.2.8.2.2 s_cb.c ---- apps/s_cb.c 13 Nov 2011 13:13:13 -0000 1.27.2.8.2.2 -+++ apps/s_cb.c 28 Dec 2011 00:28:14 -0000 -Index: apps/s_client.c -=================================================================== -RCS file: /v/openssl/cvs/openssl/apps/s_client.c,v -retrieving revision 1.123.2.6.2.10 -diff -u -r1.123.2.6.2.10 s_client.c ---- apps/s_client.c 14 Dec 2011 22:18:02 -0000 1.123.2.6.2.10 -+++ apps/s_client.c 28 Dec 2011 00:28:14 -0000 -@@ -285,6 +285,9 @@ - { - BIO_printf(bio_err,"usage: s_client args\n"); - BIO_printf(bio_err,"\n"); -+#if OPENSSL_USE_IPV6 -+ BIO_printf(bio_err," -6 - use IPv6\n"); -+#endif - BIO_printf(bio_err," -host host - use -connect instead\n"); - BIO_printf(bio_err," -port port - use -connect instead\n"); - BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR); -@@ -564,6 +567,7 @@ - int sbuf_len,sbuf_off; - fd_set readfds,writefds; - short port=PORT; -+ int use_ipv4, use_ipv6; - int full_log=1; - char *host=SSL_HOST_NAME; - char *cert_file=NULL,*key_file=NULL; -@@ -609,7 +613,11 @@ - #endif - char *sess_in = NULL; - char *sess_out = NULL; -- struct sockaddr peer; -+#if OPENSSL_USE_IPV6 -+ struct sockaddr_storage peer; -+#else -+ struct sockaddr_in peer; -+#endif - int peerlen = sizeof(peer); - int enable_timeouts = 0 ; - long socket_mtu = 0; -@@ -630,6 +638,8 @@ - meth=SSLv2_client_method(); - #endif - -+ use_ipv4 = 1; -+ use_ipv6 = 0; - apps_startup(); - c_Pause=0; - c_quiet=0; -@@ -951,6 +961,13 @@ - jpake_secret = *++argv; - } - #endif -+#if OPENSSL_USE_IPV6 -+ else if (strcmp(*argv,"-6") == 0) -+ { -+ use_ipv4 = 0; -+ use_ipv6 = 1; -+ } -+#endif - else if (strcmp(*argv,"-use_srtp") == 0) - { - if (--argc < 1) goto bad; -@@ -967,7 +984,7 @@ - keymatexportlen=atoi(*(++argv)); - if (keymatexportlen == 0) goto bad; - } -- else -+ else - { - BIO_printf(bio_err,"unknown option %s\n",*argv); - badop=1; -@@ -1259,7 +1276,7 @@ - - re_start: - -- if (init_client(&s,host,port,socket_type) == 0) -+ if (init_client(&s,host,port,socket_type,use_ipv4,use_ipv6) == 0) - { - BIO_printf(bio_err,"connect:errno=%d\n",get_last_socket_error()); - SHUTDOWN(s); -@@ -1285,7 +1302,7 @@ - { - - sbio=BIO_new_dgram(s,BIO_NOCLOSE); -- if (getsockname(s, &peer, (void *)&peerlen) < 0) -+ if (getsockname(s, (struct sockaddr *)&peer, (void *)&peerlen) < 0) - { - BIO_printf(bio_err, "getsockname:errno=%d\n", - get_last_socket_error()); -@@ -2036,7 +2061,7 @@ - BIO_printf(bio,"Expansion: %s\n", - expansion ? SSL_COMP_get_name(expansion) : "NONE"); - #endif -- -+ - #ifdef SSL_DEBUG - { - /* Print out local port of connection: useful for debugging */ -=================================================================== -RCS file: /v/openssl/cvs/openssl/apps/s_server.c,v -retrieving revision 1.136.2.15.2.13 -diff -u -r1.136.2.15.2.13 s_server.c ---- apps/s_server.c 27 Dec 2011 14:23:22 -0000 1.136.2.15.2.13 -+++ apps/s_server.c 28 Dec 2011 00:28:14 -0000 -@@ -558,6 +558,10 @@ - # endif - BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list"); - #endif -+ BIO_printf(bio_err," -4 - use IPv4 only\n"); -+#if OPENSSL_USE_IPV6 -+ BIO_printf(bio_err," -6 - use IPv6 only\n"); -+#endif - BIO_printf(bio_err," -keymatexport label - Export keying material using label\n"); - BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n"); - } -@@ -943,6 +947,7 @@ - int state=0; - const SSL_METHOD *meth=NULL; - int socket_type=SOCK_STREAM; -+ int use_ipv4, use_ipv6; - ENGINE *e=NULL; - char *inrand=NULL; - int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM; -@@ -981,6 +986,12 @@ - /* #error no SSL version enabled */ - #endif - -+ use_ipv4 = 1; -+#if OPENSSL_USE_IPV6 -+ use_ipv6 = 1; -+#else -+ use_ipv6 = 0; -+#endif - local_argc=argc; - local_argv=argv; - -@@ -1329,6 +1340,18 @@ - jpake_secret = *(++argv); - } - #endif -+ else if (strcmp(*argv,"-4") == 0) -+ { -+ use_ipv4 = 1; -+ use_ipv6 = 0; -+ } -+#if OPENSSL_USE_IPV6 -+ else if (strcmp(*argv,"-6") == 0) -+ { -+ use_ipv4 = 0; -+ use_ipv6 = 1; -+ } -+#endif - else if (strcmp(*argv,"-use_srtp") == 0) - { - if (--argc < 1) goto bad; -@@ -1884,9 +1907,9 @@ - BIO_printf(bio_s_out,"ACCEPT\n"); - (void)BIO_flush(bio_s_out); - if (www) -- do_server(port,socket_type,&accept_socket,www_body, context); -+ do_server(port,socket_type,&accept_socket,www_body, context, use_ipv4, use_ipv6); - else -- do_server(port,socket_type,&accept_socket,sv_body, context); -+ do_server(port,socket_type,&accept_socket,sv_body, context, use_ipv4, use_ipv6); - print_stats(bio_s_out,ctx); - ret=0; - end: -Index: apps/s_socket.c -=================================================================== -RCS file: /v/openssl/cvs/openssl/apps/s_socket.c,v -retrieving revision 1.43.2.3.2.2 -diff -u -r1.43.2.3.2.2 s_socket.c ---- apps/s_socket.c 2 Dec 2011 14:39:40 -0000 1.43.2.3.2.2 -+++ apps/s_socket.c 28 Dec 2011 00:28:14 -0000 -@@ -97,16 +97,16 @@ - #include "netdb.h" - #endif - --static struct hostent *GetHostByName(char *name); -+static struct hostent *GetHostByName(char *name, int domain); - #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) - static void ssl_sock_cleanup(void); - #endif - static int ssl_sock_init(void); --static int init_client_ip(int *sock,unsigned char ip[4], int port, int type); --static int init_server(int *sock, int port, int type); --static int init_server_long(int *sock, int port,char *ip, int type); -+static int init_client_ip(int *sock,unsigned char *ip, int port, int type, int domain); -+static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6); -+static int init_server_long(int *sock, int port,char *ip, int type, int use_ipv4, int use_ipv6); - static int do_accept(int acc_sock, int *sock, char **host); --static int host_ip(char *str, unsigned char ip[4]); -+static int host_ip(char *str, unsigned char *ip, int domain); - - #ifdef OPENSSL_SYS_WIN16 - #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ -@@ -234,38 +234,76 @@ - return(1); - } - --int init_client(int *sock, char *host, int port, int type) -+int init_client(int *sock, char *host, int port, int type, int use_ipv4, int use_ipv6) - { -+#if OPENSSL_USE_IPV6 -+ unsigned char ip[16]; -+#else - unsigned char ip[4]; -+#endif - -- memset(ip, '\0', sizeof ip); -- if (!host_ip(host,&(ip[0]))) -+ if (!use_ipv4 && !use_ipv6) - return 0; -- return init_client_ip(sock,ip,port,type); -- } -- --static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) -- { -- unsigned long addr; -+#if OPENSSL_USE_IPV6 -+ /* we are fine here */ -+#else -+ if (use_ipv6) -+ return 0; -+#endif -+ if (use_ipv4) -+ if (host_ip(host,ip,AF_INET)) -+ return(init_client_ip(sock,ip,port,type,AF_INET)); -+#if OPENSSL_USE_IPV6 -+ if (use_ipv6) -+ if (host_ip(host,ip,AF_INET6)) -+ return(init_client_ip(sock,ip,port,type,AF_INET6)); -+#endif -+ return 0; -+ } -+ -+static int init_client_ip(int *sock, unsigned char ip[4], int port, int type, int domain) -+ { -+#if OPENSSL_USE_IPV6 -+ struct sockaddr_storage them; -+ struct sockaddr_in *them_in = (struct sockaddr_in *)&them; -+ struct sockaddr_in6 *them_in6 = (struct sockaddr_in6 *)&them; -+#else - struct sockaddr_in them; -+ struct sockaddr_in *them_in = &them; -+#endif -+ socklen_t addr_len; - int s,i; - - if (!ssl_sock_init()) return(0); - - memset((char *)&them,0,sizeof(them)); -- them.sin_family=AF_INET; -- them.sin_port=htons((unsigned short)port); -- addr=(unsigned long) -- ((unsigned long)ip[0]<<24L)| -- ((unsigned long)ip[1]<<16L)| -- ((unsigned long)ip[2]<< 8L)| -- ((unsigned long)ip[3]); -- them.sin_addr.s_addr=htonl(addr); -+ if (domain == AF_INET) -+ { -+ addr_len = (socklen_t)sizeof(struct sockaddr_in); -+ them_in->sin_family=AF_INET; -+ them_in->sin_port=htons((unsigned short)port); -+#ifndef BIT_FIELD_LIMITS -+ memcpy(&them_in->sin_addr.s_addr, ip, 4); -+#else -+ memcpy(&them_in->sin_addr, ip, 4); -+#endif -+ } -+ else -+#if OPENSSL_USE_IPV6 -+ { -+ addr_len = (socklen_t)sizeof(struct sockaddr_in6); -+ them_in6->sin6_family=AF_INET6; -+ them_in6->sin6_port=htons((unsigned short)port); -+ memcpy(&(them_in6->sin6_addr), ip, sizeof(struct in6_addr)); -+ } -+#else -+ return(0); -+#endif - - if (type == SOCK_STREAM) -- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL); -+ s=socket(domain,SOCK_STREAM,SOCKET_PROTOCOL); - else /* ( type == SOCK_DGRAM) */ -- s=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP); -+ s=socket(domain,SOCK_DGRAM,IPPROTO_UDP); - - if (s == INVALID_SOCKET) { perror("socket"); return(0); } - -@@ -277,29 +315,27 @@ - if (i < 0) { perror("keepalive"); return(0); } - } - #endif -- -- if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1) -+ if (connect(s,(struct sockaddr *)&them,addr_len) == -1) - { closesocket(s); perror("connect"); return(0); } - *sock=s; - return(1); - } - --int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context) -+int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context, int use_ipv4, int use_ipv6) - { - int sock; - char *name = NULL; - int accept_socket = 0; - int i; - -- if (!init_server(&accept_socket,port,type)) return(0); -- -+ if (!init_server(&accept_socket,port,type, use_ipv4, use_ipv6)) return(0); - if (ret != NULL) - { - *ret=accept_socket; - /* return(1);*/ - } -- for (;;) -- { -+ for (;;) -+ { - if (type==SOCK_STREAM) - { - if (do_accept(accept_socket,&sock,&name) == 0) -@@ -322,41 +358,88 @@ - } - } - --static int init_server_long(int *sock, int port, char *ip, int type) -+static int init_server_long(int *sock, int port, char *ip, int type, int use_ipv4, int use_ipv6) - { - int ret=0; -+ int domain; -+#if OPENSSL_USE_IPV6 -+ struct sockaddr_storage server; -+ struct sockaddr_in *server_in = (struct sockaddr_in *)&server; -+ struct sockaddr_in6 *server_in6 = (struct sockaddr_in6 *)&server; -+#else - struct sockaddr_in server; -+ struct sockaddr_in *server_in = &server; -+#endif -+ socklen_t addr_len; - int s= -1; - -+ if (!use_ipv4 && !use_ipv6) -+ goto err; -+#if OPENSSL_USE_IPV6 -+ /* we are fine here */ -+#else -+ if (use_ipv6) -+ goto err; -+#endif - if (!ssl_sock_init()) return(0); - -- memset((char *)&server,0,sizeof(server)); -- server.sin_family=AF_INET; -- server.sin_port=htons((unsigned short)port); -- if (ip == NULL) -- server.sin_addr.s_addr=INADDR_ANY; -- else --/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */ --#ifndef BIT_FIELD_LIMITS -- memcpy(&server.sin_addr.s_addr,ip,4); -+#if OPENSSL_USE_IPV6 -+ domain = use_ipv6 ? AF_INET6 : AF_INET; - #else -- memcpy(&server.sin_addr,ip,4); -+ domain = AF_INET; - #endif -- -- if (type == SOCK_STREAM) -- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL); -- else /* type == SOCK_DGRAM */ -- s=socket(AF_INET, SOCK_DGRAM,IPPROTO_UDP); -+ if (type == SOCK_STREAM) -+ s=socket(domain,SOCK_STREAM,SOCKET_PROTOCOL); -+ else /* type == SOCK_DGRAM */ -+ s=socket(domain, SOCK_DGRAM,IPPROTO_UDP); - - if (s == INVALID_SOCKET) goto err; - #if defined SOL_SOCKET && defined SO_REUSEADDR -+ { -+ int j = 1; -+ setsockopt(s, SOL_SOCKET, SO_REUSEADDR, -+ (void *) &j, sizeof j); -+ } -+#endif -+#if OPENSSL_USE_IPV6 -+ if ((use_ipv4 == 0) && (use_ipv6 == 1)) - { -- int j = 1; -- setsockopt(s, SOL_SOCKET, SO_REUSEADDR, -- (void *) &j, sizeof j); -+ const int on = 1; -+ -+ setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, -+ (const void *) &on, sizeof(int)); - } - #endif -- if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1) -+ if (domain == AF_INET) -+ { -+ addr_len = (socklen_t)sizeof(struct sockaddr_in); -+ memset(server_in, 0, sizeof(struct sockaddr_in)); -+ server_in->sin_family=AF_INET; -+ server_in->sin_port = htons((unsigned short)port); -+ if (ip == NULL) -+ server_in->sin_addr.s_addr = htonl(INADDR_ANY); -+ else -+/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */ -+#ifndef BIT_FIELD_LIMITS -+ memcpy(&server_in->sin_addr.s_addr, ip, 4); -+#else -+ memcpy(&server_in->sin_addr, ip, 4); -+#endif -+ } -+#if OPENSSL_USE_IPV6 -+ else -+ { -+ addr_len = (socklen_t)sizeof(struct sockaddr_in6); -+ memset(server_in6, 0, sizeof(struct sockaddr_in6)); -+ server_in6->sin6_family = AF_INET6; -+ server_in6->sin6_port = htons((unsigned short)port); -+ if (ip == NULL) -+ server_in6->sin6_addr = in6addr_any; -+ else -+ memcpy(&server_in6->sin6_addr, ip, sizeof(struct in6_addr)); -+ } -+#endif -+ if (bind(s, (struct sockaddr *)&server, addr_len) == -1) - { - #ifndef OPENSSL_SYS_WINDOWS - perror("bind"); -@@ -375,16 +458,23 @@ - return(ret); - } - --static int init_server(int *sock, int port, int type) -+static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6) - { -- return(init_server_long(sock, port, NULL, type)); -+ return(init_server_long(sock, port, NULL, type, use_ipv4, use_ipv6)); - } - - static int do_accept(int acc_sock, int *sock, char **host) - { - int ret; - struct hostent *h1,*h2; -- static struct sockaddr_in from; -+#if OPENSSL_USE_IPV6 -+ struct sockaddr_storage from; -+ struct sockaddr_in *from_in = (struct sockaddr_in *)&from; -+ struct sockaddr_in6 *from_in6 = (struct sockaddr_in6 *)&from; -+#else -+ struct sockaddr_in from; -+ struct sockaddr_in *from_in = &from; -+#endif - int len; - /* struct linger ling; */ - -@@ -431,13 +521,23 @@ - */ - - if (host == NULL) goto end; -+#if OPENSSL_USE_IPV6 -+ if (from.ss_family == AF_INET) -+#else -+ if (from.sin_family == AF_INET) -+#endif - #ifndef BIT_FIELD_LIMITS -- /* I should use WSAAsyncGetHostByName() under windows */ -- h1=gethostbyaddr((char *)&from.sin_addr.s_addr, -- sizeof(from.sin_addr.s_addr),AF_INET); -+ /* I should use WSAAsyncGetHostByName() under windows */ -+ h1=gethostbyaddr((char *)&from_in->sin_addr.s_addr, -+ sizeof(from_in->sin_addr.s_addr), AF_INET); - #else -- h1=gethostbyaddr((char *)&from.sin_addr, -- sizeof(struct in_addr),AF_INET); -+ h1=gethostbyaddr((char *)&from_in->sin_addr, -+ sizeof(struct in_addr), AF_INET); -+#endif -+#if OPENSSL_USE_IPV6 -+ else -+ h1=gethostbyaddr((char *)&from_in6->sin6_addr, -+ sizeof(struct in6_addr), AF_INET6); - #endif - if (h1 == NULL) - { -@@ -454,15 +554,23 @@ - } - BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1); - -- h2=GetHostByName(*host); -+#if OPENSSL_USE_IPV6 -+ h2=GetHostByName(*host, from.ss_family); -+#else -+ h2=GetHostByName(*host, from.sin_family); -+#endif - if (h2 == NULL) - { - BIO_printf(bio_err,"gethostbyname failure\n"); - return(0); - } -- if (h2->h_addrtype != AF_INET) -+#if OPENSSL_USE_IPV6 -+ if (h2->h_addrtype != from.ss_family) -+#else -+ if (h2->h_addrtype != from.sin_family) -+#endif - { -- BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n"); -+ BIO_printf(bio_err,"gethostbyname addr address is not correct\n"); - return(0); - } - } -@@ -477,7 +585,7 @@ - char *h,*p; - - h=str; -- p=strchr(str,':'); -+ p=strrchr(str,':'); - if (p == NULL) - { - BIO_printf(bio_err,"no port defined\n"); -@@ -485,7 +593,7 @@ - } - *(p++)='\0'; - -- if ((ip != NULL) && !host_ip(str,ip)) -+ if ((ip != NULL) && !host_ip(str,ip,AF_INET)) - goto err; - if (host_ptr != NULL) *host_ptr=h; - -@@ -496,48 +604,58 @@ - return(0); - } - --static int host_ip(char *str, unsigned char ip[4]) -+static int host_ip(char *str, unsigned char *ip, int domain) - { -- unsigned int in[4]; -+ unsigned int in[4]; -+ unsigned long l; - int i; - -- if (sscanf(str,"%u.%u.%u.%u",&(in[0]),&(in[1]),&(in[2]),&(in[3])) == 4) -+ if ((domain == AF_INET) && -+ (sscanf(str,"%u.%u.%u.%u",&(in[0]),&(in[1]),&(in[2]),&(in[3])) == 4)) - { -+ - for (i=0; i<4; i++) - if (in[i] > 255) - { - BIO_printf(bio_err,"invalid IP address\n"); - goto err; - } -- ip[0]=in[0]; -- ip[1]=in[1]; -- ip[2]=in[2]; -- ip[3]=in[3]; -- } -+ l=htonl((in[0]<<24L)|(in[1]<<16L)|(in[2]<<8L)|in[3]); -+ memcpy(ip, &l, 4); -+ return 1; -+ } -+#if OPENSSL_USE_IPV6 -+ else if ((domain == AF_INET6) && -+ (inet_pton(AF_INET6, str, ip) == 1)) -+ return 1; -+#endif - else - { /* do a gethostbyname */ - struct hostent *he; - - if (!ssl_sock_init()) return(0); - -- he=GetHostByName(str); -+ he=GetHostByName(str,domain); - if (he == NULL) - { - BIO_printf(bio_err,"gethostbyname failure\n"); - goto err; - } - /* cast to short because of win16 winsock definition */ -- if ((short)he->h_addrtype != AF_INET) -+ if ((short)he->h_addrtype != domain) - { -- BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n"); -+ BIO_printf(bio_err,"gethostbyname addr family is not correct\n"); - return(0); - } -- ip[0]=he->h_addr_list[0][0]; -- ip[1]=he->h_addr_list[0][1]; -- ip[2]=he->h_addr_list[0][2]; -- ip[3]=he->h_addr_list[0][3]; -+ if (domain == AF_INET) -+ memset(ip, 0, 4); -+#if OPENSSL_USE_IPV6 -+ else -+ memset(ip, 0, 16); -+#endif -+ memcpy(ip, he->h_addr_list[0], he->h_length); -+ return 1; - } -- return(1); - err: - return(0); - } -@@ -574,7 +692,7 @@ - static unsigned long ghbn_hits=0L; - static unsigned long ghbn_miss=0L; - --static struct hostent *GetHostByName(char *name) -+static struct hostent *GetHostByName(char *name, int domain) - { - struct hostent *ret; - int i,lowi=0; -@@ -589,14 +707,20 @@ - } - if (ghbn_cache[i].order > 0) - { -- if (strncmp(name,ghbn_cache[i].name,128) == 0) -+ if ((strncmp(name,ghbn_cache[i].name,128) == 0) && -+ (ghbn_cache[i].ent.h_addrtype == domain)) - break; - } - } - if (i == GHBN_NUM) /* no hit*/ - { - ghbn_miss++; -- ret=gethostbyname(name); -+ if (domain == AF_INET) -+ ret=gethostbyname(name); -+#if OPENSSL_USE_IPV6 -+ else -+ ret=gethostbyname2(name, AF_INET6); -+#endif - if (ret == NULL) return(NULL); - /* else add to cache */ - if(strlen(name) < sizeof ghbn_cache[0].name) diff --git a/mingw-w64-openssl/openssl-1.0.1-x32.patch b/mingw-w64-openssl/openssl-1.0.1-x32.patch index 5106cb6e82..cfdeccdca3 100644 --- a/mingw-w64-openssl/openssl-1.0.1-x32.patch +++ b/mingw-w64-openssl/openssl-1.0.1-x32.patch @@ -8,64 +8,55 @@ Signed-Off-By: Nitin A Kamble 2011/07/13 ported the patch to the 1.0.0e version Signed-Off-By: Nitin A Kamble 2011/12/01 -Index: openssl-1.0.0e/Configure +Index: openssl-1.0.2a/Configure =================================================================== ---- openssl-1.0.0e.orig/Configure -+++ openssl-1.0.0e/Configure -@@ -393,6 +393,7 @@ my %table=( - "debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +--- openssl-1.0.2a.orig/Configure ++++ openssl-1.0.2a/Configure +@@ -217,6 +217,7 @@ my %table=( + "debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", + "debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-x32", "gcc:-DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "dist", "cc:-O::(unknown)::::::", # Basic configs that should work on any (32 and less bit) box -Index: openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c +Index: openssl-1.0.2a/crypto/bn/asm/x86_64-gcc.c =================================================================== ---- openssl-1.0.0e.orig/crypto/bn/asm/x86_64-gcc.c -+++ openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c -@@ -55,7 +55,7 @@ - * machine. - */ - --#ifdef _WIN64 -+#if defined _WIN64 || !defined __LP64__ - #define BN_ULONG unsigned long long - #else - #define BN_ULONG unsigned long -@@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con - asm ( - " subq %2,%2 \n" - ".p2align 4 \n" -- "1: movq (%4,%2,8),%0 \n" -- " adcq (%5,%2,8),%0 \n" -- " movq %0,(%3,%2,8) \n" -+ "1: movq (%q4,%2,8),%0 \n" -+ " adcq (%q5,%2,8),%0 \n" -+ " movq %0,(%q3,%2,8) \n" - " leaq 1(%2),%2 \n" - " loop 1b \n" - " sbbq %0,%0 \n" -@@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con - asm ( - " subq %2,%2 \n" - ".p2align 4 \n" -- "1: movq (%4,%2,8),%0 \n" -- " sbbq (%5,%2,8),%0 \n" -- " movq %0,(%3,%2,8) \n" -+ "1: movq (%q4,%2,8),%0 \n" -+ " sbbq (%q5,%2,8),%0 \n" -+ " movq %0,(%q3,%2,8) \n" - " leaq 1(%2),%2 \n" - " loop 1b \n" - " sbbq %0,%0 \n" -Index: openssl-1.0.0e/crypto/bn/bn.h +--- openssl-1.0.2a.orig/crypto/bn/asm/x86_64-gcc.c ++++ openssl-1.0.2a/crypto/bn/asm/x86_64-gcc.c +@@ -212,9 +212,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con + asm volatile (" subq %0,%0 \n" /* clear carry */ + " jmp 1f \n" + ".p2align 4 \n" +- "1: movq (%4,%2,8),%0 \n" +- " adcq (%5,%2,8),%0 \n" +- " movq %0,(%3,%2,8) \n" ++ "1: movq (%q4,%2,8),%0 \n" ++ " adcq (%q5,%2,8),%0 \n" ++ " movq %0,(%q3,%2,8) \n" + " lea 1(%2),%2 \n" + " loop 1b \n" + " sbbq %0,%0 \n":"=&r" (ret), "+c"(n), +@@ -238,9 +238,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con + asm volatile (" subq %0,%0 \n" /* clear borrow */ + " jmp 1f \n" + ".p2align 4 \n" +- "1: movq (%4,%2,8),%0 \n" +- " sbbq (%5,%2,8),%0 \n" +- " movq %0,(%3,%2,8) \n" ++ "1: movq (%q4,%2,8),%0 \n" ++ " sbbq (%q5,%2,8),%0 \n" ++ " movq %0,(%q3,%2,8) \n" + " lea 1(%2),%2 \n" + " loop 1b \n" + " sbbq %0,%0 \n":"=&r" (ret), "+c"(n), +Index: openssl-1.0.2a/crypto/bn/bn.h =================================================================== ---- openssl-1.0.0e.orig/crypto/bn/bn.h -+++ openssl-1.0.0e/crypto/bn/bn.h -@@ -172,6 +172,13 @@ extern "C" { +--- openssl-1.0.2a.orig/crypto/bn/bn.h ++++ openssl-1.0.2a/crypto/bn/bn.h +@@ -173,6 +173,13 @@ extern "C" { + # endif # endif - #endif +/* Address type. */ +#ifdef _WIN64 @@ -74,6 +65,6 @@ Index: openssl-1.0.0e/crypto/bn/bn.h +#define BN_ADDR unsigned long +#endif + - /* assuming long is 64bit - this is the DEC Alpha - * unsigned long long is only 64 bits :-(, don't define - * BN_LLONG for the DEC Alpha */ + /* + * assuming long is 64bit - this is the DEC Alpha unsigned long long is only + * 64 bits :-(, don't define BN_LLONG for the DEC Alpha diff --git a/mingw-w64-openssl/openssl-1.0.1i-relocation.patch b/mingw-w64-openssl/openssl-1.0.1i-relocation.patch index fff017ab8c..b33a98546a 100644 --- a/mingw-w64-openssl/openssl-1.0.1i-relocation.patch +++ b/mingw-w64-openssl/openssl-1.0.1i-relocation.patch @@ -1,7 +1,7 @@ diff -Naur openssl-1.0.1i-orig/Configure openssl-1.0.1i/Configure --- openssl-1.0.1i-orig/Configure 2014-08-07 01:10:56.000000000 +0400 +++ openssl-1.0.1i/Configure 2014-08-08 00:23:45.884200000 +0400 -@@ -1803,6 +1803,12 @@ +@@ -1900,6 +1900,12 @@ $foo =~ s/\\/\\\\/g; print OUT "#define OPENSSLDIR \"$foo\"\n"; } @@ -17,17 +17,17 @@ diff -Naur openssl-1.0.1i-orig/Configure openssl-1.0.1i/Configure diff -Naur openssl-1.0.1i-orig/crypto/engine/eng_list.c openssl-1.0.1i/crypto/engine/eng_list.c --- openssl-1.0.1i-orig/crypto/engine/eng_list.c 2014-07-22 23:41:23.000000000 +0400 +++ openssl-1.0.1i/crypto/engine/eng_list.c 2014-08-08 00:32:40.141000000 +0400 -@@ -62,6 +62,7 @@ +@@ -63,6 +63,7 @@ */ #include "eng_int.h" +#include "pathtools.h" - /* The linked-list of pointers to engine types. engine_list_head - * incorporates an implicit structural reference but engine_list_tail -@@ -79,6 +80,24 @@ - /* This cleanup function is only needed internally. If it should be called, we - * register it with the "ENGINE_cleanup()" stack to be called during cleanup. */ + /* + * The linked-list of pointers to engine types. engine_list_head incorporates +@@ -84,6 +85,24 @@ + * cleanup. + */ +char * enginedir_relocation(const char *path) +{ @@ -48,24 +48,25 @@ diff -Naur openssl-1.0.1i-orig/crypto/engine/eng_list.c openssl-1.0.1i/crypto/en +} + static void engine_list_cleanup(void) - { - ENGINE *iterator = engine_list_head; -@@ -401,7 +420,10 @@ - #ifdef OPENSSL_SYS_VMS - if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = "SSLROOT:[ENGINES]"; - #else -- if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = ENGINESDIR; -+ if((load_dir = getenv("OPENSSL_ENGINES")) == 0) { -+ const char * reloc_engines = enginedir_relocation(ENGINESDIR); -+ load_dir = reloc_engines; -+ } - #endif - iterator = ENGINE_by_id("dynamic"); - if(!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || + { + ENGINE *iterator = engine_list_head; +@@ -371,8 +390,10 @@ + if ((load_dir = getenv("OPENSSL_ENGINES")) == 0) + load_dir = "SSLROOT:[ENGINES]"; + # else +- if ((load_dir = getenv("OPENSSL_ENGINES")) == 0) +- load_dir = ENGINESDIR; ++ if((load_dir = getenv("OPENSSL_ENGINES")) == 0) { ++ const char * reloc_engines = enginedir_relocation(ENGINESDIR); ++ load_dir = reloc_engines; ++ } + # endif + iterator = ENGINE_by_id("dynamic"); + if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || diff -Naur openssl-1.0.1i-orig/crypto/engine/Makefile openssl-1.0.1i/crypto/engine/Makefile --- openssl-1.0.1i-orig/crypto/engine/Makefile 2014-08-07 01:18:34.000000000 +0400 +++ openssl-1.0.1i/crypto/engine/Makefile 2014-08-08 00:41:21.195800000 +0400 -@@ -207,7 +207,7 @@ +@@ -209,7 +209,7 @@ eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h eng_lib.o: ../cryptlib.h eng_int.h eng_lib.c @@ -77,7 +78,7 @@ diff -Naur openssl-1.0.1i-orig/crypto/engine/Makefile openssl-1.0.1i/crypto/engi diff -Naur openssl-1.0.1i-orig/crypto/Makefile openssl-1.0.1i/crypto/Makefile --- openssl-1.0.1i-orig/crypto/Makefile 2014-08-07 01:18:30.000000000 +0400 +++ openssl-1.0.1i/crypto/Makefile 2014-08-08 00:38:49.430000000 +0400 -@@ -34,9 +34,9 @@ +@@ -35,9 +35,9 @@ LIB= $(TOP)/libcrypto.a SHARED_LIB= libcrypto$(SHLIB_EXT) @@ -89,7 +90,7 @@ diff -Naur openssl-1.0.1i-orig/crypto/Makefile openssl-1.0.1i/crypto/Makefile uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o $(CPUID_OBJ) SRC= $(LIBSRC) -@@ -213,6 +213,7 @@ +@@ -215,6 +215,7 @@ o_str.o: o_str.c o_str.h o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c o_time.o: o_time.h @@ -100,7 +101,7 @@ diff -Naur openssl-1.0.1i-orig/crypto/Makefile openssl-1.0.1i/crypto/Makefile diff -Naur openssl-1.0.1i-orig/crypto/opensslconf.h openssl-1.0.1i/crypto/opensslconf.h --- openssl-1.0.1i-orig/crypto/opensslconf.h 2014-08-07 01:18:45.000000000 +0400 +++ openssl-1.0.1i/crypto/opensslconf.h 2014-08-08 00:26:43.479000000 +0400 -@@ -86,6 +86,7 @@ +@@ -101,6 +101,7 @@ #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) @@ -678,7 +679,7 @@ diff -urN old/pathtools.h new/pathtools.h diff -Naur openssl-1.0.1i-orig/crypto/x509/Makefile openssl-1.0.1i/crypto/x509/Makefile --- openssl-1.0.1i-orig/crypto/x509/Makefile 2014-08-07 01:18:39.000000000 +0400 +++ openssl-1.0.1i/crypto/x509/Makefile 2014-08-08 00:39:56.382600000 +0400 -@@ -151,7 +151,7 @@ +@@ -153,7 +153,7 @@ x509_d2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_d2.o: ../cryptlib.h x509_d2.c @@ -690,7 +691,7 @@ diff -Naur openssl-1.0.1i-orig/crypto/x509/Makefile openssl-1.0.1i/crypto/x509/M diff -Naur openssl-1.0.1i-orig/crypto/x509/x509_def.c openssl-1.0.1i/crypto/x509/x509_def.c --- openssl-1.0.1i-orig/crypto/x509/x509_def.c 2014-07-22 23:41:23.000000000 +0400 +++ openssl-1.0.1i/crypto/x509/x509_def.c 2014-08-08 00:28:13.366200000 +0400 -@@ -58,20 +58,39 @@ +@@ -58,27 +58,46 @@ #include #include "cryptlib.h" @@ -717,20 +718,27 @@ diff -Naur openssl-1.0.1i-orig/crypto/x509/x509_def.c openssl-1.0.1i/crypto/x509 +} + const char *X509_get_default_private_dir(void) -- { return(X509_PRIVATE_DIR); } -+ { return openssl_relocation(X509_PRIVATE_DIR); } - + { +- return (X509_PRIVATE_DIR); ++ return openssl_relocation(X509_PRIVATE_DIR); + } + const char *X509_get_default_cert_area(void) -- { return(X509_CERT_AREA); } -+ { return openssl_relocation(X509_CERT_AREA); } + { +- return (X509_CERT_AREA); ++ return openssl_relocation(X509_CERT_AREA); + } const char *X509_get_default_cert_dir(void) -- { return(X509_CERT_DIR); } -+ { return openssl_relocation(X509_CERT_DIR); } + { +- return (X509_CERT_DIR); ++ return openssl_relocation(X509_CERT_DIR); + } const char *X509_get_default_cert_file(void) -- { return(X509_CERT_FILE); } -+ { return openssl_relocation(X509_CERT_FILE); } + { +- return (X509_CERT_FILE); ++ return openssl_relocation(X509_CERT_FILE); + } const char *X509_get_default_cert_dir_env(void) - { return(X509_CERT_DIR_EVP); } diff --git a/mingw-w64-openssl/openssl-1.0.2-ipv6.patch b/mingw-w64-openssl/openssl-1.0.2-ipv6.patch new file mode 100644 index 0000000000..27574ea616 --- /dev/null +++ b/mingw-w64-openssl/openssl-1.0.2-ipv6.patch @@ -0,0 +1,611 @@ +http://rt.openssl.org/Ticket/Display.html?id=2051&user=guest&pass=guest + +--- openssl-1.0.2/apps/s_apps.h ++++ openssl-1.0.2/apps/s_apps.h +@@ -154,7 +154,7 @@ + int do_server(int port, int type, int *ret, + int (*cb) (char *hostname, int s, int stype, + unsigned char *context), unsigned char *context, +- int naccept); ++ int naccept, int use_ipv4, int use_ipv6); + #ifdef HEADER_X509_H + int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); + #endif +@@ -167,7 +167,8 @@ + int ssl_print_curves(BIO *out, SSL *s, int noshared); + #endif + int ssl_print_tmp_key(BIO *out, SSL *s); +-int init_client(int *sock, char *server, int port, int type); ++int init_client(int *sock, char *server, int port, int type, ++ int use_ipv4, int use_ipv6); + int should_retry(int i); + int extract_port(char *str, short *port_ptr); + int extract_host_port(char *str, char **host_ptr, unsigned char *ip, +--- openssl-1.0.2/apps/s_client.c ++++ openssl-1.0.2/apps/s_client.c +@@ -302,6 +302,10 @@ + { + BIO_printf(bio_err, "usage: s_client args\n"); + BIO_printf(bio_err, "\n"); ++ BIO_printf(bio_err, " -4 - use IPv4 only\n"); ++#if OPENSSL_USE_IPV6 ++ BIO_printf(bio_err, " -6 - use IPv6 only\n"); ++#endif + BIO_printf(bio_err, " -host host - use -connect instead\n"); + BIO_printf(bio_err, " -port port - use -connect instead\n"); + BIO_printf(bio_err, +@@ -658,6 +662,7 @@ + int sbuf_len, sbuf_off; + fd_set readfds, writefds; + short port = PORT; ++ int use_ipv4, use_ipv6; + int full_log = 1; + char *host = SSL_HOST_NAME; + char *cert_file = NULL, *key_file = NULL, *chain_file = NULL; +@@ -709,7 +714,11 @@ + #endif + char *sess_in = NULL; + char *sess_out = NULL; +- struct sockaddr peer; ++#if OPENSSL_USE_IPV6 ++ struct sockaddr_storage peer; ++#else ++ struct sockaddr_in peer; ++#endif + int peerlen = sizeof(peer); + int fallback_scsv = 0; + int enable_timeouts = 0; +@@ -737,6 +746,12 @@ + + meth = SSLv23_client_method(); + ++ use_ipv4 = 1; ++#if OPENSSL_USE_IPV6 ++ use_ipv6 = 1; ++#else ++ use_ipv6 = 0; ++#endif + apps_startup(); + c_Pause = 0; + c_quiet = 0; +@@ -1096,6 +1111,16 @@ + jpake_secret = *++argv; + } + #endif ++ else if (strcmp(*argv,"-4") == 0) { ++ use_ipv4 = 1; ++ use_ipv6 = 0; ++ } ++#if OPENSSL_USE_IPV6 ++ else if (strcmp(*argv,"-6") == 0) { ++ use_ipv4 = 0; ++ use_ipv6 = 1; ++ } ++#endif + #ifndef OPENSSL_NO_SRTP + else if (strcmp(*argv, "-use_srtp") == 0) { + if (--argc < 1) +@@ -1421,7 +1446,7 @@ + + re_start: + +- if (init_client(&s, host, port, socket_type) == 0) { ++ if (init_client(&s, host, port, socket_type, use_ipv4, use_ipv6) == 0) { + BIO_printf(bio_err, "connect:errno=%d\n", get_last_socket_error()); + SHUTDOWN(s); + goto end; +@@ -1444,7 +1469,7 @@ + if (socket_type == SOCK_DGRAM) { + + sbio = BIO_new_dgram(s, BIO_NOCLOSE); +- if (getsockname(s, &peer, (void *)&peerlen) < 0) { ++ if (getsockname(s, (struct sockaddr *)&peer, (void *)&peerlen) < 0) { + BIO_printf(bio_err, "getsockname:errno=%d\n", + get_last_socket_error()); + SHUTDOWN(s); +--- openssl-1.0.2/apps/s_server.c ++++ openssl-1.0.2/apps/s_server.c +@@ -643,6 +643,10 @@ + BIO_printf(bio_err, + " -alpn arg - set the advertised protocols for the ALPN extension (comma-separated list)\n"); + #endif ++ BIO_printf(bio_err, " -4 - use IPv4 only\n"); ++#if OPENSSL_USE_IPV6 ++ BIO_printf(bio_err, " -6 - use IPv6 only\n"); ++#endif + BIO_printf(bio_err, + " -keymatexport label - Export keying material using label\n"); + BIO_printf(bio_err, +@@ -1070,6 +1074,7 @@ + int state = 0; + const SSL_METHOD *meth = NULL; + int socket_type = SOCK_STREAM; ++ int use_ipv4, use_ipv6; + ENGINE *e = NULL; + char *inrand = NULL; + int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM; +@@ -1111,6 +1116,12 @@ + + meth = SSLv23_server_method(); + ++ use_ipv4 = 1; ++#if OPENSSL_USE_IPV6 ++ use_ipv6 = 1; ++#else ++ use_ipv6 = 0; ++#endif + local_argc = argc; + local_argv = argv; + +@@ -1503,6 +1514,16 @@ + jpake_secret = *(++argv); + } + #endif ++ else if (strcmp(*argv,"-4") == 0) { ++ use_ipv4 = 1; ++ use_ipv6 = 0; ++ } ++#if OPENSSL_USE_IPV6 ++ else if (strcmp(*argv,"-6") == 0) { ++ use_ipv4 = 0; ++ use_ipv6 = 1; ++ } ++#endif + #ifndef OPENSSL_NO_SRTP + else if (strcmp(*argv, "-use_srtp") == 0) { + if (--argc < 1) +@@ -2023,13 +2044,13 @@ + (void)BIO_flush(bio_s_out); + if (rev) + do_server(port, socket_type, &accept_socket, rev_body, context, +- naccept); ++ naccept, use_ipv4, use_ipv6); + else if (www) + do_server(port, socket_type, &accept_socket, www_body, context, +- naccept); ++ naccept, use_ipv4, use_ipv6); + else + do_server(port, socket_type, &accept_socket, sv_body, context, +- naccept); ++ naccept, use_ipv4, use_ipv6); + print_stats(bio_s_out, ctx); + ret = 0; + end: +--- openssl-1.0.2/apps/s_socket.c ++++ openssl-1.0.2/apps/s_socket.c +@@ -101,16 +101,16 @@ + # include "netdb.h" + # endif + +-static struct hostent *GetHostByName(char *name); ++static struct hostent *GetHostByName(char *name, int domain); + # if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) + static void ssl_sock_cleanup(void); + # endif + static int ssl_sock_init(void); +-static int init_client_ip(int *sock, unsigned char ip[4], int port, int type); +-static int init_server(int *sock, int port, int type); +-static int init_server_long(int *sock, int port, char *ip, int type); ++static int init_client_ip(int *sock, unsigned char *ip, int port, int type, int domain); ++static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6); ++static int init_server_long(int *sock, int port, char *ip, int type, int use_ipv4, int use_ipv6); + static int do_accept(int acc_sock, int *sock, char **host); +-static int host_ip(char *str, unsigned char ip[4]); ++static int host_ip(char *str, unsigned char *ip, int domain); + + # ifdef OPENSSL_SYS_WIN16 + # define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ +@@ -231,38 +231,68 @@ + return (1); + } + +-int init_client(int *sock, char *host, int port, int type) ++int init_client(int *sock, char *host, int port, int type, int use_ipv4, int use_ipv6) + { ++# if OPENSSL_USE_IPV6 ++ unsigned char ip[16]; ++# else + unsigned char ip[4]; ++# endif + +- memset(ip, '\0', sizeof ip); +- if (!host_ip(host, &(ip[0]))) +- return 0; +- return init_client_ip(sock, ip, port, type); +-} +- +-static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) +-{ +- unsigned long addr; ++ if (use_ipv4) ++ if (host_ip(host, ip, AF_INET)) ++ return(init_client_ip(sock, ip, port, type, AF_INET)); ++# if OPENSSL_USE_IPV6 ++ if (use_ipv6) ++ if (host_ip(host, ip, AF_INET6)) ++ return(init_client_ip(sock, ip, port, type, AF_INET6)); ++# endif ++ return 0; ++} ++ ++static int init_client_ip(int *sock, unsigned char ip[4], int port, int type, int domain) ++{ ++# if OPENSSL_USE_IPV6 ++ struct sockaddr_storage them; ++ struct sockaddr_in *them_in = (struct sockaddr_in *)&them; ++ struct sockaddr_in6 *them_in6 = (struct sockaddr_in6 *)&them; ++# else + struct sockaddr_in them; ++ struct sockaddr_in *them_in = &them; ++# endif ++ socklen_t addr_len; + int s, i; + + if (!ssl_sock_init()) + return (0); + + memset((char *)&them, 0, sizeof(them)); +- them.sin_family = AF_INET; +- them.sin_port = htons((unsigned short)port); +- addr = (unsigned long) +- ((unsigned long)ip[0] << 24L) | +- ((unsigned long)ip[1] << 16L) | +- ((unsigned long)ip[2] << 8L) | ((unsigned long)ip[3]); +- them.sin_addr.s_addr = htonl(addr); ++ if (domain == AF_INET) { ++ addr_len = (socklen_t)sizeof(struct sockaddr_in); ++ them_in->sin_family=AF_INET; ++ them_in->sin_port=htons((unsigned short)port); ++# ifndef BIT_FIELD_LIMITS ++ memcpy(&them_in->sin_addr.s_addr, ip, 4); ++# else ++ memcpy(&them_in->sin_addr, ip, 4); ++# endif ++ } ++ else ++# if OPENSSL_USE_IPV6 ++ { ++ addr_len = (socklen_t)sizeof(struct sockaddr_in6); ++ them_in6->sin6_family=AF_INET6; ++ them_in6->sin6_port=htons((unsigned short)port); ++ memcpy(&(them_in6->sin6_addr), ip, sizeof(struct in6_addr)); ++ } ++# else ++ return(0); ++# endif + + if (type == SOCK_STREAM) +- s = socket(AF_INET, SOCK_STREAM, SOCKET_PROTOCOL); ++ s = socket(domain, SOCK_STREAM, SOCKET_PROTOCOL); + else /* ( type == SOCK_DGRAM) */ +- s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ++ s = socket(domain, SOCK_DGRAM, IPPROTO_UDP); + + if (s == INVALID_SOCKET) { + perror("socket"); +@@ -280,7 +310,7 @@ + } + # endif + +- if (connect(s, (struct sockaddr *)&them, sizeof(them)) == -1) { ++ if (connect(s, (struct sockaddr *)&them, addr_len) == -1) { + closesocket(s); + perror("connect"); + return (0); +@@ -292,14 +322,14 @@ + int do_server(int port, int type, int *ret, + int (*cb) (char *hostname, int s, int stype, + unsigned char *context), unsigned char *context, +- int naccept) ++ int naccept, int use_ipv4, int use_ipv6) + { + int sock; + char *name = NULL; + int accept_socket = 0; + int i; + +- if (!init_server(&accept_socket, port, type)) ++ if (!init_server(&accept_socket, port, type, use_ipv4, use_ipv6)) + return (0); + + if (ret != NULL) { +@@ -328,32 +358,41 @@ + } + } + +-static int init_server_long(int *sock, int port, char *ip, int type) ++static int init_server_long(int *sock, int port, char *ip, int type, int use_ipv4, int use_ipv6) + { + int ret = 0; ++ int domain; ++# if OPENSSL_USE_IPV6 ++ struct sockaddr_storage server; ++ struct sockaddr_in *server_in = (struct sockaddr_in *)&server; ++ struct sockaddr_in6 *server_in6 = (struct sockaddr_in6 *)&server; ++# else + struct sockaddr_in server; ++ struct sockaddr_in *server_in = &server; ++# endif ++ socklen_t addr_len; + int s = -1; + ++ if (!use_ipv4 && !use_ipv6) ++ goto err; ++# if OPENSSL_USE_IPV6 ++ /* we are fine here */ ++# else ++ if (use_ipv6) ++ goto err; ++# endif + if (!ssl_sock_init()) + return (0); + +- memset((char *)&server, 0, sizeof(server)); +- server.sin_family = AF_INET; +- server.sin_port = htons((unsigned short)port); +- if (ip == NULL) +- server.sin_addr.s_addr = INADDR_ANY; +- else +-/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */ +-# ifndef BIT_FIELD_LIMITS +- memcpy(&server.sin_addr.s_addr, ip, 4); ++#if OPENSSL_USE_IPV6 ++ domain = use_ipv6 ? AF_INET6 : AF_INET; + # else +- memcpy(&server.sin_addr, ip, 4); ++ domain = AF_INET; + # endif +- + if (type == SOCK_STREAM) +- s = socket(AF_INET, SOCK_STREAM, SOCKET_PROTOCOL); +- else /* type == SOCK_DGRAM */ +- s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ++ s=socket(domain, SOCK_STREAM, SOCKET_PROTOCOL); ++ else /* type == SOCK_DGRAM */ ++ s=socket(domain, SOCK_DGRAM, IPPROTO_UDP); + + if (s == INVALID_SOCKET) + goto err; +@@ -363,7 +402,42 @@ + setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&j, sizeof j); + } + # endif +- if (bind(s, (struct sockaddr *)&server, sizeof(server)) == -1) { ++# if OPENSSL_USE_IPV6 ++ if ((use_ipv4 == 0) && (use_ipv6 == 1)) { ++ const int on = 1; ++ ++ setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, ++ (const void *) &on, sizeof(int)); ++ } ++# endif ++ if (domain == AF_INET) { ++ addr_len = (socklen_t)sizeof(struct sockaddr_in); ++ memset(server_in, 0, sizeof(struct sockaddr_in)); ++ server_in->sin_family=AF_INET; ++ server_in->sin_port = htons((unsigned short)port); ++ if (ip == NULL) ++ server_in->sin_addr.s_addr = htonl(INADDR_ANY); ++ else ++/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */ ++# ifndef BIT_FIELD_LIMITS ++ memcpy(&server_in->sin_addr.s_addr, ip, 4); ++# else ++ memcpy(&server_in->sin_addr, ip, 4); ++# endif ++ } ++# if OPENSSL_USE_IPV6 ++ else { ++ addr_len = (socklen_t)sizeof(struct sockaddr_in6); ++ memset(server_in6, 0, sizeof(struct sockaddr_in6)); ++ server_in6->sin6_family = AF_INET6; ++ server_in6->sin6_port = htons((unsigned short)port); ++ if (ip == NULL) ++ server_in6->sin6_addr = in6addr_any; ++ else ++ memcpy(&server_in6->sin6_addr, ip, sizeof(struct in6_addr)); ++ } ++# endif ++ if (bind(s, (struct sockaddr *)&server, addr_len) == -1) { + # ifndef OPENSSL_SYS_WINDOWS + perror("bind"); + # endif +@@ -381,16 +455,23 @@ + return (ret); + } + +-static int init_server(int *sock, int port, int type) ++static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6) + { +- return (init_server_long(sock, port, NULL, type)); ++ return (init_server_long(sock, port, NULL, type, use_ipv4, use_ipv6)); + } + + static int do_accept(int acc_sock, int *sock, char **host) + { + int ret; + struct hostent *h1, *h2; +- static struct sockaddr_in from; ++#if OPENSSL_USE_IPV6 ++ struct sockaddr_storage from; ++ struct sockaddr_in *from_in = (struct sockaddr_in *)&from; ++ struct sockaddr_in6 *from_in6 = (struct sockaddr_in6 *)&from; ++#else ++ struct sockaddr_in from; ++ struct sockaddr_in *from_in = &from; ++#endif + int len; + /* struct linger ling; */ + +@@ -440,14 +521,25 @@ + + if (host == NULL) + goto end; ++# if OPENSSL_USE_IPV6 ++ if (from.ss_family == AF_INET) ++# else ++ if (from.sin_family == AF_INET) ++# endif + # ifndef BIT_FIELD_LIMITS +- /* I should use WSAAsyncGetHostByName() under windows */ +- h1 = gethostbyaddr((char *)&from.sin_addr.s_addr, +- sizeof(from.sin_addr.s_addr), AF_INET); ++ /* I should use WSAAsyncGetHostByName() under windows */ ++ h1 = gethostbyaddr((char *)&from_in->sin_addr.s_addr, ++ sizeof(from_in->sin_addr.s_addr), AF_INET); + # else +- h1 = gethostbyaddr((char *)&from.sin_addr, +- sizeof(struct in_addr), AF_INET); ++ h1 = gethostbyaddr((char *)&from_in->sin_addr, ++ sizeof(struct in_addr), AF_INET); ++# endif ++# if OPENSSL_USE_IPV6 ++ else ++ h1 = gethostbyaddr((char *)&from_in6->sin6_addr, ++ sizeof(struct in6_addr), AF_INET6); + # endif ++ + if (h1 == NULL) { + BIO_printf(bio_err, "bad gethostbyaddr\n"); + *host = NULL; +@@ -460,14 +552,22 @@ + } + BUF_strlcpy(*host, h1->h_name, strlen(h1->h_name) + 1); + +- h2 = GetHostByName(*host); ++# if OPENSSL_USE_IPV6 ++ h2=GetHostByName(*host, from.ss_family); ++# else ++ h2=GetHostByName(*host, from.sin_family); ++# endif + if (h2 == NULL) { + BIO_printf(bio_err, "gethostbyname failure\n"); + closesocket(ret); + return (0); + } +- if (h2->h_addrtype != AF_INET) { +- BIO_printf(bio_err, "gethostbyname addr is not AF_INET\n"); ++# if OPENSSL_USE_IPV6 ++ if (h2->h_addrtype != from.ss_family) { ++# else ++ if (h2->h_addrtype != from.sin_family) { ++# endif ++ BIO_printf(bio_err, "gethostbyname addr is not correct\n"); + closesocket(ret); + return (0); + } +@@ -483,14 +583,14 @@ + char *h, *p; + + h = str; +- p = strchr(str, ':'); ++ p = strrchr(str, ':'); + if (p == NULL) { + BIO_printf(bio_err, "no port defined\n"); + return (0); + } + *(p++) = '\0'; + +- if ((ip != NULL) && !host_ip(str, ip)) ++ if ((ip != NULL) && !host_ip(str, ip, AF_INET)) + goto err; + if (host_ptr != NULL) + *host_ptr = h; +@@ -502,44 +602,51 @@ + return (0); + } + +-static int host_ip(char *str, unsigned char ip[4]) ++static int host_ip(char *str, unsigned char *ip, int domain) + { + unsigned int in[4]; ++ unsigned long l; + int i; + +- if (sscanf(str, "%u.%u.%u.%u", &(in[0]), &(in[1]), &(in[2]), &(in[3])) == +- 4) { ++ if ((domain == AF_INET) && (sscanf(str, "%u.%u.%u.%u", &(in[0]), &(in[1]), &(in[2]), &(in[3])) == 4)) { + for (i = 0; i < 4; i++) + if (in[i] > 255) { + BIO_printf(bio_err, "invalid IP address\n"); + goto err; + } +- ip[0] = in[0]; +- ip[1] = in[1]; +- ip[2] = in[2]; +- ip[3] = in[3]; +- } else { /* do a gethostbyname */ ++ l=htonl((in[0]<<24L)|(in[1]<<16L)|(in[2]<<8L)|in[3]); ++ memcpy(ip, &l, 4); ++ return 1; ++ } ++# if OPENSSL_USE_IPV6 ++ else if ((domain == AF_INET6) && (inet_pton(AF_INET6, str, ip) == 1)) ++ return 1; ++# endif ++ else { /* do a gethostbyname */ + struct hostent *he; + + if (!ssl_sock_init()) + return (0); + +- he = GetHostByName(str); ++ he = GetHostByName(str, domain); + if (he == NULL) { + BIO_printf(bio_err, "gethostbyname failure\n"); + goto err; + } + /* cast to short because of win16 winsock definition */ +- if ((short)he->h_addrtype != AF_INET) { +- BIO_printf(bio_err, "gethostbyname addr is not AF_INET\n"); ++ if ((short)he->h_addrtype != domain) { ++ BIO_printf(bio_err, "gethostbyname addr is not correct\n"); + return (0); + } +- ip[0] = he->h_addr_list[0][0]; +- ip[1] = he->h_addr_list[0][1]; +- ip[2] = he->h_addr_list[0][2]; +- ip[3] = he->h_addr_list[0][3]; ++ if (domain == AF_INET) ++ memset(ip, 0, 4); ++# if OPENSSL_USE_IPV6 ++ else ++ memset(ip, 0, 16); ++# endif ++ memcpy(ip, he->h_addr_list[0], he->h_length); ++ return 1; + } +- return (1); + err: + return (0); + } +@@ -573,7 +680,7 @@ + static unsigned long ghbn_hits = 0L; + static unsigned long ghbn_miss = 0L; + +-static struct hostent *GetHostByName(char *name) ++static struct hostent *GetHostByName(char *name, int domain) + { + struct hostent *ret; + int i, lowi = 0; +@@ -585,13 +692,18 @@ + lowi = i; + } + if (ghbn_cache[i].order > 0) { +- if (strncmp(name, ghbn_cache[i].name, 128) == 0) ++ if ((strncmp(name, ghbn_cache[i].name, 128) == 0) && (ghbn_cache[i].ent.h_addrtype == domain)) + break; + } + } + if (i == GHBN_NUM) { /* no hit */ + ghbn_miss++; +- ret = gethostbyname(name); ++ if (domain == AF_INET) ++ ret = gethostbyname(name); ++# if OPENSSL_USE_IPV6 ++ else ++ ret = gethostbyname2(name, AF_INET6); ++# endif + if (ret == NULL) + return (NULL); + /* else add to cache */ diff --git a/mingw-w64-openssl/openssl-1.0.1-parallel-build.patch b/mingw-w64-openssl/openssl-1.0.2a-parallel-build.patch similarity index 79% rename from mingw-w64-openssl/openssl-1.0.1-parallel-build.patch rename to mingw-w64-openssl/openssl-1.0.2a-parallel-build.patch index 7c804b5432..053106d481 100644 --- a/mingw-w64-openssl/openssl-1.0.1-parallel-build.patch +++ b/mingw-w64-openssl/openssl-1.0.2a-parallel-build.patch @@ -1,105 +1,7 @@ -http://rt.openssl.org/Ticket/Display.html?id=2084 +http://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest ---- a/Makefile.org -+++ b/Makefile.org -@@ -247,17 +247,17 @@ - build_libs: build_crypto build_ssl build_engines - - build_crypto: -- @dir=crypto; target=all; $(BUILD_ONE_CMD) -+ +@dir=crypto; target=all; $(BUILD_ONE_CMD) --build_ssl: -+build_ssl: build_crypto -- @dir=ssl; target=all; $(BUILD_ONE_CMD) -+ +@dir=ssl; target=all; $(BUILD_ONE_CMD) --build_engines: -+build_engines: build_crypto -- @dir=engines; target=all; $(BUILD_ONE_CMD) -+ +@dir=engines; target=all; $(BUILD_ONE_CMD) --build_apps: -+build_apps: build_libs -- @dir=apps; target=all; $(BUILD_ONE_CMD) -+ +@dir=apps; target=all; $(BUILD_ONE_CMD) --build_tests: -+build_tests: build_libs -- @dir=test; target=all; $(BUILD_ONE_CMD) -+ +@dir=test; target=all; $(BUILD_ONE_CMD) --build_tools: -+build_tools: build_libs -- @dir=tools; target=all; $(BUILD_ONE_CMD) -+ +@dir=tools; target=all; $(BUILD_ONE_CMD) - - all_testapps: build_libs build_testapps - build_testapps: -@@ -497,9 +497,9 @@ - dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) - --install: all install_docs install_sw -+install: install_docs install_sw - --install_sw: -+install_dirs: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ -@@ -508,6 +508,13 @@ - $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/private -+ @$(PERL) $(TOP)/util/mkdir-p.pl \ -+ $(INSTALL_PREFIX)$(MANDIR)/man1 \ -+ $(INSTALL_PREFIX)$(MANDIR)/man3 \ -+ $(INSTALL_PREFIX)$(MANDIR)/man5 \ -+ $(INSTALL_PREFIX)$(MANDIR)/man7 -+ -+install_sw: install_dirs - @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\ - do \ - (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ -@@ -511,7 +511,7 @@ - (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ - done; -- @set -e; target=install; $(RECURSIVE_BUILD_CMD) -+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD) - @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ - do \ - if [ -f "$$i" ]; then \ -@@ -593,12 +600,7 @@ - done; \ - done - --install_docs: -- @$(PERL) $(TOP)/util/mkdir-p.pl \ -- $(INSTALL_PREFIX)$(MANDIR)/man1 \ -- $(INSTALL_PREFIX)$(MANDIR)/man3 \ -- $(INSTALL_PREFIX)$(MANDIR)/man5 \ -- $(INSTALL_PREFIX)$(MANDIR)/man7 -+install_docs: install_dirs - @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \ - here="`pwd`"; \ - filecase=; \ ---- a/Makefile.shared -+++ b/Makefile.shared -@@ -105,6 +105,7 @@ LINK_SO= \ - SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ - LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ - LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ -+ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \ - LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ - $${SHAREDCMD} $${SHAREDFLAGS} \ - -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ -@@ -122,6 +124,7 @@ SYMLINK_SO= \ - done; \ - fi; \ - if [ -n "$$SHLIB_SOVER" ]; then \ -+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \ - ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \ - ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \ - fi; \ ---- a/crypto/Makefile -+++ b/crypto/Makefile +--- openssl-1.0.2a/crypto/Makefile ++++ openssl-1.0.2a/crypto/Makefile @@ -85,11 +85,11 @@ @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi @@ -108,7 +10,7 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 + +@target=all; $(RECURSIVE_MAKE) files: - $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO - @target=files; $(RECURSIVE_MAKE) + +@target=files; $(RECURSIVE_MAKE) @@ -121,9 +23,9 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 -$(LIB): $(LIBOBJ) +$(LIB): $(LIBOBJ) | subdirs $(AR) $(LIB) $(LIBOBJ) + test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o $(RANLIB) $(LIB) || echo Never mind. - -@@ -110,7 +110,7 @@ +@@ -111,7 +111,7 @@ fi libs: @@ -132,7 +34,7 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 install: @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... -@@ -119,7 +119,7 @@ +@@ -120,7 +120,7 @@ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ done; @@ -141,8 +43,25 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 lint: @target=lint; $(RECURSIVE_MAKE) ---- a/engines/Makefile -+++ b/engines/Makefile +--- openssl-1.0.2a/crypto/objects/Makefile ++++ openssl-1.0.2a/crypto/objects/Makefile +@@ -44,11 +44,11 @@ + # objects.pl both reads and writes obj_mac.num + obj_mac.h: objects.pl objects.txt obj_mac.num + $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h +- @sleep 1; touch obj_mac.h; sleep 1 + +-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num ++# This doesn't really need obj_mac.h, but since that rule reads & writes ++# obj_mac.num, we can't run in parallel with it. ++obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h + $(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h +- @sleep 1; touch obj_xref.h; sleep 1 + + files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO +--- openssl-1.0.2a/engines/Makefile ++++ openssl-1.0.2a/engines/Makefile @@ -72,7 +72,7 @@ all: lib subdirs @@ -170,9 +89,100 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 tags: ctags $(SRC) ---- a/test/Makefile -+++ b/test/Makefile -@@ -123,7 +123,7 @@ +--- openssl-1.0.2a/Makefile.org ++++ openssl-1.0.2a/Makefile.org +@@ -281,17 +281,17 @@ + build_libssl: build_ssl libssl.pc + + build_crypto: +- @dir=crypto; target=all; $(BUILD_ONE_CMD) ++ +@dir=crypto; target=all; $(BUILD_ONE_CMD) + build_ssl: build_crypto +- @dir=ssl; target=all; $(BUILD_ONE_CMD) ++ +@dir=ssl; target=all; $(BUILD_ONE_CMD) + build_engines: build_crypto +- @dir=engines; target=all; $(BUILD_ONE_CMD) ++ +@dir=engines; target=all; $(BUILD_ONE_CMD) + build_apps: build_libs +- @dir=apps; target=all; $(BUILD_ONE_CMD) ++ +@dir=apps; target=all; $(BUILD_ONE_CMD) + build_tests: build_libs +- @dir=test; target=all; $(BUILD_ONE_CMD) ++ +@dir=test; target=all; $(BUILD_ONE_CMD) + build_tools: build_libs +- @dir=tools; target=all; $(BUILD_ONE_CMD) ++ +@dir=tools; target=all; $(BUILD_ONE_CMD) + + all_testapps: build_libs build_testapps + build_testapps: +@@ -530,9 +530,9 @@ + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: install_docs install_sw + +-install_sw: ++install_dirs: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ + $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ + $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ +@@ -541,12 +541,19 @@ + $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/private ++ @$(PERL) $(TOP)/util/mkdir-p.pl \ ++ $(INSTALL_PREFIX)$(MANDIR)/man1 \ ++ $(INSTALL_PREFIX)$(MANDIR)/man3 \ ++ $(INSTALL_PREFIX)$(MANDIR)/man5 \ ++ $(INSTALL_PREFIX)$(MANDIR)/man7 ++ ++install_sw: install_dirs + @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; +- @set -e; target=install; $(RECURSIVE_BUILD_CMD) ++ +@set -e; target=install; $(RECURSIVE_BUILD_CMD) + @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ + do \ + if [ -f "$$i" ]; then \ +@@ -630,12 +640,7 @@ + done; \ + done + +-install_docs: +- @$(PERL) $(TOP)/util/mkdir-p.pl \ +- $(INSTALL_PREFIX)$(MANDIR)/man1 \ +- $(INSTALL_PREFIX)$(MANDIR)/man3 \ +- $(INSTALL_PREFIX)$(MANDIR)/man5 \ +- $(INSTALL_PREFIX)$(MANDIR)/man7 ++install_docs: install_dirs + @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \ + here="`pwd`"; \ + filecase=; \ +--- openssl-1.0.2a/Makefile.shared ++++ openssl-1.0.2a/Makefile.shared +@@ -105,6 +105,7 @@ + SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ ++ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \ + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ + $${SHAREDCMD} $${SHAREDFLAGS} \ + -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ +@@ -122,6 +123,7 @@ + done; \ + fi; \ + if [ -n "$$SHLIB_SOVER" ]; then \ ++ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \ + ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \ + ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \ + fi; \ +--- openssl-1.0.2a/test/Makefile ++++ openssl-1.0.2a/test/Makefile +@@ -134,7 +134,7 @@ tags: ctags $(SRC) @@ -181,7 +191,7 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 apps: @(cd ..; $(MAKE) DIRS=apps all) -@@ -365,109 +365,109 @@ +@@ -408,121 +408,121 @@ link_app.$${shlib_target} $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) @@ -300,6 +310,10 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 - @target=$(EVPTEST); $(BUILD_CMD) + +@target=$(EVPTEST); $(BUILD_CMD) + $(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO) +- @target=$(EVPEXTRATEST); $(BUILD_CMD) ++ +@target=$(EVPEXTRATEST); $(BUILD_CMD) + $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO) - @target=$(ECDSATEST); $(BUILD_CMD) + +@target=$(ECDSATEST); $(BUILD_CMD) @@ -324,9 +338,21 @@ http://rt.openssl.org/Ticket/Display.html?id=2084 - @target=$(SRPTEST); $(BUILD_CMD) + +@target=$(SRPTEST); $(BUILD_CMD) - #$(AESTEST).o: $(AESTEST).c - # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c -@@ -480,7 +480,7 @@ + $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO) +- @target=$(V3NAMETEST); $(BUILD_CMD) ++ +@target=$(V3NAMETEST); $(BUILD_CMD) + + $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO) +- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC) ++ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC) + + $(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o +- @target=$(CONSTTIMETEST) $(BUILD_CMD) ++ +@target=$(CONSTTIMETEST) $(BUILD_CMD) + + $(VERIFYEXTRATEST)$(EXE_EXT): $(VERIFYEXTRATEST).o + @target=$(VERIFYEXTRATEST) $(BUILD_CMD) +@@ -538,7 +538,7 @@ # fi dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) diff --git a/mingw-w64-optipng/PKGBUILD b/mingw-w64-optipng/PKGBUILD index 53e18fd7ad..19cad658c3 100644 --- a/mingw-w64-optipng/PKGBUILD +++ b/mingw-w64-optipng/PKGBUILD @@ -1,19 +1,20 @@ # Maintainer: Alexey Pavlov _realname=optipng - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.7.4 -pkgrel=1 -pkgdesc="Compresses PNG files to a smaller size, without losing any information. (mingw-w64)" +pkgver=0.7.5 +pkgrel=2 +pkgdesc="Compresses PNG files to a smaller size, without losing any information (mingw-w64)" arch=('any') url="http://optipng.sourceforge.net/" license=("ZLIB") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-zlib") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-$pkgver.tar.gz") -md5sums=('8853d89aaf859065e95dcdf98b6bed73') +source=("http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('90ac1ec7945d48c0e9859b977b5df411') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -25,6 +26,7 @@ build() { --prefix=${MINGW_PREFIX} \ --with-system-libpng \ --with-system-zlib + make } diff --git a/mingw-w64-opus-tools/PKGBUILD b/mingw-w64-opus-tools/PKGBUILD index 5c326fc5f8..23443d848e 100644 --- a/mingw-w64-opus-tools/PKGBUILD +++ b/mingw-w64-opus-tools/PKGBUILD @@ -4,7 +4,7 @@ _realname=opus-tools pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.1.9 -pkgrel=1 +pkgrel=2 pkgdesc="Collection of tools for Opus audio codec (mingw-w64)" arch=('any') url="http://www.opus-codec.org/" @@ -15,10 +15,11 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libogg" "${MINGW_PACKAGE_PREFIX}-opus") options=('strip' 'staticlibs') -source=(http://downloads.xiph.org/releases/opus/$_realname-$pkgver.tar.gz) +source=(http://downloads.xiph.org/releases/opus/${_realname}-${pkgver}.tar.gz) md5sums=('20682e4d8d1ae9ec5af3cf43e808b8cb') build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -26,6 +27,7 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} + make } diff --git a/mingw-w64-opus/PKGBUILD b/mingw-w64-opus/PKGBUILD index 860d55bb45..910e3d198c 100644 --- a/mingw-w64-opus/PKGBUILD +++ b/mingw-w64-opus/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=opus - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.1 -pkgrel=2 +pkgrel=3 pkgdesc="Codec designed for interactive speech and audio transmission over the Internet (mingw-w64)" arch=('any') url="http://www.opus-codec.org/" @@ -12,7 +11,7 @@ license=("BSD") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' 'staticlibs') source=("http://downloads.us.xiph.org/releases/${_realname}/${_realname}-${pkgver}.tar.gz" - 0001-correctly-detect-alloca.mingw.patch) + 0001-correctly-detect-alloca.mingw.patch) md5sums=('c5a8cf7c0b066759542bc4ca46817ac6' '006d3e2769d82904837b95abc20d196a') @@ -23,6 +22,7 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -31,7 +31,9 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-custom-modes \ - --disable-static + --enable-shared \ + --enable-static + make } diff --git a/mingw-w64-opusfile/PKGBUILD b/mingw-w64-opusfile/PKGBUILD new file mode 100644 index 0000000000..a95a40cdcc --- /dev/null +++ b/mingw-w64-opusfile/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Francisco Demartino + +_realname=opusfile +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.6 +pkgrel=2 +pkgdesc="Library for opening, seeking, and decoding .opus files (mingw-w64)" +arch=('any') +url="https://www.opus-codec.org/" +license=("BSD") +depends=("${MINGW_PACKAGE_PREFIX}-libogg" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-opus") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +options=('strip' 'staticlibs') +source=("https://ftp.mozilla.org/pub/mozilla.org/opus/${_realname}-${pkgver}.tar.gz") +md5sums=('3d6705e66375f6205dffdd63b2ad3538') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" +} + +build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + # Install license + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-orc/PKGBUILD b/mingw-w64-orc/PKGBUILD index 5c24c0a7fb..b9f1e9c667 100644 --- a/mingw-w64-orc/PKGBUILD +++ b/mingw-w64-orc/PKGBUILD @@ -2,7 +2,7 @@ _realname=orc pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.4.22 +pkgver=0.4.24 pkgrel=1 pkgdesc="The Oild Runtime Compiler (mingw-w64)" arch=('any') @@ -10,15 +10,15 @@ url="http://code.entropywave.com/projects/orc/" license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('strip' 'staticlibs') -source=(#"http://gstreamer.freedesktop.org/src/orc/${_realname}-${pkgver}.tar.gz" - "http://gstreamer.freedesktop.org/src/orc/${_realname}-${pkgver}.tar.xz") -md5sums=('eecd4788688a95aae97adf1125585cbf') +source=("http://gstreamer.freedesktop.org/src/orc/${_realname}-${pkgver}.tar.xz") +md5sums=('9e793ec34c0e20339659dd4bbbf62135') prepare() { cd "${srcdir}/${_realname}-${pkgver}" } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -28,6 +28,7 @@ build() { --target=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } diff --git a/mingw-w64-osgbullet-svn/PKGBUILD b/mingw-w64-osgbullet-svn/PKGBUILD new file mode 100644 index 0000000000..ec580a6f55 --- /dev/null +++ b/mingw-w64-osgbullet-svn/PKGBUILD @@ -0,0 +1,98 @@ +# Maintainer: Alexey Pavlov + +_realname=osgbullet +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn") +_ver_base=1.0.1 +pkgver=r385 +pkgrel=1 +pkgdesc="Bullet physics and OpenSceneGraph integration (mingw-w64)" +arch=('any') +license=('LGPL') +url="https://code.google.com/p/osgbullet/" +depends=("${MINGW_PACKAGE_PREFIX}-bullet" + "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph" + "${MINGW_PACKAGE_PREFIX}-osgworks") +makedepends=("subversion" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph" + "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug" + "${MINGW_PACKAGE_PREFIX}-osgworks" + "${MINGW_PACKAGE_PREFIX}-osgworks-debug") +options=(!strip staticlibs !buildflags) +source=("${_realname}"::"svn+http://osgbullet.googlecode.com/svn/trunk/") +md5sums=('SKIP') +noextract=( 'osgOcean-Resources-1.0.1.rar' ) + +pkgver() { + cd "$srcdir/$_realname" + local ver="$(svnversion)" + printf "r%s" "${ver//[[:alpha:]]}" +} + +prepare() { + cd "$srcdir/${_realname}" +} + +build() { + plain "No build step" +} + +package_release() { + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") + + [[ -d ${srcdir}/build-release ]] && rm -rf ${srcdir}/build-release + mkdir -p ${srcdir}/build-release && cd ${srcdir}/build-release + + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DosgWorks_DIR=${MINGW_PREFIX}/lib \ + ../${_realname} + + make + make install +} + +package_debug() { + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn=$pkgver" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug" "${MINGW_PACKAGE_PREFIX}-osgworks-debug") + provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") + + [[ -d ${srcdir}/build-debug ]] && rm -rf ${srcdir}/build-debug + mkdir -p ${srcdir}/build-debug && cd ${srcdir}/build-debug + + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Debug \ + -DosgWorks_DIR=${MINGW_PREFIX}/lib \ + ../${_realname} + + make + make install + + rm -rf ${pkgdir}${MINGW_PREFIX}/include + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/flagpoll + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/*.cmake + rm -rf ${pkgdir}${MINGW_PREFIX}/share/osgBullet/data + rm -rf ${pkgdir}${MINGW_PREFIX}/share/osgBullet/extra +} + +package_mingw-w64-i686-osgbullet-svn() { + package_release +} + +package_mingw-w64-i686-osgbullet-debug-svn() { + package_debug +} + +package_mingw-w64-x86_64-osgbullet-svn() { + package_release +} + +package_mingw-w64-x86_64-osgbullet-debug-svn() { + package_debug +} diff --git a/mingw-w64-osgocean-svn/PKGBUILD b/mingw-w64-osgocean-svn/PKGBUILD index 40a6291ba9..4f21d63bef 100644 --- a/mingw-w64-osgocean-svn/PKGBUILD +++ b/mingw-w64-osgocean-svn/PKGBUILD @@ -1,11 +1,10 @@ # Maintainer: Alexey Pavlov _realname=osgocean - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn") _ver_base=1.0.1 pkgver=r258 -pkgrel=1 +pkgrel=2 pkgdesc="An ocean rendering nodekit for OpenSceneGraph (mingw-w64)" arch=('any') license=('LGPL') @@ -20,7 +19,7 @@ source=("${_realname}"::"svn+http://osgocean.googlecode.com/svn/trunk/" md5sums=('SKIP' 'da273a112787e7911084d846082ff276' 'ed27b3a9f14dbcc1bcb1ae0043cfe8ae' - 'ef0ec1d2947164acdb4931322ef79351') + '96c81e665546f5c02cee8ce68710a196') noextract=( 'osgOcean-Resources-1.0.1.rar' ) pkgver() { @@ -44,7 +43,7 @@ build() { package_release() { provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") - + [[ -d ${srcdir}/build-release ]] && rm -rf ${srcdir}/build-release mkdir -p ${srcdir}/build-release && cd ${srcdir}/build-release @@ -55,7 +54,7 @@ package_release() { -DUSE_FFTW3=ON \ -DUSE_FFTSS=OFF \ ../${_realname} - + make make install } @@ -64,7 +63,7 @@ package_debug() { depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn=$pkgver" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") - + [[ -d ${srcdir}/build-debug ]] && rm -rf ${srcdir}/build-debug mkdir -p ${srcdir}/build-debug && cd ${srcdir}/build-debug @@ -75,7 +74,7 @@ package_debug() { -DUSE_FFTW3=ON \ -DUSE_FFTSS=OFF \ ../${_realname} - + make make install @@ -99,4 +98,3 @@ package_mingw-w64-x86_64-osgocean-svn() { package_mingw-w64-x86_64-osgocean-debug-svn() { package_debug } - diff --git a/mingw-w64-osgocean-svn/osg-3.3.x.patch b/mingw-w64-osgocean-svn/osg-3.3.x.patch index f2ef3ed562..fed230bb0e 100644 --- a/mingw-w64-osgocean-svn/osg-3.3.x.patch +++ b/mingw-w64-osgocean-svn/osg-3.3.x.patch @@ -62,3 +62,15 @@ diff -Naur osgocean/src/osgOcean/MipmapGeometryVBO.cpp osgocean-patched/src/osgO { osg::BoundingBox bb; +--- osgocean/src/osgOcean/OceanScene.cpp.orig 2014-12-08 08:02:04.720600000 +0300 ++++ osgocean/src/osgOcean/OceanScene.cpp 2014-12-08 08:02:29.867800000 +0300 +@@ -881,7 +881,8 @@ + + bool surfaceVisible = _oceanSurface->isVisible(*cv, eyeAboveWater); + +- (*_oceanSurface->getCullCallback())(_oceanSurface.get(), &nv); ++ osg::Callback* callback = _oceanSurface->getCullCallback(); ++ if (callback) callback->run(_oceanSurface.get(), &nv); + + preRenderCull(*cv, eyeAboveWater, surfaceVisible); // reflections/refractions + diff --git a/mingw-w64-osgqtquick/PKGBUILD b/mingw-w64-osgqtquick/PKGBUILD new file mode 100644 index 0000000000..b88dfedda3 --- /dev/null +++ b/mingw-w64-osgqtquick/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Konstantin Podsvirov + +_realname=osgQtQuick +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug") +pkgver=2.0.0.7 +pkgrel=1 +pkgdesc="OpenSceneGraph QML Modules (mingw-w64)" +arch=('any') +license=('LGPL') +url="https://github.com/podsvirov/osgqtquick" +depends=("${MINGW_PACKAGE_PREFIX}-OpenSceneGraph" + "${MINGW_PACKAGE_PREFIX}-qt5") +makedepends=("make" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug") +options=(!strip staticlibs !buildflags) +source=(${_realname}-${pkgver}.zip::https://github.com/podsvirov/osgqtquick/archive/v${pkgver}.zip) +md5sums=('000ab32e141448461279ceb6ca03ade6') + +build() { + plain "No build step" +} + +package_prog() { + local _buildtype=${1} + local _builddir=${_buildtype}-${MINGW_CHOST} + + if [[ "${_buildtype}" == "Debug" ]]; then + depends=("${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug") + fi + + [[ -d ${srcdir}/${_builddir} ]] && rm -rf ${srcdir}/${_builddir} + mkdir -p ${srcdir}/${_builddir} && cd ${srcdir}/${_builddir} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=${_buildtype} \ + ../osgqtquick-${pkgver} + + make DESTDIR=${pkgdir} -j1 install + + if [[ "${_buildtype}" == "Debug" ]]; then + rm -rf ${pkgdir}${MINGW_PREFIX}/include + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/cmake/osgQtQuick/osgQtQuickConfig.cmake + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/cmake/osgQtQuick/osgQtQuickConfigVersion.cmake + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/cmake/osgQtQuick/osgQtQuickTargets.cmake + rm -rf ${pkgdir}${MINGW_PREFIX}/share/qt5/qml/*/qmldir + fi +} + +package_mingw-w64-i686-osgQtQuick() { + package_prog Release +} + +package_mingw-w64-i686-osgQtQuick-debug() { + package_prog Debug +} + +package_mingw-w64-x86_64-osgQtQuick() { + package_prog Release +} + +package_mingw-w64-x86_64-osgQtQuick-debug() { + package_prog Debug +} diff --git a/mingw-w64-osgworks-svn/PKGBUILD b/mingw-w64-osgworks-svn/PKGBUILD index 4100c0026a..0f67c6bae8 100644 --- a/mingw-w64-osgworks-svn/PKGBUILD +++ b/mingw-w64-osgworks-svn/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=osgworks - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn") _ver_base=3.1.0 -pkgver=3.1.0.559 +pkgver=3.1.0.565 pkgrel=1 pkgdesc="A toolkit for OpenSceneGraph applications. (mingw-w64)" arch=('any') @@ -17,7 +16,7 @@ source=("${_realname}"::"svn+http://osgworks.googlecode.com/svn/trunk/" "osg-3.3.x.patch" "mingw-fpc-libs.patch") md5sums=('SKIP' - 'cc8a517171bcd4c9a080c81a6bd757f0' + 'c3100031c49f7710b910069b26241686' 'c5b52fc01efde31fc87d8ed0450bdd8f') pkgver() { @@ -39,7 +38,7 @@ build() { package_release() { provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") - + [[ -d ${srcdir}/build-release ]] && rm -rf ${srcdir}/build-release mkdir -p ${srcdir}/build-release && cd ${srcdir}/build-release @@ -48,7 +47,7 @@ package_release() { -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ ../${_realname} - + make make install @@ -65,7 +64,7 @@ package_debug() { depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn=$pkgver" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") - + [[ -d ${srcdir}/build-debug ]] && rm -rf ${srcdir}/build-debug mkdir -p ${srcdir}/build-debug && cd ${srcdir}/build-debug @@ -74,7 +73,7 @@ package_debug() { -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Debug \ ../${_realname} - + make make install diff --git a/mingw-w64-osgworks-svn/osg-3.3.x.patch b/mingw-w64-osgworks-svn/osg-3.3.x.patch index 0dd31c2be6..d541974208 100644 --- a/mingw-w64-osgworks-svn/osg-3.3.x.patch +++ b/mingw-w64-osgworks-svn/osg-3.3.x.patch @@ -62,29 +62,6 @@ diff -Naur osgworks/include/osgwQuery/QueryAPI.h osgworks-patched/include/osgwQu namespace osgwQuery { -diff -Naur osgworks/include/osgwTools/Version.h.in osgworks-patched/include/osgwTools/Version.h.in ---- osgworks/include/osgwTools/Version.h.in 2014-05-23 22:37:01.124800000 +0400 -+++ osgworks-patched/include/osgwTools/Version.h.in 2014-06-07 18:50:18.179800000 +0400 -@@ -9,6 +9,7 @@ - #define __${_projectNameUpper}_CMAKE_GENERATED_VERSION_H__ 1 - - -+#include "VersionOSG.h" - - /** \defgroup Version Version utilities */ - /*@{*/ -diff -Naur osgworks/include/osgwTools/VersionOSG.h osgworks-patched/include/osgwTools/VersionOSG.h ---- osgworks/include/osgwTools/VersionOSG.h 2014-05-23 22:37:01.249600000 +0400 -+++ osgworks-patched/include/osgwTools/VersionOSG.h 2014-06-07 00:33:01.332200000 +0400 -@@ -22,7 +22,7 @@ - #define __OSGWTOOLS_VERSION_OSG_H__ 1 - - -- -+#include - /** \addtogroup Version */ - /*@{*/ - diff -Naur osgworks/src/osgwMx/CameraUpdateCallback.cpp osgworks-patched/src/osgwMx/CameraUpdateCallback.cpp --- osgworks/src/osgwMx/CameraUpdateCallback.cpp 2014-05-23 22:37:02.326000000 +0400 +++ osgworks-patched/src/osgwMx/CameraUpdateCallback.cpp 2014-06-07 18:43:57.151200000 +0400 @@ -113,18 +90,18 @@ diff -Naur osgworks/src/osgwTools/CountsVisitor.cpp osgworks-patched/src/osgwToo --- osgworks/src/osgwTools/CountsVisitor.cpp 2014-05-23 22:37:02.076400000 +0400 +++ osgworks-patched/src/osgwTools/CountsVisitor.cpp 2014-06-07 16:22:50.522800000 +0400 @@ -608,10 +608,10 @@ - { pushStateSet( node.getStateSet() ); + /* - osg::Group* grp = node.getParent(0); + osg::Group* grp = node.getParent(0)->asGroup(); osg::Group* gPar = NULL; if (grp) - gPar = grp->getParent(0); + gPar = grp->getParent(0)->asGroup(); + */ apply( node.getStateSet() ); - _pagedLods++; diff -Naur osgworks/src/osgwTools/InsertRemove.cpp osgworks-patched/src/osgwTools/InsertRemove.cpp --- osgworks/src/osgwTools/InsertRemove.cpp 2014-05-23 22:37:02.029600000 +0400 +++ osgworks-patched/src/osgwTools/InsertRemove.cpp 2014-06-07 16:27:29.380400000 +0400 diff --git a/mingw-w64-osmgpsmap-git/001-fix-docdir.patch b/mingw-w64-osmgpsmap-git/001-fix-docdir.patch new file mode 100644 index 0000000000..4e60411084 --- /dev/null +++ b/mingw-w64-osmgpsmap-git/001-fix-docdir.patch @@ -0,0 +1,11 @@ +--- osm-gps-map/Makefile.am.orig 2015-01-11 18:58:00.502800000 +0300 ++++ osm-gps-map/Makefile.am 2015-01-11 18:58:16.420200000 +0300 +@@ -7,7 +7,7 @@ + + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +-osm_gps_mapdocdir = ${prefix}/doc/osm-gps-map ++osm_gps_mapdocdir = ${prefix}/share/doc/osm-gps-map + osm_gps_mapdoc_DATA = \ + README \ + COPYING \ diff --git a/mingw-w64-osmgpsmap-git/PKGBUILD b/mingw-w64-osmgpsmap-git/PKGBUILD new file mode 100644 index 0000000000..c85edcc0a4 --- /dev/null +++ b/mingw-w64-osmgpsmap-git/PKGBUILD @@ -0,0 +1,58 @@ +# Contributor: Josip + +_realname=osm-gps-map +pkgname="${MINGW_PACKAGE_PREFIX}-osmgpsmap-git" +provides=("${MINGW_PACKAGE_PREFIX}-osmgpsmap") +conflicts=("${MINGW_PACKAGE_PREFIX}-osmgpsmap") +pkgver=r443.c24d08d +pkgrel=1 +pkgdesc="A Gtk+ Widget for Displaying OpenStreetMap tiles" +url="http://nzjrs.github.io/osm-gps-map/" +arch=('any') +license=('GPLv2+') +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-python2-gobject" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection") +makedepends=("${MINGW_PACKAGE_PREFIX}-gnome-common" + "gtk-doc" + "git") +options=('staticlibs' 'strip' '!debug') +source=("git://github.com/nzjrs/osm-gps-map" + 001-fix-docdir.patch) +md5sums=('SKIP' + '797e4ef839ab903de0311fd06277cb0c') + +pkgver() { + cd ${_realname} + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${_realname} + patch -p1 -i ${srcdir}/001-fix-docdir.patch + + gtkdocize + autoreconf -fiv +} + +build() { + export CC=${MINGW_PREFIX}/bin/gcc + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-gtk-doc=no \ + --enable-shared=yes \ + --enable-static=yes + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-osslsigncode/PKGBUILD b/mingw-w64-osslsigncode/PKGBUILD new file mode 100644 index 0000000000..626034c762 --- /dev/null +++ b/mingw-w64-osslsigncode/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: David Macek + +_realname=osslsigncode +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.7.1 +pkgrel=1 +pkgdesc="Tool for Authenticode signing of PE, CAB and MSI files (mingw-w64)" +arch=('any') +url="http://sourceforge.net/projects/osslsigncode/" +license=("GPL3") +depends=("${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-openssl") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('ac5655b9281b692423ecb2e9185f09d7') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-p11-kit/0011-p11-kit-spawn-external.patch b/mingw-w64-p11-kit/0011-p11-kit-spawn-external.patch new file mode 100644 index 0000000000..ef36997988 --- /dev/null +++ b/mingw-w64-p11-kit/0011-p11-kit-spawn-external.patch @@ -0,0 +1,66 @@ +--- p11-kit-0.23.1/p11-kit/p11-kit.c.orig 2015-04-13 13:01:51.331355100 +0200 ++++ p11-kit-0.23.1/p11-kit/p11-kit.c 2015-04-13 13:09:46.346179100 +0200 +@@ -72,6 +72,7 @@ + char *argv[]) + { + char **args; ++ int code; + + args = calloc (argc + 2, sizeof (char *)); + return_val_if_fail (args != NULL, 1); +@@ -80,14 +81,18 @@ + memcpy (args + 1, argv, sizeof (char *) * argc); + args[argc + 1] = NULL; + +- execv (args[0], args); +- +- /* At this point we have no command */ +- p11_message_err (errno, "couldn't run trust tool"); ++ code = _spawnv (_P_WAIT, args[0], args); + + free (argv[0]); + free (args); +- return 2; ++ ++ if (code) { ++ /* At this point we have no command */ ++ p11_message_err (errno, "couldn't run trust tool"); ++ return 2; ++ } ++ ++ return 0; + } + + int +@@ -97,6 +102,7 @@ + const char *private_dir; + char *filename; + char *path; ++ int code; + + /* These are trust commands, send them to that tool */ + if (strcmp (argv[0], "extract") == 0) { +@@ -118,14 +124,18 @@ + return_val_if_fail (path != NULL, 1); + + argv[argc] = NULL; +- execv (path, argv); +- +- /* At this point we have no command */ +- p11_message ("'%s' is not a valid command. See 'p11-kit --help'", argv[0]); ++ code = _spawnv (_P_WAIT, path, argv); + + free (filename); + free (path); +- return 2; ++ ++ if (code) { ++ /* At this point we have no command */ ++ p11_message ("'%s' is not a valid command. See 'p11-kit --help'", argv[0]); ++ return 2; ++ } ++ ++ return 0; + } + + int diff --git a/mingw-w64-p11-kit/PKGBUILD b/mingw-w64-p11-kit/PKGBUILD index 90f34dbcc2..e6bd5b6fb7 100644 --- a/mingw-w64-p11-kit/PKGBUILD +++ b/mingw-w64-p11-kit/PKGBUILD @@ -4,8 +4,8 @@ _realname=p11-kit pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.22.1 -pkgrel=1 +pkgver=0.23.1 +pkgrel=3 pkgdesc="Library to work with PKCS#11 modules" arch=('any') url="http://p11-glue.freedesktop.org" @@ -17,7 +17,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "gtk-doc") options=('!debug' 'strip' 'staticlibs') -source=($url/releases/$_realname-$pkgver.tar.gz{,.sig} +source=(${url}/releases/${_realname}-${pkgver}.tar.gz{,.sig} 0000-no-proxy.mingw.patch 0001-allow-gtkdocize.all.patch 0002-fix-includes.patch @@ -27,8 +27,9 @@ source=($url/releases/$_realname-$pkgver.tar.gz{,.sig} 0007-mmap-CreateFile-with-FILE_SHARE_READ.patch 0008-add-debugging-to-mmap.patch 0009-add-debugging-to-path.patch - 0010-fix-transport-test.patch) -md5sums=('4e9bea1106628ffb820bdad24a819fac' + 0010-fix-transport-test.patch + 0011-p11-kit-spawn-external.patch) +md5sums=('96f073270c489c9a594e1c9413f42db8' 'SKIP' '70330b415eb5167e5a530c13bb96c212' 'b7a706e19b5e29d96889ca2410a151df' @@ -39,7 +40,8 @@ md5sums=('4e9bea1106628ffb820bdad24a819fac' '3a37950e2a7ab95a4e691c02ff0603ab' '0dcd0d7e10d5d898f32da8866580d640' '27793fc62cf1fbfe52964ba8099d2b44' - '8ecfeb942a3de9cb7355519c0eb62f79') + '8ecfeb942a3de9cb7355519c0eb62f79' + '3cd8e579c1163be32be3b5bcaf45e711') prepare() { cd "${srcdir}"/${_realname}-${pkgver} @@ -54,6 +56,7 @@ prepare() { # patch -p1 -i ${srcdir}/0007-add-debugging-to-mmap.patch # patch -p1 -i ${srcdir}/0008-add-debugging-to-path.patch patch -p1 -i ${srcdir}/0010-fix-transport-test.patch + patch -p1 -i ${srcdir}/0011-p11-kit-spawn-external.patch autoreconf -vfi gtkdocize @@ -68,9 +71,12 @@ build() { extra_config+=( --enable-debug=no ) fi + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + + PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/share/pkgconfig" \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -88,5 +94,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" MSYS2_ARG_CONV_EXCL="-DBINDIR=;-DDATA_DIR=;-DP11_SYSTEM_CONFIG_FILE=;-DP11_SYSTEM_CONFIG_MODULES=;-DP11_PACKAGE_CONFIG_MODULES=;-DP11_MODULE_PATH=;-DDATADIR=;-DSYSCONFDIR=;-DPRIVATEDIR=;-DP11_USER_CONFIG_FILE=;-DP11_USER_CONFIG_MODULES=" \ - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-pango/0001-no-unconditional-xft-please.all.patch b/mingw-w64-pango/0001-no-unconditional-xft-please.all.patch index 0805faa939..9c6b81da83 100644 --- a/mingw-w64-pango/0001-no-unconditional-xft-please.all.patch +++ b/mingw-w64-pango/0001-no-unconditional-xft-please.all.patch @@ -107,9 +107,9 @@ # # Checks for Win32 GDI @@ -935,6 +944,7 @@ - build/win32/vs10/Makefile build/win32/vs11/Makefile build/win32/vs12/Makefile + build/win32/vs14/Makefile +docs/pango.types pango.pc pangowin32.pc diff --git a/mingw-w64-pango/PKGBUILD b/mingw-w64-pango/PKGBUILD index cea9d33986..993a75ca30 100644 --- a/mingw-w64-pango/PKGBUILD +++ b/mingw-w64-pango/PKGBUILD @@ -1,49 +1,56 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=pango +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.36.8 +pkgver=1.38.1 pkgrel=1 pkgdesc="A library for layout and rendering of text (mingw-w64)" arch=('any') url="http://www.pango.org" -license=("LGPL") + +# TODO: what is the license for the package as a whole? The README file says +# that most of the code is LGPL but some parts are "GPL/FreeType". However this +# non-LGPL note makes reference to non-existing files, so would LGPL apply to +# the whole code? If this note is still correct, are the GPL/FreeType parts +# under either or both of these licenses, and which versions? What license is +# compatible with the answers? +license=(partial:'LGPL2') + makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gobject-introspection") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-harfbuzz") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-harfbuzz") options=('staticlibs' 'strip' 'emptydirs') -install=${_realname}-${CARCH}.install -source=("http://ftp.gnome.org/pub/gnome/sources/pango/${pkgver:0:4}/pango-${pkgver}.tar.xz" +source=("http://ftp.gnome.org/pub/gnome/sources/pango/${pkgver:0:4}/${_realname}-${pkgver}.tar.xz" 0001-no-unconditional-xft-please.all.patch 0002-msvc-is-impotent-but-not.mingw.patch) -sha256sums=('18dbb51b8ae12bae0ab7a958e7cf3317c9acfc8a1e1103ec2f147164a0fc2d07' - 'a673ce807b29abe4b0fedf5b17e154986d675cec3e001c4235067b01515c2e4d' +sha256sums=('1320569f6c6d75d6b66172b2d28e59c56ee864ee9df202b76799c4506a214eb7' + 'eccc044bbd156b252f5a13f7894c3a6cd1efc6ea80eaee57a5865895b192616d' '240d21474157c0deabc2660593ac0414565ddf30c304b08b74a09072c910b34d') prepare() { - cd "$srcdir/pango-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/0001-no-unconditional-xft-please.all.patch patch -p1 -i ${srcdir}/0002-msvc-is-impotent-but-not.mingw.patch - + autoreconf -fi sed -i 's/have_libthai=true/have_libthai=false/' configure } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --with-included-modules=yes \ - --with-dynamic-modules=no \ --enable-introspection \ --disable-debug \ --enable-shared \ @@ -53,7 +60,9 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - install -m755 -d "${pkgdir}${MINGW_PREFIX}/etc/pango" - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install + + # License + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-pango/pango-i686.install b/mingw-w64-pango/pango-i686.install deleted file mode 100644 index 5d0eeaca43..0000000000 --- a/mingw-w64-pango/pango-i686.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - mingw32/bin/pango-querymodules > mingw32/etc/pango/pango.modules -} - -post_upgrade() { - if [ -f mingw32/etc/pango/pango.modules ]; then - rm mingw32/etc/pango/pango.modules - fi - post_install -} - -pre_remove() { - rm mingw32/etc/pango/pango.modules -} diff --git a/mingw-w64-pango/pango-x86_64.install b/mingw-w64-pango/pango-x86_64.install deleted file mode 100644 index d050c498a0..0000000000 --- a/mingw-w64-pango/pango-x86_64.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - mingw64/bin/pango-querymodules > mingw64/etc/pango/pango.modules -} - -post_upgrade() { - if [ -f mingw64/etc/pango/pango.modules ]; then - rm mingw64/etc/pango/pango.modules - fi - post_install -} - -pre_remove() { - rm mingw64/etc/pango/pango.modules -} diff --git a/mingw-w64-pangomm/PKGBUILD b/mingw-w64-pangomm/PKGBUILD index 59b9065741..9d9ac308c6 100644 --- a/mingw-w64-pangomm/PKGBUILD +++ b/mingw-w64-pangomm/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=pangomm - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.34.0 -pkgrel=2 +pkgver=2.38.1 +pkgrel=1 pkgdesc="C++ bindings for pango (mingw-w64)" arch=('any') url="http://gtkmm.sourceforge.net" @@ -12,11 +12,11 @@ license=("LGPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-cairomm" "${MINGW_PACKAGE_PREFIX}-glibmm" "${MINGW_PACKAGE_PREFIX}-pango") options=(staticlibs strip) -source=("http://ftp.gnome.org/pub/GNOME/sources/pangomm/${pkgver%.*}/pangomm-$pkgver.tar.xz") -sha256sums=('0e82bbff62f626692a00f3772d8b17169a1842b8cc54d5f2ddb1fec2cede9e41') +source=("http://ftp.gnome.org/pub/GNOME/sources/pangomm/${pkgver%.*}/${_realname}-${pkgver}.tar.xz") +sha256sums=('effb18505b36d81fc32989a39ead8b7858940d0533107336a30bc3eef096bc8b') prepare() { - cd "$srcdir/pangomm-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" sed -i -e "s,AC_DISABLE_STATIC,AC_DISABLE_STATIC\nlt_cv_deplibs_check_method='pass_all'," configure.ac autoconf --force } @@ -32,11 +32,11 @@ build() { --enable-shared \ --enable-static \ --disable-documentation + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-pcre/PKGBUILD b/mingw-w64-pcre/PKGBUILD index 85c8e54d1e..32579aa0e1 100644 --- a/mingw-w64-pcre/PKGBUILD +++ b/mingw-w64-pcre/PKGBUILD @@ -2,8 +2,8 @@ _realname=pcre pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=8.36 -pkgrel=1 +pkgver=8.37 +pkgrel=2 pkgdesc="A library that implements Perl 5-style regular expressions (mingw-w64)" arch=('any') url="http://pcre.org" @@ -16,12 +16,13 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') source=(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${_realname}-${pkgver}.tar.bz2{,.sig}) -md5sums=('b767bc9af0c20bc9c1fe403b0d41ad97' +md5sums=('ed91be292cb01d21bc7e526816c26981' 'SKIP') build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" + [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + "${srcdir}"/${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -35,6 +36,7 @@ build() { --enable-pcregrep-libz \ --enable-pcregrep-libbz2 \ --enable-pcretest-libedit + make } @@ -45,5 +47,5 @@ check() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-pdcurses/PKGBUILD b/mingw-w64-pdcurses/PKGBUILD index 41c5e78309..4cc20ec211 100644 --- a/mingw-w64-pdcurses/PKGBUILD +++ b/mingw-w64-pdcurses/PKGBUILD @@ -37,7 +37,7 @@ build() { package() { cd "${srcdir}/PDCurses-${pkgver}" - + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,include,lib} install win32/*.exe ${pkgdir}${MINGW_PREFIX}/bin/ install win32/pdcurses.dll ${pkgdir}${MINGW_PREFIX}/bin/ diff --git a/mingw-w64-pdftex-svn/PKGBUILD b/mingw-w64-pdftex-svn/PKGBUILD new file mode 100644 index 0000000000..9ae5cf7b49 --- /dev/null +++ b/mingw-w64-pdftex-svn/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Ray Donnelly + +_realname=pdftex +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0 +pkgrel=1 +url="https://foundry.supelec.fr/projects/pdftex" +arch=('any') +makedepends=('svn') +source=(xetex-code::git://git.code.sf.net/p/xetex/code) +sha1sums=('SKIP') +_svntrunk=https://foundry.supelec.fr/svn/pdftex/branches/stable + +build() { + cd "${srcdir}" + msg "Connecting to $_svntrunk SVN server...." + if [[ -d ${_realname}/.svn ]]; then + (cd ${_realname} && svn up --username anonsvn --password anonsvn) + else + svn co --username anonsvn --password anonsvn $_svntrunk --config-dir ./ ${_realname} + fi + [[ -d ${_realname}/source/src/texk/texlive ]] && rm -rf ${_realname}/source/src/texk/texlive + cp -rf xetex-code/source/texk/texlive ${_realname}/source/src/texk/ + cd ${_realname}/source + ./build-pdftex.sh +} + +package() { + msg "lol" +} diff --git a/mingw-w64-perl/001-fhs-directory-structure.patch b/mingw-w64-perl/001-fhs-directory-structure.patch new file mode 100644 index 0000000000..aefc20d78c --- /dev/null +++ b/mingw-w64-perl/001-fhs-directory-structure.patch @@ -0,0 +1,284 @@ +diff -aur old/win32/config.gc 001/win32/config.gc +--- old/win32/config.gc 2014-09-14 08:31:07.000000000 -0300 ++++ 001/win32/config.gc 2015-01-05 20:37:05.264648400 -0200 +@@ -23,8 +23,8 @@ + api_version='~PERL_API_VERSION~' + api_versionstring='~PERL_API_REVISION~.~PERL_API_VERSION~.~PERL_API_SUBVERSION~' + ar='~ARCHPREFIX~ar' +-archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' +-archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' ++archlib='~INST_TOP~\lib\perl5~INST_VER~\core_perl~INST_ARCH~' ++archlibexp='~INST_TOP~\lib\perl5~INST_VER~\core_perl~INST_ARCH~' + archname64='' + archname='MSWin32' + archobjs='' +@@ -32,8 +32,8 @@ + awk='awk' + baserev='5' + bash='' +-bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' +-binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~' ++bin='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' ++binexp='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' + bison='' + bootstrap_charset='undef' + byacc='byacc' +@@ -515,9 +515,9 @@ + d_usleep='undef' + d_usleepproto='undef' + d_ustat='undef' +-d_vendorarch='undef' ++d_vendorarch='define' + d_vendorbin='undef' +-d_vendorlib='undef' ++d_vendorlib='define' + d_vendorscript='undef' + d_vfork='undef' + d_void_closedir='undef' +@@ -719,33 +719,33 @@ + incpath='' + inews='' + initialinstalllocation='' +-installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' +-installbin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' ++installarchlib='~INST_TOP~\lib\perl5~INST_VER~\core_perl~INST_ARCH~' ++installbin='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' + installhtml1dir='' + installhtml3dir='' +-installhtmldir='~INST_TOP~~INST_VER~\html' +-installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp' +-installman1dir='~INST_TOP~~INST_VER~\man\man1' +-installman3dir='~INST_TOP~~INST_VER~\man\man3' ++installhtmldir='~INST_TOP~\share\doc\perl5~INST_VER~' ++installhtmlhelpdir='~INST_TOP~\share\doc\perl5~INST_VER~\htmlhelp' ++installman1dir='~INST_TOP~\share\man\man1~INST_VER_PERL~' ++installman3dir='~INST_TOP~\share\man\man3~INST_VER_PERL~' + installprefix='~INST_TOP~~INST_VER~' + installprefixexp='~INST_TOP~~INST_VER~' +-installprivlib='~INST_TOP~~INST_VER~\lib' ++installprivlib='~INST_TOP~\lib\perl5~INST_VER~\core_perl' + installscript='~INST_TOP~~INST_VER~\bin' +-installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' +-installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' ++installsitearch='~INST_TOP~\lib\perl5~INST_VER~\site_perl~INST_ARCH~' ++installsitebin='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' + installsitehtml1dir='' + installsitehtml3dir='' +-installsitelib='~INST_TOP~\site~INST_VER~\lib' ++installsitelib='~INST_TOP~\lib\perl5~INST_VER~\site_perl' + installsiteman1dir='' + installsiteman3dir='' + installsitescript='' + installstyle='lib' + installusrbinperl='undef' +-installvendorarch='' +-installvendorbin='' ++installvendorarch='~INST_TOP~\lib\perl5~INST_VER~\vendor_perl~INST_ARCH~' ++installvendorbin='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' + installvendorhtml1dir='' + installvendorhtml3dir='' +-installvendorlib='' ++installvendorlib='~INST_TOP~\lib\perl5~INST_VER~\vendor_perl' + installvendorman1dir='' + installvendorman3dir='' + installvendorscript='' +@@ -765,7 +765,7 @@ + lib_ext='.a' + libc='libmsvcrt.a' + libperl='libperl.a' +-libpth='' ++libpth='~INST_TOP~\lib\perl5~INST_VER~\core_perl' + libs='' + libsdirs='' + libsfiles='' +@@ -800,11 +800,11 @@ + mallocobj='malloc.o' + mallocsrc='malloc.c' + malloctype='void *' +-man1dir='~INST_TOP~~INST_VER~\man\man1' +-man1direxp='~INST_TOP~~INST_VER~\man\man1' ++man1dir='~INST_TOP~\share\man\man1~INST_VER_PERL~' ++man1direxp='~INST_TOP~\share\man\man1~INST_VER_PERL~' + man1ext='1' +-man3dir='~INST_TOP~~INST_VER~\man\man3' +-man3direxp='~INST_TOP~~INST_VER~\man\man3' ++man3dir='~INST_TOP~\share\man\man3~INST_VER_PERL~' ++man3direxp='~INST_TOP~\share\man\man3~INST_VER_PERL~' + man3ext='3' + mips_type='' + mistrustnm='' +@@ -858,7 +858,7 @@ + perl_static_inline='static __inline__' + perladmin='' + perllibs='~libs~' +-perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe' ++perlpath='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~\perl.exe' + pg='' + phostname='hostname' + pidtype='int' +@@ -867,8 +867,8 @@ + pr='' + prefix='~INST_TOP~' + prefixexp='~INST_TOP~' +-privlib='~INST_TOP~~INST_VER~\lib' +-privlibexp='~INST_TOP~~INST_VER~\lib' ++privlib='~INST_TOP~\lib\perl5~INST_VER~\core_perl' ++privlibexp='~INST_TOP~\lib\perl5~INST_VER~\core_perl' + procselfexe='' + prototype='define' + ptrsize='4' +@@ -934,17 +934,17 @@ + sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0' + sig_size='27' + signal_t='void' +-sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' +-sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' +-sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' +-sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' ++sitearch='~INST_TOP~\lib\perl5~INST_VER~\site_perl~INST_ARCH~' ++sitearchexp='~INST_TOP~\lib\perl5~INST_VER~\site_perl~INST_ARCH~' ++sitebin='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' ++sitebinexp='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' + sitehtml1dir='' + sitehtml1direxp='' + sitehtml3dir='' + sitehtml3direxp='' +-sitelib='~INST_TOP~\site~INST_VER~\lib' ++sitelib='~INST_TOP~\lib\perl5~INST_VER~\site_perl' + sitelib_stem='' +-sitelibexp='~INST_TOP~\site~INST_VER~\lib' ++sitelibexp='~INST_TOP~\lib\perl5~INST_VER~\site_perl' + siteman1dir='' + siteman1direxp='' + siteman3dir='' +@@ -1054,17 +1054,17 @@ + uvuformat='"lu"' + uvxformat='"lx"' + vaproto='undef' +-vendorarch='' +-vendorarchexp='' +-vendorbin='' +-vendorbinexp='' ++vendorarch='~INST_TOP~\lib\perl5~INST_VER~\vendor_perl~INST_ARCH~' ++vendorarchexp='~INST_TOP~\lib\perl5~INST_VER~\vendor_perl~INST_ARCH~' ++vendorbin='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' ++vendorbinexp='~INST_TOP~\bin~INST_VER_PERL~~INST_ARCH~' + vendorhtml1dir=' ' + vendorhtml1direxp='' + vendorhtml3dir=' ' + vendorhtml3direxp='' +-vendorlib='' ++vendorlib='~INST_TOP~\lib\perl5~INST_VER~\vendor_perl' + vendorlib_stem='' +-vendorlibexp='' ++vendorlibexp='~INST_TOP~\lib\perl5~INST_VER~\vendor_perl' + vendorman1dir=' ' + vendorman1direxp='' + vendorman3dir=' ' +diff -aur old/win32/makefile.mk 001/win32/makefile.mk +--- old/win32/makefile.mk 2014-09-14 08:31:07.000000000 -0300 ++++ 001/win32/makefile.mk 2015-01-05 20:37:05.274414000 -0200 +@@ -44,6 +44,7 @@ + # path that includes an arbitrary version string. + # + #INST_VER *= \5.22.0 ++#INST_VER_PERL *= \perl-5.22.0 + + # + # Comment this out if you DON'T want your perl installation to have +@@ -403,10 +404,10 @@ + # + INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin + INST_BIN = $(INST_SCRIPT)$(INST_ARCH) +-INST_LIB = $(INST_TOP)$(INST_VER)\lib ++INST_LIB = $(INST_TOP)$(INST_VER)\lib\perl5\core_perl + INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) + INST_COREDIR = $(INST_ARCHLIB)\CORE +-INST_HTML = $(INST_TOP)$(INST_VER)\html ++INST_HTML = $(INST_TOP)$(INST_VER)\share\doc\perl5 + + # + # Programs to compile, build .lib files and link +@@ -951,7 +952,7 @@ + libs=$(LIBFILES:f) ~ \ + incpath=$(CCINCDIR) ~ \ + libperl=$(PERLIMPLIB:f) ~ \ +- libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \ ++ libpth=$(INST_LIB);$(EXTRALIBDIRS) ~ \ + libc=$(LIBC) ~ \ + make=dmake ~ \ + _o=$(o) ~ \ +@@ -1392,12 +1393,12 @@ + copy ..\README.vos ..\pod\perlvos.pod + copy ..\README.win32 ..\pod\perlwin32.pod + copy ..\pod\perldelta.pod ..\pod\perl5220delta.pod +- $(PERLEXE) $(PL2BAT) $(UTILS) ++ $(PERLEXE) -I..\lib $(PL2BAT) $(UTILS) + $(MINIPERL) -I..\lib ..\autodoc.pl .. + $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. + + ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs +- $(PERLEXE) -f ..\pod\buildtoc -q ++ $(PERLEXE) -I..\lib -Ilib -f ..\pod\buildtoc -q + + # Note that the pod cleanup in this next section is parsed (and regenerated + # by pod/buildtoc so please check that script before making changes here +diff -aur old/win32/win32.c 001/win32/win32.c +--- old/win32/win32.c 2014-09-14 08:31:07.000000000 -0300 ++++ 001/win32/win32.c 2015-01-05 20:37:05.286132800 -0200 +@@ -373,7 +373,11 @@ + EXTERN_C char * + win32_get_privlib(const char *pl, STRLEN *const len) + { ++#ifdef PERL_IS_MINIPERL + char *stdlib = "lib"; ++#else ++ char *stdlib = "lib/perl5/core_perl"; ++#endif + char buffer[MAX_PATH+1]; + SV *sv = NULL; + +@@ -401,7 +405,11 @@ + + /* $xlib .= + * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/$]/lib"; */ ++#ifdef PERL_IS_MINIPERL + sprintf(pathstr, "%s/%s/lib", libname, pl); ++#else ++ sprintf(pathstr, "%s/%s", libname, pl); ++#endif + (void)get_emd_part(&sv1, NULL, pathstr, ARCHNAME, "bin", pl, NULL); + + /* $HKCU{$xlib} || $HKLM{$xlib} . ---; */ +@@ -409,7 +417,11 @@ + + /* $xlib .= + * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/lib"; */ ++#ifdef PERL_IS_MINIPERL + sprintf(pathstr, "%s/lib", libname); ++#else ++ sprintf(pathstr, "%s", libname); ++#endif + (void)get_emd_part(&sv2, NULL, pathstr, ARCHNAME, "bin", pl, NULL); + + if (!sv1 && !sv2) +@@ -430,11 +442,19 @@ + EXTERN_C char * + win32_get_sitelib(const char *pl, STRLEN *const len) + { ++#ifdef PERL_IS_MINIPERL + return win32_get_xlib(pl, "sitelib", "site", len); ++#else ++ return win32_get_xlib(pl, "sitelib", "lib/perl5/site_perl", len); ++#endif + } + + #ifndef PERL_VENDORLIB_NAME ++#ifdef PERL_IS_MINIPERL + # define PERL_VENDORLIB_NAME "vendor" ++#else ++# define PERL_VENDORLIB_NAME "lib/perl5/vendor_perl" ++#endif + #endif + + EXTERN_C char * diff --git a/mingw-w64-perl/002-relocate-html-documentation.patch b/mingw-w64-perl/002-relocate-html-documentation.patch new file mode 100644 index 0000000000..384cffd4b0 --- /dev/null +++ b/mingw-w64-perl/002-relocate-html-documentation.patch @@ -0,0 +1,13 @@ +diff -aur 001/win32/makefile.mk 002/win32/makefile.mk +--- 001/win32/makefile.mk 2015-01-05 20:37:05.274414000 -0200 ++++ 002/win32/makefile.mk 2015-01-05 20:37:54.890625000 -0200 +@@ -1349,7 +1349,7 @@ + + doc: $(PERLEXE) ..\pod\perltoc.pod +- $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ +- --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ ++ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ ++ --podpath=pod:lib:utils --htmlroot="@PERL_RELOCATE_HTML@/share/doc/perl5" \ + --recurse + + ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL diff --git a/mingw-w64-perl/003-replace-batch-scripts-with-bare-perl.patch b/mingw-w64-perl/003-replace-batch-scripts-with-bare-perl.patch new file mode 100644 index 0000000000..c08f17d3d0 --- /dev/null +++ b/mingw-w64-perl/003-replace-batch-scripts-with-bare-perl.patch @@ -0,0 +1,126 @@ +diff -aur 002/installperl 003/installperl +--- 002/installperl 2015-01-05 20:37:16.838867100 -0200 ++++ 003/installperl 2015-01-05 20:38:45.015625000 -0200 +@@ -19,7 +19,7 @@ + if ($Is_VMS) { eval 'use VMS::Filespec;' } + } + +-my $scr_ext = ($Is_VMS ? '.Com' : $Is_W32 ? '.bat' : ''); ++my $scr_ext = ($Is_VMS ? '.Com' : ''); + + use File::Find; + use File::Compare; +diff -aur 002/win32/bin/pl2bat.pl 003/win32/bin/pl2bat.pl +--- 002/win32/bin/pl2bat.pl 2015-01-05 20:37:16.143554600 -0200 ++++ 003/win32/bin/pl2bat.pl 2015-01-05 20:38:45.023437500 -0200 +@@ -1,5 +1,4 @@ +- eval 'exec perl -x -S "$0" ${1+"$@"}' +- if 0; # In case running under some shell ++#!perl -w + + require 5; + use Getopt::Std; +diff -aur 002/win32/bin/search.pl 003/win32/bin/search.pl +--- 002/win32/bin/search.pl 2015-01-05 20:37:16.129882800 -0200 ++++ 003/win32/bin/search.pl 2015-01-05 20:38:45.046875000 -0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!perl -w + 'di'; + 'ig00'; + ############################################################################## +diff -aur 002/win32/makefile.mk 003/win32/makefile.mk +--- 002/win32/makefile.mk 2015-01-05 20:37:54.890625000 -0200 ++++ 003/win32/makefile.mk 2015-01-05 21:28:09.955078100 -0200 +@@ -723,40 +723,6 @@ + PERLDEP = perldll.def + + +-PL2BAT = bin\pl2bat.pl +- +-UTILS = \ +- ..\utils\h2ph \ +- ..\utils\splain \ +- ..\utils\perlbug \ +- ..\utils\pl2pm \ +- ..\utils\c2ph \ +- ..\utils\pstruct \ +- ..\utils\h2xs \ +- ..\utils\perldoc \ +- ..\utils\perlivp \ +- ..\utils\libnetcfg \ +- ..\utils\enc2xs \ +- ..\utils\encguess \ +- ..\utils\piconv \ +- ..\utils\corelist \ +- ..\utils\cpan \ +- ..\utils\xsubpp \ +- ..\utils\pod2html \ +- ..\utils\prove \ +- ..\utils\ptar \ +- ..\utils\ptardiff \ +- ..\utils\ptargrep \ +- ..\utils\zipdetails \ +- ..\utils\shasum \ +- ..\utils\instmodsh \ +- ..\utils\json_pp \ +- bin\exetype.pl \ +- bin\runperl.pl \ +- bin\pl2bat.pl \ +- bin\perlglob.pl \ +- bin\search.pl +- + .IF "$(CCTYPE)" == "GCC" + + CFGSH_TMPL = config.gc +@@ -1393,7 +1356,6 @@ + copy ..\README.vos ..\pod\perlvos.pod + copy ..\README.win32 ..\pod\perlwin32.pod + copy ..\pod\perldelta.pod ..\pod\perl5220delta.pod +- $(PERLEXE) -I..\lib $(PL2BAT) $(UTILS) + $(MINIPERL) -I..\lib ..\autodoc.pl .. + $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. + +@@ -1530,7 +1492,41 @@ + if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* + $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* + if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* +- $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* ++ $(XCOPY) ..\utils\h2ph $(INST_SCRIPT) ++ $(XCOPY) ..\utils\splain $(INST_SCRIPT) ++ $(XCOPY) ..\utils\perlbug $(INST_SCRIPT) ++ $(XCOPY) ..\utils\pl2pm $(INST_SCRIPT) ++ $(XCOPY) ..\utils\c2ph $(INST_SCRIPT) ++ $(XCOPY) ..\utils\pstruct $(INST_SCRIPT) ++ $(XCOPY) ..\utils\h2xs $(INST_SCRIPT) ++ $(XCOPY) ..\utils\perldoc $(INST_SCRIPT) ++ $(XCOPY) ..\utils\perlivp $(INST_SCRIPT) ++ $(XCOPY) ..\utils\libnetcfg $(INST_SCRIPT) ++ $(XCOPY) ..\utils\enc2xs $(INST_SCRIPT) ++ $(XCOPY) ..\utils\encguess $(INST_SCRIPT) ++ $(XCOPY) ..\utils\piconv $(INST_SCRIPT) ++ $(XCOPY) ..\utils\corelist $(INST_SCRIPT) ++ $(XCOPY) ..\utils\cpan $(INST_SCRIPT) ++ $(XCOPY) ..\utils\xsubpp $(INST_SCRIPT) ++ $(XCOPY) ..\utils\pod2html $(INST_SCRIPT) ++ $(XCOPY) ..\utils\prove $(INST_SCRIPT) ++ $(XCOPY) ..\utils\ptar $(INST_SCRIPT) ++ $(XCOPY) ..\utils\ptardiff $(INST_SCRIPT) ++ $(XCOPY) ..\utils\ptargrep $(INST_SCRIPT) ++ $(XCOPY) ..\utils\zipdetails $(INST_SCRIPT) ++ $(XCOPY) ..\utils\shasum $(INST_SCRIPT) ++ $(XCOPY) ..\utils\instmodsh $(INST_SCRIPT) ++ $(XCOPY) ..\utils\json_pp $(INST_SCRIPT) ++ $(XCOPY) bin\exetype.pl $(INST_SCRIPT) ++ $(XCOPY) bin\runperl.pl $(INST_SCRIPT) ++ $(XCOPY) bin\pl2bat.pl $(INST_SCRIPT) ++ $(XCOPY) bin\perlglob.pl $(INST_SCRIPT) ++ $(XCOPY) bin\search.pl $(INST_SCRIPT) ++ rename $(INST_SCRIPT)\exetype.pl exetype ++ rename $(INST_SCRIPT)\runperl.pl runperl ++ rename $(INST_SCRIPT)\pl2bat.pl pl2bat ++ rename $(INST_SCRIPT)\perlglob.pl perlglob ++ rename $(INST_SCRIPT)\search.pl search + + installhtml : doc + $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.* diff --git a/mingw-w64-perl/004-fix-cpan-external-programs.patch b/mingw-w64-perl/004-fix-cpan-external-programs.patch new file mode 100644 index 0000000000..6aa6267364 --- /dev/null +++ b/mingw-w64-perl/004-fix-cpan-external-programs.patch @@ -0,0 +1,25 @@ +diff -aur 003/cpan/CPAN/lib/CPAN/FirstTime.pm 004/cpan/CPAN/lib/CPAN/FirstTime.pm +--- 003/cpan/CPAN/lib/CPAN/FirstTime.pm 2015-01-06 21:07:13.509562500 -0200 ++++ 004/cpan/CPAN/lib/CPAN/FirstTime.pm 2015-01-07 09:17:32.727227100 -0200 +@@ -1470,6 +1470,21 @@ + next; + } + ++ # Let's not store full paths to programs in MSYS2 because ++ # paths change across shells. For example let's not use 32-bit ++ # programs in the 64-bit shell. ++ ++ if ($^O eq 'MSWin32') { ++ if ($progname eq 'make') { ++ # Make doesn't like the cmd.exe-friendly makefiles that are ++ # created when installing modules, so let's stick to dmake. ++ $CPAN::Config->{$progname} = 'dmake'; ++ } else { ++ $CPAN::Config->{$progname} = $progname; ++ } ++ next; ++ } ++ + my $progcall = $progname; + unless ($matcher) { + # we really don't need ncftp if we have ncftpget, but diff --git a/mingw-w64-perl/PKGBUILD b/mingw-w64-perl/PKGBUILD index 2cd525ab7a..11a4e4a282 100644 --- a/mingw-w64-perl/PKGBUILD +++ b/mingw-w64-perl/PKGBUILD @@ -1,92 +1,104 @@ -# Maintainer: Alexey Pavlov +# Maintainer: Alexey Pavlov +# Contributor: Renato Silva -_realname=perl +_name=perl +url='http://www.perl.org' +pkgdesc='A highly capable, feature-rich programming language (mingw-w64)' +license=(GPL1+ Artistic1) +arch=(any) +pkgver=5.22.0 +pkgrel=1 +install="perl-${CARCH}.install" +options=(staticlibs strip '!purge') +pkgname="${MINGW_PACKAGE_PREFIX}-${_name}" +makedepends=(${MINGW_PACKAGE_PREFIX}-gcc) +depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs + ${MINGW_PACKAGE_PREFIX}-winpthreads + ${MINGW_PACKAGE_PREFIX}-dmake) -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.18.1 -pkgrel=3 -pkgdesc="A highly capable, feature-rich programming language (mingw-w64)" -arch=('any') -url="http://www.perl.org" -license=('GPL' 'PerlArtistic') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-dmake") -depends=("${MINGW_PACKAGE_PREFIX}-winpthreads") -options=('staticlibs' 'strip' '!purge') -install=perl.install source=("http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2" - perl-5.18.0-add-missing-mingw-libs.patch - perl-variables.patch) -md5sums=('4ec1a3f3824674552e749ae420c5e68c' - '0b4e643fe4c54512d0c5833665e88f5e' - 'b9cfc63845749f8ebddb0219208eed84') + 001-fhs-directory-structure.patch + 002-relocate-html-documentation.patch + 003-replace-batch-scripts-with-bare-perl.patch + 004-fix-cpan-external-programs.patch) + +md5sums=('f67b152160431b3180fb766bdc2d02e2' + '03f65d7a7751d8c850ca62d9c88b939c' + 'b09f961437155056ca65cbf75035fae7' + '51811b5b185394f9512b5470c2b623ca' + 'cd49b29a251adcc21fe87c66110cdc3a') prepare() { - cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/perl-5.18.0-add-missing-mingw-libs.patch - patch -p1 -i ${srcdir}/perl-variables.patch + cd "${srcdir}/${_name}-${pkgver}" + attrib.exe -r //s + patch -p1 -i "${srcdir}"/001-fhs-directory-structure.patch + patch -p1 -i "${srcdir}"/002-relocate-html-documentation.patch + patch -p1 -i "${srcdir}"/003-replace-batch-scripts-with-bare-perl.patch + patch -p1 -i "${srcdir}"/004-fix-cpan-external-programs.patch +} + +_build() { + local win64 + unset SHELL + cd "${srcdir}/build-${CARCH}-${_name}-${pkgver}/win32" + [[ "$(uname --machine)" = x86_64 && "${CARCH}" = i686 ]] && win64="WIN64=undef" + PATH="${MINGW_PREFIX}/bin:${SYSTEMROOT}/system32:${SYSTEMROOT}:${PATH}" dmake \ + CCHOME="$(cygpath -w "${MINGW_PREFIX}")" INST_TOP="$(cygpath -w "${pkgdir}${MINGW_PREFIX}")" ${win64} ${_target} } build() { - cp -r ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${CARCH} - cd ${srcdir}/build-${CARCH}/win32 - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - local DRV=`expr substr $PREFIX_WIN 1 2` - local NOTDRV=${PREFIX_WIN#$DRV} - NOTDRV=$(echo $NOTDRV | sed 's|/|\\\\|g') - local MINGWHOME_WIN_P=$(echo $PREFIX_WIN | sed 's|/|\\\\|g') - - local COMMA= - local EXTRA=$PREFIX_WIN/${MINGW_CHOST}/lib - [[ ${CARCH} == i686 ]] && { - COMMA="" - } || { - COMMA="#" - } - EXTRA=$(echo $EXTRA | sed 's|/|\\\\|g') - - cat makefile.mk | sed 's|%DRV%|'"$DRV"'|g' \ - | sed -e 's|%NODRV%|'"$NOTDRV"'|g' \ - | sed -e 's|%COMW64%|'"$COMMA"'|g' \ - | sed -e 's|%MINGWHOME%|'"$MINGWHOME_WIN_P"'|g' \ - | sed -e 's|%THIRDPARTY_LIBS%|'"$EXTRA"'|g' > makefile.tmp - - rm -f makefile.mk - mv makefile.tmp makefile.mk - - pushd $SYSTEMROOT > /dev/null - local WIN_SYS=`pwd` - popd > /dev/null - local WINDOWS_PART_PATH=$WIN_SYS/system32:$WIN_SYS - unset SHELL - PATH=${MINGW_PREFIX}/bin:${WINDOWS_PART_PATH}:${PATH} ${MINGW_PREFIX}/bin/dmake + msg2 "Synchronizing build directory" + rsync --recursive --times "${srcdir}/${_name}-${pkgver}"/* "${srcdir}/build-${CARCH}-${_name}-${pkgver}" + _build } package() { - cd "${srcdir}/build-${CARCH}/win32" - pushd $SYSTEMROOT > /dev/null - local WIN_SYS=`pwd` - popd > /dev/null - local WINDOWS_PART_PATH=$WIN_SYS/system32:$WIN_SYS - PATH=${MINGW_PREFIX}/bin:${WINDOWS_PART_PATH}:${PATH} ${MINGW_PREFIX}/bin/dmake install - - # fix permissions - find ${pkgdir}${MINGW_PREFIX} -type f \( -name "*.bat" -o -name "*.dll" -o -name "*.exe" \) | xargs chmod 0755 - find ${pkgdir}${MINGW_PREFIX} -type f \( -name "*.a" -o -name "*.pm" -o -name "*.pl" -o -name "*.h" \) | xargs chmod 0644 + _target=install _build + cd "${pkgdir}${MINGW_PREFIX}" + mkdir -p lib/perl5/vendor_perl + attrib.exe -r //s - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - PREFIX_WIN=${PREFIX_WIN//\//\\\\\\\\} - - echo "RELOCATE is ${PREFIX_WIN}" - sed -i "s|${PREFIX_WIN}|%RELOCATE%|g" \ - ${pkgdir}${MINGW_PREFIX}/lib/Config.pm \ - ${pkgdir}${MINGW_PREFIX}/lib/Config_heavy.pl \ - ${pkgdir}${MINGW_PREFIX}/lib/CORE/config.h + # Licenses + install -Dm644 "${srcdir}/${_name}-${pkgver}/README" share/licenses/${_name}/README + install -Dm644 "${srcdir}/${_name}-${pkgver}/Copying" share/licenses/${_name}/Copying + install -Dm644 "${srcdir}/${_name}-${pkgver}/Artistic" share/licenses/${_name}/Artistic + + # Path relocation. This is done by replacing hard-coded paths with relocate + # patterns that will be resolved on package installation. The HTML + # documentation is handled with a patch, the rest is handled below. + + local root_pattern + local root_pattern_double + local pkgdir_pattern + local pkgdir_pattern_double + + root_pattern=$(cygpath -w /) + root_pattern="${root_pattern%\\}" + root_pattern="${root_pattern//\\/\\\\}" + root_pattern_double="${root_pattern//\\\\/\\\\\\\\}" + pkgdir_pattern=$(cygpath -w "${pkgdir}") + pkgdir_pattern="${pkgdir_pattern//\\/\\\\}" + pkgdir_pattern_double="${pkgdir_pattern//\\\\/\\\\\\\\}" + + msg2 "Creating relocate patterns for:" + printf " ${root_pattern}\n" + printf " ${root_pattern_double}\n" + printf " ${pkgdir_pattern}\n" + printf " ${pkgdir_pattern_double}\n" + + sed -i "s/${pkgdir_pattern}/@PERL_RELOCATE@/g" lib/perl5/core_perl/.packlist + sed -i "s/${pkgdir_pattern_double}/@PERL_RELOCATE_DOUBLE@/g" lib/perl5/core_perl/CORE/config.h + sed -i "s/${root_pattern}/@PERL_RELOCATE@/g" lib/perl5/core_perl/Config.pm + sed -i "s/${root_pattern_double}/@PERL_RELOCATE_DOUBLE@/g" lib/perl5/core_perl/Config.pm + sed -i "s/${pkgdir_pattern_double}/@PERL_RELOCATE_DOUBLE@/g" lib/perl5/core_perl/Config.pm + sed -i "s/${root_pattern}/@PERL_RELOCATE@/g" lib/perl5/core_perl/Config_heavy.pl + sed -i "s/${root_pattern_double}/@PERL_RELOCATE_DOUBLE@/g" lib/perl5/core_perl/Config_heavy.pl + sed -i "s/${pkgdir_pattern}/@PERL_RELOCATE@/g" lib/perl5/core_perl/Config_heavy.pl + + for script in \ + c2ph corelist cpan enc2xs encguess exetype h2ph h2xs instmodsh json_pp libnetcfg perlbug \ + perldoc perlglob perlivp perlthanks piconv pl2bat pl2pm pod2html pod2man pod2text pod2usage podchecker \ + podselect prove pstruct ptar ptardiff ptargrep runperl search shasum splain xsubpp zipdetails ; do + sed -i "s/${pkgdir_pattern}/@PERL_RELOCATE@/g" bin/${script} + done } diff --git a/mingw-w64-perl/perl-5.18.0-add-missing-mingw-libs.patch b/mingw-w64-perl/perl-5.18.0-add-missing-mingw-libs.patch deleted file mode 100644 index 1e87686c6e..0000000000 --- a/mingw-w64-perl/perl-5.18.0-add-missing-mingw-libs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- perl-5.18.0/win32/makefile.mk.orig 2013-05-08 01:49:53 +0400 -+++ perl-5.18.0/win32/makefile.mk 2013-05-19 21:54:36 +0400 -@@ -1505,6 +1505,8 @@ - if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL) - if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL) - if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL) -+ if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL) -+ if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL) - .ENDIF - - test : test-prep diff --git a/mingw-w64-perl/perl-i686.install b/mingw-w64-perl/perl-i686.install new file mode 100644 index 0000000000..840de2642d --- /dev/null +++ b/mingw-w64-perl/perl-i686.install @@ -0,0 +1,33 @@ +_relocating() { + printf "%6s" + printf "relocating ${1}\n" +} + +post_install() { + basedir="$(pwd -W)" + basedir="${basedir%/}" + basedir="${basedir//\//\\\\}" + basedir_double="${basedir//\\\\/\\\\\\\\}" + basedir_html="${basedir//\\\\/\\\/}" + + _relocating configuration + sed -i "s/@PERL_RELOCATE@/${basedir}/g" /mingw32/lib/perl5/core_perl/.packlist + sed -i "s/@PERL_RELOCATE@/${basedir}/g" /mingw32/lib/perl5/core_perl/Config_heavy.pl + sed -i "s/@PERL_RELOCATE_DOUBLE@/${basedir_double}/g" /mingw32/lib/perl5/core_perl/Config.pm + sed -i "s/@PERL_RELOCATE_DOUBLE@/${basedir_double}/g" /mingw32/lib/perl5/core_perl/CORE/config.h + + _relocating scripts + for script in c2ph corelist cpan enc2xs encguess exetype h2ph h2xs instmodsh json_pp libnetcfg perlbug \ + perldoc perlglob perlivp perlthanks piconv pl2bat pl2pm pod2html pod2man pod2text pod2usage podchecker podselect \ + prove pstruct ptar ptardiff ptargrep runperl search shasum splain xsubpp zipdetails ; do + sed -i "s/@PERL_RELOCATE@/${basedir}/g" /mingw32/bin/${script} + done + + _relocating documentation + find /mingw32/share/doc/perl5 -type f -name '*.html' -exec \ + sed -i "s/@PERL_RELOCATE_HTML@/file:\\/\\/\\/${basedir_html}\\/mingw32/g" '{}' \; +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-perl/perl-variables.patch b/mingw-w64-perl/perl-variables.patch deleted file mode 100644 index e380aee3a0..0000000000 --- a/mingw-w64-perl/perl-variables.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- perl-5.18.1/win32/makefile.mk.orig 2013-08-12 06:44:49.000000000 +0400 -+++ perl-5.18.1/win32/makefile.mk 2013-12-01 11:40:54.632600000 +0400 -@@ -21,13 +21,13 @@ - # Set these to wherever you want "dmake install" to put your - # newly built perl. - # --INST_DRV *= c: --INST_TOP *= $(INST_DRV)\perl -+INST_DRV *= %DRV% -+INST_TOP *= $(INST_DRV)%NODRV% - - # - # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler - # on a 64-bit version of Windows. --#WIN64 *= undef -+%COMW64%WIN64 *= undef - - # - # Comment this out if you DON'T want your perl installation to be versioned. -@@ -97,7 +97,7 @@ - # Uncomment this if you're building a 32-bit perl and want 64-bit integers. - # (If you're building a 64-bit perl then you will have 64-bit integers whether - # or not this is uncommented.) --#USE_64_BIT_INT *= define -+USE_64_BIT_INT *= define - - # - # uncomment exactly one of the following -@@ -187,7 +187,7 @@ - # not be quoted) - # - .IF "$(CCTYPE)" == "GCC" --CCHOME *= C:\MinGW -+CCHOME *= %MINGWHOME% - .ELSE - CCHOME *= $(MSVCDIR) - .ENDIF -@@ -240,7 +240,7 @@ - # specify semicolon-separated list of extra directories that modules will - # look for libraries (spaces in path names need not be quoted) - # --EXTRALIBDIRS *= -+EXTRALIBDIRS *= %THIRDPARTY_LIBS% - - # - # set this to point to cmd.exe (only needed if you use some diff --git a/mingw-w64-perl/perl-x86_64.install b/mingw-w64-perl/perl-x86_64.install new file mode 100644 index 0000000000..54f7aea249 --- /dev/null +++ b/mingw-w64-perl/perl-x86_64.install @@ -0,0 +1,33 @@ +_relocating() { + printf "%6s" + printf "relocating ${1}\n" +} + +post_install() { + basedir="$(pwd -W)" + basedir="${basedir%/}" + basedir="${basedir//\//\\\\}" + basedir_double="${basedir//\\\\/\\\\\\\\}" + basedir_html="${basedir//\\\\/\\\/}" + + _relocating configuration + sed -i "s/@PERL_RELOCATE@/${basedir}/g" /mingw64/lib/perl5/core_perl/.packlist + sed -i "s/@PERL_RELOCATE@/${basedir}/g" /mingw64/lib/perl5/core_perl/Config_heavy.pl + sed -i "s/@PERL_RELOCATE_DOUBLE@/${basedir_double}/g" /mingw64/lib/perl5/core_perl/Config.pm + sed -i "s/@PERL_RELOCATE_DOUBLE@/${basedir_double}/g" /mingw64/lib/perl5/core_perl/CORE/config.h + + _relocating scripts + for script in c2ph corelist cpan enc2xs encguess exetype h2ph h2xs instmodsh json_pp libnetcfg perlbug \ + perldoc perlglob perlivp perlthanks piconv pl2bat pl2pm pod2html pod2man pod2text pod2usage podchecker podselect \ + prove pstruct ptar ptardiff ptargrep runperl search shasum splain xsubpp zipdetails ; do + sed -i "s/@PERL_RELOCATE@/${basedir}/g" /mingw64/bin/${script} + done + + _relocating documentation + find /mingw64/share/doc/perl5 -type f -name '*.html' -exec \ + sed -i "s/@PERL_RELOCATE_HTML@/file:\\/\\/\\/${basedir_html}\\/mingw64/g" '{}' \; +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-perl/perl.install b/mingw-w64-perl/perl.install deleted file mode 100644 index dc449e3d2d..0000000000 --- a/mingw-w64-perl/perl.install +++ /dev/null @@ -1,21 +0,0 @@ - -post_install() { - for dirr in mingw32 mingw64; do - [[ -d ${dirr} ]] && { - cd ${dirr} - _PW=$(pwd -W) - cd - - _PW=${_PW//\//\\\\\\\\} - [[ -f ${dirr}/lib/Config.pm ]] && { - sed -i "s|%RELOCATE%|${_PW}|g" \ - ${dirr}/lib/Config.pm \ - ${dirr}/lib/Config_heavy.pl \ - ${dirr}/lib/CORE/config.h - } - } - done -} - -post_upgrade() { - post_install -} diff --git a/mingw-w64-phodav/001-win.patch b/mingw-w64-phodav/001-win.patch new file mode 100644 index 0000000000..1816d6622c --- /dev/null +++ b/mingw-w64-phodav/001-win.patch @@ -0,0 +1,89 @@ +--- ./doc/Makefile.am.orig 2015-03-28 11:22:54.627520700 +0100 ++++ ./doc/Makefile.am 2015-03-28 11:23:10.053773500 +0100 +@@ -1,21 +1,4 @@ + SUBDIRS = reference + +-MAN1_TXT = chezdav.txt +- +-if HAVE_DOCTOOLS +-# Manual pages are generated from .txt via Docbook +-man1_MANS = ${MAN1_TXT:%.txt=%.1} +- +-SUFFIXES = .txt .xml .1 +- +-.xml.1: +- $(XMLTO) man $< 2>&1 +- +-.txt.xml: +- $(ASCIIDOC) --backend=docbook --doctype=manpage -o $@ $< +-endif +- +-EXTRA_DIST = $(MAN1_TXT) +-CLEANFILES = $(man1_MANS) + + -include $(top_srcdir)/git.mk +--- ./m4/intltool.m4.orig 2015-03-28 11:13:05.423072100 +0100 ++++ ./m4/intltool.m4 2015-03-28 11:24:53.078804700 +0100 +@@ -155,31 +155,6 @@ + # Substitute ALL_LINGUAS so we can use it in po/Makefile + AC_SUBST(ALL_LINGUAS) + +-# Set DATADIRNAME correctly if it is not set yet +-# (copied from glib-gettext.m4) +-if test -z "$DATADIRNAME"; then +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[]], +- [[extern int _nl_msg_cat_cntr; +- return _nl_msg_cat_cntr]])], +- [DATADIRNAME=share], +- [case $host in +- *-*-solaris*) +- dnl On Solaris, if bind_textdomain_codeset is in libc, +- dnl GNU format message catalog is always supported, +- dnl since both are added to the libc all together. +- dnl Hence, we'd like to go with DATADIRNAME=share +- dnl in this case. +- AC_CHECK_FUNC(bind_textdomain_codeset, +- [DATADIRNAME=share], [DATADIRNAME=lib]) +- ;; +- *) +- [DATADIRNAME=lib] +- ;; +- esac]) +-fi +-AC_SUBST(DATADIRNAME) +- + IT_PO_SUBDIR([po]) + + ]) +--- ./po/Makefile.in.in.orig 2015-03-28 11:14:58.472814600 +0100 ++++ ./po/Makefile.in.in 2015-03-28 11:24:28.814784300 +0100 +@@ -34,7 +34,7 @@ + datarootdir = @datarootdir@ + libdir = @libdir@ + DATADIRNAME = @DATADIRNAME@ +-itlocaledir = $(prefix)/$(DATADIRNAME)/locale ++localedir = @localedir@ + subdir = po + install_sh = @install_sh@ + # Automake >= 1.8 provides @mkdir_p@. +@@ -108,7 +108,7 @@ + install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ ++ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ +@@ -142,8 +142,8 @@ + uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ +- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ ++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + + check: all $(GETTEXT_PACKAGE).pot diff --git a/mingw-w64-phodav/PKGBUILD b/mingw-w64-phodav/PKGBUILD new file mode 100644 index 0000000000..299e3ff463 --- /dev/null +++ b/mingw-w64-phodav/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Andrea Zagli + +_realname=phodav +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.0 +pkgrel=2 +arch=('any') +pkgdesc="A WebDAV server using libsoup (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-libsoup") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "gtk-doc") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver}/${_realname}-$pkgver.tar.xz + 001-win.patch) +sha256sums=('53b42faf2d6edfb0072dbbbe9b8360d8603cca2cacd142df8d1781b9ba0cb9ed' + '2480a0b804924fd1cfa3dd6a949cdb2250d487cead2f1b1d30ba8cf8e3ec0246') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + autoreconf -isf +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p doc/reference/html + cp -rf ../${_realname}-${pkgver}/doc/reference/html/* doc/reference/html + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/lib${_realname}/COPYING" +} diff --git a/mingw-w64-physfs-hg/PKGBUILD b/mingw-w64-physfs-hg/PKGBUILD index 108480342a..dc04175ec1 100644 --- a/mingw-w64-physfs-hg/PKGBUILD +++ b/mingw-w64-physfs-hg/PKGBUILD @@ -5,8 +5,8 @@ _realname=physfs pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}-hg -pkgver=r1345.29ab417d9453 -pkgrel=2 +pkgver=r1363.a3dabf75a0d0 +pkgrel=1 pkgdesc="A library to provide abstract access to various archives (development version)" arch=('any') url="http://icculus.org/physfs/" @@ -14,7 +14,7 @@ license=('zlib') options=('staticlibs' 'strip') depends=("${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - 'doxygen' + "${MINGW_PACKAGE_PREFIX}-doxygen" 'mercurial') provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") @@ -37,34 +37,25 @@ prepare() { } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - #pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - #export PREFIX_WIN=`pwd -W` - #popd > /dev/null - mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DPHYSFS_BUILD_TEST=OFF \ -DCMAKE_BUILD_TYPE=Release \ - -DPHYSFS_BUILD_WX_TEST=OFF ${srcdir}/${_realname} - make all + -DPHYSFS_BUILD_WX_TEST=OFF \ + ../${_realname} + + make } package() { cd ${srcdir}/build-${MINGW_CHOST} - - make install + make DESTDIR=${pkgdir} install install -Dm644 ${srcdir}/${_realname}/LICENSE.txt \ - "$pkgdir"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/physfs.pc + "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-physfs/PKGBUILD b/mingw-w64-physfs/PKGBUILD index 2749c3ad06..177ce768a9 100644 --- a/mingw-w64-physfs/PKGBUILD +++ b/mingw-w64-physfs/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=physfs - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.3 -pkgrel=1 +pkgrel=2 pkgdesc="A library to provide abstract access to various archives (mingw-w64)" arch=('any') url="http://icculus.org/physfs/" @@ -24,25 +23,23 @@ build() { #Unstrict warnings are required as 64 bit compiler complains about an int->pointer cast (which should be safe) sed -i 's/-Werror//g' CMakeLists.txt - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${MINGW_PREFIX}/bin/cmake \ + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DPHYSFS_BUILD_TEST=OFF \ -DPHYSFS_BUILD_WX_TEST=OFF \ ../${_realname}-${pkgver} - make all + + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install + make DESTDIR=${pkgdir} install cd "${srcdir}/physfs-${pkgver}" install -D -m644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-pidgin++/PKGBUILD b/mingw-w64-pidgin++/PKGBUILD index 66c3ebf3f3..436b7a71b8 100644 --- a/mingw-w64-pidgin++/PKGBUILD +++ b/mingw-w64-pidgin++/PKGBUILD @@ -37,7 +37,7 @@ prepare() { build() { cd "${srcdir}"/${_realname}-${pkgver}-${CARCH} -# Need to patch +# Need to patch # ../configure \ # --prefix=${MINGW_PREFIX} \ # --sysconfdir=/etc \ diff --git a/mingw-w64-pidgin-hg/001-win.patch b/mingw-w64-pidgin-hg/001-win.patch new file mode 100644 index 0000000000..088ea22263 --- /dev/null +++ b/mingw-w64-pidgin-hg/001-win.patch @@ -0,0 +1,55 @@ +--- ./libpurple/Makefile.am.orig 2015-05-17 21:54:49.202429500 +0200 ++++ ./libpurple/Makefile.am 2015-05-17 23:06:31.848670500 +0200 +@@ -463,6 +463,7 @@ + INTROSPECTION_GIRS = + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(prefix)/share/gir-1.0 --warn-all + INTROSPECTION_COMPILER_ARGS = --includedir=$(prefix)/share/gir-1.0 ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + introspection_sources = \ +@@ -480,7 +481,7 @@ + endif + + Purple_3_0_gir_CFLAGS = \ +- -I$(srcdir) \ ++ -I$(top_srcdir) \ + $(INCLUDES) \ + -DDATADIR=\"$(datadir)\" \ + -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \ +@@ -506,10 +507,10 @@ + Purple_3_0_gir_FILES = $(introspection_sources) + INTROSPECTION_GIRS += Purple-$(PURPLE_MAJOR_VERSION).$(PURPLE_MINOR_VERSION).gir + +-girdir = $(prefix)/share/gir-1.0 $(INTROSPECTION_GIRDIR) ++girdir = $(datadir)/gir-1.0 + gir_DATA = $(INTROSPECTION_GIRS) + +-typelibdir = $(prefix)/share/gir-1.0 $(INTROSPECTION_TYPELIBDIR) ++typelibdir = $(libdir)/girepository-1.0 + typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + + CLEANFILES += $(gir_DATA) $(typelib_DATA) +--- ./pidgin/Makefile.am.orig 2015-05-17 21:54:49.224430000 +0200 ++++ ./pidgin/Makefile.am 2015-05-17 23:07:16.130585900 +0200 +@@ -266,6 +266,7 @@ + INTROSPECTION_GIRS = + INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(top_builddir)/libpurple --add-include-path=$(prefix)/share/gir-1.0 + INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/libpurple --includedir=$(prefix)/share/gir-1.0 ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + introspection_sources = $(libpidgininclude_HEADERS) +@@ -300,10 +301,10 @@ + Pidgin_3_0_gir_FILES = $(introspection_sources) + INTROSPECTION_GIRS += Pidgin-$(PURPLE_MAJOR_VERSION).$(PURPLE_MINOR_VERSION).gir + +-girdir = $(prefix)/share/gir-1.0 $(INTROSPECTION_GIRDIR) ++girdir = $(datadir)/gir-1.0 + gir_DATA = $(INTROSPECTION_GIRS) + +-typelibdir = $(prefix)/share/gir-1.0 $(INTROSPECTION_TYPELIBDIR) ++typelibdir = $(libdir)/girepository-1.0 + typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + + CLEANFILES += $(gir_DATA) $(typelib_DATA) diff --git a/mingw-w64-pidgin-hg/PKGBUILD b/mingw-w64-pidgin-hg/PKGBUILD index 290f6c8bf1..710e103bb4 100644 --- a/mingw-w64-pidgin-hg/PKGBUILD +++ b/mingw-w64-pidgin-hg/PKGBUILD @@ -4,27 +4,28 @@ _realname=pidgin pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-hg" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=r36168.0203e8dce52d +pkgver=r37207.e666f49a3e86 pkgrel=1 pkgdesc="Multi-protocol instant messaging client (mingw-w64)" arch=('any') url="http://pidgin.im/" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gtk-doc" +makedepends=("${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" - "doxygen" + "gtk-doc" "mercurial") -depends=("${MINGW_PACKAGE_PREFIX}-ca-certificates" - #"${MINGW_PACKAGE_PREFIX}-farstream" +depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-ca-certificates" + "${MINGW_PACKAGE_PREFIX}-farstream" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-fontconfig" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-gplugin" "${MINGW_PACKAGE_PREFIX}-gsasl" "${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-gtkspell" - "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme" "${MINGW_PACKAGE_PREFIX}-libgadu" "${MINGW_PACKAGE_PREFIX}-libidn" "${MINGW_PACKAGE_PREFIX}-nss" @@ -35,16 +36,20 @@ options=(!libtool strip staticlibs) source=(${_realname}::"hg+https://hg.pidgin.im/pidgin/main" #"http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.bz2" - ) -md5sums=('SKIP') + 001-win.patch) +md5sums=('SKIP' + '5c2e4ea9f3c58476f96b1d855c8ea710') pkgver() { - cd "$_realname" + cd "${_realname}" printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)" } prepare() { cd ${_realname} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + NOCONFIGURE=1 ./autogen.sh } @@ -62,11 +67,9 @@ build() { --disable-screensaver \ --disable-sm \ --disable-nm \ - --disable-vv \ - --disable-tcl \ --with-python=${MINGW_PREFIX}/bin/python2 \ --with-system-ssl-certs=${MINGW_PREFIX}/ssl/certs \ - --with-win32-dirs=fhs + --with-win32-dirs=fhs \ #--enable-cyrus-sasl make @@ -75,4 +78,6 @@ build() { package() { cd "${srcdir}/${_realname}" make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${_realname}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-pitivi-git/PKGBUILD b/mingw-w64-pitivi-git/PKGBUILD index a8e1da8792..ec2610ca2c 100644 --- a/mingw-w64-pitivi-git/PKGBUILD +++ b/mingw-w64-pitivi-git/PKGBUILD @@ -28,7 +28,7 @@ pkgver() { version=$(grep AC_INIT configure.ac | sed 's/AC_INIT(Pitivi, //' | sed 's/,//') hash=$(git log --pretty=format:'%h' -n 1) revision=$(git rev-list --count HEAD) - echo $version.$revision.$hash + echo $version.$revision.$hash } build() { diff --git a/mingw-w64-pixman/PKGBUILD b/mingw-w64-pixman/PKGBUILD index ccb436637c..f21e3f1e2e 100644 --- a/mingw-w64-pixman/PKGBUILD +++ b/mingw-w64-pixman/PKGBUILD @@ -1,18 +1,20 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=pixman +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.32.6 +pkgver=0.33.2 pkgrel=1 pkgdesc="The pixel-manipulation library for X and cairo (mingw-w64)" arch=('any') url="http://xorg.freedesktop.org" -license=("custom") +license=(MIT) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-libpng") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('staticlibs' 'strip') source=("http://xorg.freedesktop.org/releases/individual/lib/pixman-${pkgver}.tar.bz2") -sha1sums=('5b730399e1e212e5acaa69a4f1a2c7be1af1cdc4') +sha1sums=('e1f6beca709fc163f72802d6aa32b13375ea7e55') build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" @@ -27,5 +29,6 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-pkg-config/0002-check-for-host.mingw.patch b/mingw-w64-pkg-config/0002-check-for-host.mingw.patch deleted file mode 100644 index 9e3cbb2b72..0000000000 --- a/mingw-w64-pkg-config/0002-check-for-host.mingw.patch +++ /dev/null @@ -1,17 +0,0 @@ - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 2b33371..4ed7e4d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -138,7 +138,7 @@ fi - AC_SUBST(WARN_CFLAGS) - - AC_MSG_CHECKING([for Win32]) --case "$build" in -+case "$host" in - *-*-mingw*) - native_win32=yes - ;; --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0003-flush.mingw.patch b/mingw-w64-pkg-config/0003-flush.mingw.patch deleted file mode 100644 index dde3bd0821..0000000000 --- a/mingw-w64-pkg-config/0003-flush.mingw.patch +++ /dev/null @@ -1,24 +0,0 @@ - main.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/main.c b/main.c -index b61ca34..c937efc 100644 ---- a/main.c -+++ b/main.c -@@ -190,6 +190,7 @@ output_opt_cb (const char *opt, const char *arg, gpointer data, - { - fprintf (stderr, "Ignoring incompatible output option \"%s\"\n", - opt); -+ fflush (stderr); - return TRUE; - } - } -@@ -322,6 +323,7 @@ process_package_args (const char *cmdline, GList **packages, FILE *log) - if (reqs == NULL) - { - fprintf (stderr, "Must specify package names on the command line\n"); -+ fflush (stderr); - return FALSE; - } - --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0004-expected-path-for.mingw.patch b/mingw-w64-pkg-config/0004-expected-path-for.mingw.patch deleted file mode 100644 index 427edf34ca..0000000000 --- a/mingw-w64-pkg-config/0004-expected-path-for.mingw.patch +++ /dev/null @@ -1,75 +0,0 @@ - check/check-path | 29 +++++++++++++++++++++-------- - check/config.sh.in | 2 ++ - configure.ac | 1 + - 3 files changed, 24 insertions(+), 8 deletions(-) - -diff --git a/check/check-path b/check/check-path -index fecfc06..37244d9 100755 ---- a/check/check-path -+++ b/check/check-path -@@ -9,14 +9,27 @@ PKG_CONFIG_PATH="$srcdir/sub" run_test --exists sub1 - - # default pkg-config path, making sure to resolve the variables fully - eval pc_path="$pc_path" --case ${MACHTYPE} in --*-msys) -- # Make sure path doesn't get mangled on MSYS -- RESULT=$(echo $pc_path | sed 's,/,\\/,g') -- ;; --*) -+if [ "$native_win32" = yes ]; then -+ # This is pretty hacky. On native win32 (MSYS/MINGW), pkg-config -+ # builds the default path from the installation directory. It -+ # then adds lib/pkgconfig and share/pkgconfig to it. Normally, -+ # the autoconf build directory would be used, but that path is in -+ # Unix format. -+ if [ "$OSTYPE" = msys ]; then -+ # MSYS has "pwd -W" to get the current directory in Windows format -+ pcdir=$(cd $top_builddir/.libs && pwd -W) -+ else -+ # Assume we have cmd somewhere to get variable %cd%. Make sure -+ # to strip carriage returns. -+ pcdir=$(cd $top_builddir/.libs && -+ cmd /C echo %cd% | sed -r 's/\r//g') -+ fi -+ win_path="$pcdir/lib/pkgconfig;$pcdir/share/pkgconfig" -+ -+ # Convert from forward slashes to Windows backslashes -+ RESULT=$(echo $win_path | sed 's,/,\\,g') -+else - RESULT=$pc_path -- ;; --esac -+fi - unset PKG_CONFIG_LIBDIR - run_test --variable=pc_path pkg-config -diff --git a/check/config.sh.in b/check/config.sh.in -index 91f20a2..68fa097 100644 ---- a/check/config.sh.in -+++ b/check/config.sh.in -@@ -2,6 +2,7 @@ - # Settings from the configure script - # - -+top_builddir=@top_builddir@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - includedir=@includedir@ -@@ -13,3 +14,4 @@ system_include_path="@system_include_path@" - system_library_path="@system_library_path@" - list_indirect_deps=@use_indirect_deps@ - PACKAGE_VERSION=@PACKAGE_VERSION@ -+native_win32=@native_win32@ -diff --git a/configure.ac b/configure.ac -index 4ed7e4d..4de9b16 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -147,6 +147,7 @@ case "$host" in - ;; - esac - AC_MSG_RESULT([$native_win32]) -+AC_SUBST([native_win32]) - AM_CONDITIONAL(NATIVE_WIN32, [test "x$native_win32" = xyes]) - - dnl --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0005-mangle.mingw.patch b/mingw-w64-pkg-config/0005-mangle.mingw.patch deleted file mode 100644 index 4435ec3d07..0000000000 --- a/mingw-w64-pkg-config/0005-mangle.mingw.patch +++ /dev/null @@ -1,39 +0,0 @@ -MSYS mangles UNIX paths on execution such that it prepends its root in -Windows format. This affects PKG_CONFIG_SYSROOT_DIR and thus the -check-sysroot test. Detect MSYS from the OSTYPE environment variable and -adjust the expected test results to match. This likely means that -sysroot support doesn't actually work on MSYS, but there probably aren't -any toolchains that support sysroot there, anyway. ---- - check/check-sysroot | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/check/check-sysroot b/check/check-sysroot -index 0820206..d03d1c7 100755 ---- a/check/check-sysroot -+++ b/check/check-sysroot -@@ -6,6 +6,11 @@ set -e - - export PKG_CONFIG_SYSROOT_DIR=/sysroot - -+# MSYS mangles / paths to its own root in windows format. This probably -+# means sysroot doesn't work there, but match what pkg-config passes -+# back anyway. -+[ "x$OSTYPE" = "xmsys" ] && root=$(cd / && pwd -W) || root= -+ - RESULT="" - run_test --cflags simple - -@@ -20,8 +25,8 @@ if [ "$list_indirect_deps" = yes ]; then - fi - run_test --libs --static simple - --RESULT="-I/sysroot/public-dep/include" -+RESULT="-I$root/sysroot/public-dep/include" - run_test --cflags public-dep - --RESULT="-L/sysroot/public-dep/lib -lpublic-dep" -+RESULT="-L$root/sysroot/public-dep/lib -lpublic-dep" - run_test --libs public-dep --- 1.8.1.4 - diff --git a/mingw-w64-pkg-config/0006-path-for-tests.mingw.patch b/mingw-w64-pkg-config/0006-path-for-tests.mingw.patch deleted file mode 100644 index 6521c2db19..0000000000 --- a/mingw-w64-pkg-config/0006-path-for-tests.mingw.patch +++ /dev/null @@ -1,22 +0,0 @@ -For native Windows, the PKG_CONFIG_PATH separator is ; rather than :. ---- - check/check-sort-order | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/check/check-sort-order b/check/check-sort-order -index 77c0806..6482f6f 100755 ---- a/check/check-sort-order -+++ b/check/check-sort-order -@@ -34,8 +34,9 @@ set -e - - . ${srcdir}/common - --order1="$srcdir/sort/sort:$srcdir/sort" --order2="$srcdir/sort:$srcdir/sort/sort" -+[ "x$native_win32" = "xyes" ] && sep=';' || sep=':' -+order1="${srcdir}/sort/sort${sep}${srcdir}/sort" -+order2="${srcdir}/sort${sep}${srcdir}/sort/sort" - - export PKG_CONFIG_PATH - PKG_CONFIG_PATH="$order1" --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0007-sub-path-for-tests.mingw.patch b/mingw-w64-pkg-config/0007-sub-path-for-tests.mingw.patch deleted file mode 100644 index 5bfcae796d..0000000000 --- a/mingw-w64-pkg-config/0007-sub-path-for-tests.mingw.patch +++ /dev/null @@ -1,31 +0,0 @@ -This just paves the way to calculate more useful defaults in a shell. ---- - check/Makefile.am | 1 - - configure.ac | 4 ++++ - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/check/Makefile.am b/check/Makefile.am -index 30a527c..5006b5f 100644 ---- a/check/Makefile.am -+++ b/check/Makefile.am -@@ -1,4 +1,3 @@ --TESTS_PKG_CONFIG = $(top_builddir)/pkg-config$(EXEEXT) - TESTS_ENVIRONMENT = PKG_CONFIG='$(TESTS_PKG_CONFIG)' $(TESTS_SHELL) - - TESTS = \ -diff --git a/configure.ac b/configure.ac -index 4de9b16..73f2cf4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -32,6 +32,10 @@ AC_ARG_VAR([TESTS_SHELL], [Path to a POSIX shell to be used for testing]) - conf_path="$PATH:`getconf PATH 2>/dev/null`" - AC_PATH_PROGS([TESTS_SHELL], [bash ksh sh], [$CONFIG_SHELL], [$conf_path]) - -+dnl The built pkg-config to use for testing. This allows it to be set -+dnl from the make command line if necessary. -+AC_SUBST([TESTS_PKG_CONFIG], ['${top_builddir}/pkg-config${EXEEXT}']) -+ - dnl - dnl Default pkg-config search path - dnl --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0008-check-for-wine.mingw.patch b/mingw-w64-pkg-config/0008-check-for-wine.mingw.patch deleted file mode 100644 index 73de8de8d4..0000000000 --- a/mingw-w64-pkg-config/0008-check-for-wine.mingw.patch +++ /dev/null @@ -1,25 +0,0 @@ -If Wine is available when cross-compiling to Windows, it can be used to -run the test suite from the build machine. ---- - configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 73f2cf4..94666a4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -154,6 +154,13 @@ AC_MSG_RESULT([$native_win32]) - AC_SUBST([native_win32]) - AM_CONDITIONAL(NATIVE_WIN32, [test "x$native_win32" = xyes]) - -+dnl When cross compiling to Windows, Wine might be available to help -+dnl for testing. -+if test "$cross_compiling" = yes && test "$native_win32" = yes; then -+ AC_CHECK_PROG([WINE], [wine], [wine]) -+ test "x$WINE" != x && TESTS_PKG_CONFIG='${WINE} '"$TESTS_PKG_CONFIG" -+fi -+ - dnl - dnl Find glib or use internal copy. Required version is 2.16 for - dnl g_win32_get_package_installation_directory_of_module(). --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0009-use-wine-if-present.mingw.patch b/mingw-w64-pkg-config/0009-use-wine-if-present.mingw.patch deleted file mode 100644 index c42f87379c..0000000000 --- a/mingw-w64-pkg-config/0009-use-wine-if-present.mingw.patch +++ /dev/null @@ -1,30 +0,0 @@ -If we have Wine, it will provide cmd so we can build the pkg-config path -for the test. ---- - check/check-path | 2 +- - check/config.sh.in | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/check/check-path b/check/check-path -index 37244d9..2a6be75 100755 ---- a/check/check-path -+++ b/check/check-path -@@ -22,7 +22,7 @@ if [ "$native_win32" = yes ]; then - # Assume we have cmd somewhere to get variable %cd%. Make sure - # to strip carriage returns. - pcdir=$(cd $top_builddir/.libs && -- cmd /C echo %cd% | sed -r 's/\r//g') -+ $WINE cmd /C echo %cd% | sed -r 's/\r//g') - fi - win_path="$pcdir/lib/pkgconfig;$pcdir/share/pkgconfig" - -diff --git a/check/config.sh.in b/check/config.sh.in -index 68fa097..8b7ffb5 100644 ---- a/check/config.sh.in -+++ b/check/config.sh.in -@@ -15,3 +15,4 @@ system_library_path="@system_library_path@" - list_indirect_deps=@use_indirect_deps@ - PACKAGE_VERSION=@PACKAGE_VERSION@ - native_win32=@native_win32@ -+WINE=@WINE@ --- 1.8.1.4 \ No newline at end of file diff --git a/mingw-w64-pkg-config/0099-no-prefix-on.mingw.patch b/mingw-w64-pkg-config/0099-no-prefix-on.mingw.patch deleted file mode 100644 index 3c81c8d59a..0000000000 --- a/mingw-w64-pkg-config/0099-no-prefix-on.mingw.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- pkg-config-0.28/pkg.m4.orig 2013-04-01 15:45:41 +0400 -+++ pkg-config-0.28/pkg.m4 2013-04-03 02:13:38 +0400 -@@ -73,7 +73,7 @@ - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], -- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` -+ [pkg_cv_[]$1=`$PKG_CONFIG --dont-define-prefix --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else -@@ -122,9 +122,9 @@ - AC_MSG_RESULT([no]) - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then -- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` -+ $1[]_PKG_ERRORS=`$PKG_CONFIG --dont-define-prefix --short-errors --print-errors --cflags --libs "$2" 2>&1` - else -- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` -+ $1[]_PKG_ERRORS=`$PKG_CONFIG --dont-define-prefix --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD diff --git a/mingw-w64-pkg-config/1001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch b/mingw-w64-pkg-config/1001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch new file mode 100644 index 0000000000..e53fd8d166 --- /dev/null +++ b/mingw-w64-pkg-config/1001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch @@ -0,0 +1,316 @@ +diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c +--- glib-2.46.0-orig/glib/gstdio.c 2015-02-26 15:57:09.000000000 +0300 ++++ glib-2.46.0/glib/gstdio.c 2015-09-22 09:08:58.032066100 +0300 +@@ -192,6 +192,11 @@ + int mode) + { + #ifdef G_OS_WIN32 ++ HANDLE hFile; ++ DWORD dwDesiredAccess = 0; ++ DWORD dwFlagsAndAttributes = 0; ++ DWORD dwDisposition = OPEN_EXISTING; ++ DWORD dwSharedAccess = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; + wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); + int retval; + int save_errno; +@@ -202,12 +207,114 @@ + return -1; + } + +- retval = _wopen (wfilename, flags, mode); +- save_errno = errno; ++ /* Set up the access modes and other attributes */ ++ if ((flags & _O_CREAT) && (mode & _S_IREAD)) ++ { ++ if (! (mode & _S_IWRITE)) ++ dwFlagsAndAttributes = FILE_ATTRIBUTE_READONLY; /* Sets file to 'read only' after the file gets closed */ ++ } ++ if ( !(flags & _O_ACCMODE)) ++ { ++ /* Equates to _O_RDONLY */ ++ if (flags & _O_TRUNC) ++ { ++ errno = EINVAL; ++ g_free (wfilename); ++ return -1; ++ } + +- g_free (wfilename); ++ dwDesiredAccess |= GENERIC_READ; ++ dwSharedAccess |= FILE_SHARE_WRITE; ++ } ++ if (flags & _O_WRONLY) ++ { ++ if (flags & _O_RDWR) ++ { ++ errno = EINVAL; ++ g_free (wfilename); ++ return -1; ++ } + ++ dwDesiredAccess |= GENERIC_WRITE; ++ } ++ if (flags & _O_RDWR) ++ { ++ dwDesiredAccess |= GENERIC_READ; ++ dwDesiredAccess |= GENERIC_WRITE; ++ } ++ if (flags & _O_TRUNC) ++ { ++ if (flags & _O_CREAT) ++ dwDisposition = CREATE_ALWAYS; ++ else ++ dwDisposition = TRUNCATE_EXISTING; ++ } ++ if ((flags & _O_CREAT) && !(flags & _O_TRUNC)) ++ { ++ if (flags & _O_EXCL) ++ dwDisposition = CREATE_NEW; ++ else ++ dwDisposition = OPEN_ALWAYS; ++ } ++ if (flags & _O_CREAT) ++ { ++ /* Handle the other flags that can be attached to _O_CREAT */ ++ if ((flags & _O_TEMPORARY) || (flags & _O_SHORT_LIVED)) ++ dwFlagsAndAttributes |= FILE_ATTRIBUTE_TEMPORARY; ++ ++ if (flags & _O_TEMPORARY) ++ dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; ++ } ++ if ((flags & _O_SEQUENTIAL) || (flags & _O_APPEND)) ++ { ++ dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN; ++ } ++ else if (flags & _O_RANDOM) ++ { ++ dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; ++ } ++ ++ if (0 == dwFlagsAndAttributes) ++ dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL; ++ hFile = CreateFileW(wfilename, dwDesiredAccess, dwSharedAccess, NULL, dwDisposition, dwFlagsAndAttributes, NULL); ++ ++ if (INVALID_HANDLE_VALUE == hFile) ++ { ++ retval = (-1); ++ ++ switch (GetLastError ()) ++ { ++#define CASE(a,b) case ERROR_##a: errno = b; break ++ CASE (FILE_NOT_FOUND, ENOENT); ++ CASE (PATH_NOT_FOUND, ENOENT); ++ CASE (ACCESS_DENIED, EACCES); ++ CASE (NOT_SAME_DEVICE, EXDEV); ++ CASE (LOCK_VIOLATION, EACCES); ++ CASE (SHARING_VIOLATION, EACCES); ++ CASE (FILE_EXISTS, EEXIST); ++ CASE (ALREADY_EXISTS, EEXIST); ++#undef CASE ++ default: errno = EIO; ++ } ++ } ++ else ++ retval = _open_osfhandle((long)hFile, flags); ++ ++ if ((-1) != retval) ++ { ++ /* We have a valid file handle. Set its translation mode to text or binary, as appropriate */ ++ if ((!(flags & _O_TEXT)) && (_fmode == _O_BINARY)) ++ _setmode(retval, _O_BINARY); ++ else if ((flags & _O_TEXT) || (_fmode == _O_TEXT)) ++ _setmode(retval, _O_TEXT); ++ else ++ _setmode(retval, _O_BINARY); ++ } ++ ++ save_errno = errno; ++ g_free (wfilename); + errno = save_errno; ++ + return retval; + #else + int fd; +@@ -254,6 +361,8 @@ + int mode) + { + #ifdef G_OS_WIN32 ++ HANDLE hFile; ++ DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL; + wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); + int retval; + int save_errno; +@@ -264,12 +373,41 @@ + return -1; + } + +- retval = _wcreat (wfilename, mode); +- save_errno = errno; ++ if (mode & _S_IREAD) ++ { ++ if (! (mode & _S_IWRITE)) ++ dwFlagsAndAttributes = FILE_ATTRIBUTE_READONLY; /* Sets file to 'read only' after the file gets closed */ ++ } ++ ++ hFile = CreateFileW(wfilename, (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_DELETE), ++ NULL, CREATE_ALWAYS, dwFlagsAndAttributes, NULL); ++ ++ if (INVALID_HANDLE_VALUE == hFile) ++ { ++ retval = (-1); ++ ++ switch (GetLastError ()) ++ { ++#define CASE(a,b) case ERROR_##a: errno = b; break ++ CASE (FILE_NOT_FOUND, ENOENT); ++ CASE (PATH_NOT_FOUND, ENOENT); ++ CASE (ACCESS_DENIED, EACCES); ++ CASE (NOT_SAME_DEVICE, EXDEV); ++ CASE (LOCK_VIOLATION, EACCES); ++ CASE (SHARING_VIOLATION, EACCES); ++ CASE (FILE_EXISTS, EEXIST); ++ CASE (ALREADY_EXISTS, EEXIST); ++#undef CASE ++ default: errno = EIO; ++ } ++ } ++ else ++ retval = _open_osfhandle((long)hFile, _O_RDWR); + ++ save_errno = errno; + g_free (wfilename); +- + errno = save_errno; ++ + return retval; + #else + return creat (filename, mode); +@@ -702,33 +840,102 @@ + const gchar *mode) + { + #ifdef G_OS_WIN32 +- wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); +- wchar_t *wmode; +- FILE *retval; +- int save_errno; +- +- if (wfilename == NULL) +- { +- errno = EINVAL; +- return NULL; +- } +- +- wmode = g_utf8_to_utf16 (mode, -1, NULL, NULL, NULL); +- +- if (wmode == NULL) +- { +- g_free (wfilename); +- errno = EINVAL; +- return NULL; +- } +- +- retval = _wfopen (wfilename, wmode); +- save_errno = errno; +- +- g_free (wfilename); +- g_free (wmode); ++ int hFile; ++ int flags = 0; ++ gchar priv_mode[4]; ++ FILE *retval = NULL; ++ ++ if ((NULL == filename) || (NULL == mode)) ++ { ++ errno = EINVAL; ++ goto out; ++ } ++ if ((strlen(mode) < 1) || (strlen(mode) > 3)) ++ { ++ errno = EINVAL; ++ goto out; ++ } ++ ++ strncpy(priv_mode, mode, 3); ++ priv_mode[3] = '\0'; ++ ++ /* Set up any flags to pass to 'g_open()' */ ++ if (3 == strlen(priv_mode)) ++ { ++ if (('c' == priv_mode[2]) || ('n' == priv_mode[2])) ++ priv_mode[2] = '\0'; ++ else ++ { ++ if (0 == strcmp(priv_mode, "a+b")) ++ flags = _O_RDWR | _O_CREAT | _O_APPEND | _O_BINARY; ++ else if (0 == strcmp(priv_mode, "a+t")) ++ flags = _O_RDWR | _O_CREAT | _O_APPEND | _O_TEXT; ++ else if (0 == strcmp(priv_mode, "r+b")) ++ flags = _O_RDWR | _O_BINARY; ++ else if (0 == strcmp(priv_mode, "r+t")) ++ flags = _O_RDWR | _O_TEXT; ++ else if (0 == strcmp(priv_mode, "w+b")) ++ flags = _O_RDWR | _O_CREAT |_O_TRUNC | _O_BINARY; ++ else if (0 == strcmp(priv_mode, "w+t")) ++ flags = _O_RDWR | _O_CREAT |_O_TRUNC | _O_TEXT; ++ else ++ { ++ errno = EINVAL; ++ goto out; ++ } ++ } ++ } ++ if (2 == strlen(priv_mode)) ++ { ++ if (('c' == priv_mode[1]) || ('n' == priv_mode[1])) ++ priv_mode[1] = '\0'; ++ else ++ { ++ if (0 == strcmp(priv_mode, "a+")) ++ flags = _O_RDWR | _O_CREAT | _O_APPEND; ++ else if (0 == strcmp(priv_mode, "ab")) ++ flags = _O_WRONLY | _O_CREAT | _O_APPEND | _O_BINARY; ++ else if (0 == strcmp(priv_mode, "at")) ++ flags = _O_WRONLY | _O_CREAT | _O_APPEND | _O_TEXT; ++ else if (0 == strcmp(priv_mode, "rb")) ++ flags = _O_RDONLY | _O_BINARY; ++ else if (0 == strcmp(priv_mode, "rt")) ++ flags = _O_RDONLY | _O_TEXT; ++ else if (0 == strcmp(priv_mode, "wb")) ++ flags = _O_WRONLY | _O_CREAT | _O_TRUNC | _O_BINARY; ++ else if (0 == strcmp(priv_mode, "wt")) ++ flags = _O_WRONLY | _O_CREAT | _O_TRUNC | _O_TEXT; ++ else ++ { ++ errno = EINVAL; ++ goto out; ++ } ++ } ++ } ++ if (1 == strlen(priv_mode)) ++ { ++ if (0 == strcmp(priv_mode, "a")) ++ flags = _O_WRONLY | _O_CREAT | _O_APPEND; ++ else if (0 == strcmp(priv_mode, "r")) ++ flags = _O_RDONLY; ++ else if (0 == strcmp(priv_mode, "w")) ++ flags = _O_WRONLY | _O_CREAT | _O_TRUNC; ++ else if ( !((0 == strcmp(priv_mode, "c")) || (0 == strcmp(priv_mode, "n")))) ++ { ++ errno = EINVAL; ++ goto out; ++ } ++ } ++ ++ hFile = g_open (filename, flags, (_S_IREAD | _S_IWRITE)); ++ ++ if (INVALID_HANDLE_VALUE == (HANDLE)hFile) ++ /* 'errno' will have already been set by 'g_open()' */ ++ retval = NULL; ++ else ++ retval = _fdopen(hFile, mode); + +- errno = save_errno; ++out: + return retval; + #else + return fopen (filename, mode); diff --git a/mingw-w64-pkg-config/1003-g_abort.all.patch b/mingw-w64-pkg-config/1003-g_abort.all.patch new file mode 100644 index 0000000000..ae6712f7f6 --- /dev/null +++ b/mingw-w64-pkg-config/1003-g_abort.all.patch @@ -0,0 +1,238 @@ +diff -Naur glib-2.46.0-orig/glib/gbacktrace.c glib-2.46.0/glib/gbacktrace.c +--- glib-2.46.0-orig/glib/gbacktrace.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gbacktrace.c 2015-09-22 09:08:59.311126700 +0300 +@@ -254,7 +254,7 @@ + if (IsDebuggerPresent ()) + G_BREAKPOINT (); + else +- abort (); ++ g_abort (); + #endif + } + +diff -Naur glib-2.46.0-orig/glib/giowin32.c glib-2.46.0/glib/giowin32.c +--- glib-2.46.0-orig/glib/giowin32.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/giowin32.c 2015-09-22 09:08:59.357921600 +0300 +@@ -798,7 +798,7 @@ + + default: + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + if (channel->debug) + g_print ("\n"); +@@ -945,7 +945,7 @@ + + default: + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + } + +@@ -1010,7 +1010,7 @@ + + default: + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + if (channel->debug) + g_print ("\n"); +@@ -1295,7 +1295,7 @@ + default: + whence = -1; /* Keep the compiler quiet */ + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + + tmp_offset = offset; +@@ -1690,7 +1690,7 @@ + break; + default: + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + + /* always open 'untranslated' */ +@@ -1736,7 +1736,7 @@ + break; + default: + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + + return channel; +@@ -2225,7 +2225,7 @@ + + default: + g_assert_not_reached (); +- abort (); ++ g_abort (); + } + + fd->events = condition; +diff -Naur glib-2.46.0-orig/glib/gmessages.c glib-2.46.0/glib/gmessages.c +--- glib/glib/gmessages.c 2015-09-21 06:33:23.000000000 +0300 ++++ glib/glib/gmessages.c 2015-09-22 09:08:59.373519900 +0300 +@@ -252,7 +252,7 @@ + if (exit_on_fatal) + _exit (1); + else +- abort (); ++ g_abort (); + } + + #ifdef G_OS_WIN32 +@@ -983,12 +983,12 @@ + if (IsDebuggerPresent () && !(test_level & G_LOG_FLAG_RECURSION)) + G_BREAKPOINT (); + else +- abort (); ++ g_abort (); + #else + if (!(test_level & G_LOG_FLAG_RECURSION)) + G_BREAKPOINT (); + else +- abort (); ++ g_abort (); + #endif /* !G_OS_WIN32 */ + } + +diff -Naur glib-2.46.0-orig/glib/gslice.c glib-2.46.0/glib/gslice.c +--- glib-2.46.0-orig/glib/gslice.c 2015-09-08 20:40:27.000000000 +0300 ++++ glib-2.46.0/glib/gslice.c 2015-09-22 09:08:59.404716500 +0300 +@@ -1082,7 +1082,7 @@ + return; + if (G_UNLIKELY (allocator->config.debug_blocks) && + !smc_notify_free (mem_block, mem_size)) +- abort(); ++ g_abort(); + if (G_LIKELY (acat == 1)) /* allocate through magazine layer */ + { + ThreadMemory *tmem = thread_memory_from_self(); +@@ -1165,7 +1165,7 @@ + slice = *(gpointer*) (current + next_offset); + if (G_UNLIKELY (allocator->config.debug_blocks) && + !smc_notify_free (current, mem_size)) +- abort(); ++ g_abort(); + if (G_UNLIKELY (thread_memory_magazine2_is_full (tmem, ix))) + { + thread_memory_swap_magazines (tmem, ix); +@@ -1186,7 +1186,7 @@ + slice = *(gpointer*) (current + next_offset); + if (G_UNLIKELY (allocator->config.debug_blocks) && + !smc_notify_free (current, mem_size)) +- abort(); ++ g_abort(); + if (G_UNLIKELY (g_mem_gc_friendly)) + memset (current, 0, chunk_size); + slab_allocator_free_chunk (chunk_size, current); +@@ -1200,7 +1200,7 @@ + slice = *(gpointer*) (current + next_offset); + if (G_UNLIKELY (allocator->config.debug_blocks) && + !smc_notify_free (current, mem_size)) +- abort(); ++ g_abort(); + if (G_UNLIKELY (g_mem_gc_friendly)) + memset (current, 0, mem_size); + g_free (current); +@@ -1436,7 +1436,7 @@ + vfprintf (stderr, format, args); + va_end (args); + fputs ("\n", stderr); +- abort(); ++ g_abort(); + _exit (1); + } + +diff -Naur glib-2.46.0-orig/glib/gtestutils.c glib-2.46.0/glib/gtestutils.c +--- glib-2.46.0-orig/glib/gtestutils.c 2015-09-01 06:34:13.000000000 +0300 ++++ glib-2.46.0/glib/gtestutils.c 2015-09-22 09:08:59.576297800 +0300 +@@ -751,7 +751,7 @@ + { + if (test_tap_log) + g_print ("Bail out!\n"); +- abort(); ++ g_abort(); + } + break; + case G_TEST_LOG_MIN_RESULT: +@@ -2292,7 +2292,7 @@ + s = g_strconcat ("assertion failed: (", expr, ")", NULL); + g_assertion_message (domain, file, line, func, s); + g_free (s); +- abort (); ++ g_abort(); + } + + void +diff -Naur glib-2.46.0-orig/glib/gthread-posix.c glib-2.46.0/glib/gthread-posix.c +--- glib-2.46.0-orig/glib/gthread-posix.c 2015-08-19 06:35:30.000000000 +0300 ++++ glib-2.46.0/glib/gthread-posix.c 2015-09-22 09:08:59.560699500 +0300 +@@ -46,6 +46,7 @@ + #include "gslice.h" + #include "gmessages.h" + #include "gstrfuncs.h" ++#include "gutils.h" + + #include + #include +@@ -77,7 +78,7 @@ + { + fprintf (stderr, "GLib (gthread-posix.c): Unexpected error from C library during '%s': %s. Aborting.\n", + function, strerror (status)); +- abort (); ++ g_abort (); + } + + /* {{{1 GMutex */ +diff -Naur glib-2.46.0-orig/glib/gthread-win32.c glib-2.46.0/glib/gthread-win32.c +--- glib-2.46.0-orig/glib/gthread-win32.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gthread-win32.c 2015-09-22 09:08:59.467109700 +0300 +@@ -58,7 +58,7 @@ + { + fprintf (stderr, "GLib (gthread-win32.c): Unexpected error from C library during '%s': %s. Aborting.\n", + strerror (status), function); +- abort (); ++ g_abort (); + } + + /* Starting with Vista and Windows 2008, we have access to the +diff -Naur glib-2.46.0-orig/glib/gutils.c glib-2.46.0/glib/gutils.c +--- glib-2.46.0-orig/glib/gutils.c 2015-08-28 21:15:54.000000000 +0300 ++++ glib-2.46.0/glib/gutils.c 2015-09-22 09:08:59.498306300 +0300 +@@ -2375,3 +2375,15 @@ + return FALSE; + #endif + } ++ ++/* Crashes the program. */ ++void ++g_abort (void) ++{ ++#ifdef G_OS_WIN32 ++ DebugBreak (); ++ ExitProcess (127); ++#else ++ abort (); ++#endif ++} +diff -Naur glib-2.46.0-orig/glib/gutils.h glib-2.46.0/glib/gutils.h +--- glib-2.46.0-orig/glib/gutils.h 2015-08-21 03:20:48.000000000 +0300 ++++ glib-2.46.0/glib/gutils.h 2015-09-22 09:08:59.529502900 +0300 +@@ -228,6 +228,9 @@ + GLIB_DEPRECATED_FOR(g_format_size) + gchar *g_format_size_for_display (goffset size); + ++GLIB_AVAILABLE_IN_2_30 ++void g_abort (void); ++ + #ifndef G_DISABLE_DEPRECATED + /** + * GVoidFunc: diff --git a/mingw-w64-pkg-config/1005-glib-send-log-messages-to-correct-stdout-and-stderr.patch b/mingw-w64-pkg-config/1005-glib-send-log-messages-to-correct-stdout-and-stderr.patch new file mode 100644 index 0000000000..6731f9ff61 --- /dev/null +++ b/mingw-w64-pkg-config/1005-glib-send-log-messages-to-correct-stdout-and-stderr.patch @@ -0,0 +1,12 @@ +diff -Naur glib-2.46.0-orig/glib/gmessages.c glib-2.46.0/glib/gmessages.c +--- glib-2.46.0-orig/glib/gmessages.c 2015-09-22 09:09:00.356212800 +0300 ++++ glib-2.46.0/glib/gmessages.c 2015-09-22 09:09:01.292110800 +0300 +@@ -932,7 +932,7 @@ + if ((log_level & G_LOG_FLAG_FATAL) != 0 && !g_test_initialized ()) + win32_keep_fatal_message = TRUE; + #endif +- return to_stdout ? 1 : 2; ++ return to_stdout ? fileno(stdout) : fileno(stderr); + } + + typedef struct { diff --git a/mingw-w64-pkg-config/1017-glib-use-gnu-print-scanf.patch b/mingw-w64-pkg-config/1017-glib-use-gnu-print-scanf.patch new file mode 100644 index 0000000000..5e4a3a3c5a --- /dev/null +++ b/mingw-w64-pkg-config/1017-glib-use-gnu-print-scanf.patch @@ -0,0 +1,85 @@ +diff -Naur glib-2.46.0-orig/configure.ac glib-2.46.0/configure.ac +--- glib-2.46.0-orig/configure.ac 2015-09-21 15:38:33.000000000 +0300 ++++ glib-2.46.0/configure.ac 2015-09-22 09:09:02.118820700 +0300 +@@ -567,7 +567,7 @@ + ]) + fi + +-AS_IF([test x$glib_native_win32 != xyes && test x$ac_cv_sizeof_long_long = x8], [ ++AS_IF([test x$ac_cv_sizeof_long_long = x8], [ + # long long is a 64 bit integer. + AC_MSG_CHECKING(for format to printf and scanf a guint64) + AC_CACHE_VAL(glib_cv_long_long_format,[ +@@ -589,8 +589,8 @@ + AS_IF([ test -n "$glib_cv_long_long_format"], [ + AC_MSG_RESULT(%${glib_cv_long_long_format}u) + AC_DEFINE(HAVE_LONG_LONG_FORMAT,1,[define if system printf can print long long]) +- if test x"$glib_cv_long_long_format" = xI64; then +- AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format I64]) ++ if test x"$glib_cv_long_long_format" = xll; then ++ AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format ll]) + fi + ], [AC_MSG_RESULT(none)]) + ],[ test x$ac_cv_sizeof___int64 = x8], [ +@@ -3177,8 +3177,8 @@ + glib_msize_type='LONG' + ;; + "long long"|__int64) +- gsize_modifier='"I64"' +- gsize_format='"I64u"' ++ gsize_modifier='"z"' ++ gsize_format='"zu"' + glib_msize_type='INT64' + ;; + esac +@@ -3200,8 +3200,8 @@ + glib_mssize_type='LONG' + ;; + "long long"|__int64) +- gssize_modifier='"I64"' +- gssize_format='"I64i"' ++ gssize_modifier='"z"' ++ gssize_format='"zi"' + glib_mssize_type='INT64' + ;; + esac +@@ -3230,9 +3230,9 @@ + ;; + $ac_cv_sizeof_long_long) + glib_intptr_type_define='long long' +- gintptr_modifier='"I64"' +- gintptr_format='"I64i"' +- guintptr_format='"I64u"' ++ gintptr_modifier='"ll"' ++ gintptr_format='"lli"' ++ guintptr_format='"llu"' + glib_gpi_cast='(gint64)' + glib_gpui_cast='(guint64)' + ;; +diff -Naur glib-2.46.0-orig/glib/gmacros.h glib-2.46.0/glib/gmacros.h +--- glib-2.46.0-orig/glib/gmacros.h 2015-08-19 06:35:30.000000000 +0300 ++++ glib-2.46.0/glib/gmacros.h 2015-09-22 09:09:02.118820700 +0300 +@@ -79,9 +79,9 @@ + + #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) + #define G_GNUC_PRINTF( format_idx, arg_idx ) \ +- __attribute__((__format__ (__printf__, format_idx, arg_idx))) ++ __attribute__((__format__ (gnu_printf, format_idx, arg_idx))) + #define G_GNUC_SCANF( format_idx, arg_idx ) \ +- __attribute__((__format__ (__scanf__, format_idx, arg_idx))) ++ __attribute__((__format__ (gnu_scanf, format_idx, arg_idx))) + #define G_GNUC_FORMAT( arg_idx ) \ + __attribute__((__format_arg__ (arg_idx))) + #define G_GNUC_NORETURN \ +diff -Naur glib-2.46.0-orig/glib/gpoll.h glib-2.46.0/glib/gpoll.h +--- glib-2.46.0-orig/glib/gpoll.h 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gpoll.h 2015-09-22 09:09:02.118820700 +0300 +@@ -108,7 +108,7 @@ + */ + #ifdef G_OS_WIN32 + #if GLIB_SIZEOF_VOID_P == 8 +-#define G_POLLFD_FORMAT "%#I64x" ++#define G_POLLFD_FORMAT "%#llx" + #else + #define G_POLLFD_FORMAT "%#x" + #endif diff --git a/mingw-w64-pkg-config/1024-return-actually-written-data-in-printf.all.patch b/mingw-w64-pkg-config/1024-return-actually-written-data-in-printf.all.patch new file mode 100644 index 0000000000..478b2be211 --- /dev/null +++ b/mingw-w64-pkg-config/1024-return-actually-written-data-in-printf.all.patch @@ -0,0 +1,23 @@ +diff -Naur glib-2.46.0-orig/glib/gnulib/printf.c glib-2.46.0/glib/gnulib/printf.c +--- glib-2.46.0-orig/glib/gnulib/printf.c 2014-12-20 00:49:48.000000000 +0300 ++++ glib-2.46.0/glib/gnulib/printf.c 2015-09-22 09:09:03.834633700 +0300 +@@ -88,16 +88,16 @@ + int _g_gnulib_vfprintf (FILE *file, char const *format, va_list args) + { + char *result; +- size_t length; ++ size_t length, rlength; + + result = vasnprintf (NULL, &length, format, args); + if (result == NULL) + return -1; + +- fwrite (result, 1, length, file); ++ rlength = fwrite (result, 1, length, file); + free (result); + +- return length; ++ return rlength; + } + + int _g_gnulib_vsprintf (char *string, char const *format, va_list args) diff --git a/mingw-w64-glib2/0015-fix-stat.all.patch b/mingw-w64-pkg-config/1030-fix-stat.all.patch similarity index 100% rename from mingw-w64-glib2/0015-fix-stat.all.patch rename to mingw-w64-pkg-config/1030-fix-stat.all.patch diff --git a/mingw-w64-pkg-config/PKGBUILD b/mingw-w64-pkg-config/PKGBUILD index 5b328ba3ce..4ef885b675 100644 --- a/mingw-w64-pkg-config/PKGBUILD +++ b/mingw-w64-pkg-config/PKGBUILD @@ -1,59 +1,58 @@ # Maintainer: Alexey Pavlov _realname=pkg-config +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.28 -pkgrel=2 +pkgver=0.29 +pkgrel=1 pkgdesc="A system for managing library compile/link flags (mingw-w64)" arch=('any') url="http://pkgconfig.freedesktop.org/wiki/" license=('GPL') -depends=("${MINGW_PACKAGE_PREFIX}-glib2") +depends=("${MINGW_PACKAGE_PREFIX}-libwinpthread") conflicts=("${MINGW_PACKAGE_PREFIX}-pkgconf") replaces=("${MINGW_PACKAGE_PREFIX}-pkgconf") +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") source=(http://pkgconfig.freedesktop.org/releases/${_realname}-${pkgver}.tar.gz - 0002-check-for-host.mingw.patch - 0003-flush.mingw.patch - 0004-expected-path-for.mingw.patch - 0005-mangle.mingw.patch - 0006-path-for-tests.mingw.patch - 0007-sub-path-for-tests.mingw.patch - 0008-check-for-wine.mingw.patch - 0009-use-wine-if-present.mingw.patch 0010-expand-paths.mingw.patch 0011-platform-dependent-separator-and-adjustable-prefix.mingw.patch - 0099-no-prefix-on.mingw.patch) -md5sums=('aa3c86e67551adc3ac865160e34a2a0d' - 'd4cf66f456cc80466c553ccd96c0c0a1' - '986d72727b4899a18106bd581f2cce34' - '0620261f077b3c0dc1622ff3a6e3b87d' - 'f2332f2111ea6fc6c096249ccad297b1' - '8c3fafdb507b0f01bfb2f13dd7747752' - '58b709c3d9bc6285b9496ee449084b02' - '079c1a68d297a8062fe620c302b9781f' - '432aaf4ccaf70b093bc90cabd8c995e0' - '43deff1cc78f45f7e3d6b9fee96de0e3' + 1001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch + 1003-g_abort.all.patch + 1005-glib-send-log-messages-to-correct-stdout-and-stderr.patch + 1017-glib-use-gnu-print-scanf.patch + 1024-return-actually-written-data-in-printf.all.patch + 1030-fix-stat.all.patch) +md5sums=('77f27dce7ef88d0634d0d6f90e03a77f' + 'cb65caa60584d471aa6f76b181790ee1' 'd6b6acdb90f93c35378f53e34e7cd6fa' - 'd61554e8456fa9f67fbf90c8219dd2bf') + '10cf1e482b6a1367d79648466f2cf23c' + '629431fe82711812531f6367205783e8' + '80fb538441701d2dd3ab8bcb13baf90c' + '22105e191551caf9d94d9f637f05ed77' + '3f896edd80eaa9c4e98abca0df6c83bd' + '963a72f6efcaa3405204b76b27b44645') prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0002-check-for-host.mingw.patch - patch -p1 -i ${srcdir}/0003-flush.mingw.patch - patch -p1 -i ${srcdir}/0004-expected-path-for.mingw.patch - patch -p1 -i ${srcdir}/0005-mangle.mingw.patch - patch -p1 -i ${srcdir}/0006-path-for-tests.mingw.patch - patch -p1 -i ${srcdir}/0007-sub-path-for-tests.mingw.patch - patch -p1 -i ${srcdir}/0008-check-for-wine.mingw.patch - patch -p1 -i ${srcdir}/0009-use-wine-if-present.mingw.patch patch -p1 -i ${srcdir}/0010-expand-paths.mingw.patch patch -p1 -i ${srcdir}/0011-platform-dependent-separator-and-adjustable-prefix.mingw.patch - #patch -p1 -i ${srcdir}/0099-no-prefix-on.mingw.patch + + cd glib + + patch -Np1 -i "${srcdir}/1001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch" + patch -Np1 -i "${srcdir}/1003-g_abort.all.patch" + patch -Np1 -i "${srcdir}/1005-glib-send-log-messages-to-correct-stdout-and-stderr.patch" + patch -Np1 -i "${srcdir}/1017-glib-use-gnu-print-scanf.patch" + patch -Np1 -i "${srcdir}/1024-return-actually-written-data-in-printf.all.patch" + patch -Np1 -i "${srcdir}/1030-fix-stat.all.patch" + + cd .. + autoreconf -fi } build() { - [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ @@ -62,7 +61,9 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --with-internal-glib \ - --disable-indirect-deps + --disable-indirect-deps \ + --with-default-prefix-for-default-paths=${MINGW_PREFIX} + make } diff --git a/mingw-w64-pkgconf/0002-relocate.patch b/mingw-w64-pkgconf/0002-relocate.patch index fdf486c332..2872f52b4e 100644 --- a/mingw-w64-pkgconf/0002-relocate.patch +++ b/mingw-w64-pkgconf/0002-relocate.patch @@ -2,7 +2,7 @@ diff -Naur pkgconf-0.9.7-orig/configure.ac pkgconf-0.9.7/configure.ac --- pkgconf-0.9.7-orig/configure.ac 2014-06-08 00:32:08.000000000 +0400 +++ pkgconf-0.9.7/configure.ac 2014-08-08 14:31:00.604400000 +0400 @@ -15,6 +15,7 @@ - AC_INIT([pkgconf], [0.9.7], [http://github.com/pkgconf/pkgconf/issues]) + AC_INIT([pkgconf], [0.9.11], [http://github.com/pkgconf/pkgconf/issues]) AC_CONFIG_SRCDIR([pkg.c]) AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) diff --git a/mingw-w64-pkgconf/PKGBUILD b/mingw-w64-pkgconf/PKGBUILD index c28db9f7f0..4be19bf032 100644 --- a/mingw-w64-pkgconf/PKGBUILD +++ b/mingw-w64-pkgconf/PKGBUILD @@ -2,7 +2,7 @@ _realname=pkgconf pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.9.7 +pkgver=0.9.11 pkgrel=2 pkgdesc='pkg-config compatible utility which does not depend on glib' url='https://github.com/nenolod/pkgconf' @@ -14,13 +14,13 @@ conflicts=("${MINGW_PACKAGE_PREFIX}-pkg-config") provides=("${MINGW_PACKAGE_PREFIX}-pkg-config") source=(http://rabbit.dereferenced.org/~nenolod/distfiles//$_realname-$pkgver.tar.bz2 0002-relocate.patch) -sha256sums=('afd2675d3cf39741906ab08e86421381271d67122a8a401d3a0fe59ad46af493' - 'f8579642f97be9a5a04714dfe979081b698045d01dd4035b96e8266120d74a50') +sha256sums=('3bdae1b2672133943dc0dda694ed57074f8b03c3fea10efb215d76d3cabe2c3b' + 'b208aa88b3ab7be8425819f83ccf2ec1d3befc35b9e7b3de3a686d0e6812c0c8') prepare() { cd $_realname-$pkgver patch -p1 -i ${srcdir}/0002-relocate.patch - + autoreconf -vfi } diff --git a/mingw-w64-plplot/PKGBUILD b/mingw-w64-plplot/PKGBUILD index 76569b2f59..8ca177d5b9 100644 --- a/mingw-w64-plplot/PKGBUILD +++ b/mingw-w64-plplot/PKGBUILD @@ -2,32 +2,31 @@ # Contributor: Jürgen Pfeifer _realname=plplot - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.10.0 -pkgrel=1 +pkgver=5.11.0 +pkgrel=2 arch=('any') pkgdesc="Scientific plotting software (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gcc-fortran" - "${MINGW_PACKAGE_PREFIX}-gcc-ada" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-tk" - "${MINGW_PACKAGE_PREFIX}-wxWidgets" - "${MINGW_PACKAGE_PREFIX}-lua" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-qhull") -makedepends=("subversion" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-gcc-fortran" - "${MINGW_PACKAGE_PREFIX}-gcc-ada") + "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-qhull" + "${MINGW_PACKAGE_PREFIX}-swig" + "${MINGW_PACKAGE_PREFIX}-tk" + "${MINGW_PACKAGE_PREFIX}-wxWidgets" + ) +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc-fortran" + "${MINGW_PACKAGE_PREFIX}-gcc-ada") options=('strip' 'staticlibs') license=('LGPL') -url="http://svn.code.sf.net/p/plplot" +url="http://plplot.sourceforge.net" source=(http://downloads.sourceforge.net/sourceforge/plplot/${_realname}-${pkgver}.tar.gz - find-gd.patch) -sha1sums=('ea962cb0138c9b4cbf97ecab1fac1919ea0f939f' + find-gd.patch) +sha1sums=('215c60b86ae1381813e5c837ea6afa6d7708127d' '7800cad653ebcedf596a01e545116f6ffd04f0f9') prepare() { @@ -36,51 +35,42 @@ prepare() { } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - # cmake's FindSWIG doesn't work properly on MSYS, # so we provide SWIG here - SWIG_EXECUTABLE_U=`type -p swig` - SWIG_EXECUTABLE=`cygpath -m ${SWIG_EXECUTABLE_U}`.exe - SWIG_DIR_U=`${SWIG_EXECUTABLE_U} -swiglib` - SWIG_DIR=`cygpath -m $SWIG_DIR_U` + SWIG_DIR_U=`${MINGW_PREFIX}/bin/swig -swiglib` + SWIG_DIR=`cygpath -m ${SWIG_DIR_U}` # cmake may be confused if there is a Windows installation # of the official Python MSI. Please do the Python-enabled # build only, if no official Python is installed. - cd "$srcdir" - mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G "MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ - -DCMAKE_Fortran_COMPILER:PATH=${MINGW_PREFIX}/bin/gfortran.exe \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_Fortran_COMPILER=${MINGW_PREFIX}/bin/gfortran.exe \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING=OFF \ -DSWIG_EXECUTABLE="${SWIG_EXECUTABLE}" \ -DSWIG_DIR="${SWIG_DIR}" \ - -DQHULL_INCLUDE_DIR=${PREFIX_DEPS}/include \ - -DGD_INCLUDE_DIR=${PREFIX_DEPS}/include \ + -DQHULL_INCLUDE_DIR=${MINGW_PREFIX}/include \ + -DGD_INCLUDE_DIR=${MINGW_PREFIX}/include \ -DENABLE_lua=ON \ -DENABLE_python=ON \ ../${_realname}-${pkgver} + make V=1 } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make install # DESTDIR="$pkgdir" - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname cp -pf ${srcdir}/${_realname}-${pkgver}/Copyright \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} cp -pf ${srcdir}/${_realname}-${pkgver}/COPYING* \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} } diff --git a/mingw-w64-png2ico/PKGBUILD b/mingw-w64-png2ico/PKGBUILD new file mode 100644 index 0000000000..1810e33fb1 --- /dev/null +++ b/mingw-w64-png2ico/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Hannah von Reth + +_realname=png2ico +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver="2002.12.08" +pkgrel=1 +pkgdesc="Converts PNG files to Windows icon resource files (mingw-w64)" +arch=('any') +license=("GPL2") +url="http://www.winterdrache.de/freeware/png2ico/" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=(!strip staticlibs !buildflags) + +source=("${_realname}-${pkgver}.tar.gz"::"http://www.winterdrache.de/freeware/${_realname}/data/${_realname}-src-2002-12-08.tar.gz" + "fix_include.diff") +md5sums=('9b663df81c826cd564638cba2e6bc75b' + '0a46ae79edd14ff3c8ca92b5c2e3dc58') + +prepare() { + cd "${srcdir}/${_realname}" + patch -p1 -i "${srcdir}/fix_include.diff" +} + +build() { + cd ${srcdir}/${_realname} + make # VERBOSE=1 +} + +package() { + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin + cp ${srcdir}/${_realname}/png2ico.exe ${pkgdir}${MINGW_PREFIX}/bin/png2ico.exe +} diff --git a/mingw-w64-png2ico/fix_include.diff b/mingw-w64-png2ico/fix_include.diff new file mode 100644 index 0000000000..9467f6aa4a --- /dev/null +++ b/mingw-w64-png2ico/fix_include.diff @@ -0,0 +1,12 @@ +diff -Nru png2ico-2002.12.08/png2ico/png2ico.cpp src/png2ico/png2ico.cpp +--- png2ico_/png2ico.cpp 2002-12-07 23:37:58.000000000 +0100 ++++ png2ico/png2ico.cpp 2015-11-18 17:51:34.427768900 +0100 +@@ -35,6 +35,8 @@ + #include + #include + #include ++#include ++ + + #if __GNUC__ > 2 + #include diff --git a/mingw-w64-pngcrush/LICENSE b/mingw-w64-pngcrush/LICENSE new file mode 100644 index 0000000000..3412dd04ed --- /dev/null +++ b/mingw-w64-pngcrush/LICENSE @@ -0,0 +1,42 @@ + +NOTICES + +If you have modified this source, you may insert additional notices +immediately after this sentence. + +COPYRIGHT: + +Copyright (C) 1998-2002,2006-2009 Glenn Randers-Pehrson + (glennrp at users.sf.net) +Copyright (C) 2005 Greg Roelofs + +DISCLAIMERS: + +The pngcrush computer program is supplied "AS IS". The Author disclaims all +warranties, expressed or implied, including, without limitation, the +warranties of merchantability and of fitness for any purpose. The +Author assumes no liability for direct, indirect, incidental, special, +exemplary, or consequential damages, which may result from the use of +the computer program, even if advised of the possibility of such damage. +There is no warranty against interference with your enjoyment of the +computer program or against infringement. There is no warranty that my +efforts or the computer program will fulfill any of your particular purposes +or needs. This computer program is provided with all faults, and the entire +risk of satisfactory quality, performance, accuracy, and effort is with +the user. + +LICENSE: + +Permission is hereby irrevocably granted to everyone to use, copy, modify, +and distribute this source code, or portions hereof, or executable programs +compiled from it, for any purpose, without payment of any fee, subject to +the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not be + misrepresented as being the original source. + +3. This Copyright notice, disclaimer, and license may not be removed + or altered from any source or altered source distribution. + diff --git a/mingw-w64-pngcrush/PKGBUILD b/mingw-w64-pngcrush/PKGBUILD index 7b8d3697da..2ee5236f31 100644 --- a/mingw-w64-pngcrush/PKGBUILD +++ b/mingw-w64-pngcrush/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Nicolas Frattaroli _realname=pngcrush +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.7.77 +pkgver=1.7.88 pkgrel=1 pkgdesc="A tool for optimizing the compression of PNG files (mingw-w64)" arch=('any') @@ -10,19 +11,23 @@ url="http://pmt.sourceforge.net/pngcrush" license=('custom') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-zlib") -source=("http://downloads.sourceforge.net/pmt/$_realname-$pkgver-nolib.tar.gz") -md5sums=('611c4a22965fe920d75fcc2497d038aa') +source=("http://downloads.sourceforge.net/pmt/${_realname}-${pkgver}-nolib.tar.gz" + LICENSE) +md5sums=('b181ca7cafa96f73c2c077cb83fa185d' + 'e6446a786d939c98fcada57f9ae6de1f') prepare() { - cd "${srcdir}/${_realname}-${pkgver}-nolib" + mv "${srcdir}/${_realname}-${pkgver}-nolib" "${srcdir}/${_realname}-build-${MINGW_CHOST}" } build() { - cd "${srcdir}/${_realname}-${pkgver}-nolib" + cd "${srcdir}/${_realname}-build-${MINGW_CHOST}" CFLAGS+=" -DPNGCRUSH_COUNT_COLORS" make } package() { - install -Dm755 ${srcdir}/${_realname}-${pkgver}-nolib/${_realname} \ - ${pkgdir}${MINGW_PREFIX}/bin/${_realname} + install -Dm755 ${srcdir}/${_realname}-build-${MINGW_CHOST}/${_realname} \ + "${pkgdir}"${MINGW_PREFIX}/bin/${_realname} + install -Dm644 LICENSE \ + "$pkgdir"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-pngnq/PKGBUILD b/mingw-w64-pngnq/PKGBUILD index 570b0c1b3b..ac11d2e438 100644 --- a/mingw-w64-pngnq/PKGBUILD +++ b/mingw-w64-pngnq/PKGBUILD @@ -2,11 +2,10 @@ # Contributor: Nicolas Frattaroli _realname=pngnq - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.1 -pkgrel=1 -pkgdesc="Pngnq is a tool for quantizing PNG images in RGBA format" +pkgrel=2 +pkgdesc="Pngnq is a tool for quantizing PNG images in RGBA format (mingw-w64)" url="http://pngnq.sourceforge.net/" license=("BSD") arch=("any") @@ -24,20 +23,21 @@ prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -p0 -i "${srcdir}/no-syslog.patch" patch -p1 -i "${srcdir}/configure-mistake.patch" - + autoreconf -fi } build() { cd "${srcdir}/${_realname}-${pkgver}" - + sed "35i#include " -i src/rwpng.c - + # The LIBS line fixes some build script weirdness where it only passes the zlib # link command to gcc in the right order, but not the libpng one. - LIBS="`libpng-config --ldflags` -lz" ./configure \ + LIBS="`libpng-config --ldflags` -lz" \ + ./configure \ --prefix=${MINGW_PREFIX} \ - --mandir="${pkgdir}${MINGW_PREFIX}/share/man" + --mandir="${pkgdir}${MINGW_PREFIX}/share/man" make } diff --git a/mingw-w64-poco/007-MinGW-doesnt-implement-wide-character-startup-module.patch b/mingw-w64-poco/007-MinGW-doesnt-implement-wide-character-startup-module.patch index aacc5e9c64..047bb2f342 100644 --- a/mingw-w64-poco/007-MinGW-doesnt-implement-wide-character-startup-module.patch +++ b/mingw-w64-poco/007-MinGW-doesnt-implement-wide-character-startup-module.patch @@ -18,7 +18,7 @@ index 9078092..dcca468 100644 // Macro to implement main() // -#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING) -+#if (defined(_WIN32) || defined(_WIN64)) && defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING) && !defined(MINGW32) ++#if (defined(_WIN32) || defined(_WIN64)) && defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING) && !defined(__MINGW32__) #define POCO_APP_MAIN(App) \ int wmain(int argc, wchar_t** argv) \ { \ @@ -31,7 +31,7 @@ index 1b9bf82..6b94dc0 100644 // Macro to implement main() // -#if defined(_WIN32) && defined(POCO_WIN32_UTF8) -+#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(MINGW32) ++#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(__MINGW32__) #define POCO_SERVER_MAIN(App) \ int wmain(int argc, wchar_t** argv) \ { \ diff --git a/mingw-w64-poco/008-Add-Mingw32-W64-configuration.patch b/mingw-w64-poco/008-Add-Mingw32-W64-configuration.patch index baad4f0434..34019b7854 100644 --- a/mingw-w64-poco/008-Add-Mingw32-W64-configuration.patch +++ b/mingw-w64-poco/008-Add-Mingw32-W64-configuration.patch @@ -82,7 +82,7 @@ index 0000000..95662df +# +# System Specific Flags +# -+SYSFLAGS = -Wall -m64 -D_WIN64 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DPOCO_STATIC ++SYSFLAGS = -Wall -m64 -D_WIN64 -DWINVER=0x501 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DPOCO_STATIC +# -DFoundation_Config_INCLUDED +# +# System Specific Libraries diff --git a/mingw-w64-poco/011-cmake-mingw.patch b/mingw-w64-poco/011-cmake-mingw.patch index 9bdd42e1f8..2724c3773b 100644 --- a/mingw-w64-poco/011-cmake-mingw.patch +++ b/mingw-w64-poco/011-cmake-mingw.patch @@ -3,14 +3,14 @@ @@ -151,9 +151,7 @@ if (CMAKE_COMPILER_IS_MINGW) - add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8) -- add_definitions(-mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) + add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8) +- add_definitions(-mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) - link_directories(/usr/local/lib /usr/lib) - include_directories(/usr/local/include /usr/include) -+ add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) ++ add_definitions(-D_WIN32 -DWINVER=0x501 -DPOCO_NO_FPENVIRONMENT -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE) endif (CMAKE_COMPILER_IS_MINGW) - if (CMAKE_COMPILER_IS_CYGWIN) + if (CYGWIN) --- poco-poco-1.5.4-release/cmake/PocoMacros.cmake.orig 2014-11-17 12:31:47.705800000 +0300 +++ poco-poco-1.5.4-release/cmake/PocoMacros.cmake 2014-11-17 12:32:39.209200000 +0300 @@ -24,8 +24,13 @@ diff --git a/mingw-w64-poco/012-find-mysql.patch b/mingw-w64-poco/012-find-mysql.patch new file mode 100644 index 0000000000..3d55a3821c --- /dev/null +++ b/mingw-w64-poco/012-find-mysql.patch @@ -0,0 +1,36 @@ +--- poco-poco-1.6.0-release/cmake/FindMySQL.cmake.orig 2015-03-02 09:27:14.895200000 +0300 ++++ poco-poco-1.6.0-release/cmake/FindMySQL.cmake 2015-03-02 09:33:06.774600000 +0300 +@@ -1,14 +1,14 @@ + find_path(MYSQL_INCLUDE_DIR mysql.h +- /usr/include/mysql +- /usr/local/include/mysql +- /opt/mysql/mysql/include +- /opt/mysql/mysql/include/mysql +- /usr/local/mysql/include +- /usr/local/mysql/include/mysql +- $ENV{MYSQL_INCLUDE_DIR} +- $ENV{MYSQL_DIR}/include +- $ENV{ProgramFiles}/MySQL/*/include +- $ENV{SystemDrive}/MySQL/*/include) ++ /usr ++ /usr/local ++ /opt/mysql/mysql ++ /usr/local/mysql ++ $ENV{MYSQL_INCLUDE_DIR} ++ $ENV{MYSQL_DIR}/include ++ $ENV{ProgramFiles}/MySQL/*/include ++ $ENV{SystemDrive}/MySQL/*/include ++ PATH_SUFFIXES ++ include include/mysql include/mariadb) + + if (WIN32) + if (CMAKE_BUILD_TYPE STREQUAL Debug) +@@ -20,7 +20,7 @@ + add_definitions(-DDBUG_OFF) + endif (CMAKE_BUILD_TYPE STREQUAL Debug) + +- find_library(MYSQL_LIB NAMES mysqlclient ++ find_library(MYSQL_LIB NAMES mysqlclient mariadbclient + PATHS + $ENV{MYSQL_DIR}/lib/${libsuffixDist} + $ENV{MYSQL_DIR}/libmysql/${libsuffixBuild} diff --git a/mingw-w64-poco/013-POCO_WIN32_UTF8-redefinition.patch b/mingw-w64-poco/013-POCO_WIN32_UTF8-redefinition.patch new file mode 100644 index 0000000000..c79b7f09ba --- /dev/null +++ b/mingw-w64-poco/013-POCO_WIN32_UTF8-redefinition.patch @@ -0,0 +1,11 @@ +--- poco-poco-1.6.0-release/Foundation/include/Poco/Config.h.orig 2015-03-02 09:52:02.328400000 +0300 ++++ poco-poco-1.6.0-release/Foundation/include/Poco/Config.h 2015-03-02 09:53:15.274000000 +0300 +@@ -23,7 +23,7 @@ + // Define to enable Windows Unicode (UTF-8) support + // NOTE: As of POCO C++ Libraries release 1.6.0, compiling POCO + // without POCO_WIN32_UTF8 defined on Windows is deprecated. +-#define POCO_WIN32_UTF8 ++// #define POCO_WIN32_UTF8 + + + // Define to enable C++11 support diff --git a/mingw-w64-poco/PKGBUILD b/mingw-w64-poco/PKGBUILD index 2e596e0d62..007df6691e 100644 --- a/mingw-w64-poco/PKGBUILD +++ b/mingw-w64-poco/PKGBUILD @@ -2,8 +2,8 @@ _realname=poco pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.5.4 -pkgrel=1 +pkgver=1.6.0 +pkgrel=2 pkgdesc="POrtable COmponents C++ Libraries (mingw-w64)" arch=('any') url="http://pocoproject.org" @@ -11,12 +11,13 @@ license=("boost") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-pcre" "${MINGW_PACKAGE_PREFIX}-sqlite3" "${MINGW_PACKAGE_PREFIX}-zlib") options=('staticlibs' 'strip') -source=(https://github.com/pocoproject/poco/archive/${_realname}-${pkgver}-release.tar.gz +source=(http://pocoproject.org/releases/${_realname}-${pkgver}/${_realname}-${pkgver}-all.tar.gz 001-WIN32-defines-instead-hardcoded-values.patch 002-enable-C++11-if-compiler-supports-it.patch 003-check-for-WIN64-and-enable-LLP64-schema.patch @@ -28,23 +29,27 @@ source=(https://github.com/pocoproject/poco/archive/${_realname}-${pkgver}-relea 009-Fix-compilation-on-WIN64-target.patch 010-remove-warnings.patch 011-cmake-mingw.patch + 012-find-mysql.patch + 013-POCO_WIN32_UTF8-redefinition.patch 100-fix-mingw-config.patch) -md5sums=('cf045f4f64d2d439294686ff7dcc6fd6' +md5sums=('4fed893d4ca57db98b0e10d82545232a' 'dc6b7d75f579fa97b28ab6c07e62517e' 'd57c5432708b13f5d1ccbd5c67a49996' '3b5dd43a3d6be5f6d2612d4f850d3b63' '221473673ab508c5ada2725e4a1fe466' '5be1be3d1e5b8b72c7efdc09aa1ceff7' 'f5847e1ff54fba6ff87eb3620a8ed717' - '07a7c3fa639ad38cb0b005825255b5db' - 'edf178d3fb8c02c1a7da81ce89a193fd' + '6a821451f0ae40db2801becce3c67bdf' + 'c5fa0bacfade712a5c5cf706f3c99ee4' 'f3aa357f69168abb2919ddb912664c1e' 'cb90582b6bbae7b1231ad5cdd290eeb0' - '9ab977d32e32d0e0306486508ae6b8f1' + '840e76174514740463379ddb03611523' + '50b56ac82b87697cf03f966c198cb6fd' + '5c8fe24b1fc4a5f9c357eb65b35a49f6' 'cee49c612b14edb3ae57d0e0b9329f3c') prepare() { - cd "${srcdir}"/${_realname}-${_realname}-${pkgver}-release + cd "${srcdir}"/${_realname}-${pkgver}-all patch -p1 -i ${srcdir}/001-WIN32-defines-instead-hardcoded-values.patch patch -p1 -i ${srcdir}/002-enable-C++11-if-compiler-supports-it.patch patch -p1 -i ${srcdir}/003-check-for-WIN64-and-enable-LLP64-schema.patch @@ -56,6 +61,8 @@ prepare() { patch -p1 -i ${srcdir}/009-Fix-compilation-on-WIN64-target.patch patch -p1 -i ${srcdir}/010-remove-warnings.patch patch -p1 -i ${srcdir}/011-cmake-mingw.patch + patch -p1 -i ${srcdir}/012-find-mysql.patch + patch -p1 -i ${srcdir}/013-POCO_WIN32_UTF8-redefinition.patch patch -p1 -i ${srcdir}/100-fix-mingw-config.patch } @@ -65,7 +72,7 @@ build() { i686) _config=MinGW ;; - + x86_64) _config=MinGW32-W64 ;; @@ -74,31 +81,20 @@ build() { CXXFLAGS+=" -std=c++11" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ - -DPOCO_UNBUNDLED=OFF \ + -DPOCO_UNBUNDLED=ON \ -DENABLE_MONGODB=OFF \ - ../${_realname}-${_realname}-${pkgver}-release - - - #"${srcdir}"/${_realname}-${_realname}-${pkgver}-release/configure \ - # --prefix=${MINGW_PREFIX} \ - # --config=${_config} \ - # --shared + ../${_realname}-${pkgver}-all - # --unbundled - # --static make } -check() { - cd "${srcdir}/build-${MINGW_CHOST}" - make check -} - package() { cd "${srcdir}/build-${MINGW_CHOST}" - make #DESTDIR="$pkgdir" install + make destdir=${pkgdir} install } diff --git a/mingw-w64-podofo/PKGBUILD b/mingw-w64-podofo/PKGBUILD new file mode 100644 index 0000000000..eb12ac293c --- /dev/null +++ b/mingw-w64-podofo/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Rémi BERTHO + +_realname=podofo +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.9.3 +pkgrel=1 +pkgdesc="A C++ library to work with the PDF file format (mingw-w64)" +arch=('any') +url="http://podofo.sourceforge.net" +license=('GPL') +depends=("${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-openssl") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-cppunit") +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" + "win.patch" + "test.patch") +md5sums=('268ca111826757ca7e3f5c4be3547e7a' + 'b2bcdeff5734e21e8bd615d17f57744f' + 'd43b9867c6146f817e2a33adc9fba523') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i "${srcdir}/win.patch" + patch -p1 -i "${srcdir}/test.patch" +} + +build() { + rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -Wno-dev \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DFREETYPE_INCLUDE_DIR=${MINGW_PREFIX}/include/freetype2 \ + -DCMAKE_BUILD_TYPE=Release \ + -DPODOFO_BUILD_SHARED=1 \ + -DPODOFO_HAVE_JPEG_LIB=1 \ + -DPODOFO_HAVE_PNG_LIB=1 \ + -DPODOFO_HAVE_TIFF_LIB=1 \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-podofo/test.patch b/mingw-w64-podofo/test.patch new file mode 100644 index 0000000000..9ee40c44bc --- /dev/null +++ b/mingw-w64-podofo/test.patch @@ -0,0 +1,23 @@ +--- podofo-0.9.3/test/unit/EncryptTest.h.orig 2015-10-29 09:23:29.880214600 +0300 ++++ podofo-0.9.3/test/unit/EncryptTest.h 2015-10-29 10:06:57.095159600 +0300 +@@ -83,7 +83,7 @@ + + private: + char* m_pEncBuffer; +- long m_lLen; ++ intptr_t m_lLen; + int m_protection; + + }; +--- podofo-0.9.3/test/unit/EncryptTest.cpp.orig 2015-10-29 09:24:54.483214600 +0300 ++++ podofo-0.9.3/test/unit/EncryptTest.cpp 2015-10-29 10:08:09.945873800 +0300 +@@ -208,7 +208,8 @@ + + // Decrypt buffer + try { +- pEncrypt->Decrypt( pEncryptedBuffer, nOutputLen, pDecryptedBuffer, m_lLen ); ++ intptr_t mlen = m_lLen; ++ pEncrypt->Decrypt( pEncryptedBuffer, nOutputLen, pDecryptedBuffer, mlen ); + } catch (PdfError &e) { + CPPUNIT_FAIL(e.ErrorMessage(e.GetError())); + } diff --git a/mingw-w64-podofo/win.patch b/mingw-w64-podofo/win.patch new file mode 100644 index 0000000000..2c9a69fa75 --- /dev/null +++ b/mingw-w64-podofo/win.patch @@ -0,0 +1,138 @@ +--- podofo-0.9.3/src/CMakeLists.txt.orig 2014-06-15 13:27:21.000000000 +0200 ++++ podofo-0.9.3/src/CMakeLists.txt 2015-10-10 19:24:45.115148986 +0200 +@@ -107,11 +107,6 @@ + doc/PdfXObject.cpp + ) + +-IF(WIN32) +- # If we build for windows systems, we also include the resource file +- SET(PODOFO_DOC_SOURCES ${PODOFO_DOC_SOURCES} doc/podofo-doc.rc) +-ENDIF(WIN32) +- + SET(PODOFO_HEADERS + podofo-base.h + podofo.h) +--- podofo-0.9.3/cmake/modules/FindCppUnit.cmake.orig 2014-06-15 13:27:21.000000000 +0200 ++++ podofo-0.9.3/cmake/modules/FindCppUnit.cmake 2015-10-10 19:24:45.115148986 +0200 +@@ -24,9 +24,9 @@ + SET(CPPUNIT_LIBRARIES) + + IF(CPPUNIT_CONFIG_EXECUTABLE) +- EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_CFLAGS) +- EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_LIBRARIES) +- EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION) ++ EXECUTE_PROCESS(COMMAND sh ${CPPUNIT_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE CPPUNIT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) ++ EXECUTE_PROCESS(COMMAND sh ${CPPUNIT_CONFIG_EXECUTABLE} --libs OUTPUT_VARIABLE CPPUNIT_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE) ++ EXECUTE_PROCESS(COMMAND sh ${CPPUNIT_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + STRING(REGEX REPLACE "-I(.+)" "\\1" CPPUNIT_CFLAGS "${CPPUNIT_CFLAGS}") + ELSE(CPPUNIT_CONFIG_EXECUTABLE) + # in case win32 needs to find it the old way? +@@ -50,7 +50,7 @@ + endif(NOT CppUnit_FIND_QUIETLY) + + IF(CPPUNIT_CONFIG_EXECUTABLE) +- EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION) ++ EXECUTE_PROCESS(COMMAND sh ${CPPUNIT_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + ENDIF(CPPUNIT_CONFIG_EXECUTABLE) + + macro_ensure_version( ${CPPUNIT_MIN_VERSION} ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK ) +--- podofo-0.9.3/cmake/modules/FindLUA.cmake.orig 2015-10-29 09:07:29.384623400 +0300 ++++ podofo-0.9.3/cmake/modules/FindLUA.cmake 2015-10-29 09:08:37.431623400 +0300 +@@ -1,26 +1,73 @@ +-# LUA_FOUND - system has Fontconfig +-# LUA_LIBRARIES - Link these to use LUA +-# LUA_DEFINITIONS - Compiler switches required for using LUA ++# Locate Lua library ++# This module defines ++# LUA_LIBRARIES ++# LUA_FOUND, if false, do not try to link to Lua ++# LUA_INCLUDE_DIR, where to find lua.h + # +-# Based on FindFONTCONFIG.cmake Copyright (c) 2006,2007 Laurent Montel, +-# +-# Redistribution and use is allowed according to the terms of the BSD license. +-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +-# +-# TODO: Update this code to handle debug/release builds on win32. +- +-if (LUA_LIBRARIES AND LUA_INCLUDE_DIR) +- +- # in cache already +- set(LUA_FOUND TRUE) +- +-else (LUA_LIBRARIES AND LUA_INCLUDE_DIR) +- +- FIND_PACKAGE(Lua51) +- +- include(PoDoFoFindPackageHandleStandardArgs) +- FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR ) +- +- mark_as_advanced(LUA_LIBRARIES LUA_INCLUDE_DIR) ++# Note that the expected include convention is ++# #include "lua.h" ++# and not ++# #include ++# This is because, the lua location is not standardized and may exist ++# in locations other than lua/ ++ ++ ++FIND_PATH(LUA_INCLUDE_DIR lua.h ++ PATHS ++ $ENV{LUA_DIR} ++ NO_DEFAULT_PATH ++ PATH_SUFFIXES include/lua include ++) ++ ++FIND_PATH(LUA_INCLUDE_DIR lua.h ++ PATHS ++ ~/Library/Frameworks ++ /Library/Frameworks ++ /usr/local ++ /usr ++ /sw # Fink ++ /opt/local # DarwinPorts ++ /opt/csw # Blastwave ++ /opt ++ PATH_SUFFIXES include/lua include ++) ++ ++FIND_LIBRARY(LUA_LIBRARY ++ NAMES lua ++ PATHS ++ $ENV{LUA_DIR} ++ NO_DEFAULT_PATH ++ PATH_SUFFIXES lib64 lib ++) ++ ++FIND_LIBRARY(LUA_LIBRARY ++ NAMES lua ++ PATHS ++ ~/Library/Frameworks ++ /Library/Frameworks ++ /usr/local ++ /usr ++ /sw ++ /opt/local ++ /opt/csw ++ /opt ++ PATH_SUFFIXES lib64 lib ++) ++ ++IF(LUA_LIBRARY) ++ # include the math library for Unix ++ IF(UNIX AND NOT APPLE) ++ FIND_LIBRARY(LUA_MATH_LIBRARY m) ++ SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries") ++ # For Windows and Mac, don't need to explicitly include the math library ++ ELSE(UNIX AND NOT APPLE) ++ SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries") ++ ENDIF(UNIX AND NOT APPLE) ++ENDIF(LUA_LIBRARY) ++ ++INCLUDE(PoDoFoFindPackageHandleStandardArgs) ++# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if ++# all listed variables are TRUE ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR) + +-endif (LUA_LIBRARIES AND LUA_INCLUDE_DIR) ++MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY) diff --git a/mingw-w64-poppler-data/PKGBUILD b/mingw-w64-poppler-data/PKGBUILD index 76e52b27d9..f6fe05d1a1 100644 --- a/mingw-w64-poppler-data/PKGBUILD +++ b/mingw-w64-poppler-data/PKGBUILD @@ -3,7 +3,7 @@ _realname=poppler-data pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.4.7 -pkgrel=1 +pkgrel=2 pkgdesc="Encoding data for the poppler PDF rendering library" arch=('any') license=('custom' 'GPL2') diff --git a/mingw-w64-poppler-qt4/PKGBUILD b/mingw-w64-poppler-qt4/PKGBUILD index 4353591627..036988056e 100644 --- a/mingw-w64-poppler-qt4/PKGBUILD +++ b/mingw-w64-poppler-qt4/PKGBUILD @@ -1,53 +1,51 @@ # Maintainer: Alexey Pavlov _realname=poppler - +pkgbase=mingw-w64-${_realname}-qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4" -pkgver=0.26.3 +pkgver=0.36.0 pkgrel=1 pkgdesc="PDF rendering library based on xpdf 3.0 (mingw-w64)" arch=('any') url="http://poppler.freedesktop.org" license=("GPL") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-qt4") -depends=("${MINGW_PACKAGE_PREFIX}-icu" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-openjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-poppler-data") +depends=("${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-openjpeg" + "${MINGW_PACKAGE_PREFIX}-poppler-data" + "${MINGW_PACKAGE_PREFIX}-zlib") optdepends=("${MINGW_PACKAGE_PREFIX}-glib2: libpoppler-glib" "${MINGW_PACKAGE_PREFIX}-qt4: libpoppler-qt4") options=('strip' 'staticlibs') -source=("http://poppler.freedesktop.org/poppler-${pkgver}.tar.xz" - "give-cc-to-gir-scanner.mingw.patch" - "mingw-no-fpic.patch") -md5sums=('e101f6653f9f68ab63dac63ec34801d1' - '727c1b414987f6ee2ba841d9db57a967' - 'c319527f31989e1eee561f008b649500') +source=("http://poppler.freedesktop.org/${_realname}-${pkgver}.tar.xz" + "give-cc-to-gir-scanner.mingw.patch") +md5sums=('9f72a76e6ca899dd81b03537c4ce3680' + '727c1b414987f6ee2ba841d9db57a967') prepare() { - cd "$srcdir/poppler-$pkgver" + cd "$}srcdir}/${_realname}-$}pkgver}" patch -p1 -i "$srcdir/give-cc-to-gir-scanner.mingw.patch" - patch -p1 -i "$srcdir/mingw-no-fpic.patch" #sed -i -e '/AC_PATH_XTRA/d' configure.ac #sed -i "s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:" configure.ac autoreconf -fi } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -58,10 +56,11 @@ build() { --enable-utils \ --disable-gtk-doc-html \ --with-font-configuration=win32 + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-poppler-qt4/mingw-no-fpic.patch b/mingw-w64-poppler-qt4/mingw-no-fpic.patch deleted file mode 100644 index c5ae75f119..0000000000 --- a/mingw-w64-poppler-qt4/mingw-no-fpic.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- poppler-0.26.2/configure.ac.orig 2014-07-15 00:13:26.169600000 +0400 -+++ poppler-0.26.2/configure.ac 2014-07-15 00:15:06.992600000 +0400 -@@ -812,7 +812,11 @@ - -Wmissing-format-attribute -fno-exceptions -fno-check-new \ - -fno-common $CXXFLAGS" ;; - esac --CXXFLAGS="-fPIC $CXXFLAGS"; -+case "$host_os" in -+ mingw* | cygwin*) ;; -+ *) -+ CXXFLAGS="-fPIC $CXXFLAGS" ;; -+esac - - case `$PKG_CONFIG --version` in - 0.?|0.1[0-7]) diff --git a/mingw-w64-poppler/PKGBUILD b/mingw-w64-poppler/PKGBUILD index 3675894c87..9fd3b9d2aa 100644 --- a/mingw-w64-poppler/PKGBUILD +++ b/mingw-w64-poppler/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=poppler +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.28.1 +pkgver=0.39.0 pkgrel=1 pkgdesc="PDF rendering library based on xpdf 3.0 (mingw-w64)" arch=('any') @@ -13,27 +14,24 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-qt5") -depends=("${MINGW_PACKAGE_PREFIX}-icu" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-curl" - "${MINGW_PACKAGE_PREFIX}-openjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-poppler-data") +depends=("${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-openjpeg" + "${MINGW_PACKAGE_PREFIX}-poppler-data" + "${MINGW_PACKAGE_PREFIX}-zlib") optdepends=("${MINGW_PACKAGE_PREFIX}-glib2: libpoppler-glib" "${MINGW_PACKAGE_PREFIX}-qt5: libpoppler-qt5") options=('strip' 'staticlibs') -source=("http://poppler.freedesktop.org/poppler-${pkgver}.tar.xz" - "give-cc-to-gir-scanner.mingw.patch") -md5sums=('28de4b9f698296e11dff45a5cce1aa93' - '727c1b414987f6ee2ba841d9db57a967') +source=("http://poppler.freedesktop.org/${_realname}-${pkgver}.tar.xz") +md5sums=('5100960c61b932430b5d74068d71f530') prepare() { - cd "$srcdir/poppler-$pkgver" - patch -p1 -i "$srcdir/give-cc-to-gir-scanner.mingw.patch" + cd "${srcdir}/${_realname}-${pkgver}" #sed -i -e '/AC_PATH_XTRA/d' configure.ac #sed -i "s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:" configure.ac autoreconf -fi @@ -42,7 +40,7 @@ prepare() { build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -53,10 +51,11 @@ build() { --enable-utils \ --disable-gtk-doc-html \ --with-font-configuration=win32 + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-poppler/give-cc-to-gir-scanner.mingw.patch b/mingw-w64-poppler/give-cc-to-gir-scanner.mingw.patch deleted file mode 100644 index dc2ed35533..0000000000 --- a/mingw-w64-poppler/give-cc-to-gir-scanner.mingw.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- poppler-0.24.5/glib/Makefile.am.orig 2014-04-17 01:22:10.962400000 +0400 -+++ poppler-0.24.5/glib/Makefile.am 2014-04-17 01:23:09.634000000 +0400 -@@ -90,6 +90,8 @@ - if HAVE_INTROSPECTION - -include $(INTROSPECTION_MAKEFILE) - INTROSPECTION_GIRS = -+INTROSPECTION_SCANNER_ENV = \ -+ CC="$(CC)" - INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all - INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) - diff --git a/mingw-w64-popt/PKGBUILD b/mingw-w64-popt/PKGBUILD index 0351d5a529..f5c360dfcd 100644 --- a/mingw-w64-popt/PKGBUILD +++ b/mingw-w64-popt/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=popt - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.10.7 -pkgrel=3 +pkgrel=4 pkgdesc="C library for parsing command line parameters(mingw-w64)" arch=('any') url="http://www.rpm5.org/" @@ -31,12 +30,13 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ - --disable-static + --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-port-scanner/PKGBUILD b/mingw-w64-port-scanner/PKGBUILD new file mode 100644 index 0000000000..4c91b5bee1 --- /dev/null +++ b/mingw-w64-port-scanner/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: David Macek + +_realname=port-scanner +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.3 +pkgrel=2 +pkgdesc="A multi threaded TCP port scanner from SecPoint.com (mingw-w64)" +arch=('any') +url="https://www.secpoint.com/multi-threaded-tcp-port-scanner.html" +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=("https://www.secpoint.com/freetools/threaded-port-scanner-${pkgver}.zip" + "paths.patch") +md5sums=('e37be464831f874dc1c867fed4fdd680' + 'ee5682884609812aa6aafe3349148372') + +prepare() { + cd "${srcdir}/threaded-port-scanner-${pkgver}" + rm -f pathtools.c pathtools.h + patch -p1 -i "${srcdir}/paths.patch" # also adds -lws2_32 + mkdir -p "${srcdir}/build-${CARCH}" + cp * "${srcdir}/build-${CARCH}" +} + +build() { + cd "${srcdir}/build-${CARCH}" + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + install -Dm755 pscan.exe "${pkgdir}${MINGW_PREFIX}/bin/pscan.exe" + install -Dm644 oui.txt "${pkgdir}${MINGW_PREFIX}/share/port-scanner/oui.txt" + install -Dm644 port-numbers.txt "${pkgdir}${MINGW_PREFIX}/share/port-scanner/port-numbers.txt" +} diff --git a/mingw-w64-port-scanner/paths.patch b/mingw-w64-port-scanner/paths.patch new file mode 100644 index 0000000000..c1ad331c23 --- /dev/null +++ b/mingw-w64-port-scanner/paths.patch @@ -0,0 +1,729 @@ +diff -Naur orig/main.c threaded-port-scanner-1.3/main.c +--- orig/main.c 2011-03-21 16:22:38.000000000 +0100 ++++ threaded-port-scanner-1.3/main.c 2015-03-15 21:38:18.996312400 +0100 +@@ -20,6 +20,8 @@ + #include + #ifdef WIN32 + #include ++#include ++#include "pathtools.h" + #else + #include + #include +@@ -29,11 +31,19 @@ + + extern long int bestPortsArray[]; + ++#define BINDIR "/mingw$$/bin" ++#define DATADIR "/mingw$$/share/port-scanner" ++static char exe_path[PATH_MAX], ++ data_path[PATH_MAX], ++ arp_path[PATH_MAX], ++ oui_path[PATH_MAX], ++ ports_path[PATH_MAX]; ++ + #define SLEEP_TIME_MSEC 5 + #define MAX_PORT_STANDARD 1024 +-#define ARP_TABLE_FILENAME "./arp_table.txt" +-#define OUI_FILENAME "./oui.txt" +-#define PORT_RES_FILENAME "./port-numbers.txt" ++#define ARP_TABLE_FILENAME "arpdump" ++#define OUI_FILENAME "oui.txt" ++#define PORT_RES_FILENAME "port-numbers.txt" + + #define OPTIONS_ALL_PORTS 0x00000001 + #define OPTIONS_RESOLVE_PORTS 0x00000002 +@@ -505,7 +515,7 @@ + void resolve_MAC(char *mac) + { + int i; +- char *p, *b = read_file(OUI_FILENAME); ++ char *p, *b = read_file(oui_path); + mac[8] = 0; + for (i = 0; i < 8; i++) if (mac[i] >= 'a' && mac[i] <= 'f') mac[i] &= 0xDF; + p = strstr(b, mac); +@@ -530,13 +540,13 @@ + strcpy(ips, net_get_aip(IP)); + + #ifdef WIN32 +- sprintf(buff, "arp -a %s > "ARP_TABLE_FILENAME, ips); ++ sprintf(buff, "arp -a %s > %s", ips, arp_path); + #else + sprintf(buff, "arp -a | grep %s | awk '{ print $4 }' > "ARP_TABLE_FILENAME, ips); + #endif + r = system(buff); + +- b = read_file(ARP_TABLE_FILENAME); ++ b = read_file(arp_path); + #ifdef WIN32 + p = strstr(b, ips); + #else +@@ -564,11 +574,7 @@ + } + free(b); + +-#ifdef WIN32 +- system("erase "ARP_TABLE_FILENAME); +-#else +- r = system("rm "ARP_TABLE_FILENAME); +-#endif ++ DeleteFile(arp_path); + } + + int main(int argc, char *argv[]) +@@ -583,9 +589,31 @@ + + parse_arguments(argc, argv); + ++ { // paths ++ get_executable_path(argv[0], exe_path, sizeof(exe_path) / sizeof(exe_path[0])); ++ if (strrchr(exe_path, '/') != NULL) ++ strrchr(exe_path, '/')[1] = '\0'; ++ ++ strcpy(data_path, exe_path); ++ strcat(data_path, get_relative_path(BINDIR, DATADIR)); ++ simplify_path(data_path); ++ ++ strcpy(ports_path, data_path); ++ strcat(ports_path, "/"); ++ strcat(ports_path, PORT_RES_FILENAME); ++ ++ strcpy(oui_path, data_path); ++ strcat(oui_path, "/"); ++ strcat(oui_path, OUI_FILENAME); ++ ++ GetTempPath(PATH_MAX, arp_path); ++ strcat(arp_path, ARP_TABLE_FILENAME); ++ _itoa(_getpid(), &arp_path[strlen(arp_path)], 10); ++ } ++ + print_config(); + +- if (options & OPTIONS_RESOLVE_PORTS) port_res_file = read_file(PORT_RES_FILENAME); ++ if (options & OPTIONS_RESOLVE_PORTS) port_res_file = read_file(ports_path); + scanner(); + if (options & OPTIONS_RESOLVE_PORTS) free(port_res_file); + if (options & OPTIONS_RESOLVE_MAC) print_MAC(); +diff -Naur orig/Makefile threaded-port-scanner-1.3/Makefile +--- orig/Makefile 2011-03-03 15:09:51.000000000 +0100 ++++ threaded-port-scanner-1.3/Makefile 2015-03-15 21:37:31.182078300 +0100 +@@ -1,14 +1,17 @@ + CXX := gcc + CXXFLAGS := -std=gnu99 -O2 -Wall -ggdb + +-OBJECTS := main.o net.o ++OBJECTS := main.o net.o pathtools.o + + pscan: $(OBJECTS) +- $(CXX) $(OBJECTS) -o pscan ++ $(CXX) $(OBJECTS) -lws2_32 -o pscan + +-main.o: main.c ++main.o: main.c pathtools.h + $(CXX) $(INCLUDES) $(CXXFLAGS) -c main.c -o main.o + + net.o: net.c + $(CXX) $(CXXFLAGS) -c net.c -o net.o + ++pathtools.o: pathtools.c pathtools.h ++ $(CXX) $(CXXFLAGS) -c pathtools.c -o pathtools.o ++ +diff -Naur orig/pathtools.c threaded-port-scanner-1.3/pathtools.c +--- orig/pathtools.c 1970-01-01 01:00:00.000000000 +0100 ++++ threaded-port-scanner-1.3/pathtools.c 2015-03-15 21:37:31.182078300 +0100 +@@ -0,0 +1,538 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++#include ++#include ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++#include ++#endif ++#include ++ ++/* If you don't define this, then get_executable_path() ++ can only use argv[0] which will often not work well */ ++#define IMPLEMENT_SYS_GET_EXECUTABLE_PATH ++ ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++/* Nothing needed, unistd.h is enough. */ ++#elif defined(__APPLE__) ++#include ++#elif defined(_WIN32) ++#define WIN32_MEAN_AND_LEAN ++#include ++#include ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ ++#include "pathtools.h" ++ ++char * ++malloc_copy_string(char const * original) ++{ ++ char * result = (char *) malloc (sizeof (char*) * strlen (original)+1); ++ if (result != NULL) ++ { ++ strcpy (result, original); ++ } ++ return result; ++} ++ ++void ++sanitise_path(char * path) ++{ ++ size_t path_size = strlen (path); ++ ++ /* Replace any '\' with '/' */ ++ char * path_p = path; ++ while ((path_p = strchr (path_p, '\\')) != NULL) ++ { ++ *path_p = '/'; ++ } ++ /* Replace any '//' with '/' */ ++ path_p = path; ++ while ((path_p = strstr (path_p, "//")) != NULL) ++ { ++ memmove (path_p, path_p + 1, path_size--); ++ } ++ return; ++} ++ ++char * ++get_relative_path(char const * from_in, char const * to_in) ++{ ++ size_t from_size = (from_in == NULL) ? 0 : strlen (from_in); ++ size_t to_size = (to_in == NULL) ? 0 : strlen (to_in); ++ size_t max_size = (from_size + to_size) * 2 + 4; ++ char * scratch_space = (char *) alloca (from_size + 1 + to_size + 1 + max_size + max_size); ++ char * from; ++ char * to; ++ char * common_part; ++ char * result; ++ size_t count; ++ ++ /* No to, return "./" */ ++ if (to_in == NULL) ++ { ++ return malloc_copy_string ("./"); ++ } ++ ++ /* If alloca failed or no from was given return a copy of to */ ++ if ( from_in == NULL ++ || scratch_space == NULL ) ++ { ++ return malloc_copy_string (to_in); ++ } ++ ++ from = scratch_space; ++ strcpy (from, from_in); ++ to = from + from_size + 1; ++ strcpy (to, to_in); ++ common_part = to + to_size + 1; ++ result = common_part + max_size; ++ simplify_path (from); ++ simplify_path (to); ++ ++ result[0] = '\0'; ++ ++ size_t match_size_dirsep = 0; /* The match size up to the last /. Always wind back to this - 1 */ ++ size_t match_size = 0; /* The running (and final) match size. */ ++ size_t largest_size = (from_size > to_size) ? from_size : to_size; ++ int to_final_is_slash = (to[to_size-1] == '/') ? 1 : 0; ++ char from_c; ++ char to_c; ++ for (match_size = 0; match_size < largest_size; ++match_size) ++ { ++ /* To simplify the logic, always pretend the strings end with '/' */ ++ from_c = (match_size < from_size) ? from[match_size] : '/'; ++ to_c = (match_size < to_size) ? to[match_size] : '/'; ++ ++ if (from_c != to_c) ++ { ++ if (from_c != '\0' || to_c != '\0') ++ { ++ match_size = match_size_dirsep; ++ } ++ break; ++ } ++ else if (from_c == '/') ++ { ++ match_size_dirsep = match_size; ++ } ++ } ++ strncpy (common_part, from, match_size); ++ common_part[match_size] = '\0'; ++ from += match_size; ++ to += match_size; ++ size_t ndotdots = 0; ++ char const* from_last = from + strlen(from) - 1; ++ while ((from = strchr (from, '/')) && from != from_last) ++ { ++ ++ndotdots; ++ ++from; ++ } ++ for (count = 0; count < ndotdots; ++count) ++ { ++ strcat(result, "../"); ++ } ++ if (strlen(to) > 0) ++ { ++ strcat(result, to+1); ++ } ++ /* Make sure that if to ends with '/' result does the same, and ++ vice-versa. */ ++ size_t size_result = strlen(result); ++ if ((to_final_is_slash == 1) ++ && (!size_result || result[size_result-1] != '/')) ++ { ++ strcat (result, "/"); ++ } ++ else if (!to_final_is_slash ++ && size_result && result[size_result-1] == '/') ++ { ++ result[size_result-1] = '\0'; ++ } ++ ++ return malloc_copy_string (result); ++} ++ ++void ++simplify_path(char * path) ++{ ++ ssize_t n_toks = 1; /* in-case we need an empty initial token. */ ++ ssize_t i, j; ++ size_t tok_size; ++ size_t in_size = strlen (path); ++ int it_ended_with_a_slash = (path[in_size - 1] == '/') ? 1 : 0; ++ char * result = path; ++ sanitise_path(result); ++ char * result_p = result; ++ ++ do ++ { ++ ++n_toks; ++ ++result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ result_p = result; ++ char const ** toks = (char const **) alloca (sizeof (char const*) * n_toks); ++ n_toks = 0; ++ do ++ { ++ if (result_p > result) ++ { ++ *result_p++ = '\0'; ++ } ++ else if (*result_p == '/') ++ { ++ /* A leading / creates an empty initial token. */ ++ toks[n_toks++] = result_p; ++ *result_p++ = '\0'; ++ } ++ toks[n_toks++] = result_p; ++ } while ((result_p = strchr (result_p, '/')) != NULL); ++ ++ /* Remove all non-leading '.' and any '..' we can match ++ with an earlier forward path (i.e. neither '.' nor '..') */ ++ for (i = 1; i < n_toks; ++i) ++ { ++ int removals[2] = { -1, -1 }; ++ if ( strcmp (toks[i], "." ) == 0) ++ { ++ removals[0] = i; ++ } ++ else if ( strcmp (toks[i], ".." ) == 0) ++ { ++ /* Search backwards for a forward path to collapse. ++ If none are found then the .. also stays. */ ++ for (j = i - 1; j > -1; --j) ++ { ++ if ( strcmp (toks[j], "." ) ++ && strcmp (toks[j], ".." ) ) ++ { ++ removals[0] = j; ++ removals[1] = i; ++ break; ++ } ++ } ++ } ++ for (j = 0; j < 2; ++j) ++ { ++ if (removals[j] >= 0) /* Can become -2 */ ++ { ++ --n_toks; ++ memmove (&toks[removals[j]], &toks[removals[j]+1], (n_toks - removals[j])*sizeof (char*)); ++ --i; ++ if (!j) ++ { ++ --removals[1]; ++ } ++ } ++ } ++ } ++ result_p = result; ++ for (i = 0; i < n_toks; ++i) ++ { ++ tok_size = strlen(toks[i]); ++ memcpy (result_p, toks[i], tok_size); ++ result_p += tok_size; ++ if ((!i || tok_size) && ((i < n_toks - 1) || it_ended_with_a_slash == 1)) ++ { ++ *result_p = '/'; ++ ++result_p; ++ } ++ } ++ *result_p = '\0'; ++} ++ ++/* Returns actual_to by calculating the relative path from -> to and ++ applying that to actual_from. An assumption that actual_from is a ++ dir is made, and it may or may not end with a '/' */ ++char const * ++get_relocated_path (char const * from, char const * to, char const * actual_from) ++{ ++ char const * relative_from_to = get_relative_path (from, to); ++ char * actual_to = (char *) malloc (strlen(actual_from) + 2 + strlen(relative_from_to)); ++ return actual_to; ++} ++ ++int ++get_executable_path(char const * argv0, char * result, ssize_t max_size) ++{ ++ char * system_result = (char *) alloca (max_size); ++ ssize_t system_result_size = -1; ++ ssize_t result_size = -1; ++ ++ if (system_result != NULL) ++ { ++#if defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__MSYS__) ++ system_result_size = readlink("/proc/self/exe", system_result, max_size); ++#elif defined(__APPLE__) ++ uint32_t bufsize = (uint32_t)max_size; ++ if (_NSGetExecutablePath(system_result, &bufsize) == 0) ++ { ++ system_result_size = (ssize_t)bufsize; ++ } ++#elif defined(_WIN32) ++ unsigned long bufsize = (unsigned long)max_size; ++ system_result_size = GetModuleFileNameA(NULL, system_result, bufsize); ++ if (system_result_size == 0 || system_result_size == (ssize_t)bufsize) ++ { ++ /* Error, possibly not enough space. */ ++ system_result_size = -1; ++ } ++ else ++ { ++ /* Early conversion to unix slashes instead of more changes ++ everywhere else .. */ ++ char * winslash; ++ system_result[system_result_size] = '\0'; ++ while ((winslash = strchr (system_result, '\\')) != NULL) ++ { ++ *winslash = '/'; ++ } ++ } ++#else ++#warning "Don't know how to get executable path on this system" ++#endif ++#endif /* defined(IMPLEMENT_SYS_GET_EXECUTABLE_PATH) */ ++ } ++ /* Use argv0 as a default in-case of failure */ ++ if (system_result_size != -1) ++ { ++ strncpy (result, system_result, system_result_size); ++ result[system_result_size] = '\0'; ++ } ++ else ++ { ++ if (argv0 != NULL) ++ { ++ strncpy (result, argv0, max_size); ++ result[max_size-1] = '\0'; ++ } ++ else ++ { ++ result[0] = '\0'; ++ } ++ } ++ result_size = strlen (result); ++ return result_size; ++} ++ ++char const * ++strip_n_prefix_folders(char const * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return NULL; ++ } ++ ++ if (path[0] != '/') ++ { ++ return path; ++ } ++ ++ char const * last = path; ++ while (n-- && path != NULL) ++ { ++ last = path; ++ path = strchr (path + 1, '/'); ++ } ++ return (path == NULL) ? last : path; ++} ++ ++void ++strip_n_suffix_folders(char * path, size_t n) ++{ ++ if (path == NULL) ++ { ++ return; ++ } ++ while (n--) ++ { ++ if (strrchr (path + 1, '/')) ++ { ++ *strrchr (path + 1, '/') = '\0'; ++ } ++ else ++ { ++ return; ++ } ++ } ++ return; ++} ++ ++size_t ++split_path_list(char const * path_list, char split_char, char *** arr) ++{ ++ size_t path_count; ++ size_t path_list_size; ++ char const * path_list_p; ++ ++ path_list_p = path_list; ++ if (path_list == NULL || path_list[0] == '\0') ++ { ++ return 0; ++ } ++ path_list_size = strlen (path_list); ++ ++ path_count = 0; ++ do ++ { ++ ++path_count; ++ ++path_list_p; ++ } ++ while ((path_list_p = strchr (path_list_p, split_char)) != NULL); ++ ++ /* allocate everything in one go. */ ++ char * all_memory = (char *) malloc (sizeof (char *) * path_count + strlen(path_list) + 1); ++ if (all_memory == NULL) ++ return 0; ++ *arr = (char **)all_memory; ++ all_memory += sizeof (char *) * path_count; ++ ++ path_count = 0; ++ path_list_p = path_list; ++ char const * next_path_list_p = 0; ++ do ++ { ++ next_path_list_p = strchr (path_list_p, split_char); ++ if (next_path_list_p != NULL) ++ { ++ ++next_path_list_p; ++ } ++ size_t this_size = (next_path_list_p != NULL) ++ ? next_path_list_p - path_list_p - 1 ++ : &path_list[path_list_size] - path_list_p; ++ memcpy (all_memory, path_list_p, this_size); ++ all_memory[this_size] = '\0'; ++ (*arr)[path_count++] = all_memory; ++ all_memory += this_size + 1; ++ } while ((path_list_p = next_path_list_p) != NULL); ++ ++ return path_count; ++} ++ ++char * ++get_relocated_path_list(char const * from, char const * to_path_list) ++{ ++ char exe_path[MAX_PATH]; ++ char * temp; ++ get_executable_path (NULL, &exe_path[0], sizeof (exe_path) / sizeof (exe_path[0])); ++ if ((temp = strrchr (exe_path, '/')) != NULL) ++ { ++ temp[1] = '\0'; ++ } ++ ++ char **arr = NULL; ++ /* Ask Alexey why he added this. Are we not 100% sure ++ that we're dealing with unix paths here? */ ++ char split_char = ':'; ++ if (strchr (to_path_list, ';')) ++ { ++ split_char = ';'; ++ } ++ size_t count = split_path_list (to_path_list, split_char, &arr); ++ int result_size = 1 + (count - 1); /* count - 1 is for ; delim. */ ++ size_t exe_path_size = strlen (exe_path); ++ size_t i; ++ /* Space required is: ++ count * (exe_path_size + strlen (rel_to_datadir)) ++ rel_to_datadir upper bound is: ++ (count * strlen (from)) + (3 * num_slashes (from)) ++ + strlen(arr[i]) + 1. ++ .. pathalogically num_slashes (from) is strlen (from) ++ (from = ////////) */ ++ size_t space_required = (count * (exe_path_size + 4 * strlen (from))) + count - 1; ++ for (i = 0; i < count; ++i) ++ { ++ space_required += strlen (arr[i]); ++ } ++ char * scratch = (char *) alloca (space_required); ++ if (scratch == NULL) ++ return NULL; ++ for (i = 0; i < count; ++i) ++ { ++ char * rel_to_datadir = get_relative_path (from, arr[i]); ++ scratch[0] = '\0'; ++ arr[i] = scratch; ++ strcat (scratch, exe_path); ++ strcat (scratch, rel_to_datadir); ++ simplify_path (arr[i]); ++ size_t arr_i_size = strlen (arr[i]); ++ result_size += arr_i_size; ++ scratch = arr[i] + arr_i_size + 1; ++ } ++ char * result = (char *) malloc (result_size); ++ if (result == NULL) ++ { ++ return NULL; ++ } ++ result[0] = '\0'; ++ for (i = 0; i < count; ++i) ++ { ++ strcat (result, arr[i]); ++ if (i != count-1) ++ { ++#if defined(_WIN32) ++ strcat (result, ";"); ++#else ++ strcat (result, ":"); ++#endif ++ } ++ } ++ free ((void*)arr); ++ return result; ++} ++ ++char * ++single_path_relocation(const char *from, const char *to) ++{ ++#if defined(__MINGW32__) ++ char exe_path[PATH_MAX]; ++ get_executable_path (NULL, &exe_path[0], sizeof(exe_path)/sizeof(exe_path[0])); ++ if (strrchr (exe_path, '/') != NULL) ++ { ++ strrchr (exe_path, '/')[1] = '\0'; ++ } ++ char * rel_to_datadir = get_relative_path (from, to); ++ strcat (exe_path, rel_to_datadir); ++ simplify_path (&exe_path[0]); ++ return malloc_copy_string(exe_path); ++#else ++ return malloc_copy_string(to); ++#endif ++} ++ ++char * ++pathlist_relocation(const char *from_path, const char *to_path_list) ++{ ++#if defined(__MINGW32__) ++ static char stored_path[PATH_MAX]; ++ static int stored = 0; ++ if (stored == 0) ++ { ++ char const * relocated = get_relocated_path_list(from_path, to_path_list); ++ strncpy (stored_path, relocated, PATH_MAX); ++ stored_path[PATH_MAX-1] = '\0'; ++ free ((void *)relocated); ++ stored = 1; ++ } ++ return stored_path; ++#else ++ return (to_path_list); ++#endif ++} +diff -Naur orig/pathtools.h threaded-port-scanner-1.3/pathtools.h +--- orig/pathtools.h 1970-01-01 01:00:00.000000000 +0100 ++++ threaded-port-scanner-1.3/pathtools.h 2015-03-15 21:37:31.182078300 +0100 +@@ -0,0 +1,53 @@ ++/* ++ .Some useful path tools. ++ .ASCII only for now. ++ .Written by Ray Donnelly in 2014. ++ .Licensed under CC0 (and anything. ++ .else you need to license it under). ++ .No warranties whatsoever. ++ .email: . ++ */ ++ ++#ifndef PATHTOOLS_H ++#define PATHTOOLS_H ++ ++#include ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++#include ++ ++char * malloc_copy_string(char const * original); ++ ++/* In-place replaces any '\' with '/' and any '//' with '/' */ ++void sanitise_path(char * path); ++ ++/* Uses a host OS specific function to determine the path of the executable, ++ if IMPLEMENT_SYS_GET_EXECUTABLE_PATH is defined, otherwise uses argv0. */ ++int get_executable_path(char const * argv0, char * result, ssize_t max_size); ++ ++/* Where possible, in-place removes occourances of '.' and 'path/..' */ ++void simplify_path(char * path); ++ ++/* Allocates (via malloc) and returns the path to get from from to to. */ ++char * get_relative_path(char const * from, char const * to); ++ ++size_t split_path_list(char const * path_list, char split_char, char *** arr); ++ ++/* Advances path along by the amount that removes n prefix folders. */ ++char const * ++strip_n_prefix_folders(char const * path, size_t n); ++ ++/* NULL terminates path to remove n suffix folders. */ ++void ++strip_n_suffix_folders(char * path, size_t n); ++ ++char const * get_relocated_path (char const * from, char const * to, char const * actual_from); ++char * get_relocated_path_list(char const * from, char const * to_path_list); ++ ++char * single_path_relocation(const char *from, const char *to); ++char * pathlist_relocation(const char *from_path, const char *to_path_list); ++ ++#endif /* PATHTOOLS_H */ diff --git a/mingw-w64-portablexdr/PKGBUILD b/mingw-w64-portablexdr/PKGBUILD index cb8456edc0..8b3a9888a7 100644 --- a/mingw-w64-portablexdr/PKGBUILD +++ b/mingw-w64-portablexdr/PKGBUILD @@ -2,35 +2,35 @@ _realname=portablexdr pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.9.1 +_base_ver=4.9.2 +pkgver=4.9.2.r27.94fb83c pkgrel=1 pkgdesc="PortableXDR / RPC Library (mingw-w64)" arch=(any) -url="http://et.redhat.com/~rjones/portablexdr/" +url="https://github.com/Alexpux/portablexdr" license=('LGPL2') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -groups=("${MINGW_PACKAGE_PREFIX}") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libtool") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libtool" "git") options=('staticlibs' 'strip') -source=("http://people.redhat.com/~rjones/portablexdr/files/${_realname}-${pkgver}.tar.gz" - portablexdr-4.9.1-no-config-h.patch - portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch) -md5sums=('949e6dc9815590e5688f18bfdd2a98f9' - 'e5e44853226f8e756aa499299404d505' - '0b9fd1983d9bf3253f547c8e813311d8') +source=(${_realname}::git+https://github.com/Alexpux/portablexdr.git#branch=Branch_4.9.1) +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "%s.r%s.%s" ${_base_ver} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/portablexdr-4.9.1-no-config-h.patch - patch -p1 -i ${srcdir}/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch + cd "${srcdir}/${_realname}" + autoreconf -fiv } build() { [[ -d "$srcdir/build-${MINGW_CHOST}" ]] && rm -rf "$srcdir/build-${MINGW_CHOST}" mkdir "$srcdir/build-${MINGW_CHOST}" - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -41,7 +41,6 @@ build() { } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-portablexdr/portablexdr-4.9.1-no-config-h.patch b/mingw-w64-portablexdr/portablexdr-4.9.1-no-config-h.patch deleted file mode 100644 index 5307966a5b..0000000000 --- a/mingw-w64-portablexdr/portablexdr-4.9.1-no-config-h.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- portablexdr-4.9.1/rpc/rpc.h.old 2011-07-05 14:36:57.938389205 +0100 -+++ portablexdr-4.9.1/rpc/rpc.h 2011-07-05 14:37:04.213519063 +0100 -@@ -1,3 +1,2 @@ --#include "config.h" - #include - #include diff --git a/mingw-w64-portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch b/mingw-w64-portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch deleted file mode 100644 index c9144917e6..0000000000 --- a/mingw-w64-portablexdr/portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch +++ /dev/null @@ -1,78 +0,0 @@ -From a7461e1430fcc26b02457f7b8f53dc423c062e1e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Mon, 23 Jan 2012 19:31:10 +0100 -Subject: [PATCH] build: use intptr_t and uintptr_t to cast ptr to int - ---- - xdr_mem.c | 2 +- - xdr_rec.c | 16 ++++++++-------- - 2 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/xdr_mem.c b/xdr_mem.c -index 701cad2..f8a2d3a 100644 ---- a/xdr_mem.c -+++ b/xdr_mem.c -@@ -169,7 +169,7 @@ xdrmem_setpos(xdrs, pos) - register caddr_t newaddr = xdrs->x_base + pos; - register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy; - -- if ((long)newaddr > (long)lastaddr) -+ if ((intptr_t)newaddr > (intptr_t)lastaddr) - return (FALSE); - xdrs->x_private = newaddr; - xdrs->x_handy = lastaddr - newaddr; -diff --git a/xdr_rec.c b/xdr_rec.c -index 6859c42..a0d34c6 100644 ---- a/xdr_rec.c -+++ b/xdr_rec.c -@@ -173,7 +173,7 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit) - return; - } - for (rstrm->out_base = rstrm->the_buffer; -- (long) rstrm->out_base % BYTES_PER_XDR_UNIT != 0; -+ (intptr_t) rstrm->out_base % BYTES_PER_XDR_UNIT != 0; - rstrm->out_base++); - rstrm->in_base = rstrm->out_base + sendsize; - /* -@@ -472,12 +472,12 @@ xdrrec_endofrecord(xdrs, sendnow) - register u_long len; /* fragment length */ - - if (sendnow || rstrm->frag_sent || -- ((u_long)rstrm->out_finger + sizeof(u_long) >= -- (u_long)rstrm->out_boundry)) { -+ ((uintptr_t)rstrm->out_finger + sizeof(u_long) >= -+ (uintptr_t)rstrm->out_boundry)) { - rstrm->frag_sent = FALSE; - return (flush_out(rstrm, TRUE)); - } -- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) - -+ len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->frag_header) - - sizeof(u_long); - *(rstrm->frag_header) = htonl((u_long)len | LAST_FRAG); - rstrm->frag_header = (u_long *)rstrm->out_finger; -@@ -495,11 +495,11 @@ flush_out(rstrm, eor) - bool_t eor; - { - register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0; -- register u_long len = (u_long)(rstrm->out_finger) - -- (u_long)(rstrm->frag_header) - sizeof(u_long); -+ register u_long len = (uintptr_t)(rstrm->out_finger) - -+ (uintptr_t)(rstrm->frag_header) - sizeof(u_long); - - *(rstrm->frag_header) = htonl(len | eormask); -- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->out_base); -+ len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->out_base); - if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len) - != (int)len) - return (FALSE); -@@ -517,7 +517,7 @@ fill_input_buf(rstrm) - register int len; - - where = rstrm->in_base; -- i = (long) rstrm->in_boundry % BYTES_PER_XDR_UNIT; -+ i = (intptr_t) rstrm->in_boundry % BYTES_PER_XDR_UNIT; - where += i; - len = rstrm->in_size - i; - if ((len = (*(rstrm->readit))(rstrm->tcp_handle, where, len)) == -1) --- -1.7.7.5 \ No newline at end of file diff --git a/mingw-w64-portaudio/PKGBUILD b/mingw-w64-portaudio/PKGBUILD index 7775d11ff5..7e2b9cc5ee 100644 --- a/mingw-w64-portaudio/PKGBUILD +++ b/mingw-w64-portaudio/PKGBUILD @@ -1,20 +1,19 @@ # Maintainer: Alexey Pavlov _realname=portaudio - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=19_20140130 -pkgrel=1 -pkgdesc="A free, cross-platform, open source, audio I/O library. (mingw-w64)" +pkgrel=2 +pkgdesc="A free, cross-platform, open source, audio I/O library (mingw-w64)" arch=('any') url="http://www.portaudio.com" license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=(!libtool strip !makeflags staticlibs) -source=("http://www.portaudio.com/archives/pa_stable_v$pkgver.tgz" - mingw-w64-fix.patch - mingw-w64-cmake-allow-cxx.patch) +source=("http://www.portaudio.com/archives/pa_stable_v${pkgver}.tgz" + mingw-w64-fix.patch + mingw-w64-cmake-allow-cxx.patch) md5sums=('7f220406902af9dca009668e198cbd23' '99da198098bd39e24333d6e4ab1bef4a' '9ae34b0d0dee106c6a90dfc744bf096c') @@ -29,9 +28,10 @@ prepare() { build() { export lt_cv_deplibs_check_method='pass_all' + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}/configure \ + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -41,10 +41,11 @@ build() { --with-dxdir=${MINGW_PREFIX}/${MINGW_CHOST} \ --with-winapi=wmme,directx,wdmks #wasapi, + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-portmidi/PKGBUILD b/mingw-w64-portmidi/PKGBUILD new file mode 100644 index 0000000000..8e569856c2 --- /dev/null +++ b/mingw-w64-portmidi/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: David Macek + +_realname=portmidi +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=217 +pkgrel=2 +pkgdesc="Platform independent library for real-time MIDI input/output (mingw-w64)" +arch=('any') +url="http://portmedia.sourceforge.net/" +license=("custom") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +source=("http://downloads.sourceforge.net/portmedia/portmidi/${pkgver}/portmidi-src-${pkgver}.zip" + enable-install-on-windows.patch) +md5sums=('03f46fd3947e2ef4c8c465baaf832241' + 'dced99fe09c80cd3892a314f8ffedb5b') + +prepare() { + cd portmidi + patch -p1 -i "${srcdir}/enable-install-on-windows.patch" +} + +build() { + # we don't have Java yet, so we fake it + + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -Wno-dev \ + -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DJAVA_INCLUDE_PATH= \ + -DJAVA_INCLUDE_PATH2= \ + -DJAVA_JVM_LIBRARY= \ + ../portmidi + + make -t pmjni + make +} + +package() { + cd "build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + # install executables + for exe in latency.exe midiclock.exe midithread.exe midithru.exe mm.exe qtest.exe sysex.exe test.exe; do + install -Dm0755 "pm_test/${exe}" "${pkgdir}${MINGW_PREFIX}/bin/pm-${exe}" + done + + # install license + install -Dm0755 "${srcdir}/portmidi/license.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/license.txt" +} diff --git a/mingw-w64-portmidi/enable-install-on-windows.patch b/mingw-w64-portmidi/enable-install-on-windows.patch new file mode 100644 index 0000000000..f7ddc8f250 --- /dev/null +++ b/mingw-w64-portmidi/enable-install-on-windows.patch @@ -0,0 +1,37 @@ +diff -waur portmidi.orig/pm_common/CMakeLists.txt portmidi/pm_common/CMakeLists.txt +--- portmidi.orig/pm_common/CMakeLists.txt 2010-09-20 21:57:48.000000000 +0200 ++++ portmidi/pm_common/CMakeLists.txt 2015-05-22 20:36:22.411620600 +0200 +@@ -106,7 +106,7 @@ + + # now add the shared files to make the complete list of library sources + add_library(portmidi-static ${LIBSRC}) +-set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s") ++set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi") + target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) + + # define the jni library +@@ -124,4 +118,9 @@ + # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here + # INSTALL(FILES portmidi.h ../porttime/porttime.h + # DESTINATION /usr/local/include) ++else(UNIX) ++ INSTALL(TARGETS portmidi-static pmjni ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + endif(UNIX) +diff -waur portmidi.orig/pm_dylib/CMakeLists.txt portmidi/pm_dylib/CMakeLists.txt +--- portmidi.orig/pm_dylib/CMakeLists.txt 2009-11-20 06:41:09.000000000 +0100 ++++ portmidi/pm_dylib/CMakeLists.txt 2015-05-22 20:36:15.356939500 +0200 +@@ -124,4 +124,11 @@ + ARCHIVE DESTINATION /usr/local/lib) + INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h + DESTINATION /usr/local/include) ++else(UNIX) ++ INSTALL(TARGETS portmidi-dynamic ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h ++ DESTINATION include) + endif(UNIX) diff --git a/mingw-w64-postgresql/PKGBUILD b/mingw-w64-postgresql/PKGBUILD index 0ff5b64e6a..991d3907d5 100644 --- a/mingw-w64-postgresql/PKGBUILD +++ b/mingw-w64-postgresql/PKGBUILD @@ -1,9 +1,8 @@ # Maintainer: Alexey Pavlov _realname=postgresql - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=9.3.5 +pkgver=9.4.4 pkgrel=2 pkgdesc="Libraries for use with PostgreSQL (mingw-w64)" arch=('any') @@ -13,31 +12,45 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-python2") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gettext" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-readline" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-tcl" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-python2" - "winpty-git") + "${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-tcl" + #"${MINGW_PACKAGE_PREFIX}-readline" + #"${MINGW_PACKAGE_PREFIX}-wineditline" + "${MINGW_PACKAGE_PREFIX}-zlib" + "winpty-git") options=('staticlibs' 'strip') source=("http://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2" - postgresql-9.2.4-plperl-mingw.patch - postgresql-9.3.1-plpython-mingw.patch) -md5sums=('5059857c7d7e6ad83b6d55893a121b59' - '6a11681fbd19a3ccf8d41f7fbc9b4392' - '6401b50c0dee9c963985f0d3f4dbe329') + postgresql-9.4.1-mingw-link.patch + postgresql-9.4.1-pl-perl.patch + postgresql-9.4.1-pl-python.patch + postgresql-9.4.1-pl-tcl.patch + postgresql-9.4.1-mingw-enable-readline.patch) +md5sums=('1fe952c44ed26d7e6a335cf991a9c1c6' + '1d1499234e555afa688f645ef3825450' + '572932c6f0fc795aba4d5bb91e1fe4ba' + '381c984fc2eb2c22c35aed62bedeb7fa' + 'f4ebd4e26f7633354eee543690f2feb4' + 'd93f0fd678bf16adfe10dc04e6d86789') prepare() { cd ${srcdir}/postgresql-$pkgver - #patch -p1 -i ${srcdir}/postgresql-9.2.4-plperl-mingw.patch - patch -p1 -i ${srcdir}/postgresql-9.3.1-plpython-mingw.patch + patch -p1 -i ${srcdir}/postgresql-9.4.1-mingw-link.patch + patch -p1 -i ${srcdir}/postgresql-9.4.1-pl-perl.patch + patch -p1 -i ${srcdir}/postgresql-9.4.1-pl-python.patch + patch -p1 -i ${srcdir}/postgresql-9.4.1-pl-tcl.patch + #patch -p1 -i ${srcdir}/postgresql-9.4.1-mingw-enable-readline.patch + + autoreconf -fiv } build() { + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + export PYTHON=${MINGW_PREFIX}/bin/python2 ../postgresql-$pkgver/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -52,7 +65,9 @@ build() { --with-libxslt \ --with-python \ --without-perl \ - --with-tcl --with-tclconfig=${MINGW_PREFIX}/lib + --with-tcl \ + --with-tclconfig=${MINGW_PREFIX}/lib + #--with-libedit-preferred # Make DLL definition file visible during each arch build ln -s "${srcdir}/postgresql-$pkgver/src/interfaces/libpq/libpqdll.def" src/interfaces/libpq/ @@ -81,9 +96,9 @@ package() { mv "${pkgdir}${MINGW_PREFIX}/lib/"*.dll "${pkgdir}${MINGW_PREFIX}/bin/" # Rename the .a files to .dll.a as they're actually import libraries and not static libraries - for implib in "${pkgdir}${MINGW_PREFIX}/lib/"*.a; do - mv $implib ${implib/.a/.dll.a} - done + #for implib in "${pkgdir}${MINGW_PREFIX}/lib/"*.a; do + # mv $implib ${implib/.a/.dll.a} + #done # these headers are needed by the not-so-public headers of the interfaces mkdir -p "${pkgdir}${MINGW_PREFIX}"/include/{libpq,postgresql/internal/libpq} diff --git a/mingw-w64-postgresql/postgresql-9.2.4-plperl-mingw.patch b/mingw-w64-postgresql/postgresql-9.2.4-plperl-mingw.patch deleted file mode 100644 index e697794fef..0000000000 --- a/mingw-w64-postgresql/postgresql-9.2.4-plperl-mingw.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- postgresql-9.2.4/src/pl/plperl/GNUMakefile.orig 2013-05-13 14:18:22 +0300 -+++ postgresql-9.2.4/src/pl/plperl/GNUMakefile 2013-05-13 14:18:57 +0300 -@@ -19,7 +19,7 @@ - ifeq ($(PORTNAME), win32) - perl_archlibexp := $(subst \,/,$(perl_archlibexp)) - perl_privlibexp := $(subst \,/,$(perl_privlibexp)) --perl_lib := $(basename $(notdir $(wildcard $(perl_archlibexp)/CORE/perl[5-9]*.lib))) -+perl_lib := $(subst lib,,$(basename $(notdir $(wildcard $(perl_archlibexp)/CORE/libperl[5-9]*.a)))) - perl_embed_ldflags = -L$(perl_archlibexp)/CORE -l$(perl_lib) - override CPPFLAGS += -DPLPERL_HAVE_UID_GID - # Perl on win32 contains /* within comment all over the header file, diff --git a/mingw-w64-postgresql/postgresql-9.3.1-plpython-mingw.patch b/mingw-w64-postgresql/postgresql-9.3.1-plpython-mingw.patch deleted file mode 100644 index 4cc030c352..0000000000 --- a/mingw-w64-postgresql/postgresql-9.3.1-plpython-mingw.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- postgresql-9.3.1/src/pl/plpython/Makefile.orig 2013-12-01 09:52:55.043200000 +0400 -+++ postgresql-9.3.1/src/pl/plpython/Makefile 2013-12-01 09:54:53.591200000 +0400 -@@ -63,11 +63,8 @@ - ifeq ($(PORTNAME), win32) - pytverstr=$(subst .,,${python_version}) - OBJS += libpython${pytverstr}.a --libpython${pytverstr}.a: python${pytverstr}.def -- dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a --WD=$(subst \,/,$(WINDIR)) --python${pytverstr}.def: -- pexports $(WD)/system32/python${pytverstr}.dll > python${pytverstr}.def -+libpython${pytverstr}.a: -+ cp -f $(python_libdir)/libpython${python_version}.dll.a libpython${pytverstr}.a - endif - - diff --git a/mingw-w64-postgresql/postgresql-9.4.1-mingw-enable-readline.patch b/mingw-w64-postgresql/postgresql-9.4.1-mingw-enable-readline.patch new file mode 100644 index 0000000000..4445e8ac68 --- /dev/null +++ b/mingw-w64-postgresql/postgresql-9.4.1-mingw-enable-readline.patch @@ -0,0 +1,19 @@ +--- postgresql-9.4.1/configure.in.orig 2015-02-10 21:59:27.222800000 +0300 ++++ postgresql-9.4.1/configure.in 2015-02-10 22:00:30.637800000 +0300 +@@ -691,16 +691,6 @@ + # + PGAC_ARG_BOOL(with, readline, yes, + [do not use GNU Readline nor BSD Libedit for editing]) +-# readline on MinGW has problems with backslashes in psql and other bugs. +-# This is particularly a problem with non-US code pages. +-# Therefore disable its use until we understand the cause. 2004-07-20 +-if test "$PORTNAME" = "win32"; then +- if test "$with_readline" = yes; then +- AC_MSG_WARN([*** Readline does not work on MinGW --- disabling]) +- with_readline=no +- fi +-fi +- + + # + # Prefer libedit diff --git a/mingw-w64-postgresql/postgresql-9.4.1-mingw-link.patch b/mingw-w64-postgresql/postgresql-9.4.1-mingw-link.patch new file mode 100644 index 0000000000..86b57c6a3f --- /dev/null +++ b/mingw-w64-postgresql/postgresql-9.4.1-mingw-link.patch @@ -0,0 +1,52 @@ +--- postgresql-9.4.1/src/Makefile.shlib.orig 2015-02-10 19:14:10.984800000 +0300 ++++ postgresql-9.4.1/src/Makefile.shlib 2015-02-10 19:14:16.554000000 +0300 +@@ -86,7 +86,7 @@ + # Naming convention for dynamically loadable modules + shlib = $(NAME)$(DLSUFFIX) + endif +-stlib = lib$(NAME).a ++stlib = lib$(NAME).dll.a + + ifndef soname + # additional flags for backend modules +--- postgresql-9.4.1/src/backend/Makefile.orig 2015-02-10 21:01:34.928800000 +0300 ++++ postgresql-9.4.1/src/backend/Makefile 2015-02-10 21:03:43.819000000 +0300 +@@ -79,9 +79,9 @@ + LIBS += -lsecur32 + + postgres: $(OBJS) $(WIN32RES) +- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LIBS) -o $@$(X) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.dll.a $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LIBS) -o $@$(X) + +-libpostgres.a: postgres ; ++libpostgres.dll.a: postgres ; + + endif # win32 + +@@ -207,7 +207,7 @@ + endif + ifeq ($(PORTNAME), win32) + ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' ++ $(INSTALL_DATA) libpostgres.dll.a '$(DESTDIR)$(libdir)/libpostgres.dll.a' + endif + endif + $(MAKE) -C catalog install-data +@@ -265,7 +265,7 @@ + endif + ifeq ($(PORTNAME), win32) + ifeq ($(MAKE_DLL), true) +- rm -f '$(DESTDIR)$(libdir)/libpostgres.a' ++ rm -f '$(DESTDIR)$(libdir)/libpostgres.dll.a' + endif + endif + $(MAKE) -C catalog uninstall-data +@@ -288,7 +288,7 @@ + rm -f postgres.dll libpostgres.a + endif + ifeq ($(PORTNAME), win32) +- rm -f postgres.dll libpostgres.a $(WIN32RES) ++ rm -f postgres.dll libpostgres.dll.a $(WIN32RES) + endif + + distclean: clean diff --git a/mingw-w64-postgresql/postgresql-9.4.1-pl-perl.patch b/mingw-w64-postgresql/postgresql-9.4.1-pl-perl.patch new file mode 100644 index 0000000000..dd8c2314f4 --- /dev/null +++ b/mingw-w64-postgresql/postgresql-9.4.1-pl-perl.patch @@ -0,0 +1,40 @@ +--- postgresql-9.4.1/src/pl/plperl/GNUmakefile.orig 2015-02-10 21:34:31.287600000 +0300 ++++ postgresql-9.4.1/src/pl/plperl/GNUmakefile 2015-02-10 21:35:06.732800000 +0300 +@@ -36,27 +36,6 @@ + + PERLCHUNKS = plc_perlboot.pl plc_trusted.pl + +-# Perl on win32 ships with import libraries only for Microsoft Visual C++, +-# which are not compatible with mingw gcc. Therefore we need to build a +-# new import library to link with. +-ifeq ($(PORTNAME), win32) +- +-perlwithver := $(subst -l,,$(filter -l%, $(perl_embed_ldflags))) +-PERLDLL := $(dir $(subst ',,$(PERL)))$(perlwithver).dll +-# we no longer want to include the original -l spec in SHLIB_LINK +-override perl_embed_ldflags := +- +-OBJS += lib$(perlwithver).a +- +-lib$(perlwithver).a: $(perlwithver).def +- dlltool --dllname $(perlwithver).dll --def $(perlwithver).def --output-lib lib$(perlwithver).a +- +-$(perlwithver).def: $(PERLDLL) +- pexports $^ > $@ +- +-endif # win32 +- +- + SHLIB_LINK = $(perl_embed_ldflags) + + REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-extension=plperl --load-extension=plperlu +@@ -126,9 +105,6 @@ + clean distclean maintainer-clean: clean-lib + rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h + rm -rf $(pg_regress_clean_files) +-ifeq ($(PORTNAME), win32) +- rm -f $(perlwithver).def +-endif + + else # can't build + diff --git a/mingw-w64-postgresql/postgresql-9.4.1-pl-python.patch b/mingw-w64-postgresql/postgresql-9.4.1-pl-python.patch new file mode 100644 index 0000000000..aa2aabda39 --- /dev/null +++ b/mingw-w64-postgresql/postgresql-9.4.1-pl-python.patch @@ -0,0 +1,48 @@ +--- postgresql-9.4.1/src/pl/plpython/Makefile.orig 2015-02-02 23:42:55.000000000 +0300 ++++ postgresql-9.4.1/src/pl/plpython/Makefile 2015-02-10 21:33:26.353400000 +0300 +@@ -27,8 +27,6 @@ + # and we have to remove -lpython from the link since we are building our own + ifeq ($(PORTNAME), win32) + shared_libpython = yes +-python_includespec := $(subst \,/,$(python_includespec)) +-override python_libspec = + endif + + # If we don't have a shared library, we have to skip it. +@@ -59,26 +57,6 @@ + DATA += plpythonu.control plpythonu--1.0.sql plpythonu--unpackaged--1.0.sql + endif + +- +-# Python on win32 ships with import libraries only for Microsoft Visual C++, +-# which are not compatible with mingw gcc. Therefore we need to build a +-# new import library to link with. +-ifeq ($(PORTNAME), win32) +- +-pytverstr=$(subst .,,${python_version}) +-PYTHONDLL=$(subst \,/,$(WINDIR))/system32/python${pytverstr}.dll +- +-OBJS += libpython${pytverstr}.a +- +-libpython${pytverstr}.a: python${pytverstr}.def +- dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a +- +-python${pytverstr}.def: +- pexports $(PYTHONDLL) > $@ +- +-endif # win32 +- +- + SHLIB_LINK = $(python_libspec) $(python_additional_libs) $(filter -lintl,$(LIBS)) + + REGRESS_OPTS = --dbname=$(PL_TESTDB) +@@ -187,9 +165,6 @@ + clean distclean: clean-lib + rm -f $(OBJS) + rm -rf $(pg_regress_clean_files) +-ifeq ($(PORTNAME), win32) +- rm -f python${pytverstr}.def +-endif + + else # can't build + diff --git a/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch b/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch new file mode 100644 index 0000000000..99e62633a9 --- /dev/null +++ b/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch @@ -0,0 +1,48 @@ +--- postgresql-9.4.1/src/pl/tcl/Makefile.orig 2015-02-10 21:23:07.259800000 +0300 ++++ postgresql-9.4.1/src/pl/tcl/Makefile 2015-02-10 21:24:31.189800000 +0300 +@@ -29,9 +29,10 @@ + endif + + ++SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) + # On Windows, we don't link directly with the Tcl library; see below + ifneq ($(PORTNAME), win32) +-SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) -lc ++SHLIB_LINK += -lc + endif + + +@@ -47,25 +48,6 @@ + # where to find psql for running the tests + PSQLDIR = $(bindir) + +-# Tcl on win32 ships with import libraries only for Microsoft Visual C++, +-# which are not compatible with mingw gcc. Therefore we need to build a +-# new import library to link with. +-ifeq ($(PORTNAME), win32) +- +-tclwithver = $(subst -l,,$(filter -l%, $(TCL_LIB_SPEC))) +-TCLDLL = $(dir $(TCLSH))/$(tclwithver).dll +- +-OBJS += lib$(tclwithver).a +- +-lib$(tclwithver).a: $(tclwithver).def +- dlltool --dllname $(tclwithver).dll --def $(tclwithver).def --output-lib lib$(tclwithver).a +- +-$(tclwithver).def: $(TCLDLL) +- pexports $^ > $@ +- +-endif # win32 +- +- + include $(top_srcdir)/src/Makefile.shlib + + ifeq ($(TCL_SHARED_BUILD), 1) +@@ -116,7 +98,4 @@ + clean distclean maintainer-clean: clean-lib + rm -f $(OBJS) + rm -rf $(pg_regress_clean_files) +-ifeq ($(PORTNAME), win32) +- rm -f $(tclwithver).def +-endif + $(MAKE) -C modules $@ diff --git a/mingw-w64-postr/PKGBUILD b/mingw-w64-postr/PKGBUILD index f58af9c9ba..d8e9a3120a 100644 --- a/mingw-w64-postr/PKGBUILD +++ b/mingw-w64-postr/PKGBUILD @@ -2,19 +2,20 @@ _realname=postr pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.13 +pkgver=0.13.1 pkgrel=1 arch=('any') pkgdesc="Upload photos to Flickr (mingw-w64)" options=(strip staticlibs) depends=("${MINGW_PACKAGE_PREFIX}-python2-pygtk") -makedepends=("${MINGW_PACKAGE_PREFIX}-gnome-doc-utils") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "gnome-doc-utils") options=('strip' 'staticlibs') license=("GPL 2") url="http://www.gnome.org" -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver}/${_realname}-$pkgver.tar.xz +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz 001-win.patch) -sha256sums=('3d5d4515892c8b81494257d7fc35d1c13a857bbdaf7b01ba67bde62ebddb962c' +sha256sums=('8b004d108ebe18e0399f8a20282f129a3c8c9b6615322479d0e01918c6b42fbc' '7f963d3703a7e0fc678622a69961a6dabb00af050086520fd122fdcc37fbc292') prepare() { @@ -26,20 +27,23 @@ prepare() { } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/share/pkgconfig" \ ../${_realname}-${pkgver}/configure \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --libexecdir=${MINGW_PREFIX}/lib + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install rm ${pkgdir}/postrExtension.py } diff --git a/mingw-w64-premake/PKGBUILD b/mingw-w64-premake/PKGBUILD new file mode 100644 index 0000000000..73245ebbd7 --- /dev/null +++ b/mingw-w64-premake/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Martell Malone + +_realname=premake +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=4.3 +pkgrel=2 +pkgdesc="A build configuration tool. Describe your build using Lua and generate \ +the project files for your specific toolset (mingw-w64)" +arch=('any') +url="http://premake.sourceforge.net" +license=('GPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://downloads.sourceforge.net/sourceforge/premake/premake-${pkgver}-src.zip") +md5sums=('8cfafee76f9665c93b2e9ad15b015eb7') + +build() { + cd "${srcdir}/${_realname}-${pkgver}/build/gmake.windows" + CC=${MINGW_PREFIX}/bin/gcc make +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + install -Dm755 bin/release/premake4 ${pkgdir}${MINGW_PREFIX}/bin/premake4 +} diff --git a/mingw-w64-proj/PKGBUILD b/mingw-w64-proj/PKGBUILD index 0cda33103e..541506e651 100644 --- a/mingw-w64-proj/PKGBUILD +++ b/mingw-w64-proj/PKGBUILD @@ -1,40 +1,40 @@ # Maintainer: Alexey Pavlov _realname=proj - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.8.0 +pkgver=4.9.2 pkgrel=1 pkgdesc="Cartographic projection software (PROJ.4) (mingw-w64)" arch=(any) url="http://proj.osgeo.org" license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libtool") options=('staticlibs' 'strip') source=("http://download.osgeo.org/proj/${_realname}-${pkgver}.tar.gz") -md5sums=('d815838c92a29179298c126effbb1537') +md5sums=('9843131676e31bbd903d60ae7dc76cf9') prepare() { cd "${srcdir}/${_realname}-${pkgver}" } build() { - [[ -d "$srcdir/build-${MINGW_CHOST}" ]] && rm -rf "$srcdir/build-${MINGW_CHOST}" - mkdir "$srcdir/build-${MINGW_CHOST}" - cd "$srcdir/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} - make + + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-protobuf-c/PKGBUILD b/mingw-w64-protobuf-c/PKGBUILD index 42f9e3fc80..b40157880e 100644 --- a/mingw-w64-protobuf-c/PKGBUILD +++ b/mingw-w64-protobuf-c/PKGBUILD @@ -2,27 +2,26 @@ _realname=protobuf-c pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.2 -pkgrel=1 +pkgver=1.1.1 +pkgrel=2 pkgdesc="Protocol Buffers implementation in C (mingw-w64)" arch=('any') url="https://github.com/protobuf-c/protobuf-c" license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-protobuf") -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') -source=("$url/releases/download/v$pkgver/${_realname}-$pkgver.tar.gz") -md5sums=('42f03767ddbd1dbe26cce10bc6e08c84') +source=("$url/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz") +md5sums=('41d437677ea16f9d3611d98841c4af3b') prepare() { cd "${srcdir}/${_realname}-${pkgver}" } build() { - [[ -d "$srcdir/build-${MINGW_CHOST}" ]] && rm -rf "$srcdir/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir build-${MINGW_CHOST} - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ @@ -32,12 +31,12 @@ build() { } check() { - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-protobuf/PKGBUILD b/mingw-w64-protobuf/PKGBUILD index e4bc9f5c75..40df6c84a1 100644 --- a/mingw-w64-protobuf/PKGBUILD +++ b/mingw-w64-protobuf/PKGBUILD @@ -3,16 +3,15 @@ _realname=protobuf pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.6.1 -pkgrel=1 +pkgrel=2 pkgdesc="Protocol Buffers - Google's data interchange format (mingw-w64)" arch=('any') url='https://developers.google.com/protocol-buffers/' license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-zlib") -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2-setuptools") options=('staticlibs' 'strip') -source=(https://github.com/google/protobuf/releases/download/$pkgver/protobuf-$pkgver.tar.bz2) +source=(https://github.com/google/protobuf/releases/download/v${pkgver}/protobuf-${pkgver}.tar.bz2) md5sums=('11aaac2d704eef8efd1867a807865d85') prepare() { @@ -20,9 +19,9 @@ prepare() { } build() { - [[ -d "$srcdir/build-${MINGW_CHOST}" ]] && rm -rf "$srcdir/build-${MINGW_CHOST}" + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" ./configure \ --prefix=${MINGW_PREFIX} \ @@ -32,16 +31,16 @@ build() { } check() { - cd "$srcdir/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" make check } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE - + #cd python #MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - #${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" + #${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" } diff --git a/mingw-w64-putty-ssh/PKGBUILD b/mingw-w64-putty-ssh/PKGBUILD index 2f2b3aadf0..ee092c32db 100644 --- a/mingw-w64-putty-ssh/PKGBUILD +++ b/mingw-w64-putty-ssh/PKGBUILD @@ -5,7 +5,7 @@ _realname=putty-ssh pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.0 -pkgrel=1 +pkgrel=3 pkgdesc="A wrapper around plink with some nice features (mingw-w64)" arch=('any') url="http://www.wischik.com/lu/programmer/unison-ssh.html" @@ -13,7 +13,7 @@ license=('unknown') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "unzip") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-putty-svn") + "${MINGW_PACKAGE_PREFIX}-putty") source=("http://www.wischik.com/lu/programmer/unison-ssh.zip") md5sums=('7ca1ddb5e056e9d4b94cf70020b870ff') @@ -29,5 +29,5 @@ build() { package() { cd "${srcdir}" - install -D -m755 plink-ssh.exe "${pkgdir}"/${MINGW_PREFIX}/bin/plink-ssh.exe + install -D -m755 plink-ssh.exe "${pkgdir}"${MINGW_PREFIX}/bin/plink-ssh.exe } diff --git a/mingw-w64-putty/0001-fixes.patch b/mingw-w64-putty/0001-fixes.patch index a0629d73cc..b59f271ac8 100644 --- a/mingw-w64-putty/0001-fixes.patch +++ b/mingw-w64-putty/0001-fixes.patch @@ -1,8 +1,18 @@ -Index: misc.c -=================================================================== ---- misc.c (revision 10285) -+++ misc.c (working copy) -@@ -834,7 +834,7 @@ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/import.c putty/import.c +--- putty-master/import.c 2015-08-02 17:28:36.749565700 +0200 ++++ putty/import.c 2015-08-02 17:57:55.831937400 +0200 +@@ -886,6 +886,7 @@ + + } else { + assert(0 && "Bad key type from load_openssh_pem_key"); ++ return NULL; + } + + /* +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/misc.c putty/misc.c +--- putty-master/misc.c 2015-08-02 17:59:19.328191000 +0200 ++++ putty/misc.c 2015-08-02 17:46:44.676074600 +0200 +@@ -853,7 +853,7 @@ if (L) { int delta; debug_printf("\t%d (0x%x) bytes:\n", len, len); @@ -11,10 +21,9 @@ Index: misc.c p -= delta; len += delta; } -Index: mkfiles.pl -=================================================================== ---- mkfiles.pl (revision 10285) -+++ mkfiles.pl (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/mkfiles.pl putty/mkfiles.pl +--- putty-master/mkfiles.pl 2015-08-02 17:59:19.333189500 +0200 ++++ putty/mkfiles.pl 2015-08-02 17:46:44.682078000 +0200 @@ -453,11 +453,11 @@ "# You may also need to tell windres where to find include files:\n". "# RCINC = --include-dir c:\\cygwin\\include\\\n". @@ -29,23 +38,58 @@ Index: mkfiles.pl &splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ". "--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n". "\n". -Index: windows/wincons.c -=================================================================== ---- windows/wincons.c (revision 10285) -+++ windows/wincons.c (working copy) -@@ -306,7 +306,7 @@ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/ssh.c putty/ssh.c +--- putty-master/ssh.c 2015-08-02 17:28:36.805573600 +0200 ++++ putty/ssh.c 2015-08-02 17:54:52.614977600 +0200 +@@ -6190,13 +6190,14 @@ + *list, const char *name) + { + int i; +- ++ + for (i = 0; i < MAXKEXLIST; i++) + if (list[i].name == NULL || list[i].name == name) { + list[i].name = name; + return &list[i]; + } + assert(!"No space in KEXINIT list"); ++ return NULL; + } - int console_get_userpass_input(prompts_t *p, unsigned char *in, int inlen) + /* +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/sshbn.h putty/sshbn.h +--- putty-master/sshbn.h 2015-08-02 17:26:41.384304900 +0200 ++++ putty/sshbn.h 2015-08-02 17:50:46.359750500 +0200 +@@ -1,3 +1,5 @@ ++#include ++ + /* + * sshbn.h: the assorted conditional definitions of BignumInt and + * multiply/divide macros used throughout the bignum code to treat +@@ -26,7 +28,7 @@ + * using the same 'two machine registers' kind of code generation that + * 32-bit targets use for 64-bit ints. If we have one of these, we can + * use a 64-bit BignumInt and a 128-bit BignumDblInt. */ +-typedef __uint64_t BignumInt; ++typedef uint64_t BignumInt; + typedef __uint128_t BignumDblInt; + #define BIGNUM_INT_MASK 0xFFFFFFFFFFFFFFFFULL + #define BIGNUM_TOP_BIT 0x8000000000000000ULL +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/wincons.c putty/windows/wincons.c +--- putty-master/windows/wincons.c 2015-08-02 17:59:19.347186300 +0200 ++++ putty/windows/wincons.c 2015-08-02 17:46:44.688076200 +0200 +@@ -307,7 +307,7 @@ + int console_get_userpass_input(prompts_t *p, + const unsigned char *in, int inlen) { - HANDLE hin, hout; + HANDLE hin = NULL, hout = NULL; size_t curr_prompt; /* -Index: windows/winctrls.c -=================================================================== ---- windows/winctrls.c (revision 10285) -+++ windows/winctrls.c (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winctrls.c putty/windows/winctrls.c +--- putty-master/windows/winctrls.c 2015-08-02 17:59:19.351185400 +0200 ++++ putty/windows/winctrls.c 2015-08-02 17:46:44.694075200 +0200 @@ -76,7 +76,7 @@ if (cp->hwnd) { ctl = CreateWindowEx(exstyle, wclass, wtext, wstyle, @@ -100,11 +144,37 @@ Index: windows/winctrls.c int width, nlines, j; INT *pwidths, nfit; SIZE size; -Index: windows/windlg.c -=================================================================== ---- windows/windlg.c (revision 10285) -+++ windows/windlg.c (working copy) -@@ -654,7 +654,7 @@ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/windlg.c putty/windows/windlg.c +--- putty-master/windows/windlg.c 2015-08-02 17:59:19.354191000 +0200 ++++ putty/windows/windlg.c 2015-08-02 17:46:44.702076500 +0200 +@@ -209,7 +209,7 @@ + case IDA_LICENCE: + EnableWindow(hwnd, 0); + DialogBox(hinst, MAKEINTRESOURCE(IDD_LICENCEBOX), +- hwnd, LicenceProc); ++ hwnd, (DLGPROC)LicenceProc); + EnableWindow(hwnd, 1); + SetActiveWindow(hwnd); + return 0; +@@ -640,7 +640,7 @@ + void modal_about_box(HWND hwnd) + { + EnableWindow(hwnd, 0); +- DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc); ++ DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, (DLGPROC)AboutProc); + EnableWindow(hwnd, 1); + SetActiveWindow(hwnd); + } +@@ -660,7 +660,7 @@ + { + HWND hwnd; + hwnd = CreateDialog(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), +- NULL, NullDlgProc); ++ NULL, (DLGPROC)NullDlgProc); + ShowWindow(hwnd, SW_HIDE); + SetActiveWindow(hwnd); + DestroyWindow(hwnd); +@@ -687,7 +687,7 @@ ret = SaneDialogBox(hinst, MAKEINTRESOURCE(IDD_MAINBOX), NULL, @@ -113,7 +183,7 @@ Index: windows/windlg.c ctrl_free_box(ctrlbox); winctrl_cleanup(&ctrls_panel); -@@ -687,7 +687,7 @@ +@@ -720,7 +720,7 @@ dp.shortcuts['g'] = TRUE; /* the treeview: `Cate&gory' */ ret = SaneDialogBox(hinst, MAKEINTRESOURCE(IDD_MAINBOX), NULL, @@ -122,29 +192,46 @@ Index: windows/windlg.c ctrl_free_box(ctrlbox); winctrl_cleanup(&ctrls_base); -Index: windows/window.c -=================================================================== ---- windows/window.c (revision 10285) -+++ windows/window.c (working copy) -@@ -803,7 +803,7 @@ +@@ -767,7 +767,7 @@ + { + if (!logbox) { + logbox = CreateDialog(hinst, MAKEINTRESOURCE(IDD_LOGBOX), +- hwnd, LogProc); ++ hwnd, (DLGPROC)LogProc); + ShowWindow(logbox, SW_SHOWNORMAL); + } + SetActiveWindow(logbox); +@@ -775,7 +775,7 @@ + + void showabout(HWND hwnd) + { +- DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc); ++ DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, (DLGPROC)AboutProc); + } + + int verify_ssh_host_key(void *frontend, char *host, int port, +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/window.c putty/windows/window.c +--- putty-master/windows/window.c 2015-08-02 17:59:19.359192900 +0200 ++++ putty/windows/window.c 2015-08-02 17:46:44.709075700 +0200 +@@ -811,7 +811,7 @@ AppendMenu(m, MF_SEPARATOR, 0, 0); AppendMenu(m, MF_ENABLED, IDM_NEWSESS, "Ne&w Session..."); AppendMenu(m, MF_ENABLED, IDM_DUPSESS, "&Duplicate Session"); - AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT) savedsess_menu, -+ AppendMenu(m, MF_POPUP | MF_ENABLED, savedsess_menu, ++ AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT_PTR)savedsess_menu, "Sa&ved Sessions"); AppendMenu(m, MF_ENABLED, IDM_RECONF, "Chan&ge Settings..."); AppendMenu(m, MF_SEPARATOR, 0, 0); -@@ -1008,7 +1008,7 @@ +@@ -1038,7 +1038,7 @@ saved_menu = new_menu; /* XXX lame stacking */ new_menu = CreatePopupMenu(); AppendMenu(saved_menu, MF_POPUP | MF_ENABLED, - (UINT) new_menu, specials[i].name); -+ new_menu, specials[i].name); ++ (UINT_PTR)new_menu, specials[i].name); break; case TS_EXITMENU: nesting--; -@@ -1033,13 +1033,13 @@ +@@ -1063,13 +1063,13 @@ for (j = 0; j < lenof(popup_menus); j++) { if (specials_menu) { /* XXX does this free up all submenus? */ @@ -156,11 +243,11 @@ Index: windows/window.c InsertMenu(popup_menus[j].menu, IDM_SHOWLOG, MF_BYCOMMAND | MF_POPUP | MF_ENABLED, - (UINT) new_menu, "S&pecial Command"); -+ new_menu, "S&pecial Command"); ++ (UINT_PTR)new_menu, "S&pecial Command"); InsertMenu(popup_menus[j].menu, IDM_SHOWLOG, MF_BYCOMMAND | MF_SEPARATOR, IDM_SPECIALSEP, 0); } -@@ -1069,6 +1069,7 @@ +@@ -1099,6 +1099,7 @@ break; default: assert(0); @@ -168,7 +255,7 @@ Index: windows/window.c } { HCURSOR cursor = LoadCursor(NULL, curstype); -@@ -1486,7 +1487,7 @@ +@@ -1516,7 +1517,7 @@ if (cset == OEM_CHARSET) ucsdata.font_codepage = GetOEMCP(); else @@ -177,7 +264,7 @@ Index: windows/window.c ucsdata.font_codepage = info.ciACP; else ucsdata.font_codepage = -1; -@@ -3086,7 +3087,7 @@ +@@ -3117,7 +3118,7 @@ */ term_seen_key_event(term); if (ldisc) @@ -186,7 +273,7 @@ Index: windows/window.c show_mouseptr(0); } } -@@ -3160,7 +3161,7 @@ +@@ -3191,7 +3192,7 @@ buf[0] = wParam >> 8; term_seen_key_event(term); if (ldisc) @@ -195,7 +282,7 @@ Index: windows/window.c } else { char c = (unsigned char) wParam; term_seen_key_event(term); -@@ -4548,7 +4549,7 @@ +@@ -4590,7 +4591,7 @@ break; } if (xkey) { @@ -204,11 +291,22 @@ Index: windows/window.c return p - output; } } -Index: windows/winhandl.c -=================================================================== ---- windows/winhandl.c (revision 10285) -+++ windows/winhandl.c (working copy) -@@ -379,9 +379,9 @@ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/wingss.c putty/windows/wingss.c +--- putty-master/windows/wingss.c 2015-08-02 17:59:19.361188200 +0200 ++++ putty/windows/wingss.c 2015-08-02 17:46:44.717077800 +0200 +@@ -91,7 +91,7 @@ + if (ret == ERROR_SUCCESS && type == REG_SZ) { + buffer = snewn(size + 20, char); + ret = RegQueryValueEx(regkey, "InstallDir", NULL, +- &type, buffer, &size); ++ &type, (LPBYTE)buffer, &size); + if (ret == ERROR_SUCCESS && type == REG_SZ) { + strcat(buffer, "\\bin\\gssapi32.dll"); + module = LoadLibrary(buffer); +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winhandl.c putty/windows/winhandl.c +--- putty-master/windows/winhandl.c 2015-08-02 17:59:19.363189300 +0200 ++++ putty/windows/winhandl.c 2015-08-02 17:46:44.724079700 +0200 +@@ -411,9 +411,9 @@ struct handle *a = (struct handle *)av; struct handle *b = (struct handle *)bv; @@ -220,7 +318,7 @@ Index: windows/winhandl.c return +1; else return 0; -@@ -392,9 +392,9 @@ +@@ -424,9 +424,9 @@ HANDLE *a = (HANDLE *)av; struct handle *b = (struct handle *)bv; @@ -232,23 +330,21 @@ Index: windows/winhandl.c return +1; else return 0; -Index: windows/winhelp.c -=================================================================== ---- windows/winhelp.c (revision 10285) -+++ windows/winhelp.c (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winhelp.c putty/windows/winhelp.c +--- putty-master/windows/winhelp.c 2015-08-02 17:59:19.366189800 +0200 ++++ putty/windows/winhelp.c 2015-08-02 17:46:44.730080700 +0200 @@ -105,7 +105,7 @@ #endif /* NO_HTMLHELP */ if (help_path) { char *cmd = dupprintf("JI(`',`%.*s')", colonpos, topic); - WinHelp(hwnd, help_path, HELP_COMMAND, (DWORD)cmd); -+ WinHelp(hwnd, help_path, HELP_COMMAND, cmd); ++ WinHelp(hwnd, help_path, HELP_COMMAND, (LPARAM)cmd); sfree(cmd); } } else { -Index: windows/winjump.c -=================================================================== ---- windows/winjump.c (revision 10285) -+++ windows/winjump.c (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winjump.c putty/windows/winjump.c +--- putty-master/windows/winjump.c 2015-08-02 17:59:19.368190100 +0200 ++++ putty/windows/winjump.c 2015-08-02 17:46:44.737079900 +0200 @@ -441,7 +441,7 @@ sessionname, "'", NULL); } else { @@ -267,26 +363,40 @@ Index: windows/winjump.c } pPS->lpVtbl->SetValue(pPS, &PKEY_Title, &pv); sfree(pv.pszVal); -Index: windows/winmisc.c -=================================================================== ---- windows/winmisc.c (revision 10285) -+++ windows/winmisc.c (working copy) -@@ -218,9 +218,10 @@ - FORMAT_MESSAGE_IGNORE_INSERTS), NULL, error, +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winmisc.c putty/windows/winmisc.c +--- putty-master/windows/winmisc.c 2015-08-02 17:59:19.376191400 +0200 ++++ putty/windows/winmisc.c 2015-08-02 17:51:17.283749800 +0200 +@@ -220,7 +220,7 @@ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), msgtext, lenof(msgtext)-1, NULL)) { -+ GetLastError(); sprintf(msgtext, - "(unable to format: FormatMessage returned %d)", -- error, GetLastError()); -+ error); +- "(unable to format: FormatMessage returned %d)", ++ "(unable to format: FormatMessage returned %lu)", + GetLastError()); } else { int len = strlen(msgtext); - if (len > 0 && msgtext[len-1] == '\n') -Index: windows/winnet.c -=================================================================== ---- windows/winnet.c (revision 10285) -+++ windows/winnet.c (working copy) +@@ -270,15 +270,15 @@ + + /* + * Design: +- * ++ * + * We start by reserving as much virtual address space as Windows + * will sensibly (or not sensibly) let us have. We flag it all as + * invalid memory. +- * ++ * + * Any allocation attempt is satisfied by committing one or more + * pages, with an uncommitted page on either side. The returned + * memory region is jammed up against the _end_ of the pages. +- * ++ * + * Freeing anything causes instantaneous decommitment of the pages + * involved, so stale pointers are caught as soon as possible. + */ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winnet.c putty/windows/winnet.c +--- putty-master/windows/winnet.c 2015-08-02 17:59:19.381189500 +0200 ++++ putty/windows/winnet.c 2015-08-02 17:55:27.839358100 +0200 @@ -138,7 +138,7 @@ static int cmpforsearch(void *av, void *bv) { @@ -296,7 +406,7 @@ Index: windows/winnet.c if (as < bs) return -1; if (as > bs) -@@ -472,7 +472,7 @@ +@@ -478,7 +478,7 @@ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), es->text + bufused, bufsize - bufused, NULL)) { sprintf(es->text + bufused, @@ -305,70 +415,263 @@ Index: windows/winnet.c error, GetLastError()); } else { int len = strlen(es->text); -Index: windows/winpgen.c -=================================================================== ---- windows/winpgen.c (revision 10285) -+++ windows/winpgen.c (working copy) -@@ -846,7 +846,7 @@ +@@ -1658,7 +1658,7 @@ + ret = p_recv(s->s, buf, sizeof(buf), MSG_OOB); + noise_ultralight(ret); + if (ret <= 0) { +- char *str = (ret == 0 ? "Internal networking trouble" : ++ const char *str = (ret == 0 ? "Internal networking trouble" : + winsock_error_string(p_WSAGetLastError())); + /* We're inside the Windows frontend here, so we know + * that the frontend handle is unnecessary. */ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winpgen.c putty/windows/winpgen.c +--- putty-master/windows/winpgen.c 2015-08-02 17:59:19.389193100 +0200 ++++ putty/windows/winpgen.c 2015-08-02 17:46:44.758079800 +0200 +@@ -302,7 +302,7 @@ + return 0; + case 101: + EnableWindow(hwnd, 0); +- DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, LicenceProc); ++ DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, (DLGPROC)LicenceProc); + EnableWindow(hwnd, 1); + SetActiveWindow(hwnd); + return 0; +@@ -624,7 +624,7 @@ + pps.comment = comment; + dlgret = DialogBoxParam(hinst, + MAKEINTRESOURCE(210), +- NULL, PassphraseProc, ++ NULL, (DLGPROC)PassphraseProc, + (LPARAM) &pps); + if (!dlgret) { + ret = -2; +@@ -790,7 +790,7 @@ AppendMenu(menu1, MF_ENABLED, IDC_SAVE, "&Save private key"); AppendMenu(menu1, MF_SEPARATOR, 0, 0); AppendMenu(menu1, MF_ENABLED, IDC_QUIT, "E&xit"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, "&File"); -+ AppendMenu(menu, MF_POPUP | MF_ENABLED, menu1, "&File"); ++ AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR)menu1, "&File"); state->filemenu = menu1; menu1 = CreateMenu(); -@@ -855,7 +855,7 @@ - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH1, "SSH-&1 key (RSA)"); - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2RSA, "SSH-2 &RSA key"); +@@ -801,7 +801,7 @@ AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2DSA, "SSH-2 &DSA key"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ECDSA, "SSH-2 &ECDSA key"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ED25519, "SSH-2 ED&25519 key"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, "&Key"); -+ AppendMenu(menu, MF_POPUP | MF_ENABLED, menu1, "&Key"); ++ AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&Key"); state->keymenu = menu1; menu1 = CreateMenu(); -@@ -865,7 +865,7 @@ - "Export &OpenSSH key"); +@@ -813,7 +813,7 @@ + "Export &OpenSSH key (force new file format)"); AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_SSHCOM, "Export &ssh.com key"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, -+ AppendMenu(menu, MF_POPUP | MF_ENABLED, menu1, ++ AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR)menu1, "Con&versions"); state->cvtmenu = menu1; -@@ -873,7 +873,7 @@ +@@ -821,7 +821,7 @@ AppendMenu(menu1, MF_ENABLED, IDC_ABOUT, "&About"); if (has_help()) AppendMenu(menu1, MF_ENABLED, IDC_GIVEHELP, "&Help"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, "&Help"); -+ AppendMenu(menu, MF_POPUP | MF_ENABLED, menu1, "&Help"); ++ AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR)menu1, "&Help"); SetMenu(hwnd, menu); } -Index: windows/winpgnt.c -=================================================================== ---- windows/winpgnt.c (revision 10285) -+++ windows/winpgnt.c (working copy) -@@ -1022,7 +1022,7 @@ - key = find234(ssh2keys, &b, cmpkeys_ssh2_asymm); - if (!key) - goto failure; -- signature = key->alg->sign(key->data, data, datalen, &siglen); -+ signature = key->alg->sign(key->data, (char *)data, datalen, &siglen); - len = 5 + 4 + siglen; - PUT_32BIT(ret, len - 4); - ret[4] = SSH2_AGENT_SIGN_RESPONSE; -@@ -1121,7 +1121,8 @@ - */ - { - struct ssh2_userkey *key; -- char *comment, *alg; -+ char *comment; -+ unsigned char *alg; - int alglen, commlen; - int bloblen; +@@ -1002,7 +1002,7 @@ + break; + case IDC_ABOUT: + EnableWindow(hwnd, 0); +- DialogBox(hinst, MAKEINTRESOURCE(213), hwnd, AboutProc); ++ DialogBox(hinst, MAKEINTRESOURCE(213), hwnd, (DLGPROC)AboutProc); + EnableWindow(hwnd, 1); + SetActiveWindow(hwnd); + return 0; +@@ -1468,7 +1468,7 @@ + } -@@ -1756,7 +1757,6 @@ + random_ref(); +- ret = DialogBox(hinst, MAKEINTRESOURCE(201), NULL, MainDlgProc) != IDOK; ++ ret = DialogBox(hinst, MAKEINTRESOURCE(201), NULL, (DLGPROC)MainDlgProc) != IDOK; + + cleanup_exit(ret); + return ret; /* just in case optimiser complains */ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winpgnt.c putty/windows/winpgnt.c +--- putty-master/windows/winpgnt.c 2015-08-02 17:59:19.394192000 +0200 ++++ putty/windows/winpgnt.c 2015-08-02 17:51:52.048702400 +0200 +@@ -117,7 +117,7 @@ + char *comment; + }; + +-/* ++/* + * Dialog-box function for the Licence box. + */ + static int CALLBACK LicenceProc(HWND hwnd, UINT msg, +@@ -160,7 +160,7 @@ + return 0; + case 101: + EnableWindow(hwnd, 0); +- DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, LicenceProc); ++ DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, (DLGPROC)LicenceProc); + EnableWindow(hwnd, 1); + SetActiveWindow(hwnd); + return 0; +@@ -291,7 +291,7 @@ + } + for (i = 0; NULL != (skey = pageant_nth_ssh2_key(i)); i++) { + char *listentry, *p; +- int pos, fp_len; ++ int pos; + /* + * Replace spaces with tabs in the fingerprint prefix, for + * nice alignment in the list box, until we encounter a : +@@ -299,7 +299,6 @@ + */ + p = ssh2_fingerprint(skey->alg, skey->data); + listentry = dupprintf("%s\t%s", p, skey->comment); +- fp_len = strlen(listentry); + sfree(p); + + pos = 0; +@@ -324,7 +323,7 @@ + unsigned msglen; + void *reply; + int replylen; +- ++ + msglen = GET_32BIT(msg); + if (msglen > AGENT_MAX_MSGLEN) { + reply = pageant_failure_msg(&replylen); +@@ -334,7 +333,7 @@ + smemclr(reply, replylen); + sfree(reply); + reply = pageant_failure_msg(&replylen); +- } ++ } + } + + /* +@@ -344,10 +343,10 @@ + memcpy(msg, reply, replylen); + smemclr(reply, replylen); + sfree(reply); +-} ++ } + + static void win_add_keyfile(Filename *filename) +-{ ++ { + char *err; + int ret; + char *passphrase = NULL; +@@ -362,35 +361,35 @@ + goto done; + } else if (ret == PAGEANT_ACTION_FAILURE) { + goto error; +- } ++ } + + /* + * OK, a passphrase is needed, and we've been given the key + * comment to use in the passphrase prompt. + */ + while (1) { +- int dlgret; +- struct PassphraseProcStruct pps; ++ int dlgret; ++ struct PassphraseProcStruct pps; + +- pps.passphrase = &passphrase; ++ pps.passphrase = &passphrase; + pps.comment = err; +- dlgret = DialogBoxParam(hinst, MAKEINTRESOURCE(210), +- NULL, PassphraseProc, (LPARAM) &pps); +- passphrase_box = NULL; ++ dlgret = DialogBoxParam(hinst, MAKEINTRESOURCE(210), ++ NULL, (DLGPROC)PassphraseProc, (LPARAM) &pps); ++ passphrase_box = NULL; + + sfree(err); + + if (!dlgret) + goto done; /* operation cancelled */ + +- assert(passphrase != NULL); ++ assert(passphrase != NULL); + + ret = pageant_add_keyfile(filename, passphrase, &err); + if (ret == PAGEANT_ACTION_OK) { + goto done; + } else if (ret == PAGEANT_ACTION_FAILURE) { + goto error; +- } ++ } + + smemclr(passphrase, strlen(passphrase)); + sfree(passphrase); +@@ -399,15 +398,15 @@ + + error: + message_box(err, APPNAME, MB_OK | MB_ICONERROR, +- HELPCTXID(errors_cantloadkey)); ++ HELPCTXID(errors_cantloadkey)); + done: + if (passphrase) { + smemclr(passphrase, strlen(passphrase)); + sfree(passphrase); + } + sfree(err); +- return; +-} ++ return; ++ } + + /* + * Prompt for a key file to add, and add it. +@@ -556,27 +555,27 @@ + * we go *backwards*, to avoid complications from deleting + * things hence altering the offset of subsequent items + */ +- for (i = sCount - 1; (itemNum >= 0) && (i >= 0); i--) { ++ for (i = sCount - 1; (itemNum >= 0) && (i >= 0); i--) { + skey = pageant_nth_ssh2_key(i); + +- if (selectedArray[itemNum] == rCount + i) { ++ if (selectedArray[itemNum] == rCount + i) { + pageant_delete_ssh2_key(skey); +- skey->alg->freekey(skey->data); +- sfree(skey); +- itemNum--; +- } ++ skey->alg->freekey(skey->data); ++ sfree(skey); ++ itemNum--; ++ } + } + + /* do the same for the rsa keys */ + for (i = rCount - 1; (itemNum >= 0) && (i >= 0); i--) { + rkey = pageant_nth_ssh1_key(i); + +- if(selectedArray[itemNum] == i) { ++ if(selectedArray[itemNum] == i) { + pageant_delete_ssh1_key(rkey); +- freersakey(rkey); +- sfree(rkey); +- itemNum--; +- } ++ freersakey(rkey); ++ sfree(rkey); ++ itemNum--; ++ } + } + + sfree(selectedArray); +@@ -745,7 +744,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { @@ -376,7 +679,7 @@ Index: windows/winpgnt.c static int menuinprogress; static UINT msgTaskbarCreated = 0; -@@ -1791,7 +1791,7 @@ +@@ -780,7 +778,7 @@ menuinprogress = 1; update_sessions(); SetForegroundWindow(hwnd); @@ -385,7 +688,7 @@ Index: windows/winpgnt.c TPM_RIGHTALIGN | TPM_BOTTOMALIGN | TPM_RIGHTBUTTON, wParam, lParam, 0, hwnd, NULL); -@@ -1802,7 +1802,7 @@ +@@ -791,7 +789,7 @@ case WM_SYSCOMMAND: switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */ case IDM_PUTTY: @@ -394,7 +697,25 @@ Index: windows/winpgnt.c SW_SHOW) <= 32) { MessageBox(NULL, "Unable to execute PuTTY!", "Error", MB_OK | MB_ICONERROR); -@@ -1869,7 +1869,7 @@ +@@ -805,7 +803,7 @@ + case IDM_VIEWKEYS: + if (!keylist) { + keylist = CreateDialog(hinst, MAKEINTRESOURCE(211), +- NULL, KeyListProc); ++ NULL, (DLGPROC)KeyListProc); + ShowWindow(keylist, SW_SHOWNORMAL); + } + /* +@@ -830,7 +828,7 @@ + case IDM_ABOUT: + if (!aboutbox) { + aboutbox = CreateDialog(hinst, MAKEINTRESOURCE(213), +- NULL, AboutProc); ++ NULL, (DLGPROC)AboutProc); + ShowWindow(aboutbox, SW_SHOWNORMAL); + /* + * Sometimes the window comes up minimised / hidden +@@ -858,7 +856,7 @@ GetMenuItemInfo(session_menu, wParam, FALSE, &mii); strcpy(param, "@"); strcat(param, mii.dwTypeData); @@ -403,7 +724,7 @@ Index: windows/winpgnt.c _T(""), SW_SHOW) <= 32) { MessageBox(NULL, "Unable to execute PuTTY!", "Error", MB_OK | MB_ICONERROR); -@@ -2210,7 +2210,7 @@ +@@ -1193,7 +1191,7 @@ session_menu = CreateMenu(); AppendMenu(systray_menu, MF_ENABLED, IDM_PUTTY, "&New Session"); AppendMenu(systray_menu, MF_POPUP | MF_ENABLED, @@ -412,10 +733,39 @@ Index: windows/winpgnt.c AppendMenu(systray_menu, MF_SEPARATOR, 0, 0); } AppendMenu(systray_menu, MF_ENABLED, IDM_VIEWKEYS, -Index: windows/winsecur.c -=================================================================== ---- windows/winsecur.c (revision 10285) -+++ windows/winsecur.c (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winprint.c putty/windows/winprint.c +--- putty-master/windows/winprint.c 2015-08-02 17:59:19.401192000 +0200 ++++ putty/windows/winprint.c 2015-08-02 17:46:44.771081500 +0200 +@@ -30,7 +30,7 @@ + * we'll need for the output. Discard the return value since it + * will almost certainly be a failure due to lack of space. + */ +- EnumPrinters(param, NULL, level, (*buffer)+offset, 512, ++ EnumPrinters(param, NULL, level, (LPBYTE)((*buffer)+offset), 512, + &needed, &nprinters); + + if (needed < 512) +@@ -38,7 +38,7 @@ + + *buffer = sresize(*buffer, offset+needed, char); + +- if (EnumPrinters(param, NULL, level, (*buffer)+offset, ++ if (EnumPrinters(param, NULL, level, (LPBYTE)((*buffer)+offset), + needed, &needed, &nprinters) == 0) + return FALSE; + +@@ -139,7 +139,7 @@ + docinfo.pOutputFile = NULL; + docinfo.pDatatype = "RAW"; + +- if (!StartDocPrinter(ret->hprinter, 1, (LPSTR)&docinfo)) ++ if (!StartDocPrinter(ret->hprinter, 1, (LPBYTE)&docinfo)) + goto error; + jobstarted = 1; + +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winsecur.c putty/windows/winsecur.c +--- putty-master/windows/winsecur.c 2015-08-02 17:59:19.414197200 +0200 ++++ putty/windows/winsecur.c 2015-08-02 17:46:44.779083600 +0200 @@ -104,8 +104,8 @@ PACL *acl, char **error) @@ -427,10 +777,9 @@ Index: windows/winsecur.c EXPLICIT_ACCESS ea[3]; int acl_err; int ret = FALSE; -Index: windows/winser.c -=================================================================== ---- windows/winser.c (revision 10285) -+++ windows/winser.c (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winser.c putty/windows/winser.c +--- putty-master/windows/winser.c 2015-08-02 17:59:19.417193400 +0200 ++++ putty/windows/winser.c 2015-08-02 17:46:44.788083900 +0200 @@ -122,7 +122,7 @@ * Configurable parameters. */ @@ -448,10 +797,9 @@ Index: windows/winser.c } /* -Index: windows/winsftp.c -=================================================================== ---- windows/winsftp.c (revision 10285) -+++ windows/winsftp.c (working copy) +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winsftp.c putty/windows/winsftp.c +--- putty-master/windows/winsftp.c 2015-08-02 17:59:19.419190600 +0200 ++++ putty/windows/winsftp.c 2015-08-02 17:46:44.802085400 +0200 @@ -221,7 +221,7 @@ return -1; } @@ -470,20 +818,96 @@ Index: windows/winsftp.c return ret; } -Index: windows/winucs.c -=================================================================== ---- windows/winucs.c (revision 10285) -+++ windows/winucs.c (working copy) -@@ -441,12 +441,8 @@ +diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winstore.c putty/windows/winstore.c +--- putty-master/windows/winstore.c 2015-08-02 17:59:19.422196200 +0200 ++++ putty/windows/winstore.c 2015-08-02 17:46:44.814084200 +0200 +@@ -110,7 +110,7 @@ + void write_setting_s(void *handle, const char *key, const char *value) { - int i, j; - int used_dtf = 0; -- char tbuf[256]; - int vtmode; + if (handle) +- RegSetValueEx((HKEY) handle, key, 0, REG_SZ, value, ++ RegSetValueEx((HKEY) handle, key, 0, REG_SZ, (LPBYTE)value, + 1 + strlen(value)); + } -- for (i = 0; i < 256; i++) -- tbuf[i] = i; -- - /* Decide on the Line and Font codepages */ - ucsdata->line_codepage = decode_codepage(conf_get_str(conf, - CONF_line_codepage)); +@@ -168,7 +168,7 @@ + allocsize = size+1; /* allow for an extra NUL if needed */ + ret = snewn(allocsize, char); + if (RegQueryValueEx((HKEY) handle, key, 0, +- &type, ret, &size) != ERROR_SUCCESS || ++ &type, (LPBYTE)ret, &size) != ERROR_SUCCESS || + type != REG_SZ) { + sfree(ret); + return NULL; +@@ -372,7 +372,7 @@ + + readlen = len; + otherstr = snewn(len, char); +- ret = RegQueryValueEx(rkey, regname, NULL, &type, otherstr, &readlen); ++ ret = RegQueryValueEx(rkey, regname, NULL, &type, (LPBYTE)otherstr, &readlen); + + if (ret != ERROR_SUCCESS && ret != ERROR_MORE_DATA && + !strcmp(keytype, "rsa")) { +@@ -385,7 +385,7 @@ + char *oldstyle = snewn(len + 10, char); /* safety margin */ + readlen = len; + ret = RegQueryValueEx(rkey, justhost, NULL, &type, +- oldstyle, &readlen); ++ (LPBYTE)oldstyle, &readlen); + + if (ret == ERROR_SUCCESS && type == REG_SZ) { + /* +@@ -431,7 +431,7 @@ + * wrong, and hyper-cautiously do nothing. + */ + if (!strcmp(otherstr, key)) +- RegSetValueEx(rkey, regname, 0, REG_SZ, otherstr, ++ RegSetValueEx(rkey, regname, 0, REG_SZ, (LPBYTE)otherstr, + strlen(otherstr) + 1); + } + +@@ -476,7 +476,7 @@ + + if (RegCreateKey(HKEY_CURRENT_USER, PUTTY_REG_POS "\\SshHostKeys", + &rkey) == ERROR_SUCCESS) { +- RegSetValueEx(rkey, regname, 0, REG_SZ, key, strlen(key) + 1); ++ RegSetValueEx(rkey, regname, 0, REG_SZ, (LPBYTE)key, strlen(key) + 1); + RegCloseKey(rkey); + } /* else key does not exist in registry */ + +@@ -536,7 +536,7 @@ + if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_POS, &rkey) == + ERROR_SUCCESS) { + int ret = RegQueryValueEx(rkey, "RandSeedFile", +- 0, &type, seedpath, &size); ++ 0, &type, (LPBYTE)seedpath, (LPDWORD)&size); + if (ret != ERROR_SUCCESS || type != REG_SZ) + seedpath[0] = '\0'; + RegCloseKey(rkey); +@@ -672,7 +672,7 @@ + value_length = 200; + old_value = snewn(value_length, char); + ret = RegQueryValueEx(pjumplist_key, reg_jumplist_value, NULL, &type, +- old_value, &value_length); ++ (LPBYTE)old_value, (LPDWORD)&value_length); + /* When the passed buffer is too small, ERROR_MORE_DATA is + * returned and the required size is returned in the length + * argument. */ +@@ -680,7 +680,7 @@ + sfree(old_value); + old_value = snewn(value_length, char); + ret = RegQueryValueEx(pjumplist_key, reg_jumplist_value, NULL, &type, +- old_value, &value_length); ++ (LPBYTE)old_value, (LPDWORD)&value_length); + } + + if (ret == ERROR_FILE_NOT_FOUND) { +@@ -754,7 +754,7 @@ + + /* Save the new list to the registry. */ + ret = RegSetValueEx(pjumplist_key, reg_jumplist_value, 0, REG_MULTI_SZ, +- new_value, piterator_new - new_value); ++ (LPBYTE)new_value, piterator_new - new_value); + + sfree(old_value); + old_value = new_value; diff --git a/mingw-w64-putty/0003-linedraw.patch b/mingw-w64-putty/0003-linedraw.patch new file mode 100644 index 0000000000..f8fd65d50f --- /dev/null +++ b/mingw-w64-putty/0003-linedraw.patch @@ -0,0 +1,67 @@ +Binärdateien putty/.svn/wc.db und putty.new/.svn/wc.db sind verschieden. +diff -ruN putty/terminal.c putty.new/terminal.c +--- putty/terminal.c 2014-11-19 12:27:29.002043500 +0100 ++++ putty.new/terminal.c 2014-11-19 14:32:38.356466800 +0100 +@@ -2808,10 +2808,58 @@ + switch (term->utf_state) { + case 0: + if (c < 0x80) { +- /* UTF-8 must be stateless so we ignore iso2022. */ +- if (term->ucsdata->unitab_ctrl[c] != 0xFF) +- c = term->ucsdata->unitab_ctrl[c]; +- else c = ((unsigned char)c) | CSET_ASCII; ++ /* See http://compgroups.net/comp.terminals/-putty-hack-for-wish-utf8-plus-vt100/2625536 ++ There is a controversial discussion whether or not supporting ++ iso2022 in UTF-8 mode is a good idea, but the experiences with ++ this patch over years now shows it works quite well and it ++ simply looks better. To please everyone, the support is made ++ optional (only used if environment variable PUTTY_ISO2022 is ++ found) ++ */ ++ if (!getenv("PUTTY_ISO2022")) { ++ /* UTF-8 must be stateless so we ignore iso2022. */ ++ if (term->ucsdata->unitab_ctrl[c] != 0xFF) ++ c = term->ucsdata->unitab_ctrl[c]; ++ else c = ((unsigned char)c) | CSET_ASCII; ++ } else { ++ if(term->sco_acs && ++ (c!='\033' && c!='\012' && c!='\015' && c!='\b')) ++ { ++ if (term->sco_acs == 2) c |= 0x80; ++ c |= CSET_SCOACS; ++ } else { ++ switch (term->cset_attr[term->cset]) { ++ /* ++ * Linedraw characters are different from 'ESC ( B' ++ * only for a small range. For ones outside that ++ * range, make sure we use the same font as well as ++ * the same encoding. ++ */ ++ case CSET_LINEDRW: ++ if (term->ucsdata->unitab_ctrl[c] != 0xFF) ++ c = term->ucsdata->unitab_ctrl[c]; ++ else ++ c = ((unsigned char) c) | CSET_LINEDRW; ++ break; ++ ++ case CSET_GBCHR: ++ /* If UK-ASCII, make the '#' a LineDraw Pound */ ++ if (c == '#') { ++ c = '}' | CSET_LINEDRW; ++ break; ++ } ++ /*FALLTHROUGH*/ case CSET_ASCII: ++ if (term->ucsdata->unitab_ctrl[c] != 0xFF) ++ c = term->ucsdata->unitab_ctrl[c]; ++ else ++ c = ((unsigned char) c) | CSET_ASCII; ++ break; ++ case CSET_SCOACS: ++ if (c>=' ') c = ((unsigned char)c) | CSET_SCOACS; ++ break; ++ } ++ } ++ } + break; + } else if ((c & 0xe0) == 0xc0) { + term->utf_size = term->utf_state = 1; diff --git a/mingw-w64-putty/PKGBUILD b/mingw-w64-putty/PKGBUILD index cdc4afac62..c61d1d5c9d 100644 --- a/mingw-w64-putty/PKGBUILD +++ b/mingw-w64-putty/PKGBUILD @@ -5,36 +5,44 @@ # todo install docs _realname=putty -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" -_base_ver=0.63 -pkgver=0.63.r10285 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=0.65.r4047.9a08d9a pkgrel=1 pkgdesc="A free telnet/SSH client (mingw-w64)" arch=('any') url="http://www.chiark.greenend.org.uk/~sgtatham/putty/" license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "subversion") + "git") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") optdepends=("${MINGW_PACKAGE_PREFIX}-putty-ssh: ssh wrapper for plink") -source=("$_realname::svn+svn://svn.tartarus.org/sgt/putty" - '0001-fixes.patch') +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-svn") +source=("${_realname}"::"git://git.tartarus.org/simon/putty.git" + '0001-fixes.patch' + '0003-linedraw.patch') md5sums=('SKIP' - '5b5065e5bd2b8421196c068d428bfb57') + 'ec85b09d672db924d3b9b910da8e6616' + '2f7c232dd89a30cbe6e8b7dec329cda4') pkgver() { cd "${srcdir}"/${_realname} - local ver="$(svnversion)" - printf "%s.r%s" "${_base_ver}" "${ver//[[:alpha:]]}" + printf "%s.r%s.%s" "$(cat LATEST.VER)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + # git describe --tags --abbrev=0 gives wrong results } prepare() { cd "${srcdir}"/${_realname} - patch -p0 -i "${srcdir}"/0001-fixes.patch + patch -p1 -i "${srcdir}"/0001-fixes.patch + patch -p1 -i "${srcdir}"/0003-linedraw.patch + mkdir -p "${srcdir}"/${_realname}-build-${CARCH} + cp -r "${srcdir}"/${_realname}/* "${srcdir}"/${_realname}-build-${CARCH} } build() { - cd "${srcdir}"/${_realname} + cd "${srcdir}"/${_realname}-build-${CARCH} ./mkfiles.pl cd windows @@ -45,10 +53,10 @@ build() { } package() { - cd "${srcdir}"/${_realname}/windows + cd "${srcdir}"/${_realname}-build-${CARCH}/windows install -D -m644 ../LICENCE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE - for f in putty.exe puttygen.exe pageant.exe plink.exe pscp.exe psftp.exe + for f in putty puttygen pageant plink pscp psftp puttytel do - install -D -m755 $f "${pkgdir}"/${MINGW_PREFIX}/bin/$f + install -D -m755 ${f}.exe "${pkgdir}"/${MINGW_PREFIX}/bin/${f}.exe done } diff --git a/mingw-w64-pygobject/PKGBUILD b/mingw-w64-pygobject/PKGBUILD index f7216f2636..af202d0619 100644 --- a/mingw-w64-pygobject/PKGBUILD +++ b/mingw-w64-pygobject/PKGBUILD @@ -1,21 +1,21 @@ # Maintainer: Alexey Pavlov _realname=pygobject +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-gobject" "${MINGW_PACKAGE_PREFIX}-python3-gobject" "${MINGW_PACKAGE_PREFIX}-pygobject-devel") -pkgver=3.14.0 -pkgrel=1 +pkgver=3.18.0 +pkgrel=2 pkgdesc="Allows you to load glade interface files in a program at runtime (mingw-w64)" arch=(any) url="http://www.pygtk.org" license=('LGPL') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-gnome-common") options=('staticlibs' 'strip') source=(http://ftp.gnome.org/pub/gnome/sources/pygobject/${pkgver%.*}/${_realname}-${pkgver}.tar.xz) -md5sums=('17722912afa982a6feace4bb9bf52778') +md5sums=('2ac5d4398e7ecabf64b3deb65c799516') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -24,48 +24,54 @@ prepare() { } build() { - cd "$srcdir" - rm -rf python{2,3}-build mkdir python{2,3}-build devel - CFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1" - CXXFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1" - CPPFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1" + for builddir in python{2,3}-build; do - #cp -r ${_realname}-$pkgver $builddir - pushd $builddir - PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ - ../${_realname}-$pkgver/configure --prefix=${MINGW_PREFIX} \ + #cp -r ${_realname}-${pkgver} ${builddir} + pushd ${builddir} > /dev/null + PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-silent-rules make VERBOSE=1 - popd + popd > /dev/null done } package_python2-gobject() { pkgdesc="Python 2 bindings for GObject2 (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-python2-cairo" "${MINGW_PACKAGE_PREFIX}-libffi" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pygobject-devel=$pkgver") + depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-python2-cairo" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime" + "${MINGW_PACKAGE_PREFIX}-pygobject-devel=${pkgver}") cd python2-build - make DESTDIR="$pkgdir" install - mv "${pkgdir}${MINGW_PREFIX}"/{include,lib/pkgconfig} "$srcdir/devel" + make DESTDIR="${pkgdir}" install + mv "${pkgdir}${MINGW_PREFIX}"/{include,lib/pkgconfig} "${srcdir}/devel" } package_python3-gobject() { pkgdesc="Python 3 bindings for GObject2 (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-python3-cairo" "${MINGW_PACKAGE_PREFIX}-libffi" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pygobject-devel=$pkgver") + depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-python3-cairo" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime" + "${MINGW_PACKAGE_PREFIX}-pygobject-devel=${pkgver}") cd python3-build - make DESTDIR="$pkgdir" install - + make DESTDIR="${pkgdir}" install + rm -r "${pkgdir}${MINGW_PREFIX}"/{include,lib/pkgconfig} } package_pygobject-devel() { pkgdesc="Development files for the pygobject bindings" + cd "devel" mkdir -p "${pkgdir}${MINGW_PREFIX}"/{include,lib} mv include "${pkgdir}${MINGW_PREFIX}/" diff --git a/mingw-w64-pygobject2/PKGBUILD b/mingw-w64-pygobject2/PKGBUILD index 6feadf081c..84220efc5e 100644 --- a/mingw-w64-pygobject2/PKGBUILD +++ b/mingw-w64-pygobject2/PKGBUILD @@ -1,20 +1,18 @@ # Maintainer: Alexey Pavlov _realname=pygobject - pkgname=("${MINGW_PACKAGE_PREFIX}-python2-gobject2" "${MINGW_PACKAGE_PREFIX}-python3-gobject2" "${MINGW_PACKAGE_PREFIX}-pygobject2-devel") pkgver=2.28.6 -pkgrel=2 +pkgrel=3 pkgdesc="Allows you to load glade interface files in a program at runtime (mingw-w64)" arch=(any) url="http://www.pygtk.org" license=('LGPL') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-gnome-common") options=('staticlibs' 'strip') source=(http://ftp.gnome.org/pub/gnome/sources/pygobject/${pkgver%.*}/${_realname}-${pkgver}.tar.xz - win32-fix.patch - python-m4.patch) + win32-fix.patch + python-m4.patch) md5sums=('9415cb7f2b3a847f2310ccea258b101e' '5dcee45159fb9d08248d56d0e73849c7' '5391d75a08c19e975679a0385c319f79') @@ -24,47 +22,47 @@ prepare() { patch -p1 -i ${srcdir}/win32-fix.patch patch -p1 -i ${srcdir}/python-m4.patch WANT_AUTOMAKE=latest autoreconf -fi - #WANT_AUTOMAKE=latest ./autogen.sh } build() { - cd "$srcdir" - rm -rf python{2,3}-build mkdir python{2,3}-build devel - CFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1 -Wno-error=format" - CXXFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1" - CPPFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1" + CFLAGS+=" -Wno-error=format" + for builddir in python{2,3}-build; do - pushd $builddir - PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ - ../${_realname}-$pkgver/configure --prefix=${MINGW_PREFIX} \ + pushd ${builddir} > /dev/null + PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-silent-rules \ --disable-introspection make VERBOSE=1 - popd + popd > /dev/null done } check() { for builddir in python{2,3}-build; do - pushd ${srcdir}/$builddir - PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ + pushd ${srcdir}/${builddir} > /dev/null + PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \ make check - popd + popd > /dev/null done } package_python2-gobject2() { pkgdesc="Python 2 bindings for GObject2 (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-libffi" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pygobject2-devel=$pkgver") + depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime" + "${MINGW_PACKAGE_PREFIX}-pygobject2-devel=${pkgver}") cd python2-build - make DESTDIR="$pkgdir" install - + make DESTDIR="${pkgdir}" install + find "${pkgdir}${MINGW_PREFIX}"/share/pygobject -name '*.py' -exec \ sed -i '1s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' {} + @@ -74,18 +72,21 @@ package_python2-gobject2() { cd ${srcdir} mkdir -p devel${MINGW_PREFIX}/{bin,lib,share/pygobject} mv "${pkgdir}${MINGW_PREFIX}"/bin/pygobject-codegen-2.0 devel${MINGW_PREFIX}/bin/ - mv {"$pkgdir",devel}${MINGW_PREFIX}/include - mv {"$pkgdir",devel}${MINGW_PREFIX}/lib/pkgconfig - mv {"$pkgdir",devel}${MINGW_PREFIX}/share/pygobject/xsl + mv {"${pkgdir}",devel}${MINGW_PREFIX}/include + mv {"${pkgdir}",devel}${MINGW_PREFIX}/lib/pkgconfig + mv {"${pkgdir}",devel}${MINGW_PREFIX}/share/pygobject/xsl } package_python3-gobject2() { pkgdesc="Python 3 bindings for GObject2 (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-libffi" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pygobject2-devel=$pkgver") - + depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime" + "${MINGW_PACKAGE_PREFIX}-pygobject2-devel=${pkgver}") + cd python3-build - make DESTDIR="$pkgdir" install - + make DESTDIR="${pkgdir}" install + # Delete devel stuff rm -f "${pkgdir}${MINGW_PREFIX}"/bin/pygobject-codegen-2.0 rm -r "${pkgdir}${MINGW_PREFIX}"/{include,lib/pkgconfig,share/{gtk-doc,pygobject}} @@ -93,6 +94,7 @@ package_python3-gobject2() { package_pygobject2-devel() { pkgdesc="Development files for the pygobject bindings" + mv ${srcdir}/devel${MINGW_PREFIX} "${pkgdir}/" } diff --git a/mingw-w64-pygtksourceview2/PKGBUILD b/mingw-w64-pygtksourceview2/PKGBUILD index a150b2b192..0a93e1e7c8 100644 --- a/mingw-w64-pygtksourceview2/PKGBUILD +++ b/mingw-w64-pygtksourceview2/PKGBUILD @@ -1,7 +1,6 @@ # Maintainer: Alexey Pavlov _realname=pygtksourceview - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}2" pkgver=2.10.1 pkgrel=1 @@ -9,14 +8,13 @@ pkgdesc="Python bindings for gtksourceview2 (mingw-w64)" arch=(any) url="http://www.gnome.org" license=('LGPL') -groups=("${MINGW_PACKAGE_PREFIX}") depends=("${MINGW_PACKAGE_PREFIX}-gtksourceview2>=2.10.0" - "${MINGW_PACKAGE_PREFIX}-python2-pygtk>=2.17.0") + "${MINGW_PACKAGE_PREFIX}-python2-pygtk>=2.17.0") makedepends=("${MINGW_PACKAGE_PREFIX}-python2-gobject2" - "intltool") + "intltool") options=('staticlibs' 'strip') source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.bz2 - python-m4.patch) + python-m4.patch) md5sums=('2654354d61422fb79d8375fc3a3b5393' 'bc368c2b741d2b3b8612b882378bbba6') @@ -34,20 +32,22 @@ build() { rm -rf python2-build mkdir python2-build - #cp -r ${_realname}-$pkgver $builddir + #cp -r ${_realname}-${pkgver} ${builddir} pushd python2-build export lt_cv_deplibs_check_method='pass_all' PYTHON=${MINGW_PREFIX}/bin/python2 \ - ../${_realname}-$pkgver/configure --prefix=${MINGW_PREFIX} \ + ../${_realname}-${pkgver}/configure --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --disable-static --disable-docs + --disable-static \ + --disable-docs + make VERBOSE=1 popd } package() { cd python2-build - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-pyqt4/PKGBUILD b/mingw-w64-pyqt4/PKGBUILD index c202a892cd..10d7d3962f 100644 --- a/mingw-w64-pyqt4/PKGBUILD +++ b/mingw-w64-pyqt4/PKGBUILD @@ -1,26 +1,27 @@ # Maintainer: Saul Ibarra Corretge _realname=pyqt4 +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-common" "${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=4.11.2 -pkgrel=1 +pkgver=4.11.4 +pkgrel=2 pkgdesc="Qt4 bindings for Python (mingw-w64)" arch=('any') license=('GPL') url="http://www.riverbankcomputing.co.uk/software/pyqt" makedepends=("${MINGW_PACKAGE_PREFIX}-python2-sip" - "${MINGW_PACKAGE_PREFIX}-python3-sip" - "${MINGW_PACKAGE_PREFIX}-qt4") + "${MINGW_PACKAGE_PREFIX}-python3-sip" + "${MINGW_PACKAGE_PREFIX}-qt4") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-$pkgver/PyQt-win-gpl-$pkgver.zip" +source=("http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-$pkgver/PyQt-win-gpl-${pkgver}.zip" 001-mingw-python.patch) -md5sums=('3e7dcd518d7ed31e38135c0b472ed0fb' +md5sums=('cc3f9a88900c95b599afa69d869d8095' '2eeedc9c1ac90ad97654de98658637a7') prepare() { - cd "${srcdir}"/PyQt-win-gpl-$pkgver + cd "${srcdir}"/PyQt-win-gpl-${pkgver} # Apply patches patch -p0 -i "${srcdir}"/001-mingw-python.patch @@ -28,9 +29,9 @@ prepare() { build() { for builddir in python{2,3}-${MINGW_CHOST}; do - [[ -d $builddir ]] && rm -rf $builddir - cp -r PyQt-win-gpl-${pkgver} $builddir - pushd $builddir + [[ -d ${builddir} ]] && rm -rf ${builddir} + cp -r PyQt-win-gpl-${pkgver} ${builddir} + pushd ${builddir} [[ "${builddir%-${MINGW_CHOST}}" == "python2" ]] && { local _sipdir=Py2-Qt4 } || { @@ -70,9 +71,10 @@ package_python3-pyqt4(){ # Provided by pyqt-common rm "${pkgdir}${MINGW_PREFIX}"/bin/{pylupdate4,pyrcc4}.exe rm -rf "${pkgdir}${MINGW_PREFIX}"/qsci + rm -rf "${pkgdir}${MINGW_PREFIX}"/share/qt4/qsci # Remove Python 2 uic port - rm -rf "${pkgdir}${MINGW_PREFIX}"/lib/python3.4/site-packages/PyQt4/uic/port_v2 + rm -rf "${pkgdir}${MINGW_PREFIX}"/lib/python3.5/site-packages/PyQt4/uic/port_v2 } package_python2-pyqt4(){ @@ -87,6 +89,7 @@ package_python2-pyqt4(){ mv "${pkgdir}${MINGW_PREFIX}"/bin/{,python2-}pyuic4.bat rm "${pkgdir}${MINGW_PREFIX}"/bin/{pylupdate4,pyrcc4}.exe rm -rf "${pkgdir}${MINGW_PREFIX}"/qsci + rm -rf "${pkgdir}${MINGW_PREFIX}"/share/qt4/qsci # Remove Python 3 uic port rm -rf "${pkgdir}${MINGW_PREFIX}"/lib/python2.7/site-packages/PyQt4/uic/port_v3 diff --git a/mingw-w64-pyqt5/001-mingw-python.patch b/mingw-w64-pyqt5/001-mingw-python.patch index 8affbc1637..24dc3fa58c 100644 --- a/mingw-w64-pyqt5/001-mingw-python.patch +++ b/mingw-w64-pyqt5/001-mingw-python.patch @@ -36,13 +36,13 @@ diff -uNr PyQt-gpl-5.3.1-orig/configure.py PyQt-gpl-5.3.1/configure.py # The qmake spec we want to use. if self.py_platform == 'win32': -- if self.py_version >= 0x030300: +- if self.py_version >= 0x030500: + if _POSIX_BUILD: + self.qmake_spec = "win32-g++" -+ elif self.py_version >= 0x030300: ++ elif self.py_version >= 0x030500: + self.qmake_spec = 'win32-msvc2015' + elif self.py_version >= 0x030300: self.qmake_spec = 'win32-msvc2010' - elif self.py_version >= 0x020600: - self.qmake_spec = 'win32-msvc2008' @@ -668,7 +678,10 @@ # Create the output file, first making sure it doesn't exist. diff --git a/mingw-w64-pyqt5/PKGBUILD b/mingw-w64-pyqt5/PKGBUILD index 3bc2089d82..38d6dd9221 100644 --- a/mingw-w64-pyqt5/PKGBUILD +++ b/mingw-w64-pyqt5/PKGBUILD @@ -1,24 +1,25 @@ # Maintainer: Saul Ibarra Corretge _realname=pyqt5 +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-common" "${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=5.3.2 +pkgver=5.5.1 pkgrel=1 pkgdesc="Qt5 bindings for Python (mingw-w64)" arch=('any') license=('GPL') url="http://www.riverbankcomputing.co.uk/software/pyqt" makedepends=("${MINGW_PACKAGE_PREFIX}-python2-sip" - "${MINGW_PACKAGE_PREFIX}-python3-sip" - "${MINGW_PACKAGE_PREFIX}-qt5") + "${MINGW_PACKAGE_PREFIX}-python3-sip" + "${MINGW_PACKAGE_PREFIX}-qt5") options=('strip' 'staticlibs') -source=("http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-$pkgver/PyQt-gpl-$pkgver.tar.gz" +source=("http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-${pkgver}/PyQt-gpl-${pkgver}.tar.gz" 001-mingw-python.patch) -md5sums=('81ef608fa4f3961918106d0ca07aa68a' - '0dc6f9e4fd3971063b4e0df12aeb4a39') +md5sums=('586ed481b734c665b52fbb4f32161ff7' + 'b53c078e8a953d43388668299c8bb364') prepare() { - cd "${srcdir}"/PyQt-gpl-$pkgver + cd "${srcdir}"/PyQt-gpl-${pkgver} #Apply patches patch -p1 -i "${srcdir}"/001-mingw-python.patch @@ -26,9 +27,9 @@ prepare() { build() { for builddir in python{2,3}-${MINGW_CHOST}; do - [[ -d $builddir ]] && rm -rf $builddir - cp -r PyQt-gpl-${pkgver} $builddir - pushd $builddir + [[ -d $builddir ]] && rm -rf ${builddir} + cp -r PyQt-gpl-${pkgver} ${builddir} + pushd ${builddir} > /dev/null [[ "${builddir%-${MINGW_CHOST}}" == "python2" ]] && { local _sipdir=Py2-Qt5 } || { @@ -41,7 +42,7 @@ build() { -q ${MINGW_PREFIX}/bin/qmake.exe \ --verbose make V=1 - popd + popd > /dev/null done } diff --git a/mingw-w64-pyside-qt4/PKGBUILD b/mingw-w64-pyside-qt4/PKGBUILD new file mode 100644 index 0000000000..44f38fa6a9 --- /dev/null +++ b/mingw-w64-pyside-qt4/PKGBUILD @@ -0,0 +1,142 @@ +# Maintainer: Alexey Pavlov +# Contributor: Xin Sun + +_realname=pyside +pkgbase=mingw-w64-${_realname}-qt4 +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}-common-qt4 ${MINGW_PACKAGE_PREFIX}-python{2,3}-${_realname}-qt4) +pkgver=1.2.2 +pkgrel=3 +arch=('any') +url="http://pyside.github.io/docs/pyside/" +license=("LGPL") +install=${_realname}-${CARCH}.install +source=(https://pypi.python.org/packages/source/P/PySide/PySide-${pkgver}.tar.gz + pyside.patch) +md5sums=('c45bc400c8a86d6b35f34c29e379e44d' + 'c24be77f77fde7a4235e04b7b8af917a') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-python2-shiboken-qt4" + "${MINGW_PACKAGE_PREFIX}-python3-shiboken-qt4" + "${MINGW_PACKAGE_PREFIX}-qt4") +options=('staticlibs' 'strip') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/pyside.patch +} + +build() { + for pyv in python2 python3; do + local _conf= + if [ "${pyv}" = "python2" ]; then + _conf="-DPYTHON_SUFFIX=-python2.7" + fi + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf PySide-${pkgver} build-${MINGW_CHOST}-${pyv} + pushd ${srcdir}/build-${MINGW_CHOST}-${pyv}/sources/pyside > /dev/null + + export MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=RELEASE \ + ${_conf} \ + -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/${pyv}.exe + + make + + popd > /dev/null + done + +} + +fix_paths() { + local prefixwin=$(cygpath -am ${MINGW_PREFIX}) + local prefixinst=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + + local _files=$(find ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver} -type f -iname "*.cmake" -o -iname "*.pc") + for f in ${_files}; do + plain "Patching ${f}..." + sed -e "s|${prefixwin}|${MINGW_PREFIX}|g" \ + -e "s|${prefixinst}|${MINGW_PREFIX}|g" \ + -i ${f} + done +} + +package_pyside-common() { + pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation (Common files)(mingw-w64)" + + cd ${srcdir}/build-${MINGW_CHOST}-python3/sources/pyside + make DESTDIR=${pkgdir} install + + rm -rf ${pkgdir}${MINGW_PREFIX}/bin + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/python* + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/libpyside* + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig*python*.cmake + + fix_paths +} + +package_python2-pyside() { + pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation (Python2)(mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-pyside-common-qt4" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-shiboken-qt4" + "${MINGW_PACKAGE_PREFIX}-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python2/sources/pyside + make DESTDIR=${pkgdir} install + + #install -Dm644 PySideConfig-python2.7.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/ + mv ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/pyside{,-py2}.pc + + rm -rf ${pkgdir}${MINGW_PREFIX}/{include,share} + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfigVersion.cmake + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig.cmake + + fix_paths +} + +package_python3-pyside() { + pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation (Python3)(mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-pyside-common-qt4" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-shiboken-qt4" + "${MINGW_PACKAGE_PREFIX}-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python3/sources/pyside + make DESTDIR=${pkgdir} install + + rm -rf ${pkgdir}${MINGW_PREFIX}/{include,share} + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfigVersion.cmake + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig.cmake + + fix_paths +} + +# Wrappers +package_mingw-w64-i686-pyside-common-qt4() { + package_pyside-common +} + +package_mingw-w64-i686-python2-pyside-qt4() { + package_python2-pyside +} + +package_mingw-w64-i686-python3-pyside-qt4() { + package_python3-pyside +} + +package_mingw-w64-x86_64-pyside-common-qt4() { + package_pyside-common +} + +package_mingw-w64-x86_64-python2-pyside-qt4() { + package_python2-pyside +} + +package_mingw-w64-x86_64-python3-pyside-qt4() { + package_python3-pyside +} diff --git a/mingw-w64-pyside-qt4/pyside-i686.install b/mingw-w64-pyside-qt4/pyside-i686.install new file mode 100644 index 0000000000..40f180a3df --- /dev/null +++ b/mingw-w64-pyside-qt4/pyside-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/PySide-*/*.cmake; do + # Do it twice if we already process one of the files + sed -e "s|${_prefix}|/mingw32|g" -i ${f} + sed -e "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-pyside-qt4/pyside-x86_64.install b/mingw-w64-pyside-qt4/pyside-x86_64.install new file mode 100644 index 0000000000..d5ca01db90 --- /dev/null +++ b/mingw-w64-pyside-qt4/pyside-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/PySide-*/*.cmake; do + # Do it twice if we already process one of the files + sed -e "s|${_prefix}|/mingw64|g" -i ${f} + sed -e "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-pyside-qt4/pyside.patch b/mingw-w64-pyside-qt4/pyside.patch new file mode 100644 index 0000000000..d9d314c6f8 --- /dev/null +++ b/mingw-w64-pyside-qt4/pyside.patch @@ -0,0 +1,38 @@ +--- PySide-1.2.2/sources/pyside/CMakeLists.txt.orig 2015-06-26 11:33:00.602600000 +0300 ++++ PySide-1.2.2/sources/pyside/CMakeLists.txt 2015-06-26 11:33:35.406200000 +0300 +@@ -31,6 +31,9 @@ + if(MSVC) + set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") + else() ++ if(MINGW) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -D_WINDOWS") ++ endif() + if(CMAKE_HOST_UNIX AND NOT CYGWIN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") + endif() +--- PySide-1.2.2/sources/pyside/cmake/Macros/PySideModules.cmake.orig 2015-06-26 11:55:02.330400000 +0300 ++++ PySide-1.2.2/sources/pyside/cmake/Macros/PySideModules.cmake 2015-06-26 12:29:31.912800000 +0300 +@@ -22,8 +22,8 @@ + add_custom_command(OUTPUT ${${module_sources}} + COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} + ${pyside_BINARY_DIR}/pyside_global.h +- --include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR} +- --typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}} ++ --include-paths="${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}" ++ --typesystem-paths="${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}" + --output-directory=${CMAKE_CURRENT_BINARY_DIR} + --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt + ${typesystem_path} +--- PySide-1.2.2/sources/pyside/tests/pysidetest/CMakeLists.txt.orig 2015-06-26 12:32:49.376400000 +0300 ++++ PySide-1.2.2/sources/pyside/tests/pysidetest/CMakeLists.txt 2015-06-26 12:33:01.903200000 +0300 +@@ -36,8 +36,8 @@ + add_custom_command(OUTPUT ${testbinding_SRC} + COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h +- --include-paths=${pyside_BINARY_DIR}${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${QT_QTCORE_INCLUDE_DIR}${PATH_SEP}${QT_QTGUI_INCLUDE_DIR} +- --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR} ++ --include-paths="${pyside_BINARY_DIR}${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${QT_QTCORE_INCLUDE_DIR}${PATH_SEP}${QT_QTGUI_INCLUDE_DIR}" ++ --typesystem-paths="${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}" + --output-directory=${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pysidetest.xml + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/mingw-w64-pyside-tools-qt4/PKGBUILD b/mingw-w64-pyside-tools-qt4/PKGBUILD new file mode 100644 index 0000000000..2eb66a1bbd --- /dev/null +++ b/mingw-w64-pyside-tools-qt4/PKGBUILD @@ -0,0 +1,124 @@ +# Maintainer: Alexey Pavlov +# Contributor: Xin Sun + +_realname=pyside-tools +pkgbase=mingw-w64-${_realname}-qt4 +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}-common-qt4 ${MINGW_PACKAGE_PREFIX}-python{2,3}-${_realname}-qt4) +pkgver=1.2.2 +pkgrel=3 +pkgdesc="Python bindings for Qt4 (mingw-w64)" +arch=('any') +url="http://pyside.github.io/docs/pyside/" +license=("LGPL") +source=(https://pypi.python.org/packages/source/P/PySide/PySide-${pkgver}.tar.gz) +md5sums=('c45bc400c8a86d6b35f34c29e379e44d') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-python2-pyside-qt4" + "${MINGW_PACKAGE_PREFIX}-python3-pyside-qt4" + "${MINGW_PACKAGE_PREFIX}-qt4") +options=('staticlibs' 'strip') + +prepare() { + cd ${srcdir}/PySide-${pkgver} +} + +build() { + for pyv in python2 python3; do + local _conf= + if [ "${pyv}" = "python2" ]; then + _conf="-DPYTHON_SUFFIX=-python2.7 -DPYTHON_BASENAME=-python2.7" + fi + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf PySide-${pkgver} build-${MINGW_CHOST}-${pyv} + pushd ${srcdir}/build-${MINGW_CHOST}-${pyv}/sources/pyside-tools > /dev/null + + export MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ${_conf} \ + -DCMAKE_BUILD_TYPE=RELEASE \ + + make + + popd > /dev/null + done + +} + +package_pyside-tools-common() { + pkgdesc="PySide lupdate, rcc, and uic development tools (Common Files) (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python3/sources/pyside-tools + make DESTDIR=${pkgdir} install + + rm -rf "${pkgdir}${MINGW_PREFIX}"/lib + rm -f "${pkgdir}${MINGW_PREFIX}"/bin/pyside-uic + rm -f "${pkgdir}${MINGW_PREFIX}"/share/man/man1/pyside-uic* +} + +package_python2-pyside-tools() { + pkgdesc="PySide lupdate, rcc, and uic development tools (for Python 2) (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-pyside-tools-common-qt4" + "${MINGW_PACKAGE_PREFIX}-python2-pyside-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python2/sources/pyside-tools + make DESTDIR=${pkgdir} install + + find "${pkgdir}${MINGW_PREFIX}" -type f -exec \ + sed -i -e '1 s|^#! *${MINGW_PREFIX}/bin/python[0-9.]*|#!${MINGW_PREFIX}/bin/python2|' \ + -e '1 s|^#! *${MINGW_PREFIX}/bin/env python[0-9.]*|#!${MINGW_PREFIX}/bin/env python2|' {} + + + mv "${pkgdir}${MINGW_PREFIX}"/bin/{,python2-}pyside-uic + mv "${pkgdir}${MINGW_PREFIX}"/share/man/man1/{,python2-}pyside-uic.1 + + rm -rf "${pkgdir}${MINGW_PREFIX}"/lib/python2*/site-packages/pysideuic/{port_v3,pyside-uic.1} + rm -f "${pkgdir}${MINGW_PREFIX}"/bin/pyside-{lupdate,rcc} + rm -f "${pkgdir}${MINGW_PREFIX}"/share/man/man1/pyside-{lupdate,rcc}* + + ${MINGW_PREFIX}/bin/python2 -m compileall "${pkgdir}${MINGW_PREFIX}"/lib/python2*/site-packages/pysideuic/ + ${MINGW_PREFIX}/bin/python2 -O -m compileall "${pkgdir}${MINGW_PREFIX}"/lib/python2*/site-packages/pysideuic/ +} + +package_python3-pyside-tools() { + pkgdesc="PySide lupdate, rcc, and uic development tools (for Python 3) (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-pyside-tools-common-qt4" + "${MINGW_PACKAGE_PREFIX}-python3-pyside-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python3/sources/pyside-tools + make DESTDIR=${pkgdir} install + + rm -rf "${pkgdir}${MINGW_PREFIX}"/lib/python3*/site-packages/pysideuic/{port_v2,pyside-uic.1} + rm -f "${pkgdir}${MINGW_PREFIX}"/bin/pyside-{lupdate,rcc} + rm -f "${pkgdir}${MINGW_PREFIX}"/share/man/man1/pyside-{lupdate,rcc}* + + ${MINGW_PREFIX}/bin/python3 -m compileall "${pkgdir}${MINGW_PREFIX}"/lib/python3*/site-packages/pysideuic/ + ${MINGW_PREFIX}/bin/python3 -O -m compileall "${pkgdir}${MINGW_PREFIX}"/lib/python3*/site-packages/pysideuic/ +} + +# Wrappers +package_mingw-w64-i686-pyside-tools-common-qt4() { + package_pyside-tools-common +} + +package_mingw-w64-i686-python2-pyside-tools-qt4() { + package_python2-pyside-tools +} + +package_mingw-w64-i686-python3-pyside-tools-qt4() { + package_python3-pyside-tools +} + +package_mingw-w64-x86_64-pyside-tools-common-qt4() { + package_pyside-tools-common +} + +package_mingw-w64-x86_64-python2-pyside-tools-qt4() { + package_python2-pyside-tools +} + +package_mingw-w64-x86_64-python3-pyside-tools-qt4() { + package_python3-pyside-tools +} diff --git a/mingw-w64-python-babel/PKGBUILD b/mingw-w64-python-babel/PKGBUILD new file mode 100644 index 0000000000..0b2c8b839b --- /dev/null +++ b/mingw-w64-python-babel/PKGBUILD @@ -0,0 +1,82 @@ +# Maintainer: Alexey Pavlov + +_realname=babel +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.1.1 +pkgrel=1 +pkgdesc="A collection of tools for internationalizing Python applications" +url="http://babel.pocoo.org/" +license=("BSD") +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-pytz" + "${MINGW_PACKAGE_PREFIX}-python3-pytz") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/mitsuhiko/babel/archive/${pkgver}.tar.gz") +md5sums=('40cbe93a1ce8c1be06dca47fb8b20963') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-babel() { + depends=("${MINGW_PACKAGE_PREFIX}-python3-pytz") + + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py import_cldr + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done +} + +package_python2-babel() { + depends=("${MINGW_PACKAGE_PREFIX}-python2-pytz") + + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py import_cldr + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done + + for f in pybabel; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe + if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest + sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest + fi + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py + done +} + +package_mingw-w64-i686-python2-babel() { + package_python2-babel +} + +package_mingw-w64-i686-python3-babel() { + package_python3-babel +} + +package_mingw-w64-x86_64-python2-babel() { + package_python2-babel +} + +package_mingw-w64-x86_64-python3-babel() { + package_python3-babel +} diff --git a/mingw-w64-python-beaker/PKGBUILD b/mingw-w64-python-beaker/PKGBUILD index 200813ff0e..1df2740ddf 100644 --- a/mingw-w64-python-beaker/PKGBUILD +++ b/mingw-w64-python-beaker/PKGBUILD @@ -2,18 +2,18 @@ # Contributor: Ray Donnelly _realname=beaker - +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.6.4 +pkgver=1.7.0 pkgrel=3 pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications (mingw-w64)" arch=('any') license=('custom') url="http://beaker.groovie.org/" depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") -source=("http://cheeseshop.python.org/packages/source/B/Beaker/Beaker-${pkgver}.tar.gz") -md5sums=('c2e102870ed4c53104dec48ceadf8e9d') - +source=(${_realname}-${pkgver}.tar.gz::https://github.com/bbangert/beaker/archive/${pkgver}.tar.gz) +md5sums=('0a0d4933b28236cc339588871314df74') + prepare() { cd "${srcdir}/Beaker-${pkgver}" #patch -p1 -i ${srcdir}/mingw-python-fix.patch @@ -41,9 +41,9 @@ package_python3-beaker() { ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-beaker/LICENSE" } - + package_python2-beaker() { - depends=("${MINGW_PACKAGE_PREFIX}-python2>") + depends=("${MINGW_PACKAGE_PREFIX}-python2") cd "${srcdir}/python2-Beaker-${pkgver}" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ diff --git a/mingw-w64-python-binwalk/PKGBUILD b/mingw-w64-python-binwalk/PKGBUILD index fb7ad0c1e9..068b8bb0ef 100644 --- a/mingw-w64-python-binwalk/PKGBUILD +++ b/mingw-w64-python-binwalk/PKGBUILD @@ -1,33 +1,41 @@ # Maintainer: Martell Malone _realname=binwalk -pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") # "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") #"${MINGW_PACKAGE_PREFIX}-python2-${_realname}" pkgver=2.0.1 -pkgrel=1 -pkgdesc="A tool for searching a given binary image for embedded files" +pkgrel=2 +pkgdesc="A tool for searching a given binary image for embedded files (mingw-w64)" arch=('any') url="http://binwalk.org" license=('MIT') -depends=('git' 'zlib' 'xz' 'gzip' 'bzip2' 'tar') -source=(https://github.com/devttys0/${_realname}/archive/v${pkgver}.tar.gz) +depends=("${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-systre" + "${MINGW_PACKAGE_PREFIX}-bzip2" + #'tar' + #'git' + ) +source=(${_realname}-${pkgver}.tar.gz::https://github.com/devttys0/${_realname}/archive/v${pkgver}.tar.gz) md5sums=('ffeea02b765e44ac7a2455398011fc73') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - echo $PYTHON - sed -i "s|\$(PYTHON) ./setup.py install \$(PREFIX)|\$(PYTHON) ./setup.py install \"--prefix=${pkgdir}/usr\"|" Makefile.in + local pyt=${MINGW_PREFIX}/bin/python3 + sed -i "s|\$(PYTHON) ./setup.py install \$(PREFIX)|\$(PYTHON) ./setup.py install \"--prefix=${MINGW_PREFIX} --root=${pkgdir}\"|" Makefile.in autoconf } build() { cd "${srcdir}/${_realname}-${pkgver}" - ./configure --build=${CHOST} \ - --prefix=/usr + ./configure \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} + make } package() { cd "${srcdir}/${_realname}-${pkgver}" make DESTDIR="${pkgdir}" install - install -m 644 -D "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${_realname}/LICENSE" + install -m 644 -D "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-python-bsddb3/PKGBUILD b/mingw-w64-python-bsddb3/PKGBUILD new file mode 100644 index 0000000000..8927c66a84 --- /dev/null +++ b/mingw-w64-python-bsddb3/PKGBUILD @@ -0,0 +1,80 @@ +# Contributor: Josip + +_realname=bsddb3 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=6.1.0 +pkgrel=3 +pkgdesc="Python bindings for Oracle Berkeley DB (mingw-w64)" +arch=('any') +license=('BSD') +url="http://www.jcea.es/programacion/pybsddb.htm" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-db") +options=('staticlibs' 'strip' '!debug') +source=("http://pypi.python.org/packages/source/b/bsddb3/${_realname}-${pkgver}.tar.gz") +md5sums=('8d998ee04dc05f3808a7edfe3011decc') + +prepare() { + plain "Patching setup files ..." + cd "${srcdir}/${_realname}-${pkgver}" + sed -i -e "s|if os.name == 'posix':|if os.name == 'nt':|g" setup{2,3}.py + sed -i -e "s|elif os.name == 'nt':|elif os.name == 'FOO':|g" setup{2,3}.py + + cd "${srcdir}" + cp -r ${_realname}-${pkgver} build-${CARCH} +} + +build() { + CFLAGS+=" -DUNICODE -D_UNICODE" + + export YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=YES + export BERKELEYDB_DIR="${MINGW_PREFIX}" + + # Build python 2 module + cd "${srcdir}/build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ + ${MINGW_PREFIX}/bin/python2 setup.py build + + # Build python 3 module + cd "${srcdir}/build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ + ${MINGW_PREFIX}/bin/python3 setup.py build +} + +package_python3-bsddb3() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-db") + + cd "${srcdir}/build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build +} + +package_python2-bsddb3() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-db") + + cd "${srcdir}/build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build +} + +package_mingw-w64-i686-python2-bsddb3() { + package_python2-bsddb3 +} + +package_mingw-w64-i686-python3-bsddb3() { + package_python3-bsddb3 +} + +package_mingw-w64-x86_64-python2-bsddb3() { + package_python2-bsddb3 +} + +package_mingw-w64-x86_64-python3-bsddb3() { + package_python3-bsddb3 +} diff --git a/mingw-w64-python-characteristic/PKGBUILD b/mingw-w64-python-characteristic/PKGBUILD new file mode 100644 index 0000000000..bb2acae260 --- /dev/null +++ b/mingw-w64-python-characteristic/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Frederic Wang + +_realname=characteristic +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=14.3.0 +pkgrel=1 +pkgdesc='Python attributes without boilerplate (mingw-w64)' +url='https://characteristic.readthedocs.org/' +license=('MIT') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +source=("https://pypi.python.org/packages/source/c/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('b249368dd021fde1c06b4802867c0913') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-characteristic() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-characteristic() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-characteristic() { + package_python2-characteristic +} + +package_mingw-w64-i686-python3-characteristic() { + package_python3-characteristic +} + +package_mingw-w64-x86_64-python2-characteristic() { + package_python2-characteristic +} + +package_mingw-w64-x86_64-python3-characteristic() { + package_python3-characteristic +} diff --git a/mingw-w64-python-colorama/PKGBUILD b/mingw-w64-python-colorama/PKGBUILD new file mode 100644 index 0000000000..56685da30a --- /dev/null +++ b/mingw-w64-python-colorama/PKGBUILD @@ -0,0 +1,79 @@ +# Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly + +_realname=colorama +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.3.3 +pkgrel=2 +pkgdesc="Python API for cross-platform colored terminal text (mingw-w64)" +arch=('any') +license=('BSD') +url="http://pypi.python.org/pypi/colorama" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose" + "${MINGW_PACKAGE_PREFIX}-python3-nose") +options=('staticlibs') +source=(https://pypi.python.org/packages/source/c/colorama/colorama-${pkgver}.tar.gz) +md5sums=('a56b8dc55158a41ab3c89c4c8feb8824') + +prepare() { + cd ${srcdir} + cp -r colorama-${pkgver} python2-build + cp -r colorama-${pkgver} python3-build +} + +build() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build + popd + done +} + +check() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} py.test + popd + done +} + +package_python2-colorama() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd "${srcdir}/python2-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING" +} + +package_python3-colorama() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd "${srcdir}/python3-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" +} + +package_mingw-w64-i686-python2-colorama() { + package_python2-colorama +} + +package_mingw-w64-i686-python3-colorama() { + package_python3-colorama +} + +package_mingw-w64-x86_64-python2-colorama() { + package_python2-colorama +} + +package_mingw-w64-x86_64-python3-colorama() { + package_python3-colorama +} diff --git a/mingw-w64-python-coverage/PKGBUILD b/mingw-w64-python-coverage/PKGBUILD new file mode 100644 index 0000000000..8f7b95e3de --- /dev/null +++ b/mingw-w64-python-coverage/PKGBUILD @@ -0,0 +1,76 @@ +# Contributor: Frederic Wang + +_realname=coverage +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.0.2 +pkgrel=1 +pkgdesc='Code coverage measurement for Python (mingw-w64)' +url='https://coverage.readthedocs.org/' +license=('Apache 2.0') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +source=("https://pypi.python.org/packages/source/c/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('c969a88fd0508100e741fc743659b513') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-coverage() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done +} + +package_python2-coverage() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done + + for f in coverage; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe + if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest + sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest + fi + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py + done +} + +package_mingw-w64-i686-python2-coverage() { + package_python2-coverage +} + +package_mingw-w64-i686-python3-coverage() { + package_python3-coverage +} + +package_mingw-w64-x86_64-python2-coverage() { + package_python2-coverage +} + +package_mingw-w64-x86_64-python3-coverage() { + package_python3-coverage +} diff --git a/mingw-w64-python-csssselect/PKGBUILD b/mingw-w64-python-csssselect/PKGBUILD index ebfac619c3..9c426b57b6 100644 --- a/mingw-w64-python-csssselect/PKGBUILD +++ b/mingw-w64-python-csssselect/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=cssselect - +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=0.9.1 -pkgrel=2 +pkgrel=4 pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications (mingw-w64)" arch=('any') license=('BSD') @@ -12,7 +12,7 @@ url="http://pypi.python.org/pypi/cssselect" makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3") source=("http://pypi.python.org/packages/source/c/cssselect/${_realname}-${pkgver}.tar.gz") md5sums=('c74f45966277dc7a0f768b9b0f3522ac') - + prepare() { cd "${srcdir}" sed -e "s|# coding: utf8|# -*- encoding:utf-8 -*-|g" -i ${_realname}-${pkgver}/setup.py diff --git a/mingw-w64-python-cx_Freeze/PKGBUILD b/mingw-w64-python-cx_Freeze/PKGBUILD new file mode 100644 index 0000000000..bef92b5b13 --- /dev/null +++ b/mingw-w64-python-cx_Freeze/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Frode Solheim + +_realname=cx_Freeze +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-cx_Freeze" + "${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze") +pkgver=4.3.3 +pkgrel=5 +pkgdesc="Python package for freezing scripts into executables (mingw-w64)" +arch=('any') +license=('PSF') +url="http://cx-freeze.sourceforge.net/" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.python.org/packages/source/c/cx_Freeze/cx_Freeze-${pkgver}.tar.gz") +md5sums=('3cae24b98694540eb083ac500c0d4aa1') + +prepare() { + rm -Rf python2-cx_Freeze-${pkgver}-${CARCH} + cp -a cx_Freeze-${pkgver} python2-cx_Freeze-${pkgver}-${CARCH} + rm -Rf python3-cx_Freeze-${pkgver}-${CARCH} + cp -a cx_Freeze-${pkgver} python3-cx_Freeze-${pkgver}-${CARCH} +} + +build() { + echo "Building for Python 2" + cd python2-cx_Freeze-${pkgver}-${CARCH} + ${MINGW_PREFIX}/bin/python2 setup.py build + cd .. + + echo "Building for Python 3" + cd python3-cx_Freeze-${pkgver}-${CARCH} + ${MINGW_PREFIX}/bin/python3 setup.py build + cd .. +} + +package_python2-cx_Freeze() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six") + + cd python2-cx_Freeze-${pkgver}-${CARCH} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + mv ${pkgdir}${MINGW_PREFIX}/bin/cxfreeze{,2} + mv ${pkgdir}${MINGW_PREFIX}/bin/cxfreeze-postinstall{,2} + mv ${pkgdir}${MINGW_PREFIX}/bin/cxfreeze-quickstart{,2} +} + +package_python3-cx_Freeze() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six") + + cd python3-cx_Freeze-${pkgver}-${CARCH} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 +} + +package_mingw-w64-i686-python2-cx_Freeze() { + package_python2-cx_Freeze +} + +package_mingw-w64-i686-python3-cx_Freeze() { + package_python3-cx_Freeze +} + +package_mingw-w64-x86_64-python2-cx_Freeze() { + package_python2-cx_Freeze +} + +package_mingw-w64-x86_64-python3-cx_Freeze() { + package_python3-cx_Freeze +} diff --git a/mingw-w64-python-cycler/PKGBUILD b/mingw-w64-python-cycler/PKGBUILD new file mode 100644 index 0000000000..dbfb7c27d6 --- /dev/null +++ b/mingw-w64-python-cycler/PKGBUILD @@ -0,0 +1,87 @@ +# Maintainer: Ryuta Suzuki + +_realname=cycler +pkgbase=mingw-w64-python-${_realname} +pkgname=( + "${MINGW_PACKAGE_PREFIX}-python3-${_realname}" + "${MINGW_PACKAGE_PREFIX}-python2-${_realname}" +) +pkgver=0.9.0 +pkgrel=1 +pkgdesc="Composable style cycles" +arch=('any') +license=('BSD') +url="http://github.com/matplotlib/cycler" +makedepends=( + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python2-six" + 'git' +) +checkdepends=( + "${MINGW_PACKAGE_PREFIX}-python3-nose" + "${MINGW_PACKAGE_PREFIX}-python2-nose" + "${MINGW_PACKAGE_PREFIX}-python3-coverage" + "${MINGW_PACKAGE_PREFIX}-python2-coverage" +) +source=("git+https://github.com/matplotlib/cycler.git#tag=v$pkgver") +sha512sums=('SKIP') + +prepare() { + cp -a cycler{,-py2} +} + +build() { + cd $srcdir/cycler + python3 setup.py build + + cd $srcdir/cycler-py2 + python2 setup.py build +} + +check() { + cd $srcdir/cycler + python3 run_tests.py + + cd $srcdir/cycler-py2 + python2 run_tests.py +} + +package_python3-cycler() { + depends=( + "${MINGW_PACKAGE_PREFIX}-python3>=3.5.0" "${MINGW_PACKAGE_PREFIX}-python3<3.6.0" + "${MINGW_PACKAGE_PREFIX}-python3-six" + ) + + cd cycler + python3 setup.py install --root="${pkgdir}" --prefix=/$MINGW_PREFIX --optimize=1 + install -D -m644 LICENSE "${pkgdir}/$MINGW_PREFIX/share/licenses/python3-cycler/LICENSE" +} + +package_python2-cycler() { + depends=( + "${MINGW_PACKAGE_PREFIX}-python2>=2.7.0" "${MINGW_PACKAGE_PREFIX}-python2<2.8.0" + "${MINGW_PACKAGE_PREFIX}-python2-six" + ) + + cd cycler-py2 + python2 setup.py install --root="${pkgdir}" --prefix=/$MINGW_PREFIX --optimize=1 + install -D -m644 LICENSE "${pkgdir}/$MINGW_PREFIX/share/licenses/python2-cycler/LICENSE" +} + +package_mingw-w64-i686-python2-cycler() { + package_python2-cycler +} + +package_mingw-w64-i686-python3-cycler() { + package_python3-cycler +} + +package_mingw-w64-x86_64-python2-cycler() { + package_python2-cycler +} + +package_mingw-w64-x86_64-python3-cycler() { + package_python3-cycler +} diff --git a/mingw-w64-python-dateutil/PKGBUILD b/mingw-w64-python-dateutil/PKGBUILD index 7b1e087265..d40299e64a 100644 --- a/mingw-w64-python-dateutil/PKGBUILD +++ b/mingw-w64-python-dateutil/PKGBUILD @@ -1,8 +1,9 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=dateutil +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=2.2 +pkgver=2.4.2 pkgrel=2 pkgdesc="Provides powerful extensions to the standard datetime module (mingw-w64)" arch=('any') @@ -14,53 +15,53 @@ makedepends=( "${MINGW_PACKAGE_PREFIX}-python2-six" "${MINGW_PACKAGE_PREFIX}-python3-six" ) -source=(http://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-$pkgver.tar.gz) -md5sums=('c1f654d0ff7e33999380a8ba9783fd5c') +source=(http://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-${pkgver}.tar.gz) +md5sums=('4ef68e1c485b09e9f034e10473e5add2') prepare() { cd "${srcdir}" - cp -r python-dateutil-$pkgver python2-dateutil-$pkgver - cp -r python-dateutil-$pkgver python3-dateutil-$pkgver + cp -r python-dateutil-${pkgver} python2-build + cp -r python-dateutil-${pkgver} python3-build } check() { - cd $srcdir/python3-dateutil-$pkgver + cd ${srcdir}/python3-build ${MINGW_PREFIX}/bin/python3 test.py - - cd $srcdir/python2-dateutil-$pkgver + + cd ${srcdir}/python2-build ${MINGW_PREFIX}/bin/python2 test.py } package_python3-dateutil() { depends=("${MINGW_PACKAGE_PREFIX}-python3-six") - cd $srcdir/python3-dateutil-$pkgver - + cd ${srcdir}/python3-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ - --root=$pkgdir --optimize=1 - + --root=${pkgdir} --optimize=1 + install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE - chmod -R a+r $pkgdir/${MINGW_PREFIX}/lib/python3.4/ + chmod -R a+r $pkgdir/${MINGW_PREFIX}/lib/python3.5/ # Remove data files - rm $pkgdir/${MINGW_PREFIX}/lib/python3.4/site-packages/dateutil/zoneinfo/zoneinfo--latest.tar.gz + #rm ${pkgdir}${MINGW_PREFIX}/lib/python3.5/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz } - + package_python2-dateutil() { depends=("${MINGW_PACKAGE_PREFIX}-python2-six") - cd $srcdir/python2-dateutil-$pkgver - + cd ${srcdir}/python2-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root=$pkgdir --optimize=1 - + --root=${pkgdir} --optimize=1 + install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE - chmod -R a+r $pkgdir/${MINGW_PREFIX}/lib/python2.7/ + chmod -R a+r ${pkgdir}/${MINGW_PREFIX}/lib/python2.7/ # Remove data files - rm $pkgdir/${MINGW_PREFIX}/lib/python2.7/site-packages/dateutil/zoneinfo/zoneinfo--latest.tar.gz + #rm ${pkgdir}${MINGW_PREFIX}/lib/python2.7/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz } package_mingw-w64-i686-python2-dateutil() { diff --git a/mingw-w64-python-docutils/PKGBUILD b/mingw-w64-python-docutils/PKGBUILD index f9b7e1078d..df0c8be041 100644 --- a/mingw-w64-python-docutils/PKGBUILD +++ b/mingw-w64-python-docutils/PKGBUILD @@ -2,31 +2,31 @@ # Contributor: Ray Donnelly _realname=docutils -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=0.12 -pkgrel=2 +pkgrel=5 pkgdesc="Set of tools for processing plaintext docs into formats such as HTML, XML, or LaTeX (mingw-w64)" arch=('any') license=('custom') url="http://docutils.sourceforge.net" -depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3") -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.gz") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3") +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz") md5sums=('4622263b62c5c771c03502afa3157768') - + build() { cd "${srcdir}/${_realname}-${pkgver}" ${MINGW_PREFIX}/bin/python3 setup.py build --build-lib=build/python3 find build/python3 -type f -exec \ sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python3,' {} \; - + ${MINGW_PREFIX}/bin/python2 setup.py build --build-lib=build/python2 find build/python2 -type f -exec \ sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; } check() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} # we need utf locale to valid utf8 tests export LANG=en_US.UTF-8 # Disable python3 check @@ -39,43 +39,39 @@ check() { package_python3-docutils() { depends=("${MINGW_PACKAGE_PREFIX}-python3") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null - - cd ${_realname}-$pkgver + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) + + cd ${_realname}-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build --build-lib=build/python3 \ - install --prefix=${MINGW_PREFIX} --root="$pkgdir" --optimize=1 + install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 # fix python-docutils conflict for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} mv -v "$_f" "${_f%.py}3.py" done - + # symlink without .py for f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do ln -s "$(basename $f)" "${pkgdir}${MINGW_PREFIX}/bin/$(basename $f .py)" done # setup license - install -D -m644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/COPYING.txt" - install -D -m644 licenses/python* "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/" + install -D -m644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING.txt" + install -D -m644 licenses/python* "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/" } - + package_python2-docutils() { depends=("${MINGW_PACKAGE_PREFIX}-python2") - provides=("${MINGW_PACKAGE_PREFIX}-docutils=$pkgver") + provides=("${MINGW_PACKAGE_PREFIX}-docutils=${pkgver}") replaces=("${MINGW_PACKAGE_PREFIX}-docutils") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null - - cd ${_realname}-$pkgver + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) + + cd ${_realname}-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build --build-lib=build/python2 \ - install --prefix=${MINGW_PREFIX} --root="$pkgdir" --optimize=1 + install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do @@ -86,8 +82,8 @@ package_python2-docutils() { ln -s "$(basename $_f)" "${pkgdir}${MINGW_PREFIX}/bin/$(basename $_f .py)" done # setup license - install -D -m644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/COPYING.txt" - install -D -m644 licenses/python* "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/" + install -D -m644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING.txt" + install -D -m644 licenses/python* "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/" } package_mingw-w64-i686-python2-docutils() { diff --git a/mingw-w64-python-funcsigs/PKGBUILD b/mingw-w64-python-funcsigs/PKGBUILD new file mode 100644 index 0000000000..d81a1a9c78 --- /dev/null +++ b/mingw-w64-python-funcsigs/PKGBUILD @@ -0,0 +1,59 @@ +# Contributor: Frederic Wang + +_realname=funcsigs +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.4 +pkgrel=1 +pkgdesc='Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+' +arch=('any') +url='https://github.com/testing-cabal/funcsigs' +license=('ASL') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2") +source=("https://pypi.python.org/packages/source/f/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('fb1d031f284233e09701f6db1281c2a5') + +prepare() { + cd "${srcdir}" + cp -r ${_realname}-${pkgver} python2-build + cp -r ${_realname}-${pkgver} python3-build +} + +package_python3-funcsigs() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd ${srcdir}/python3-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-funcsigs() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd ${srcdir}/python2-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-funcsigs() { + package_python2-funcsigs +} + +package_mingw-w64-i686-python3-funcsigs() { + package_python3-funcsigs +} + +package_mingw-w64-x86_64-python2-funcsigs() { + package_python2-funcsigs +} + +package_mingw-w64-x86_64-python3-funcsigs() { + package_python3-funcsigs +} diff --git a/mingw-w64-python-h5py/001-mingw-python.patch b/mingw-w64-python-h5py/001-mingw-python.patch new file mode 100644 index 0000000000..c12a8eb7ab --- /dev/null +++ b/mingw-w64-python-h5py/001-mingw-python.patch @@ -0,0 +1,26 @@ +--- h5py-2.5.0/setup_build.py.orig 2015-07-21 19:33:54.858023400 +0300 ++++ h5py-2.5.0/setup_build.py 2015-07-21 19:37:16.980584200 +0300 +@@ -17,6 +17,7 @@ + from functools import reduce + import api_gen + ++from sysconfig import _POSIX_BUILD + + def localpath(*args): + return op.abspath(reduce(op.join, (op.dirname(__file__),)+args)) +@@ -36,7 +37,14 @@ + localpath("lzf/lzf/lzf_d.c")]} + + +-if sys.platform.startswith('win'): ++if _POSIX_BUILD: ++ COMPILER_SETTINGS = { ++ 'libraries' : ['hdf5', 'hdf5_hl'], ++ 'include_dirs' : [localpath('lzf'), '/opt/local/include', '/usr/local/include'], ++ 'library_dirs' : ['/opt/local/lib', '/usr/local/lib'], ++ 'define_macros' : [('H5_USE_16_API', None), ('_HDF5USEDLL_', None)] } ++ ++elif sys.platform.startswith('win'): + COMPILER_SETTINGS = { + 'libraries' : ['h5py_hdf5', 'h5py_hdf5_hl'], + 'include_dirs' : [localpath('lzf'), localpath('windows')], diff --git a/mingw-w64-python-h5py/PKGBUILD b/mingw-w64-python-h5py/PKGBUILD index 5b5063a8c4..a6c2cefb37 100644 --- a/mingw-w64-python-h5py/PKGBUILD +++ b/mingw-w64-python-h5py/PKGBUILD @@ -3,78 +3,75 @@ _realname=h5py pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=2.3.1 +pkgver=2.5.0 pkgrel=1 -pkgdesc="General-purpose Python bindings for the HDF5 library. (mingw-w64)" +pkgdesc="General-purpose Python bindings for the HDF5 library (mingw-w64)" arch=('any') url="http://www.h5py.org" license=('BSD') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-cython" - "${MINGW_PACKAGE_PREFIX}-cython2" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-hdf5" -) -source=( - https://pypi.python.org/packages/source/h/h5py/h5py-$pkgver.tar.gz - setup.py.patch - lzf_c.c.patch -) -md5sums=('8f32f96d653e904d20f9f910c6d9dd91' - '07604b410e29df82c06a9add19b755a5' +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-cython" + "${MINGW_PACKAGE_PREFIX}-cython2" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=(https://pypi.python.org/packages/source/h/h5py/h5py-${pkgver}.tar.gz + 001-mingw-python.patch + lzf_c.c.patch) +md5sums=('6e4301b5ad5da0d51b0a1e5ac19e3b74' + 'cd36077bf04fb855b54c8bda5832dbd6' '8c28048812d378a8a9330dbd21def864') prepare() { - cd $_realname-$pkgver - patch -p1 -i ${srcdir}/setup.py.patch + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-mingw-python.patch patch -p1 -i ${srcdir}/lzf_c.c.patch cd .. - - cp -a $_realname-$pkgver $_realname-py2-$pkgver - cp -a $_realname-$pkgver $_realname-py3-$pkgver + + cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver} + cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver} } build() { # build for python2 - cd ${srcdir}/$_realname-py2-$pkgver - + cd ${srcdir}/${_realname}-py2-${pkgver} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build - + # build for python3 - cd ${srcdir}/$_realname-py3-$pkgver - + cd ${srcdir}/${_realname}-py3-${pkgver} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build } package_python2-h5py() { - depends=( - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-hdf5" - ) - - cd $_realname-py2-$pkgver + depends=("${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-hdf5") + + cd ${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --skip-build \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 licenses/license.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt" } package_python3-h5py() { - depends=( - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-hdf5" - ) - - cd $_realname-py3-$pkgver + depends=("${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-hdf5") + + cd ${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --skip-build \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 licenses/license.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt" diff --git a/mingw-w64-python-h5py/setup.py.patch b/mingw-w64-python-h5py/setup.py.patch deleted file mode 100644 index c8a008e6ad..0000000000 --- a/mingw-w64-python-h5py/setup.py.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- h5py-py3-2.3.1/setup.py 2014-06-23 01:13:59.000000000 +0200 -+++ h5py-py2-2.3.1/setup.py 2014-09-25 21:35:00.415345000 +0200 -@@ -19,6 +19,7 @@ - - VERSION = '2.3.1' - -+MSYS = "MSYSTEM" in os.environ - - # --- Encapsulate NumPy imports in a specialized Extension type --------------- - -@@ -131,7 +132,7 @@ - - # --- Configure Cython and create extensions ---------------------------------- - --if sys.platform.startswith('win'): -+if sys.platform.startswith('win') and not MSYS: - COMPILER_SETTINGS = { - 'libraries' : ['h5py_hdf5','h5py_hdf5_hl'], - 'include_dirs' : [localpath('lzf'), diff --git a/mingw-w64-python-httplib2/PKGBUILD b/mingw-w64-python-httplib2/PKGBUILD new file mode 100644 index 0000000000..5a5dc9d19f --- /dev/null +++ b/mingw-w64-python-httplib2/PKGBUILD @@ -0,0 +1,86 @@ +# Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly + +_realname=httplib2 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.9.2 +pkgrel=1 +pkgdesc="Comprehensive HTTP client library, supporting many features (mingw-w64)" +arch=('any') +license=('MIT') +url="https://github.com/jcgregorio/httplib2" +depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-ca-certificates") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + #"git" + ) +source=(${_realname}-${pkgver}.tar.gz::https://github.com/jcgregorio/httplib2/archive/${pkgver}.tar.gz + ssl_hostname.patch + cert.patch) +md5sums=('eb39d90dc64bd12a94184d76bddc65a3' + '6de5596aedd196a4db96f83f529e3509' + '98fab3f5a578c0db600237f025aac991') + +prepare() { + pushd "${_realname}-${pkgver}" + + # Patch, ref FS#36839 + patch -p1 -i "${srcdir}/ssl_hostname.patch" + + # Patch, ref FS#40179 + patch -p1 -i "${srcdir}/cert.patch" + + popd + + # Prepare one build directory for each package + cp -a "${_realname}-${pkgver}" build-python2 + cp -a "${_realname}-${pkgver}" build-python3 +} + +build() { + echo "Empty" +} + +package_python2-httplib2() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-ca-certificates") + + cd "${srcdir}/build-python2" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 + + #install -Dm644 LICENSE \ + # "${pkgdir}${MINGW_PREFIX}"/share/licenses/python2-${_realname}/LICENSE +} + +package_python3-httplib2() { + pkgdesc="Python3 binding for the libxml2 and libxslt libraries" + depends=("${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-ca-certificates") + + cd "${srcdir}/build-python3" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 + + #install -Dm644 LICENSE \ + # "${pkgdir}${MINGW_PREFIX}"/share/licenses/python3-${_realname}/LICENSE +} + +package_mingw-w64-i686-python2-httplib2() { + package_python2-httplib2 +} + +package_mingw-w64-i686-python3-httplib2() { + package_python3-httplib2 +} + +package_mingw-w64-x86_64-python2-httplib2() { + package_python2-httplib2 +} + +package_mingw-w64-x86_64-python3-httplib2() { + package_python3-httplib2 +} diff --git a/mingw-w64-python-httplib2/cert.patch b/mingw-w64-python-httplib2/cert.patch new file mode 100644 index 0000000000..23021ba85a --- /dev/null +++ b/mingw-w64-python-httplib2/cert.patch @@ -0,0 +1,30 @@ +diff -ur httplib2-0.8.orig/python2/httplib2/__init__.py httplib2-0.8/python2/httplib2/__init__.py +--- httplib2-0.8.orig/python2/httplib2/__init__.py 2014-05-01 23:25:52.459852279 +0200 ++++ httplib2-0.8/python2/httplib2/__init__.py 2014-05-01 23:28:08.822391994 +0200 +@@ -190,9 +190,8 @@ + import ca_certs_locater + CA_CERTS = ca_certs_locater.get() + except ImportError: +- # Default CA certificates file bundled with httplib2. +- CA_CERTS = os.path.join( +- os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt") ++ # Use system CA certificates ++ CA_CERTS = os.path.join(sys.exec_prefix, "ssl", "certs", "ca-bundle.crt") + + # Which headers are hop-by-hop headers by default + HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] +diff -ur httplib2-0.8.orig/python3/httplib2/__init__.py httplib2-0.8/python3/httplib2/__init__.py +--- httplib2-0.8.orig/python3/httplib2/__init__.py 2013-03-06 21:40:54.000000000 +0100 ++++ httplib2-0.8/python3/httplib2/__init__.py 2014-05-01 23:28:36.822913468 +0200 +@@ -123,9 +123,8 @@ + # Which headers are hop-by-hop headers by default + HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] + +-# Default CA certificates file bundled with httplib2. +-CA_CERTS = os.path.join( +- os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt") ++# Use system CA certificates ++CA_CERTS = os.path.join(sys.exec_prefix, "ssl", "certs", "ca-bundle.crt") + + def _get_end2end_headers(response): + hopbyhop = list(HOP_BY_HOP) diff --git a/mingw-w64-python-httplib2/ssl_hostname.patch b/mingw-w64-python-httplib2/ssl_hostname.patch new file mode 100644 index 0000000000..964a1ec774 --- /dev/null +++ b/mingw-w64-python-httplib2/ssl_hostname.patch @@ -0,0 +1,21 @@ +diff -r 93291649202b python2/httplib2/__init__.py +--- a/python2/httplib2/__init__.py Tue Mar 26 14:17:48 2013 -0400 ++++ b/python2/httplib2/__init__.py Tue Apr 23 10:32:15 2013 +0300 +@@ -1030,7 +1030,7 @@ + raise CertificateHostnameMismatch( + 'Server presented certificate that does not match ' + 'host %s: %s' % (hostname, cert), hostname, cert) +- except ssl_SSLError, e: ++ except (ssl_SSLError, CertificateHostnameMismatch), e: + if sock: + sock.close() + if self.sock: +@@ -1040,7 +1040,7 @@ + # to get at more detailed error information, in particular + # whether the error is due to certificate validation or + # something else (such as SSL protocol mismatch). +- if e.errno == ssl.SSL_ERROR_SSL: ++ if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL: + raise SSLHandshakeError(e) + else: + raise diff --git a/mingw-w64-python-icu/PKGBUILD b/mingw-w64-python-icu/PKGBUILD new file mode 100644 index 0000000000..d01fa72ee7 --- /dev/null +++ b/mingw-w64-python-icu/PKGBUILD @@ -0,0 +1,84 @@ +# Contributor: Josip + +_realname=PyICU +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-icu" "${MINGW_PACKAGE_PREFIX}-python3-icu") +pkgver=1.9.2 +pkgrel=3 +pkgdesc="Python extension wrapping the ICU C++ API (mingw-w64)" +arch=('any') +license=('BSD') +url="https://pypi.python.org/pypi/PyICU/" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-icu") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.python.org/packages/source/P/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('a104ea78918a8b1f4ecbbb1063edb46b') + +prepare() { + cd "${srcdir}" + cp -r ${_realname}-${pkgver} build-${CARCH} +} + +build() { + CFLAGS+=" -fpermissive" + export PYICU_CFLAGS="-DPYICU_VER=\\\"${pkgver}\\\"" + export PYICU_LFLAGS="-L${MINGW_PREFIX}/lib" + export PYICU_INCLUDES="${MINGW_PREFIX}/include" + export PYICU_LIBRARIES="icuin;icuuc;icudt;icule" + + # Build python 2 module + cd "${srcdir}/build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py build + + # Build python 3 module + cd "${srcdir}/build-${CARCH}" + ${MINGW_PREFIX}/bin/python3 setup.py build +} + +package_python3-icu() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-icu") + + cd "${srcdir}/build-${CARCH}" + ${MINGW_PREFIX}/bin/python3 setup.py install \ + --prefix=${MINGW_PREFIX#\/} \ + --root="${pkgdir}" \ + --optimize=1 \ + --skip-build + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-icu/COPYING" +} + +package_python2-icu() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-icu") + + cd "${srcdir}/build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py install \ + --prefix=${MINGW_PREFIX#\/} \ + --root="${pkgdir}" \ + --optimize=1 \ + --skip-build + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-icu/COPYING" +} + +package_mingw-w64-i686-python2-icu() { + package_python2-icu +} + +package_mingw-w64-i686-python3-icu() { + package_python3-icu +} + +package_mingw-w64-x86_64-python2-icu() { + package_python2-icu +} + +package_mingw-w64-x86_64-python3-icu() { + package_python3-icu +} diff --git a/mingw-w64-python-idna/PKGBUILD b/mingw-w64-python-idna/PKGBUILD new file mode 100644 index 0000000000..7bb4cad2bd --- /dev/null +++ b/mingw-w64-python-idna/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Frederic Wang + +_realname=idna +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.0 +pkgrel=1 +pkgdesc='Internationalized Domain Names in Applications (mingw-w64)' +url='https://github.com/kjd/idna' +license=('BSD-like') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +source=("https://pypi.python.org/packages/source/i/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('bd17a9d15e755375f48a62c13b25b801') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-idna() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.rst" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-idna() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.rst" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-idna() { + package_python2-idna +} + +package_mingw-w64-i686-python3-idna() { + package_python3-idna +} + +package_mingw-w64-x86_64-python2-idna() { + package_python2-idna +} + +package_mingw-w64-x86_64-python3-idna() { + package_python3-idna +} diff --git a/mingw-w64-python-ipython/0001-unimplemented-readline-calls.patch b/mingw-w64-python-ipython/0001-unimplemented-readline-calls.patch new file mode 100644 index 0000000000..a4343ebc61 --- /dev/null +++ b/mingw-w64-python-ipython/0001-unimplemented-readline-calls.patch @@ -0,0 +1,33 @@ +--- ipython-2.3.1/IPython/utils/rlineimpl.py.orig 2014-11-12 18:08:55.000000000 -0500 ++++ ipython-2.3.1/IPython/utils/rlineimpl.py 2015-01-19 22:45:58.690179800 -0500 +@@ -27,13 +27,6 @@ + have_readline = True + break + +-if have_readline and (sys.platform == 'win32' or sys.platform == 'cli'): +- try: +- _outputfile=_rl.GetOutputFile() +- except AttributeError: +- warnings.warn("Failed GetOutputFile") +- have_readline = False +- + # Test to see if libedit is being used instead of GNU readline. + # Thanks to Boyd Waters for the original patch. + uses_libedit = False + +--- ipython-2.3.1/IPython/core/interactiveshell.py.orig 2015-01-19 23:27:23.065906800 -0500 ++++ ipython-2.3.1/IPython/core/interactiveshell.py 2015-01-19 23:28:02.695374400 -0500 +@@ -657,11 +657,8 @@ + # override sys.stdout and sys.stderr themselves, you need to do that + # *before* instantiating this class, because io holds onto + # references to the underlying streams. +- if (sys.platform == 'win32' or sys.platform == 'cli') and self.has_readline: +- io.stdout = io.stderr = io.IOStream(self.readline._outputfile) +- else: +- io.stdout = io.IOStream(sys.stdout) +- io.stderr = io.IOStream(sys.stderr) ++ io.stdout = io.IOStream(sys.stdout) ++ io.stderr = io.IOStream(sys.stderr) + + def init_prompts(self): + self.prompt_manager = PromptManager(shell=self, parent=self) diff --git a/mingw-w64-python-ipython/PKGBUILD b/mingw-w64-python-ipython/PKGBUILD new file mode 100644 index 0000000000..a084d01907 --- /dev/null +++ b/mingw-w64-python-ipython/PKGBUILD @@ -0,0 +1,119 @@ +# Maintainer: Kyle Kauffman + +_realname=ipython +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.0.0 +pkgrel=1 +pkgdesc="An enhanced Interactive Python shell (mingw-w64)" +arch=('any') +url="http://ipython.org" +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") + +source=("https://pypi.python.org/packages/source/i/ipython/${_realname}-${pkgver}.tar.gz" + 0001-unimplemented-readline-calls.patch) +md5sums=('c2fecbcf1c0fbdc82625c77a50733dd6' + '0b1702a800266e6bd841708270cf9e80') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i ${srcdir}/0001-unimplemented-readline-calls.patch +} + +all_build() { + cd "${srcdir}/${_realname}-${pkgver}" + + # see https://github.com/ipython/ipython/issues/2057 + #export LC_ALL=en_US.UTF-8 + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/${1} setup.py install \ + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + + find "${pkgdir}/" -name "*.pyc" -delete + find "${pkgdir}/" -type d -empty -delete + + # setuptools doesnt see mingw-w64-python's readline + find "${pkgdir}/" -name 'requires.txt' -delete + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.cmd; do + sed -e "s|${PREFIX_WIN}/bin/||g" -i ${_f} + done + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done +} + +package_python3-ipython() { + local interpreter=python3 + #install=ipython3-${CARCH}.install + depends=("${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") + optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: for IPython's test suite" + "${MINGW_PACKAGE_PREFIX}-python3-pyqt4: for ipython qtconsole" + "${MINGW_PACKAGE_PREFIX}-python3-sip: for ipython qtconsole" + "${MINGW_PACKAGE_PREFIX}-python3-pygments: for ipython qtconsole" + "${MINGW_PACKAGE_PREFIX}-python3-jinja: for ipython notebook") +# "${MINGW_PACKAGE_PREFIX}-haskell-pandoc: ipython notebook conversion" +# "${MINGW_PACKAGE_PREFIX}-python3-pyzmq: ipython notebook and ipython qtconcole" +# "${MINGW_PACKAGE_PREFIX}-python3-tornado: for ipython notebook" + + all_build ${interpreter} + + install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython/LICENSE" + +} + +package_python2-ipython() { + local interpreter=python2 + #install=ipython2-${CARCH}.install + depends=("${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") + optdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose: for IPython's test suite" + "${MINGW_PACKAGE_PREFIX}-python2-pyqt4: for ipython qtconsole" + "${MINGW_PACKAGE_PREFIX}-python2-sip: for ipython qtconsole" + "${MINGW_PACKAGE_PREFIX}-python2-pygments: for ipython qtconsole" + "${MINGW_PACKAGE_PREFIX}-python2-jinja: for ipython notebook") +# "${MINGW_PACKAGE_PREFIX}-haskell-pandoc: ipython notebook conversion" +# "${MINGW_PACKAGE_PREFIX}-python2-pyzmq: ipython notebook and ipython qtconcole" +# "${MINGW_PACKAGE_PREFIX}-python2-tornado: for ipython notebook" + + all_build ${interpreter} + for file_script in iptest ipython; do + rm ${pkgdir}${MINGW_PREFIX}/bin/${file_script}{,.cmd} + done + + install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython2/LICENSE" + + # Fix bin collisions + find "${pkgdir}${MINGW_PREFIX}/bin/" -type f -regex '.*[^2].exe$' -delete + find "${pkgdir}${MINGW_PREFIX}/bin/" -type f -regex '.*[^2]-script.py$' -delete + find "${pkgdir}${MINGW_PREFIX}/bin/" -type f -regex '.*[^2].exe.manifest$' -delete + + # Fix manpage collisions + cd "${pkgdir}${MINGW_PREFIX}/share/man/man1/" + for i in *; do + mv ${i} ${i/%.1/2.1} + done + +} + +package_mingw-w64-i686-python2-ipython() { + package_python2-ipython +} + +package_mingw-w64-i686-python3-ipython() { + package_python3-ipython +} + +package_mingw-w64-x86_64-python2-ipython() { + package_python2-ipython +} + +package_mingw-w64-x86_64-python3-ipython() { + package_python3-ipython +} diff --git a/mingw-w64-python-jinja/PKGBUILD b/mingw-w64-python-jinja/PKGBUILD index b1047aaa64..7e00f848d6 100644 --- a/mingw-w64-python-jinja/PKGBUILD +++ b/mingw-w64-python-jinja/PKGBUILD @@ -1,28 +1,26 @@ # Maintainer: Alexey Pavlov _realname=jinja - +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=2.7.2 -pkgrel=2 +pkgver=2.8 +pkgrel=1 pkgdesc="A simple pythonic template language written in Python (mingw-w64)" arch=('any') license=('BSD') url="http://jinja.pocoo.org/" -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-markupsafe" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python2-markupsafe" -) -source=(http://pypi.python.org/packages/source/J/Jinja2/Jinja2-$pkgver.tar.gz) -sha256sums=('310a35fbccac3af13ebf927297f871ac656b9da1d248b1fe6765affa71b53235') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-markupsafe" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-markupsafe") +source=(http://pypi.python.org/packages/source/J/Jinja2/Jinja2-${pkgver}.tar.gz) +sha256sums=('bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4') build() { - cd "$srcdir" + cd "${srcdir}" rm -rf python{2,3}-build for builddir in python{2,3}-build; do - cp -r Jinja2-$pkgver $builddir + cp -r Jinja2-${pkgver} $builddir pushd $builddir ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build popd @@ -30,24 +28,23 @@ build() { } package_python3-jinja() { - pkgdesc='Python3 documentation generator' depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-markupsafe") - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 - install -Dm644 LICENSE "${pkgdi}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } - + package_python2-jinja() { depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python2-markupsafe") - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 - - install -Dm644 LICENSE "${pkgdi}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } package_mingw-w64-i686-python2-jinja() { diff --git a/mingw-w64-python-lhafile/PKGBUILD b/mingw-w64-python-lhafile/PKGBUILD new file mode 100644 index 0000000000..b5d0aca634 --- /dev/null +++ b/mingw-w64-python-lhafile/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: Frode Solheim + +_realname=python-lhafile +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-lhafile" + "${MINGW_PACKAGE_PREFIX}-python3-lhafile") +pkgver=0.2.1 +pkgrel=1 +pkgdesc="LHA module for Python (mingw-w64)" +arch=('any') +license=('BSD') +url="http://fengestad.no/python-lhafile" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +options=('staticlibs' 'strip' '!debug') +source=(http://fengestad.no/python-lhafile/python-lhafile-${pkgver}.tar.gz) +md5sums=('bc63d61a1b562bbbc52118c168f8cb5e') + +prepare() { + cp -a python-lhafile-${pkgver} python2-lhafile-${pkgver}-${CARCH} + cp -a python-lhafile-${pkgver} python3-lhafile-${pkgver}-${CARCH} +} + +build() { + echo "Building for Python 2" + cd python2-lhafile-${pkgver}-${CARCH} + ${MINGW_PREFIX}/bin/python2 setup.py build + cd .. + + echo "Building for Python 3" + cd python3-lhafile-${pkgver}-${CARCH} + ${MINGW_PREFIX}/bin/python3 setup.py build +} + +package_python2-lhafile() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six") + + cd python2-lhafile-${pkgver}-${CARCH} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-lhafile" + install -m644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-lhafile/" +} + +package_python3-lhafile() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six") + + cd python3-lhafile-${pkgver}-${CARCH} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-lhafile" + install -m644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-lhafile/" +} + +package_mingw-w64-i686-python2-lhafile() { + package_python2-lhafile +} + +package_mingw-w64-i686-python3-lhafile() { + package_python3-lhafile +} + +package_mingw-w64-x86_64-python2-lhafile() { + package_python2-lhafile +} + +package_mingw-w64-x86_64-python3-lhafile() { + package_python3-lhafile +} diff --git a/mingw-w64-python-lxml/PKGBUILD b/mingw-w64-python-lxml/PKGBUILD index 00222040be..cc05587fea 100644 --- a/mingw-w64-python-lxml/PKGBUILD +++ b/mingw-w64-python-lxml/PKGBUILD @@ -2,27 +2,26 @@ # Contributor: Ray Donnelly _realname=lxml -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}" "${MINGW_PACKAGE_PREFIX}-python-${_realname}-docs") -pkgver=3.4.0 +pkgver=3.5.0b1 pkgrel=1 arch=('any') license=('BSD' 'custom') url="http://lxml.de/" -depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3") makedepends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-python2-cssselect" - "${MINGW_PACKAGE_PREFIX}-python3-cssselect") + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-python2-cssselect" + "${MINGW_PACKAGE_PREFIX}-python3-cssselect") source=(http://pypi.python.org/packages/source/l/lxml/${_realname}-${pkgver}.tar.gz{,.asc} mingw-python-fix.patch use-distutils-get_platform.patch) -md5sums=('bc90cc4e4ee04e1f8290ae0f70e34eea' +md5sums=('c6eb532ab172a91a590de7ad4d5fbcc9' 'SKIP' 'e07163fc1e02cab5fa6009af35d5f823' - '5268f79eb2a69b05da73d357ec8184b1') - + '834321a91985c6d5e55de65c1ea1793b') + prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -p1 -i ${srcdir}/mingw-python-fix.patch diff --git a/mingw-w64-python-lxml/use-distutils-get_platform.patch b/mingw-w64-python-lxml/use-distutils-get_platform.patch index 6867ca674a..9813e77a12 100644 --- a/mingw-w64-python-lxml/use-distutils-get_platform.patch +++ b/mingw-w64-python-lxml/use-distutils-get_platform.patch @@ -1,11 +1,11 @@ ---- lxml-3.3.1/setupinfo.py.orig 2014-03-05 01:32:55.698960400 +0000 -+++ lxml-3.3.1/setupinfo.py 2014-03-05 01:47:39.983538500 +0000 -@@ -1,6 +1,7 @@ - import sys, os, os.path +--- lxml-3.5.0b1/setupinfo.py.orig 2014-03-05 01:32:55.698960400 +0000 ++++ lxml-3.5.0b1/setupinfo.py 2014-03-05 01:47:39.983538500 +0000 +@@ -2,6 +2,7 @@ from distutils.core import Extension - from distutils.errors import DistutilsOptionError + from distutils.errors import CompileError, DistutilsOptionError + from distutils.command.build_ext import build_ext as _build_ext +from distutils.util import get_platform - from versioninfo import get_base_dir, split_version + from versioninfo import get_base_dir try: @@ -180,7 +181,7 @@ diff --git a/mingw-w64-python-mako/PKGBUILD b/mingw-w64-python-mako/PKGBUILD index d1e37c8416..878209614f 100644 --- a/mingw-w64-python-mako/PKGBUILD +++ b/mingw-w64-python-mako/PKGBUILD @@ -2,12 +2,12 @@ # Contributor: Ray Donnelly _realname=mako +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.0.0 -pkgrel=2 +pkgver=1.0.3 +pkgrel=1 pkgdesc="A super-fast templating language that borrows the best ideas from the existing templating languages (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") license=('custom') url="https://pypi.python.org/pypi/Mako" makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" @@ -20,7 +20,7 @@ checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose" "${MINGW_PACKAGE_PREFIX}-python3-nose") options=('staticlibs') source=("https://pypi.python.org/packages/source/M/Mako/Mako-${pkgver}.tar.gz") -md5sums=('ae27c6512832fe528bb67f1a851921cc') +md5sums=('a78f20f6366a8a0659ce5532f8614e53') prepare() { cd ${srcdir} @@ -29,18 +29,18 @@ prepare() { } build() { - cd "$srcdir" + cd "${srcdir}" for builddir in python{2,3}-build; do - pushd $builddir + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build popd done } check() { - cd "$srcdir" + cd "${srcdir}" for builddir in python{2,3}-build; do - pushd $builddir + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-build} setup.py test popd done @@ -49,45 +49,41 @@ check() { package_python2-mako() { depends=("${MINGW_PACKAGE_PREFIX}-python2-markupsafe" "${MINGW_PACKAGE_PREFIX}-python2-beaker") - cd "$srcdir/python2-build" + cd "${srcdir}/python2-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 # fix python command in files - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done mv ${pkgdir}${MINGW_PREFIX}/bin/mako-render{,2}.exe mv ${pkgdir}${MINGW_PREFIX}/bin/mako-render{,2}-script.py - + [[ -f ${pkgdir}${MINGW_PREFIX}/bin/mako-render.exe.manifest ]] && { mv ${pkgdir}${MINGW_PREFIX}/bin/mako-render{,2}.exe.manifest sed -e "s|mako-render|mako-render2|g" -i ${pkgdir}${MINGW_PREFIX}/bin/mako-render2.exe.manifest } - - install -Dm644 LICENSE "${pkgdi}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING" + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING" } package_python3-mako() { depends=("${MINGW_PACKAGE_PREFIX}-python3-markupsafe" "${MINGW_PACKAGE_PREFIX}-python3-beaker") - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 # fix python command in files - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done - - install -Dm644 LICENSE "${pkgdi}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" } package_mingw-w64-i686-python2-mako() { diff --git a/mingw-w64-python-markupsafe/PKGBUILD b/mingw-w64-python-markupsafe/PKGBUILD index 4a1a1961c7..b8e240ceda 100644 --- a/mingw-w64-python-markupsafe/PKGBUILD +++ b/mingw-w64-python-markupsafe/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Alexey Pavlov _realname=markupsafe - +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Implements a XML/HTML/XHTML Markup safe string for Python (mingw-w64)" arch=('any') license=('custom') @@ -12,14 +12,14 @@ url="http://pypi.python.org/pypi/MarkupSafe" makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") source=("http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-${pkgver}.tar.gz") md5sums=('f5ab3deee4c37cd6a922fb81e730da6e') - + build() { - cd "$srcdir" + cd "${srcdir}" rm -rf python{2,3}-build for builddir in python{2,3}-build; do - cp -r MarkupSafe-$pkgver $builddir - pushd $builddir + cp -r MarkupSafe-${pkgver} $builddir + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build popd done @@ -28,27 +28,19 @@ build() { package_python3-markupsafe() { depends=("${MINGW_PACKAGE_PREFIX}-python3") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null - - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } - + package_python2-markupsafe() { depends=("${MINGW_PACKAGE_PREFIX}-python2") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null - - cd "$srcdir/python2-build" + cd "${srcdir}/python2-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } diff --git a/mingw-w64-python-matplotlib/PKGBUILD b/mingw-w64-python-matplotlib/PKGBUILD index 783b952914..8ac5351e5b 100644 --- a/mingw-w64-python-matplotlib/PKGBUILD +++ b/mingw-w64-python-matplotlib/PKGBUILD @@ -1,9 +1,10 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=matplotlib -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=1.4.2 -pkgrel=1 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.5.0 +pkgrel=2 pkgdesc="A python plotting library, making publication quality plots (mingw-w64)" arch=('any') url='http://matplotlib.org' @@ -21,38 +22,39 @@ makedepends=( "${MINGW_PACKAGE_PREFIX}-python3-dateutil" "${MINGW_PACKAGE_PREFIX}-python2-pyparsing" "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python2-cycler" + "${MINGW_PACKAGE_PREFIX}-python3-cycler" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-libpng" #"${MINGW_PACKAGE_PREFIX}-qhull" ) -source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/matplotlib/matplotlib/archive/v$pkgver.tar.gz" +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/matplotlib/matplotlib/archive/v${pkgver}.tar.gz" setupext.py.patch setup.py.patch) -md5sums=('79d86283a47530611b3695670c0a9b3c' - '24b0ed92631fd0adb2ae11ff1ef31490' +md5sums=('35a9cad23887dc6a7bd30cf434aa3f65' + 'cd1ef742fb22f91cfed3c36dd4a6f1e1' 'b5f64259a266ccc517586debb8c4e5c8') noextract=("${_realname}-${pkgver}.tar.gz") prepare() { - cd $startdir/ # Clean up old sources so re-patching doesn't fail. - [ -d $srcdir/${_realname}-$pkgver ] && rm -rf $srcdir/${_realname}-$pkgver - tar -xzvf ${_realname}-${pkgver}.tar.gz -C $srcdir - - cd $srcdir/${_realname}-$pkgver + [[ -d ${srcdir}/${_realname}-${pkgver} ]] && rm -rf $srcdir/${_realname}-${pkgver} + tar -xzvf ${_realname}-${pkgver}.tar.gz -C ${srcdir} + + cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/setupext.py.patch patch -p1 -i ${srcdir}/setup.py.patch cd ${srcdir} - - cp -a $_realname-$pkgver $_realname-py2-$pkgver - cp -a $_realname-$pkgver $_realname-py3-$pkgver - - cd ${srcdir}/$_realname-py3-$pkgver + + cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver} + cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver} + + cd ${srcdir}/${_realname}-py3-${pkgver} # remove cairo which fails for python3 sed -i 's/setupext\.BackendGtk3Cairo/#setupext\.BackendGtk3Cairo/g' setup.py sed -i 's/setupext\.BackendCairo/#setupext\.BackendCairo/g' setup.py - - cd ${srcdir}/$_realname-py2-$pkgver + + cd ${srcdir}/${_realname}-py2-${pkgver} sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ @@ -60,11 +62,11 @@ prepare() { } build() { - cd ${srcdir}/$_realname-py2-$pkgver + cd ${srcdir}/${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build - - cd ${srcdir}/$_realname-py3-$pkgver + + cd ${srcdir}/${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build } @@ -74,6 +76,7 @@ package_python3-matplotlib() { "${MINGW_PACKAGE_PREFIX}-python3-pytz" "${MINGW_PACKAGE_PREFIX}-python3-numpy" "${MINGW_PACKAGE_PREFIX}-python3-cairo" + "${MINGW_PACKAGE_PREFIX}-python3-cycler" "${MINGW_PACKAGE_PREFIX}-python3-pyqt5" "${MINGW_PACKAGE_PREFIX}-python3-dateutil" "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" @@ -81,8 +84,8 @@ package_python3-matplotlib() { "${MINGW_PACKAGE_PREFIX}-libpng" #"${MINGW_PACKAGE_PREFIX}-qhull" ) - cd ${srcdir}/$_realname-py3-$pkgver - + cd ${srcdir}/${_realname}-py3-${pkgver} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install -O1 --skip-build \ --root="${pkgdir}" --prefix=${MINGW_PREFIX} @@ -95,6 +98,7 @@ package_python2-matplotlib() { "${MINGW_PACKAGE_PREFIX}-python2-pytz" "${MINGW_PACKAGE_PREFIX}-python2-numpy" "${MINGW_PACKAGE_PREFIX}-python2-cairo" + "${MINGW_PACKAGE_PREFIX}-python2-cycler" "${MINGW_PACKAGE_PREFIX}-python2-pyqt5" "${MINGW_PACKAGE_PREFIX}-python2-dateutil" "${MINGW_PACKAGE_PREFIX}-python2-pyparsing" @@ -102,8 +106,8 @@ package_python2-matplotlib() { "${MINGW_PACKAGE_PREFIX}-libpng" #"${MINGW_PACKAGE_PREFIX}-qhull" ) - cd ${srcdir}/$_realname-py2-$pkgver - + cd ${srcdir}/${_realname}-py2-${pkgver} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install -O1 --skip-build \ --root="${pkgdir}" --prefix=${MINGW_PREFIX} diff --git a/mingw-w64-python-matplotlib/setupext.py.patch b/mingw-w64-python-matplotlib/setupext.py.patch index ccb387a797..aa7f2d21af 100644 --- a/mingw-w64-python-matplotlib/setupext.py.patch +++ b/mingw-w64-python-matplotlib/setupext.py.patch @@ -56,7 +56,7 @@ return ext -@@ -247,11 +255,11 @@ +@@ -247,16 +255,16 @@ """ Determines whether pkg-config exists on this machine. """ @@ -64,9 +64,14 @@ + if sys.platform == 'win32' and not MSYS: self.has_pkgconfig = False else: + try: + self.pkg_config = os.environ['PKG_CONFIG'] + except KeyError: + self.pkg_config = 'pkg-config' + self.set_pkgconfig_path() -- status, output = getstatusoutput("pkg-config --help") -+ status, output = getstatusoutput('sh -c "pkg-config --help"') +- status, output = getstatusoutput(self.pkg_config + " --help") ++ status, output = getstatusoutput('sh -c "'+self.pkg_config+' --help"') self.has_pkgconfig = (status == 0) if not self.has_pkgconfig: print("IMPORTANT WARNING:") @@ -102,8 +107,8 @@ return None status, output = getstatusoutput( -- "pkg-config %s --modversion" % (package)) -+ 'sh -c "pkg-config %s --modversion"' % (package)) +- self.pkg_config + " %s --modversion" % (package)) ++ 'sh -c "'+self.pkg_config+' %s --modversion"' % (package)) if status == 0: return output return None diff --git a/mingw-w64-python-mock/PKGBUILD b/mingw-w64-python-mock/PKGBUILD new file mode 100644 index 0000000000..c07e99f647 --- /dev/null +++ b/mingw-w64-python-mock/PKGBUILD @@ -0,0 +1,69 @@ +# Contributor: Frederic Wang + +_realname=mock +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.3.0 +pkgrel=1 +pkgdesc='Rolling backport of unittest.mock for all Pythons (mingw-w64)' +arch=('any') +url='https://github.com/testing-cabal/mock' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python3-funcsigs" + "${MINGW_PACKAGE_PREFIX}-python2-funcsigs" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr") +source=("https://pypi.python.org/packages/source/m/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('73ee8a4afb3ff4da1b4afa287f39fdeb') +noextract=(${_realname}-${pkgver}.tar.gz) + +prepare() { + [[ -d ${srcdir}/${_realname}-${pkgver} ]] && rm -rf ${srcdir}/${_realname}-${pkgver} + tar -xzf ${srcdir}/${_realname}-${pkgver}.tar.gz -C ${srcdir} || true + + cd "${srcdir}" + cp -r ${_realname}-${pkgver} python2-build + cp -r ${_realname}-${pkgver} python3-build +} + +package_python3-mock() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd ${srcdir}/python3-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-mock() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd ${srcdir}/python2-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-mock() { + package_python2-mock +} + +package_mingw-w64-i686-python3-mock() { + package_python3-mock +} + +package_mingw-w64-x86_64-python2-mock() { + package_python2-mock +} + +package_mingw-w64-x86_64-python3-mock() { + package_python3-mock +} diff --git a/mingw-w64-python-nose/PKGBUILD b/mingw-w64-python-nose/PKGBUILD index 8d0da0926a..83d8995aac 100644 --- a/mingw-w64-python-nose/PKGBUILD +++ b/mingw-w64-python-nose/PKGBUILD @@ -2,26 +2,27 @@ # Contributor: Ray Donnelly _realname=nose +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.3.4 -pkgrel=2 +pkgver=1.3.7 +pkgrel=3 pkgdesc="A discovery-based unittest extension (mingw-w64)" arch=('any') license=('LGPL-2.1') url="http://readthedocs.org/docs/nose/" makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") source=("http://pypi.python.org/packages/source/n/nose/nose-${pkgver}.tar.gz") -md5sums=('6ed7169887580ddc9a8e16048d38274d') - +md5sums=('4d3ad0ff07b61373d2cefc89c5d0b20b') + build() { - cd "$srcdir/nose-$pkgver" + cd "${srcdir}/nose-${pkgver}" sed -i -e "s:man/man1:share/man/man1:g" setup.py - - cd "$srcdir" + + cd "${srcdir}" rm -rf python{2,3}-build for builddir in python{2,3}-build; do - cp -r nose-$pkgver $builddir - pushd $builddir + cp -r nose-${pkgver} $builddir + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build popd done @@ -30,13 +31,11 @@ build() { package_python3-nose() { depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 rm -f ${pkgdir}${MINGW_PREFIX}/bin/nosetests{.exe,-script.py,.exe.manifest} # fix python command in files @@ -45,17 +44,15 @@ package_python3-nose() { done rm -rf "${pkgdir}${MINGW_PREFIX}/share" } - + package_python2-nose() { depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - cd "$srcdir/python2-build" + cd "${srcdir}/python2-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do diff --git a/mingw-w64-python-nuitka/PKGBUILD b/mingw-w64-python-nuitka/PKGBUILD new file mode 100644 index 0000000000..8f6177acfd --- /dev/null +++ b/mingw-w64-python-nuitka/PKGBUILD @@ -0,0 +1,81 @@ +# Maintainer: Alexey Pavlov + +_realname=nuitka +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.5.14.3 +pkgrel=2 +pkgdesc="Python to native compiler (mingw-w64)" +arch=('any') +license=('APACHE') +url="http://www.nuitka.net/" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +source=("http://nuitka.net/releases/Nuitka-${pkgver}.tar.gz") +noextract=(Nuitka-$pkgver.tar.gz) +md5sums=('17f448e0421c0112d54bdee5777d2e97') + +prepare() { + [[ -d $srcdir/${_realname}-${pkgver} ]] && rm -rf ${srcdir}/${_realname}-${pkgver} + tar -xzvf ${srcdir}/${_realname}-${pkgver}.tar.gz -C ${srcdir} || \ + tar -xzvf ${srcdir}/${_realname}-${pkgver}.tar.gz -C ${srcdir} +} + +build() { + rm -rf python{2,3}-build + for builddir in python{2,3}-build; do + cp -r Nuitka-${pkgver} ${builddir} + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build + popd + done +} + +package_python3-nuitka() { + depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") + + cd "${srcdir}/python3-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null + for filename in nuitka nuitka-run; do + sed -e "s|...\python|python3|g" \ + -i "${pkgdir}${MINGW_PREFIX}"/bin/${filename}.bat + done + popd > /dev/null + +} + +package_python2-nuitka() { + depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") + + cd "${srcdir}/python2-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null + for filename in nuitka nuitka-run; do + sed -e "s|...\python|python2|g" \ + -e "s|${filename}|${filename}2|g" \ + -i "${pkgdir}${MINGW_PREFIX}"/bin/${filename}.bat + mv "${pkgdir}${MINGW_PREFIX}"/bin/${filename} "${pkgdir}${MINGW_PREFIX}"/bin/${filename}2 + mv "${pkgdir}${MINGW_PREFIX}"/bin/${filename}.bat "${pkgdir}${MINGW_PREFIX}"/bin/${filename}2.bat + done + popd > /dev/null +} + +package_mingw-w64-i686-python2-nuitka() { + package_python2-nuitka +} + +package_mingw-w64-i686-python3-nuitka() { + package_python3-nuitka +} + +package_mingw-w64-x86_64-python2-nuitka() { + package_python2-nuitka +} + +package_mingw-w64-x86_64-python3-nuitka() { + package_python3-nuitka +} diff --git a/mingw-w64-python-numexpr/PKGBUILD b/mingw-w64-python-numexpr/PKGBUILD index a6f1210e42..40aeb34ccc 100644 --- a/mingw-w64-python-numexpr/PKGBUILD +++ b/mingw-w64-python-numexpr/PKGBUILD @@ -1,28 +1,27 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=numexpr +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=2.4 +pkgver=2.4.4 pkgrel=1 pkgdesc="Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas. (mingw-w64)" arch=('any') url="https://github.com/pydata/numexpr" license=('MIT') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-gcc" -) -source=("$_realname-${pkgver}.tar.gz"::https://github.com/pydata/numexpr/archive/v$pkgver.tar.gz) -md5sums=('c9357862a304b9ad614afaf9e9c8dc78') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-gcc") +source=("${_realname}-${pkgver}.tar.gz"::https://github.com/pydata/numexpr/archive/v${pkgver}.tar.gz) +md5sums=('029849d8d9ca89d3bf3bd6695d4e0a4c') prepare() { - cp -a $_realname-$pkgver $_realname-py2-$pkgver - cp -a $_realname-$pkgver $_realname-py3-$pkgver - - cd $_realname-py2-$pkgver + cp -a ${_realname}-${pkgver} $_realname-py2-${pkgver} + cp -a ${_realname}-${pkgver} $_realname-py3-${pkgver} + + cd ${_realname}-py2-${pkgver} sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ @@ -31,20 +30,20 @@ prepare() { build() { # build for python2 - cd ${srcdir}/$_realname-py2-$pkgver + cd ${srcdir}/${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build - + # build for python3 - cd ${srcdir}/$_realname-py3-$pkgver + cd ${srcdir}/${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build } package_python2-numexpr() { depends=("${MINGW_PACKAGE_PREFIX}-python2-numpy") - - cd $_realname-py2-$pkgver + + cd ${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --skip-build \ --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 @@ -55,8 +54,8 @@ package_python2-numexpr() { package_python3-numexpr() { depends=("${MINGW_PACKAGE_PREFIX}-python3-numpy") - - cd $_realname-py3-$pkgver + + cd ${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --skip-build \ --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 diff --git a/mingw-w64-python-numpy/0001-detect-mingw-environment.patch b/mingw-w64-python-numpy/0001-detect-mingw-environment.patch new file mode 100644 index 0000000000..326ab058d0 --- /dev/null +++ b/mingw-w64-python-numpy/0001-detect-mingw-environment.patch @@ -0,0 +1,14 @@ +diff -urN numpy-1.10.2.orig/numpy/distutils/misc_util.py numpy-1.10.2/numpy/distutils/misc_util.py +--- numpy-1.10.2.orig/numpy/distutils/misc_util.py 2016-01-04 00:38:06.433855300 +0000 ++++ numpy-1.10.2/numpy/distutils/misc_util.py 2016-01-04 00:40:27.356823400 +0000 +@@ -386,6 +386,10 @@ + return True + if os.environ.get('MSYSTEM', '')=='MINGW32': + return True ++ if os.environ.get('MSYSTEM', '')=='MINGW64': ++ return True ++ if 'GCC' in sys.version: ++ return True + return False + + def msvc_runtime_library(): diff --git a/mingw-w64-python-numpy/0002-fix-finding-python2.patch b/mingw-w64-python-numpy/0002-fix-finding-python2.patch new file mode 100644 index 0000000000..f30e2af4ce --- /dev/null +++ b/mingw-w64-python-numpy/0002-fix-finding-python2.patch @@ -0,0 +1,52 @@ +diff -urN numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py numpy-1.10.2/numpy/distutils/mingw32ccompiler.py +--- numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py 2015-11-12 20:04:51.000000000 +0000 ++++ numpy-1.10.2/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:35:27.818684200 +0000 +@@ -87,21 +87,23 @@ + elif self.linker_dll == 'gcc': + self.linker = 'g++' + +- # **changes: eric jones 4/11/01 +- # 1. Check for import library on Windows. Build if it doesn't exist. ++ if not 'GCC' in sys.version: + +- build_import_library() ++ # **changes: eric jones 4/11/01 ++ # 1. Check for import library on Windows. Build if it doesn't exist. + +- # Check for custom msvc runtime library on Windows. Build if it doesn't exist. +- msvcr_success = build_msvcr_library() +- msvcr_dbg_success = build_msvcr_library(debug=True) +- if msvcr_success or msvcr_dbg_success: +- # add preprocessor statement for using customized msvcr lib +- self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR') +- +- # Define the MSVC version as hint for MinGW +- msvcr_version = '0x%03i0' % int(msvc_runtime_library().lstrip('msvcr')) +- self.define_macro('__MSVCRT_VERSION__', msvcr_version) ++ build_import_library() ++ ++ # Check for custom msvc runtime library on Windows. Build if it doesn't exist. ++ msvcr_success = build_msvcr_library() ++ msvcr_dbg_success = build_msvcr_library(debug=True) ++ if msvcr_success or msvcr_dbg_success: ++ # add preprocessor statement for using customized msvcr lib ++ self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR') ++ ++ # Define the MSVC version as hint for MinGW ++ msvcr_version = '0x%03i0' % int(msvc_runtime_library().lstrip('msvcr')) ++ self.define_macro('__MSVCRT_VERSION__', msvcr_version) + + # MS_WIN64 should be defined when building for amd64 on windows, + # but python headers define it only for MS compilers, which has all +diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/gnu.py numpy-1.10.2/numpy/distutils/fcompiler/gnu.py +--- numpy-1.10.2.orig/numpy/distutils/fcompiler/gnu.py 2015-11-12 20:04:51.000000000 +0000 ++++ numpy-1.10.2/numpy/distutils/fcompiler/gnu.py 2016-01-02 03:36:30.528498700 +0000 +@@ -101,7 +101,7 @@ + pic_flags = ['-fPIC'] + + # use -mno-cygwin for g77 when Python is not Cygwin-Python +- if sys.platform == 'win32': ++ if sys.platform == 'win32' and not 'GCC' in sys.version: + for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']: + executables[key].append('-mno-cygwin') + diff --git a/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch b/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch new file mode 100644 index 0000000000..2f7efa78a9 --- /dev/null +++ b/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch @@ -0,0 +1,11 @@ +--- numpy-1.10.2/numpy/distutils/fcompiler/gnu.py.orig 2014-08-28 15:49:10.742000000 +0400 ++++ numpy-1.10.2/numpy/distutils/fcompiler/gnu.py 2014-08-28 15:50:44.903600000 +0400 +@@ -60,7 +60,7 @@ + m = re.search(r'GNU Fortran\s+95.*?([0-9-.]+)', version_string) + if m: + return ('gfortran', m.group(1)) +- m = re.search(r'GNU Fortran.*?\-?([0-9-.]+)', version_string) ++ m = re.search(r'GNU Fortran.*?\-?(\d*(?:\.\d+)+)', version_string) + if m: + v = m.group(1) + if v.startswith('0') or v.startswith('2') or v.startswith('3'): diff --git a/mingw-w64-python-numpy/fix-testsuite.patch b/mingw-w64-python-numpy/0004-fix-testsuite.patch similarity index 64% rename from mingw-w64-python-numpy/fix-testsuite.patch rename to mingw-w64-python-numpy/0004-fix-testsuite.patch index ff799c1d34..f1f95e94e3 100644 --- a/mingw-w64-python-numpy/fix-testsuite.patch +++ b/mingw-w64-python-numpy/0004-fix-testsuite.patch @@ -1,6 +1,6 @@ ---- numpy-1.9.0/numpy/core/tests/test_multiarray.py 2014-09-07 10:57:48.000000000 +0200 -+++ /mingw64/lib/python3.4/site-packages/numpy/core/tests/test_multiarray.py 2014-09-22 20:42:55.177362800 +0200 -@@ -2691,7 +2691,7 @@ +--- numpy-1.9.0/numpy/core/tests/test_multiarray.py.orig 2014-09-07 10:57:48.000000000 +0200 ++++ numpy-1.9.0/numpy/core/tests/test_multiarray.py 2014-09-22 20:42:55.177362800 +0200 +@@ -3367,7 +3367,7 @@ """Test workarounds for 32-bit limited fwrite, fseek, and ftell calls in windows. These normally would hang doing something like this. See http://projects.scipy.org/numpy/ticket/1660""" diff --git a/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch b/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch new file mode 100644 index 0000000000..f17aabb73f --- /dev/null +++ b/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch @@ -0,0 +1,41 @@ +diff -urN numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py numpy-1.10.2/numpy/distutils/mingw32ccompiler.py +--- numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:57:55.666397000 +0000 ++++ numpy-1.10.2/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:54:51.695638100 +0000 +@@ -120,10 +120,12 @@ + else: + # gcc-4 series releases do not support -mno-cygwin option + self.set_executables( +- compiler='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall', +- compiler_so='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes', +- linker_exe='gcc -g', +- linker_so='gcc -g -shared') ++ compiler='gcc -march=x86-64 -mtune=generic -DMS_WIN64' ++ ' -O2 -msse2 -Wall', ++ compiler_so='gcc -march=x86-64 -mtune=generic -DMS_WIN64' ++ ' -O2 -msse2 -Wall -Wstrict-prototypes', ++ linker_exe='gcc', ++ linker_so='gcc -shared -Wl,-gc-sections -Wl,-s') + else: + if self.gcc_version <= "3.0.0": + self.set_executables( +@@ -142,10 +144,16 @@ + linker_so='g++ -mno-cygwin -shared') + else: + # gcc-4 series releases do not support -mno-cygwin option +- self.set_executables(compiler='gcc -O2 -Wall', +- compiler_so='gcc -O2 -Wall -Wstrict-prototypes', +- linker_exe='g++ ', +- linker_so='g++ -shared') ++ self.set_executables( ++ compiler='gcc -O2 -march=core2 -mtune=generic' ++ ' -mfpmath=sse -msse2' ++ ' -mincoming-stack-boundary=2 -Wall', ++ compiler_so='gcc -O2 -march=core2 -mtune=generic' ++ ' -mfpmath=sse -msse2' ++ ' -mincoming-stack-boundary=2 -Wall' ++ ' -Wstrict-prototypes', ++ linker_exe='g++ ', ++ linker_so='g++ -shared -Wl,-gc-sections -Wl,-s') + # added for python2.3 support + # we can't pass it through set_executables because pre 2.2 would fail + self.compiler_cxx = ['g++'] diff --git a/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch b/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch new file mode 100644 index 0000000000..183e0a3c75 --- /dev/null +++ b/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch @@ -0,0 +1,24 @@ +diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/compaq.py numpy-1.10.2/numpy/distutils/fcompiler/compaq.py +--- numpy-1.10.2.orig/numpy/distutils/fcompiler/compaq.py 2016-01-04 00:44:11.333672900 +0000 ++++ numpy-1.10.2/numpy/distutils/fcompiler/compaq.py 2016-01-04 00:46:47.573905500 +0000 +@@ -10,7 +10,7 @@ + from distutils.errors import DistutilsPlatformError + + compilers = ['CompaqFCompiler'] +-if os.name != 'posix' or sys.platform[:6] == 'cygwin' : ++if (os.name != 'posix' or sys.platform[:6] == 'cygwin') and not 'GCC' in sys.version: + # Otherwise we'd get a false positive on posix systems with + # case-insensitive filesystems (like darwin), because we'll pick + # up /bin/df +diff -urN numpy-1.10.2.orig/numpy/distutils/msvccompiler.py numpy-1.10.2/numpy/distutils/msvccompiler.py +--- numpy-1.10.2.orig/numpy/distutils/msvccompiler.py 2016-01-04 00:44:11.283672800 +0000 ++++ numpy-1.10.2/numpy/distutils/msvccompiler.py 2016-01-04 00:44:31.151202200 +0000 +@@ -14,7 +14,7 @@ + def initialize(self, plat_name=None): + environ_lib = os.getenv('lib') + environ_include = os.getenv('include') +- distutils.msvccompiler.MSVCCompiler.initialize(self, plat_name) ++ distutils.msvccompiler.MSVCCompiler.initialize(self) + if environ_lib is not None: + os.environ['lib'] = environ_lib + os.environ['lib'] + if environ_include is not None: diff --git a/mingw-w64-python-numpy/PKGBUILD b/mingw-w64-python-numpy/PKGBUILD index be69ab4d0a..d8c6c1ac29 100644 --- a/mingw-w64-python-numpy/PKGBUILD +++ b/mingw-w64-python-numpy/PKGBUILD @@ -2,9 +2,10 @@ # Contributor: Ray Donnelly _realname=numpy +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.9.1 -pkgrel=1 +pkgver=1.10.2 +pkgrel=2 pkgdesc="Scientific tools for Python (mingw-w64)" arch=('any') license=('BSD') @@ -15,31 +16,42 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-openblas" "${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python2-nose" "${MINGW_PACKAGE_PREFIX}-gcc-fortran") -options=('staticlibs' 'strip' '!debug') +#options=('!strip' 'debug') source=(http://downloads.sourceforge.net/numpy/${_realname}-${pkgver}.tar.gz - fix-finding-python2.patch - gfortran-better-version-check.patch - fix-testsuite.patch) -md5sums=('78842b73560ec378142665e712ae4ad9' - '6f03968645956c24216763b6ccce609d' - '58aff1fb52401458bfd6a03c9b3b5e32' - '84e65671dc50c0a0e5fa40a1dd25359d') + 0001-detect-mingw-environment.patch + 0002-fix-finding-python2.patch + 0003-gfortran-better-version-check.patch + 0004-fix-testsuite.patch + 0005-mincoming-stack-boundary-32bit-optimized-64bit.patch + 0006-disable-visualcompaq-for-mingw.patch) +md5sums=('816518282f1617636aaf26e7cd9b127b' + 'ee1e86a6e0d56801172501cf5804c6a7' + 'f36c1e2c52810daf4a572e922873f876' + 'e09574eed1940cd2e39a5fe1bb78bc73' + 'decfa557f219a4581d1b53164c0868f9' + '4eb5373f73b4287379c3b992cfcc239b' + '19c3a59a0a7f50ba288d9502fa079e71') prepare() { - cd ${_realname}-$pkgver - patch -Np1 -i ${srcdir}/fix-finding-python2.patch - patch -Np1 -i ${srcdir}/gfortran-better-version-check.patch - patch -Np1 -i ${srcdir}/fix-testsuite.patch + cd ${_realname}-${pkgver} + patch -Np1 -i ${srcdir}/0001-detect-mingw-environment.patch + patch -Np1 -i ${srcdir}/0002-fix-finding-python2.patch + patch -Np1 -i ${srcdir}/0003-gfortran-better-version-check.patch + patch -Np1 -i ${srcdir}/0004-fix-testsuite.patch + # Note, -mincoming-stack-boundary (and the other flags set) doesn't get used except + # in a test compilation, AFAICT. + patch -Np1 -i ${srcdir}/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch + patch -Np1 -i ${srcdir}/0006-disable-visualcompaq-for-mingw.patch cd .. - cp -a numpy-$pkgver numpy-py2-$pkgver-${CARCH} - cp -a numpy-$pkgver numpy-py3-$pkgver-${CARCH} + cp -a numpy-${pkgver} ${_realname}-py2-${CARCH} + cp -a numpy-${pkgver} ${_realname}-py3-${CARCH} - cd numpy-py2-$pkgver-${CARCH} + cd ${_realname}-py2-${CARCH} sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ - -i $(find . -name '*.py') + -i $(find . -name '*.py') } build() { @@ -47,12 +59,12 @@ build() { export LDFLAGS="$LDFLAGS -shared" echo "Building Python2" - cd numpy-py2-$pkgver-${CARCH} + cd ${_realname}-py2-${CARCH} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py config_fc --fcompiler=gnu95 build echo "Building Python3" - cd ../numpy-py3-$pkgver-${CARCH} + cd ../${_realname}-py3-${CARCH} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py config_fc --fcompiler=gnu95 build } @@ -66,7 +78,7 @@ package_python2-numpy() { export ATLAS=None export LDFLAGS="$LDFLAGS -shared" - cd numpy-py2-$pkgver-${CARCH} + cd ${_realname}-py2-${CARCH} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py config_fc --fcompiler=gnu95 install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 @@ -77,9 +89,7 @@ package_python2-numpy() { cp -rf ${pkgdir}${MINGW_PREFIX}/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}${MINGW_PREFIX}/include/python${_pyver}/" # fix python command in files - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done @@ -89,26 +99,24 @@ package_python3-numpy() { depends=("${MINGW_PACKAGE_PREFIX}-openblas" "${MINGW_PACKAGE_PREFIX}-python3") optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: testsuite") - _pyver=3.4 - _pyinc=3.4m + _pyver=3.5 + _pyinc=${_pyver}m export ATLAS=None export LDFLAGS="$LDFLAGS -shared" - cd numpy-py3-$pkgver-${CARCH} + cd ${_realname}-py3-${CARCH} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py config_fc --fcompiler=gnu95 install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 - install -m755 -d "${pkgdir}${MINGW_PREFIX}/share/licenses/python-numpy" - install -m644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-numpy/" + install -m755 -d "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-numpy" + install -m644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-numpy/" install -m755 -d "${pkgdir}${MINGW_PREFIX}/include/python${_pyinc}" cp -rf ${pkgdir}${MINGW_PREFIX}/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}${MINGW_PREFIX}/include/python${_pyinc}/" # fix python command in files - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done diff --git a/mingw-w64-python-numpy/fix-finding-python2.patch b/mingw-w64-python-numpy/fix-finding-python2.patch deleted file mode 100644 index d21541d247..0000000000 --- a/mingw-w64-python-numpy/fix-finding-python2.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- numpy-py2-1.8.0/numpy/distutils/mingw32ccompiler.py 2014-02-19 01:07:43.787600000 +0400 -+++ numpy-1.8.0/numpy/distutils/mingw32ccompiler.py 2014-02-19 01:26:21.634200000 +0400 -@@ -86,22 +86,6 @@ - self.linker = 'g++' - - # **changes: eric jones 4/11/01 -- # 1. Check for import library on Windows. Build if it doesn't exist. -- -- build_import_library() -- -- # Check for custom msvc runtime library on Windows. Build if it doesn't exist. -- msvcr_success = build_msvcr_library() -- msvcr_dbg_success = build_msvcr_library(debug=True) -- if msvcr_success or msvcr_dbg_success: -- # add preprocessor statement for using customized msvcr lib -- self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR') -- -- # Define the MSVC version as hint for MinGW -- msvcr_version = '0x%03i0' % int(msvc_runtime_library().lstrip('msvcr')) -- self.define_macro('__MSVCRT_VERSION__', msvcr_version) -- -- # **changes: eric jones 4/11/01 - # 2. increased optimization and turned off all warnings - # 3. also added --driver-name g++ - #self.set_executables(compiler='gcc -mno-cygwin -O2 -w', ---- numpy-py2-1.8.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:27:32.252800000 +0400 -+++ numpy-1.8.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:31:29.804200000 +0400 -@@ -6,6 +6,7 @@ - import warnings - import platform - import tempfile -+from sysconfig import _POSIX_BUILD - from subprocess import Popen, PIPE, STDOUT - - from numpy.distutils.cpuinfo import cpu -@@ -86,7 +87,7 @@ - pic_flags = ['-fPIC'] - - # use -mno-cygwin for g77 when Python is not Cygwin-Python -- if sys.platform == 'win32': -+ if sys.platform == 'win32' and not _POSIX_BUILD: - for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']: - executables[key].append('-mno-cygwin') - -@@ -238,7 +239,7 @@ - pass - else: - # use -mno-cygwin flag for gfortran when Python is not Cygwin-Python -- if sys.platform == 'win32': -+ if sys.platform == 'win32' and not _POSIX_BUILD: - for key in ['version_cmd', 'compiler_f77', 'compiler_f90', - 'compiler_fix', 'linker_so', 'linker_exe']: - self.executables[key].append('-mno-cygwin') -@@ -328,13 +328,6 @@ - i = opt.index("gcc") - opt.insert(i+1, "mingwex") - opt.insert(i+1, "mingw32") -- # XXX: fix this mess, does not work for mingw -- if is_win64(): -- c_compiler = self.c_compiler -- if c_compiler and c_compiler.compiler_type == "msvc": -- return [] -- else: -- raise NotImplementedError("Only MS compiler supported with gfortran on win64") - return opt - - def get_target(self): diff --git a/mingw-w64-python-numpy/gfortran-better-version-check.patch b/mingw-w64-python-numpy/gfortran-better-version-check.patch deleted file mode 100644 index e8626c0a3f..0000000000 --- a/mingw-w64-python-numpy/gfortran-better-version-check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- numpy-1.8.2/numpy/distutils/fcompiler/gnu.py.orig 2014-08-28 15:49:10.742000000 +0400 -+++ numpy-1.8.2/numpy/distutils/fcompiler/gnu.py 2014-08-28 15:50:44.903600000 +0400 -@@ -42,7 +42,7 @@ - m = re.search(r'GNU Fortran\s+95.*?([0-9-.]+)', version_string) - if m: - return ('gfortran', m.group(1)) -- m = re.search(r'GNU Fortran.*?\-?([0-9-.]+)', version_string) -+ m = re.search(r'GNU Fortran.*?\-?(\d*(?:\.\d+)+)', version_string) - if m: - v = m.group(1) - if v.startswith('0') or v.startswith('2') or v.startswith('3'): diff --git a/mingw-w64-python-pandas/PKGBUILD b/mingw-w64-python-pandas/PKGBUILD index 21fc1861df..c1c5eb1a85 100644 --- a/mingw-w64-python-pandas/PKGBUILD +++ b/mingw-w64-python-pandas/PKGBUILD @@ -1,33 +1,32 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=pandas -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=0.14.1 -pkgrel=4 -pkgdesc="Cross-section and time series data analysis toolkit. (mingw-w64)" +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.16.2 +pkgrel=2 +pkgdesc="Cross-section and time series data analysis toolkit (mingw-w64)" arch=('any') url="http://pandas.pydata.org/" license=('BSD') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-python2-pytz" - "${MINGW_PACKAGE_PREFIX}-python3-pytz" - "${MINGW_PACKAGE_PREFIX}-python2-dateutil" - "${MINGW_PACKAGE_PREFIX}-python3-dateutil" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-gcc" -) -source=("https://pypi.python.org/packages/source/p/pandas/pandas-${pkgver}.tar.gz") -md5sums=('393dd8f35411e4022177aa64b2da46f4') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-pytz" + "${MINGW_PACKAGE_PREFIX}-python3-pytz" + "${MINGW_PACKAGE_PREFIX}-python2-dateutil" + "${MINGW_PACKAGE_PREFIX}-python3-dateutil" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-gcc") +source=("https://pypi.python.org/packages/source/p/pandas/${_realname}-${pkgver}.tar.gz") +md5sums=('a92787bcdf0fc0c6d5f4fe4877335ab5') prepare() { - cp -a $_realname-$pkgver $_realname-py2-$pkgver - cp -a $_realname-$pkgver $_realname-py3-$pkgver - - cd $_realname-py2-$pkgver + cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver} + cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver} + + cd ${_realname}-py2-${pkgver} sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ @@ -36,61 +35,53 @@ prepare() { build() { # build for python2 - cd ${srcdir}/$_realname-py2-$pkgver + cd ${srcdir}/${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build_ext --inplace - + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build - + # build for python3 - cd ${srcdir}/$_realname-py3-$pkgver + cd ${srcdir}/${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build_ext --inplace - + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build } package_python2-pandas() { - depends=( - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-python2-pytz" - "${MINGW_PACKAGE_PREFIX}-python2-dateutil" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - ) - optdepends=( - "${MINGW_PACKAGE_PREFIX}-python2-scipy: needed for miscellaneous statistical functions" - "${MINGW_PACKAGE_PREFIX}-python2-matplotlib: needed for plotting" - "${MINGW_PACKAGE_PREFIX}-python2-numexpr: needed for accelerating certain numerical operations (recommended)" - ) - - cd $_realname-py2-$pkgver + depends=("${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-pytz" + "${MINGW_PACKAGE_PREFIX}-python2-dateutil" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") + optdepends=("${MINGW_PACKAGE_PREFIX}-python2-scipy: needed for miscellaneous statistical functions" + "${MINGW_PACKAGE_PREFIX}-python2-matplotlib: needed for plotting" + "${MINGW_PACKAGE_PREFIX}-python2-numexpr: needed for accelerating certain numerical operations (recommended)") + + cd ${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --skip-build \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 LICENSE \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } package_python3-pandas() { - depends=( - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-pytz" - "${MINGW_PACKAGE_PREFIX}-python3-dateutil" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - ) - optdepends=( - "${MINGW_PACKAGE_PREFIX}-python3-scipy: needed for miscellaneous statistical functions" - "${MINGW_PACKAGE_PREFIX}-python3-matplotlib: needed for plotting" - "${MINGW_PACKAGE_PREFIX}-python3-numexpr: needed for accelerating certain numerical operations (recommended)" - ) - - cd $_realname-py3-$pkgver + depends=("${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-pytz" + "${MINGW_PACKAGE_PREFIX}-python3-dateutil" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") + optdepends=("${MINGW_PACKAGE_PREFIX}-python3-scipy: needed for miscellaneous statistical functions" + "${MINGW_PACKAGE_PREFIX}-python3-matplotlib: needed for plotting" + "${MINGW_PACKAGE_PREFIX}-python3-numexpr: needed for accelerating certain numerical operations (recommended)") + + cd ${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --skip-build \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 LICENSE \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" diff --git a/mingw-w64-python-patsy/PKGBUILD b/mingw-w64-python-patsy/PKGBUILD index 4c220a1696..f1f1535ca4 100644 --- a/mingw-w64-python-patsy/PKGBUILD +++ b/mingw-w64-python-patsy/PKGBUILD @@ -1,54 +1,53 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=patsy -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=0.3.0 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.4.0 pkgrel=1 pkgdesc="A Python package for describing statistical models and for building design matrices (mingw-w64)" arch=('any') url="https://github.com/pydata/patsy" license=('BSD') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" -) +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") source=("https://pypi.python.org/packages/source/p/patsy/patsy-${pkgver}.zip") -md5sums=('7545518b413136ba8343dcebea07e5e2') +md5sums=('9043a0d0695eaf5ec021676ccb0eb95d') prepare() { cd "${srcdir}" - cp -r $_realname-$pkgver python2-$_realname-$pkgver - cp -r $_realname-$pkgver python3-$_realname-$pkgver + cp -r ${_realname}-${pkgver} python2-${_realname}-${pkgver} + cp -r ${_realname}-${pkgver} python3-${_realname}-${pkgver} } package_python3-patsy() { depends=("${MINGW_PACKAGE_PREFIX}-python3-numpy") optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: needed for integrated test suite" "${MINGW_PACKAGE_PREFIX}-python3-scipy: needed for spline-related functions") - - cd $srcdir/python3-$_realname-$pkgver + + cd ${srcdir}/python3-${_realname}-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ - --root "${pkgdir}" --optimize=1 - - install -Dm644 "$srcdir/python3-$_realname-$pkgver/LICENSE.txt" \ + --root "${pkgdir}" --optimize=1 + + install -Dm644 "${srcdir}/python3-${_realname}-${pkgver}/LICENSE.txt" \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } - + package_python2-patsy() { depends=("${MINGW_PACKAGE_PREFIX}-python2-numpy") optdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose: needed for integrated test suite" "${MINGW_PACKAGE_PREFIX}-python2-scipy: needed for spline-related functions") - - cd $srcdir/python2-$_realname-$pkgver + + cd ${srcdir}/python2-${_realname}-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root "${pkgdir}" --optimize=1 - - install -Dm644 "$srcdir/python3-$_realname-$pkgver/LICENSE.txt" \ - "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + --root "${pkgdir}" --optimize=1 + + install -Dm644 "${srcdir}/python3-${_realname}-${pkgver}/LICENSE.txt" \ + "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } package_mingw-w64-i686-python2-patsy() { diff --git a/mingw-w64-python-pbr/PKGBUILD b/mingw-w64-python-pbr/PKGBUILD new file mode 100644 index 0000000000..d8b4163aad --- /dev/null +++ b/mingw-w64-python-pbr/PKGBUILD @@ -0,0 +1,82 @@ +# Contributor: Frederic Wang + +_realname=pbr +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.8.1 +pkgrel=1 +pkgdesc="Python Build Reasonableness (mingw-w64)" +url="https://launchpad.net/pbr" +license=("Apache License, Version 2.0") +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python3-six") +source=("https://pypi.python.org/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('c8f9285e1a4ca6f9654c529b158baa3a') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-pbr() { + depends=("${MINGW_PACKAGE_PREFIX}-python3-six") + + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done +} + +package_python2-pbr() { + depends=("${MINGW_PACKAGE_PREFIX}-python2-six") + + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done + + for f in pbr; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe + if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest + sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest + fi + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py + done +} + +package_mingw-w64-i686-python2-pbr() { + package_python2-pbr +} + +package_mingw-w64-i686-python3-pbr() { + package_python3-pbr +} + +package_mingw-w64-x86_64-python2-pbr() { + package_python2-pbr +} + +package_mingw-w64-x86_64-python3-pbr() { + package_python3-pbr +} diff --git a/mingw-w64-python-pip/PKGBUILD b/mingw-w64-python-pip/PKGBUILD index d0826f8528..7b0f1eeed9 100644 --- a/mingw-w64-python-pip/PKGBUILD +++ b/mingw-w64-python-pip/PKGBUILD @@ -1,51 +1,45 @@ # Maintainer: Alexey Pavlov _realname=pip +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.5.6 -pkgrel=2 +pkgver=7.1.2 +pkgrel=1 pkgdesc="An easy_install replacement for installing pypi python packages (mingw-w64)" arch=('any') license=('MIT') url="http://www.pip-installer.org/" depends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools") + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") source=(http://pypi.python.org/packages/source/p/pip/${_realname}-${pkgver}.tar.gz) -md5sums=('01026f87978932060cc86c1dc527903e') - +md5sums=('3823d2343d9f3aaab21cf9c917710196') + prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - #patch -p1 -i ${srcdir}/mingw-python-fix.patch - - cd "${srcdir}" - cp -r ${_realname}-${pkgver} ${_realname}-python2 cp -r ${_realname}-${pkgver} ${_realname}-python3 } build() { - # Build python 3 module - cd "${srcdir}"/${_realname}-python3 - ${MINGW_PREFIX}/bin/python3 setup.py build - - # Build python 2 module - cd "${srcdir}"/${_realname}-python2 - ${MINGW_PREFIX}/bin/python2 setup.py build + # Build python 3 module + cd "${srcdir}"/${_realname}-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + + # Build python 2 module + cd "${srcdir}"/${_realname}-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build } package_python2-pip() { depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python2-setuptools") - - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null - + + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) + cd "${srcdir}/${_realname}-python2" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build - + install -D -m644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" for _ff in ${pkgdir}${MINGW_PREFIX}/bin/*.py; do sed -e "s|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_ff} @@ -54,17 +48,15 @@ package_python2-pip() { package_python3-pip() { depends=("${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) cd "${srcdir}/${_realname}-python3" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build -v # Remove conflicted files rm -f ${pkgdir}${MINGW_PREFIX}/bin/pip{.exe,.exe.manifest,-script.py} - + for _ff in ${pkgdir}${MINGW_PREFIX}/bin/*.py; do sed -e "s|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_ff} done diff --git a/mingw-w64-python-pip/pip2-x86_64.install b/mingw-w64-python-pip/pip2-x86_64.install index 75b287e11a..025bb0da8e 100644 --- a/mingw-w64-python-pip/pip2-x86_64.install +++ b/mingw-w64-python-pip/pip2-x86_64.install @@ -1,7 +1,7 @@ post_install() { cd mingw64 local _prefix=$(pwd -W) - popd > /dev/null + cd - local _it for _it in pip pip2 pip2.7; do sed -e "s|/mingw64|${_prefix}|g" \ diff --git a/mingw-w64-python-pip/pip3-i686.install b/mingw-w64-python-pip/pip3-i686.install index d44ef170b8..9d29857c51 100644 --- a/mingw-w64-python-pip/pip3-i686.install +++ b/mingw-w64-python-pip/pip3-i686.install @@ -3,7 +3,7 @@ post_install() { local _prefix=$(pwd -W) cd - local _it - for _it in pip3 pip3.4; do + for _it in pip3 pip3.5; do sed -e "s|/mingw32|${_prefix}|g" \ -i mingw32/bin/${_it}-script.py done diff --git a/mingw-w64-python-pip/pip3-x86_64.install b/mingw-w64-python-pip/pip3-x86_64.install index def14d2a07..e552e22180 100644 --- a/mingw-w64-python-pip/pip3-x86_64.install +++ b/mingw-w64-python-pip/pip3-x86_64.install @@ -3,7 +3,7 @@ post_install() { local _prefix=$(pwd -W) cd - local _it - for _it in pip3 pip3.4; do + for _it in pip3 pip3.5; do sed -e "s|/mingw64|${_prefix}|g" \ -i mingw64/bin/${_it}-script.py done diff --git a/mingw-w64-python-py/PKGBUILD b/mingw-w64-python-py/PKGBUILD new file mode 100644 index 0000000000..aa5bc0eac0 --- /dev/null +++ b/mingw-w64-python-py/PKGBUILD @@ -0,0 +1,55 @@ +# Contributor: Frederic Wang + +_realname=py +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.4.30 +pkgrel=1 +pkgdesc='library with cross-python path, ini-parsing, io, code, log facilities (mingw-w64)' +arch=('any') +url='http://pylib.readthedocs.org/' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2") +source=("https://pypi.python.org/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('a904aabfe4765cb754f2db84ec7bb03a') + +prepare() { + cd "${srcdir}" + cp -r ${_realname}-${pkgver} python2-build + cp -r ${_realname}-${pkgver} python3-build +} + +package_python3-py() { + cd ${srcdir}/python3-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-py() { + cd ${srcdir}/python2-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-py() { + package_python2-py +} + +package_mingw-w64-i686-python3-py() { + package_python3-py +} + +package_mingw-w64-x86_64-python2-py() { + package_python2-py +} + +package_mingw-w64-x86_64-python3-py() { + package_python3-py +} diff --git a/mingw-w64-python-pyasn1-modules/PKGBUILD b/mingw-w64-python-pyasn1-modules/PKGBUILD new file mode 100644 index 0000000000..24336b4cfe --- /dev/null +++ b/mingw-w64-python-pyasn1-modules/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Frederic Wang + +_realname=pyasn1-modules +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.0.8 +pkgrel=1 +pkgdesc='A collection of ASN.1-based protocols modules (mingw-w64)' +url='http://sourceforge.net/projects/pyasn1/' +license=('BSD') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-pyasn1" + "${MINGW_PACKAGE_PREFIX}-python3-pyasn1") +source=("https://pypi.python.org/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('178129bc7fbf07215c25230c5f053f81') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-pyasn1-modules() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-pyasn1-modules() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-pyasn1-modules() { + package_python2-pyasn1-modules +} + +package_mingw-w64-i686-python3-pyasn1-modules() { + package_python3-pyasn1-modules +} + +package_mingw-w64-x86_64-python2-pyasn1-modules() { + package_python2-pyasn1-modules +} + +package_mingw-w64-x86_64-python3-pyasn1-modules() { + package_python3-pyasn1-modules +} diff --git a/mingw-w64-python-pyasn1/PKGBUILD b/mingw-w64-python-pyasn1/PKGBUILD new file mode 100644 index 0000000000..18f9407529 --- /dev/null +++ b/mingw-w64-python-pyasn1/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Frederic Wang + +_realname=pyasn1 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.1.9 +pkgrel=1 +pkgdesc='ASN.1 types and codecs (mingw-w64)' +url='http://sourceforge.net/projects/pyasn1/' +license=('BSD') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +source=("https://pypi.python.org/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('f00a02a631d4016818659d1cc38d229a') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-pyasn1() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-pyasn1() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-pyasn1() { + package_python2-pyasn1 +} + +package_mingw-w64-i686-python3-pyasn1() { + package_python3-pyasn1 +} + +package_mingw-w64-x86_64-python2-pyasn1() { + package_python2-pyasn1 +} + +package_mingw-w64-x86_64-python3-pyasn1() { + package_python3-pyasn1 +} diff --git a/mingw-w64-python-pycparser/PKGBUILD b/mingw-w64-python-pycparser/PKGBUILD new file mode 100644 index 0000000000..a2aa106dcf --- /dev/null +++ b/mingw-w64-python-pycparser/PKGBUILD @@ -0,0 +1,59 @@ +# Contributor: Frederic Wang + +_realname=pycparser +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.14 +pkgrel=1 +pkgdesc='Complete parser of the C language, written in pure Python (mingw-w64)' +arch=('any') +url='https://github.com/eliben/pycparser' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2") +source=("https://pypi.python.org/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz") +sha256sums=('7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73') + +prepare() { + cd "${srcdir}" + cp -r ${_realname}-${pkgver} python2-build + cp -r ${_realname}-${pkgver} python3-build +} + +package_python3-pycparser() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd ${srcdir}/python3-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-pycparser() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd ${srcdir}/python2-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-pycparser() { + package_python2-pycparser +} + +package_mingw-w64-i686-python3-pycparser() { + package_python3-pycparser +} + +package_mingw-w64-x86_64-python2-pycparser() { + package_python2-pycparser +} + +package_mingw-w64-x86_64-python3-pycparser() { + package_python3-pycparser +} diff --git a/mingw-w64-python-pygments/PKGBUILD b/mingw-w64-python-pygments/PKGBUILD index 96d307796b..dbb0030909 100644 --- a/mingw-w64-python-pygments/PKGBUILD +++ b/mingw-w64-python-pygments/PKGBUILD @@ -2,25 +2,31 @@ # Contributor: Ray Donnelly _realname=pygments -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.6 +pkgver=2.0.2 pkgrel=4 pkgdesc="Python syntax highlighter (mingw-w64)" arch=('any') license=('BSD') url="http://pygments.org/" makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") -source=(http://pypi.python.org/packages/source/P/Pygments/Pygments-$pkgver.tar.gz) -sha256sums=('799ed4caf77516e54440806d8d9cd82a7607dfdf4e4fb643815171a4b5c921c0') - +source=(http://pypi.python.org/packages/source/P/Pygments/Pygments-${pkgver}.tar.gz) +noextract=("Pygments-${pkgver}.tar.gz") +sha256sums=('7320919084e6dac8f4540638a46447a3bd730fca172afc17d2c03eed22cf4f51') + +prepare() { + # workaround for symlink issue + tar -xf Pygments-${pkgver}.tar.gz || true +} + build() { - cd "$srcdir" + cd "${srcdir}" rm -rf python{2,3}-build for builddir in python{2,3}-build; do - cp -r Pygments-$pkgver $builddir - pushd $builddir + cp -r Pygments-${pkgver} $builddir + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build popd done @@ -29,48 +35,43 @@ build() { package_python3-pygments() { depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 - # pygmentize has been moved to the python2-pygments package - #rm ${pkgdir}${MINGW_PREFIX}/bin/pygmentize.exe{,.manifest} - #rm -rf ${pkgdir}${MINGW_PREFIX}/bin - - for f in pygmentize; do - mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe "${pkgdir}${MINGW_PREFIX}"/bin/${f}-3.4.exe - if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then - mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest "${pkgdir}${MINGW_PREFIX}"/bin/${f}-3.4.exe.manifest - sed -e "s|${f}|${f}-3.4|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}-3.4.exe.manifest - fi - mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}-script.py "${pkgdir}${MINGW_PREFIX}"/bin/${f}-3.4-script.py - done + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done - install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } - + package_python2-pygments() { depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - cd "$srcdir/python2-build" + cd "${srcdir}/python2-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done + + for f in pygmentize; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe + if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest + sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest + fi + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py + done + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } diff --git a/mingw-w64-python-pyparsing/PKGBUILD b/mingw-w64-python-pyparsing/PKGBUILD index 914c672628..69acf09821 100644 --- a/mingw-w64-python-pyparsing/PKGBUILD +++ b/mingw-w64-python-pyparsing/PKGBUILD @@ -1,45 +1,44 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=pyparsing -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=2.0.2 -pkgrel=1 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.0.3 +pkgrel=2 pkgdesc='General parsing module for Python (mingw-w64)' arch=('any') url='http://pyparsing.wikispaces.com' license=('MIT') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python2" -) -source=("http://downloads.sourceforge.net/pyparsing/pyparsing-$pkgver.tar.gz") -sha256sums=('17e43d6b17588ed5968735575b3983a952133ec4082596d214d7090b56d48a06') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2") +source=("http://downloads.sourceforge.net/pyparsing/pyparsing-${pkgver}.tar.gz") +sha256sums=('06e729e1cbf5274703b1f47b6135ed8335999d547f9d8cf048b210fb8ebf844f') prepare() { cd "${srcdir}" - cp -r pyparsing-$pkgver python2-pyparsing-$pkgver - cp -r pyparsing-$pkgver python3-pyparsing-$pkgver + cp -r pyparsing-${pkgver} python2-build + cp -r pyparsing-${pkgver} python3-build } package_python3-pyparsing() { depends=("${MINGW_PACKAGE_PREFIX}-python3") - cd $srcdir/python3-pyparsing-$pkgver + cd ${srcdir}/python3-build MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ - --root="$pkgdir" --optimize=1 - + --root="${pkgdir}" --optimize=1 + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } - + package_python2-pyparsing() { depends=("${MINGW_PACKAGE_PREFIX}-python2") - cd $srcdir/python2-pyparsing-$pkgver + cd ${srcdir}/python2-build MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root="$pkgdir" --optimize=1 - + --root="${pkgdir}" --optimize=1 + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } diff --git a/mingw-w64-python-pytest/PKGBUILD b/mingw-w64-python-pytest/PKGBUILD new file mode 100644 index 0000000000..4704684b4c --- /dev/null +++ b/mingw-w64-python-pytest/PKGBUILD @@ -0,0 +1,82 @@ +# Contributor: Frederic Wang + +_realname=pytest +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.8.3 +pkgrel=1 +pkgdesc='simple powerful testing with Python (mingw-w64)' +url='http://pytest.org' +license=('MIT') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-py" + "${MINGW_PACKAGE_PREFIX}-python3-py" + "${MINGW_PACKAGE_PREFIX}-python2-colorama" + "${MINGW_PACKAGE_PREFIX}-python3-colorama") +source=("https://pypi.python.org/packages/source/p/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('33fd706c4ef857e70200661b0fceb80c') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-pytest() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done +} + +package_python2-pytest() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + # fix python command in files + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f} + done + + for f in py.test; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe + if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest + sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest + fi + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py + done +} + +package_mingw-w64-i686-python2-pytest() { + package_python2-pytest +} + +package_mingw-w64-i686-python3-pytest() { + package_python3-pytest +} + +package_mingw-w64-x86_64-python2-pytest() { + package_python2-pytest +} + +package_mingw-w64-x86_64-python3-pytest() { + package_python3-pytest +} diff --git a/mingw-w64-python-pytz/PKGBUILD b/mingw-w64-python-pytz/PKGBUILD index 8ffda8b04b..59fd5cb9ae 100644 --- a/mingw-w64-python-pytz/PKGBUILD +++ b/mingw-w64-python-pytz/PKGBUILD @@ -1,58 +1,58 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=pytz -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=2014.7 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2015.6 pkgrel=1 pkgdesc="Cross platform time zone library for Python (mingw-w64)" arch=('any') url="http://pypi.python.org/pypi/pytz" license=("MIT") -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python2" -) -source=(http://pypi.python.org/packages/source/p/pytz/pytz-$pkgver.tar.bz2) -md5sums=('5c1d3966406c6637b95d1eb2652cd8e1') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2") +source=(http://pypi.python.org/packages/source/p/pytz/pytz-${pkgver}.tar.bz2) +md5sums=('895e42abf59847136bc12ce747775b38') prepare() { cd "${srcdir}" - cp -r pytz-$pkgver python2-pytz-$pkgver - cp -r pytz-$pkgver python3-pytz-$pkgver + cp -r pytz-${pkgver} build-python2 + cp -r pytz-${pkgver} build-python3 } check(){ - cd $srcdir/python2-pytz-$pkgver/pytz/tests - ${MINGW_PREFIX}/bin/python2 test_tzinfo.py - cd $srcdir/python3-pytz-$pkgver/pytz/tests - ${MINGW_PREFIX}/bin/python3 test_tzinfo.py + cd ${srcdir}/build-python2/pytz/tests + ${MINGW_PREFIX}/bin/python2 test_tzinfo.py + cd ${srcdir}/build-python3/pytz/tests + ${MINGW_PREFIX}/bin/python3 test_tzinfo.py } package_python3-pytz() { depends=("${MINGW_PACKAGE_PREFIX}-python3") - cd $srcdir/python3-pytz-$pkgver + cd ${srcdir}/build-python3 # Fix locale https://github.com/ipython/ipython/issues/2057 export LC_ALL=en_US.UTF-8 - + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ - --root=$pkgdir --optimize=1 - + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + install -D LICENSE.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE } - + package_python2-pytz() { depends=("${MINGW_PACKAGE_PREFIX}-python2") - cd $srcdir/python2-pytz-$pkgver + cd ${srcdir}/build-python2 # Fix locale https://github.com/ipython/ipython/issues/2057 export LC_ALL=en_US.UTF-8 - + + # python 2 fix + sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' pytz/tzfile.py + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root=$pkgdir --optimize=1 - + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + install -D LICENSE.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE } diff --git a/mingw-w64-python-pywin32/0001-MinGW-w64-Import-distutils-mingwcompiler.patch b/mingw-w64-python-pywin32/0001-MinGW-w64-Import-distutils-mingwcompiler.patch deleted file mode 100644 index 2f68753ae2..0000000000 --- a/mingw-w64-python-pywin32/0001-MinGW-w64-Import-distutils-mingwcompiler.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- pywin32-219-x86_64/setup.py.orig 2014-10-27 00:17:26.065460800 +0000 -+++ pywin32-219-x86_64/setup.py 2014-10-27 00:31:35.736355300 +0000 -@@ -97,7 +97,10 @@ - # py24 and earlier - bdist_msi = None - --from distutils.msvccompiler import get_build_version -+if (sys.platform == "win32" and sys.version.find("GCC") >= 0): -+ from distutils.mingwcompiler import get_build_version -+else: -+ from distutils.msvccompiler import get_build_version - from distutils import log - - # some modules need a static CRT to avoid problems caused by them having a diff --git a/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch b/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch new file mode 100644 index 0000000000..c0411322d7 --- /dev/null +++ b/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch @@ -0,0 +1,691 @@ +diff -aur 000/setup.py 001/setup.py +--- 000/setup.py 2015-04-09 21:00:48.725278100 -0300 ++++ 001/setup.py 2015-04-09 21:02:02.350399800 -0300 +@@ -224,7 +224,7 @@ + # languishing and will probably never be fixed for Python 2.6... + if sys.version_info > (2,6): + from distutils.spawn import spawn +- from distutils.msvc9compiler import MSVCCompiler ++ from distutils.msvccompiler import MSVCCompiler + MSVCCompiler._orig_spawn = MSVCCompiler.spawn + MSVCCompiler._orig_link = MSVCCompiler.link + +@@ -293,7 +293,7 @@ + MSVCCompiler.link = monkeypatched_link + + +-sdk_dir = find_platform_sdk_dir() ++sdk_dir = find_platform_sdk_dir() or '' + + class WinExt (Extension): + # Base class for all win32 extensions, with some predefined +@@ -304,7 +304,7 @@ + include_dirs=[], + define_macros=None, + undef_macros=None, +- library_dirs=[], ++ library_dirs=['build/lib.mingw-2.7/pywin32_system32'], + libraries="", + runtime_library_dirs=None, + extra_objects=None, +@@ -340,6 +340,9 @@ + # Some of our swigged files behave differently in distutils vs + # MSVC based builds. Always define DISTUTILS_BUILD so they can tell. + define_macros = define_macros or [] ++ define_macros.append(("_WIN32_WINNT", 0x0600)) ++ define_macros.append(("UNICODE", None)) ++ define_macros.append(("_UNICODE", None)) + define_macros.append(("DISTUTILS_BUILD", None)) + define_macros.append(("_CRT_SECURE_NO_WARNINGS", None)) + self.pch_header = pch_header +@@ -691,7 +694,7 @@ + + def finalize_options(self): + build_ext.finalize_options(self) +- self.windows_h_version = None ++ self.windows_h_version = 0x0600 + # The pywintypes library is created in the build_temp + # directory, so we need to add this to library_dirs + self.library_dirs.append(self.build_temp) +@@ -865,7 +868,8 @@ + log.debug("Looked for %s in %s", lib, look_dirs) + return "No library '%s'" % lib + self.found_libraries[lib.lower()] = found +- patched_libs.append(os.path.splitext(os.path.basename(found))[0]) ++ lib_name = re.sub(r'^lib(.*)\.a', r'\1', os.path.basename(found)) ++ patched_libs.append(os.path.splitext(lib_name)[0]) + + if ext.platforms and self.plat_name not in ext.platforms: + return "Only available on platforms %s" % (ext.platforms,) +@@ -975,6 +979,9 @@ + if not self.compiler.initialized: + self.compiler.initialize() + ++ if self.mingw32: ++ self.compiler.shared_lib_extension = '.dll' ++ + if sdk_dir: + self._fixup_sdk_dirs() + +@@ -1226,7 +1233,7 @@ + # XXX This has to be changed for mingw32 + # Get the .lib files we need. This is limited to pywintypes, + # pythoncom and win32ui - but the first 2 have special names +- extra = self.debug and "_d.lib" or ".lib" ++ extra = self.debug and "_d.def" or ".def" + if ext.name in ("pywintypes", "pythoncom"): + # The import libraries are created as PyWinTypes23.lib, but + # are expected to be pywintypes.lib. +@@ -1595,7 +1602,7 @@ + win32/src/win32crypt/PyCRYPTPROV.cpp + win32/src/win32crypt/PyCTL_CONTEXT.cpp + """), +- ("win32file", "", None, 0x0500, """ ++ ("win32file", "ws2_32 mswsock", None, 0x0500, """ + win32/src/win32file.i + win32/src/win32file_comm.cpp + """), +@@ -1652,7 +1659,7 @@ + sources = info[4].split() + extra_compile_args = [] + ext = WinExt_win32(name, +- libraries=lib_names, ++ libraries=(lib_names + ' pywintypes27'), + extra_compile_args = extra_compile_args, + windows_h_version = windows_h_ver, + sources = sources, +@@ -1665,7 +1672,7 @@ + sources = """ + win32\\src\\win32evtlog_messages.mc win32\\src\\win32evtlog.i + """.split(), +- libraries="advapi32 oleaut32", ++ libraries="advapi32 oleaut32 pywintypes27", + delay_load_libraries="wevtapi", + windows_h_version=0x0600 + ), +@@ -1701,7 +1708,7 @@ + # winxptheme + WinExt_win32("_winxptheme", + sources = ["win32/src/_winxptheme.i"], +- libraries="gdi32 user32 comdlg32 comctl32 shell32 Uxtheme", ++ libraries="gdi32 user32 comdlg32 comctl32 shell32 Uxtheme pywintypes27", + windows_h_version=0x0500, + ), + ] +diff -aur 000/win32/src/odbc.cpp 001/win32/src/odbc.cpp +--- 000/win32/src/odbc.cpp 2015-04-09 21:00:49.053401800 -0300 ++++ 001/win32/src/odbc.cpp 2015-04-09 21:02:02.366025800 -0300 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "PyWinTypes.h" + #include "PyWinObjects.h" +@@ -105,8 +106,8 @@ + } + + static void cursorDealloc(PyObject *self); +-PyMethodDef cursorMethods[]; +-PyMemberDef cursorMembers[]; ++extern PyMethodDef cursorMethods[8]; ++extern PyMemberDef cursorMembers[3]; + + static PyTypeObject Cursor_Type = + { +@@ -152,8 +153,8 @@ + + + static void connectionDealloc(PyObject *self); +-PyMethodDef connectionMethods[]; +-PyMemberDef connectionMembers[]; ++extern PyMethodDef connectionMethods[6]; ++extern PyMemberDef connectionMembers[2]; + static PyTypeObject Connection_Type = + { + PYWIN_OBJECT_HEAD +@@ -458,7 +459,7 @@ + } + + /* @object connection|An object representing an ODBC connection */ +-static struct PyMethodDef connectionMethods[] = { ++struct PyMethodDef connectionMethods[] = { + { "setautocommit", odbcSetAutoCommit, 1 }, /* @pymeth setautocommit|Sets the autocommit mode. */ + { "commit", odbcCommit, 1 } , /* @pymeth commit|Commits a transaction. */ + { "rollback", odbcRollback, 1 } , /* @pymeth rollback|Rollsback a transaction. */ +@@ -467,7 +468,7 @@ + {0, 0} + }; + +-static PyMemberDef connectionMembers[] = { ++PyMemberDef connectionMembers[] = { + {"error", T_OBJECT, offsetof(connectionObject, connectionError), READONLY}, + {NULL} + }; +@@ -1192,21 +1193,21 @@ + case SQL_DATE: + case SQL_TIMESTAMP: + case SQL_BIT: +- return(max(collen, (int)_tcslen(colname))); ++ return(std::max(collen, (int)_tcslen(colname))); + case SQL_SMALLINT: + case SQL_INTEGER: + case SQL_TINYINT: +- return(max(collen+1, (int)_tcslen(colname))); ++ return(std::max(collen+1, (int)_tcslen(colname))); + case SQL_DECIMAL: + case SQL_NUMERIC: +- return(max(collen+2, (int)_tcslen(colname))); ++ return(std::max(collen+2, (int)_tcslen(colname))); + case SQL_REAL: + case SQL_FLOAT: + case SQL_DOUBLE: +- return(max(20, (int)_tcslen(colname))); ++ return(std::max(20, (int)_tcslen(colname))); + case SQL_BINARY: + case SQL_VARBINARY: +- return(max(2*collen, (int)_tcslen(colname))); ++ return(std::max(2*collen, (int)_tcslen(colname))); + case SQL_LONGVARBINARY: + case SQL_LONGVARCHAR: + default: +@@ -1797,7 +1798,7 @@ + } + + /* @object cursor|An object representing an ODBC cursor. */ +-static PyMethodDef cursorMethods[] = { ++PyMethodDef cursorMethods[] = { + { "close", odbcCurClose, 1} , /* @pymeth close|Closes the cursor */ + { "execute", odbcCurExec, 1} , /* @pymeth execute|Execute some SQL */ + { "fetchone", odbcCurFetchOne, 1} , /* @pymeth fetchone|Fetch one row of data */ +@@ -1808,7 +1809,7 @@ + {0, 0} + }; + +-static PyMemberDef cursorMembers[] = { ++PyMemberDef cursorMembers[] = { + {"description", T_OBJECT, offsetof(cursorObject, description), READONLY}, + {"error", T_OBJECT, offsetof(cursorObject, cursorError), READONLY}, + {NULL} +diff -aur 000/win32/src/PerfMon/perfmondata.cpp 001/win32/src/PerfMon/perfmondata.cpp +--- 000/win32/src/PerfMon/perfmondata.cpp 2015-04-09 21:00:48.772153700 -0300 ++++ 001/win32/src/PerfMon/perfmondata.cpp 2015-04-09 21:02:02.366025800 -0300 +@@ -89,9 +89,9 @@ + // these are used to insure that the data collection functions + // accessed by Perflib will have the correct calling format. + // +-PM_OPEN_PROC OpenPerformanceData; +-PM_COLLECT_PROC CollectPerformanceData; +-PM_CLOSE_PROC ClosePerformanceData; ++extern "C" PM_OPEN_PROC OpenPerformanceData; ++extern "C" PM_COLLECT_PROC CollectPerformanceData; ++extern "C" PM_CLOSE_PROC ClosePerformanceData; + + TCHAR szFullModulePath[MAX_PATH]; + TCHAR szModuleName[MAX_PATH]; // will point into the buffer above. +@@ -445,7 +445,7 @@ + --*/ + { + HKEY hAppKey; +- TCHAR LogLevelKeyName[] = _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib"); ++ TCHAR LogLevelKeyName[] = _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib"); + + TCHAR LogLevelValueName[] = _T("EventLogLevel"); + LONG lStatus; +diff -aur 000/win32/src/PySECURITY_DESCRIPTOR.cpp 001/win32/src/PySECURITY_DESCRIPTOR.cpp +--- 000/win32/src/PySECURITY_DESCRIPTOR.cpp 2015-04-09 21:00:48.819029400 -0300 ++++ 001/win32/src/PySECURITY_DESCRIPTOR.cpp 2015-04-09 21:01:55.881645000 -0300 +@@ -5,6 +5,7 @@ + #include "PyWinObjects.h" + #include "PySecurityObjects.h" + #include "structmember.h" ++#include + + #ifndef NO_PYWINTYPES_SECURITY + BOOL (WINAPI *setsecuritydescriptorcontrol)(PSECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, SECURITY_DESCRIPTOR_CONTROL)=NULL; +@@ -786,7 +787,7 @@ + { + ob_type = &PySECURITY_DESCRIPTORType; + _Py_NewReference(this); +- cb = max(cb, SECURITY_DESCRIPTOR_MIN_LENGTH); ++ cb = std::max((long long unsigned int)cb, SECURITY_DESCRIPTOR_MIN_LENGTH); + PSECURITY_DESCRIPTOR psd = malloc(cb); + this->m_psd=NULL; + if (::InitializeSecurityDescriptor(psd, SECURITY_DESCRIPTOR_REVISION)) +diff -aur 000/win32/src/PySecurityObjects.h 001/win32/src/PySecurityObjects.h +--- 000/win32/src/PySecurityObjects.h 2015-04-09 21:00:48.850278300 -0300 ++++ 001/win32/src/PySecurityObjects.h 2015-04-09 21:01:55.881645000 -0300 +@@ -121,7 +121,7 @@ + static PyObject *GetSubAuthorityCount(PyObject *self, PyObject *args); + static PyObject *GetSubAuthority(PyObject *self, PyObject *args); + static PyObject *GetSidIdentifierAuthority(PyObject *self, PyObject *args); +- static struct PyMethodDef PySID::methods[]; ++ static struct PyMethodDef methods[]; + + protected: + PSID m_psid; +@@ -159,7 +159,7 @@ + /* Python support */ + int compare(PyObject *ob); + static void deallocFunc(PyObject *ob); +- static struct PyMethodDef PyACL::methods[]; ++ static struct PyMethodDef methods[]; + + static PyObject *Initialize(PyObject *self, PyObject *args); + static PyObject *IsValid(PyObject *self, PyObject *args); +diff -aur 000/win32/src/PyWinObjects.h 001/win32/src/PyWinObjects.h +--- 000/win32/src/PyWinObjects.h 2015-04-09 21:00:48.881528000 -0300 ++++ 001/win32/src/PyWinObjects.h 2015-04-09 21:01:55.881645000 -0300 +@@ -52,7 +52,7 @@ + PyObject *str(); + PyObject *repr(); + int compare(PyObject *ob); +- PyObject *PyTime::richcompare(PyObject *other, int op); ++ PyObject *richcompare(PyObject *other, int op); + + int print(FILE *fp, int flags); + Py_hash_t hash(void); +diff -aur 000/win32/src/PyWinTypes.h 001/win32/src/PyWinTypes.h +--- 000/win32/src/PyWinTypes.h 2015-04-09 21:00:48.944027900 -0300 ++++ 001/win32/src/PyWinTypes.h 2015-04-09 21:02:02.381651500 -0300 +@@ -796,7 +796,7 @@ + + // A helper for simple exception handling. + // try/__try +-#ifdef MAINWIN ++#if defined(__MINGW32__) || defined(MAINWIN) + #define PYWINTYPES_TRY try + #else + #define PYWINTYPES_TRY __try +diff -aur 000/win32/src/PyWinTypesmodule.cpp 001/win32/src/PyWinTypesmodule.cpp +--- 000/win32/src/PyWinTypesmodule.cpp 2015-04-09 21:00:48.990903200 -0300 ++++ 001/win32/src/PyWinTypesmodule.cpp 2015-04-09 21:01:55.897264900 -0300 +@@ -1139,7 +1139,7 @@ + } + + // Function to format a python traceback into a character string. +-#define GPEM_ERROR(what) {errorMsg = "";goto done;} ++#define GPEM_ERROR(what) {errorMsg = "";goto done;} + char *GetPythonTraceback(PyObject *exc_type, PyObject *exc_value, PyObject *exc_tb) + { + // Sleep (30000); // Time enough to attach the debugger (barely) +diff -aur 000/win32/src/win32crypt/PyCRYPTPROV.cpp 001/win32/src/win32crypt/PyCRYPTPROV.cpp +--- 000/win32/src/win32crypt/PyCRYPTPROV.cpp 2015-04-09 21:00:49.100277500 -0300 ++++ 001/win32/src/win32crypt/PyCRYPTPROV.cpp 2015-04-09 21:02:02.381651500 -0300 +@@ -1,4 +1,5 @@ + // @doc ++#include + #include "win32crypt.h" + + // @object PyCRYPTPROV|Handle to a cryptographic provider, created using +@@ -351,7 +352,7 @@ + //initialize buffer with char string if passed if + ZeroMemory(pbBuffer, dwLen+1); + if (seeddata != NULL) +- memcpy(pbBuffer, seeddata, min(dwLen,seedlen)); ++ memcpy(pbBuffer, seeddata, std::min(dwLen,seedlen)); + if (CryptGenRandom(hcryptprov, dwLen, pbBuffer)) + ret=PyString_FromStringAndSize((char *)pbBuffer, dwLen); + else +diff -aur 000/win32/src/win32crypt/win32cryptmodule.cpp 001/win32/src/win32crypt/win32cryptmodule.cpp +--- 000/win32/src/win32crypt/win32cryptmodule.cpp 2015-04-09 21:00:49.194027800 -0300 ++++ 001/win32/src/win32crypt/win32cryptmodule.cpp 2015-04-09 21:02:02.397275800 -0300 +@@ -596,44 +596,37 @@ + pvPara=(void *)&cssrp; + } + else{ +- switch((ULONG_PTR)StoreProvider){ +- case CERT_STORE_PROV_PHYSICAL: +- case CERT_STORE_PROV_FILENAME: +- case CERT_STORE_PROV_SYSTEM: +- case CERT_STORE_PROV_SYSTEM_REGISTRY: +- case CERT_STORE_PROV_LDAP:{ +- if (!PyWinObject_AsWCHAR(obpvPara, (WCHAR **)&pvPara)) +- return NULL; +- free_wchar=TRUE; +- break; +- } +- case CERT_STORE_PROV_REG:{ +- if (!PyWinObject_AsHKEY(obpvPara, (HKEY *)&pvPara)) +- return NULL; +- break; +- } +- case CERT_STORE_PROV_FILE:{ +- if (!PyWinObject_AsHANDLE(obpvPara, (HANDLE *)&pvPara)) +- return NULL; +- break; +- } +- case CERT_STORE_PROV_SERIALIZED: +- case CERT_STORE_PROV_PKCS7:{ +- if (!PyWinObject_AsReadBuffer(obpvPara, (void **)&crypt_data_blob.pbData, &crypt_data_blob.cbData)) +- return NULL; +- pvPara=(void *)&crypt_data_blob; +- break; +- } +- case CERT_STORE_PROV_MEMORY:{ +- // pvPara is not used, warn if something passed in +- if (obpvPara != Py_None) +- PyErr_Warn(PyExc_RuntimeWarning, "Para ignored for CERT_STORE_PROV_MEMORY"); +- break; +- } +- default:{ +- PyErr_SetString(PyExc_NotImplementedError,"Specified store provider type not supported"); ++ if (StoreProvider == CERT_STORE_PROV_PHYSICAL || ++ StoreProvider == CERT_STORE_PROV_FILENAME || ++ StoreProvider == CERT_STORE_PROV_SYSTEM || ++ StoreProvider == CERT_STORE_PROV_SYSTEM_REGISTRY || ++ StoreProvider == CERT_STORE_PROV_LDAP){ ++ if (!PyWinObject_AsWCHAR(obpvPara, (WCHAR **)&pvPara)) + return NULL; +- } ++ free_wchar=TRUE; ++ } ++ else if (StoreProvider == CERT_STORE_PROV_REG){ ++ if (!PyWinObject_AsHKEY(obpvPara, (HKEY *)&pvPara)) ++ return NULL; ++ } ++ else if (StoreProvider == CERT_STORE_PROV_FILE){ ++ if (!PyWinObject_AsHANDLE(obpvPara, (HANDLE *)&pvPara)) ++ return NULL; ++ } ++ else if (StoreProvider == CERT_STORE_PROV_SERIALIZED || ++ StoreProvider == CERT_STORE_PROV_PKCS7){ ++ if (!PyWinObject_AsReadBuffer(obpvPara, (void **)&crypt_data_blob.pbData, &crypt_data_blob.cbData)) ++ return NULL; ++ pvPara=(void *)&crypt_data_blob; ++ } ++ else if (StoreProvider == CERT_STORE_PROV_MEMORY){ ++ // pvPara is not used, warn if something passed in ++ if (obpvPara != Py_None) ++ PyErr_Warn(PyExc_RuntimeWarning, "Para ignored for CERT_STORE_PROV_MEMORY"); ++ } ++ else{ ++ PyErr_SetString(PyExc_NotImplementedError,"Specified store provider type not supported"); ++ return NULL; + } + } + +diff -aur 000/win32/src/win32evtlog.i 001/win32/src/win32evtlog.i +--- 000/win32/src/win32evtlog.i 2015-04-09 21:00:49.256528100 -0300 ++++ 001/win32/src/win32evtlog.i 2015-04-09 21:02:02.397275800 -0300 +@@ -997,6 +997,14 @@ + } + PyCFunction pfnPyEvtUpdateBookmark = (PyCFunction) PyEvtUpdateBookmark; + ++#ifndef EVT_VARIANT_TYPE_ARRAY ++#define EVT_VARIANT_TYPE_ARRAY 128 ++#endif ++ ++#ifndef EVT_VARIANT_TYPE_MASK ++#define EVT_VARIANT_TYPE_MASK 0x7F ++#endif ++ + PyObject *PyWinObject_FromEVT_VARIANT(PEVT_VARIANT val) + { + if (val->Type & EVT_VARIANT_TYPE_ARRAY){ +diff -aur 000/win32/src/win32file.i 001/win32/src/win32file.i +--- 000/win32/src/win32file.i 2015-04-09 21:00:49.459654600 -0300 ++++ 001/win32/src/win32file.i 2015-04-09 21:02:02.412900800 -0300 +@@ -1404,11 +1404,11 @@ + // the filename is exactly 1 byte! Not clear the best way to + // check this, but this works for now - is it at least the size of + // the *head* of the struct. +- if (nbytes < sizeof DWORD*3+2) ++ if (nbytes < sizeof(DWORD)*3+2) + return ret; + DWORD nbytes_read = 0; + while (1) { +- PyObject *fname = PyWinObject_FromOLECHAR(p->FileName, p->FileNameLength/sizeof WCHAR); ++ PyObject *fname = PyWinObject_FromOLECHAR(p->FileName, p->FileNameLength/sizeof(WCHAR)); + if (!fname) { + Py_DECREF(ret); + return NULL; +diff -aur 000/win32/src/win32file_comm.cpp 001/win32/src/win32file_comm.cpp +--- 000/win32/src/win32file_comm.cpp 2015-04-09 21:00:49.490903600 -0300 ++++ 001/win32/src/win32file_comm.cpp 2015-04-09 21:02:02.412900800 -0300 +@@ -175,7 +175,7 @@ + + #define GET_BITFIELD_ENTRY(bitfield_name) \ + else if (strcmp(name, #bitfield_name)==0) { \ +- return PyInt_FromLong(pydcb->m_DCB.##bitfield_name); \ ++ return PyInt_FromLong(pydcb->m_DCB.bitfield_name); \ + } \ + + PyObject *PyDCB::getattro(PyObject *self, PyObject *obname) +@@ -210,7 +210,7 @@ + PyErr_Format(PyExc_TypeError, szNeedIntAttr, #bitfield_name); \ + return -1; \ + } \ +- pydcb->m_DCB.##bitfield_name = PyInt_AsLong(v); \ ++ pydcb->m_DCB.bitfield_name = PyInt_AsLong(v); \ + return 0; \ + } \ + +@@ -369,7 +369,7 @@ + #undef GET_BITFIELD_ENTRY + #define GET_BITFIELD_ENTRY(bitfield_name) \ + else if (strcmp(name, #bitfield_name)==0) { \ +- return PyInt_FromLong(pyCOMSTAT->m_COMSTAT.##bitfield_name); \ ++ return PyInt_FromLong(pyCOMSTAT->m_COMSTAT.bitfield_name); \ + } \ + + PyObject *PyCOMSTAT::getattro(PyObject *self, PyObject *obname) +@@ -398,7 +398,7 @@ + PyErr_Format(PyExc_TypeError, szNeedIntAttr, #bitfield_name); \ + return -1; \ + } \ +- pyCOMSTAT->m_COMSTAT.##bitfield_name = PyInt_AsLong(v); \ ++ pyCOMSTAT->m_COMSTAT.bitfield_name = PyInt_AsLong(v); \ + return 0; \ + } \ + +diff -aur 000/win32/src/win32inet.i 001/win32/src/win32inet.i +--- 000/win32/src/win32inet.i 2015-04-09 21:00:49.569028200 -0300 ++++ 001/win32/src/win32inet.i 2015-04-09 21:02:02.428526500 -0300 +@@ -4,9 +4,26 @@ + %{ + // #define UNICODE + // #define _UNICODE ++#include + #include "Windows.h" + #include "WinInet.h" + #undef BOOLAPI // wininet.h defines this! ++ ++#ifndef INTERNET_OPTION_CODEPAGE_PATH ++#define INTERNET_OPTION_CODEPAGE_PATH 100 ++#endif ++ ++#ifndef INTERNET_OPTION_CODEPAGE_EXTRA ++#define INTERNET_OPTION_CODEPAGE_EXTRA 101 ++#endif ++ ++#ifndef INTERNET_OPTION_IDN ++#define INTERNET_OPTION_IDN 102 ++#endif ++ ++#ifndef INTERNET_OPTION_HTTP_DECODING ++#define INTERNET_OPTION_HTTP_DECODING 65 ++#endif + %} + + %include "typemaps.i" +@@ -1835,7 +1852,7 @@ + } + } + if (bsuccess && GroupName) +- _tcsncpy(GroupInfo->szGroupName, GroupName, min(namelen, GROUPNAME_MAX_LENGTH)); ++ _tcsncpy(GroupInfo->szGroupName, GroupName, std::min(namelen, GROUPNAME_MAX_LENGTH)); + Py_DECREF(dummy_tuple); + PyWinObject_FreeTCHAR(GroupName); + if (OwnerStorage) +diff -aur 000/win32/src/win32net/win32net.h 001/win32/src/win32net/win32net.h +--- 000/win32/src/win32net/win32net.h 2015-04-09 21:00:49.600278800 -0300 ++++ 001/win32/src/win32net/win32net.h 2015-04-09 21:02:02.428526500 -0300 +@@ -62,15 +62,15 @@ + + #if WINVER >= 0x0500 + typedef NET_API_STATUS (NET_API_FUNCTION *NetValidateNamefunc)(LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, NETSETUP_NAME_TYPE); +-extern NetValidateNamefunc pfnNetValidateName; ++extern "C" NetValidateNamefunc pfnNetValidateName; + + typedef NET_API_STATUS (NET_API_FUNCTION *NetGetJoinInformationfunc)(LPCWSTR, LPWSTR *, PNETSETUP_JOIN_STATUS); +-extern NetGetJoinInformationfunc pfnNetGetJoinInformation; ++extern "C" NetGetJoinInformationfunc pfnNetGetJoinInformation; + + typedef NET_API_STATUS (NET_API_FUNCTION *NetValidatePasswordPolicyfunc)(LPCWSTR, LPVOID, NET_VALIDATE_PASSWORD_TYPE, LPVOID, LPVOID *); +-extern NetValidatePasswordPolicyfunc pfnNetValidatePasswordPolicy; ++extern "C" NetValidatePasswordPolicyfunc pfnNetValidatePasswordPolicy; + + typedef NET_API_STATUS (NET_API_FUNCTION *NetValidatePasswordPolicyFreefunc)(LPVOID *); +-extern NetValidatePasswordPolicyFreefunc pfnNetValidatePasswordPolicyFree; ++extern "C" NetValidatePasswordPolicyFreefunc pfnNetValidatePasswordPolicyFree; + + #endif // WINVER +diff -aur 000/win32/src/win32pdhmodule.cpp 001/win32/src/win32pdhmodule.cpp +--- 000/win32/src/win32pdhmodule.cpp 2015-04-09 21:00:49.662779100 -0300 ++++ 001/win32/src/win32pdhmodule.cpp 2015-04-09 21:02:02.444150800 -0300 +@@ -11,6 +11,7 @@ + + ******************************************************************/ + ++#include + #include "PyWinTypes.h" + #include "pdh.h" + #include "pdhmsg.h" +@@ -1016,7 +1017,7 @@ + #define SET_BOOL(r, i) { \ + if (i(cchInitialPath+1, 1024); + myCfg.cfg.szReturnPathBuffer = (TCHAR *)malloc(myCfg.cfg.cchReturnPathLength * sizeof(TCHAR)); + if (myCfg.cfg.szReturnPathBuffer == NULL){ + PyErr_NoMemory(); +diff -aur 000/win32/src/win32popen.cpp 001/win32/src/win32popen.cpp +--- 000/win32/src/win32popen.cpp 2015-04-09 21:00:49.709655500 -0300 ++++ 001/win32/src/win32popen.cpp 2015-04-09 21:02:02.444150800 -0300 +@@ -166,19 +166,27 @@ + { + PROCESS_INFORMATION piProcInfo; + STARTUPINFO siStartInfo; +- char *s1,*s2, *s3=" /c "; ++ LPTSTR s1, s2, s3 = TEXT(" /c "); + DWORD i; + size_t x; + +- if (i = GetEnvironmentVariable("COMSPEC",NULL,0)) ++ if (i = GetEnvironmentVariable(TEXT("COMSPEC"),NULL,0)) + { +- s1 = (char *)_alloca(i); +- if (!(x = GetEnvironmentVariable("COMSPEC", s1, i))) ++ s1 = (LPTSTR)_alloca(i); ++ if (!(x = GetEnvironmentVariable(TEXT("COMSPEC"), s1, i))) + return FALSE; +- x = i + strlen(s3) + strlen(cmdstring) + 1; +- s2 = (char *)_alloca(x); ++#ifdef UNICODE ++ size_t cmdlen = strlen(cmdstring); ++ WCHAR _cmdstring[cmdlen + 1]; ++ if (!MultiByteToWideChar(CP_OEMCP, 0, cmdstring, -1, _cmdstring, cmdlen + 1)) ++ return FALSE; ++#else ++ char *_cmdstring = cmdstring; ++#endif ++ x = (i + _tcslen(s3) + _tcslen(_cmdstring) + 1) * sizeof(TCHAR); ++ s2 = (LPTSTR)_alloca(x); + ZeroMemory(s2, x); +- sprintf(s2, "%s%s%s", s1, s3, cmdstring); ++ _stprintf(s2, TEXT("%s%s%s"), s1, s3, _cmdstring); + } + // Could be an else here to try cmd.exe / command.com in the path + // Now we'll just error out.. +diff -aur 000/win32/src/win32rasmodule.cpp 001/win32/src/win32rasmodule.cpp +--- 000/win32/src/win32rasmodule.cpp 2015-04-09 21:00:49.756528400 -0300 ++++ 001/win32/src/win32rasmodule.cpp 2015-04-09 21:02:02.459777500 -0300 +@@ -463,7 +463,7 @@ + if (obCallback==Py_None) { + pNotification = NULL; + } else if (PyCallable_Check(obCallback)) { +- pNotification = PyRasDialFunc1; ++ pNotification = (LPVOID)PyRasDialFunc1; + notType = 1; + } else if (PyInt_Check(obCallback)) { + if (!PyWinLong_AsVoidPtr(obCallback, &pNotification)) +diff -aur 000/win32/src/win32security.i 001/win32/src/win32security.i +--- 000/win32/src/win32security.i 2015-04-09 21:00:49.912778600 -0300 ++++ 001/win32/src/win32security.i 2015-04-09 21:02:02.459777500 -0300 +@@ -3563,9 +3563,9 @@ + return FALSE; + } + static const BOOL none_ok = TRUE; // NULL seems OK anywhere +- if (!PyWinObject_AsWCHAR(obUser, &pAuthData->User, none_ok, &pAuthData->UserLength) || \ +- !PyWinObject_AsWCHAR(obDomain, &pAuthData->Domain, none_ok, &pAuthData->DomainLength) || \ +- !PyWinObject_AsWCHAR(obPW, &pAuthData->Password, none_ok, &pAuthData->PasswordLength)) { ++ if (!PyWinObject_AsWCHAR(obUser, (WCHAR**)&pAuthData->User, none_ok, &pAuthData->UserLength) || \ ++ !PyWinObject_AsWCHAR(obDomain, (WCHAR**)&pAuthData->Domain, none_ok, &pAuthData->DomainLength) || \ ++ !PyWinObject_AsWCHAR(obPW, (WCHAR**)&pAuthData->Password, none_ok, &pAuthData->PasswordLength)) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, err_msg); + return FALSE; +@@ -3579,11 +3579,11 @@ + if (!pAuthData) + return; + if (pAuthData->User) +- PyWinObject_FreeWCHAR(pAuthData->User); ++ PyWinObject_FreeWCHAR((WCHAR*)pAuthData->User); + if (pAuthData->Domain) +- PyWinObject_FreeWCHAR(pAuthData->Domain); ++ PyWinObject_FreeWCHAR((WCHAR*)pAuthData->Domain); + if (pAuthData->Password) +- PyWinObject_FreeWCHAR(pAuthData->Password); ++ PyWinObject_FreeWCHAR((WCHAR*)pAuthData->Password); + } + + %} +diff -aur 000/win32/src/win32service.i 001/win32/src/win32service.i +--- 000/win32/src/win32service.i 2015-04-09 21:00:49.990904900 -0300 ++++ 001/win32/src/win32service.i 2015-04-09 21:02:02.475400700 -0300 +@@ -57,6 +57,13 @@ + if (fp!=NULL) + fpEnumServicesStatusEx=(EnumServicesStatusExfunc)fp; + } ++#ifndef SERVICE_CONTROL_PRESHUTDOWN ++#define SERVICE_CONTROL_PRESHUTDOWN 0x0000000F ++#endif ++ ++#ifndef SERVICE_ACCEPT_PRESHUTDOWN ++#define SERVICE_ACCEPT_PRESHUTDOWN 0x00000100 ++#endif + %} + + %{ +diff -aur 000/win32/src/win32trace.cpp 001/win32/src/win32trace.cpp +--- 000/win32/src/win32trace.cpp 2015-04-09 21:00:50.022154900 -0300 ++++ 001/win32/src/win32trace.cpp 2015-04-09 21:02:02.475400700 -0300 +@@ -30,6 +30,7 @@ + + */ + ++#include + #include "PyWinTypes.h" + #include "PyWinObjects.h" + +@@ -341,7 +342,7 @@ + Py_BEGIN_ALLOW_THREADS + const char *data_this = data; + while (len) { +- unsigned len_this = min(len, BUFFER_SIZE/2); ++ unsigned len_this = std::min(len, BUFFER_SIZE/2); + BOOL ok = GetMyMutex(); + if (ok) { + // must use types with identical size on win32 and win64 diff --git a/mingw-w64-python-pywin32/PKGBUILD b/mingw-w64-python-pywin32/PKGBUILD index b6c22f9d1d..76d54afb1a 100644 --- a/mingw-w64-python-pywin32/PKGBUILD +++ b/mingw-w64-python-pywin32/PKGBUILD @@ -1,67 +1,48 @@ # Maintainer: Ray Donnelly +# Contributor: Renato Silva -_realname=pywin32 -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" - "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +_realname='pywin32' +url='http://sourceforge.net/projects/pywin32' +pkgdesc='Python for Windows Extensions (mingw-w64)' +license=('PSF') +arch=('any') pkgver=219 pkgrel=1 -pkgdesc='Python for Windows Extensions (mingw-w64)' -groups=("${MINGW_PACKAGE_PREFIX}") -arch=('any') -url='https://sourceforge.net/projects/pywin32' -license=('PSF') +makedepends=(${MINGW_PACKAGE_PREFIX}-python2 ${MINGW_PACKAGE_PREFIX}-python3 rsync) +pkgname=(${MINGW_PACKAGE_PREFIX}-python2-${_realname} ${MINGW_PACKAGE_PREFIX}-python3-${_realname}) source=("http://prdownloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.zip" - "0001-MinGW-w64-Import-distutils-mingwcompiler.patch") + 001-compile-and-setup-fixes.patch) sha1sums=('1eb8039f9e15f53f56a9e1b54f00cd2c0f63ff8e' - '0b3883b57a9d2575c98629239ddb87e53b3f35d5') + '24ee63ecc8914d05a9ae4035d5c854517ff260a9') prepare() { - pushd $_realname-$pkgver - patch -p1 -i "${srcdir}"/0001-MinGW-w64-Import-distutils-mingwcompiler.patch - popd - [ -d $_realname-py2-$pkgver-${CARCH} ] && rm -rf $_realname-py2-$pkgver-${CARCH} - cp -a $_realname-$pkgver $_realname-py2-$pkgver-${CARCH} - [ -d $_realname-$pkgver-${CARCH} ] && rm -rf $_realname-$pkgver-${CARCH} - mv $_realname-$pkgver $_realname-$pkgver-${CARCH} + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 < "${startdir}"/001-compile-and-setup-fixes.patch } -# check() { -# cd "${srcdir}"/build-${CARCH} -# make check -# } - -package2() { - depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") - cd $_realname-py2-$pkgver-${CARCH} - - DISTUTILS_DEBUG=1 \ - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root="${pkgdir}" --optimize=1 +build() { + for _python in python2 python3; do + msg2 "Synchronizing ${_python} build directory" + rsync --recursive --times "${srcdir}/${_realname}-${pkgver}"/* "${srcdir}/build-${_python}-${CARCH}-${_realname}-${pkgver}" + cd "${srcdir}/build-${_python}-${CARCH}-${_realname}-${pkgver}" + LIB="${MINGW_PREFIX}/lib:${MINGW_PREFIX}/${CARCH}-w64-mingw32/lib" \ + INCLUDE="${MINGW_PREFIX}/include:${MINGW_PREFIX}/${CARCH}-w64-mingw32/include" \ + ${MINGW_PREFIX}/bin/${_python} setup.py build --compiler=mingw32 + done } -package3() { - depends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") - cd $_realname-$pkgver-${CARCH} - - DISTUTILS_DEBUG=1 \ - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup3.py install --prefix=${MINGW_PREFIX} \ - --root="${pkgdir}" --optimize=1 +_package() { + depends=(${MINGW_PACKAGE_PREFIX}-${_python}-setuptools) + cd "${srcdir}/build-${_python}-${CARCH}-${_realname}-${pkgver}" + DISTUTILS_DEBUG=1 \ + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/${_python} setup.py install \ + --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" \ + --optimize=1 } -package_mingw-w64-x86_64-python2-pywin32() { - package2 -} - -package_mingw-w64-i686-python2-pywin32() { - package2 -} - -package_mingw-w64-x86_64-python3-pywin32() { - package3 -} - -package_mingw-w64-i686-python3-pywin32() { - package3 -} +package_mingw-w64-i686-python2-pywin32() { _python=python2 _package; } +package_mingw-w64-i686-python3-pywin32() { _python=python3 _package; } +package_mingw-w64-x86_64-python2-pywin32() { _python=python2 _package; } +package_mingw-w64-x86_64-python3-pywin32() { _python=python3 _package; } diff --git a/mingw-w64-python-reportlab/PKGBUILD b/mingw-w64-python-reportlab/PKGBUILD index 37c88d7e51..cb39ff581e 100644 --- a/mingw-w64-python-reportlab/PKGBUILD +++ b/mingw-w64-python-reportlab/PKGBUILD @@ -2,25 +2,21 @@ # Contributor: Ray Donnelly _realname=reportlab - -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=3.0 -pkgrel=2 +pkgrel=4 pkgdesc="A proven industry-strength PDF generating solution (mingw-w64)" arch=('any') license=('custom') url="http://www.reportlab.org/rl_toolkit.html" depends=("${MINGW_PACKAGE_PREFIX}-freetype") makedepends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python3") + "${MINGW_PACKAGE_PREFIX}-python3") source=(http://www.reportlab.com/ftp/${_realname}-${pkgver}.tar.gz) md5sums=('a4fd40abcfb604aa3bd907181133c071') - -prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - cd "${srcdir}" +prepare() { cp -r ${_realname}-${pkgver} build-python2 cp -r ${_realname}-${pkgver} build-python3 } diff --git a/mingw-w64-python-scipy/PKGBUILD b/mingw-w64-python-scipy/PKGBUILD index a8d73684df..face27b3d6 100644 --- a/mingw-w64-python-scipy/PKGBUILD +++ b/mingw-w64-python-scipy/PKGBUILD @@ -1,38 +1,35 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=scipy -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=0.14.0 -pkgrel=2 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.16.1 +pkgrel=1 pkgdesc="SciPy is open-source software for mathematics, science, and engineering. (mingw-w64)" arch=('any') url="http://www.scipy.org/" license=('BSD') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-gcc-fortran" - "${MINGW_PACKAGE_PREFIX}-openblas" - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" -) -source=( - "https://pypi.python.org/packages/source/s/scipy/scipy-${pkgver}.tar.gz" - fix-qhull.patch -) -md5sums=('d7c7f4ccf8b07b08d6fe49d5cd51f85d' +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-fortran" + "${MINGW_PACKAGE_PREFIX}-openblas" + "${MINGW_PACKAGE_PREFIX}-python2-numpy" + "${MINGW_PACKAGE_PREFIX}-python3-numpy" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +source=("https://pypi.python.org/packages/source/s/scipy/scipy-${pkgver}.tar.gz"{,.asc} + fix-qhull.patch) +md5sums=('967cdb8588a4249f820344d8264a2143' + 'SKIP' '62e14262492e7fbdc3fb65d106619ce3') - prepare() { - cd ${_realname}-$pkgver + cd ${_realname}-${pkgver} patch -Np1 -i ${srcdir}/fix-qhull.patch cd .. - - cp -a $_realname-$pkgver $_realname-py2-$pkgver - cp -a $_realname-$pkgver $_realname-py3-$pkgver - - cd $_realname-py2-$pkgver + + cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver} + cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver} + + cd ${_realname}-py2-${pkgver} sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ @@ -40,10 +37,10 @@ prepare() { } build() { - export LDFLAGS="-Wall -shared" - + LDFLAGS="${LDFLAGS} -Wall -shared" + # build for python2 - cd ${srcdir}/$_realname-py2-$pkgver + cd ${srcdir}/${_realname}-py2-${pkgver} local result="fail" while [ "$result" = "fail" ]; do MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ @@ -51,7 +48,7 @@ build() { done # build for python3 - cd ${srcdir}/$_realname-py3-$pkgver + cd ${srcdir}/${_realname}-py3-${pkgver} result="fail" while [ "$result" = "fail" ]; do MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ @@ -60,36 +57,32 @@ build() { } package_python2-scipy() { - depends=( - "${MINGW_PACKAGE_PREFIX}-openblas" - "${MINGW_PACKAGE_PREFIX}-python2-numpy" - ) + depends=("${MINGW_PACKAGE_PREFIX}-openblas" + "${MINGW_PACKAGE_PREFIX}-python2-numpy") optdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose: testsuite") - - cd $_realname-py2-$pkgver - export LDFLAGS="-Wall -shared" - + + cd ${_realname}-py2-${pkgver} + LDFLAGS="${LDFLAGS} -Wall -shared" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py config_fc --fcompiler=gnu95 install \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 LICENSE.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } package_python3-scipy() { - depends=( - "${MINGW_PACKAGE_PREFIX}-openblas" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - ) + depends=("${MINGW_PACKAGE_PREFIX}-openblas" + "${MINGW_PACKAGE_PREFIX}-python3-numpy") optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: testsuite") - - cd $_realname-py3-$pkgver - export LDFLAGS="-Wall -shared" - + + cd ${_realname}-py3-${pkgver} + LDFLAGS="${LDFLAGS} -Wall -shared" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py config_fc --fcompiler=gnu95 install \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 LICENSE.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" diff --git a/mingw-w64-python-setuptools/0004-dont-execute-msvc.patch b/mingw-w64-python-setuptools/0004-dont-execute-msvc.patch index c7a2220ed0..d45747d3a2 100644 --- a/mingw-w64-python-setuptools/0004-dont-execute-msvc.patch +++ b/mingw-w64-python-setuptools/0004-dont-execute-msvc.patch @@ -10,6 +10,6 @@ -msvc9_support.patch_for_specialized_compiler() - - def have_pyrex(): + def _have_cython(): """ - Return True if Cython or Pyrex can be imported. + Return True if Cython can be imported. diff --git a/mingw-w64-python-setuptools/PKGBUILD b/mingw-w64-python-setuptools/PKGBUILD index f9ab4413dd..ad9f9ed0e9 100644 --- a/mingw-w64-python-setuptools/PKGBUILD +++ b/mingw-w64-python-setuptools/PKGBUILD @@ -2,13 +2,13 @@ # Contributor: Ray Donnelly _realname=setuptools +pkgbase=mingw-w64-python-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgname=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-setuptools") -_py3_base=3.4 -#pkgver=7.0 -#pkgrel=1 -pkgver=5.4.1 -pkgrel=2 +_py3_base=3.5 +_py2_base=2.7 +pkgver=18.5 +pkgrel=1 pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages (mingw-w64)" arch=('any') license=('PSF') @@ -19,18 +19,18 @@ source=(http://pypi.python.org/packages/source/s/setuptools/${_realname}-${pkgve '0002-Allow-usr-bin-env-in-script.patch' '0003-MinGW-w64-Look-in-same-dir-as-script-for-exe.patch' '0004-dont-execute-msvc.patch') -sha1sums=('113e5688a7fab03004f7b793aa2f718f949515d0' +sha1sums=('301a850c7126b11773a5ffa69e1ddf34dfb26600' 'a26b8313592899ff6e5c18e5a4d489b7d8a6e021' '3f475c0510ecaa1ee86412197cb3624ebfba7105' '101db3f8acbd116c81ee170adea2b1453ccc709a' - '8c7266a73334b166286baf8641ad0c139f15faad') - + 'e803db42f6589d19c51f7e962a8742c826fd13fc') + prepare() { cd "${srcdir}/setuptools-${pkgver}" patch -p1 -i ${srcdir}/0001-mingw-python-fix.patch patch -p1 -i ${srcdir}/0002-Allow-usr-bin-env-in-script.patch patch -p1 -i ${srcdir}/0003-MinGW-w64-Look-in-same-dir-as-script-for-exe.patch - if [ "${pkgver}" = "7.0" ]; then + if [ $(vercmp $2 6.9) -gt 0 ]; then patch -p1 -i ${srcdir}/0004-dont-execute-msvc.patch fi @@ -47,11 +47,11 @@ prepare() { cp -r setuptools-${pkgver} setuptools-python3 cd "${srcdir}"/setuptools-python2 - sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py + sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" tests/manual_test.py sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python2|" setuptools/command/easy_install.py cd "${srcdir}"/setuptools-python3 - sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" setuptools/tests/test_resources.py + sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" tests/manual_test.py sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py } @@ -68,9 +68,7 @@ build() { package_python3-setuptools() { depends=("${MINGW_PACKAGE_PREFIX}-python3>=3.3") - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -wm ${MINGW_PREFIX}) cd "${srcdir}/setuptools-python3" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ @@ -88,17 +86,18 @@ package_python3-setuptools() { package_python2-setuptools() { depends=("${MINGW_PACKAGE_PREFIX}-python2>=2.7") - - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null - + + local _mingw_prefix=$(cygpath -wm ${MINGW_PREFIX}) + cd "${srcdir}/setuptools-python2" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build + sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${pkgdir}${MINGW_PREFIX}/bin/easy_install-script.py + sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${pkgdir}${MINGW_PREFIX}/bin/easy_install-${_py2_base}-script.py } +# Wrappers package_mingw-w64-i686-python2-setuptools() { package_python2-setuptools } diff --git a/mingw-w64-python-six/PKGBUILD b/mingw-w64-python-six/PKGBUILD index bf18e40190..34dd7e75e7 100644 --- a/mingw-w64-python-six/PKGBUILD +++ b/mingw-w64-python-six/PKGBUILD @@ -1,52 +1,51 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=six +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=1.8.0 +pkgver=1.10.0 pkgrel=1 pkgdesc="Python 2 and 3 compatibility utilities (mingw-w64)" arch=('any') url="http://pypi.python.org/pypi/six/" license=('MIT') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python3" -) -source=(http://pypi.python.org/packages/source/s/six/six-$pkgver.tar.gz) -md5sums=('1626eb24cc889110c38f7e786ec69885') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") +source=(http://pypi.python.org/packages/source/s/six/six-${pkgver}.tar.gz) +md5sums=('34eed507548117b2ab523ab14b2f8b55') prepare() { cd "${srcdir}" - cp -r six-$pkgver python2-six-$pkgver - cp -r six-$pkgver python3-six-$pkgver + cp -r six-$pkgver python2-six-${pkgver} + cp -r six-$pkgver python3-six-${pkgver} } check() { - cd $srcdir/python2-six-$pkgver + cd ${srcdir}/python2-six-${pkgver} ${MINGW_PREFIX}/bin/python2 setup.py check - cd $srcdir/python3-six-$pkgver + cd ${srcdir}/python3-six-${pkgver} ${MINGW_PREFIX}/bin/python3 setup.py check } package_python3-six() { depends=("${MINGW_PACKAGE_PREFIX}-python3") - cd $srcdir/python3-six-$pkgver + cd ${srcdir}/python3-six-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ --root "${pkgdir}" --optimize=1 - + install -Dm644 "${srcdir}/six-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" } - + package_python2-six() { depends=("${MINGW_PACKAGE_PREFIX}-python2") - cd $srcdir/python2-six-$pkgver + cd ${srcdir}/python2-six-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ --root "${pkgdir}" --optimize=1 - + install -Dm644 "${srcdir}/six-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" } diff --git a/mingw-w64-python-snowballstemmer/PKGBUILD b/mingw-w64-python-snowballstemmer/PKGBUILD new file mode 100644 index 0000000000..bea2152ff2 --- /dev/null +++ b/mingw-w64-python-snowballstemmer/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Alexey Pavlov + +_realname=snowballstemmer +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.2.0 +pkgrel=2 +pkgdesc="Snowball stemming library collection for Python (mingw-w64)" +arch=('any') +license=('BSD') +url='https://github.com/shibukawa/snowball_py' +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +options=('staticlibs') +source=("https://pypi.python.org/packages/source/s/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('51f2ef829db8129dd0f2354f0b209970') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} python2-build + cp -r ${_realname}-${pkgver} python3-build +} + +build() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build + popd + done +} + +check() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} py.test + popd + done +} + +package_python2-snowballstemmer() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd "${srcdir}/python2-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.rst" +} + +package_python3-snowballstemmer() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd "${srcdir}/python3-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.rst" +} + +package_mingw-w64-i686-python2-snowballstemmer() { + package_python2-snowballstemmer +} + +package_mingw-w64-i686-python3-snowballstemmer() { + package_python3-snowballstemmer +} + +package_mingw-w64-x86_64-python2-snowballstemmer() { + package_python2-snowballstemmer +} + +package_mingw-w64-x86_64-python3-snowballstemmer() { + package_python3-snowballstemmer +} diff --git a/mingw-w64-python-sphinx-alabaster-theme/PKGBUILD b/mingw-w64-python-sphinx-alabaster-theme/PKGBUILD new file mode 100644 index 0000000000..f3534c12e6 --- /dev/null +++ b/mingw-w64-python-sphinx-alabaster-theme/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Alexey Pavlov + +_realname=sphinx-alabaster-theme +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.7.6 +pkgrel=1 +pkgdesc="Modified Kr Sphinx doc theme (mingw-w64)" +arch=('any') +license=('BSD') +url='https://github.com/bitprophet/alabaster' +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +options=('staticlibs') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/bitprophet/alabaster/archive/${pkgver}.tar.gz") +md5sums=('940d47184c4d67d9e1943ba2e5b15a65') + +prepare() { + cd ${srcdir} + cp -r alabaster-${pkgver} python2-build + cp -r alabaster-${pkgver} python3-build +} + +build() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build + popd + done +} + +check() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} py.test + popd + done +} + +package_python2-sphinx-alabaster-theme() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd "${srcdir}/python2-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_python3-sphinx-alabaster-theme() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd "${srcdir}/python3-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-sphinx-alabaster-theme() { + package_python2-sphinx-alabaster-theme +} + +package_mingw-w64-i686-python3-sphinx-alabaster-theme() { + package_python3-sphinx-alabaster-theme +} + +package_mingw-w64-x86_64-python2-sphinx-alabaster-theme() { + package_python2-sphinx-alabaster-theme +} + +package_mingw-w64-x86_64-python3-sphinx-alabaster-theme() { + package_python3-sphinx-alabaster-theme +} diff --git a/mingw-w64-python-sphinx/PKGBUILD b/mingw-w64-python-sphinx/PKGBUILD index f716b5b1f7..d463fbd904 100644 --- a/mingw-w64-python-sphinx/PKGBUILD +++ b/mingw-w64-python-sphinx/PKGBUILD @@ -2,30 +2,46 @@ # Contributor: Ray Donnelly _realname=sphinx +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.2.3 -pkgrel=2 +pkgver=1.3.1 +pkgrel=4 pkgdesc="A discovery-based unittest extension (mingw-w64)" arch=('any') license=('LGPL-2.1') url="http://sphinx.pocoo.org/" makedepends=( - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-colorama" "${MINGW_PACKAGE_PREFIX}-python3-docutils" "${MINGW_PACKAGE_PREFIX}-python3-jinja" "${MINGW_PACKAGE_PREFIX}-python3-pygments" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-six" + + "${MINGW_PACKAGE_PREFIX}-python2-colorama" "${MINGW_PACKAGE_PREFIX}-python2-docutils" "${MINGW_PACKAGE_PREFIX}-python2-jinja" "${MINGW_PACKAGE_PREFIX}-python2-pygments" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-six" ) checkdepends=( "${MINGW_PACKAGE_PREFIX}-python3-nose" "${MINGW_PACKAGE_PREFIX}-python2-nose" + "${MINGW_PACKAGE_PREFIX}-python3-snowballstemmer" + "${MINGW_PACKAGE_PREFIX}-python2-snowballstemmer" + "${MINGW_PACKAGE_PREFIX}-python3-babel" + "${MINGW_PACKAGE_PREFIX}-python2-babel" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx-alabaster-theme" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx-alabaster-theme" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx_rtd_theme" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx_rtd_theme" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-mock" #'texlive-latexextra' ) -source=("http://pypi.python.org/packages/source/S/Sphinx/Sphinx-$pkgver.tar.gz") -md5sums=('a98c93124035b4cd7183604aec656cb3') +source=("http://pypi.python.org/packages/source/S/Sphinx/Sphinx-${pkgver}.tar.gz") +md5sums=('8786a194acf9673464c5455b11fd4332') prepare() { # souce duplication is required because makefile modify source code @@ -41,9 +57,9 @@ prepare() { } build() { - cd "$srcdir" + cd "${srcdir}" for builddir in python{2,3}-build; do - pushd $builddir + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build popd done @@ -51,16 +67,22 @@ build() { package_python3-sphinx() { pkgdesc='Python3 documentation generator' - depends=("${MINGW_PACKAGE_PREFIX}-python3-jinja" "${MINGW_PACKAGE_PREFIX}-python3-pygments" "${MINGW_PACKAGE_PREFIX}-python3-docutils") + depends=("${MINGW_PACKAGE_PREFIX}-python3-babel" + "${MINGW_PACKAGE_PREFIX}-python3-colorama" + "${MINGW_PACKAGE_PREFIX}-python3-docutils" + "${MINGW_PACKAGE_PREFIX}-python3-jinja" + "${MINGW_PACKAGE_PREFIX}-python3-pygments" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx_rtd_theme" + "${MINGW_PACKAGE_PREFIX}-python3-snowballstemmer" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx-alabaster-theme" + "${MINGW_PACKAGE_PREFIX}-python3-six") #optdepends=("${MINGW_PACKAGE_PREFIX}-texlive-latexextra": for generation of PDF documentation') - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - cd "$srcdir/python3-build" + cd "${srcdir}/python3-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 #rm -f ${pkgdir}${MINGW_PREFIX}/bin/sphinx{.exe,-script.py,.exe.manifest} # fix python command in files @@ -68,19 +90,25 @@ package_python3-sphinx() { sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f} done } - + package_python2-sphinx() { pkgdesc='Python2 documentation generator' - depends=("${MINGW_PACKAGE_PREFIX}-python2-jinja" "${MINGW_PACKAGE_PREFIX}-python2-pygments" "${MINGW_PACKAGE_PREFIX}-python2-docutils") + depends=("${MINGW_PACKAGE_PREFIX}-python2-babel" + "${MINGW_PACKAGE_PREFIX}-python2-colorama" + "${MINGW_PACKAGE_PREFIX}-python2-docutils" + "${MINGW_PACKAGE_PREFIX}-python2-jinja" + "${MINGW_PACKAGE_PREFIX}-python2-pygments" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx_rtd_theme" + "${MINGW_PACKAGE_PREFIX}-python2-snowballstemmer" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx-alabaster-theme" + "${MINGW_PACKAGE_PREFIX}-python2-six") #optdepends=("${MINGW_PACKAGE_PREFIX}-texlive-latexextra": for generation of PDF documentation') - pushd ${MINGW_PREFIX} > /dev/null - local _mingw_prefix=`pwd -W` - popd > /dev/null + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - cd "$srcdir/python2-build" + cd "${srcdir}/python2-build" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="$pkgdir" -O1 + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do diff --git a/mingw-w64-python-sphinx_rtd_theme/PKGBUILD b/mingw-w64-python-sphinx_rtd_theme/PKGBUILD new file mode 100644 index 0000000000..67b61d68f1 --- /dev/null +++ b/mingw-w64-python-sphinx_rtd_theme/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Alexey Pavlov + +_realname=sphinx_rtd_theme +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.1.9 +pkgrel=1 +pkgdesc="Python Sphinx Read The Docs Theme (mingw-w64)" +arch=('any') +license=('MIT') +url='https://github.com/snide/sphinx_rtd_theme' +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +options=('staticlibs') +source=("https://pypi.python.org/packages/source/s/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('86a25c8d47147c872e42dc84cc66f97b') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} python2-build + cp -r ${_realname}-${pkgver} python3-build +} + +build() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} setup.py build + popd + done +} + +check() { + cd "${srcdir}" + for builddir in python{2,3}-build; do + pushd ${builddir} + ${MINGW_PREFIX}/bin/${builddir%-build} py.test + popd + done +} + +package_python2-sphinx_rtd_theme() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd "${srcdir}/python2-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING" +} + +package_python3-sphinx_rtd_theme() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + cd "${srcdir}/python3-build" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" +} + +package_mingw-w64-i686-python2-sphinx_rtd_theme() { + package_python2-sphinx_rtd_theme +} + +package_mingw-w64-i686-python3-sphinx_rtd_theme() { + package_python3-sphinx_rtd_theme +} + +package_mingw-w64-x86_64-python2-sphinx_rtd_theme() { + package_python2-sphinx_rtd_theme +} + +package_mingw-w64-x86_64-python3-sphinx_rtd_theme() { + package_python3-sphinx_rtd_theme +} diff --git a/mingw-w64-python-statsmodels/PKGBUILD b/mingw-w64-python-statsmodels/PKGBUILD index eed455aa15..6deef53f1d 100644 --- a/mingw-w64-python-statsmodels/PKGBUILD +++ b/mingw-w64-python-statsmodels/PKGBUILD @@ -1,35 +1,36 @@ # Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com > _realname=statsmodels +pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname") -pkgver=0.5.0 -pkgrel=1 -pkgdesc="Statistical computations and models for use with SciPy. (mingw-w64)" +pkgver=0.6.1 +pkgrel=2 +pkgdesc="Statistical computations and models for use with SciPy (mingw-w64)" arch=('any') url="http://statsmodels.sourceforge.net/" license=('BSD') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-python2-scipy" - "${MINGW_PACKAGE_PREFIX}-python3-scipy" - "${MINGW_PACKAGE_PREFIX}-python2-pandas" - "${MINGW_PACKAGE_PREFIX}-python3-pandas" - "${MINGW_PACKAGE_PREFIX}-python2-patsy" - "${MINGW_PACKAGE_PREFIX}-python3-patsy" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-cython" - "${MINGW_PACKAGE_PREFIX}-cython2" - "${MINGW_PACKAGE_PREFIX}-gcc" -) +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-scipy" + "${MINGW_PACKAGE_PREFIX}-python3-scipy" + "${MINGW_PACKAGE_PREFIX}-python2-pandas" + "${MINGW_PACKAGE_PREFIX}-python3-pandas" + "${MINGW_PACKAGE_PREFIX}-python2-patsy" + "${MINGW_PACKAGE_PREFIX}-python3-patsy" + "${MINGW_PACKAGE_PREFIX}-cython" + "${MINGW_PACKAGE_PREFIX}-cython2" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-cython" + "${MINGW_PACKAGE_PREFIX}-cython2" + "${MINGW_PACKAGE_PREFIX}-gcc") source=("https://pypi.python.org/packages/source/s/statsmodels/statsmodels-${pkgver}.tar.gz") -md5sums=('c65454d97f869ac0e5bb3a2757ec6bd5') +md5sums=('f7580ebf7d2a2c9b87abfad190dcb9a3') prepare() { - cp -a $_realname-$pkgver $_realname-py2-$pkgver - cp -a $_realname-$pkgver $_realname-py3-$pkgver - - cd $_realname-py2-$pkgver + cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver} + cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver} + + cd ${_realname}-py2-${pkgver} sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ @@ -38,61 +39,53 @@ prepare() { build() { # build for python2 - cd ${srcdir}/$_realname-py2-$pkgver - + cd ${srcdir}/${_realname}-py2-${pkgver} + # regenerate Cython files - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py clean - + #MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + #${MINGW_PREFIX}/bin/python2 setup.py clean + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py build - + # build for python3 - cd ${srcdir}/$_realname-py3-$pkgver - + cd ${srcdir}/${_realname}-py3-${pkgver} + # regenerate Cython files - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py clean - + #MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + #${MINGW_PREFIX}/bin/python3 setup.py clean + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py build } package_python2-statsmodels() { - depends=( - "${MINGW_PACKAGE_PREFIX}-python2-scipy" - "${MINGW_PACKAGE_PREFIX}-python2-pandas" - "${MINGW_PACKAGE_PREFIX}-python2-patsy" - ) - optdepends=( - "${MINGW_PACKAGE_PREFIX}-python2-nose: needed for integrated test suite" - "${MINGW_PACKAGE_PREFIX}-python2-matplotlib: needed for plotting functions" - ) - - cd $_realname-py2-$pkgver + depends=("${MINGW_PACKAGE_PREFIX}-python2-scipy" + "${MINGW_PACKAGE_PREFIX}-python2-pandas" + "${MINGW_PACKAGE_PREFIX}-python2-patsy") + optdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose: needed for integrated test suite" + "${MINGW_PACKAGE_PREFIX}-python2-matplotlib: needed for plotting functions") + + cd ${_realname}-py2-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --skip-build \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 LICENSE.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt" } package_python3-statsmodels() { - depends=( - "${MINGW_PACKAGE_PREFIX}-python3-scipy" - "${MINGW_PACKAGE_PREFIX}-python3-pandas" - "${MINGW_PACKAGE_PREFIX}-python3-patsy" - ) - optdepends=( - "${MINGW_PACKAGE_PREFIX}-python3-nose: needed for integrated test suite" - "${MINGW_PACKAGE_PREFIX}-python3-matplotlib: needed for plotting functions" - ) - - cd $_realname-py3-$pkgver + depends=("${MINGW_PACKAGE_PREFIX}-python3-scipy" + "${MINGW_PACKAGE_PREFIX}-python3-pandas" + "${MINGW_PACKAGE_PREFIX}-python3-patsy") + optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: needed for integrated test suite" + "${MINGW_PACKAGE_PREFIX}-python3-matplotlib: needed for plotting functions") + + cd ${_realname}-py3-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --skip-build \ - --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 + --prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 install -Dm644 LICENSE.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt" diff --git a/mingw-w64-python-zope.event/PKGBUILD b/mingw-w64-python-zope.event/PKGBUILD new file mode 100644 index 0000000000..c06f992647 --- /dev/null +++ b/mingw-w64-python-zope.event/PKGBUILD @@ -0,0 +1,57 @@ +# Contributor: Frederic Wang + +_realname=zope.event +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.1.0 +pkgrel=1 +pkgdesc='Very basic event publishing system (mingw-w64)' +url='http://pypi.python.org/pypi/zope.event' +license=('ZPL 2.1') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +source=("https://pypi.python.org/packages/source/z/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('82abb495b6eb2ad196a1a94948674ec0') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-zope.event() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-zope.event() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-zope.event() { + package_python2-zope.event +} + +package_mingw-w64-i686-python3-zope.event() { + package_python3-zope.event +} + +package_mingw-w64-x86_64-python2-zope.event() { + package_python2-zope.event +} + +package_mingw-w64-x86_64-python3-zope.event() { + package_python3-zope.event +} diff --git a/mingw-w64-python-zope.interface/PKGBUILD b/mingw-w64-python-zope.interface/PKGBUILD new file mode 100644 index 0000000000..c2a3c466a8 --- /dev/null +++ b/mingw-w64-python-zope.interface/PKGBUILD @@ -0,0 +1,57 @@ +# Contributor: Frederic Wang + +_realname=zope.interface +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.1.3 +pkgrel=1 +pkgdesc='Interfaces for Python (mingw-w64)' +url=' https://github.com/zopefoundation/zope.interface' +license=('ZPL 2.1') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools") +source=("https://pypi.python.org/packages/source/z/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('9ae3d24c0c7415deb249dd1a132f0f79') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 + cp -r ${_realname}-${pkgver} build-python3 +} + +package_python3-zope.interface() { + cd ${srcdir}/build-python3 + ${MINGW_PREFIX}/bin/python3 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-zope.interface() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-zope.interface() { + package_python2-zope.interface +} + +package_mingw-w64-i686-python3-zope.interface() { + package_python3-zope.interface +} + +package_mingw-w64-x86_64-python2-zope.interface() { + package_python2-zope.interface +} + +package_mingw-w64-x86_64-python3-zope.interface() { + package_python3-zope.interface +} diff --git a/mingw-w64-python2-beautifulsoup3/PKGBUILD b/mingw-w64-python2-beautifulsoup3/PKGBUILD index a961cfb6d1..ced98117bc 100644 --- a/mingw-w64-python2-beautifulsoup3/PKGBUILD +++ b/mingw-w64-python2-beautifulsoup3/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=beautifulsoup3 - pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}") pkgver=3.2.1 -pkgrel=1 +pkgrel=2 pkgdesc="A Python HTML/XML parser designed for quick turnaround projects like screen-scraping (mingw-w64)" arch=('any') license=('PSF') @@ -12,7 +11,7 @@ url="http://www.crummy.com/software/BeautifulSoup/index.html" depends=("${MINGW_PACKAGE_PREFIX}-python2") source=(http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-${pkgver}.tar.gz) sha1sums=('b23e78f058240eb8779dbc1b8a8d76bba4916df1') - + prepare() { cd "${srcdir}/BeautifulSoup-${pkgver}" } diff --git a/mingw-w64-python2-cairo/PKGBUILD b/mingw-w64-python2-cairo/PKGBUILD index 69f9036700..ca07bcbe9a 100644 --- a/mingw-w64-python2-cairo/PKGBUILD +++ b/mingw-w64-python2-cairo/PKGBUILD @@ -1,17 +1,16 @@ # Maintainer: Alexey Pavlov _realname=python2-cairo - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.10.0 -pkgrel=1 +pkgrel=2 pkgdesc="Python2 bindings for the cairo graphics library (mingw-w64)" url="http://www.cairographics.org/pycairo" arch=('any') license=('LGPL' 'MPL') depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-cairo") source=(http://cairographics.org/releases/py2cairo-${pkgver}.tar.bz2 - waflib.patch) + waflib.patch) md5sums=('20337132c4ab06c1146ad384d55372c5' 'dfbfb1d1901a311c2d2ca8e8ea1be592') @@ -24,12 +23,8 @@ build() { rm -f waflib/*.pyc popd - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - export PYTHON=${MINGW_PREFIX}/bin/python2 - CFLAGS+=" -I${MINGW_PREFIX}/include/python2.7" + CFLAGS+=" -I${MINGW_PREFIX}/include/python2.7 -I${MINGW_PREFIX}/include/cairo" /usr/bin/python2 ./waf --help /usr/bin/python2 ./waf configure --prefix=${MINGW_PREFIX} /usr/bin/python2 ./waf build @@ -39,7 +34,7 @@ package() { cd "${srcdir}/py2cairo-${pkgver}" export PYTHON=${MINGW_PREFIX}/bin/python2 /usr/bin/python2 ./waf install --destdir="${pkgdir}" - + rm -rf ${pkgdir}${MINGW_PREFIX}/lib mv ${pkgdir}${MINGW_PREFIX}/bin ${pkgdir}${MINGW_PREFIX}/lib } diff --git a/mingw-w64-python2-cjson/PKGBUILD b/mingw-w64-python2-cjson/PKGBUILD index de7fa18e1c..2052f25403 100644 --- a/mingw-w64-python2-cjson/PKGBUILD +++ b/mingw-w64-python2-cjson/PKGBUILD @@ -1,32 +1,30 @@ # Maintainer: Alexey Pavlov _realname=python2-cjson - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="Fast JSON encoder/decoder for Python (mingw-w64)" arch=('any') license=('LGPL') url="http://pypi.python.org/pypi/python-cjson/" depends=("${MINGW_PACKAGE_PREFIX}-python2") -source=("http://pypi.python.org/packages/source/p/python-cjson/python-cjson-$pkgver.tar.gz") +source=("http://pypi.python.org/packages/source/p/python-cjson/python-cjson-${pkgver}.tar.gz") md5sums=('adb28f42c72ef573dfbd4cdf09676ace') - + prepare() { - cd "${srcdir}"/python-cjson-$pkgver + cd "${srcdir}"/python-cjson-${pkgver} } build() { - cd "${srcdir}"/python-cjson-$pkgver + cd "${srcdir}"/python-cjson-${pkgver} # Fix python2 shebang sed -i 's|#!/usr/bin/python|#!/usr/bin/env python2|' jsontest.py ${MINGW_PREFIX}/bin/python2 setup.py build } package() { - - cd "${srcdir}"/python-cjson-$pkgver + cd "${srcdir}"/python-cjson-${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-purelib=;--install-data=" \ ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" diff --git a/mingw-w64-python2-enum34/PKGBUILD b/mingw-w64-python2-enum34/PKGBUILD new file mode 100644 index 0000000000..6fd7913127 --- /dev/null +++ b/mingw-w64-python2-enum34/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Frederic Wang + +_realname=enum34 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}") +pkgver=1.0.4 +pkgrel=1 +pkgdesc='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4 (mingw-w64)' +arch=('any') +url='https://pypi.python.org/pypi/enum34' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2") +source=("https://pypi.python.org/packages/source/e/${_realname}/${_realname}-${pkgver}.tar.gz") +sha256sums=('d3c19f26a6a34629c18c775f59dfc5dd595764c722b57a2da56ebfb69b94e447') + +prepare() { + cd "${srcdir}" + cp -r ${_realname}-${pkgver} python2-build +} + +package_python2-enum34() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + cd ${srcdir}/python2-build + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + install -Dm644 enum/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-enum34() { + package_python2-enum34 +} + +package_mingw-w64-x86_64-python2-enum34() { + package_python2-enum34 +} diff --git a/mingw-w64-python2-ipaddress/PKGBUILD b/mingw-w64-python2-ipaddress/PKGBUILD new file mode 100644 index 0000000000..2b0e6bfae2 --- /dev/null +++ b/mingw-w64-python2-ipaddress/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Frederic Wang + +_realname=ipaddress +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}") +pkgver=1.0.15 +pkgrel=1 +pkgdesc='Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2 (mingw-w64)' +url='https://github.com/phihag/ipaddress' +license=('Python Software Foundation License') +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2") +source=("https://pypi.python.org/packages/source/i/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('12915e923b738107e47827478d553ba1') + +prepare() { + cd ${srcdir} + cp -r ${_realname}-${pkgver} build-python2 +} + +build() { + cd ${srcdir}/build-python2 + ${MINGW_PREFIX}/bin/python2 setup.py build +} + +package() { + cd ${srcdir}/build-python2 + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" +} diff --git a/mingw-w64-python2-pygtk/python27.patch b/mingw-w64-python2-pygtk/001-python27.patch similarity index 100% rename from mingw-w64-python2-pygtk/python27.patch rename to mingw-w64-python2-pygtk/001-python27.patch diff --git a/mingw-w64-python2-pygtk/no-undefined.patch b/mingw-w64-python2-pygtk/002-no-undefined.patch similarity index 100% rename from mingw-w64-python2-pygtk/no-undefined.patch rename to mingw-w64-python2-pygtk/002-no-undefined.patch diff --git a/mingw-w64-python2-pygtk/python-m4.patch b/mingw-w64-python2-pygtk/003-python-m4.patch similarity index 100% rename from mingw-w64-python2-pygtk/python-m4.patch rename to mingw-w64-python2-pygtk/003-python-m4.patch diff --git a/mingw-w64-python2-pygtk/004-pygtk-demo.patch b/mingw-w64-python2-pygtk/004-pygtk-demo.patch new file mode 100644 index 0000000000..3ba922392d --- /dev/null +++ b/mingw-w64-python2-pygtk/004-pygtk-demo.patch @@ -0,0 +1,10 @@ +--- pygtk-2.24.0/examples/pygtk-demo/pygtk-demo.in.orig 2015-01-15 23:10:33.264600000 +0300 ++++ pygtk-2.24.0/examples/pygtk-demo/pygtk-demo.in 2015-01-15 23:10:56.383800000 +0300 +@@ -2,6 +2,6 @@ + + import sys + import os.path +-pygtklibdir = os.path.join("@libdir@", "pygtk", "2.0") ++pygtklibdir = os.path.join(sys.prefix, 'lib', "pygtk", "2.0") + sys.path.insert(0, pygtklibdir) + execfile(os.path.join(pygtklibdir, "pygtk-demo.py")) diff --git a/mingw-w64-python2-pygtk/PKGBUILD b/mingw-w64-python2-pygtk/PKGBUILD index 5f93d96b61..c090c03713 100644 --- a/mingw-w64-python2-pygtk/PKGBUILD +++ b/mingw-w64-python2-pygtk/PKGBUILD @@ -1,57 +1,59 @@ # Maintainer: Alexey Pavlov _realname=pygtk - -pkgname="${MINGW_PACKAGE_PREFIX}-python2-pygtk" +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}" pkgver=2.24.0 -pkgrel=2 +pkgrel=5 pkgdesc="Python bindings for the GTK widget set (mingw-w64)" -arch=(any) +arch=('any') url="http://www.pygtk.org" license=('LGPL') -groups=("${MINGW_PACKAGE_PREFIX}") depends=("${MINGW_PACKAGE_PREFIX}-python2-cairo" - "${MINGW_PACKAGE_PREFIX}-python2-gobject2" - "${MINGW_PACKAGE_PREFIX}-libglade") + "${MINGW_PACKAGE_PREFIX}-python2-gobject2" + "${MINGW_PACKAGE_PREFIX}-libglade") makedepends=("${MINGW_PACKAGE_PREFIX}-python2-numpy") options=('staticlibs' 'strip') source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.bz2 - python27.patch - no-undefined.patch - python-m4.patch) + 001-python27.patch + 002-no-undefined.patch + 003-python-m4.patch + 004-pygtk-demo.patch) md5sums=('a1051d5794fd7696d3c1af6422d17a49' '12acfacd26f19c504a0a2d0edeb66121' 'edd96a4d9f4b7a1b05094a78f9cc811b' - '2f1b6f04e36474e58abb259e22cc8309') + '2f1b6f04e36474e58abb259e22cc8309' + '0bc4e06ae97f52403b366592a5881316') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/python27.patch - patch -p1 -i ${srcdir}/no-undefined.patch - patch -p1 -i ${srcdir}/python-m4.patch + patch -p1 -i ${srcdir}/001-python27.patch + patch -p1 -i ${srcdir}/002-no-undefined.patch + patch -p1 -i ${srcdir}/003-python-m4.patch + patch -p1 -i ${srcdir}/004-pygtk-demo.patch + autoreconf -fi -I m4 #WANT_AUTOMAKE=latest ./autogen.sh } build() { - cd "$srcdir" - rm -rf python2-build mkdir python2-build - #cp -r ${_realname}-$pkgver $builddir - pushd python2-build + #cp -r ${_realname}-${pkgver} ${builddir} + pushd python2-build > /dev/null PYTHON=${MINGW_PREFIX}/bin/python2 \ - ../${_realname}-$pkgver/configure --prefix=${MINGW_PREFIX} \ + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} make VERBOSE=1 - popd + popd > /dev/null } package() { cd python2-build - make DESTDIR="$pkgdir" install - install -m644 ${srcdir}/${_realname}-$pkgver/gtk/gtk-extrafuncs.defs "${pkgdir}${MINGW_PREFIX}/share/pygtk/2.0/defs/" + make DESTDIR="${pkgdir}" install + install -m644 ${srcdir}/${_realname}-${pkgver}/gtk/gtk-extrafuncs.defs "${pkgdir}${MINGW_PREFIX}/share/pygtk/2.0/defs/" sed -i -e 's#env python$#env python2#' "${pkgdir}${MINGW_PREFIX}"/lib/pygtk/2.0/{,demos/}*.py } diff --git a/mingw-w64-python2/0000-make-_sysconfigdata.py-relocatable.patch b/mingw-w64-python2/0000-make-_sysconfigdata.py-relocatable.patch index f7d4c752a8..22b89cb2bc 100644 --- a/mingw-w64-python2/0000-make-_sysconfigdata.py-relocatable.patch +++ b/mingw-w64-python2/0000-make-_sysconfigdata.py-relocatable.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-06-30 03:05:31.000000000 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 22:39:33.953224000 +0100 +diff -Naur Python-2.7.9-orig/Lib/sysconfig.py Python-2.7.9/Lib/sysconfig.py +--- Python-2.7.9-orig/Lib/sysconfig.py 2014-12-10 18:59:40.000000000 +0300 ++++ Python-2.7.9/Lib/sysconfig.py 2014-12-11 13:49:27.926600000 +0300 @@ -231,6 +231,7 @@ done[n] = v @@ -9,7 +9,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py while notdone: for name in notdone.keys(): value = notdone[name] -@@ -342,6 +343,19 @@ +@@ -346,6 +347,19 @@ f.write('build_time_vars = ') pprint.pprint(vars, stream=f) diff --git a/mingw-w64-python2/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch b/mingw-w64-python2/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch new file mode 100644 index 0000000000..e528c9f8d4 --- /dev/null +++ b/mingw-w64-python2/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch @@ -0,0 +1,221 @@ +diff -urN Python-2.7.10.orig/Lib/distutils/spawn.py Python-2.7.10/Lib/distutils/spawn.py +--- Python-2.7.10.orig/Lib/distutils/spawn.py 2016-01-02 00:59:12.580711100 +0000 ++++ Python-2.7.10/Lib/distutils/spawn.py 2016-01-02 01:45:53.195782000 +0000 +@@ -14,6 +14,7 @@ + from distutils.errors import DistutilsPlatformError, DistutilsExecError + from distutils.debug import DEBUG + from distutils import log ++from list2cmdline import list2cmdline + + def spawn(cmd, search_path=1, verbose=0, dry_run=0): + """Run another program, specified as a command list 'cmd', in a new process. +@@ -47,17 +48,13 @@ + def _nt_quote_args(args): + """Quote command-line arguments for DOS/Windows conventions. + +- Just wraps every argument which contains blanks in double quotes, and +- returns a new argument list. ++ Defer to list2cmdline as the logic is complex. ++ The previous implementation here failed to handle ++ -DG_LOG_DOMAIN="GEGL-"__FILE__ which was encountered in MSYS2 ++ while building the gobject-introspection part of GEGL 0.3.4. + """ +- # XXX this doesn't seem very robust to me -- but if the Windows guys +- # say it'll work, I guess I'll have to accept it. (What if an arg +- # contains quotes? What other magic characters, other than spaces, +- # have to be escaped? Is there an escaping mechanism other than +- # quoting?) + for i, arg in enumerate(args): +- if ' ' in arg: +- args[i] = '"%s"' % arg ++ args[i] = list2cmdline([args[i]]) + return args + + def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): +diff -urN Python-2.7.10.orig/Lib/list2cmdline.py Python-2.7.10/Lib/list2cmdline.py +--- Python-2.7.10.orig/Lib/list2cmdline.py 1970-01-01 01:00:00.000000000 +0100 ++++ Python-2.7.10/Lib/list2cmdline.py 2016-01-02 01:15:25.244121800 +0000 +@@ -0,0 +1,79 @@ ++# list2cmdline - Utility to escape nt commandline arguments ++# ++# Copyright (c) 2003-2005 by Peter Astrand ++# ++# Licensed to PSF under a Contributor Agreement. ++# See http://www.python.org/2.4/license for licensing details. ++ ++def list2cmdline(seq): ++ """ ++ Translate a sequence of arguments into a command line ++ string, using the same rules as the MS C runtime: ++ ++ 1) Arguments are delimited by white space, which is either a ++ space or a tab. ++ ++ 2) A string surrounded by double quotation marks is ++ interpreted as a single argument, regardless of white space ++ contained within. A quoted string can be embedded in an ++ argument. ++ ++ 3) A double quotation mark preceded by a backslash is ++ interpreted as a literal double quotation mark. ++ ++ 4) Backslashes are interpreted literally, unless they ++ immediately precede a double quotation mark. ++ ++ 5) If backslashes immediately precede a double quotation mark, ++ every pair of backslashes is interpreted as a literal ++ backslash. If the number of backslashes is odd, the last ++ backslash escapes the next double quotation mark as ++ described in rule 3. ++ ++ Extracted from subprocess.py so that distutils spawn.py can ++ use it too. ++ """ ++ ++ # See ++ # http://msdn.microsoft.com/en-us/library/17w5ykft.aspx ++ # or search http://msdn.microsoft.com for ++ # "Parsing C++ Command-Line Arguments" ++ result = [] ++ needquote = False ++ for arg in seq: ++ bs_buf = [] ++ ++ # Add a space to separate this argument from the others ++ if result: ++ result.append(' ') ++ ++ needquote = (" " in arg) or ("\t" in arg) or not arg ++ if needquote: ++ result.append('"') ++ ++ for c in arg: ++ if c == '\\': ++ # Don't know if we need to double yet. ++ bs_buf.append(c) ++ elif c == '"': ++ # Double backslashes. ++ result.append('\\' * len(bs_buf)*2) ++ bs_buf = [] ++ result.append('\\"') ++ else: ++ # Normal char ++ if bs_buf: ++ result.extend(bs_buf) ++ bs_buf = [] ++ result.append(c) ++ ++ # Add remaining backslashes, if any. ++ if bs_buf: ++ result.extend(bs_buf) ++ ++ if needquote: ++ result.extend(bs_buf) ++ result.append('"') ++ ++ return ''.join(result) ++ +diff -urN Python-2.7.10.orig/Lib/subprocess.py Python-2.7.10/Lib/subprocess.py +--- Python-2.7.10.orig/Lib/subprocess.py 2016-01-02 00:59:10.775707300 +0000 ++++ Python-2.7.10/Lib/subprocess.py 2016-01-02 01:33:13.687423600 +0000 +@@ -395,6 +395,7 @@ + import gc + import signal + import errno ++from list2cmdline import list2cmdline + + # Exception classes used by this module. + class CalledProcessError(Exception): +@@ -574,76 +575,6 @@ + return output + + +-def list2cmdline(seq): +- """ +- Translate a sequence of arguments into a command line +- string, using the same rules as the MS C runtime: +- +- 1) Arguments are delimited by white space, which is either a +- space or a tab. +- +- 2) A string surrounded by double quotation marks is +- interpreted as a single argument, regardless of white space +- contained within. A quoted string can be embedded in an +- argument. +- +- 3) A double quotation mark preceded by a backslash is +- interpreted as a literal double quotation mark. +- +- 4) Backslashes are interpreted literally, unless they +- immediately precede a double quotation mark. +- +- 5) If backslashes immediately precede a double quotation mark, +- every pair of backslashes is interpreted as a literal +- backslash. If the number of backslashes is odd, the last +- backslash escapes the next double quotation mark as +- described in rule 3. +- """ +- +- # See +- # http://msdn.microsoft.com/en-us/library/17w5ykft.aspx +- # or search http://msdn.microsoft.com for +- # "Parsing C++ Command-Line Arguments" +- result = [] +- needquote = False +- for arg in seq: +- bs_buf = [] +- +- # Add a space to separate this argument from the others +- if result: +- result.append(' ') +- +- needquote = (" " in arg) or ("\t" in arg) or not arg +- if needquote: +- result.append('"') +- +- for c in arg: +- if c == '\\': +- # Don't know if we need to double yet. +- bs_buf.append(c) +- elif c == '"': +- # Double backslashes. +- result.append('\\' * len(bs_buf)*2) +- bs_buf = [] +- result.append('\\"') +- else: +- # Normal char +- if bs_buf: +- result.extend(bs_buf) +- bs_buf = [] +- result.append(c) +- +- # Add remaining backslashes, if any. +- if bs_buf: +- result.extend(bs_buf) +- +- if needquote: +- result.extend(bs_buf) +- result.append('"') +- +- return ''.join(result) +- +- + class Popen(object): + _child_created = False # Set here since __del__ checks it + +diff -urN Python-2.7.10.orig/setup.py Python-2.7.10/setup.py +--- Python-2.7.10.orig/setup.py 2016-01-02 00:59:17.405520700 +0000 ++++ Python-2.7.10/setup.py 2016-01-02 01:00:52.537873000 +0000 +@@ -1167,11 +1167,7 @@ + '_sqlite/statement.c', + '_sqlite/util.c', ] + +- sqlite_defines = [] +- if host_platform != "win32": +- sqlite_defines.append(('MODULE_NAME', '"sqlite3"')) +- else: +- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) ++ sqlite_defines = [('MODULE_NAME', '"sqlite3"')] + + # Comment this out if you want the sqlite3 module to be able to load extensions. + sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1")) diff --git a/mingw-w64-python2/0100-MINGW-BASE-use-NT-thread-model.patch b/mingw-w64-python2/0100-MINGW-BASE-use-NT-thread-model.patch index 6638c19d2b..7fa2b04e1e 100644 --- a/mingw-w64-python2/0100-MINGW-BASE-use-NT-thread-model.patch +++ b/mingw-w64-python2/0100-MINGW-BASE-use-NT-thread-model.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:39:35.459310100 +0100 -+++ b/configure.ac 2014-10-11 22:39:38.188466200 +0100 -@@ -1346,6 +1346,37 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-10 19:00:00.000000000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:29.658200000 +0300 +@@ -1349,6 +1349,37 @@ CFLAGS=$save_CFLAGS fi @@ -39,7 +39,7 @@ diff -urN a/configure.ac b/configure.ac # On some compilers, pthreads are available without further options # (e.g. MacOS X). On some of these systems, the compiler will not # complain if unaccepted options are passed (e.g. gcc on Mac OS X). -@@ -1373,6 +1404,7 @@ +@@ -1376,6 +1407,7 @@ ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no]) ]) AC_MSG_RESULT($ac_cv_pthread_is_default) @@ -47,7 +47,7 @@ diff -urN a/configure.ac b/configure.ac if test $ac_cv_pthread_is_default = yes -@@ -1464,6 +1496,9 @@ +@@ -1467,6 +1499,9 @@ AC_MSG_RESULT($ac_cv_pthread) fi @@ -57,7 +57,7 @@ diff -urN a/configure.ac b/configure.ac # If we have set a CC compiler flag for thread support then # check if it works for CXX, too. ac_cv_cxx_thread=no -@@ -1484,6 +1519,10 @@ +@@ -1487,6 +1522,10 @@ then CXX="$CXX -pthread" ac_cv_cxx_thread=yes @@ -68,7 +68,7 @@ diff -urN a/configure.ac b/configure.ac fi if test $ac_cv_cxx_thread = yes -@@ -1513,6 +1552,11 @@ +@@ -1516,6 +1555,11 @@ dnl AC_MSG_RESULT($cpp_type) # checks for header files @@ -80,7 +80,7 @@ diff -urN a/configure.ac b/configure.ac AC_HEADER_STDC AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ -@@ -1749,9 +1793,14 @@ +@@ -1752,9 +1796,14 @@ fi AC_MSG_CHECKING(for pthread_t) have_pthread_t=no @@ -95,7 +95,7 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_RESULT($have_pthread_t) if test "$have_pthread_t" = yes ; then AC_CHECK_SIZEOF(pthread_t, [], [ -@@ -2220,11 +2269,16 @@ +@@ -2223,11 +2272,16 @@ AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX # only check for sem_init if thread support is requested @@ -112,7 +112,7 @@ diff -urN a/configure.ac b/configure.ac # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, -@@ -2439,6 +2493,13 @@ +@@ -2442,6 +2496,13 @@ AC_DEFINE(WITH_THREAD) posix_threads=yes THREADOBJ="Python/thread.o" @@ -126,7 +126,7 @@ diff -urN a/configure.ac b/configure.ac else if test ! -z "$with_threads" -a -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" -@@ -2907,6 +2968,15 @@ +@@ -2910,6 +2971,15 @@ AC_MSG_RESULT(MACHDEP_OBJS) # checks for library functions @@ -142,7 +142,7 @@ diff -urN a/configure.ac b/configure.ac AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \ clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ -@@ -3809,6 +3879,10 @@ +@@ -3812,6 +3882,10 @@ # the kernel module that provides POSIX semaphores # isn't loaded by default, so an attempt to call # sem_open results in a 'Signal 12' error. @@ -153,7 +153,7 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING(whether POSIX semaphores are enabled) AC_CACHE_VAL(ac_cv_posix_semaphores_enabled, AC_RUN_IFELSE([AC_LANG_SOURCE([[ -@@ -3842,6 +3916,14 @@ +@@ -3845,6 +3919,14 @@ # Multiprocessing check for broken sem_getvalue AC_MSG_CHECKING(for broken sem_getvalue) @@ -168,9 +168,9 @@ diff -urN a/configure.ac b/configure.ac AC_CACHE_VAL(ac_cv_broken_sem_getvalue, AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 22:39:35.230297000 +0100 -+++ b/pyconfig.h.in 2014-10-11 22:39:38.189466300 +0100 +diff -Naur Python-2.7.9-orig/pyconfig.h.in Python-2.7.9/pyconfig.h.in +--- Python-2.7.9-orig/pyconfig.h.in 2014-12-10 19:00:01.000000000 +0300 ++++ Python-2.7.9/pyconfig.h.in 2014-12-11 13:49:29.658200000 +0300 @@ -936,6 +936,9 @@ /* Define if mvwdelch in curses.h is an expression. */ #undef MVWDELCH_IS_EXPRESSION diff --git a/mingw-w64-python2/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch b/mingw-w64-python2/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch index f42644aa87..6a6e2606ae 100644 --- a/mingw-w64-python2/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch +++ b/mingw-w64-python2/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/pyport.h b/Include/pyport.h ---- a/Include/pyport.h 2014-10-11 22:39:39.595546700 +0100 -+++ b/Include/pyport.h 2014-10-11 22:39:42.893735300 +0100 +diff -Naur Python-2.7.9-orig/Include/pyport.h Python-2.7.9/Include/pyport.h +--- Python-2.7.9-orig/Include/pyport.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/pyport.h 2014-12-11 13:49:31.233800000 +0300 @@ -13,6 +13,21 @@ #include #endif diff --git a/mingw-w64-python2/0120-MINGW-use-header-in-lowercase.patch b/mingw-w64-python2/0120-MINGW-use-header-in-lowercase.patch index 4a6184447f..876df46a99 100644 --- a/mingw-w64-python2/0120-MINGW-use-header-in-lowercase.patch +++ b/mingw-w64-python2/0120-MINGW-use-header-in-lowercase.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/signalmodule.c b/Modules/signalmodule.c ---- a/Modules/signalmodule.c 2014-10-11 22:39:45.310873600 +0100 -+++ b/Modules/signalmodule.c 2014-10-11 22:39:47.451996000 +0100 +diff -Naur Python-2.7.9-orig/Modules/signalmodule.c Python-2.7.9/Modules/signalmodule.c +--- Python-2.7.9-orig/Modules/signalmodule.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/signalmodule.c 2014-12-11 13:49:33.839000000 +0300 @@ -7,7 +7,7 @@ #include "intrcheck.h" @@ -10,9 +10,9 @@ diff -urN a/Modules/signalmodule.c b/Modules/signalmodule.c #ifdef HAVE_PROCESS_H #include #endif -diff -urN a/Modules/socketmodule.h b/Modules/socketmodule.h ---- a/Modules/socketmodule.h 2014-10-11 22:39:45.309873500 +0100 -+++ b/Modules/socketmodule.h 2014-10-11 22:39:47.452996100 +0100 +diff -Naur Python-2.7.9-orig/Modules/socketmodule.h Python-2.7.9/Modules/socketmodule.h +--- Python-2.7.9-orig/Modules/socketmodule.h 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/socketmodule.h 2014-12-11 13:49:33.854600000 +0300 @@ -21,7 +21,7 @@ * I use SIO_GET_MULTICAST_FILTER to detect a decent SDK. */ diff --git a/mingw-w64-python2/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch b/mingw-w64-python2/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch index 005ab7fa92..467e1f33cd 100644 --- a/mingw-w64-python2/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch +++ b/mingw-w64-python2/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:39:48.990084000 +0100 -+++ b/configure.ac 2014-10-11 22:39:52.780300800 +0100 -@@ -319,6 +319,9 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:31.124600000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:35.383400000 +0300 +@@ -322,6 +322,9 @@ *-*-cygwin*) ac_sys_system=Cygwin ;; @@ -11,7 +11,7 @@ diff -urN a/configure.ac b/configure.ac *) # for now, limit cross builds to known configurations MACHDEP="unknown" -@@ -346,6 +349,7 @@ +@@ -349,6 +352,7 @@ darwin*) MACHDEP="darwin";; atheos*) MACHDEP="atheos";; irix646) MACHDEP="irix6";; @@ -19,7 +19,7 @@ diff -urN a/configure.ac b/configure.ac '') MACHDEP="unknown";; esac fi -@@ -365,12 +369,23 @@ +@@ -368,12 +372,23 @@ *-*-cygwin*) _host_cpu= ;; @@ -43,9 +43,9 @@ diff -urN a/configure.ac b/configure.ac fi # Some systems cannot stand _XOPEN_SOURCE being defined at all; they -diff -urN a/Python/getplatform.c b/Python/getplatform.c ---- a/Python/getplatform.c 2014-10-11 22:39:49.259099400 +0100 -+++ b/Python/getplatform.c 2014-10-11 22:39:52.782300900 +0100 +diff -Naur Python-2.7.9-orig/Python/getplatform.c Python-2.7.9/Python/getplatform.c +--- Python-2.7.9-orig/Python/getplatform.c 2014-12-10 18:59:59.000000000 +0300 ++++ Python-2.7.9/Python/getplatform.c 2014-12-11 13:49:35.383400000 +0300 @@ -1,6 +1,12 @@ #include "Python.h" diff --git a/mingw-w64-python2/0140-MINGW-preset-configure-defaults.patch b/mingw-w64-python2/0140-MINGW-preset-configure-defaults.patch index 94a0154749..23112963bd 100644 --- a/mingw-w64-python2/0140-MINGW-preset-configure-defaults.patch +++ b/mingw-w64-python2/0140-MINGW-preset-configure-defaults.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:39:54.637407000 +0100 -+++ b/configure.ac 2014-10-11 22:39:57.774586500 +0100 -@@ -748,6 +748,27 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:36.865400000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:36.990200000 +0300 +@@ -751,6 +751,27 @@ ;; esac @@ -29,9 +29,9 @@ diff -urN a/configure.ac b/configure.ac AC_SUBST(LIBRARY) AC_MSG_CHECKING(LIBRARY) -diff -urN a/Misc/config_mingw b/Misc/config_mingw ---- a/Misc/config_mingw 1970-01-01 01:00:00.000000000 +0100 -+++ b/Misc/config_mingw 2014-10-11 22:39:57.776586600 +0100 +diff -Naur Python-2.7.9-orig/Misc/config_mingw Python-2.7.9/Misc/config_mingw +--- Python-2.7.9-orig/Misc/config_mingw 1970-01-01 03:00:00.000000000 +0300 ++++ Python-2.7.9/Misc/config_mingw 2014-12-11 13:49:36.990200000 +0300 @@ -0,0 +1,12 @@ +# configure defaults for mingw* hosts + @@ -45,9 +45,9 @@ diff -urN a/Misc/config_mingw b/Misc/config_mingw +# files to ignore +ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist +ac_cv_file__dev_ptc=no -diff -urN a/Misc/cross_mingw32 b/Misc/cross_mingw32 ---- a/Misc/cross_mingw32 1970-01-01 01:00:00.000000000 +0100 -+++ b/Misc/cross_mingw32 2014-10-11 22:39:57.776586600 +0100 +diff -Naur Python-2.7.9-orig/Misc/cross_mingw32 Python-2.7.9/Misc/cross_mingw32 +--- Python-2.7.9-orig/Misc/cross_mingw32 1970-01-01 03:00:00.000000000 +0300 ++++ Python-2.7.9/Misc/cross_mingw32 2014-12-11 13:49:37.037000000 +0300 @@ -0,0 +1,11 @@ +# configure defaults for mingw32 host if cross-build + diff --git a/mingw-w64-python2/0150-MINGW-configure-largefile-support-for-windows-builds.patch b/mingw-w64-python2/0150-MINGW-configure-largefile-support-for-windows-builds.patch index dfc5c732a2..89f0a42315 100644 --- a/mingw-w64-python2/0150-MINGW-configure-largefile-support-for-windows-builds.patch +++ b/mingw-w64-python2/0150-MINGW-configure-largefile-support-for-windows-builds.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:39:58.949653700 +0100 -+++ b/configure.ac 2014-10-11 22:40:01.967826300 +0100 -@@ -1792,10 +1792,22 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:38.565800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:38.737400000 +0300 +@@ -1795,10 +1795,22 @@ ]) AC_MSG_CHECKING(whether to enable large file support) @@ -24,7 +24,7 @@ diff -urN a/configure.ac b/configure.ac AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, [Defined to enable large file support when an off_t is bigger than a long and long long is available and at least as big as an off_t. You may need -@@ -1805,9 +1817,6 @@ +@@ -1808,9 +1820,6 @@ else AC_MSG_RESULT(no) fi diff --git a/mingw-w64-python2/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch b/mingw-w64-python2/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch index d569de9ccb..59ee6606f1 100644 --- a/mingw-w64-python2/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch +++ b/mingw-w64-python2/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch @@ -1,6 +1,6 @@ -diff -urN a/Python/random.c b/Python/random.c ---- a/Python/random.c 2014-10-11 22:40:03.605920000 +0100 -+++ b/Python/random.c 2014-10-11 22:40:06.526087000 +0100 +diff -Naur Python-2.7.9-orig/Python/random.c Python-2.7.9/Python/random.c +--- Python-2.7.9-orig/Python/random.c 2014-12-10 18:59:59.000000000 +0300 ++++ Python-2.7.9/Python/random.c 2014-12-11 13:49:40.266200000 +0300 @@ -1,6 +1,12 @@ #include "Python.h" #ifdef MS_WINDOWS diff --git a/mingw-w64-python2/0180-MINGW-init-system-calls.patch b/mingw-w64-python2/0180-MINGW-init-system-calls.patch index 61ee3a907e..74b2c1383b 100644 --- a/mingw-w64-python2/0180-MINGW-init-system-calls.patch +++ b/mingw-w64-python2/0180-MINGW-init-system-calls.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:40:09.281244600 +0100 -+++ b/configure.ac 2014-10-11 22:40:12.205411900 +0100 -@@ -524,6 +524,14 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:40.157000000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:41.841800000 +0300 +@@ -527,6 +527,14 @@ fi AC_MSG_RESULT($EXTRAPLATDIR) @@ -16,9 +16,9 @@ diff -urN a/configure.ac b/configure.ac # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils # needs to check it -diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c ---- a/Modules/posixmodule.c 2014-10-11 22:40:09.860277700 +0100 -+++ b/Modules/posixmodule.c 2014-10-11 22:40:12.209412100 +0100 +diff -Naur Python-2.7.9-orig/Modules/posixmodule.c Python-2.7.9/Modules/posixmodule.c +--- Python-2.7.9-orig/Modules/posixmodule.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/posixmodule.c 2014-12-11 13:49:41.841800000 +0300 @@ -131,6 +131,25 @@ #define HAVE_CWAIT 1 #define HAVE_FSYNC 1 @@ -72,9 +72,9 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c #define INITFUNC initnt #define MODNAME "nt" -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 22:40:09.855277400 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 22:40:12.210412100 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.config.in Python-2.7.9/Modules/Setup.config.in +--- Python-2.7.9-orig/Modules/Setup.config.in 2014-12-10 18:59:51.000000000 +0300 ++++ Python-2.7.9/Modules/Setup.config.in 2014-12-11 13:49:41.841800000 +0300 @@ -3,6 +3,9 @@ # The purpose of this file is to conditionally enable certain modules # based on configure-time options. @@ -85,9 +85,9 @@ diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in # Threading @USE_THREAD_MODULE@thread threadmodule.c -diff -urN a/Modules/Setup.dist b/Modules/Setup.dist ---- a/Modules/Setup.dist 2014-10-11 22:40:09.644265400 +0100 -+++ b/Modules/Setup.dist 2014-10-11 22:40:12.211412200 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.dist Python-2.7.9/Modules/Setup.dist +--- Python-2.7.9-orig/Modules/Setup.dist 2014-12-10 18:59:51.000000000 +0300 ++++ Python-2.7.9/Modules/Setup.dist 2014-12-11 13:49:41.841800000 +0300 @@ -112,7 +112,6 @@ # This only contains the minimal set of modules required to run the # setup.py script in the root of the Python source tree. diff --git a/mingw-w64-python2/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch b/mingw-w64-python2/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch index 556692a463..138624134d 100644 --- a/mingw-w64-python2/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch +++ b/mingw-w64-python2/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:40:13.565489600 +0100 -+++ b/configure.ac 2014-10-11 22:40:16.521658700 +0100 -@@ -3527,6 +3527,27 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:43.308200000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:43.448600000 +0300 +@@ -3530,6 +3530,27 @@ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)]) fi @@ -29,9 +29,9 @@ diff -urN a/configure.ac b/configure.ac # checks for compiler characteristics AC_C_CHAR_UNSIGNED -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 22:40:14.118521300 +0100 -+++ b/pyconfig.h.in 2014-10-11 22:40:16.523658800 +0100 +diff -Naur Python-2.7.9-orig/pyconfig.h.in Python-2.7.9/pyconfig.h.in +--- Python-2.7.9-orig/pyconfig.h.in 2014-12-11 13:49:31.124600000 +0300 ++++ Python-2.7.9/pyconfig.h.in 2014-12-11 13:49:43.448600000 +0300 @@ -550,6 +550,9 @@ /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH diff --git a/mingw-w64-python2/0200-MINGW-build-in-windows-modules-winreg.patch b/mingw-w64-python2/0200-MINGW-build-in-windows-modules-winreg.patch index 5c1ce780a6..7a937d3d21 100644 --- a/mingw-w64-python2/0200-MINGW-build-in-windows-modules-winreg.patch +++ b/mingw-w64-python2/0200-MINGW-build-in-windows-modules-winreg.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:40:17.755729300 +0100 -+++ b/configure.ac 2014-10-11 22:40:20.880908100 +0100 -@@ -2448,6 +2448,14 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:44.961800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:45.086600000 +0300 +@@ -2451,6 +2451,14 @@ fi]) AC_MSG_RESULT($with_dbmliborder) @@ -16,9 +16,9 @@ diff -urN a/configure.ac b/configure.ac # Determine if signalmodule should be used. AC_SUBST(USE_SIGNAL_MODULE) AC_SUBST(SIGNAL_OBJS) -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 22:40:18.716784300 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 22:40:20.882908200 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.config.in Python-2.7.9/Modules/Setup.config.in +--- Python-2.7.9-orig/Modules/Setup.config.in 2014-12-11 13:49:43.323800000 +0300 ++++ Python-2.7.9/Modules/Setup.config.in 2014-12-11 13:49:45.086600000 +0300 @@ -12,5 +12,8 @@ # The signal module @USE_SIGNAL_MODULE@signal signalmodule.c @@ -28,9 +28,9 @@ diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in + # The rest of the modules previously listed in this file are built # by the setup.py script in Python 2.1 and later. -diff -urN a/PC/_winreg.c b/PC/_winreg.c ---- a/PC/_winreg.c 2014-10-11 22:40:19.147808900 +0100 -+++ b/PC/_winreg.c 2014-10-11 22:40:20.883908200 +0100 +diff -Naur Python-2.7.9-orig/PC/_winreg.c Python-2.7.9/PC/_winreg.c +--- Python-2.7.9-orig/PC/_winreg.c 2014-12-10 18:59:57.000000000 +0300 ++++ Python-2.7.9/PC/_winreg.c 2014-12-11 13:49:45.086600000 +0300 @@ -17,6 +17,25 @@ #include "malloc.h" /* for alloca */ #include "windows.h" @@ -57,7 +57,7 @@ diff -urN a/PC/_winreg.c b/PC/_winreg.c static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); static PyObject *PyHKEY_FromHKEY(HKEY h); static BOOL PyHKEY_Close(PyObject *obHandle); -@@ -1093,6 +1112,10 @@ +@@ -1095,6 +1114,10 @@ static PyObject * PyDeleteKeyEx(PyObject *self, PyObject *args) { @@ -68,7 +68,7 @@ diff -urN a/PC/_winreg.c b/PC/_winreg.c HKEY hKey; PyObject *obKey; HMODULE hMod; -@@ -1128,6 +1151,11 @@ +@@ -1130,6 +1153,11 @@ return PyErr_SetFromWindowsErrWithFunction(rc, "RegDeleteKeyEx"); Py_INCREF(Py_None); return Py_None; diff --git a/mingw-w64-python2/0210-MINGW-determine-if-pwdmodule-should-be-used.patch b/mingw-w64-python2/0210-MINGW-determine-if-pwdmodule-should-be-used.patch index 67a2fac70d..104e5d66b1 100644 --- a/mingw-w64-python2/0210-MINGW-determine-if-pwdmodule-should-be-used.patch +++ b/mingw-w64-python2/0210-MINGW-determine-if-pwdmodule-should-be-used.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:40:22.090977300 +0100 -+++ b/configure.ac 2014-10-11 22:40:25.798189300 +0100 -@@ -2456,6 +2456,13 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:46.506200000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:46.631000000 +0300 +@@ -2459,6 +2459,13 @@ *-*-mingw*) USE_WIN32_MODULE=;; esac @@ -15,9 +15,9 @@ diff -urN a/configure.ac b/configure.ac # Determine if signalmodule should be used. AC_SUBST(USE_SIGNAL_MODULE) AC_SUBST(SIGNAL_OBJS) -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 22:40:22.097977700 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 22:40:25.800189400 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.config.in Python-2.7.9/Modules/Setup.config.in +--- Python-2.7.9-orig/Modules/Setup.config.in 2014-12-11 13:49:46.521800000 +0300 ++++ Python-2.7.9/Modules/Setup.config.in 2014-12-11 13:49:46.631000000 +0300 @@ -6,6 +6,9 @@ # init system calls(posix/nt/...) for INITFUNC (used by makesetup) @INITSYS@ posixmodule.c @@ -28,9 +28,9 @@ diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in # Threading @USE_THREAD_MODULE@thread threadmodule.c -diff -urN a/Modules/Setup.dist b/Modules/Setup.dist ---- a/Modules/Setup.dist 2014-10-11 22:40:22.100977900 +0100 -+++ b/Modules/Setup.dist 2014-10-11 22:40:25.802189500 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.dist Python-2.7.9/Modules/Setup.dist +--- Python-2.7.9-orig/Modules/Setup.dist 2014-12-11 13:49:43.323800000 +0300 ++++ Python-2.7.9/Modules/Setup.dist 2014-12-11 13:49:46.646600000 +0300 @@ -113,8 +113,6 @@ # setup.py script in the root of the Python source tree. diff --git a/mingw-w64-python2/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch b/mingw-w64-python2/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch index dd4312ecdd..493fbedeaa 100644 --- a/mingw-w64-python2/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch +++ b/mingw-w64-python2/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:40:27.571290700 +0100 -+++ b/configure.ac 2014-10-11 22:40:31.271502400 +0100 -@@ -4710,8 +4710,21 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:48.175400000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:48.331400000 +0300 +@@ -4713,8 +4713,21 @@ THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" done @@ -23,10 +23,10 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING(for build directories) for dir in $SRCDIRS; do if test ! -d $dir; then -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:40:27.684297200 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:40:31.272502400 +0100 -@@ -211,7 +211,7 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-10 18:59:50.000000000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:49:48.331400000 +0300 +@@ -214,7 +214,7 @@ # Modules MODULE_OBJS= \ Modules/config.o \ @@ -35,7 +35,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in Modules/main.o \ Modules/gcmodule.o -@@ -578,6 +578,7 @@ +@@ -591,6 +591,7 @@ -DHGBRANCH="\"`LC_ALL=C $(HGBRANCH)`\"" \ -o $@ $(srcdir)/Modules/getbuildinfo.c @@ -43,7 +43,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ -DPREFIX='"$(prefix)"' \ -@@ -586,6 +587,13 @@ +@@ -599,6 +600,13 @@ -DVPATH='"$(VPATH)"' \ -o $@ $(srcdir)/Modules/getpath.c @@ -57,9 +57,9 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in Modules/python.o: $(srcdir)/Modules/python.c $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c -diff -urN a/PC/getpathp.c b/PC/getpathp.c ---- a/PC/getpathp.c 2014-10-11 22:40:28.033317200 +0100 -+++ b/PC/getpathp.c 2014-10-11 22:40:31.274502500 +0100 +diff -Naur Python-2.7.9-orig/PC/getpathp.c Python-2.7.9/PC/getpathp.c +--- Python-2.7.9-orig/PC/getpathp.c 2014-12-10 18:59:58.000000000 +0300 ++++ Python-2.7.9/PC/getpathp.c 2014-12-11 13:49:48.331400000 +0300 @@ -81,10 +81,26 @@ * information sources. */ diff --git a/mingw-w64-python2/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch b/mingw-w64-python2/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch index cb3de7346e..1270f59a45 100644 --- a/mingw-w64-python2/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch +++ b/mingw-w64-python2/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch @@ -1,6 +1,6 @@ -diff -urN a/Python/fileblocks.c b/Python/fileblocks.c ---- a/Python/fileblocks.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/Python/fileblocks.c 2014-10-11 22:40:37.158839100 +0100 +diff -Naur Python-2.7.9-orig/Python/fileblocks.c Python-2.7.9/Python/fileblocks.c +--- Python-2.7.9-orig/Python/fileblocks.c 1970-01-01 03:00:00.000000000 +0300 ++++ Python-2.7.9/Python/fileblocks.c 2014-12-11 13:49:50.031800000 +0300 @@ -0,0 +1,17 @@ +/* +-- Macro: AC_STRUCT_ST_BLOCKS diff --git a/mingw-w64-python2/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch b/mingw-w64-python2/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch index dcf96cae9b..7e74cc706f 100644 --- a/mingw-w64-python2/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch +++ b/mingw-w64-python2/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py ---- a/Lib/distutils/sysconfig.py 2014-10-11 22:40:39.798990100 +0100 -+++ b/Lib/distutils/sysconfig.py 2014-10-11 22:40:42.832163600 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/sysconfig.py Python-2.7.9/Lib/distutils/sysconfig.py +--- Python-2.7.9-orig/Lib/distutils/sysconfig.py 2014-12-10 18:59:34.000000000 +0300 ++++ Python-2.7.9/Lib/distutils/sysconfig.py 2014-12-11 13:49:51.607400000 +0300 @@ -154,7 +154,23 @@ Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. @@ -31,6 +31,6 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py # version and build tools may not support the same set # of CPU architectures for universal builds. - global _config_vars - if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''): + # Use get_config_var() to ensure _config_vars is initialized. + if not get_config_var('CUSTOMIZED_OSX_COMPILER'): import _osx_support - _osx_support.customize_compiler(_config_vars) diff --git a/mingw-w64-python2/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch b/mingw-w64-python2/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch index abb8485a91..f88cecc194 100644 --- a/mingw-w64-python2/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch +++ b/mingw-w64-python2/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 22:40:45.308305200 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 22:40:48.094464600 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/command/build_ext.py Python-2.7.9/Lib/distutils/command/build_ext.py +--- Python-2.7.9-orig/Lib/distutils/command/build_ext.py 2014-12-10 18:59:34.000000000 +0300 ++++ Python-2.7.9/Lib/distutils/command/build_ext.py 2014-12-11 13:49:53.214200000 +0300 @@ -723,13 +723,6 @@ # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list diff --git a/mingw-w64-python2/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch b/mingw-w64-python2/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch deleted file mode 100644 index ce3b45fd8b..0000000000 --- a/mingw-w64-python2/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 22:40:50.406596800 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 22:40:53.732787100 +0100 -@@ -235,7 +235,7 @@ - # Python's library directory must be appended to library_dirs - # See Issues: #1600860, #4366 - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): -- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): -+ if not sysconfig.python_build: - # building third party extensions - self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) - else: diff --git a/mingw-w64-python2/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch b/mingw-w64-python2/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch index 9244ae172f..127ec8b8a8 100644 --- a/mingw-w64-python2/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch +++ b/mingw-w64-python2/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/pyport.h b/Include/pyport.h ---- a/Include/pyport.h 2014-10-11 22:40:55.227872600 +0100 -+++ b/Include/pyport.h 2014-10-11 22:40:58.833078800 +0100 +diff -Naur Python-2.7.9-orig/Include/pyport.h Python-2.7.9/Include/pyport.h +--- Python-2.7.9-orig/Include/pyport.h 2014-12-11 13:49:33.729800000 +0300 ++++ Python-2.7.9/Include/pyport.h 2014-12-11 13:49:54.805400000 +0300 @@ -761,37 +761,39 @@ */ @@ -62,9 +62,9 @@ diff -urN a/Include/pyport.h b/Include/pyport.h # endif /* HAVE_DECLSPEC */ #endif /* Py_ENABLE_SHARED */ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:40:55.284875900 +0100 -+++ b/setup.py 2014-10-11 22:40:58.835078900 +0100 +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-10 19:00:01.000000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:49:54.805400000 +0300 @@ -162,6 +162,9 @@ def build_extensions(self): diff --git a/mingw-w64-python2/0300-MINGW-configure-for-shared-build.patch b/mingw-w64-python2/0300-MINGW-configure-for-shared-build.patch index 3b1ba8b10a..0fdd0b0446 100644 --- a/mingw-w64-python2/0300-MINGW-configure-for-shared-build.patch +++ b/mingw-w64-python2/0300-MINGW-configure-for-shared-build.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:40:59.993145200 +0100 -+++ b/configure.ac 2014-10-11 22:41:03.952371600 +0100 -@@ -971,6 +971,13 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:49.875800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:56.365400000 +0300 +@@ -974,6 +974,13 @@ ;; esac @@ -15,7 +15,7 @@ diff -urN a/configure.ac b/configure.ac else # shared is disabled case $ac_sys_system in CYGWIN*) -@@ -978,6 +985,10 @@ +@@ -981,6 +988,10 @@ LDLIBRARY='libpython$(VERSION).dll.a' ;; esac @@ -26,7 +26,7 @@ diff -urN a/configure.ac b/configure.ac fi if test "$cross_compiling" = yes; then -@@ -2184,6 +2195,12 @@ +@@ -2187,6 +2198,12 @@ LDCXXSHARED="g++ -shared";; *) LDSHARED="ld";; esac diff --git a/mingw-w64-python2/0310-MINGW-dynamic-loading-support.patch b/mingw-w64-python2/0310-MINGW-dynamic-loading-support.patch index 11226c6703..07d5061a6f 100644 --- a/mingw-w64-python2/0310-MINGW-dynamic-loading-support.patch +++ b/mingw-w64-python2/0310-MINGW-dynamic-loading-support.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:41:05.326450200 +0100 -+++ b/configure.ac 2014-10-11 22:41:09.181670700 +0100 -@@ -1887,6 +1887,9 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:57.831800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:49:57.941000000 +0300 +@@ -1890,6 +1890,9 @@ *) enable_toolbox_glue="no";; esac @@ -11,7 +11,7 @@ diff -urN a/configure.ac b/configure.ac fi case "$enable_toolbox_glue" in yes) -@@ -2032,6 +2035,16 @@ +@@ -2035,6 +2038,16 @@ CYGWIN*) SO=.dll;; *) SO=.so;; esac @@ -28,7 +28,7 @@ diff -urN a/configure.ac b/configure.ac else # this might also be a termcap variable, see #610332 echo -@@ -3032,6 +3045,12 @@ +@@ -3035,6 +3048,12 @@ fi ;; esac @@ -41,9 +41,9 @@ diff -urN a/configure.ac b/configure.ac fi AC_MSG_RESULT($DYNLOADFILE) if test "$DYNLOADFILE" != "dynload_stub.o" -diff -urN a/Python/dynload_win.c b/Python/dynload_win.c ---- a/Python/dynload_win.c 2014-10-11 22:41:05.417455400 +0100 -+++ b/Python/dynload_win.c 2014-10-11 22:41:09.182670800 +0100 +diff -Naur Python-2.7.9-orig/Python/dynload_win.c Python-2.7.9/Python/dynload_win.c +--- Python-2.7.9-orig/Python/dynload_win.c 2014-12-10 18:59:59.000000000 +0300 ++++ Python-2.7.9/Python/dynload_win.c 2014-12-11 13:49:57.941000000 +0300 @@ -11,9 +11,11 @@ #include "importdl.h" #include diff --git a/mingw-w64-python2/0320-MINGW-implement-exec-prefix.patch b/mingw-w64-python2/0320-MINGW-implement-exec-prefix.patch index 31d25dba1b..91b0f72959 100644 --- a/mingw-w64-python2/0320-MINGW-implement-exec-prefix.patch +++ b/mingw-w64-python2/0320-MINGW-implement-exec-prefix.patch @@ -1,6 +1,6 @@ -diff -urN a/PC/getpathp.c b/PC/getpathp.c ---- a/PC/getpathp.c 2014-10-11 22:41:10.798763200 +0100 -+++ b/PC/getpathp.c 2014-10-11 22:41:13.656926700 +0100 +diff -Naur Python-2.7.9-orig/PC/getpathp.c Python-2.7.9/PC/getpathp.c +--- Python-2.7.9-orig/PC/getpathp.c 2014-12-11 13:49:49.891400000 +0300 ++++ Python-2.7.9/PC/getpathp.c 2014-12-11 13:49:59.579000000 +0300 @@ -98,10 +98,17 @@ # define USE_POSIX_PREFIX diff --git a/mingw-w64-python2/0330-MINGW-ignore-main-program-for-frozen-scripts.patch b/mingw-w64-python2/0330-MINGW-ignore-main-program-for-frozen-scripts.patch index fdafdc346c..9c39e71837 100644 --- a/mingw-w64-python2/0330-MINGW-ignore-main-program-for-frozen-scripts.patch +++ b/mingw-w64-python2/0330-MINGW-ignore-main-program-for-frozen-scripts.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:41:16.730102500 +0100 -+++ b/configure.ac 2014-10-11 22:41:19.231245500 +0100 -@@ -4756,6 +4756,16 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:49:59.454200000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:01.170200000 +0300 +@@ -4759,6 +4759,16 @@ ;; esac @@ -18,10 +18,10 @@ diff -urN a/configure.ac b/configure.ac AC_SUBST(SRCDIRS) SRCDIRS="Parser Grammar Objects Python Modules Mac" case $host in -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:41:16.292077400 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:41:19.232245600 +0100 -@@ -308,7 +308,7 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:49:49.891400000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:01.170200000 +0300 +@@ -311,7 +311,7 @@ Python/codecs.o \ Python/errors.o \ Python/frozen.o \ diff --git a/mingw-w64-python2/0340-MINGW-setup-exclude-termios-module.patch b/mingw-w64-python2/0340-MINGW-setup-exclude-termios-module.patch index de15800d5d..7ebed4cb1c 100644 --- a/mingw-w64-python2/0340-MINGW-setup-exclude-termios-module.patch +++ b/mingw-w64-python2/0340-MINGW-setup-exclude-termios-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:20.736331600 +0100 -+++ b/setup.py 2014-10-11 22:41:23.635497400 +0100 -@@ -1318,7 +1318,7 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:49:56.256200000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:02.683400000 +0300 +@@ -1320,7 +1320,7 @@ missing.append('gdbm') # Unix-only modules diff --git a/mingw-w64-python2/0350-MINGW-setup-_multiprocessing-module.patch b/mingw-w64-python2/0350-MINGW-setup-_multiprocessing-module.patch index f7dd9fe05a..9a65cfc58a 100644 --- a/mingw-w64-python2/0350-MINGW-setup-_multiprocessing-module.patch +++ b/mingw-w64-python2/0350-MINGW-setup-_multiprocessing-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:24.888569100 +0100 -+++ b/setup.py 2014-10-11 22:41:27.916742300 +0100 -@@ -1572,7 +1572,7 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:04.196600000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:04.305800000 +0300 +@@ -1574,7 +1574,7 @@ macros = dict() libraries = ['rt'] @@ -10,7 +10,7 @@ diff -urN a/setup.py b/setup.py multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c', '_multiprocessing/semaphore.c', '_multiprocessing/pipe_connection.c', -@@ -1589,8 +1589,12 @@ +@@ -1591,8 +1591,12 @@ multiprocessing_srcs.append('_multiprocessing/semaphore.c') if sysconfig.get_config_var('WITH_THREAD'): diff --git a/mingw-w64-python2/0360-MINGW-setup-select-module.patch b/mingw-w64-python2/0360-MINGW-setup-select-module.patch index 0aa5cb6bca..0ea823e9c1 100644 --- a/mingw-w64-python2/0360-MINGW-setup-select-module.patch +++ b/mingw-w64-python2/0360-MINGW-setup-select-module.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/selectmodule.c b/Modules/selectmodule.c ---- a/Modules/selectmodule.c 2014-10-11 22:41:29.192815300 +0100 -+++ b/Modules/selectmodule.c 2014-10-11 22:41:32.328994700 +0100 +diff -Naur Python-2.7.9-orig/Modules/selectmodule.c Python-2.7.9/Modules/selectmodule.c +--- Python-2.7.9-orig/Modules/selectmodule.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/selectmodule.c 2014-12-11 13:50:05.865800000 +0300 @@ -107,9 +107,9 @@ v = PyObject_AsFileDescriptor( o ); if (v == -1) goto finally; @@ -22,10 +22,10 @@ diff -urN a/Modules/selectmodule.c b/Modules/selectmodule.c FD_SET(v, set); /* add object and its file descriptor to the list */ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:29.154813100 +0100 -+++ b/setup.py 2014-10-11 22:41:32.330994800 +0100 -@@ -658,7 +658,11 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:05.741000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:05.865800000 +0300 +@@ -660,7 +660,11 @@ missing.append('spwd') # select(2); not on ancient System V diff --git a/mingw-w64-python2/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch b/mingw-w64-python2/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch index cdf5693da8..4b8fda0ab9 100644 --- a/mingw-w64-python2/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch +++ b/mingw-w64-python2/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c ---- a/Modules/_ctypes/callproc.c 2014-10-11 22:41:34.392112700 +0100 -+++ b/Modules/_ctypes/callproc.c 2014-10-11 22:41:36.577237600 +0100 +diff -Naur Python-2.7.9-orig/Modules/_ctypes/callproc.c Python-2.7.9/Modules/_ctypes/callproc.c +--- Python-2.7.9-orig/Modules/_ctypes/callproc.c 2014-12-10 18:59:51.000000000 +0300 ++++ Python-2.7.9/Modules/_ctypes/callproc.c 2014-12-11 13:50:07.425800000 +0300 @@ -752,6 +752,21 @@ } @@ -59,10 +59,10 @@ diff -urN a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c #endif if ((flags & FUNCFLAG_PYTHONAPI) && PyErr_Occurred()) return -1; -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:34.749133100 +0100 -+++ b/setup.py 2014-10-11 22:41:36.578237700 +0100 -@@ -2106,6 +2106,8 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:07.301000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:07.425800000 +0300 +@@ -2108,6 +2108,8 @@ depends=depends) ext_test = Extension('_ctypes_test', sources=['_ctypes/_ctypes_test.c']) @@ -71,7 +71,7 @@ diff -urN a/setup.py b/setup.py self.extensions.extend([ext, ext_test]) if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"): -@@ -2139,6 +2141,8 @@ +@@ -2141,6 +2143,8 @@ if ffi_inc and ffi_lib: ext.include_dirs.extend(ffi_inc) ext.libraries.append(ffi_lib) diff --git a/mingw-w64-python2/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch b/mingw-w64-python2/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch index 4c1ff47746..2ee1c447be 100644 --- a/mingw-w64-python2/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch +++ b/mingw-w64-python2/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:41:37.736303900 +0100 -+++ b/configure.ac 2014-10-11 22:41:40.859482600 +0100 -@@ -3556,21 +3556,36 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:02.558600000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:10.077800000 +0300 +@@ -3559,21 +3559,36 @@ ],[]) AC_MSG_RESULT($was_it_defined) @@ -42,7 +42,7 @@ diff -urN a/configure.ac b/configure.ac [ac_cv_struct_sockaddr_storage=yes], [ac_cv_struct_sockaddr_storage=no])) AC_MSG_RESULT($ac_cv_struct_sockaddr_storage) -@@ -4724,7 +4739,10 @@ +@@ -4727,7 +4742,10 @@ AC_CHECK_TYPE(socklen_t,, AC_DEFINE(socklen_t,int, @@ -54,9 +54,9 @@ diff -urN a/configure.ac b/configure.ac #ifdef HAVE_SYS_TYPES_H #include #endif -diff -urN a/Misc/config_mingw b/Misc/config_mingw ---- a/Misc/config_mingw 2014-10-11 22:41:38.830366500 +0100 -+++ b/Misc/config_mingw 2014-10-11 22:41:40.860482600 +0100 +diff -Naur Python-2.7.9-orig/Misc/config_mingw Python-2.7.9/Misc/config_mingw +--- Python-2.7.9-orig/Misc/config_mingw 2014-12-11 13:49:38.565800000 +0300 ++++ Python-2.7.9/Misc/config_mingw 2014-12-11 13:50:10.077800000 +0300 @@ -10,3 +10,6 @@ # files to ignore ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist @@ -64,10 +64,10 @@ diff -urN a/Misc/config_mingw b/Misc/config_mingw + +# force detection of winsock2 functionality - require wxp or newer +ac_cv_func_getpeername=yes -diff -urN a/Modules/socketmodule.c b/Modules/socketmodule.c ---- a/Modules/socketmodule.c 2014-10-11 22:41:37.745304500 +0100 -+++ b/Modules/socketmodule.c 2014-10-11 22:41:40.862482800 +0100 -@@ -313,6 +313,12 @@ +diff -Naur Python-2.7.9-orig/Modules/socketmodule.c Python-2.7.9/Modules/socketmodule.c +--- Python-2.7.9-orig/Modules/socketmodule.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/socketmodule.c 2014-12-11 13:50:10.077800000 +0300 +@@ -317,6 +317,12 @@ /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and * EAI_* constants are defined in (the already included) ws2tcpip.h. */ @@ -80,9 +80,9 @@ diff -urN a/Modules/socketmodule.c b/Modules/socketmodule.c #else # include "addrinfo.h" #endif -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 22:41:37.736303900 +0100 -+++ b/pyconfig.h.in 2014-10-11 22:41:40.863482800 +0100 +diff -Naur Python-2.7.9-orig/pyconfig.h.in Python-2.7.9/pyconfig.h.in +--- Python-2.7.9-orig/pyconfig.h.in 2014-12-11 13:49:44.961800000 +0300 ++++ Python-2.7.9/pyconfig.h.in 2014-12-11 13:50:10.077800000 +0300 @@ -49,7 +49,7 @@ /* Define to 1 if you have the `acosh' function. */ #undef HAVE_ACOSH @@ -111,10 +111,10 @@ diff -urN a/pyconfig.h.in b/pyconfig.h.in #undef socklen_t /* Define to `int' if doesn't define. */ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:39.116382900 +0100 -+++ b/setup.py 2014-10-11 22:41:40.865482900 +0100 -@@ -789,9 +789,12 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:09.937400000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:10.093400000 +0300 +@@ -791,9 +791,12 @@ exts.append( Extension('_csv', ['_csv.c']) ) # socket(2) diff --git a/mingw-w64-python2/0390-MINGW-exclude-unix-only-modules.patch b/mingw-w64-python2/0390-MINGW-exclude-unix-only-modules.patch index b7babd021e..aca47dc8fb 100644 --- a/mingw-w64-python2/0390-MINGW-exclude-unix-only-modules.patch +++ b/mingw-w64-python2/0390-MINGW-exclude-unix-only-modules.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:42.072552000 +0100 -+++ b/setup.py 2014-10-11 22:41:45.096724900 +0100 -@@ -645,11 +645,20 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:11.528600000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:11.637800000 +0300 +@@ -647,11 +647,20 @@ if (config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)): # May be necessary on AIX for flock function libs = ['bsd'] @@ -25,7 +25,7 @@ diff -urN a/setup.py b/setup.py # spwd, shadow passwords if (config_h_vars.get('HAVE_GETSPNAM', False) or config_h_vars.get('HAVE_GETSPENT', False)): -@@ -679,7 +688,10 @@ +@@ -681,7 +690,10 @@ # Lance Ellinghaus's syslog module # syslog daemon interface @@ -37,7 +37,7 @@ diff -urN a/setup.py b/setup.py # George Neville-Neil's timing module: # Deprecated in PEP 4 http://www.python.org/peps/pep-0004.html -@@ -779,11 +791,14 @@ +@@ -781,11 +793,14 @@ # crypt module. diff --git a/mingw-w64-python2/0400-MINGW-setup-msvcrt-module.patch b/mingw-w64-python2/0400-MINGW-setup-msvcrt-module.patch index b937f02ecc..e194110e62 100644 --- a/mingw-w64-python2/0400-MINGW-setup-msvcrt-module.patch +++ b/mingw-w64-python2/0400-MINGW-setup-msvcrt-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:41:46.342796200 +0100 -+++ b/setup.py 2014-10-11 22:41:49.339967600 +0100 -@@ -912,6 +912,30 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:13.073000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:13.182200000 +0300 +@@ -914,6 +914,30 @@ min_db_ver = (4, 3) db_setup_debug = False # verbose debug prints from this script? diff --git a/mingw-w64-python2/0410-MINGW-build-extensions-with-GCC.patch b/mingw-w64-python2/0410-MINGW-build-extensions-with-GCC.patch index 6338efcb4f..8fd97c23aa 100644 --- a/mingw-w64-python2/0410-MINGW-build-extensions-with-GCC.patch +++ b/mingw-w64-python2/0410-MINGW-build-extensions-with-GCC.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 22:41:51.694102300 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 22:41:53.667215100 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/command/build_ext.py Python-2.7.9/Lib/distutils/command/build_ext.py +--- Python-2.7.9-orig/Lib/distutils/command/build_ext.py 2014-12-11 13:49:54.618200000 +0300 ++++ Python-2.7.9/Lib/distutils/command/build_ext.py 2014-12-11 13:50:14.773400000 +0300 @@ -179,7 +179,7 @@ # for extensions under windows use different directories # for Release and Debug builds. @@ -31,9 +31,9 @@ diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler if not isinstance(self.compiler, MSVCCompiler): -diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py ---- a/Lib/distutils/util.py 2014-10-11 22:41:51.671101000 +0100 -+++ b/Lib/distutils/util.py 2014-10-11 22:41:53.668215200 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/util.py Python-2.7.9/Lib/distutils/util.py +--- Python-2.7.9-orig/Lib/distutils/util.py 2014-12-10 18:59:35.000000000 +0300 ++++ Python-2.7.9/Lib/distutils/util.py 2014-12-11 13:50:14.773400000 +0300 @@ -38,6 +38,8 @@ For other non-POSIX platforms, currently just returns 'sys.platform'. """ @@ -43,10 +43,10 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py # sniff sys.version for architecture. prefix = " bit (" i = string.find(sys.version, prefix) -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 22:41:51.308080200 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 22:41:53.669215300 +0100 -@@ -556,6 +556,8 @@ +diff -Naur Python-2.7.9-orig/Lib/sysconfig.py Python-2.7.9/Lib/sysconfig.py +--- Python-2.7.9-orig/Lib/sysconfig.py 2014-12-11 13:49:29.549000000 +0300 ++++ Python-2.7.9/Lib/sysconfig.py 2014-12-11 13:50:14.773400000 +0300 +@@ -560,6 +560,8 @@ """ import re if os.name == 'nt': diff --git a/mingw-w64-python2/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch b/mingw-w64-python2/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch index b3337166f7..89c680516a 100644 --- a/mingw-w64-python2/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch +++ b/mingw-w64-python2/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py ---- a/Lib/distutils/ccompiler.py 2014-10-11 22:41:55.538322200 +0100 -+++ b/Lib/distutils/ccompiler.py 2014-10-11 22:41:57.968461200 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/ccompiler.py Python-2.7.9/Lib/distutils/ccompiler.py +--- Python-2.7.9-orig/Lib/distutils/ccompiler.py 2014-12-10 18:59:34.000000000 +0300 ++++ Python-2.7.9/Lib/distutils/ccompiler.py 2014-12-11 13:50:16.785800000 +0300 @@ -15,7 +15,7 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath @@ -19,9 +19,9 @@ diff -urN a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py for pattern, compiler in _default_compilers: if re.match(pattern, platform) is not None or \ re.match(pattern, osname) is not None: -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 22:41:55.541322300 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 22:41:57.969461200 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py Python-2.7.9/Lib/distutils/cygwinccompiler.py +--- Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py 2014-12-10 18:59:34.000000000 +0300 ++++ Python-2.7.9/Lib/distutils/cygwinccompiler.py 2014-12-11 13:50:16.801400000 +0300 @@ -271,12 +271,17 @@ if output_dir is None: output_dir = '' obj_names = [] diff --git a/mingw-w64-python2/0430-MINGW-find-import-library.patch b/mingw-w64-python2/0430-MINGW-find-import-library.patch index 07804eb0b1..5c5fd6725e 100644 --- a/mingw-w64-python2/0430-MINGW-find-import-library.patch +++ b/mingw-w64-python2/0430-MINGW-find-import-library.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 22:42:00.014578200 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 22:42:02.133699400 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py Python-2.7.9/Lib/distutils/cygwinccompiler.py +--- Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py 2014-12-11 13:50:18.299000000 +0300 ++++ Python-2.7.9/Lib/distutils/cygwinccompiler.py 2014-12-11 13:50:18.439400000 +0300 @@ -85,6 +85,7 @@ obj_extension = ".o" static_lib_extension = ".a" diff --git a/mingw-w64-python2/0440-MINGW-setup-_ssl-module.patch b/mingw-w64-python2/0440-MINGW-setup-_ssl-module.patch index 4e7e32710b..9d32d2a746 100644 --- a/mingw-w64-python2/0440-MINGW-setup-_ssl-module.patch +++ b/mingw-w64-python2/0440-MINGW-setup-_ssl-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:42:04.147814600 +0100 -+++ b/setup.py 2014-10-11 22:42:06.302937900 +0100 -@@ -830,10 +830,13 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:14.601800000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:20.030600000 +0300 +@@ -832,10 +832,13 @@ if (ssl_incs is not None and ssl_libs is not None): diff --git a/mingw-w64-python2/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch b/mingw-w64-python2/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch deleted file mode 100644 index baf0ae988f..0000000000 --- a/mingw-w64-python2/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/Include/node.h b/Include/node.h ---- a/Include/node.h 2014-10-11 22:42:07.816024400 +0100 -+++ b/Include/node.h 2014-10-11 22:42:10.512178600 +0100 -@@ -21,7 +21,7 @@ - char *str, int lineno, int col_offset); - PyAPI_FUNC(void) PyNode_Free(node *n); - #ifndef Py_LIMITED_API --Py_ssize_t _PyNode_SizeOf(node *n); -+PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n); - #endif - - /* Node access functions */ diff --git a/mingw-w64-python2/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch b/mingw-w64-python2/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch index 50f88a4b6d..b99e932a48 100644 --- a/mingw-w64-python2/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch +++ b/mingw-w64-python2/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 22:42:12.507292700 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 22:42:14.712418900 +0100 +diff -Naur Python-2.7.9-orig/Lib/sysconfig.py Python-2.7.9/Lib/sysconfig.py +--- Python-2.7.9-orig/Lib/sysconfig.py 2014-12-11 13:50:16.614200000 +0300 ++++ Python-2.7.9/Lib/sysconfig.py 2014-12-11 13:50:21.512600000 +0300 @@ -94,6 +94,10 @@ _CONFIG_VARS = None _USER_BASE = None @@ -30,7 +30,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py base = os.environ.get("APPDATA") or "~" return env_base if env_base else joinuser(base, "Python") -@@ -414,7 +418,7 @@ +@@ -418,7 +422,7 @@ def get_config_h_filename(): """Returns the path of pyconfig.h.""" if _PYTHON_BUILD: @@ -39,7 +39,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py inc_dir = os.path.join(_PROJECT_BASE, "PC") else: inc_dir = _PROJECT_BASE -@@ -476,9 +480,9 @@ +@@ -480,9 +484,9 @@ _CONFIG_VARS['platbase'] = _EXEC_PREFIX _CONFIG_VARS['projectbase'] = _PROJECT_BASE @@ -51,7 +51,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py _init_posix(_CONFIG_VARS) # Setting 'userbase' is done below the call to the -@@ -493,7 +497,7 @@ +@@ -497,7 +501,7 @@ # Normally it is relative to the build directory. However, during # testing, for example, we might be running a non-installed python # from a different directory. diff --git a/mingw-w64-python2/0462-MINGW-support-stdcall-without-underscore.patch b/mingw-w64-python2/0462-MINGW-support-stdcall-without-underscore.patch index fe2cc004d8..166053a68b 100644 --- a/mingw-w64-python2/0462-MINGW-support-stdcall-without-underscore.patch +++ b/mingw-w64-python2/0462-MINGW-support-stdcall-without-underscore.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c ---- a/Modules/_ctypes/_ctypes.c 2014-10-11 22:42:16.919545100 +0100 -+++ b/Modules/_ctypes/_ctypes.c 2014-10-11 22:42:19.057667400 +0100 +diff -Naur Python-2.7.9-orig/Modules/_ctypes/_ctypes.c Python-2.7.9/Modules/_ctypes/_ctypes.c +--- Python-2.7.9-orig/Modules/_ctypes/_ctypes.c 2014-12-10 18:59:51.000000000 +0300 ++++ Python-2.7.9/Modules/_ctypes/_ctypes.c 2014-12-11 13:50:23.088200000 +0300 @@ -3202,11 +3202,28 @@ mangled_name = alloca(strlen(name) + 1 + 1 + 1 + 3); /* \0 _ @ %d */ if (!mangled_name) diff --git a/mingw-w64-python2/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch b/mingw-w64-python2/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch index 26600ae408..59f216cdb8 100644 --- a/mingw-w64-python2/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch +++ b/mingw-w64-python2/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py ---- a/Lib/distutils/sysconfig.py 2014-10-11 22:42:21.104784500 +0100 -+++ b/Lib/distutils/sysconfig.py 2014-10-11 22:42:23.375914400 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/sysconfig.py Python-2.7.9/Lib/distutils/sysconfig.py +--- Python-2.7.9-orig/Lib/distutils/sysconfig.py 2014-12-11 13:49:53.105000000 +0300 ++++ Python-2.7.9/Lib/distutils/sysconfig.py 2014-12-11 13:50:24.601400000 +0300 @@ -62,6 +62,16 @@ """ return sys.version[:3] @@ -36,7 +36,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py libpython = os.path.join(prefix, "lib", "python" + get_python_version()) if standard_lib: -@@ -239,7 +249,7 @@ +@@ -240,7 +250,7 @@ def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: @@ -45,7 +45,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py inc_dir = os.path.join(project_base, "PC") else: inc_dir = project_base -@@ -416,6 +426,9 @@ +@@ -417,6 +427,9 @@ def _init_nt(): diff --git a/mingw-w64-python2/0490-MINGW-customize-site.patch b/mingw-w64-python2/0490-MINGW-customize-site.patch index 325b771efa..986cf75d80 100644 --- a/mingw-w64-python2/0490-MINGW-customize-site.patch +++ b/mingw-w64-python2/0490-MINGW-customize-site.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/site.py b/Lib/site.py ---- a/Lib/site.py 2014-10-11 22:42:25.074011500 +0100 -+++ b/Lib/site.py 2014-10-11 22:42:27.437146700 +0100 +diff -Naur Python-2.7.9-orig/Lib/site.py Python-2.7.9/Lib/site.py +--- Python-2.7.9-orig/Lib/site.py 2014-12-10 18:59:40.000000000 +0300 ++++ Python-2.7.9/Lib/site.py 2014-12-11 13:50:26.145800000 +0300 @@ -252,6 +252,12 @@ USER_SITE = get_path('purelib', 'osx_framework_user') return USER_SITE diff --git a/mingw-w64-python2/0500-add-python-config-sh.patch b/mingw-w64-python2/0500-add-python-config-sh.patch index af22477673..d2375edb65 100644 --- a/mingw-w64-python2/0500-add-python-config-sh.patch +++ b/mingw-w64-python2/0500-add-python-config-sh.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:42:28.732220700 +0100 -+++ b/configure.ac 2014-10-11 22:42:31.678389300 +0100 -@@ -912,6 +912,7 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:11.528600000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:27.627800000 +0300 +@@ -915,6 +915,7 @@ # Other platforms follow if test $enable_shared = "yes"; then @@ -9,7 +9,7 @@ diff -urN a/configure.ac b/configure.ac AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) case $ac_sys_system in BeOS*) -@@ -979,6 +980,7 @@ +@@ -982,6 +983,7 @@ ;; esac else # shared is disabled @@ -17,7 +17,7 @@ diff -urN a/configure.ac b/configure.ac case $ac_sys_system in CYGWIN*) BLDLIBRARY='$(LIBRARY)' -@@ -990,6 +992,9 @@ +@@ -993,6 +995,9 @@ LDLIBRARY='libpython$(VERSION).a';; esac fi @@ -27,8 +27,8 @@ diff -urN a/configure.ac b/configure.ac if test "$cross_compiling" = yes; then RUNSHARED= -@@ -4798,7 +4803,13 @@ - AC_MSG_RESULT(done) +@@ -4816,7 +4821,13 @@ + AC_SUBST(ENSUREPIP) # generate output files -AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) @@ -42,10 +42,10 @@ diff -urN a/configure.ac b/configure.ac AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) AC_OUTPUT -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:42:29.902287700 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:42:31.679389300 +0100 -@@ -1061,6 +1061,9 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:50:02.574200000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:27.643400000 +0300 +@@ -1094,6 +1094,9 @@ # Substitution happens here, as the completely-expanded BINDIR # is not available in configure sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config @@ -55,7 +55,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Install the include files INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) -@@ -1119,6 +1122,8 @@ +@@ -1152,6 +1155,8 @@ $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config @@ -64,9 +64,9 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in rm python-config @if [ -s Modules/python.exp -a \ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ -diff -urN a/Misc/python-config.sh.in b/Misc/python-config.sh.in ---- a/Misc/python-config.sh.in 1970-01-01 01:00:00.000000000 +0100 -+++ b/Misc/python-config.sh.in 2014-10-11 22:42:31.681389400 +0100 +diff -Naur Python-2.7.9-orig/Misc/python-config.sh.in Python-2.7.9/Misc/python-config.sh.in +--- Python-2.7.9-orig/Misc/python-config.sh.in 1970-01-01 03:00:00.000000000 +0300 ++++ Python-2.7.9/Misc/python-config.sh.in 2014-12-11 13:50:27.643400000 +0300 @@ -0,0 +1,127 @@ +#!/usr/bin/env sh + @@ -101,7 +101,7 @@ diff -urN a/Misc/python-config.sh.in b/Misc/python-config.sh.in + fi + # Since we don't know where the output from this script will end up + # we keep all paths in Windows-land since MSYS2 can handle that -+ # whilst native tools can't handle paths in MSYS2-land. ++ # while native tools can't handle paths in MSYS2-land. + if [ "$OSTYPE" = "msys" ]; then + RESULT=$(cd "$RESULT" && pwd -W) + elif [ $(which $READLINK) ] ; then @@ -195,9 +195,9 @@ diff -urN a/Misc/python-config.sh.in b/Misc/python-config.sh.in +done +echo -ne $RESULT + -diff -urN a/Misc/python-config-u.sh.in b/Misc/python-config-u.sh.in ---- a/Misc/python-config-u.sh.in 1970-01-01 01:00:00.000000000 +0100 -+++ b/Misc/python-config-u.sh.in 2014-10-11 22:42:31.681389400 +0100 +diff -Naur Python-2.7.9-orig/Misc/python-config-u.sh.in Python-2.7.9/Misc/python-config-u.sh.in +--- Python-2.7.9-orig/Misc/python-config-u.sh.in 1970-01-01 03:00:00.000000000 +0300 ++++ Python-2.7.9/Misc/python-config-u.sh.in 2014-12-11 13:50:27.643400000 +0300 @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + diff --git a/mingw-w64-python2/0510-cross-darwin-feature.patch b/mingw-w64-python2/0510-cross-darwin-feature.patch index dc21f8a77d..433ecc5f3d 100644 --- a/mingw-w64-python2/0510-cross-darwin-feature.patch +++ b/mingw-w64-python2/0510-cross-darwin-feature.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:42:32.799453400 +0100 -+++ b/configure.ac 2014-10-11 22:42:35.858628400 +0100 -@@ -309,6 +309,7 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:29.187800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:29.312600000 +0300 +@@ -312,6 +312,7 @@ then # avoid using uname for cross builds if test "$cross_compiling" = yes; then @@ -9,7 +9,7 @@ diff -urN a/configure.ac b/configure.ac # ac_sys_system and ac_sys_release are only used for setting # `define_xopen_source' in the case statement below. For the # current supported cross builds, this macro is not adjusted. -@@ -322,12 +323,32 @@ +@@ -325,12 +326,32 @@ *-*-mingw*) ac_sys_system=MinGW ;; @@ -43,7 +43,7 @@ diff -urN a/configure.ac b/configure.ac else ac_sys_system=`uname -s` if test "$ac_sys_system" = "AIX" \ -@@ -372,6 +393,9 @@ +@@ -375,6 +396,9 @@ *-*-mingw*) _host_cpu= ;; @@ -53,7 +53,7 @@ diff -urN a/configure.ac b/configure.ac *) # for now, limit cross builds to known configurations MACHDEP="unknown" -@@ -1150,6 +1174,26 @@ +@@ -1153,6 +1177,26 @@ AC_SUBST(BASECFLAGS) @@ -80,7 +80,7 @@ diff -urN a/configure.ac b/configure.ac # The -arch flags for universal builds on OSX UNIVERSAL_ARCH_FLAGS= AC_SUBST(UNIVERSAL_ARCH_FLAGS) -@@ -1236,7 +1280,7 @@ +@@ -1239,7 +1283,7 @@ cur_target='10.5' fi else @@ -89,7 +89,7 @@ diff -urN a/configure.ac b/configure.ac # On Intel macs default to a deployment # target of 10.4, that's the first OSX # release with Intel support. -@@ -1929,7 +1973,7 @@ +@@ -1932,7 +1976,7 @@ if test "${enable_universalsdk}"; then : else @@ -98,7 +98,7 @@ diff -urN a/configure.ac b/configure.ac fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; -@@ -1954,7 +1998,7 @@ +@@ -1957,7 +2001,7 @@ ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes]) if test "${ac_osx_32bit}" = "yes"; then @@ -107,7 +107,7 @@ diff -urN a/configure.ac b/configure.ac i386) MACOSX_DEFAULT_ARCH="i386" ;; -@@ -1966,7 +2010,7 @@ +@@ -1969,7 +2013,7 @@ ;; esac else @@ -116,7 +116,7 @@ diff -urN a/configure.ac b/configure.ac i386) MACOSX_DEFAULT_ARCH="x86_64" ;; -@@ -2005,8 +2049,8 @@ +@@ -2008,8 +2052,8 @@ fi AC_MSG_CHECKING(for dyld) diff --git a/mingw-w64-python2/0520-py3k-mingw-ntthreads-vs-pthreads.patch b/mingw-w64-python2/0520-py3k-mingw-ntthreads-vs-pthreads.patch index e9df2da711..100171dcdc 100644 --- a/mingw-w64-python2/0520-py3k-mingw-ntthreads-vs-pthreads.patch +++ b/mingw-w64-python2/0520-py3k-mingw-ntthreads-vs-pthreads.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:42:37.081698300 +0100 -+++ b/configure.ac 2014-10-11 22:42:40.177875400 +0100 -@@ -1664,8 +1664,8 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:30.747800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:30.857000000 +0300 +@@ -1667,8 +1667,8 @@ AC_HEADER_STDC AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ @@ -12,9 +12,9 @@ diff -urN a/configure.ac b/configure.ac unistd.h utime.h \ sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ sys/lock.h sys/mkdev.h sys/modem.h \ -diff -urN a/Python/thread.c b/Python/thread.c ---- a/Python/thread.c 2014-10-11 22:42:38.120757700 +0100 -+++ b/Python/thread.c 2014-10-11 22:42:40.178875500 +0100 +diff -Naur Python-2.7.9-orig/Python/thread.c Python-2.7.9/Python/thread.c +--- Python-2.7.9-orig/Python/thread.c 2014-12-10 18:59:59.000000000 +0300 ++++ Python-2.7.9/Python/thread.c 2014-12-11 13:50:30.857000000 +0300 @@ -8,6 +8,12 @@ #include "Python.h" diff --git a/mingw-w64-python2/0530-mingw-system-libffi.patch b/mingw-w64-python2/0530-mingw-system-libffi.patch index e5038b68a5..c67b106531 100644 --- a/mingw-w64-python2/0530-mingw-system-libffi.patch +++ b/mingw-w64-python2/0530-mingw-system-libffi.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:42:41.402945500 +0100 -+++ b/configure.ac 2014-10-11 22:42:44.527124200 +0100 -@@ -2472,14 +2472,32 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:32.838200000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:32.963000000 +0300 +@@ -2475,14 +2475,32 @@ [], [with_system_ffi="no"]) @@ -37,9 +37,9 @@ diff -urN a/configure.ac b/configure.ac # Check for --with-tcltk-includes=path and --with-tcltk-libs=path AC_SUBST(TCLTK_INCLUDES) -diff -urN a/Lib/ctypes/test/test_as_parameter.py b/Lib/ctypes/test/test_as_parameter.py ---- a/Lib/ctypes/test/test_as_parameter.py 2014-10-11 22:42:42.234993100 +0100 -+++ b/Lib/ctypes/test/test_as_parameter.py 2014-10-11 22:42:44.528124200 +0100 +diff -Naur Python-2.7.9-orig/Lib/ctypes/test/test_as_parameter.py Python-2.7.9/Lib/ctypes/test/test_as_parameter.py +--- Python-2.7.9-orig/Lib/ctypes/test/test_as_parameter.py 2014-12-10 18:59:33.000000000 +0300 ++++ Python-2.7.9/Lib/ctypes/test/test_as_parameter.py 2014-12-11 13:50:32.963000000 +0300 @@ -2,6 +2,7 @@ from ctypes import * from ctypes.test import need_symbol @@ -59,9 +59,9 @@ diff -urN a/Lib/ctypes/test/test_as_parameter.py b/Lib/ctypes/test/test_as_param def test_struct_return_8H(self): class S8I(Structure): _fields_ = [("a", c_int), -diff -urN a/Lib/ctypes/test/test_functions.py b/Lib/ctypes/test/test_functions.py ---- a/Lib/ctypes/test/test_functions.py 2014-10-11 22:42:42.233993000 +0100 -+++ b/Lib/ctypes/test/test_functions.py 2014-10-11 22:42:44.529124300 +0100 +diff -Naur Python-2.7.9-orig/Lib/ctypes/test/test_functions.py Python-2.7.9/Lib/ctypes/test/test_functions.py +--- Python-2.7.9-orig/Lib/ctypes/test/test_functions.py 2014-12-10 18:59:33.000000000 +0300 ++++ Python-2.7.9/Lib/ctypes/test/test_functions.py 2014-12-11 13:50:32.963000000 +0300 @@ -352,6 +352,10 @@ s2h = windll.s_ret_2h_func(S2H(99, 88)) self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) @@ -73,10 +73,10 @@ diff -urN a/Lib/ctypes/test/test_functions.py b/Lib/ctypes/test/test_functions.p def test_struct_return_8H(self): class S8I(Structure): _fields_ = [("a", c_int), -diff -urN a/Modules/_ctypes/libffi/fficonfig.py.in b/Modules/_ctypes/libffi/fficonfig.py.in ---- a/Modules/_ctypes/libffi/fficonfig.py.in 2014-10-11 22:42:41.593956400 +0100 -+++ b/Modules/_ctypes/libffi/fficonfig.py.in 2014-10-11 22:42:44.530124300 +0100 -@@ -22,6 +22,7 @@ +diff -Naur Python-2.7.9-orig/Modules/_ctypes/libffi/fficonfig.py.in Python-2.7.9/Modules/_ctypes/libffi/fficonfig.py.in +--- Python-2.7.9-orig/Modules/_ctypes/libffi/fficonfig.py.in 2014-12-10 18:59:51.000000000 +0300 ++++ Python-2.7.9/Modules/_ctypes/libffi/fficonfig.py.in 2014-12-11 13:50:32.963000000 +0300 +@@ -23,6 +23,7 @@ 'FRV': ['src/frv/eabi.S', 'src/frv/ffi.c'], 'S390': ['src/s390/sysv.S', 'src/s390/ffi.c'], 'X86_64': ['src/x86/ffi64.c', 'src/x86/unix64.S', 'src/x86/ffi.c', 'src/x86/sysv.S'], @@ -84,7 +84,7 @@ diff -urN a/Modules/_ctypes/libffi/fficonfig.py.in b/Modules/_ctypes/libffi/ffic 'SH': ['src/sh/sysv.S', 'src/sh/ffi.c'], 'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'], 'PA': ['src/pa/linux.S', 'src/pa/ffi.c'], -@@ -29,6 +30,9 @@ +@@ -30,6 +31,9 @@ 'PA_HPUX': ['src/pa/hpux32.S', 'src/pa/ffi.c'], } @@ -94,9 +94,9 @@ diff -urN a/Modules/_ctypes/libffi/fficonfig.py.in b/Modules/_ctypes/libffi/ffic ffi_sources += ffi_platforms['@TARGET@'] ffi_cflags = '@CFLAGS@' -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 22:42:41.428947000 +0100 -+++ b/pyconfig.h.in 2014-10-11 22:42:44.531124400 +0100 +diff -Naur Python-2.7.9-orig/pyconfig.h.in Python-2.7.9/pyconfig.h.in +--- Python-2.7.9-orig/pyconfig.h.in 2014-12-11 13:50:11.528600000 +0300 ++++ Python-2.7.9/pyconfig.h.in 2014-12-11 13:50:32.978600000 +0300 @@ -1128,6 +1128,9 @@ /* Define if you want to compile in Python-specific mallocs */ #undef WITH_PYMALLOC @@ -107,10 +107,10 @@ diff -urN a/pyconfig.h.in b/pyconfig.h.in /* Define if you want to compile in rudimentary thread support */ #undef WITH_THREAD -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:42:41.403945500 +0100 -+++ b/setup.py 2014-10-11 22:42:44.533124500 +0100 -@@ -2056,6 +2056,11 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:21.403400000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:32.978600000 +0300 +@@ -2058,6 +2058,11 @@ return True def configure_ctypes(self, ext): @@ -122,7 +122,7 @@ diff -urN a/setup.py b/setup.py if not self.use_system_libffi: if host_platform == 'darwin': return self.configure_ctypes_darwin(ext) -@@ -2080,6 +2085,10 @@ +@@ -2082,6 +2087,10 @@ if not self.verbose: config_args.append("-q") diff --git a/mingw-w64-python2/0540-mingw-semicolon-DELIM.patch b/mingw-w64-python2/0540-mingw-semicolon-DELIM.patch index 1efabd1d1e..8cdfcc6700 100644 --- a/mingw-w64-python2/0540-mingw-semicolon-DELIM.patch +++ b/mingw-w64-python2/0540-mingw-semicolon-DELIM.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:42:45.691190700 +0100 -+++ b/configure.ac 2014-10-11 22:42:48.833370500 +0100 -@@ -548,6 +548,16 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:34.460600000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:34.585400000 +0300 +@@ -551,6 +551,16 @@ fi AC_MSG_RESULT($EXTRAPLATDIR) @@ -18,9 +18,9 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING([for init system calls]) AC_SUBST(INITSYS) case $host in -diff -urN a/Include/osdefs.h b/Include/osdefs.h ---- a/Include/osdefs.h 2014-10-11 22:42:46.013209200 +0100 -+++ b/Include/osdefs.h 2014-10-11 22:42:48.835370600 +0100 +diff -Naur Python-2.7.9-orig/Include/osdefs.h Python-2.7.9/Include/osdefs.h +--- Python-2.7.9-orig/Include/osdefs.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/osdefs.h 2014-12-11 13:50:34.585400000 +0300 @@ -10,7 +10,7 @@ /* Mod by chrish: QNX has WATCOM, but isn't DOS */ #if !defined(__QNX__) @@ -54,9 +54,9 @@ diff -urN a/Include/osdefs.h b/Include/osdefs.h #endif #ifdef __cplusplus -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:42:45.691190700 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:42:48.836370600 +0100 +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:50:29.203400000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:34.585400000 +0300 @@ -84,7 +84,8 @@ # C flags used for building the interpreter object files PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE @@ -67,9 +67,9 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Machine-dependent subdirectories MACHDEP= @MACHDEP@ -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 22:42:46.833256100 +0100 -+++ b/Modules/getpath.c 2014-10-11 22:42:48.837370700 +0100 +diff -Naur Python-2.7.9-orig/Modules/getpath.c Python-2.7.9/Modules/getpath.c +--- Python-2.7.9-orig/Modules/getpath.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/getpath.c 2014-12-11 13:50:34.585400000 +0300 @@ -117,7 +117,7 @@ #endif @@ -79,9 +79,9 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" #endif -diff -urN a/Modules/Setup.dist b/Modules/Setup.dist ---- a/Modules/Setup.dist 2014-10-11 22:42:46.686247700 +0100 -+++ b/Modules/Setup.dist 2014-10-11 22:42:48.838370700 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.dist Python-2.7.9/Modules/Setup.dist +--- Python-2.7.9-orig/Modules/Setup.dist 2014-12-11 13:49:48.191000000 +0300 ++++ Python-2.7.9/Modules/Setup.dist 2014-12-11 13:50:34.585400000 +0300 @@ -84,22 +84,22 @@ # Empty since this is now just the runtime prefix. DESTPATH= @@ -94,8 +94,8 @@ diff -urN a/Modules/Setup.dist b/Modules/Setup.dist TESTPATH= # Path components for machine- or system-dependent modules and shared libraries --MACHDEPPATH=:plat-$(MACHDEP) -+MACHDEPPATH=$(DELIM)plat-$(MACHDEP) +-MACHDEPPATH=:$(PLATDIR) ++MACHDEPPATH=$(DELIM)$(PLATDIR) EXTRAMACHDEPPATH= # Path component for the Tkinter-related modules diff --git a/mingw-w64-python2/0550-mingw-regen-use-stddef_h.patch b/mingw-w64-python2/0550-mingw-regen-use-stddef_h.patch index e23c02ad8e..9e99989ec2 100644 --- a/mingw-w64-python2/0550-mingw-regen-use-stddef_h.patch +++ b/mingw-w64-python2/0550-mingw-regen-use-stddef_h.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/plat-generic/regen b/Lib/plat-generic/regen ---- a/Lib/plat-generic/regen 2014-10-11 22:42:50.797482800 +0100 -+++ b/Lib/plat-generic/regen 2014-10-11 22:42:52.889602500 +0100 +diff -Naur Python-2.7.9-orig/Lib/plat-generic/regen Python-2.7.9/Lib/plat-generic/regen +--- Python-2.7.9-orig/Lib/plat-generic/regen 2014-12-10 18:59:39.000000000 +0300 ++++ Python-2.7.9/Lib/plat-generic/regen 2014-12-11 13:50:36.129800000 +0300 @@ -1,3 +1,9 @@ #! /bin/sh set -v @@ -12,10 +12,10 @@ diff -urN a/Lib/plat-generic/regen b/Lib/plat-generic/regen + REGENHEADER=/usr/include/netinet/in.h +fi +eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" $REGENHEADER -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:42:51.110500700 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:42:52.890602500 +0100 -@@ -1056,7 +1056,7 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:50:36.005000000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:36.129800000 +0300 +@@ -1089,7 +1089,7 @@ else \ PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \ fi; \ diff --git a/mingw-w64-python2/0560-mingw-use-posix-getpath.patch b/mingw-w64-python2/0560-mingw-use-posix-getpath.patch index 0de97a6418..6e7358aab8 100644 --- a/mingw-w64-python2/0560-mingw-use-posix-getpath.patch +++ b/mingw-w64-python2/0560-mingw-use-posix-getpath.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:42:54.205677700 +0100 -+++ b/configure.ac 2014-10-11 22:42:57.241851400 +0100 -@@ -4847,7 +4847,9 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:36.005000000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:37.643000000 +0300 +@@ -4850,7 +4850,9 @@ case $host in *-*-mingw*) dnl default sys.path calculations for windows platforms @@ -12,9 +12,9 @@ diff -urN a/configure.ac b/configure.ac ;; esac -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 22:42:55.217735600 +0100 -+++ b/Modules/getpath.c 2014-10-11 22:42:57.242851500 +0100 +diff -Naur Python-2.7.9-orig/Modules/getpath.c Python-2.7.9/Modules/getpath.c +--- Python-2.7.9-orig/Modules/getpath.c 2014-12-11 13:50:36.005000000 +0300 ++++ Python-2.7.9/Modules/getpath.c 2014-12-11 13:50:37.643000000 +0300 @@ -10,6 +10,10 @@ #include #endif @@ -143,9 +143,9 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c absolutize(progpath); strncpy(argv0_path, progpath, MAXPATHLEN); argv0_path[MAXPATHLEN] = '\0'; -diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c ---- a/Modules/posixmodule.c 2014-10-11 22:42:55.243737100 +0100 -+++ b/Modules/posixmodule.c 2014-10-11 22:42:57.245851600 +0100 +diff -Naur Python-2.7.9-orig/Modules/posixmodule.c Python-2.7.9/Modules/posixmodule.c +--- Python-2.7.9-orig/Modules/posixmodule.c 2014-12-11 13:49:43.323800000 +0300 ++++ Python-2.7.9/Modules/posixmodule.c 2014-12-11 13:50:37.643000000 +0300 @@ -2324,7 +2324,7 @@ Py_END_ALLOW_THREADS /* FindNextFile sets error to ERROR_NO_MORE_FILES if diff --git a/mingw-w64-python2/0565-mingw-add-ModuleFileName-dir-to-PATH.patch b/mingw-w64-python2/0565-mingw-add-ModuleFileName-dir-to-PATH.patch index c5399e8660..6b4d15ef76 100644 --- a/mingw-w64-python2/0565-mingw-add-ModuleFileName-dir-to-PATH.patch +++ b/mingw-w64-python2/0565-mingw-add-ModuleFileName-dir-to-PATH.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 22:42:58.511924000 +0100 -+++ b/Modules/getpath.c 2014-10-11 22:43:01.444091800 +0100 +diff -Naur Python-2.7.9-orig/Modules/getpath.c Python-2.7.9/Modules/getpath.c +--- Python-2.7.9-orig/Modules/getpath.c 2014-12-11 13:50:39.187400000 +0300 ++++ Python-2.7.9/Modules/getpath.c 2014-12-11 13:50:39.312200000 +0300 @@ -726,6 +726,29 @@ } else diff --git a/mingw-w64-python2/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch b/mingw-w64-python2/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch index 582b49eece..80efffe4db 100644 --- a/mingw-w64-python2/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch +++ b/mingw-w64-python2/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 22:43:03.803226700 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 22:43:05.757338500 +0100 +diff -Naur Python-2.7.9-orig/Modules/Setup.config.in Python-2.7.9/Modules/Setup.config.in +--- Python-2.7.9-orig/Modules/Setup.config.in 2014-12-11 13:49:48.191000000 +0300 ++++ Python-2.7.9/Modules/Setup.config.in 2014-12-11 13:50:40.841000000 +0300 @@ -17,6 +17,11 @@ # build-in modules for windows platform: @@ -13,10 +13,10 @@ diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in # The rest of the modules previously listed in this file are built # by the setup.py script in Python 2.1 and later. -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:43:02.665161600 +0100 -+++ b/setup.py 2014-10-11 22:43:05.759338600 +0100 -@@ -598,14 +598,20 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:34.460600000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:40.856600000 +0300 +@@ -600,14 +600,20 @@ # heapq exts.append( Extension("_heapq", ["_heapqmodule.c"]) ) # operator.add() and similar goodies @@ -39,7 +39,7 @@ diff -urN a/setup.py b/setup.py # _json speedups exts.append( Extension("_json", ["_json.c"]) ) # Python C API test module -@@ -632,7 +638,10 @@ +@@ -634,7 +640,10 @@ locale_extra_link_args = [] @@ -51,7 +51,7 @@ diff -urN a/setup.py b/setup.py libraries=locale_libs, extra_link_args=locale_extra_link_args) ) -@@ -1580,7 +1589,7 @@ +@@ -1582,7 +1591,7 @@ if sys.maxint == 0x7fffffff: # This requires sizeof(int) == sizeof(long) == sizeof(char*) dl_inc = find_file('dlfcn.h', [], inc_dirs) @@ -60,7 +60,7 @@ diff -urN a/setup.py b/setup.py exts.append( Extension('dl', ['dlmodule.c']) ) else: missing.append('dl') -@@ -1973,6 +1982,9 @@ +@@ -1975,6 +1984,9 @@ if host_platform == 'sunos5': include_dirs.append('/usr/openwin/include') added_lib_dirs.append('/usr/openwin/lib') diff --git a/mingw-w64-python2/0580-mingw32-test-REPARSE_DATA_BUFFER.patch b/mingw-w64-python2/0580-mingw32-test-REPARSE_DATA_BUFFER.patch index a4d998dc19..41ef40f33b 100644 --- a/mingw-w64-python2/0580-mingw32-test-REPARSE_DATA_BUFFER.patch +++ b/mingw-w64-python2/0580-mingw32-test-REPARSE_DATA_BUFFER.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:43:06.966407600 +0100 -+++ b/configure.ac 2014-10-11 22:43:10.028582800 +0100 -@@ -4312,6 +4312,28 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:39.187400000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:43.071800000 +0300 +@@ -4315,6 +4315,28 @@ # check for endianness AC_C_BIGENDIAN diff --git a/mingw-w64-python2/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch b/mingw-w64-python2/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch index 2a0eab6110..625ea48937 100644 --- a/mingw-w64-python2/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch +++ b/mingw-w64-python2/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch @@ -1,7 +1,7 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:43:12.174705500 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:43:14.311827700 +0100 -@@ -893,6 +893,7 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:50:37.518200000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:44.678600000 +0300 +@@ -925,6 +925,7 @@ if test -f $(LDLIBRARY); then \ if test -n "$(DLLLIBRARY)" ; then \ $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ diff --git a/mingw-w64-python2/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/mingw-w64-python2/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch index 02861dd41e..7d2d7e5671 100644 --- a/mingw-w64-python2/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch +++ b/mingw-w64-python2/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/ntpath.py b/Lib/ntpath.py ---- a/Lib/ntpath.py 2014-10-11 22:43:15.812913600 +0100 -+++ b/Lib/ntpath.py 2014-10-11 22:43:18.362059400 +0100 +diff -Naur Python-2.7.9-orig/Lib/ntpath.py Python-2.7.9/Lib/ntpath.py +--- Python-2.7.9-orig/Lib/ntpath.py 2014-12-10 18:59:39.000000000 +0300 ++++ Python-2.7.9/Lib/ntpath.py 2014-12-11 13:50:46.238600000 +0300 @@ -24,9 +24,22 @@ curdir = '.' pardir = '..' @@ -47,7 +47,7 @@ diff -urN a/Lib/ntpath.py b/Lib/ntpath.py @@ -415,13 +428,19 @@ """Normalize path, eliminating double slashes, etc.""" # Preserve unicode (if path is unicode) - backslash, dot = (u'\\', u'.') if isinstance(path, unicode) else ('\\', '.') + backslash, dot = (u'\\', u'.') if isinstance(path, _unicode) else ('\\', '.') + isUNC = path.startswith('\\\\') + this_sep = sep + other_sep = altsep @@ -105,33 +105,98 @@ diff -urN a/Lib/ntpath.py b/Lib/ntpath.py # Return an absolute path. -diff -urN a/Python/pythonrun.c b/Python/pythonrun.c ---- a/Python/pythonrun.c 2014-10-11 22:43:15.435892000 +0100 -+++ b/Python/pythonrun.c 2014-10-11 22:43:18.363059500 +0100 -@@ -673,13 +673,24 @@ +--- Python-2.7.10/Include/pythonrun.h.orig 2015-05-23 17:09:00.000000000 +0100 ++++ Python-2.7.10/Include/pythonrun.h 2015-12-31 03:30:18.917684800 +0000 +@@ -104,6 +104,7 @@ + PyAPI_FUNC(char *) Py_GetPrefix(void); + PyAPI_FUNC(char *) Py_GetExecPrefix(void); + PyAPI_FUNC(char *) Py_GetPath(void); ++PyAPI_FUNC(void) Py_NormalizeSepsA(char *name); + + /* In their own files */ + PyAPI_FUNC(const char *) Py_GetVersion(void); +--- Python-2.7.10/Python/pythonrun.c.orig 2015-12-31 04:09:05.267647200 +0000 ++++ Python-2.7.10/Python/pythonrun.c 2015-12-31 04:06:39.381327400 +0000 +@@ -667,13 +667,67 @@ PyInterpreterState_Delete(interp); } -static char *progname = "python"; -+static char progname[PATH_MAX+1] = "python"; ++ static char progname[PATH_MAX+1] = "python"; ++ ++char ++Py_GetSepA(char *name) ++{ ++ char* msystem = (char*)2; /* So that non Windows use / as sep */ ++ static char sep = '\0'; ++#ifdef _WIN32 ++ /* https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.aspx ++ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal ++ * modification, which means that you cannot use forward slashes to represent path separators ++ */ ++ if (name != NULL && memcmp(name, "\\\\?\\", sizeof("\\\\?\\") - sizeof(char)) == 0) ++ { ++ return '\\'; ++ } ++#endif ++ if (sep != '\0') ++ return sep; ++#if defined(__MINGW32__) ++ msystem = Py_GETENV("MSYSTEM"); ++#endif ++ if (msystem != NULL) ++ sep = '/'; ++ else ++ sep = '\\'; ++ return sep; ++} ++ ++static wchar_t ++Py_GetAltSepA(char *name) ++{ ++ char sep = Py_GetSepA(name); ++ if (sep == '/') ++ return '\\'; ++ return '/'; ++} void - Py_SetProgramName(char *pn) +-Py_SetProgramName(char *pn) ++Py_NormalizeSepsA(char *name) { - if (pn && *pn) +- if (pn && *pn) - progname = pn; -+ strncpy(progname, pn, PATH_MAX); -+ pn = &progname[0]; -+#ifdef __MINGW32__ -+ char* msystem = Py_GETENV("MSYSTEM"); -+ char altsep = msystem ? '\\' : '/'; -+ char sep = msystem ? '/' : '\\'; -+ char* seps = strchr(pn, altsep); ++ char sep = Py_GetSepA(name); ++ char altsep = Py_GetAltSepA(name); ++ char* seps; ++ if (strlen(name) > 1 && name[1] == ':') { ++ name[0] = toupper(name[0]); ++ } ++ seps = strchr(name, altsep); + while(seps) { + *seps = sep; + seps = strchr(seps, altsep); + } -+#endif ++} ++ ++ void ++ Py_SetProgramName(char *pn) ++ { ++ if (pn && *pn) ++ strncpy(progname, pn, PATH_MAX); ++ pn = &progname[0]; ++ Py_NormalizeSepsA(pn); } char * +--- Python-2.7.10/Modules/posixmodule.c.orig 2015-12-31 04:14:46.133487100 +0000 ++++ Python-2.7.10/Modules/posixmodule.c 2015-12-31 04:31:31.496990600 +0000 +@@ -2220,6 +2220,8 @@ + if (res == NULL) + return posix_error(); + ++ Py_NormalizeSepsA(tmpbuf); ++ + dynamic_return = PyString_FromString(tmpbuf); + free(tmpbuf); + diff --git a/mingw-w64-python2/0610-msys-cygwin-semi-native-build-sysconfig.patch b/mingw-w64-python2/0610-msys-cygwin-semi-native-build-sysconfig.patch index e245ec5118..35a3823296 100644 --- a/mingw-w64-python2/0610-msys-cygwin-semi-native-build-sysconfig.patch +++ b/mingw-w64-python2/0610-msys-cygwin-semi-native-build-sysconfig.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:43:19.570128500 +0100 -+++ b/configure.ac 2014-10-11 22:43:22.702307700 +0100 -@@ -558,6 +558,65 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:44.553800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:50:47.829800000 +0300 +@@ -561,6 +561,65 @@ AC_MSG_RESULT([$DELIM]) AC_SUBST(DELIM) @@ -67,9 +67,9 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING([for init system calls]) AC_SUBST(INITSYS) case $host in -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 22:43:20.239166800 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 22:43:22.704307800 +0100 +diff -Naur Python-2.7.9-orig/Lib/sysconfig.py Python-2.7.9/Lib/sysconfig.py +--- Python-2.7.9-orig/Lib/sysconfig.py 2014-12-11 13:50:22.963400000 +0300 ++++ Python-2.7.9/Lib/sysconfig.py 2014-12-11 13:50:49.561400000 +0300 @@ -273,6 +273,14 @@ if isinstance(v, str): done[k] = v.strip() @@ -85,9 +85,9 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py # save the results in the global dictionary vars.update(done) return vars -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:43:19.570128500 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:43:22.705307800 +0100 +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:50:46.113800000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:49.561400000 +0300 @@ -101,6 +101,13 @@ # Install prefix for data files datarootdir= @datarootdir@ @@ -102,7 +102,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Expanded directories BINDIR= @bindir@ LIBDIR= @libdir@ -@@ -585,7 +592,7 @@ +@@ -598,7 +605,7 @@ -DPREFIX='"$(prefix)"' \ -DEXEC_PREFIX='"$(exec_prefix)"' \ -DVERSION='"$(VERSION)"' \ diff --git a/mingw-w64-python2/0620-mingw-sysconfig-like-posix.patch b/mingw-w64-python2/0620-mingw-sysconfig-like-posix.patch index 079826ecf9..8f8fe295b4 100644 --- a/mingw-w64-python2/0620-mingw-sysconfig-like-posix.patch +++ b/mingw-w64-python2/0620-mingw-sysconfig-like-posix.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 22:43:24.589415600 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 22:43:26.865545800 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/command/build_ext.py Python-2.7.9/Lib/distutils/command/build_ext.py +--- Python-2.7.9-orig/Lib/distutils/command/build_ext.py 2014-12-11 13:50:16.614200000 +0300 ++++ Python-2.7.9/Lib/distutils/command/build_ext.py 2014-12-11 13:50:51.121400000 +0300 @@ -224,9 +224,10 @@ if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): @@ -13,9 +13,9 @@ diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext else: # building python standard extensions self.library_dirs.append('.') -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 22:43:24.306399400 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 22:43:26.866545800 +0100 +diff -Naur Python-2.7.9-orig/Lib/sysconfig.py Python-2.7.9/Lib/sysconfig.py +--- Python-2.7.9-orig/Lib/sysconfig.py 2014-12-11 13:50:51.012200000 +0300 ++++ Python-2.7.9/Lib/sysconfig.py 2014-12-11 13:50:51.121400000 +0300 @@ -27,13 +27,13 @@ 'data' : '{base}', }, @@ -56,7 +56,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py 'data' : '{userbase}', }, 'posix_user': { -@@ -386,7 +386,7 @@ +@@ -390,7 +390,7 @@ vars['INCLUDEPY'] = get_path('include') vars['SO'] = '.pyd' vars['EXE'] = '.exe' diff --git a/mingw-w64-python2/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch b/mingw-w64-python2/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch index c52929fe23..c54583bfca 100644 --- a/mingw-w64-python2/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch +++ b/mingw-w64-python2/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 22:43:29.093673200 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 22:43:31.194793400 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py Python-2.7.9/Lib/distutils/cygwinccompiler.py +--- Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py 2014-12-11 13:50:19.859000000 +0300 ++++ Python-2.7.9/Lib/distutils/cygwinccompiler.py 2014-12-11 13:50:52.697000000 +0300 @@ -421,7 +421,8 @@ from distutils.spawn import find_executable import re diff --git a/mingw-w64-python2/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch b/mingw-w64-python2/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch index 9a43cae779..40674c5a8d 100644 --- a/mingw-w64-python2/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch +++ b/mingw-w64-python2/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/pyport.h b/Include/pyport.h ---- a/Include/pyport.h 2014-10-11 22:43:32.743882000 +0100 -+++ b/Include/pyport.h 2014-10-11 22:43:35.492039200 +0100 +diff -Naur Python-2.7.9-orig/Include/pyport.h Python-2.7.9/Include/pyport.h +--- Python-2.7.9-orig/Include/pyport.h 2014-12-11 13:49:56.256200000 +0300 ++++ Python-2.7.9/Include/pyport.h 2014-12-11 13:50:54.272600000 +0300 @@ -218,9 +218,11 @@ /* Smallest negative value of type Py_ssize_t. */ #define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1) diff --git a/mingw-w64-python2/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch b/mingw-w64-python2/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch index 512561f969..f6512fb571 100644 --- a/mingw-w64-python2/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch +++ b/mingw-w64-python2/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:43:36.775112600 +0100 -+++ b/setup.py 2014-10-11 22:43:39.624275500 +0100 -@@ -445,7 +445,8 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:42.947000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:50:55.785800000 +0300 +@@ -447,7 +447,8 @@ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') if cross_compiling: self.add_gcc_paths() diff --git a/mingw-w64-python2/0660-mingw-use-backslashes-in-compileall-py.patch b/mingw-w64-python2/0660-mingw-use-backslashes-in-compileall-py.patch index 4c0409fa1d..0524aad17e 100644 --- a/mingw-w64-python2/0660-mingw-use-backslashes-in-compileall-py.patch +++ b/mingw-w64-python2/0660-mingw-use-backslashes-in-compileall-py.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/compileall.py b/Lib/compileall.py ---- a/Lib/compileall.py 2014-10-11 22:43:41.317372400 +0100 -+++ b/Lib/compileall.py 2014-10-11 22:43:43.763512300 +0100 +diff -Naur Python-2.7.9-orig/Lib/compileall.py Python-2.7.9/Lib/compileall.py +--- Python-2.7.9-orig/Lib/compileall.py 2014-12-10 18:59:33.000000000 +0300 ++++ Python-2.7.9/Lib/compileall.py 2014-12-11 13:50:57.377000000 +0300 @@ -42,6 +42,8 @@ success = 1 for name in names: diff --git a/mingw-w64-python2/0670-msys-convert_path-fix-and-root-hack.patch b/mingw-w64-python2/0670-msys-convert_path-fix-and-root-hack.patch index 42dbb0067f..7c854f12a5 100644 --- a/mingw-w64-python2/0670-msys-convert_path-fix-and-root-hack.patch +++ b/mingw-w64-python2/0670-msys-convert_path-fix-and-root-hack.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py ---- a/Lib/distutils/command/install.py 2014-10-11 22:43:46.022641500 +0100 -+++ b/Lib/distutils/command/install.py 2014-10-11 22:43:47.954752000 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/command/install.py Python-2.7.9/Lib/distutils/command/install.py +--- Python-2.7.9-orig/Lib/distutils/command/install.py 2014-12-10 18:59:34.000000000 +0300 ++++ Python-2.7.9/Lib/distutils/command/install.py 2014-12-11 13:50:58.983800000 +0300 @@ -348,7 +348,8 @@ # Convert directories from Unix /-separated syntax to the local @@ -11,9 +11,9 @@ diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py 'scripts', 'data', 'headers', 'userbase', 'usersite') -diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py ---- a/Lib/distutils/util.py 2014-10-11 22:43:46.029641900 +0100 -+++ b/Lib/distutils/util.py 2014-10-11 22:43:47.956752100 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/util.py Python-2.7.9/Lib/distutils/util.py +--- Python-2.7.9-orig/Lib/distutils/util.py 2014-12-11 13:50:16.614200000 +0300 ++++ Python-2.7.9/Lib/distutils/util.py 2014-12-11 13:50:58.983800000 +0300 @@ -132,6 +132,13 @@ paths.remove('.') if not paths: @@ -70,10 +70,10 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py else: raise DistutilsPlatformError, \ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:43:44.965581000 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:43:47.957752200 +0100 -@@ -1161,6 +1161,12 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:50:51.012200000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:50:58.999400000 +0300 +@@ -1194,6 +1194,12 @@ ;; \ esac @@ -86,7 +86,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods -@@ -1168,8 +1174,8 @@ +@@ -1201,8 +1207,8 @@ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ @@ -97,7 +97,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Here are a couple of targets for MacOSX again, to install a full # framework-based Python. frameworkinstall installs everything, the -@@ -1241,7 +1247,7 @@ +@@ -1274,7 +1280,7 @@ $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ diff --git a/mingw-w64-python2/0690-allow-static-tcltk.patch b/mingw-w64-python2/0690-allow-static-tcltk.patch index da68688ed8..7a3c2baa05 100644 --- a/mingw-w64-python2/0690-allow-static-tcltk.patch +++ b/mingw-w64-python2/0690-allow-static-tcltk.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:43:49.143820000 +0100 -+++ b/setup.py 2014-10-11 22:43:52.192994400 +0100 -@@ -536,7 +536,7 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:50:57.252200000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:51:00.543800000 +0300 +@@ -538,7 +538,7 @@ if host_platform == 'hp-ux11': lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] @@ -10,7 +10,7 @@ diff -urN a/setup.py b/setup.py # This should work on any unixy platform ;-) # If the user has bothered specifying additional -I and -L flags # in OPT and LDFLAGS we might as well use them here. -@@ -545,6 +545,8 @@ +@@ -547,6 +547,8 @@ # with whitespace in the name to store libraries. cflags, ldflags = sysconfig.get_config_vars( 'CFLAGS', 'LDFLAGS') @@ -19,7 +19,7 @@ diff -urN a/setup.py b/setup.py for item in cflags.split(): if item.startswith('-I'): inc_dirs.append(item[2:]) -@@ -1939,14 +1941,19 @@ +@@ -1941,14 +1943,19 @@ # The versions with dots are used on Unix, and the versions without # dots on Windows, for detection by cygwin. tcllib = tklib = tcl_includes = tk_includes = None @@ -47,7 +47,7 @@ diff -urN a/setup.py b/setup.py break # Now check for the header files -@@ -2017,13 +2024,21 @@ +@@ -2019,13 +2026,21 @@ # Add the Tcl/Tk libraries libs.append('tk'+ version) libs.append('tcl'+ version) diff --git a/mingw-w64-python2/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch b/mingw-w64-python2/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch index e92057d83c..e1ebaf8a58 100644 --- a/mingw-w64-python2/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch +++ b/mingw-w64-python2/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:43:54.245111800 +0100 -+++ b/configure.ac 2014-10-11 22:43:56.507241200 +0100 -@@ -4713,15 +4713,51 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:50:50.996600000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:51:02.103800000 +0300 +@@ -4716,15 +4716,51 @@ fi AC_MSG_CHECKING(whether WINDOW has _flags) @@ -55,9 +55,9 @@ diff -urN a/configure.ac b/configure.ac if test "$ac_cv_window_has_flags" = yes then -diff -urN a/Include/py_curses.h b/Include/py_curses.h ---- a/Include/py_curses.h 2014-10-11 22:43:53.706081000 +0100 -+++ b/Include/py_curses.h 2014-10-11 22:43:56.508241200 +0100 +diff -Naur Python-2.7.9-orig/Include/py_curses.h Python-2.7.9/Include/py_curses.h +--- Python-2.7.9-orig/Include/py_curses.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/py_curses.h 2014-12-11 13:51:02.103800000 +0300 @@ -14,7 +14,9 @@ /* the following define is necessary for OS X 10.6; without it, the Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python @@ -81,9 +81,9 @@ diff -urN a/Include/py_curses.h b/Include/py_curses.h #ifndef MVWDELCH_IS_EXPRESSION #define MVWDELCH_IS_EXPRESSION 1 #endif -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 22:43:53.557072400 +0100 -+++ b/pyconfig.h.in 2014-10-11 22:43:56.509241300 +0100 +diff -Naur Python-2.7.9-orig/pyconfig.h.in Python-2.7.9/pyconfig.h.in +--- Python-2.7.9-orig/pyconfig.h.in 2014-12-11 13:50:34.460600000 +0300 ++++ Python-2.7.9/pyconfig.h.in 2014-12-11 13:51:02.103800000 +0300 @@ -945,6 +945,12 @@ /* Define to 1 if you want to use native NT threads */ #undef NT_THREADS diff --git a/mingw-w64-python2/0720-mingw-pdcurses_ISPAD.patch b/mingw-w64-python2/0720-mingw-pdcurses_ISPAD.patch index 64f6efd1a4..8f7bed4900 100644 --- a/mingw-w64-python2/0720-mingw-pdcurses_ISPAD.patch +++ b/mingw-w64-python2/0720-mingw-pdcurses_ISPAD.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/py_curses.h b/Include/py_curses.h ---- a/Include/py_curses.h 2014-10-11 22:43:58.023327900 +0100 -+++ b/Include/py_curses.h 2014-10-11 22:44:00.752484000 +0100 +diff -Naur Python-2.7.9-orig/Include/py_curses.h Python-2.7.9/Include/py_curses.h +--- Python-2.7.9-orig/Include/py_curses.h 2014-12-11 13:51:03.523400000 +0300 ++++ Python-2.7.9/Include/py_curses.h 2014-12-11 13:51:03.632600000 +0300 @@ -56,6 +56,10 @@ #endif #endif diff --git a/mingw-w64-python2/0740-grammar-fixes.patch b/mingw-w64-python2/0740-grammar-fixes.patch index 36e5775db4..61bad410c4 100644 --- a/mingw-w64-python2/0740-grammar-fixes.patch +++ b/mingw-w64-python2/0740-grammar-fixes.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/parsermodule.c b/Modules/parsermodule.c ---- a/Modules/parsermodule.c 2014-10-11 22:44:02.797601000 +0100 -+++ b/Modules/parsermodule.c 2014-10-11 22:44:04.881720200 +0100 +diff -Naur Python-2.7.9-orig/Modules/parsermodule.c Python-2.7.9/Modules/parsermodule.c +--- Python-2.7.9-orig/Modules/parsermodule.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/parsermodule.c 2014-12-11 13:51:05.192600000 +0300 @@ -39,7 +39,7 @@ #include "ast.h" #include "pyarena.h" @@ -10,9 +10,9 @@ diff -urN a/Modules/parsermodule.c b/Modules/parsermodule.c #ifdef lint #include -diff -urN a/Parser/metagrammar.c b/Parser/metagrammar.c ---- a/Parser/metagrammar.c 2014-10-11 22:44:01.884548800 +0100 -+++ b/Parser/metagrammar.c 2014-10-11 22:44:04.882720200 +0100 +diff -Naur Python-2.7.9-orig/Parser/metagrammar.c Python-2.7.9/Parser/metagrammar.c +--- Python-2.7.9-orig/Parser/metagrammar.c 2014-12-10 18:59:58.000000000 +0300 ++++ Python-2.7.9/Parser/metagrammar.c 2014-12-11 13:51:05.192600000 +0300 @@ -139,7 +139,7 @@ {7, 0}, {8, 0}, diff --git a/mingw-w64-python2/0750-Add-interp-Python-DESTSHARED-to-PYTHONPATH-b4-pybuilddir-txt-dir.patch b/mingw-w64-python2/0750-Add-interp-Python-DESTSHARED-to-PYTHONPATH-b4-pybuilddir-txt-dir.patch index f6aeef04a9..d225248c86 100644 --- a/mingw-w64-python2/0750-Add-interp-Python-DESTSHARED-to-PYTHONPATH-b4-pybuilddir-txt-dir.patch +++ b/mingw-w64-python2/0750-Add-interp-Python-DESTSHARED-to-PYTHONPATH-b4-pybuilddir-txt-dir.patch @@ -1,17 +1,17 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:44:06.197795500 +0100 -+++ b/configure.ac 2014-10-11 22:44:09.163965100 +0100 -@@ -30,7 +30,12 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:51:03.523400000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:51:06.783800000 +0300 +@@ -33,7 +33,12 @@ AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) fi AC_MSG_RESULT($interp) -- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp + # For reference see: http://bugs.python.org/msg180577 + # interp's DESTSHARED must appear before that contained in pybuilddir.txt as otherwise, when compiling during make install, + # the build Python will attempt to load shared modules from the host Python, which will fail due to them being of the wrong + # architecture (e.g. x86_64 vs x86 or arm). It would probably be better if _sysconfigdata.py was placed elsewhere, + # i.e. in a folder that does not also contain incompatible shared modules. -+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH='$($interp -c "import sysconfig; print sysconfig.get_config_var(\"DESTSHARED\")")':$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH='$($interp -c "import sysconfig; print sysconfig.get_config_var(\"DESTSHARED\")")':$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp fi elif test "$cross_compiling" = maybe; then AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) diff --git a/mingw-w64-python2/0760-msys-monkeypatch-os-system-via-sh-exe.patch b/mingw-w64-python2/0760-msys-monkeypatch-os-system-via-sh-exe.patch index 2f93c7b85e..a94edc2450 100644 --- a/mingw-w64-python2/0760-msys-monkeypatch-os-system-via-sh-exe.patch +++ b/mingw-w64-python2/0760-msys-monkeypatch-os-system-via-sh-exe.patch @@ -1,6 +1,6 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:44:10.289029500 +0100 -+++ b/setup.py 2014-10-11 22:44:13.372205800 +0100 +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:51:01.994600000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:51:08.359400000 +0300 @@ -29,6 +29,17 @@ return sys.platform host_platform = get_platform() diff --git a/mingw-w64-python2/0770-msys-replace-slashes-used-in-io-redirection.patch b/mingw-w64-python2/0770-msys-replace-slashes-used-in-io-redirection.patch index 0d3eac4d07..2b572180b2 100644 --- a/mingw-w64-python2/0770-msys-replace-slashes-used-in-io-redirection.patch +++ b/mingw-w64-python2/0770-msys-replace-slashes-used-in-io-redirection.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:44:14.594275700 +0100 -+++ b/setup.py 2014-10-11 22:44:17.699453300 +0100 -@@ -375,7 +375,7 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:51:09.919400000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:51:10.059800000 +0300 +@@ -377,7 +377,7 @@ # Debian/Ubuntu multiarch support. # https://wiki.ubuntu.com/MultiarchSpec cc = sysconfig.get_config_var('CC') @@ -10,7 +10,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system( -@@ -400,7 +400,7 @@ +@@ -402,7 +402,7 @@ opt = '' if cross_compiling: opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE') @@ -19,7 +19,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system( -@@ -419,7 +419,7 @@ +@@ -421,7 +421,7 @@ def add_gcc_paths(self): gcc = sysconfig.get_config_var('CC') @@ -28,7 +28,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system('%s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) -@@ -873,7 +873,7 @@ +@@ -875,7 +875,7 @@ opensslv_h = find_file('openssl/opensslv.h', [], inc_dirs + search_for_ssl_incs_in) if opensslv_h: @@ -37,7 +37,7 @@ diff -urN a/setup.py b/setup.py if host_platform == 'darwin' and is_macosx_sdk_path(name): name = os.path.join(macosx_sdk_root(), name[1:]) try: -@@ -1906,9 +1906,9 @@ +@@ -1908,9 +1908,9 @@ archs = re.findall('-arch\s+(\w+)', cflags) if is_macosx_sdk_path(F): diff --git a/mingw-w64-python2/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch b/mingw-w64-python2/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch index 747bdcdb8c..70d740955e 100644 --- a/mingw-w64-python2/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch +++ b/mingw-w64-python2/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 22:44:19.906579600 +0100 -+++ b/Modules/getpath.c 2014-10-11 22:44:22.003699500 +0100 +diff -Naur Python-2.7.9-orig/Modules/getpath.c Python-2.7.9/Modules/getpath.c +--- Python-2.7.9-orig/Modules/getpath.c 2014-12-11 13:50:40.731800000 +0300 ++++ Python-2.7.9/Modules/getpath.c 2014-12-11 13:51:11.604200000 +0300 @@ -645,7 +645,10 @@ bufsz += strlen(zip_path) + 1; diff --git a/mingw-w64-python2/0800-mingw-install-layout-as-posix.patch b/mingw-w64-python2/0800-mingw-install-layout-as-posix.patch index 3321a4a32d..f1e6455b73 100644 --- a/mingw-w64-python2/0800-mingw-install-layout-as-posix.patch +++ b/mingw-w64-python2/0800-mingw-install-layout-as-posix.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py ---- a/Lib/distutils/command/install.py 2014-10-11 22:44:23.655794000 +0100 -+++ b/Lib/distutils/command/install.py 2014-10-11 22:44:26.318946300 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/command/install.py Python-2.7.9/Lib/distutils/command/install.py +--- Python-2.7.9-orig/Lib/distutils/command/install.py 2014-12-11 13:51:00.419000000 +0300 ++++ Python-2.7.9/Lib/distutils/command/install.py 2014-12-11 13:51:13.179800000 +0300 @@ -32,10 +32,10 @@ } else: diff --git a/mingw-w64-python2/0820-mingw-reorder-bininstall-ln-symlink-creation.patch b/mingw-w64-python2/0820-mingw-reorder-bininstall-ln-symlink-creation.patch index 27034b1aa6..c802edfdda 100644 --- a/mingw-w64-python2/0820-mingw-reorder-bininstall-ln-symlink-creation.patch +++ b/mingw-w64-python2/0820-mingw-reorder-bininstall-ln-symlink-creation.patch @@ -1,7 +1,7 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:44:28.635078800 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:44:30.433181600 +0100 -@@ -872,9 +872,9 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:51:00.419000000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:51:14.771000000 +0300 +@@ -904,9 +904,9 @@ then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ else true; \ fi diff --git a/mingw-w64-python2/0830-add-build-sysroot-config-option.patch b/mingw-w64-python2/0830-add-build-sysroot-config-option.patch index be1c2f3d63..3581420f85 100644 --- a/mingw-w64-python2/0830-add-build-sysroot-config-option.patch +++ b/mingw-w64-python2/0830-add-build-sysroot-config-option.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:44:32.692310900 +0100 -+++ b/configure.ac 2014-10-11 22:44:34.687425000 +0100 -@@ -638,6 +638,17 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:51:08.234600000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:51:16.409000000 +0300 +@@ -641,6 +641,17 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -19,9 +19,9 @@ diff -urN a/configure.ac b/configure.ac # checks for alternative programs # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:44:31.726255600 +0100 -+++ b/setup.py 2014-10-11 22:44:34.689425100 +0100 +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:51:11.495000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:51:16.409000000 +0300 @@ -43,6 +43,16 @@ # Were we compiled --with-pydebug or with #define Py_DEBUG? COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) @@ -39,7 +39,7 @@ diff -urN a/setup.py b/setup.py # This global variable is used to hold the list of modules to be disabled. disabled_module_list = [] -@@ -389,10 +399,11 @@ +@@ -391,10 +401,11 @@ os.unlink(tmpfile) if multiarch_path_component != '': @@ -55,7 +55,7 @@ diff -urN a/setup.py b/setup.py return if not find_executable('dpkg-architecture'): -@@ -410,10 +421,11 @@ +@@ -412,10 +423,11 @@ if ret >> 8 == 0: with open(tmpfile) as fp: multiarch_path_component = fp.readline().strip() @@ -71,7 +71,7 @@ diff -urN a/setup.py b/setup.py finally: os.unlink(tmpfile) -@@ -451,7 +463,7 @@ +@@ -453,7 +465,7 @@ def detect_modules(self): # Ensure that /usr/local is always used @@ -80,7 +80,7 @@ diff -urN a/setup.py b/setup.py add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') if cross_compiling: -@@ -514,7 +526,7 @@ +@@ -516,7 +528,7 @@ # be assumed that no additional -I,-L directives are needed. inc_dirs = self.compiler.include_dirs[:] lib_dirs = self.compiler.library_dirs[:] @@ -89,7 +89,7 @@ diff -urN a/setup.py b/setup.py for d in ( '/usr/include', ): -@@ -802,11 +814,11 @@ +@@ -804,11 +816,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + @@ -103,7 +103,7 @@ diff -urN a/setup.py b/setup.py extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: -@@ -835,20 +847,20 @@ +@@ -837,20 +849,20 @@ libraries=_socket_libs) ) # Detect SSL support for the socket module (via _ssl) search_for_ssl_incs_in = [ diff --git a/mingw-w64-python2/0840-add-builddir-to-library_dirs.patch b/mingw-w64-python2/0840-add-builddir-to-library_dirs.patch index 7c96cd0bd8..8959aa02a5 100644 --- a/mingw-w64-python2/0840-add-builddir-to-library_dirs.patch +++ b/mingw-w64-python2/0840-add-builddir-to-library_dirs.patch @@ -1,13 +1,12 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 22:44:35.931496100 +0100 -+++ b/setup.py 2014-10-11 22:44:38.916666900 +0100 -@@ -272,6 +272,9 @@ +diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py +--- Python-2.7.9-orig/setup.py 2014-12-11 13:51:17.891000000 +0300 ++++ Python-2.7.9/setup.py 2014-12-11 13:51:18.015800000 +0300 +@@ -272,6 +272,8 @@ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags self.compiler.set_executables(**args) -+ if host_platform not in ['mingw', 'win32']: -+ self.compiler.library_dirs.insert(0, '.') ++ self.compiler.library_dirs.insert(0, '.') + build_ext.build_extensions(self) - longest = max([len(e.name) for e in self.extensions]) + longest = 0 diff --git a/mingw-w64-python2/0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch b/mingw-w64-python2/0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch new file mode 100644 index 0000000000..4762b0abfc --- /dev/null +++ b/mingw-w64-python2/0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch @@ -0,0 +1,26 @@ +--- Python-2.7.10/setup.py.orig 2015-12-28 12:34:14.075841800 +0000 ++++ Python-2.7.10/setup.py 2015-12-28 15:47:57.770679100 +0000 +@@ -1731,6 +1731,23 @@ + if '_tkinter' not in [e.name for e in self.extensions]: + missing.append('_tkinter') + ++ # Remove any extensions.library_dirs that are also in compiler.library_dirs ++ # Rationale: It's wrong. Ok, better. The compiler.library_dirs appear first ++ # in the link command line and (finally, not yet) include "." which ++ # causes the build dir to be searched in for -lpython2.7 before ++ # $sysroot/lib. This is necessary as otherwise the old python import ++ # library is used instead of the new one. This affects sqlite (and ++ # some others). I could go into fixing these individually .. but I ++ # worry I'll be back here in 6 months fixing the same bug again if ++ # I do for some other module(s) in Python 2.7.12. In our case, ++ # C:/msys64/mingw64/lib was turning up as that's where libsqlite was ++ # and this prevented me from switching from an installed release to ++ # an new debug Python. We should be building in clean sysroots but ++ # that's another matter really. ++ for ext in self.extensions: ++ ext.library_dirs = [dir for dir in ext.library_dirs ++ if dir not in self.compiler.library_dirs] ++ + ## # Uncomment these lines if you want to play with xxmodule.c + ## ext = Extension('xx', ['xxmodule.c']) + ## self.extensions.append(ext) diff --git a/mingw-w64-python2/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch b/mingw-w64-python2/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch index afd1530c4d..3a27184ede 100644 --- a/mingw-w64-python2/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch +++ b/mingw-w64-python2/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:44:40.129736300 +0100 -+++ b/configure.ac 2014-10-11 22:44:43.194911600 +0100 -@@ -21,7 +21,8 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:51:17.891000000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:51:19.669400000 +0300 +@@ -24,7 +24,8 @@ if test -z "$PYTHON_FOR_BUILD"; then for interp in python$PACKAGE_VERSION python2 python; do which $interp >/dev/null 2>&1 || continue diff --git a/mingw-w64-python2/0855-mingw-fix-ssl-dont-use-enum_certificates.patch b/mingw-w64-python2/0855-mingw-fix-ssl-dont-use-enum_certificates.patch new file mode 100644 index 0000000000..2365c78d93 --- /dev/null +++ b/mingw-w64-python2/0855-mingw-fix-ssl-dont-use-enum_certificates.patch @@ -0,0 +1,21 @@ +diff -urN a/Lib/ssl.py b/Lib/ssl.py +--- a/Lib/ssl.py 2014-10-11 14:23:27.721614900 +0100 ++++ b/Lib/ssl.py 2014-10-11 14:23:30.169754900 +0100 +@@ -144,7 +144,7 @@ + _SSLv2_IF_EXISTS = None + + from socket import socket, _fileobject, _delegate_methods, error as socket_error +-if sys.platform == "win32": ++if sys.platform == "win32" and sys.version.find("GCC") == -1: + from _ssl import enum_certificates, enum_crls + + from socket import socket, AF_INET, SOCK_STREAM, create_connection +@@ -387,7 +387,7 @@ + def load_default_certs(self, purpose=Purpose.SERVER_AUTH): + if not isinstance(purpose, _ASN1Object): + raise TypeError(purpose) +- if sys.platform == "win32": ++ if sys.platform == "win32" and sys.version.find("GCC") == -1: + for storename in self._windows_cert_stores: + self._load_windows_store_certs(storename, purpose) + else: diff --git a/mingw-w64-python2/0860-mingw-build-optimized-ext.patch b/mingw-w64-python2/0860-mingw-build-optimized-ext.patch index acc750eb2c..8f0b568709 100644 --- a/mingw-w64-python2/0860-mingw-build-optimized-ext.patch +++ b/mingw-w64-python2/0860-mingw-build-optimized-ext.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 22:44:44.871007400 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 22:44:47.486157000 +0100 +diff -Naur Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py Python-2.7.9/Lib/distutils/cygwinccompiler.py +--- Python-2.7.9-orig/Lib/distutils/cygwinccompiler.py 2014-12-11 13:50:54.147800000 +0300 ++++ Python-2.7.9/Lib/distutils/cygwinccompiler.py 2014-12-11 13:51:21.245000000 +0300 @@ -330,9 +330,9 @@ else: no_cygwin = '' diff --git a/mingw-w64-python2/0870-mingw-add-LIBPL-to-library-dirs.patch b/mingw-w64-python2/0870-mingw-add-LIBPL-to-library-dirs.patch new file mode 100644 index 0000000000..ae29727af0 --- /dev/null +++ b/mingw-w64-python2/0870-mingw-add-LIBPL-to-library-dirs.patch @@ -0,0 +1,12 @@ +diff -Naur Python-2.7.9-orig/Lib/distutils/command/build_ext.py Python-2.7.9/Lib/distutils/command/build_ext.py +--- Python-2.7.9-orig/Lib/distutils/command/build_ext.py 2014-12-11 13:50:52.587800000 +0300 ++++ Python-2.7.9/Lib/distutils/command/build_ext.py 2014-12-11 13:58:32.038800000 +0300 +@@ -221,7 +221,7 @@ + + # for extensions under Cygwin and AtheOS Python's library directory must be + # appended to library_dirs +- if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': ++ if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or self.plat_name.startswith(('mingw')): + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): + # building third party extensions + config_dir_name = os.path.basename(sysconfig.get_config_var('LIBPL')) diff --git a/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch index 33dbb4eb9f..5a0fab1779 100644 --- a/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch +++ b/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch @@ -1,6 +1,6 @@ -diff -urN a/Python/sysmodule.c b/Python/sysmodule.c ---- a/Python/sysmodule.c 2014-10-11 22:44:48.690225900 +0100 -+++ b/Python/sysmodule.c 2014-10-11 22:44:51.785402900 +0100 +diff -Naur Python-2.7.9-orig/Python/sysmodule.c Python-2.7.9/Python/sysmodule.c +--- Python-2.7.9-orig/Python/sysmodule.c 2014-12-10 18:59:59.000000000 +0300 ++++ Python-2.7.9/Python/sysmodule.c 2014-12-11 13:51:23.085800000 +0300 @@ -27,7 +27,7 @@ #include "windows.h" #endif /* MS_WINDOWS */ @@ -10,7 +10,7 @@ diff -urN a/Python/sysmodule.c b/Python/sysmodule.c extern void *PyWin_DLLhModule; /* A string loaded from the DLL at startup: */ extern const char *PyWin_DLLVersionString; -@@ -1459,7 +1459,7 @@ +@@ -1473,7 +1473,7 @@ SET_SYS_FROM_STRING("byteorder", PyString_FromString(value)); } diff --git a/mingw-w64-python2/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch b/mingw-w64-python2/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch new file mode 100644 index 0000000000..80656671a9 --- /dev/null +++ b/mingw-w64-python2/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch @@ -0,0 +1,26 @@ +--- Python-2.7.10/Python/getcompiler.c.orig 2015-05-23 17:09:24.000000000 +0100 ++++ Python-2.7.10/Python/getcompiler.c 2016-01-02 17:10:40.399949300 +0000 +@@ -6,7 +6,22 @@ + #ifndef COMPILER + + #ifdef __GNUC__ +-#define COMPILER "\n[GCC " __VERSION__ "]" ++/* To not break compatibility with things that determine ++ CPU arch by calling get_build_version in msvccompiler.py ++ (such as NumPy) add "32 bit" or "64 bit (AMD64)" on Windows ++ and also use a space as a separator rather than a newline. */ ++#if defined(_WIN32) ++#define COMP_SEP " " ++#if defined(__x86_64__) ++#define ARCH_SUFFIX " 64 bit (AMD64)" ++#else ++#define ARCH_SUFFIX " 32 bit" ++#endif ++#else ++#define COMP_SEP "\n" ++#define ARCH_SUFFIX "" ++#endif ++#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]" + #endif + + #endif /* !COMPILER */ diff --git a/mingw-w64-python2/1000-dont-link-with-gettext.patch b/mingw-w64-python2/1000-dont-link-with-gettext.patch index c6fd03f786..3c70d78092 100644 --- a/mingw-w64-python2/1000-dont-link-with-gettext.patch +++ b/mingw-w64-python2/1000-dont-link-with-gettext.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 22:44:52.898466600 +0100 -+++ b/configure.ac 2014-10-11 22:44:55.858635900 +0100 -@@ -2499,9 +2499,18 @@ +diff -Naur Python-2.7.9-orig/configure.ac Python-2.7.9/configure.ac +--- Python-2.7.9-orig/configure.ac 2014-12-11 13:51:21.135800000 +0300 ++++ Python-2.7.9/configure.ac 2014-12-11 13:51:24.614600000 +0300 +@@ -2502,9 +2502,18 @@ fi # check if we need libintl for locale functions @@ -20,9 +20,9 @@ diff -urN a/configure.ac b/configure.ac # checks for system dependent C++ extensions support case "$ac_sys_system" in -diff -urN a/Modules/_localemodule.c b/Modules/_localemodule.c ---- a/Modules/_localemodule.c 2014-10-11 22:44:53.976528200 +0100 -+++ b/Modules/_localemodule.c 2014-10-11 22:44:55.860636000 +0100 +diff -Naur Python-2.7.9-orig/Modules/_localemodule.c Python-2.7.9/Modules/_localemodule.c +--- Python-2.7.9-orig/Modules/_localemodule.c 2014-12-10 18:59:53.000000000 +0300 ++++ Python-2.7.9/Modules/_localemodule.c 2014-12-11 13:51:24.614600000 +0300 @@ -10,6 +10,13 @@ ******************************************************************/ diff --git a/mingw-w64-python2/1010-ctypes-python-dll.patch b/mingw-w64-python2/1010-ctypes-python-dll.patch index b9febaa5b9..f4de66d7bb 100644 --- a/mingw-w64-python2/1010-ctypes-python-dll.patch +++ b/mingw-w64-python2/1010-ctypes-python-dll.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py ---- a/Lib/ctypes/__init__.py 2014-10-11 22:44:57.632737400 +0100 -+++ b/Lib/ctypes/__init__.py 2014-10-11 22:45:00.213885000 +0100 +diff -Naur Python-2.7.9-orig/Lib/ctypes/__init__.py Python-2.7.9/Lib/ctypes/__init__.py +--- Python-2.7.9-orig/Lib/ctypes/__init__.py 2014-12-10 18:59:33.000000000 +0300 ++++ Python-2.7.9/Lib/ctypes/__init__.py 2014-12-11 13:51:26.439800000 +0300 @@ -445,7 +445,9 @@ cdll = LibraryLoader(CDLL) pydll = LibraryLoader(PyDLL) diff --git a/mingw-w64-python2/1020-gdbm-module-includes.patch b/mingw-w64-python2/1020-gdbm-module-includes.patch index a1f4b9a92e..75d1a24c46 100644 --- a/mingw-w64-python2/1020-gdbm-module-includes.patch +++ b/mingw-w64-python2/1020-gdbm-module-includes.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c ---- a/Modules/gdbmmodule.c 2014-10-11 22:45:02.211999300 +0100 -+++ b/Modules/gdbmmodule.c 2014-10-11 22:45:04.424125800 +0100 +diff -Naur Python-2.7.9-orig/Modules/gdbmmodule.c Python-2.7.9/Modules/gdbmmodule.c +--- Python-2.7.9-orig/Modules/gdbmmodule.c 2014-12-10 18:59:55.000000000 +0300 ++++ Python-2.7.9/Modules/gdbmmodule.c 2014-12-11 13:51:28.155800000 +0300 @@ -11,7 +11,7 @@ #include #include "gdbm.h" diff --git a/mingw-w64-python2/1030-use-gnu_printf-in-format.patch b/mingw-w64-python2/1030-use-gnu_printf-in-format.patch index 162ee9e115..eb914739c9 100644 --- a/mingw-w64-python2/1030-use-gnu_printf-in-format.patch +++ b/mingw-w64-python2/1030-use-gnu_printf-in-format.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/pgenheaders.h b/Include/pgenheaders.h ---- a/Include/pgenheaders.h 2014-10-11 22:45:06.759259400 +0100 -+++ b/Include/pgenheaders.h 2014-10-11 22:45:08.679369200 +0100 +diff -Naur Python-2.7.9-orig/Include/pgenheaders.h Python-2.7.9/Include/pgenheaders.h +--- Python-2.7.9-orig/Include/pgenheaders.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/pgenheaders.h 2014-12-11 13:51:30.074600000 +0300 @@ -10,9 +10,9 @@ #include "Python.h" @@ -13,9 +13,9 @@ diff -urN a/Include/pgenheaders.h b/Include/pgenheaders.h #define addarc _Py_addarc #define addbit _Py_addbit -diff -urN a/Include/pyerrors.h b/Include/pyerrors.h ---- a/Include/pyerrors.h 2014-10-11 22:45:06.774260200 +0100 -+++ b/Include/pyerrors.h 2014-10-11 22:45:08.680369300 +0100 +diff -Naur Python-2.7.9-orig/Include/pyerrors.h Python-2.7.9/Include/pyerrors.h +--- Python-2.7.9-orig/Include/pyerrors.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/pyerrors.h 2014-12-11 13:51:30.074600000 +0300 @@ -193,7 +193,7 @@ #endif /* MS_WINDOWS */ @@ -37,9 +37,9 @@ diff -urN a/Include/pyerrors.h b/Include/pyerrors.h #ifdef __cplusplus } -diff -urN a/Include/stringobject.h b/Include/stringobject.h ---- a/Include/stringobject.h 2014-10-11 22:45:06.772260100 +0100 -+++ b/Include/stringobject.h 2014-10-11 22:45:08.680369300 +0100 +diff -Naur Python-2.7.9-orig/Include/stringobject.h Python-2.7.9/Include/stringobject.h +--- Python-2.7.9-orig/Include/stringobject.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/stringobject.h 2014-12-11 13:51:30.090200000 +0300 @@ -62,9 +62,9 @@ PyAPI_FUNC(PyObject *) PyString_FromStringAndSize(const char *, Py_ssize_t); PyAPI_FUNC(PyObject *) PyString_FromString(const char *); @@ -52,9 +52,9 @@ diff -urN a/Include/stringobject.h b/Include/stringobject.h PyAPI_FUNC(Py_ssize_t) PyString_Size(PyObject *); PyAPI_FUNC(char *) PyString_AsString(PyObject *); PyAPI_FUNC(PyObject *) PyString_Repr(PyObject *, int); -diff -urN a/Include/sysmodule.h b/Include/sysmodule.h ---- a/Include/sysmodule.h 2014-10-11 22:45:06.770260000 +0100 -+++ b/Include/sysmodule.h 2014-10-11 22:45:08.681369300 +0100 +diff -Naur Python-2.7.9-orig/Include/sysmodule.h Python-2.7.9/Include/sysmodule.h +--- Python-2.7.9-orig/Include/sysmodule.h 2014-12-10 18:59:32.000000000 +0300 ++++ Python-2.7.9/Include/sysmodule.h 2014-12-11 13:51:30.090200000 +0300 @@ -15,9 +15,9 @@ PyAPI_FUNC(void) PySys_SetPath(char *); diff --git a/mingw-w64-python2/1040-install-msilib.patch b/mingw-w64-python2/1040-install-msilib.patch index fc830c3302..7aa27e6081 100644 --- a/mingw-w64-python2/1040-install-msilib.patch +++ b/mingw-w64-python2/1040-install-msilib.patch @@ -1,7 +1,7 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 22:45:09.804433500 +0100 -+++ b/Makefile.pre.in 2014-10-11 22:45:12.907611000 +0100 -@@ -964,6 +964,7 @@ +diff -Naur Python-2.7.9-orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in +--- Python-2.7.9-orig/Makefile.pre.in 2014-12-11 13:51:16.284200000 +0300 ++++ Python-2.7.9/Makefile.pre.in 2014-12-11 13:51:31.728200000 +0300 +@@ -997,6 +997,7 @@ distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ multiprocessing multiprocessing/dummy \ unittest unittest/test \ diff --git a/mingw-w64-python2/2000-distutils-add-windmc-to-cygwinccompiler.patch b/mingw-w64-python2/2000-distutils-add-windmc-to-cygwinccompiler.patch new file mode 100644 index 0000000000..017c9a67b8 --- /dev/null +++ b/mingw-w64-python2/2000-distutils-add-windmc-to-cygwinccompiler.patch @@ -0,0 +1,41 @@ +diff -aur 1040/Lib/distutils/cygwinccompiler.py 2000/Lib/distutils/cygwinccompiler.py +--- 1040/Lib/distutils/cygwinccompiler.py 2015-03-31 19:50:52.675374300 -0300 ++++ 2000/Lib/distutils/cygwinccompiler.py 2015-03-31 19:57:35.460903800 -0300 +@@ -159,6 +159,28 @@ + self.spawn(["windres", "-i", src, "-o", obj]) + except DistutilsExecError, msg: + raise CompileError, msg ++ elif ext == '.mc': ++ # Adapted from msvc9compiler: ++ # ++ # Compile .MC to .RC file to .RES file. ++ # * '-h dir' specifies the directory for the generated include file ++ # * '-r dir' specifies the target directory of the generated RC file and the binary message resource it includes ++ # ++ # For now (since there are no options to change this), ++ # we use the source-directory for the include file and ++ # the build directory for the RC file and message ++ # resources. This works at least for win32all. ++ h_dir = os.path.dirname(src) ++ rc_dir = os.path.dirname(obj) ++ try: ++ # first compile .MC to .RC and .H file ++ self.spawn(['windmc'] + ['-h', h_dir, '-r', rc_dir] + [src]) ++ base, _ = os.path.splitext (os.path.basename (src)) ++ rc_file = os.path.join (rc_dir, base + '.rc') ++ # then compile .RC to .RES file ++ self.spawn(['windres', '-i', rc_file, '-o', obj]) ++ except DistutilsExecError, msg: ++ raise CompileError(msg) + else: # for other files use the C-compiler + try: + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +@@ -277,7 +299,7 @@ + ext_normcase = os.path.normcase(ext) + if ext_normcase in ['.rc','.res']: + ext = ext_normcase +- if ext not in (self.src_extensions + ['.rc','.res']): ++ if ext not in (self.src_extensions + ['.rc', '.res', '.mc']): + raise UnknownFileError, \ + "unknown file type '%s' (from '%s')" % \ + (ext, src_name) diff --git a/mingw-w64-python2/PKGBUILD b/mingw-w64-python2/PKGBUILD index d77bf33427..5ad10eacfe 100644 --- a/mingw-w64-python2/PKGBUILD +++ b/mingw-w64-python2/PKGBUILD @@ -1,17 +1,18 @@ # Maintainer: Alexey Pavlov -# Contributor: Ray Donnelly +# Maintainer: Ray Donnelly # Contributor: Saul Ibarra Corretge _realname=python2 +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.7.8 -pkgrel=8 -_pybasever=2.7 +pkgver=2.7.11 +pkgrel=1 +_pybasever=${pkgver%.*} pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') license=('PSF') url="http://www.python.org/" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-bzip2" "${MINGW_PACKAGE_PREFIX}-gdbm" @@ -24,9 +25,10 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-zlib" ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -options=('!makeflags' 'staticlibs' 'strip' '!debug') +options=('!makeflags') # 'debug' '!strip') source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0000-make-_sysconfigdata.py-relocatable.patch + 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch 0100-MINGW-BASE-use-NT-thread-model.patch 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch 0120-MINGW-use-header-in-lowercase.patch @@ -42,7 +44,6 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch 0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch 0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch - 0280-issue17219-add-current-dir-in-library-path-if-buildi.patch 0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch 0300-MINGW-configure-for-shared-build.patch 0310-MINGW-dynamic-loading-support.patch @@ -59,7 +60,6 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch 0430-MINGW-find-import-library.patch 0440-MINGW-setup-_ssl-module.patch - 0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch 0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch 0462-MINGW-support-stdcall-without-underscore.patch 0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch @@ -95,24 +95,35 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0820-mingw-reorder-bininstall-ln-symlink-creation.patch 0830-add-build-sysroot-config-option.patch 0840-add-builddir-to-library_dirs.patch + 0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch 0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch + 0855-mingw-fix-ssl-dont-use-enum_certificates.patch 0860-mingw-build-optimized-ext.patch + 0870-mingw-add-LIBPL-to-library-dirs.patch 0910-fix-using-dllhandle-and-winver-mingw.patch + 0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch 1000-dont-link-with-gettext.patch 1010-ctypes-python-dll.patch 1020-gdbm-module-includes.patch 1030-use-gnu_printf-in-format.patch - 1040-install-msilib.patch) - + 1040-install-msilib.patch + 2000-distutils-add-windmc-to-cygwinccompiler.patch) prepare() { cd "${srcdir}/Python-${pkgver}" # these are created by patches - rm -f Misc/config_mingw Misc/cross_mingw32 Misc/python-config.sh.in Misc/cross_mingw32 Misc/python-config-u.sh.in Python/fileblocks.c + rm -f Misc/config_mingw \ + Misc/cross_mingw32 \ + Misc/python-config.sh.in \ + Misc/cross_mingw32 \ + Misc/python-config-u.sh.in \ + Python/fileblocks.c \ + Lib/list2cmdline.py - plain "Apply Ray Donnelly's relocatability enabling patch" + plain "Apply Ray Donnelly's should-be-upstreamed patches" patch -Np1 -i "${srcdir}"/0000-make-_sysconfigdata.py-relocatable.patch + patch -Np1 -i "${srcdir}"/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch plain "Apply Roumen Petrov's core patches (15)" patch -p1 -i "${srcdir}"/0100-MINGW-BASE-use-NT-thread-model.patch @@ -132,9 +143,8 @@ prepare() { plain "Apply Roumen Petrov's compiler patch (2)" patch -p1 -i "${srcdir}"/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch - plain "Apply Roumen Petrov's extensions patches (23)" + plain "Apply Roumen Petrov's extensions patches (21)" patch -p1 -i "${srcdir}"/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch - patch -p1 -i "${srcdir}"/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch patch -p1 -i "${srcdir}"/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch patch -p1 -i "${srcdir}"/0300-MINGW-configure-for-shared-build.patch patch -p1 -i "${srcdir}"/0310-MINGW-dynamic-loading-support.patch @@ -151,7 +161,6 @@ prepare() { patch -p1 -i "${srcdir}"/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch patch -p1 -i "${srcdir}"/0430-MINGW-find-import-library.patch patch -p1 -i "${srcdir}"/0440-MINGW-setup-_ssl-module.patch - patch -p1 -i "${srcdir}"/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch patch -p1 -i "${srcdir}"/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch patch -p1 -i "${srcdir}"/0462-MINGW-support-stdcall-without-underscore.patch patch -p1 -i "${srcdir}"/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch @@ -189,9 +198,13 @@ prepare() { patch -p1 -i "${srcdir}"/0820-mingw-reorder-bininstall-ln-symlink-creation.patch patch -p1 -i "${srcdir}"/0830-add-build-sysroot-config-option.patch patch -p1 -i "${srcdir}"/0840-add-builddir-to-library_dirs.patch + patch -p1 -i "${srcdir}"/0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch patch -p1 -i "${srcdir}"/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch + patch -p1 -i "${srcdir}"/0855-mingw-fix-ssl-dont-use-enum_certificates.patch patch -p1 -i "${srcdir}"/0860-mingw-build-optimized-ext.patch + patch -p1 -i "${srcdir}"/0870-mingw-add-LIBPL-to-library-dirs.patch patch -p1 -i "${srcdir}"/0910-fix-using-dllhandle-and-winver-mingw.patch + patch -p1 -i "${srcdir}"/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch plain "Apply Alexey Pavlov's mingw-w64 patches (2)" patch -p1 -i "${srcdir}"/1000-dont-link-with-gettext.patch @@ -200,6 +213,9 @@ prepare() { patch -p1 -i "${srcdir}"/1030-use-gnu_printf-in-format.patch patch -p1 -i "${srcdir}"/1040-install-msilib.patch + plain "Apply Renato Silva's patch to distutils" + patch -p1 -i "${srcdir}"/2000-distutils-add-windmc-to-cygwinccompiler.patch + autoreconf -vfi # Temporary workaround for FS#22322 @@ -223,7 +239,7 @@ prepare() { touch Include/Python-ast.h touch Python/Python-ast.c echo \"\" > Parser/pgen.stamp - + # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat @@ -232,9 +248,8 @@ prepare() { } build() { - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + declare -a extra_config + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 " CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 " @@ -243,26 +258,27 @@ build() { if check_option "strip" "y"; then LDFLAGS+=" -s " fi + + # Most of this is unnecessary, perhaps just + # the extra_config bit? if check_option "debug" "n"; then CFLAGS+=" -DNDEBUG " CXXFLAGS+=" -DNDEBUG " else - plain " -DDEBUG -DPy_DEBUG -D_DEBUG does not work unfortunately .." - # CFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG " - # CXXFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG " - CFLAGS+=" -O0 -ggdb" - CXXFLAGS+=" -O0 -ggdb" + CFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG " + CXXFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG " + extra_config+=("--with-pydebug") fi - LIBFFI_INC=`${MINGW_PREFIX}/bin/pkg-config libffi --cflags-only-I | sed "s|\-I||g"` - pushd ${LIBFFI_INC} > /dev/null - export LIBFFI_INCLUDEDIR=`pwd -W` - popd > /dev/null + local LIBFFI_INC=`${MINGW_PREFIX}/bin/pkg-config libffi --cflags-only-I | sed "s|\-I||g"` + export LIBFFI_INCLUDEDIR=$(cygpath -wm ${LIBFFI_INC}) # Workaround for conftest error on 64-bit builds export ac_cv_working_tzset=no + [ -d "${srcdir}/build-${CARCH}" ] && rm -rf "${srcdir}/build-${CARCH}" mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + MSYSTEM=MINGW ../Python-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ @@ -271,27 +287,40 @@ build() { --with-threads \ --with-system-expat \ --with-system-ffi \ + "${extra_config[@]}" \ OPT="" #--with-dbmliborder='gdbm:ndbm' make } -check() { - cd "${srcdir}/build-${CARCH}" - make test -} +#check() { +# cd "${srcdir}/build-${CARCH}" +# make test +#} package() { cd "${srcdir}/build-${CARCH}" + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) + MSYSTEM=MINGW \ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - make install DESTDIR="$pkgdir" - + make install DESTDIR="${pkgdir}" + mv "${pkgdir}${MINGW_PREFIX}"/bin/smtpd.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/ + # gdb support for debugging Python itself (needs options='debug', + # *may* work better on i686 due to frame pointer always being available) to use: + # python + # sys.path.append('C:/msys64/mingw64/share/gdb/python2') + # import python_gdb + # reload(python_gdb) + # end + [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/ + cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/python_gdb.py + # Copy python import library to $prefix/lib because some programs can't find it in other locations cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config/libpython${_pybasever}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.dll.a - + # some useful "stuff" install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts} install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/ @@ -305,7 +334,7 @@ package() { sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config/Makefile for fscripts in 2to3 idle pydoc; do - sed -e "s|${MINGW_PREFIX}/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/$fscripts + sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i "${pkgdir}${MINGW_PREFIX}"/bin/$fscripts done sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${_pybasever}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/bin/python${_pybasever}-config @@ -316,7 +345,8 @@ package() { find ${pkgdir}${MINGW_PREFIX} -type f \( -name "*.dll" -o -name "*.exe" \) | xargs chmod 0755 # Fix up two instances of MSYS2 paths in python-config.sh in-case the final consumer of the results are native executables. - sed -i "s|${MINGW_PREFIX}|${PREFIX_WIN}|" "${pkgdir}${MINGW_PREFIX}"/bin/python-config.sh + sed -e "s|${MINGW_PREFIX}|${PREFIX_WIN}|" \ + -i "${pkgdir}${MINGW_PREFIX}"/bin/python-config.sh # replace paths in sysconfig sed -i "s|${pkgdir}${MINGW_PREFIX}|${MINGW_PREFIX}|g" \ @@ -340,81 +370,85 @@ package() { mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe } -sha1sums=('9c6281eeace0c3646fa556c8087bb1b7e033c9c4' - 'ff058a6494ce5a91096a756ca8602fac14e4bf5a' - 'ee2babe00eaad35482acfffb612f68b364150c31' - 'f25698bfa5713ac8a215cc31ca29d75e1219fe95' - 'a35253f4a021f9f9237a0ad2d178731046e130e8' - '39b87abfb3a4d8a0f6a16a1c627ece0527181d92' - '03fc84385039f2e74ffae06b706eedf9e4eced58' - '4b375570d32e6779cd26ae4578054fc0031a1057' - 'ff3ccc52729cc4e9c321677787f0af2dea842095' - 'bb90366209e8832f8b5abc8ab0352dc97020fa5d' - '6f6484021f9a7ce71c2aa88a6aebab890ed85690' - '0bbf753a8e52c413199abe504577c6099e97657a' - '233a3008e3ed8ad38806b996186f2b4b00e95787' - '598c40d4211a786b6bd05a6a1495ca9321258ec5' - 'fd22959c09d157561564ba661ebe5be2052cd017' - 'fc2686d5e190504577586419c4971e3668fb3c57' - '32a3d0ff21f527ed50d036182715c6e1e036928a' - '06d6e9f1ce0915855968735df3101731e3142544' - '4b163ecefaf551469ddd6b622552dce1830f7ff8' - 'd3f588023ea932716b479cbb71b2dc2a98bca122' - '6d6ab5d60ff66b7215f071585af616c4bfea4af8' - '40b2a234bbb225d012af33debb8df015bfda4f1a' - '5a321b071d9f293c4783edf0cbc5489e641bddc5' - '82e544e64670423f88036947cabb65bd50dec537' - '368de9bdb53c5e50643fd09738ae6ca7906d6105' - 'accf4f618f7a2a9859a913ca9be710582277e427' - '8d5fdb792196d6a84bd28884733dfb738dd6470d' - '1dfd90e1f13c6f0ab66931bf258a8d4e892a68ea' - '6c06a12feb60e4d51348f78f0472cc6e5a079635' - 'a58c2889f0bf26de6e73fe2695c08ebeeb3110ab' - 'cea733d5d3b673730a25ebfd46a4c50299dae486' - '0dc29ad579843c85bf256ec41599a5d12fd52c61' - '885469472b14ecd3aa2ed84263fa760d263854fc' - '6d218cb3c6d0eaeef8a957df4e5f15cba9772218' - 'b2066325426efc276fbf88c38e55b9f0db03d9d6' - '18701870027b418c06a1ae239fe623b711d74540' - '0d8474e5a7bfa3eda5e0c8277b3b12f70b7fa14d' - 'fbcb6e56808efc9b91244065a2399cf1a03f653b' - 'b28bf367d49b81bf44bc21e24928a04bac31531f' - '8b8739dc17a377e16a98a77166c79c0a62e98b9d' - 'd54101fd632d41eca98558668946c2e396c02ff1' - '5f8c012c367c25ec9a55bff86edf09e841aa70ff' - '26f0fad5905dae6a7ea69feb96b1eeead0e90a61' - 'db28b6f95fc24d6abbb3797d1d9c7768a87ad73d' - '8ec51c213c62f1db0a4a61cf4eaa69b26e26457b' - '56bca8df15fde1bd12bd1ae939eafef442bdab9d' - 'b7ed33f832b8fa0b1b930e0ba27600cda8184e44' - '3b5706efe88d0b6e7a0b6c55ba6d203e37baddcf' - '9118fcc8fe2b141bf13fd5a843bc3eb5213a0a93' - 'b3e3f8cf921dca507ffd097f71092de536e9f525' - '8da64221399e539cb3356c49ac8bc1a8c8d5fef3' - '0e756f98fcb75a9916421cffeaece971d5dbc74b' - '9205d40b67f97a1ad797c3c5648fe903815e962f' - '4133b4171a73d4de87a45589e80702f2e674b88a' - '406d57de80f77111466fd163a3ec82ee0f94d94a' - '333ab511a4b10de9876bd6eb7ca03148535005b4' - '68a6e12bb892171e4e2238285b99e667d65d3626' - 'e3800d6717305bd708c8605a017d1abd05d8fb7b' - '86ec96aa948c4bb504122a0dc1ba9a5d2ec12d57' - '63d9f98f0822054c113378eac469a589a4433f9e' - '0ee936bfbabd7a858755acf1a717537f13a02336' - '9d1979be09d6a503ac6106dfb96831c44a206135' - '772f1a7478761b5edf33ddf026505ded17263754' - '9f3a2a955023f3aab43ba5b09a97c5ac63df9ed7' - '0201577ba7a2d69f2d73e14651c4748e6b3bbe79' - '7524d140ed956cc954d86dc60e424dd312319a34' - 'c6a33dae9100bed3cc9a666e89945bc2e82e1912' - '418a26fd8f2a47b7d98273b335814fa0c48c5e6e' - '6c2eceaf897daad320826692d2b176caa8a14ffc' - '0e51c781ae921e45bd240572530a0cfa259b87bf' - '70eb399b5d27a624b09c21f38d753ecda21e4b2a' - 'd935249cdc36c5dfb17d9b1d852d6755d23d89bb' - '2c20df25b6249caec41b66d3c5d49d19b906b4ba' - '50edd9f69058917c7efa8af787e1f632121f07f0' - 'd0eac38880e7f36131a9d3d6de67d465d3032aff' - 'a90c50280cca649e01b1b18ccff1aa6f2912ad37' - '2117c93358879d6262c618526a00152eec00f141' - '864396853b7202974e8d18fb70433edbce8334f9') +sha1sums=('c3b8bbe3f084c4d4ea13ffb03d75a5e22f9756ff' + '5e0546d246c18881c448a077c3b605d5db505114' + '901520b94c17ca80263ab3ac146b9c024bf1dc71' + '34a627481caea8690c2cf6e6d409e2d449d133fb' + 'c936fbd986a2cc126174e45de8b100e24824b905' + 'a5aa0daff5a85c661467b635e4e70bbef0a82046' + 'e9fb36ee9c03e982a8dfcd2890945512fe9392ca' + 'ddcd2893c5113acc02233ea50b5c115defbfcfb9' + '6bc0d42ea3c961139b91ad89ecd5f64d4d03c99c' + '99b81757f9acbfe730ccf16e42166ff4a52b9562' + 'b7e9a776fce256ead7ad38ebaedea4a95aa0934f' + '825456668c8ebeec0e9ac65f8752b2d5c0fc4819' + '669a483e3665b6a8fa6b5f1bcbe9e27f6fd29d05' + '50bb5036f3475662a463d8833bfd8f3f93c2dd23' + '46e5bbecfcc3892a7934fca42ab2e3950c00da2a' + '518a3d1c0365a3ba7356d095245dc732aed40067' + 'ade1e6db5a2643e97fb987946f60f15791f707f3' + 'f782384a8c094010f075aadbc16859c70ecd5e26' + 'c33113fd39b70c328a5b606ca3e2d837b51c4ffd' + '0a351b3d9fddc302838aa489577dc5db54ceb608' + 'a664e8bf904feb18a124f7376283c9e4ae29885e' + '7ad242e0fd33d2aef1d94af44560ee488dedc87a' + 'c858d5fefb300b55d35ec160f2815b165553d2b6' + 'b6e127499ed0d67e61431dfea23fb49606522d2c' + '4f1a99fcb31af079a32496151cee3ce566c3e581' + '15b62ec9b9b8a9ac58a933e034b562271c226a0b' + '2b550ba8b31cc54639847c087a24681431a920d4' + 'b67f7b820b3414219ec1ca07397a35f4d2914854' + '7d7800323249e64451d9e0c5ff7c9546d0e27cf5' + '07c3d42b9c7e79d0e621ae6d9dbe8cdf9c2801f0' + '2d4c42ffbfc02f777379555b752d69dffcc350f0' + '50662bcffc5fe85dea72e9e75b5921370ba3cbb2' + 'be2c7aa1ebdb9838b1121527959e92af8fde84f1' + '12341e177b655c08a6dc83b840d0433770c55164' + '7ff38d3d506064e98aa79b75e7ed64b9e74b3f80' + 'f6abdb937ca40c984d365a317ccde70d1b72a0e5' + '21391c4509a149c710f780c4ab7d1d3aa4b26dbb' + 'f7e5501502ee0e0ef1b86c6cc8a4405ec4842dca' + '9481a9cfdc965cfb99965c06f520a8a7266ab57b' + '124f3bb723bf6b3a035245499fc25d1ef8dae360' + '38505f10c495c1b79342aaeeb0d538b73df52c12' + '6b9e0da25a098c19336c59445745b0d99795edb2' + 'b96204f53095b5109520e61e69a5fbf85a27826e' + '62ba10c3d6e51c1bfdbd1885f6fec51831928924' + 'db205a1b6a0cb517afa9715c01310fb1c981e5df' + 'ab13f486c932081e69ba6ccc7c4417c0d56a5c9d' + 'b2da571659276b3d7bf6d5988ee0716869aa4155' + 'df8a5da8b88dbcbff2919ce5ae5027a654bcfb31' + '3dadc13c916ef6447006e8a544ba5eafb5494fca' + '23b5a26ca9757b83338526b801ec2d3f31c63b75' + 'aa234ba54760de5820934322cb67b574bb1384c5' + '681c4ebe82c5e63ea635e9d0dbf5c3fa37c71e64' + 'd9720baf25659ede48353b0d47b7486339c0efb7' + '867eaf7fa58b5cd6886cf360a95ca70dd7a775f4' + '0cd680615f0ce39097f9db34355ce3aa10ed0b81' + '7c56c69327997605ee64fcef3df8ce0628c16d6f' + '6ab80243af6c3ffcfd61b6bc4c35978cf608bb43' + '6e2f74d3b7719a350c1b7d816016875e0fcead12' + 'eb7fe4fbe2fd15d2efa742caf8bface48f686201' + '943fbc541c3f7d70fe87b44e3f8b6d83c7ae3e97' + '2149347d7d55ea4f228eb5ddc443cea51e040bc6' + '149fe9299c34b3f76967959393c25df015fddd18' + '12ef984034b57e3e6f2e5c71ad9cabfbae8bc0ba' + 'd18dbfa0bebf7286b04b3ddc7e8ad472ee668fcd' + 'a46b32b514715fafcd1c95055d225ea913fa64a6' + '23c0bcdb082006d6bde3eb9fc72044272c7a08f3' + 'fbefe2d0d2d4c9f995c9c49a66c93071587b7045' + '15e055c4cce32a0c1940953062fd2db7c22364c4' + '731ac1d1e54af3906d836a6595cb3a76ce165260' + '415ae19daf7dddc8db20009f2c708b900822e6b4' + '78b039f8ab595750b2f7aee3e2fc6d7a466a5c9c' + 'aa295dd8c4f60b70c61753fc4be9c8ff50101577' + 'de01d87f5070992f305d5375da1deb69f80ea8bb' + '6cef2b44a41279c0344cbb9f3486cfc0831026ae' + '0de22d55a78fad4755e2d4950db9a49a48a50ad2' + '6473ae1b2108c26403022c6846e562d2cfff9727' + 'd332da5a091d54445e1a83075a6ea8069031c995' + 'bc7209fd529f03d384f00be22835615a2843a7fa' + '06ebbcf50d6d30780f47a0d3425f956b2eb8e847' + '9042c4902ff03ecc12e0b41059aaebd6ad409009' + 'dc6aa85fa4dc68a6809c1321e4a28a360a242f39' + '5c5d9fb5d1fc576251a68c781437d27ea8d7e208') diff --git a/mingw-w64-python3-cairo/PKGBUILD b/mingw-w64-python3-cairo/PKGBUILD index 2f97175f36..bf095d2ced 100644 --- a/mingw-w64-python3-cairo/PKGBUILD +++ b/mingw-w64-python3-cairo/PKGBUILD @@ -1,27 +1,33 @@ # Maintainer: Alexey Pavlov _realname=pycairo - +pkgbase=mingw-w64-python3-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-python3-cairo" pkgver=1.10.0 -pkgrel=3 +pkgrel=5 pkgdesc="Python2 bindings for the cairo graphics library (mingw-w64)" url="http://www.cairographics.org/pycairo" arch=('any') license=('LGPL' 'MPL') depends=("${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-cairo") +makedepends=("python3") source=(http://cairographics.org/releases/${_realname}-${pkgver}.tar.bz2 - context.patch - pycairo-1.10.0-waf-python3.4.tar.bz2) + context.patch + pycairo-1.10.0-waf-python3.4.tar.bz2) md5sums=('e6fd3f2f1e6a72e0db0868c4985669c5' 'd4ded5af833f9072954c8bc434f90986' '06a60ae51953a2d4e89eb46ac4d282f6') -build() { +prepare() { cd "${srcdir}/pycairo-${pkgver}" patch -p1 -i ${srcdir}/context.patch patch -p1 -i ${srcdir}/pycairo-1.10.0-waf-python3.4.patch sed -i 's:bin/env python:bin/env python3:' waf +} + +build() { + cd "${srcdir}/pycairo-${pkgver}" + /usr/bin/python3 ./waf --version || true pushd .waf3-* #patch -p0 -i ${srcdir}/waflib.patch @@ -39,7 +45,7 @@ build() { package() { cd "${srcdir}/pycairo-${pkgver}" /usr/bin/python3 ./waf install --destdir="${pkgdir}" - + rm -rf ${pkgdir}${MINGW_PREFIX}/lib mv ${pkgdir}${MINGW_PREFIX}/bin ${pkgdir}${MINGW_PREFIX}/lib } diff --git a/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch b/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch index 9d38d5316d..a12b13f094 100644 --- a/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch +++ b/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-08 09:18:12.000000000 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 14:18:33.073762000 +0100 -@@ -264,6 +264,7 @@ +diff -Naur Python-3.5.0-orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +--- Python-3.5.0-orig/Lib/sysconfig.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/sysconfig.py 2015-09-21 13:41:02.028646700 +0300 +@@ -257,6 +257,7 @@ # if the expansion uses the name without a prefix. renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS') @@ -9,7 +9,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py while len(variables) > 0: for name in tuple(variables): value = notdone[name] -@@ -400,6 +401,19 @@ +@@ -393,6 +394,19 @@ f.write('build_time_vars = ') pprint.pprint(vars, stream=f) diff --git a/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch b/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch new file mode 100644 index 0000000000..883592a3e2 --- /dev/null +++ b/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch @@ -0,0 +1,48 @@ +--- Python-3.5.0/Lib/distutils/spawn.py.orig 2015-09-13 12:41:21.000000000 +0100 ++++ Python-3.5.0/Lib/distutils/spawn.py 2016-01-01 22:56:13.888427600 +0000 +@@ -12,6 +12,7 @@ + from distutils.errors import DistutilsPlatformError, DistutilsExecError + from distutils.debug import DEBUG + from distutils import log ++from subprocess import list2cmdline + + def spawn(cmd, search_path=1, verbose=0, dry_run=0): + """Run another program, specified as a command list 'cmd', in a new process. +@@ -43,17 +44,13 @@ + def _nt_quote_args(args): + """Quote command-line arguments for DOS/Windows conventions. + +- Just wraps every argument which contains blanks in double quotes, and +- returns a new argument list. ++ Defer to subprocess module's list2cmdline as the logic is ++ complex. The previous implementation here failed to handle ++ -DG_LOG_DOMAIN="GEGL-"__FILE__ which was encountered in MSYS2 ++ while building the gobject-introspection part of GEGL 0.3.4. + """ +- # XXX this doesn't seem very robust to me -- but if the Windows guys +- # say it'll work, I guess I'll have to accept it. (What if an arg +- # contains quotes? What other magic characters, other than spaces, +- # have to be escaped? Is there an escaping mechanism other than +- # quoting?) + for i, arg in enumerate(args): +- if ' ' in arg: +- args[i] = '"%s"' % arg ++ args[i] = list2cmdline([args[i]]) + return args + + def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): +--- Python-3.5.0/setup.py.orig 2016-01-01 23:31:43.768193600 +0000 ++++ Python-3.5.0/setup.py 2016-01-01 23:54:46.268820600 +0000 +@@ -1208,11 +1208,7 @@ + '_sqlite/statement.c', + '_sqlite/util.c', ] + +- sqlite_defines = [] +- if host_platform != "win32": +- sqlite_defines.append(('MODULE_NAME', '"sqlite3"')) +- else: +- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) ++ sqlite_defines = [('MODULE_NAME', '"sqlite3"')] + + # Enable support for loadable extensions in the sqlite3 module + # if --enable-loadable-sqlite-extensions configure option is used. diff --git a/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch b/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch index 20c01040d3..cccb099327 100644 --- a/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch +++ b/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:18:34.945869100 +0100 -+++ b/configure.ac 2014-10-11 14:18:36.988985900 +0100 -@@ -1388,6 +1388,37 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:04.204429100 +0300 +@@ -1576,6 +1576,37 @@ BASECFLAGS="$BASECFLAGS $ac_arch_flags" fi @@ -39,7 +39,7 @@ diff -urN a/configure.ac b/configure.ac # On some compilers, pthreads are available without further options # (e.g. MacOS X). On some of these systems, the compiler will not # complain if unaccepted options are passed (e.g. gcc on Mac OS X). -@@ -1415,6 +1446,7 @@ +@@ -1603,6 +1634,7 @@ ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no]) ]) AC_MSG_RESULT($ac_cv_pthread_is_default) @@ -47,7 +47,7 @@ diff -urN a/configure.ac b/configure.ac if test $ac_cv_pthread_is_default = yes -@@ -1506,6 +1538,9 @@ +@@ -1694,6 +1726,9 @@ AC_MSG_RESULT($ac_cv_pthread) fi @@ -57,7 +57,7 @@ diff -urN a/configure.ac b/configure.ac # If we have set a CC compiler flag for thread support then # check if it works for CXX, too. ac_cv_cxx_thread=no -@@ -1526,6 +1561,10 @@ +@@ -1714,6 +1749,10 @@ then CXX="$CXX -pthread" ac_cv_cxx_thread=yes @@ -68,7 +68,7 @@ diff -urN a/configure.ac b/configure.ac fi if test $ac_cv_cxx_thread = yes -@@ -1555,6 +1594,11 @@ +@@ -1743,6 +1782,11 @@ dnl AC_MSG_RESULT($cpp_type) # checks for header files @@ -80,7 +80,7 @@ diff -urN a/configure.ac b/configure.ac AC_HEADER_STDC AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ -@@ -1824,9 +1868,14 @@ +@@ -2012,9 +2056,14 @@ AC_MSG_CHECKING(for pthread_t) have_pthread_t=no @@ -95,8 +95,8 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_RESULT($have_pthread_t) if test "$have_pthread_t" = yes ; then AC_CHECK_SIZEOF(pthread_t, [], [ -@@ -2240,11 +2289,16 @@ - AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX +@@ -2431,11 +2480,16 @@ + [Define if the libcrypto has RAND_egd])) # only check for sem_init if thread support is requested +if test $ac_cv_ntthread = yes ; then @@ -112,7 +112,7 @@ diff -urN a/configure.ac b/configure.ac # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, -@@ -2513,6 +2567,13 @@ +@@ -2715,6 +2769,13 @@ AC_DEFINE(WITH_THREAD) posix_threads=yes THREADOBJ="Python/thread.o" @@ -126,7 +126,7 @@ diff -urN a/configure.ac b/configure.ac else if test ! -z "$with_threads" -a -d "$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads" -@@ -2932,6 +2993,15 @@ +@@ -3144,6 +3205,15 @@ fi # checks for library functions @@ -142,7 +142,7 @@ diff -urN a/configure.ac b/configure.ac AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \ fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ -@@ -3920,6 +3990,10 @@ +@@ -4146,6 +4216,10 @@ # the kernel module that provides POSIX semaphores # isn't loaded by default, so an attempt to call # sem_open results in a 'Signal 12' error. @@ -153,7 +153,7 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING(whether POSIX semaphores are enabled) AC_CACHE_VAL(ac_cv_posix_semaphores_enabled, AC_RUN_IFELSE([AC_LANG_SOURCE([[ -@@ -3953,6 +4027,14 @@ +@@ -4179,6 +4253,14 @@ # Multiprocessing check for broken sem_getvalue AC_MSG_CHECKING(for broken sem_getvalue) @@ -168,10 +168,10 @@ diff -urN a/configure.ac b/configure.ac AC_CACHE_VAL(ac_cv_broken_sem_getvalue, AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 14:18:35.020873400 +0100 -+++ b/pyconfig.h.in 2014-10-11 14:18:36.991986100 +0100 -@@ -1166,6 +1166,9 @@ +diff -Naur Python-3.5.0-orig/pyconfig.h.in Python-3.5.0/pyconfig.h.in +--- Python-3.5.0-orig/pyconfig.h.in 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/pyconfig.h.in 2015-09-21 13:41:04.221427400 +0300 +@@ -1193,6 +1193,9 @@ /* Define if mvwdelch in curses.h is an expression. */ #undef MVWDELCH_IS_EXPRESSION diff --git a/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch b/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch index 4dd5cb9210..5bf0360b2b 100644 --- a/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch +++ b/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/pyport.h b/Include/pyport.h ---- a/Include/pyport.h 2014-10-11 14:18:38.798089400 +0100 -+++ b/Include/pyport.h 2014-10-11 14:18:40.574191000 +0100 +diff -Naur Python-3.5.0-orig/Include/pyport.h Python-3.5.0/Include/pyport.h +--- Python-3.5.0-orig/Include/pyport.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/pyport.h 2015-09-21 13:41:05.553294200 +0300 @@ -13,6 +13,21 @@ #include #endif diff --git a/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch b/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch index fdfdcd64d6..5d77f79568 100644 --- a/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch +++ b/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch @@ -1,6 +1,6 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:18:41.747258100 +0100 -+++ b/configure.ac 2014-10-11 14:18:44.328405700 +0100 +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:05.423307200 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:06.783171200 +0300 @@ -359,6 +359,17 @@ # Set name for machine-dependent library files AC_ARG_VAR([MACHDEP], [name for machine-dependent library files]) @@ -41,11 +41,11 @@ diff -urN a/configure.ac b/configure.ac + ;; + esac fi - + # Some systems cannot stand _XOPEN_SOURCE being defined at all; they -diff -urN a/Python/getplatform.c b/Python/getplatform.c ---- a/Python/getplatform.c 2014-10-11 14:18:41.761258900 +0100 -+++ b/Python/getplatform.c 2014-10-11 14:18:44.330405800 +0100 +diff -Naur Python-3.5.0-orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c +--- Python-3.5.0-orig/Python/getplatform.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/getplatform.c 2015-09-21 13:41:06.789170600 +0300 @@ -1,6 +1,12 @@ #include "Python.h" diff --git a/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch b/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch index 62d09d9dcf..2207cb60d3 100644 --- a/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch +++ b/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch @@ -1,9 +1,9 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:18:45.441469400 +0100 -+++ b/configure.ac 2014-10-11 14:18:48.045618300 +0100 -@@ -813,6 +813,27 @@ - MULTIARCH=$($CC --print-multiarch 2>/dev/null) - AC_SUBST(MULTIARCH) +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:07.953054200 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:08.078041700 +0300 +@@ -880,6 +880,27 @@ + AC_SUBST(PLATDIR) + AC_SUBST(PLATFORM_TRIPLET) +# initialize default configuration +py_config= @@ -27,11 +27,11 @@ diff -urN a/configure.ac b/configure.ac + fi +fi - AC_SUBST(LIBRARY) - AC_MSG_CHECKING(LIBRARY) -diff -urN a/Misc/config_mingw b/Misc/config_mingw ---- a/Misc/config_mingw 1970-01-01 01:00:00.000000000 +0100 -+++ b/Misc/config_mingw 2014-10-11 14:18:48.047618400 +0100 + AC_MSG_CHECKING([for -Wl,--no-as-needed]) + save_LDFLAGS="$LDFLAGS" +diff -Naur Python-3.5.0-orig/Misc/config_mingw Python-3.5.0/Misc/config_mingw +--- Python-3.5.0-orig/Misc/config_mingw 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.5.0/Misc/config_mingw 2015-09-21 13:41:08.092040300 +0300 @@ -0,0 +1,12 @@ +# configure defaults for mingw* hosts + @@ -45,9 +45,9 @@ diff -urN a/Misc/config_mingw b/Misc/config_mingw +# files to ignore +ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist +ac_cv_file__dev_ptc=no -diff -urN a/Misc/cross_mingw32 b/Misc/cross_mingw32 ---- a/Misc/cross_mingw32 1970-01-01 01:00:00.000000000 +0100 -+++ b/Misc/cross_mingw32 2014-10-11 14:18:48.048618500 +0100 +diff -Naur Python-3.5.0-orig/Misc/cross_mingw32 Python-3.5.0/Misc/cross_mingw32 +--- Python-3.5.0-orig/Misc/cross_mingw32 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.5.0/Misc/cross_mingw32 2015-09-21 13:41:08.098039700 +0300 @@ -0,0 +1,11 @@ +# configure defaults for mingw32 host if cross-build + diff --git a/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch b/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch index 1444d8f8c4..c2b9d80b1b 100644 --- a/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch +++ b/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:18:49.139680900 +0100 -+++ b/configure.ac 2014-10-11 14:18:51.927840400 +0100 -@@ -1873,10 +1873,22 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:09.253924100 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:09.399909500 +0300 +@@ -2061,10 +2061,22 @@ ]) AC_MSG_CHECKING(whether to enable large file support) @@ -24,7 +24,7 @@ diff -urN a/configure.ac b/configure.ac AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, [Defined to enable large file support when an off_t is bigger than a long and long long is available and at least as big as an off_t. You may need -@@ -1886,9 +1898,6 @@ +@@ -2074,9 +2086,6 @@ else AC_MSG_RESULT(no) fi diff --git a/mingw-w64-python3/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch b/mingw-w64-python3/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch index b6678a0081..8a803603c6 100644 --- a/mingw-w64-python3/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch +++ b/mingw-w64-python3/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch @@ -1,10 +1,10 @@ -diff -urN a/Python/random.c b/Python/random.c ---- a/Python/random.c 2014-10-11 14:18:53.000901800 +0100 -+++ b/Python/random.c 2014-10-11 14:18:55.599050400 +0100 +diff -Naur Python-3.5.0-orig/Python/random.c Python-3.5.0/Python/random.c +--- Python-3.5.0-orig/Python/random.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/random.c 2015-09-21 13:41:10.674782000 +0300 @@ -1,6 +1,12 @@ #include "Python.h" #ifdef MS_WINDOWS - #include + # include +#ifdef __MINGW32__ +/* NOTE: All sample MSDN wincrypt programs include header below as it + * is required to ensure that application could be build properly in @@ -12,5 +12,5 @@ diff -urN a/Python/random.c b/Python/random.c +# include +#endif #else - #include - #ifdef HAVE_SYS_STAT_H + # include + # ifdef HAVE_SYS_STAT_H diff --git a/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch b/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch index 2ae8cc4f9d..fa7c4395f0 100644 --- a/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch +++ b/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:18:56.621108800 +0100 -+++ b/configure.ac 2014-10-11 14:18:59.296261800 +0100 -@@ -4838,6 +4838,16 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:10.567792700 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:11.868662600 +0300 +@@ -5068,6 +5068,16 @@ THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" done @@ -16,5 +16,5 @@ diff -urN a/configure.ac b/configure.ac +esac + AC_SUBST(SRCDIRS) - SRCDIRS="Parser Grammar Objects Python Modules Mac" + SRCDIRS="Parser Grammar Objects Python Modules Mac Programs" AC_MSG_CHECKING(for build directories) diff --git a/mingw-w64-python3/0180-MINGW-init-system-calls.patch b/mingw-w64-python3/0180-MINGW-init-system-calls.patch index 2b26d60cfd..954080b2bc 100644 --- a/mingw-w64-python3/0180-MINGW-init-system-calls.patch +++ b/mingw-w64-python3/0180-MINGW-init-system-calls.patch @@ -1,6 +1,6 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:00.396324700 +0100 -+++ b/configure.ac 2014-10-11 14:19:03.057477000 +0100 +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:12.983551100 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:13.084541000 +0300 @@ -578,6 +578,14 @@ fi AC_MSG_RESULT($MACHDEP) @@ -16,10 +16,10 @@ diff -urN a/configure.ac b/configure.ac # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils # needs to check it -diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c ---- a/Modules/posixmodule.c 2014-10-11 14:19:00.992358800 +0100 -+++ b/Modules/posixmodule.c 2014-10-11 14:19:03.062477200 +0100 -@@ -158,6 +158,25 @@ +diff -Naur Python-3.5.0-orig/Modules/posixmodule.c Python-3.5.0/Modules/posixmodule.c +--- Python-3.5.0-orig/Modules/posixmodule.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/Modules/posixmodule.c 2015-09-21 13:41:13.100539400 +0300 +@@ -154,6 +154,25 @@ #define HAVE_CWAIT 1 #define HAVE_FSYNC 1 #define fsync _commit @@ -45,7 +45,7 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c #else /* Unix functions that the configure script doesn't check for */ #define HAVE_EXECV 1 -@@ -282,7 +301,7 @@ +@@ -274,7 +293,7 @@ #endif #endif @@ -54,7 +54,7 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c #ifdef HAVE_DIRECT_H #include #endif -@@ -1177,7 +1196,7 @@ +@@ -1126,7 +1145,7 @@ */ #include static char **environ; @@ -63,27 +63,9 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c extern char **environ; #endif /* !_MSC_VER */ -@@ -3931,8 +3950,6 @@ - return PyBytes_FromString(outbuf); - } /* end of posix__getfullpathname */ - -- -- - /* A helper function for samepath on windows */ - static PyObject * - posix__getfinalpathname(PyObject *self, PyObject *args) -@@ -12052,7 +12069,7 @@ - } - - --#if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) && !defined(__QNX__) -+#if defined(MS_WINDOWS) && !defined(__QNX__) - #define INITFUNC PyInit_nt - #define MODNAME "nt" - -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 14:19:00.985358400 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 14:19:03.064477400 +0100 +diff -Naur Python-3.5.0-orig/Modules/Setup.config.in Python-3.5.0/Modules/Setup.config.in +--- Python-3.5.0-orig/Modules/Setup.config.in 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/Setup.config.in 2015-09-21 13:41:13.141535300 +0300 @@ -3,6 +3,9 @@ # The purpose of this file is to conditionally enable certain modules # based on configure-time options. @@ -94,9 +76,9 @@ diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in # Threading @USE_THREAD_MODULE@_thread _threadmodule.c -diff -urN a/Modules/Setup.dist b/Modules/Setup.dist ---- a/Modules/Setup.dist 2014-10-11 14:19:01.130366700 +0100 -+++ b/Modules/Setup.dist 2014-10-11 14:19:03.065477400 +0100 +diff -Naur Python-3.5.0-orig/Modules/Setup.dist Python-3.5.0/Modules/Setup.dist +--- Python-3.5.0-orig/Modules/Setup.dist 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/Setup.dist 2015-09-21 13:41:13.150534400 +0300 @@ -105,7 +105,6 @@ # This only contains the minimal set of modules required to run the # setup.py script in the root of the Python source tree. diff --git a/mingw-w64-python3/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch b/mingw-w64-python3/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch index 6cb5efc1b3..386958a5d4 100644 --- a/mingw-w64-python3/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch +++ b/mingw-w64-python3/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:04.201542400 +0100 -+++ b/configure.ac 2014-10-11 14:19:06.918697800 +0100 -@@ -3602,6 +3602,27 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:14.283421100 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:14.407408700 +0300 +@@ -3815,6 +3815,27 @@ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)]) fi @@ -29,11 +29,11 @@ diff -urN a/configure.ac b/configure.ac # checks for compiler characteristics AC_C_CHAR_UNSIGNED -diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c ---- a/Modules/posixmodule.c 2014-10-11 14:19:04.768574800 +0100 -+++ b/Modules/posixmodule.c 2014-10-11 14:19:06.923698100 +0100 -@@ -1132,6 +1132,15 @@ - http://msdn.microsoft.com/en-us/library/ms791514.aspx as the required +diff -Naur Python-3.5.0-orig/Modules/winreparse.h Python-3.5.0/Modules/winreparse.h +--- Python-3.5.0-orig/Modules/winreparse.h 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/Modules/winreparse.h 2015-09-21 13:41:14.427406700 +0300 +@@ -12,6 +12,15 @@ + http://msdn.microsoft.com/en-us/library/ff552012.aspx as the required include doesn't seem to be present in the Windows SDK (at least as included with Visual Studio Express). */ +#ifndef HAVE_REPARSE_DATA_BUFFER @@ -48,7 +48,7 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c typedef struct _REPARSE_DATA_BUFFER { ULONG ReparseTag; USHORT ReparseDataLength; -@@ -1162,7 +1171,11 @@ +@@ -42,7 +51,11 @@ #define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER,\ GenericReparseBuffer) @@ -58,14 +58,14 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c + +#endif /*ndef HAVE_REPARSE_DATA_BUFFER*/ - static int - win32_get_reparse_tag(HANDLE reparse_point_handle, ULONG *reparse_tag) -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 14:19:04.201542400 +0100 -+++ b/pyconfig.h.in 2014-10-11 14:19:06.925698200 +0100 -@@ -687,6 +687,9 @@ - /* Define to 1 if you have the `renameat' function. */ - #undef HAVE_RENAMEAT + #ifdef __cplusplus + } +diff -Naur Python-3.5.0-orig/pyconfig.h.in Python-3.5.0/pyconfig.h.in +--- Python-3.5.0-orig/pyconfig.h.in 2015-09-21 13:41:05.444305100 +0300 ++++ Python-3.5.0/pyconfig.h.in 2015-09-21 13:41:14.440405400 +0300 +@@ -711,6 +711,9 @@ + /* Define if readline supports append_history */ + #undef HAVE_RL_APPEND_HISTORY +/* Define to 1 if you have the 'REPARSE_DATA_BUFFER' structure. */ +#undef HAVE_REPARSE_DATA_BUFFER diff --git a/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch b/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch index 725f3a90e3..0aafc3f504 100644 --- a/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch +++ b/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:07.957757200 +0100 -+++ b/configure.ac 2014-10-11 14:19:10.613909200 +0100 -@@ -2540,6 +2540,14 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:15.569292500 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:15.713278100 +0300 +@@ -2742,6 +2742,14 @@ fi]) AC_MSG_RESULT($with_dbmliborder) @@ -16,21 +16,25 @@ diff -urN a/configure.ac b/configure.ac # Determine if signalmodule should be used. AC_SUBST(USE_SIGNAL_MODULE) AC_SUBST(SIGNAL_OBJS) -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 14:19:08.700799700 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 14:19:10.615909300 +0100 -@@ -12,5 +12,8 @@ +diff -Naur Python-3.5.0-orig/Modules/Setup.config.in Python-3.5.0/Modules/Setup.config.in +--- Python-3.5.0-orig/Modules/Setup.config.in 2015-09-21 13:41:14.300419400 +0300 ++++ Python-3.5.0/Modules/Setup.config.in 2015-09-21 13:41:15.757273700 +0300 +@@ -12,8 +12,11 @@ + # Threading + @USE_THREAD_MODULE@_thread _threadmodule.c + # The signal module - @USE_SIGNAL_MODULE@signal signalmodule.c +-@USE_SIGNAL_MODULE@_signal signalmodule.c ++@USE_SIGNAL_MODULE@_signal signalmodule.c -lws2_32 +# build-in modules for windows platform: +@USE_WIN32_MODULE@winreg ../PC/winreg.c + # The rest of the modules previously listed in this file are built # by the setup.py script in Python 2.1 and later. -diff -urN a/PC/winreg.c b/PC/winreg.c ---- a/PC/winreg.c 2014-10-11 14:19:08.760803200 +0100 -+++ b/PC/winreg.c 2014-10-11 14:19:10.616909300 +0100 +diff -Naur Python-3.5.0-orig/PC/winreg.c Python-3.5.0/PC/winreg.c +--- Python-3.5.0-orig/PC/winreg.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/PC/winreg.c 2015-09-21 13:41:15.767272700 +0300 @@ -16,6 +16,25 @@ #include "structmember.h" #include "windows.h" @@ -55,28 +59,5 @@ diff -urN a/PC/winreg.c b/PC/winreg.c +#endif + static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); + static BOOL clinic_HKEY_converter(PyObject *ob, void *p); static PyObject *PyHKEY_FromHKEY(HKEY h); - static BOOL PyHKEY_Close(PyObject *obHandle); -@@ -1083,6 +1102,10 @@ - static PyObject * - PyDeleteKeyEx(PyObject *self, PyObject *args, PyObject *kwargs) - { -+#ifdef KEY_WOW64_64KEY -+/* KEY_WOW64_64KEY is defined for _WIN32_WINNT >= 0x0502, -+ * i.e. Windows Server 2003 with SP1, Windows XP with SP2 -+ * and not supported on w2k. */ - HKEY hKey; - PyObject *key; - HMODULE hMod; -@@ -1119,6 +1142,11 @@ - return PyErr_SetFromWindowsErrWithFunction(rc, "RegDeleteKeyEx"); - Py_INCREF(Py_None); - return Py_None; -+#else /*def KEY_WOW64_64KEY*/ -+ PyErr_SetString(PyExc_NotImplementedError, -+ "not implemented on this platform"); -+ return NULL; -+#endif - } - - static PyObject * diff --git a/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch b/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch index 4a04e1ad5d..dfdda3d0e7 100644 --- a/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch +++ b/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:11.781976000 +0100 -+++ b/configure.ac 2014-10-11 14:19:14.475130000 +0100 -@@ -2548,6 +2548,13 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:16.957153700 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:17.094140000 +0300 +@@ -2750,6 +2750,13 @@ *-*-mingw*) USE_WIN32_MODULE=;; esac @@ -15,9 +15,9 @@ diff -urN a/configure.ac b/configure.ac # Determine if signalmodule should be used. AC_SUBST(USE_SIGNAL_MODULE) AC_SUBST(SIGNAL_OBJS) -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 14:19:12.780033100 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 14:19:14.477130100 +0100 +diff -Naur Python-3.5.0-orig/Modules/Setup.config.in Python-3.5.0/Modules/Setup.config.in +--- Python-3.5.0-orig/Modules/Setup.config.in 2015-09-21 13:41:16.975151900 +0300 ++++ Python-3.5.0/Modules/Setup.config.in 2015-09-21 13:41:17.109138500 +0300 @@ -6,6 +6,9 @@ # init system calls(posix/nt/...) for INITFUNC (used by makesetup) @INITSYS@ posixmodule.c @@ -28,9 +28,9 @@ diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in # Threading @USE_THREAD_MODULE@_thread _threadmodule.c -diff -urN a/Modules/Setup.dist b/Modules/Setup.dist ---- a/Modules/Setup.dist 2014-10-11 14:19:12.965043600 +0100 -+++ b/Modules/Setup.dist 2014-10-11 14:19:14.604137400 +0100 +diff -Naur Python-3.5.0-orig/Modules/Setup.dist Python-3.5.0/Modules/Setup.dist +--- Python-3.5.0-orig/Modules/Setup.dist 2015-09-21 13:41:14.307418700 +0300 ++++ Python-3.5.0/Modules/Setup.dist 2015-09-21 13:41:17.134136000 +0300 @@ -106,8 +106,6 @@ # setup.py script in the root of the Python source tree. diff --git a/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch b/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch index 7cdc693464..ed8132466e 100644 --- a/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch +++ b/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:15.629196000 +0100 -+++ b/configure.ac 2014-10-11 14:19:18.332350600 +0100 -@@ -4892,8 +4892,21 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:18.284021000 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:18.437005700 +0300 +@@ -5122,8 +5122,21 @@ ;; esac @@ -16,16 +16,16 @@ diff -urN a/configure.ac b/configure.ac +esac + AC_SUBST(SRCDIRS) - SRCDIRS="Parser Grammar Objects Python Modules Mac" + SRCDIRS="Parser Grammar Objects Python Modules Mac Programs" +case $host in + *-*-mingw*) SRCDIRS="$SRCDIRS PC";; +esac AC_MSG_CHECKING(for build directories) for dir in $SRCDIRS; do if test ! -d $dir; then -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:19:15.647197000 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:19:18.335350800 +0100 +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-13 14:41:23.000000000 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:41:18.444005000 +0300 @@ -242,7 +242,7 @@ # Modules MODULE_OBJS= \ @@ -35,7 +35,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in Modules/main.o \ Modules/gcmodule.o -@@ -704,6 +704,7 @@ +@@ -721,6 +721,7 @@ -DHGBRANCH="\"`LC_ALL=C $(HGBRANCH)`\"" \ -o $@ $(srcdir)/Modules/getbuildinfo.c @@ -43,7 +43,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ -DPREFIX='"$(prefix)"' \ -@@ -712,6 +713,13 @@ +@@ -729,6 +730,13 @@ -DVPATH='"$(VPATH)"' \ -o $@ $(srcdir)/Modules/getpath.c @@ -54,12 +54,12 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in + -DSRCDIR='"$(srcdir)"' \ + -o $@ $(srcdir)/PC/getpathp.c + - Modules/python.o: $(srcdir)/Modules/python.c - $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/python.c + Programs/python.o: $(srcdir)/Programs/python.c + $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c -diff -urN a/PC/getpathp.c b/PC/getpathp.c ---- a/PC/getpathp.c 2014-10-11 14:19:16.216229600 +0100 -+++ b/PC/getpathp.c 2014-10-11 14:19:18.337350900 +0100 +diff -Naur Python-3.5.0-orig/PC/getpathp.c Python-3.5.0/PC/getpathp.c +--- Python-3.5.0-orig/PC/getpathp.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/PC/getpathp.c 2015-09-21 13:41:18.457003700 +0300 @@ -87,10 +87,26 @@ * with a semicolon separated path prior to calling Py_Initialize. */ @@ -87,8 +87,8 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c static wchar_t prefix[MAXPATHLEN+1]; static wchar_t progpath[MAXPATHLEN+1]; static wchar_t dllpath[MAXPATHLEN+1]; -@@ -173,6 +189,69 @@ - buffer[n+k] = '\0'; +@@ -183,6 +199,69 @@ + Py_FatalError("buffer overflow in getpathp.c's join()"); } +#ifdef USE_POSIX_PREFIX @@ -121,7 +121,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c + if (exists(prefix)) { + wchar_t *vpath; + /* Check source directory if argv0_path is in the build directory. */ -+ vpath = _Py_char2wchar(SRCDIR, NULL); ++ vpath = Py_DecodeLocale(SRCDIR, NULL); + if (vpath != NULL) { + wcscpy(prefix, argv0_path); + join(prefix, vpath); @@ -157,7 +157,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c /* gotlandmark only called by search_for_prefix, which ensures 'prefix' is null terminated in bounds. join() ensures 'landmark' can not overflow prefix if too long. -@@ -477,6 +556,9 @@ +@@ -488,6 +567,9 @@ size_t bufsz; wchar_t *pythonhome = Py_GetPythonHome(); wchar_t *envpath = NULL; @@ -167,7 +167,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c #ifdef MS_WINDOWS int skiphome, skipdefault; -@@ -537,6 +619,16 @@ +@@ -560,6 +642,16 @@ } } @@ -184,10 +184,10 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c if (pythonhome == NULL || *pythonhome == '\0') { if (search_for_prefix(argv0_path, LANDMARK)) pythonhome = prefix; -@@ -545,11 +637,11 @@ +@@ -568,11 +660,11 @@ } else - wcsncpy(prefix, pythonhome, MAXPATHLEN); + wcscpy_s(prefix, MAXPATHLEN+1, pythonhome); +#endif if (envpath && *envpath == '\0') @@ -195,9 +195,9 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c - #ifdef MS_WINDOWS - /* Calculate zip archive path */ - if (dllpath[0]) /* use name of python DLL */ -@@ -603,6 +695,9 @@ + /* Calculate zip archive path from DLL or exe path */ + if (wcscpy_s(zip_path, MAXPATHLEN+1, dllpath[0] ? dllpath : progpath)) +@@ -624,6 +716,9 @@ } else bufsz = 0; @@ -207,7 +207,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c bufsz += wcslen(PYTHONPATH) + 1; bufsz += wcslen(argv0_path) + 1; #ifdef MS_WINDOWS -@@ -645,6 +740,11 @@ +@@ -668,6 +763,11 @@ buf = wcschr(buf, L'\0'); *buf++ = DELIM; } @@ -217,9 +217,9 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c + *buf++ = DELIM; +#endif if (userpath) { - wcscpy(buf, userpath); - buf = wcschr(buf, L'\0'); -@@ -707,6 +807,12 @@ + if (wcscpy_s(buf, bufsz - (buf - module_search_path), userpath)) + Py_FatalError("buffer overflow in getpathp.c's calculate_path()"); +@@ -736,6 +836,12 @@ on the path, and that our 'prefix' directory is the parent of that. */ diff --git a/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch b/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch index 82ca4d616f..1d904aff55 100644 --- a/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch +++ b/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch @@ -1,6 +1,6 @@ -diff -urN a/Python/fileblocks.c b/Python/fileblocks.c ---- a/Python/fileblocks.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/Python/fileblocks.c 2014-10-11 14:19:22.203572000 +0100 +diff -Naur Python-3.5.0-orig/Python/fileblocks.c Python-3.5.0/Python/fileblocks.c +--- Python-3.5.0-orig/Python/fileblocks.c 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.5.0/Python/fileblocks.c 2015-09-21 13:41:19.806868700 +0300 @@ -0,0 +1,17 @@ +/* +-- Macro: AC_STRUCT_ST_BLOCKS diff --git a/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch b/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch index 3c738b3e7f..86f7595a00 100644 --- a/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch +++ b/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch @@ -1,12 +1,12 @@ -diff -urN a/Modules/python.c b/Modules/python.c ---- a/Modules/python.c 2014-10-11 14:19:24.163684200 +0100 -+++ b/Modules/python.c 2014-10-11 14:19:25.838780000 +0100 +diff -Naur Python-3.5.0-orig/Programs/python.c Python-3.5.0/Programs/python.c +--- Python-3.5.0-orig/Programs/python.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Programs/python.c 2015-09-21 13:41:21.061743200 +0300 @@ -7,7 +7,7 @@ #include #endif -#ifdef MS_WINDOWS -+#if defined(MS_WINDOWS) && !defined(__MINGW32__) ++#if defined(_MSC_VER) int wmain(int argc, wchar_t **argv) { diff --git a/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch b/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch index e886f23040..4d4c308581 100644 --- a/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch +++ b/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py ---- a/Lib/distutils/sysconfig.py 2014-10-11 14:19:27.487874300 +0100 -+++ b/Lib/distutils/sysconfig.py 2014-10-11 14:19:30.049020800 +0100 -@@ -165,7 +165,23 @@ +diff -Naur Python-3.5.0-orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py +--- Python-3.5.0-orig/Lib/distutils/sysconfig.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-09-21 13:41:22.329616400 +0300 +@@ -156,7 +156,23 @@ Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. """ @@ -26,7 +26,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py if sys.platform == "darwin": # Perform first-time customization of compiler-related # config vars on OS X now that we know we need a compiler. -@@ -175,7 +191,6 @@ +@@ -166,7 +182,6 @@ # that Python itself was built on. Also the user OS # version and build tools may not support the same set # of CPU architectures for universal builds. diff --git a/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch b/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch index e5827d192a..26f9cf1159 100644 --- a/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch +++ b/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py ---- a/Lib/distutils/unixccompiler.py 2014-10-11 14:19:31.330094100 +0100 -+++ b/Lib/distutils/unixccompiler.py 2014-10-11 14:19:33.906241400 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/unixccompiler.py Python-3.5.0/Lib/distutils/unixccompiler.py +--- Python-3.5.0-orig/Lib/distutils/unixccompiler.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/unixccompiler.py 2015-09-21 13:41:23.620487300 +0300 @@ -238,9 +238,13 @@ # -Wl whenever gcc was used in the past it is probably # safest to keep doing so. diff --git a/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch b/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch index 1751e881c2..659130a77d 100644 --- a/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch +++ b/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch @@ -1,7 +1,7 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:19:35.004304200 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:19:37.772462500 +0100 -@@ -635,9 +635,9 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:41:19.691880200 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:41:24.859363400 +0300 +@@ -647,9 +647,9 @@ $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK) $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources @@ -13,9 +13,9 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in if test -n "$(DLLLIBRARY)"; then \ $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \ -diff -urN a/Modules/makesetup b/Modules/makesetup ---- a/Modules/makesetup 2014-10-11 14:19:35.863353300 +0100 -+++ b/Modules/makesetup 2014-10-11 14:19:37.774462700 +0100 +diff -Naur Python-3.5.0-orig/Modules/makesetup Python-3.5.0/Modules/makesetup +--- Python-3.5.0-orig/Modules/makesetup 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/Modules/makesetup 2015-09-21 13:41:24.864362900 +0300 @@ -91,7 +91,7 @@ else ExtraLibDir='$(LIBPL)' diff --git a/mingw-w64-python3/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch b/mingw-w64-python3/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch deleted file mode 100644 index 7b290293b0..0000000000 --- a/mingw-w64-python3/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 14:19:38.954530100 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 14:19:41.476674400 +0100 -@@ -237,7 +237,7 @@ - # Python's library directory must be appended to library_dirs - # See Issues: #1600860, #4366 - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): -- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): -+ if not sysconfig.python_build: - # building third party extensions - self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) - else: diff --git a/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch b/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch index 210a21a2d7..a527c2ca75 100644 --- a/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch +++ b/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch @@ -1,7 +1,7 @@ -diff -urN a/Include/pyport.h b/Include/pyport.h ---- a/Include/pyport.h 2014-10-11 14:19:43.688800900 +0100 -+++ b/Include/pyport.h 2014-10-11 14:19:45.226888900 +0100 -@@ -739,37 +739,39 @@ +diff -Naur Python-3.5.0-orig/Include/pyport.h Python-3.5.0/Include/pyport.h +--- Python-3.5.0-orig/Include/pyport.h 2015-09-21 13:41:06.668182700 +0300 ++++ Python-3.5.0/Include/pyport.h 2015-09-21 13:41:26.146234700 +0300 +@@ -736,37 +736,39 @@ */ /* @@ -53,7 +53,7 @@ diff -urN a/Include/pyport.h b/Include/pyport.h # define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE /* module init functions outside the core must be exported */ # if defined(__cplusplus) -@@ -777,7 +779,7 @@ +@@ -774,7 +776,7 @@ # else /* __cplusplus */ # define PyMODINIT_FUNC __declspec(dllexport) PyObject* # endif /* __cplusplus */ @@ -62,10 +62,10 @@ diff -urN a/Include/pyport.h b/Include/pyport.h # endif /* HAVE_DECLSPEC */ #endif /* Py_ENABLE_SHARED */ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:19:43.453787500 +0100 -+++ b/setup.py 2014-10-11 14:19:45.228889000 +0100 -@@ -176,6 +176,9 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:26.161233200 +0300 +@@ -184,6 +184,9 @@ def build_extensions(self): diff --git a/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch b/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch index 788a2d6f08..175cb26c69 100644 --- a/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch +++ b/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:46.432957900 +0100 -+++ b/configure.ac 2014-10-11 14:19:49.273120300 +0100 -@@ -1045,6 +1045,13 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:19.666882700 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:27.465102800 +0300 +@@ -1174,6 +1174,13 @@ ;; esac @@ -15,7 +15,7 @@ diff -urN a/configure.ac b/configure.ac else # shared is disabled PY_ENABLE_SHARED=0 case $ac_sys_system in -@@ -1053,6 +1060,10 @@ +@@ -1182,6 +1189,10 @@ LDLIBRARY='libpython$(LDVERSION).dll.a' ;; esac @@ -26,7 +26,7 @@ diff -urN a/configure.ac b/configure.ac fi if test "$cross_compiling" = yes; then -@@ -2213,6 +2224,12 @@ +@@ -2401,6 +2412,12 @@ LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; esac @@ -39,7 +39,7 @@ diff -urN a/configure.ac b/configure.ac fi AC_MSG_RESULT($LDSHARED) LDCXXSHARED=${LDCXXSHARED-$LDSHARED} -@@ -4888,7 +4905,8 @@ +@@ -5118,7 +5135,8 @@ dnl "errmap.h" from $srcdir/PC. dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h dnl has to be before customized located in ../PC. diff --git a/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch b/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch index da021b5873..f688b99a97 100644 --- a/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch +++ b/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:50.412185500 +0100 -+++ b/configure.ac 2014-10-11 14:19:53.083338300 +0100 -@@ -2084,6 +2084,9 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:28.609988300 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:28.722977000 +0300 +@@ -2272,6 +2272,9 @@ CYGWIN*) SHLIB_SUFFIX=.dll;; *) SHLIB_SUFFIX=.so;; esac @@ -11,7 +11,7 @@ diff -urN a/configure.ac b/configure.ac fi AC_MSG_RESULT($SHLIB_SUFFIX) -@@ -3060,6 +3063,12 @@ +@@ -3272,6 +3275,12 @@ fi ;; esac @@ -24,7 +24,7 @@ diff -urN a/configure.ac b/configure.ac fi AC_MSG_RESULT($DYNLOADFILE) if test "$DYNLOADFILE" != "dynload_stub.o" -@@ -4293,6 +4302,12 @@ +@@ -4519,6 +4528,12 @@ *) EXT_SUFFIX=${SHLIB_SUFFIX};; esac @@ -37,10 +37,10 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING(LDVERSION) LDVERSION='$(VERSION)$(ABIFLAGS)' -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:19:50.412185500 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:19:53.085338400 +0100 -@@ -746,6 +746,12 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:41:26.014247900 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:41:28.746974600 +0300 +@@ -763,6 +763,12 @@ -DSHLIB_EXT='"$(EXT_SUFFIX)"' \ -o $@ $(srcdir)/Python/dynload_hpux.c @@ -53,11 +53,11 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(CC) -c $(PY_CORE_CFLAGS) \ -DABIFLAGS='"$(ABIFLAGS)"' \ -diff -urN a/Python/dynload_win.c b/Python/dynload_win.c ---- a/Python/dynload_win.c 2014-10-11 14:19:50.418185800 +0100 -+++ b/Python/dynload_win.c 2014-10-11 14:19:53.087338500 +0100 -@@ -18,6 +18,12 @@ - #endif +diff -Naur Python-3.5.0-orig/Python/dynload_win.c Python-3.5.0/Python/dynload_win.c +--- Python-3.5.0-orig/Python/dynload_win.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/dynload_win.c 2015-09-21 13:41:28.760973200 +0300 +@@ -35,11 +35,21 @@ + #define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd" const char *_PyImport_DynLoadFiletab[] = { +#ifdef EXT_SUFFIX @@ -66,13 +66,11 @@ diff -urN a/Python/dynload_win.c b/Python/dynload_win.c +#ifdef SHLIB_SUFFIX + "-abi" PYTHON_ABI_STRING SHLIB_SUFFIX, +#endif - #ifdef _DEBUG - "_d.pyd", - #else -@@ -27,6 +33,10 @@ + PYD_TAGGED_SUFFIX, + PYD_UNTAGGED_SUFFIX, + NULL }; - +#if defined(__MINGW32__) +/* avoid compile error: conflicting types for 'strcasecmp' */ +# define strcasecmp fake_strcasecmp diff --git a/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch b/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch index 9db1f704e4..9fa4fa7452 100644 --- a/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch +++ b/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch @@ -1,6 +1,6 @@ -diff -urN a/PC/getpathp.c b/PC/getpathp.c ---- a/PC/getpathp.c 2014-10-11 14:19:54.742433200 +0100 -+++ b/PC/getpathp.c 2014-10-11 14:19:56.736547200 +0100 +diff -Naur Python-3.5.0-orig/PC/getpathp.c Python-3.5.0/PC/getpathp.c +--- Python-3.5.0-orig/PC/getpathp.c 2015-09-21 13:41:19.698879500 +0300 ++++ Python-3.5.0/PC/getpathp.c 2015-09-21 13:41:30.111838100 +0300 @@ -104,10 +104,17 @@ # define USE_POSIX_PREFIX @@ -19,7 +19,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c static wchar_t progpath[MAXPATHLEN+1]; static wchar_t dllpath[MAXPATHLEN+1]; static wchar_t *module_search_path = NULL; -@@ -290,6 +297,82 @@ +@@ -299,6 +306,82 @@ /* a string loaded from the DLL at startup.*/ extern const char *PyWin_DLLVersionString; @@ -102,7 +102,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c /* Load a PYTHONPATH value from the registry. Load from either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. -@@ -559,6 +642,9 @@ +@@ -570,6 +653,9 @@ #ifdef USE_POSIX_PREFIX int pfound; #endif @@ -112,7 +112,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c #ifdef MS_WINDOWS int skiphome, skipdefault; -@@ -642,6 +728,16 @@ +@@ -665,6 +751,16 @@ if (envpath && *envpath == '\0') envpath = NULL; @@ -127,9 +127,9 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c +#endif + #ifdef MS_WINDOWS - /* Calculate zip archive path */ - if (dllpath[0]) /* use name of python DLL */ -@@ -698,6 +794,9 @@ + /* Calculate zip archive path from DLL or exe path */ + if (wcscpy_s(zip_path, MAXPATHLEN+1, dllpath[0] ? dllpath : progpath)) +@@ -719,6 +815,9 @@ #ifdef USE_POSIX_PREFIX bufsz += wcslen(prefix) + 1; #endif @@ -139,7 +139,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c bufsz += wcslen(PYTHONPATH) + 1; bufsz += wcslen(argv0_path) + 1; #ifdef MS_WINDOWS -@@ -745,6 +844,11 @@ +@@ -768,6 +867,11 @@ buf = wcschr(buf, L'\0'); *buf++ = DELIM; #endif @@ -149,9 +149,9 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c + *buf++ = DELIM; +#endif if (userpath) { - wcscpy(buf, userpath); - buf = wcschr(buf, L'\0'); -@@ -812,6 +916,17 @@ + if (wcscpy_s(buf, bufsz - (buf - module_search_path), userpath)) + Py_FatalError("buffer overflow in getpathp.c's calculate_path()"); +@@ -841,6 +945,17 @@ reduce(prefix); reduce(prefix); } @@ -169,7 +169,7 @@ diff -urN a/PC/getpathp.c b/PC/getpathp.c #endif if (*prefix==L'\0') { wchar_t lookBuf[MAXPATHLEN+1]; -@@ -881,7 +996,13 @@ +@@ -910,7 +1025,13 @@ wchar_t * Py_GetExecPrefix(void) { diff --git a/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch b/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch index 7e9128f89d..65c8f32a94 100644 --- a/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch +++ b/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:19:57.869612000 +0100 -+++ b/configure.ac 2014-10-11 14:20:00.517763500 +0100 -@@ -4935,6 +4935,16 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:29.960853200 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:31.365712700 +0300 +@@ -5165,6 +5165,16 @@ ;; esac @@ -16,12 +16,12 @@ diff -urN a/configure.ac b/configure.ac +esac + AC_SUBST(SRCDIRS) - SRCDIRS="Parser Grammar Objects Python Modules Mac" + SRCDIRS="Parser Grammar Objects Python Modules Mac Programs" case $host in -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:19:57.869612000 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:20:00.519763600 +0100 -@@ -362,7 +362,7 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:41:29.981851100 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:41:31.372712000 +0300 +@@ -370,7 +370,7 @@ Python/codecs.o \ Python/dynamic_annotations.o \ Python/errors.o \ diff --git a/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch b/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch index 64f4322902..ebe96a0f26 100644 --- a/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch +++ b/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:02.180858600 +0100 -+++ b/setup.py 2014-10-11 14:20:04.365983600 +0100 -@@ -1250,7 +1250,7 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:27.356113700 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:32.656583600 +0300 +@@ -1270,7 +1270,7 @@ missing.append('_gdbm') # Unix-only modules diff --git a/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch b/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch index d601420a93..007f6e2b58 100644 --- a/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch +++ b/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:05.461046200 +0100 -+++ b/setup.py 2014-10-11 14:20:08.299208600 +0100 -@@ -1512,7 +1512,7 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:33.783470900 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:33.895459700 +0300 +@@ -1532,7 +1532,7 @@ macros = dict() libraries = ['rt'] @@ -10,7 +10,7 @@ diff -urN a/setup.py b/setup.py multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c', '_multiprocessing/semaphore.c', ] -@@ -1525,8 +1525,12 @@ +@@ -1545,8 +1545,12 @@ multiprocessing_srcs.append('_multiprocessing/semaphore.c') if sysconfig.get_config_var('WITH_THREAD'): diff --git a/mingw-w64-python3/0360-MINGW-setup-select-module.patch b/mingw-w64-python3/0360-MINGW-setup-select-module.patch index 26932e306d..3eebe42742 100644 --- a/mingw-w64-python3/0360-MINGW-setup-select-module.patch +++ b/mingw-w64-python3/0360-MINGW-setup-select-module.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/selectmodule.c b/Modules/selectmodule.c ---- a/Modules/selectmodule.c 2014-10-11 14:20:10.158314900 +0100 -+++ b/Modules/selectmodule.c 2014-10-11 14:20:11.952417500 +0100 +diff -Naur Python-3.5.0-orig/Modules/selectmodule.c Python-3.5.0/Modules/selectmodule.c +--- Python-3.5.0-orig/Modules/selectmodule.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/Modules/selectmodule.c 2015-09-21 13:41:35.081341100 +0300 @@ -102,9 +102,9 @@ v = PyObject_AsFileDescriptor( o ); if (v == -1) goto finally; @@ -22,10 +22,10 @@ diff -urN a/Modules/selectmodule.c b/Modules/selectmodule.c FD_SET(v, set); /* add object and its file descriptor to the list */ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:09.330267500 +0100 -+++ b/setup.py 2014-10-11 14:20:11.953417600 +0100 -@@ -634,7 +634,11 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:34.983350900 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:35.087340500 +0300 +@@ -654,7 +654,11 @@ missing.append('spwd') # select(2); not on ancient System V diff --git a/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch b/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch index 1f3aba4af9..7da2e93657 100644 --- a/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch +++ b/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c ---- a/Modules/_ctypes/callproc.c 2014-10-11 14:20:14.135542400 +0100 -+++ b/Modules/_ctypes/callproc.c 2014-10-11 14:20:15.816638500 +0100 +diff -Naur Python-3.5.0-orig/Modules/_ctypes/callproc.c Python-3.5.0/Modules/_ctypes/callproc.c +--- Python-3.5.0-orig/Modules/_ctypes/callproc.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_ctypes/callproc.c 2015-09-21 13:41:36.375211700 +0300 @@ -727,6 +727,21 @@ } @@ -59,10 +59,10 @@ diff -urN a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c #endif if ((flags & FUNCFLAG_PYTHONAPI) && PyErr_Occurred()) return -1; -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:14.291551300 +0100 -+++ b/setup.py 2014-10-11 14:20:15.818638700 +0100 -@@ -1940,6 +1940,8 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:36.271222100 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:36.381211100 +0300 +@@ -1960,6 +1960,8 @@ depends=depends) ext_test = Extension('_ctypes_test', sources=['_ctypes/_ctypes_test.c']) @@ -71,7 +71,7 @@ diff -urN a/setup.py b/setup.py self.extensions.extend([ext, ext_test]) if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"): -@@ -1973,6 +1975,8 @@ +@@ -1993,6 +1995,8 @@ if ffi_inc and ffi_lib: ext.include_dirs.extend(ffi_inc) ext.libraries.append(ffi_lib) diff --git a/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch b/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch index 474301edeb..dacd344dec 100644 --- a/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch +++ b/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:20:16.937702700 +0100 -+++ b/configure.ac 2014-10-11 14:20:19.747863400 +0100 -@@ -3621,21 +3621,36 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:32.537595500 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:37.654083800 +0300 +@@ -3834,21 +3834,36 @@ ],[]) AC_MSG_RESULT($was_it_defined) @@ -42,7 +42,7 @@ diff -urN a/configure.ac b/configure.ac [ac_cv_struct_sockaddr_storage=yes], [ac_cv_struct_sockaddr_storage=no])) AC_MSG_RESULT($ac_cv_struct_sockaddr_storage) -@@ -4821,7 +4836,10 @@ +@@ -5051,7 +5066,10 @@ AC_CHECK_TYPE(socklen_t,, AC_DEFINE(socklen_t,int, @@ -54,9 +54,9 @@ diff -urN a/configure.ac b/configure.ac #ifdef HAVE_SYS_TYPES_H #include #endif -diff -urN a/Misc/config_mingw b/Misc/config_mingw ---- a/Misc/config_mingw 2014-10-11 14:20:17.566738600 +0100 -+++ b/Misc/config_mingw 2014-10-11 14:20:19.748863500 +0100 +diff -Naur Python-3.5.0-orig/Misc/config_mingw Python-3.5.0/Misc/config_mingw +--- Python-3.5.0-orig/Misc/config_mingw 2015-09-21 13:41:09.276921800 +0300 ++++ Python-3.5.0/Misc/config_mingw 2015-09-21 13:41:37.660083200 +0300 @@ -10,3 +10,6 @@ # files to ignore ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist @@ -64,10 +64,10 @@ diff -urN a/Misc/config_mingw b/Misc/config_mingw + +# force detection of winsock2 functionality - require wxp or newer +ac_cv_func_getpeername=yes -diff -urN a/Modules/socketmodule.c b/Modules/socketmodule.c ---- a/Modules/socketmodule.c 2014-10-11 14:20:17.822753300 +0100 -+++ b/Modules/socketmodule.c 2014-10-11 14:20:19.751863600 +0100 -@@ -306,6 +306,12 @@ +diff -Naur Python-3.5.0-orig/Modules/socketmodule.c Python-3.5.0/Modules/socketmodule.c +--- Python-3.5.0-orig/Modules/socketmodule.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/Modules/socketmodule.c 2015-09-21 13:41:37.675081700 +0300 +@@ -307,6 +307,12 @@ /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and * EAI_* constants are defined in (the already included) ws2tcpip.h. */ @@ -80,9 +80,9 @@ diff -urN a/Modules/socketmodule.c b/Modules/socketmodule.c #else # include "addrinfo.h" #endif -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 14:20:17.492734400 +0100 -+++ b/pyconfig.h.in 2014-10-11 14:20:19.752863700 +0100 +diff -Naur Python-3.5.0-orig/pyconfig.h.in Python-3.5.0/pyconfig.h.in +--- Python-3.5.0-orig/pyconfig.h.in 2015-09-21 13:41:15.600289400 +0300 ++++ Python-3.5.0/pyconfig.h.in 2015-09-21 13:41:37.697079500 +0300 @@ -43,7 +43,7 @@ /* Define to 1 if you have the `acosh' function. */ #undef HAVE_ACOSH @@ -92,7 +92,7 @@ diff -urN a/pyconfig.h.in b/pyconfig.h.in #undef HAVE_ADDRINFO /* Define to 1 if you have the `alarm' function. */ -@@ -1149,6 +1149,9 @@ +@@ -1176,6 +1176,9 @@ /* Define to 1 if you have the `writev' function. */ #undef HAVE_WRITEV @@ -102,7 +102,7 @@ diff -urN a/pyconfig.h.in b/pyconfig.h.in /* Define if the zlib library has inflateCopy */ #undef HAVE_ZLIB_COPY -@@ -1481,7 +1484,7 @@ +@@ -1508,7 +1511,7 @@ /* Define to `unsigned int' if does not define. */ #undef size_t @@ -111,10 +111,10 @@ diff -urN a/pyconfig.h.in b/pyconfig.h.in #undef socklen_t /* Define to `int' if doesn't define. */ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:18.052766400 +0100 -+++ b/setup.py 2014-10-11 14:20:19.754863800 +0100 -@@ -762,7 +762,11 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:37.554093800 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:37.705078700 +0300 +@@ -782,7 +782,11 @@ exts.append( Extension('_posixsubprocess', ['_posixsubprocess.c']) ) # socket(2) diff --git a/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch b/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch index 9efddc031c..6c6eb16076 100644 --- a/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch +++ b/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:21.973990700 +0100 -+++ b/setup.py 2014-10-11 14:20:23.497077800 +0100 -@@ -621,11 +621,20 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:38.945954600 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:39.052943900 +0300 +@@ -641,11 +641,20 @@ if (config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)): # May be necessary on AIX for flock function libs = ['bsd'] @@ -25,7 +25,7 @@ diff -urN a/setup.py b/setup.py # spwd, shadow passwords if (config_h_vars.get('HAVE_GETSPNAM', False) or config_h_vars.get('HAVE_GETSPENT', False)): -@@ -648,7 +657,10 @@ +@@ -668,7 +677,10 @@ # Lance Ellinghaus's syslog module # syslog daemon interface @@ -37,7 +37,7 @@ diff -urN a/setup.py b/setup.py # # Here ends the simple stuff. From here on, modules need certain -@@ -749,17 +761,23 @@ +@@ -769,17 +781,23 @@ # crypt module. diff --git a/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch b/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch index 2681a2040b..fd9002412a 100644 --- a/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch +++ b/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/_winapi.c b/Modules/_winapi.c ---- a/Modules/_winapi.c 2014-10-11 14:20:25.474190900 +0100 -+++ b/Modules/_winapi.c 2014-10-11 14:20:27.224291000 +0100 +diff -Naur Python-3.5.0-orig/Modules/_winapi.c Python-3.5.0/Modules/_winapi.c +--- Python-3.5.0-orig/Modules/_winapi.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_winapi.c 2015-09-21 13:41:40.316817500 +0300 @@ -39,7 +39,9 @@ #define WINDOWS_LEAN_AND_MEAN @@ -8,12 +8,12 @@ diff -urN a/Modules/_winapi.c b/Modules/_winapi.c +#if defined(Py_DEBUG) #include +#endif + #include "winreparse.h" #if defined(MS_WIN32) && !defined(MS_WIN64) - #define HANDLE_TO_PYNUM(handle) \ -diff -urN a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c ---- a/PC/msvcrtmodule.c 2014-10-11 14:20:25.201175300 +0100 -+++ b/PC/msvcrtmodule.c 2014-10-11 14:20:27.225291100 +0100 +diff -Naur Python-3.5.0-orig/PC/msvcrtmodule.c Python-3.5.0/PC/msvcrtmodule.c +--- Python-3.5.0-orig/PC/msvcrtmodule.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/PC/msvcrtmodule.c 2015-09-21 13:41:40.329816200 +0300 @@ -21,7 +21,9 @@ #include #include @@ -24,10 +24,10 @@ diff -urN a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c #include #ifdef _MSC_VER -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:24.603141100 +0100 -+++ b/setup.py 2014-10-11 14:20:27.226291100 +0100 -@@ -887,6 +887,24 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:40.205828600 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:40.342814900 +0300 +@@ -907,6 +907,24 @@ min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? diff --git a/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch b/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch index 11edc9abed..e27ad5427c 100644 --- a/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch +++ b/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 14:20:28.478362800 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 14:20:30.943503700 +0100 -@@ -181,7 +181,7 @@ +diff -Naur Python-3.5.0-orig/Lib/distutils/command/build_ext.py Python-3.5.0/Lib/distutils/command/build_ext.py +--- Python-3.5.0-orig/Lib/distutils/command/build_ext.py 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/command/build_ext.py 2015-09-21 13:41:41.616687500 +0300 +@@ -184,7 +184,7 @@ # for extensions under windows use different directories # for Release and Debug builds. # also Python's library directory must be appended to library_dirs @@ -10,7 +10,7 @@ diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext # the 'libs' directory is for binary installs - we assume that # must be the *native* platform. But we don't really support # cross-compiling via a binary install anyway, so we let it go. -@@ -682,6 +682,20 @@ +@@ -701,6 +701,20 @@ # pyconfig.h that MSVC groks. The other Windows compilers all seem # to need it mentioned explicitly, though, so that's what we do. # Append '_d' to the python import library on debug builds. @@ -29,11 +29,11 @@ diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext + return ext.libraries + extra + if sys.platform == "win32": - from distutils.msvccompiler import MSVCCompiler + from distutils._msvccompiler import MSVCCompiler if not isinstance(self.compiler, MSVCCompiler): -diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py ---- a/Lib/distutils/util.py 2014-10-11 14:20:28.476362600 +0100 -+++ b/Lib/distutils/util.py 2014-10-11 14:20:30.945503900 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/util.py Python-3.5.0/Lib/distutils/util.py +--- Python-3.5.0-orig/Lib/distutils/util.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/util.py 2015-09-21 13:41:41.633685800 +0300 @@ -40,6 +40,8 @@ For other non-POSIX platforms, currently just returns 'sys.platform'. """ @@ -43,10 +43,10 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py # sniff sys.version for architecture. prefix = " bit (" i = sys.version.find(prefix) -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 14:20:28.531365800 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 14:20:30.946503900 +0100 -@@ -629,6 +629,8 @@ +diff -Naur Python-3.5.0-orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +--- Python-3.5.0-orig/Lib/sysconfig.py 2015-09-21 13:41:04.093440200 +0300 ++++ Python-3.5.0/Lib/sysconfig.py 2015-09-21 13:41:41.638685300 +0300 +@@ -622,6 +622,8 @@ For other non-POSIX platforms, currently just returns 'sys.platform'. """ if os.name == 'nt': diff --git a/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch b/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch index b6c5a7bc71..a472d41577 100644 --- a/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch +++ b/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py ---- a/Lib/distutils/ccompiler.py 2014-10-11 14:20:32.188575000 +0100 -+++ b/Lib/distutils/ccompiler.py 2014-10-11 14:20:34.825725800 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/ccompiler.py Python-3.5.0/Lib/distutils/ccompiler.py +--- Python-3.5.0-orig/Lib/distutils/ccompiler.py 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/ccompiler.py 2015-09-21 13:41:42.896559500 +0300 @@ -9,7 +9,7 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath @@ -19,9 +19,9 @@ diff -urN a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py for pattern, compiler in _default_compilers: if re.match(pattern, platform) is not None or \ re.match(pattern, osname) is not None: -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 14:20:32.188575000 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 14:20:34.826725900 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py Python-3.5.0/Lib/distutils/cygwinccompiler.py +--- Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/cygwinccompiler.py 2015-09-21 13:41:42.902558900 +0300 @@ -255,11 +255,16 @@ output_dir = '' obj_names = [] diff --git a/mingw-w64-python3/0430-MINGW-find-import-library.patch b/mingw-w64-python3/0430-MINGW-find-import-library.patch index bc450eaddb..905d61398a 100644 --- a/mingw-w64-python3/0430-MINGW-find-import-library.patch +++ b/mingw-w64-python3/0430-MINGW-find-import-library.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 14:20:36.095798400 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 14:20:39.245978600 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py Python-3.5.0/Lib/distutils/cygwinccompiler.py +--- Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py 2015-09-21 13:41:44.031446000 +0300 ++++ Python-3.5.0/Lib/distutils/cygwinccompiler.py 2015-09-21 13:41:44.133435800 +0300 @@ -93,6 +93,7 @@ obj_extension = ".o" static_lib_extension = ".a" diff --git a/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch b/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch index b496d4cca9..95b2ce77de 100644 --- a/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch +++ b/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:41.346098700 +0100 -+++ b/setup.py 2014-10-11 14:20:43.085198200 +0100 -@@ -806,10 +806,13 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:41.508698300 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:45.377311400 +0300 +@@ -826,10 +826,13 @@ if (ssl_incs is not None and ssl_libs is not None): diff --git a/mingw-w64-python3/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch b/mingw-w64-python3/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch deleted file mode 100644 index 4d123c55c4..0000000000 --- a/mingw-w64-python3/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/Include/node.h b/Include/node.h ---- a/Include/node.h 2014-10-11 14:20:45.233321100 +0100 -+++ b/Include/node.h 2014-10-11 14:20:46.940418700 +0100 -@@ -21,7 +21,7 @@ - char *str, int lineno, int col_offset); - PyAPI_FUNC(void) PyNode_Free(node *n); - #ifndef Py_LIMITED_API --Py_ssize_t _PyNode_SizeOf(node *n); -+PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n); - #endif - - /* Node access functions */ diff --git a/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch b/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch index fe992557f3..2d4a0b4389 100644 --- a/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch +++ b/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 14:20:48.129486700 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 14:20:50.802639600 +0100 +diff -Naur Python-3.5.0-orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +--- Python-3.5.0-orig/Lib/sysconfig.py 2015-09-21 13:41:42.792569900 +0300 ++++ Python-3.5.0/Lib/sysconfig.py 2015-09-21 13:41:46.638185300 +0300 @@ -95,6 +95,9 @@ _CONFIG_VARS = None _USER_BASE = None @@ -11,7 +11,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py def _safe_realpath(path): try: -@@ -178,7 +181,7 @@ +@@ -171,7 +174,7 @@ def _get_default_scheme(): @@ -20,7 +20,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py # the default scheme for posix is posix_prefix return 'posix_prefix' return os.name -@@ -190,7 +193,7 @@ +@@ -183,7 +186,7 @@ def joinuser(*args): return os.path.expanduser(os.path.join(*args)) @@ -29,7 +29,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py base = os.environ.get("APPDATA") or "~" if env_base: return env_base -@@ -475,7 +478,7 @@ +@@ -468,7 +471,7 @@ def get_config_h_filename(): """Return the path of pyconfig.h.""" if _PYTHON_BUILD: @@ -38,7 +38,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py inc_dir = os.path.join(_sys_home or _PROJECT_BASE, "PC") else: inc_dir = _sys_home or _PROJECT_BASE -@@ -546,9 +549,9 @@ +@@ -539,9 +542,9 @@ # sys.abiflags may not be defined on all platforms. _CONFIG_VARS['abiflags'] = '' @@ -50,7 +50,7 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py _init_posix(_CONFIG_VARS) # For backward compatibility, see issue19555 SO = _CONFIG_VARS.get('EXT_SUFFIX') -@@ -561,7 +564,7 @@ +@@ -554,7 +557,7 @@ # Always convert srcdir to an absolute path srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) diff --git a/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch b/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch index f3cc87be51..0ee4c453c4 100644 --- a/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch +++ b/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch @@ -1,7 +1,7 @@ -diff -urN a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c ---- a/Modules/_ctypes/_ctypes.c 2014-10-11 14:20:52.616743400 +0100 -+++ b/Modules/_ctypes/_ctypes.c 2014-10-11 14:20:54.635858900 +0100 -@@ -3079,11 +3079,28 @@ +diff -Naur Python-3.5.0-orig/Modules/_ctypes/_ctypes.c Python-3.5.0/Modules/_ctypes/_ctypes.c +--- Python-3.5.0-orig/Modules/_ctypes/_ctypes.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_ctypes/_ctypes.c 2015-09-21 13:41:47.943054800 +0300 +@@ -3085,11 +3085,28 @@ mangled_name = alloca(strlen(name) + 1 + 1 + 1 + 3); /* \0 _ @ %d */ if (!mangled_name) return NULL; diff --git a/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch b/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch index c1d94208ec..19290133ae 100644 --- a/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch +++ b/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:20:55.673918200 +0100 -+++ b/setup.py 2014-10-11 14:20:58.333070300 +0100 -@@ -2211,7 +2211,7 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:46.528196300 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:49.175931500 +0300 +@@ -2239,7 +2239,7 @@ else: newfilename = filename + minoronly log.info('renaming {} to {}'.format(filename, newfilename)) diff --git a/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch b/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch index c5d3f56e8f..d77abc46ff 100644 --- a/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch +++ b/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 14:20:59.701148600 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 14:21:02.113286600 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py Python-3.5.0/Lib/distutils/cygwinccompiler.py +--- Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py 2015-09-21 13:41:45.246324500 +0300 ++++ Python-3.5.0/Lib/distutils/cygwinccompiler.py 2015-09-21 13:41:50.481800900 +0300 @@ -48,7 +48,6 @@ import os import sys diff --git a/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch b/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch index c4128ae0f8..615286e78c 100644 --- a/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch +++ b/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py ---- a/Lib/distutils/sysconfig.py 2014-10-11 14:21:03.396359900 +0100 -+++ b/Lib/distutils/sysconfig.py 2014-10-11 14:21:05.979507700 +0100 -@@ -62,6 +62,17 @@ +diff -Naur Python-3.5.0-orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py +--- Python-3.5.0-orig/Lib/distutils/sysconfig.py 2015-09-21 13:41:23.499499400 +0300 ++++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-09-21 13:41:51.721676900 +0300 +@@ -53,6 +53,17 @@ return _is_python_source_dir(project_base) python_build = _python_build() @@ -19,7 +19,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py # Calculate the build qualifier flags if they are defined. Adding the flags # to the include and lib directories only makes sense for an installation, not # an in-source build. -@@ -95,7 +106,7 @@ +@@ -86,7 +97,7 @@ """ if prefix is None: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX @@ -28,7 +28,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py if python_build: # Assume the executable is in the build directory. The # pyconfig.h file should be in the same directory. Since -@@ -140,7 +151,7 @@ +@@ -131,7 +142,7 @@ else: prefix = plat_specific and EXEC_PREFIX or PREFIX @@ -37,7 +37,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py libpython = os.path.join(prefix, "lib", "python" + get_python_version()) if standard_lib: -@@ -250,7 +261,7 @@ +@@ -241,7 +252,7 @@ def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: @@ -46,7 +46,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py inc_dir = os.path.join(_sys_home or project_base, "PC") else: inc_dir = _sys_home or project_base -@@ -474,6 +485,9 @@ +@@ -465,6 +476,9 @@ def _init_nt(): @@ -56,7 +56,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py """Initialize the module as appropriate for NT""" g = {} # set basic install directories -@@ -523,7 +537,7 @@ +@@ -514,7 +528,7 @@ # Always convert srcdir to an absolute path srcdir = _config_vars.get('srcdir', project_base) @@ -65,7 +65,7 @@ diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py if python_build: # If srcdir is a relative path (typically '.' or '..') # then it should be interpreted relative to the directory -@@ -542,7 +556,7 @@ +@@ -533,7 +547,7 @@ # Normally it is relative to the build directory. However, during # testing, for example, we might be running a non-installed python # from a different directory. diff --git a/mingw-w64-python3/0490-MINGW-customize-site.patch b/mingw-w64-python3/0490-MINGW-customize-site.patch index b2b9e4fd84..26c033ae13 100644 --- a/mingw-w64-python3/0490-MINGW-customize-site.patch +++ b/mingw-w64-python3/0490-MINGW-customize-site.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/site.py b/Lib/site.py ---- a/Lib/site.py 2014-10-11 14:21:07.163575400 +0100 -+++ b/Lib/site.py 2014-10-11 14:21:10.032739500 +0100 +diff -Naur Python-3.5.0-orig/Lib/site.py Python-3.5.0/Lib/site.py +--- Python-3.5.0-orig/Lib/site.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/site.py 2015-09-21 13:41:52.913557700 +0300 @@ -267,6 +267,12 @@ USER_SITE = get_path('purelib', 'osx_framework_user') return USER_SITE @@ -14,7 +14,7 @@ diff -urN a/Lib/site.py b/Lib/site.py USER_SITE = get_path('purelib', '%s_user' % os.name) return USER_SITE -@@ -298,12 +304,13 @@ +@@ -297,12 +303,13 @@ if prefixes is None: prefixes = PREFIXES diff --git a/mingw-w64-python3/0500-add-python-config-sh.patch b/mingw-w64-python3/0500-add-python-config-sh.patch index b39ccb2c8b..6aaa698a2f 100644 --- a/mingw-w64-python3/0500-add-python-config-sh.patch +++ b/mingw-w64-python3/0500-add-python-config-sh.patch @@ -1,6 +1,6 @@ -diff -urN a/Misc/python-config.sh.in b/Misc/python-config.sh.in ---- a/Misc/python-config.sh.in 2014-10-11 14:21:11.611829800 +0100 -+++ b/Misc/python-config.sh.in 2014-10-11 14:21:13.685948500 +0100 +diff -Naur Python-3.5.0-orig/Misc/python-config.sh.in Python-3.5.0/Misc/python-config.sh.in +--- Python-3.5.0-orig/Misc/python-config.sh.in 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Misc/python-config.sh.in 2015-09-21 13:41:54.198429200 +0300 @@ -1,25 +1,37 @@ #!/bin/sh @@ -42,7 +42,7 @@ diff -urN a/Misc/python-config.sh.in b/Misc/python-config.sh.in + fi + # Since we don't know where the output from this script will end up + # we keep all paths in Windows-land since MSYS2 can handle that -+ # whilst native tools can't handle paths in MSYS2-land. ++ # while native tools can't handle paths in MSYS2-land. + if [ "$OSTYPE" = "msys" ]; then + RESULT=$(cd "$RESULT" && pwd -W) fi @@ -66,7 +66,7 @@ diff -urN a/Misc/python-config.sh.in b/Misc/python-config.sh.in +if [ "$ABIFLAGS" = "@""ABIFLAGS""@" ] ; then + ABIFLAGS= +fi - LIBS="@LIBS@ $SYSLIBS -lpython${VERSION}${ABIFLAGS}" + LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" BASECFLAGS="@BASECFLAGS@" -LDLIBRARY="@LDLIBRARY@" -LINKFORSHARED="@LINKFORSHARED@" diff --git a/mingw-w64-python3/0510-cross-darwin-feature.patch b/mingw-w64-python3/0510-cross-darwin-feature.patch index 48644bc218..14344dedca 100644 --- a/mingw-w64-python3/0510-cross-darwin-feature.patch +++ b/mingw-w64-python3/0510-cross-darwin-feature.patch @@ -1,6 +1,6 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:14.772010600 +0100 -+++ b/configure.ac 2014-10-11 14:21:17.561170100 +0100 +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:38.885960600 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:55.469158400 +0300 @@ -374,6 +374,7 @@ then # avoid using uname for cross builds @@ -53,7 +53,7 @@ diff -urN a/configure.ac b/configure.ac *) # for now, limit cross builds to known configurations MACHDEP="unknown" -@@ -1205,6 +1229,26 @@ +@@ -1347,6 +1371,26 @@ AC_SUBST(BASECFLAGS) AC_SUBST(CFLAGS_NODIST) @@ -80,7 +80,7 @@ diff -urN a/configure.ac b/configure.ac # The -arch flags for universal builds on OSX UNIVERSAL_ARCH_FLAGS= AC_SUBST(UNIVERSAL_ARCH_FLAGS) -@@ -1404,7 +1448,7 @@ +@@ -1592,7 +1636,7 @@ ;; esac else @@ -89,7 +89,7 @@ diff -urN a/configure.ac b/configure.ac then # 10.4 was the first release to support Intel archs cur_target="10.4" -@@ -1975,7 +2019,7 @@ +@@ -2163,7 +2207,7 @@ if test "${enable_universalsdk}"; then : else @@ -98,7 +98,7 @@ diff -urN a/configure.ac b/configure.ac fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; -@@ -2000,7 +2044,7 @@ +@@ -2188,7 +2232,7 @@ ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes]) if test "${ac_osx_32bit}" = "yes"; then @@ -107,7 +107,7 @@ diff -urN a/configure.ac b/configure.ac i386) MACOSX_DEFAULT_ARCH="i386" ;; -@@ -2012,7 +2056,7 @@ +@@ -2200,7 +2244,7 @@ ;; esac else diff --git a/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch b/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch index e144e3d6e2..d24f7b8fbf 100644 --- a/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch +++ b/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:18.680234100 +0100 -+++ b/configure.ac 2014-10-11 14:21:21.473393900 +0100 -@@ -1708,7 +1708,7 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:56.872256800 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:41:56.988523200 +0300 +@@ -1896,7 +1896,7 @@ AC_HEADER_STDC AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ @@ -10,7 +10,7 @@ diff -urN a/configure.ac b/configure.ac sched.h shadow.h signal.h stdint.h stropts.h termios.h \ unistd.h utime.h \ poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ -@@ -2418,9 +2418,11 @@ +@@ -2609,9 +2609,11 @@ : else if test "$with_threads" = "yes" -o -z "$with_threads"; then @@ -25,7 +25,7 @@ diff -urN a/configure.ac b/configure.ac fi fi -@@ -4672,6 +4674,14 @@ +@@ -4902,6 +4904,14 @@ AC_CHECK_HEADERS(curses.h ncurses.h) @@ -40,9 +40,9 @@ diff -urN a/configure.ac b/configure.ac # On Solaris, term.h requires curses.h AC_CHECK_HEADERS(term.h,,,[ #ifdef HAVE_CURSES_H -diff -urN a/Python/condvar.h b/Python/condvar.h ---- a/Python/condvar.h 2014-10-11 14:21:18.718236300 +0100 -+++ b/Python/condvar.h 2014-10-11 14:21:21.475394000 +0100 +diff -Naur Python-3.5.0-orig/Python/condvar.h Python-3.5.0/Python/condvar.h +--- Python-3.5.0-orig/Python/condvar.h 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/condvar.h 2015-09-21 13:41:56.995296000 +0300 @@ -42,6 +42,12 @@ #include "Python.h" @@ -56,9 +56,9 @@ diff -urN a/Python/condvar.h b/Python/condvar.h #ifndef _POSIX_THREADS /* This means pthreads are not implemented in libc headers, hence the macro not present in unistd.h. But they still can be implemented as an external -diff -urN a/Python/thread.c b/Python/thread.c ---- a/Python/thread.c 2014-10-11 14:21:18.719236400 +0100 -+++ b/Python/thread.c 2014-10-11 14:21:21.476394100 +0100 +diff -Naur Python-3.5.0-orig/Python/thread.c Python-3.5.0/Python/thread.c +--- Python-3.5.0-orig/Python/thread.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/thread.c 2015-09-21 13:41:57.011099200 +0300 @@ -7,6 +7,12 @@ #include "Python.h" diff --git a/mingw-w64-python3/0530-mingw-system-libffi.patch b/mingw-w64-python3/0530-mingw-system-libffi.patch index 61814599b1..58730e87e1 100644 --- a/mingw-w64-python3/0530-mingw-system-libffi.patch +++ b/mingw-w64-python3/0530-mingw-system-libffi.patch @@ -1,81 +1,6 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:22.670462400 +0100 -+++ b/configure.ac 2014-10-11 14:21:25.420619700 +0100 -@@ -2533,14 +2533,32 @@ - [], - [with_system_ffi="no"]) - --if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then -- LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" -+if test "$with_system_ffi" = "yes"; then -+ LIBFFI_INCLUDEDIR="$LIBFFI_INCLUDEDIR" -+fi -+AC_MSG_RESULT($with_system_ffi) -+ -+ac_previous_cppflags=$CPPFLAGS -+CPPFLAGS="-I$LIBFFI_INCLUDEDIR" -+ac_previous_ldflags=$LDFLAGS -+# check for ffi.h -+AC_CHECK_HEADER(ffi.h, [ -+ AC_DEFINE(WITH_SYSTEM_LIBFFI, 1, -+ [Define if we have external libffi.]) -+ ffi_h="yes" -+], -+ffi_h="no" -+) -+if test "$ffi_h" = "yes"; then -+ LIBFFI_INCLUDEDIR="$LIBFFI_INCLUDEDIR" - else - LIBFFI_INCLUDEDIR="" - fi -+CPPFLAGS=$ac_previous_cppflags -+LDFLAGS=$ac_previous_ldflags - AC_SUBST(LIBFFI_INCLUDEDIR) - --AC_MSG_RESULT($with_system_ffi) -+ - - # Check for use of the system libmpdec library - AC_MSG_CHECKING(for --with-system-libmpdec) -diff -urN a/Lib/ctypes/test/test_as_parameter.py b/Lib/ctypes/test/test_as_parameter.py ---- a/Lib/ctypes/test/test_as_parameter.py 2014-10-11 14:21:22.822471100 +0100 -+++ b/Lib/ctypes/test/test_as_parameter.py 2014-10-11 14:21:25.422619800 +0100 -@@ -2,6 +2,7 @@ - from ctypes import * - from ctypes.test import need_symbol - import _ctypes_test -+import sys - - dll = CDLL(_ctypes_test.__file__) - -@@ -169,6 +170,10 @@ - s2h = dll.ret_2h_func(self.wrap(inp)) - self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) - -+ # This is known cdecl incompatibility between GCC -+ # and MSVC. It is addressed in GCC issue #36834. -+ # Python libffi detect it and complain. -+ @unittest.skipIf(sys.platform == "win32" and sys.version.find("GCC") >= 0, 'XFAIL GCC(mingw)') - def test_struct_return_8H(self): - class S8I(Structure): - _fields_ = [("a", c_int), -diff -urN a/Lib/ctypes/test/test_functions.py b/Lib/ctypes/test/test_functions.py ---- a/Lib/ctypes/test/test_functions.py 2014-10-11 14:21:22.810470400 +0100 -+++ b/Lib/ctypes/test/test_functions.py 2014-10-11 14:21:25.424619900 +0100 -@@ -352,6 +352,10 @@ - s2h = windll.s_ret_2h_func(S2H(99, 88)) - self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) - -+ # This is known cdecl incompatibility between GCC -+ # and MSVC. It is addressed in GCC issue #36834. -+ # Python libffi detect it and complain. -+ @unittest.skipIf(sys.platform == "win32" and sys.version.find("GCC") >= 0, 'XFAIL GCC(mingw)') - def test_struct_return_8H(self): - class S8I(Structure): - _fields_ = [("a", c_int), -diff -urN a/Modules/_ctypes/libffi/fficonfig.py.in b/Modules/_ctypes/libffi/fficonfig.py.in ---- a/Modules/_ctypes/libffi/fficonfig.py.in 2014-10-11 14:21:23.544512400 +0100 -+++ b/Modules/_ctypes/libffi/fficonfig.py.in 2014-10-11 14:21:25.425619900 +0100 +diff -Naur Python-3.5.0-orig/Modules/_ctypes/libffi/fficonfig.py.in Python-3.5.0/Modules/_ctypes/libffi/fficonfig.py.in +--- Python-3.5.0-orig/Modules/_ctypes/libffi/fficonfig.py.in 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_ctypes/libffi/fficonfig.py.in 2015-09-21 13:41:58.520304800 +0300 @@ -23,6 +23,7 @@ 'FRV': ['src/frv/eabi.S', 'src/frv/ffi.c'], 'S390': ['src/s390/sysv.S', 'src/s390/ffi.c'], @@ -94,39 +19,25 @@ diff -urN a/Modules/_ctypes/libffi/fficonfig.py.in b/Modules/_ctypes/libffi/ffic ffi_sources += ffi_platforms['@TARGET@'] ffi_cflags = '@CFLAGS@' -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 14:21:23.287497700 +0100 -+++ b/pyconfig.h.in 2014-10-11 14:21:25.427620100 +0100 -@@ -1352,6 +1352,9 @@ - /* Define if you want to compile in Python-specific mallocs */ - #undef WITH_PYMALLOC - -+/* Define if we have external libffi. */ -+#undef WITH_SYSTEM_LIBFFI -+ - /* Define if you want to compile in rudimentary thread support */ - #undef WITH_THREAD - -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:21:22.671462400 +0100 -+++ b/setup.py 2014-10-11 14:21:25.428620100 +0100 -@@ -1880,6 +1880,11 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:50.381810900 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:41:58.521433600 +0300 +@@ -1908,6 +1908,10 @@ return True def configure_ctypes(self, ext): -+ if host_platform in ['mingw', 'win32']: ++ if host_platform == 'win32': + ext.libraries.extend(['ole32', 'oleaut32', 'uuid']) -+ #AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE" + ext.export_symbols.extend(['DllGetClassObject PRIVATE', + 'DllCanUnloadNow PRIVATE']) if not self.use_system_libffi: if host_platform == 'darwin': return self.configure_ctypes_darwin(ext) -@@ -1904,6 +1909,10 @@ +@@ -1932,6 +1936,10 @@ if not self.verbose: config_args.append("-q") -+ if host_platform in ['mingw', 'win32']: ++ if host_platform == 'win32': + table = str.maketrans('\\', '/') + ffi_builddir = ffi_builddir.translate(table) + ffi_srcdir = ffi_srcdir.translate(table) diff --git a/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch b/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch index 98678800a5..0c1073e2e5 100644 --- a/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch +++ b/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch @@ -1,6 +1,6 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:26.491680900 +0100 -+++ b/configure.ac 2014-10-11 14:21:29.254839000 +0100 +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:58.367916800 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:42:00.039669600 +0300 @@ -602,6 +602,16 @@ fi AC_MSG_RESULT($MACHDEP) @@ -18,18 +18,18 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING([for init system calls]) AC_SUBST(INITSYS) case $host in -diff -urN a/Include/osdefs.h b/Include/osdefs.h ---- a/Include/osdefs.h 2014-10-11 14:21:27.447735600 +0100 -+++ b/Include/osdefs.h 2014-10-11 14:21:29.255839000 +0100 -@@ -14,6 +14,7 @@ +diff -Naur Python-3.5.0-orig/Include/osdefs.h Python-3.5.0/Include/osdefs.h +--- Python-3.5.0-orig/Include/osdefs.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/osdefs.h 2015-09-21 13:42:00.047571200 +0300 +@@ -12,6 +12,7 @@ #define ALTSEP L'/' #define MAXPATHLEN 256 #define DELIM L';' +#define DELIMSTR ";" #endif - #endif -@@ -42,6 +43,7 @@ + /* Filename separator */ +@@ -39,6 +40,7 @@ /* Search path entry delimiter */ #ifndef DELIM #define DELIM L':' @@ -37,9 +37,9 @@ diff -urN a/Include/osdefs.h b/Include/osdefs.h #endif #ifdef __cplusplus -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:21:27.062713600 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:21:29.256839100 +0100 +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:41:32.555593700 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:00.074662400 +0300 @@ -98,7 +98,8 @@ # C flags used for building the interpreter object files PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE @@ -50,9 +50,9 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Machine-dependent subdirectories MACHDEP= @MACHDEP@ -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 14:21:27.212722200 +0100 -+++ b/Modules/getpath.c 2014-10-11 14:21:29.258839200 +0100 +diff -Naur Python-3.5.0-orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0-orig/Modules/getpath.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/getpath.c 2015-09-21 13:42:00.084821600 +0300 @@ -118,7 +118,7 @@ #endif @@ -62,9 +62,9 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" #endif -diff -urN a/Modules/Setup.dist b/Modules/Setup.dist ---- a/Modules/Setup.dist 2014-10-11 14:21:27.422734200 +0100 -+++ b/Modules/Setup.dist 2014-10-11 14:21:29.259839300 +0100 +diff -Naur Python-3.5.0-orig/Modules/Setup.dist Python-3.5.0/Modules/Setup.dist +--- Python-3.5.0-orig/Modules/Setup.dist 2015-09-21 13:41:18.333016100 +0300 ++++ Python-3.5.0/Modules/Setup.dist 2015-09-21 13:42:00.091594400 +0300 @@ -84,14 +84,14 @@ # Empty since this is now just the runtime prefix. DESTPATH= @@ -77,8 +77,8 @@ diff -urN a/Modules/Setup.dist b/Modules/Setup.dist TESTPATH= # Path components for machine- or system-dependent modules and shared libraries --MACHDEPPATH=:plat-$(MACHDEP) -+MACHDEPPATH=$(DELIM)plat-$(MACHDEP) +-MACHDEPPATH=:$(PLATDIR) ++MACHDEPPATH=$(DELIM)$(PLATDIR) EXTRAMACHDEPPATH= COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH) diff --git a/mingw-w64-python3/0550-mingw-regen-use-stddef_h.patch b/mingw-w64-python3/0550-mingw-regen-use-stddef_h.patch index 5bfb75fa91..55b9627fa1 100644 --- a/mingw-w64-python3/0550-mingw-regen-use-stddef_h.patch +++ b/mingw-w64-python3/0550-mingw-regen-use-stddef_h.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/plat-generic/regen b/Lib/plat-generic/regen ---- a/Lib/plat-generic/regen 2014-10-11 14:21:30.502910400 +0100 -+++ b/Lib/plat-generic/regen 2014-10-11 14:21:33.107059300 +0100 +diff -Naur Python-3.5.0-orig/Lib/plat-generic/regen Python-3.5.0/Lib/plat-generic/regen +--- Python-3.5.0-orig/Lib/plat-generic/regen 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/plat-generic/regen 2015-09-21 13:42:01.557905600 +0300 @@ -1,3 +1,9 @@ #! /bin/sh set -v @@ -12,10 +12,10 @@ diff -urN a/Lib/plat-generic/regen b/Lib/plat-generic/regen + REGENHEADER=/usr/include/netinet/in.h +fi +eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" $REGENHEADER -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:21:31.602973300 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:21:33.108059400 +0100 -@@ -1289,7 +1289,7 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:42:01.413419200 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:01.563549600 +0300 +@@ -1322,7 +1322,7 @@ else \ PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \ fi; \ diff --git a/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch new file mode 100644 index 0000000000..1e6b9bb24e --- /dev/null +++ b/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch @@ -0,0 +1,481 @@ +diff -Naur Python-3.5.0-orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h +--- Python-3.5.0-orig/Include/pylifecycle.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/pylifecycle.h 2015-09-21 13:42:03.010671200 +0300 +@@ -7,6 +7,12 @@ + extern "C" { + #endif + ++PyAPI_FUNC(wchar_t) Py_GetSepW(wchar_t *); ++PyAPI_FUNC(char) Py_GetSepA(char *); ++ ++PyAPI_FUNC(void) Py_NormalizeSepsW(wchar_t *); ++PyAPI_FUNC(void) Py_NormalizeSepsA(char *); ++ + PyAPI_FUNC(void) Py_SetProgramName(wchar_t *); + PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); + +diff -Naur Python-3.5.0-orig/Lib/ntpath.py Python-3.5.0/Lib/ntpath.py +--- Python-3.5.0-orig/Lib/ntpath.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/ntpath.py 2015-09-21 13:42:03.025345600 +0300 +@@ -24,9 +24,15 @@ + curdir = '.' + pardir = '..' + extsep = '.' +-sep = '\\' ++if sys.platform == "win32" and "MSYSTEM" in os.environ: ++ sep = '/' ++ altsep = '\\' ++else: ++ sep = '\\' ++ altsep = '/' ++bsep = str.encode(sep) ++baltsep = str.encode(altsep) + pathsep = ';' +-altsep = '/' + defpath = '.;C:\\bin' + if 'ce' in sys.builtin_module_names: + defpath = '\\Windows' +@@ -34,9 +38,27 @@ + + def _get_bothseps(path): + if isinstance(path, bytes): +- return b'\\/' ++ return bsep+baltsep + else: +- return '\\/' ++ return sep+altsep ++ ++def _get_sep(path): ++ if isinstance(path, bytes): ++ return bsep ++ else: ++ return sep ++ ++def _get_altsep(path): ++ if isinstance(path, bytes): ++ return baltsep ++ else: ++ return altsep ++ ++def _get_colon(path): ++ if isinstance(path, bytes): ++ return b':' ++ else: ++ return ':' + + # Normalize the case of a pathname and map slashes to backslashes. + # Other normalizations (such as optimizing '../' away) are not done +@@ -48,9 +52,9 @@ + Makes all characters lowercase and all slashes into backslashes.""" + try: + if isinstance(s, bytes): +- return s.replace(b'/', b'\\').lower() ++ return s.replace(baltsep, bsep).lower() + else: +- return s.replace('/', '\\').lower() ++ return s.replace(altsep, sep).lower() + except (TypeError, AttributeError): + if not isinstance(s, (bytes, str)): + raise TypeError("normcase() argument must be str or bytes, " +@@ -73,13 +77,8 @@ + + # Join two (or more) paths. + def join(path, *paths): +- if isinstance(path, bytes): +- sep = b'\\' +- seps = b'\\/' +- colon = b':' +- else: +- sep = '\\' +- seps = '\\/' +- colon = ':' ++ sep = _get_sep(path) ++ seps = _get_bothseps(path) ++ colon = _get_colon(path) + try: + if not paths: +@@ -138,14 +142,9 @@ + + """ + if len(p) >= 2: +- if isinstance(p, bytes): +- sep = b'\\' +- altsep = b'/' +- colon = b':' +- else: +- sep = '\\' +- altsep = '/' +- colon = ':' ++ sep = _get_sep(p) ++ altsep = _get_altsep(p) ++ colon = _get_colon(p) + normp = p.replace(altsep, sep) + if (normp[0:2] == sep*2) and (normp[2:3] != sep): + # is a UNC path: +@@ -219,9 +223,9 @@ + + def splitext(p): + if isinstance(p, bytes): +- return genericpath._splitext(p, b'\\', b'/', b'.') ++ return genericpath._splitext(p, bsep, baltsep, b'.') + else: +- return genericpath._splitext(p, '\\', '/', '.') ++ return genericpath._splitext(p, sep, altsep, '.') + splitext.__doc__ = genericpath._splitext.__doc__ + + +@@ -465,15 +469,13 @@ + + def normpath(path): + """Normalize path, eliminating double slashes, etc.""" ++ sep = _get_sep(path) ++ altsep = _get_altsep(path) + if isinstance(path, bytes): +- sep = b'\\' +- altsep = b'/' + curdir = b'.' + pardir = b'..' + special_prefixes = (b'\\\\.\\', b'\\\\?\\') + else: +- sep = '\\' +- altsep = '/' + curdir = '.' + pardir = '..' + special_prefixes = ('\\\\.\\', '\\\\?\\') +@@ -550,12 +554,11 @@ + + def relpath(path, start=None): + """Return a relative version of a path""" ++ sep = _get_sep(path) + if isinstance(path, bytes): +- sep = b'\\' + curdir = b'.' + pardir = b'..' + else: +- sep = '\\' + curdir = '.' + pardir = '..' + +@@ -608,13 +612,11 @@ + if not paths: + raise ValueError('commonpath() arg is an empty sequence') + ++ sep = _get_sep(path) ++ altsep = _get_altsep(path) + if isinstance(paths[0], bytes): +- sep = b'\\' +- altsep = b'/' + curdir = b'.' + else: +- sep = '\\' +- altsep = '/' + curdir = '.' + + try: +diff -Naur Python-3.5.0-orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0-orig/Modules/getpath.c 2015-09-21 13:42:01.429222400 +0300 ++++ Python-3.5.0/Modules/getpath.c 2015-09-21 13:42:03.044535200 +0300 +@@ -152,7 +152,7 @@ + reduce(wchar_t *dir) + { + size_t i = wcslen(dir); +- while (i > 0 && dir[i] != SEP) ++ while (i > 0 && dir[i] != Py_GetSepW(dir)) + --i; + dir[i] = '\0'; + } +@@ -224,12 +224,12 @@ + joinpath(wchar_t *buffer, wchar_t *stuff) + { + size_t n, k; +- if (stuff[0] == SEP) ++ if (stuff[0] == Py_GetSepW(buffer)) + n = 0; + else { + n = wcslen(buffer); +- if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) +- buffer[n++] = SEP; ++ if (n > 0 && buffer[n-1] != Py_GetSepW(buffer) && n < MAXPATHLEN) ++ buffer[n++] = Py_GetSepW(buffer); + } + if (n > MAXPATHLEN) + Py_FatalError("buffer overflow in getpath.c's joinpath()"); +@@ -245,7 +245,7 @@ + static void + copy_absolute(wchar_t *path, wchar_t *p, size_t pathlen) + { +- if (p[0] == SEP) ++ if (p[0] == Py_GetSepW(p) || (p[0] != 0 && p[1] == L':')) + wcscpy(path, p); + else { + if (!_Py_wgetcwd(path, pathlen)) { +@@ -253,7 +253,7 @@ + wcscpy(path, p); + return; + } +- if (p[0] == '.' && p[1] == SEP) ++ if (p[0] == '.' && p[1] == Py_GetSepW(path)) + p += 2; + joinpath(path, p); + } +@@ -265,7 +265,7 @@ + { + wchar_t buffer[MAXPATHLEN+1]; + +- if (path[0] == SEP) ++ if (path[0] == Py_GetSepW(path)) + return; + copy_absolute(buffer, path, MAXPATHLEN+1); + wcscpy(path, buffer); +@@ -478,7 +478,7 @@ + extern wchar_t *Py_GetProgramName(void); + + static wchar_t delimiter[2] = {DELIM, '\0'}; +- static wchar_t separator[2] = {SEP, '\0'}; ++ wchar_t separator[2] = {Py_GetSepW(NULL), '\0'}; + char *_rtpypath = Py_GETENV("PYTHONPATH"); /* XXX use wide version on Windows */ + wchar_t *rtpypath = NULL; + wchar_t *home = Py_GetPythonHome(); +@@ -507,11 +507,12 @@ + #endif + wchar_t *_pythonpath, *_prefix, *_exec_prefix; + wchar_t *lib_python; ++ const char * lib_python_VERSION = (Py_GetSepA(NULL) == '/') ? "lib/python" VERSION : "lib\\python" VERSION; + + _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); + _prefix = Py_DecodeLocale(PREFIX, NULL); + _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); +- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); ++ lib_python = Py_DecodeLocale(lib_python_VERSION, NULL); + + if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { + Py_FatalError( +@@ -529,7 +530,7 @@ + * other way to find a directory to start the search from. If + * $PATH isn't exported, you lose. + */ +- if (wcschr(prog, SEP)) ++ if (wcschr(prog, Py_GetSepW(prog))) + wcsncpy(progpath, prog, MAXPATHLEN); + #ifdef __APPLE__ + /* On Mac OS X, if a script uses an interpreter of the form +@@ -578,7 +579,7 @@ + else + progpath[0] = '\0'; + PyMem_RawFree(path_buffer); +- if (progpath[0] != SEP && progpath[0] != '\0') ++ if (progpath[0] != separator[0] && progpath[0] != '\0' && progpath[1] != L':' ) + absolutize(progpath); + wcsncpy(argv0_path, progpath, MAXPATHLEN); + argv0_path[MAXPATHLEN] = '\0'; +@@ -736,7 +737,7 @@ + while (1) { + wchar_t *delim = wcschr(defpath, DELIM); + +- if (defpath[0] != SEP) ++ if (defpath[0] != separator[0] && defpath[0] != '\0' && defpath[1] != L':') + /* Paths are relative to prefix */ + bufsz += prefixsz; + +@@ -777,7 +778,7 @@ + while (1) { + wchar_t *delim = wcschr(defpath, DELIM); + +- if (defpath[0] != SEP) { ++ if (defpath[0] != separator[0] && defpath[0] != '\0' && defpath[1] != L':') { + wcscat(buf, prefix); + wcscat(buf, separator); + } +diff -Naur Python-3.5.0-orig/Modules/posixmodule.c Python-3.5.0/Modules/posixmodule.c +--- Python-3.5.0-orig/Modules/posixmodule.c 2015-09-21 13:41:14.291420300 +0300 ++++ Python-3.5.0/Modules/posixmodule.c 2015-09-21 13:42:03.062596000 +0300 +@@ -3318,6 +3318,7 @@ + PyMem_RawFree(wbuf2); + return PyErr_SetFromWindowsErr(0); + } ++ Py_NormalizeSepsW(wbuf2); + resobj = PyUnicode_FromWideChar(wbuf2, len); + if (wbuf2 != wbuf) + PyMem_RawFree(wbuf2); +@@ -3796,7 +3797,10 @@ + result = GetFullPathNameW(path->wide, result, woutbufp, &wtemp); + } + if (result) ++ { ++ Py_NormalizeSepsW(woutbufp); + v = PyUnicode_FromWideChar(woutbufp, wcslen(woutbufp)); ++ } + else + v = win32_error_object("GetFullPathNameW", path->object); + if (woutbufp != woutbuf) +@@ -3812,6 +3816,7 @@ + win32_error_object("GetFullPathName", path->object); + return NULL; + } ++ Py_NormalizeSepsA(outbuf); + return PyBytes_FromString(outbuf); + } + } +@@ -3873,6 +3878,7 @@ + if(!CloseHandle(hFile)) + return win32_error_object("CloseHandle", path); + ++ Py_NormalizeSepsW(target_path); + target_path[result_length] = 0; + result = PyUnicode_FromWideChar(target_path, result_length); + PyMem_Free(target_path); +diff -Naur Python-3.5.0-orig/Python/pylifecycle.c Python-3.5.0/Python/pylifecycle.c +--- Python-3.5.0-orig/Python/pylifecycle.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/pylifecycle.c 2015-09-21 13:42:03.089687200 +0300 +@@ -831,17 +831,123 @@ + PyInterpreterState_Delete(interp); + } + +-#ifdef MS_WINDOWS +-static wchar_t *progname = L"python"; ++#if defined(_MSC_VER) ++static wchar_t progname[PATH_MAX+1] = L"python"; + #else +-static wchar_t *progname = L"python3"; ++static wchar_t progname[PATH_MAX+1] = L"python3"; + #endif + ++char ++Py_GetSepA(char *name) ++{ ++ char* msystem = (char*)2; /* So that non Windows use / as sep */ ++ static char sep = '\0'; ++#ifdef _WIN32 ++ /* https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.aspx ++ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal ++ * modification, which means that you cannot use forward slashes to represent path separators ++ */ ++ if (name != NULL && memcmp(name, "\\\\?\\", sizeof("\\\\?\\") - sizeof(char)) == 0) ++ { ++ return '\\'; ++ } ++#endif ++ if (sep != '\0') ++ return sep; ++#if defined(__MINGW32__) ++ msystem = Py_GETENV("MSYSTEM"); ++#endif ++ if (msystem != NULL) ++ sep = '/'; ++ else ++ sep = '\\'; ++ return sep; ++} ++ ++static wchar_t ++Py_GetAltSepA(char *name) ++{ ++ char sep = Py_GetSepA(name); ++ if (sep == '/') ++ return '\\'; ++ return '/'; ++} ++ ++void ++Py_NormalizeSepsA(char *name) ++{ ++ char sep = Py_GetSepA(name); ++ char altsep = Py_GetAltSepA(name); ++ char* seps; ++ if (strlen(name) > 1 && name[1] == ':') { ++ name[0] = toupper(name[0]); ++ } ++ seps = strchr(name, altsep); ++ while(seps) { ++ *seps = sep; ++ seps = strchr(seps, altsep); ++ } ++} ++ ++wchar_t ++Py_GetSepW(wchar_t *name) ++{ ++ char* msystem = (char*)2; /* So that non Windows use / as sep */ ++ static wchar_t sep = L'\0'; ++#ifdef _WIN32 ++ /* https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.aspx ++ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal ++ * modification, which means that you cannot use forward slashes to represent path separators ++ */ ++ if (name != NULL && memcmp(name, L"\\\\?\\", sizeof(L"\\\\?\\") - sizeof(wchar_t)) == 0) ++ { ++ return L'\\'; ++ } ++#endif ++ if (sep != L'\0') ++ return sep; ++#if defined(__MINGW32__) ++ msystem = Py_GETENV("MSYSTEM"); ++#endif ++ if (msystem != NULL) ++ sep = L'/'; ++ else ++ sep = L'\\'; ++ return sep; ++} ++ ++static wchar_t ++Py_GetAltSepW(wchar_t *name) ++{ ++ char sep = Py_GetSepW(name); ++ if (sep == L'/') ++ return L'\\'; ++ return L'/'; ++} ++ ++void ++Py_NormalizeSepsW(wchar_t *name) ++{ ++ wchar_t sep = Py_GetSepW(name); ++ wchar_t altsep = Py_GetAltSepW(name); ++ wchar_t* seps; ++ if (wcslen(name) > 1 && name[1] == L':') { ++ name[0] = towupper(name[0]); ++ } ++ seps = wcschr(name, altsep); ++ while(seps) { ++ *seps = sep; ++ seps = wcschr(seps, altsep); ++ } ++} ++ + void + Py_SetProgramName(wchar_t *pn) + { + if (pn && *pn) +- progname = pn; ++ wcsncpy(progname, pn, PATH_MAX); ++ pn = &progname[0]; ++ Py_NormalizeSepsW(pn); + } + + wchar_t * +diff -Naur Python-3.5.0-orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c +--- Python-3.5.0-orig/Python/sysmodule.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/sysmodule.c 2015-09-21 13:42:03.098717600 +0300 +@@ -2048,7 +2048,7 @@ + argv0 = fullpath; + } + #endif +- p = wcsrchr(argv0, SEP); ++ p = wcsrchr(argv0, Py_GetSepW(argv0)); + } + if (p != NULL) { + n = p + 1 - argv0; +diff -Naur Python-3.5.0-orig/Python/traceback.c Python-3.5.0/Python/traceback.c +--- Python-3.5.0-orig/Python/traceback.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Python/traceback.c 2015-09-21 13:42:03.115649600 +0300 +@@ -199,7 +199,7 @@ + filepath = PyBytes_AS_STRING(filebytes); + + /* Search tail of filename in sys.path before giving up */ +- tail = strrchr(filepath, SEP); ++ tail = strrchr(filepath, Py_GetSepW(filepath)); + if (tail == NULL) + tail = filepath; + else diff --git a/mingw-w64-python3/0560-mingw-use-posix-getpath.patch b/mingw-w64-python3/0560-mingw-use-posix-getpath.patch index 091fa4badd..d9968af475 100644 --- a/mingw-w64-python3/0560-mingw-use-posix-getpath.patch +++ b/mingw-w64-python3/0560-mingw-use-posix-getpath.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:34.252124800 +0100 -+++ b/configure.ac 2014-10-11 14:21:37.003282200 +0100 -@@ -5031,7 +5031,7 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:42:01.382941600 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:42:04.711772800 +0300 +@@ -5243,7 +5243,7 @@ case $host in *-*-mingw*) dnl default sys.path calculations for windows platforms @@ -10,21 +10,9 @@ diff -urN a/configure.ac b/configure.ac ;; esac -diff -urN a/Include/fileutils.h b/Include/fileutils.h ---- a/Include/fileutils.h 2014-10-11 14:21:35.290184200 +0100 -+++ b/Include/fileutils.h 2014-10-11 14:21:37.005282300 +0100 -@@ -15,7 +15,7 @@ - const wchar_t *text, - size_t *error_pos); - --#if defined(HAVE_STAT) && !defined(MS_WINDOWS) -+#if defined(HAVE_STAT) && (!defined(MS_WINDOWS) || defined(__MINGW32__)) - PyAPI_FUNC(int) _Py_wstat( - const wchar_t* path, - struct stat *buf); -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 14:21:35.080172200 +0100 -+++ b/Modules/getpath.c 2014-10-11 14:21:37.006282300 +0100 +diff -Naur Python-3.5.0-orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0-orig/Modules/getpath.c 2015-09-21 13:42:04.532293600 +0300 ++++ Python-3.5.0/Modules/getpath.c 2015-09-21 13:42:04.737735200 +0300 @@ -10,6 +10,10 @@ #include #endif @@ -53,53 +41,17 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c +#endif static wchar_t *module_search_path = NULL; - static void -@@ -137,7 +149,7 @@ + /* Get file status. Encode the path to the locale encoding. */ +@@ -154,7 +166,7 @@ size_t i = wcslen(dir); - while (i > 0 && dir[i] != SEP) + while (i > 0 && dir[i] != Py_GetSepW(dir)) --i; - dir[i] = '\0'; + dir[i] = 0; } static int -@@ -207,7 +219,11 @@ - joinpath(wchar_t *buffer, wchar_t *stuff) - { - size_t n, k; -+#ifdef MS_WINDOWS -+ if (stuff[0] == SEP || (stuff[0] != 0 && stuff[1] == L':')) -+#else - if (stuff[0] == SEP) -+#endif - n = 0; - else { - n = wcslen(buffer); -@@ -228,7 +244,11 @@ - static void - copy_absolute(wchar_t *path, wchar_t *p, size_t pathlen) - { -+#ifdef MS_WINDOWS -+ if (p[0] == SEP || (p[0] != 0 && p[1] == L':')) -+#else - if (p[0] == SEP) -+#endif - wcscpy(path, p); - else { - if (!_Py_wgetcwd(path, pathlen)) { -@@ -248,7 +268,11 @@ - { - wchar_t buffer[MAXPATHLEN+1]; - -+#ifdef MS_WINDOWS -+ if (path[0] == SEP || (path[0] != 0 && path[1] == L':')) -+#else - if (path[0] == SEP) -+#endif - return; - copy_absolute(buffer, path, MAXPATHLEN+1); - wcscpy(path, buffer); -@@ -455,6 +479,35 @@ +@@ -472,6 +484,26 @@ return 0; } @@ -108,23 +60,14 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c +int GetWindowsModulePaths() +{ + int result = 0; -+ wchar_t* seps; + result = GetModuleFileNameW(NULL, progpath, MAXPATHLEN); -+ seps = wcschr(progpath, L'\\'); -+ while(seps) { -+ *seps = L'/'; -+ seps = wcschr(seps, L'\\'); -+ } ++ Py_NormalizeSepsW(progpath); + dllpath[0] = 0; +#ifdef Py_ENABLE_SHARED + if (PyWin_DLLhModule) { + if((GetModuleFileNameW(PyWin_DLLhModule, dllpath, MAXPATHLEN) > 0)) { + result = 1; -+ seps = wcschr(dllpath, L'\\'); -+ while(seps) { -+ *seps = L'/'; -+ seps = wcschr(seps, L'\\'); -+ } ++ Py_NormalizeSepsW(dllpath); + } + } +#endif @@ -135,7 +78,7 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c static void calculate_path(void) { -@@ -533,6 +586,10 @@ +@@ -551,6 +583,10 @@ } } #endif /* __APPLE__ */ @@ -146,23 +89,10 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c else if (path) { while (1) { wchar_t *delim = wcschr(path, DELIM); -@@ -561,7 +618,11 @@ - else - progpath[0] = '\0'; - PyMem_RawFree(path_buffer); -+#ifdef MS_WINDOWS -+ if (progpath[0] != '\0' && progpath[0] != SEP && progpath[1] != L':') -+#else - if (progpath[0] != SEP && progpath[0] != '\0') -+#endif - absolutize(progpath); - wcsncpy(argv0_path, progpath, MAXPATHLEN); - argv0_path[MAXPATHLEN] = '\0'; -@@ -871,7 +932,43 @@ +@@ -889,6 +925,45 @@ } --#ifdef __cplusplus +#ifdef MS_WINDOWS +/* Load python3.dll before loading any extension module that might refer + to it. That way, we can be sure that always the python3.dll corresponding @@ -184,10 +114,12 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c + /* If there is a python3.dll next to the python3y.dll, + assume this is a build tree; use that DLL */ + wcscpy(py3path, dllpath); -+ s = wcsrchr(py3path, L'\\'); ++ s = wcsrchr(py3path, Py_GetSepW(py3path)); + if (!s) + s = py3path; -+ wcscpy(s, L"\\python3.dll"); ++ else ++ s += 1; ++ wcscpy(s, L"python3.dll"); + hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (hPython3 != NULL) + return 1; @@ -197,25 +129,16 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c + wcscat(py3path, L"\\DLLs\\python3.dll"); + hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + return hPython3 != NULL; - } - #endif - -+#ifdef __cplusplus +} +#endif -diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c ---- a/Modules/posixmodule.c 2014-10-11 14:21:35.095173000 +0100 -+++ b/Modules/posixmodule.c 2014-10-11 14:21:37.010282600 +0100 -@@ -1019,7 +1019,7 @@ ++ + #ifdef __cplusplus } - - /* A helper used by a number of POSIX-only functions */ --#ifndef MS_WINDOWS -+#if !defined(MS_WINDOWS) || defined(__MINGW32__) - static int - _parse_off_t(PyObject* arg, void* addr) - { -@@ -3689,7 +3689,7 @@ + #endif +diff -Naur Python-3.5.0-orig/Modules/posixmodule.c Python-3.5.0/Modules/posixmodule.c +--- Python-3.5.0-orig/Modules/posixmodule.c 2015-09-21 13:42:04.541324000 +0300 ++++ Python-3.5.0/Modules/posixmodule.c 2015-09-21 13:42:04.747894400 +0300 +@@ -3548,7 +3548,7 @@ Py_END_ALLOW_THREADS /* FindNextFile sets error to ERROR_NO_MORE_FILES if it got to the end of the directory. */ @@ -224,7 +147,7 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c Py_DECREF(list); list = path_error(path); goto exit; -@@ -3744,7 +3744,7 @@ +@@ -3603,7 +3603,7 @@ Py_END_ALLOW_THREADS /* FindNextFile sets error to ERROR_NO_MORE_FILES if it got to the end of the directory. */ @@ -233,15 +156,3 @@ diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c Py_DECREF(list); list = path_error(path); goto exit; -diff -urN a/Python/fileutils.c b/Python/fileutils.c ---- a/Python/fileutils.c 2014-10-11 14:21:34.292127100 +0100 -+++ b/Python/fileutils.c 2014-10-11 14:21:37.011282600 +0100 -@@ -511,7 +511,7 @@ - Not sure whether the MS_WINDOWS guards are necessary: - perhaps for cygwin/mingw builds? - */ --#if defined(HAVE_STAT) && !defined(MS_WINDOWS) -+#if defined(HAVE_STAT) && (!defined(MS_WINDOWS) || defined(__MINGW32__)) - - /* Get file status. Encode the path to the locale encoding. */ - diff --git a/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch b/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch index 7e44981da9..eb427ad35d 100644 --- a/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch +++ b/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch @@ -1,7 +1,7 @@ -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 14:21:38.969394600 +0100 -+++ b/Modules/getpath.c 2014-10-11 14:21:40.899505000 +0100 -@@ -872,6 +872,32 @@ +diff -Naur Python-3.5.0-orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0-orig/Modules/getpath.c 2015-09-21 13:42:06.130674400 +0300 ++++ Python-3.5.0/Modules/getpath.c 2015-09-21 13:42:06.274032000 +0300 +@@ -865,6 +865,32 @@ else wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); @@ -10,23 +10,23 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c + wchar_t *module_path, *new_path; + /* Add path of executable/dll to system path. This + * is so that the correct tcl??.dll and tk??.dll get used. */ -+ path_buffer = _Py_char2wchar(_path, NULL); ++ path_buffer = Py_DecodeLocale(_path, NULL); + module_path = dllpath[0] ? dllpath : progpath; + new_path = (wchar_t *)alloca(sizeof(wchar_t)*(wcslen(L"PATH=")+wcslen(module_path)+1+wcslen(path_buffer)+1)); + if (new_path) { + wchar_t *slashes, *end; -+ wcscpy( new_path, L"PATH=" ); -+ wcscat( new_path, module_path ); -+ slashes = wcschr( new_path, L'/' ); ++ wcscpy(new_path, L"PATH="); ++ wcscat(new_path, module_path); ++ slashes = wcschr(new_path, L'/'); + while (slashes) { -+ *slashes = '\\'; ++ *slashes = L'\\'; + slashes = wcschr( slashes+1, L'/' ); + } + end = wcsrchr(new_path, L'\\') ? wcsrchr(new_path, L'\\') : new_path + wcslen(new_path); + end[0] = L';'; + end[1] = L'\0'; -+ wcscat( new_path, path_buffer ); -+ _wputenv( new_path ); ++ wcscat(new_path, path_buffer); ++ _wputenv(new_path); + PyMem_RawFree(path_buffer); + } + } diff --git a/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch b/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch index 883fee1c0d..1bee045dfe 100644 --- a/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch +++ b/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch @@ -1,11 +1,10 @@ -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 14:21:42.640604600 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 14:21:44.587716000 +0100 -@@ -17,6 +17,8 @@ +diff -Naur Python-3.5.0-orig/Modules/Setup.config.in Python-3.5.0/Modules/Setup.config.in +--- Python-3.5.0-orig/Modules/Setup.config.in 2015-09-21 13:41:18.307018700 +0300 ++++ Python-3.5.0/Modules/Setup.config.in 2015-09-21 13:42:07.709865600 +0300 +@@ -17,6 +17,7 @@ # build-in modules for windows platform: @USE_WIN32_MODULE@winreg ../PC/winreg.c -+@USE_WIN32_MODULE@time timemodule.c +@USE_WIN32_MODULE@msvcrt ../PC/msvcrtmodule.c # The rest of the modules previously listed in this file are built diff --git a/mingw-w64-python3/0580-mingw32-test-REPARSE_DATA_BUFFER.patch b/mingw-w64-python3/0580-mingw32-test-REPARSE_DATA_BUFFER.patch deleted file mode 100644 index e04d38d6c4..0000000000 --- a/mingw-w64-python3/0580-mingw32-test-REPARSE_DATA_BUFFER.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:45.694779300 +0100 -+++ b/configure.ac 2014-10-11 14:21:48.382933000 +0100 -@@ -4363,6 +4363,28 @@ - # check for endianness - AC_C_BIGENDIAN - -+# REPARSE_DATA_BUFFER is in winnt.h on mingw32 and (unusably) ddk/ntifs.h on mingw64. -+case $host in -+ *-*-mingw*) -+AC_CACHE_CHECK([if struct REPARSE_DATA_BUFFER is in winnt.h], -+[ac_cv_struct_reparse_data_buffer_in_winnt_h], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#include -+ #include ], -+ [REPARSE_DATA_BUFFER rdb], -+ )], -+ [ac_cv_struct_reparse_data_buffer_in_winnt_h=yes], -+ [ac_cv_struct_reparse_data_buffer_in_winnt_h=no] -+ ) -+]) -+if test "x${ac_cv_struct_reparse_data_buffer_in_winnt_h}" = xyes; then -+ AC_DEFINE([REPARSE_DATA_BUFFER_IN_WINNT], [], [REPARSE_DATA_BUFFER in winnt.h]) -+ AC_SUBST(REPARSE_DATA_BUFFER_IN_WINNT) -+fi -+ ;; -+esac -+ - # ABI version string for Python extension modules. This appears between the - # periods in shared library file names, e.g. foo..so. It is calculated - # from the following attributes which affect the ABI of this Python build (in diff --git a/mingw-w64-python3/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch b/mingw-w64-python3/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch index c840d9c061..387a8df32e 100644 --- a/mingw-w64-python3/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch +++ b/mingw-w64-python3/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch @@ -1,7 +1,7 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:21:49.602002800 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:21:52.301157100 +0100 -@@ -1071,6 +1071,7 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:42:02.883116800 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:09.127638400 +0300 +@@ -1091,6 +1091,7 @@ if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ if test -n "$(DLLLIBRARY)" ; then \ $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ diff --git a/mingw-w64-python3/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/mingw-w64-python3/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch deleted file mode 100644 index 57344775f7..0000000000 --- a/mingw-w64-python3/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -urN a/Include/osdefs.h b/Include/osdefs.h ---- a/Include/osdefs.h 2014-10-11 14:21:54.729296000 +0100 -+++ b/Include/osdefs.h 2014-10-11 14:21:56.586402200 +0100 -@@ -10,8 +10,13 @@ - /* Mod by chrish: QNX has WATCOM, but isn't DOS */ - #if !defined(__QNX__) - #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) -+#if defined(__MINGW32__) -+#define SEP L'/' -+#define ALTSEP L'\\' -+#else - #define SEP L'\\' - #define ALTSEP L'/' -+#endif - #define MAXPATHLEN 256 - #define DELIM L';' - #define DELIMSTR ";" -diff -urN a/Lib/ntpath.py b/Lib/ntpath.py ---- a/Lib/ntpath.py 2014-10-11 14:21:53.975252900 +0100 -+++ b/Lib/ntpath.py 2014-10-11 14:21:56.588402400 +0100 -@@ -24,9 +24,13 @@ - curdir = '.' - pardir = '..' - extsep = '.' --sep = '\\' -+if sys.platform == "win32" and "MSYSTEM" in os.environ: -+ sep = '/' -+ altsep = '\\' -+else: -+ sep = '\\' -+ altsep = '/' - pathsep = ';' --altsep = '/' - defpath = '.;C:\\bin' - if 'ce' in sys.builtin_module_names: - defpath = '\\Windows' -@@ -40,21 +44,21 @@ - - def _get_sep(path): - if isinstance(path, bytes): -- return b'\\' -+ return str.encode(sep) - else: -- return '\\' -+ return sep - - def _get_altsep(path): - if isinstance(path, bytes): -- return b'/' -+ return str.encode(altsep) - else: -- return '/' -+ return altsep - - def _get_bothseps(path): - if isinstance(path, bytes): -- return b'\\/' -+ return str.encode(sep+altsep) - else: -- return '\\/' -+ return sep+altsep - - def _get_dot(path): - if isinstance(path, bytes): -diff -urN a/Python/pythonrun.c b/Python/pythonrun.c ---- a/Python/pythonrun.c 2014-10-11 14:21:53.853245900 +0100 -+++ b/Python/pythonrun.c 2014-10-11 14:21:56.591402500 +0100 -@@ -871,17 +871,34 @@ - PyInterpreterState_Delete(interp); - } - --#ifdef MS_WINDOWS --static wchar_t *progname = L"python"; -+ -+#if defined(MS_WINDOWS) && !defined(__MINGW32__) -+static wchar_t progname[PATH_MAX+1] = L"python"; - #else --static wchar_t *progname = L"python3"; -+static wchar_t progname[PATH_MAX+1] = L"python3"; - #endif - - void - Py_SetProgramName(wchar_t *pn) - { - if (pn && *pn) -- progname = pn; -+ wcsncpy(progname, pn, PATH_MAX); -+ pn = &progname[0]; -+#ifdef __MINGW32__ -+ { -+ char* msystem; -+ wchar_t altsep, sep; -+ wchar_t* seps; -+ msystem = Py_GETENV("MSYSTEM"); -+ altsep = msystem ? L'\\' : L'/'; -+ sep = msystem ? L'/' : L'\\'; -+ seps = wcschr(pn, altsep); -+ while(seps) { -+ *seps = sep; -+ seps = wcschr(seps, altsep); -+ } -+ } -+#endif - } - - wchar_t * diff --git a/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch b/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch index 1c906500b2..efbbe07e1c 100644 --- a/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch +++ b/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch @@ -1,6 +1,6 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:21:57.625461700 +0100 -+++ b/configure.ac 2014-10-11 14:22:00.282613700 +0100 +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:42:06.113742400 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:42:10.548797600 +0300 @@ -612,6 +612,65 @@ AC_MSG_RESULT([$DELIM]) AC_SUBST(DELIM) @@ -67,17 +67,17 @@ diff -urN a/configure.ac b/configure.ac AC_MSG_CHECKING([for init system calls]) AC_SUBST(INITSYS) case $host in -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 14:21:57.705466200 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 14:22:00.284613800 +0100 -@@ -330,6 +330,14 @@ +diff -Naur Python-3.5.0-orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +--- Python-3.5.0-orig/Lib/sysconfig.py 2015-09-21 13:41:47.820067100 +0300 ++++ Python-3.5.0/Lib/sysconfig.py 2015-09-21 13:42:10.564600800 +0300 +@@ -323,6 +323,14 @@ if isinstance(v, str): done[k] = v.strip() + # any keys that have one with the same name suffixed with _b2h + # need to be replaced with the value of the _b2h key. + # This converts from MSYS*/Cygwin paths to Windows paths. -+ for k, v in done.items(): ++ for k, v in dict(done).items(): + if isinstance(k, str): + if k.endswith("_b2h"): + done[k[:-4]]=v @@ -85,9 +85,9 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py # save the results in the global dictionary vars.update(done) return vars -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:21:57.625461700 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:22:00.286613900 +0100 +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:42:10.415599200 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:10.572502400 +0300 @@ -115,6 +115,13 @@ # Install prefix for data files datarootdir= @datarootdir@ @@ -102,12 +102,3 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Expanded directories BINDIR= @bindir@ LIBDIR= @libdir@ -@@ -711,7 +718,7 @@ - -DPREFIX='"$(prefix)"' \ - -DEXEC_PREFIX='"$(exec_prefix)"' \ - -DVERSION='"$(VERSION)"' \ -- -DVPATH='"$(VPATH)"' \ -+ -DVPATH='"$(VPATH_b2h)"' \ - -o $@ $(srcdir)/Modules/getpath.c - - # default sys.path calculations for windows platforms diff --git a/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch b/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch index 9e88a9feec..6d906d0ccf 100644 --- a/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch +++ b/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py ---- a/Lib/distutils/command/build_ext.py 2014-10-11 14:22:01.460681000 +0100 -+++ b/Lib/distutils/command/build_ext.py 2014-10-11 14:22:04.124833400 +0100 -@@ -226,9 +226,10 @@ +diff -Naur Python-3.5.0-orig/Lib/distutils/command/build_ext.py Python-3.5.0/Lib/distutils/command/build_ext.py +--- Python-3.5.0-orig/Lib/distutils/command/build_ext.py 2015-09-21 13:41:42.771572000 +0300 ++++ Python-3.5.0/Lib/distutils/command/build_ext.py 2015-09-21 13:42:12.037684800 +0300 +@@ -219,9 +219,10 @@ if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions @@ -13,9 +13,9 @@ diff -urN a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext else: # building python standard extensions self.library_dirs.append('.') -diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py 2014-10-11 14:22:01.449680400 +0100 -+++ b/Lib/sysconfig.py 2014-10-11 14:22:04.125833500 +0100 +diff -Naur Python-3.5.0-orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +--- Python-3.5.0-orig/Lib/sysconfig.py 2015-09-21 13:42:11.910130400 +0300 ++++ Python-3.5.0/Lib/sysconfig.py 2015-09-21 13:42:12.044457600 +0300 @@ -42,22 +42,22 @@ 'data': '{base}', }, @@ -42,17 +42,17 @@ diff -urN a/Lib/sysconfig.py b/Lib/sysconfig.py - 'purelib': '{userbase}/Python{py_version_nodot}/site-packages', - 'platlib': '{userbase}/Python{py_version_nodot}/site-packages', - 'include': '{userbase}/Python{py_version_nodot}/Include', -- 'scripts': '{userbase}/Scripts', +- 'scripts': '{userbase}/Python{py_version_nodot}/Scripts', + 'stdlib': '{userbase}/lib/python{py_version_short}', + 'platstdlib': '{userbase}/lib/python{py_version_short}', -+ 'purelib': '{userbase}/lib/python{py_version_short}', -+ 'platlib': '{userbase}/lib/python{py_version_short}', ++ 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', 'data': '{userbase}', }, 'posix_user': { -@@ -443,7 +443,7 @@ +@@ -436,7 +436,7 @@ vars['INCLUDEPY'] = get_path('include') vars['EXT_SUFFIX'] = '.pyd' vars['EXE'] = '.exe' diff --git a/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch b/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch index d3e2cf7d0c..f4cc1bfa06 100644 --- a/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch +++ b/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 14:22:05.252897900 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 14:22:07.895049100 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py Python-3.5.0/Lib/distutils/cygwinccompiler.py +--- Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py 2015-09-21 13:41:51.606688400 +0300 ++++ Python-3.5.0/Lib/distutils/cygwinccompiler.py 2015-09-21 13:42:14.136124000 +0300 @@ -58,6 +58,7 @@ from distutils import log from distutils.version import LooseVersion @@ -36,21 +36,21 @@ diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py return tuple([_find_exe_version(cmd) for cmd in commands]) def is_cygwingcc(): -diff -urN a/Modules/Setup.config.in b/Modules/Setup.config.in ---- a/Modules/Setup.config.in 2014-10-11 14:22:06.098946300 +0100 -+++ b/Modules/Setup.config.in 2014-10-11 14:22:07.896049100 +0100 -@@ -19,6 +19,7 @@ +diff -Naur Python-3.5.0-orig/Modules/Setup.config.in Python-3.5.0/Modules/Setup.config.in +--- Python-3.5.0-orig/Modules/Setup.config.in 2015-09-21 13:42:08.977508000 +0300 ++++ Python-3.5.0/Modules/Setup.config.in 2015-09-21 13:42:14.150798400 +0300 +@@ -18,6 +18,7 @@ + # build-in modules for windows platform: @USE_WIN32_MODULE@winreg ../PC/winreg.c - @USE_WIN32_MODULE@time timemodule.c @USE_WIN32_MODULE@msvcrt ../PC/msvcrtmodule.c +@USE_WIN32_MODULE@_winapi _winapi.c # The rest of the modules previously listed in this file are built # by the setup.py script in Python 2.1 and later. -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:22:05.773927700 +0100 -+++ b/setup.py 2014-10-11 14:22:07.897049200 +0100 -@@ -898,7 +898,9 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:41:59.908728800 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:42:14.157571200 +0300 +@@ -918,7 +918,9 @@ exts.append( Extension('msvcrt', [os.path.join(pc_srcdir, p) for p in ['msvcrtmodule.c']]) ) @@ -59,5 +59,5 @@ diff -urN a/setup.py b/setup.py + # use subprocess (which uses Popen) in cygwinccompiler.py + # exts.append( Extension('_winapi', ['_winapi.c']) ) - def allow_db_ver(db_ver): - """Returns a boolean if the given BerkeleyDB version is acceptable. + exts.append( Extension('_msi', [os.path.join(pc_srcdir, p) + for p in ['_msi.c']], diff --git a/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch b/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch index 425727110c..6bde7c9118 100644 --- a/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch +++ b/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/pyport.h b/Include/pyport.h ---- a/Include/pyport.h 2014-10-11 14:22:09.813158800 +0100 -+++ b/Include/pyport.h 2014-10-11 14:22:11.598260900 +0100 +diff -Naur Python-3.5.0-orig/Include/pyport.h Python-3.5.0/Include/pyport.h +--- Python-3.5.0-orig/Include/pyport.h 2015-09-21 13:41:27.338115500 +0300 ++++ Python-3.5.0/Include/pyport.h 2015-09-21 13:42:15.719830400 +0300 @@ -257,6 +257,8 @@ # define PY_FORMAT_SIZE_T "l" # elif defined(MS_WINDOWS) diff --git a/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch b/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch index 4a1ee12660..d0cda0af13 100644 --- a/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch +++ b/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:22:12.606318500 +0100 -+++ b/setup.py 2014-10-11 14:22:15.132463000 +0100 -@@ -456,10 +456,10 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:42:15.605821600 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:42:17.110512000 +0300 +@@ -474,10 +474,10 @@ if not cross_compiling: add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') diff --git a/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch b/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch index 1ee8dffb19..e3c73a8ee8 100644 --- a/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch +++ b/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/compileall.py b/Lib/compileall.py ---- a/Lib/compileall.py 2014-10-11 14:22:16.521542500 +0100 -+++ b/Lib/compileall.py 2014-10-11 14:22:18.904678800 +0100 -@@ -46,6 +46,8 @@ +diff -Naur Python-3.5.0-orig/Lib/compileall.py Python-3.5.0/Lib/compileall.py +--- Python-3.5.0-orig/Lib/compileall.py 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Lib/compileall.py 2015-09-21 13:42:18.631005600 +0300 +@@ -38,6 +38,8 @@ if name == '__pycache__': continue fullname = os.path.join(dir, name) diff --git a/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch b/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch index 7eecfaafce..873f0469fd 100644 --- a/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch +++ b/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py ---- a/Lib/distutils/command/install.py 2014-10-11 14:22:19.987740700 +0100 -+++ b/Lib/distutils/command/install.py 2014-10-11 14:22:22.629891800 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py +--- Python-3.5.0-orig/Lib/distutils/command/install.py 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Lib/distutils/command/install.py 2015-09-21 13:42:20.106347200 +0300 @@ -340,7 +340,8 @@ # Convert directories from Unix /-separated syntax to the local @@ -11,9 +11,9 @@ diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py 'scripts', 'data', 'headers', 'userbase', 'usersite') -diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py ---- a/Lib/distutils/util.py 2014-10-11 14:22:20.001741500 +0100 -+++ b/Lib/distutils/util.py 2014-10-11 14:22:22.631892000 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/util.py Python-3.5.0/Lib/distutils/util.py +--- Python-3.5.0-orig/Lib/distutils/util.py 2015-09-21 13:41:42.786570500 +0300 ++++ Python-3.5.0/Lib/distutils/util.py 2015-09-21 13:42:20.121021600 +0300 @@ -133,6 +133,13 @@ paths.remove('.') if not paths: @@ -62,10 +62,10 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py else: raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:22:19.927737300 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:22:22.632892000 +0100 -@@ -1387,6 +1387,12 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:42:11.916903200 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:20.127794400 +0300 +@@ -1420,6 +1420,12 @@ else true; \ fi @@ -78,7 +78,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods -@@ -1394,9 +1400,9 @@ +@@ -1427,9 +1433,9 @@ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ @@ -91,7 +91,7 @@ diff -urN a/Makefile.pre.in b/Makefile.pre.in # Here are a couple of targets for MacOSX again, to install a full # framework-based Python. frameworkinstall installs everything, the -@@ -1477,7 +1483,7 @@ +@@ -1510,7 +1516,7 @@ $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ diff --git a/mingw-w64-python3/0690-allow-static-tcltk.patch b/mingw-w64-python3/0690-allow-static-tcltk.patch index e86ce2190a..52be70400c 100644 --- a/mingw-w64-python3/0690-allow-static-tcltk.patch +++ b/mingw-w64-python3/0690-allow-static-tcltk.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:22:23.717954100 +0100 -+++ b/setup.py 2014-10-11 14:22:26.325103200 +0100 -@@ -535,7 +535,7 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:42:18.491034400 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:42:21.553468800 +0300 +@@ -553,7 +553,7 @@ if host_platform == 'hp-ux11': lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] @@ -10,7 +10,7 @@ diff -urN a/setup.py b/setup.py # This should work on any unixy platform ;-) # If the user has bothered specifying additional -I and -L flags # in OPT and LDFLAGS we might as well use them here. -@@ -545,6 +545,8 @@ +@@ -563,6 +563,8 @@ # directories with whitespace in the name to store libraries. cflags, ldflags = sysconfig.get_config_vars( 'CFLAGS', 'LDFLAGS') @@ -19,7 +19,7 @@ diff -urN a/setup.py b/setup.py for item in cflags.split(): if item.startswith('-I'): inc_dirs.append(item[2:]) -@@ -1755,14 +1757,19 @@ +@@ -1783,14 +1785,19 @@ # The versions with dots are used on Unix, and the versions without # dots on Windows, for detection by cygwin. tcllib = tklib = tcl_includes = tk_includes = None @@ -47,7 +47,7 @@ diff -urN a/setup.py b/setup.py break # Now check for the header files -@@ -1830,13 +1837,21 @@ +@@ -1858,13 +1865,21 @@ # Add the Tcl/Tk libraries libs.append('tk'+ version) libs.append('tcl'+ version) diff --git a/mingw-w64-python3/0700-CROSS-avoid-ncursesw-include-path-hack.patch b/mingw-w64-python3/0700-CROSS-avoid-ncursesw-include-path-hack.patch index fb391872a7..089d86d561 100644 --- a/mingw-w64-python3/0700-CROSS-avoid-ncursesw-include-path-hack.patch +++ b/mingw-w64-python3/0700-CROSS-avoid-ncursesw-include-path-hack.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:22:27.451167600 +0100 -+++ b/configure.ac 2014-10-11 14:22:30.021314600 +0100 -@@ -4779,7 +4779,9 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:42:11.881910400 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:42:23.013007200 +0300 +@@ -4969,7 +4969,9 @@ # first curses header check ac_save_cppflags="$CPPFLAGS" diff --git a/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch b/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch index 92346b5c28..c66ce4c693 100644 --- a/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch +++ b/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:22:31.108376800 +0100 -+++ b/configure.ac 2014-10-11 14:22:33.774529300 +0100 -@@ -4818,15 +4818,51 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:42:24.324672800 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:42:24.444325600 +0300 +@@ -5008,15 +5008,51 @@ fi AC_MSG_CHECKING(whether WINDOW has _flags) @@ -55,9 +55,9 @@ diff -urN a/configure.ac b/configure.ac if test "$ac_cv_window_has_flags" = yes then -diff -urN a/Include/py_curses.h b/Include/py_curses.h ---- a/Include/py_curses.h 2014-10-11 14:22:32.009428300 +0100 -+++ b/Include/py_curses.h 2014-10-11 14:22:33.776529400 +0100 +diff -Naur Python-3.5.0-orig/Include/py_curses.h Python-3.5.0/Include/py_curses.h +--- Python-3.5.0-orig/Include/py_curses.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/py_curses.h 2015-09-21 13:42:24.460128800 +0300 @@ -14,7 +14,9 @@ /* the following define is necessary for OS X 10.6; without it, the Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python @@ -81,10 +81,10 @@ diff -urN a/Include/py_curses.h b/Include/py_curses.h #ifndef MVWDELCH_IS_EXPRESSION #define MVWDELCH_IS_EXPRESSION 1 #endif -diff -urN a/pyconfig.h.in b/pyconfig.h.in ---- a/pyconfig.h.in 2014-10-11 14:22:31.109376800 +0100 -+++ b/pyconfig.h.in 2014-10-11 14:22:33.777529500 +0100 -@@ -1175,6 +1175,12 @@ +diff -Naur Python-3.5.0-orig/pyconfig.h.in Python-3.5.0/pyconfig.h.in +--- Python-3.5.0-orig/pyconfig.h.in 2015-09-21 13:41:38.930956100 +0300 ++++ Python-3.5.0/pyconfig.h.in 2015-09-21 13:42:24.475932000 +0300 +@@ -1202,6 +1202,12 @@ /* Define to 1 if you want to use native NT threads */ #undef NT_THREADS diff --git a/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch b/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch index 9c71f1013a..ca5f407ada 100644 --- a/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch +++ b/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/py_curses.h b/Include/py_curses.h ---- a/Include/py_curses.h 2014-10-11 14:22:35.753642500 +0100 -+++ b/Include/py_curses.h 2014-10-11 14:22:37.611748800 +0100 +diff -Naur Python-3.5.0-orig/Include/py_curses.h Python-3.5.0/Include/py_curses.h +--- Python-3.5.0-orig/Include/py_curses.h 2015-09-21 13:42:25.872257600 +0300 ++++ Python-3.5.0/Include/py_curses.h 2015-09-21 13:42:26.009971200 +0300 @@ -56,6 +56,10 @@ #endif #endif diff --git a/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch b/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch index 7fad6cc74e..ad02b76618 100644 --- a/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch +++ b/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c ---- a/Modules/_cursesmodule.c 2014-10-11 14:22:39.496856600 +0100 -+++ b/Modules/_cursesmodule.c 2014-10-11 14:22:41.210954600 +0100 +diff -Naur Python-3.5.0-orig/Modules/_cursesmodule.c Python-3.5.0/Modules/_cursesmodule.c +--- Python-3.5.0-orig/Modules/_cursesmodule.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_cursesmodule.c 2015-09-21 13:42:27.468380800 +0300 @@ -125,6 +125,10 @@ #include #endif @@ -12,7 +12,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c #if !defined(HAVE_NCURSES_H) && (defined(sgi) || defined(__sun) || defined(SCO5)) #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ typedef chtype attr_t; /* No attr_t type is available */ -@@ -1772,10 +1776,14 @@ +@@ -1709,10 +1713,14 @@ /* We have to simulate this by writing to a temporary FILE*, then reading back, then writing to the argument stream. */ char fn[100]; @@ -27,7 +27,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c strcpy(fn, "/tmp/py.curses.putwin.XXXXXX"); fd = mkstemp(fn); if (fd < 0) -@@ -1783,6 +1791,14 @@ +@@ -1720,6 +1728,14 @@ if (_Py_set_inheritable(fd, 0, NULL) < 0) goto exit; fp = fdopen(fd, "wb+"); @@ -42,7 +42,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c if (fp == NULL) { PyErr_SetFromErrnoWithFilename(PyExc_IOError, fn); goto exit; -@@ -1807,8 +1823,10 @@ +@@ -1744,8 +1760,10 @@ exit: if (fp != NULL) fclose(fp); @@ -53,7 +53,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c remove(fn); return res; } -@@ -2331,7 +2349,9 @@ +@@ -2268,7 +2286,9 @@ PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream) { char fn[100]; @@ -63,7 +63,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c FILE *fp = NULL; PyObject *data; size_t datalen; -@@ -2341,6 +2361,8 @@ +@@ -2278,6 +2298,8 @@ PyCursesInitialised; @@ -72,7 +72,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c strcpy(fn, "/tmp/py.curses.getwin.XXXXXX"); fd = mkstemp(fn); if (fd < 0) -@@ -2348,6 +2370,13 @@ +@@ -2285,6 +2307,13 @@ if (_Py_set_inheritable(fd, 0, NULL) < 0) goto error; fp = fdopen(fd, "wb+"); @@ -86,7 +86,7 @@ diff -urN a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c if (fp == NULL) { PyErr_SetFromErrnoWithFilename(PyExc_IOError, fn); goto error; -@@ -2382,8 +2411,10 @@ +@@ -2319,8 +2348,10 @@ error: if (fp != NULL) fclose(fp); diff --git a/mingw-w64-python3/0740-grammar-fixes.patch b/mingw-w64-python3/0740-grammar-fixes.patch index 6842f3b972..fcefddca5d 100644 --- a/mingw-w64-python3/0740-grammar-fixes.patch +++ b/mingw-w64-python3/0740-grammar-fixes.patch @@ -1,7 +1,7 @@ -diff -urN a/Modules/parsermodule.c b/Modules/parsermodule.c ---- a/Modules/parsermodule.c 2014-10-11 14:22:43.329075800 +0100 -+++ b/Modules/parsermodule.c 2014-10-11 14:22:44.993171000 +0100 -@@ -37,7 +37,7 @@ +diff -Naur Python-3.5.0-orig/Modules/parsermodule.c Python-3.5.0/Modules/parsermodule.c +--- Python-3.5.0-orig/Modules/parsermodule.c 2015-09-13 14:41:25.000000000 +0300 ++++ Python-3.5.0/Modules/parsermodule.c 2015-09-21 13:42:28.943722400 +0300 +@@ -42,7 +42,7 @@ #undef Yield #include "ast.h" @@ -10,9 +10,9 @@ diff -urN a/Modules/parsermodule.c b/Modules/parsermodule.c #ifdef lint #include -diff -urN a/Parser/metagrammar.c b/Parser/metagrammar.c ---- a/Parser/metagrammar.c 2014-10-11 14:22:43.041059300 +0100 -+++ b/Parser/metagrammar.c 2014-10-11 14:22:44.994171000 +0100 +diff -Naur Python-3.5.0-orig/Parser/metagrammar.c Python-3.5.0/Parser/metagrammar.c +--- Python-3.5.0-orig/Parser/metagrammar.c 2015-09-13 14:41:26.000000000 +0300 ++++ Python-3.5.0/Parser/metagrammar.c 2015-09-21 13:42:28.955010400 +0300 @@ -139,7 +139,7 @@ {7, 0}, {8, 0}, diff --git a/mingw-w64-python3/0750-builddir-fixes.patch b/mingw-w64-python3/0750-builddir-fixes.patch index 6d0c44b534..54051e79a5 100644 --- a/mingw-w64-python3/0750-builddir-fixes.patch +++ b/mingw-w64-python3/0750-builddir-fixes.patch @@ -1,31 +1,45 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:22:46.008229000 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:22:48.653380300 +0100 -@@ -687,13 +687,13 @@ - ############################################################################ - # Importlib +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:42:21.427043200 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:30.499208800 +0300 +@@ -701,15 +701,15 @@ --Modules/_freeze_importlib: Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) -+_freeze_importlib$(EXE): Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) - $(LINKCC) $(PY_LDFLAGS) -o $@ Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile --Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c -- $(MAKE) Modules/_freeze_importlib -- ./Modules/_freeze_importlib \ -- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h -+$(srcdir)/Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py $(srcdir)/Modules/_freeze_importlib.c -+ $(MAKE) _freeze_importlib$(EXE) -+ ./_freeze_importlib$(EXE) \ -+ $(srcdir)/Lib/importlib/_bootstrap.py $(srcdir)/Python/importlib.h +-Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) ++Programs/_freeze_importlib$(EXE): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) + $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + +-Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib +- ./Programs/_freeze_importlib \ ++Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib$(EXE) ++ ./Programs/_freeze_importlib$(EXE) \ + $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h + +-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib +- ./Programs/_freeze_importlib \ ++Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib$(EXE) ++ ./Programs/_freeze_importlib$(EXE) \ + $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h - ############################################################################ -@@ -1560,7 +1560,7 @@ +@@ -1596,7 +1596,7 @@ find build -name '*.py[co]' -exec rm -f {} ';' || true -rm -f pybuilddir.txt -rm -f Lib/lib2to3/*Grammar*.pickle -- -rm -f Modules/_testembed Modules/_freeze_importlib -+ -rm -f Modules/_testembed _freeze_importlib$(EXE) +- -rm -f Programs/_testembed Programs/_freeze_importlib ++ -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE) profile-removal: find . -name '*.gc??' -exec rm -f {} ';' +diff -Naur Python-3.5.0-orig/Programs/_freeze_importlib.c Python-3.5.0/Programs/_freeze_importlib.c +--- Python-3.5.0-orig/Programs/_freeze_importlib.c 2015-09-21 13:42:21.427043200 +0300 ++++ Python-3.5.0/Programs/_freeze_importlib.c 2015-09-21 13:42:30.499208800 +0300 +@@ -20,7 +20,7 @@ + {0, 0, 0} /* sentinel */ + }; + +-#ifndef MS_WINDOWS ++#ifndef _MSC_VER + /* On Windows, this links with the regular pythonXY.dll, so this variable comes + from frozen.obj. In the Makefile, frozen.o is not linked into this executable, + so we define the variable here. */ diff --git a/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch b/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch index 673dc5d20f..521082c06b 100644 --- a/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch +++ b/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:22:49.750443100 +0100 -+++ b/setup.py 2014-10-11 14:22:52.319590000 +0100 -@@ -35,6 +35,17 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:42:22.874164800 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:42:32.027604000 +0300 +@@ -40,6 +40,17 @@ return sys.platform host_platform = get_platform() diff --git a/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch b/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch index 5d7d1c19aa..cc00d25b19 100644 --- a/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch +++ b/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch @@ -1,7 +1,7 @@ -diff -urN a/setup.py b/setup.py ---- a/setup.py 2014-10-11 14:22:53.522658800 +0100 -+++ b/setup.py 2014-10-11 14:22:56.174810500 +0100 -@@ -386,7 +386,7 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:42:33.399096000 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:42:33.531165600 +0300 +@@ -404,7 +404,7 @@ # Debian/Ubuntu multiarch support. # https://wiki.ubuntu.com/MultiarchSpec cc = sysconfig.get_config_var('CC') @@ -10,7 +10,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system( -@@ -411,7 +411,7 @@ +@@ -429,7 +429,7 @@ opt = '' if cross_compiling: opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE') @@ -19,7 +19,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system( -@@ -430,7 +430,7 @@ +@@ -448,7 +448,7 @@ def add_gcc_paths(self): gcc = sysconfig.get_config_var('CC') @@ -28,7 +28,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system('%s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) -@@ -694,7 +694,7 @@ +@@ -714,7 +714,7 @@ readline_termcap_library = "" curses_library = "" # Cannot use os.popen here in py3k. @@ -37,7 +37,7 @@ diff -urN a/setup.py b/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) # Determine if readline is already linked against curses or tinfo. -@@ -839,7 +839,7 @@ +@@ -859,7 +859,7 @@ opensslv_h = find_file('openssl/opensslv.h', [], inc_dirs + search_for_ssl_incs_in) if opensslv_h: @@ -46,7 +46,7 @@ diff -urN a/setup.py b/setup.py if host_platform == 'darwin' and is_macosx_sdk_path(name): name = os.path.join(macosx_sdk_root(), name[1:]) try: -@@ -1714,16 +1714,16 @@ +@@ -1742,16 +1742,16 @@ cflags = sysconfig.get_config_vars('CFLAGS')[0] archs = re.findall('-arch\s+(\w+)', cflags) diff --git a/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch b/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch index 7f42b1a1bc..783d39ace9 100644 --- a/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch +++ b/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch @@ -1,7 +1,7 @@ -diff -urN a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c 2014-10-11 14:22:58.332933900 +0100 -+++ b/Modules/getpath.c 2014-10-11 14:22:59.928025200 +0100 -@@ -795,7 +795,10 @@ +diff -Naur Python-3.5.0-orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0-orig/Modules/getpath.c 2015-09-21 13:42:07.576667200 +0300 ++++ Python-3.5.0/Modules/getpath.c 2015-09-21 13:42:35.020052800 +0300 +@@ -788,7 +788,10 @@ bufsz += wcslen(zip_path) + 1; bufsz += wcslen(exec_prefix) + 1; @@ -10,10 +10,10 @@ diff -urN a/Modules/getpath.c b/Modules/getpath.c + if (_exec_prefix) + bufsz += wcslen(_exec_prefix) + 1; +#endif - buf = (wchar_t *)PyMem_Malloc(bufsz * sizeof(wchar_t)); + buf = PyMem_New(wchar_t, bufsz); if (buf == NULL) { Py_FatalError( -@@ -871,6 +874,13 @@ +@@ -864,6 +867,13 @@ } else wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); diff --git a/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch b/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch index 3bc95cb37c..21150568ae 100644 --- a/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch +++ b/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py ---- a/Lib/distutils/command/install.py 2014-10-11 14:23:01.084091300 +0100 -+++ b/Lib/distutils/command/install.py 2014-10-11 14:23:03.761244400 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py +--- Python-3.5.0-orig/Lib/distutils/command/install.py 2015-09-21 13:42:21.403338400 +0300 ++++ Python-3.5.0/Lib/distutils/command/install.py 2015-09-21 13:42:36.497652000 +0300 @@ -20,10 +20,10 @@ HAS_USER_SITE = True @@ -21,7 +21,7 @@ diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py 'purelib': '$usersite', 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', -- 'scripts': '$userbase/Scripts', +- 'scripts': '$userbase/Python$py_version_nodot/Scripts', + 'headers': '$userbase/include/python$py_version_short$abiflags/$dist_name', + 'scripts': '$userbase/bin', 'data' : '$userbase', diff --git a/mingw-w64-python3/0810-remove_path_max.default.patch b/mingw-w64-python3/0810-remove_path_max.default.patch index 39e41d481c..321c5ccf7b 100644 --- a/mingw-w64-python3/0810-remove_path_max.default.patch +++ b/mingw-w64-python3/0810-remove_path_max.default.patch @@ -1,33 +1,11 @@ -diff -urN a/Include/osdefs.h b/Include/osdefs.h ---- a/Include/osdefs.h 2014-10-11 14:23:05.655352800 +0100 -+++ b/Include/osdefs.h 2014-10-11 14:23:07.572462400 +0100 -@@ -17,7 +17,6 @@ +diff -Naur Python-3.5.0-orig/Include/osdefs.h Python-3.5.0/Include/osdefs.h +--- Python-3.5.0-orig/Include/osdefs.h 2015-09-21 13:42:01.397616000 +0300 ++++ Python-3.5.0/Include/osdefs.h 2015-09-21 13:42:37.914296000 +0300 +@@ -10,7 +10,6 @@ + #ifdef MS_WINDOWS #define SEP L'\\' #define ALTSEP L'/' - #endif -#define MAXPATHLEN 256 #define DELIM L';' #define DELIMSTR ";" #endif -diff -urN a/Modules/main.c b/Modules/main.c ---- a/Modules/main.c 2014-10-11 14:23:05.736357400 +0100 -+++ b/Modules/main.c 2014-10-11 14:23:07.573462500 +0100 -@@ -9,7 +9,6 @@ - #include - #ifdef HAVE_FCNTL_H - #include --#define PATH_MAX MAXPATHLEN - #endif - #endif - -diff -urN a/Python/pythonrun.c b/Python/pythonrun.c ---- a/Python/pythonrun.c 2014-10-11 14:23:04.818304900 +0100 -+++ b/Python/pythonrun.c 2014-10-11 14:23:07.574462500 +0100 -@@ -32,7 +32,6 @@ - #ifdef MS_WINDOWS - #undef BYTE - #include "windows.h" --#define PATH_MAX MAXPATHLEN - #endif - - #ifdef __gnu_hurd__ diff --git a/mingw-w64-python3/0820-dont-link-with-gettext.patch b/mingw-w64-python3/0820-dont-link-with-gettext.patch index d0315bbe2a..cbc4576ccc 100644 --- a/mingw-w64-python3/0820-dont-link-with-gettext.patch +++ b/mingw-w64-python3/0820-dont-link-with-gettext.patch @@ -1,7 +1,7 @@ -diff -urN a/configure.ac b/configure.ac ---- a/configure.ac 2014-10-11 14:23:08.591520700 +0100 -+++ b/configure.ac 2014-10-11 14:23:11.191669400 +0100 -@@ -2496,10 +2496,19 @@ +diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0-orig/configure.ac 2015-09-21 13:42:25.866613600 +0300 ++++ Python-3.5.0/configure.ac 2015-09-21 13:42:39.390766400 +0300 +@@ -2687,10 +2687,19 @@ fi # check if we need libintl for locale functions @@ -21,9 +21,9 @@ diff -urN a/configure.ac b/configure.ac # checks for system dependent C++ extensions support case "$ac_sys_system" in -diff -urN a/Modules/_localemodule.c b/Modules/_localemodule.c ---- a/Modules/_localemodule.c 2014-10-11 14:23:09.473571200 +0100 -+++ b/Modules/_localemodule.c 2014-10-11 14:23:11.193669500 +0100 +diff -Naur Python-3.5.0-orig/Modules/_localemodule.c Python-3.5.0/Modules/_localemodule.c +--- Python-3.5.0-orig/Modules/_localemodule.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_localemodule.c 2015-09-21 13:42:39.406569600 +0300 @@ -11,6 +11,13 @@ #define PY_SSIZE_T_CLEAN diff --git a/mingw-w64-python3/0830-ctypes-python-dll.patch b/mingw-w64-python3/0830-ctypes-python-dll.patch index 4e9cbfcd10..b63a7f6606 100644 --- a/mingw-w64-python3/0830-ctypes-python-dll.patch +++ b/mingw-w64-python3/0830-ctypes-python-dll.patch @@ -1,7 +1,7 @@ -diff -urN a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py ---- a/Lib/ctypes/__init__.py 2014-10-11 14:23:12.496744100 +0100 -+++ b/Lib/ctypes/__init__.py 2014-10-11 14:23:15.025888700 +0100 -@@ -431,7 +431,9 @@ +diff -Naur Python-3.5.0-orig/Lib/ctypes/__init__.py Python-3.5.0/Lib/ctypes/__init__.py +--- Python-3.5.0-orig/Lib/ctypes/__init__.py 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Lib/ctypes/__init__.py 2015-09-21 13:42:40.967700000 +0300 +@@ -427,7 +427,9 @@ cdll = LibraryLoader(CDLL) pydll = LibraryLoader(PyDLL) diff --git a/mingw-w64-python3/0840-gdbm-module-includes.patch b/mingw-w64-python3/0840-gdbm-module-includes.patch index f5c1a9c1ed..79f51b97d7 100644 --- a/mingw-w64-python3/0840-gdbm-module-includes.patch +++ b/mingw-w64-python3/0840-gdbm-module-includes.patch @@ -1,6 +1,6 @@ -diff -urN a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c ---- a/Modules/_gdbmmodule.c 2014-10-11 14:23:17.097007200 +0100 -+++ b/Modules/_gdbmmodule.c 2014-10-11 14:23:18.944112800 +0100 +diff -Naur Python-3.5.0-orig/Modules/_gdbmmodule.c Python-3.5.0/Modules/_gdbmmodule.c +--- Python-3.5.0-orig/Modules/_gdbmmodule.c 2015-09-13 14:41:24.000000000 +0300 ++++ Python-3.5.0/Modules/_gdbmmodule.c 2015-09-21 13:42:42.500610400 +0300 @@ -11,7 +11,7 @@ #include #include "gdbm.h" diff --git a/mingw-w64-python3/0850-use-gnu_printf-in-format.patch b/mingw-w64-python3/0850-use-gnu_printf-in-format.patch index a73950738f..44c7ef96de 100644 --- a/mingw-w64-python3/0850-use-gnu_printf-in-format.patch +++ b/mingw-w64-python3/0850-use-gnu_printf-in-format.patch @@ -1,6 +1,6 @@ -diff -urN a/Include/bytesobject.h b/Include/bytesobject.h ---- a/Include/bytesobject.h 2014-10-11 14:23:20.866222800 +0100 -+++ b/Include/bytesobject.h 2014-10-11 14:23:22.622323200 +0100 +diff -Naur Python-3.5.0-orig/Include/bytesobject.h Python-3.5.0/Include/bytesobject.h +--- Python-3.5.0-orig/Include/bytesobject.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/bytesobject.h 2015-09-21 13:42:43.916125600 +0300 @@ -52,9 +52,9 @@ PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *); PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *); @@ -13,9 +13,9 @@ diff -urN a/Include/bytesobject.h b/Include/bytesobject.h PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *); PyAPI_FUNC(char *) PyBytes_AsString(PyObject *); PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int); -diff -urN a/Include/pgenheaders.h b/Include/pgenheaders.h ---- a/Include/pgenheaders.h 2014-10-11 14:23:20.873223200 +0100 -+++ b/Include/pgenheaders.h 2014-10-11 14:23:22.624323300 +0100 +diff -Naur Python-3.5.0-orig/Include/pgenheaders.h Python-3.5.0/Include/pgenheaders.h +--- Python-3.5.0-orig/Include/pgenheaders.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/pgenheaders.h 2015-09-21 13:42:43.930800000 +0300 @@ -10,9 +10,9 @@ #include "Python.h" @@ -28,10 +28,10 @@ diff -urN a/Include/pgenheaders.h b/Include/pgenheaders.h #define addarc _Py_addarc #define addbit _Py_addbit -diff -urN a/Include/pyerrors.h b/Include/pyerrors.h ---- a/Include/pyerrors.h 2014-10-11 14:23:20.879223500 +0100 -+++ b/Include/pyerrors.h 2014-10-11 14:23:22.624323300 +0100 -@@ -454,9 +454,9 @@ +diff -Naur Python-3.5.0-orig/Include/pyerrors.h Python-3.5.0/Include/pyerrors.h +--- Python-3.5.0-orig/Include/pyerrors.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/pyerrors.h 2015-09-21 13:42:43.945474400 +0300 +@@ -465,9 +465,9 @@ #include PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) @@ -43,9 +43,9 @@ diff -urN a/Include/pyerrors.h b/Include/pyerrors.h #ifdef __cplusplus } -diff -urN a/Include/sysmodule.h b/Include/sysmodule.h ---- a/Include/sysmodule.h 2014-10-11 14:23:20.861222500 +0100 -+++ b/Include/sysmodule.h 2014-10-11 14:23:22.625323400 +0100 +diff -Naur Python-3.5.0-orig/Include/sysmodule.h Python-3.5.0/Include/sysmodule.h +--- Python-3.5.0-orig/Include/sysmodule.h 2015-09-13 14:41:20.000000000 +0300 ++++ Python-3.5.0/Include/sysmodule.h 2015-09-21 13:42:43.963535200 +0300 @@ -19,9 +19,9 @@ PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); diff --git a/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch b/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch index a86a32e9b2..4810f9fe52 100644 --- a/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch +++ b/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch @@ -1,7 +1,7 @@ -diff -urN a/Include/pythonrun.h b/Include/pythonrun.h ---- a/Include/pythonrun.h 2014-10-11 14:23:24.506431000 +0100 -+++ b/Include/pythonrun.h 2014-10-11 14:23:26.506545400 +0100 -@@ -214,7 +214,7 @@ +diff -Naur Python-3.5.0-orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h +--- Python-3.5.0-orig/Include/pylifecycle.h 2015-09-21 13:42:04.489399200 +0300 ++++ Python-3.5.0/Include/pylifecycle.h 2015-09-21 13:42:45.489672800 +0300 +@@ -65,7 +65,7 @@ PyAPI_FUNC(wchar_t *) Py_GetPath(void); PyAPI_FUNC(void) Py_SetPath(const wchar_t *); #ifdef MS_WINDOWS diff --git a/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch b/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch index 10c8a7b968..47708fca2f 100644 --- a/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch +++ b/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch @@ -1,16 +1,16 @@ -diff -urN a/Lib/ssl.py b/Lib/ssl.py ---- a/Lib/ssl.py 2014-10-11 14:23:27.721614900 +0100 -+++ b/Lib/ssl.py 2014-10-11 14:23:30.169754900 +0100 -@@ -144,7 +144,7 @@ - _PROTOCOL_NAMES[PROTOCOL_TLSv1_1] = "TLSv1.1" - _PROTOCOL_NAMES[PROTOCOL_TLSv1_2] = "TLSv1.2" +diff -Naur Python-3.5.0-orig/Lib/ssl.py Python-3.5.0/Lib/ssl.py +--- Python-3.5.0-orig/Lib/ssl.py 2015-09-13 14:41:21.000000000 +0300 ++++ Python-3.5.0/Lib/ssl.py 2015-09-21 13:42:46.889384800 +0300 +@@ -138,7 +138,7 @@ + except NameError: + _SSLv2_IF_EXISTS = None -if sys.platform == "win32": +if sys.platform == "win32" and sys.version.find("GCC") == -1: from _ssl import enum_certificates, enum_crls from socket import socket, AF_INET, SOCK_STREAM, create_connection -@@ -387,7 +387,7 @@ +@@ -416,7 +416,7 @@ def load_default_certs(self, purpose=Purpose.SERVER_AUTH): if not isinstance(purpose, _ASN1Object): raise TypeError(purpose) @@ -18,4 +18,4 @@ diff -urN a/Lib/ssl.py b/Lib/ssl.py + if sys.platform == "win32" and sys.version.find("GCC") == -1: for storename in self._windows_cert_stores: self._load_windows_store_certs(storename, purpose) - else: + self.set_default_verify_paths() diff --git a/mingw-w64-python3/0890-mingw-build-optimized-ext.patch b/mingw-w64-python3/0890-mingw-build-optimized-ext.patch index 6761e6162f..a8dfdcf878 100644 --- a/mingw-w64-python3/0890-mingw-build-optimized-ext.patch +++ b/mingw-w64-python3/0890-mingw-build-optimized-ext.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 14:23:31.343822100 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 14:23:33.915969200 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py Python-3.5.0/Lib/distutils/cygwinccompiler.py +--- Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py 2015-09-21 13:42:15.483911200 +0300 ++++ Python-3.5.0/Lib/distutils/cygwinccompiler.py 2015-09-21 13:42:48.326347200 +0300 @@ -305,9 +305,9 @@ raise CCompilerError( 'Cygwin gcc cannot be used with --compiler=mingw32') diff --git a/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch b/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch index a1aa400c38..b9f6599b10 100644 --- a/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch +++ b/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch @@ -1,6 +1,6 @@ -diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py ---- a/Lib/distutils/cygwinccompiler.py 2014-10-11 14:23:35.007031600 +0100 -+++ b/Lib/distutils/cygwinccompiler.py 2014-10-11 14:23:37.562177700 +0100 +diff -Naur Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py Python-3.5.0/Lib/distutils/cygwinccompiler.py +--- Python-3.5.0-orig/Lib/distutils/cygwinccompiler.py 2015-09-21 13:42:49.604148800 +0300 ++++ Python-3.5.0/Lib/distutils/cygwinccompiler.py 2015-09-21 13:42:49.741862400 +0300 @@ -238,7 +238,7 @@ # (On my machine: 10KB < stripped_file < ??100KB # unstripped_file = stripped_file + XXX KB diff --git a/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch index 2d5a5317fe..bff4af4ed0 100644 --- a/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch +++ b/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch @@ -1,6 +1,6 @@ -diff -urN a/Python/sysmodule.c b/Python/sysmodule.c ---- a/Python/sysmodule.c 2014-10-11 14:23:38.797248400 +0100 -+++ b/Python/sysmodule.c 2014-10-11 14:23:41.349394300 +0100 +diff -Naur Python-3.5.0-orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c +--- Python-3.5.0-orig/Python/sysmodule.c 2015-09-21 13:42:04.576316800 +0300 ++++ Python-3.5.0/Python/sysmodule.c 2015-09-21 13:42:51.105452800 +0300 @@ -26,7 +26,7 @@ #include #endif /* MS_WINDOWS */ @@ -10,7 +10,7 @@ diff -urN a/Python/sysmodule.c b/Python/sysmodule.c extern void *PyWin_DLLhModule; /* A string loaded from the DLL at startup: */ extern const char *PyWin_DLLVersionString; -@@ -1733,7 +1733,7 @@ +@@ -1803,7 +1803,7 @@ PyUnicode_FromString("little")); #endif diff --git a/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch b/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch new file mode 100644 index 0000000000..c71d7a38be --- /dev/null +++ b/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch @@ -0,0 +1,12 @@ +diff -Naur Python-3.5.0-orig/Lib/distutils/command/build_ext.py Python-3.5.0/Lib/distutils/command/build_ext.py +--- Python-3.5.0-orig/Lib/distutils/command/build_ext.py 2015-09-21 13:42:13.376441600 +0300 ++++ Python-3.5.0/Lib/distutils/command/build_ext.py 2015-09-21 13:42:52.531127200 +0300 +@@ -216,7 +216,7 @@ + + # for extensions under Cygwin and AtheOS Python's library directory must be + # appended to library_dirs +- if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': ++ if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or self.plat_name.startswith(('mingw')): + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): + # building third party extensions + config_dir_name = os.path.basename(sysconfig.get_config_var('LIBPL')) diff --git a/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch b/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch new file mode 100644 index 0000000000..17965aac58 --- /dev/null +++ b/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch @@ -0,0 +1,14 @@ +diff -Naur Python-3.5.0-orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0-orig/setup.py 2015-09-21 13:42:34.882339200 +0300 ++++ Python-3.5.0/setup.py 2015-09-21 13:42:53.935354400 +0300 +@@ -1632,6 +1632,10 @@ + '-framework', 'CoreFoundation', + ])) + ++ if host_platform.startswith(('mingw', 'win')): ++ exts.append( Extension('_overlapped', ['overlapped.c'], ++ libraries=['ws2_32'])) ++ + self.extensions.extend(exts) + + # Call the method for detecting whether _tkinter can be compiled diff --git a/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch b/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch new file mode 100644 index 0000000000..a94ccf8ea6 --- /dev/null +++ b/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch @@ -0,0 +1,11 @@ +--- Python-3.5.0/Include/pyport.h.orig 2015-10-05 01:44:27.804874500 +0100 ++++ Python-3.5.0/Include/pyport.h 2015-10-05 02:07:01.998193900 +0100 +@@ -896,7 +896,7 @@ + #define PY_LITTLE_ENDIAN 1 + #endif + +-#ifdef Py_BUILD_CORE ++#if defined Py_BUILD_CORE || defined Py_BUILD_CORE_MODULE + /* + * Macros to protect CRT calls against instant termination when passed an + * invalid parameter (issue23524). diff --git a/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch b/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch new file mode 100644 index 0000000000..8de82ac14c --- /dev/null +++ b/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch @@ -0,0 +1,46 @@ +--- Python-3.5.0/Python/pytime.c.orig 2015-10-05 21:30:23.839918600 +0100 ++++ Python-3.5.0/Python/pytime.c 2015-10-05 21:30:28.078842500 +0100 +@@ -435,7 +435,7 @@ + /* 11,644,473,600,000,000,000: number of nanoseconds between + the 1st january 1601 and the 1st january 1970 (369 years + 89 leap + days). */ +- *tp = large.QuadPart * 100 - 11644473600000000000; ++ *tp = large.QuadPart * 100 - 11644473600000000000ULL; + if (info) { + DWORD timeAdjustment, timeIncrement; + BOOL isTimeAdjustmentDisabled, ok; +@@ -529,6 +529,34 @@ + return pygettimeofday_new(t, info, 1); + } + ++#if defined(MS_WINDOWS) && _WIN32_WINNT < 0x0600 ++/* GetTickCount64() is not available on XP. */ ++ULONGLONG GetTickCount64 () ++{ ++ static ULONGLONG (CALLBACK *Py_GetTickCount64)() = (ULONGLONG (*)(void))-1; ++ static DWORD last_ticks = 0; ++ static DWORD n_overflow = 0; ++ DWORD ticks = 0; ++ HINSTANCE hKernel32; ++ ++ if (Py_GetTickCount64 == (void*)-1) ++ { ++ hKernel32 = GetModuleHandleW(L"KERNEL32"); ++ Py_GetTickCount64 = *(ULONGLONG (*)(void))(GetProcAddress(hKernel32, ++ "GetTickCount64")); ++ } ++ if (Py_GetTickCount64 != (void*)-1) ++ { ++ return Py_GetTickCount64(); ++ } ++ ++ ticks = GetTickCount(); ++ if (ticks < last_ticks) ++ n_overflow++; ++ last_ticks = ticks; ++ return ((ULONGLONG)n_overflow << 32LL) + (ULONGLONG)GetTickCount(); ++} ++#endif + + static int + pymonotonic_new(_PyTime_t *tp, _Py_clock_info_t *info, int raise) diff --git a/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch b/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch new file mode 100644 index 0000000000..f16e347efc --- /dev/null +++ b/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch @@ -0,0 +1,114 @@ +--- Python-3.5.0/Modules/posixmodule.c.orig 2015-10-05 21:34:15.284022500 +0100 ++++ Python-3.5.0/Modules/posixmodule.c 2015-10-05 21:34:18.082536800 +0100 +@@ -1462,6 +1462,31 @@ + return TRUE; + } + ++/* Grab GetFinalPathNameByHandle dynamically from kernel32 */ ++static int has_GetFinalPathNameByHandle = -1; ++static DWORD (CALLBACK *Py_GetFinalPathNameByHandleW)(HANDLE, LPWSTR, DWORD, ++ DWORD); ++static int ++check_GetFinalPathNameByHandle() ++{ ++ HINSTANCE hKernel32; ++ DWORD (CALLBACK *Py_GetFinalPathNameByHandleA)(HANDLE, LPSTR, DWORD, ++ DWORD); ++ ++ /* only recheck */ ++ if (-1 == has_GetFinalPathNameByHandle) ++ { ++ hKernel32 = GetModuleHandleW(L"KERNEL32"); ++ *(FARPROC*)&Py_GetFinalPathNameByHandleA = GetProcAddress(hKernel32, ++ "GetFinalPathNameByHandleA"); ++ *(FARPROC*)&Py_GetFinalPathNameByHandleW = GetProcAddress(hKernel32, ++ "GetFinalPathNameByHandleW"); ++ has_GetFinalPathNameByHandle = Py_GetFinalPathNameByHandleA && ++ Py_GetFinalPathNameByHandleW; ++ } ++ return has_GetFinalPathNameByHandle; ++} ++ + static BOOL + get_target_path(HANDLE hdl, wchar_t **target_path) + { +@@ -1470,8 +1495,8 @@ + + /* We have a good handle to the target, use it to determine + the target path name (then we'll call lstat on it). */ +- buf_size = GetFinalPathNameByHandleW(hdl, 0, 0, +- VOLUME_NAME_DOS); ++ buf_size = Py_GetFinalPathNameByHandleW(hdl, 0, 0, ++ VOLUME_NAME_DOS); + if(!buf_size) + return FALSE; + +@@ -1481,7 +1506,7 @@ + return FALSE; + } + +- result_length = GetFinalPathNameByHandleW(hdl, ++ result_length = Py_GetFinalPathNameByHandleW(hdl, + buf, buf_size, VOLUME_NAME_DOS); + + if(!result_length) { +@@ -1514,6 +1539,12 @@ + wchar_t *target_path; + const char *dot; + ++ if(!check_GetFinalPathNameByHandle()) { ++ /* If the OS doesn't have GetFinalPathNameByHandle, don't ++ traverse reparse point. */ ++ traverse = FALSE; ++ } ++ + hFile = CreateFileA( + path, + FILE_READ_ATTRIBUTES, /* desired access */ +@@ -1604,6 +1635,12 @@ + wchar_t *target_path; + const wchar_t *dot; + ++ if(!check_GetFinalPathNameByHandle()) { ++ /* If the OS doesn't have GetFinalPathNameByHandle, don't ++ traverse reparse point. */ ++ traverse = FALSE; ++ } ++ + hFile = CreateFileW( + path, + FILE_READ_ATTRIBUTES, /* desired access */ +@@ -3846,6 +3883,13 @@ + if (path_wchar == NULL) + return NULL; + ++ if(!check_GetFinalPathNameByHandle()) { ++ /* If the OS doesn't have GetFinalPathNameByHandle, return a ++ NotImplementedError. */ ++ return PyErr_Format(PyExc_NotImplementedError, ++ "GetFinalPathNameByHandle not available on this platform"); ++ } ++ + hFile = CreateFileW( + path_wchar, + 0, /* desired access */ +@@ -3861,7 +3905,7 @@ + + /* We have a good handle to the target, use it to determine the + target path name. */ +- buf_size = GetFinalPathNameByHandleW(hFile, 0, 0, VOLUME_NAME_NT); ++ buf_size = Py_GetFinalPathNameByHandleW(hFile, 0, 0, VOLUME_NAME_NT); + + if(!buf_size) + return win32_error_object("GetFinalPathNameByHandle", path); +@@ -3870,8 +3914,8 @@ + if(!target_path) + return PyErr_NoMemory(); + +- result_length = GetFinalPathNameByHandleW(hFile, target_path, +- buf_size, VOLUME_NAME_DOS); ++ result_length = Py_GetFinalPathNameByHandleW(hFile, target_path, ++ buf_size, VOLUME_NAME_DOS); + if(!result_length) + return win32_error_object("GetFinalPathNamyByHandle", path); + diff --git a/mingw-w64-python3/1000-fix-building-posixmodule.patch b/mingw-w64-python3/1000-fix-building-posixmodule.patch index 69b69c08c2..29f9efeda8 100644 --- a/mingw-w64-python3/1000-fix-building-posixmodule.patch +++ b/mingw-w64-python3/1000-fix-building-posixmodule.patch @@ -1,7 +1,7 @@ -diff -urN a/Modules/posixmodule.c b/Modules/posixmodule.c ---- a/Modules/posixmodule.c 2014-10-11 14:23:43.199500200 +0100 -+++ b/Modules/posixmodule.c 2014-10-11 14:23:45.146611500 +0100 -@@ -1444,10 +1444,10 @@ +diff -Naur Python-3.5.0-orig/Modules/posixmodule.c Python-3.5.0/Modules/posixmodule.c +--- Python-3.5.0-orig/Modules/posixmodule.c 2015-09-21 13:42:06.149864000 +0300 ++++ Python-3.5.0/Modules/posixmodule.c 2015-09-21 13:42:55.398279200 +0300 +@@ -1370,10 +1370,10 @@ if(!SetCurrentDirectoryW(path)) return FALSE; diff --git a/mingw-w64-python3/1010-install-msilib.patch b/mingw-w64-python3/1010-install-msilib.patch index 0139865c6c..ce6cc91f9a 100644 --- a/mingw-w64-python3/1010-install-msilib.patch +++ b/mingw-w64-python3/1010-install-msilib.patch @@ -1,7 +1,7 @@ -diff -urN a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in 2014-10-11 14:23:46.236673900 +0100 -+++ b/Makefile.pre.in 2014-10-11 14:23:48.938828400 +0100 -@@ -1195,6 +1195,7 @@ +diff -Naur Python-3.5.0-orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0-orig/Makefile.pre.in 2015-09-21 13:42:31.879731200 +0300 ++++ Python-3.5.0/Makefile.pre.in 2015-09-21 13:42:56.820567200 +0300 +@@ -1219,6 +1219,7 @@ test/test_importlib/extension test/test_importlib/frozen \ test/test_importlib/import_ test/test_importlib/source \ turtledemo \ diff --git a/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch b/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch new file mode 100644 index 0000000000..eef3d9a7f0 --- /dev/null +++ b/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch @@ -0,0 +1,29 @@ +diff -Naur Python-3.5.0-orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0-orig/Modules/getpath.c 2015-09-21 13:42:36.358809600 +0300 ++++ Python-3.5.0/Modules/getpath.c 2015-09-21 13:42:58.274461600 +0300 +@@ -973,6 +973,17 @@ + int + _Py_CheckPython3() + { ++ /* This does not work well with mingw-w64-python. First it tries to ++ * look up \python3.dll, which it won't (or should not) find. But the ++ * real problem is when Python is freezed by cx_Freeze. sys.prefix ++ * is then /, and Python tries to load /\DLLs\python3.dll, which makes ++ * windows try to load python3.dll from a network address, causing ++ * a several seconds long delay before proceeding. Since this code does ++ * not do anything useful in the current state, we might just as ++ * well return immediately. */ ++#ifdef __MINGW32__ ++ return 0; ++#else + wchar_t py3path[MAXPATHLEN+1]; + wchar_t *s; + if (python3_checked) +@@ -997,6 +1008,7 @@ + wcscat(py3path, L"\\DLLs\\python3.dll"); + hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + return hPython3 != NULL; ++#endif + } + #endif + diff --git a/mingw-w64-python3/PKGBUILD b/mingw-w64-python3/PKGBUILD index 313dd7b045..4466021598 100644 --- a/mingw-w64-python3/PKGBUILD +++ b/mingw-w64-python3/PKGBUILD @@ -1,32 +1,46 @@ # Maintainer: Alexey Pavlov -# Contributor: Ray Donnelly +# Maintainer: Ray Donnelly # Contributor: Saul Ibarra Corretge +# Contributor: Frode Solheim + +# TODO :: subprocess.Popen .. specifically list2cmdline in subprocess.py +# needs a fix so it can handle running MSYS2 executables better. +# Arguments should not be quoted in the Windows fashion as-per: +# http://www.daviddeley.com/autohotkey/parameters/parameters.htm +# but instead how Cygwin expects them to be quoted. Checking for +# {cygwin,msys-2.0}.dll in the executable is the only way that I +# can think to do this at present. +# Any double quoted string will cause problems, e.g. +# -DGNOMELOCALEDIR=\"/mingw64/share/locale\" _realname=python3 +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -_pybasever=3.4 -pkgver=${_pybasever}.2 +_pybasever=3.5 +pkgver=${_pybasever}.0 pkgrel=5 pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') license=('PSF') url="http://www.python.org/" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-bzip2" "${MINGW_PACKAGE_PREFIX}-gdbm" - "${MINGW_PACKAGE_PREFIX}-readline" - "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-readline" + "${MINGW_PACKAGE_PREFIX}-tcl" + "${MINGW_PACKAGE_PREFIX}-tk" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-xz" - "${MINGW_PACKAGE_PREFIX}-ncurses" - "${MINGW_PACKAGE_PREFIX}-tcl" - "${MINGW_PACKAGE_PREFIX}-tk") + ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -options=('!makeflags' 'staticlibs' 'strip' '!debug') +options=('!makeflags') # '!strip' 'debug') source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0000-make-_sysconfigdata.py-relocatable.patch + 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch 0100-MINGW-BASE-use-NT-thread-model.patch 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch 0130-MINGW-configure-MACHDEP-and-platform-for-build.patch @@ -44,7 +58,6 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch 0260-MINGW-compiler-enable-new-dtags.patch 0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch - 0280-issue17219-add-current-dir-in-library-path-if-buildi.patch 0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch 0300-MINGW-configure-for-shared-build.patch 0310-MINGW-dynamic-loading-support.patch @@ -61,7 +74,6 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch 0430-MINGW-find-import-library.patch 0440-MINGW-setup-_ssl-module.patch - 0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch 0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch 0462-MINGW-support-stdcall-without-underscore.patch 0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch @@ -74,12 +86,10 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0530-mingw-system-libffi.patch 0540-mingw-semicolon-DELIM.patch 0550-mingw-regen-use-stddef_h.patch + 0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch 0560-mingw-use-posix-getpath.patch 0565-mingw-add-ModuleFileName-dir-to-PATH.patch 0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch - 0580-mingw32-test-REPARSE_DATA_BUFFER.patch - 0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch - 0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch 0610-msys-cygwin-semi-native-build-sysconfig.patch 0620-mingw-sysconfig-like-posix.patch 0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch @@ -108,8 +118,16 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0890-mingw-build-optimized-ext.patch 0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch 0910-fix-using-dllhandle-and-winver-mingw.patch + 0920-mingw-add-LIBPL-to-library-dirs.patch + 0930-mingw-w64-build-overlapped-module.patch + 0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch + 0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch + 0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch + 0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch + 1000-fix-building-posixmodule.patch - 1010-install-msilib.patch) + 1010-install-msilib.patch + 1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch) prepare() { cd "${srcdir}/Python-${pkgver}" @@ -117,8 +135,9 @@ prepare() { # these are created by patches rm -f Misc/config_mingw Misc/cross_mingw32 Python/fileblocks.c - plain "Apply Ray Donnelly's relocatability enabling patch" + plain "Apply Ray Donnelly's should-be-upstreamed patches" patch -Np1 -i "${srcdir}"/0000-make-_sysconfigdata.py-relocatable.patch + patch -Np1 -i "${srcdir}"/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch plain "Apply Roumen Petrov's core patches (14)" patch -Np1 -i "${srcdir}"/0100-MINGW-BASE-use-NT-thread-model.patch @@ -140,9 +159,8 @@ prepare() { patch -Np1 -i "${srcdir}"/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch patch -Np1 -i "${srcdir}"/0260-MINGW-compiler-enable-new-dtags.patch - plain "Apply Roumen Petrov's extensions patches (25)" + plain "Apply Roumen Petrov's extensions patches (23)" patch -Np1 -i "${srcdir}"/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch - patch -Np1 -i "${srcdir}"/0280-issue17219-add-current-dir-in-library-path-if-buildi.patch patch -Np1 -i "${srcdir}"/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch patch -Np1 -i "${srcdir}"/0300-MINGW-configure-for-shared-build.patch patch -Np1 -i "${srcdir}"/0310-MINGW-dynamic-loading-support.patch @@ -159,7 +177,6 @@ prepare() { patch -Np1 -i "${srcdir}"/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch patch -Np1 -i "${srcdir}"/0430-MINGW-find-import-library.patch patch -Np1 -i "${srcdir}"/0440-MINGW-setup-_ssl-module.patch - patch -Np1 -i "${srcdir}"/0450-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch patch -Np1 -i "${srcdir}"/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch patch -Np1 -i "${srcdir}"/0462-MINGW-support-stdcall-without-underscore.patch patch -Np1 -i "${srcdir}"/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch @@ -167,19 +184,19 @@ prepare() { patch -Np1 -i "${srcdir}"/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch patch -Np1 -i "${srcdir}"/0490-MINGW-customize-site.patch - plain "Apply Ray Donnelly's general/cross patches (29)" + plain "Apply Ray Donnelly's general/cross patches (42)" patch -Np1 -i "${srcdir}"/0500-add-python-config-sh.patch patch -Np1 -i "${srcdir}"/0510-cross-darwin-feature.patch patch -Np1 -i "${srcdir}"/0520-py3k-mingw-ntthreads-vs-pthreads.patch patch -Np1 -i "${srcdir}"/0530-mingw-system-libffi.patch patch -Np1 -i "${srcdir}"/0540-mingw-semicolon-DELIM.patch patch -Np1 -i "${srcdir}"/0550-mingw-regen-use-stddef_h.patch + patch -Np1 -i "${srcdir}"/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch patch -Np1 -i "${srcdir}"/0560-mingw-use-posix-getpath.patch patch -Np1 -i "${srcdir}"/0565-mingw-add-ModuleFileName-dir-to-PATH.patch patch -Np1 -i "${srcdir}"/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch - patch -Np1 -i "${srcdir}"/0580-mingw32-test-REPARSE_DATA_BUFFER.patch - patch -Np1 -i "${srcdir}"/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch - patch -Np1 -i "${srcdir}"/0600-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch + # 0610- changed to not using -DVPATH='"$(VPATH_b2h)"' anymore since VPATH is + # relative, therefore getpath.c:355: joinpath(prefix, vpath) works naturally patch -Np1 -i "${srcdir}"/0610-msys-cygwin-semi-native-build-sysconfig.patch patch -Np1 -i "${srcdir}"/0620-mingw-sysconfig-like-posix.patch patch -Np1 -i "${srcdir}"/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch @@ -208,10 +225,19 @@ prepare() { patch -Np1 -i "${srcdir}"/0890-mingw-build-optimized-ext.patch patch -Np1 -i "${srcdir}"/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch patch -Np1 -i "${srcdir}"/0910-fix-using-dllhandle-and-winver-mingw.patch + patch -Np1 -i "${srcdir}"/0920-mingw-add-LIBPL-to-library-dirs.patch + patch -Np1 -i "${srcdir}"/0930-mingw-w64-build-overlapped-module.patch + patch -Np1 -i "${srcdir}"/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch + patch -Np1 -i "${srcdir}"/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch + patch -Np1 -i "${srcdir}"/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch + patch -Np1 -i "${srcdir}"/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch patch -Np1 -i "${srcdir}"/1000-fix-building-posixmodule.patch patch -Np1 -i "${srcdir}"/1010-install-msilib.patch + plain "Apply patch contributed by Frode Solheim from FS-UAE project (1)" + patch -Np1 -i "${srcdir}"/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch + autoreconf -vfi # Temporary workaround for FS#22322 @@ -226,7 +252,7 @@ prepare() { touch Include/Python-ast.h touch Python/Python-ast.c echo \"\" > Parser/pgen.stamp - + # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat @@ -234,15 +260,13 @@ prepare() { rm -r Modules/_ctypes/{darwin,libffi}* } -check() { - cd "${srcdir}/build-${CARCH}" - make test -} +# check() { +# cd "${srcdir}/build-${CARCH}" +# make test EXTRATESTOPTS="-v" +# } build() { - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 " CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1" @@ -264,15 +288,12 @@ build() { _extra_config+=("--with-pydebug") fi - LIBFFI_INC=`${MINGW_PREFIX}/bin/pkg-config libffi --cflags-only-I | sed "s|\-I||g"` - pushd ${LIBFFI_INC} > /dev/null - export LIBFFI_INCLUDEDIR=`pwd -W` - popd > /dev/null - # Workaround for conftest error on 64-bit builds export ac_cv_working_tzset=no + [ -d "${srcdir}/build-${CARCH}" ] && rm -rf "${srcdir}/build-${CARCH}" mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + MSYSTEM=MINGW ../Python-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ @@ -285,11 +306,14 @@ build() { "${_extra_config[@]}" \ OPT="" #--with-dbmliborder='gdbm:ndbm' + make } package() { cd "${srcdir}/build-${CARCH}" + + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) MSYSTEM=MINGW \ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ make install DESTDIR="$pkgdir" @@ -299,6 +323,15 @@ package() { VERABI=${_pybasever}dm fi + # gdb pretty printers for debugging Python itself; to use: + # python + # sys.path.append('C:/msys64/mingw64/share/gdb/python3') + # import python_gdb + # reload(python_gdb) + # end + [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ + cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py + rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3 cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/libpython${VERABI}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${VERABI}.dll.a @@ -355,88 +388,92 @@ package() { mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe } -sha1sums=('0727d8a8498733baabe6f51632b9bab0cbaa9ada' - '9467bf6fd0e3cfdeedc1c5830b7eadb94369e26d' - '4f37060c4caf594e8c176cf79972e6322ca4b553' - 'a8d85175d1ae5d617b7314d7d7eb6322951afe69' - '76158d7878fb685b571fb290a7ffbb95b1bae16c' - '8cc3ae693400d9740f4aa795cec63ea1d93bfc70' - 'd950ca34d413224e78ee6420dd673d8593c648bb' - 'ab3b14880e09cf6cc1a876e38dece1116cce4d35' - '1c81e994bd77e0f9dadb127b08ae863f4a9e193f' - '267ca1d4f4a9dabcb6a76fd3bc8a4981df3e4582' - 'fc8a2a4de68ea5c50ca0742361517a4f5e0a6140' - 'a59d77f68299a52e4dcab4110b4476b2099a007a' - '69c2316fac07f0b2c883b2d7a659cc4657b4d0e6' - '60b6d32b8a4f70620f16019c48191f600e25d73b' - '3f463b4ec93765e634f5a0bc86bbc4ee8ac2effe' - 'fe47bc2e6b4a43a84996ade90fd6f762c3f7648a' - 'd3e68ba2091f6b61f2440e2ef491373c68bf1d0d' - 'de936d717feaa45a44c9b2c83c196af9eb6d83d4' - '2e5a03d97d30299bfe23328a01e6811f84da4614' - '3cd7264e2e731664862c2841500bc8b2962f961e' - '269f053e3a6e8e063503fded4c7e41ec2f612ecf' - 'dd35eda65c8f24c8834ed305befb7fcab17556f1' - '1a2f211bd92c435b33169ab6e029663aaa06a87a' - 'be04e8183e78c8e5c3d3e09da067412e107e649e' - '34854ca7fa4b845a645cb782b1148dd6420755f0' - '6d16906fd4458bfe5bd261b8f98376c2db01f395' - '4d19b3d105261644d21c2155f278e5bb7ed31129' - '8138b09e7543c68be71456ae717cb4ee82dc2667' - '3a4a784e811c838e954c18d864f8df786819748f' - '856f3f1008a75dbe623f161511165b76f11ca0df' - '15bf5f45bc76da0e6e38b97d3a741ac3e1f1ff49' - '68a0e1d727d04b992419cdc9903c5fe024d3b2ab' - '6337ba0e5838f81bc949b42ecfd120f6a671152f' - '3c0f9cb5a05278dc94029bad6f55b91ce54cb31d' - 'f86f285e9aa88843e0ae9969ba04013024a07c5c' - 'ca990a81e1189537d05442bf8d1a6f4ef2d5096b' - '15654dedc9fe1f5b11a6d41326a1c21ddd399ac3' - '0836a567aa66e50b3a4e8772babf1e7fbc1246ed' - '4954cc04a907e9ff630a0d4b0ae60dc6e4aa57f7' - '2d505ed36cf50a1bdebffbb367f720a1a6cb0760' - 'f55a13ddd950125bb613bd243ef72ac8dd753daa' - '679a866c5c257abbc59410bccf6054e7f4f5d8ee' - '6fc6a61db76d0689263f3fc6ccfa3fba4829dca7' - '8d52a719d7bcb9b03dac6a28cd899a6d83f770bc' - '3cc4985c4b73f60c29a45dded5e2a36ecf18364b' - 'e514bb32094e62e811bf187ab451e719a522f2fe' - '00ff842554de6c2b4abd8ad7dc5adae62c982980' - '02652e5775dfa3966a09349169bc8c86d5e9a980' - '2b81ea5b3f8f06c0ab0df9306ec57dab8410778c' - '1892bb2df631f49485deae5a1ee8dbae5691beeb' - '08dfc0c0acd942901011cb9e1fd7a65a6f872771' - '2f72a9036599de2ca02e5de1316d7b1771cada08' - '96e514da87da8d0d223cf992d270800bc75d3f7d' - 'c596055a0a53b00dacd52940bb6c5b91bcb368b4' - 'e58edbb86a508d5ad2e5542e7407e26a59b19053' - '567d42d169dea66c32601a78f1953bf39f8bb7d2' - '3d48fcf13644952c0bb2a68b834339f5174a9b4c' - '70390a1be147a4a1b3d40a6935fdd4396e586c06' - '48ab620460a7de37871b74ba3bab59a7bc791802' - '93f2b29f42fd644f68cc88b987425605748ceb0d' - '22da496ef61fc8f5e0e0b7e8562cd843cb21d08a' - '166ef8e127b3d5ae697d4f2577e7e961a01a2bd6' - '8fcc2644b8bfdc584c38f12cde5a57a37bf9506e' - 'b8e60039ceae9f37ba7cef0e75a2f0402c7d27d9' - '4472a28463b46aa332a7ce2764c9124dadbe1f0b' - '3219370e4a3e2d79bc5e601433106f8a25100474' - 'df16f14afbe0d74aa8f7587d2a9d2635538bfbf5' - '1c455c5301a7018f3531dd2cdf55a48a8933e4bf' - '2d1b98a498bace9b05e7b13de1ee387368148c7a' - 'd18f88db082d3397b61c6fc72e6d1867a1acfb09' - '2df995b6f7e74c7fe9c3254a387956c5a3fd511e' - 'bdfb78cf48559cc4ce949b75a9a18510e54e6435' - 'c7687e0c9513778cacc4f02868b056321c1fad15' - '54882599bda70b76fe7b35f8347f16e3b19cb91d' - 'caf84500bd312dce117af4243729dde8b0377f9f' - '15a30a6841889fc4df268eb6000158486075814b' - '44d7e77532dcdd4bafadf23c728e115130be9bd5' - '048a9b1afa4b8e83a17c7a95c097c40b277759c8' - '017aba96fb0fe8cba033837be6239472faa41505' - '80ce4192f81f70762c9654f9c8dcb34dd9e4046f' - '2dce462131f16248faeafb908fc03b6d2fb82504' - '5c4101eed415f28b0277904e7686a352fc69d1d9' - '3e80013b0742254cf68743e2bb257cc59213e007' - '25dfd3da896a1dafe8740e1036d41a10e179d080' - 'ac74429997b79278834772579f81d46892571e87') +sha1sums=('871a06df9ab70984b7398ac53047fe125c757a70' + '87bbcdc0f0ca1e1d23dd9822566efe91d6bd8a85' + 'ab513dfa2e0902084ae92409bfdfd25e6a5286e2' + 'e6358136f1f340de833365ef3cc2cebee5ea300b' + 'db10f4f2b451217996fb0c461d893e6f8d8ce005' + '840e903fd99ccac2a66d177906f103a461ae841b' + '80702b0f748c5023099650075963fa5b49caec84' + '7c095e930ee187aad769e00644721c9d597cdbb3' + 'e425c6fc68193b5a35127db97759b4bded24fe2c' + '48d14c7ed72ae35e70471f60b8cf96cc69678241' + '9721a17a49af205d94e285aa0571dfa16a4069e1' + 'aeaf1085ffdf4d43ab02de8c6c82b980310499f7' + 'eb49982d4dfef2e2b75988a325ad749546aa16fb' + 'b092c28958cbd27cad1a547c13813a5022442d79' + '0daa67a75a6a37ef71d714902e06c40351fe372a' + 'ab88afa741affff37506a8a38a04c9032b0f1c5c' + '87c0b42b78b8c06e76d686ab6939a6d94a67089f' + 'fb98afaa40198c29321bd72da0e1940d302eba42' + 'e08d5b6f784fa65ca17ef35d018a5cfe5ac6e800' + '8fd56716f982882981df55f24dceb9c021ec4a5a' + '0452a3027b6ee2b5fce3cc0772443171ee66f054' + '06ddd243cd5cd20f5696e1b8fdd22675fc428f9e' + '560b2b8716505d36f5eb91101ee7a3a5f8f3f58b' + 'f8a346563631d7f1018fc36ef19a9e1d202979a6' + '4bd1edde47c5c39aa1fcddffef9d5d9ac2784a00' + '5bf0b1bd38f4ec204319f44d79badb3579629587' + 'fb4f30aa7573e912f581f6ea5e0ce33c4eb06e47' + '1f9d2c750a0730dbbb00d7e7e7a2e7649deb2623' + '7df193fe3f146b31ef806119810f05fd19359e07' + '63a86ff26cb3d3284f16cf66355fce6a5d109b83' + '1f1a19ca3e6dc471a9377c9a5f47db264ce7134d' + '4338c430a2c27d9324162825f92b08e537a973f2' + '45463f0c985c27b56ae09b42c1ff76a9aeb67ba0' + '9d434d98bab345460551e7fb9018a3a31c3efbf6' + '6d2e73d360beb96edd8a36f5bf9e0c60dd3d8863' + '38f6674a94a4897a48407c2eeefacfe9513ca238' + 'a79cb17268a0886a9cace1a57ce40a7b3d74ebe1' + '1bbc1b7255d05a8ed57afe5de3f691bbd7ff9dba' + 'b28c05b959d05892d2dccd7e50b0ca88d23017ec' + '24533ad159d29fbfc4d4f6097cdda4e30bd5b073' + '4f923318ba610ba905d6f82a27cbff50b483a7f1' + '3de27372dec4ac6951386f2d11124766a39c83dd' + 'b7ce5655b9d3ced4977aa995cfc376dc7425ab79' + '3065cd3bdf4ca133395d33c0d874e2854ac31cb7' + 'db5b78b615c8019c066943628fb6156fffe60cf7' + '7f9516ae8b862fa589129298be76cdd76d4667ae' + '55f4167c6c5627ce0f8ffbb97490432f2d1bf5f0' + '7cd0a741434b7f28923adae71023e512dc01efc5' + 'ad8dad96baa1543437a4e48c1923ecf0075b7b4e' + '2fade3fd50c3213a7e0f47bd0f6051e7c46ffa1f' + '8ee814ffcb3b896b170ddd0bfe35dc2a1722c2f9' + 'cb3923149a09fccfe3e39a746970fb43256f08e4' + 'ae7be985658d4dfb65c043ce0d4faa1e448b0f2f' + '276cafd5a781eaccf765ecd5929cadf50fd9e22e' + 'bff0af7eab856678bffb43e5403b61a27c17a789' + '621c2dddf28f8fb6c040a9d60dcfd80d64ed7bcd' + '899b79863ab07b3db95b935ce67d516af10e92e6' + '683ef4a0b0fab3e12e7b91b95a1945ff30799c4c' + '23c4e3a18631f8296fc6a2d03f4cbc68e6b3f4e0' + 'fb9350d96ef312428c80cca6140167ee028561b6' + '4e1be186591538c8c28bcb2a24d7cb74bf822f44' + 'ec8180cc0692265438379a02b8b9f7bd012a6a2e' + 'cefd88068f5962a40958d1060b6a71eebb1b3c93' + '28f294128f2466589317281e66e780b093230051' + '9ebbf001a88f8fd8166bd05e9016f5de64c7ca8b' + 'b4c30aaf102eb37f2f78c406d606d111b0bc1250' + 'bd3f13eb5ff9ad7591b36abd8fde573a870e3484' + 'a39ebfe3ba5cf61a1e4ec7f6e6eb34f5409b7b75' + 'f5f002068dcb8ed8f28ea3b3c1892ec1b8445315' + 'c3ee5c3846e5ffc0910f946eb82b5e4c76a70822' + 'f585406d547e8c84e617f81b23e20e83fb0df6fb' + 'b1ce6725f469543e1e33761d1615607864e6e4dc' + '35b07478075843d129828d03e9e0790cb7e582a5' + '127eb025e419ca7065aeb46d09e610e556b565b6' + '1d185c84f86cdcdc7f868ea471f5c0eabdb3bcdd' + 'abe6a60f60a604fcaf13745b232e1623b13cb011' + 'd1d92db68fae16bd8ebbb971221df1c4680eb415' + '4a185ad168e84fdf33399ebe10f74f153afcfb51' + '5bc1da6a24cc326b8094f1f0625d7f8df8956c77' + 'e1a155cca50fe1fe4f450ff631ecbdbcc845aa83' + 'ce026983639b7e5e503b32345bbcf81972447868' + '8ca0fdb71ee8198997b30466c367ac0c84f14237' + '4564e95c83e30dca025d6a7ecf0b24a709ea5120' + '79ff9a468dcfd2c55afa70758bd6a50b2a940ed4' + '2bf23da1017ab6ed5bc59c4f3fbf713093036a09' + '6473ae1b2108c26403022c6846e562d2cfff9727' + 'a97dbe5299385b9fde442779d00f9a161ef3f950' + 'd5c9e4e47db62db241f4488d9bc974b083b7b0e3' + 'c7eb543aee59f4c246018fa7943a1eaa12e6809c') diff --git a/mingw-w64-python3/Python-3.5.0/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch b/mingw-w64-python3/Python-3.5.0/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch new file mode 100644 index 0000000000..d277f07df2 --- /dev/null +++ b/mingw-w64-python3/Python-3.5.0/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch @@ -0,0 +1,19 @@ +--- Python-3.5.0/Python/getcompiler.c.orig 2015-05-23 17:09:24.000000000 +0100 ++++ Python-3.5.0/Python/getcompiler.c 2016-01-02 15:13:57.737265800 +0000 +@@ -6,7 +6,15 @@ + #ifndef COMPILER + + #ifdef __GNUC__ +-#define COMPILER "\n[GCC " __VERSION__ "]" ++/* To retain compatibility with things that determine ++ CPU arch by calling get_build_version in msvccompiler.py ++ (such as NumPy) we add (AMD64) for 64-bit Windows. */ ++#if defined(_WIN32) && defined(__x86_64__) ++#define ARCH_SUFFIX " (AMD64)" ++#else ++#define ARCH_SUFFIX "" ++#endif ++#define COMPILER "\n[GCC " __VERSION__ ARCH_SUFFIX "]" + #endif + + #endif /* !COMPILER */ diff --git a/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.patch b/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.1.3.4.patch similarity index 76% rename from mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.patch rename to mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.1.3.4.patch index 0e4f6924e8..bdc099b7ab 100644 --- a/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.patch +++ b/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.1.3.4.patch @@ -1,7 +1,7 @@ -From 30f0eea92b5ec0029abf02885c42ce04d2aa1772 Mon Sep 17 00:00:00 2001 +From 18e4b077535a0519f1c4ab459d238a57bc91dcdb Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 18 Aug 2014 12:19:52 +0100 -Subject: [PATCH 1/3] add hostosinfo.h to installed headers +Subject: [PATCH 1/5] add hostosinfo.h to installed headers .. if you build Qt Creator with system qbs then this header is needed by: @@ -11,10 +11,10 @@ src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp 1 file changed, 1 insertion(+) diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 8171f42..0dfe50f 100644 +index 87c45b9..50775ce 100644 --- a/src/lib/corelib/tools/tools.pri +++ b/src/lib/corelib/tools/tools.pri -@@ -72,6 +72,7 @@ qbs_enable_unit_tests { +@@ -77,6 +77,7 @@ all_tests { $$PWD/cleanoptions.h \ $$PWD/codelocation.h \ $$PWD/error.h \ @@ -23,5 +23,5 @@ index 8171f42..0dfe50f 100644 $$PWD/preferences.h \ $$PWD/profile.h \ -- -2.1.0 +2.3.5 diff --git a/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.1.4.patch b/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.1.4.patch new file mode 100644 index 0000000000..f2fea28678 --- /dev/null +++ b/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.1.4.patch @@ -0,0 +1,27 @@ +From bffdb29097c0ca14abf104c7c3f7b1a2828829e6 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 18 Aug 2014 12:19:52 +0100 +Subject: [PATCH 01/10] add hostosinfo.h to installed headers + +.. if you build Qt Creator with system qbs then this +header is needed by: +src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +--- + src/lib/corelib/tools/tools.pri | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index 3bf459d..aaebae2 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -87,6 +87,7 @@ qbs_enable_unit_tests { + $$PWD/cleanoptions.h \ + $$PWD/codelocation.h \ + $$PWD/error.h \ ++ $$PWD/hostosinfo.h \ + $$PWD/settings.h \ + $$PWD/settingsmodel.h \ + $$PWD/preferences.h \ +-- +2.3.5 + diff --git a/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.patch b/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.master.patch similarity index 73% rename from mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.patch rename to mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.master.patch index 0e4f6924e8..36691ea986 100644 --- a/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.patch +++ b/mingw-w64-qbs-git/0001-add-hostosinfo.h-to-installed-headers.master.patch @@ -1,7 +1,7 @@ -From 30f0eea92b5ec0029abf02885c42ce04d2aa1772 Mon Sep 17 00:00:00 2001 +From 24a55fbd478ac7821da02e3cc5e3c868b2df3303 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 18 Aug 2014 12:19:52 +0100 -Subject: [PATCH 1/3] add hostosinfo.h to installed headers +Subject: [PATCH 1/5] add hostosinfo.h to installed headers .. if you build Qt Creator with system qbs then this header is needed by: @@ -11,17 +11,17 @@ src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp 1 file changed, 1 insertion(+) diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 8171f42..0dfe50f 100644 +index 35bc9c8..431eb27 100644 --- a/src/lib/corelib/tools/tools.pri +++ b/src/lib/corelib/tools/tools.pri -@@ -72,6 +72,7 @@ qbs_enable_unit_tests { +@@ -85,6 +85,7 @@ qbs_enable_unit_tests { $$PWD/cleanoptions.h \ $$PWD/codelocation.h \ $$PWD/error.h \ + $$PWD/hostosinfo.h \ $$PWD/settings.h \ + $$PWD/settingsmodel.h \ $$PWD/preferences.h \ - $$PWD/profile.h \ -- -2.1.0 +2.3.5 diff --git a/mingw-w64-qbs/0002-WIP-Xcode-generator.patch b/mingw-w64-qbs-git/0002-WIP-Xcode-generator.1.3.4.patch similarity index 99% rename from mingw-w64-qbs/0002-WIP-Xcode-generator.patch rename to mingw-w64-qbs-git/0002-WIP-Xcode-generator.1.3.4.patch index 27984e7113..690febd4b5 100644 --- a/mingw-w64-qbs/0002-WIP-Xcode-generator.patch +++ b/mingw-w64-qbs-git/0002-WIP-Xcode-generator.1.3.4.patch @@ -1,7 +1,7 @@ -From f3258a17f49b03418ba73baaa5ae1246a1f9d11a Mon Sep 17 00:00:00 2001 +From 38fdea0e2175a597a7b46a5c0f8e24d5fecd65e1 Mon Sep 17 00:00:00 2001 From: Jake Petroules -Date: Thu, 9 Jan 2014 09:00:47 -0500 -Subject: [PATCH 2/3] WIP: Xcode generator. +Date: Sat, 29 Nov 2014 18:12:45 +0000 +Subject: [PATCH 2/5] WIP: Xcode generator. Task-number: QBS-32 @@ -136,10 +136,10 @@ Change-Id: I5ce5cc3148aa801d75a1f64b778fe7334de43af9 create mode 100644 src/plugins/generator/xcode/xcodesimplegenerator.h diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp -index 5ecd22f..039b2a7 100644 +index d85c66d..f68320e 100644 --- a/src/app/qbs/commandlinefrontend.cpp +++ b/src/app/qbs/commandlinefrontend.cpp -@@ -38,6 +38,7 @@ +@@ -39,6 +39,7 @@ #include #include #include @@ -147,7 +147,7 @@ index 5ecd22f..039b2a7 100644 #include #include -@@ -326,6 +327,9 @@ void CommandLineFrontend::handleProjectsResolved() +@@ -332,6 +333,9 @@ void CommandLineFrontend::handleProjectsResolved() if (m_cancelStatus != CancelStatusNone) throw ErrorInfo(Tr::tr("Execution canceled.")); switch (m_parser.command()) { @@ -157,7 +157,7 @@ index 5ecd22f..039b2a7 100644 case ResolveCommandType: qApp->quit(); break; -@@ -445,6 +449,29 @@ void CommandLineFrontend::build() +@@ -452,6 +456,29 @@ void CommandLineFrontend::build() m_currentBuildEffort = 0; } @@ -188,10 +188,10 @@ index 5ecd22f..039b2a7 100644 { try { diff --git a/src/app/qbs/commandlinefrontend.h b/src/app/qbs/commandlinefrontend.h -index 75091aa..2276d3e 100644 +index f7b4d47..401dee4 100644 --- a/src/app/qbs/commandlinefrontend.h +++ b/src/app/qbs/commandlinefrontend.h -@@ -79,6 +79,7 @@ private: +@@ -80,6 +80,7 @@ private: void makeClean(); int runShell(); void build(); @@ -200,10 +200,10 @@ index 75091aa..2276d3e 100644 void updateTimestamps(); void connectBuildJobs(); diff --git a/src/app/qbs/parser/command.cpp b/src/app/qbs/parser/command.cpp -index 8bbbc7d..2283aef 100644 +index e97d301..bf70d06 100644 --- a/src/app/qbs/parser/command.cpp +++ b/src/app/qbs/parser/command.cpp -@@ -187,6 +187,41 @@ QList ResolveCommand::supportedOptions() const +@@ -188,6 +188,41 @@ QList ResolveCommand::supportedOptions() const return resolveOptions(); } @@ -246,10 +246,10 @@ index 8bbbc7d..2283aef 100644 { return Tr::tr("Build (parts of) a project. This is the default command."); diff --git a/src/app/qbs/parser/command.h b/src/app/qbs/parser/command.h -index b0439f9..935fc23 100644 +index 4cfa67f..2c88876 100644 --- a/src/app/qbs/parser/command.h +++ b/src/app/qbs/parser/command.h -@@ -80,6 +80,19 @@ private: +@@ -81,6 +81,19 @@ private: QList supportedOptions() const; }; @@ -270,10 +270,10 @@ index b0439f9..935fc23 100644 { public: diff --git a/src/app/qbs/parser/commandlineoption.cpp b/src/app/qbs/parser/commandlineoption.cpp -index 8b15b5e..3d7dc0d 100644 +index e138c95..cb4fbea 100644 --- a/src/app/qbs/parser/commandlineoption.cpp +++ b/src/app/qbs/parser/commandlineoption.cpp -@@ -114,6 +114,29 @@ void BuildDirectoryOption::doParse(const QString &representation, QStringList &i +@@ -115,6 +115,29 @@ void BuildDirectoryOption::doParse(const QString &representation, QStringList &i m_projectBuildDirectory = getArgument(representation, input); } @@ -304,10 +304,10 @@ index 8b15b5e..3d7dc0d 100644 QString VerboseOption::description(CommandType command) const diff --git a/src/app/qbs/parser/commandlineoption.h b/src/app/qbs/parser/commandlineoption.h -index bf31772..fa7b154 100644 +index 40a8b90..6e3c664 100644 --- a/src/app/qbs/parser/commandlineoption.h +++ b/src/app/qbs/parser/commandlineoption.h -@@ -53,7 +53,8 @@ public: +@@ -54,7 +54,8 @@ public: ForceOptionType, ForceTimestampCheckOptionType, LogTimeOptionType, @@ -317,7 +317,7 @@ index bf31772..fa7b154 100644 }; virtual ~CommandLineOption(); -@@ -105,6 +106,21 @@ private: +@@ -106,6 +107,21 @@ private: QString m_projectBuildDirectory; }; @@ -340,10 +340,10 @@ index bf31772..fa7b154 100644 { public: diff --git a/src/app/qbs/parser/commandlineoptionpool.cpp b/src/app/qbs/parser/commandlineoptionpool.cpp -index a6f2c26..fcca96b 100644 +index bd8895f..5b98ebf 100644 --- a/src/app/qbs/parser/commandlineoptionpool.cpp +++ b/src/app/qbs/parser/commandlineoptionpool.cpp -@@ -97,6 +97,9 @@ CommandLineOption *CommandLineOptionPool::getOption(CommandLineOption::Type type +@@ -98,6 +98,9 @@ CommandLineOption *CommandLineOptionPool::getOption(CommandLineOption::Type type case CommandLineOption::SettingsDirOptionType: option = new SettingsDirOption; break; @@ -353,7 +353,7 @@ index a6f2c26..fcca96b 100644 default: qFatal("Unknown option type %d", type); } -@@ -200,4 +203,9 @@ SettingsDirOption *CommandLineOptionPool::settingsDirOption() const +@@ -201,4 +204,9 @@ SettingsDirOption *CommandLineOptionPool::settingsDirOption() const return static_cast(getOption(CommandLineOption::SettingsDirOptionType)); } @@ -364,10 +364,10 @@ index a6f2c26..fcca96b 100644 + } // namespace qbs diff --git a/src/app/qbs/parser/commandlineoptionpool.h b/src/app/qbs/parser/commandlineoptionpool.h -index 0fc73a6..1186406 100644 +index 13c2af2..93ff3d5 100644 --- a/src/app/qbs/parser/commandlineoptionpool.h +++ b/src/app/qbs/parser/commandlineoptionpool.h -@@ -60,6 +60,7 @@ public: +@@ -61,6 +61,7 @@ public: ForceTimeStampCheckOption *forceTimestampCheckOption() const; LogTimeOption *logTimeOption() const; SettingsDirOption *settingsDirOption() const; @@ -376,10 +376,10 @@ index 0fc73a6..1186406 100644 private: mutable QHash m_options; diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp -index 64284c4..4ff3892 100644 +index 7ee9537..f333c70 100644 --- a/src/app/qbs/parser/commandlineparser.cpp +++ b/src/app/qbs/parser/commandlineparser.cpp -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ #include #include #include @@ -387,7 +387,7 @@ index 64284c4..4ff3892 100644 #include #include #include -@@ -156,6 +157,14 @@ CleanOptions CommandLineParser::cleanOptions() const +@@ -157,6 +158,14 @@ CleanOptions CommandLineParser::cleanOptions() const return options; } @@ -402,7 +402,7 @@ index 64284c4..4ff3892 100644 InstallOptions CommandLineParser::installOptions() const { Q_ASSERT(command() == InstallCommandType || command() == RunCommandType); -@@ -359,6 +368,7 @@ Command *CommandLineParser::CommandLineParserPrivate::commandFromString(const QS +@@ -360,6 +369,7 @@ Command *CommandLineParser::CommandLineParserPrivate::commandFromString(const QS QList CommandLineParser::CommandLineParserPrivate::allCommands() const { return QList() @@ -411,10 +411,10 @@ index 64284c4..4ff3892 100644 << commandPool.getCommand(BuildCommandType) << commandPool.getCommand(CleanCommandType) diff --git a/src/app/qbs/parser/commandlineparser.h b/src/app/qbs/parser/commandlineparser.h -index 4301a29..f736e25 100644 +index 3ed9dbb..4f5af96 100644 --- a/src/app/qbs/parser/commandlineparser.h +++ b/src/app/qbs/parser/commandlineparser.h -@@ -37,6 +37,7 @@ +@@ -38,6 +38,7 @@ namespace qbs { class BuildOptions; class CleanOptions; @@ -422,7 +422,7 @@ index 4301a29..f736e25 100644 class InstallOptions; class Settings; -@@ -57,6 +58,7 @@ public: +@@ -58,6 +59,7 @@ public: QString projectBuildDirectory() const; BuildOptions buildOptions() const; CleanOptions cleanOptions() const; @@ -431,10 +431,10 @@ index 4301a29..f736e25 100644 bool force() const; bool forceTimestampCheck() const; diff --git a/src/app/qbs/parser/commandpool.cpp b/src/app/qbs/parser/commandpool.cpp -index 6da872d..cdfd180 100644 +index edf7013..9f261e0 100644 --- a/src/app/qbs/parser/commandpool.cpp +++ b/src/app/qbs/parser/commandpool.cpp -@@ -49,6 +49,9 @@ qbs::Command *CommandPool::getCommand(CommandType type) const +@@ -50,6 +50,9 @@ qbs::Command *CommandPool::getCommand(CommandType type) const case ResolveCommandType: command = new ResolveCommand(m_optionPool); break; @@ -445,10 +445,10 @@ index 6da872d..cdfd180 100644 command = new BuildCommand(m_optionPool); break; diff --git a/src/app/qbs/parser/commandtype.h b/src/app/qbs/parser/commandtype.h -index b6b7592..149b2c6 100644 +index 83b2ae5..5c9b6e6 100644 --- a/src/app/qbs/parser/commandtype.h +++ b/src/app/qbs/parser/commandtype.h -@@ -34,7 +34,7 @@ namespace qbs { +@@ -35,7 +35,7 @@ namespace qbs { enum CommandType { ResolveCommandType, BuildCommandType, CleanCommandType, RunCommandType, ShellCommandType, StatusCommandType, UpdateTimestampsCommandType, @@ -458,7 +458,7 @@ index b6b7592..149b2c6 100644 } // namespace qbs diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri -index 2bd59b5..9b2fb38 100644 +index 18b3b47..9f2638c 100644 --- a/src/lib/corelib/api/api.pri +++ b/src/lib/corelib/api/api.pri @@ -1,5 +1,6 @@ @@ -468,7 +468,7 @@ index 2bd59b5..9b2fb38 100644 $$PWD/projectdata.h \ $$PWD/runenvironment.h \ $$PWD/jobs.h \ -@@ -11,6 +12,7 @@ HEADERS += \ +@@ -13,6 +14,7 @@ HEADERS += \ SOURCES += \ $$PWD/internaljobs.cpp \ @@ -600,10 +600,10 @@ index 0000000..7f8ba97 + +#endif // QBS_GENERATOR_H diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp -index 0bf6a9f..a9102f1 100644 +index 040bc1b..694208b 100644 --- a/src/lib/corelib/api/project.cpp +++ b/src/lib/corelib/api/project.cpp -@@ -54,6 +54,7 @@ +@@ -57,6 +57,7 @@ #include #include #include @@ -611,7 +611,7 @@ index 0bf6a9f..a9102f1 100644 #include #include #include -@@ -90,6 +91,7 @@ static void loadPlugins(const QStringList &_pluginPaths, const Logger &logger) +@@ -97,6 +98,7 @@ static void loadPlugins(const QStringList &_pluginPaths, const Logger &logger) pluginPaths << pluginPath; } } @@ -620,10 +620,10 @@ index 0bf6a9f..a9102f1 100644 qRegisterMetaType("qbs::ErrorInfo"); diff --git a/src/lib/corelib/qbs.h b/src/lib/corelib/qbs.h -index 6749fdb..7d1d238 100644 +index 26b5eab..c1e0b4f 100644 --- a/src/lib/corelib/qbs.h +++ b/src/lib/corelib/qbs.h -@@ -29,6 +29,7 @@ +@@ -30,6 +30,7 @@ #ifndef QBS_H #define QBS_H @@ -631,7 +631,7 @@ index 6749fdb..7d1d238 100644 #include "api/jobs.h" #include "api/languageinfo.h" #include "api/project.h" -@@ -37,6 +38,7 @@ +@@ -40,6 +41,7 @@ #include "tools/buildoptions.h" #include "tools/cleanoptions.h" #include "tools/error.h" @@ -1010,10 +1010,10 @@ index 0000000..4f6351b + +#endif diff --git a/src/lib/corelib/tools/scannerpluginmanager.cpp b/src/lib/corelib/tools/scannerpluginmanager.cpp -index 8bf43d2..fd23faa 100644 +index bed8d42..7f76ef3 100644 --- a/src/lib/corelib/tools/scannerpluginmanager.cpp +++ b/src/lib/corelib/tools/scannerpluginmanager.cpp -@@ -80,6 +80,9 @@ void ScannerPluginManager::loadPlugins(const QStringList &pluginPaths, const Log +@@ -81,6 +81,9 @@ void ScannerPluginManager::loadPlugins(const QStringList &pluginPaths, const Log QDirIterator it(pluginPath, filters, QDir::Files); while (it.hasNext()) { const QString fileName = it.next(); @@ -1024,11 +1024,11 @@ index 8bf43d2..fd23faa 100644 if (!lib->load()) { logger.qbsWarning() << Tr::tr("Pluginmanager: Cannot load plugin '%1': %2") diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 0dfe50f..85175b3 100644 +index 50775ce..aebab08 100644 --- a/src/lib/corelib/tools/tools.pri +++ b/src/lib/corelib/tools/tools.pri -@@ -6,6 +6,8 @@ HEADERS += \ - $$PWD/error.h \ +@@ -8,6 +8,8 @@ HEADERS += \ + $$PWD/executablefinder.h \ $$PWD/fileinfo.h \ $$PWD/filetime.h \ + $$PWD/generateoptions.h \ @@ -1036,9 +1036,9 @@ index 0dfe50f..85175b3 100644 $$PWD/id.h \ $$PWD/persistence.h \ $$PWD/scannerpluginmanager.h \ -@@ -35,6 +37,8 @@ SOURCES += \ - $$PWD/codelocation.cpp \ +@@ -39,6 +41,8 @@ SOURCES += \ $$PWD/error.cpp \ + $$PWD/executablefinder.cpp \ $$PWD/fileinfo.cpp \ + $$PWD/generateoptions.cpp \ + $$PWD/generatorpluginmanager.cpp \ @@ -4591,7 +4591,7 @@ index 0000000..e2bc712 +#endif // QBS_XCODEGENERATOR_H diff --git a/src/plugins/generator/xcode/xcodenativegenerator.cpp b/src/plugins/generator/xcode/xcodenativegenerator.cpp new file mode 100644 -index 0000000..ef6f0f3 +index 0000000..5457c3f --- /dev/null +++ b/src/plugins/generator/xcode/xcodenativegenerator.cpp @@ -0,0 +1,136 @@ @@ -4792,7 +4792,7 @@ index 0000000..d964b94 +#endif // QBS_XCODENATIVEGENERATOR_H diff --git a/src/plugins/generator/xcode/xcodesimplegenerator.cpp b/src/plugins/generator/xcode/xcodesimplegenerator.cpp new file mode 100644 -index 0000000..7bd9b05 +index 0000000..306d46d --- /dev/null +++ b/src/plugins/generator/xcode/xcodesimplegenerator.cpp @@ -0,0 +1,275 @@ @@ -5139,5 +5139,5 @@ index d3823ae..9fe2e6b 100644 -SUBDIRS = scanner +SUBDIRS = generator scanner -- -2.1.0 +2.3.5 diff --git a/mingw-w64-qbs-git/0002-WIP-Xcode-generator.patch b/mingw-w64-qbs-git/0002-WIP-Xcode-generator.1.4.patch similarity index 50% rename from mingw-w64-qbs-git/0002-WIP-Xcode-generator.patch rename to mingw-w64-qbs-git/0002-WIP-Xcode-generator.1.4.patch index 7a4c3afaa3..4fc1826849 100644 --- a/mingw-w64-qbs-git/0002-WIP-Xcode-generator.patch +++ b/mingw-w64-qbs-git/0002-WIP-Xcode-generator.1.4.patch @@ -1,1167 +1,218 @@ -From f3258a17f49b03418ba73baaa5ae1246a1f9d11a Mon Sep 17 00:00:00 2001 +From 6545923f08c0afa38fbf6fc95960d4b106941021 Mon Sep 17 00:00:00 2001 From: Jake Petroules -Date: Thu, 9 Jan 2014 09:00:47 -0500 -Subject: [PATCH 2/3] WIP: Xcode generator. +Date: Wed, 18 Feb 2015 09:05:29 -0800 +Subject: [PATCH 02/10] WIP: Xcode generator. Task-number: QBS-32 - Change-Id: I5ce5cc3148aa801d75a1f64b778fe7334de43af9 --- - src/app/qbs/commandlinefrontend.cpp | 27 ++ - src/app/qbs/commandlinefrontend.h | 1 + - src/app/qbs/parser/command.cpp | 35 +++ - src/app/qbs/parser/command.h | 13 + - src/app/qbs/parser/commandlineoption.cpp | 23 ++ - src/app/qbs/parser/commandlineoption.h | 18 +- - src/app/qbs/parser/commandlineoptionpool.cpp | 8 + - src/app/qbs/parser/commandlineoptionpool.h | 1 + - src/app/qbs/parser/commandlineparser.cpp | 10 + - src/app/qbs/parser/commandlineparser.h | 2 + - src/app/qbs/parser/commandpool.cpp | 3 + - src/app/qbs/parser/commandtype.h | 2 +- - src/lib/corelib/api/api.pri | 2 + - src/lib/corelib/api/generator.cpp | 50 ++++ - src/lib/corelib/api/generator.h | 61 +++++ - src/lib/corelib/api/project.cpp | 2 + - src/lib/corelib/qbs.h | 2 + - src/lib/corelib/tools/generateoptions.cpp | 91 +++++++ - src/lib/corelib/tools/generateoptions.h | 58 +++++ - src/lib/corelib/tools/generatorpluginmanager.cpp | 128 ++++++++++ - src/lib/corelib/tools/generatorpluginmanager.h | 69 ++++++ - src/lib/corelib/tools/scannerpluginmanager.cpp | 3 + - src/lib/corelib/tools/tools.pri | 4 + - src/plugins/generator/generator.pro | 2 + - src/plugins/generator/generatorplugin.h | 46 ++++ - src/plugins/generator/xcode/main.cpp | 45 ++++ - .../generator/xcode/opensteppropertylist.cpp | 186 ++++++++++++++ - src/plugins/generator/xcode/opensteppropertylist.h | 71 ++++++ - src/plugins/generator/xcode/pbx.h | 53 ++++ - src/plugins/generator/xcode/pbxbuildfile.cpp | 72 ++++++ - src/plugins/generator/xcode/pbxbuildfile.h | 64 +++++ - src/plugins/generator/xcode/pbxbuildphase.cpp | 77 ++++++ - src/plugins/generator/xcode/pbxbuildphase.h | 60 +++++ - src/plugins/generator/xcode/pbxcontainer.cpp | 53 ++++ - src/plugins/generator/xcode/pbxcontainer.h | 57 +++++ - src/plugins/generator/xcode/pbxfileencoding.h | 57 +++++ - src/plugins/generator/xcode/pbxfilereference.cpp | 73 ++++++ - src/plugins/generator/xcode/pbxfilereference.h | 54 ++++ - src/plugins/generator/xcode/pbxfiletype.cpp | 41 +++ - src/plugins/generator/xcode/pbxfiletype.h | 47 ++++ - src/plugins/generator/xcode/pbxgroup.cpp | 114 +++++++++ - src/plugins/generator/xcode/pbxgroup.h | 69 ++++++ - src/plugins/generator/xcode/pbxlegacytarget.cpp | 127 ++++++++++ - src/plugins/generator/xcode/pbxlegacytarget.h | 73 ++++++ - src/plugins/generator/xcode/pbxnativetarget.cpp | 83 +++++++ - src/plugins/generator/xcode/pbxnativetarget.h | 61 +++++ - src/plugins/generator/xcode/pbxobject.cpp | 69 ++++++ - src/plugins/generator/xcode/pbxobject.h | 59 +++++ - src/plugins/generator/xcode/pbxproducttype.cpp | 56 +++++ - src/plugins/generator/xcode/pbxproducttype.h | 52 ++++ - src/plugins/generator/xcode/pbxproject.cpp | 218 ++++++++++++++++ - src/plugins/generator/xcode/pbxproject.h | 80 ++++++ - src/plugins/generator/xcode/pbxreference.cpp | 107 ++++++++ - src/plugins/generator/xcode/pbxreference.h | 70 ++++++ - .../generator/xcode/pbxsourcesbuildphase.cpp | 47 ++++ - src/plugins/generator/xcode/pbxsourcesbuildphase.h | 49 ++++ - src/plugins/generator/xcode/pbxsourcetree.cpp | 50 ++++ - src/plugins/generator/xcode/pbxsourcetree.h | 52 ++++ - src/plugins/generator/xcode/pbxtarget.cpp | 139 +++++++++++ - src/plugins/generator/xcode/pbxtarget.h | 86 +++++++ - .../generator/xcode/xcbuildconfiguration.cpp | 82 ++++++ - src/plugins/generator/xcode/xcbuildconfiguration.h | 67 +++++ - .../generator/xcode/xcconfigurationlist.cpp | 142 +++++++++++ - src/plugins/generator/xcode/xcconfigurationlist.h | 63 +++++ - src/plugins/generator/xcode/xcode.pro | 58 +++++ - src/plugins/generator/xcode/xcodegenerator.cpp | 96 +++++++ - src/plugins/generator/xcode/xcodegenerator.h | 53 ++++ - .../generator/xcode/xcodenativegenerator.cpp | 136 ++++++++++ - src/plugins/generator/xcode/xcodenativegenerator.h | 53 ++++ - .../generator/xcode/xcodesimplegenerator.cpp | 275 +++++++++++++++++++++ - src/plugins/generator/xcode/xcodesimplegenerator.h | 53 ++++ - src/plugins/plugins.pro | 2 +- - 72 files changed, 4409 insertions(+), 3 deletions(-) - create mode 100644 src/lib/corelib/api/generator.cpp - create mode 100644 src/lib/corelib/api/generator.h - create mode 100644 src/lib/corelib/tools/generateoptions.cpp - create mode 100644 src/lib/corelib/tools/generateoptions.h - create mode 100644 src/lib/corelib/tools/generatorpluginmanager.cpp - create mode 100644 src/lib/corelib/tools/generatorpluginmanager.h - create mode 100644 src/plugins/generator/generator.pro - create mode 100644 src/plugins/generator/generatorplugin.h - create mode 100644 src/plugins/generator/xcode/main.cpp - create mode 100644 src/plugins/generator/xcode/opensteppropertylist.cpp - create mode 100644 src/plugins/generator/xcode/opensteppropertylist.h - create mode 100644 src/plugins/generator/xcode/pbx.h - create mode 100644 src/plugins/generator/xcode/pbxbuildfile.cpp - create mode 100644 src/plugins/generator/xcode/pbxbuildfile.h - create mode 100644 src/plugins/generator/xcode/pbxbuildphase.cpp - create mode 100644 src/plugins/generator/xcode/pbxbuildphase.h - create mode 100644 src/plugins/generator/xcode/pbxcontainer.cpp - create mode 100644 src/plugins/generator/xcode/pbxcontainer.h - create mode 100644 src/plugins/generator/xcode/pbxfileencoding.h - create mode 100644 src/plugins/generator/xcode/pbxfilereference.cpp - create mode 100644 src/plugins/generator/xcode/pbxfilereference.h - create mode 100644 src/plugins/generator/xcode/pbxfiletype.cpp - create mode 100644 src/plugins/generator/xcode/pbxfiletype.h - create mode 100644 src/plugins/generator/xcode/pbxgroup.cpp - create mode 100644 src/plugins/generator/xcode/pbxgroup.h - create mode 100644 src/plugins/generator/xcode/pbxlegacytarget.cpp - create mode 100644 src/plugins/generator/xcode/pbxlegacytarget.h - create mode 100644 src/plugins/generator/xcode/pbxnativetarget.cpp - create mode 100644 src/plugins/generator/xcode/pbxnativetarget.h - create mode 100644 src/plugins/generator/xcode/pbxobject.cpp - create mode 100644 src/plugins/generator/xcode/pbxobject.h - create mode 100644 src/plugins/generator/xcode/pbxproducttype.cpp - create mode 100644 src/plugins/generator/xcode/pbxproducttype.h - create mode 100644 src/plugins/generator/xcode/pbxproject.cpp - create mode 100644 src/plugins/generator/xcode/pbxproject.h - create mode 100644 src/plugins/generator/xcode/pbxreference.cpp - create mode 100644 src/plugins/generator/xcode/pbxreference.h - create mode 100644 src/plugins/generator/xcode/pbxsourcesbuildphase.cpp - create mode 100644 src/plugins/generator/xcode/pbxsourcesbuildphase.h - create mode 100644 src/plugins/generator/xcode/pbxsourcetree.cpp - create mode 100644 src/plugins/generator/xcode/pbxsourcetree.h - create mode 100644 src/plugins/generator/xcode/pbxtarget.cpp - create mode 100644 src/plugins/generator/xcode/pbxtarget.h - create mode 100644 src/plugins/generator/xcode/xcbuildconfiguration.cpp - create mode 100644 src/plugins/generator/xcode/xcbuildconfiguration.h - create mode 100644 src/plugins/generator/xcode/xcconfigurationlist.cpp - create mode 100644 src/plugins/generator/xcode/xcconfigurationlist.h - create mode 100644 src/plugins/generator/xcode/xcode.pro - create mode 100644 src/plugins/generator/xcode/xcodegenerator.cpp - create mode 100644 src/plugins/generator/xcode/xcodegenerator.h - create mode 100644 src/plugins/generator/xcode/xcodenativegenerator.cpp - create mode 100644 src/plugins/generator/xcode/xcodenativegenerator.h - create mode 100644 src/plugins/generator/xcode/xcodesimplegenerator.cpp - create mode 100644 src/plugins/generator/xcode/xcodesimplegenerator.h + src/lib/corelib/corelib.qbs | 62 ++ + src/lib/corelib/generators/generators.pri | 2 + + .../generators/xcode/opensteppropertylist.cpp | 257 ++++++++ + .../generators/xcode/opensteppropertylist.h | 76 +++ + src/lib/corelib/generators/xcode/pbx.h | 57 ++ + src/lib/corelib/generators/xcode/pbxbuildfile.cpp | 134 +++++ + src/lib/corelib/generators/xcode/pbxbuildfile.h | 74 +++ + src/lib/corelib/generators/xcode/pbxbuildphase.cpp | 94 +++ + src/lib/corelib/generators/xcode/pbxbuildphase.h | 65 +++ + src/lib/corelib/generators/xcode/pbxcontainer.cpp | 60 ++ + src/lib/corelib/generators/xcode/pbxcontainer.h | 59 ++ + .../generators/xcode/pbxcontaineritemproxy.cpp | 113 ++++ + .../generators/xcode/pbxcontaineritemproxy.h | 65 +++ + src/lib/corelib/generators/xcode/pbxfileencoding.h | 57 ++ + .../corelib/generators/xcode/pbxfilereference.cpp | 66 +++ + .../corelib/generators/xcode/pbxfilereference.h | 52 ++ + src/lib/corelib/generators/xcode/pbxfiletype.cpp | 51 ++ + src/lib/corelib/generators/xcode/pbxfiletype.h | 47 ++ + .../generators/xcode/pbxframeworksbuildphase.cpp | 27 + + .../generators/xcode/pbxframeworksbuildphase.h | 50 ++ + src/lib/corelib/generators/xcode/pbxgroup.cpp | 119 ++++ + src/lib/corelib/generators/xcode/pbxgroup.h | 71 +++ + .../corelib/generators/xcode/pbxlegacytarget.cpp | 111 ++++ + src/lib/corelib/generators/xcode/pbxlegacytarget.h | 65 +++ + .../corelib/generators/xcode/pbxnativetarget.cpp | 68 +++ + src/lib/corelib/generators/xcode/pbxnativetarget.h | 53 ++ + src/lib/corelib/generators/xcode/pbxobject.cpp | 96 +++ + src/lib/corelib/generators/xcode/pbxobject.h | 124 ++++ + .../corelib/generators/xcode/pbxproducttype.cpp | 75 +++ + src/lib/corelib/generators/xcode/pbxproducttype.h | 53 ++ + src/lib/corelib/generators/xcode/pbxproject.cpp | 333 +++++++++++ + src/lib/corelib/generators/xcode/pbxproject.h | 114 ++++ + src/lib/corelib/generators/xcode/pbxreference.cpp | 127 ++++ + src/lib/corelib/generators/xcode/pbxreference.h | 72 +++ + .../generators/xcode/pbxsourcesbuildphase.cpp | 57 ++ + .../generators/xcode/pbxsourcesbuildphase.h | 53 ++ + src/lib/corelib/generators/xcode/pbxsourcetree.cpp | 50 ++ + src/lib/corelib/generators/xcode/pbxsourcetree.h | 52 ++ + src/lib/corelib/generators/xcode/pbxtarget.cpp | 192 ++++++ + src/lib/corelib/generators/xcode/pbxtarget.h | 100 ++++ + .../generators/xcode/pbxtargetdependency.cpp | 99 ++++ + .../corelib/generators/xcode/pbxtargetdependency.h | 65 +++ + .../generators/xcode/xcbuildconfiguration.cpp | 92 +++ + .../generators/xcode/xcbuildconfiguration.h | 69 +++ + .../generators/xcode/xcconfigurationlist.cpp | 147 +++++ + .../corelib/generators/xcode/xcconfigurationlist.h | 67 +++ + src/lib/corelib/generators/xcode/xcode.pri | 59 ++ + .../generators/xcode/xcodebuildsettingmapping.cpp | 366 ++++++++++++ + .../generators/xcode/xcodebuildsettingmapping.h | 96 +++ + .../corelib/generators/xcode/xcodegenerator.cpp | 643 +++++++++++++++++++++ + src/lib/corelib/generators/xcode/xcodegenerator.h | 81 +++ + .../generators/xcode/xcodenativegenerator.cpp | 58 ++ + .../generators/xcode/xcodenativegenerator.h | 52 ++ + .../generators/xcode/xcodesimplegenerator.cpp | 58 ++ + .../generators/xcode/xcodesimplegenerator.h | 52 ++ + src/lib/corelib/generators/xcode/xcscheme.cpp | 179 ++++++ + src/lib/corelib/generators/xcode/xcscheme.h | 69 +++ + src/lib/corelib/generators/xcode/xcsettings.cpp | 95 +++ + src/lib/corelib/generators/xcode/xcsettings.h | 54 ++ + src/lib/corelib/tools/projectgeneratormanager.cpp | 5 + + 60 files changed, 5859 insertions(+) + create mode 100644 src/lib/corelib/generators/xcode/opensteppropertylist.cpp + create mode 100644 src/lib/corelib/generators/xcode/opensteppropertylist.h + create mode 100644 src/lib/corelib/generators/xcode/pbx.h + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildfile.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildfile.h + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxcontainer.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxcontainer.h + create mode 100644 src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfileencoding.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfilereference.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxfilereference.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfiletype.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxfiletype.h + create mode 100644 src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxgroup.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxgroup.h + create mode 100644 src/lib/corelib/generators/xcode/pbxlegacytarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxlegacytarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxnativetarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxnativetarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxobject.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxobject.h + create mode 100644 src/lib/corelib/generators/xcode/pbxproducttype.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxproducttype.h + create mode 100644 src/lib/corelib/generators/xcode/pbxproject.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxproject.h + create mode 100644 src/lib/corelib/generators/xcode/pbxreference.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxreference.h + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcetree.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcetree.h + create mode 100644 src/lib/corelib/generators/xcode/pbxtarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxtarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxtargetdependency.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxtargetdependency.h + create mode 100644 src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcbuildconfiguration.h + create mode 100644 src/lib/corelib/generators/xcode/xcconfigurationlist.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcconfigurationlist.h + create mode 100644 src/lib/corelib/generators/xcode/xcode.pri + create mode 100644 src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h + create mode 100644 src/lib/corelib/generators/xcode/xcodegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcodenativegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodenativegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodesimplegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcscheme.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcscheme.h + create mode 100644 src/lib/corelib/generators/xcode/xcsettings.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcsettings.h -diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp -index 5ecd22f..039b2a7 100644 ---- a/src/app/qbs/commandlinefrontend.cpp -+++ b/src/app/qbs/commandlinefrontend.cpp -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -326,6 +327,9 @@ void CommandLineFrontend::handleProjectsResolved() - if (m_cancelStatus != CancelStatusNone) - throw ErrorInfo(Tr::tr("Execution canceled.")); - switch (m_parser.command()) { -+ case GenerateCommandType: -+ generate(); -+ break; - case ResolveCommandType: - qApp->quit(); - break; -@@ -445,6 +449,29 @@ void CommandLineFrontend::build() - m_currentBuildEffort = 0; - } - -+void CommandLineFrontend::generate() -+{ -+ const QString generatorName = m_parser.generateOptions().generatorName(); -+ if (generatorName.isEmpty()) { -+ throw ErrorInfo(Tr::tr("Invalid use of command '%1': No generator given.\nUsage: %2") -+ .arg(m_parser.commandName(), m_parser.commandDescription())); -+ } -+ -+ Q_ASSERT(m_projects.count() == 1); -+ const Project project = m_projects.first(); -+ if (Generator *generator = GeneratorPluginManager::generatorWithName(generatorName)) -+ { -+ generator->generate(project); -+ delete generator; -+ } -+ else -+ { -+ throw ErrorInfo(Tr::tr("No generator named '%1'").arg(generatorName)); -+ } -+ -+ qApp->quit(); -+} -+ - int CommandLineFrontend::runTarget() - { - try { -diff --git a/src/app/qbs/commandlinefrontend.h b/src/app/qbs/commandlinefrontend.h -index 75091aa..2276d3e 100644 ---- a/src/app/qbs/commandlinefrontend.h -+++ b/src/app/qbs/commandlinefrontend.h -@@ -79,6 +79,7 @@ private: - void makeClean(); - int runShell(); - void build(); -+ void generate(); - int runTarget(); - void updateTimestamps(); - void connectBuildJobs(); -diff --git a/src/app/qbs/parser/command.cpp b/src/app/qbs/parser/command.cpp -index 8bbbc7d..2283aef 100644 ---- a/src/app/qbs/parser/command.cpp -+++ b/src/app/qbs/parser/command.cpp -@@ -187,6 +187,41 @@ QList ResolveCommand::supportedOptions() const - return resolveOptions(); - } - -+QString GenerateCommand::shortDescription() const -+{ -+ return Tr::tr("Generate files for a different build system."); -+} -+ -+QString GenerateCommand::longDescription() const -+{ -+ QString description = Tr::tr("qbs %1 [options] [[variant] [property:value] ...] ...\n") -+ .arg(representation()); -+ description += Tr::tr("Generates project files to build the project using a different build system."); -+ return description += supportedOptionsDescription(); -+} -+ -+QString GenerateCommand::representation() const -+{ -+ return QLatin1String("generate"); -+} -+ -+static QList generateOptions() -+{ -+ return QList() -+ << CommandLineOption::FileOptionType -+ << CommandLineOption::LogLevelOptionType -+ << CommandLineOption::VerboseOptionType -+ << CommandLineOption::QuietOptionType -+ << CommandLineOption::ShowProgressOptionType -+ << CommandLineOption::LogTimeOptionType -+ << CommandLineOption::GeneratorOptionType; -+} -+ -+QList GenerateCommand::supportedOptions() const -+{ -+ return generateOptions(); -+} -+ - QString BuildCommand::shortDescription() const - { - return Tr::tr("Build (parts of) a project. This is the default command."); -diff --git a/src/app/qbs/parser/command.h b/src/app/qbs/parser/command.h -index b0439f9..935fc23 100644 ---- a/src/app/qbs/parser/command.h -+++ b/src/app/qbs/parser/command.h -@@ -80,6 +80,19 @@ private: - QList supportedOptions() const; - }; - -+class GenerateCommand : public Command -+{ -+public: -+ GenerateCommand(CommandLineOptionPool &optionPool) : Command(optionPool) {} -+ -+private: -+ CommandType type() const { return GenerateCommandType; } -+ QString shortDescription() const; -+ QString longDescription() const; -+ QString representation() const; -+ QList supportedOptions() const; -+}; -+ - class BuildCommand : public Command - { - public: -diff --git a/src/app/qbs/parser/commandlineoption.cpp b/src/app/qbs/parser/commandlineoption.cpp -index 8b15b5e..3d7dc0d 100644 ---- a/src/app/qbs/parser/commandlineoption.cpp -+++ b/src/app/qbs/parser/commandlineoption.cpp -@@ -114,6 +114,29 @@ void BuildDirectoryOption::doParse(const QString &representation, QStringList &i - m_projectBuildDirectory = getArgument(representation, input); - } - -+QString GeneratorOption::description(CommandType command) const -+{ -+ Q_UNUSED(command); -+ return Tr::tr("%1|%2 \n" -+ "\tUse the given build system generator.\n") -+ .arg(longRepresentation(), shortRepresentation()); -+} -+ -+QString GeneratorOption::shortRepresentation() const -+{ -+ return QLatin1String("-g"); -+} -+ -+QString GeneratorOption::longRepresentation() const -+{ -+ return QLatin1String("--generator"); -+} -+ -+void GeneratorOption::doParse(const QString &representation, QStringList &input) -+{ -+ m_generatorName = getArgument(representation, input); -+} -+ - static QString loglevelLongRepresentation() { return QLatin1String("--log-level"); } - - QString VerboseOption::description(CommandType command) const -diff --git a/src/app/qbs/parser/commandlineoption.h b/src/app/qbs/parser/commandlineoption.h -index bf31772..fa7b154 100644 ---- a/src/app/qbs/parser/commandlineoption.h -+++ b/src/app/qbs/parser/commandlineoption.h -@@ -53,7 +53,8 @@ public: - ForceOptionType, - ForceTimestampCheckOptionType, - LogTimeOptionType, -- SettingsDirOptionType -+ SettingsDirOptionType, -+ GeneratorOptionType - }; - - virtual ~CommandLineOption(); -@@ -105,6 +106,21 @@ private: - QString m_projectBuildDirectory; - }; - -+class GeneratorOption : public CommandLineOption -+{ -+public: -+ QString generatorName() const { return m_generatorName; } -+ -+private: -+ QString description(CommandType command) const; -+ QString shortRepresentation() const; -+ QString longRepresentation() const; -+ void doParse(const QString &representation, QStringList &input); -+ -+private: -+ QString m_generatorName; -+}; -+ - class CountingOption : public CommandLineOption - { - public: -diff --git a/src/app/qbs/parser/commandlineoptionpool.cpp b/src/app/qbs/parser/commandlineoptionpool.cpp -index a6f2c26..fcca96b 100644 ---- a/src/app/qbs/parser/commandlineoptionpool.cpp -+++ b/src/app/qbs/parser/commandlineoptionpool.cpp -@@ -97,6 +97,9 @@ CommandLineOption *CommandLineOptionPool::getOption(CommandLineOption::Type type - case CommandLineOption::SettingsDirOptionType: - option = new SettingsDirOption; - break; -+ case CommandLineOption::GeneratorOptionType: -+ option = new GeneratorOption; -+ break; - default: - qFatal("Unknown option type %d", type); - } -@@ -200,4 +203,9 @@ SettingsDirOption *CommandLineOptionPool::settingsDirOption() const - return static_cast(getOption(CommandLineOption::SettingsDirOptionType)); - } - -+GeneratorOption *CommandLineOptionPool::generatorOption() const -+{ -+ return static_cast(getOption(CommandLineOption::GeneratorOptionType)); -+} -+ - } // namespace qbs -diff --git a/src/app/qbs/parser/commandlineoptionpool.h b/src/app/qbs/parser/commandlineoptionpool.h -index 0fc73a6..1186406 100644 ---- a/src/app/qbs/parser/commandlineoptionpool.h -+++ b/src/app/qbs/parser/commandlineoptionpool.h -@@ -60,6 +60,7 @@ public: - ForceTimeStampCheckOption *forceTimestampCheckOption() const; - LogTimeOption *logTimeOption() const; - SettingsDirOption *settingsDirOption() const; -+ GeneratorOption *generatorOption() const; - - private: - mutable QHash m_options; -diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp -index 64284c4..4ff3892 100644 ---- a/src/app/qbs/parser/commandlineparser.cpp -+++ b/src/app/qbs/parser/commandlineparser.cpp -@@ -40,6 +40,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -156,6 +157,14 @@ CleanOptions CommandLineParser::cleanOptions() const - return options; - } - -+GenerateOptions CommandLineParser::generateOptions() const -+{ -+ Q_ASSERT(command() == GenerateCommandType); -+ GenerateOptions options; -+ options.setGeneratorName(d->optionPool.generatorOption()->generatorName()); -+ return options; -+} -+ - InstallOptions CommandLineParser::installOptions() const - { - Q_ASSERT(command() == InstallCommandType || command() == RunCommandType); -@@ -359,6 +368,7 @@ Command *CommandLineParser::CommandLineParserPrivate::commandFromString(const QS - QList CommandLineParser::CommandLineParserPrivate::allCommands() const - { - return QList() -+ << commandPool.getCommand(GenerateCommandType) - << commandPool.getCommand(ResolveCommandType) - << commandPool.getCommand(BuildCommandType) - << commandPool.getCommand(CleanCommandType) -diff --git a/src/app/qbs/parser/commandlineparser.h b/src/app/qbs/parser/commandlineparser.h -index 4301a29..f736e25 100644 ---- a/src/app/qbs/parser/commandlineparser.h -+++ b/src/app/qbs/parser/commandlineparser.h -@@ -37,6 +37,7 @@ - namespace qbs { - class BuildOptions; - class CleanOptions; -+class GenerateOptions; - class InstallOptions; - class Settings; - -@@ -57,6 +58,7 @@ public: - QString projectBuildDirectory() const; - BuildOptions buildOptions() const; - CleanOptions cleanOptions() const; -+ GenerateOptions generateOptions() const; - InstallOptions installOptions() const; - bool force() const; - bool forceTimestampCheck() const; -diff --git a/src/app/qbs/parser/commandpool.cpp b/src/app/qbs/parser/commandpool.cpp -index 6da872d..cdfd180 100644 ---- a/src/app/qbs/parser/commandpool.cpp -+++ b/src/app/qbs/parser/commandpool.cpp -@@ -49,6 +49,9 @@ qbs::Command *CommandPool::getCommand(CommandType type) const - case ResolveCommandType: - command = new ResolveCommand(m_optionPool); - break; -+ case GenerateCommandType: -+ command = new GenerateCommand(m_optionPool); -+ break; - case BuildCommandType: - command = new BuildCommand(m_optionPool); - break; -diff --git a/src/app/qbs/parser/commandtype.h b/src/app/qbs/parser/commandtype.h -index b6b7592..149b2c6 100644 ---- a/src/app/qbs/parser/commandtype.h -+++ b/src/app/qbs/parser/commandtype.h -@@ -34,7 +34,7 @@ namespace qbs { - enum CommandType { - ResolveCommandType, BuildCommandType, CleanCommandType, RunCommandType, ShellCommandType, - StatusCommandType, UpdateTimestampsCommandType, -- InstallCommandType, HelpCommandType -+ InstallCommandType, HelpCommandType, GenerateCommandType - }; - - } // namespace qbs -diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri -index 2bd59b5..9b2fb38 100644 ---- a/src/lib/corelib/api/api.pri -+++ b/src/lib/corelib/api/api.pri -@@ -1,5 +1,6 @@ - HEADERS += \ - $$PWD/internaljobs.h \ -+ $$PWD/generator.h \ - $$PWD/projectdata.h \ - $$PWD/runenvironment.h \ - $$PWD/jobs.h \ -@@ -11,6 +12,7 @@ HEADERS += \ - - SOURCES += \ - $$PWD/internaljobs.cpp \ -+ $$PWD/generator.cpp \ - $$PWD/runenvironment.cpp \ - $$PWD/projectdata.cpp \ - $$PWD/jobs.cpp \ -diff --git a/src/lib/corelib/api/generator.cpp b/src/lib/corelib/api/generator.cpp -new file mode 100644 -index 0000000..3274b3b ---- /dev/null -+++ b/src/lib/corelib/api/generator.cpp -@@ -0,0 +1,50 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+#include "generator.h" -+ -+#include -+ -+namespace qbs { -+ -+/*! -+ * \class Generator -+ * \brief The \c Generator class is an abstract base class for generators which generate arbitrary -+ * output given a resolved Qbs project. -+ */ -+ -+Generator::Generator() -+{ -+} -+ -+Generator::~Generator() -+{ -+} -+ -+} // namespace qbs -diff --git a/src/lib/corelib/api/generator.h b/src/lib/corelib/api/generator.h -new file mode 100644 -index 0000000..7f8ba97 ---- /dev/null -+++ b/src/lib/corelib/api/generator.h -@@ -0,0 +1,61 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+#ifndef QBS_GENERATOR_H -+#define QBS_GENERATOR_H -+ -+#include "../language/forward_decls.h" -+#include "../tools/qbs_export.h" -+ -+namespace qbs { -+ -+#include -+ -+class Project; -+ -+class QBS_EXPORT Generator -+{ -+protected: -+ Generator(); -+ -+public: -+ virtual ~Generator(); -+ -+ /*! -+ * Returns the name of the generator used to create the external build system files. -+ * The default is empty. -+ */ -+ virtual QString generatorName() const = 0; -+ -+ virtual void generate(const Project &project) = 0; -+}; -+ -+} // namespace qbs -+ -+#endif // QBS_GENERATOR_H -diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp -index 0bf6a9f..a9102f1 100644 ---- a/src/lib/corelib/api/project.cpp -+++ b/src/lib/corelib/api/project.cpp -@@ -54,6 +54,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -90,6 +91,7 @@ static void loadPlugins(const QStringList &_pluginPaths, const Logger &logger) - pluginPaths << pluginPath; - } +diff --git a/src/lib/corelib/corelib.qbs b/src/lib/corelib/corelib.qbs +index a5fb92a..e6cd421 100644 +--- a/src/lib/corelib/corelib.qbs ++++ b/src/lib/corelib/corelib.qbs +@@ -156,6 +156,68 @@ QbsLibrary { + files: "buildgraph/forward_decls.h" } -+ GeneratorPluginManager::instance()->loadPlugins(pluginPaths, logger); - ScannerPluginManager::instance()->loadPlugins(pluginPaths, logger); - - qRegisterMetaType("qbs::ErrorInfo"); -diff --git a/src/lib/corelib/qbs.h b/src/lib/corelib/qbs.h -index 6749fdb..7d1d238 100644 ---- a/src/lib/corelib/qbs.h -+++ b/src/lib/corelib/qbs.h -@@ -29,6 +29,7 @@ - #ifndef QBS_H - #define QBS_H - -+#include "api/generator.h" - #include "api/jobs.h" - #include "api/languageinfo.h" - #include "api/project.h" -@@ -37,6 +38,7 @@ - #include "tools/buildoptions.h" - #include "tools/cleanoptions.h" - #include "tools/error.h" -+#include "tools/generateoptions.h" - #include "tools/installoptions.h" - #include "tools/preferences.h" - #include "tools/profile.h" -diff --git a/src/lib/corelib/tools/generateoptions.cpp b/src/lib/corelib/tools/generateoptions.cpp -new file mode 100644 -index 0000000..1198cb4 ---- /dev/null -+++ b/src/lib/corelib/tools/generateoptions.cpp -@@ -0,0 +1,91 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+#include "generateoptions.h" -+ -+#include -+#include -+ -+namespace qbs { -+namespace Internal { -+ -+class GenerateOptionsPrivate : public QSharedData -+{ -+public: -+ GenerateOptionsPrivate() -+ : generatorName() -+ {} -+ -+ QString generatorName; -+}; -+ -+} // namespace Internal -+ -+/*! -+ * \class GenerateOptions -+ * \brief The \c GenerateOptions class comprises parameters that influence the behavior of -+ * generate operations. -+ */ -+ -+GenerateOptions::GenerateOptions() : d(new Internal::GenerateOptionsPrivate) -+{ -+} -+ -+GenerateOptions::GenerateOptions(const GenerateOptions &other) : d(other.d) -+{ -+} -+ -+GenerateOptions &GenerateOptions::operator=(const GenerateOptions &other) -+{ -+ d = other.d; -+ return *this; -+} -+ -+GenerateOptions::~GenerateOptions() -+{ -+} -+ -+/*! -+ * Returns the name of the generator used to create the external build system files. -+ * The default is empty. -+ */ -+QString GenerateOptions::generatorName() const -+{ -+ return d->generatorName; -+} -+ -+/*! -+ * \brief Sets the name of the generator used to create the external build system files. -+ */ -+void GenerateOptions::setGeneratorName(const QString &generatorName) -+{ -+ d->generatorName = generatorName; -+} -+ -+} // namespace qbs -diff --git a/src/lib/corelib/tools/generateoptions.h b/src/lib/corelib/tools/generateoptions.h -new file mode 100644 -index 0000000..bb5c1c4 ---- /dev/null -+++ b/src/lib/corelib/tools/generateoptions.h -@@ -0,0 +1,58 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+#ifndef QBS_GENERATEOPTIONS_H -+#define QBS_GENERATEOPTIONS_H -+ -+#include "qbs_export.h" -+ -+#include -+#include -+ -+namespace qbs { -+namespace Internal { class GenerateOptionsPrivate; } -+ -+class QBS_EXPORT GenerateOptions -+{ -+public: -+ GenerateOptions(); -+ GenerateOptions(const GenerateOptions &other); -+ GenerateOptions &operator=(const GenerateOptions &other); -+ ~GenerateOptions(); -+ -+ QString generatorName() const; -+ void setGeneratorName(const QString &generatorName); -+ -+private: -+ QSharedDataPointer d; -+}; -+ -+} // namespace qbs -+ -+#endif // QBS_GENERATEOPTIONS_H -diff --git a/src/lib/corelib/tools/generatorpluginmanager.cpp b/src/lib/corelib/tools/generatorpluginmanager.cpp -new file mode 100644 -index 0000000..5ac94fd ---- /dev/null -+++ b/src/lib/corelib/tools/generatorpluginmanager.cpp -@@ -0,0 +1,128 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+ -+#include "generatorpluginmanager.h" -+ -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+ -+namespace qbs { -+namespace Internal { -+ -+GeneratorPluginManager::~GeneratorPluginManager() -+{ -+ foreach (QLibrary * const lib, m_libs) { -+ lib->unload(); -+ delete lib; + Group { ++ name: "Xcode generator" ++ prefix: "generators/xcode/" ++ files: [ ++ "opensteppropertylist.cpp", ++ "opensteppropertylist.h", ++ "pbx.h", ++ "pbxbuildfile.cpp", ++ "pbxbuildfile.h", ++ "pbxbuildphase.cpp", ++ "pbxbuildphase.h", ++ "pbxcontainer.cpp", ++ "pbxcontainer.h", ++ "pbxcontaineritemproxy.cpp", ++ "pbxcontaineritemproxy.h", ++ "pbxfileencoding.h", ++ "pbxfilereference.cpp", ++ "pbxfilereference.h", ++ "pbxfiletype.cpp", ++ "pbxfiletype.h", ++ "pbxframeworksbuildphase.cpp", ++ "pbxframeworksbuildphase.h", ++ "pbxgroup.cpp", ++ "pbxgroup.h", ++ "pbxlegacytarget.cpp", ++ "pbxlegacytarget.h", ++ "pbxnativetarget.cpp", ++ "pbxnativetarget.h", ++ "pbxobject.cpp", ++ "pbxobject.h", ++ "pbxproducttype.cpp", ++ "pbxproducttype.h", ++ "pbxproject.cpp", ++ "pbxproject.h", ++ "pbxreference.cpp", ++ "pbxreference.h", ++ "pbxsourcesbuildphase.cpp", ++ "pbxsourcesbuildphase.h", ++ "pbxsourcetree.cpp", ++ "pbxsourcetree.h", ++ "pbxtarget.cpp", ++ "pbxtarget.h", ++ "pbxtargetdependency.cpp", ++ "pbxtargetdependency.h", ++ "xcbuildconfiguration.cpp", ++ "xcbuildconfiguration.h", ++ "xcconfigurationlist.cpp", ++ "xcconfigurationlist.h", ++ "xcodegenerator.cpp", ++ "xcodegenerator.h", ++ "xcodenativegenerator.cpp", ++ "xcodenativegenerator.h", ++ "xcodesimplegenerator.cpp", ++ "xcodesimplegenerator.h", ++ "xcscheme.cpp", ++ "xcscheme.h", ++ "xcsettings.cpp", ++ "xcsettings.h", ++ "xcodebuildsettingmapping.cpp", ++ "xcodebuildsettingmapping.h" ++ ] + } -+} ++ Group { + name: "jsextensions" + prefix: name + '/' + files: [ +diff --git a/src/lib/corelib/generators/generators.pri b/src/lib/corelib/generators/generators.pri +index 6372e81..2fa095e 100644 +--- a/src/lib/corelib/generators/generators.pri ++++ b/src/lib/corelib/generators/generators.pri +@@ -1,2 +1,4 @@ + HEADERS += \ + $$PWD/generator.h + -+GeneratorPluginManager *GeneratorPluginManager::instance() -+{ -+ static GeneratorPluginManager generatorPlugin; -+ return &generatorPlugin; -+} -+ -+GeneratorPluginManager::GeneratorPluginManager() -+{ -+} -+ -+QStringList GeneratorPluginManager::loadedPluginNames() -+{ -+ return instance()->m_generators.keys(); -+} -+ -+Generator *GeneratorPluginManager::generatorWithName(const QString &generatorName) -+{ -+ return instance()->m_generators.value(generatorName); -+} -+ -+void GeneratorPluginManager::loadPlugins(const QStringList &pluginPaths, const Logger &logger) -+{ -+ QStringList filters; -+ -+ if (HostOsInfo::isWindowsHost()) -+ filters << "*.dll"; -+ else if (HostOsInfo::isOsxHost()) -+ filters << "*.dylib"; -+ else -+ filters << "*.so"; -+ -+ foreach (const QString &pluginPath, pluginPaths) { -+ logger.qbsTrace() << QString::fromLocal8Bit("pluginmanager: loading plugins from '%1'.") -+ .arg(QDir::toNativeSeparators(pluginPath)); -+ QDirIterator it(pluginPath, filters, QDir::Files); -+ while (it.hasNext()) { -+ const QString fileName = it.next(); -+ if (!fileName.contains(QLatin1String("_generator"))) -+ continue; -+ -+ QScopedPointer lib(new QLibrary(fileName)); -+ if (!lib->load()) { -+ logger.qbsWarning() << Tr::tr("pluginmanager: couldn't load plugin '%1': %2") -+ .arg(QDir::toNativeSeparators(fileName), lib->errorString()); -+ continue; -+ } -+ -+ getGenerators_f getGenerators = reinterpret_cast(lib->resolve("getGenerators")); -+ if (!getGenerators) { -+ logger.qbsWarning() << Tr::tr("pluginmanager: couldn't resolve " -+ "symbol in '%1'.").arg(QDir::toNativeSeparators(fileName)); -+ continue; -+ } -+ -+ Generator **plugins = getGenerators(); -+ if (plugins == 0) { -+ logger.qbsWarning() << Tr::tr("pluginmanager: no generators " -+ "returned from '%1'.").arg(QDir::toNativeSeparators(fileName)); -+ continue; -+ } -+ -+ logger.qbsTrace() << QString::fromLocal8Bit("pluginmanager: scanner plugin '%1' " -+ "loaded.").arg(QDir::toNativeSeparators(fileName)); -+ -+ for (int i = 0; plugins[i] != 0; ++i) -+ m_generators[plugins[i]->generatorName()] = plugins[i]; -+ m_libs.append(lib.take()); -+ } -+ } -+} -+ -+} // namespace Internal -+} // namespace qbs -diff --git a/src/lib/corelib/tools/generatorpluginmanager.h b/src/lib/corelib/tools/generatorpluginmanager.h ++include(xcode/xcode.pri) +diff --git a/src/lib/corelib/generators/xcode/opensteppropertylist.cpp b/src/lib/corelib/generators/xcode/opensteppropertylist.cpp new file mode 100644 -index 0000000..4f6351b +index 0000000..63adee2 --- /dev/null -+++ b/src/lib/corelib/tools/generatorpluginmanager.h -@@ -0,0 +1,69 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+ -+#ifndef QBS_GENERATORPLUGINMANAGER_H -+#define QBS_GENERATORPLUGINMANAGER_H -+ -+#include -+ -+#include -+#include -+#include -+ -+QT_BEGIN_NAMESPACE -+class QLibrary; -+QT_END_NAMESPACE -+ -+namespace qbs { -+class Generator; -+namespace Internal { -+class Logger; -+ -+class QBS_EXPORT GeneratorPluginManager -+{ -+public: -+ ~GeneratorPluginManager(); -+ static GeneratorPluginManager *instance(); -+ static QStringList loadedPluginNames(); -+ static Generator *generatorWithName(const QString &generatorName); -+ void loadPlugins(const QStringList &paths, const Logger &logger); -+ -+private: -+ GeneratorPluginManager(); -+ -+private: -+ QList m_libs; -+ QHash m_generators; -+}; -+ -+} // namespace Internal -+} // namespace qbs -+ -+#endif -diff --git a/src/lib/corelib/tools/scannerpluginmanager.cpp b/src/lib/corelib/tools/scannerpluginmanager.cpp -index 8bf43d2..fd23faa 100644 ---- a/src/lib/corelib/tools/scannerpluginmanager.cpp -+++ b/src/lib/corelib/tools/scannerpluginmanager.cpp -@@ -80,6 +80,9 @@ void ScannerPluginManager::loadPlugins(const QStringList &pluginPaths, const Log - QDirIterator it(pluginPath, filters, QDir::Files); - while (it.hasNext()) { - const QString fileName = it.next(); -+ if (!fileName.contains(QLatin1String("_scanner"))) -+ continue; -+ - QScopedPointer lib(new QLibrary(fileName)); - if (!lib->load()) { - logger.qbsWarning() << Tr::tr("Pluginmanager: Cannot load plugin '%1': %2") -diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 0dfe50f..85175b3 100644 ---- a/src/lib/corelib/tools/tools.pri -+++ b/src/lib/corelib/tools/tools.pri -@@ -6,6 +6,8 @@ HEADERS += \ - $$PWD/error.h \ - $$PWD/fileinfo.h \ - $$PWD/filetime.h \ -+ $$PWD/generateoptions.h \ -+ $$PWD/generatorpluginmanager.h \ - $$PWD/id.h \ - $$PWD/persistence.h \ - $$PWD/scannerpluginmanager.h \ -@@ -35,6 +37,8 @@ SOURCES += \ - $$PWD/codelocation.cpp \ - $$PWD/error.cpp \ - $$PWD/fileinfo.cpp \ -+ $$PWD/generateoptions.cpp \ -+ $$PWD/generatorpluginmanager.cpp \ - $$PWD/id.cpp \ - $$PWD/persistence.cpp \ - $$PWD/scannerpluginmanager.cpp \ -diff --git a/src/plugins/generator/generator.pro b/src/plugins/generator/generator.pro -new file mode 100644 -index 0000000..6531408 ---- /dev/null -+++ b/src/plugins/generator/generator.pro -@@ -0,0 +1,2 @@ -+TEMPLATE = subdirs -+SUBDIRS = xcode -diff --git a/src/plugins/generator/generatorplugin.h b/src/plugins/generator/generatorplugin.h -new file mode 100644 -index 0000000..e456ff4 ---- /dev/null -+++ b/src/plugins/generator/generatorplugin.h -@@ -0,0 +1,46 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+ -+#ifndef GENERATORPLUGIN_H -+#define GENERATORPLUGIN_H -+ -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+typedef qbs::Generator **(*getGenerators_f)(); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif // GENERATORPLUGIN_H -diff --git a/src/plugins/generator/xcode/main.cpp b/src/plugins/generator/xcode/main.cpp -new file mode 100644 -index 0000000..86a97f2 ---- /dev/null -+++ b/src/plugins/generator/xcode/main.cpp -@@ -0,0 +1,45 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. -+** Contact: http://www.qt-project.org/legal -+** -+** This file is part of the Qt Build Suite. -+** -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and Digia. For licensing terms and -+** conditions see http://qt.digia.com/licensing. For further information -+** use the contact form at http://qt.digia.com/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Digia gives you certain additional -+** rights. These rights are described in the Digia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+****************************************************************************/ -+ -+#include "xcodenativegenerator.h" -+#include "xcodesimplegenerator.h" -+ -+static qbs::Generator* generators[] = { -+ new qbs::XcodeNativeGenerator(), -+ new qbs::XcodeSimpleGenerator(), -+ NULL -+}; -+ -+extern "C" { -+ qbs::Generator **getGenerators() -+ { -+ return generators; -+ } -+} -diff --git a/src/plugins/generator/xcode/opensteppropertylist.cpp b/src/plugins/generator/xcode/opensteppropertylist.cpp -new file mode 100644 -index 0000000..b10bceb ---- /dev/null -+++ b/src/plugins/generator/xcode/opensteppropertylist.cpp -@@ -0,0 +1,186 @@ ++++ b/src/lib/corelib/generators/xcode/opensteppropertylist.cpp +@@ -0,0 +1,257 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). @@ -1193,6 +244,9 @@ index 0000000..b10bceb +****************************************************************************/ + +#include "opensteppropertylist.h" ++#include "pbxobject.h" ++#include ++#include + +const QChar OpenStepPropertyList::NewlineToken = QLatin1Char('\n'); +const QChar OpenStepPropertyList::DictionaryBeginToken = QLatin1Char('{'); @@ -1207,6 +261,8 @@ index 0000000..b10bceb +const QChar OpenStepPropertyList::DataEndToken = QLatin1Char('>'); +const QChar OpenStepPropertyList::IndentationToken = QLatin1Char('\t'); + ++#define isValidUnquotedStringCharacter(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || ((x) >= '0' && (x) <= '9') || (x) == '_' || (x) == '$' || (x) == '/' || (x) == ':' || (x) == '.' ) ++ +static QString formatString(const QString &string) +{ + bool isQuoted = string.isEmpty(); @@ -1214,7 +270,7 @@ index 0000000..b10bceb + { + for (int i = 0; i < string.size(); ++i) + { -+ if (!string[i].isLetterOrNumber() || string[i] > 127) ++ if (!isValidUnquotedStringCharacter(string[i])) + { + isQuoted = true; + break; @@ -1223,6 +279,7 @@ index 0000000..b10bceb + } + + QString outString = string; ++ outString.replace(QLatin1String("\\"), QLatin1String("\\\\")); + outString.replace(QLatin1String("\""), QLatin1String("\\\"")); + + if (isQuoted) @@ -1235,41 +292,90 @@ index 0000000..b10bceb + +QString OpenStepPropertyList::toString(const QVariantMap &propertyList) +{ ++ PBXObjectMap newMap; ++ Q_FOREACH (const QString &key, propertyList.keys()) { ++ newMap.insert(key, propertyList[key]); ++ } ++ return toString(newMap); ++} ++ ++QString OpenStepPropertyList::toString(const PBXObjectMap &propertyList) ++{ + return toString(propertyList, 0) + NewlineToken; +} + +QString OpenStepPropertyList::toString(const QVariantMap &propertyList, int indentationLevel) +{ ++ PBXObjectMap newMap; ++ Q_FOREACH (const QString &key, propertyList.keys()) { ++ newMap.insert(key, propertyList[key]); ++ } ++ return toString(newMap, indentationLevel); ++} ++ ++QString OpenStepPropertyList::toString(const PBXObjectMap &propertyList, int indentationLevel) ++{ + QString string(indentationLevel, IndentationToken); + string += DictionaryBeginToken; -+ string += NewlineToken; + -+ foreach (const QString &key, propertyList.keys()) ++ const bool isFlat = ++ propertyList[QLatin1String("isa")] == QLatin1String("PBXBuildFile") || ++ propertyList[QLatin1String("isa")] == QLatin1String("PBXFileReference"); ++ if (!isFlat) { ++ string += NewlineToken; ++ } ++ ++ QList keys = propertyList.keys(); ++ ++ // Push the isa property to the top of the list as it's always written first ++ const int isaIndex = keys.indexOf(QLatin1String("isa")); ++ if (isaIndex >= 0) { ++ keys.removeAt(isaIndex); ++ keys.insert(0, QLatin1String("isa")); ++ } ++ ++ QStack isas; ++ ++ foreach (const PBXObjectIdentifier &vkey, keys) + { -+ if (key == QLatin1String("__comment__")) -+ continue; ++ const QVariant &object = propertyList[vkey]; + -+ const QVariant &object = propertyList[key]; -+ string += QString(indentationLevel + 1, IndentationToken); -+ string += formatString(key); ++ if (!vkey.isa().isEmpty()) { ++ if (!isas.empty() && vkey.isa() != isas.top()) { ++ string += QString(QLatin1String("/* End %1 section */\n")).arg(isas.top()); ++ isas.pop(); ++ } + -+ QString comment = object.toMap()[QLatin1String("__comment__")].toString(); -+ if (!comment.isEmpty()) -+ string += QLatin1String(" /* ") + comment.replace(QLatin1String("*/"), QLatin1String("* /")) + QLatin1String(" */"); ++ if (isas.empty()) { ++ isas.push(vkey.isa()); ++ string += QString(QLatin1String("\n/* Begin %1 section */\n")).arg(vkey.isa()); ++ } ++ } + ++ string += QString(!isFlat ? (indentationLevel + 1) : 0, IndentationToken); ++ string += toString(QVariant::fromValue(vkey), -1); + string += QLatin1String(" = "); + -+ if (object.type() == QVariant::Map || object.type() == QVariant::List || ++ if (object.canConvert() || object.type() == QVariant::Map || object.type() == QVariant::List || + object.type() == QVariant::StringList || object.type() == QVariant::ByteArray) -+ string += toString(object, indentationLevel + 1).trimmed(); ++ string += toString(object, !isFlat ? (indentationLevel + 1) : 0).trimmed(); + else + string += toString(object, 0); + + string += DictionarySeparatorToken; -+ string += NewlineToken; ++ string += !isFlat ? NewlineToken : QLatin1Char(' '); + } + -+ string += QString(indentationLevel, IndentationToken) + DictionaryEndToken; ++ if (!isas.empty()) { ++ string += QString(QLatin1String("/* End %1 section */\n")).arg(isas.top()); ++ isas.pop(); ++ } ++ ++ if (!isFlat) { ++ string += QString(indentationLevel, IndentationToken); ++ } ++ ++ string += DictionaryEndToken; + return string; +} + @@ -1298,10 +404,25 @@ index 0000000..b10bceb + +QString OpenStepPropertyList::toString(const QVariant &object, int indentationLevel) +{ ++ if (object.canConvert()) { ++ PBXObjectIdentifier objid = object.value(); ++ QString s = toString(objid.identifier(), indentationLevel); ++ if (!objid.comment().isEmpty()) { ++ s += QLatin1String(" /* "); ++ s += objid.comment().replace(QLatin1String("*/"), QLatin1String("* /")); ++ s += QLatin1String(" */"); ++ } ++ return s; ++ } ++ ++ if (object.canConvert()) { ++ return toString(object.value(), indentationLevel); ++ } ++ + switch (object.type()) + { + case QVariant::Bool: -+ return object.toBool() ? QLatin1String("1") : QLatin1String("0"); ++ return object.toBool() ? QLatin1String("YES") : QLatin1String("NO"); + case QVariant::ByteArray: + return toString(object.toByteArray(), indentationLevel); + case QVariant::Date: @@ -1326,7 +447,8 @@ index 0000000..b10bceb + case QVariant::ULongLong: + return QString::number(object.toULongLong()); + default: -+ throw "Unsupported property list object type"; ++ qDebug() << "Unsupported property list object type" << object; ++ abort(); + } +} + @@ -1348,12 +470,12 @@ index 0000000..b10bceb + string += formatString(object); + return string; +} -diff --git a/src/plugins/generator/xcode/opensteppropertylist.h b/src/plugins/generator/xcode/opensteppropertylist.h +diff --git a/src/lib/corelib/generators/xcode/opensteppropertylist.h b/src/lib/corelib/generators/xcode/opensteppropertylist.h new file mode 100644 -index 0000000..ed50aa3 +index 0000000..36cef73 --- /dev/null -+++ b/src/plugins/generator/xcode/opensteppropertylist.h -@@ -0,0 +1,71 @@ ++++ b/src/lib/corelib/generators/xcode/opensteppropertylist.h +@@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). @@ -1393,6 +515,9 @@ index 0000000..ed50aa3 +#include +#include + ++class PBXObjectIdentifier; ++typedef QMap PBXObjectMap; ++ +class OpenStepPropertyList +{ + Q_DISABLE_COPY(OpenStepPropertyList) @@ -1411,12 +536,14 @@ index 0000000..ed50aa3 + static const QChar IndentationToken; + + static QString toString(const QVariantMap &propertyList); ++ static QString toString(const PBXObjectMap &propertyList); + static QString toString(const QList &propertyList); + +private: + OpenStepPropertyList(); + + static QString toString(const QVariantMap &propertyList, int indentationLevel); ++ static QString toString(const PBXObjectMap &propertyList, int indentationLevel); + static QString toString(const QList &propertyList, int indentationLevel); + static QString toString(const QVariant &object, int indentationLevel); + static QString toString(const QByteArray &object, int indentationLevel); @@ -1425,16 +552,16 @@ index 0000000..ed50aa3 +}; + +#endif // OPENSTEPPROPERTYLIST_H -diff --git a/src/plugins/generator/xcode/pbx.h b/src/plugins/generator/xcode/pbx.h +diff --git a/src/lib/corelib/generators/xcode/pbx.h b/src/lib/corelib/generators/xcode/pbx.h new file mode 100644 -index 0000000..fda52e7 +index 0000000..d4cc014 --- /dev/null -+++ b/src/plugins/generator/xcode/pbx.h -@@ -0,0 +1,53 @@ ++++ b/src/lib/corelib/generators/xcode/pbx.h +@@ -0,0 +1,57 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1468,6 +595,7 @@ index 0000000..fda52e7 +#include "pbxbuildfile.h" +#include "pbxbuildphase.h" +#include "pbxcontainer.h" ++#include "pbxcontaineritemproxy.h" +#include "pbxfileencoding.h" +#include "pbxfilereference.h" +#include "pbxfiletype.h" @@ -1480,20 +608,23 @@ index 0000000..fda52e7 +#include "pbxreference.h" +#include "pbxsourcetree.h" +#include "pbxtarget.h" ++#include "pbxtargetdependency.h" +#include "xcbuildconfiguration.h" +#include "xcconfigurationlist.h" ++#include "xcscheme.h" ++#include "xcsettings.h" + +#endif // PBX_H -diff --git a/src/plugins/generator/xcode/pbxbuildfile.cpp b/src/plugins/generator/xcode/pbxbuildfile.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxbuildfile.cpp b/src/lib/corelib/generators/xcode/pbxbuildfile.cpp new file mode 100644 -index 0000000..4f49ead +index 0000000..cbe34c0 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxbuildfile.cpp -@@ -0,0 +1,72 @@ ++++ b/src/lib/corelib/generators/xcode/pbxbuildfile.cpp +@@ -0,0 +1,134 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1521,13 +652,18 @@ index 0000000..4f49ead +****************************************************************************/ + +#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" +#include "pbxfilereference.h" + ++static const QString kPBXBuildFileAttributes = QLatin1String("ATTRIBUTES"); ++static const QString kPBXBuildFileLibraryWeakLinked = QLatin1String("Weak"); ++ +class PBXBuildFilePrivate +{ +public: + PBXBuildFilePrivate(); + PBXFileReference *reference; ++ QSet attributes; +}; + +PBXBuildFilePrivate::PBXBuildFilePrivate() @@ -1535,7 +671,7 @@ index 0000000..4f49ead +{ +} + -+PBXBuildFile::PBXBuildFile(QObject *parent) : ++PBXBuildFile::PBXBuildFile(PBXBuildPhase *parent) : + PBXObject(parent), d(new PBXBuildFilePrivate) +{ +} @@ -1550,28 +686,85 @@ index 0000000..4f49ead + return QLatin1String("PBXBuildFile"); +} + -+QVariantMap PBXBuildFile::toMap() const ++PBXObjectMap PBXBuildFile::toMap() const +{ -+ QVariantMap self = PBXObject::toMap(); -+ if (d->reference) -+ self.insert(QLatin1String("fileRef"), d->reference->identifier()); ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->reference) { ++ self.insert(QLatin1String("fileRef"), QVariant::fromValue(d->reference->identifier())); ++ } ++ ++ QVariantMap settingsMap; ++ if (!d->attributes.isEmpty()) { ++ QStringList attributes = d->attributes.toList(); ++ qSort(attributes); ++ settingsMap.insert(kPBXBuildFileAttributes, attributes); ++ } ++ ++ if (!settingsMap.isEmpty()) { ++ self.insert(QLatin1String("settings"), settingsMap); ++ } ++ + return self; +} + ++PBXFileReference *PBXBuildFile::fileReference() const ++{ ++ return d->reference; ++} ++ +void PBXBuildFile::setFileReference(PBXFileReference *reference) +{ + d->reference = reference; +} -diff --git a/src/plugins/generator/xcode/pbxbuildfile.h b/src/plugins/generator/xcode/pbxbuildfile.h ++ ++QSet PBXBuildFile::attributes() const ++{ ++ return d->attributes; ++} ++ ++bool PBXBuildFile::isWeakLinkedLibrary() const ++{ ++ return d->attributes.contains(kPBXBuildFileLibraryWeakLinked); ++} ++ ++void PBXBuildFile::setWeakLinkedLibrary(bool weakLinked) ++{ ++ if (weakLinked) ++ d->attributes.insert(kPBXBuildFileLibraryWeakLinked); ++ else ++ d->attributes.remove(kPBXBuildFileLibraryWeakLinked); ++} ++ ++QString PBXBuildFile::comment() const ++{ ++ if (d->reference) { ++ PBXBuildPhase *phase = dynamic_cast(parent()); ++ Q_ASSERT(phase); ++ return QString(QLatin1String("%1 in %2")).arg(d->reference->name()).arg(phase->name()); ++ } ++ ++ return PBXObject::comment(); ++} ++ ++QByteArray PBXBuildFile::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (d->reference) { ++ data.append(d->reference->hashData()); ++ } ++ ++ return data; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxbuildfile.h b/src/lib/corelib/generators/xcode/pbxbuildfile.h new file mode 100644 -index 0000000..1bee93b +index 0000000..bc25ab8 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxbuildfile.h -@@ -0,0 +1,64 @@ ++++ b/src/lib/corelib/generators/xcode/pbxbuildfile.h +@@ -0,0 +1,74 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1603,7 +796,9 @@ index 0000000..1bee93b + +#include "pbxobject.h" +#include ++#include + ++class PBXBuildPhase; +class PBXFileReference; + +class PBXBuildFilePrivate; @@ -1616,32 +811,40 @@ index 0000000..1bee93b +{ + Q_OBJECT +public: -+ explicit PBXBuildFile(QObject *parent = 0); ++ explicit PBXBuildFile(PBXBuildPhase *parent = 0); + virtual ~PBXBuildFile(); + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXFileReference *fileReference() const; + void setFileReference(PBXFileReference *reference); + + QString absolutePath() const; -+ QStringList attributes() const; ++ QSet attributes() const; ++ ++ bool isWeakLinkedLibrary() const; ++ void setWeakLinkedLibrary(bool weakLinked); + +private: + PBXBuildFilePrivate *d; +}; + +#endif // PBXBUILDFILE_H -diff --git a/src/plugins/generator/xcode/pbxbuildphase.cpp b/src/plugins/generator/xcode/pbxbuildphase.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxbuildphase.cpp new file mode 100644 -index 0000000..d1cad2c +index 0000000..fc371aa --- /dev/null -+++ b/src/plugins/generator/xcode/pbxbuildphase.cpp -@@ -0,0 +1,77 @@ ++++ b/src/lib/corelib/generators/xcode/pbxbuildphase.cpp +@@ -0,0 +1,94 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1671,6 +874,7 @@ index 0000000..d1cad2c +#include "pbxbuildfile.h" +#include "pbxbuildphase.h" +#include "pbxfilereference.h" ++#include "pbxtarget.h" + +class PBXBuildPhasePrivate +{ @@ -1678,7 +882,7 @@ index 0000000..d1cad2c + QList buildFiles; +}; + -+PBXBuildPhase::PBXBuildPhase(QObject *parent) : ++PBXBuildPhase::PBXBuildPhase(PBXTarget *parent) : + PBXObject(parent), d(new PBXBuildPhasePrivate) +{ +} @@ -1688,14 +892,14 @@ index 0000000..d1cad2c + delete d; +} + -+QVariantMap PBXBuildPhase::toMap() const ++PBXObjectMap PBXBuildPhase::toMap() const +{ -+ QVariantMap self = PBXObject::toMap(); -+ self.insert(QLatin1String("buildActionMask"), 2147483647); ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("buildActionMask"), std::numeric_limits::max()); + -+ QStringList fileReferenceList; ++ QVariantList fileReferenceList; + foreach (PBXBuildFile *buildFile, buildFiles()) -+ fileReferenceList += buildFile->identifier(); ++ fileReferenceList += QVariant::fromValue(buildFile->identifier()); + self.insert(QLatin1String("files"), fileReferenceList); + + self.insert(QLatin1String("runOnlyForDeploymentPostprocessing"), 0); @@ -1703,28 +907,44 @@ index 0000000..d1cad2c + return self; +} + ++QByteArray PBXBuildPhase::hashData() const ++{ ++ QByteArray data; ++ PBXTarget *target = dynamic_cast(parent()); ++ if (target) { ++ data.append(target->hashData()); ++ } ++ return data; // TODO: Build phases for which a target may have multiple of, will not work ++} ++ +QList PBXBuildPhase::buildFiles() const +{ + return d->buildFiles; +} + -+bool PBXBuildPhase::addReference(PBXFileReference *reference) ++PBXBuildFile *PBXBuildPhase::addReference(PBXFileReference *reference) +{ ++ Q_FOREACH (PBXBuildFile *buildFile, d->buildFiles) { ++ if (buildFile->fileReference() == reference) { ++ return buildFile; ++ } ++ } ++ + PBXBuildFile *buildFile = new PBXBuildFile(this); + buildFile->setFileReference(reference); + d->buildFiles.append(buildFile); -+ return true; ++ return buildFile; +} -diff --git a/src/plugins/generator/xcode/pbxbuildphase.h b/src/plugins/generator/xcode/pbxbuildphase.h +diff --git a/src/lib/corelib/generators/xcode/pbxbuildphase.h b/src/lib/corelib/generators/xcode/pbxbuildphase.h new file mode 100644 -index 0000000..25ac5e2 +index 0000000..b80ec81 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxbuildphase.h -@@ -0,0 +1,60 @@ ++++ b/src/lib/corelib/generators/xcode/pbxbuildphase.h +@@ -0,0 +1,65 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1759,6 +979,7 @@ index 0000000..25ac5e2 + +class PBXBuildFile; +class PBXFileReference; ++class PBXTarget; + +class PBXBuildPhasePrivate; + @@ -1766,14 +987,18 @@ index 0000000..25ac5e2 +{ + Q_OBJECT +public: -+ explicit PBXBuildPhase(QObject *parent = 0); ++ explicit PBXBuildPhase(PBXTarget *parent = 0); + virtual ~PBXBuildPhase(); + -+ QVariantMap toMap() const; ++ virtual QString name() const = 0; ++ ++ PBXObjectMap toMap() const; ++ ++ QByteArray hashData() const; + + QList buildFiles() const; + -+ bool addReference(PBXFileReference *reference); ++ PBXBuildFile *addReference(PBXFileReference *reference); + bool containsFileReferenceIdenticalTo(PBXFileReference *reference); + +private: @@ -1781,16 +1006,16 @@ index 0000000..25ac5e2 +}; + +#endif // PBXBUILDPHASE_H -diff --git a/src/plugins/generator/xcode/pbxcontainer.cpp b/src/plugins/generator/xcode/pbxcontainer.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxcontainer.cpp b/src/lib/corelib/generators/xcode/pbxcontainer.cpp new file mode 100644 -index 0000000..10a2470 +index 0000000..6ce359a --- /dev/null -+++ b/src/plugins/generator/xcode/pbxcontainer.cpp -@@ -0,0 +1,53 @@ ++++ b/src/lib/corelib/generators/xcode/pbxcontainer.cpp +@@ -0,0 +1,60 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1836,20 +1061,27 @@ index 0000000..10a2470 + delete d; +} + ++QByteArray PBXContainer::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ data.append(d->group.hashData()); ++ return data; ++} ++ +PBXGroup *PBXContainer::rootGroup() const +{ + return &d->group; +} -diff --git a/src/plugins/generator/xcode/pbxcontainer.h b/src/plugins/generator/xcode/pbxcontainer.h +diff --git a/src/lib/corelib/generators/xcode/pbxcontainer.h b/src/lib/corelib/generators/xcode/pbxcontainer.h new file mode 100644 -index 0000000..f920f56 +index 0000000..3263149 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxcontainer.h -@@ -0,0 +1,57 @@ ++++ b/src/lib/corelib/generators/xcode/pbxcontainer.h +@@ -0,0 +1,59 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1894,6 +1126,8 @@ index 0000000..f920f56 + explicit PBXContainer(QObject *parent = 0); + virtual ~PBXContainer(); + ++ QByteArray hashData() const; ++ + PBXGroup *rootGroup() const; + + PBXFileReference *fileReferenceForPath(const QString &path); @@ -1903,16 +1137,206 @@ index 0000000..f920f56 +}; + +#endif // PBXCONTAINER_H -diff --git a/src/plugins/generator/xcode/pbxfileencoding.h b/src/plugins/generator/xcode/pbxfileencoding.h +diff --git a/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp new file mode 100644 -index 0000000..852dac5 +index 0000000..46f18dd --- /dev/null -+++ b/src/plugins/generator/xcode/pbxfileencoding.h ++++ b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp +@@ -0,0 +1,113 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontaineritemproxy.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++ ++class PBXContainerItemProxyPrivate ++{ ++public: ++ PBXProject *containerPortal; ++ PBXTarget *target; ++}; ++ ++PBXContainerItemProxy::PBXContainerItemProxy(PBXTargetDependency *parent) : ++ PBXObject(parent), d(new PBXContainerItemProxyPrivate) ++{ ++} ++ ++PBXContainerItemProxy::~PBXContainerItemProxy() ++{ ++ delete d; ++} ++ ++QString PBXContainerItemProxy::isa() const ++{ ++ return QLatin1String("PBXContainerItemProxy"); ++} ++ ++PBXObjectMap PBXContainerItemProxy::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->containerPortal) ++ self.insert(QLatin1String("containerPortal"), QVariant::fromValue(d->containerPortal->identifier())); ++ ++ self.insert(QLatin1String("proxyType"), 1); // TODO: Always the same? ++ ++ if (d->target) { ++ // We deliberately don't store the actual PBXObjectIdentifier, ++ // because Xcode itself doesn't write the ID with a comment annotation ++ self.insert(QLatin1String("remoteGlobalIDString"), d->target->identifier().identifier()); ++ self.insert(QLatin1String("remoteInfo"), d->target->name()); ++ } ++ ++ return self; ++} ++ ++QString PBXContainerItemProxy::comment() const ++{ ++ return PBXObject::comment(); ++} ++ ++QByteArray PBXContainerItemProxy::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (d->containerPortal) { ++ data.append(d->containerPortal->hashData()); ++ } ++ ++ if (d->target) { ++ data.append(d->target->hashData()); ++ } ++ ++ return data; ++} ++ ++PBXProject *PBXContainerItemProxy::containerPortal() const ++{ ++ return d->containerPortal; ++} ++ ++void PBXContainerItemProxy::setContainerPortal(PBXProject *containerPortal) ++{ ++ d->containerPortal = containerPortal; ++} ++ ++PBXTarget *PBXContainerItemProxy::target() const ++{ ++ return d->target; ++} ++ ++void PBXContainerItemProxy::setTarget(PBXTarget *target) ++{ ++ d->target = target; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h +new file mode 100644 +index 0000000..34205aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXCONTAINERITEMPROXY_H ++#define PBXCONTAINERITEMPROXY_H ++ ++#include "pbxobject.h" ++ ++class PBXContainerItemProxyPrivate; ++class PBXProject; ++class PBXTarget; ++class PBXTargetDependency; ++ ++class PBXContainerItemProxy : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXContainerItemProxy(PBXTargetDependency *parent = 0); ++ virtual ~PBXContainerItemProxy(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXProject *containerPortal() const; ++ void setContainerPortal(PBXProject *containerPortal); ++ ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++private: ++ PBXContainerItemProxyPrivate *d; ++}; ++ ++#endif // PBXCONTAINERITEMPROXY_H +diff --git a/src/lib/corelib/generators/xcode/pbxfileencoding.h b/src/lib/corelib/generators/xcode/pbxfileencoding.h +new file mode 100644 +index 0000000..50af8c5 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfileencoding.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -1966,16 +1390,16 @@ index 0000000..852dac5 +} + +#endif // PBXFILEENCODING_H -diff --git a/src/plugins/generator/xcode/pbxfilereference.cpp b/src/plugins/generator/xcode/pbxfilereference.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxfilereference.cpp b/src/lib/corelib/generators/xcode/pbxfilereference.cpp new file mode 100644 -index 0000000..68f165a +index 0000000..b5dbd94 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxfilereference.cpp -@@ -0,0 +1,73 @@ ++++ b/src/lib/corelib/generators/xcode/pbxfilereference.cpp +@@ -0,0 +1,66 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2029,32 +1453,25 @@ index 0000000..68f165a + return QLatin1String("PBXFileReference"); +} + -+QVariantMap PBXFileReference::toMap() const ++PBXObjectMap PBXFileReference::toMap() const +{ -+ QVariantMap self = PBXReference::toMap(); ++ PBXObjectMap self = PBXReference::toMap(); + self.insert(QLatin1String("fileEncoding"), PBX::Default); -+ //self.insert(QLatin1String("explicitFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).extension())); // PBXFileType ++ //self.insert(QLatin1String("explicitFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).suffix())); // PBXFileType + //self.insert(QLatin1String("includeInIndex"), 0); -+ //self.insert(QLatin1String("lastKnownFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).extension())); // PBXFileType ++ self.insert(QLatin1String("lastKnownFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).suffix())); // PBXFileType + return self; +} -+ -+QString PBXFileReference::comment() const -+{ -+ PBXGroup *group = dynamic_cast(parent()); -+ Q_ASSERT(group); -+ return QString(QLatin1String("%1 in %2")).arg(name()).arg(group->name()); -+} -diff --git a/src/plugins/generator/xcode/pbxfilereference.h b/src/plugins/generator/xcode/pbxfilereference.h +diff --git a/src/lib/corelib/generators/xcode/pbxfilereference.h b/src/lib/corelib/generators/xcode/pbxfilereference.h new file mode 100644 -index 0000000..9ce5ed7 +index 0000000..7a56120 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxfilereference.h -@@ -0,0 +1,54 @@ ++++ b/src/lib/corelib/generators/xcode/pbxfilereference.h +@@ -0,0 +1,52 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2096,25 +1513,23 @@ index 0000000..9ce5ed7 + virtual ~PBXFileReference(); + + QString isa() const; -+ QVariantMap toMap() const; -+ -+ QString comment() const; ++ PBXObjectMap toMap() const; + +private: + PBXFileReferencePrivate *d; +}; + +#endif // PBXFILEREFERENCE_H -diff --git a/src/plugins/generator/xcode/pbxfiletype.cpp b/src/plugins/generator/xcode/pbxfiletype.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxfiletype.cpp b/src/lib/corelib/generators/xcode/pbxfiletype.cpp new file mode 100644 -index 0000000..3a57c29 +index 0000000..4f7b58d --- /dev/null -+++ b/src/plugins/generator/xcode/pbxfiletype.cpp -@@ -0,0 +1,41 @@ ++++ b/src/lib/corelib/generators/xcode/pbxfiletype.cpp +@@ -0,0 +1,51 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2150,18 +1565,28 @@ index 0000000..3a57c29 + +QString PBXFileType::typeForFileExtension(const QString &fileExtension) +{ -+ return QString(); ++ if (fileExtension == QLatin1String("a")) ++ return QLatin1String("archive.ar"); ++ if (fileExtension == QLatin1String("app")) ++ return QLatin1String("wrapper.application"); ++ if (fileExtension == QLatin1String("cpp")) ++ return QLatin1String("sourcecode.cpp.cpp"); ++ if (fileExtension == QLatin1String("dylib")) ++ return QLatin1String("compiled.mach-o.dylib"); ++ if (fileExtension == QLatin1String("h")) ++ return QLatin1String("sourcecode.c.h"); ++ return QString("text"); +} -diff --git a/src/plugins/generator/xcode/pbxfiletype.h b/src/plugins/generator/xcode/pbxfiletype.h +diff --git a/src/lib/corelib/generators/xcode/pbxfiletype.h b/src/lib/corelib/generators/xcode/pbxfiletype.h new file mode 100644 -index 0000000..3818872 +index 0000000..b289250 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxfiletype.h ++++ b/src/lib/corelib/generators/xcode/pbxfiletype.h @@ -0,0 +1,47 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2205,16 +1630,105 @@ index 0000000..3818872 +}; + +#endif // PBXFILETYPE_H -diff --git a/src/plugins/generator/xcode/pbxgroup.cpp b/src/plugins/generator/xcode/pbxgroup.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp new file mode 100644 -index 0000000..a27e879 +index 0000000..6b417e7 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxgroup.cpp -@@ -0,0 +1,114 @@ ++++ b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp +@@ -0,0 +1,27 @@ ++#include "pbxframeworksbuildphase.h" ++ ++PBXFrameworksBuildPhase::PBXFrameworksBuildPhase(PBXTarget *parent) : ++ PBXBuildPhase(parent) ++{ ++} ++ ++QString PBXFrameworksBuildPhase::name() const ++{ ++ return QLatin1String("Frameworks"); ++} ++ ++QString PBXFrameworksBuildPhase::isa() const ++{ ++ return QLatin1String("PBXFrameworksBuildPhase"); ++} ++ ++PBXObjectMap PBXFrameworksBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXBuildPhase::toMap(); ++ return self; ++} ++ ++QString PBXFrameworksBuildPhase::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h +new file mode 100644 +index 0000000..0553089 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h +@@ -0,0 +1,50 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFRAMEWORKSBUILDPHASE_H ++#define PBXFRAMEWORKSBUILDPHASE_H ++ ++#include "pbxbuildphase.h" ++ ++class PBXFrameworksBuildPhase : public PBXBuildPhase ++{ ++ Q_OBJECT ++public: ++ explicit PBXFrameworksBuildPhase(PBXTarget *parent = 0); ++ ++ QString name() const; ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++}; ++ ++#endif // PBXFRAMEWORKSBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxgroup.cpp b/src/lib/corelib/generators/xcode/pbxgroup.cpp +new file mode 100644 +index 0000000..ea48b22 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxgroup.cpp +@@ -0,0 +1,119 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2278,13 +1792,13 @@ index 0000000..a27e879 + return QLatin1String("PBXGroup"); +} + -+QVariantMap PBXGroup::toMap() const ++PBXObjectMap PBXGroup::toMap() const +{ -+ QVariantMap self = PBXReference::toMap(); ++ PBXObjectMap self = PBXReference::toMap(); + -+ QStringList childIdentifiers; ++ QVariantList childIdentifiers; + foreach (PBXReference *reference, d->children) -+ childIdentifiers += reference->identifier(); ++ childIdentifiers += QVariant::fromValue(reference->identifier()); + + self.insert(QLatin1String("children"), childIdentifiers); + @@ -2325,16 +1839,21 @@ index 0000000..a27e879 + + return fileRefs; +} -diff --git a/src/plugins/generator/xcode/pbxgroup.h b/src/plugins/generator/xcode/pbxgroup.h ++ ++QString PBXGroup::comment() const ++{ ++ return !path().isEmpty() ? path() : PBXReference::comment(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxgroup.h b/src/lib/corelib/generators/xcode/pbxgroup.h new file mode 100644 -index 0000000..660e489 +index 0000000..e03b8eb --- /dev/null -+++ b/src/plugins/generator/xcode/pbxgroup.h -@@ -0,0 +1,69 @@ ++++ b/src/lib/corelib/generators/xcode/pbxgroup.h +@@ -0,0 +1,71 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2380,7 +1899,7 @@ index 0000000..660e489 + static PBXGroup *groupWithName(const QString &name, PBXGroup *parentGroup = 0); + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + + QList children() const; + @@ -2395,21 +1914,23 @@ index 0000000..660e489 + */ + QList addFiles(const QStringList &files, bool copy, bool createGroupsRecursively); + ++ QString comment() const; ++ +private: + PBXGroupPrivate *d; +}; + +#endif // PBXGROUP_H -diff --git a/src/plugins/generator/xcode/pbxlegacytarget.cpp b/src/plugins/generator/xcode/pbxlegacytarget.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp b/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp new file mode 100644 -index 0000000..e18c97e +index 0000000..7f887b3 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxlegacytarget.cpp -@@ -0,0 +1,127 @@ ++++ b/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp +@@ -0,0 +1,111 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2438,6 +1959,7 @@ index 0000000..e18c97e + +#include "pbxfilereference.h" +#include "pbxlegacytarget.h" ++#include "pbxproject.h" + +class PBXLegacyTargetPrivate +{ @@ -2446,17 +1968,15 @@ index 0000000..e18c97e + QString buildArgumentsString; + QString buildWorkingDirectory; + bool passBuildSettingsInEnvironment; -+ PBXFileReference *productReference; +}; + -+PBXLegacyTarget::PBXLegacyTarget(QObject *parent) : ++PBXLegacyTarget::PBXLegacyTarget(PBXProject *parent) : + PBXTarget(parent), d(new PBXLegacyTargetPrivate) +{ + d->buildToolPath = QLatin1String("/bin/bash"); + d->buildArgumentsString = QLatin1String("$(ACTION)"); + d->buildWorkingDirectory = QLatin1String("$BUILT_PRODUCTS_DIR"); + d->passBuildSettingsInEnvironment = true; -+ d->productReference = NULL; +} + +PBXLegacyTarget::~PBXLegacyTarget() @@ -2469,18 +1989,13 @@ index 0000000..e18c97e + return QLatin1String("PBXLegacyTarget"); +} + -+QVariantMap PBXLegacyTarget::toMap() const ++PBXObjectMap PBXLegacyTarget::toMap() const +{ -+ QVariantMap self = PBXTarget::toMap(); -+ ++ PBXObjectMap self = PBXTarget::toMap(); + self.insert(QLatin1String("buildToolPath"), d->buildToolPath); + self.insert(QLatin1String("buildArgumentsString"), d->buildArgumentsString); + self.insert(QLatin1String("buildWorkingDirectory"), d->buildWorkingDirectory); -+ self.insert(QLatin1String("passBuildSettingsInEnvironment"), d->passBuildSettingsInEnvironment); -+ -+ if (d->productReference) -+ self.insert(QLatin1String("productReference"), d->productReference->identifier()); -+ ++ self.insert(QLatin1String("passBuildSettingsInEnvironment"), d->passBuildSettingsInEnvironment ? 1 : 0); + return self; +} + @@ -2523,26 +2038,16 @@ index 0000000..e18c97e +{ + d->passBuildSettingsInEnvironment = passBuildSettingsInEnvironment; +} -+ -+PBXFileReference *PBXLegacyTarget::productReference() const -+{ -+ return d->productReference; -+} -+ -+void PBXLegacyTarget::setProductReference(PBXFileReference *productReference) -+{ -+ d->productReference = productReference; -+} -diff --git a/src/plugins/generator/xcode/pbxlegacytarget.h b/src/plugins/generator/xcode/pbxlegacytarget.h +diff --git a/src/lib/corelib/generators/xcode/pbxlegacytarget.h b/src/lib/corelib/generators/xcode/pbxlegacytarget.h new file mode 100644 -index 0000000..4006b3b +index 0000000..e6b09d4 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxlegacytarget.h -@@ -0,0 +1,73 @@ ++++ b/src/lib/corelib/generators/xcode/pbxlegacytarget.h +@@ -0,0 +1,65 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2574,8 +2079,6 @@ index 0000000..4006b3b + +#include "pbxtarget.h" + -+class PBXFileReference; -+ +class PBXLegacyTargetPrivate; + +class PBXLegacyTarget : public PBXTarget @@ -2583,11 +2086,11 @@ index 0000000..4006b3b + Q_OBJECT + Q_DISABLE_COPY(PBXLegacyTarget) +public: -+ explicit PBXLegacyTarget(QObject *parent = 0); ++ explicit PBXLegacyTarget(PBXProject *parent = 0); + virtual ~PBXLegacyTarget(); + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + + QString buildToolPath() const; + void setBuildToolPath(const QString &buildToolPath); @@ -2601,27 +2104,21 @@ index 0000000..4006b3b + bool passBuildSettingsInEnvironment() const; + void setPassBuildSettingsInEnvironment(bool passBuildSettingsInEnvironment); + -+ /*! -+ * File reference to the target's output file. -+ */ -+ PBXFileReference *productReference() const; -+ void setProductReference(PBXFileReference *productReference); -+ +private: + PBXLegacyTargetPrivate *d; +}; + +#endif // PBXLEGACYTARGET_H -diff --git a/src/plugins/generator/xcode/pbxnativetarget.cpp b/src/plugins/generator/xcode/pbxnativetarget.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxnativetarget.cpp b/src/lib/corelib/generators/xcode/pbxnativetarget.cpp new file mode 100644 -index 0000000..781dc67 +index 0000000..f9e648c --- /dev/null -+++ b/src/plugins/generator/xcode/pbxnativetarget.cpp -@@ -0,0 +1,83 @@ ++++ b/src/lib/corelib/generators/xcode/pbxnativetarget.cpp +@@ -0,0 +1,68 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2651,21 +2148,20 @@ index 0000000..781dc67 +#include "pbxbuildphase.h" +#include "pbxfilereference.h" +#include "pbxnativetarget.h" ++#include "pbxproject.h" +#include "xcconfigurationlist.h" + +class PBXNativeTargetPrivate +{ +public: + PBXNativeTargetPrivate(); -+ PBXFileReference *productReference; +}; + +PBXNativeTargetPrivate::PBXNativeTargetPrivate() -+ : productReference() +{ +} + -+PBXNativeTarget::PBXNativeTarget(QObject *parent) : ++PBXNativeTarget::PBXNativeTarget(PBXProject *parent) : + PBXTarget(parent), d(new PBXNativeTargetPrivate) +{ +} @@ -2680,37 +2176,23 @@ index 0000000..781dc67 + return QLatin1String("PBXNativeTarget"); +} + -+QVariantMap PBXNativeTarget::toMap() const ++PBXObjectMap PBXNativeTarget::toMap() const +{ -+ QVariantMap self = PBXTarget::toMap(); -+ ++ PBXObjectMap self = PBXTarget::toMap(); + self.insert(QLatin1String("productInstallPath"), QLatin1String("$(HOME)/Applications")); -+ -+ if (d->productReference) -+ self.insert(QLatin1String("productReference"), d->productReference->identifier()); -+ ++ self.insert(QLatin1String("buildRules"), QList()); + return self; +} -+ -+PBXFileReference *PBXNativeTarget::productReference() const -+{ -+ return d->productReference; -+} -+ -+void PBXNativeTarget::setProductReference(PBXFileReference *productReference) -+{ -+ d->productReference = productReference; -+} -diff --git a/src/plugins/generator/xcode/pbxnativetarget.h b/src/plugins/generator/xcode/pbxnativetarget.h +diff --git a/src/lib/corelib/generators/xcode/pbxnativetarget.h b/src/lib/corelib/generators/xcode/pbxnativetarget.h new file mode 100644 -index 0000000..d2ee90f +index 0000000..a06b979 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxnativetarget.h -@@ -0,0 +1,61 @@ ++++ b/src/lib/corelib/generators/xcode/pbxnativetarget.h +@@ -0,0 +1,53 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2742,8 +2224,6 @@ index 0000000..d2ee90f + +#include "pbxtarget.h" + -+class PBXFileReference; -+ +class PBXNativeTargetPrivate; + +class PBXNativeTarget : public PBXTarget @@ -2751,33 +2231,27 @@ index 0000000..d2ee90f + Q_OBJECT + Q_DISABLE_COPY(PBXNativeTarget) +public: -+ explicit PBXNativeTarget(QObject *parent = 0); ++ explicit PBXNativeTarget(PBXProject *parent = 0); + ~PBXNativeTarget(); + + QString isa() const; -+ QVariantMap toMap() const; -+ -+ /*! -+ * File reference to the target's output file. -+ */ -+ PBXFileReference *productReference() const; -+ void setProductReference(PBXFileReference *productReference); ++ PBXObjectMap toMap() const; + +private: + PBXNativeTargetPrivate *d; +}; + +#endif // PBXNATIVETARGET_H -diff --git a/src/plugins/generator/xcode/pbxobject.cpp b/src/plugins/generator/xcode/pbxobject.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxobject.cpp b/src/lib/corelib/generators/xcode/pbxobject.cpp new file mode 100644 -index 0000000..b5fcd13 +index 0000000..0ea69d6 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxobject.cpp -@@ -0,0 +1,69 @@ ++++ b/src/lib/corelib/generators/xcode/pbxobject.cpp +@@ -0,0 +1,96 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2805,9 +2279,13 @@ index 0000000..b5fcd13 +****************************************************************************/ + +#include "pbxobject.h" ++#include ++#include +#include +#include + ++static QMap generatedIdentifiers; ++ +class PBXObjectPrivate +{ +public: @@ -2824,35 +2302,58 @@ index 0000000..b5fcd13 + delete d; +} + -+QString PBXObject::identifier() const ++QString PBXObject::createIdentifier(const QByteArray &hashData) +{ -+ if (d->identifier.isEmpty()) -+ d->identifier = QUuid::createUuid().toByteArray().left(12).toHex().toUpper(); -+ return d->identifier; ++ if (qgetenv("QBS_XCODE_GENERATOR_DETERMINISTIC_IDENTIFIERS") == QByteArray("1")) { ++ QCryptographicHash hash(QCryptographicHash::Sha3_512); ++ hash.addData(hashData); ++ const QString result = hash.result().left(12).toHex().toUpper(); ++ if (generatedIdentifiers.contains(result) ++ /*&& generatedIdentifiers.value(result) != hashData*/) { ++ // hash collision! ++ fprintf(stderr, "hash collision %s - %s\n", result.toUtf8().data(), hashData.data()); ++ abort(); ++ } ++ generatedIdentifiers.insert(result, hashData); ++ return result; ++ } ++ ++ return QUuid::createUuid().toByteArray().left(12).toHex().toUpper(); +} + -+QVariantMap PBXObject::toMap() const ++PBXObjectIdentifier PBXObject::identifier() const +{ -+ QVariantMap self; -+ self.insert(QLatin1String("__comment__"), comment()); ++ if (d->identifier.isEmpty()) ++ d->identifier = createIdentifier(isa().toUtf8() + QByteArray(":") + hashData()); ++ return PBXObjectIdentifier(d->identifier, isa(), comment()); ++} ++ ++PBXObjectMap PBXObject::toMap() const ++{ ++ PBXObjectMap self; + self.insert(QLatin1String("isa"), isa()); + return self; +} + +QString PBXObject::comment() const +{ -+ return QString(); ++ return isa(); +} -diff --git a/src/plugins/generator/xcode/pbxobject.h b/src/plugins/generator/xcode/pbxobject.h ++ ++QByteArray PBXObject::hashData() const ++{ ++ return QByteArray(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxobject.h b/src/lib/corelib/generators/xcode/pbxobject.h new file mode 100644 -index 0000000..73ebdec +index 0000000..d4ede7e --- /dev/null -+++ b/src/plugins/generator/xcode/pbxobject.h -@@ -0,0 +1,59 @@ ++++ b/src/lib/corelib/generators/xcode/pbxobject.h +@@ -0,0 +1,124 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2888,6 +2389,68 @@ index 0000000..73ebdec + +class PBXObjectPrivate; + ++class PBXObjectIdentifier { ++public: ++ PBXObjectIdentifier() { ++ } ++ ++ PBXObjectIdentifier(const PBXObjectIdentifier &other) { ++ _key = other._key; ++ _isa = other._isa; ++ _comment = other._comment; ++ } ++ ++ PBXObjectIdentifier(const QLatin1String &identifier, const QString &isa = QString(), const QString &comment = QString()) { ++ _key = identifier; ++ _isa = isa; ++ _comment = comment; ++ } ++ ++ PBXObjectIdentifier(const QString &identifier, const QString &isa = QString(), const QString &comment = QString()) { ++ _key = identifier; ++ _isa = isa; ++ _comment = comment; ++ } ++ ++ QString toString() const { ++ return identifier(); ++ } ++ ++ QString identifier() const { ++ return _key; ++ } ++ ++ QString isa() const { ++ return _isa; ++ } ++ ++ QString comment() const { ++ return _comment; ++ } ++ ++ bool operator==(const PBXObjectIdentifier &other) const { ++ return _key == other._key && _isa == other._isa && _comment == other._comment; ++ } ++ ++ bool operator<(const PBXObjectIdentifier &other) const { ++ return _isa + _key < other._isa + other._key; ++ } ++ ++private: ++ QString _key; ++ QString _isa; ++ QString _comment; ++}; ++ ++Q_DECLARE_METATYPE(PBXObjectIdentifier) ++ ++inline bool qHash(const PBXObjectIdentifier &other) { ++ return qHash(other.toString()); ++} ++ ++typedef QMap PBXObjectMap; ++Q_DECLARE_METATYPE(PBXObjectMap) ++ +class PBXObject : public QObject +{ + Q_OBJECT @@ -2898,26 +2461,29 @@ index 0000000..73ebdec +public: + virtual ~PBXObject(); + -+ QString identifier() const; ++ static QString createIdentifier(const QByteArray &hashData); ++ ++ PBXObjectIdentifier identifier() const; + virtual QString isa() const = 0; -+ virtual QVariantMap toMap() const; ++ virtual PBXObjectMap toMap() const; + virtual QString comment() const; ++ virtual QByteArray hashData() const; + +private: + PBXObjectPrivate *d; +}; + +#endif // PBXOBJECT_H -diff --git a/src/plugins/generator/xcode/pbxproducttype.cpp b/src/plugins/generator/xcode/pbxproducttype.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxproducttype.cpp b/src/lib/corelib/generators/xcode/pbxproducttype.cpp new file mode 100644 -index 0000000..4f0bc00 +index 0000000..657b020 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxproducttype.cpp -@@ -0,0 +1,56 @@ ++++ b/src/lib/corelib/generators/xcode/pbxproducttype.cpp +@@ -0,0 +1,75 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -2960,6 +2526,8 @@ index 0000000..4f0bc00 + return QLatin1String("com.apple.product-type.library.dynamic"); + case Framework: + return QLatin1String("com.apple.product-type.framework"); ++ case StaticFramework: ++ return QLatin1String("com.apple.product-type.framework.static"); + case Bundle: + return QLatin1String("com.apple.product-type.bundle"); + case KernelExtension: @@ -2968,18 +2536,35 @@ index 0000000..4f0bc00 + return QLatin1String("com.apple.product-type.kernel-extension.iokit"); + } + ++ QLatin1String("com.apple.product-type.application.java"); ++ QLatin1String("com.apple.product-type.application.shallow"); ++ QLatin1String("com.apple.product-type.app-extension"); ++ QLatin1String("com.apple.product-type.bundle.shallow"); ++ QLatin1String("com.apple.product-type.bundle.unit-test"); ++ QLatin1String("com.apple.product-type.bundle.ocunit-test"); ++ QLatin1String("com.apple.product-type.framework.shallow"); ++ QLatin1String("com.apple.product-type.in-app-purchase-content"); ++ QLatin1String("com.apple.product-type.kernel-extension.shallow"); ++ QLatin1String("com.apple.product-type.kernel-extension.iokit.shallow"); ++ QLatin1String("com.apple.product-type.library.java.archive"); ++ QLatin1String("com.apple.product-type.objfile"); ++ QLatin1String("com.apple.product-type.pluginkit-plugin"); ++ QLatin1String("com.apple.product-type.spotlight-importer"); ++ QLatin1String("com.apple.product-type.tool.java"); ++ QLatin1String("com.apple.product-type.xpc-service"); ++ + return QString(); +} -diff --git a/src/plugins/generator/xcode/pbxproducttype.h b/src/plugins/generator/xcode/pbxproducttype.h +diff --git a/src/lib/corelib/generators/xcode/pbxproducttype.h b/src/lib/corelib/generators/xcode/pbxproducttype.h new file mode 100644 -index 0000000..4d48f3c +index 0000000..cf2e48e --- /dev/null -+++ b/src/plugins/generator/xcode/pbxproducttype.h -@@ -0,0 +1,52 @@ ++++ b/src/lib/corelib/generators/xcode/pbxproducttype.h +@@ -0,0 +1,53 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3019,6 +2604,7 @@ index 0000000..4d48f3c + LibraryStatic, + LibraryDynamic, + Framework, ++ StaticFramework, + Bundle, + KernelExtension, + KernelExtensionIOKit @@ -3028,16 +2614,16 @@ index 0000000..4d48f3c +} + +#endif // PBXPRODUCTTYPE_H -diff --git a/src/plugins/generator/xcode/pbxproject.cpp b/src/plugins/generator/xcode/pbxproject.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxproject.cpp b/src/lib/corelib/generators/xcode/pbxproject.cpp new file mode 100644 -index 0000000..cbbfef2 +index 0000000..3ab709c --- /dev/null -+++ b/src/plugins/generator/xcode/pbxproject.cpp -@@ -0,0 +1,218 @@ ++++ b/src/lib/corelib/generators/xcode/pbxproject.cpp +@@ -0,0 +1,333 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3067,23 +2653,33 @@ index 0000000..cbbfef2 +#include "opensteppropertylist.h" +#include "pbxbuildphase.h" +#include "pbxbuildfile.h" ++#include "pbxcontaineritemproxy.h" +#include "pbxgroup.h" +#include "pbxproject.h" +#include "pbxtarget.h" ++#include "pbxtargetdependency.h" +#include "xcbuildconfiguration.h" +#include "xcconfigurationlist.h" +#include ++#include +#include + ++static const QString kClassPrefixAttribute = QLatin1String("CLASSPREFIX"); ++static const QString kLastUpgradeCheckAttribute = QLatin1String("LastUpgradeCheck"); ++static const QString kOrganizationNameAttribute = QLatin1String("ORGANIZATIONNAME"); ++static const QString kTargetAttributesAttribute = QLatin1String("TargetAttributes"); ++ +class PBXProjectPrivate +{ +public: + QString name; + QString projectAbsolutePath; + QString projectDirPath; ++ PBXGroup *frameworksRefGroup; + PBXGroup *productRefGroup; + QList targets; + XCConfigurationList *configurationList; ++ QVariantMap attributes; +}; + +PBXProject::PBXProject(const QString &projectAbsolutePath, QObject *parent) : @@ -3092,6 +2688,9 @@ index 0000000..cbbfef2 + d->projectAbsolutePath = projectAbsolutePath; + d->configurationList = new XCConfigurationList(this); + ++ d->frameworksRefGroup = new PBXGroup(rootGroup()); ++ d->frameworksRefGroup->setName(QLatin1String("Frameworks")); ++ + d->productRefGroup = new PBXGroup(rootGroup()); + d->productRefGroup->setName(QLatin1String("Products")); + d->productRefGroup->setSourceTree(PBX::Group); @@ -3107,37 +2706,57 @@ index 0000000..cbbfef2 + return QLatin1String("PBXProject"); +} + -+QVariantMap PBXProject::toMap() const ++PBXObjectMap PBXProject::toMap() const +{ -+ // HACK: Make sure "Products" group is always at the bottom ++ // HACK: Make sure "Frameworks", "Products" groups are always at the bottom ++ rootGroup()->removeItem(d->frameworksRefGroup); + rootGroup()->removeItem(d->productRefGroup); ++ rootGroup()->addItem(d->frameworksRefGroup); + rootGroup()->addItem(d->productRefGroup); + -+ QVariantMap self = PBXObject::toMap(); -+ self.insert(QLatin1String("buildConfigurationList"), buildConfigurationList()->identifier()); ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("attributes"), d->attributes); ++ self.insert(QLatin1String("buildConfigurationList"), QVariant::fromValue(buildConfigurationList()->identifier())); + self.insert(QLatin1String("compatibilityVersion"), QLatin1String("Xcode 3.2")); + self.insert(QLatin1String("developmentRegion"), QLatin1String("English")); + self.insert(QLatin1String("hasScannedForEncodings"), QLatin1String("1")); + self.insert(QLatin1String("knownRegions"), QStringList() << QLatin1String("en")); -+ self.insert(QLatin1String("mainGroup"), rootGroup()->identifier()); -+ self.insert(QLatin1String("productRefGroup"), productRefGroup()->identifier()); ++ self.insert(QLatin1String("mainGroup"), QVariant::fromValue(rootGroup()->identifier())); ++ self.insert(QLatin1String("productRefGroup"), QVariant::fromValue(productRefGroup()->identifier())); + self.insert(QLatin1String("projectDirPath"), d->projectDirPath); -+ self.insert(QLatin1String("projectReferences"), QLatin1String("")); // array of map { ProductGroup:, ProjectRef: }? ++ //self.insert(QLatin1String("projectReferences"), QVariantList()); // array of map { ProductGroup:, ProjectRef: }? + self.insert(QLatin1String("projectRoot"), QLatin1String("")); + -+ QStringList targetIdentifiers; ++ QVariantList targetIdentifiers; + foreach (PBXTarget *target, targets()) -+ targetIdentifiers << target->identifier(); ++ targetIdentifiers += QVariant::fromValue(target->identifier()); + self.insert(QLatin1String("targets"), targetIdentifiers); + + return self; +} + ++QString PBXProject::comment() const ++{ ++ return QLatin1String("Project object"); ++} ++ ++QByteArray PBXProject::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ data.append(d->name); ++ return data; ++} ++ +PBXGroup *PBXProject::productRefGroup() const +{ + return d->productRefGroup; +} + ++PBXGroup *PBXProject::frameworksRefGroup() const ++{ ++ return d->frameworksRefGroup; ++} ++ +QList PBXProject::targets() const +{ + return d->targets; @@ -3169,6 +2788,74 @@ index 0000000..cbbfef2 + d->name = name; +} + ++QVariantMap PBXProject::attributes() const ++{ ++ return d->attributes; ++} ++ ++void PBXProject::setAttributes(const QVariantMap &attributes) ++{ ++ d->attributes = attributes; ++} ++ ++QVariant PBXProject::attribute(const QString &name) const ++{ ++ return d->attributes[name]; ++} ++ ++void PBXProject::setAttribute(const QString &name, const QVariant &value) ++{ ++ d->attributes[name] = value; ++} ++ ++void PBXProject::removeAttribute(const QString &name) ++{ ++ d->attributes.remove(name); ++} ++ ++PBXProject::Version PBXProject::lastUpgradeCheck() const ++{ ++ const QString s = d->attributes[kLastUpgradeCheckAttribute].toString().mid(0, 3); ++ Version v; ++ v.major = s.left(2).toInt(); ++ v.minor = s.right(1).toInt(); ++ return v; ++} ++ ++void PBXProject::setLastUpgradeCheck(const PBXProject::Version &version) ++{ ++ const int major = qBound(0, version.major, 99); ++ const int minor = qBound(0, version.minor, 9); ++ d->attributes[kLastUpgradeCheckAttribute] = ++ QString::number(major).rightJustified(2, QLatin1Char('0')) + ++ QString::number(minor).leftJustified(2, QLatin1Char('0')); ++} ++ ++QString PBXProject::classPrefix() const ++{ ++ return d->attributes[kClassPrefixAttribute].toString(); ++} ++ ++void PBXProject::setClassPrefix(const QString &classPrefix) ++{ ++ d->attributes[kClassPrefixAttribute] = classPrefix; ++} ++ ++QString PBXProject::organizationName() const ++{ ++ return d->attributes[kOrganizationNameAttribute].toString(); ++} ++ ++void PBXProject::setOrganizationName(const QString &organizationName) ++{ ++ d->attributes[kOrganizationNameAttribute] = organizationName; ++} ++ ++QString PBXProject::projectWrapperPath() const ++{ ++ return QFileInfo(d->projectAbsolutePath).absolutePath(); ++} ++ +QString PBXProject::projectDirPath() const +{ + return d->projectDirPath; @@ -3179,56 +2866,70 @@ index 0000000..cbbfef2 + d->projectDirPath = projectDirPath; +} + ++void PBXProject::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ configuration->setBuildSetting(key, value); ++} ++ +XCConfigurationList *PBXProject::buildConfigurationList() const +{ + return d->configurationList; +} + -+static void writeGroup(QVariantMap &objects, PBXGroup *group) ++static void writeGroup(PBXObjectMap &objects, PBXGroup *group) +{ -+ objects.insert(group->identifier(), group->toMap()); ++ objects.insert(group->identifier(), QVariant::fromValue(group->toMap())); + foreach (PBXReference *child, group->children()) + { -+ PBXGroup *group = dynamic_cast(child); -+ if (group) ++ if (PBXGroup *group = dynamic_cast(child)) + writeGroup(objects, group); + else -+ objects.insert(child->identifier(), child->toMap()); ++ objects.insert(child->identifier(), QVariant::fromValue(child->toMap())); + } +} + +bool PBXProject::writeToFileSystemProjectFile(bool projectWrite, bool userWrite, bool checkNeedsRevert) +{ -+ QVariantMap objects; -+ objects.insert(identifier(), toMap()); ++ PBXObjectMap objects; ++ objects.insert(identifier(), QVariant::fromValue(toMap())); + + // Add the project's root group (i.e. the root node in the file tree which contains everything) + writeGroup(objects, rootGroup()); + + // Add the project's build configuration list and build configurations to the object map -+ objects.insert(d->configurationList->identifier(), d->configurationList->toMap()); ++ objects.insert(d->configurationList->identifier(), QVariant::fromValue(d->configurationList->toMap())); + foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) -+ objects.insert(configuration->identifier(), configuration->toMap()); ++ objects.insert(configuration->identifier(), QVariant::fromValue(configuration->toMap())); + + // Add the build targets to the object map + foreach (PBXTarget *target, targets()) + { -+ objects.insert(target->identifier(), target->toMap()); ++ objects.insert(target->identifier(), QVariant::fromValue(target->toMap())); + + // Add the target's build configuration list and build configurations to the object map -+ objects.insert(target->buildConfigurationList()->identifier(), target->buildConfigurationList()->toMap()); ++ objects.insert(target->buildConfigurationList()->identifier(), QVariant::fromValue(target->buildConfigurationList()->toMap())); + foreach (XCBuildConfiguration *configuration, target->buildConfigurationList()->buildConfigurations()) -+ objects.insert(configuration->identifier(), configuration->toMap()); ++ objects.insert(configuration->identifier(), QVariant::fromValue(configuration->toMap())); ++ ++ // Add the target's dependency objects to the object map ++ foreach (PBXTargetDependency *dependency, target->targetDependencies()) { ++ objects.insert(dependency->identifier(), QVariant::fromValue(dependency->toMap())); ++ ++ if (dependency->targetProxy()) { ++ objects.insert(dependency->targetProxy()->identifier(), QVariant::fromValue(dependency->targetProxy()->toMap())); ++ } ++ } + + // Add the target's build phases... + foreach (PBXBuildPhase *buildPhase, target->buildPhases()) + { -+ objects.insert(buildPhase->identifier(), buildPhase->toMap()); ++ objects.insert(buildPhase->identifier(), QVariant::fromValue(buildPhase->toMap())); + + // And each of the files within + foreach (PBXBuildFile *buildFile, buildPhase->buildFiles()) + { -+ objects.insert(buildFile->identifier(), buildFile->toMap()); ++ objects.insert(buildFile->identifier(), QVariant::fromValue(buildFile->toMap())); + } + } + } @@ -3236,12 +2937,12 @@ index 0000000..cbbfef2 + // add all subobjects to objects map! + + // Build the root pbxproj object map -+ QVariantMap map; ++ PBXObjectMap map; + map.insert(QLatin1String("archiveVersion"), QLatin1String("1")); + map.insert(QLatin1String("classes"), QVariantMap()); + map.insert(QLatin1String("objectVersion"), QLatin1String("46")); -+ map.insert(QLatin1String("objects"), objects); -+ map.insert(QLatin1String("rootObject"), identifier()); ++ map.insert(QLatin1String("objects"), QVariant::fromValue(objects)); ++ map.insert(QLatin1String("rootObject"), QVariant::fromValue(identifier())); + + QFile file(d->projectAbsolutePath); + if (file.open(QIODevice::WriteOnly)) @@ -3252,16 +2953,16 @@ index 0000000..cbbfef2 + + return file.error() == QFile::NoError; +} -diff --git a/src/plugins/generator/xcode/pbxproject.h b/src/plugins/generator/xcode/pbxproject.h +diff --git a/src/lib/corelib/generators/xcode/pbxproject.h b/src/lib/corelib/generators/xcode/pbxproject.h new file mode 100644 -index 0000000..36fa77e +index 0000000..7a2ed88 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxproject.h -@@ -0,0 +1,80 @@ ++++ b/src/lib/corelib/generators/xcode/pbxproject.h +@@ -0,0 +1,114 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3303,11 +3004,22 @@ index 0000000..36fa77e + Q_OBJECT + Q_DISABLE_COPY(PBXProject) +public: ++ typedef struct { ++ int major; ++ int minor; ++ } Version; ++ + explicit PBXProject(const QString &projectAbsolutePath, QObject *parent = 0); + ~PBXProject(); + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXGroup *frameworksRefGroup() const; + + /*! + * Group in the root of the Xcode file tree which contains references to product target files. @@ -3327,9 +3039,32 @@ index 0000000..36fa77e + QString name() const; + void setName(const QString &name); + ++ QVariantMap attributes() const; ++ void setAttributes(const QVariantMap &attributes); ++ ++ QVariant attribute(const QString &name) const; ++ void setAttribute(const QString &name, const QVariant &value); ++ void removeAttribute(const QString &name); ++ ++ Version lastUpgradeCheck() const; ++ void setLastUpgradeCheck(const Version &version); ++ ++ QString classPrefix() const; ++ void setClassPrefix(const QString &classPrefix); ++ ++ QString organizationName() const; ++ void setOrganizationName(const QString &organizationName); ++ ++ /*! ++ * Returns the path of the .xcodeproj wrapper directory. ++ */ ++ QString projectWrapperPath() const; ++ + QString projectDirPath() const; + void setProjectDirPath(const QString &projectDirPath); + ++ void setBuildSetting(const QString &key, const QVariant &value); ++ + XCConfigurationList *buildConfigurationList() const; + bool writeToFileSystemProjectFile(bool projectWrite, bool userWrite, bool checkNeedsRevert); + @@ -3338,16 +3073,16 @@ index 0000000..36fa77e +}; + +#endif // PBXPROJECT_H -diff --git a/src/plugins/generator/xcode/pbxreference.cpp b/src/plugins/generator/xcode/pbxreference.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxreference.cpp b/src/lib/corelib/generators/xcode/pbxreference.cpp new file mode 100644 -index 0000000..2d3d648 +index 0000000..651f6fe --- /dev/null -+++ b/src/plugins/generator/xcode/pbxreference.cpp -@@ -0,0 +1,107 @@ ++++ b/src/lib/corelib/generators/xcode/pbxreference.cpp +@@ -0,0 +1,127 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3400,10 +3135,13 @@ index 0000000..2d3d648 + delete d; +} + -+QVariantMap PBXReference::toMap() const ++PBXObjectMap PBXReference::toMap() const +{ -+ QVariantMap self = PBXObject::toMap(); -+ self.insert(QLatin1String("name"), name()); ++ PBXObjectMap self = PBXObject::toMap(); ++ ++ if (!name().isEmpty() && name() != path()) { ++ self.insert(QLatin1String("name"), name()); ++ } + + // Xcode crashes if path is empty, even though it should never be + if (!d->path.isEmpty()) @@ -3451,16 +3189,33 @@ index 0000000..2d3d648 +{ + return name(); +} -diff --git a/src/plugins/generator/xcode/pbxreference.h b/src/plugins/generator/xcode/pbxreference.h ++ ++QByteArray PBXReference::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (!d->path.isEmpty()) { ++ QStringList pathComponents; ++ const PBXReference *ref = this; ++ do { ++ pathComponents.insert(0, ref->path().toUtf8()); ++ } while ((ref = dynamic_cast(ref->parent()))); ++ ++ data.append(pathComponents.join("/").toUtf8()); ++ } else if (!d->name.isEmpty()) { ++ data.append(d->name.toUtf8()); ++ } ++ return data; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxreference.h b/src/lib/corelib/generators/xcode/pbxreference.h new file mode 100644 -index 0000000..26b393c +index 0000000..3400a25 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxreference.h -@@ -0,0 +1,70 @@ ++++ b/src/lib/corelib/generators/xcode/pbxreference.h +@@ -0,0 +1,72 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3506,7 +3261,7 @@ index 0000000..26b393c + virtual ~PBXReference(); + +public: -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + + QString name() const; + void setName(const QString &name); @@ -3522,21 +3277,23 @@ index 0000000..26b393c + + QString comment() const; + ++ QByteArray hashData() const; ++ +private: + PBXReferencePrivate *d; +}; + +#endif // PBXREFERENCE_H -diff --git a/src/plugins/generator/xcode/pbxsourcesbuildphase.cpp b/src/plugins/generator/xcode/pbxsourcesbuildphase.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp new file mode 100644 -index 0000000..8253287 +index 0000000..902d05d --- /dev/null -+++ b/src/plugins/generator/xcode/pbxsourcesbuildphase.cpp -@@ -0,0 +1,47 @@ ++++ b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp +@@ -0,0 +1,57 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3565,31 +3322,41 @@ index 0000000..8253287 + +#include "pbxsourcesbuildphase.h" + -+PBXSourcesBuildPhase::PBXSourcesBuildPhase(QObject *parent) : ++PBXSourcesBuildPhase::PBXSourcesBuildPhase(PBXTarget *parent) : + PBXBuildPhase(parent) +{ +} + ++QString PBXSourcesBuildPhase::name() const ++{ ++ return QLatin1String("Sources"); ++} ++ +QString PBXSourcesBuildPhase::isa() const +{ + return QLatin1String("PBXSourcesBuildPhase"); +} + -+QVariantMap PBXSourcesBuildPhase::toMap() const ++PBXObjectMap PBXSourcesBuildPhase::toMap() const +{ -+ QVariantMap self = PBXBuildPhase::toMap(); ++ PBXObjectMap self = PBXBuildPhase::toMap(); + return self; +} -diff --git a/src/plugins/generator/xcode/pbxsourcesbuildphase.h b/src/plugins/generator/xcode/pbxsourcesbuildphase.h ++ ++QString PBXSourcesBuildPhase::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h new file mode 100644 -index 0000000..d5d6f7d +index 0000000..e841720 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxsourcesbuildphase.h -@@ -0,0 +1,49 @@ ++++ b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h +@@ -0,0 +1,53 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3628,23 +3395,27 @@ index 0000000..d5d6f7d +{ + Q_OBJECT +public: -+ explicit PBXSourcesBuildPhase(QObject *parent = 0); ++ explicit PBXSourcesBuildPhase(PBXTarget *parent = 0); ++ ++ QString name() const; + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; +}; + +#endif // PBXSOURCESBUILDPHASE_H -diff --git a/src/plugins/generator/xcode/pbxsourcetree.cpp b/src/plugins/generator/xcode/pbxsourcetree.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxsourcetree.cpp b/src/lib/corelib/generators/xcode/pbxsourcetree.cpp new file mode 100644 -index 0000000..1bea8d6 +index 0000000..d2163aa --- /dev/null -+++ b/src/plugins/generator/xcode/pbxsourcetree.cpp ++++ b/src/lib/corelib/generators/xcode/pbxsourcetree.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3691,16 +3462,16 @@ index 0000000..1bea8d6 + + return QString(); +} -diff --git a/src/plugins/generator/xcode/pbxsourcetree.h b/src/plugins/generator/xcode/pbxsourcetree.h +diff --git a/src/lib/corelib/generators/xcode/pbxsourcetree.h b/src/lib/corelib/generators/xcode/pbxsourcetree.h new file mode 100644 -index 0000000..7f77592 +index 0000000..f5252eb --- /dev/null -+++ b/src/plugins/generator/xcode/pbxsourcetree.h ++++ b/src/lib/corelib/generators/xcode/pbxsourcetree.h @@ -0,0 +1,52 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3749,16 +3520,16 @@ index 0000000..7f77592 +} + +#endif // PBXSOURCETREE_H -diff --git a/src/plugins/generator/xcode/pbxtarget.cpp b/src/plugins/generator/xcode/pbxtarget.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxtarget.cpp b/src/lib/corelib/generators/xcode/pbxtarget.cpp new file mode 100644 -index 0000000..5b15959 +index 0000000..03f4407 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxtarget.cpp -@@ -0,0 +1,139 @@ ++++ b/src/lib/corelib/generators/xcode/pbxtarget.cpp +@@ -0,0 +1,192 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3785,8 +3556,12 @@ index 0000000..5b15959 +** +****************************************************************************/ + ++#include "pbxfilereference.h" ++#include "pbxframeworksbuildphase.h" ++#include "pbxproject.h" +#include "pbxsourcesbuildphase.h" +#include "pbxtarget.h" ++#include "pbxtargetdependency.h" +#include "xcbuildconfiguration.h" +#include "xcconfigurationlist.h" + @@ -3798,18 +3573,22 @@ index 0000000..5b15959 + QString productName; + PBX::PBXProductType productType; + XCConfigurationList *configurationList; ++ PBXFrameworksBuildPhase *frameworksBuildPhase; + PBXSourcesBuildPhase *sourcesBuildPhase; ++ PBXFileReference *productReference; ++ QList targetDependencies; +}; + +PBXTargetPrivate::PBXTargetPrivate() -+ : name(), productType(), configurationList(), sourcesBuildPhase() ++ : name(), productType(), configurationList(), sourcesBuildPhase(), productReference(), targetDependencies() +{ +} + -+PBXTarget::PBXTarget(QObject *parent) : ++PBXTarget::PBXTarget(PBXProject *parent) : + PBXObject(parent), d(new PBXTargetPrivate) +{ + d->configurationList = new XCConfigurationList(this); ++ d->frameworksBuildPhase = new PBXFrameworksBuildPhase(this); + d->sourcesBuildPhase = new PBXSourcesBuildPhase(this); +} + @@ -3818,21 +3597,27 @@ index 0000000..5b15959 + delete d; +} + -+QVariantMap PBXTarget::toMap() const ++PBXObjectMap PBXTarget::toMap() const +{ -+ QVariantMap self = PBXObject::toMap(); ++ PBXObjectMap self = PBXObject::toMap(); + self.insert(QLatin1String("name"), name()); + self.insert(QLatin1String("productName"), productName()); + self.insert(QLatin1String("productType"), PBX::productTypeString(d->productType)); + -+ self.insert(QLatin1String("buildConfigurationList"), buildConfigurationList()->identifier()); ++ self.insert(QLatin1String("buildConfigurationList"), QVariant::fromValue(buildConfigurationList()->identifier())); + -+ QStringList buildPhaseReferences; ++ QVariantList buildPhaseReferences; + foreach (PBXBuildPhase *buildPhase, buildPhases()) -+ buildPhaseReferences += buildPhase->identifier(); ++ buildPhaseReferences += QVariant::fromValue(buildPhase->identifier()); + self.insert(QLatin1String("buildPhases"), buildPhaseReferences); + -+ self.insert(QLatin1String("dependencies"), QStringList()); ++ QVariantList targetDependencyReferences; ++ foreach (PBXTargetDependency *dependency, d->targetDependencies) ++ targetDependencyReferences += QVariant::fromValue(dependency->identifier()); ++ self.insert(QLatin1String("dependencies"), targetDependencyReferences); ++ ++ if (d->productReference) ++ self.insert(QLatin1String("productReference"), QVariant::fromValue(d->productReference->identifier())); + + return self; +} @@ -3872,6 +3657,22 @@ index 0000000..5b15959 + return d->configurationList; +} + ++QList &PBXTarget::targetDependencies() const ++{ ++ return d->targetDependencies; ++} ++ ++QVariant PBXTarget::buildSetting(const QString &key, const QString &buildConfigurationName) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) { ++ if (configuration->name() == buildConfigurationName) { ++ return configuration->buildSetting(key); ++ } ++ } ++ ++ return QVariant(); ++} ++ +void PBXTarget::setBuildSetting(const QString &key, const QVariant &value) +{ + foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) @@ -3881,10 +3682,16 @@ index 0000000..5b15959 +QList PBXTarget::buildPhases() const +{ + QList phases; ++ phases.append(d->frameworksBuildPhase); + phases.append(d->sourcesBuildPhase); + return phases; +} + ++PBXBuildPhase *PBXTarget::defaultFrameworksBuildPhase() ++{ ++ return d->frameworksBuildPhase; ++} ++ +PBXBuildPhase *PBXTarget::defaultSourceCodeBuildPhase() +{ + return d->sourcesBuildPhase; @@ -3894,16 +3701,33 @@ index 0000000..5b15959 +{ + return name(); +} -diff --git a/src/plugins/generator/xcode/pbxtarget.h b/src/plugins/generator/xcode/pbxtarget.h ++ ++QByteArray PBXTarget::hashData() const ++{ ++ QByteArray hashData = PBXObject::hashData(); ++ hashData.append(d->name.toUtf8()); ++ return hashData; ++} ++ ++PBXFileReference *PBXTarget::productReference() const ++{ ++ return d->productReference; ++} ++ ++void PBXTarget::setProductReference(PBXFileReference *productReference) ++{ ++ d->productReference = productReference; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxtarget.h b/src/lib/corelib/generators/xcode/pbxtarget.h new file mode 100644 -index 0000000..6b8f5b3 +index 0000000..e915481 --- /dev/null -+++ b/src/plugins/generator/xcode/pbxtarget.h -@@ -0,0 +1,86 @@ ++++ b/src/lib/corelib/generators/xcode/pbxtarget.h +@@ -0,0 +1,100 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -3938,6 +3762,9 @@ index 0000000..6b8f5b3 +#include + +class PBXBuildPhase; ++class PBXFileReference; ++class PBXProject; ++class PBXTargetDependency; +class XCConfigurationList; + +class PBXTargetPrivate; @@ -3947,10 +3774,10 @@ index 0000000..6b8f5b3 + Q_OBJECT + Q_DISABLE_COPY(PBXTarget) +public: -+ explicit PBXTarget(QObject *parent = 0); ++ explicit PBXTarget(PBXProject *parent = 0); + ~PBXTarget(); + -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + + QString name() const; + void setName(const QString &name); @@ -3962,12 +3789,21 @@ index 0000000..6b8f5b3 + void setProductType(PBX::PBXProductType productType); + + /*! ++ * File reference to the target's output file. ++ */ ++ PBXFileReference *productReference() const; ++ void setProductReference(PBXFileReference *productReference); ++ ++ /*! + * List of the target's build configurations. This is never NULL. + */ + XCConfigurationList *buildConfigurationList() const; + ++ QList &targetDependencies() const; ++ + QString expandedValue(const QString &string, void *buildParameters) const; + ++ QVariant buildSetting(const QString &key, const QString &buildConfigurationName); + void setBuildSetting(const QString &key, const QVariant &value); + + QList buildPhases() const; @@ -3981,21 +3817,199 @@ index 0000000..6b8f5b3 + + QString comment() const; + ++ QByteArray hashData() const; ++ +private: + PBXTargetPrivate *d; +}; + +#endif // PBXTARGET_H -diff --git a/src/plugins/generator/xcode/xcbuildconfiguration.cpp b/src/plugins/generator/xcode/xcbuildconfiguration.cpp +diff --git a/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp b/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp new file mode 100644 -index 0000000..8711d1f +index 0000000..2eedcd6 --- /dev/null -+++ b/src/plugins/generator/xcode/xcbuildconfiguration.cpp -@@ -0,0 +1,82 @@ ++++ b/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp +@@ -0,0 +1,99 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontaineritemproxy.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++ ++class PBXTargetDependencyPrivate ++{ ++public: ++ PBXTargetDependencyPrivate(); ++ PBXContainerItemProxy *targetProxy; ++}; ++ ++PBXTargetDependencyPrivate::PBXTargetDependencyPrivate() ++ : targetProxy() ++{ ++} ++ ++PBXTargetDependency::PBXTargetDependency(PBXProject *parent) ++ : PBXObject(parent), d(new PBXTargetDependencyPrivate) ++{ ++ d->targetProxy = new PBXContainerItemProxy(this); ++ d->targetProxy->setContainerPortal(parent); ++} ++ ++PBXTargetDependency::~PBXTargetDependency() ++{ ++ delete d; ++} ++ ++QString PBXTargetDependency::isa() const ++{ ++ return QLatin1String("PBXTargetDependency"); ++} ++ ++PBXObjectMap PBXTargetDependency::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->targetProxy) { ++ self.insert(QLatin1String("targetProxy"), QVariant::fromValue(d->targetProxy->identifier())); ++ if (d->targetProxy->target()) ++ self.insert(QLatin1String("target"), QVariant::fromValue(d->targetProxy->target()->identifier())); ++ } ++ return self; ++} ++ ++QString PBXTargetDependency::comment() const ++{ ++ return PBXObject::comment(); ++} ++ ++PBXTarget *PBXTargetDependency::target() const ++{ ++ return d->targetProxy->target(); ++} ++ ++void PBXTargetDependency::setTarget(PBXTarget *target) ++{ ++ d->targetProxy->setTarget(target); ++} ++ ++PBXContainerItemProxy *PBXTargetDependency::targetProxy() const ++{ ++ return d->targetProxy; ++} ++ ++void PBXTargetDependency::setTargetProxy(PBXContainerItemProxy *targetProxy) ++{ ++ d->targetProxy = targetProxy; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxtargetdependency.h b/src/lib/corelib/generators/xcode/pbxtargetdependency.h +new file mode 100644 +index 0000000..7a146cb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtargetdependency.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXTARGETDEPENDENCY_H ++#define PBXTARGETDEPENDENCY_H ++ ++#include "pbxobject.h" ++ ++class PBXContainerItemProxy; ++class PBXProject; ++class PBXTarget; ++class PBXTargetDependencyPrivate; ++ ++class PBXTargetDependency : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXTargetDependency(PBXProject *parent = 0); ++ virtual ~PBXTargetDependency(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ // http://www.monobjc.net/xcode-project-file-format.html claims ++ // this is a PBXNativeTarget but Xcode says "legacy" (shell script) targets work too... ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++ PBXContainerItemProxy *targetProxy() const; ++ void setTargetProxy(PBXContainerItemProxy *targetProxy); ++ ++private: ++ PBXTargetDependencyPrivate *d; ++}; ++ ++#endif // PBXTARGETDEPENDENCY_H +diff --git a/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp b/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp +new file mode 100644 +index 0000000..541b503 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp +@@ -0,0 +1,92 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4023,17 +4037,20 @@ index 0000000..8711d1f +****************************************************************************/ + +#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" + +class XCBuildConfigurationPrivate +{ +public: + QString name; + QVariantMap buildSettings; ++ XCBuildConfiguration *baseConfiguration; +}; + -+XCBuildConfiguration::XCBuildConfiguration(QObject *parent) : ++XCBuildConfiguration::XCBuildConfiguration(XCConfigurationList *parent) : + PBXObject(parent), d(new XCBuildConfigurationPrivate) +{ ++ d->baseConfiguration = 0; +} + +XCBuildConfiguration::~XCBuildConfiguration() @@ -4046,10 +4063,12 @@ index 0000000..8711d1f + return QLatin1String("XCBuildConfiguration"); +} + -+QVariantMap XCBuildConfiguration::toMap() const ++PBXObjectMap XCBuildConfiguration::toMap() const +{ -+ QVariantMap self = PBXObject::toMap(); -+ self.insert(QLatin1String("baseConfigurationReference"), QLatin1String("")); ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->baseConfiguration) { ++ self.insert(QLatin1String("baseConfigurationReference"), QVariant::fromValue(d->baseConfiguration->identifier())); ++ } + self.insert(QLatin1String("buildSettings"), d->buildSettings); + self.insert(QLatin1String("name"), d->name); + return self; @@ -4065,6 +4084,11 @@ index 0000000..8711d1f + d->name = name; +} + ++QVariant XCBuildConfiguration::buildSetting(const QString &key) ++{ ++ return d->buildSettings.value(key); ++} ++ +void XCBuildConfiguration::setBuildSetting(const QString &key, const QVariant &value) +{ + d->buildSettings.insert(key, value); @@ -4074,16 +4098,16 @@ index 0000000..8711d1f +{ + return name(); +} -diff --git a/src/plugins/generator/xcode/xcbuildconfiguration.h b/src/plugins/generator/xcode/xcbuildconfiguration.h +diff --git a/src/lib/corelib/generators/xcode/xcbuildconfiguration.h b/src/lib/corelib/generators/xcode/xcbuildconfiguration.h new file mode 100644 -index 0000000..ac17d79 +index 0000000..115a88c --- /dev/null -+++ b/src/plugins/generator/xcode/xcbuildconfiguration.h -@@ -0,0 +1,67 @@ ++++ b/src/lib/corelib/generators/xcode/xcbuildconfiguration.h +@@ -0,0 +1,69 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4117,6 +4141,7 @@ index 0000000..ac17d79 +#include + +class PBXFileReference; ++class XCConfigurationList; + +class XCBuildConfigurationPrivate; + @@ -4124,11 +4149,11 @@ index 0000000..ac17d79 +{ + Q_OBJECT +public: -+ explicit XCBuildConfiguration(QObject *parent = 0); ++ explicit XCBuildConfiguration(XCConfigurationList *parent = 0); + ~XCBuildConfiguration(); + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + + QString name() const; + void setName(const QString &name); @@ -4138,6 +4163,7 @@ index 0000000..ac17d79 + void setBaseConfigurationReference(PBXFileReference *reference); + PBXFileReference *baseConfigurationReference(); + ++ QVariant buildSetting(const QString &key); + void setBuildSetting(const QString &key, const QVariant &value); + + QString comment() const; @@ -4147,16 +4173,16 @@ index 0000000..ac17d79 +}; + +#endif // XCBUILDCONFIGURATION_H -diff --git a/src/plugins/generator/xcode/xcconfigurationlist.cpp b/src/plugins/generator/xcode/xcconfigurationlist.cpp +diff --git a/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp b/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp new file mode 100644 -index 0000000..b8c8b7b +index 0000000..54d2d39 --- /dev/null -+++ b/src/plugins/generator/xcode/xcconfigurationlist.cpp -@@ -0,0 +1,142 @@ ++++ b/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp +@@ -0,0 +1,147 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4201,7 +4227,7 @@ index 0000000..b8c8b7b +{ +} + -+XCConfigurationList::XCConfigurationList(QObject *parent) : ++XCConfigurationList::XCConfigurationList(PBXObject *parent) : + PBXObject(parent), d(new XCConfigurationListPrivate) +{ +} @@ -4216,13 +4242,13 @@ index 0000000..b8c8b7b + return QLatin1String("XCConfigurationList"); +} + -+QVariantMap XCConfigurationList::toMap() const ++PBXObjectMap XCConfigurationList::toMap() const +{ -+ QVariantMap self = PBXObject::toMap(); ++ PBXObjectMap self = PBXObject::toMap(); + -+ QStringList buildConfigurationReferences; ++ QVariantList buildConfigurationReferences; + foreach (XCBuildConfiguration *configuration, buildConfigurations()) -+ buildConfigurationReferences += configuration->identifier(); ++ buildConfigurationReferences += QVariant::fromValue(configuration->identifier()); + self.insert(QLatin1String("buildConfigurations"), buildConfigurationReferences); + + if (d->defaultBuildConfiguration) @@ -4241,6 +4267,11 @@ index 0000000..b8c8b7b + +XCBuildConfiguration *XCConfigurationList::addBuildConfiguration(const QString &name) +{ ++ foreach (XCBuildConfiguration *config, d->buildConfigurations) { ++ if (config->name() == name) ++ return config; ++ } ++ + XCBuildConfiguration *buildConfiguration = new XCBuildConfiguration(); + buildConfiguration->setName(name); + d->buildConfigurations.append(buildConfiguration); @@ -4295,16 +4326,16 @@ index 0000000..b8c8b7b + + return QString(QLatin1String("Build configuration list for %1 \"%2\"")).arg(parentIsa).arg(parentName); +} -diff --git a/src/plugins/generator/xcode/xcconfigurationlist.h b/src/plugins/generator/xcode/xcconfigurationlist.h +diff --git a/src/lib/corelib/generators/xcode/xcconfigurationlist.h b/src/lib/corelib/generators/xcode/xcconfigurationlist.h new file mode 100644 -index 0000000..9ae1221 +index 0000000..b693478 --- /dev/null -+++ b/src/plugins/generator/xcode/xcconfigurationlist.h -@@ -0,0 +1,63 @@ ++++ b/src/lib/corelib/generators/xcode/xcconfigurationlist.h +@@ -0,0 +1,67 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4345,14 +4376,18 @@ index 0000000..9ae1221 +{ + Q_OBJECT +public: -+ explicit XCConfigurationList(QObject *parent = 0); ++ explicit XCConfigurationList(PBXObject *parent = 0); + ~XCConfigurationList(); + + QString isa() const; -+ QVariantMap toMap() const; ++ PBXObjectMap toMap() const; + + QList buildConfigurations() const; + ++ /*! ++ * Adds a build configuration named \p name if one with that name does not already exist. ++ * Returns the new or existing build configuration. ++ */ + XCBuildConfiguration *addBuildConfiguration(const QString &name); + void removeBuildConfiguration(const QString &name); + void setDefaultBuildConfiguration(const QString &name); @@ -4364,80 +4399,81 @@ index 0000000..9ae1221 +}; + +#endif // XCCONFIGURATIONLIST_H -diff --git a/src/plugins/generator/xcode/xcode.pro b/src/plugins/generator/xcode/xcode.pro +diff --git a/src/lib/corelib/generators/xcode/xcode.pri b/src/lib/corelib/generators/xcode/xcode.pri new file mode 100644 -index 0000000..45e27ba +index 0000000..76ada9e --- /dev/null -+++ b/src/plugins/generator/xcode/xcode.pro -@@ -0,0 +1,58 @@ -+include(../../plugins.pri) -+ -+TARGET = qbs_xcode_generator -+ -+QT = core -+ -+QBSLIBDIR = $$OUT_PWD/../../../../lib -+include($$PWD/../../../lib/corelib/use_corelib.pri) -+ ++++ b/src/lib/corelib/generators/xcode/xcode.pri +@@ -0,0 +1,59 @@ +HEADERS += \ -+ ../generatorplugin.h \ -+ opensteppropertylist.h \ -+ pbx.h \ -+ pbxbuildfile.h \ -+ pbxbuildphase.h \ -+ pbxcontainer.h \ -+ pbxfileencoding.h \ -+ pbxfilereference.h \ -+ pbxfiletype.h \ -+ pbxgroup.h \ -+ pbxnativetarget.h \ -+ pbxobject.h \ -+ pbxproducttype.h \ -+ pbxproject.h \ -+ pbxreference.h \ -+ pbxsourcesbuildphase.h \ -+ pbxsourcetree.h \ -+ pbxtarget.h \ -+ xcbuildconfiguration.h \ -+ xcconfigurationlist.h \ -+ xcodegenerator.h \ -+ xcodenativegenerator.h \ -+ xcodesimplegenerator.h \ -+ pbxlegacytarget.h ++ $$PWD/opensteppropertylist.h \ ++ $$PWD/pbx.h \ ++ $$PWD/pbxbuildfile.h \ ++ $$PWD/pbxbuildphase.h \ ++ $$PWD/pbxcontainer.h \ ++ $$PWD/pbxcontaineritemproxy.h \ ++ $$PWD/pbxfileencoding.h \ ++ $$PWD/pbxfilereference.h \ ++ $$PWD/pbxfiletype.h \ ++ $$PWD/pbxframeworksbuildphase.h \ ++ $$PWD/pbxgroup.h \ ++ $$PWD/pbxlegacytarget.h \ ++ $$PWD/pbxnativetarget.h \ ++ $$PWD/pbxobject.h \ ++ $$PWD/pbxproducttype.h \ ++ $$PWD/pbxproject.h \ ++ $$PWD/pbxreference.h \ ++ $$PWD/pbxsourcesbuildphase.h \ ++ $$PWD/pbxsourcetree.h \ ++ $$PWD/pbxtarget.h \ ++ $$PWD/pbxtargetdependency.h \ ++ $$PWD/xcbuildconfiguration.h \ ++ $$PWD/xcconfigurationlist.h \ ++ $$PWD/xcodegenerator.h \ ++ $$PWD/xcodenativegenerator.h \ ++ $$PWD/xcodesimplegenerator.h \ ++ $$PWD/xcscheme.h \ ++ $$PWD/xcsettings.h \ ++ $$PWD/xcodebuildsettingmapping.h + +SOURCES += \ -+ main.cpp \ -+ opensteppropertylist.cpp \ -+ pbxbuildfile.cpp \ -+ pbxbuildphase.cpp \ -+ pbxcontainer.cpp \ -+ pbxfilereference.cpp \ -+ pbxfiletype.cpp \ -+ pbxgroup.cpp \ -+ pbxnativetarget.cpp \ -+ pbxobject.cpp \ -+ pbxproducttype.cpp \ -+ pbxproject.cpp \ -+ pbxreference.cpp \ -+ pbxsourcesbuildphase.cpp \ -+ pbxsourcetree.cpp \ -+ pbxtarget.cpp \ -+ xcbuildconfiguration.cpp \ -+ xcconfigurationlist.cpp \ -+ xcodegenerator.cpp \ -+ xcodenativegenerator.cpp \ -+ xcodesimplegenerator.cpp \ -+ pbxlegacytarget.cpp -diff --git a/src/plugins/generator/xcode/xcodegenerator.cpp b/src/plugins/generator/xcode/xcodegenerator.cpp ++ $$PWD/opensteppropertylist.cpp \ ++ $$PWD/pbxbuildfile.cpp \ ++ $$PWD/pbxbuildphase.cpp \ ++ $$PWD/pbxcontainer.cpp \ ++ $$PWD/pbxcontaineritemproxy.cpp \ ++ $$PWD/pbxfilereference.cpp \ ++ $$PWD/pbxfiletype.cpp \ ++ $$PWD/pbxframeworksbuildphase.cpp \ ++ $$PWD/pbxgroup.cpp \ ++ $$PWD/pbxlegacytarget.cpp \ ++ $$PWD/pbxnativetarget.cpp \ ++ $$PWD/pbxobject.cpp \ ++ $$PWD/pbxproducttype.cpp \ ++ $$PWD/pbxproject.cpp \ ++ $$PWD/pbxreference.cpp \ ++ $$PWD/pbxsourcesbuildphase.cpp \ ++ $$PWD/pbxsourcetree.cpp \ ++ $$PWD/pbxtarget.cpp \ ++ $$PWD/pbxtargetdependency.cpp \ ++ $$PWD/xcbuildconfiguration.cpp \ ++ $$PWD/xcconfigurationlist.cpp \ ++ $$PWD/xcodegenerator.cpp \ ++ $$PWD/xcodenativegenerator.cpp \ ++ $$PWD/xcodesimplegenerator.cpp \ ++ $$PWD/xcscheme.cpp \ ++ $$PWD/xcsettings.cpp \ ++ $$PWD/xcodebuildsettingmapping.cpp +diff --git a/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp new file mode 100644 -index 0000000..ea53d0e +index 0000000..458bf8f --- /dev/null -+++ b/src/plugins/generator/xcode/xcodegenerator.cpp -@@ -0,0 +1,96 @@ ++++ b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp +@@ -0,0 +1,366 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4464,45 +4500,1017 @@ index 0000000..ea53d0e +** +****************************************************************************/ + ++#include "xcodebuildsettingmapping.h" +#include "xcodegenerator.h" + +#include ++#include "pbx.h" ++ ++#include ++ ++#include + +namespace qbs { + ++using namespace Internal; ++ ++static QVariant _xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group, const QString &moduleName); ++ ++static QVariant xcodeExecutablePrefix(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeExecutableSuffix(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeInfoPlistOutputEncoding(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeArchitecture(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodePreprocessorDefinitions(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeResourcesTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeSdkRoot(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeSupportedPlatforms(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeDylibVersion(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeProductName(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeUseHeadermap(const qbs::Project &project, const ProductData &product, const GroupData &group); ++ ++static QVariant qbsProjectModuleProperty(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project) ++{ ++ QMapIterator module(project.projectConfiguration()); ++ while (module.hasNext()) { ++ module.next(); ++ QString qbsModName = qbsModuleName; ++ if (module.key() == qbsModName.replace(QLatin1String("."), QLatin1String("/"))) { ++ QMapIterator property(module.value().toMap()); ++ while (property.hasNext()) { ++ property.next(); ++ if (qbsPropertyName == property.key()) { ++ return property.value(); ++ } ++ } ++ } ++ } ++ ++ return QVariant(); ++} ++ ++static QVariant qbsModuleProperty(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project, const qbs::ProductData &product, const qbs::GroupData &group) ++{ ++ if (product.isValid()) { ++ return (group.isValid() ? group.properties() : product.moduleProperties()).getModuleProperty(qbsModuleName, qbsPropertyName); ++ } else { ++ return qbsProjectModuleProperty(qbsModuleName, qbsPropertyName, project); ++ } ++ return QVariant(); ++} ++ ++static QVariantList qbsModuleProperties(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project, const qbs::ProductData &product, const qbs::GroupData &group) ++{ ++ if (product.isValid()) { ++ return (group.isValid() ? group.properties() : product.moduleProperties()).getModuleProperties(qbsModuleName, qbsPropertyName); ++ } else { ++ return qbsProjectModuleProperty(qbsModuleName, qbsPropertyName, project).toList(); ++ } ++ return QVariantList(); ++} ++ ++void XcodeBuildSettingMapping::applyToProject(PBXProject *xcodeProject, ++ const qbs::Project &project) const { ++ applyToConfiguration(xcodeProject->buildConfigurationList(), project); ++} ++ ++void XcodeBuildSettingMapping::applyToTarget(PBXTarget *xcodeTarget, ++ const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData) const { ++ applyToConfiguration(xcodeTarget->buildConfigurationList(), project, productData, groupData); ++} ++ ++void XcodeBuildSettingMapping::applyToConfiguration(XCConfigurationList *xcodeConfigurationList, ++ const Project &project, ++ const ProductData &productData, ++ const GroupData &groupData) const { ++ foreach (XCBuildConfiguration *xcodeConfiguration, xcodeConfigurationList->buildConfigurations()) ++ applyToConfiguration(xcodeConfiguration, project, productData, groupData); ++} ++ ++void XcodeBuildSettingMapping::applyToConfiguration(XCBuildConfiguration *xcodeConfiguration, ++ const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData) const { ++ QVariant xcodeValue; ++ if (function) { ++ xcodeValue = function(project, productData, groupData); ++ } else if (isList) { ++ QVariantList list; ++ ++ foreach (const QString &qbsName, qbsNames) { ++ list << qbsModuleProperties(qbsModule, qbsName, project, productData, groupData); ++ } ++ ++ if (!list.isEmpty()) { ++ list.append(QLatin1String("$(inherited)")); ++ xcodeValue = list; ++ } ++ } else { ++ xcodeValue = qbsModuleProperty(qbsModule, qbsNames.first(), project, productData, groupData); ++ } ++ ++ // TODO: Figure out what Xcode *really* does... I think it's this ++ bool shouldSerializeAsList = serializedAsList; ++ if (xcodeValue.type() == QVariant::List || xcodeValue.type() == QVariant::StringList) { ++ const QStringList l = xcodeValue.toStringList(); ++ if (l.size() <= 1) { ++ shouldSerializeAsList = false; // || containsQuotedStrings ??? lineLength? ++ } ++ } ++ ++ if (!shouldSerializeAsList && (xcodeValue.type() == QVariant::List ++ || xcodeValue.type() == QVariant::StringList)) { ++ xcodeValue = xcodeValue.toStringList().join(QLatin1Char(' ')); ++ } ++ ++ if (!xcodeValue.isNull()) { ++ xcodeValue = XcodeGenerator::xcodeInsertPlaceholdersInValue(project, xcodeValue); ++ xcodeConfiguration->setBuildSetting(xcodeName, xcodeValue); ++ } ++} ++ ++/*! ++ * \brief Mapping of Xcode build settings to qbs module and property names or functions. ++ */ ++QList XcodeBuildSettingMapping::defaultBuildSettingsMap() ++{ ++ const QString cpp = QLatin1String("cpp"); ++ ++ QList settings; ++ settings += XcodeBuildSettingMapping(QLatin1String("APPLICATION_EXTENSION_API_ONLY"), cpp, QLatin1String("requireAppExtensionSafeApi")); ++ settings += XcodeBuildSettingMapping(QLatin1String("ARCHS"), &xcodeArchitecture, true); ++ settings += XcodeBuildSettingMapping(QLatin1String("CLANG_ENABLE_OBJC_ARC"), cpp, QLatin1String("automaticReferenceCounting")); ++ settings += XcodeBuildSettingMapping(QLatin1String("CREATE_INFOPLIST_SECTION_IN_BINARY"), cpp, QLatin1String("embedInfoPlist")); ++ settings += XcodeBuildSettingMapping(QLatin1String("DYLIB_CURRENT_VERSION"), &xcodeDylibVersion, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("DYLIB_INSTALL_NAME_BASE"), cpp, QLatin1String("installNamePrefix")); ++ settings += XcodeBuildSettingMapping(QLatin1String("EXECUTABLE_EXTENSION"), &xcodeExecutableSuffix, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("EXECUTABLE_PREFIX"), &xcodeExecutablePrefix, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("FRAMEWORK_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("frameworkPaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("GCC_PREFIX_HEADER"), cpp, QLatin1String("precompiledHeader")); ++ settings += XcodeBuildSettingMapping(QLatin1String("GCC_PREPROCESSOR_DEFINITIONS"), &xcodePreprocessorDefinitions, true); ++ settings += XcodeBuildSettingMapping(QLatin1String("HEADER_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("includePaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_EXPAND_BUILD_SETTINGS"), cpp, QLatin1String("processInfoPlist")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_FILE"), cpp, QLatin1String("infoPlistFile")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_OUTPUT_FORMAT"), &xcodeInfoPlistOutputEncoding, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("IPHONEOS_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumIosVersion")); ++ settings += XcodeBuildSettingMapping(QLatin1String("LD_RUNPATH_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("rpaths"), false); ++ settings += XcodeBuildSettingMapping(QLatin1String("LIBRARY_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("libraryPaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("MACOSX_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumOsxVersion")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_CFLAGS"), cpp, QStringList() << QLatin1String("cFlags") << QLatin1String("objcFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_CPLUSPLUSFLAGS"), cpp, QStringList() << QLatin1String("cxxFlags") << QLatin1String("objcxxFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_LDFLAGS"), cpp, QStringList() << QLatin1String("linkerFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("PRODUCT_NAME"), &xcodeProductName, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("RESOURCES_TARGETED_DEVICE_FAMILY"), &xcodeResourcesTargetedDeviceFamily, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("SDKROOT"), &xcodeSdkRoot, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("SUPPORTED_PLATFORMS"), &xcodeSupportedPlatforms, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("TARGETED_DEVICE_FAMILY"), &xcodeTargetedDeviceFamily, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("USE_HEADERMAP"), &xcodeUseHeadermap, false); ++ return settings; ++} ++ ++QVariant xcodeExecutablePrefix(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ switch (XcodeGenerator::xcodeProductType(product)) ++ { ++ case PBX::Application: ++ case PBX::Tool: ++ case PBX::Bundle: ++ case PBX::Framework: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("executablePrefix"), project, product, group).toString(); ++ case PBX::LibraryDynamic: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("dynamicLibraryPrefix"), project, product, group).toString(); ++ case PBX::LibraryStatic: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("staticLibraryPrefix"), project, product, group).toString(); ++ default: ++ return QString(); ++ } ++} ++ ++QVariant xcodeExecutableSuffix(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ QString suffix; ++ switch (XcodeGenerator::xcodeProductType(product)) ++ { ++ case PBX::Application: ++ case PBX::Tool: ++ case PBX::Bundle: ++ case PBX::Framework: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("executableSuffix"), project, product, group).toString(); ++ break; ++ case PBX::LibraryDynamic: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("dynamicLibrarySuffix"), project, product, group).toString(); ++ break; ++ case PBX::LibraryStatic: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("staticLibrarySuffix"), project, product, group).toString(); ++ break; ++ default: ++ break; ++ } ++ ++ if (suffix.startsWith(QChar('.'))) ++ suffix.remove(0, 1); ++ ++ return suffix; ++} ++ ++QVariant xcodeInfoPlistOutputEncoding(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString format = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("infoPlistFormat"), project, product, group).toString(); ++ if (format == QLatin1String("xml1")) ++ return QLatin1String("XML"); ++ else if (format == QLatin1String("binary1")) ++ return QLatin1String("binary"); ++ ++ // If we don't know what the format is, return the original string (which may be invalid) ++ // "same-as-input" is valid ++ return format; ++} ++ ++QVariant xcodeArchitecture(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString architecture = qbsModuleProperty(QLatin1String("qbs"), QLatin1String("architecture"), project, product, group).toString(); ++ if (architecture == QLatin1String("x86")) ++ return QLatin1String("i386"); ++ return architecture; ++} ++ ++QVariant xcodePreprocessorDefinitions(const qbs::Project &project, const ProductData &product, const GroupData &group) ++{ ++ QStringList defs; ++ Q_FOREACH (const QVariant &def, qbsModuleProperties(QLatin1String("cpp"), QLatin1String("defines"), project, product, group)) { ++ // Preprocessor definitions need to be double escaped since Xcode ignores quoted strings ++ defs.append(def.toString().replace(QLatin1String("\""), QLatin1String("\\\""))); ++ } ++ return defs; ++} ++ ++QVariant xcodeSdkRoot(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString sdkName = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("xcodeSdkName"), project, product, group).toString(); ++ if (!sdkName.isEmpty()) ++ return sdkName; ++ ++ const QString sysroot = qbsModuleProperty(QLatin1String("qbs"), QLatin1String("sysroot"), project, product, group).toString(); ++ if (!sysroot.isEmpty()) ++ return sysroot; ++ ++ const QVariantList targetOS = qbsModuleProperties(QLatin1String("qbs"), QLatin1String("targetOS"), project, product, group); ++ if (targetOS.contains(QLatin1String("osx"))) ++ return QLatin1String("macosx"); ++ else if (targetOS.contains(QLatin1String("ios"))) ++ return QLatin1String("iphoneos"); ++ else ++ throw ErrorInfo(Tr::tr("Unsupported platform for Xcode project")); ++} ++ ++QVariant xcodeSupportedPlatforms(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ QStringList supportedPlatforms; ++ const QVariantList targetOS = qbsModuleProperties(QLatin1String("qbs"), QLatin1String("targetOS"), project, product, group); ++ if (targetOS.contains(QLatin1String("osx"))) { ++ supportedPlatforms.append(QLatin1String("macosx")); ++ } else if (targetOS.contains(QLatin1String("ios"))) { ++ if (targetOS.contains(QLatin1String("ios-simulator"))) { ++ supportedPlatforms.append(QLatin1String("iphonesimulator")); ++ } ++ supportedPlatforms.append(QLatin1String("iphoneos")); ++ } ++ return supportedPlatforms; ++} ++ ++static inline int targetDeviceFamilyIdentifierFromName(const QString &name) ++{ ++ if (name == "iphone") ++ return 1; ++ if (name == "ipad") ++ return 2; ++ return 0; ++} ++ ++QVariant _xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group, const QString &moduleName) ++{ ++ QStringList targetedDeviceFamily; ++ const QVariantList targetDevices = qbsModuleProperties(moduleName, QLatin1String("targetDevices"), project, product, group); ++ Q_FOREACH (const QVariant &targetDevice, targetDevices) { ++ int devId = targetDeviceFamilyIdentifierFromName(targetDevice.toString()); ++ if (devId != 0) { ++ targetedDeviceFamily.append(QString::number(devId)); ++ } ++ } ++ return targetedDeviceFamily.join(QLatin1Char(',')); ++} ++ ++QVariant xcodeResourcesTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ return _xcodeTargetedDeviceFamily(project, product, group, QLatin1String("ib")); ++} ++ ++QVariant xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ return _xcodeTargetedDeviceFamily(project, product, group, QLatin1String("xcode")); ++} ++ ++QVariant xcodeDylibVersion(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ Q_UNUSED(project); ++ Q_UNUSED(group); ++ if (product.type().contains(QLatin1String("dynamiclibrary"))) ++ return product.version(); ++ return QString(); ++} ++ ++QVariant xcodeProductName(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ Q_UNUSED(project); ++ Q_UNUSED(group); ++ if (!product.targetName().isEmpty()) ++ return product.targetName(); ++ return product.name(); ++} ++ ++QVariant xcodeUseHeadermap(const Project &, const ProductData &, const GroupData &) ++{ ++ return QVariant(false); // We never want to use headermaps in qbs-generated projects ++} ++ ++} // namespace qbs +diff --git a/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h +new file mode 100644 +index 0000000..39474fb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h +@@ -0,0 +1,96 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCODECONFIGURATIONSETTING_H ++#define XCODECONFIGURATIONSETTING_H ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++class PBXProject; ++class PBXTarget; ++class XCBuildConfiguration; ++class XCConfigurationList; ++ ++namespace qbs { ++ ++/*! ++ * \brief Represents the mapping of an Xcode build setting name to a qbs module and property name. ++ */ ++struct XcodeBuildSettingMapping { ++ typedef QVariant (*XcodeBuildSettingValueFunction)(const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData); ++ ++ QString xcodeName; ++ QString qbsModule; ++ QStringList qbsNames; ++ bool isList; ++ bool serializedAsList; ++ XcodeBuildSettingValueFunction function; // overrides previous 3 ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, const QString &qbsModule, ++ const QString &qbsName, bool serializedAsList = false) ++ : xcodeName(xcodeName), qbsModule(qbsModule), qbsNames(qbsName), isList(false), ++ serializedAsList(serializedAsList), function(NULL) {} ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, const QString &qbsModule, ++ const QStringList &qbsNames, bool serializedAsList = true) ++ : xcodeName(xcodeName), qbsModule(qbsModule), qbsNames(qbsNames), isList(true), ++ serializedAsList(serializedAsList), function(NULL) {} ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, XcodeBuildSettingValueFunction function, ++ bool serializedAsList) ++ : xcodeName(xcodeName), isList(serializedAsList), ++ serializedAsList(serializedAsList), function(function) {} ++ ++ void applyToProject(PBXProject *xcodeProject, const Project &project) const; ++ void applyToTarget(PBXTarget *xcodeTarget, ++ const Project &project, ++ const ProductData &productData, const GroupData &groupData) const; ++ void applyToConfiguration(XCConfigurationList *xcodeConfigurationList, ++ const Project &project, ++ const ProductData &productData = ProductData(), ++ const GroupData &groupData = GroupData()) const; ++ void applyToConfiguration(XCBuildConfiguration *xcodeConfiguration, ++ const Project &project, ++ const ProductData &productData = ProductData(), ++ const GroupData &groupData = GroupData()) const; ++ ++ static QList defaultBuildSettingsMap(); ++}; ++ ++} // namespace qbs ++ ++#endif // XCODECONFIGURATIONSETTING_H +diff --git a/src/lib/corelib/generators/xcode/xcodegenerator.cpp b/src/lib/corelib/generators/xcode/xcodegenerator.cpp +new file mode 100644 +index 0000000..4bbcb40 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodegenerator.cpp +@@ -0,0 +1,643 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodebuildsettingmapping.h" ++#include "xcodegenerator.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include "pbx.h" ++ ++#include ++#include ++#include ++#include ++ ++static const QString kQbsRunnerFileName = QLatin1String("qbs"); ++ ++namespace qbs { ++ ++using namespace Internal; ++ +XcodeGenerator::XcodeGenerator() +{ +} + -+/*! -+ * Finds the "root" group in a Qbs product. -+ * -+ * This is the group which has the same name as the product and corresponds to -+ * the files which do not appear in a Group in the Qbs source file. -+ */ -+static GroupData findRootGroup(const ProductData &product) ++static QString buildVariant(const qbs::Project &project) +{ -+ Q_ASSERT(product.groups().size() > 0); -+ foreach (const GroupData groupData, product.groups()) -+ { -+ if (groupData.name() == product.name()) -+ return groupData; -+ } -+ -+ Q_ASSERT_X(false, __FILE__, "couldn't find root group in qbs product"); ++ return project.projectConfiguration()[QLatin1String("qbs")].toMap()[QLatin1String("buildVariant")].toString(); +} + -+QString XcodeGenerator::xcodeExecutablePrefix(const ProductData &product) ++static QString buildVariant(const qbs::ProductData &product) +{ -+ // TODO: Use value from qbs module? -+ switch (xcodeProductType(product)) -+ { -+ case PBX::LibraryDynamic: -+ case PBX::LibraryStatic: -+ return QLatin1String("lib"); -+ default: -+ return QString(); ++ return product.moduleProperties().getModuleProperty(QLatin1String("qbs"), QLatin1String("buildVariant")).toString(); ++} ++ ++void XcodeGenerator::setupGenerator() ++{ ++ QSet profileNames; ++ QSet projectNames; ++ QSet qbsProjectFiles; ++ QSet buildDirectories; ++ ++ foreach (const qbs::Project &proj, projects()) { ++ profileNames << proj.profile(); ++ projectNames << proj.projectData().name(); ++ qbsProjectFiles << proj.projectData().location().filePath(); ++ ++ QDir baseBuildDirectory(proj.projectData().buildDirectory()); ++ baseBuildDirectory.cdUp(); ++ buildDirectories << baseBuildDirectory.absolutePath(); + } ++ ++ QBS_CHECK(!profileNames.isEmpty()); ++ QBS_CHECK(projectNames.size() == 1); ++ QBS_CHECK(qbsProjectFiles.size() == 1); ++ QBS_CHECK(buildDirectories.size() == 1); ++ ++ m_multipleProfiles = profileNames.size() > 1; ++ m_projectName = projectNames.toList().first(); ++ m_qbsProjectFile = qbsProjectFiles.toList().first(); ++ m_baseBuildDirectory = buildDirectories.toList().first(); ++ ++ QBS_CHECK(m_qbsProjectFile.isAbsolute() && m_qbsProjectFile.exists()); ++ QBS_CHECK(m_baseBuildDirectory.isAbsolute() && m_baseBuildDirectory.exists()); ++ ++ m_productGroups.clear(); ++} ++ ++static inline TargetArtifact runnableOrPrimaryTargetArtifactForProduct(const qbs::ProductData &qbsProductData) { ++ // Easy in this case... ++ if (qbsProductData.targetArtifacts().size() == 1) { ++ return qbsProductData.targetArtifacts().first(); ++ } ++ ++ const QStringList types = QStringList() ++ << QLatin1String("bundle") ++ << QLatin1String("application") ++ << QLatin1String("dynamiclibrary") ++ << QLatin1String("staticlibrary") ++ << QLatin1String("loadablemodule"); ++ ++ Q_FOREACH (const TargetArtifact &ta, qbsProductData.targetArtifacts()) { ++ Q_FOREACH (const QString &type, types) { ++ if (qbsProductData.type().contains(type) ++ && ta.fileTags().contains(type)) { ++ return ta; ++ } ++ } ++ } ++ ++ return TargetArtifact(); ++} ++ ++static inline QString installedFilePathForTargetArtifact(const qbs::Project &project, ++ const qbs::ProductData &product, ++ const qbs::InstallOptions &installOptions, ++ const TargetArtifact &ta) { ++ const QList &installables ++ = project.installableFilesForProduct(product, installOptions); ++ foreach (const InstallableFile &file, installables) { ++ if (file.sourceFilePath() == ta.filePath()) ++ return file.targetFilePath(); ++ } ++ return ta.filePath(); ++} ++ ++void XcodeGenerator::generate(const InstallOptions &installOptions) ++{ ++ // TODO: Move to base class and call ProjectGenerator::setupGenerator() ++ setupGenerator(); ++ ++ const QString xcodeWrapperName = m_projectName + QLatin1String(".xcodeproj"); ++ if (!m_baseBuildDirectory.cd(xcodeWrapperName)) ++ if (!m_baseBuildDirectory.mkdir(xcodeWrapperName) || !m_baseBuildDirectory.cd(xcodeWrapperName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode project wrapper directory")); ++ ++ const QString xcodeWorkspaceWrapperName = QLatin1String("project.xcworkspace"); ++ const QString sharedWorkspaceDataDirName = QLatin1String("xcshareddata"); ++ ++ QDir sharedWorkspaceDataDir = m_baseBuildDirectory; ++ if (!sharedWorkspaceDataDir.cd(xcodeWorkspaceWrapperName)) ++ if (!sharedWorkspaceDataDir.mkdir(xcodeWorkspaceWrapperName) || !sharedWorkspaceDataDir.cd(xcodeWorkspaceWrapperName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode workspace wrapper directory")); ++ ++ if (!sharedWorkspaceDataDir.cd(sharedWorkspaceDataDirName)) ++ if (!sharedWorkspaceDataDir.mkdir(sharedWorkspaceDataDirName) || !sharedWorkspaceDataDir.cd(sharedWorkspaceDataDirName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode workspace shared data directory")); ++ ++ const QString sharedWorkspaceSettingsFilePath = sharedWorkspaceDataDir.absoluteFilePath(QLatin1String("WorkspaceSettings.xcsettings")); ++ XCSettings sharedWorkspaceSettings; ++ sharedWorkspaceSettings.setAutocreateSchemes(false); ++ if (!sharedWorkspaceSettings.serialize(sharedWorkspaceSettingsFilePath)) { ++ throw ErrorInfo(Tr::tr("Failed to generate workspace settings %1").arg(sharedWorkspaceSettingsFilePath)); ++ } ++ ++ // Create a shell script to invoke the qbs binary ++ // This is necessary because qbs hangs when invoked directly from Xcode ++ // TODO: Why? ++ const QString &qbsRunnerFilePath = m_baseBuildDirectory.absoluteFilePath(kQbsRunnerFileName); ++ QFile qbsRunner(qbsRunnerFilePath); ++ if (qbsRunner.open(QIODevice::WriteOnly)) { ++ // The runner script, in addition to invoking qbs itself, ++ // adds symlinks from the Xcode target directory to the qbs build directory ++ // This way, products in the Xcode files listing show up properly ++ QTextStream ts(&qbsRunner); ++ ts << QLatin1String("#!/bin/bash\n") ++ << QLatin1String("set -e\n") ++ << QLatin1String("[ -x \"$QBS\" ] || exit 1\n") ++ << QLatin1String("\"$QBS\" \"$@\"\n") ++ << QLatin1String("if [ ! -e \"$TARGET_BUILD_DIR/$PRODUCT_NAME/$FULL_PRODUCT_NAME\" ] && [ -e \"$QBS_TARGET_PATH\" ] ; then\n") ++ << QLatin1String("mkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME\"\n") ++ << QLatin1String("ln -sf \"$QBS_TARGET_PATH\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME/$FULL_PRODUCT_NAME\"\n") ++ << QLatin1String("fi\n"); ++ } ++ ++ PBXProject xcodeProject(m_baseBuildDirectory.absoluteFilePath(QLatin1String("project.pbxproj"))); ++ xcodeProject.setName(m_projectName); ++ ++ // Only potentially add absolute paths if the qbs source directory and build directory differ; ++ // this makes the Xcode project file relocatable (and thus version trackable) if generated in-source ++ const QString qbsSourceDirectory = m_qbsProjectFile.absolutePath(); ++ if (m_baseBuildDirectory.absolutePath() != qbsSourceDirectory) { ++ // TODO: Make it relative anyways ++ xcodeProject.setProjectDirPath(qbsSourceDirectory); ++ xcodeProject.rootGroup()->setPath(xcodeProject.projectDirPath()); ++ } ++ ++ foreach (const qbs::Project &project, projects()) { ++ XCBuildConfiguration *xcconfig = xcodeProject.buildConfigurationList()->addBuildConfiguration(xcodeConfigurationName(project)); ++ xcodeProject.buildConfigurationList()->setDefaultBuildConfiguration(xcconfig->name()); ++ ++ // TODO: Ideally should go into a configuration file instead of in the project file itself ++ // TODO: Is there a better way to find the qbs binary to invoke? For example, someone could use libqbscore to invoke generators... ++ xcconfig->setBuildSetting(QLatin1String("QBS"), QCoreApplication::applicationFilePath()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROFILE"), project.profile()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROJECT_DIRECTORY"), xcodeInsertPlaceholdersInValue(project, qbsSourceDirectory)); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROJECT_FILE_NAME"), m_qbsProjectFile.fileName()); ++ ++ // or baseBuildDirectory + profileName + '-' + buildVariant ++ xcconfig->setBuildSetting(QLatin1String("__QBS_BASE_BUILD_DIRECTORY"), QLatin1String("$(PROJECT_FILE_PATH)/..")); ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_DIRECTORY"), QLatin1String("$(__QBS_BASE_BUILD_DIRECTORY:standardizepath)")); ++ ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_VARIANT"), buildVariant(project)); ++ ++ foreach (const XcodeBuildSettingMapping &setting, XcodeBuildSettingMapping::defaultBuildSettingsMap()) { ++ setting.applyToConfiguration(xcconfig, project); ++ } ++ ++ // Add all the Qbs products as Xcode targets ++ addProjectRecursive(project, project.projectData(), installOptions, xcodeProject, xcodeProject.rootGroup()); ++ ++ // Do some per-target ops ++ foreach (const qbs::ProductData &qbsProductData, project.projectData().allProducts()) { ++ PBXTarget *qbsXcodeTarget = xcodeProject.targetNamed(qbsProductData.name()); ++ if (!qbsXcodeTarget) ++ throw new qbs::ErrorInfo(Tr::tr("could not find PBXTarget for qbs product '%1'").arg(qbsProductData.name())); ++ ++ // Set up target dependencies ++ foreach (const QString &dependencyName, qbsProductData.dependencies()) { ++ PBXTargetDependency *dependentXcodeTarget = new PBXTargetDependency(&xcodeProject); ++ dependentXcodeTarget->setTarget(xcodeProject.targetNamed(dependencyName)); ++ if (!dependentXcodeTarget->target()) ++ throw new qbs::ErrorInfo(Tr::tr("could not find PBXTarget for qbs product '%1'").arg(dependencyName)); ++ ++ qbsXcodeTarget->targetDependencies().append(dependentXcodeTarget); ++ } ++ ++ // Set up a scheme for the target ++ static const QString xcshareddata = QLatin1String("xcshareddata"); ++ static const QString xcschemes = QLatin1String("xcschemes"); ++ QDir schemesDirectory(m_baseBuildDirectory); ++ if (!schemesDirectory.cd(xcshareddata)) { ++ if (!schemesDirectory.mkdir(xcshareddata) || !schemesDirectory.cd(xcshareddata)) { ++ throw ErrorInfo(Tr::tr("failed to make Xcode project shared data directory")); ++ } ++ } ++ if (!schemesDirectory.cd(xcschemes)) { ++ if (!schemesDirectory.mkdir(xcschemes) || !schemesDirectory.cd(xcschemes)) { ++ throw ErrorInfo(Tr::tr("failed to make Xcode project shared schemes directory")); ++ } ++ } ++ ++ const QString schemeFilePath(schemesDirectory.absoluteFilePath(QString(QLatin1String("%1.xcscheme")).arg(qbsXcodeTarget->name()))); ++ XCScheme xcscheme; ++ xcscheme.setParallelizeBuildables(false); // this must be turned off because it conflicts with qbs build directory locking ++ xcscheme.setProject(&xcodeProject); ++ xcscheme.setTarget(qbsXcodeTarget); ++ ++ if (dynamic_cast(qbsXcodeTarget)) { ++ xcscheme.setCustomExecutableFilePath(installedFilePathForTargetArtifact(project, qbsProductData, installOptions, runnableOrPrimaryTargetArtifactForProduct(qbsProductData))); ++ } ++ ++ if (!xcscheme.serialize(schemeFilePath)) { ++ throw ErrorInfo(Tr::tr("Failed to generate scheme %1").arg(schemeFilePath)); ++ } ++ } ++ } ++ ++ if (xcodeProject.writeToFileSystemProjectFile(true, true, true)) ++ qDebug() << "Generated" << qPrintable(xcodeWrapperName); ++ else ++ throw ErrorInfo(Tr::tr("Failed to generate %1").arg(xcodeWrapperName)); ++} ++ ++QString makePathRelativeTo(const QString &path, const QString &basePath) ++{ ++ QString rootPath(basePath); ++ if (!rootPath.endsWith(QLatin1Char('/'))) ++ rootPath += QLatin1Char('/'); ++ ++ QString filePath(path); ++ if (filePath.startsWith(rootPath)) ++ filePath.remove(0, rootPath.size()); ++ ++ return filePath; ++} ++ ++void XcodeGenerator::addProjectRecursive(const Project &project, const ProjectData &projectData, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup) ++{ ++ foreach (const ProjectData &subProjectData, projectData.subProjects()) ++ { ++ PBXGroup *baseGroup = PBXGroup::groupWithName(subProjectData.name(), xcodeGroup); ++ baseGroup->setSourceTree(PBX::Group); ++ ++ // Add the qbs project file for this project ++ foreach (PBXFileReference *ref, baseGroup->addFiles(QStringList() << makePathRelativeTo(m_qbsProjectFile.absoluteFilePath(), xcodeProject.projectDirPath()), false, false)) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ ++ addProjectRecursive(project, subProjectData, installOptions, xcodeProject, baseGroup); ++ } ++ ++ foreach (const ProductData &product, projectData.products()) ++ { ++ addProduct(project, product, installOptions, xcodeProject, xcodeGroup); ++ } ++} ++ ++static inline QVariant flattenXcconfigList(const QStringList &list) { ++ if (list.isEmpty()) ++ return QString(); ++ if (list.size() == 1) ++ return list.first(); ++ return list; ++} ++ ++void XcodeGenerator::addProduct(const Project &project, const ProductData &product, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup) ++{ ++ PBXTarget *xcodeTarget = xcodeTargetForProduct(&xcodeProject, product); ++ xcodeTarget->setName(product.name()); ++ xcodeTarget->setProductType(xcodeProductType(product)); ++ ++ PBXLegacyTarget *xcodeLegacyTarget = dynamic_cast(xcodeTarget); ++ if (xcodeLegacyTarget) { ++ xcodeLegacyTarget->setBuildWorkingDirectory(XcodeGenerator::xcodeInsertPlaceholdersInValue(project, xcodeProject.projectDirPath()).toString()); ++ xcodeLegacyTarget->setBuildToolPath(QLatin1String("/bin/bash")); ++ ++ QStringList buildArguments; ++ buildArguments << QLatin1String("\"$(PROJECT_FILE_PATH)\"/") + kQbsRunnerFileName; ++ buildArguments << QLatin1String("\"$(ACTION)\""); ++ buildArguments << QLatin1String("-f"); ++ ++ // Can't use xcodeInsertPlaceholdersInValue because we want to do a little acrobatics to get quoting 100% right... ++ const QDir sourceDirectory(xcodeProject.projectDirPath()); ++ QString resultingFilePath = m_qbsProjectFile.absoluteFilePath(); ++ if (resultingFilePath.startsWith(sourceDirectory.absolutePath())) { ++ resultingFilePath.replace(0, sourceDirectory.absolutePath().size(), QString()); ++ buildArguments << QLatin1String("\"$(SRCROOT)\"") + shellQuote(resultingFilePath); ++ } else { ++ buildArguments << shellQuote(resultingFilePath); ++ } ++ ++ buildArguments << QLatin1String("-d"); ++ buildArguments << QLatin1String("\"$(CONFIGURATION_BUILD_DIR)\""); ++ buildArguments << QLatin1String("-p"); ++ buildArguments << QLatin1String("\"$(TARGET_NAME)\""); // target and product name are opposites in qbs and Xcode ++ buildArguments << QLatin1String("\"$(QBS_BUILD_VARIANT)\""); ++ buildArguments << QLatin1String("\"profile:$(QBS_PROFILE)\""); ++ ++ xcodeLegacyTarget->setBuildArgumentsString(buildArguments.join(QLatin1String(" "))); ++ xcodeLegacyTarget->setPassBuildSettingsInEnvironment(true); ++ } ++ ++ XCBuildConfiguration *xcconfig = xcodeTarget->buildConfigurationList()->addBuildConfiguration(xcodeConfigurationName(product)); ++ xcodeTarget->buildConfigurationList()->setDefaultBuildConfiguration(xcconfig->name()); ++ ++ // TODO: If a product with the same name was already added, don't add its files AGAIN ++ // Create a root PBX group for the target's files and other groups ++ PBXGroup *xcodeProductGroup = m_productGroups.value(product.name()); ++ const bool productFilesAlreadyAdded = !!xcodeProductGroup; ++ if (!productFilesAlreadyAdded) { ++ m_productGroups.insert(product.name(), xcodeProductGroup = PBXGroup::groupWithName(product.name(), xcodeGroup)); ++ ++ // Add the qbs project file for this product ++ foreach (PBXFileReference *ref, xcodeProductGroup->addFiles(QStringList() << makePathRelativeTo(product.location().filePath(), xcodeProject.projectDirPath()), false, false)) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ } ++ ++ QSet excludedSources; ++ ++ // Set up all the groups ++ foreach (const GroupData &groupData, product.groups()) ++ { ++ PBXGroup *group = xcodeProductGroup; ++ if (groupData.name() == product.name()) { ++ // This group has the same name as the product itself so we'll just add the files ++ // directly to the "product" group we created earlier instead of creating a new one ++ foreach (const XcodeBuildSettingMapping &setting, XcodeBuildSettingMapping::defaultBuildSettingsMap()) { ++ setting.applyToConfiguration(xcconfig, project, product, groupData); ++ } ++ ++ xcodeTarget->setProductName(xcodeTarget->buildSetting(QLatin1String("PRODUCT_NAME"), buildVariant(product)).toString()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROFILE"), product.profile()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_VARIANT"), buildVariant(product)); ++ } else { ++ // Create a group for this group ++ group = PBXGroup::groupWithName(groupData.name(), xcodeProductGroup); ++ } ++ ++ // Add the source files to the group ++ group->setSourceTree(PBX::Group); ++ QList fileRefs; ++ if (!productFilesAlreadyAdded) ++ fileRefs = addGroupFiles(&xcodeProject, group, groupData); ++ ++ // If the group is enabled, then we'll actually BUILD them in addition to merely listing them ++ if (groupData.isEnabled()) { ++ foreach (PBXFileReference *ref, fileRefs) { ++ // Skip header files... wish there was a better way ++ if (ref->path().endsWith(QLatin1String(".h")) || ++ ref->path().endsWith(QLatin1String(".hh"))) { ++ continue; ++ } ++ ++ xcodeTarget->defaultSourceCodeBuildPhase()->addReference(ref); ++ } ++ } else { ++ foreach (PBXFileReference *ref, fileRefs) ++ excludedSources.insert(ref->path()); ++ } ++ } ++ ++ xcconfig->setBuildSetting(QLatin1String("EXCLUDED_SOURCE_FILE_NAMES"), flattenXcconfigList(QStringList(excludedSources.toList()))); ++ ++ QString sysroot = product.moduleProperties().getModuleProperty(QLatin1String("cpp"), QLatin1String("sysroot")).toString(); ++ QStringList frameworkPaths; ++ frameworkPaths += product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("frameworkPaths")); ++ frameworkPaths += product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("systemFrameworkPaths")); ++ frameworkPaths += sysroot + QLatin1String("/Library/Frameworks"); ++ frameworkPaths += sysroot + QLatin1String("/System/Library/Frameworks"); ++ frameworkPaths += QLatin1String("/Library/Frameworks"); ++ frameworkPaths += QLatin1String("/System/Library/Frameworks"); ++ const QStringList frameworkNames = product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("frameworks")); ++ const QStringList weakFrameworkNames = product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("weakFrameworks")); ++ ++ // TODO TODO TODO dynamicLibraries and weakDynamicLibraries? ++ ++ // A framework can't be strongly AND weakly linked... TODO: fail more gracefully ++ QBS_CHECK(frameworkNames.toSet().intersect(weakFrameworkNames.toSet()).isEmpty()); ++ const QStringList allFrameworkNames = QStringList() << frameworkNames << weakFrameworkNames; ++ ++ Q_FOREACH (const QString &frameworkName, allFrameworkNames) { ++ // Whether a full path equivalent for the framework was found ++ bool foundFramework = false; ++ ++ Q_FOREACH (const QString &frameworkPath, frameworkPaths) { ++ QString candidateFrameworkPath = QFileInfo(frameworkPath + QLatin1String("/") + frameworkName + QLatin1String(".framework")).canonicalFilePath(); ++ if (QFileInfo(candidateFrameworkPath).exists()) { ++ QBS_CHECK(!candidateFrameworkPath.isEmpty()); ++ ++ const QString sysrootedCandidateFrameworkPath = candidateFrameworkPath.mid(sysroot.size() + 1 /* for the path separator */); ++ ++ // Check for an existing reference (could happen if a framework is specified multiple times) ++ PBXFileReference *existingReference = Q_NULLPTR; ++ Q_FOREACH (PBXReference *ref, xcodeProject.frameworksRefGroup()->children()) { ++ if (PBXFileReference *fileRef = dynamic_cast(ref)) { ++ if ((fileRef->sourceTree() == PBX::SdkRoot && fileRef->path() == sysrootedCandidateFrameworkPath) || ++ (fileRef->sourceTree() == PBX::Absolute && fileRef->path() == candidateFrameworkPath)) { ++ existingReference = fileRef; ++ break; ++ } ++ } ++ } ++ ++ QList refs; ++ ++ // Create a new file reference since one wasn't already found in the Frameworks group ++ if (!existingReference) { ++ refs = xcodeProject.frameworksRefGroup()->addFiles(QStringList() << candidateFrameworkPath, false, false); ++ Q_FOREACH (PBXFileReference *frameworkRef, refs) { ++ if (!sysroot.isEmpty() && frameworkRef->path().startsWith(sysroot)) { ++ frameworkRef->setPath(sysrootedCandidateFrameworkPath); ++ frameworkRef->setSourceTree(PBX::SdkRoot); ++ } ++ } ++ } else { ++ refs.append(existingReference); ++ } ++ ++ // Add the framework to the Frameworks build phase ++ Q_FOREACH (PBXFileReference *frameworkRef, refs) { ++ xcodeTarget->defaultFrameworksBuildPhase()->addReference(frameworkRef); ++ } ++ ++ foundFramework = true; ++ break; ++ } ++ } ++ ++ // Not a normal case, and will cause a build failure, but is better than silently ignoring it... ++ if (!foundFramework) { ++ Q_FOREACH (PBXFileReference *frameworkRef, xcodeProject.frameworksRefGroup()->addFiles(QStringList() << frameworkName + QLatin1String(".framework"), false, false)) { ++ QBS_CHECK(!frameworkRef->path().isEmpty()); ++ if (PBXBuildFile *frameworkBuildRef = xcodeTarget->defaultFrameworksBuildPhase()->addReference(frameworkRef)) { ++ const bool isWeaklyLinked = weakFrameworkNames.contains(frameworkName); ++ frameworkBuildRef->setWeakLinkedLibrary(isWeaklyLinked); ++ } ++ } ++ } ++ } ++ ++ // Add a reference for the main target artifact in root "Products" group ++ TargetArtifact artifact = runnableOrPrimaryTargetArtifactForProduct(product); ++ QString realArtifactPath = installedFilePathForTargetArtifact(project, product, installOptions, artifact); ++ if (!realArtifactPath.isEmpty()) { ++ // "simple" generator ++ if (!xcodeLegacyTarget) { ++ // Chop off the Qbs build dir from the artifact path, because they will actually end ++ // up in Xcode's build directory, not the build directory Qbs would use ++ const QString buildDirectory = project.projectData().buildDirectory(); ++ if (realArtifactPath.startsWith(buildDirectory)) ++ realArtifactPath.remove(0, buildDirectory.size()); ++ ++ if (realArtifactPath.startsWith(QLatin1Char('/'))) ++ realArtifactPath.remove(0, 1); ++ } else { ++ realArtifactPath = xcodeInsertPlaceholdersInValue(project, realArtifactPath).toString(); ++ } ++ ++ QBS_CHECK(!realArtifactPath.isEmpty()); ++ ++ QList refs = xcodeProject.productRefGroup()->addFiles(QStringList() << realArtifactPath, false, false); ++ foreach (PBXFileReference *ref, refs) ++ { ++ if (!xcodeLegacyTarget) { ++ ref->setSourceTree(PBX::BuildProductDir); ++ ++ // This causes Xcode to force the file reference to a relative path relative to the build products dir ++ // Therefore, we must symlink artifacts in the Xcode build directory to the ones in the qbs build directory ++ // NOTE: This will crash Xcode if set for a PBXLegacyTarget (claiming an empty string global hex ID) ++ xcodeTarget->setProductReference(ref); ++ } ++ ++ // TODO: Technically this should be composed of other variables based on the product type ++ // $(WRAPPER_NAME) for bundles, $(EXECUTABLE_NAME) otherwise? ++ xcconfig->setBuildSetting(QLatin1String("FULL_PRODUCT_NAME"), QFileInfo(realArtifactPath).fileName()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_TARGET_PATH"), xcodeInsertPlaceholdersInValue(project, realArtifactPath)); ++ } ++ } ++ ++ xcodeProject.addTarget(xcodeTarget); ++} ++ ++QList XcodeGenerator::addGroupFiles(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData) ++{ ++ QStringList relativeFilePaths; ++ foreach (QString filePath, groupData.allFilePaths()) { ++ relativeFilePaths += makePathRelativeTo(filePath, xcodeProject->projectDirPath()); ++ } ++ ++ // Add all the files in the group as file references so they show up in the project tree ++ QList fileRefs = xcodeGroup->addFiles(relativeFilePaths, false, false); ++ foreach (PBXFileReference *ref, fileRefs) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ ++ return fileRefs; ++} ++ ++PBXTarget *XcodeGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ Q_UNUSED(xcodeProject); ++ PBXTarget *target = xcodeProject->targetNamed(product.name()); ++ ++ // Native targets without a type won't build, so use a legacy target in this case ++ if (!target && xcodeProductType(product) == 0) { ++ return new PBXLegacyTarget(xcodeProject); ++ } ++ ++ return target; +} + +/*! @@ -4510,36 +5518,85 @@ index 0000000..ea53d0e + */ +PBX::PBXProductType XcodeGenerator::xcodeProductType(const ProductData &product) +{ -+ const GroupData groupData = findRootGroup(product); -+ QStringList productType = groupData.properties().getProperty(QLatin1String("type")).toStringList(); ++ const QStringList productType = product.type(); ++ const bool isBundle = product.moduleProperties().getModuleProperty(QLatin1String("bundle"), QLatin1String("isBundle")).toBool(); + -+ if (productType.contains(QLatin1String("applicationbundle"))) -+ return PBX::Application; + if (productType.contains(QLatin1String("application"))) -+ return PBX::Tool; ++ return isBundle ? PBX::Application : PBX::Tool; + if (productType.contains(QLatin1String("dynamiclibrary"))) -+ return PBX::LibraryDynamic; ++ return isBundle ? PBX::Framework : PBX::LibraryDynamic; + if (productType.contains(QLatin1String("staticlibrary"))) -+ return PBX::LibraryStatic; -+ if (productType.contains(QLatin1String("frameworkbundle"))) -+ return PBX::Framework; ++ return isBundle ? PBX::StaticFramework : PBX::LibraryStatic; + if (productType.contains(QLatin1String("bundle"))) + return PBX::Bundle; + + return (PBX::PBXProductType)0; +} + ++static QString _xcodeConfigurationName(QString variantName, const QString &profileName, bool includeProfileName) ++{ ++ QBS_CHECK(!variantName.isEmpty()); ++ variantName.replace(0, 1, variantName[0].toUpper()); ++ if (includeProfileName) { ++ variantName += QLatin1String("_") + profileName; ++ } ++ return variantName; +} -diff --git a/src/plugins/generator/xcode/xcodegenerator.h b/src/plugins/generator/xcode/xcodegenerator.h ++ ++QString XcodeGenerator::xcodeConfigurationName(const Project &project) ++{ ++ return _xcodeConfigurationName(buildVariant(project), project.profile(), m_multipleProfiles); ++} ++ ++QString XcodeGenerator::xcodeConfigurationName(const ProductData &product) ++{ ++ return _xcodeConfigurationName(buildVariant(product), product.profile(), m_multipleProfiles); ++} ++ ++/*! ++ * \brief If the value is a path or list of paths, ++ * returns it with the prefixes of paths replaced by $(SRCROOT), $(PROJECT_FILE_PATH)/.., etc., ++ * as appropriate. ++ * If the value is not a path, returns the original value unmodified. ++ */ ++QVariant XcodeGenerator::xcodeInsertPlaceholdersInValue(const qbs::Project &project, const QVariant &variant) ++{ ++ if (variant.type() == QVariant::List) { ++ QVariantList list; ++ foreach (const QVariant &v, variant.toList()) ++ list.append(xcodeInsertPlaceholdersInValue(project, v)); ++ return list; ++ } ++ ++ // If the value is a path and it begins with the value of SRCROOT or PROJECT_FILE_PATH/.., replace it ++ if (variant.type() == QVariant::String) { ++ // This should end up being the same as PBXProject::projectDirPath(), but if projectDirPath ++ // is the empty string (for example, when the xcodeproj resides in the qbs source directory, ++ // things would break, so prefer the Qbs value (plus, it saves a parameter to this function) ++ const QDir sourceDirectory = QFileInfo(project.projectData().location().filePath()).absolutePath(); ++ if (variant.toString().startsWith(sourceDirectory.absolutePath())) ++ return variant.toString().replace(0, sourceDirectory.absolutePath().size(), QLatin1String("$(SRCROOT)")); ++ ++ const QDir buildDirectory(project.projectData().buildDirectory()); ++ Q_ASSERT(buildDirectory.isAbsolute() && buildDirectory.exists()); ++ if (variant.toString().startsWith(buildDirectory.absolutePath())) ++ return variant.toString().replace(0, buildDirectory.absolutePath().size(), QLatin1String("$(QBS_BUILD_DIRECTORY)/$(QBS_PROFILE)-$(QBS_BUILD_VARIANT)")); ++ } ++ ++ return variant; ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodegenerator.h b/src/lib/corelib/generators/xcode/xcodegenerator.h new file mode 100644 -index 0000000..e2bc712 +index 0000000..765174a --- /dev/null -+++ b/src/plugins/generator/xcode/xcodegenerator.h -@@ -0,0 +1,53 @@ ++++ b/src/lib/corelib/generators/xcode/xcodegenerator.h +@@ -0,0 +1,81 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4569,36 +5626,64 @@ index 0000000..e2bc712 +#ifndef QBS_XCODEGENERATOR_H +#define QBS_XCODEGENERATOR_H + -+#include ++#include ++#include +#include "pbxproducttype.h" + ++#include ++ ++class PBXFileReference; ++class PBXGroup; ++class PBXProject; ++class PBXTarget; ++ +namespace qbs { + +class ProductData; ++struct XcodeBuildSettingMapping; + -+class XcodeGenerator : public qbs::Generator ++class XcodeGenerator : public qbs::ProjectGenerator +{ ++public: ++ virtual void generate(const InstallOptions &installOptions); ++ virtual void addProjectRecursive(const Project &project, const ProjectData &projectData, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup); ++ virtual void addProduct(const Project &project, const ProductData &product, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup); ++ virtual QList addGroupFiles(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData); ++ ++ virtual PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++ ++ QString xcodeConfigurationName(const Project &project); ++ QString xcodeConfigurationName(const ProductData &product); ++ ++ static QVariant xcodeInsertPlaceholdersInValue(const qbs::Project &project, const QVariant &variant); ++ ++ static PBX::PBXProductType xcodeProductType(const ProductData &product); ++ +protected: + XcodeGenerator(); + -+public: -+ static QString xcodeExecutablePrefix(const ProductData &product); -+ static PBX::PBXProductType xcodeProductType(const ProductData &product); ++ // TODO: Move to base class ++ virtual void setupGenerator(); ++ bool m_multipleProfiles; ++ QString m_projectName; ++ QFileInfo m_qbsProjectFile; ++ QDir m_baseBuildDirectory; ++ QMap m_productGroups; +}; + +} + +#endif // QBS_XCODEGENERATOR_H -diff --git a/src/plugins/generator/xcode/xcodenativegenerator.cpp b/src/plugins/generator/xcode/xcodenativegenerator.cpp +diff --git a/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp b/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp new file mode 100644 -index 0000000..ef6f0f3 +index 0000000..7654b8f --- /dev/null -+++ b/src/plugins/generator/xcode/xcodenativegenerator.cpp -@@ -0,0 +1,136 @@ ++++ b/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp +@@ -0,0 +1,58 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4627,14 +5712,7 @@ index 0000000..ef6f0f3 + +#include "xcodenativegenerator.h" + -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include ++#include "pbx.h" + +namespace qbs { + @@ -4649,98 +5727,27 @@ index 0000000..ef6f0f3 + return QLatin1String("xcode"); +} + -+void XcodeNativeGenerator::generate(const Project &project) ++void XcodeNativeGenerator::generate(const InstallOptions &installOptions) +{ -+ const QString buildDirectory = project.projectData().buildDirectory(); -+ QDir dir(buildDirectory); -+ Q_ASSERT(dir.isAbsolute() && dir.exists()); ++ XcodeGenerator::generate(installOptions); ++} + -+ const QString &projectFileName = project.projectData().name() + QLatin1String(".xcodeproj"); -+ if (!dir.cd(projectFileName)) -+ if (!dir.mkdir(projectFileName) || !dir.cd(projectFileName)) -+ throw ErrorInfo(Tr::tr("failed to make project directory")); -+ -+ PBXProject xcodeProject(dir.absoluteFilePath(QLatin1String("project.pbxproj"))); -+ xcodeProject.setName(project.projectData().name()); -+ xcodeProject.setProjectDirPath(QFileInfo(project.projectData().location().filePath()).path()); -+ xcodeProject.buildConfigurationList()->addBuildConfiguration(QLatin1String("Debug")); -+ xcodeProject.buildConfigurationList()->addBuildConfiguration(QLatin1String("Release")); -+ -+ // Add all the Qbs products as Xcode targets -+ foreach (const ProductData &product, project.projectData().allProducts()) -+ { -+ PBXLegacyTarget *xcodeTarget = new PBXLegacyTarget(&xcodeProject); -+ xcodeTarget->setName(product.name()); -+ xcodeTarget->setProductType(xcodeProductType(product)); -+ xcodeTarget->setBuildToolPath(QCoreApplication::applicationFilePath()); // TODO: Probably not a good idea... -+ xcodeTarget->setBuildArgumentsString(QLatin1String("$(ACTION) -f \"") + project.projectData().location().filePath() + QLatin1String("\" -p \"") + product.name() + QLatin1String("\"")); -+ xcodeTarget->setBuildWorkingDirectory(xcodeProject.projectDirPath()); -+ xcodeTarget->buildConfigurationList()->addBuildConfiguration(QLatin1String("Debug")); -+ xcodeTarget->buildConfigurationList()->addBuildConfiguration(QLatin1String("Release")); -+ -+ // Create a root PBX group for the target's files and other groups -+ PBXGroup *xcodeProductGroup = PBXGroup::groupWithName(product.name(), xcodeProject.rootGroup()); -+ -+ // Set up all the groups -+ foreach (const GroupData &groupData, product.groups()) -+ { -+ PBXGroup *group = xcodeProductGroup; -+ if (groupData.name() == product.name()) { -+ // This group has the same name as the product itself so we'll just add the files -+ // directly to the "product" group we created earlier instead of creating a new one -+ //populateXcodeTargetProperties(xcodeTarget, product, groupData); -+ } else { -+ // Create a group for this group -+ group = PBXGroup::groupWithName(groupData.name(), xcodeProductGroup); -+ } -+ -+ // Add the source files to the group -+ group->setSourceTree(PBX::Group); -+ //populateXcodeGroup(&xcodeProject, group, groupData, xcodeTarget); -+ } -+ -+ // TODO: find a way to decide which target artifact becomes the target's product reference -+ Q_ASSERT(product.targetArtifacts().size() <= 1); -+ -+ // Add references for each target artifact in root "Products" group -+ foreach (const TargetArtifact &artifact, product.targetArtifacts()) -+ { -+ QList refs = xcodeProject.productRefGroup()->addFiles(QStringList() << artifact.filePath(), false, false); -+ foreach (PBXFileReference *ref, refs) -+ { -+ ref->setSourceTree(PBX::BuildProductDir); -+ -+ // reason for the assert <= 1 -+ xcodeTarget->setProductReference(ref); -+ } -+ } -+ -+ xcodeProject.addTarget(xcodeTarget); -+ } -+ -+ // TODO: For some reason this property confuses Xcode. Seems to indicate the path that relative -+ // paths are resolved against, but maybe it's referring to the .xcodeproj? -+ // We'll use the root group instead to get what we want -+ xcodeProject.rootGroup()->setPath(xcodeProject.projectDirPath()); -+ xcodeProject.setProjectDirPath(""); -+ -+ if (xcodeProject.writeToFileSystemProjectFile(true, true, true)) -+ qDebug() << "Generated" << qPrintable(projectFileName); -+ else -+ throw ErrorInfo(Tr::tr("Failed to generate %1").arg(projectFileName)); ++PBXTarget *XcodeNativeGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ return XcodeGenerator::xcodeTargetForProduct(xcodeProject, product) ?: new PBXLegacyTarget(xcodeProject); +} + +} -diff --git a/src/plugins/generator/xcode/xcodenativegenerator.h b/src/plugins/generator/xcode/xcodenativegenerator.h +diff --git a/src/lib/corelib/generators/xcode/xcodenativegenerator.h b/src/lib/corelib/generators/xcode/xcodenativegenerator.h new file mode 100644 -index 0000000..d964b94 +index 0000000..a04f8df --- /dev/null -+++ b/src/plugins/generator/xcode/xcodenativegenerator.h -@@ -0,0 +1,53 @@ ++++ b/src/lib/corelib/generators/xcode/xcodenativegenerator.h +@@ -0,0 +1,52 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4775,8 +5782,6 @@ index 0000000..d964b94 + +namespace qbs { + -+class Project; -+ +class XcodeNativeGenerator : public XcodeGenerator +{ +public: @@ -4784,22 +5789,23 @@ index 0000000..d964b94 + + QString generatorName() const; + -+ void generate(const Project &project); ++ void generate(const InstallOptions &installOptions); ++ PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); +}; + +} + +#endif // QBS_XCODENATIVEGENERATOR_H -diff --git a/src/plugins/generator/xcode/xcodesimplegenerator.cpp b/src/plugins/generator/xcode/xcodesimplegenerator.cpp +diff --git a/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp b/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp new file mode 100644 -index 0000000..7bd9b05 +index 0000000..e1bceca --- /dev/null -+++ b/src/plugins/generator/xcode/xcodesimplegenerator.cpp -@@ -0,0 +1,275 @@ ++++ b/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp +@@ -0,0 +1,58 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -4828,35 +5834,12 @@ index 0000000..7bd9b05 + +#include "xcodesimplegenerator.h" + -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include ++#include "pbx.h" + +namespace qbs { + +using namespace Internal; + -+struct XcodeSetting { -+ QString xcodeName; -+ QString qbsModule; -+ QString qbsName; -+ bool isList; -+ -+ XcodeSetting(const QString &xcodeName, const QString &qbsModule, -+ const QString &qbsName, bool isList); -+}; -+ -+XcodeSetting::XcodeSetting(const QString &xcodeName, const QString &qbsModule, -+ const QString &qbsName, bool isList = false) -+ : xcodeName(xcodeName), qbsModule(qbsModule), qbsName(qbsName), isList(isList) -+{ -+} -+ +XcodeSimpleGenerator::XcodeSimpleGenerator() +{ +} @@ -4866,221 +5849,27 @@ index 0000000..7bd9b05 + return QLatin1String("xcode-simple"); +} + -+QList xcodeSettingsMap() ++void XcodeSimpleGenerator::generate(const InstallOptions &installOptions) +{ -+ const QString cpp = QLatin1String("cpp"); -+ -+ QList settings; -+ settings += XcodeSetting(QLatin1String("GCC_PREPROCESSOR_DEFINITIONS"), cpp, QLatin1String("defines"), true); -+ settings += XcodeSetting(QLatin1String("HEADER_SEARCH_PATHS"), cpp, QLatin1String("includePaths"), true); -+ settings += XcodeSetting(QLatin1String("MACOSX_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumOsxVersion")); -+ settings += XcodeSetting(QLatin1String("OTHER_LDFLAGS"), cpp, QLatin1String("linkerFlags"), true); -+ return settings; ++ XcodeGenerator::generate(installOptions); +} + -+static void populateXcodeTargetProperties(PBXNativeTarget *xcodeTarget, const qbs::ProductData &productData, const qbs::GroupData &groupData) ++PBXTarget *XcodeSimpleGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) +{ -+ // Get the "target name" (Qbs terminology) and use it to set the "product name" (Xcode terminology) -+ xcodeTarget->setProductName(groupData.properties().getProperty(QLatin1String("targetName")).toString()); -+ if (xcodeTarget->productName().isEmpty()) -+ xcodeTarget->setProductName(xcodeTarget->name()); -+ xcodeTarget->setBuildSetting(QLatin1String("PRODUCT_NAME"), xcodeTarget->productName()); -+ -+ QString exePrefix = XcodeGenerator::xcodeExecutablePrefix(productData); -+ if (!exePrefix.isEmpty()) -+ xcodeTarget->setBuildSetting(QLatin1String("EXECUTABLE_PREFIX"), exePrefix); -+ -+ QString architecture = groupData.properties().getModuleProperty(QLatin1String("qbs"), QLatin1String("architecture")).toString(); -+ if (!architecture.isEmpty()) { -+ QString arch = architecture; -+ if (arch == QLatin1String("x86")) -+ arch = QLatin1String("i386"); -+ -+ xcodeTarget->setBuildSetting(QLatin1String("ARCHS"), arch); -+ } -+ -+ QString sysroot = groupData.properties().getModuleProperty(QLatin1String("qbs"), QLatin1String("sysroot")).toString(); -+ if (!sysroot.isEmpty()) { -+ xcodeTarget->setBuildSetting(QLatin1String("SDKROOT"), sysroot); -+ } -+ -+ QStringList platform = groupData.properties().getModulePropertiesAsStringList(QLatin1String("qbs"), QLatin1String("targetOS")); -+ if (platform.contains(QLatin1String("osx"))) { -+ if (sysroot.isEmpty()) -+ xcodeTarget->setBuildSetting(QLatin1String("SDKROOT"), QLatin1String("macosx")); -+ xcodeTarget->setBuildSetting(QLatin1String("SUPPORTED_PLATFORMS"), QStringList() << QLatin1String("macosx")); -+ } else if (platform.contains(QLatin1String("ios"))) { -+ if (sysroot.isEmpty()) -+ xcodeTarget->setBuildSetting(QLatin1String("SDKROOT"), QLatin1String("iphoneos")); -+ xcodeTarget->setBuildSetting(QLatin1String("SUPPORTED_PLATFORMS"), QStringList() << QLatin1String("iphonesimulator") << QLatin1String("iphoneos")); -+ } else { -+ throw ErrorInfo(Tr::tr("Unsupported platform for Xcode project: [%1]").arg(platform.join(QLatin1String(",")))); -+ } -+ -+ foreach (const XcodeSetting &setting, xcodeSettingsMap()) { -+ if (setting.isList) { -+ QVariantList list = groupData.properties().getModuleProperties(setting.qbsModule, setting.qbsName); -+ if (!list.isEmpty()) { -+ const QString inheritProperty = QLatin1String("$(") + setting.xcodeName + QLatin1String(")"); -+ list.append(inheritProperty); -+ xcodeTarget->setBuildSetting(setting.xcodeName, list); -+ } -+ } else { -+ const QVariant variant = groupData.properties().getModuleProperty(setting.qbsModule, setting.qbsName); -+ if (!variant.isNull()) { -+ xcodeTarget->setBuildSetting(setting.xcodeName, variant); -+ } -+ } -+ } -+} -+ -+static void populateXcodeGroup(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData, PBXTarget *xcodeTarget) -+{ -+ QString rootPath = xcodeProject->projectDirPath(); -+ if (!rootPath.endsWith(QLatin1Char('/'))) -+ rootPath += QLatin1Char('/'); -+ -+ QStringList relativeFilePaths; -+ foreach (QString filePath, groupData.allFilePaths()) { -+ if (filePath.startsWith(rootPath)) -+ filePath.remove(0, rootPath.size()); -+ relativeFilePaths += filePath; -+ } -+ -+ // Add all the files in the group as file references so they show up in the project tree -+ QList fileRefs = xcodeGroup->addFiles(relativeFilePaths, false, false); -+ foreach (PBXFileReference *ref, fileRefs) { -+ if (!ref->path().startsWith(QLatin1Char('/'))) { -+ ref->setSourceTree(PBX::Group); -+ } -+ } -+ -+ // If the group is enabled, then we'll actually BUILD them in addition to merely listing them -+ if (groupData.isEnabled()) -+ { -+ foreach (PBXFileReference *ref, fileRefs) -+ xcodeTarget->defaultSourceCodeBuildPhase()->addReference(ref); -+ } -+ -+ //group->setPath(groupData.properties().getProperty(QLatin1String("prefix")).toString()); -+ //qDebug() << groupData.properties().allProperties(); -+} -+ -+void XcodeSimpleGenerator::generate(const Project &project) -+{ -+ const QString buildDirectory = project.projectData().buildDirectory(); -+ QDir dir(buildDirectory); -+ Q_ASSERT(dir.isAbsolute() && dir.exists()); -+ -+ const QString &projectFileName = project.projectData().name() + QLatin1String(".xcodeproj"); -+ if (!dir.cd(projectFileName)) -+ if (!dir.mkdir(projectFileName) || !dir.cd(projectFileName)) -+ throw ErrorInfo(Tr::tr("failed to make project directory")); -+ -+ PBXProject xcodeProject(dir.absoluteFilePath(QLatin1String("project.pbxproj"))); -+ xcodeProject.setName(project.projectData().name()); -+ xcodeProject.setProjectDirPath(project.projectData().location().filePath()); -+ xcodeProject.buildConfigurationList()->addBuildConfiguration(QLatin1String("Debug")); -+ xcodeProject.buildConfigurationList()->addBuildConfiguration(QLatin1String("Release")); -+ -+ // Add all the Qbs products as Xcode targets -+ foreach (const ProductData &product, project.projectData().allProducts()) -+ { -+ PBXNativeTarget *xcodeTarget = new PBXNativeTarget(&xcodeProject); -+ xcodeTarget->setName(product.name()); -+ xcodeTarget->setProductType(xcodeProductType(product)); -+ xcodeTarget->buildConfigurationList()->addBuildConfiguration(QLatin1String("Debug")); -+ xcodeTarget->buildConfigurationList()->addBuildConfiguration(QLatin1String("Release")); -+ -+ // Create a root PBX group for the target's files and other groups -+ PBXGroup *xcodeProductGroup = PBXGroup::groupWithName(product.name(), xcodeProject.rootGroup()); -+ -+ // Set up all the groups -+ foreach (const GroupData &groupData, product.groups()) -+ { -+ PBXGroup *group = xcodeProductGroup; -+ if (groupData.name() == product.name()) { -+ // This group has the same name as the product itself so we'll just add the files -+ // directly to the "product" group we created earlier instead of creating a new one -+ populateXcodeTargetProperties(xcodeTarget, product, groupData); -+ } else { -+ // Create a group for this group -+ group = PBXGroup::groupWithName(groupData.name(), xcodeProductGroup); -+ } -+ -+ // Add the source files to the group -+ group->setSourceTree(PBX::Group); -+ populateXcodeGroup(&xcodeProject, group, groupData, xcodeTarget); -+ } -+ -+ // TODO: find a way to decide which target artifact becomes the target's product reference -+ Q_ASSERT(product.targetArtifacts().size() <= 1); -+ -+ // Add references for each target artifact in root "Products" group -+ foreach (const TargetArtifact &artifact, product.targetArtifacts()) -+ { -+ // Chop off the Qbs build dir from the artifact path, because they will actually end -+ // up in Xcode's build directory, not the build directory Qbs would use -+ QString realArtifactPath = artifact.filePath(); -+ if (realArtifactPath.startsWith(buildDirectory)) -+ realArtifactPath.remove(0, buildDirectory.size()); -+ -+ if (realArtifactPath.startsWith(QLatin1Char('/'))) -+ realArtifactPath.remove(0, 1); -+ -+ QList refs = xcodeProject.productRefGroup()->addFiles(QStringList() << realArtifactPath, false, false); -+ foreach (PBXFileReference *ref, refs) -+ { -+ ref->setSourceTree(PBX::BuildProductDir); -+ -+ // reason for the assert <= 1 -+ xcodeTarget->setProductReference(ref); -+ } -+ } -+ -+ xcodeProject.addTarget(xcodeTarget); -+ } -+ -+ QMapIterator i(project.projectConfiguration()); -+ while (i.hasNext()) -+ { -+ i.next(); -+ QString moduleName = i.key(); -+ QVariantMap moduleProperties = i.value().toMap(); -+ -+ QMapIterator j(moduleProperties); -+ while (j.hasNext()) -+ { -+ j.next(); -+ QString propertyName = j.key(); -+ QVariant propertyValue = j.value(); -+ // Do stuff with project properties... -+ } -+ } -+ -+ // TODO: For some reason this property confuses Xcode. Seems to indicate the path that relative -+ // paths are resolved against, but maybe it's referring to the .xcodeproj? -+ // We'll use the root group instead to get what we want -+ xcodeProject.rootGroup()->setPath(xcodeProject.projectDirPath()); -+ xcodeProject.setProjectDirPath(""); -+ -+ if (xcodeProject.writeToFileSystemProjectFile(true, true, true)) -+ qDebug() << "Generated" << qPrintable(projectFileName); -+ else -+ throw ErrorInfo(Tr::tr("Failed to generate %1").arg(projectFileName)); ++ return XcodeGenerator::xcodeTargetForProduct(xcodeProject, product) ?: new PBXNativeTarget(xcodeProject); +} + +} -diff --git a/src/plugins/generator/xcode/xcodesimplegenerator.h b/src/plugins/generator/xcode/xcodesimplegenerator.h +diff --git a/src/lib/corelib/generators/xcode/xcodesimplegenerator.h b/src/lib/corelib/generators/xcode/xcodesimplegenerator.h new file mode 100644 -index 0000000..e5cce26 +index 0000000..66f6419 --- /dev/null -+++ b/src/plugins/generator/xcode/xcodesimplegenerator.h -@@ -0,0 +1,53 @@ ++++ b/src/lib/corelib/generators/xcode/xcodesimplegenerator.h +@@ -0,0 +1,52 @@ +/**************************************************************************** +** -+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -+** Copyright (C) 2014 Petroules Corporation. ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. @@ -5115,8 +5904,6 @@ index 0000000..e5cce26 + +namespace qbs { + -+class Project; -+ +class XcodeSimpleGenerator : public XcodeGenerator +{ +public: @@ -5124,20 +5911,457 @@ index 0000000..e5cce26 + + QString generatorName() const; + -+ void generate(const Project &project); ++ void generate(const InstallOptions &installOptions); ++ PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); +}; + +} + +#endif // QBS_XCODESIMPLEGENERATOR_H -diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro -index d3823ae..9fe2e6b 100644 ---- a/src/plugins/plugins.pro -+++ b/src/plugins/plugins.pro -@@ -1,2 +1,2 @@ - TEMPLATE = subdirs --SUBDIRS = scanner -+SUBDIRS = generator scanner +diff --git a/src/lib/corelib/generators/xcode/xcscheme.cpp b/src/lib/corelib/generators/xcode/xcscheme.cpp +new file mode 100644 +index 0000000..dbcb994 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcscheme.cpp +@@ -0,0 +1,179 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxobject.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "xcscheme.h" ++#include ++#include ++#include ++ ++static const QString yes = QLatin1String("YES"); ++static const QString no = QLatin1String("NO"); ++ ++class XCSchemePrivate ++{ ++public: ++ XCSchemePrivate(); ++ PBXProject *project; ++ PBXTarget *target; ++ bool parallelizeBuildables; ++ bool buildImplicitDependencies; ++ QString customExecutableFilePath; ++}; ++ ++XCSchemePrivate::XCSchemePrivate() ++ : project() ++ , target() ++ , parallelizeBuildables(true) ++ , buildImplicitDependencies(true) ++{ ++} ++ ++XCScheme::XCScheme(QObject *parent) : ++ QObject(parent), d(new XCSchemePrivate) ++{ ++} ++ ++XCScheme::~XCScheme() ++{ ++ delete d; ++} ++ ++PBXProject *XCScheme::project() const ++{ ++ return d->project; ++} ++ ++void XCScheme::setProject(PBXProject *project) ++{ ++ d->project = project; ++} ++ ++PBXTarget *XCScheme::target() const ++{ ++ return d->target; ++} ++ ++void XCScheme::setTarget(PBXTarget *target) ++{ ++ d->target = target; ++} ++ ++bool XCScheme::parallelizeBuildables() const ++{ ++ return d->parallelizeBuildables; ++} ++ ++void XCScheme::setParallelizeBuildables(bool parallelize) ++{ ++ d->parallelizeBuildables = parallelize; ++} ++ ++bool XCScheme::buildImplicitDependencies() const ++{ ++ return d->buildImplicitDependencies; ++} ++ ++void XCScheme::setBuildImplicitDependencies(bool build) ++{ ++ d->buildImplicitDependencies = build; ++} ++ ++QString XCScheme::customExecutableFilePath() const ++{ ++ return d->customExecutableFilePath; ++} ++ ++void XCScheme::setCustomExecutableFilePath(const QString &customExecutableFilePath) ++{ ++ d->customExecutableFilePath = customExecutableFilePath; ++} ++ ++bool XCScheme::serialize(const QString &filePath) ++{ ++ QFile file(filePath); ++ if (file.open(QIODevice::WriteOnly)) { ++ QXmlStreamWriter writer(&file); ++ writer.setAutoFormatting(true); ++ writer.setAutoFormattingIndent(2); ++ ++ writer.writeStartDocument(); ++ writer.writeStartElement(QLatin1String("Scheme")); ++ ++ // now the "actions" ++ writer.writeStartElement(QLatin1String("BuildAction")); ++ writer.writeAttribute(QLatin1String("parallelizeBuildables"), d->parallelizeBuildables ? yes : no); ++ writer.writeAttribute(QLatin1String("buildImplicitDependencies"), d->buildImplicitDependencies ? yes : no); ++ writer.writeStartElement(QLatin1String("BuildActionEntries")); ++ writer.writeStartElement(QLatin1String("BuildActionEntry")); ++ writer.writeAttribute(QLatin1String("buildForTesting"), yes); ++ writer.writeAttribute(QLatin1String("buildForRunning"), yes); ++ writer.writeAttribute(QLatin1String("buildForProfiling"), yes); ++ writer.writeAttribute(QLatin1String("buildForArchiving"), yes); ++ writer.writeAttribute(QLatin1String("buildForAnalyzing"), yes); ++ writer.writeStartElement(QLatin1String("BuildableReference")); ++ writer.writeAttribute(QLatin1String("BuildableIdentifier"), QLatin1String("primary")); ++ ++ QByteArray bytes; ++ bytes.append(QLatin1String("BlueprintIdentifier:")); ++ bytes.append(filePath); ++ ++ writer.writeAttribute(QLatin1String("BlueprintIdentifier"), PBXObject::createIdentifier(bytes)); ++ if (d->target) { ++ writer.writeAttribute(QLatin1String("BuildableName"), d->target->name()); ++ writer.writeAttribute(QLatin1String("BlueprintName"), d->target->name()); ++ } ++ if (d->project) { ++ const QString relativePath = QDir(d->project->projectDirPath()).relativeFilePath(d->project->projectWrapperPath()); ++ writer.writeAttribute(QLatin1String("ReferencedContainer"), QString(QLatin1String("container:%1")).arg(relativePath)); ++ } ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ ++ if (!d->customExecutableFilePath.isEmpty()) { ++ writer.writeStartElement(QLatin1String("LaunchAction")); ++ writer.writeStartElement(QLatin1String("PathRunnable")); ++ writer.writeAttribute(QLatin1String("FilePath"), d->customExecutableFilePath); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ } ++ ++ writer.writeEndElement(); ++ writer.writeEndDocument(); ++ ++ return file.error() == QFile::NoError; ++ } ++ ++ return false; ++} +diff --git a/src/lib/corelib/generators/xcode/xcscheme.h b/src/lib/corelib/generators/xcode/xcscheme.h +new file mode 100644 +index 0000000..270cca3 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcscheme.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCSCHEME_H ++#define XCSCHEME_H ++ ++#include ++ ++class PBXProject; ++class PBXTarget; ++ ++class XCSchemePrivate; ++ ++class XCScheme : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit XCScheme(QObject *parent = 0); ++ virtual ~XCScheme(); ++ ++ PBXProject *project() const; ++ void setProject(PBXProject *project); ++ ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++ bool parallelizeBuildables() const; ++ void setParallelizeBuildables(bool parallelize); ++ ++ bool buildImplicitDependencies() const; ++ void setBuildImplicitDependencies(bool build); ++ ++ QString customExecutableFilePath() const; ++ void setCustomExecutableFilePath(const QString &customExecutableFilePath); ++ ++ bool serialize(const QString &filePath); ++ ++private: ++ XCSchemePrivate *d; ++}; ++ ++#endif // XCSCHEME_H +diff --git a/src/lib/corelib/generators/xcode/xcsettings.cpp b/src/lib/corelib/generators/xcode/xcsettings.cpp +new file mode 100644 +index 0000000..d34c86e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcsettings.cpp +@@ -0,0 +1,95 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcsettings.h" ++ ++#include ++#include ++#include ++ ++class XCSettingsPrivate { ++public: ++ XCSettingsPrivate() ++ : autocreateSchemes() ++ { ++ } ++ ++ bool autocreateSchemes; ++}; ++ ++XCSettings::XCSettings(QObject *parent) ++ : QObject(parent) ++ , d(new XCSettingsPrivate) ++{ ++} ++ ++XCSettings::~XCSettings() ++{ ++ delete d; ++} ++ ++bool XCSettings::autocreateSchemes() const ++{ ++ return d->autocreateSchemes; ++} ++ ++void XCSettings::setAutocreateSchemes(bool autocreateSchemes) ++{ ++ d->autocreateSchemes = autocreateSchemes; ++} ++ ++bool XCSettings::serialize(const QString &filePath) ++{ ++ QFile file(filePath); ++ if (file.open(QIODevice::WriteOnly)) { ++ QXmlStreamWriter writer(&file); ++ writer.setAutoFormatting(true); ++ writer.setAutoFormattingIndent(-1); ++ ++ writer.writeStartDocument(); ++ writer.writeDTD(QLatin1String("")); ++ ++ writer.writeStartElement(QLatin1String("plist")); ++ writer.writeAttribute(QLatin1String("version"), QLatin1String("1.0")); ++ writer.writeStartElement(QLatin1String("dict")); ++ ++ writer.writeTextElement(QLatin1String("key"), QLatin1String("IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded")); ++ writer.writeEmptyElement(d->autocreateSchemes ? QLatin1String("true") : QLatin1String("false")); ++ ++ writer.writeEndElement(); // ++ writer.writeEndElement(); // ++ writer.writeEndDocument(); ++ ++ return file.error() == QFile::NoError; ++ } ++ ++ return false; ++} ++ +diff --git a/src/lib/corelib/generators/xcode/xcsettings.h b/src/lib/corelib/generators/xcode/xcsettings.h +new file mode 100644 +index 0000000..e6f2c5d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcsettings.h +@@ -0,0 +1,54 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCSETTINGS_H ++#define XCSETTINGS_H ++ ++#include ++ ++class XCSettingsPrivate; ++ ++class XCSettings : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit XCSettings(QObject *parent = 0); ++ virtual ~XCSettings(); ++ ++ bool autocreateSchemes() const; ++ void setAutocreateSchemes(bool autocreateSchemes); ++ ++ bool serialize(const QString &filePath); ++ ++private: ++ XCSettingsPrivate *d; ++}; ++ ++#endif // XCSETTINGS_H +diff --git a/src/lib/corelib/tools/projectgeneratormanager.cpp b/src/lib/corelib/tools/projectgeneratormanager.cpp +index 4c62fc0..f5d0f81 100644 +--- a/src/lib/corelib/tools/projectgeneratormanager.cpp ++++ b/src/lib/corelib/tools/projectgeneratormanager.cpp +@@ -39,6 +39,9 @@ + #include + #include + ++#include ++#include ++ + namespace qbs { + + using namespace Internal; +@@ -60,6 +63,8 @@ ProjectGeneratorManager *ProjectGeneratorManager::instance() + ProjectGeneratorManager::ProjectGeneratorManager() + { + QList > generators; ++ generators << QSharedPointer::create(); ++ generators << QSharedPointer::create(); + foreach (QSharedPointer generator, generators) { + m_generators[generator->generatorName()] = generator; + } -- -2.1.0 +2.3.5 diff --git a/mingw-w64-qbs-git/0002-WIP-Xcode-generator.master.patch b/mingw-w64-qbs-git/0002-WIP-Xcode-generator.master.patch new file mode 100644 index 0000000000..d2a2ad5177 --- /dev/null +++ b/mingw-w64-qbs-git/0002-WIP-Xcode-generator.master.patch @@ -0,0 +1,6367 @@ +From 92347c167dfa778fffc25cf2c03cc4cfd80a5ce0 Mon Sep 17 00:00:00 2001 +From: Jake Petroules +Date: Wed, 18 Feb 2015 09:05:29 -0800 +Subject: [PATCH 2/5] WIP: Xcode generator. + +Task-number: QBS-32 +Change-Id: I5ce5cc3148aa801d75a1f64b778fe7334de43af9 +--- + src/lib/corelib/corelib.qbs | 62 ++ + src/lib/corelib/generators/generators.pri | 2 + + .../generators/xcode/opensteppropertylist.cpp | 257 ++++++++ + .../generators/xcode/opensteppropertylist.h | 76 +++ + src/lib/corelib/generators/xcode/pbx.h | 57 ++ + src/lib/corelib/generators/xcode/pbxbuildfile.cpp | 134 +++++ + src/lib/corelib/generators/xcode/pbxbuildfile.h | 74 +++ + src/lib/corelib/generators/xcode/pbxbuildphase.cpp | 94 +++ + src/lib/corelib/generators/xcode/pbxbuildphase.h | 65 +++ + src/lib/corelib/generators/xcode/pbxcontainer.cpp | 60 ++ + src/lib/corelib/generators/xcode/pbxcontainer.h | 59 ++ + .../generators/xcode/pbxcontaineritemproxy.cpp | 113 ++++ + .../generators/xcode/pbxcontaineritemproxy.h | 65 +++ + src/lib/corelib/generators/xcode/pbxfileencoding.h | 57 ++ + .../corelib/generators/xcode/pbxfilereference.cpp | 66 +++ + .../corelib/generators/xcode/pbxfilereference.h | 52 ++ + src/lib/corelib/generators/xcode/pbxfiletype.cpp | 51 ++ + src/lib/corelib/generators/xcode/pbxfiletype.h | 47 ++ + .../generators/xcode/pbxframeworksbuildphase.cpp | 27 + + .../generators/xcode/pbxframeworksbuildphase.h | 50 ++ + src/lib/corelib/generators/xcode/pbxgroup.cpp | 119 ++++ + src/lib/corelib/generators/xcode/pbxgroup.h | 71 +++ + .../corelib/generators/xcode/pbxlegacytarget.cpp | 111 ++++ + src/lib/corelib/generators/xcode/pbxlegacytarget.h | 65 +++ + .../corelib/generators/xcode/pbxnativetarget.cpp | 68 +++ + src/lib/corelib/generators/xcode/pbxnativetarget.h | 53 ++ + src/lib/corelib/generators/xcode/pbxobject.cpp | 96 +++ + src/lib/corelib/generators/xcode/pbxobject.h | 124 ++++ + .../corelib/generators/xcode/pbxproducttype.cpp | 75 +++ + src/lib/corelib/generators/xcode/pbxproducttype.h | 53 ++ + src/lib/corelib/generators/xcode/pbxproject.cpp | 333 +++++++++++ + src/lib/corelib/generators/xcode/pbxproject.h | 114 ++++ + src/lib/corelib/generators/xcode/pbxreference.cpp | 127 ++++ + src/lib/corelib/generators/xcode/pbxreference.h | 72 +++ + .../generators/xcode/pbxsourcesbuildphase.cpp | 57 ++ + .../generators/xcode/pbxsourcesbuildphase.h | 53 ++ + src/lib/corelib/generators/xcode/pbxsourcetree.cpp | 50 ++ + src/lib/corelib/generators/xcode/pbxsourcetree.h | 52 ++ + src/lib/corelib/generators/xcode/pbxtarget.cpp | 192 ++++++ + src/lib/corelib/generators/xcode/pbxtarget.h | 100 ++++ + .../generators/xcode/pbxtargetdependency.cpp | 99 ++++ + .../corelib/generators/xcode/pbxtargetdependency.h | 65 +++ + .../generators/xcode/xcbuildconfiguration.cpp | 92 +++ + .../generators/xcode/xcbuildconfiguration.h | 69 +++ + .../generators/xcode/xcconfigurationlist.cpp | 147 +++++ + .../corelib/generators/xcode/xcconfigurationlist.h | 67 +++ + src/lib/corelib/generators/xcode/xcode.pri | 59 ++ + .../generators/xcode/xcodebuildsettingmapping.cpp | 366 ++++++++++++ + .../generators/xcode/xcodebuildsettingmapping.h | 96 +++ + .../corelib/generators/xcode/xcodegenerator.cpp | 643 +++++++++++++++++++++ + src/lib/corelib/generators/xcode/xcodegenerator.h | 81 +++ + .../generators/xcode/xcodenativegenerator.cpp | 58 ++ + .../generators/xcode/xcodenativegenerator.h | 52 ++ + .../generators/xcode/xcodesimplegenerator.cpp | 58 ++ + .../generators/xcode/xcodesimplegenerator.h | 52 ++ + src/lib/corelib/generators/xcode/xcscheme.cpp | 179 ++++++ + src/lib/corelib/generators/xcode/xcscheme.h | 69 +++ + src/lib/corelib/generators/xcode/xcsettings.cpp | 95 +++ + src/lib/corelib/generators/xcode/xcsettings.h | 54 ++ + src/lib/corelib/tools/projectgeneratormanager.cpp | 5 + + 60 files changed, 5859 insertions(+) + create mode 100644 src/lib/corelib/generators/xcode/opensteppropertylist.cpp + create mode 100644 src/lib/corelib/generators/xcode/opensteppropertylist.h + create mode 100644 src/lib/corelib/generators/xcode/pbx.h + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildfile.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildfile.h + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxcontainer.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxcontainer.h + create mode 100644 src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfileencoding.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfilereference.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxfilereference.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfiletype.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxfiletype.h + create mode 100644 src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxgroup.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxgroup.h + create mode 100644 src/lib/corelib/generators/xcode/pbxlegacytarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxlegacytarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxnativetarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxnativetarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxobject.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxobject.h + create mode 100644 src/lib/corelib/generators/xcode/pbxproducttype.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxproducttype.h + create mode 100644 src/lib/corelib/generators/xcode/pbxproject.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxproject.h + create mode 100644 src/lib/corelib/generators/xcode/pbxreference.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxreference.h + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcetree.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcetree.h + create mode 100644 src/lib/corelib/generators/xcode/pbxtarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxtarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxtargetdependency.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxtargetdependency.h + create mode 100644 src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcbuildconfiguration.h + create mode 100644 src/lib/corelib/generators/xcode/xcconfigurationlist.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcconfigurationlist.h + create mode 100644 src/lib/corelib/generators/xcode/xcode.pri + create mode 100644 src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h + create mode 100644 src/lib/corelib/generators/xcode/xcodegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcodenativegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodenativegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodesimplegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcscheme.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcscheme.h + create mode 100644 src/lib/corelib/generators/xcode/xcsettings.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcsettings.h + +diff --git a/src/lib/corelib/corelib.qbs b/src/lib/corelib/corelib.qbs +index a5c1ab6..771f7e6 100644 +--- a/src/lib/corelib/corelib.qbs ++++ b/src/lib/corelib/corelib.qbs +@@ -154,6 +154,68 @@ QbsLibrary { + files: "buildgraph/forward_decls.h" + } + Group { ++ name: "Xcode generator" ++ prefix: "generators/xcode/" ++ files: [ ++ "opensteppropertylist.cpp", ++ "opensteppropertylist.h", ++ "pbx.h", ++ "pbxbuildfile.cpp", ++ "pbxbuildfile.h", ++ "pbxbuildphase.cpp", ++ "pbxbuildphase.h", ++ "pbxcontainer.cpp", ++ "pbxcontainer.h", ++ "pbxcontaineritemproxy.cpp", ++ "pbxcontaineritemproxy.h", ++ "pbxfileencoding.h", ++ "pbxfilereference.cpp", ++ "pbxfilereference.h", ++ "pbxfiletype.cpp", ++ "pbxfiletype.h", ++ "pbxframeworksbuildphase.cpp", ++ "pbxframeworksbuildphase.h", ++ "pbxgroup.cpp", ++ "pbxgroup.h", ++ "pbxlegacytarget.cpp", ++ "pbxlegacytarget.h", ++ "pbxnativetarget.cpp", ++ "pbxnativetarget.h", ++ "pbxobject.cpp", ++ "pbxobject.h", ++ "pbxproducttype.cpp", ++ "pbxproducttype.h", ++ "pbxproject.cpp", ++ "pbxproject.h", ++ "pbxreference.cpp", ++ "pbxreference.h", ++ "pbxsourcesbuildphase.cpp", ++ "pbxsourcesbuildphase.h", ++ "pbxsourcetree.cpp", ++ "pbxsourcetree.h", ++ "pbxtarget.cpp", ++ "pbxtarget.h", ++ "pbxtargetdependency.cpp", ++ "pbxtargetdependency.h", ++ "xcbuildconfiguration.cpp", ++ "xcbuildconfiguration.h", ++ "xcconfigurationlist.cpp", ++ "xcconfigurationlist.h", ++ "xcodegenerator.cpp", ++ "xcodegenerator.h", ++ "xcodenativegenerator.cpp", ++ "xcodenativegenerator.h", ++ "xcodesimplegenerator.cpp", ++ "xcodesimplegenerator.h", ++ "xcscheme.cpp", ++ "xcscheme.h", ++ "xcsettings.cpp", ++ "xcsettings.h", ++ "xcodebuildsettingmapping.cpp", ++ "xcodebuildsettingmapping.h" ++ ] ++ } ++ Group { + name: "jsextensions" + prefix: name + '/' + files: [ +diff --git a/src/lib/corelib/generators/generators.pri b/src/lib/corelib/generators/generators.pri +index 6372e81..2fa095e 100644 +--- a/src/lib/corelib/generators/generators.pri ++++ b/src/lib/corelib/generators/generators.pri +@@ -1,2 +1,4 @@ + HEADERS += \ + $$PWD/generator.h ++ ++include(xcode/xcode.pri) +diff --git a/src/lib/corelib/generators/xcode/opensteppropertylist.cpp b/src/lib/corelib/generators/xcode/opensteppropertylist.cpp +new file mode 100644 +index 0000000..63adee2 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/opensteppropertylist.cpp +@@ -0,0 +1,257 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ++** Copyright (C) 2014 Petroules Corporation. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "opensteppropertylist.h" ++#include "pbxobject.h" ++#include ++#include ++ ++const QChar OpenStepPropertyList::NewlineToken = QLatin1Char('\n'); ++const QChar OpenStepPropertyList::DictionaryBeginToken = QLatin1Char('{'); ++const QChar OpenStepPropertyList::DictionarySeparatorToken = QLatin1Char(';'); ++const QChar OpenStepPropertyList::DictionaryEndToken = QLatin1Char('}'); ++const QChar OpenStepPropertyList::ArrayBeginToken = QLatin1Char('('); ++const QChar OpenStepPropertyList::ArraySeparatorToken = QLatin1Char(','); ++const QChar OpenStepPropertyList::ArrayEndToken = QLatin1Char(')'); ++const QChar OpenStepPropertyList::QuotedStringBeginToken = QLatin1Char('"'); ++const QChar OpenStepPropertyList::QuotedStringEndToken = QLatin1Char('"'); ++const QChar OpenStepPropertyList::DataBeginToken = QLatin1Char('<'); ++const QChar OpenStepPropertyList::DataEndToken = QLatin1Char('>'); ++const QChar OpenStepPropertyList::IndentationToken = QLatin1Char('\t'); ++ ++#define isValidUnquotedStringCharacter(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || ((x) >= '0' && (x) <= '9') || (x) == '_' || (x) == '$' || (x) == '/' || (x) == ':' || (x) == '.' ) ++ ++static QString formatString(const QString &string) ++{ ++ bool isQuoted = string.isEmpty(); ++ if (!isQuoted) ++ { ++ for (int i = 0; i < string.size(); ++i) ++ { ++ if (!isValidUnquotedStringCharacter(string[i])) ++ { ++ isQuoted = true; ++ break; ++ } ++ } ++ } ++ ++ QString outString = string; ++ outString.replace(QLatin1String("\\"), QLatin1String("\\\\")); ++ outString.replace(QLatin1String("\""), QLatin1String("\\\"")); ++ ++ if (isQuoted) ++ outString.prepend(OpenStepPropertyList::QuotedStringBeginToken); ++ if (isQuoted) ++ outString.append(OpenStepPropertyList::QuotedStringEndToken); ++ ++ return outString; ++} ++ ++QString OpenStepPropertyList::toString(const QVariantMap &propertyList) ++{ ++ PBXObjectMap newMap; ++ Q_FOREACH (const QString &key, propertyList.keys()) { ++ newMap.insert(key, propertyList[key]); ++ } ++ return toString(newMap); ++} ++ ++QString OpenStepPropertyList::toString(const PBXObjectMap &propertyList) ++{ ++ return toString(propertyList, 0) + NewlineToken; ++} ++ ++QString OpenStepPropertyList::toString(const QVariantMap &propertyList, int indentationLevel) ++{ ++ PBXObjectMap newMap; ++ Q_FOREACH (const QString &key, propertyList.keys()) { ++ newMap.insert(key, propertyList[key]); ++ } ++ return toString(newMap, indentationLevel); ++} ++ ++QString OpenStepPropertyList::toString(const PBXObjectMap &propertyList, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += DictionaryBeginToken; ++ ++ const bool isFlat = ++ propertyList[QLatin1String("isa")] == QLatin1String("PBXBuildFile") || ++ propertyList[QLatin1String("isa")] == QLatin1String("PBXFileReference"); ++ if (!isFlat) { ++ string += NewlineToken; ++ } ++ ++ QList keys = propertyList.keys(); ++ ++ // Push the isa property to the top of the list as it's always written first ++ const int isaIndex = keys.indexOf(QLatin1String("isa")); ++ if (isaIndex >= 0) { ++ keys.removeAt(isaIndex); ++ keys.insert(0, QLatin1String("isa")); ++ } ++ ++ QStack isas; ++ ++ foreach (const PBXObjectIdentifier &vkey, keys) ++ { ++ const QVariant &object = propertyList[vkey]; ++ ++ if (!vkey.isa().isEmpty()) { ++ if (!isas.empty() && vkey.isa() != isas.top()) { ++ string += QString(QLatin1String("/* End %1 section */\n")).arg(isas.top()); ++ isas.pop(); ++ } ++ ++ if (isas.empty()) { ++ isas.push(vkey.isa()); ++ string += QString(QLatin1String("\n/* Begin %1 section */\n")).arg(vkey.isa()); ++ } ++ } ++ ++ string += QString(!isFlat ? (indentationLevel + 1) : 0, IndentationToken); ++ string += toString(QVariant::fromValue(vkey), -1); ++ string += QLatin1String(" = "); ++ ++ if (object.canConvert() || object.type() == QVariant::Map || object.type() == QVariant::List || ++ object.type() == QVariant::StringList || object.type() == QVariant::ByteArray) ++ string += toString(object, !isFlat ? (indentationLevel + 1) : 0).trimmed(); ++ else ++ string += toString(object, 0); ++ ++ string += DictionarySeparatorToken; ++ string += !isFlat ? NewlineToken : QLatin1Char(' '); ++ } ++ ++ if (!isas.empty()) { ++ string += QString(QLatin1String("/* End %1 section */\n")).arg(isas.top()); ++ isas.pop(); ++ } ++ ++ if (!isFlat) { ++ string += QString(indentationLevel, IndentationToken); ++ } ++ ++ string += DictionaryEndToken; ++ return string; ++} ++ ++QString OpenStepPropertyList::toString(const QList &propertyList) ++{ ++ return toString(propertyList, 0) + NewlineToken; ++} ++ ++QString OpenStepPropertyList::toString(const QList &propertyList, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += ArrayBeginToken; ++ string += NewlineToken; ++ ++ for (int i = 0; i < propertyList.size(); ++i) ++ { ++ const QVariant &object = propertyList[i]; ++ string += toString(object, indentationLevel + 1); ++ string += ArraySeparatorToken; ++ string += NewlineToken; ++ } ++ ++ string += QString(indentationLevel, IndentationToken) + ArrayEndToken; ++ return string; ++} ++ ++QString OpenStepPropertyList::toString(const QVariant &object, int indentationLevel) ++{ ++ if (object.canConvert()) { ++ PBXObjectIdentifier objid = object.value(); ++ QString s = toString(objid.identifier(), indentationLevel); ++ if (!objid.comment().isEmpty()) { ++ s += QLatin1String(" /* "); ++ s += objid.comment().replace(QLatin1String("*/"), QLatin1String("* /")); ++ s += QLatin1String(" */"); ++ } ++ return s; ++ } ++ ++ if (object.canConvert()) { ++ return toString(object.value(), indentationLevel); ++ } ++ ++ switch (object.type()) ++ { ++ case QVariant::Bool: ++ return object.toBool() ? QLatin1String("YES") : QLatin1String("NO"); ++ case QVariant::ByteArray: ++ return toString(object.toByteArray(), indentationLevel); ++ case QVariant::Date: ++ case QVariant::DateTime: ++ case QVariant::Time: ++ return toString(object.toDateTime(), indentationLevel); ++ case QVariant::Double: ++ return QString::number(object.toDouble()); ++ case QVariant::Int: ++ return QString::number(object.toInt()); ++ case QVariant::List: ++ case QVariant::StringList: ++ return toString(object.toList(), indentationLevel); ++ case QVariant::LongLong: ++ return QString::number(object.toLongLong()); ++ case QVariant::Map: ++ return toString(object.toMap(), indentationLevel); ++ case QVariant::String: ++ return toString(object.toString(), indentationLevel); ++ case QVariant::UInt: ++ return QString::number(object.toUInt()); ++ case QVariant::ULongLong: ++ return QString::number(object.toULongLong()); ++ default: ++ qDebug() << "Unsupported property list object type" << object; ++ abort(); ++ } ++} ++ ++QString OpenStepPropertyList::toString(const QByteArray &object, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += DataBeginToken + QString::fromLatin1(object.toHex()) + DataEndToken; ++ return string; ++} ++ ++QString OpenStepPropertyList::toString(const QDateTime &object, int indentationLevel) ++{ ++ return toString(object.toUTC().toString(Qt::ISODate), indentationLevel); ++} ++ ++QString OpenStepPropertyList::toString(const QString &object, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += formatString(object); ++ return string; ++} +diff --git a/src/lib/corelib/generators/xcode/opensteppropertylist.h b/src/lib/corelib/generators/xcode/opensteppropertylist.h +new file mode 100644 +index 0000000..36cef73 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/opensteppropertylist.h +@@ -0,0 +1,76 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ++** Copyright (C) 2014 Petroules Corporation. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef OPENSTEPPROPERTYLIST_H ++#define OPENSTEPPROPERTYLIST_H ++ ++#include ++#include ++#include ++#include ++#include ++ ++class PBXObjectIdentifier; ++typedef QMap PBXObjectMap; ++ ++class OpenStepPropertyList ++{ ++ Q_DISABLE_COPY(OpenStepPropertyList) ++public: ++ static const QChar NewlineToken; ++ static const QChar DictionaryBeginToken; ++ static const QChar DictionarySeparatorToken; ++ static const QChar DictionaryEndToken; ++ static const QChar ArrayBeginToken; ++ static const QChar ArraySeparatorToken; ++ static const QChar ArrayEndToken; ++ static const QChar QuotedStringBeginToken; ++ static const QChar QuotedStringEndToken; ++ static const QChar DataBeginToken; ++ static const QChar DataEndToken; ++ static const QChar IndentationToken; ++ ++ static QString toString(const QVariantMap &propertyList); ++ static QString toString(const PBXObjectMap &propertyList); ++ static QString toString(const QList &propertyList); ++ ++private: ++ OpenStepPropertyList(); ++ ++ static QString toString(const QVariantMap &propertyList, int indentationLevel); ++ static QString toString(const PBXObjectMap &propertyList, int indentationLevel); ++ static QString toString(const QList &propertyList, int indentationLevel); ++ static QString toString(const QVariant &object, int indentationLevel); ++ static QString toString(const QByteArray &object, int indentationLevel); ++ static QString toString(const QDateTime &object, int indentationLevel); ++ static QString toString(const QString &object, int indentationLevel); ++}; ++ ++#endif // OPENSTEPPROPERTYLIST_H +diff --git a/src/lib/corelib/generators/xcode/pbx.h b/src/lib/corelib/generators/xcode/pbx.h +new file mode 100644 +index 0000000..d4cc014 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbx.h +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBX_H ++#define PBX_H ++ ++#include "opensteppropertylist.h" ++#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" ++#include "pbxcontainer.h" ++#include "pbxcontaineritemproxy.h" ++#include "pbxfileencoding.h" ++#include "pbxfilereference.h" ++#include "pbxfiletype.h" ++#include "pbxgroup.h" ++#include "pbxlegacytarget.h" ++#include "pbxnativetarget.h" ++#include "pbxobject.h" ++#include "pbxproducttype.h" ++#include "pbxproject.h" ++#include "pbxreference.h" ++#include "pbxsourcetree.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++#include "xcscheme.h" ++#include "xcsettings.h" ++ ++#endif // PBX_H +diff --git a/src/lib/corelib/generators/xcode/pbxbuildfile.cpp b/src/lib/corelib/generators/xcode/pbxbuildfile.cpp +new file mode 100644 +index 0000000..cbe34c0 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildfile.cpp +@@ -0,0 +1,134 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" ++#include "pbxfilereference.h" ++ ++static const QString kPBXBuildFileAttributes = QLatin1String("ATTRIBUTES"); ++static const QString kPBXBuildFileLibraryWeakLinked = QLatin1String("Weak"); ++ ++class PBXBuildFilePrivate ++{ ++public: ++ PBXBuildFilePrivate(); ++ PBXFileReference *reference; ++ QSet attributes; ++}; ++ ++PBXBuildFilePrivate::PBXBuildFilePrivate() ++ : reference() ++{ ++} ++ ++PBXBuildFile::PBXBuildFile(PBXBuildPhase *parent) : ++ PBXObject(parent), d(new PBXBuildFilePrivate) ++{ ++} ++ ++PBXBuildFile::~PBXBuildFile() ++{ ++ delete d; ++} ++ ++QString PBXBuildFile::isa() const ++{ ++ return QLatin1String("PBXBuildFile"); ++} ++ ++PBXObjectMap PBXBuildFile::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->reference) { ++ self.insert(QLatin1String("fileRef"), QVariant::fromValue(d->reference->identifier())); ++ } ++ ++ QVariantMap settingsMap; ++ if (!d->attributes.isEmpty()) { ++ QStringList attributes = d->attributes.toList(); ++ qSort(attributes); ++ settingsMap.insert(kPBXBuildFileAttributes, attributes); ++ } ++ ++ if (!settingsMap.isEmpty()) { ++ self.insert(QLatin1String("settings"), settingsMap); ++ } ++ ++ return self; ++} ++ ++PBXFileReference *PBXBuildFile::fileReference() const ++{ ++ return d->reference; ++} ++ ++void PBXBuildFile::setFileReference(PBXFileReference *reference) ++{ ++ d->reference = reference; ++} ++ ++QSet PBXBuildFile::attributes() const ++{ ++ return d->attributes; ++} ++ ++bool PBXBuildFile::isWeakLinkedLibrary() const ++{ ++ return d->attributes.contains(kPBXBuildFileLibraryWeakLinked); ++} ++ ++void PBXBuildFile::setWeakLinkedLibrary(bool weakLinked) ++{ ++ if (weakLinked) ++ d->attributes.insert(kPBXBuildFileLibraryWeakLinked); ++ else ++ d->attributes.remove(kPBXBuildFileLibraryWeakLinked); ++} ++ ++QString PBXBuildFile::comment() const ++{ ++ if (d->reference) { ++ PBXBuildPhase *phase = dynamic_cast(parent()); ++ Q_ASSERT(phase); ++ return QString(QLatin1String("%1 in %2")).arg(d->reference->name()).arg(phase->name()); ++ } ++ ++ return PBXObject::comment(); ++} ++ ++QByteArray PBXBuildFile::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (d->reference) { ++ data.append(d->reference->hashData()); ++ } ++ ++ return data; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxbuildfile.h b/src/lib/corelib/generators/xcode/pbxbuildfile.h +new file mode 100644 +index 0000000..bc25ab8 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildfile.h +@@ -0,0 +1,74 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXBUILDFILE_H ++#define PBXBUILDFILE_H ++ ++#include "pbxobject.h" ++#include ++#include ++ ++class PBXBuildPhase; ++class PBXFileReference; ++ ++class PBXBuildFilePrivate; ++ ++/*! ++ * \brief The PBXBuildFile class represents a file reference that is used in a build phase. ++ * Its primary purpose is to allow additional build settings to be applied at the file level. ++ */ ++class PBXBuildFile : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXBuildFile(PBXBuildPhase *parent = 0); ++ virtual ~PBXBuildFile(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXFileReference *fileReference() const; ++ void setFileReference(PBXFileReference *reference); ++ ++ QString absolutePath() const; ++ QSet attributes() const; ++ ++ bool isWeakLinkedLibrary() const; ++ void setWeakLinkedLibrary(bool weakLinked); ++ ++private: ++ PBXBuildFilePrivate *d; ++}; ++ ++#endif // PBXBUILDFILE_H +diff --git a/src/lib/corelib/generators/xcode/pbxbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxbuildphase.cpp +new file mode 100644 +index 0000000..fc371aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildphase.cpp +@@ -0,0 +1,94 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" ++#include "pbxfilereference.h" ++#include "pbxtarget.h" ++ ++class PBXBuildPhasePrivate ++{ ++public: ++ QList buildFiles; ++}; ++ ++PBXBuildPhase::PBXBuildPhase(PBXTarget *parent) : ++ PBXObject(parent), d(new PBXBuildPhasePrivate) ++{ ++} ++ ++PBXBuildPhase::~PBXBuildPhase() ++{ ++ delete d; ++} ++ ++PBXObjectMap PBXBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("buildActionMask"), std::numeric_limits::max()); ++ ++ QVariantList fileReferenceList; ++ foreach (PBXBuildFile *buildFile, buildFiles()) ++ fileReferenceList += QVariant::fromValue(buildFile->identifier()); ++ self.insert(QLatin1String("files"), fileReferenceList); ++ ++ self.insert(QLatin1String("runOnlyForDeploymentPostprocessing"), 0); ++ ++ return self; ++} ++ ++QByteArray PBXBuildPhase::hashData() const ++{ ++ QByteArray data; ++ PBXTarget *target = dynamic_cast(parent()); ++ if (target) { ++ data.append(target->hashData()); ++ } ++ return data; // TODO: Build phases for which a target may have multiple of, will not work ++} ++ ++QList PBXBuildPhase::buildFiles() const ++{ ++ return d->buildFiles; ++} ++ ++PBXBuildFile *PBXBuildPhase::addReference(PBXFileReference *reference) ++{ ++ Q_FOREACH (PBXBuildFile *buildFile, d->buildFiles) { ++ if (buildFile->fileReference() == reference) { ++ return buildFile; ++ } ++ } ++ ++ PBXBuildFile *buildFile = new PBXBuildFile(this); ++ buildFile->setFileReference(reference); ++ d->buildFiles.append(buildFile); ++ return buildFile; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxbuildphase.h b/src/lib/corelib/generators/xcode/pbxbuildphase.h +new file mode 100644 +index 0000000..b80ec81 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildphase.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXBUILDPHASE_H ++#define PBXBUILDPHASE_H ++ ++#include "pbxobject.h" ++#include ++ ++class PBXBuildFile; ++class PBXFileReference; ++class PBXTarget; ++ ++class PBXBuildPhasePrivate; ++ ++class PBXBuildPhase : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXBuildPhase(PBXTarget *parent = 0); ++ virtual ~PBXBuildPhase(); ++ ++ virtual QString name() const = 0; ++ ++ PBXObjectMap toMap() const; ++ ++ QByteArray hashData() const; ++ ++ QList buildFiles() const; ++ ++ PBXBuildFile *addReference(PBXFileReference *reference); ++ bool containsFileReferenceIdenticalTo(PBXFileReference *reference); ++ ++private: ++ PBXBuildPhasePrivate *d; ++}; ++ ++#endif // PBXBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxcontainer.cpp b/src/lib/corelib/generators/xcode/pbxcontainer.cpp +new file mode 100644 +index 0000000..6ce359a +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontainer.cpp +@@ -0,0 +1,60 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontainer.h" ++#include "pbxgroup.h" ++ ++class PBXContainerPrivate ++{ ++public: ++ PBXGroup group; ++}; ++ ++PBXContainer::PBXContainer(QObject *parent) : ++ PBXObject(parent), d(new PBXContainerPrivate) ++{ ++} ++ ++PBXContainer::~PBXContainer() ++{ ++ delete d; ++} ++ ++QByteArray PBXContainer::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ data.append(d->group.hashData()); ++ return data; ++} ++ ++PBXGroup *PBXContainer::rootGroup() const ++{ ++ return &d->group; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxcontainer.h b/src/lib/corelib/generators/xcode/pbxcontainer.h +new file mode 100644 +index 0000000..3263149 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontainer.h +@@ -0,0 +1,59 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXCONTAINER_H ++#define PBXCONTAINER_H ++ ++#include "pbxobject.h" ++#include ++ ++class PBXFileReference; ++class PBXGroup; ++ ++class PBXContainerPrivate; ++ ++class PBXContainer : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXContainer(QObject *parent = 0); ++ virtual ~PBXContainer(); ++ ++ QByteArray hashData() const; ++ ++ PBXGroup *rootGroup() const; ++ ++ PBXFileReference *fileReferenceForPath(const QString &path); ++ ++private: ++ PBXContainerPrivate *d; ++}; ++ ++#endif // PBXCONTAINER_H +diff --git a/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp +new file mode 100644 +index 0000000..46f18dd +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp +@@ -0,0 +1,113 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontaineritemproxy.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++ ++class PBXContainerItemProxyPrivate ++{ ++public: ++ PBXProject *containerPortal; ++ PBXTarget *target; ++}; ++ ++PBXContainerItemProxy::PBXContainerItemProxy(PBXTargetDependency *parent) : ++ PBXObject(parent), d(new PBXContainerItemProxyPrivate) ++{ ++} ++ ++PBXContainerItemProxy::~PBXContainerItemProxy() ++{ ++ delete d; ++} ++ ++QString PBXContainerItemProxy::isa() const ++{ ++ return QLatin1String("PBXContainerItemProxy"); ++} ++ ++PBXObjectMap PBXContainerItemProxy::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->containerPortal) ++ self.insert(QLatin1String("containerPortal"), QVariant::fromValue(d->containerPortal->identifier())); ++ ++ self.insert(QLatin1String("proxyType"), 1); // TODO: Always the same? ++ ++ if (d->target) { ++ // We deliberately don't store the actual PBXObjectIdentifier, ++ // because Xcode itself doesn't write the ID with a comment annotation ++ self.insert(QLatin1String("remoteGlobalIDString"), d->target->identifier().identifier()); ++ self.insert(QLatin1String("remoteInfo"), d->target->name()); ++ } ++ ++ return self; ++} ++ ++QString PBXContainerItemProxy::comment() const ++{ ++ return PBXObject::comment(); ++} ++ ++QByteArray PBXContainerItemProxy::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (d->containerPortal) { ++ data.append(d->containerPortal->hashData()); ++ } ++ ++ if (d->target) { ++ data.append(d->target->hashData()); ++ } ++ ++ return data; ++} ++ ++PBXProject *PBXContainerItemProxy::containerPortal() const ++{ ++ return d->containerPortal; ++} ++ ++void PBXContainerItemProxy::setContainerPortal(PBXProject *containerPortal) ++{ ++ d->containerPortal = containerPortal; ++} ++ ++PBXTarget *PBXContainerItemProxy::target() const ++{ ++ return d->target; ++} ++ ++void PBXContainerItemProxy::setTarget(PBXTarget *target) ++{ ++ d->target = target; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h +new file mode 100644 +index 0000000..34205aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXCONTAINERITEMPROXY_H ++#define PBXCONTAINERITEMPROXY_H ++ ++#include "pbxobject.h" ++ ++class PBXContainerItemProxyPrivate; ++class PBXProject; ++class PBXTarget; ++class PBXTargetDependency; ++ ++class PBXContainerItemProxy : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXContainerItemProxy(PBXTargetDependency *parent = 0); ++ virtual ~PBXContainerItemProxy(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXProject *containerPortal() const; ++ void setContainerPortal(PBXProject *containerPortal); ++ ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++private: ++ PBXContainerItemProxyPrivate *d; ++}; ++ ++#endif // PBXCONTAINERITEMPROXY_H +diff --git a/src/lib/corelib/generators/xcode/pbxfileencoding.h b/src/lib/corelib/generators/xcode/pbxfileencoding.h +new file mode 100644 +index 0000000..50af8c5 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfileencoding.h +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFILEENCODING_H ++#define PBXFILEENCODING_H ++ ++namespace PBX ++{ ++ typedef enum { ++ Default = 0, ++ UTF8 = 4, ++ UTF16 = 10, ++ UTF16_BE = 0x90000100, ++ UTF16_LE = 0x94000100, ++ Western = 30, ++ Japanese = 0x80000001, ++ TraditionalChinese = 0x80000002, ++ Korean = 0x80000003, ++ Arabic = 0x80000004, ++ Hebrew = 0x80000005, ++ Greek = 0x80000006, ++ Cyrillic = 0x80000007, ++ SimplifiedChinese = 0x80000019, ++ CentralEuropean = 0x8000001D, ++ Turkish = 0x80000023, ++ Icelandic = 0x80000025 ++ } PBXFileEncoding; ++} ++ ++#endif // PBXFILEENCODING_H +diff --git a/src/lib/corelib/generators/xcode/pbxfilereference.cpp b/src/lib/corelib/generators/xcode/pbxfilereference.cpp +new file mode 100644 +index 0000000..b5dbd94 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfilereference.cpp +@@ -0,0 +1,66 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfileencoding.h" ++#include "pbxfilereference.h" ++#include "pbxfiletype.h" ++#include "pbxgroup.h" ++#include "pbxsourcetree.h" ++#include ++ ++class PBXFileReferencePrivate ++{ ++public: ++}; ++ ++PBXFileReference::PBXFileReference(QObject *parent) : ++ PBXReference(parent), d(new PBXFileReferencePrivate) ++{ ++} ++ ++PBXFileReference::~PBXFileReference() ++{ ++ delete d; ++} ++ ++QString PBXFileReference::isa() const ++{ ++ return QLatin1String("PBXFileReference"); ++} ++ ++PBXObjectMap PBXFileReference::toMap() const ++{ ++ PBXObjectMap self = PBXReference::toMap(); ++ self.insert(QLatin1String("fileEncoding"), PBX::Default); ++ //self.insert(QLatin1String("explicitFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).suffix())); // PBXFileType ++ //self.insert(QLatin1String("includeInIndex"), 0); ++ self.insert(QLatin1String("lastKnownFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).suffix())); // PBXFileType ++ return self; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxfilereference.h b/src/lib/corelib/generators/xcode/pbxfilereference.h +new file mode 100644 +index 0000000..7a56120 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfilereference.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFILEREFERENCE_H ++#define PBXFILEREFERENCE_H ++ ++#include "pbxreference.h" ++ ++class PBXFileReferencePrivate; ++ ++class PBXFileReference : public PBXReference ++{ ++ Q_OBJECT ++public: ++ explicit PBXFileReference(QObject *parent = 0); ++ virtual ~PBXFileReference(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++private: ++ PBXFileReferencePrivate *d; ++}; ++ ++#endif // PBXFILEREFERENCE_H +diff --git a/src/lib/corelib/generators/xcode/pbxfiletype.cpp b/src/lib/corelib/generators/xcode/pbxfiletype.cpp +new file mode 100644 +index 0000000..4f7b58d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfiletype.cpp +@@ -0,0 +1,51 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfiletype.h" ++ ++PBXFileType::PBXFileType(QObject *parent) : ++ QObject(parent) ++{ ++} ++ ++QString PBXFileType::typeForFileExtension(const QString &fileExtension) ++{ ++ if (fileExtension == QLatin1String("a")) ++ return QLatin1String("archive.ar"); ++ if (fileExtension == QLatin1String("app")) ++ return QLatin1String("wrapper.application"); ++ if (fileExtension == QLatin1String("cpp")) ++ return QLatin1String("sourcecode.cpp.cpp"); ++ if (fileExtension == QLatin1String("dylib")) ++ return QLatin1String("compiled.mach-o.dylib"); ++ if (fileExtension == QLatin1String("h")) ++ return QLatin1String("sourcecode.c.h"); ++ return QString("text"); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxfiletype.h b/src/lib/corelib/generators/xcode/pbxfiletype.h +new file mode 100644 +index 0000000..b289250 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfiletype.h +@@ -0,0 +1,47 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFILETYPE_H ++#define PBXFILETYPE_H ++ ++#include ++ ++class PBXFileType : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXFileType(QObject *parent = 0); ++ ++ static QStringList allTypes(); ++ static QStringList fileExtensionsForType(const QString &type); ++ static QString typeForFileExtension(const QString &fileExtension); ++}; ++ ++#endif // PBXFILETYPE_H +diff --git a/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp +new file mode 100644 +index 0000000..6b417e7 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp +@@ -0,0 +1,27 @@ ++#include "pbxframeworksbuildphase.h" ++ ++PBXFrameworksBuildPhase::PBXFrameworksBuildPhase(PBXTarget *parent) : ++ PBXBuildPhase(parent) ++{ ++} ++ ++QString PBXFrameworksBuildPhase::name() const ++{ ++ return QLatin1String("Frameworks"); ++} ++ ++QString PBXFrameworksBuildPhase::isa() const ++{ ++ return QLatin1String("PBXFrameworksBuildPhase"); ++} ++ ++PBXObjectMap PBXFrameworksBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXBuildPhase::toMap(); ++ return self; ++} ++ ++QString PBXFrameworksBuildPhase::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h +new file mode 100644 +index 0000000..0553089 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h +@@ -0,0 +1,50 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFRAMEWORKSBUILDPHASE_H ++#define PBXFRAMEWORKSBUILDPHASE_H ++ ++#include "pbxbuildphase.h" ++ ++class PBXFrameworksBuildPhase : public PBXBuildPhase ++{ ++ Q_OBJECT ++public: ++ explicit PBXFrameworksBuildPhase(PBXTarget *parent = 0); ++ ++ QString name() const; ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++}; ++ ++#endif // PBXFRAMEWORKSBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxgroup.cpp b/src/lib/corelib/generators/xcode/pbxgroup.cpp +new file mode 100644 +index 0000000..ea48b22 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxgroup.cpp +@@ -0,0 +1,119 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfilereference.h" ++#include "pbxgroup.h" ++ ++class PBXGroupPrivate ++{ ++public: ++ QList children; ++}; ++ ++PBXGroup::PBXGroup(QObject *parent) : ++ PBXReference(parent), d(new PBXGroupPrivate) ++{ ++} ++ ++PBXGroup::~PBXGroup() ++{ ++ delete d; ++} ++ ++PBXGroup *PBXGroup::groupWithName(const QString &name, PBXGroup *parentGroup) ++{ ++ PBXGroup *group = new PBXGroup(); ++ group->setName(name); ++ ++ if (parentGroup) { ++ group->setParent(parentGroup); ++ parentGroup->addItem(group); ++ } ++ ++ return group; ++} ++ ++QString PBXGroup::isa() const ++{ ++ return QLatin1String("PBXGroup"); ++} ++ ++PBXObjectMap PBXGroup::toMap() const ++{ ++ PBXObjectMap self = PBXReference::toMap(); ++ ++ QVariantList childIdentifiers; ++ foreach (PBXReference *reference, d->children) ++ childIdentifiers += QVariant::fromValue(reference->identifier()); ++ ++ self.insert(QLatin1String("children"), childIdentifiers); ++ ++ return self; ++} ++ ++QList PBXGroup::children() const ++{ ++ return d->children; ++} ++ ++void PBXGroup::addItem(PBXReference *item) ++{ ++ d->children.append(item); ++} ++ ++void PBXGroup::insertItem(PBXReference *item, int index) ++{ ++ d->children.insert(index, item); ++} ++ ++void PBXGroup::removeItem(PBXReference *item) ++{ ++ d->children.removeOne(item); ++} ++ ++QList PBXGroup::addFiles(const QStringList &files, bool copy, bool createGroupsRecursively) ++{ ++ QList fileRefs; ++ foreach (const QString &filePath, files) ++ { ++ PBXFileReference *fileReference = new PBXFileReference(this); ++ fileReference->setPath(filePath); ++ fileReference->setName(filePath.mid(filePath.lastIndexOf('/') + 1)); ++ d->children.append(fileReference); ++ fileRefs.append(fileReference); ++ } ++ ++ return fileRefs; ++} ++ ++QString PBXGroup::comment() const ++{ ++ return !path().isEmpty() ? path() : PBXReference::comment(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxgroup.h b/src/lib/corelib/generators/xcode/pbxgroup.h +new file mode 100644 +index 0000000..e03b8eb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxgroup.h +@@ -0,0 +1,71 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXGROUP_H ++#define PBXGROUP_H ++ ++#include "pbxreference.h" ++ ++class PBXFileReference; ++ ++class PBXGroupPrivate; ++ ++class PBXGroup : public PBXReference ++{ ++ Q_OBJECT ++public: ++ explicit PBXGroup(QObject *parent = 0); ++ virtual ~PBXGroup(); ++ ++ static PBXGroup *groupWithName(const QString &name, PBXGroup *parentGroup = 0); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QList children() const; ++ ++ bool containsItem(PBXReference *item) const; ++ ++ void addItem(PBXReference *item); ++ void insertItem(PBXReference *item, int index); ++ void removeItem(PBXReference *item); ++ ++ /*! ++ * \param files list of absolute paths ++ */ ++ QList addFiles(const QStringList &files, bool copy, bool createGroupsRecursively); ++ ++ QString comment() const; ++ ++private: ++ PBXGroupPrivate *d; ++}; ++ ++#endif // PBXGROUP_H +diff --git a/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp b/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp +new file mode 100644 +index 0000000..7f887b3 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp +@@ -0,0 +1,111 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfilereference.h" ++#include "pbxlegacytarget.h" ++#include "pbxproject.h" ++ ++class PBXLegacyTargetPrivate ++{ ++public: ++ QString buildToolPath; ++ QString buildArgumentsString; ++ QString buildWorkingDirectory; ++ bool passBuildSettingsInEnvironment; ++}; ++ ++PBXLegacyTarget::PBXLegacyTarget(PBXProject *parent) : ++ PBXTarget(parent), d(new PBXLegacyTargetPrivate) ++{ ++ d->buildToolPath = QLatin1String("/bin/bash"); ++ d->buildArgumentsString = QLatin1String("$(ACTION)"); ++ d->buildWorkingDirectory = QLatin1String("$BUILT_PRODUCTS_DIR"); ++ d->passBuildSettingsInEnvironment = true; ++} ++ ++PBXLegacyTarget::~PBXLegacyTarget() ++{ ++ delete d; ++} ++ ++QString PBXLegacyTarget::isa() const ++{ ++ return QLatin1String("PBXLegacyTarget"); ++} ++ ++PBXObjectMap PBXLegacyTarget::toMap() const ++{ ++ PBXObjectMap self = PBXTarget::toMap(); ++ self.insert(QLatin1String("buildToolPath"), d->buildToolPath); ++ self.insert(QLatin1String("buildArgumentsString"), d->buildArgumentsString); ++ self.insert(QLatin1String("buildWorkingDirectory"), d->buildWorkingDirectory); ++ self.insert(QLatin1String("passBuildSettingsInEnvironment"), d->passBuildSettingsInEnvironment ? 1 : 0); ++ return self; ++} ++ ++QString PBXLegacyTarget::buildToolPath() const ++{ ++ return d->buildToolPath; ++} ++ ++void PBXLegacyTarget::setBuildToolPath(const QString &buildToolPath) ++{ ++ d->buildToolPath = buildToolPath; ++} ++ ++QString PBXLegacyTarget::buildArgumentsString() const ++{ ++ return d->buildArgumentsString; ++} ++ ++void PBXLegacyTarget::setBuildArgumentsString(const QString &buildArgumentsString) ++{ ++ d->buildArgumentsString = buildArgumentsString; ++} ++ ++QString PBXLegacyTarget::buildWorkingDirectory() const ++{ ++ return d->buildWorkingDirectory; ++} ++ ++void PBXLegacyTarget::setBuildWorkingDirectory(const QString &buildWorkingDirectory) ++{ ++ d->buildWorkingDirectory = buildWorkingDirectory; ++} ++ ++bool PBXLegacyTarget::passBuildSettingsInEnvironment() const ++{ ++ return d->passBuildSettingsInEnvironment; ++} ++ ++void PBXLegacyTarget::setPassBuildSettingsInEnvironment(bool passBuildSettingsInEnvironment) ++{ ++ d->passBuildSettingsInEnvironment = passBuildSettingsInEnvironment; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxlegacytarget.h b/src/lib/corelib/generators/xcode/pbxlegacytarget.h +new file mode 100644 +index 0000000..e6b09d4 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxlegacytarget.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXLEGACYTARGET_H ++#define PBXLEGACYTARGET_H ++ ++#include "pbxtarget.h" ++ ++class PBXLegacyTargetPrivate; ++ ++class PBXLegacyTarget : public PBXTarget ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXLegacyTarget) ++public: ++ explicit PBXLegacyTarget(PBXProject *parent = 0); ++ virtual ~PBXLegacyTarget(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString buildToolPath() const; ++ void setBuildToolPath(const QString &buildToolPath); ++ ++ QString buildArgumentsString() const; ++ void setBuildArgumentsString(const QString &buildArgumentsString); ++ ++ QString buildWorkingDirectory() const; ++ void setBuildWorkingDirectory(const QString &buildWorkingDirectory); ++ ++ bool passBuildSettingsInEnvironment() const; ++ void setPassBuildSettingsInEnvironment(bool passBuildSettingsInEnvironment); ++ ++private: ++ PBXLegacyTargetPrivate *d; ++}; ++ ++#endif // PBXLEGACYTARGET_H +diff --git a/src/lib/corelib/generators/xcode/pbxnativetarget.cpp b/src/lib/corelib/generators/xcode/pbxnativetarget.cpp +new file mode 100644 +index 0000000..f9e648c +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxnativetarget.cpp +@@ -0,0 +1,68 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxbuildphase.h" ++#include "pbxfilereference.h" ++#include "pbxnativetarget.h" ++#include "pbxproject.h" ++#include "xcconfigurationlist.h" ++ ++class PBXNativeTargetPrivate ++{ ++public: ++ PBXNativeTargetPrivate(); ++}; ++ ++PBXNativeTargetPrivate::PBXNativeTargetPrivate() ++{ ++} ++ ++PBXNativeTarget::PBXNativeTarget(PBXProject *parent) : ++ PBXTarget(parent), d(new PBXNativeTargetPrivate) ++{ ++} ++ ++PBXNativeTarget::~PBXNativeTarget() ++{ ++ delete d; ++} ++ ++QString PBXNativeTarget::isa() const ++{ ++ return QLatin1String("PBXNativeTarget"); ++} ++ ++PBXObjectMap PBXNativeTarget::toMap() const ++{ ++ PBXObjectMap self = PBXTarget::toMap(); ++ self.insert(QLatin1String("productInstallPath"), QLatin1String("$(HOME)/Applications")); ++ self.insert(QLatin1String("buildRules"), QList()); ++ return self; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxnativetarget.h b/src/lib/corelib/generators/xcode/pbxnativetarget.h +new file mode 100644 +index 0000000..a06b979 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxnativetarget.h +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXNATIVETARGET_H ++#define PBXNATIVETARGET_H ++ ++#include "pbxtarget.h" ++ ++class PBXNativeTargetPrivate; ++ ++class PBXNativeTarget : public PBXTarget ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXNativeTarget) ++public: ++ explicit PBXNativeTarget(PBXProject *parent = 0); ++ ~PBXNativeTarget(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++private: ++ PBXNativeTargetPrivate *d; ++}; ++ ++#endif // PBXNATIVETARGET_H +diff --git a/src/lib/corelib/generators/xcode/pbxobject.cpp b/src/lib/corelib/generators/xcode/pbxobject.cpp +new file mode 100644 +index 0000000..0ea69d6 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxobject.cpp +@@ -0,0 +1,96 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxobject.h" ++#include ++#include ++#include ++#include ++ ++static QMap generatedIdentifiers; ++ ++class PBXObjectPrivate ++{ ++public: ++ QString identifier; ++}; ++ ++PBXObject::PBXObject(QObject *parent) ++ : QObject(parent), d(new PBXObjectPrivate) ++{ ++} ++ ++PBXObject::~PBXObject() ++{ ++ delete d; ++} ++ ++QString PBXObject::createIdentifier(const QByteArray &hashData) ++{ ++ if (qgetenv("QBS_XCODE_GENERATOR_DETERMINISTIC_IDENTIFIERS") == QByteArray("1")) { ++ QCryptographicHash hash(QCryptographicHash::Sha3_512); ++ hash.addData(hashData); ++ const QString result = hash.result().left(12).toHex().toUpper(); ++ if (generatedIdentifiers.contains(result) ++ /*&& generatedIdentifiers.value(result) != hashData*/) { ++ // hash collision! ++ fprintf(stderr, "hash collision %s - %s\n", result.toUtf8().data(), hashData.data()); ++ abort(); ++ } ++ generatedIdentifiers.insert(result, hashData); ++ return result; ++ } ++ ++ return QUuid::createUuid().toByteArray().left(12).toHex().toUpper(); ++} ++ ++PBXObjectIdentifier PBXObject::identifier() const ++{ ++ if (d->identifier.isEmpty()) ++ d->identifier = createIdentifier(isa().toUtf8() + QByteArray(":") + hashData()); ++ return PBXObjectIdentifier(d->identifier, isa(), comment()); ++} ++ ++PBXObjectMap PBXObject::toMap() const ++{ ++ PBXObjectMap self; ++ self.insert(QLatin1String("isa"), isa()); ++ return self; ++} ++ ++QString PBXObject::comment() const ++{ ++ return isa(); ++} ++ ++QByteArray PBXObject::hashData() const ++{ ++ return QByteArray(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxobject.h b/src/lib/corelib/generators/xcode/pbxobject.h +new file mode 100644 +index 0000000..d4ede7e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxobject.h +@@ -0,0 +1,124 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXOBJECT_H ++#define PBXOBJECT_H ++ ++#include ++#include ++#include ++ ++class PBXObjectPrivate; ++ ++class PBXObjectIdentifier { ++public: ++ PBXObjectIdentifier() { ++ } ++ ++ PBXObjectIdentifier(const PBXObjectIdentifier &other) { ++ _key = other._key; ++ _isa = other._isa; ++ _comment = other._comment; ++ } ++ ++ PBXObjectIdentifier(const QLatin1String &identifier, const QString &isa = QString(), const QString &comment = QString()) { ++ _key = identifier; ++ _isa = isa; ++ _comment = comment; ++ } ++ ++ PBXObjectIdentifier(const QString &identifier, const QString &isa = QString(), const QString &comment = QString()) { ++ _key = identifier; ++ _isa = isa; ++ _comment = comment; ++ } ++ ++ QString toString() const { ++ return identifier(); ++ } ++ ++ QString identifier() const { ++ return _key; ++ } ++ ++ QString isa() const { ++ return _isa; ++ } ++ ++ QString comment() const { ++ return _comment; ++ } ++ ++ bool operator==(const PBXObjectIdentifier &other) const { ++ return _key == other._key && _isa == other._isa && _comment == other._comment; ++ } ++ ++ bool operator<(const PBXObjectIdentifier &other) const { ++ return _isa + _key < other._isa + other._key; ++ } ++ ++private: ++ QString _key; ++ QString _isa; ++ QString _comment; ++}; ++ ++Q_DECLARE_METATYPE(PBXObjectIdentifier) ++ ++inline bool qHash(const PBXObjectIdentifier &other) { ++ return qHash(other.toString()); ++} ++ ++typedef QMap PBXObjectMap; ++Q_DECLARE_METATYPE(PBXObjectMap) ++ ++class PBXObject : public QObject ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXObject) ++protected: ++ explicit PBXObject(QObject *parent = 0); ++ ++public: ++ virtual ~PBXObject(); ++ ++ static QString createIdentifier(const QByteArray &hashData); ++ ++ PBXObjectIdentifier identifier() const; ++ virtual QString isa() const = 0; ++ virtual PBXObjectMap toMap() const; ++ virtual QString comment() const; ++ virtual QByteArray hashData() const; ++ ++private: ++ PBXObjectPrivate *d; ++}; ++ ++#endif // PBXOBJECT_H +diff --git a/src/lib/corelib/generators/xcode/pbxproducttype.cpp b/src/lib/corelib/generators/xcode/pbxproducttype.cpp +new file mode 100644 +index 0000000..657b020 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproducttype.cpp +@@ -0,0 +1,75 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxproducttype.h" ++ ++QString PBX::productTypeString(PBX::PBXProductType productType) ++{ ++ switch (productType) ++ { ++ case Application: ++ return QLatin1String("com.apple.product-type.application"); ++ case Tool: ++ return QLatin1String("com.apple.product-type.tool"); ++ case LibraryStatic: ++ return QLatin1String("com.apple.product-type.library.static"); ++ case LibraryDynamic: ++ return QLatin1String("com.apple.product-type.library.dynamic"); ++ case Framework: ++ return QLatin1String("com.apple.product-type.framework"); ++ case StaticFramework: ++ return QLatin1String("com.apple.product-type.framework.static"); ++ case Bundle: ++ return QLatin1String("com.apple.product-type.bundle"); ++ case KernelExtension: ++ return QLatin1String("com.apple.product-type.kernel-extension"); ++ case KernelExtensionIOKit: ++ return QLatin1String("com.apple.product-type.kernel-extension.iokit"); ++ } ++ ++ QLatin1String("com.apple.product-type.application.java"); ++ QLatin1String("com.apple.product-type.application.shallow"); ++ QLatin1String("com.apple.product-type.app-extension"); ++ QLatin1String("com.apple.product-type.bundle.shallow"); ++ QLatin1String("com.apple.product-type.bundle.unit-test"); ++ QLatin1String("com.apple.product-type.bundle.ocunit-test"); ++ QLatin1String("com.apple.product-type.framework.shallow"); ++ QLatin1String("com.apple.product-type.in-app-purchase-content"); ++ QLatin1String("com.apple.product-type.kernel-extension.shallow"); ++ QLatin1String("com.apple.product-type.kernel-extension.iokit.shallow"); ++ QLatin1String("com.apple.product-type.library.java.archive"); ++ QLatin1String("com.apple.product-type.objfile"); ++ QLatin1String("com.apple.product-type.pluginkit-plugin"); ++ QLatin1String("com.apple.product-type.spotlight-importer"); ++ QLatin1String("com.apple.product-type.tool.java"); ++ QLatin1String("com.apple.product-type.xpc-service"); ++ ++ return QString(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxproducttype.h b/src/lib/corelib/generators/xcode/pbxproducttype.h +new file mode 100644 +index 0000000..cf2e48e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproducttype.h +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXPRODUCTTYPE_H ++#define PBXPRODUCTTYPE_H ++ ++#include ++ ++namespace PBX ++{ ++ typedef enum { ++ Application = 1, ++ Tool, ++ LibraryStatic, ++ LibraryDynamic, ++ Framework, ++ StaticFramework, ++ Bundle, ++ KernelExtension, ++ KernelExtensionIOKit ++ } PBXProductType; ++ ++ QString productTypeString(PBXProductType productType); ++} ++ ++#endif // PBXPRODUCTTYPE_H +diff --git a/src/lib/corelib/generators/xcode/pbxproject.cpp b/src/lib/corelib/generators/xcode/pbxproject.cpp +new file mode 100644 +index 0000000..3ab709c +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproject.cpp +@@ -0,0 +1,333 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "opensteppropertylist.h" ++#include "pbxbuildphase.h" ++#include "pbxbuildfile.h" ++#include "pbxcontaineritemproxy.h" ++#include "pbxgroup.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++#include ++#include ++#include ++ ++static const QString kClassPrefixAttribute = QLatin1String("CLASSPREFIX"); ++static const QString kLastUpgradeCheckAttribute = QLatin1String("LastUpgradeCheck"); ++static const QString kOrganizationNameAttribute = QLatin1String("ORGANIZATIONNAME"); ++static const QString kTargetAttributesAttribute = QLatin1String("TargetAttributes"); ++ ++class PBXProjectPrivate ++{ ++public: ++ QString name; ++ QString projectAbsolutePath; ++ QString projectDirPath; ++ PBXGroup *frameworksRefGroup; ++ PBXGroup *productRefGroup; ++ QList targets; ++ XCConfigurationList *configurationList; ++ QVariantMap attributes; ++}; ++ ++PBXProject::PBXProject(const QString &projectAbsolutePath, QObject *parent) : ++ PBXContainer(parent), d(new PBXProjectPrivate) ++{ ++ d->projectAbsolutePath = projectAbsolutePath; ++ d->configurationList = new XCConfigurationList(this); ++ ++ d->frameworksRefGroup = new PBXGroup(rootGroup()); ++ d->frameworksRefGroup->setName(QLatin1String("Frameworks")); ++ ++ d->productRefGroup = new PBXGroup(rootGroup()); ++ d->productRefGroup->setName(QLatin1String("Products")); ++ d->productRefGroup->setSourceTree(PBX::Group); ++} ++ ++PBXProject::~PBXProject() ++{ ++ delete d; ++} ++ ++QString PBXProject::isa() const ++{ ++ return QLatin1String("PBXProject"); ++} ++ ++PBXObjectMap PBXProject::toMap() const ++{ ++ // HACK: Make sure "Frameworks", "Products" groups are always at the bottom ++ rootGroup()->removeItem(d->frameworksRefGroup); ++ rootGroup()->removeItem(d->productRefGroup); ++ rootGroup()->addItem(d->frameworksRefGroup); ++ rootGroup()->addItem(d->productRefGroup); ++ ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("attributes"), d->attributes); ++ self.insert(QLatin1String("buildConfigurationList"), QVariant::fromValue(buildConfigurationList()->identifier())); ++ self.insert(QLatin1String("compatibilityVersion"), QLatin1String("Xcode 3.2")); ++ self.insert(QLatin1String("developmentRegion"), QLatin1String("English")); ++ self.insert(QLatin1String("hasScannedForEncodings"), QLatin1String("1")); ++ self.insert(QLatin1String("knownRegions"), QStringList() << QLatin1String("en")); ++ self.insert(QLatin1String("mainGroup"), QVariant::fromValue(rootGroup()->identifier())); ++ self.insert(QLatin1String("productRefGroup"), QVariant::fromValue(productRefGroup()->identifier())); ++ self.insert(QLatin1String("projectDirPath"), d->projectDirPath); ++ //self.insert(QLatin1String("projectReferences"), QVariantList()); // array of map { ProductGroup:, ProjectRef: }? ++ self.insert(QLatin1String("projectRoot"), QLatin1String("")); ++ ++ QVariantList targetIdentifiers; ++ foreach (PBXTarget *target, targets()) ++ targetIdentifiers += QVariant::fromValue(target->identifier()); ++ self.insert(QLatin1String("targets"), targetIdentifiers); ++ ++ return self; ++} ++ ++QString PBXProject::comment() const ++{ ++ return QLatin1String("Project object"); ++} ++ ++QByteArray PBXProject::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ data.append(d->name); ++ return data; ++} ++ ++PBXGroup *PBXProject::productRefGroup() const ++{ ++ return d->productRefGroup; ++} ++ ++PBXGroup *PBXProject::frameworksRefGroup() const ++{ ++ return d->frameworksRefGroup; ++} ++ ++QList PBXProject::targets() const ++{ ++ return d->targets; ++} ++ ++PBXTarget *PBXProject::targetNamed(const QString &targetName) const ++{ ++ foreach (PBXTarget *target, d->targets) ++ { ++ if (target->name() == targetName) ++ return target; ++ } ++ ++ return NULL; ++} ++ ++void PBXProject::addTarget(PBXTarget *target) ++{ ++ d->targets.append(target); ++} ++ ++QString PBXProject::name() const ++{ ++ return d->name; ++} ++ ++void PBXProject::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QVariantMap PBXProject::attributes() const ++{ ++ return d->attributes; ++} ++ ++void PBXProject::setAttributes(const QVariantMap &attributes) ++{ ++ d->attributes = attributes; ++} ++ ++QVariant PBXProject::attribute(const QString &name) const ++{ ++ return d->attributes[name]; ++} ++ ++void PBXProject::setAttribute(const QString &name, const QVariant &value) ++{ ++ d->attributes[name] = value; ++} ++ ++void PBXProject::removeAttribute(const QString &name) ++{ ++ d->attributes.remove(name); ++} ++ ++PBXProject::Version PBXProject::lastUpgradeCheck() const ++{ ++ const QString s = d->attributes[kLastUpgradeCheckAttribute].toString().mid(0, 3); ++ Version v; ++ v.major = s.left(2).toInt(); ++ v.minor = s.right(1).toInt(); ++ return v; ++} ++ ++void PBXProject::setLastUpgradeCheck(const PBXProject::Version &version) ++{ ++ const int major = qBound(0, version.major, 99); ++ const int minor = qBound(0, version.minor, 9); ++ d->attributes[kLastUpgradeCheckAttribute] = ++ QString::number(major).rightJustified(2, QLatin1Char('0')) + ++ QString::number(minor).leftJustified(2, QLatin1Char('0')); ++} ++ ++QString PBXProject::classPrefix() const ++{ ++ return d->attributes[kClassPrefixAttribute].toString(); ++} ++ ++void PBXProject::setClassPrefix(const QString &classPrefix) ++{ ++ d->attributes[kClassPrefixAttribute] = classPrefix; ++} ++ ++QString PBXProject::organizationName() const ++{ ++ return d->attributes[kOrganizationNameAttribute].toString(); ++} ++ ++void PBXProject::setOrganizationName(const QString &organizationName) ++{ ++ d->attributes[kOrganizationNameAttribute] = organizationName; ++} ++ ++QString PBXProject::projectWrapperPath() const ++{ ++ return QFileInfo(d->projectAbsolutePath).absolutePath(); ++} ++ ++QString PBXProject::projectDirPath() const ++{ ++ return d->projectDirPath; ++} ++ ++void PBXProject::setProjectDirPath(const QString &projectDirPath) ++{ ++ d->projectDirPath = projectDirPath; ++} ++ ++void PBXProject::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ configuration->setBuildSetting(key, value); ++} ++ ++XCConfigurationList *PBXProject::buildConfigurationList() const ++{ ++ return d->configurationList; ++} ++ ++static void writeGroup(PBXObjectMap &objects, PBXGroup *group) ++{ ++ objects.insert(group->identifier(), QVariant::fromValue(group->toMap())); ++ foreach (PBXReference *child, group->children()) ++ { ++ if (PBXGroup *group = dynamic_cast(child)) ++ writeGroup(objects, group); ++ else ++ objects.insert(child->identifier(), QVariant::fromValue(child->toMap())); ++ } ++} ++ ++bool PBXProject::writeToFileSystemProjectFile(bool projectWrite, bool userWrite, bool checkNeedsRevert) ++{ ++ PBXObjectMap objects; ++ objects.insert(identifier(), QVariant::fromValue(toMap())); ++ ++ // Add the project's root group (i.e. the root node in the file tree which contains everything) ++ writeGroup(objects, rootGroup()); ++ ++ // Add the project's build configuration list and build configurations to the object map ++ objects.insert(d->configurationList->identifier(), QVariant::fromValue(d->configurationList->toMap())); ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ objects.insert(configuration->identifier(), QVariant::fromValue(configuration->toMap())); ++ ++ // Add the build targets to the object map ++ foreach (PBXTarget *target, targets()) ++ { ++ objects.insert(target->identifier(), QVariant::fromValue(target->toMap())); ++ ++ // Add the target's build configuration list and build configurations to the object map ++ objects.insert(target->buildConfigurationList()->identifier(), QVariant::fromValue(target->buildConfigurationList()->toMap())); ++ foreach (XCBuildConfiguration *configuration, target->buildConfigurationList()->buildConfigurations()) ++ objects.insert(configuration->identifier(), QVariant::fromValue(configuration->toMap())); ++ ++ // Add the target's dependency objects to the object map ++ foreach (PBXTargetDependency *dependency, target->targetDependencies()) { ++ objects.insert(dependency->identifier(), QVariant::fromValue(dependency->toMap())); ++ ++ if (dependency->targetProxy()) { ++ objects.insert(dependency->targetProxy()->identifier(), QVariant::fromValue(dependency->targetProxy()->toMap())); ++ } ++ } ++ ++ // Add the target's build phases... ++ foreach (PBXBuildPhase *buildPhase, target->buildPhases()) ++ { ++ objects.insert(buildPhase->identifier(), QVariant::fromValue(buildPhase->toMap())); ++ ++ // And each of the files within ++ foreach (PBXBuildFile *buildFile, buildPhase->buildFiles()) ++ { ++ objects.insert(buildFile->identifier(), QVariant::fromValue(buildFile->toMap())); ++ } ++ } ++ } ++ ++ // add all subobjects to objects map! ++ ++ // Build the root pbxproj object map ++ PBXObjectMap map; ++ map.insert(QLatin1String("archiveVersion"), QLatin1String("1")); ++ map.insert(QLatin1String("classes"), QVariantMap()); ++ map.insert(QLatin1String("objectVersion"), QLatin1String("46")); ++ map.insert(QLatin1String("objects"), QVariant::fromValue(objects)); ++ map.insert(QLatin1String("rootObject"), QVariant::fromValue(identifier())); ++ ++ QFile file(d->projectAbsolutePath); ++ if (file.open(QIODevice::WriteOnly)) ++ { ++ file.write(QByteArray("// !$*UTF8*$!\n")); ++ file.write(OpenStepPropertyList::toString(map).toUtf8()); ++ } ++ ++ return file.error() == QFile::NoError; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxproject.h b/src/lib/corelib/generators/xcode/pbxproject.h +new file mode 100644 +index 0000000..7a2ed88 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproject.h +@@ -0,0 +1,114 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXPROJECT_H ++#define PBXPROJECT_H ++ ++#include "pbxcontainer.h" ++ ++class PBXTarget; ++class XCConfigurationList; ++ ++class PBXProjectPrivate; ++ ++class PBXProject : public PBXContainer ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXProject) ++public: ++ typedef struct { ++ int major; ++ int minor; ++ } Version; ++ ++ explicit PBXProject(const QString &projectAbsolutePath, QObject *parent = 0); ++ ~PBXProject(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXGroup *frameworksRefGroup() const; ++ ++ /*! ++ * Group in the root of the Xcode file tree which contains references to product target files. ++ * ++ * For example, this will contain references to output application and library executables. ++ */ ++ PBXGroup *productRefGroup() const; ++ ++ static bool isProjectWrapperExtension(const QString &extension); ++ static PBXProject *projectWithFile(const QString &projectAbsolutePath); ++ ++ QList targets() const; ++ PBXTarget *targetNamed(const QString &targetName) const; ++ ++ void addTarget(PBXTarget *target); ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ QVariantMap attributes() const; ++ void setAttributes(const QVariantMap &attributes); ++ ++ QVariant attribute(const QString &name) const; ++ void setAttribute(const QString &name, const QVariant &value); ++ void removeAttribute(const QString &name); ++ ++ Version lastUpgradeCheck() const; ++ void setLastUpgradeCheck(const Version &version); ++ ++ QString classPrefix() const; ++ void setClassPrefix(const QString &classPrefix); ++ ++ QString organizationName() const; ++ void setOrganizationName(const QString &organizationName); ++ ++ /*! ++ * Returns the path of the .xcodeproj wrapper directory. ++ */ ++ QString projectWrapperPath() const; ++ ++ QString projectDirPath() const; ++ void setProjectDirPath(const QString &projectDirPath); ++ ++ void setBuildSetting(const QString &key, const QVariant &value); ++ ++ XCConfigurationList *buildConfigurationList() const; ++ bool writeToFileSystemProjectFile(bool projectWrite, bool userWrite, bool checkNeedsRevert); ++ ++private: ++ PBXProjectPrivate *d; ++}; ++ ++#endif // PBXPROJECT_H +diff --git a/src/lib/corelib/generators/xcode/pbxreference.cpp b/src/lib/corelib/generators/xcode/pbxreference.cpp +new file mode 100644 +index 0000000..651f6fe +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxreference.cpp +@@ -0,0 +1,127 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxreference.h" ++ ++class PBXReferencePrivate ++{ ++public: ++ PBXReferencePrivate(); ++ QString name; ++ QString path; ++ PBX::PBXSourceTree sourceTree; ++}; ++ ++PBXReferencePrivate::PBXReferencePrivate() ++ : name(), sourceTree() ++{ ++} ++ ++PBXReference::PBXReference(QObject *parent) : ++ PBXObject(parent), d(new PBXReferencePrivate) ++{ ++} ++ ++PBXReference::~PBXReference() ++{ ++ delete d; ++} ++ ++PBXObjectMap PBXReference::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ ++ if (!name().isEmpty() && name() != path()) { ++ self.insert(QLatin1String("name"), name()); ++ } ++ ++ // Xcode crashes if path is empty, even though it should never be ++ if (!d->path.isEmpty()) ++ self.insert(QLatin1String("path"), d->path); // relative path including the file name ++ ++ self.insert(QLatin1String("sourceTree"), PBX::sourceTreeString(sourceTree())); ++ return self; ++} ++ ++/*! ++ * \brief PBXReference::name ++ * \return display name of file or group, usually the same as the name of the file or directory. ++ */ ++QString PBXReference::name() const ++{ ++ return d->name; ++} ++ ++void PBXReference::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QString PBXReference::path() const ++{ ++ return d->path; ++} ++ ++void PBXReference::setPath(const QString &filePath) ++{ ++ d->path = filePath; ++} ++ ++PBX::PBXSourceTree PBXReference::sourceTree() const ++{ ++ return d->sourceTree; ++} ++ ++void PBXReference::setSourceTree(PBX::PBXSourceTree sourceTree) ++{ ++ d->sourceTree = sourceTree; ++} ++ ++QString PBXReference::comment() const ++{ ++ return name(); ++} ++ ++QByteArray PBXReference::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (!d->path.isEmpty()) { ++ QStringList pathComponents; ++ const PBXReference *ref = this; ++ do { ++ pathComponents.insert(0, ref->path().toUtf8()); ++ } while ((ref = dynamic_cast(ref->parent()))); ++ ++ data.append(pathComponents.join("/").toUtf8()); ++ } else if (!d->name.isEmpty()) { ++ data.append(d->name.toUtf8()); ++ } ++ return data; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxreference.h b/src/lib/corelib/generators/xcode/pbxreference.h +new file mode 100644 +index 0000000..3400a25 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxreference.h +@@ -0,0 +1,72 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXREFERENCE_H ++#define PBXREFERENCE_H ++ ++#include "pbxobject.h" ++#include "pbxsourcetree.h" ++#include ++ ++class PBXReferencePrivate; ++ ++// Mono calls this PBXFileElement? ++class PBXReference : public PBXObject ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXReference) ++protected: ++ explicit PBXReference(QObject *parent = 0); ++ virtual ~PBXReference(); ++ ++public: ++ PBXObjectMap toMap() const; ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ /*! ++ * File path of the referenced file, relative based on the value of \a sourceTree. ++ */ ++ QString path() const; ++ void setPath(const QString &path); ++ ++ PBX::PBXSourceTree sourceTree() const; ++ void setSourceTree(PBX::PBXSourceTree sourceTree); ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++private: ++ PBXReferencePrivate *d; ++}; ++ ++#endif // PBXREFERENCE_H +diff --git a/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp +new file mode 100644 +index 0000000..902d05d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxsourcesbuildphase.h" ++ ++PBXSourcesBuildPhase::PBXSourcesBuildPhase(PBXTarget *parent) : ++ PBXBuildPhase(parent) ++{ ++} ++ ++QString PBXSourcesBuildPhase::name() const ++{ ++ return QLatin1String("Sources"); ++} ++ ++QString PBXSourcesBuildPhase::isa() const ++{ ++ return QLatin1String("PBXSourcesBuildPhase"); ++} ++ ++PBXObjectMap PBXSourcesBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXBuildPhase::toMap(); ++ return self; ++} ++ ++QString PBXSourcesBuildPhase::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h +new file mode 100644 +index 0000000..e841720 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXSOURCESBUILDPHASE_H ++#define PBXSOURCESBUILDPHASE_H ++ ++#include "pbxbuildphase.h" ++ ++/*! ++ * \brief The PBXSourcesBuildPhase class represents the build phase in which source files are compiled. ++ */ ++class PBXSourcesBuildPhase : public PBXBuildPhase ++{ ++ Q_OBJECT ++public: ++ explicit PBXSourcesBuildPhase(PBXTarget *parent = 0); ++ ++ QString name() const; ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++}; ++ ++#endif // PBXSOURCESBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxsourcetree.cpp b/src/lib/corelib/generators/xcode/pbxsourcetree.cpp +new file mode 100644 +index 0000000..d2163aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcetree.cpp +@@ -0,0 +1,50 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxsourcetree.h" ++ ++QString PBX::sourceTreeString(PBX::PBXSourceTree tree) ++{ ++ switch (tree) ++ { ++ case Absolute: ++ return QLatin1String(""); ++ case Group: ++ return QLatin1String(""); ++ case SourceRoot: ++ return QLatin1String("SOURCE_ROOT"); ++ case BuildProductDir: ++ return QLatin1String("BUILT_PRODUCTS_DIR"); ++ case SdkRoot: ++ return QLatin1String("SDKROOT"); ++ } ++ ++ return QString(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxsourcetree.h b/src/lib/corelib/generators/xcode/pbxsourcetree.h +new file mode 100644 +index 0000000..f5252eb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcetree.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXSOURCETREE_H ++#define PBXSOURCETREE_H ++ ++#include ++ ++namespace PBX ++{ ++ /*! ++ * Location that the file reference's path is relative to. ++ */ ++ typedef enum { ++ Absolute, ++ Group, ++ SourceRoot, ++ BuildProductDir, ++ SdkRoot ++ } PBXSourceTree; ++ ++ QString sourceTreeString(PBXSourceTree tree); ++} ++ ++#endif // PBXSOURCETREE_H +diff --git a/src/lib/corelib/generators/xcode/pbxtarget.cpp b/src/lib/corelib/generators/xcode/pbxtarget.cpp +new file mode 100644 +index 0000000..03f4407 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtarget.cpp +@@ -0,0 +1,192 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfilereference.h" ++#include "pbxframeworksbuildphase.h" ++#include "pbxproject.h" ++#include "pbxsourcesbuildphase.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++ ++class PBXTargetPrivate ++{ ++public: ++ PBXTargetPrivate(); ++ QString name; ++ QString productName; ++ PBX::PBXProductType productType; ++ XCConfigurationList *configurationList; ++ PBXFrameworksBuildPhase *frameworksBuildPhase; ++ PBXSourcesBuildPhase *sourcesBuildPhase; ++ PBXFileReference *productReference; ++ QList targetDependencies; ++}; ++ ++PBXTargetPrivate::PBXTargetPrivate() ++ : name(), productType(), configurationList(), sourcesBuildPhase(), productReference(), targetDependencies() ++{ ++} ++ ++PBXTarget::PBXTarget(PBXProject *parent) : ++ PBXObject(parent), d(new PBXTargetPrivate) ++{ ++ d->configurationList = new XCConfigurationList(this); ++ d->frameworksBuildPhase = new PBXFrameworksBuildPhase(this); ++ d->sourcesBuildPhase = new PBXSourcesBuildPhase(this); ++} ++ ++PBXTarget::~PBXTarget() ++{ ++ delete d; ++} ++ ++PBXObjectMap PBXTarget::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("name"), name()); ++ self.insert(QLatin1String("productName"), productName()); ++ self.insert(QLatin1String("productType"), PBX::productTypeString(d->productType)); ++ ++ self.insert(QLatin1String("buildConfigurationList"), QVariant::fromValue(buildConfigurationList()->identifier())); ++ ++ QVariantList buildPhaseReferences; ++ foreach (PBXBuildPhase *buildPhase, buildPhases()) ++ buildPhaseReferences += QVariant::fromValue(buildPhase->identifier()); ++ self.insert(QLatin1String("buildPhases"), buildPhaseReferences); ++ ++ QVariantList targetDependencyReferences; ++ foreach (PBXTargetDependency *dependency, d->targetDependencies) ++ targetDependencyReferences += QVariant::fromValue(dependency->identifier()); ++ self.insert(QLatin1String("dependencies"), targetDependencyReferences); ++ ++ if (d->productReference) ++ self.insert(QLatin1String("productReference"), QVariant::fromValue(d->productReference->identifier())); ++ ++ return self; ++} ++ ++QString PBXTarget::name() const ++{ ++ return d->name; ++} ++ ++void PBXTarget::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QString PBXTarget::productName() const ++{ ++ return d->productName; ++} ++ ++void PBXTarget::setProductName(const QString &productName) ++{ ++ d->productName = productName; ++} ++ ++PBX::PBXProductType PBXTarget::productType() const ++{ ++ return d->productType; ++} ++ ++void PBXTarget::setProductType(PBX::PBXProductType productType) ++{ ++ d->productType = productType; ++} ++ ++XCConfigurationList *PBXTarget::buildConfigurationList() const ++{ ++ return d->configurationList; ++} ++ ++QList &PBXTarget::targetDependencies() const ++{ ++ return d->targetDependencies; ++} ++ ++QVariant PBXTarget::buildSetting(const QString &key, const QString &buildConfigurationName) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) { ++ if (configuration->name() == buildConfigurationName) { ++ return configuration->buildSetting(key); ++ } ++ } ++ ++ return QVariant(); ++} ++ ++void PBXTarget::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ configuration->setBuildSetting(key, value); ++} ++ ++QList PBXTarget::buildPhases() const ++{ ++ QList phases; ++ phases.append(d->frameworksBuildPhase); ++ phases.append(d->sourcesBuildPhase); ++ return phases; ++} ++ ++PBXBuildPhase *PBXTarget::defaultFrameworksBuildPhase() ++{ ++ return d->frameworksBuildPhase; ++} ++ ++PBXBuildPhase *PBXTarget::defaultSourceCodeBuildPhase() ++{ ++ return d->sourcesBuildPhase; ++} ++ ++QString PBXTarget::comment() const ++{ ++ return name(); ++} ++ ++QByteArray PBXTarget::hashData() const ++{ ++ QByteArray hashData = PBXObject::hashData(); ++ hashData.append(d->name.toUtf8()); ++ return hashData; ++} ++ ++PBXFileReference *PBXTarget::productReference() const ++{ ++ return d->productReference; ++} ++ ++void PBXTarget::setProductReference(PBXFileReference *productReference) ++{ ++ d->productReference = productReference; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxtarget.h b/src/lib/corelib/generators/xcode/pbxtarget.h +new file mode 100644 +index 0000000..e915481 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtarget.h +@@ -0,0 +1,100 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXTARGET_H ++#define PBXTARGET_H ++ ++#include "pbxobject.h" ++#include "pbxproducttype.h" ++#include ++ ++class PBXBuildPhase; ++class PBXFileReference; ++class PBXProject; ++class PBXTargetDependency; ++class XCConfigurationList; ++ ++class PBXTargetPrivate; ++ ++class PBXTarget : public PBXObject ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXTarget) ++public: ++ explicit PBXTarget(PBXProject *parent = 0); ++ ~PBXTarget(); ++ ++ PBXObjectMap toMap() const; ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ QString productName() const; ++ void setProductName(const QString &productName); ++ ++ PBX::PBXProductType productType() const; ++ void setProductType(PBX::PBXProductType productType); ++ ++ /*! ++ * File reference to the target's output file. ++ */ ++ PBXFileReference *productReference() const; ++ void setProductReference(PBXFileReference *productReference); ++ ++ /*! ++ * List of the target's build configurations. This is never NULL. ++ */ ++ XCConfigurationList *buildConfigurationList() const; ++ ++ QList &targetDependencies() const; ++ ++ QString expandedValue(const QString &string, void *buildParameters) const; ++ ++ QVariant buildSetting(const QString &key, const QString &buildConfigurationName); ++ void setBuildSetting(const QString &key, const QVariant &value); ++ ++ QList buildPhases() const; ++ PBXBuildPhase *buildPhaseOfClass(void *clazz) const; ++ void addBuildPhase(PBXBuildPhase *buildPhase); ++ PBXBuildPhase *defaultFrameworksBuildPhase(); ++ PBXBuildPhase *defaultLinkBuildPhase(); ++ PBXBuildPhase *defaultSourceCodeBuildPhase(); ++ PBXBuildPhase *defaultResourceBuildPhase(); ++ PBXBuildPhase *defaultHeaderBuildPhase(); ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++private: ++ PBXTargetPrivate *d; ++}; ++ ++#endif // PBXTARGET_H +diff --git a/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp b/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp +new file mode 100644 +index 0000000..2eedcd6 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp +@@ -0,0 +1,99 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontaineritemproxy.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++ ++class PBXTargetDependencyPrivate ++{ ++public: ++ PBXTargetDependencyPrivate(); ++ PBXContainerItemProxy *targetProxy; ++}; ++ ++PBXTargetDependencyPrivate::PBXTargetDependencyPrivate() ++ : targetProxy() ++{ ++} ++ ++PBXTargetDependency::PBXTargetDependency(PBXProject *parent) ++ : PBXObject(parent), d(new PBXTargetDependencyPrivate) ++{ ++ d->targetProxy = new PBXContainerItemProxy(this); ++ d->targetProxy->setContainerPortal(parent); ++} ++ ++PBXTargetDependency::~PBXTargetDependency() ++{ ++ delete d; ++} ++ ++QString PBXTargetDependency::isa() const ++{ ++ return QLatin1String("PBXTargetDependency"); ++} ++ ++PBXObjectMap PBXTargetDependency::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->targetProxy) { ++ self.insert(QLatin1String("targetProxy"), QVariant::fromValue(d->targetProxy->identifier())); ++ if (d->targetProxy->target()) ++ self.insert(QLatin1String("target"), QVariant::fromValue(d->targetProxy->target()->identifier())); ++ } ++ return self; ++} ++ ++QString PBXTargetDependency::comment() const ++{ ++ return PBXObject::comment(); ++} ++ ++PBXTarget *PBXTargetDependency::target() const ++{ ++ return d->targetProxy->target(); ++} ++ ++void PBXTargetDependency::setTarget(PBXTarget *target) ++{ ++ d->targetProxy->setTarget(target); ++} ++ ++PBXContainerItemProxy *PBXTargetDependency::targetProxy() const ++{ ++ return d->targetProxy; ++} ++ ++void PBXTargetDependency::setTargetProxy(PBXContainerItemProxy *targetProxy) ++{ ++ d->targetProxy = targetProxy; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxtargetdependency.h b/src/lib/corelib/generators/xcode/pbxtargetdependency.h +new file mode 100644 +index 0000000..7a146cb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtargetdependency.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXTARGETDEPENDENCY_H ++#define PBXTARGETDEPENDENCY_H ++ ++#include "pbxobject.h" ++ ++class PBXContainerItemProxy; ++class PBXProject; ++class PBXTarget; ++class PBXTargetDependencyPrivate; ++ ++class PBXTargetDependency : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXTargetDependency(PBXProject *parent = 0); ++ virtual ~PBXTargetDependency(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ // http://www.monobjc.net/xcode-project-file-format.html claims ++ // this is a PBXNativeTarget but Xcode says "legacy" (shell script) targets work too... ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++ PBXContainerItemProxy *targetProxy() const; ++ void setTargetProxy(PBXContainerItemProxy *targetProxy); ++ ++private: ++ PBXTargetDependencyPrivate *d; ++}; ++ ++#endif // PBXTARGETDEPENDENCY_H +diff --git a/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp b/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp +new file mode 100644 +index 0000000..541b503 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp +@@ -0,0 +1,92 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++ ++class XCBuildConfigurationPrivate ++{ ++public: ++ QString name; ++ QVariantMap buildSettings; ++ XCBuildConfiguration *baseConfiguration; ++}; ++ ++XCBuildConfiguration::XCBuildConfiguration(XCConfigurationList *parent) : ++ PBXObject(parent), d(new XCBuildConfigurationPrivate) ++{ ++ d->baseConfiguration = 0; ++} ++ ++XCBuildConfiguration::~XCBuildConfiguration() ++{ ++ delete d; ++} ++ ++QString XCBuildConfiguration::isa() const ++{ ++ return QLatin1String("XCBuildConfiguration"); ++} ++ ++PBXObjectMap XCBuildConfiguration::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->baseConfiguration) { ++ self.insert(QLatin1String("baseConfigurationReference"), QVariant::fromValue(d->baseConfiguration->identifier())); ++ } ++ self.insert(QLatin1String("buildSettings"), d->buildSettings); ++ self.insert(QLatin1String("name"), d->name); ++ return self; ++} ++ ++QString XCBuildConfiguration::name() const ++{ ++ return d->name; ++} ++ ++void XCBuildConfiguration::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QVariant XCBuildConfiguration::buildSetting(const QString &key) ++{ ++ return d->buildSettings.value(key); ++} ++ ++void XCBuildConfiguration::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ d->buildSettings.insert(key, value); ++} ++ ++QString XCBuildConfiguration::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/xcbuildconfiguration.h b/src/lib/corelib/generators/xcode/xcbuildconfiguration.h +new file mode 100644 +index 0000000..115a88c +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcbuildconfiguration.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCBUILDCONFIGURATION_H ++#define XCBUILDCONFIGURATION_H ++ ++#include "pbxobject.h" ++#include ++ ++class PBXFileReference; ++class XCConfigurationList; ++ ++class XCBuildConfigurationPrivate; ++ ++class XCBuildConfiguration : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit XCBuildConfiguration(XCConfigurationList *parent = 0); ++ ~XCBuildConfiguration(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ static bool isValidBaseConfigurationFile(PBXFileReference *reference); ++ ++ void setBaseConfigurationReference(PBXFileReference *reference); ++ PBXFileReference *baseConfigurationReference(); ++ ++ QVariant buildSetting(const QString &key); ++ void setBuildSetting(const QString &key, const QVariant &value); ++ ++ QString comment() const; ++ ++private: ++ XCBuildConfigurationPrivate *d; ++}; ++ ++#endif // XCBUILDCONFIGURATION_H +diff --git a/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp b/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp +new file mode 100644 +index 0000000..54d2d39 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp +@@ -0,0 +1,147 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++ ++class XCConfigurationListPrivate ++{ ++public: ++ XCConfigurationListPrivate(); ++ QList buildConfigurations; ++ XCBuildConfiguration *defaultBuildConfiguration; ++}; ++ ++XCConfigurationListPrivate::XCConfigurationListPrivate() ++ : buildConfigurations(), defaultBuildConfiguration() ++{ ++} ++ ++XCConfigurationList::XCConfigurationList(PBXObject *parent) : ++ PBXObject(parent), d(new XCConfigurationListPrivate) ++{ ++} ++ ++XCConfigurationList::~XCConfigurationList() ++{ ++ delete d; ++} ++ ++QString XCConfigurationList::isa() const ++{ ++ return QLatin1String("XCConfigurationList"); ++} ++ ++PBXObjectMap XCConfigurationList::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ ++ QVariantList buildConfigurationReferences; ++ foreach (XCBuildConfiguration *configuration, buildConfigurations()) ++ buildConfigurationReferences += QVariant::fromValue(configuration->identifier()); ++ self.insert(QLatin1String("buildConfigurations"), buildConfigurationReferences); ++ ++ if (d->defaultBuildConfiguration) ++ { ++ self.insert(QLatin1String("defaultConfigurationIsVisible"), 0); ++ self.insert(QLatin1String("defaultConfigurationName"), d->defaultBuildConfiguration->name()); ++ } ++ ++ return self; ++} ++ ++QList XCConfigurationList::buildConfigurations() const ++{ ++ return d->buildConfigurations; ++} ++ ++XCBuildConfiguration *XCConfigurationList::addBuildConfiguration(const QString &name) ++{ ++ foreach (XCBuildConfiguration *config, d->buildConfigurations) { ++ if (config->name() == name) ++ return config; ++ } ++ ++ XCBuildConfiguration *buildConfiguration = new XCBuildConfiguration(); ++ buildConfiguration->setName(name); ++ d->buildConfigurations.append(buildConfiguration); ++ return buildConfiguration; ++} ++ ++void XCConfigurationList::removeBuildConfiguration(const QString &name) ++{ ++ for (int i = 0; i < d->buildConfigurations.size(); ++i) ++ { ++ if (d->buildConfigurations[i]->name() == name) ++ { ++ XCBuildConfiguration *configuration = d->buildConfigurations.takeAt(i); ++ if (d->defaultBuildConfiguration == configuration) ++ d->defaultBuildConfiguration = NULL; ++ delete configuration; ++ break; ++ } ++ } ++} ++ ++void XCConfigurationList::setDefaultBuildConfiguration(const QString &name) ++{ ++ foreach (XCBuildConfiguration *configuration, d->buildConfigurations) ++ { ++ if (configuration->name() == name) ++ { ++ d->defaultBuildConfiguration = configuration; ++ break; ++ } ++ } ++} ++ ++QString XCConfigurationList::comment() const ++{ ++ QString parentIsa; ++ QString parentName; ++ ++ PBXTarget *target = dynamic_cast(parent()); ++ PBXProject *project = dynamic_cast(parent()); ++ ++ if (target) ++ { ++ parentIsa = target->isa(); ++ parentName = target->name(); ++ } ++ else if (project) ++ { ++ parentIsa = project->isa(); ++ parentName = project->name(); ++ } ++ ++ return QString(QLatin1String("Build configuration list for %1 \"%2\"")).arg(parentIsa).arg(parentName); ++} +diff --git a/src/lib/corelib/generators/xcode/xcconfigurationlist.h b/src/lib/corelib/generators/xcode/xcconfigurationlist.h +new file mode 100644 +index 0000000..b693478 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcconfigurationlist.h +@@ -0,0 +1,67 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCCONFIGURATIONLIST_H ++#define XCCONFIGURATIONLIST_H ++ ++#include "pbxobject.h" ++#include ++ ++class XCBuildConfiguration; ++ ++class XCConfigurationListPrivate; ++ ++class XCConfigurationList : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit XCConfigurationList(PBXObject *parent = 0); ++ ~XCConfigurationList(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QList buildConfigurations() const; ++ ++ /*! ++ * Adds a build configuration named \p name if one with that name does not already exist. ++ * Returns the new or existing build configuration. ++ */ ++ XCBuildConfiguration *addBuildConfiguration(const QString &name); ++ void removeBuildConfiguration(const QString &name); ++ void setDefaultBuildConfiguration(const QString &name); ++ ++ QString comment() const; ++ ++private: ++ XCConfigurationListPrivate *d; ++}; ++ ++#endif // XCCONFIGURATIONLIST_H +diff --git a/src/lib/corelib/generators/xcode/xcode.pri b/src/lib/corelib/generators/xcode/xcode.pri +new file mode 100644 +index 0000000..76ada9e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcode.pri +@@ -0,0 +1,59 @@ ++HEADERS += \ ++ $$PWD/opensteppropertylist.h \ ++ $$PWD/pbx.h \ ++ $$PWD/pbxbuildfile.h \ ++ $$PWD/pbxbuildphase.h \ ++ $$PWD/pbxcontainer.h \ ++ $$PWD/pbxcontaineritemproxy.h \ ++ $$PWD/pbxfileencoding.h \ ++ $$PWD/pbxfilereference.h \ ++ $$PWD/pbxfiletype.h \ ++ $$PWD/pbxframeworksbuildphase.h \ ++ $$PWD/pbxgroup.h \ ++ $$PWD/pbxlegacytarget.h \ ++ $$PWD/pbxnativetarget.h \ ++ $$PWD/pbxobject.h \ ++ $$PWD/pbxproducttype.h \ ++ $$PWD/pbxproject.h \ ++ $$PWD/pbxreference.h \ ++ $$PWD/pbxsourcesbuildphase.h \ ++ $$PWD/pbxsourcetree.h \ ++ $$PWD/pbxtarget.h \ ++ $$PWD/pbxtargetdependency.h \ ++ $$PWD/xcbuildconfiguration.h \ ++ $$PWD/xcconfigurationlist.h \ ++ $$PWD/xcodegenerator.h \ ++ $$PWD/xcodenativegenerator.h \ ++ $$PWD/xcodesimplegenerator.h \ ++ $$PWD/xcscheme.h \ ++ $$PWD/xcsettings.h \ ++ $$PWD/xcodebuildsettingmapping.h ++ ++SOURCES += \ ++ $$PWD/opensteppropertylist.cpp \ ++ $$PWD/pbxbuildfile.cpp \ ++ $$PWD/pbxbuildphase.cpp \ ++ $$PWD/pbxcontainer.cpp \ ++ $$PWD/pbxcontaineritemproxy.cpp \ ++ $$PWD/pbxfilereference.cpp \ ++ $$PWD/pbxfiletype.cpp \ ++ $$PWD/pbxframeworksbuildphase.cpp \ ++ $$PWD/pbxgroup.cpp \ ++ $$PWD/pbxlegacytarget.cpp \ ++ $$PWD/pbxnativetarget.cpp \ ++ $$PWD/pbxobject.cpp \ ++ $$PWD/pbxproducttype.cpp \ ++ $$PWD/pbxproject.cpp \ ++ $$PWD/pbxreference.cpp \ ++ $$PWD/pbxsourcesbuildphase.cpp \ ++ $$PWD/pbxsourcetree.cpp \ ++ $$PWD/pbxtarget.cpp \ ++ $$PWD/pbxtargetdependency.cpp \ ++ $$PWD/xcbuildconfiguration.cpp \ ++ $$PWD/xcconfigurationlist.cpp \ ++ $$PWD/xcodegenerator.cpp \ ++ $$PWD/xcodenativegenerator.cpp \ ++ $$PWD/xcodesimplegenerator.cpp \ ++ $$PWD/xcscheme.cpp \ ++ $$PWD/xcsettings.cpp \ ++ $$PWD/xcodebuildsettingmapping.cpp +diff --git a/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp +new file mode 100644 +index 0000000..458bf8f +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp +@@ -0,0 +1,366 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodebuildsettingmapping.h" ++#include "xcodegenerator.h" ++ ++#include ++#include "pbx.h" ++ ++#include ++ ++#include ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++static QVariant _xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group, const QString &moduleName); ++ ++static QVariant xcodeExecutablePrefix(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeExecutableSuffix(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeInfoPlistOutputEncoding(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeArchitecture(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodePreprocessorDefinitions(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeResourcesTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeSdkRoot(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeSupportedPlatforms(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeDylibVersion(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeProductName(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeUseHeadermap(const qbs::Project &project, const ProductData &product, const GroupData &group); ++ ++static QVariant qbsProjectModuleProperty(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project) ++{ ++ QMapIterator module(project.projectConfiguration()); ++ while (module.hasNext()) { ++ module.next(); ++ QString qbsModName = qbsModuleName; ++ if (module.key() == qbsModName.replace(QLatin1String("."), QLatin1String("/"))) { ++ QMapIterator property(module.value().toMap()); ++ while (property.hasNext()) { ++ property.next(); ++ if (qbsPropertyName == property.key()) { ++ return property.value(); ++ } ++ } ++ } ++ } ++ ++ return QVariant(); ++} ++ ++static QVariant qbsModuleProperty(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project, const qbs::ProductData &product, const qbs::GroupData &group) ++{ ++ if (product.isValid()) { ++ return (group.isValid() ? group.properties() : product.moduleProperties()).getModuleProperty(qbsModuleName, qbsPropertyName); ++ } else { ++ return qbsProjectModuleProperty(qbsModuleName, qbsPropertyName, project); ++ } ++ return QVariant(); ++} ++ ++static QVariantList qbsModuleProperties(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project, const qbs::ProductData &product, const qbs::GroupData &group) ++{ ++ if (product.isValid()) { ++ return (group.isValid() ? group.properties() : product.moduleProperties()).getModuleProperties(qbsModuleName, qbsPropertyName); ++ } else { ++ return qbsProjectModuleProperty(qbsModuleName, qbsPropertyName, project).toList(); ++ } ++ return QVariantList(); ++} ++ ++void XcodeBuildSettingMapping::applyToProject(PBXProject *xcodeProject, ++ const qbs::Project &project) const { ++ applyToConfiguration(xcodeProject->buildConfigurationList(), project); ++} ++ ++void XcodeBuildSettingMapping::applyToTarget(PBXTarget *xcodeTarget, ++ const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData) const { ++ applyToConfiguration(xcodeTarget->buildConfigurationList(), project, productData, groupData); ++} ++ ++void XcodeBuildSettingMapping::applyToConfiguration(XCConfigurationList *xcodeConfigurationList, ++ const Project &project, ++ const ProductData &productData, ++ const GroupData &groupData) const { ++ foreach (XCBuildConfiguration *xcodeConfiguration, xcodeConfigurationList->buildConfigurations()) ++ applyToConfiguration(xcodeConfiguration, project, productData, groupData); ++} ++ ++void XcodeBuildSettingMapping::applyToConfiguration(XCBuildConfiguration *xcodeConfiguration, ++ const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData) const { ++ QVariant xcodeValue; ++ if (function) { ++ xcodeValue = function(project, productData, groupData); ++ } else if (isList) { ++ QVariantList list; ++ ++ foreach (const QString &qbsName, qbsNames) { ++ list << qbsModuleProperties(qbsModule, qbsName, project, productData, groupData); ++ } ++ ++ if (!list.isEmpty()) { ++ list.append(QLatin1String("$(inherited)")); ++ xcodeValue = list; ++ } ++ } else { ++ xcodeValue = qbsModuleProperty(qbsModule, qbsNames.first(), project, productData, groupData); ++ } ++ ++ // TODO: Figure out what Xcode *really* does... I think it's this ++ bool shouldSerializeAsList = serializedAsList; ++ if (xcodeValue.type() == QVariant::List || xcodeValue.type() == QVariant::StringList) { ++ const QStringList l = xcodeValue.toStringList(); ++ if (l.size() <= 1) { ++ shouldSerializeAsList = false; // || containsQuotedStrings ??? lineLength? ++ } ++ } ++ ++ if (!shouldSerializeAsList && (xcodeValue.type() == QVariant::List ++ || xcodeValue.type() == QVariant::StringList)) { ++ xcodeValue = xcodeValue.toStringList().join(QLatin1Char(' ')); ++ } ++ ++ if (!xcodeValue.isNull()) { ++ xcodeValue = XcodeGenerator::xcodeInsertPlaceholdersInValue(project, xcodeValue); ++ xcodeConfiguration->setBuildSetting(xcodeName, xcodeValue); ++ } ++} ++ ++/*! ++ * \brief Mapping of Xcode build settings to qbs module and property names or functions. ++ */ ++QList XcodeBuildSettingMapping::defaultBuildSettingsMap() ++{ ++ const QString cpp = QLatin1String("cpp"); ++ ++ QList settings; ++ settings += XcodeBuildSettingMapping(QLatin1String("APPLICATION_EXTENSION_API_ONLY"), cpp, QLatin1String("requireAppExtensionSafeApi")); ++ settings += XcodeBuildSettingMapping(QLatin1String("ARCHS"), &xcodeArchitecture, true); ++ settings += XcodeBuildSettingMapping(QLatin1String("CLANG_ENABLE_OBJC_ARC"), cpp, QLatin1String("automaticReferenceCounting")); ++ settings += XcodeBuildSettingMapping(QLatin1String("CREATE_INFOPLIST_SECTION_IN_BINARY"), cpp, QLatin1String("embedInfoPlist")); ++ settings += XcodeBuildSettingMapping(QLatin1String("DYLIB_CURRENT_VERSION"), &xcodeDylibVersion, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("DYLIB_INSTALL_NAME_BASE"), cpp, QLatin1String("installNamePrefix")); ++ settings += XcodeBuildSettingMapping(QLatin1String("EXECUTABLE_EXTENSION"), &xcodeExecutableSuffix, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("EXECUTABLE_PREFIX"), &xcodeExecutablePrefix, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("FRAMEWORK_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("frameworkPaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("GCC_PREFIX_HEADER"), cpp, QLatin1String("precompiledHeader")); ++ settings += XcodeBuildSettingMapping(QLatin1String("GCC_PREPROCESSOR_DEFINITIONS"), &xcodePreprocessorDefinitions, true); ++ settings += XcodeBuildSettingMapping(QLatin1String("HEADER_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("includePaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_EXPAND_BUILD_SETTINGS"), cpp, QLatin1String("processInfoPlist")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_FILE"), cpp, QLatin1String("infoPlistFile")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_OUTPUT_FORMAT"), &xcodeInfoPlistOutputEncoding, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("IPHONEOS_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumIosVersion")); ++ settings += XcodeBuildSettingMapping(QLatin1String("LD_RUNPATH_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("rpaths"), false); ++ settings += XcodeBuildSettingMapping(QLatin1String("LIBRARY_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("libraryPaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("MACOSX_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumOsxVersion")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_CFLAGS"), cpp, QStringList() << QLatin1String("cFlags") << QLatin1String("objcFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_CPLUSPLUSFLAGS"), cpp, QStringList() << QLatin1String("cxxFlags") << QLatin1String("objcxxFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_LDFLAGS"), cpp, QStringList() << QLatin1String("linkerFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("PRODUCT_NAME"), &xcodeProductName, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("RESOURCES_TARGETED_DEVICE_FAMILY"), &xcodeResourcesTargetedDeviceFamily, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("SDKROOT"), &xcodeSdkRoot, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("SUPPORTED_PLATFORMS"), &xcodeSupportedPlatforms, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("TARGETED_DEVICE_FAMILY"), &xcodeTargetedDeviceFamily, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("USE_HEADERMAP"), &xcodeUseHeadermap, false); ++ return settings; ++} ++ ++QVariant xcodeExecutablePrefix(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ switch (XcodeGenerator::xcodeProductType(product)) ++ { ++ case PBX::Application: ++ case PBX::Tool: ++ case PBX::Bundle: ++ case PBX::Framework: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("executablePrefix"), project, product, group).toString(); ++ case PBX::LibraryDynamic: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("dynamicLibraryPrefix"), project, product, group).toString(); ++ case PBX::LibraryStatic: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("staticLibraryPrefix"), project, product, group).toString(); ++ default: ++ return QString(); ++ } ++} ++ ++QVariant xcodeExecutableSuffix(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ QString suffix; ++ switch (XcodeGenerator::xcodeProductType(product)) ++ { ++ case PBX::Application: ++ case PBX::Tool: ++ case PBX::Bundle: ++ case PBX::Framework: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("executableSuffix"), project, product, group).toString(); ++ break; ++ case PBX::LibraryDynamic: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("dynamicLibrarySuffix"), project, product, group).toString(); ++ break; ++ case PBX::LibraryStatic: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("staticLibrarySuffix"), project, product, group).toString(); ++ break; ++ default: ++ break; ++ } ++ ++ if (suffix.startsWith(QChar('.'))) ++ suffix.remove(0, 1); ++ ++ return suffix; ++} ++ ++QVariant xcodeInfoPlistOutputEncoding(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString format = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("infoPlistFormat"), project, product, group).toString(); ++ if (format == QLatin1String("xml1")) ++ return QLatin1String("XML"); ++ else if (format == QLatin1String("binary1")) ++ return QLatin1String("binary"); ++ ++ // If we don't know what the format is, return the original string (which may be invalid) ++ // "same-as-input" is valid ++ return format; ++} ++ ++QVariant xcodeArchitecture(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString architecture = qbsModuleProperty(QLatin1String("qbs"), QLatin1String("architecture"), project, product, group).toString(); ++ if (architecture == QLatin1String("x86")) ++ return QLatin1String("i386"); ++ return architecture; ++} ++ ++QVariant xcodePreprocessorDefinitions(const qbs::Project &project, const ProductData &product, const GroupData &group) ++{ ++ QStringList defs; ++ Q_FOREACH (const QVariant &def, qbsModuleProperties(QLatin1String("cpp"), QLatin1String("defines"), project, product, group)) { ++ // Preprocessor definitions need to be double escaped since Xcode ignores quoted strings ++ defs.append(def.toString().replace(QLatin1String("\""), QLatin1String("\\\""))); ++ } ++ return defs; ++} ++ ++QVariant xcodeSdkRoot(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString sdkName = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("xcodeSdkName"), project, product, group).toString(); ++ if (!sdkName.isEmpty()) ++ return sdkName; ++ ++ const QString sysroot = qbsModuleProperty(QLatin1String("qbs"), QLatin1String("sysroot"), project, product, group).toString(); ++ if (!sysroot.isEmpty()) ++ return sysroot; ++ ++ const QVariantList targetOS = qbsModuleProperties(QLatin1String("qbs"), QLatin1String("targetOS"), project, product, group); ++ if (targetOS.contains(QLatin1String("osx"))) ++ return QLatin1String("macosx"); ++ else if (targetOS.contains(QLatin1String("ios"))) ++ return QLatin1String("iphoneos"); ++ else ++ throw ErrorInfo(Tr::tr("Unsupported platform for Xcode project")); ++} ++ ++QVariant xcodeSupportedPlatforms(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ QStringList supportedPlatforms; ++ const QVariantList targetOS = qbsModuleProperties(QLatin1String("qbs"), QLatin1String("targetOS"), project, product, group); ++ if (targetOS.contains(QLatin1String("osx"))) { ++ supportedPlatforms.append(QLatin1String("macosx")); ++ } else if (targetOS.contains(QLatin1String("ios"))) { ++ if (targetOS.contains(QLatin1String("ios-simulator"))) { ++ supportedPlatforms.append(QLatin1String("iphonesimulator")); ++ } ++ supportedPlatforms.append(QLatin1String("iphoneos")); ++ } ++ return supportedPlatforms; ++} ++ ++static inline int targetDeviceFamilyIdentifierFromName(const QString &name) ++{ ++ if (name == "iphone") ++ return 1; ++ if (name == "ipad") ++ return 2; ++ return 0; ++} ++ ++QVariant _xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group, const QString &moduleName) ++{ ++ QStringList targetedDeviceFamily; ++ const QVariantList targetDevices = qbsModuleProperties(moduleName, QLatin1String("targetDevices"), project, product, group); ++ Q_FOREACH (const QVariant &targetDevice, targetDevices) { ++ int devId = targetDeviceFamilyIdentifierFromName(targetDevice.toString()); ++ if (devId != 0) { ++ targetedDeviceFamily.append(QString::number(devId)); ++ } ++ } ++ return targetedDeviceFamily.join(QLatin1Char(',')); ++} ++ ++QVariant xcodeResourcesTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ return _xcodeTargetedDeviceFamily(project, product, group, QLatin1String("ib")); ++} ++ ++QVariant xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ return _xcodeTargetedDeviceFamily(project, product, group, QLatin1String("xcode")); ++} ++ ++QVariant xcodeDylibVersion(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ Q_UNUSED(project); ++ Q_UNUSED(group); ++ if (product.type().contains(QLatin1String("dynamiclibrary"))) ++ return product.version(); ++ return QString(); ++} ++ ++QVariant xcodeProductName(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ Q_UNUSED(project); ++ Q_UNUSED(group); ++ if (!product.targetName().isEmpty()) ++ return product.targetName(); ++ return product.name(); ++} ++ ++QVariant xcodeUseHeadermap(const Project &, const ProductData &, const GroupData &) ++{ ++ return QVariant(false); // We never want to use headermaps in qbs-generated projects ++} ++ ++} // namespace qbs +diff --git a/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h +new file mode 100644 +index 0000000..39474fb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h +@@ -0,0 +1,96 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCODECONFIGURATIONSETTING_H ++#define XCODECONFIGURATIONSETTING_H ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++class PBXProject; ++class PBXTarget; ++class XCBuildConfiguration; ++class XCConfigurationList; ++ ++namespace qbs { ++ ++/*! ++ * \brief Represents the mapping of an Xcode build setting name to a qbs module and property name. ++ */ ++struct XcodeBuildSettingMapping { ++ typedef QVariant (*XcodeBuildSettingValueFunction)(const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData); ++ ++ QString xcodeName; ++ QString qbsModule; ++ QStringList qbsNames; ++ bool isList; ++ bool serializedAsList; ++ XcodeBuildSettingValueFunction function; // overrides previous 3 ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, const QString &qbsModule, ++ const QString &qbsName, bool serializedAsList = false) ++ : xcodeName(xcodeName), qbsModule(qbsModule), qbsNames(qbsName), isList(false), ++ serializedAsList(serializedAsList), function(NULL) {} ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, const QString &qbsModule, ++ const QStringList &qbsNames, bool serializedAsList = true) ++ : xcodeName(xcodeName), qbsModule(qbsModule), qbsNames(qbsNames), isList(true), ++ serializedAsList(serializedAsList), function(NULL) {} ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, XcodeBuildSettingValueFunction function, ++ bool serializedAsList) ++ : xcodeName(xcodeName), isList(serializedAsList), ++ serializedAsList(serializedAsList), function(function) {} ++ ++ void applyToProject(PBXProject *xcodeProject, const Project &project) const; ++ void applyToTarget(PBXTarget *xcodeTarget, ++ const Project &project, ++ const ProductData &productData, const GroupData &groupData) const; ++ void applyToConfiguration(XCConfigurationList *xcodeConfigurationList, ++ const Project &project, ++ const ProductData &productData = ProductData(), ++ const GroupData &groupData = GroupData()) const; ++ void applyToConfiguration(XCBuildConfiguration *xcodeConfiguration, ++ const Project &project, ++ const ProductData &productData = ProductData(), ++ const GroupData &groupData = GroupData()) const; ++ ++ static QList defaultBuildSettingsMap(); ++}; ++ ++} // namespace qbs ++ ++#endif // XCODECONFIGURATIONSETTING_H +diff --git a/src/lib/corelib/generators/xcode/xcodegenerator.cpp b/src/lib/corelib/generators/xcode/xcodegenerator.cpp +new file mode 100644 +index 0000000..4bbcb40 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodegenerator.cpp +@@ -0,0 +1,643 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodebuildsettingmapping.h" ++#include "xcodegenerator.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include "pbx.h" ++ ++#include ++#include ++#include ++#include ++ ++static const QString kQbsRunnerFileName = QLatin1String("qbs"); ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++XcodeGenerator::XcodeGenerator() ++{ ++} ++ ++static QString buildVariant(const qbs::Project &project) ++{ ++ return project.projectConfiguration()[QLatin1String("qbs")].toMap()[QLatin1String("buildVariant")].toString(); ++} ++ ++static QString buildVariant(const qbs::ProductData &product) ++{ ++ return product.moduleProperties().getModuleProperty(QLatin1String("qbs"), QLatin1String("buildVariant")).toString(); ++} ++ ++void XcodeGenerator::setupGenerator() ++{ ++ QSet profileNames; ++ QSet projectNames; ++ QSet qbsProjectFiles; ++ QSet buildDirectories; ++ ++ foreach (const qbs::Project &proj, projects()) { ++ profileNames << proj.profile(); ++ projectNames << proj.projectData().name(); ++ qbsProjectFiles << proj.projectData().location().filePath(); ++ ++ QDir baseBuildDirectory(proj.projectData().buildDirectory()); ++ baseBuildDirectory.cdUp(); ++ buildDirectories << baseBuildDirectory.absolutePath(); ++ } ++ ++ QBS_CHECK(!profileNames.isEmpty()); ++ QBS_CHECK(projectNames.size() == 1); ++ QBS_CHECK(qbsProjectFiles.size() == 1); ++ QBS_CHECK(buildDirectories.size() == 1); ++ ++ m_multipleProfiles = profileNames.size() > 1; ++ m_projectName = projectNames.toList().first(); ++ m_qbsProjectFile = qbsProjectFiles.toList().first(); ++ m_baseBuildDirectory = buildDirectories.toList().first(); ++ ++ QBS_CHECK(m_qbsProjectFile.isAbsolute() && m_qbsProjectFile.exists()); ++ QBS_CHECK(m_baseBuildDirectory.isAbsolute() && m_baseBuildDirectory.exists()); ++ ++ m_productGroups.clear(); ++} ++ ++static inline TargetArtifact runnableOrPrimaryTargetArtifactForProduct(const qbs::ProductData &qbsProductData) { ++ // Easy in this case... ++ if (qbsProductData.targetArtifacts().size() == 1) { ++ return qbsProductData.targetArtifacts().first(); ++ } ++ ++ const QStringList types = QStringList() ++ << QLatin1String("bundle") ++ << QLatin1String("application") ++ << QLatin1String("dynamiclibrary") ++ << QLatin1String("staticlibrary") ++ << QLatin1String("loadablemodule"); ++ ++ Q_FOREACH (const TargetArtifact &ta, qbsProductData.targetArtifacts()) { ++ Q_FOREACH (const QString &type, types) { ++ if (qbsProductData.type().contains(type) ++ && ta.fileTags().contains(type)) { ++ return ta; ++ } ++ } ++ } ++ ++ return TargetArtifact(); ++} ++ ++static inline QString installedFilePathForTargetArtifact(const qbs::Project &project, ++ const qbs::ProductData &product, ++ const qbs::InstallOptions &installOptions, ++ const TargetArtifact &ta) { ++ const QList &installables ++ = project.installableFilesForProduct(product, installOptions); ++ foreach (const InstallableFile &file, installables) { ++ if (file.sourceFilePath() == ta.filePath()) ++ return file.targetFilePath(); ++ } ++ return ta.filePath(); ++} ++ ++void XcodeGenerator::generate(const InstallOptions &installOptions) ++{ ++ // TODO: Move to base class and call ProjectGenerator::setupGenerator() ++ setupGenerator(); ++ ++ const QString xcodeWrapperName = m_projectName + QLatin1String(".xcodeproj"); ++ if (!m_baseBuildDirectory.cd(xcodeWrapperName)) ++ if (!m_baseBuildDirectory.mkdir(xcodeWrapperName) || !m_baseBuildDirectory.cd(xcodeWrapperName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode project wrapper directory")); ++ ++ const QString xcodeWorkspaceWrapperName = QLatin1String("project.xcworkspace"); ++ const QString sharedWorkspaceDataDirName = QLatin1String("xcshareddata"); ++ ++ QDir sharedWorkspaceDataDir = m_baseBuildDirectory; ++ if (!sharedWorkspaceDataDir.cd(xcodeWorkspaceWrapperName)) ++ if (!sharedWorkspaceDataDir.mkdir(xcodeWorkspaceWrapperName) || !sharedWorkspaceDataDir.cd(xcodeWorkspaceWrapperName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode workspace wrapper directory")); ++ ++ if (!sharedWorkspaceDataDir.cd(sharedWorkspaceDataDirName)) ++ if (!sharedWorkspaceDataDir.mkdir(sharedWorkspaceDataDirName) || !sharedWorkspaceDataDir.cd(sharedWorkspaceDataDirName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode workspace shared data directory")); ++ ++ const QString sharedWorkspaceSettingsFilePath = sharedWorkspaceDataDir.absoluteFilePath(QLatin1String("WorkspaceSettings.xcsettings")); ++ XCSettings sharedWorkspaceSettings; ++ sharedWorkspaceSettings.setAutocreateSchemes(false); ++ if (!sharedWorkspaceSettings.serialize(sharedWorkspaceSettingsFilePath)) { ++ throw ErrorInfo(Tr::tr("Failed to generate workspace settings %1").arg(sharedWorkspaceSettingsFilePath)); ++ } ++ ++ // Create a shell script to invoke the qbs binary ++ // This is necessary because qbs hangs when invoked directly from Xcode ++ // TODO: Why? ++ const QString &qbsRunnerFilePath = m_baseBuildDirectory.absoluteFilePath(kQbsRunnerFileName); ++ QFile qbsRunner(qbsRunnerFilePath); ++ if (qbsRunner.open(QIODevice::WriteOnly)) { ++ // The runner script, in addition to invoking qbs itself, ++ // adds symlinks from the Xcode target directory to the qbs build directory ++ // This way, products in the Xcode files listing show up properly ++ QTextStream ts(&qbsRunner); ++ ts << QLatin1String("#!/bin/bash\n") ++ << QLatin1String("set -e\n") ++ << QLatin1String("[ -x \"$QBS\" ] || exit 1\n") ++ << QLatin1String("\"$QBS\" \"$@\"\n") ++ << QLatin1String("if [ ! -e \"$TARGET_BUILD_DIR/$PRODUCT_NAME/$FULL_PRODUCT_NAME\" ] && [ -e \"$QBS_TARGET_PATH\" ] ; then\n") ++ << QLatin1String("mkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME\"\n") ++ << QLatin1String("ln -sf \"$QBS_TARGET_PATH\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME/$FULL_PRODUCT_NAME\"\n") ++ << QLatin1String("fi\n"); ++ } ++ ++ PBXProject xcodeProject(m_baseBuildDirectory.absoluteFilePath(QLatin1String("project.pbxproj"))); ++ xcodeProject.setName(m_projectName); ++ ++ // Only potentially add absolute paths if the qbs source directory and build directory differ; ++ // this makes the Xcode project file relocatable (and thus version trackable) if generated in-source ++ const QString qbsSourceDirectory = m_qbsProjectFile.absolutePath(); ++ if (m_baseBuildDirectory.absolutePath() != qbsSourceDirectory) { ++ // TODO: Make it relative anyways ++ xcodeProject.setProjectDirPath(qbsSourceDirectory); ++ xcodeProject.rootGroup()->setPath(xcodeProject.projectDirPath()); ++ } ++ ++ foreach (const qbs::Project &project, projects()) { ++ XCBuildConfiguration *xcconfig = xcodeProject.buildConfigurationList()->addBuildConfiguration(xcodeConfigurationName(project)); ++ xcodeProject.buildConfigurationList()->setDefaultBuildConfiguration(xcconfig->name()); ++ ++ // TODO: Ideally should go into a configuration file instead of in the project file itself ++ // TODO: Is there a better way to find the qbs binary to invoke? For example, someone could use libqbscore to invoke generators... ++ xcconfig->setBuildSetting(QLatin1String("QBS"), QCoreApplication::applicationFilePath()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROFILE"), project.profile()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROJECT_DIRECTORY"), xcodeInsertPlaceholdersInValue(project, qbsSourceDirectory)); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROJECT_FILE_NAME"), m_qbsProjectFile.fileName()); ++ ++ // or baseBuildDirectory + profileName + '-' + buildVariant ++ xcconfig->setBuildSetting(QLatin1String("__QBS_BASE_BUILD_DIRECTORY"), QLatin1String("$(PROJECT_FILE_PATH)/..")); ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_DIRECTORY"), QLatin1String("$(__QBS_BASE_BUILD_DIRECTORY:standardizepath)")); ++ ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_VARIANT"), buildVariant(project)); ++ ++ foreach (const XcodeBuildSettingMapping &setting, XcodeBuildSettingMapping::defaultBuildSettingsMap()) { ++ setting.applyToConfiguration(xcconfig, project); ++ } ++ ++ // Add all the Qbs products as Xcode targets ++ addProjectRecursive(project, project.projectData(), installOptions, xcodeProject, xcodeProject.rootGroup()); ++ ++ // Do some per-target ops ++ foreach (const qbs::ProductData &qbsProductData, project.projectData().allProducts()) { ++ PBXTarget *qbsXcodeTarget = xcodeProject.targetNamed(qbsProductData.name()); ++ if (!qbsXcodeTarget) ++ throw new qbs::ErrorInfo(Tr::tr("could not find PBXTarget for qbs product '%1'").arg(qbsProductData.name())); ++ ++ // Set up target dependencies ++ foreach (const QString &dependencyName, qbsProductData.dependencies()) { ++ PBXTargetDependency *dependentXcodeTarget = new PBXTargetDependency(&xcodeProject); ++ dependentXcodeTarget->setTarget(xcodeProject.targetNamed(dependencyName)); ++ if (!dependentXcodeTarget->target()) ++ throw new qbs::ErrorInfo(Tr::tr("could not find PBXTarget for qbs product '%1'").arg(dependencyName)); ++ ++ qbsXcodeTarget->targetDependencies().append(dependentXcodeTarget); ++ } ++ ++ // Set up a scheme for the target ++ static const QString xcshareddata = QLatin1String("xcshareddata"); ++ static const QString xcschemes = QLatin1String("xcschemes"); ++ QDir schemesDirectory(m_baseBuildDirectory); ++ if (!schemesDirectory.cd(xcshareddata)) { ++ if (!schemesDirectory.mkdir(xcshareddata) || !schemesDirectory.cd(xcshareddata)) { ++ throw ErrorInfo(Tr::tr("failed to make Xcode project shared data directory")); ++ } ++ } ++ if (!schemesDirectory.cd(xcschemes)) { ++ if (!schemesDirectory.mkdir(xcschemes) || !schemesDirectory.cd(xcschemes)) { ++ throw ErrorInfo(Tr::tr("failed to make Xcode project shared schemes directory")); ++ } ++ } ++ ++ const QString schemeFilePath(schemesDirectory.absoluteFilePath(QString(QLatin1String("%1.xcscheme")).arg(qbsXcodeTarget->name()))); ++ XCScheme xcscheme; ++ xcscheme.setParallelizeBuildables(false); // this must be turned off because it conflicts with qbs build directory locking ++ xcscheme.setProject(&xcodeProject); ++ xcscheme.setTarget(qbsXcodeTarget); ++ ++ if (dynamic_cast(qbsXcodeTarget)) { ++ xcscheme.setCustomExecutableFilePath(installedFilePathForTargetArtifact(project, qbsProductData, installOptions, runnableOrPrimaryTargetArtifactForProduct(qbsProductData))); ++ } ++ ++ if (!xcscheme.serialize(schemeFilePath)) { ++ throw ErrorInfo(Tr::tr("Failed to generate scheme %1").arg(schemeFilePath)); ++ } ++ } ++ } ++ ++ if (xcodeProject.writeToFileSystemProjectFile(true, true, true)) ++ qDebug() << "Generated" << qPrintable(xcodeWrapperName); ++ else ++ throw ErrorInfo(Tr::tr("Failed to generate %1").arg(xcodeWrapperName)); ++} ++ ++QString makePathRelativeTo(const QString &path, const QString &basePath) ++{ ++ QString rootPath(basePath); ++ if (!rootPath.endsWith(QLatin1Char('/'))) ++ rootPath += QLatin1Char('/'); ++ ++ QString filePath(path); ++ if (filePath.startsWith(rootPath)) ++ filePath.remove(0, rootPath.size()); ++ ++ return filePath; ++} ++ ++void XcodeGenerator::addProjectRecursive(const Project &project, const ProjectData &projectData, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup) ++{ ++ foreach (const ProjectData &subProjectData, projectData.subProjects()) ++ { ++ PBXGroup *baseGroup = PBXGroup::groupWithName(subProjectData.name(), xcodeGroup); ++ baseGroup->setSourceTree(PBX::Group); ++ ++ // Add the qbs project file for this project ++ foreach (PBXFileReference *ref, baseGroup->addFiles(QStringList() << makePathRelativeTo(m_qbsProjectFile.absoluteFilePath(), xcodeProject.projectDirPath()), false, false)) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ ++ addProjectRecursive(project, subProjectData, installOptions, xcodeProject, baseGroup); ++ } ++ ++ foreach (const ProductData &product, projectData.products()) ++ { ++ addProduct(project, product, installOptions, xcodeProject, xcodeGroup); ++ } ++} ++ ++static inline QVariant flattenXcconfigList(const QStringList &list) { ++ if (list.isEmpty()) ++ return QString(); ++ if (list.size() == 1) ++ return list.first(); ++ return list; ++} ++ ++void XcodeGenerator::addProduct(const Project &project, const ProductData &product, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup) ++{ ++ PBXTarget *xcodeTarget = xcodeTargetForProduct(&xcodeProject, product); ++ xcodeTarget->setName(product.name()); ++ xcodeTarget->setProductType(xcodeProductType(product)); ++ ++ PBXLegacyTarget *xcodeLegacyTarget = dynamic_cast(xcodeTarget); ++ if (xcodeLegacyTarget) { ++ xcodeLegacyTarget->setBuildWorkingDirectory(XcodeGenerator::xcodeInsertPlaceholdersInValue(project, xcodeProject.projectDirPath()).toString()); ++ xcodeLegacyTarget->setBuildToolPath(QLatin1String("/bin/bash")); ++ ++ QStringList buildArguments; ++ buildArguments << QLatin1String("\"$(PROJECT_FILE_PATH)\"/") + kQbsRunnerFileName; ++ buildArguments << QLatin1String("\"$(ACTION)\""); ++ buildArguments << QLatin1String("-f"); ++ ++ // Can't use xcodeInsertPlaceholdersInValue because we want to do a little acrobatics to get quoting 100% right... ++ const QDir sourceDirectory(xcodeProject.projectDirPath()); ++ QString resultingFilePath = m_qbsProjectFile.absoluteFilePath(); ++ if (resultingFilePath.startsWith(sourceDirectory.absolutePath())) { ++ resultingFilePath.replace(0, sourceDirectory.absolutePath().size(), QString()); ++ buildArguments << QLatin1String("\"$(SRCROOT)\"") + shellQuote(resultingFilePath); ++ } else { ++ buildArguments << shellQuote(resultingFilePath); ++ } ++ ++ buildArguments << QLatin1String("-d"); ++ buildArguments << QLatin1String("\"$(CONFIGURATION_BUILD_DIR)\""); ++ buildArguments << QLatin1String("-p"); ++ buildArguments << QLatin1String("\"$(TARGET_NAME)\""); // target and product name are opposites in qbs and Xcode ++ buildArguments << QLatin1String("\"$(QBS_BUILD_VARIANT)\""); ++ buildArguments << QLatin1String("\"profile:$(QBS_PROFILE)\""); ++ ++ xcodeLegacyTarget->setBuildArgumentsString(buildArguments.join(QLatin1String(" "))); ++ xcodeLegacyTarget->setPassBuildSettingsInEnvironment(true); ++ } ++ ++ XCBuildConfiguration *xcconfig = xcodeTarget->buildConfigurationList()->addBuildConfiguration(xcodeConfigurationName(product)); ++ xcodeTarget->buildConfigurationList()->setDefaultBuildConfiguration(xcconfig->name()); ++ ++ // TODO: If a product with the same name was already added, don't add its files AGAIN ++ // Create a root PBX group for the target's files and other groups ++ PBXGroup *xcodeProductGroup = m_productGroups.value(product.name()); ++ const bool productFilesAlreadyAdded = !!xcodeProductGroup; ++ if (!productFilesAlreadyAdded) { ++ m_productGroups.insert(product.name(), xcodeProductGroup = PBXGroup::groupWithName(product.name(), xcodeGroup)); ++ ++ // Add the qbs project file for this product ++ foreach (PBXFileReference *ref, xcodeProductGroup->addFiles(QStringList() << makePathRelativeTo(product.location().filePath(), xcodeProject.projectDirPath()), false, false)) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ } ++ ++ QSet excludedSources; ++ ++ // Set up all the groups ++ foreach (const GroupData &groupData, product.groups()) ++ { ++ PBXGroup *group = xcodeProductGroup; ++ if (groupData.name() == product.name()) { ++ // This group has the same name as the product itself so we'll just add the files ++ // directly to the "product" group we created earlier instead of creating a new one ++ foreach (const XcodeBuildSettingMapping &setting, XcodeBuildSettingMapping::defaultBuildSettingsMap()) { ++ setting.applyToConfiguration(xcconfig, project, product, groupData); ++ } ++ ++ xcodeTarget->setProductName(xcodeTarget->buildSetting(QLatin1String("PRODUCT_NAME"), buildVariant(product)).toString()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROFILE"), product.profile()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_VARIANT"), buildVariant(product)); ++ } else { ++ // Create a group for this group ++ group = PBXGroup::groupWithName(groupData.name(), xcodeProductGroup); ++ } ++ ++ // Add the source files to the group ++ group->setSourceTree(PBX::Group); ++ QList fileRefs; ++ if (!productFilesAlreadyAdded) ++ fileRefs = addGroupFiles(&xcodeProject, group, groupData); ++ ++ // If the group is enabled, then we'll actually BUILD them in addition to merely listing them ++ if (groupData.isEnabled()) { ++ foreach (PBXFileReference *ref, fileRefs) { ++ // Skip header files... wish there was a better way ++ if (ref->path().endsWith(QLatin1String(".h")) || ++ ref->path().endsWith(QLatin1String(".hh"))) { ++ continue; ++ } ++ ++ xcodeTarget->defaultSourceCodeBuildPhase()->addReference(ref); ++ } ++ } else { ++ foreach (PBXFileReference *ref, fileRefs) ++ excludedSources.insert(ref->path()); ++ } ++ } ++ ++ xcconfig->setBuildSetting(QLatin1String("EXCLUDED_SOURCE_FILE_NAMES"), flattenXcconfigList(QStringList(excludedSources.toList()))); ++ ++ QString sysroot = product.moduleProperties().getModuleProperty(QLatin1String("cpp"), QLatin1String("sysroot")).toString(); ++ QStringList frameworkPaths; ++ frameworkPaths += product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("frameworkPaths")); ++ frameworkPaths += product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("systemFrameworkPaths")); ++ frameworkPaths += sysroot + QLatin1String("/Library/Frameworks"); ++ frameworkPaths += sysroot + QLatin1String("/System/Library/Frameworks"); ++ frameworkPaths += QLatin1String("/Library/Frameworks"); ++ frameworkPaths += QLatin1String("/System/Library/Frameworks"); ++ const QStringList frameworkNames = product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("frameworks")); ++ const QStringList weakFrameworkNames = product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("weakFrameworks")); ++ ++ // TODO TODO TODO dynamicLibraries and weakDynamicLibraries? ++ ++ // A framework can't be strongly AND weakly linked... TODO: fail more gracefully ++ QBS_CHECK(frameworkNames.toSet().intersect(weakFrameworkNames.toSet()).isEmpty()); ++ const QStringList allFrameworkNames = QStringList() << frameworkNames << weakFrameworkNames; ++ ++ Q_FOREACH (const QString &frameworkName, allFrameworkNames) { ++ // Whether a full path equivalent for the framework was found ++ bool foundFramework = false; ++ ++ Q_FOREACH (const QString &frameworkPath, frameworkPaths) { ++ QString candidateFrameworkPath = QFileInfo(frameworkPath + QLatin1String("/") + frameworkName + QLatin1String(".framework")).canonicalFilePath(); ++ if (QFileInfo(candidateFrameworkPath).exists()) { ++ QBS_CHECK(!candidateFrameworkPath.isEmpty()); ++ ++ const QString sysrootedCandidateFrameworkPath = candidateFrameworkPath.mid(sysroot.size() + 1 /* for the path separator */); ++ ++ // Check for an existing reference (could happen if a framework is specified multiple times) ++ PBXFileReference *existingReference = Q_NULLPTR; ++ Q_FOREACH (PBXReference *ref, xcodeProject.frameworksRefGroup()->children()) { ++ if (PBXFileReference *fileRef = dynamic_cast(ref)) { ++ if ((fileRef->sourceTree() == PBX::SdkRoot && fileRef->path() == sysrootedCandidateFrameworkPath) || ++ (fileRef->sourceTree() == PBX::Absolute && fileRef->path() == candidateFrameworkPath)) { ++ existingReference = fileRef; ++ break; ++ } ++ } ++ } ++ ++ QList refs; ++ ++ // Create a new file reference since one wasn't already found in the Frameworks group ++ if (!existingReference) { ++ refs = xcodeProject.frameworksRefGroup()->addFiles(QStringList() << candidateFrameworkPath, false, false); ++ Q_FOREACH (PBXFileReference *frameworkRef, refs) { ++ if (!sysroot.isEmpty() && frameworkRef->path().startsWith(sysroot)) { ++ frameworkRef->setPath(sysrootedCandidateFrameworkPath); ++ frameworkRef->setSourceTree(PBX::SdkRoot); ++ } ++ } ++ } else { ++ refs.append(existingReference); ++ } ++ ++ // Add the framework to the Frameworks build phase ++ Q_FOREACH (PBXFileReference *frameworkRef, refs) { ++ xcodeTarget->defaultFrameworksBuildPhase()->addReference(frameworkRef); ++ } ++ ++ foundFramework = true; ++ break; ++ } ++ } ++ ++ // Not a normal case, and will cause a build failure, but is better than silently ignoring it... ++ if (!foundFramework) { ++ Q_FOREACH (PBXFileReference *frameworkRef, xcodeProject.frameworksRefGroup()->addFiles(QStringList() << frameworkName + QLatin1String(".framework"), false, false)) { ++ QBS_CHECK(!frameworkRef->path().isEmpty()); ++ if (PBXBuildFile *frameworkBuildRef = xcodeTarget->defaultFrameworksBuildPhase()->addReference(frameworkRef)) { ++ const bool isWeaklyLinked = weakFrameworkNames.contains(frameworkName); ++ frameworkBuildRef->setWeakLinkedLibrary(isWeaklyLinked); ++ } ++ } ++ } ++ } ++ ++ // Add a reference for the main target artifact in root "Products" group ++ TargetArtifact artifact = runnableOrPrimaryTargetArtifactForProduct(product); ++ QString realArtifactPath = installedFilePathForTargetArtifact(project, product, installOptions, artifact); ++ if (!realArtifactPath.isEmpty()) { ++ // "simple" generator ++ if (!xcodeLegacyTarget) { ++ // Chop off the Qbs build dir from the artifact path, because they will actually end ++ // up in Xcode's build directory, not the build directory Qbs would use ++ const QString buildDirectory = project.projectData().buildDirectory(); ++ if (realArtifactPath.startsWith(buildDirectory)) ++ realArtifactPath.remove(0, buildDirectory.size()); ++ ++ if (realArtifactPath.startsWith(QLatin1Char('/'))) ++ realArtifactPath.remove(0, 1); ++ } else { ++ realArtifactPath = xcodeInsertPlaceholdersInValue(project, realArtifactPath).toString(); ++ } ++ ++ QBS_CHECK(!realArtifactPath.isEmpty()); ++ ++ QList refs = xcodeProject.productRefGroup()->addFiles(QStringList() << realArtifactPath, false, false); ++ foreach (PBXFileReference *ref, refs) ++ { ++ if (!xcodeLegacyTarget) { ++ ref->setSourceTree(PBX::BuildProductDir); ++ ++ // This causes Xcode to force the file reference to a relative path relative to the build products dir ++ // Therefore, we must symlink artifacts in the Xcode build directory to the ones in the qbs build directory ++ // NOTE: This will crash Xcode if set for a PBXLegacyTarget (claiming an empty string global hex ID) ++ xcodeTarget->setProductReference(ref); ++ } ++ ++ // TODO: Technically this should be composed of other variables based on the product type ++ // $(WRAPPER_NAME) for bundles, $(EXECUTABLE_NAME) otherwise? ++ xcconfig->setBuildSetting(QLatin1String("FULL_PRODUCT_NAME"), QFileInfo(realArtifactPath).fileName()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_TARGET_PATH"), xcodeInsertPlaceholdersInValue(project, realArtifactPath)); ++ } ++ } ++ ++ xcodeProject.addTarget(xcodeTarget); ++} ++ ++QList XcodeGenerator::addGroupFiles(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData) ++{ ++ QStringList relativeFilePaths; ++ foreach (QString filePath, groupData.allFilePaths()) { ++ relativeFilePaths += makePathRelativeTo(filePath, xcodeProject->projectDirPath()); ++ } ++ ++ // Add all the files in the group as file references so they show up in the project tree ++ QList fileRefs = xcodeGroup->addFiles(relativeFilePaths, false, false); ++ foreach (PBXFileReference *ref, fileRefs) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ ++ return fileRefs; ++} ++ ++PBXTarget *XcodeGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ Q_UNUSED(xcodeProject); ++ PBXTarget *target = xcodeProject->targetNamed(product.name()); ++ ++ // Native targets without a type won't build, so use a legacy target in this case ++ if (!target && xcodeProductType(product) == 0) { ++ return new PBXLegacyTarget(xcodeProject); ++ } ++ ++ return target; ++} ++ ++/*! ++ * Returns the Xcode product type identifier corresponding to the Qbs product type name. ++ */ ++PBX::PBXProductType XcodeGenerator::xcodeProductType(const ProductData &product) ++{ ++ const QStringList productType = product.type(); ++ const bool isBundle = product.moduleProperties().getModuleProperty(QLatin1String("bundle"), QLatin1String("isBundle")).toBool(); ++ ++ if (productType.contains(QLatin1String("application"))) ++ return isBundle ? PBX::Application : PBX::Tool; ++ if (productType.contains(QLatin1String("dynamiclibrary"))) ++ return isBundle ? PBX::Framework : PBX::LibraryDynamic; ++ if (productType.contains(QLatin1String("staticlibrary"))) ++ return isBundle ? PBX::StaticFramework : PBX::LibraryStatic; ++ if (productType.contains(QLatin1String("bundle"))) ++ return PBX::Bundle; ++ ++ return (PBX::PBXProductType)0; ++} ++ ++static QString _xcodeConfigurationName(QString variantName, const QString &profileName, bool includeProfileName) ++{ ++ QBS_CHECK(!variantName.isEmpty()); ++ variantName.replace(0, 1, variantName[0].toUpper()); ++ if (includeProfileName) { ++ variantName += QLatin1String("_") + profileName; ++ } ++ return variantName; ++} ++ ++QString XcodeGenerator::xcodeConfigurationName(const Project &project) ++{ ++ return _xcodeConfigurationName(buildVariant(project), project.profile(), m_multipleProfiles); ++} ++ ++QString XcodeGenerator::xcodeConfigurationName(const ProductData &product) ++{ ++ return _xcodeConfigurationName(buildVariant(product), product.profile(), m_multipleProfiles); ++} ++ ++/*! ++ * \brief If the value is a path or list of paths, ++ * returns it with the prefixes of paths replaced by $(SRCROOT), $(PROJECT_FILE_PATH)/.., etc., ++ * as appropriate. ++ * If the value is not a path, returns the original value unmodified. ++ */ ++QVariant XcodeGenerator::xcodeInsertPlaceholdersInValue(const qbs::Project &project, const QVariant &variant) ++{ ++ if (variant.type() == QVariant::List) { ++ QVariantList list; ++ foreach (const QVariant &v, variant.toList()) ++ list.append(xcodeInsertPlaceholdersInValue(project, v)); ++ return list; ++ } ++ ++ // If the value is a path and it begins with the value of SRCROOT or PROJECT_FILE_PATH/.., replace it ++ if (variant.type() == QVariant::String) { ++ // This should end up being the same as PBXProject::projectDirPath(), but if projectDirPath ++ // is the empty string (for example, when the xcodeproj resides in the qbs source directory, ++ // things would break, so prefer the Qbs value (plus, it saves a parameter to this function) ++ const QDir sourceDirectory = QFileInfo(project.projectData().location().filePath()).absolutePath(); ++ if (variant.toString().startsWith(sourceDirectory.absolutePath())) ++ return variant.toString().replace(0, sourceDirectory.absolutePath().size(), QLatin1String("$(SRCROOT)")); ++ ++ const QDir buildDirectory(project.projectData().buildDirectory()); ++ Q_ASSERT(buildDirectory.isAbsolute() && buildDirectory.exists()); ++ if (variant.toString().startsWith(buildDirectory.absolutePath())) ++ return variant.toString().replace(0, buildDirectory.absolutePath().size(), QLatin1String("$(QBS_BUILD_DIRECTORY)/$(QBS_PROFILE)-$(QBS_BUILD_VARIANT)")); ++ } ++ ++ return variant; ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodegenerator.h b/src/lib/corelib/generators/xcode/xcodegenerator.h +new file mode 100644 +index 0000000..765174a +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodegenerator.h +@@ -0,0 +1,81 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef QBS_XCODEGENERATOR_H ++#define QBS_XCODEGENERATOR_H ++ ++#include ++#include ++#include "pbxproducttype.h" ++ ++#include ++ ++class PBXFileReference; ++class PBXGroup; ++class PBXProject; ++class PBXTarget; ++ ++namespace qbs { ++ ++class ProductData; ++struct XcodeBuildSettingMapping; ++ ++class XcodeGenerator : public qbs::ProjectGenerator ++{ ++public: ++ virtual void generate(const InstallOptions &installOptions); ++ virtual void addProjectRecursive(const Project &project, const ProjectData &projectData, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup); ++ virtual void addProduct(const Project &project, const ProductData &product, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup); ++ virtual QList addGroupFiles(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData); ++ ++ virtual PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++ ++ QString xcodeConfigurationName(const Project &project); ++ QString xcodeConfigurationName(const ProductData &product); ++ ++ static QVariant xcodeInsertPlaceholdersInValue(const qbs::Project &project, const QVariant &variant); ++ ++ static PBX::PBXProductType xcodeProductType(const ProductData &product); ++ ++protected: ++ XcodeGenerator(); ++ ++ // TODO: Move to base class ++ virtual void setupGenerator(); ++ bool m_multipleProfiles; ++ QString m_projectName; ++ QFileInfo m_qbsProjectFile; ++ QDir m_baseBuildDirectory; ++ QMap m_productGroups; ++}; ++ ++} ++ ++#endif // QBS_XCODEGENERATOR_H +diff --git a/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp b/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp +new file mode 100644 +index 0000000..7654b8f +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp +@@ -0,0 +1,58 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodenativegenerator.h" ++ ++#include "pbx.h" ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++XcodeNativeGenerator::XcodeNativeGenerator() ++{ ++} ++ ++QString XcodeNativeGenerator::generatorName() const ++{ ++ return QLatin1String("xcode"); ++} ++ ++void XcodeNativeGenerator::generate(const InstallOptions &installOptions) ++{ ++ XcodeGenerator::generate(installOptions); ++} ++ ++PBXTarget *XcodeNativeGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ return XcodeGenerator::xcodeTargetForProduct(xcodeProject, product) ?: new PBXLegacyTarget(xcodeProject); ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodenativegenerator.h b/src/lib/corelib/generators/xcode/xcodenativegenerator.h +new file mode 100644 +index 0000000..a04f8df +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodenativegenerator.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef QBS_XCODENATIVEGENERATOR_H ++#define QBS_XCODENATIVEGENERATOR_H ++ ++#include "xcodegenerator.h" ++#include ++ ++namespace qbs { ++ ++class XcodeNativeGenerator : public XcodeGenerator ++{ ++public: ++ XcodeNativeGenerator(); ++ ++ QString generatorName() const; ++ ++ void generate(const InstallOptions &installOptions); ++ PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++}; ++ ++} ++ ++#endif // QBS_XCODENATIVEGENERATOR_H +diff --git a/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp b/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp +new file mode 100644 +index 0000000..e1bceca +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp +@@ -0,0 +1,58 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodesimplegenerator.h" ++ ++#include "pbx.h" ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++XcodeSimpleGenerator::XcodeSimpleGenerator() ++{ ++} ++ ++QString XcodeSimpleGenerator::generatorName() const ++{ ++ return QLatin1String("xcode-simple"); ++} ++ ++void XcodeSimpleGenerator::generate(const InstallOptions &installOptions) ++{ ++ XcodeGenerator::generate(installOptions); ++} ++ ++PBXTarget *XcodeSimpleGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ return XcodeGenerator::xcodeTargetForProduct(xcodeProject, product) ?: new PBXNativeTarget(xcodeProject); ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodesimplegenerator.h b/src/lib/corelib/generators/xcode/xcodesimplegenerator.h +new file mode 100644 +index 0000000..66f6419 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodesimplegenerator.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef QBS_XCODESIMPLEGENERATOR_H ++#define QBS_XCODESIMPLEGENERATOR_H ++ ++#include "xcodegenerator.h" ++#include ++ ++namespace qbs { ++ ++class XcodeSimpleGenerator : public XcodeGenerator ++{ ++public: ++ XcodeSimpleGenerator(); ++ ++ QString generatorName() const; ++ ++ void generate(const InstallOptions &installOptions); ++ PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++}; ++ ++} ++ ++#endif // QBS_XCODESIMPLEGENERATOR_H +diff --git a/src/lib/corelib/generators/xcode/xcscheme.cpp b/src/lib/corelib/generators/xcode/xcscheme.cpp +new file mode 100644 +index 0000000..dbcb994 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcscheme.cpp +@@ -0,0 +1,179 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxobject.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "xcscheme.h" ++#include ++#include ++#include ++ ++static const QString yes = QLatin1String("YES"); ++static const QString no = QLatin1String("NO"); ++ ++class XCSchemePrivate ++{ ++public: ++ XCSchemePrivate(); ++ PBXProject *project; ++ PBXTarget *target; ++ bool parallelizeBuildables; ++ bool buildImplicitDependencies; ++ QString customExecutableFilePath; ++}; ++ ++XCSchemePrivate::XCSchemePrivate() ++ : project() ++ , target() ++ , parallelizeBuildables(true) ++ , buildImplicitDependencies(true) ++{ ++} ++ ++XCScheme::XCScheme(QObject *parent) : ++ QObject(parent), d(new XCSchemePrivate) ++{ ++} ++ ++XCScheme::~XCScheme() ++{ ++ delete d; ++} ++ ++PBXProject *XCScheme::project() const ++{ ++ return d->project; ++} ++ ++void XCScheme::setProject(PBXProject *project) ++{ ++ d->project = project; ++} ++ ++PBXTarget *XCScheme::target() const ++{ ++ return d->target; ++} ++ ++void XCScheme::setTarget(PBXTarget *target) ++{ ++ d->target = target; ++} ++ ++bool XCScheme::parallelizeBuildables() const ++{ ++ return d->parallelizeBuildables; ++} ++ ++void XCScheme::setParallelizeBuildables(bool parallelize) ++{ ++ d->parallelizeBuildables = parallelize; ++} ++ ++bool XCScheme::buildImplicitDependencies() const ++{ ++ return d->buildImplicitDependencies; ++} ++ ++void XCScheme::setBuildImplicitDependencies(bool build) ++{ ++ d->buildImplicitDependencies = build; ++} ++ ++QString XCScheme::customExecutableFilePath() const ++{ ++ return d->customExecutableFilePath; ++} ++ ++void XCScheme::setCustomExecutableFilePath(const QString &customExecutableFilePath) ++{ ++ d->customExecutableFilePath = customExecutableFilePath; ++} ++ ++bool XCScheme::serialize(const QString &filePath) ++{ ++ QFile file(filePath); ++ if (file.open(QIODevice::WriteOnly)) { ++ QXmlStreamWriter writer(&file); ++ writer.setAutoFormatting(true); ++ writer.setAutoFormattingIndent(2); ++ ++ writer.writeStartDocument(); ++ writer.writeStartElement(QLatin1String("Scheme")); ++ ++ // now the "actions" ++ writer.writeStartElement(QLatin1String("BuildAction")); ++ writer.writeAttribute(QLatin1String("parallelizeBuildables"), d->parallelizeBuildables ? yes : no); ++ writer.writeAttribute(QLatin1String("buildImplicitDependencies"), d->buildImplicitDependencies ? yes : no); ++ writer.writeStartElement(QLatin1String("BuildActionEntries")); ++ writer.writeStartElement(QLatin1String("BuildActionEntry")); ++ writer.writeAttribute(QLatin1String("buildForTesting"), yes); ++ writer.writeAttribute(QLatin1String("buildForRunning"), yes); ++ writer.writeAttribute(QLatin1String("buildForProfiling"), yes); ++ writer.writeAttribute(QLatin1String("buildForArchiving"), yes); ++ writer.writeAttribute(QLatin1String("buildForAnalyzing"), yes); ++ writer.writeStartElement(QLatin1String("BuildableReference")); ++ writer.writeAttribute(QLatin1String("BuildableIdentifier"), QLatin1String("primary")); ++ ++ QByteArray bytes; ++ bytes.append(QLatin1String("BlueprintIdentifier:")); ++ bytes.append(filePath); ++ ++ writer.writeAttribute(QLatin1String("BlueprintIdentifier"), PBXObject::createIdentifier(bytes)); ++ if (d->target) { ++ writer.writeAttribute(QLatin1String("BuildableName"), d->target->name()); ++ writer.writeAttribute(QLatin1String("BlueprintName"), d->target->name()); ++ } ++ if (d->project) { ++ const QString relativePath = QDir(d->project->projectDirPath()).relativeFilePath(d->project->projectWrapperPath()); ++ writer.writeAttribute(QLatin1String("ReferencedContainer"), QString(QLatin1String("container:%1")).arg(relativePath)); ++ } ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ ++ if (!d->customExecutableFilePath.isEmpty()) { ++ writer.writeStartElement(QLatin1String("LaunchAction")); ++ writer.writeStartElement(QLatin1String("PathRunnable")); ++ writer.writeAttribute(QLatin1String("FilePath"), d->customExecutableFilePath); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ } ++ ++ writer.writeEndElement(); ++ writer.writeEndDocument(); ++ ++ return file.error() == QFile::NoError; ++ } ++ ++ return false; ++} +diff --git a/src/lib/corelib/generators/xcode/xcscheme.h b/src/lib/corelib/generators/xcode/xcscheme.h +new file mode 100644 +index 0000000..270cca3 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcscheme.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCSCHEME_H ++#define XCSCHEME_H ++ ++#include ++ ++class PBXProject; ++class PBXTarget; ++ ++class XCSchemePrivate; ++ ++class XCScheme : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit XCScheme(QObject *parent = 0); ++ virtual ~XCScheme(); ++ ++ PBXProject *project() const; ++ void setProject(PBXProject *project); ++ ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++ bool parallelizeBuildables() const; ++ void setParallelizeBuildables(bool parallelize); ++ ++ bool buildImplicitDependencies() const; ++ void setBuildImplicitDependencies(bool build); ++ ++ QString customExecutableFilePath() const; ++ void setCustomExecutableFilePath(const QString &customExecutableFilePath); ++ ++ bool serialize(const QString &filePath); ++ ++private: ++ XCSchemePrivate *d; ++}; ++ ++#endif // XCSCHEME_H +diff --git a/src/lib/corelib/generators/xcode/xcsettings.cpp b/src/lib/corelib/generators/xcode/xcsettings.cpp +new file mode 100644 +index 0000000..d34c86e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcsettings.cpp +@@ -0,0 +1,95 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcsettings.h" ++ ++#include ++#include ++#include ++ ++class XCSettingsPrivate { ++public: ++ XCSettingsPrivate() ++ : autocreateSchemes() ++ { ++ } ++ ++ bool autocreateSchemes; ++}; ++ ++XCSettings::XCSettings(QObject *parent) ++ : QObject(parent) ++ , d(new XCSettingsPrivate) ++{ ++} ++ ++XCSettings::~XCSettings() ++{ ++ delete d; ++} ++ ++bool XCSettings::autocreateSchemes() const ++{ ++ return d->autocreateSchemes; ++} ++ ++void XCSettings::setAutocreateSchemes(bool autocreateSchemes) ++{ ++ d->autocreateSchemes = autocreateSchemes; ++} ++ ++bool XCSettings::serialize(const QString &filePath) ++{ ++ QFile file(filePath); ++ if (file.open(QIODevice::WriteOnly)) { ++ QXmlStreamWriter writer(&file); ++ writer.setAutoFormatting(true); ++ writer.setAutoFormattingIndent(-1); ++ ++ writer.writeStartDocument(); ++ writer.writeDTD(QLatin1String("")); ++ ++ writer.writeStartElement(QLatin1String("plist")); ++ writer.writeAttribute(QLatin1String("version"), QLatin1String("1.0")); ++ writer.writeStartElement(QLatin1String("dict")); ++ ++ writer.writeTextElement(QLatin1String("key"), QLatin1String("IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded")); ++ writer.writeEmptyElement(d->autocreateSchemes ? QLatin1String("true") : QLatin1String("false")); ++ ++ writer.writeEndElement(); // ++ writer.writeEndElement(); // ++ writer.writeEndDocument(); ++ ++ return file.error() == QFile::NoError; ++ } ++ ++ return false; ++} ++ +diff --git a/src/lib/corelib/generators/xcode/xcsettings.h b/src/lib/corelib/generators/xcode/xcsettings.h +new file mode 100644 +index 0000000..e6f2c5d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcsettings.h +@@ -0,0 +1,54 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCSETTINGS_H ++#define XCSETTINGS_H ++ ++#include ++ ++class XCSettingsPrivate; ++ ++class XCSettings : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit XCSettings(QObject *parent = 0); ++ virtual ~XCSettings(); ++ ++ bool autocreateSchemes() const; ++ void setAutocreateSchemes(bool autocreateSchemes); ++ ++ bool serialize(const QString &filePath); ++ ++private: ++ XCSettingsPrivate *d; ++}; ++ ++#endif // XCSETTINGS_H +diff --git a/src/lib/corelib/tools/projectgeneratormanager.cpp b/src/lib/corelib/tools/projectgeneratormanager.cpp +index 4c62fc0..f5d0f81 100644 +--- a/src/lib/corelib/tools/projectgeneratormanager.cpp ++++ b/src/lib/corelib/tools/projectgeneratormanager.cpp +@@ -39,6 +39,9 @@ + #include + #include + ++#include ++#include ++ + namespace qbs { + + using namespace Internal; +@@ -60,6 +63,8 @@ ProjectGeneratorManager *ProjectGeneratorManager::instance() + ProjectGeneratorManager::ProjectGeneratorManager() + { + QList > generators; ++ generators << QSharedPointer::create(); ++ generators << QSharedPointer::create(); + foreach (QSharedPointer generator, generators) { + m_generators[generator->generatorName()] = generator; + } +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0003-add-generator-header-installs.patch b/mingw-w64-qbs-git/0003-add-generator-header-installs.1.3.4.patch similarity index 77% rename from mingw-w64-qbs-git/0003-add-generator-header-installs.patch rename to mingw-w64-qbs-git/0003-add-generator-header-installs.1.3.4.patch index d54679ebc6..ecbc46f46f 100644 --- a/mingw-w64-qbs-git/0003-add-generator-header-installs.patch +++ b/mingw-w64-qbs-git/0003-add-generator-header-installs.1.3.4.patch @@ -1,7 +1,7 @@ -From 0d6026fc1cc2dcbd9446af340f84cb2c614ae134 Mon Sep 17 00:00:00 2001 +From c6e9c47a8d248505d4078659a8061917194c18d1 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 18 Aug 2014 00:12:36 +0100 -Subject: [PATCH 3/3] add generator header installs +Subject: [PATCH 3/5] add generator header installs --- src/lib/corelib/api/api.pri | 1 + @@ -9,22 +9,22 @@ Subject: [PATCH 3/3] add generator header installs 2 files changed, 2 insertions(+) diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri -index 9b2fb38..e31ea57 100644 +index 9f2638c..fb0d4f2 100644 --- a/src/lib/corelib/api/api.pri +++ b/src/lib/corelib/api/api.pri -@@ -25,6 +25,7 @@ SOURCES += \ +@@ -28,6 +28,7 @@ SOURCES += \ $$PWD/languageinfo.h \ $$PWD/project.h \ $$PWD/projectdata.h \ + $$PWD/generator.h \ + $$PWD/rulecommand.h \ $$PWD/runenvironment.h api_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/api - INSTALLS += api_headers diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 85175b3..f3c3e09 100644 +index aebab08..e7168c6 100644 --- a/src/lib/corelib/tools/tools.pri +++ b/src/lib/corelib/tools/tools.pri -@@ -84,6 +84,7 @@ qbs_enable_unit_tests { +@@ -89,6 +89,7 @@ all_tests { $$PWD/qbs_export.h \ $$PWD/buildoptions.h \ $$PWD/installoptions.h \ @@ -33,5 +33,5 @@ index 85175b3..f3c3e09 100644 tools_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/tools INSTALLS += tools_headers -- -2.1.0 +2.3.5 diff --git a/mingw-w64-qbs-git/0003-add-generator-header-installs.1.4.patch b/mingw-w64-qbs-git/0003-add-generator-header-installs.1.4.patch new file mode 100644 index 0000000000..6fee6f8034 --- /dev/null +++ b/mingw-w64-qbs-git/0003-add-generator-header-installs.1.4.patch @@ -0,0 +1,37 @@ +From 5e56616ff06c01bbf0a6f246ce51e037f203ecfb Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 18 Aug 2014 00:12:36 +0100 +Subject: [PATCH 03/10] add generator header installs + +--- + src/lib/corelib/api/api.pri | 1 + + src/lib/corelib/tools/tools.pri | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri +index 18b3b47..10d9bf8 100644 +--- a/src/lib/corelib/api/api.pri ++++ b/src/lib/corelib/api/api.pri +@@ -26,6 +26,7 @@ SOURCES += \ + $$PWD/languageinfo.h \ + $$PWD/project.h \ + $$PWD/projectdata.h \ ++ $$PWD/generator.h \ + $$PWD/rulecommand.h \ + $$PWD/runenvironment.h + api_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/api +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index aaebae2..9b82822 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -98,6 +98,7 @@ qbs_enable_unit_tests { + $$PWD/generateoptions.h \ + $$PWD/generatorpluginmanager.h \ + $$PWD/installoptions.h \ ++ $$PWD/generateoptions.h \ + $$PWD/setupprojectparameters.h + tools_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/tools + INSTALLS += tools_headers +-- +2.3.5 + diff --git a/mingw-w64-qbs/0003-add-generator-header-installs.patch b/mingw-w64-qbs-git/0003-add-generator-header-installs.master.patch similarity index 71% rename from mingw-w64-qbs/0003-add-generator-header-installs.patch rename to mingw-w64-qbs-git/0003-add-generator-header-installs.master.patch index d54679ebc6..5816b4ed0b 100644 --- a/mingw-w64-qbs/0003-add-generator-header-installs.patch +++ b/mingw-w64-qbs-git/0003-add-generator-header-installs.master.patch @@ -1,7 +1,7 @@ -From 0d6026fc1cc2dcbd9446af340f84cb2c614ae134 Mon Sep 17 00:00:00 2001 +From d66539abfd3fedd28fbf4d71b17019f1c5dc91f4 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 18 Aug 2014 00:12:36 +0100 -Subject: [PATCH 3/3] add generator header installs +Subject: [PATCH 3/5] add generator header installs --- src/lib/corelib/api/api.pri | 1 + @@ -9,29 +9,29 @@ Subject: [PATCH 3/3] add generator header installs 2 files changed, 2 insertions(+) diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri -index 9b2fb38..e31ea57 100644 +index 18b3b47..10d9bf8 100644 --- a/src/lib/corelib/api/api.pri +++ b/src/lib/corelib/api/api.pri -@@ -25,6 +25,7 @@ SOURCES += \ +@@ -26,6 +26,7 @@ SOURCES += \ $$PWD/languageinfo.h \ $$PWD/project.h \ $$PWD/projectdata.h \ + $$PWD/generator.h \ + $$PWD/rulecommand.h \ $$PWD/runenvironment.h api_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/api - INSTALLS += api_headers diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 85175b3..f3c3e09 100644 +index 431eb27..a77926c 100644 --- a/src/lib/corelib/tools/tools.pri +++ b/src/lib/corelib/tools/tools.pri -@@ -84,6 +84,7 @@ qbs_enable_unit_tests { - $$PWD/qbs_export.h \ - $$PWD/buildoptions.h \ +@@ -96,6 +96,7 @@ qbs_enable_unit_tests { + $$PWD/generateoptions.h \ + $$PWD/generatorpluginmanager.h \ $$PWD/installoptions.h \ + $$PWD/generateoptions.h \ $$PWD/setupprojectparameters.h tools_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/tools INSTALLS += tools_headers -- -2.1.0 +2.3.5 diff --git a/mingw-w64-qbs/0005-shared-vs-static-extension.patch b/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-lib.master.patch similarity index 58% rename from mingw-w64-qbs/0005-shared-vs-static-extension.patch rename to mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-lib.master.patch index f9292d45ae..527eb68363 100644 --- a/mingw-w64-qbs/0005-shared-vs-static-extension.patch +++ b/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-lib.master.patch @@ -1,8 +1,17 @@ +From 734b3872af3ba25e526a5c475d6bc075e7cd1721 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:20:12 +0000 +Subject: [PATCH 4/5] Use .dll.a instead of .a for mingw* import libraries + +--- + src/lib/qtprofilesetup/qtmoduleinfo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/src/lib/qtprofilesetup/qtmoduleinfo.cpp b/src/lib/qtprofilesetup/qtmoduleinfo.cpp -index e55cd0c..88f68d9 100644 +index 8e07335..acc58c4 100644 --- a/src/lib/qtprofilesetup/qtmoduleinfo.cpp +++ b/src/lib/qtprofilesetup/qtmoduleinfo.cpp -@@ -217,7 +217,7 @@ void QtModuleInfo::setupLibraries(const QtEnvironment &qtEnv, bool debugBuild, +@@ -252,7 +252,7 @@ void QtModuleInfo::setupLibraries(const QtEnvironment &qtEnv, bool debugBuild, if (qtEnv.mkspecName.contains(QLatin1String("msvc"))) libFilePath += QLatin1String(".lib"); else if (isMingw) @@ -11,5 +20,6 @@ index e55cd0c..88f68d9 100644 continue; } if (!simplifiedLine.startsWith("QMAKE_PRL_LIBS")) --- -2.1.1 \ No newline at end of file +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-libr.1.3.4.patch b/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-libr.1.3.4.patch new file mode 100644 index 0000000000..120fcc2a29 --- /dev/null +++ b/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-libr.1.3.4.patch @@ -0,0 +1,25 @@ +From 2e71b8c34524a8fdf73639640730984892892d33 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:20:12 +0000 +Subject: [PATCH 4/5] Use .dll.a instead of .a for mingw* import libraries + +--- + src/lib/qtprofilesetup/qtmoduleinfo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/qtprofilesetup/qtmoduleinfo.cpp b/src/lib/qtprofilesetup/qtmoduleinfo.cpp +index 4e85a98..f8fc658 100644 +--- a/src/lib/qtprofilesetup/qtmoduleinfo.cpp ++++ b/src/lib/qtprofilesetup/qtmoduleinfo.cpp +@@ -252,7 +252,7 @@ void QtModuleInfo::setupLibraries(const QtEnvironment &qtEnv, bool debugBuild, + if (qtEnv.mkspecName.contains(QLatin1String("msvc"))) + libFilePath += QLatin1String(".lib"); + else if (isMingw) +- libFilePath += QLatin1String(".a"); ++ libFilePath += isStaticLibrary ? QLatin1String(".a") : QLatin1String(".dll.a"); + continue; + } + if (!simplifiedLine.startsWith("QMAKE_PRL_LIBS")) +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch b/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch new file mode 100644 index 0000000000..acb2e36b07 --- /dev/null +++ b/mingw-w64-qbs-git/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch @@ -0,0 +1,25 @@ +From f3eec857361c15f9a685d608fc6ff8855fef0baa Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:20:12 +0000 +Subject: [PATCH 04/10] Use .dll.a instead of .a for mingw* import libraries + +--- + src/lib/qtprofilesetup/qtmoduleinfo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/qtprofilesetup/qtmoduleinfo.cpp b/src/lib/qtprofilesetup/qtmoduleinfo.cpp +index 7ae49fa..4165805 100644 +--- a/src/lib/qtprofilesetup/qtmoduleinfo.cpp ++++ b/src/lib/qtprofilesetup/qtmoduleinfo.cpp +@@ -253,7 +253,7 @@ void QtModuleInfo::setupLibraries(const QtEnvironment &qtEnv, bool debugBuild, + if (qtEnv.mkspecName.contains(QLatin1String("msvc"))) + libFilePath += QLatin1String(".lib"); + else if (isMingw) +- libFilePath += QLatin1String(".a"); ++ libFilePath += isStaticLibrary ? QLatin1String(".a") : QLatin1String(".dll.a"); + continue; + } + if (!simplifiedLine.startsWith("QMAKE_PRL_LIBS")) +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.1.3.4.patch b/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.1.3.4.patch new file mode 100644 index 0000000000..6f59b5d001 --- /dev/null +++ b/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.1.3.4.patch @@ -0,0 +1,36 @@ +From f0c7ffb986a155b27885ea0096a0b8b1da4dabba Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:29:20 +0000 +Subject: [PATCH 5/5] setup-toolchains: Pretend msys is mingw + +It's close enough and the best we've got. +--- + src/app/qbs-setup-toolchains/probe.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp +index b1b6fa5..eddd7f4 100644 +--- a/src/app/qbs-setup-toolchains/probe.cpp ++++ b/src/app/qbs-setup-toolchains/probe.cpp +@@ -88,7 +88,8 @@ static QStringList validMinGWMachines() + << QLatin1String("i686-w64-mingw32") << QLatin1String("x86_64-w64-mingw32") + << QLatin1String("i686-w64-mingw32.shared") << QLatin1String("x86_64-w64-mingw32.shared") + << QLatin1String("i686-w64-mingw32.static") << QLatin1String("x86_64-w64-mingw32.static") +- << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc"); ++ << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc") ++ << QLatin1String("i686-pc-msys") << QLatin1String("x86_64-pc-msys"); + } + + static QStringList completeToolchainList(const QString &toolchainName) +@@ -199,7 +200,7 @@ static Profile createGccProfile(const QString &compilerFilePath, Settings *setti + { + const QString machineName = gccMachineName(compilerFilePath); + const QStringList compilerTriplet = machineName.split(QLatin1Char('-')); +- const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")); ++ const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")) || toolchainTypes.contains(QLatin1String("msys")); + const bool isClang = toolchainTypes.contains(QLatin1String("clang")); + + if (isMingw) { +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch b/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch new file mode 100644 index 0000000000..6d96b3180c --- /dev/null +++ b/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch @@ -0,0 +1,36 @@ +From 77f364bcb243b4db85df023a50f5d8a986a5f570 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:29:20 +0000 +Subject: [PATCH 05/10] setup-toolchains: Pretend msys is mingw + +It's close enough and the best we've got. +--- + src/app/qbs-setup-toolchains/probe.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp +index 531bbf0..c57bd67 100644 +--- a/src/app/qbs-setup-toolchains/probe.cpp ++++ b/src/app/qbs-setup-toolchains/probe.cpp +@@ -89,7 +89,8 @@ static QStringList validMinGWMachines() + << QLatin1String("i686-w64-mingw32") << QLatin1String("x86_64-w64-mingw32") + << QLatin1String("i686-w64-mingw32.shared") << QLatin1String("x86_64-w64-mingw32.shared") + << QLatin1String("i686-w64-mingw32.static") << QLatin1String("x86_64-w64-mingw32.static") +- << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc"); ++ << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc") ++ << QLatin1String("i686-pc-msys") << QLatin1String("x86_64-pc-msys"); + } + + static QStringList completeToolchainList(const QString &toolchainName) +@@ -200,7 +201,7 @@ static Profile createGccProfile(const QString &compilerFilePath, Settings *setti + { + const QString machineName = gccMachineName(compilerFilePath); + const QStringList compilerTriplet = machineName.split(QLatin1Char('-')); +- const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")); ++ const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")) || toolchainTypes.contains(QLatin1String("msys")); + const bool isClang = toolchainTypes.contains(QLatin1String("clang")); + + if (isMingw) { +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.master.patch b/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.master.patch new file mode 100644 index 0000000000..9e368c96a4 --- /dev/null +++ b/mingw-w64-qbs-git/0005-setup-toolchains-Pretend-msys-is-mingw.master.patch @@ -0,0 +1,36 @@ +From e6a68f1b7ea07a807082cf9ef3a4b19e147e0ae7 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:29:20 +0000 +Subject: [PATCH 5/5] setup-toolchains: Pretend msys is mingw + +It's close enough and the best we've got. +--- + src/app/qbs-setup-toolchains/probe.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp +index 0ae9f6c..3d5e03c 100644 +--- a/src/app/qbs-setup-toolchains/probe.cpp ++++ b/src/app/qbs-setup-toolchains/probe.cpp +@@ -89,7 +89,8 @@ static QStringList validMinGWMachines() + << QLatin1String("i686-w64-mingw32") << QLatin1String("x86_64-w64-mingw32") + << QLatin1String("i686-w64-mingw32.shared") << QLatin1String("x86_64-w64-mingw32.shared") + << QLatin1String("i686-w64-mingw32.static") << QLatin1String("x86_64-w64-mingw32.static") +- << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc"); ++ << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc") ++ << QLatin1String("i686-pc-msys") << QLatin1String("x86_64-pc-msys"); + } + + static QStringList completeToolchainList(const QString &toolchainName) +@@ -200,7 +201,7 @@ static Profile createGccProfile(const QString &compilerFilePath, Settings *setti + { + const QString machineName = gccMachineName(compilerFilePath); + const QStringList compilerTriplet = machineName.split(QLatin1Char('-')); +- const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")); ++ const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")) || toolchainTypes.contains(QLatin1String("msys")); + const bool isClang = toolchainTypes.contains(QLatin1String("clang")); + + if (isMingw) { +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0006-add-commandechomode.h-to-installed-headers.1.4.patch b/mingw-w64-qbs-git/0006-add-commandechomode.h-to-installed-headers.1.4.patch new file mode 100644 index 0000000000..bb0900afcf --- /dev/null +++ b/mingw-w64-qbs-git/0006-add-commandechomode.h-to-installed-headers.1.4.patch @@ -0,0 +1,27 @@ +From bb9f1cef7689dc566b13b402a7509f8ed3b4f504 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 20:46:39 +0100 +Subject: [PATCH 06/10] add commandechomode.h to installed headers + +.. this header is needed by qbs/tools/buildoptions.h +--- + src/lib/corelib/tools/tools.pri | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index 9b82822..d5f5983 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -99,7 +99,8 @@ qbs_enable_unit_tests { + $$PWD/generatorpluginmanager.h \ + $$PWD/installoptions.h \ + $$PWD/generateoptions.h \ +- $$PWD/setupprojectparameters.h ++ $$PWD/setupprojectparameters.h \ ++ $$PWD/commandechomode.h + tools_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/tools + INSTALLS += tools_headers + } +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0007-add-many-files-to-installed-headers.1.4.patch b/mingw-w64-qbs-git/0007-add-many-files-to-installed-headers.1.4.patch new file mode 100644 index 0000000000..f548407c69 --- /dev/null +++ b/mingw-w64-qbs-git/0007-add-many-files-to-installed-headers.1.4.patch @@ -0,0 +1,76 @@ +From 7b028bd667664bf2bc5c681929f90c2c5fbf7c44 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 21:43:17 +0100 +Subject: [PATCH 07/10] add many files to installed headers + +tools/projectgeneratormanager.h +tools/id.h +language/filetags.h +logging/logger.h +generators/generator.h +--- + src/lib/corelib/generators/generators.pri | 6 +++++ + src/lib/corelib/language/language.pri | 3 ++- + src/lib/corelib/logging/logging.pri | 3 ++- + src/lib/corelib/tools/tools.pri | 2 ++ + 4 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/lib/corelib/generators/generators.pri b/src/lib/corelib/generators/generators.pri +index 2fa095e..4217853 100644 +--- a/src/lib/corelib/generators/generators.pri ++++ b/src/lib/corelib/generators/generators.pri +@@ -1,4 +1,10 @@ + HEADERS += \ + $$PWD/generator.h + ++!qbs_no_dev_install { ++ generators_headers.files = $$PWD/generator.h ++ generators_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/generators ++ INSTALLS += generators_headers ++} ++ + include(xcode/xcode.pri) +diff --git a/src/lib/corelib/language/language.pri b/src/lib/corelib/language/language.pri +index 6da8536..4f8f2ba 100644 +--- a/src/lib/corelib/language/language.pri ++++ b/src/lib/corelib/language/language.pri +@@ -67,7 +67,8 @@ qbs_enable_unit_tests { + } + + !qbs_no_dev_install { +- language_headers.files = $$PWD/forward_decls.h ++ language_headers.files = $$PWD/forward_decls.h \ ++ $$PWD/filetags.h + language_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/language + INSTALLS += language_headers + } +diff --git a/src/lib/corelib/logging/logging.pri b/src/lib/corelib/logging/logging.pri +index 8c03677..c09ba11 100644 +--- a/src/lib/corelib/logging/logging.pri ++++ b/src/lib/corelib/logging/logging.pri +@@ -8,7 +8,8 @@ SOURCES += \ + $$PWD/ilogsink.cpp + + !qbs_no_dev_install { +- logging_headers.files = $$PWD/ilogsink.h ++ logging_headers.files = $$PWD/ilogsink.h \ ++ $$PWD/logger.h + logging_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/logging + INSTALLS += logging_headers + } +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index d5f5983..cc20c33 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -95,6 +95,8 @@ qbs_enable_unit_tests { + $$PWD/processresult.h \ + $$PWD/qbs_export.h \ + $$PWD/buildoptions.h \ ++ $$PWD/projectgeneratormanager.h \ ++ $$PWD/id.h \ + $$PWD/generateoptions.h \ + $$PWD/generatorpluginmanager.h \ + $$PWD/installoptions.h \ +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0008-Disable-QT_NO_CAST_FROM_ASCII-due-to-Xcode-gener.1.4.patch b/mingw-w64-qbs-git/0008-Disable-QT_NO_CAST_FROM_ASCII-due-to-Xcode-gener.1.4.patch new file mode 100644 index 0000000000..f963e18eae --- /dev/null +++ b/mingw-w64-qbs-git/0008-Disable-QT_NO_CAST_FROM_ASCII-due-to-Xcode-gener.1.4.patch @@ -0,0 +1,24 @@ +From 23ee3100173526c9d0690c1be3eec29df2f16b21 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 23:04:06 +0100 +Subject: [PATCH 08/10] Disable QT_NO_CAST_FROM_ASCII due to Xcode generator + +--- + src/lib/library.pri | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/lib/library.pri b/src/lib/library.pri +index d1bda77..0420eaa 100644 +--- a/src/lib/library.pri ++++ b/src/lib/library.pri +@@ -11,7 +11,6 @@ CONFIG(static, static|shared) { + } else { + DEFINES += QBS_LIBRARY + } +-DEFINES += QT_NO_CAST_FROM_ASCII + INCLUDEPATH += $${PWD}/../ + contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols + win32:CONFIG(debug, debug|release):TARGET = $${TARGET}d +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0009-win32-Don-t-specify-LIBS-Psapi.lib-just-psapi.1.4.patch b/mingw-w64-qbs-git/0009-win32-Don-t-specify-LIBS-Psapi.lib-just-psapi.1.4.patch new file mode 100644 index 0000000000..3609186859 --- /dev/null +++ b/mingw-w64-qbs-git/0009-win32-Don-t-specify-LIBS-Psapi.lib-just-psapi.1.4.patch @@ -0,0 +1,26 @@ +From 7f31d5bf93bdbc10ace282b0736d9db68ec4662c Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 23:10:54 +0100 +Subject: [PATCH 09/10] win32: Don't specify LIBS += Psapi.lib, just psapi + +--- + src/lib/corelib/corelib.pro | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/corelib/corelib.pro b/src/lib/corelib/corelib.pro +index 5118cf7..bfb8db9 100644 +--- a/src/lib/corelib/corelib.pro ++++ b/src/lib/corelib/corelib.pro +@@ -21,7 +21,8 @@ include(logging/logging.pri) + include(parser/parser.pri) + include(tools/tools.pri) + +-win32:LIBS += Psapi.lib ++win32-msvc*:LIBS += Psapi.lib ++win32-g++:LIBS += -lpsapi + + HEADERS += \ + qbs.h +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/0010-Disable-WIP-Xcode-generator.1.4.patch b/mingw-w64-qbs-git/0010-Disable-WIP-Xcode-generator.1.4.patch new file mode 100644 index 0000000000..73f5136794 --- /dev/null +++ b/mingw-w64-qbs-git/0010-Disable-WIP-Xcode-generator.1.4.patch @@ -0,0 +1,43 @@ +From 44c9f185997a20cb493070260cf7206e47585f0e Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 23:39:29 +0100 +Subject: [PATCH 10/10] Disable WIP: Xcode generator + +.. due to linking errors since it was turned +into a plugin: + +undefined reference to 'qbs::XcodeNativeGenerator::XcodeNativeGenerator()' +undefined reference to 'qbs::XcodeSimpleGenerator::XcodeSimpleGenerator()' + +I've not got the time to investigate and fix this +and Jake probably will soon enough anyway. +--- + src/lib/corelib/tools/projectgeneratormanager.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/lib/corelib/tools/projectgeneratormanager.cpp b/src/lib/corelib/tools/projectgeneratormanager.cpp +index f5d0f81..4c62fc0 100644 +--- a/src/lib/corelib/tools/projectgeneratormanager.cpp ++++ b/src/lib/corelib/tools/projectgeneratormanager.cpp +@@ -39,9 +39,6 @@ + #include + #include + +-#include +-#include +- + namespace qbs { + + using namespace Internal; +@@ -63,8 +60,6 @@ ProjectGeneratorManager *ProjectGeneratorManager::instance() + ProjectGeneratorManager::ProjectGeneratorManager() + { + QList > generators; +- generators << QSharedPointer::create(); +- generators << QSharedPointer::create(); + foreach (QSharedPointer generator, generators) { + m_generators[generator->generatorName()] = generator; + } +-- +2.3.5 + diff --git a/mingw-w64-qbs-git/PKGBUILD b/mingw-w64-qbs-git/PKGBUILD index f71f1bef51..abe95e1e35 100644 --- a/mingw-w64-qbs-git/PKGBUILD +++ b/mingw-w64-qbs-git/PKGBUILD @@ -1,5 +1,5 @@ # Maintainer: Alexey Pavlov -# Contributor: Ray Donnelly +# Maintainer: Ray Donnelly # Preamble: Because qt5 has: # qt5/mkspecs/features/win32/windows.prf:10: !contains(QMAKE_DEFAULT_LIBDIRS, $$QT.core.libs): @@ -14,43 +14,107 @@ # .. we end up with "-LC:/msys64/mingw64/lib" appearing before the project's # libdirs, which means an existing libqbscore1.dll.a in C:/msys64/mingw64/lib # will get used instead of the one we're building and you'll get link errors -# or binary incompat. issues. Really, Qt shouldn't be adding this folder as +# or binary incompat. issues. Really, Qt shouldn't be adding this folder as # the linker already looks in its libdir - last - anyway. # Fixing this in qt5/mkspecs/features/win32/windows.prf may make sense? _realname=qbs pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=.2293.a8e6324 +pkgver=1.4.1.r2684.e31bbe7 pkgrel=1 pkgdesc='Qt Build Suite' url='http://qt-project.org' arch=('any') depends=("${MINGW_PACKAGE_PREFIX}-qt5") +makedepends=('git') options=('docs' 'staticlibs') # '!strip' 'debug') provides=("${MINGW_PACKAGE_PREFIX}-qbs") conflicts=("${MINGW_PACKAGE_PREFIX}-qbs") -QBS_GIT_BRANCH=master +QBS_GIT_BRANCH=1.4 +# To regenerate the patches: +# git format-patch --suffix=".master.patch" -5 source=("git://gitorious.org/qt-labs/qbs.git#branch=$QBS_GIT_BRANCH" "manifest" - "0001-add-hostosinfo.h-to-installed-headers.patch" - "0002-WIP-Xcode-generator.patch" - "0003-add-generator-header-installs.patch") + + "0001-add-hostosinfo.h-to-installed-headers.master.patch" + "0002-WIP-Xcode-generator.master.patch" + "0003-add-generator-header-installs.master.patch" + "0004-Use-.dll.a-instead-of-.a-for-mingw-import-lib.master.patch" + "0005-setup-toolchains-Pretend-msys-is-mingw.master.patch" + + "0001-add-hostosinfo.h-to-installed-headers.1.4.patch" + "0002-WIP-Xcode-generator.1.4.patch" + "0003-add-generator-header-installs.1.4.patch" + "0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch" + "0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch" + "0006-add-commandechomode.h-to-installed-headers.1.4.patch" + "0007-add-many-files-to-installed-headers.1.4.patch" + "0008-Disable-QT_NO_CAST_FROM_ASCII-due-to-Xcode-gener.1.4.patch" + "0009-win32-Don-t-specify-LIBS-Psapi.lib-just-psapi.1.4.patch" + "0010-Disable-WIP-Xcode-generator.1.4.patch" + + "0001-add-hostosinfo.h-to-installed-headers.1.3.4.patch" + "0002-WIP-Xcode-generator.1.3.4.patch" + "0003-add-generator-header-installs.1.3.4.patch" + "0004-Use-.dll.a-instead-of-.a-for-mingw-import-libr.1.3.4.patch" + "0005-setup-toolchains-Pretend-msys-is-mingw.1.3.4.patch") + sha256sums=('SKIP' '838098b25a8044176b3139b4003594570c62a8d64f5470fbbd769f3bf44e0855' - 'b791b90bd4e49fd0188167c308a3da1773ddc6740d88c385e4f5d811ef0bb117' - 'bd05da6b8f5984cb824c6a7426de9bf6d29e917318f1cf10b103467986dc3c2b' - '036c5452f19eebfc3c39982b47191e4c4e7ae2ba0e0b23dc818105189f54b441') + '945e0ec9b5d9957a231ac3143339cf3af9767d09b4b923c95dffa25d5672164e' + '36f638e241737038d41dfa627ecc4de14396aa457ebe4ffd154a0f7776a3cef8' + '806c64da4c3c8e6ca4b51affe29a02d49fc303a614f34ac08bc62c66f5420ede' + 'b6d35740104f67d241060e2eeb898dee93a1ea3bed3ff3248e29ca60a39b2360' + '0f55b433f7390106ccb6ab3f057fdb1119eddac2af78baf292a033b402f030b3' + '50234e277e672343640e07ee351cba431446fd74d5eb75333bd31e99429fa833' + 'ca9483940e00a43323ffb8eb6dffdc6f3a663f6368fc328da94c1f89a9ab3c4f' + 'c0fd295fef9e76c2ec53481d4f86c894f28151b87b3c419f3dce6a7a48684cc0' + '83609121b37910adce580ad725cabd96086ef952eeb1c3f5aee6adbf16bb292b' + 'c194d3fa40d40ff40210161aaa0b73b55756c3b6ae3d53920f826e15ae8b5f7d' + '0934208fe75e34a3086d4b145f90fc53559b654140d3f1282d3fb87df3180ede' + '10adad688e6c3222df7264d5946ba5231cb980d620ccf4393f76d1fd97b3a23f' + 'ffddbaec699bd8e9d64ff3065e1c9905f80956b68f17faac7785c518f941b00e' + '4f814f8e89f33b7b699685deaa4682e8949ac5302a916484d2c0eb5e6e81d55d' + '13e908e99c9a421d19ad788d51aaadfd7f0b0a6543bd116151f166145f3983ae' + '761d4ff8072600aed4c2cd9b7e0963fc24ddda7ba6bca9431134111432ca6e85' + '8f6f67ad1036c48efc6604e393d9d0d4c0297391bc86fc4d110995c9c0f4d191' + 'caf5258899ae870d9295079046a699a98a577b18b471d245164456918f95fe4c' + 'e412d4cdd0c0061fdadaada82826b99ada5323bca72a29b2c9f48dabdef0df8c' + 'c126c85ba840426cc9b482119b82a0ec0bc259b9a0496b4d2fadde101bc557ef') pkgver() { cd "$srcdir"/$_realname - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + + local VER_PRI=$(cat qbs_version.pri | sed -n "s/QBS_VERSION = \(.*\)/\1/p") + printf "%s.r%s.%s" "${VER_PRI}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd "$srcdir"/$_realname - git am "${srcdir}"/0001-add-hostosinfo.h-to-installed-headers.patch - git am "${srcdir}"/0002-WIP-Xcode-generator.patch - git am "${srcdir}"/0003-add-generator-header-installs.patch + if [ "${QBS_GIT_BRANCH}" = "master" ]; then + git am "${srcdir}"/0001-add-hostosinfo.h-to-installed-headers.master.patch + git am "${srcdir}"/0002-WIP-Xcode-generator.master.patch + git am "${srcdir}"/0003-add-generator-header-installs.master.patch + git am "${srcdir}"/0004-Use-.dll.a-instead-of-.a-for-mingw-import-lib.master.patch + git am "${srcdir}"/0005-setup-toolchains-Pretend-msys-is-mingw.master.patch + elif [ "${QBS_GIT_BRANCH}" = "1.4" ]; then + git am "${srcdir}"/0001-add-hostosinfo.h-to-installed-headers.1.4.patch + git am "${srcdir}"/0002-WIP-Xcode-generator.1.4.patch + git am "${srcdir}"/0003-add-generator-header-installs.1.4.patch + git am "${srcdir}"/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch + git am "${srcdir}"/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch + git am "${srcdir}"/0006-add-commandechomode.h-to-installed-headers.1.4.patch + git am "${srcdir}"/0007-add-many-files-to-installed-headers.1.4.patch + git am "${srcdir}"/0008-Disable-QT_NO_CAST_FROM_ASCII-due-to-Xcode-gener.1.4.patch + git am "${srcdir}"/0009-win32-Don-t-specify-LIBS-Psapi.lib-just-psapi.1.4.patch + git am "${srcdir}"/0010-Disable-WIP-Xcode-generator.1.4.patch + elif [ "${QBS_GIT_BRANCH}" = "1.3" ]; then + git am "${srcdir}"/0001-add-hostosinfo.h-to-installed-headers.1.3.4.patch + git am "${srcdir}"/0002-WIP-Xcode-generator.1.3.4.patch + git am "${srcdir}"/0003-add-generator-header-installs.1.3.4.patch + git am "${srcdir}"/0004-Use-.dll.a-instead-of-.a-for-mingw-import-libr.1.3.4.patch + git am "${srcdir}"/0005-setup-toolchains-Pretend-msys-is-mingw.1.3.4.patch + fi } build() { @@ -84,4 +148,3 @@ package() { done } -# E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/collect2.exe -plugin E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/liblto_plugin-0.dll -plugin-opt=E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/lto-wrapper.exe -plugin-opt=-fresolution=E:\msys64\tmp\ccK0UDoh.res -plugin-opt=-pass-through=-lmingwthrd -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingwthrd -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -m i386pep -Bdynamic -o ../../../bin/qbs-config-ui.exe E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/lib/../lib/crtbegin.o -LE:/msys64/mingw64/lib -LE:/m2/repo/mingw-w64-qbs-git/src/qbs/build-x86_64/src/app/config-ui/../../../lib -LE:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1 -LE:/msys64/mingw64/bin/../lib/gcc -LE:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/lib/../lib -LE:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../lib -LE:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/lib -LE:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../.. -s -subsystem windows release/consolelogger.o release/coloredoutput.o release/qbssettings.o release/commandlineparser.o release/main.o release/mainwindow.o release/settingsmodel.o release/moc_mainwindow.o release/moc_settingsmodel.o -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmain -lqbscore1 -lQt5Widgets -lQt5Gui -lQt5Xml -lQt5Script -lQt5Core -lstdc++ -lmingwthrd -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingwthrd -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/lib/../lib/crtend.o --verbose diff --git a/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch b/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch new file mode 100644 index 0000000000..6a6bd9fb5c --- /dev/null +++ b/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch @@ -0,0 +1,27 @@ +From 4a36af369f678ff512aebd903c30ec8e8eecea43 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 18 Aug 2014 12:19:52 +0100 +Subject: [PATCH 1/6] add hostosinfo.h to installed headers + +.. if you build Qt Creator with system qbs then this +header is needed by: +src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +--- + src/lib/corelib/tools/tools.pri | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index 35bc9c8..431eb27 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -85,6 +85,7 @@ qbs_enable_unit_tests { + $$PWD/cleanoptions.h \ + $$PWD/codelocation.h \ + $$PWD/error.h \ ++ $$PWD/hostosinfo.h \ + $$PWD/settings.h \ + $$PWD/settingsmodel.h \ + $$PWD/preferences.h \ +-- +2.3.5 + diff --git a/mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch b/mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch new file mode 100644 index 0000000000..a392819e95 --- /dev/null +++ b/mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch @@ -0,0 +1,25 @@ +From f27372b2f20583eb40723f382f8932782631626f Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 18 Aug 2014 00:12:36 +0100 +Subject: [PATCH 3/6] add generator header installs + +--- + src/lib/corelib/api/api.pri | 1 + + src/lib/corelib/tools/tools.pri | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri +index 18b3b47..10d9bf8 100644 +--- a/src/lib/corelib/api/api.pri ++++ b/src/lib/corelib/api/api.pri +@@ -26,6 +26,7 @@ SOURCES += \ + $$PWD/languageinfo.h \ + $$PWD/project.h \ + $$PWD/projectdata.h \ ++ $$PWD/generator.h \ + $$PWD/rulecommand.h \ + $$PWD/runenvironment.h + api_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/api +-- +2.3.5 + diff --git a/mingw-w64-qbs/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch b/mingw-w64-qbs/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch new file mode 100644 index 0000000000..6aebc0d826 --- /dev/null +++ b/mingw-w64-qbs/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch @@ -0,0 +1,25 @@ +From 5e50db78cc09dcfbc53026d1e9470125775a6755 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:20:12 +0000 +Subject: [PATCH 4/6] Use .dll.a instead of .a for mingw* import libraries + +--- + src/lib/qtprofilesetup/qtmoduleinfo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/qtprofilesetup/qtmoduleinfo.cpp b/src/lib/qtprofilesetup/qtmoduleinfo.cpp +index 8e07335..acc58c4 100644 +--- a/src/lib/qtprofilesetup/qtmoduleinfo.cpp ++++ b/src/lib/qtprofilesetup/qtmoduleinfo.cpp +@@ -252,7 +252,7 @@ void QtModuleInfo::setupLibraries(const QtEnvironment &qtEnv, bool debugBuild, + if (qtEnv.mkspecName.contains(QLatin1String("msvc"))) + libFilePath += QLatin1String(".lib"); + else if (isMingw) +- libFilePath += QLatin1String(".a"); ++ libFilePath += isStaticLibrary ? QLatin1String(".a") : QLatin1String(".dll.a"); + continue; + } + if (!simplifiedLine.startsWith("QMAKE_PRL_LIBS")) +-- +2.3.5 + diff --git a/mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch b/mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch new file mode 100644 index 0000000000..96f5c73772 --- /dev/null +++ b/mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch @@ -0,0 +1,36 @@ +From 99b73c2d8964aa95fc439defa0588751f080cf90 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sat, 29 Nov 2014 18:29:20 +0000 +Subject: [PATCH 5/6] setup-toolchains: Pretend msys is mingw + +It's close enough and the best we've got. +--- + src/app/qbs-setup-toolchains/probe.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp +index 0ae9f6c..3d5e03c 100644 +--- a/src/app/qbs-setup-toolchains/probe.cpp ++++ b/src/app/qbs-setup-toolchains/probe.cpp +@@ -89,7 +89,8 @@ static QStringList validMinGWMachines() + << QLatin1String("i686-w64-mingw32") << QLatin1String("x86_64-w64-mingw32") + << QLatin1String("i686-w64-mingw32.shared") << QLatin1String("x86_64-w64-mingw32.shared") + << QLatin1String("i686-w64-mingw32.static") << QLatin1String("x86_64-w64-mingw32.static") +- << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc"); ++ << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc") ++ << QLatin1String("i686-pc-msys") << QLatin1String("x86_64-pc-msys"); + } + + static QStringList completeToolchainList(const QString &toolchainName) +@@ -191,7 +192,7 @@ static Profile createGccProfile(const QString &compilerFilePath, Settings *setti + const QString machineName = gccMachineName(compilerFilePath); + const QStringList compilerTriplet = machineName.split(QLatin1Char('-')); + +- if (toolchainTypes.contains(QLatin1String("mingw"))) { ++ if (toolchainTypes.contains(QLatin1String("mingw")) || toolchainTypes.contains(QLatin1String("msys"))) { + if (!validMinGWMachines().contains(machineName)) { + throw ErrorInfo(Tr::tr("Detected gcc platform '%1' is not supported.") + .arg(machineName)); +-- +2.3.5 + diff --git a/mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch b/mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch new file mode 100644 index 0000000000..8f9f2c5a1a --- /dev/null +++ b/mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch @@ -0,0 +1,186 @@ +From 0dd092f366077f2392b9faeae3d92cab12ac194d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 26 Apr 2015 11:54:25 +0100 +Subject: [PATCH 6/6] Add some missing files. + +Seems 1.4.0 was created without: +src/lib/corelib/tools/generateoptions.{cpp,h} + +.. which were added originally in: +5447c5 : * Add an API to support build system generators. +--- + src/lib/corelib/tools/generateoptions.cpp | 92 +++++++++++++++++++++++++++++++ + src/lib/corelib/tools/generateoptions.h | 62 +++++++++++++++++++++ + 2 files changed, 154 insertions(+) + create mode 100644 src/lib/corelib/tools/generateoptions.cpp + create mode 100644 src/lib/corelib/tools/generateoptions.h + +diff --git a/src/lib/corelib/tools/generateoptions.cpp b/src/lib/corelib/tools/generateoptions.cpp +new file mode 100644 +index 0000000..406cf88 +--- /dev/null ++++ b/src/lib/corelib/tools/generateoptions.cpp +@@ -0,0 +1,92 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt.io/licensing ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms and ++** conditions see http://www.qt.io/terms-conditions. For further information ++** use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 or version 3 as published by the Free ++** Software Foundation and appearing in the file LICENSE.LGPLv21 and ++** LICENSE.LGPLv3 included in the packaging of this file. Please review the ++** following information to ensure the GNU Lesser General Public License ++** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, The Qt Company gives you certain additional ++** rights. These rights are described in The Qt Company LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++#include "generateoptions.h" ++ ++#include ++#include ++ ++namespace qbs { ++namespace Internal { ++ ++class GenerateOptionsPrivate : public QSharedData ++{ ++public: ++ GenerateOptionsPrivate() ++ : generatorName() ++ {} ++ ++ QString generatorName; ++}; ++ ++} // namespace Internal ++ ++/*! ++ * \class GenerateOptions ++ * \brief The \c GenerateOptions class comprises parameters that influence the behavior of ++ * generate operations. ++ */ ++ ++GenerateOptions::GenerateOptions() : d(new Internal::GenerateOptionsPrivate) ++{ ++} ++ ++GenerateOptions::GenerateOptions(const GenerateOptions &other) : d(other.d) ++{ ++} ++ ++GenerateOptions &GenerateOptions::operator=(const GenerateOptions &other) ++{ ++ d = other.d; ++ return *this; ++} ++ ++GenerateOptions::~GenerateOptions() ++{ ++} ++ ++/*! ++ * Returns the name of the generator used to create the external build system files. ++ * The default is empty. ++ */ ++QString GenerateOptions::generatorName() const ++{ ++ return d->generatorName; ++} ++ ++/*! ++ * \brief Sets the name of the generator used to create the external build system files. ++ */ ++void GenerateOptions::setGeneratorName(const QString &generatorName) ++{ ++ d->generatorName = generatorName; ++} ++ ++} // namespace qbs +diff --git a/src/lib/corelib/tools/generateoptions.h b/src/lib/corelib/tools/generateoptions.h +new file mode 100644 +index 0000000..06d08ba +--- /dev/null ++++ b/src/lib/corelib/tools/generateoptions.h +@@ -0,0 +1,62 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt.io/licensing ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms and ++** conditions see http://www.qt.io/terms-conditions. For further information ++** use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 or version 3 as published by the Free ++** Software Foundation and appearing in the file LICENSE.LGPLv21 and ++** LICENSE.LGPLv3 included in the packaging of this file. Please review the ++** following information to ensure the GNU Lesser General Public License ++** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, The Qt Company gives you certain additional ++** rights. These rights are described in The Qt Company LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++#ifndef QBS_GENERATEOPTIONS_H ++#define QBS_GENERATEOPTIONS_H ++ ++#include "qbs_export.h" ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++class QString; ++QT_END_NAMESPACE ++ ++namespace qbs { ++namespace Internal { class GenerateOptionsPrivate; } ++ ++class QBS_EXPORT GenerateOptions ++{ ++public: ++ GenerateOptions(); ++ GenerateOptions(const GenerateOptions &other); ++ GenerateOptions &operator=(const GenerateOptions &other); ++ ~GenerateOptions(); ++ ++ QString generatorName() const; ++ void setGeneratorName(const QString &generatorName); ++ ++private: ++ QSharedDataPointer d; ++}; ++ ++} // namespace qbs ++ ++#endif // QBS_GENERATEOPTIONS_H +-- +2.3.5 + diff --git a/mingw-w64-qbs/0006-probe-pretend-msys-is-mingw.patch b/mingw-w64-qbs/0006-probe-pretend-msys-is-mingw.patch deleted file mode 100644 index 1b9d2509a4..0000000000 --- a/mingw-w64-qbs/0006-probe-pretend-msys-is-mingw.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urN qbs-1.3.2.orig/src/app/qbs-setup-toolchains/probe.cpp qbs-1.3.2/src/app/qbs-setup-toolchains/probe.cpp ---- qbs-1.3.2.orig/src/app/qbs-setup-toolchains/probe.cpp 2014-10-31 20:08:07.938732400 +0000 -+++ qbs-1.3.2/src/app/qbs-setup-toolchains/probe.cpp 2014-10-31 20:09:34.637691300 +0000 -@@ -85,7 +85,8 @@ - return QStringList() - << QLatin1String("mingw32") << QLatin1String("mingw64") - << QLatin1String("i686-w64-mingw32") << QLatin1String("x86_64-w64-mingw32") -- << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc"); -+ << QLatin1String("i586-mingw32msvc") << QLatin1String("amd64-mingw32msvc") -+ << QLatin1String("i686-pc-msys") << QLatin1String("x86_64-pc-msys"); - } - - static QStringList completeToolchainList(const QString &toolchainName) -@@ -196,7 +197,7 @@ - { - const QString machineName = gccMachineName(compilerFilePath); - const QStringList compilerTriplet = machineName.split(QLatin1Char('-')); -- const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")); -+ const bool isMingw = toolchainTypes.contains(QLatin1String("mingw")) || toolchainTypes.contains(QLatin1String("msys")); - const bool isClang = toolchainTypes.contains(QLatin1String("clang")); - - if (isMingw && !validMinGWMachines().contains(machineName)) { diff --git a/mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch b/mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch new file mode 100644 index 0000000000..ea2672dbd6 --- /dev/null +++ b/mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch @@ -0,0 +1,27 @@ +From 69585f66548103a8d8d18e1183839fa6fa2d903d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 20:46:39 +0100 +Subject: [PATCH 1/2] add commandechomode.h to installed headers + +.. this header is needed by qbs/tools/buildoptions.h +--- + src/lib/corelib/tools/tools.pri | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index a77926c..4106aee 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -97,7 +97,8 @@ qbs_enable_unit_tests { + $$PWD/generatorpluginmanager.h \ + $$PWD/installoptions.h \ + $$PWD/generateoptions.h \ +- $$PWD/setupprojectparameters.h ++ $$PWD/setupprojectparameters.h \ ++ $$PWD/commandechomode.h + tools_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/tools + INSTALLS += tools_headers + } +-- +2.3.5 + diff --git a/mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch b/mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch new file mode 100644 index 0000000000..d2f1810858 --- /dev/null +++ b/mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch @@ -0,0 +1,74 @@ +From 7b028bd667664bf2bc5c681929f90c2c5fbf7c44 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 21:43:17 +0100 +Subject: [PATCH 07/10] add many files to installed headers + +tools/projectgeneratormanager.h +tools/id.h +language/filetags.h +logging/logger.h +generators/generator.h +--- + src/lib/corelib/generators/generators.pri | 6 +++++ + src/lib/corelib/language/language.pri | 3 ++- + src/lib/corelib/logging/logging.pri | 3 ++- + src/lib/corelib/tools/tools.pri | 2 ++ + 4 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/lib/corelib/generators/generators.pri b/src/lib/corelib/generators/generators.pri +index 2fa095e..4217853 100644 +--- a/src/lib/corelib/generators/generators.pri ++++ b/src/lib/corelib/generators/generators.pri +@@ -1,2 +1,8 @@ + HEADERS += \ + $$PWD/generator.h ++ ++!qbs_no_dev_install { ++ generators_headers.files = $$PWD/generator.h ++ generators_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/generators ++ INSTALLS += generators_headers ++} +diff --git a/src/lib/corelib/language/language.pri b/src/lib/corelib/language/language.pri +index 6da8536..4f8f2ba 100644 +--- a/src/lib/corelib/language/language.pri ++++ b/src/lib/corelib/language/language.pri +@@ -67,7 +67,8 @@ qbs_enable_unit_tests { + } + + !qbs_no_dev_install { +- language_headers.files = $$PWD/forward_decls.h ++ language_headers.files = $$PWD/forward_decls.h \ ++ $$PWD/filetags.h + language_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/language + INSTALLS += language_headers + } +diff --git a/src/lib/corelib/logging/logging.pri b/src/lib/corelib/logging/logging.pri +index 8c03677..c09ba11 100644 +--- a/src/lib/corelib/logging/logging.pri ++++ b/src/lib/corelib/logging/logging.pri +@@ -8,7 +8,8 @@ SOURCES += \ + $$PWD/ilogsink.cpp + + !qbs_no_dev_install { +- logging_headers.files = $$PWD/ilogsink.h ++ logging_headers.files = $$PWD/ilogsink.h \ ++ $$PWD/logger.h + logging_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/logging + INSTALLS += logging_headers + } +diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri +index d5f5983..cc20c33 100644 +--- a/src/lib/corelib/tools/tools.pri ++++ b/src/lib/corelib/tools/tools.pri +@@ -95,6 +95,8 @@ qbs_enable_unit_tests { + $$PWD/processresult.h \ + $$PWD/qbs_export.h \ + $$PWD/buildoptions.h \ ++ $$PWD/projectgeneratormanager.h \ ++ $$PWD/id.h \ + $$PWD/generateoptions.h \ + $$PWD/generatorpluginmanager.h \ + $$PWD/installoptions.h \ +-- +2.3.5 + diff --git a/mingw-w64-qbs/0090-WIP-Xcode-generator.1.4.patch b/mingw-w64-qbs/0090-WIP-Xcode-generator.1.4.patch new file mode 100644 index 0000000000..c965c47868 --- /dev/null +++ b/mingw-w64-qbs/0090-WIP-Xcode-generator.1.4.patch @@ -0,0 +1,6368 @@ +From 67b10a832b047d2479fbb0ba08431af6d88a8bfc Mon Sep 17 00:00:00 2001 +From: Jake Petroules +Date: Wed, 18 Feb 2015 09:05:29 -0800 +Subject: [PATCH 2/6] WIP: Xcode generator. + +Task-number: QBS-32 +Change-Id: I5ce5cc3148aa801d75a1f64b778fe7334de43af9 +--- + src/lib/corelib/corelib.qbs | 62 ++ + src/lib/corelib/generators/generators.pri | 2 + + .../generators/xcode/opensteppropertylist.cpp | 257 ++++++++ + .../generators/xcode/opensteppropertylist.h | 76 +++ + src/lib/corelib/generators/xcode/pbx.h | 57 ++ + src/lib/corelib/generators/xcode/pbxbuildfile.cpp | 134 +++++ + src/lib/corelib/generators/xcode/pbxbuildfile.h | 74 +++ + src/lib/corelib/generators/xcode/pbxbuildphase.cpp | 94 +++ + src/lib/corelib/generators/xcode/pbxbuildphase.h | 65 +++ + src/lib/corelib/generators/xcode/pbxcontainer.cpp | 60 ++ + src/lib/corelib/generators/xcode/pbxcontainer.h | 59 ++ + .../generators/xcode/pbxcontaineritemproxy.cpp | 113 ++++ + .../generators/xcode/pbxcontaineritemproxy.h | 65 +++ + src/lib/corelib/generators/xcode/pbxfileencoding.h | 57 ++ + .../corelib/generators/xcode/pbxfilereference.cpp | 66 +++ + .../corelib/generators/xcode/pbxfilereference.h | 52 ++ + src/lib/corelib/generators/xcode/pbxfiletype.cpp | 51 ++ + src/lib/corelib/generators/xcode/pbxfiletype.h | 47 ++ + .../generators/xcode/pbxframeworksbuildphase.cpp | 27 + + .../generators/xcode/pbxframeworksbuildphase.h | 50 ++ + src/lib/corelib/generators/xcode/pbxgroup.cpp | 119 ++++ + src/lib/corelib/generators/xcode/pbxgroup.h | 71 +++ + .../corelib/generators/xcode/pbxlegacytarget.cpp | 111 ++++ + src/lib/corelib/generators/xcode/pbxlegacytarget.h | 65 +++ + .../corelib/generators/xcode/pbxnativetarget.cpp | 68 +++ + src/lib/corelib/generators/xcode/pbxnativetarget.h | 53 ++ + src/lib/corelib/generators/xcode/pbxobject.cpp | 96 +++ + src/lib/corelib/generators/xcode/pbxobject.h | 124 ++++ + .../corelib/generators/xcode/pbxproducttype.cpp | 75 +++ + src/lib/corelib/generators/xcode/pbxproducttype.h | 53 ++ + src/lib/corelib/generators/xcode/pbxproject.cpp | 333 +++++++++++ + src/lib/corelib/generators/xcode/pbxproject.h | 114 ++++ + src/lib/corelib/generators/xcode/pbxreference.cpp | 127 ++++ + src/lib/corelib/generators/xcode/pbxreference.h | 72 +++ + .../generators/xcode/pbxsourcesbuildphase.cpp | 57 ++ + .../generators/xcode/pbxsourcesbuildphase.h | 53 ++ + src/lib/corelib/generators/xcode/pbxsourcetree.cpp | 50 ++ + src/lib/corelib/generators/xcode/pbxsourcetree.h | 52 ++ + src/lib/corelib/generators/xcode/pbxtarget.cpp | 192 ++++++ + src/lib/corelib/generators/xcode/pbxtarget.h | 100 ++++ + .../generators/xcode/pbxtargetdependency.cpp | 99 ++++ + .../corelib/generators/xcode/pbxtargetdependency.h | 65 +++ + .../generators/xcode/xcbuildconfiguration.cpp | 92 +++ + .../generators/xcode/xcbuildconfiguration.h | 69 +++ + .../generators/xcode/xcconfigurationlist.cpp | 147 +++++ + .../corelib/generators/xcode/xcconfigurationlist.h | 67 +++ + src/lib/corelib/generators/xcode/xcode.pri | 59 ++ + .../generators/xcode/xcodebuildsettingmapping.cpp | 366 ++++++++++++ + .../generators/xcode/xcodebuildsettingmapping.h | 96 +++ + .../corelib/generators/xcode/xcodegenerator.cpp | 643 +++++++++++++++++++++ + src/lib/corelib/generators/xcode/xcodegenerator.h | 81 +++ + .../generators/xcode/xcodenativegenerator.cpp | 58 ++ + .../generators/xcode/xcodenativegenerator.h | 52 ++ + .../generators/xcode/xcodesimplegenerator.cpp | 58 ++ + .../generators/xcode/xcodesimplegenerator.h | 52 ++ + src/lib/corelib/generators/xcode/xcscheme.cpp | 179 ++++++ + src/lib/corelib/generators/xcode/xcscheme.h | 69 +++ + src/lib/corelib/generators/xcode/xcsettings.cpp | 95 +++ + src/lib/corelib/generators/xcode/xcsettings.h | 54 ++ + src/lib/corelib/tools/projectgeneratormanager.cpp | 5 + + 60 files changed, 5859 insertions(+) + create mode 100644 src/lib/corelib/generators/xcode/opensteppropertylist.cpp + create mode 100644 src/lib/corelib/generators/xcode/opensteppropertylist.h + create mode 100644 src/lib/corelib/generators/xcode/pbx.h + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildfile.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildfile.h + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxcontainer.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxcontainer.h + create mode 100644 src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfileencoding.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfilereference.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxfilereference.h + create mode 100644 src/lib/corelib/generators/xcode/pbxfiletype.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxfiletype.h + create mode 100644 src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxgroup.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxgroup.h + create mode 100644 src/lib/corelib/generators/xcode/pbxlegacytarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxlegacytarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxnativetarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxnativetarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxobject.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxobject.h + create mode 100644 src/lib/corelib/generators/xcode/pbxproducttype.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxproducttype.h + create mode 100644 src/lib/corelib/generators/xcode/pbxproject.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxproject.h + create mode 100644 src/lib/corelib/generators/xcode/pbxreference.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxreference.h + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcetree.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxsourcetree.h + create mode 100644 src/lib/corelib/generators/xcode/pbxtarget.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxtarget.h + create mode 100644 src/lib/corelib/generators/xcode/pbxtargetdependency.cpp + create mode 100644 src/lib/corelib/generators/xcode/pbxtargetdependency.h + create mode 100644 src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcbuildconfiguration.h + create mode 100644 src/lib/corelib/generators/xcode/xcconfigurationlist.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcconfigurationlist.h + create mode 100644 src/lib/corelib/generators/xcode/xcode.pri + create mode 100644 src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h + create mode 100644 src/lib/corelib/generators/xcode/xcodegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcodenativegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodenativegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcodesimplegenerator.h + create mode 100644 src/lib/corelib/generators/xcode/xcscheme.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcscheme.h + create mode 100644 src/lib/corelib/generators/xcode/xcsettings.cpp + create mode 100644 src/lib/corelib/generators/xcode/xcsettings.h + +diff --git a/src/lib/corelib/corelib.qbs b/src/lib/corelib/corelib.qbs +index a5c1ab6..771f7e6 100644 +--- a/src/lib/corelib/corelib.qbs ++++ b/src/lib/corelib/corelib.qbs +@@ -154,6 +154,68 @@ QbsLibrary { + files: "buildgraph/forward_decls.h" + } + Group { ++ name: "Xcode generator" ++ prefix: "generators/xcode/" ++ files: [ ++ "opensteppropertylist.cpp", ++ "opensteppropertylist.h", ++ "pbx.h", ++ "pbxbuildfile.cpp", ++ "pbxbuildfile.h", ++ "pbxbuildphase.cpp", ++ "pbxbuildphase.h", ++ "pbxcontainer.cpp", ++ "pbxcontainer.h", ++ "pbxcontaineritemproxy.cpp", ++ "pbxcontaineritemproxy.h", ++ "pbxfileencoding.h", ++ "pbxfilereference.cpp", ++ "pbxfilereference.h", ++ "pbxfiletype.cpp", ++ "pbxfiletype.h", ++ "pbxframeworksbuildphase.cpp", ++ "pbxframeworksbuildphase.h", ++ "pbxgroup.cpp", ++ "pbxgroup.h", ++ "pbxlegacytarget.cpp", ++ "pbxlegacytarget.h", ++ "pbxnativetarget.cpp", ++ "pbxnativetarget.h", ++ "pbxobject.cpp", ++ "pbxobject.h", ++ "pbxproducttype.cpp", ++ "pbxproducttype.h", ++ "pbxproject.cpp", ++ "pbxproject.h", ++ "pbxreference.cpp", ++ "pbxreference.h", ++ "pbxsourcesbuildphase.cpp", ++ "pbxsourcesbuildphase.h", ++ "pbxsourcetree.cpp", ++ "pbxsourcetree.h", ++ "pbxtarget.cpp", ++ "pbxtarget.h", ++ "pbxtargetdependency.cpp", ++ "pbxtargetdependency.h", ++ "xcbuildconfiguration.cpp", ++ "xcbuildconfiguration.h", ++ "xcconfigurationlist.cpp", ++ "xcconfigurationlist.h", ++ "xcodegenerator.cpp", ++ "xcodegenerator.h", ++ "xcodenativegenerator.cpp", ++ "xcodenativegenerator.h", ++ "xcodesimplegenerator.cpp", ++ "xcodesimplegenerator.h", ++ "xcscheme.cpp", ++ "xcscheme.h", ++ "xcsettings.cpp", ++ "xcsettings.h", ++ "xcodebuildsettingmapping.cpp", ++ "xcodebuildsettingmapping.h" ++ ] ++ } ++ Group { + name: "jsextensions" + prefix: name + '/' + files: [ +diff --git a/src/lib/corelib/generators/generators.pri b/src/lib/corelib/generators/generators.pri +index 6372e81..2fa095e 100644 +--- a/src/lib/corelib/generators/generators.pri ++++ b/src/lib/corelib/generators/generators.pri +@@ -6,3 +6,5 @@ + generators_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/generators + INSTALLS += generators_headers + } ++ ++include(xcode/xcode.pri) +diff --git a/src/lib/corelib/generators/xcode/opensteppropertylist.cpp b/src/lib/corelib/generators/xcode/opensteppropertylist.cpp +new file mode 100644 +index 0000000..63adee2 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/opensteppropertylist.cpp +@@ -0,0 +1,257 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ++** Copyright (C) 2014 Petroules Corporation. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "opensteppropertylist.h" ++#include "pbxobject.h" ++#include ++#include ++ ++const QChar OpenStepPropertyList::NewlineToken = QLatin1Char('\n'); ++const QChar OpenStepPropertyList::DictionaryBeginToken = QLatin1Char('{'); ++const QChar OpenStepPropertyList::DictionarySeparatorToken = QLatin1Char(';'); ++const QChar OpenStepPropertyList::DictionaryEndToken = QLatin1Char('}'); ++const QChar OpenStepPropertyList::ArrayBeginToken = QLatin1Char('('); ++const QChar OpenStepPropertyList::ArraySeparatorToken = QLatin1Char(','); ++const QChar OpenStepPropertyList::ArrayEndToken = QLatin1Char(')'); ++const QChar OpenStepPropertyList::QuotedStringBeginToken = QLatin1Char('"'); ++const QChar OpenStepPropertyList::QuotedStringEndToken = QLatin1Char('"'); ++const QChar OpenStepPropertyList::DataBeginToken = QLatin1Char('<'); ++const QChar OpenStepPropertyList::DataEndToken = QLatin1Char('>'); ++const QChar OpenStepPropertyList::IndentationToken = QLatin1Char('\t'); ++ ++#define isValidUnquotedStringCharacter(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || ((x) >= '0' && (x) <= '9') || (x) == '_' || (x) == '$' || (x) == '/' || (x) == ':' || (x) == '.' ) ++ ++static QString formatString(const QString &string) ++{ ++ bool isQuoted = string.isEmpty(); ++ if (!isQuoted) ++ { ++ for (int i = 0; i < string.size(); ++i) ++ { ++ if (!isValidUnquotedStringCharacter(string[i])) ++ { ++ isQuoted = true; ++ break; ++ } ++ } ++ } ++ ++ QString outString = string; ++ outString.replace(QLatin1String("\\"), QLatin1String("\\\\")); ++ outString.replace(QLatin1String("\""), QLatin1String("\\\"")); ++ ++ if (isQuoted) ++ outString.prepend(OpenStepPropertyList::QuotedStringBeginToken); ++ if (isQuoted) ++ outString.append(OpenStepPropertyList::QuotedStringEndToken); ++ ++ return outString; ++} ++ ++QString OpenStepPropertyList::toString(const QVariantMap &propertyList) ++{ ++ PBXObjectMap newMap; ++ Q_FOREACH (const QString &key, propertyList.keys()) { ++ newMap.insert(key, propertyList[key]); ++ } ++ return toString(newMap); ++} ++ ++QString OpenStepPropertyList::toString(const PBXObjectMap &propertyList) ++{ ++ return toString(propertyList, 0) + NewlineToken; ++} ++ ++QString OpenStepPropertyList::toString(const QVariantMap &propertyList, int indentationLevel) ++{ ++ PBXObjectMap newMap; ++ Q_FOREACH (const QString &key, propertyList.keys()) { ++ newMap.insert(key, propertyList[key]); ++ } ++ return toString(newMap, indentationLevel); ++} ++ ++QString OpenStepPropertyList::toString(const PBXObjectMap &propertyList, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += DictionaryBeginToken; ++ ++ const bool isFlat = ++ propertyList[QLatin1String("isa")] == QLatin1String("PBXBuildFile") || ++ propertyList[QLatin1String("isa")] == QLatin1String("PBXFileReference"); ++ if (!isFlat) { ++ string += NewlineToken; ++ } ++ ++ QList keys = propertyList.keys(); ++ ++ // Push the isa property to the top of the list as it's always written first ++ const int isaIndex = keys.indexOf(QLatin1String("isa")); ++ if (isaIndex >= 0) { ++ keys.removeAt(isaIndex); ++ keys.insert(0, QLatin1String("isa")); ++ } ++ ++ QStack isas; ++ ++ foreach (const PBXObjectIdentifier &vkey, keys) ++ { ++ const QVariant &object = propertyList[vkey]; ++ ++ if (!vkey.isa().isEmpty()) { ++ if (!isas.empty() && vkey.isa() != isas.top()) { ++ string += QString(QLatin1String("/* End %1 section */\n")).arg(isas.top()); ++ isas.pop(); ++ } ++ ++ if (isas.empty()) { ++ isas.push(vkey.isa()); ++ string += QString(QLatin1String("\n/* Begin %1 section */\n")).arg(vkey.isa()); ++ } ++ } ++ ++ string += QString(!isFlat ? (indentationLevel + 1) : 0, IndentationToken); ++ string += toString(QVariant::fromValue(vkey), -1); ++ string += QLatin1String(" = "); ++ ++ if (object.canConvert() || object.type() == QVariant::Map || object.type() == QVariant::List || ++ object.type() == QVariant::StringList || object.type() == QVariant::ByteArray) ++ string += toString(object, !isFlat ? (indentationLevel + 1) : 0).trimmed(); ++ else ++ string += toString(object, 0); ++ ++ string += DictionarySeparatorToken; ++ string += !isFlat ? NewlineToken : QLatin1Char(' '); ++ } ++ ++ if (!isas.empty()) { ++ string += QString(QLatin1String("/* End %1 section */\n")).arg(isas.top()); ++ isas.pop(); ++ } ++ ++ if (!isFlat) { ++ string += QString(indentationLevel, IndentationToken); ++ } ++ ++ string += DictionaryEndToken; ++ return string; ++} ++ ++QString OpenStepPropertyList::toString(const QList &propertyList) ++{ ++ return toString(propertyList, 0) + NewlineToken; ++} ++ ++QString OpenStepPropertyList::toString(const QList &propertyList, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += ArrayBeginToken; ++ string += NewlineToken; ++ ++ for (int i = 0; i < propertyList.size(); ++i) ++ { ++ const QVariant &object = propertyList[i]; ++ string += toString(object, indentationLevel + 1); ++ string += ArraySeparatorToken; ++ string += NewlineToken; ++ } ++ ++ string += QString(indentationLevel, IndentationToken) + ArrayEndToken; ++ return string; ++} ++ ++QString OpenStepPropertyList::toString(const QVariant &object, int indentationLevel) ++{ ++ if (object.canConvert()) { ++ PBXObjectIdentifier objid = object.value(); ++ QString s = toString(objid.identifier(), indentationLevel); ++ if (!objid.comment().isEmpty()) { ++ s += QLatin1String(" /* "); ++ s += objid.comment().replace(QLatin1String("*/"), QLatin1String("* /")); ++ s += QLatin1String(" */"); ++ } ++ return s; ++ } ++ ++ if (object.canConvert()) { ++ return toString(object.value(), indentationLevel); ++ } ++ ++ switch (object.type()) ++ { ++ case QVariant::Bool: ++ return object.toBool() ? QLatin1String("YES") : QLatin1String("NO"); ++ case QVariant::ByteArray: ++ return toString(object.toByteArray(), indentationLevel); ++ case QVariant::Date: ++ case QVariant::DateTime: ++ case QVariant::Time: ++ return toString(object.toDateTime(), indentationLevel); ++ case QVariant::Double: ++ return QString::number(object.toDouble()); ++ case QVariant::Int: ++ return QString::number(object.toInt()); ++ case QVariant::List: ++ case QVariant::StringList: ++ return toString(object.toList(), indentationLevel); ++ case QVariant::LongLong: ++ return QString::number(object.toLongLong()); ++ case QVariant::Map: ++ return toString(object.toMap(), indentationLevel); ++ case QVariant::String: ++ return toString(object.toString(), indentationLevel); ++ case QVariant::UInt: ++ return QString::number(object.toUInt()); ++ case QVariant::ULongLong: ++ return QString::number(object.toULongLong()); ++ default: ++ qDebug() << "Unsupported property list object type" << object; ++ abort(); ++ } ++} ++ ++QString OpenStepPropertyList::toString(const QByteArray &object, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += DataBeginToken + QString::fromLatin1(object.toHex()) + DataEndToken; ++ return string; ++} ++ ++QString OpenStepPropertyList::toString(const QDateTime &object, int indentationLevel) ++{ ++ return toString(object.toUTC().toString(Qt::ISODate), indentationLevel); ++} ++ ++QString OpenStepPropertyList::toString(const QString &object, int indentationLevel) ++{ ++ QString string(indentationLevel, IndentationToken); ++ string += formatString(object); ++ return string; ++} +diff --git a/src/lib/corelib/generators/xcode/opensteppropertylist.h b/src/lib/corelib/generators/xcode/opensteppropertylist.h +new file mode 100644 +index 0000000..36cef73 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/opensteppropertylist.h +@@ -0,0 +1,76 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ++** Copyright (C) 2014 Petroules Corporation. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef OPENSTEPPROPERTYLIST_H ++#define OPENSTEPPROPERTYLIST_H ++ ++#include ++#include ++#include ++#include ++#include ++ ++class PBXObjectIdentifier; ++typedef QMap PBXObjectMap; ++ ++class OpenStepPropertyList ++{ ++ Q_DISABLE_COPY(OpenStepPropertyList) ++public: ++ static const QChar NewlineToken; ++ static const QChar DictionaryBeginToken; ++ static const QChar DictionarySeparatorToken; ++ static const QChar DictionaryEndToken; ++ static const QChar ArrayBeginToken; ++ static const QChar ArraySeparatorToken; ++ static const QChar ArrayEndToken; ++ static const QChar QuotedStringBeginToken; ++ static const QChar QuotedStringEndToken; ++ static const QChar DataBeginToken; ++ static const QChar DataEndToken; ++ static const QChar IndentationToken; ++ ++ static QString toString(const QVariantMap &propertyList); ++ static QString toString(const PBXObjectMap &propertyList); ++ static QString toString(const QList &propertyList); ++ ++private: ++ OpenStepPropertyList(); ++ ++ static QString toString(const QVariantMap &propertyList, int indentationLevel); ++ static QString toString(const PBXObjectMap &propertyList, int indentationLevel); ++ static QString toString(const QList &propertyList, int indentationLevel); ++ static QString toString(const QVariant &object, int indentationLevel); ++ static QString toString(const QByteArray &object, int indentationLevel); ++ static QString toString(const QDateTime &object, int indentationLevel); ++ static QString toString(const QString &object, int indentationLevel); ++}; ++ ++#endif // OPENSTEPPROPERTYLIST_H +diff --git a/src/lib/corelib/generators/xcode/pbx.h b/src/lib/corelib/generators/xcode/pbx.h +new file mode 100644 +index 0000000..d4cc014 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbx.h +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBX_H ++#define PBX_H ++ ++#include "opensteppropertylist.h" ++#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" ++#include "pbxcontainer.h" ++#include "pbxcontaineritemproxy.h" ++#include "pbxfileencoding.h" ++#include "pbxfilereference.h" ++#include "pbxfiletype.h" ++#include "pbxgroup.h" ++#include "pbxlegacytarget.h" ++#include "pbxnativetarget.h" ++#include "pbxobject.h" ++#include "pbxproducttype.h" ++#include "pbxproject.h" ++#include "pbxreference.h" ++#include "pbxsourcetree.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++#include "xcscheme.h" ++#include "xcsettings.h" ++ ++#endif // PBX_H +diff --git a/src/lib/corelib/generators/xcode/pbxbuildfile.cpp b/src/lib/corelib/generators/xcode/pbxbuildfile.cpp +new file mode 100644 +index 0000000..cbe34c0 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildfile.cpp +@@ -0,0 +1,134 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" ++#include "pbxfilereference.h" ++ ++static const QString kPBXBuildFileAttributes = QLatin1String("ATTRIBUTES"); ++static const QString kPBXBuildFileLibraryWeakLinked = QLatin1String("Weak"); ++ ++class PBXBuildFilePrivate ++{ ++public: ++ PBXBuildFilePrivate(); ++ PBXFileReference *reference; ++ QSet attributes; ++}; ++ ++PBXBuildFilePrivate::PBXBuildFilePrivate() ++ : reference() ++{ ++} ++ ++PBXBuildFile::PBXBuildFile(PBXBuildPhase *parent) : ++ PBXObject(parent), d(new PBXBuildFilePrivate) ++{ ++} ++ ++PBXBuildFile::~PBXBuildFile() ++{ ++ delete d; ++} ++ ++QString PBXBuildFile::isa() const ++{ ++ return QLatin1String("PBXBuildFile"); ++} ++ ++PBXObjectMap PBXBuildFile::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->reference) { ++ self.insert(QLatin1String("fileRef"), QVariant::fromValue(d->reference->identifier())); ++ } ++ ++ QVariantMap settingsMap; ++ if (!d->attributes.isEmpty()) { ++ QStringList attributes = d->attributes.toList(); ++ qSort(attributes); ++ settingsMap.insert(kPBXBuildFileAttributes, attributes); ++ } ++ ++ if (!settingsMap.isEmpty()) { ++ self.insert(QLatin1String("settings"), settingsMap); ++ } ++ ++ return self; ++} ++ ++PBXFileReference *PBXBuildFile::fileReference() const ++{ ++ return d->reference; ++} ++ ++void PBXBuildFile::setFileReference(PBXFileReference *reference) ++{ ++ d->reference = reference; ++} ++ ++QSet PBXBuildFile::attributes() const ++{ ++ return d->attributes; ++} ++ ++bool PBXBuildFile::isWeakLinkedLibrary() const ++{ ++ return d->attributes.contains(kPBXBuildFileLibraryWeakLinked); ++} ++ ++void PBXBuildFile::setWeakLinkedLibrary(bool weakLinked) ++{ ++ if (weakLinked) ++ d->attributes.insert(kPBXBuildFileLibraryWeakLinked); ++ else ++ d->attributes.remove(kPBXBuildFileLibraryWeakLinked); ++} ++ ++QString PBXBuildFile::comment() const ++{ ++ if (d->reference) { ++ PBXBuildPhase *phase = dynamic_cast(parent()); ++ Q_ASSERT(phase); ++ return QString(QLatin1String("%1 in %2")).arg(d->reference->name()).arg(phase->name()); ++ } ++ ++ return PBXObject::comment(); ++} ++ ++QByteArray PBXBuildFile::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (d->reference) { ++ data.append(d->reference->hashData()); ++ } ++ ++ return data; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxbuildfile.h b/src/lib/corelib/generators/xcode/pbxbuildfile.h +new file mode 100644 +index 0000000..bc25ab8 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildfile.h +@@ -0,0 +1,74 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXBUILDFILE_H ++#define PBXBUILDFILE_H ++ ++#include "pbxobject.h" ++#include ++#include ++ ++class PBXBuildPhase; ++class PBXFileReference; ++ ++class PBXBuildFilePrivate; ++ ++/*! ++ * \brief The PBXBuildFile class represents a file reference that is used in a build phase. ++ * Its primary purpose is to allow additional build settings to be applied at the file level. ++ */ ++class PBXBuildFile : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXBuildFile(PBXBuildPhase *parent = 0); ++ virtual ~PBXBuildFile(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXFileReference *fileReference() const; ++ void setFileReference(PBXFileReference *reference); ++ ++ QString absolutePath() const; ++ QSet attributes() const; ++ ++ bool isWeakLinkedLibrary() const; ++ void setWeakLinkedLibrary(bool weakLinked); ++ ++private: ++ PBXBuildFilePrivate *d; ++}; ++ ++#endif // PBXBUILDFILE_H +diff --git a/src/lib/corelib/generators/xcode/pbxbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxbuildphase.cpp +new file mode 100644 +index 0000000..fc371aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildphase.cpp +@@ -0,0 +1,94 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxbuildfile.h" ++#include "pbxbuildphase.h" ++#include "pbxfilereference.h" ++#include "pbxtarget.h" ++ ++class PBXBuildPhasePrivate ++{ ++public: ++ QList buildFiles; ++}; ++ ++PBXBuildPhase::PBXBuildPhase(PBXTarget *parent) : ++ PBXObject(parent), d(new PBXBuildPhasePrivate) ++{ ++} ++ ++PBXBuildPhase::~PBXBuildPhase() ++{ ++ delete d; ++} ++ ++PBXObjectMap PBXBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("buildActionMask"), std::numeric_limits::max()); ++ ++ QVariantList fileReferenceList; ++ foreach (PBXBuildFile *buildFile, buildFiles()) ++ fileReferenceList += QVariant::fromValue(buildFile->identifier()); ++ self.insert(QLatin1String("files"), fileReferenceList); ++ ++ self.insert(QLatin1String("runOnlyForDeploymentPostprocessing"), 0); ++ ++ return self; ++} ++ ++QByteArray PBXBuildPhase::hashData() const ++{ ++ QByteArray data; ++ PBXTarget *target = dynamic_cast(parent()); ++ if (target) { ++ data.append(target->hashData()); ++ } ++ return data; // TODO: Build phases for which a target may have multiple of, will not work ++} ++ ++QList PBXBuildPhase::buildFiles() const ++{ ++ return d->buildFiles; ++} ++ ++PBXBuildFile *PBXBuildPhase::addReference(PBXFileReference *reference) ++{ ++ Q_FOREACH (PBXBuildFile *buildFile, d->buildFiles) { ++ if (buildFile->fileReference() == reference) { ++ return buildFile; ++ } ++ } ++ ++ PBXBuildFile *buildFile = new PBXBuildFile(this); ++ buildFile->setFileReference(reference); ++ d->buildFiles.append(buildFile); ++ return buildFile; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxbuildphase.h b/src/lib/corelib/generators/xcode/pbxbuildphase.h +new file mode 100644 +index 0000000..b80ec81 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxbuildphase.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXBUILDPHASE_H ++#define PBXBUILDPHASE_H ++ ++#include "pbxobject.h" ++#include ++ ++class PBXBuildFile; ++class PBXFileReference; ++class PBXTarget; ++ ++class PBXBuildPhasePrivate; ++ ++class PBXBuildPhase : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXBuildPhase(PBXTarget *parent = 0); ++ virtual ~PBXBuildPhase(); ++ ++ virtual QString name() const = 0; ++ ++ PBXObjectMap toMap() const; ++ ++ QByteArray hashData() const; ++ ++ QList buildFiles() const; ++ ++ PBXBuildFile *addReference(PBXFileReference *reference); ++ bool containsFileReferenceIdenticalTo(PBXFileReference *reference); ++ ++private: ++ PBXBuildPhasePrivate *d; ++}; ++ ++#endif // PBXBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxcontainer.cpp b/src/lib/corelib/generators/xcode/pbxcontainer.cpp +new file mode 100644 +index 0000000..6ce359a +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontainer.cpp +@@ -0,0 +1,60 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontainer.h" ++#include "pbxgroup.h" ++ ++class PBXContainerPrivate ++{ ++public: ++ PBXGroup group; ++}; ++ ++PBXContainer::PBXContainer(QObject *parent) : ++ PBXObject(parent), d(new PBXContainerPrivate) ++{ ++} ++ ++PBXContainer::~PBXContainer() ++{ ++ delete d; ++} ++ ++QByteArray PBXContainer::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ data.append(d->group.hashData()); ++ return data; ++} ++ ++PBXGroup *PBXContainer::rootGroup() const ++{ ++ return &d->group; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxcontainer.h b/src/lib/corelib/generators/xcode/pbxcontainer.h +new file mode 100644 +index 0000000..3263149 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontainer.h +@@ -0,0 +1,59 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXCONTAINER_H ++#define PBXCONTAINER_H ++ ++#include "pbxobject.h" ++#include ++ ++class PBXFileReference; ++class PBXGroup; ++ ++class PBXContainerPrivate; ++ ++class PBXContainer : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXContainer(QObject *parent = 0); ++ virtual ~PBXContainer(); ++ ++ QByteArray hashData() const; ++ ++ PBXGroup *rootGroup() const; ++ ++ PBXFileReference *fileReferenceForPath(const QString &path); ++ ++private: ++ PBXContainerPrivate *d; ++}; ++ ++#endif // PBXCONTAINER_H +diff --git a/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp +new file mode 100644 +index 0000000..46f18dd +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.cpp +@@ -0,0 +1,113 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontaineritemproxy.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++ ++class PBXContainerItemProxyPrivate ++{ ++public: ++ PBXProject *containerPortal; ++ PBXTarget *target; ++}; ++ ++PBXContainerItemProxy::PBXContainerItemProxy(PBXTargetDependency *parent) : ++ PBXObject(parent), d(new PBXContainerItemProxyPrivate) ++{ ++} ++ ++PBXContainerItemProxy::~PBXContainerItemProxy() ++{ ++ delete d; ++} ++ ++QString PBXContainerItemProxy::isa() const ++{ ++ return QLatin1String("PBXContainerItemProxy"); ++} ++ ++PBXObjectMap PBXContainerItemProxy::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->containerPortal) ++ self.insert(QLatin1String("containerPortal"), QVariant::fromValue(d->containerPortal->identifier())); ++ ++ self.insert(QLatin1String("proxyType"), 1); // TODO: Always the same? ++ ++ if (d->target) { ++ // We deliberately don't store the actual PBXObjectIdentifier, ++ // because Xcode itself doesn't write the ID with a comment annotation ++ self.insert(QLatin1String("remoteGlobalIDString"), d->target->identifier().identifier()); ++ self.insert(QLatin1String("remoteInfo"), d->target->name()); ++ } ++ ++ return self; ++} ++ ++QString PBXContainerItemProxy::comment() const ++{ ++ return PBXObject::comment(); ++} ++ ++QByteArray PBXContainerItemProxy::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (d->containerPortal) { ++ data.append(d->containerPortal->hashData()); ++ } ++ ++ if (d->target) { ++ data.append(d->target->hashData()); ++ } ++ ++ return data; ++} ++ ++PBXProject *PBXContainerItemProxy::containerPortal() const ++{ ++ return d->containerPortal; ++} ++ ++void PBXContainerItemProxy::setContainerPortal(PBXProject *containerPortal) ++{ ++ d->containerPortal = containerPortal; ++} ++ ++PBXTarget *PBXContainerItemProxy::target() const ++{ ++ return d->target; ++} ++ ++void PBXContainerItemProxy::setTarget(PBXTarget *target) ++{ ++ d->target = target; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h +new file mode 100644 +index 0000000..34205aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxcontaineritemproxy.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXCONTAINERITEMPROXY_H ++#define PBXCONTAINERITEMPROXY_H ++ ++#include "pbxobject.h" ++ ++class PBXContainerItemProxyPrivate; ++class PBXProject; ++class PBXTarget; ++class PBXTargetDependency; ++ ++class PBXContainerItemProxy : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXContainerItemProxy(PBXTargetDependency *parent = 0); ++ virtual ~PBXContainerItemProxy(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXProject *containerPortal() const; ++ void setContainerPortal(PBXProject *containerPortal); ++ ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++private: ++ PBXContainerItemProxyPrivate *d; ++}; ++ ++#endif // PBXCONTAINERITEMPROXY_H +diff --git a/src/lib/corelib/generators/xcode/pbxfileencoding.h b/src/lib/corelib/generators/xcode/pbxfileencoding.h +new file mode 100644 +index 0000000..50af8c5 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfileencoding.h +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFILEENCODING_H ++#define PBXFILEENCODING_H ++ ++namespace PBX ++{ ++ typedef enum { ++ Default = 0, ++ UTF8 = 4, ++ UTF16 = 10, ++ UTF16_BE = 0x90000100, ++ UTF16_LE = 0x94000100, ++ Western = 30, ++ Japanese = 0x80000001, ++ TraditionalChinese = 0x80000002, ++ Korean = 0x80000003, ++ Arabic = 0x80000004, ++ Hebrew = 0x80000005, ++ Greek = 0x80000006, ++ Cyrillic = 0x80000007, ++ SimplifiedChinese = 0x80000019, ++ CentralEuropean = 0x8000001D, ++ Turkish = 0x80000023, ++ Icelandic = 0x80000025 ++ } PBXFileEncoding; ++} ++ ++#endif // PBXFILEENCODING_H +diff --git a/src/lib/corelib/generators/xcode/pbxfilereference.cpp b/src/lib/corelib/generators/xcode/pbxfilereference.cpp +new file mode 100644 +index 0000000..b5dbd94 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfilereference.cpp +@@ -0,0 +1,66 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfileencoding.h" ++#include "pbxfilereference.h" ++#include "pbxfiletype.h" ++#include "pbxgroup.h" ++#include "pbxsourcetree.h" ++#include ++ ++class PBXFileReferencePrivate ++{ ++public: ++}; ++ ++PBXFileReference::PBXFileReference(QObject *parent) : ++ PBXReference(parent), d(new PBXFileReferencePrivate) ++{ ++} ++ ++PBXFileReference::~PBXFileReference() ++{ ++ delete d; ++} ++ ++QString PBXFileReference::isa() const ++{ ++ return QLatin1String("PBXFileReference"); ++} ++ ++PBXObjectMap PBXFileReference::toMap() const ++{ ++ PBXObjectMap self = PBXReference::toMap(); ++ self.insert(QLatin1String("fileEncoding"), PBX::Default); ++ //self.insert(QLatin1String("explicitFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).suffix())); // PBXFileType ++ //self.insert(QLatin1String("includeInIndex"), 0); ++ self.insert(QLatin1String("lastKnownFileType"), PBXFileType::typeForFileExtension(QFileInfo(path()).suffix())); // PBXFileType ++ return self; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxfilereference.h b/src/lib/corelib/generators/xcode/pbxfilereference.h +new file mode 100644 +index 0000000..7a56120 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfilereference.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFILEREFERENCE_H ++#define PBXFILEREFERENCE_H ++ ++#include "pbxreference.h" ++ ++class PBXFileReferencePrivate; ++ ++class PBXFileReference : public PBXReference ++{ ++ Q_OBJECT ++public: ++ explicit PBXFileReference(QObject *parent = 0); ++ virtual ~PBXFileReference(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++private: ++ PBXFileReferencePrivate *d; ++}; ++ ++#endif // PBXFILEREFERENCE_H +diff --git a/src/lib/corelib/generators/xcode/pbxfiletype.cpp b/src/lib/corelib/generators/xcode/pbxfiletype.cpp +new file mode 100644 +index 0000000..4f7b58d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfiletype.cpp +@@ -0,0 +1,51 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfiletype.h" ++ ++PBXFileType::PBXFileType(QObject *parent) : ++ QObject(parent) ++{ ++} ++ ++QString PBXFileType::typeForFileExtension(const QString &fileExtension) ++{ ++ if (fileExtension == QLatin1String("a")) ++ return QLatin1String("archive.ar"); ++ if (fileExtension == QLatin1String("app")) ++ return QLatin1String("wrapper.application"); ++ if (fileExtension == QLatin1String("cpp")) ++ return QLatin1String("sourcecode.cpp.cpp"); ++ if (fileExtension == QLatin1String("dylib")) ++ return QLatin1String("compiled.mach-o.dylib"); ++ if (fileExtension == QLatin1String("h")) ++ return QLatin1String("sourcecode.c.h"); ++ return QString("text"); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxfiletype.h b/src/lib/corelib/generators/xcode/pbxfiletype.h +new file mode 100644 +index 0000000..b289250 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxfiletype.h +@@ -0,0 +1,47 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFILETYPE_H ++#define PBXFILETYPE_H ++ ++#include ++ ++class PBXFileType : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXFileType(QObject *parent = 0); ++ ++ static QStringList allTypes(); ++ static QStringList fileExtensionsForType(const QString &type); ++ static QString typeForFileExtension(const QString &fileExtension); ++}; ++ ++#endif // PBXFILETYPE_H +diff --git a/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp +new file mode 100644 +index 0000000..6b417e7 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.cpp +@@ -0,0 +1,27 @@ ++#include "pbxframeworksbuildphase.h" ++ ++PBXFrameworksBuildPhase::PBXFrameworksBuildPhase(PBXTarget *parent) : ++ PBXBuildPhase(parent) ++{ ++} ++ ++QString PBXFrameworksBuildPhase::name() const ++{ ++ return QLatin1String("Frameworks"); ++} ++ ++QString PBXFrameworksBuildPhase::isa() const ++{ ++ return QLatin1String("PBXFrameworksBuildPhase"); ++} ++ ++PBXObjectMap PBXFrameworksBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXBuildPhase::toMap(); ++ return self; ++} ++ ++QString PBXFrameworksBuildPhase::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h +new file mode 100644 +index 0000000..0553089 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxframeworksbuildphase.h +@@ -0,0 +1,50 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXFRAMEWORKSBUILDPHASE_H ++#define PBXFRAMEWORKSBUILDPHASE_H ++ ++#include "pbxbuildphase.h" ++ ++class PBXFrameworksBuildPhase : public PBXBuildPhase ++{ ++ Q_OBJECT ++public: ++ explicit PBXFrameworksBuildPhase(PBXTarget *parent = 0); ++ ++ QString name() const; ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++}; ++ ++#endif // PBXFRAMEWORKSBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxgroup.cpp b/src/lib/corelib/generators/xcode/pbxgroup.cpp +new file mode 100644 +index 0000000..ea48b22 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxgroup.cpp +@@ -0,0 +1,119 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfilereference.h" ++#include "pbxgroup.h" ++ ++class PBXGroupPrivate ++{ ++public: ++ QList children; ++}; ++ ++PBXGroup::PBXGroup(QObject *parent) : ++ PBXReference(parent), d(new PBXGroupPrivate) ++{ ++} ++ ++PBXGroup::~PBXGroup() ++{ ++ delete d; ++} ++ ++PBXGroup *PBXGroup::groupWithName(const QString &name, PBXGroup *parentGroup) ++{ ++ PBXGroup *group = new PBXGroup(); ++ group->setName(name); ++ ++ if (parentGroup) { ++ group->setParent(parentGroup); ++ parentGroup->addItem(group); ++ } ++ ++ return group; ++} ++ ++QString PBXGroup::isa() const ++{ ++ return QLatin1String("PBXGroup"); ++} ++ ++PBXObjectMap PBXGroup::toMap() const ++{ ++ PBXObjectMap self = PBXReference::toMap(); ++ ++ QVariantList childIdentifiers; ++ foreach (PBXReference *reference, d->children) ++ childIdentifiers += QVariant::fromValue(reference->identifier()); ++ ++ self.insert(QLatin1String("children"), childIdentifiers); ++ ++ return self; ++} ++ ++QList PBXGroup::children() const ++{ ++ return d->children; ++} ++ ++void PBXGroup::addItem(PBXReference *item) ++{ ++ d->children.append(item); ++} ++ ++void PBXGroup::insertItem(PBXReference *item, int index) ++{ ++ d->children.insert(index, item); ++} ++ ++void PBXGroup::removeItem(PBXReference *item) ++{ ++ d->children.removeOne(item); ++} ++ ++QList PBXGroup::addFiles(const QStringList &files, bool copy, bool createGroupsRecursively) ++{ ++ QList fileRefs; ++ foreach (const QString &filePath, files) ++ { ++ PBXFileReference *fileReference = new PBXFileReference(this); ++ fileReference->setPath(filePath); ++ fileReference->setName(filePath.mid(filePath.lastIndexOf('/') + 1)); ++ d->children.append(fileReference); ++ fileRefs.append(fileReference); ++ } ++ ++ return fileRefs; ++} ++ ++QString PBXGroup::comment() const ++{ ++ return !path().isEmpty() ? path() : PBXReference::comment(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxgroup.h b/src/lib/corelib/generators/xcode/pbxgroup.h +new file mode 100644 +index 0000000..e03b8eb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxgroup.h +@@ -0,0 +1,71 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXGROUP_H ++#define PBXGROUP_H ++ ++#include "pbxreference.h" ++ ++class PBXFileReference; ++ ++class PBXGroupPrivate; ++ ++class PBXGroup : public PBXReference ++{ ++ Q_OBJECT ++public: ++ explicit PBXGroup(QObject *parent = 0); ++ virtual ~PBXGroup(); ++ ++ static PBXGroup *groupWithName(const QString &name, PBXGroup *parentGroup = 0); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QList children() const; ++ ++ bool containsItem(PBXReference *item) const; ++ ++ void addItem(PBXReference *item); ++ void insertItem(PBXReference *item, int index); ++ void removeItem(PBXReference *item); ++ ++ /*! ++ * \param files list of absolute paths ++ */ ++ QList addFiles(const QStringList &files, bool copy, bool createGroupsRecursively); ++ ++ QString comment() const; ++ ++private: ++ PBXGroupPrivate *d; ++}; ++ ++#endif // PBXGROUP_H +diff --git a/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp b/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp +new file mode 100644 +index 0000000..7f887b3 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxlegacytarget.cpp +@@ -0,0 +1,111 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfilereference.h" ++#include "pbxlegacytarget.h" ++#include "pbxproject.h" ++ ++class PBXLegacyTargetPrivate ++{ ++public: ++ QString buildToolPath; ++ QString buildArgumentsString; ++ QString buildWorkingDirectory; ++ bool passBuildSettingsInEnvironment; ++}; ++ ++PBXLegacyTarget::PBXLegacyTarget(PBXProject *parent) : ++ PBXTarget(parent), d(new PBXLegacyTargetPrivate) ++{ ++ d->buildToolPath = QLatin1String("/bin/bash"); ++ d->buildArgumentsString = QLatin1String("$(ACTION)"); ++ d->buildWorkingDirectory = QLatin1String("$BUILT_PRODUCTS_DIR"); ++ d->passBuildSettingsInEnvironment = true; ++} ++ ++PBXLegacyTarget::~PBXLegacyTarget() ++{ ++ delete d; ++} ++ ++QString PBXLegacyTarget::isa() const ++{ ++ return QLatin1String("PBXLegacyTarget"); ++} ++ ++PBXObjectMap PBXLegacyTarget::toMap() const ++{ ++ PBXObjectMap self = PBXTarget::toMap(); ++ self.insert(QLatin1String("buildToolPath"), d->buildToolPath); ++ self.insert(QLatin1String("buildArgumentsString"), d->buildArgumentsString); ++ self.insert(QLatin1String("buildWorkingDirectory"), d->buildWorkingDirectory); ++ self.insert(QLatin1String("passBuildSettingsInEnvironment"), d->passBuildSettingsInEnvironment ? 1 : 0); ++ return self; ++} ++ ++QString PBXLegacyTarget::buildToolPath() const ++{ ++ return d->buildToolPath; ++} ++ ++void PBXLegacyTarget::setBuildToolPath(const QString &buildToolPath) ++{ ++ d->buildToolPath = buildToolPath; ++} ++ ++QString PBXLegacyTarget::buildArgumentsString() const ++{ ++ return d->buildArgumentsString; ++} ++ ++void PBXLegacyTarget::setBuildArgumentsString(const QString &buildArgumentsString) ++{ ++ d->buildArgumentsString = buildArgumentsString; ++} ++ ++QString PBXLegacyTarget::buildWorkingDirectory() const ++{ ++ return d->buildWorkingDirectory; ++} ++ ++void PBXLegacyTarget::setBuildWorkingDirectory(const QString &buildWorkingDirectory) ++{ ++ d->buildWorkingDirectory = buildWorkingDirectory; ++} ++ ++bool PBXLegacyTarget::passBuildSettingsInEnvironment() const ++{ ++ return d->passBuildSettingsInEnvironment; ++} ++ ++void PBXLegacyTarget::setPassBuildSettingsInEnvironment(bool passBuildSettingsInEnvironment) ++{ ++ d->passBuildSettingsInEnvironment = passBuildSettingsInEnvironment; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxlegacytarget.h b/src/lib/corelib/generators/xcode/pbxlegacytarget.h +new file mode 100644 +index 0000000..e6b09d4 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxlegacytarget.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXLEGACYTARGET_H ++#define PBXLEGACYTARGET_H ++ ++#include "pbxtarget.h" ++ ++class PBXLegacyTargetPrivate; ++ ++class PBXLegacyTarget : public PBXTarget ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXLegacyTarget) ++public: ++ explicit PBXLegacyTarget(PBXProject *parent = 0); ++ virtual ~PBXLegacyTarget(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString buildToolPath() const; ++ void setBuildToolPath(const QString &buildToolPath); ++ ++ QString buildArgumentsString() const; ++ void setBuildArgumentsString(const QString &buildArgumentsString); ++ ++ QString buildWorkingDirectory() const; ++ void setBuildWorkingDirectory(const QString &buildWorkingDirectory); ++ ++ bool passBuildSettingsInEnvironment() const; ++ void setPassBuildSettingsInEnvironment(bool passBuildSettingsInEnvironment); ++ ++private: ++ PBXLegacyTargetPrivate *d; ++}; ++ ++#endif // PBXLEGACYTARGET_H +diff --git a/src/lib/corelib/generators/xcode/pbxnativetarget.cpp b/src/lib/corelib/generators/xcode/pbxnativetarget.cpp +new file mode 100644 +index 0000000..f9e648c +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxnativetarget.cpp +@@ -0,0 +1,68 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxbuildphase.h" ++#include "pbxfilereference.h" ++#include "pbxnativetarget.h" ++#include "pbxproject.h" ++#include "xcconfigurationlist.h" ++ ++class PBXNativeTargetPrivate ++{ ++public: ++ PBXNativeTargetPrivate(); ++}; ++ ++PBXNativeTargetPrivate::PBXNativeTargetPrivate() ++{ ++} ++ ++PBXNativeTarget::PBXNativeTarget(PBXProject *parent) : ++ PBXTarget(parent), d(new PBXNativeTargetPrivate) ++{ ++} ++ ++PBXNativeTarget::~PBXNativeTarget() ++{ ++ delete d; ++} ++ ++QString PBXNativeTarget::isa() const ++{ ++ return QLatin1String("PBXNativeTarget"); ++} ++ ++PBXObjectMap PBXNativeTarget::toMap() const ++{ ++ PBXObjectMap self = PBXTarget::toMap(); ++ self.insert(QLatin1String("productInstallPath"), QLatin1String("$(HOME)/Applications")); ++ self.insert(QLatin1String("buildRules"), QList()); ++ return self; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxnativetarget.h b/src/lib/corelib/generators/xcode/pbxnativetarget.h +new file mode 100644 +index 0000000..a06b979 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxnativetarget.h +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXNATIVETARGET_H ++#define PBXNATIVETARGET_H ++ ++#include "pbxtarget.h" ++ ++class PBXNativeTargetPrivate; ++ ++class PBXNativeTarget : public PBXTarget ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXNativeTarget) ++public: ++ explicit PBXNativeTarget(PBXProject *parent = 0); ++ ~PBXNativeTarget(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++private: ++ PBXNativeTargetPrivate *d; ++}; ++ ++#endif // PBXNATIVETARGET_H +diff --git a/src/lib/corelib/generators/xcode/pbxobject.cpp b/src/lib/corelib/generators/xcode/pbxobject.cpp +new file mode 100644 +index 0000000..0ea69d6 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxobject.cpp +@@ -0,0 +1,96 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxobject.h" ++#include ++#include ++#include ++#include ++ ++static QMap generatedIdentifiers; ++ ++class PBXObjectPrivate ++{ ++public: ++ QString identifier; ++}; ++ ++PBXObject::PBXObject(QObject *parent) ++ : QObject(parent), d(new PBXObjectPrivate) ++{ ++} ++ ++PBXObject::~PBXObject() ++{ ++ delete d; ++} ++ ++QString PBXObject::createIdentifier(const QByteArray &hashData) ++{ ++ if (qgetenv("QBS_XCODE_GENERATOR_DETERMINISTIC_IDENTIFIERS") == QByteArray("1")) { ++ QCryptographicHash hash(QCryptographicHash::Sha3_512); ++ hash.addData(hashData); ++ const QString result = hash.result().left(12).toHex().toUpper(); ++ if (generatedIdentifiers.contains(result) ++ /*&& generatedIdentifiers.value(result) != hashData*/) { ++ // hash collision! ++ fprintf(stderr, "hash collision %s - %s\n", result.toUtf8().data(), hashData.data()); ++ abort(); ++ } ++ generatedIdentifiers.insert(result, hashData); ++ return result; ++ } ++ ++ return QUuid::createUuid().toByteArray().left(12).toHex().toUpper(); ++} ++ ++PBXObjectIdentifier PBXObject::identifier() const ++{ ++ if (d->identifier.isEmpty()) ++ d->identifier = createIdentifier(isa().toUtf8() + QByteArray(":") + hashData()); ++ return PBXObjectIdentifier(d->identifier, isa(), comment()); ++} ++ ++PBXObjectMap PBXObject::toMap() const ++{ ++ PBXObjectMap self; ++ self.insert(QLatin1String("isa"), isa()); ++ return self; ++} ++ ++QString PBXObject::comment() const ++{ ++ return isa(); ++} ++ ++QByteArray PBXObject::hashData() const ++{ ++ return QByteArray(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxobject.h b/src/lib/corelib/generators/xcode/pbxobject.h +new file mode 100644 +index 0000000..d4ede7e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxobject.h +@@ -0,0 +1,124 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXOBJECT_H ++#define PBXOBJECT_H ++ ++#include ++#include ++#include ++ ++class PBXObjectPrivate; ++ ++class PBXObjectIdentifier { ++public: ++ PBXObjectIdentifier() { ++ } ++ ++ PBXObjectIdentifier(const PBXObjectIdentifier &other) { ++ _key = other._key; ++ _isa = other._isa; ++ _comment = other._comment; ++ } ++ ++ PBXObjectIdentifier(const QLatin1String &identifier, const QString &isa = QString(), const QString &comment = QString()) { ++ _key = identifier; ++ _isa = isa; ++ _comment = comment; ++ } ++ ++ PBXObjectIdentifier(const QString &identifier, const QString &isa = QString(), const QString &comment = QString()) { ++ _key = identifier; ++ _isa = isa; ++ _comment = comment; ++ } ++ ++ QString toString() const { ++ return identifier(); ++ } ++ ++ QString identifier() const { ++ return _key; ++ } ++ ++ QString isa() const { ++ return _isa; ++ } ++ ++ QString comment() const { ++ return _comment; ++ } ++ ++ bool operator==(const PBXObjectIdentifier &other) const { ++ return _key == other._key && _isa == other._isa && _comment == other._comment; ++ } ++ ++ bool operator<(const PBXObjectIdentifier &other) const { ++ return _isa + _key < other._isa + other._key; ++ } ++ ++private: ++ QString _key; ++ QString _isa; ++ QString _comment; ++}; ++ ++Q_DECLARE_METATYPE(PBXObjectIdentifier) ++ ++inline bool qHash(const PBXObjectIdentifier &other) { ++ return qHash(other.toString()); ++} ++ ++typedef QMap PBXObjectMap; ++Q_DECLARE_METATYPE(PBXObjectMap) ++ ++class PBXObject : public QObject ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXObject) ++protected: ++ explicit PBXObject(QObject *parent = 0); ++ ++public: ++ virtual ~PBXObject(); ++ ++ static QString createIdentifier(const QByteArray &hashData); ++ ++ PBXObjectIdentifier identifier() const; ++ virtual QString isa() const = 0; ++ virtual PBXObjectMap toMap() const; ++ virtual QString comment() const; ++ virtual QByteArray hashData() const; ++ ++private: ++ PBXObjectPrivate *d; ++}; ++ ++#endif // PBXOBJECT_H +diff --git a/src/lib/corelib/generators/xcode/pbxproducttype.cpp b/src/lib/corelib/generators/xcode/pbxproducttype.cpp +new file mode 100644 +index 0000000..657b020 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproducttype.cpp +@@ -0,0 +1,75 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxproducttype.h" ++ ++QString PBX::productTypeString(PBX::PBXProductType productType) ++{ ++ switch (productType) ++ { ++ case Application: ++ return QLatin1String("com.apple.product-type.application"); ++ case Tool: ++ return QLatin1String("com.apple.product-type.tool"); ++ case LibraryStatic: ++ return QLatin1String("com.apple.product-type.library.static"); ++ case LibraryDynamic: ++ return QLatin1String("com.apple.product-type.library.dynamic"); ++ case Framework: ++ return QLatin1String("com.apple.product-type.framework"); ++ case StaticFramework: ++ return QLatin1String("com.apple.product-type.framework.static"); ++ case Bundle: ++ return QLatin1String("com.apple.product-type.bundle"); ++ case KernelExtension: ++ return QLatin1String("com.apple.product-type.kernel-extension"); ++ case KernelExtensionIOKit: ++ return QLatin1String("com.apple.product-type.kernel-extension.iokit"); ++ } ++ ++ QLatin1String("com.apple.product-type.application.java"); ++ QLatin1String("com.apple.product-type.application.shallow"); ++ QLatin1String("com.apple.product-type.app-extension"); ++ QLatin1String("com.apple.product-type.bundle.shallow"); ++ QLatin1String("com.apple.product-type.bundle.unit-test"); ++ QLatin1String("com.apple.product-type.bundle.ocunit-test"); ++ QLatin1String("com.apple.product-type.framework.shallow"); ++ QLatin1String("com.apple.product-type.in-app-purchase-content"); ++ QLatin1String("com.apple.product-type.kernel-extension.shallow"); ++ QLatin1String("com.apple.product-type.kernel-extension.iokit.shallow"); ++ QLatin1String("com.apple.product-type.library.java.archive"); ++ QLatin1String("com.apple.product-type.objfile"); ++ QLatin1String("com.apple.product-type.pluginkit-plugin"); ++ QLatin1String("com.apple.product-type.spotlight-importer"); ++ QLatin1String("com.apple.product-type.tool.java"); ++ QLatin1String("com.apple.product-type.xpc-service"); ++ ++ return QString(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxproducttype.h b/src/lib/corelib/generators/xcode/pbxproducttype.h +new file mode 100644 +index 0000000..cf2e48e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproducttype.h +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXPRODUCTTYPE_H ++#define PBXPRODUCTTYPE_H ++ ++#include ++ ++namespace PBX ++{ ++ typedef enum { ++ Application = 1, ++ Tool, ++ LibraryStatic, ++ LibraryDynamic, ++ Framework, ++ StaticFramework, ++ Bundle, ++ KernelExtension, ++ KernelExtensionIOKit ++ } PBXProductType; ++ ++ QString productTypeString(PBXProductType productType); ++} ++ ++#endif // PBXPRODUCTTYPE_H +diff --git a/src/lib/corelib/generators/xcode/pbxproject.cpp b/src/lib/corelib/generators/xcode/pbxproject.cpp +new file mode 100644 +index 0000000..3ab709c +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproject.cpp +@@ -0,0 +1,333 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "opensteppropertylist.h" ++#include "pbxbuildphase.h" ++#include "pbxbuildfile.h" ++#include "pbxcontaineritemproxy.h" ++#include "pbxgroup.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++#include ++#include ++#include ++ ++static const QString kClassPrefixAttribute = QLatin1String("CLASSPREFIX"); ++static const QString kLastUpgradeCheckAttribute = QLatin1String("LastUpgradeCheck"); ++static const QString kOrganizationNameAttribute = QLatin1String("ORGANIZATIONNAME"); ++static const QString kTargetAttributesAttribute = QLatin1String("TargetAttributes"); ++ ++class PBXProjectPrivate ++{ ++public: ++ QString name; ++ QString projectAbsolutePath; ++ QString projectDirPath; ++ PBXGroup *frameworksRefGroup; ++ PBXGroup *productRefGroup; ++ QList targets; ++ XCConfigurationList *configurationList; ++ QVariantMap attributes; ++}; ++ ++PBXProject::PBXProject(const QString &projectAbsolutePath, QObject *parent) : ++ PBXContainer(parent), d(new PBXProjectPrivate) ++{ ++ d->projectAbsolutePath = projectAbsolutePath; ++ d->configurationList = new XCConfigurationList(this); ++ ++ d->frameworksRefGroup = new PBXGroup(rootGroup()); ++ d->frameworksRefGroup->setName(QLatin1String("Frameworks")); ++ ++ d->productRefGroup = new PBXGroup(rootGroup()); ++ d->productRefGroup->setName(QLatin1String("Products")); ++ d->productRefGroup->setSourceTree(PBX::Group); ++} ++ ++PBXProject::~PBXProject() ++{ ++ delete d; ++} ++ ++QString PBXProject::isa() const ++{ ++ return QLatin1String("PBXProject"); ++} ++ ++PBXObjectMap PBXProject::toMap() const ++{ ++ // HACK: Make sure "Frameworks", "Products" groups are always at the bottom ++ rootGroup()->removeItem(d->frameworksRefGroup); ++ rootGroup()->removeItem(d->productRefGroup); ++ rootGroup()->addItem(d->frameworksRefGroup); ++ rootGroup()->addItem(d->productRefGroup); ++ ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("attributes"), d->attributes); ++ self.insert(QLatin1String("buildConfigurationList"), QVariant::fromValue(buildConfigurationList()->identifier())); ++ self.insert(QLatin1String("compatibilityVersion"), QLatin1String("Xcode 3.2")); ++ self.insert(QLatin1String("developmentRegion"), QLatin1String("English")); ++ self.insert(QLatin1String("hasScannedForEncodings"), QLatin1String("1")); ++ self.insert(QLatin1String("knownRegions"), QStringList() << QLatin1String("en")); ++ self.insert(QLatin1String("mainGroup"), QVariant::fromValue(rootGroup()->identifier())); ++ self.insert(QLatin1String("productRefGroup"), QVariant::fromValue(productRefGroup()->identifier())); ++ self.insert(QLatin1String("projectDirPath"), d->projectDirPath); ++ //self.insert(QLatin1String("projectReferences"), QVariantList()); // array of map { ProductGroup:, ProjectRef: }? ++ self.insert(QLatin1String("projectRoot"), QLatin1String("")); ++ ++ QVariantList targetIdentifiers; ++ foreach (PBXTarget *target, targets()) ++ targetIdentifiers += QVariant::fromValue(target->identifier()); ++ self.insert(QLatin1String("targets"), targetIdentifiers); ++ ++ return self; ++} ++ ++QString PBXProject::comment() const ++{ ++ return QLatin1String("Project object"); ++} ++ ++QByteArray PBXProject::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ data.append(d->name); ++ return data; ++} ++ ++PBXGroup *PBXProject::productRefGroup() const ++{ ++ return d->productRefGroup; ++} ++ ++PBXGroup *PBXProject::frameworksRefGroup() const ++{ ++ return d->frameworksRefGroup; ++} ++ ++QList PBXProject::targets() const ++{ ++ return d->targets; ++} ++ ++PBXTarget *PBXProject::targetNamed(const QString &targetName) const ++{ ++ foreach (PBXTarget *target, d->targets) ++ { ++ if (target->name() == targetName) ++ return target; ++ } ++ ++ return NULL; ++} ++ ++void PBXProject::addTarget(PBXTarget *target) ++{ ++ d->targets.append(target); ++} ++ ++QString PBXProject::name() const ++{ ++ return d->name; ++} ++ ++void PBXProject::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QVariantMap PBXProject::attributes() const ++{ ++ return d->attributes; ++} ++ ++void PBXProject::setAttributes(const QVariantMap &attributes) ++{ ++ d->attributes = attributes; ++} ++ ++QVariant PBXProject::attribute(const QString &name) const ++{ ++ return d->attributes[name]; ++} ++ ++void PBXProject::setAttribute(const QString &name, const QVariant &value) ++{ ++ d->attributes[name] = value; ++} ++ ++void PBXProject::removeAttribute(const QString &name) ++{ ++ d->attributes.remove(name); ++} ++ ++PBXProject::Version PBXProject::lastUpgradeCheck() const ++{ ++ const QString s = d->attributes[kLastUpgradeCheckAttribute].toString().mid(0, 3); ++ Version v; ++ v.major = s.left(2).toInt(); ++ v.minor = s.right(1).toInt(); ++ return v; ++} ++ ++void PBXProject::setLastUpgradeCheck(const PBXProject::Version &version) ++{ ++ const int major = qBound(0, version.major, 99); ++ const int minor = qBound(0, version.minor, 9); ++ d->attributes[kLastUpgradeCheckAttribute] = ++ QString::number(major).rightJustified(2, QLatin1Char('0')) + ++ QString::number(minor).leftJustified(2, QLatin1Char('0')); ++} ++ ++QString PBXProject::classPrefix() const ++{ ++ return d->attributes[kClassPrefixAttribute].toString(); ++} ++ ++void PBXProject::setClassPrefix(const QString &classPrefix) ++{ ++ d->attributes[kClassPrefixAttribute] = classPrefix; ++} ++ ++QString PBXProject::organizationName() const ++{ ++ return d->attributes[kOrganizationNameAttribute].toString(); ++} ++ ++void PBXProject::setOrganizationName(const QString &organizationName) ++{ ++ d->attributes[kOrganizationNameAttribute] = organizationName; ++} ++ ++QString PBXProject::projectWrapperPath() const ++{ ++ return QFileInfo(d->projectAbsolutePath).absolutePath(); ++} ++ ++QString PBXProject::projectDirPath() const ++{ ++ return d->projectDirPath; ++} ++ ++void PBXProject::setProjectDirPath(const QString &projectDirPath) ++{ ++ d->projectDirPath = projectDirPath; ++} ++ ++void PBXProject::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ configuration->setBuildSetting(key, value); ++} ++ ++XCConfigurationList *PBXProject::buildConfigurationList() const ++{ ++ return d->configurationList; ++} ++ ++static void writeGroup(PBXObjectMap &objects, PBXGroup *group) ++{ ++ objects.insert(group->identifier(), QVariant::fromValue(group->toMap())); ++ foreach (PBXReference *child, group->children()) ++ { ++ if (PBXGroup *group = dynamic_cast(child)) ++ writeGroup(objects, group); ++ else ++ objects.insert(child->identifier(), QVariant::fromValue(child->toMap())); ++ } ++} ++ ++bool PBXProject::writeToFileSystemProjectFile(bool projectWrite, bool userWrite, bool checkNeedsRevert) ++{ ++ PBXObjectMap objects; ++ objects.insert(identifier(), QVariant::fromValue(toMap())); ++ ++ // Add the project's root group (i.e. the root node in the file tree which contains everything) ++ writeGroup(objects, rootGroup()); ++ ++ // Add the project's build configuration list and build configurations to the object map ++ objects.insert(d->configurationList->identifier(), QVariant::fromValue(d->configurationList->toMap())); ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ objects.insert(configuration->identifier(), QVariant::fromValue(configuration->toMap())); ++ ++ // Add the build targets to the object map ++ foreach (PBXTarget *target, targets()) ++ { ++ objects.insert(target->identifier(), QVariant::fromValue(target->toMap())); ++ ++ // Add the target's build configuration list and build configurations to the object map ++ objects.insert(target->buildConfigurationList()->identifier(), QVariant::fromValue(target->buildConfigurationList()->toMap())); ++ foreach (XCBuildConfiguration *configuration, target->buildConfigurationList()->buildConfigurations()) ++ objects.insert(configuration->identifier(), QVariant::fromValue(configuration->toMap())); ++ ++ // Add the target's dependency objects to the object map ++ foreach (PBXTargetDependency *dependency, target->targetDependencies()) { ++ objects.insert(dependency->identifier(), QVariant::fromValue(dependency->toMap())); ++ ++ if (dependency->targetProxy()) { ++ objects.insert(dependency->targetProxy()->identifier(), QVariant::fromValue(dependency->targetProxy()->toMap())); ++ } ++ } ++ ++ // Add the target's build phases... ++ foreach (PBXBuildPhase *buildPhase, target->buildPhases()) ++ { ++ objects.insert(buildPhase->identifier(), QVariant::fromValue(buildPhase->toMap())); ++ ++ // And each of the files within ++ foreach (PBXBuildFile *buildFile, buildPhase->buildFiles()) ++ { ++ objects.insert(buildFile->identifier(), QVariant::fromValue(buildFile->toMap())); ++ } ++ } ++ } ++ ++ // add all subobjects to objects map! ++ ++ // Build the root pbxproj object map ++ PBXObjectMap map; ++ map.insert(QLatin1String("archiveVersion"), QLatin1String("1")); ++ map.insert(QLatin1String("classes"), QVariantMap()); ++ map.insert(QLatin1String("objectVersion"), QLatin1String("46")); ++ map.insert(QLatin1String("objects"), QVariant::fromValue(objects)); ++ map.insert(QLatin1String("rootObject"), QVariant::fromValue(identifier())); ++ ++ QFile file(d->projectAbsolutePath); ++ if (file.open(QIODevice::WriteOnly)) ++ { ++ file.write(QByteArray("// !$*UTF8*$!\n")); ++ file.write(OpenStepPropertyList::toString(map).toUtf8()); ++ } ++ ++ return file.error() == QFile::NoError; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxproject.h b/src/lib/corelib/generators/xcode/pbxproject.h +new file mode 100644 +index 0000000..7a2ed88 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxproject.h +@@ -0,0 +1,114 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXPROJECT_H ++#define PBXPROJECT_H ++ ++#include "pbxcontainer.h" ++ ++class PBXTarget; ++class XCConfigurationList; ++ ++class PBXProjectPrivate; ++ ++class PBXProject : public PBXContainer ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXProject) ++public: ++ typedef struct { ++ int major; ++ int minor; ++ } Version; ++ ++ explicit PBXProject(const QString &projectAbsolutePath, QObject *parent = 0); ++ ~PBXProject(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++ PBXGroup *frameworksRefGroup() const; ++ ++ /*! ++ * Group in the root of the Xcode file tree which contains references to product target files. ++ * ++ * For example, this will contain references to output application and library executables. ++ */ ++ PBXGroup *productRefGroup() const; ++ ++ static bool isProjectWrapperExtension(const QString &extension); ++ static PBXProject *projectWithFile(const QString &projectAbsolutePath); ++ ++ QList targets() const; ++ PBXTarget *targetNamed(const QString &targetName) const; ++ ++ void addTarget(PBXTarget *target); ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ QVariantMap attributes() const; ++ void setAttributes(const QVariantMap &attributes); ++ ++ QVariant attribute(const QString &name) const; ++ void setAttribute(const QString &name, const QVariant &value); ++ void removeAttribute(const QString &name); ++ ++ Version lastUpgradeCheck() const; ++ void setLastUpgradeCheck(const Version &version); ++ ++ QString classPrefix() const; ++ void setClassPrefix(const QString &classPrefix); ++ ++ QString organizationName() const; ++ void setOrganizationName(const QString &organizationName); ++ ++ /*! ++ * Returns the path of the .xcodeproj wrapper directory. ++ */ ++ QString projectWrapperPath() const; ++ ++ QString projectDirPath() const; ++ void setProjectDirPath(const QString &projectDirPath); ++ ++ void setBuildSetting(const QString &key, const QVariant &value); ++ ++ XCConfigurationList *buildConfigurationList() const; ++ bool writeToFileSystemProjectFile(bool projectWrite, bool userWrite, bool checkNeedsRevert); ++ ++private: ++ PBXProjectPrivate *d; ++}; ++ ++#endif // PBXPROJECT_H +diff --git a/src/lib/corelib/generators/xcode/pbxreference.cpp b/src/lib/corelib/generators/xcode/pbxreference.cpp +new file mode 100644 +index 0000000..651f6fe +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxreference.cpp +@@ -0,0 +1,127 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxreference.h" ++ ++class PBXReferencePrivate ++{ ++public: ++ PBXReferencePrivate(); ++ QString name; ++ QString path; ++ PBX::PBXSourceTree sourceTree; ++}; ++ ++PBXReferencePrivate::PBXReferencePrivate() ++ : name(), sourceTree() ++{ ++} ++ ++PBXReference::PBXReference(QObject *parent) : ++ PBXObject(parent), d(new PBXReferencePrivate) ++{ ++} ++ ++PBXReference::~PBXReference() ++{ ++ delete d; ++} ++ ++PBXObjectMap PBXReference::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ ++ if (!name().isEmpty() && name() != path()) { ++ self.insert(QLatin1String("name"), name()); ++ } ++ ++ // Xcode crashes if path is empty, even though it should never be ++ if (!d->path.isEmpty()) ++ self.insert(QLatin1String("path"), d->path); // relative path including the file name ++ ++ self.insert(QLatin1String("sourceTree"), PBX::sourceTreeString(sourceTree())); ++ return self; ++} ++ ++/*! ++ * \brief PBXReference::name ++ * \return display name of file or group, usually the same as the name of the file or directory. ++ */ ++QString PBXReference::name() const ++{ ++ return d->name; ++} ++ ++void PBXReference::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QString PBXReference::path() const ++{ ++ return d->path; ++} ++ ++void PBXReference::setPath(const QString &filePath) ++{ ++ d->path = filePath; ++} ++ ++PBX::PBXSourceTree PBXReference::sourceTree() const ++{ ++ return d->sourceTree; ++} ++ ++void PBXReference::setSourceTree(PBX::PBXSourceTree sourceTree) ++{ ++ d->sourceTree = sourceTree; ++} ++ ++QString PBXReference::comment() const ++{ ++ return name(); ++} ++ ++QByteArray PBXReference::hashData() const ++{ ++ QByteArray data = PBXObject::hashData(); ++ if (!d->path.isEmpty()) { ++ QStringList pathComponents; ++ const PBXReference *ref = this; ++ do { ++ pathComponents.insert(0, ref->path().toUtf8()); ++ } while ((ref = dynamic_cast(ref->parent()))); ++ ++ data.append(pathComponents.join("/").toUtf8()); ++ } else if (!d->name.isEmpty()) { ++ data.append(d->name.toUtf8()); ++ } ++ return data; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxreference.h b/src/lib/corelib/generators/xcode/pbxreference.h +new file mode 100644 +index 0000000..3400a25 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxreference.h +@@ -0,0 +1,72 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXREFERENCE_H ++#define PBXREFERENCE_H ++ ++#include "pbxobject.h" ++#include "pbxsourcetree.h" ++#include ++ ++class PBXReferencePrivate; ++ ++// Mono calls this PBXFileElement? ++class PBXReference : public PBXObject ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXReference) ++protected: ++ explicit PBXReference(QObject *parent = 0); ++ virtual ~PBXReference(); ++ ++public: ++ PBXObjectMap toMap() const; ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ /*! ++ * File path of the referenced file, relative based on the value of \a sourceTree. ++ */ ++ QString path() const; ++ void setPath(const QString &path); ++ ++ PBX::PBXSourceTree sourceTree() const; ++ void setSourceTree(PBX::PBXSourceTree sourceTree); ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++private: ++ PBXReferencePrivate *d; ++}; ++ ++#endif // PBXREFERENCE_H +diff --git a/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp +new file mode 100644 +index 0000000..902d05d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.cpp +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxsourcesbuildphase.h" ++ ++PBXSourcesBuildPhase::PBXSourcesBuildPhase(PBXTarget *parent) : ++ PBXBuildPhase(parent) ++{ ++} ++ ++QString PBXSourcesBuildPhase::name() const ++{ ++ return QLatin1String("Sources"); ++} ++ ++QString PBXSourcesBuildPhase::isa() const ++{ ++ return QLatin1String("PBXSourcesBuildPhase"); ++} ++ ++PBXObjectMap PBXSourcesBuildPhase::toMap() const ++{ ++ PBXObjectMap self = PBXBuildPhase::toMap(); ++ return self; ++} ++ ++QString PBXSourcesBuildPhase::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h +new file mode 100644 +index 0000000..e841720 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcesbuildphase.h +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXSOURCESBUILDPHASE_H ++#define PBXSOURCESBUILDPHASE_H ++ ++#include "pbxbuildphase.h" ++ ++/*! ++ * \brief The PBXSourcesBuildPhase class represents the build phase in which source files are compiled. ++ */ ++class PBXSourcesBuildPhase : public PBXBuildPhase ++{ ++ Q_OBJECT ++public: ++ explicit PBXSourcesBuildPhase(PBXTarget *parent = 0); ++ ++ QString name() const; ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++}; ++ ++#endif // PBXSOURCESBUILDPHASE_H +diff --git a/src/lib/corelib/generators/xcode/pbxsourcetree.cpp b/src/lib/corelib/generators/xcode/pbxsourcetree.cpp +new file mode 100644 +index 0000000..d2163aa +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcetree.cpp +@@ -0,0 +1,50 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxsourcetree.h" ++ ++QString PBX::sourceTreeString(PBX::PBXSourceTree tree) ++{ ++ switch (tree) ++ { ++ case Absolute: ++ return QLatin1String(""); ++ case Group: ++ return QLatin1String(""); ++ case SourceRoot: ++ return QLatin1String("SOURCE_ROOT"); ++ case BuildProductDir: ++ return QLatin1String("BUILT_PRODUCTS_DIR"); ++ case SdkRoot: ++ return QLatin1String("SDKROOT"); ++ } ++ ++ return QString(); ++} +diff --git a/src/lib/corelib/generators/xcode/pbxsourcetree.h b/src/lib/corelib/generators/xcode/pbxsourcetree.h +new file mode 100644 +index 0000000..f5252eb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxsourcetree.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXSOURCETREE_H ++#define PBXSOURCETREE_H ++ ++#include ++ ++namespace PBX ++{ ++ /*! ++ * Location that the file reference's path is relative to. ++ */ ++ typedef enum { ++ Absolute, ++ Group, ++ SourceRoot, ++ BuildProductDir, ++ SdkRoot ++ } PBXSourceTree; ++ ++ QString sourceTreeString(PBXSourceTree tree); ++} ++ ++#endif // PBXSOURCETREE_H +diff --git a/src/lib/corelib/generators/xcode/pbxtarget.cpp b/src/lib/corelib/generators/xcode/pbxtarget.cpp +new file mode 100644 +index 0000000..03f4407 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtarget.cpp +@@ -0,0 +1,192 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxfilereference.h" ++#include "pbxframeworksbuildphase.h" ++#include "pbxproject.h" ++#include "pbxsourcesbuildphase.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++ ++class PBXTargetPrivate ++{ ++public: ++ PBXTargetPrivate(); ++ QString name; ++ QString productName; ++ PBX::PBXProductType productType; ++ XCConfigurationList *configurationList; ++ PBXFrameworksBuildPhase *frameworksBuildPhase; ++ PBXSourcesBuildPhase *sourcesBuildPhase; ++ PBXFileReference *productReference; ++ QList targetDependencies; ++}; ++ ++PBXTargetPrivate::PBXTargetPrivate() ++ : name(), productType(), configurationList(), sourcesBuildPhase(), productReference(), targetDependencies() ++{ ++} ++ ++PBXTarget::PBXTarget(PBXProject *parent) : ++ PBXObject(parent), d(new PBXTargetPrivate) ++{ ++ d->configurationList = new XCConfigurationList(this); ++ d->frameworksBuildPhase = new PBXFrameworksBuildPhase(this); ++ d->sourcesBuildPhase = new PBXSourcesBuildPhase(this); ++} ++ ++PBXTarget::~PBXTarget() ++{ ++ delete d; ++} ++ ++PBXObjectMap PBXTarget::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ self.insert(QLatin1String("name"), name()); ++ self.insert(QLatin1String("productName"), productName()); ++ self.insert(QLatin1String("productType"), PBX::productTypeString(d->productType)); ++ ++ self.insert(QLatin1String("buildConfigurationList"), QVariant::fromValue(buildConfigurationList()->identifier())); ++ ++ QVariantList buildPhaseReferences; ++ foreach (PBXBuildPhase *buildPhase, buildPhases()) ++ buildPhaseReferences += QVariant::fromValue(buildPhase->identifier()); ++ self.insert(QLatin1String("buildPhases"), buildPhaseReferences); ++ ++ QVariantList targetDependencyReferences; ++ foreach (PBXTargetDependency *dependency, d->targetDependencies) ++ targetDependencyReferences += QVariant::fromValue(dependency->identifier()); ++ self.insert(QLatin1String("dependencies"), targetDependencyReferences); ++ ++ if (d->productReference) ++ self.insert(QLatin1String("productReference"), QVariant::fromValue(d->productReference->identifier())); ++ ++ return self; ++} ++ ++QString PBXTarget::name() const ++{ ++ return d->name; ++} ++ ++void PBXTarget::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QString PBXTarget::productName() const ++{ ++ return d->productName; ++} ++ ++void PBXTarget::setProductName(const QString &productName) ++{ ++ d->productName = productName; ++} ++ ++PBX::PBXProductType PBXTarget::productType() const ++{ ++ return d->productType; ++} ++ ++void PBXTarget::setProductType(PBX::PBXProductType productType) ++{ ++ d->productType = productType; ++} ++ ++XCConfigurationList *PBXTarget::buildConfigurationList() const ++{ ++ return d->configurationList; ++} ++ ++QList &PBXTarget::targetDependencies() const ++{ ++ return d->targetDependencies; ++} ++ ++QVariant PBXTarget::buildSetting(const QString &key, const QString &buildConfigurationName) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) { ++ if (configuration->name() == buildConfigurationName) { ++ return configuration->buildSetting(key); ++ } ++ } ++ ++ return QVariant(); ++} ++ ++void PBXTarget::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ foreach (XCBuildConfiguration *configuration, d->configurationList->buildConfigurations()) ++ configuration->setBuildSetting(key, value); ++} ++ ++QList PBXTarget::buildPhases() const ++{ ++ QList phases; ++ phases.append(d->frameworksBuildPhase); ++ phases.append(d->sourcesBuildPhase); ++ return phases; ++} ++ ++PBXBuildPhase *PBXTarget::defaultFrameworksBuildPhase() ++{ ++ return d->frameworksBuildPhase; ++} ++ ++PBXBuildPhase *PBXTarget::defaultSourceCodeBuildPhase() ++{ ++ return d->sourcesBuildPhase; ++} ++ ++QString PBXTarget::comment() const ++{ ++ return name(); ++} ++ ++QByteArray PBXTarget::hashData() const ++{ ++ QByteArray hashData = PBXObject::hashData(); ++ hashData.append(d->name.toUtf8()); ++ return hashData; ++} ++ ++PBXFileReference *PBXTarget::productReference() const ++{ ++ return d->productReference; ++} ++ ++void PBXTarget::setProductReference(PBXFileReference *productReference) ++{ ++ d->productReference = productReference; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxtarget.h b/src/lib/corelib/generators/xcode/pbxtarget.h +new file mode 100644 +index 0000000..e915481 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtarget.h +@@ -0,0 +1,100 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXTARGET_H ++#define PBXTARGET_H ++ ++#include "pbxobject.h" ++#include "pbxproducttype.h" ++#include ++ ++class PBXBuildPhase; ++class PBXFileReference; ++class PBXProject; ++class PBXTargetDependency; ++class XCConfigurationList; ++ ++class PBXTargetPrivate; ++ ++class PBXTarget : public PBXObject ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(PBXTarget) ++public: ++ explicit PBXTarget(PBXProject *parent = 0); ++ ~PBXTarget(); ++ ++ PBXObjectMap toMap() const; ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ QString productName() const; ++ void setProductName(const QString &productName); ++ ++ PBX::PBXProductType productType() const; ++ void setProductType(PBX::PBXProductType productType); ++ ++ /*! ++ * File reference to the target's output file. ++ */ ++ PBXFileReference *productReference() const; ++ void setProductReference(PBXFileReference *productReference); ++ ++ /*! ++ * List of the target's build configurations. This is never NULL. ++ */ ++ XCConfigurationList *buildConfigurationList() const; ++ ++ QList &targetDependencies() const; ++ ++ QString expandedValue(const QString &string, void *buildParameters) const; ++ ++ QVariant buildSetting(const QString &key, const QString &buildConfigurationName); ++ void setBuildSetting(const QString &key, const QVariant &value); ++ ++ QList buildPhases() const; ++ PBXBuildPhase *buildPhaseOfClass(void *clazz) const; ++ void addBuildPhase(PBXBuildPhase *buildPhase); ++ PBXBuildPhase *defaultFrameworksBuildPhase(); ++ PBXBuildPhase *defaultLinkBuildPhase(); ++ PBXBuildPhase *defaultSourceCodeBuildPhase(); ++ PBXBuildPhase *defaultResourceBuildPhase(); ++ PBXBuildPhase *defaultHeaderBuildPhase(); ++ ++ QString comment() const; ++ ++ QByteArray hashData() const; ++ ++private: ++ PBXTargetPrivate *d; ++}; ++ ++#endif // PBXTARGET_H +diff --git a/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp b/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp +new file mode 100644 +index 0000000..2eedcd6 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtargetdependency.cpp +@@ -0,0 +1,99 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxcontaineritemproxy.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "pbxtargetdependency.h" ++ ++class PBXTargetDependencyPrivate ++{ ++public: ++ PBXTargetDependencyPrivate(); ++ PBXContainerItemProxy *targetProxy; ++}; ++ ++PBXTargetDependencyPrivate::PBXTargetDependencyPrivate() ++ : targetProxy() ++{ ++} ++ ++PBXTargetDependency::PBXTargetDependency(PBXProject *parent) ++ : PBXObject(parent), d(new PBXTargetDependencyPrivate) ++{ ++ d->targetProxy = new PBXContainerItemProxy(this); ++ d->targetProxy->setContainerPortal(parent); ++} ++ ++PBXTargetDependency::~PBXTargetDependency() ++{ ++ delete d; ++} ++ ++QString PBXTargetDependency::isa() const ++{ ++ return QLatin1String("PBXTargetDependency"); ++} ++ ++PBXObjectMap PBXTargetDependency::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->targetProxy) { ++ self.insert(QLatin1String("targetProxy"), QVariant::fromValue(d->targetProxy->identifier())); ++ if (d->targetProxy->target()) ++ self.insert(QLatin1String("target"), QVariant::fromValue(d->targetProxy->target()->identifier())); ++ } ++ return self; ++} ++ ++QString PBXTargetDependency::comment() const ++{ ++ return PBXObject::comment(); ++} ++ ++PBXTarget *PBXTargetDependency::target() const ++{ ++ return d->targetProxy->target(); ++} ++ ++void PBXTargetDependency::setTarget(PBXTarget *target) ++{ ++ d->targetProxy->setTarget(target); ++} ++ ++PBXContainerItemProxy *PBXTargetDependency::targetProxy() const ++{ ++ return d->targetProxy; ++} ++ ++void PBXTargetDependency::setTargetProxy(PBXContainerItemProxy *targetProxy) ++{ ++ d->targetProxy = targetProxy; ++} +diff --git a/src/lib/corelib/generators/xcode/pbxtargetdependency.h b/src/lib/corelib/generators/xcode/pbxtargetdependency.h +new file mode 100644 +index 0000000..7a146cb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/pbxtargetdependency.h +@@ -0,0 +1,65 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef PBXTARGETDEPENDENCY_H ++#define PBXTARGETDEPENDENCY_H ++ ++#include "pbxobject.h" ++ ++class PBXContainerItemProxy; ++class PBXProject; ++class PBXTarget; ++class PBXTargetDependencyPrivate; ++ ++class PBXTargetDependency : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit PBXTargetDependency(PBXProject *parent = 0); ++ virtual ~PBXTargetDependency(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString comment() const; ++ ++ // http://www.monobjc.net/xcode-project-file-format.html claims ++ // this is a PBXNativeTarget but Xcode says "legacy" (shell script) targets work too... ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++ PBXContainerItemProxy *targetProxy() const; ++ void setTargetProxy(PBXContainerItemProxy *targetProxy); ++ ++private: ++ PBXTargetDependencyPrivate *d; ++}; ++ ++#endif // PBXTARGETDEPENDENCY_H +diff --git a/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp b/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp +new file mode 100644 +index 0000000..541b503 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcbuildconfiguration.cpp +@@ -0,0 +1,92 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++ ++class XCBuildConfigurationPrivate ++{ ++public: ++ QString name; ++ QVariantMap buildSettings; ++ XCBuildConfiguration *baseConfiguration; ++}; ++ ++XCBuildConfiguration::XCBuildConfiguration(XCConfigurationList *parent) : ++ PBXObject(parent), d(new XCBuildConfigurationPrivate) ++{ ++ d->baseConfiguration = 0; ++} ++ ++XCBuildConfiguration::~XCBuildConfiguration() ++{ ++ delete d; ++} ++ ++QString XCBuildConfiguration::isa() const ++{ ++ return QLatin1String("XCBuildConfiguration"); ++} ++ ++PBXObjectMap XCBuildConfiguration::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ if (d->baseConfiguration) { ++ self.insert(QLatin1String("baseConfigurationReference"), QVariant::fromValue(d->baseConfiguration->identifier())); ++ } ++ self.insert(QLatin1String("buildSettings"), d->buildSettings); ++ self.insert(QLatin1String("name"), d->name); ++ return self; ++} ++ ++QString XCBuildConfiguration::name() const ++{ ++ return d->name; ++} ++ ++void XCBuildConfiguration::setName(const QString &name) ++{ ++ d->name = name; ++} ++ ++QVariant XCBuildConfiguration::buildSetting(const QString &key) ++{ ++ return d->buildSettings.value(key); ++} ++ ++void XCBuildConfiguration::setBuildSetting(const QString &key, const QVariant &value) ++{ ++ d->buildSettings.insert(key, value); ++} ++ ++QString XCBuildConfiguration::comment() const ++{ ++ return name(); ++} +diff --git a/src/lib/corelib/generators/xcode/xcbuildconfiguration.h b/src/lib/corelib/generators/xcode/xcbuildconfiguration.h +new file mode 100644 +index 0000000..115a88c +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcbuildconfiguration.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCBUILDCONFIGURATION_H ++#define XCBUILDCONFIGURATION_H ++ ++#include "pbxobject.h" ++#include ++ ++class PBXFileReference; ++class XCConfigurationList; ++ ++class XCBuildConfigurationPrivate; ++ ++class XCBuildConfiguration : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit XCBuildConfiguration(XCConfigurationList *parent = 0); ++ ~XCBuildConfiguration(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QString name() const; ++ void setName(const QString &name); ++ ++ static bool isValidBaseConfigurationFile(PBXFileReference *reference); ++ ++ void setBaseConfigurationReference(PBXFileReference *reference); ++ PBXFileReference *baseConfigurationReference(); ++ ++ QVariant buildSetting(const QString &key); ++ void setBuildSetting(const QString &key, const QVariant &value); ++ ++ QString comment() const; ++ ++private: ++ XCBuildConfigurationPrivate *d; ++}; ++ ++#endif // XCBUILDCONFIGURATION_H +diff --git a/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp b/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp +new file mode 100644 +index 0000000..54d2d39 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcconfigurationlist.cpp +@@ -0,0 +1,147 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "xcbuildconfiguration.h" ++#include "xcconfigurationlist.h" ++ ++class XCConfigurationListPrivate ++{ ++public: ++ XCConfigurationListPrivate(); ++ QList buildConfigurations; ++ XCBuildConfiguration *defaultBuildConfiguration; ++}; ++ ++XCConfigurationListPrivate::XCConfigurationListPrivate() ++ : buildConfigurations(), defaultBuildConfiguration() ++{ ++} ++ ++XCConfigurationList::XCConfigurationList(PBXObject *parent) : ++ PBXObject(parent), d(new XCConfigurationListPrivate) ++{ ++} ++ ++XCConfigurationList::~XCConfigurationList() ++{ ++ delete d; ++} ++ ++QString XCConfigurationList::isa() const ++{ ++ return QLatin1String("XCConfigurationList"); ++} ++ ++PBXObjectMap XCConfigurationList::toMap() const ++{ ++ PBXObjectMap self = PBXObject::toMap(); ++ ++ QVariantList buildConfigurationReferences; ++ foreach (XCBuildConfiguration *configuration, buildConfigurations()) ++ buildConfigurationReferences += QVariant::fromValue(configuration->identifier()); ++ self.insert(QLatin1String("buildConfigurations"), buildConfigurationReferences); ++ ++ if (d->defaultBuildConfiguration) ++ { ++ self.insert(QLatin1String("defaultConfigurationIsVisible"), 0); ++ self.insert(QLatin1String("defaultConfigurationName"), d->defaultBuildConfiguration->name()); ++ } ++ ++ return self; ++} ++ ++QList XCConfigurationList::buildConfigurations() const ++{ ++ return d->buildConfigurations; ++} ++ ++XCBuildConfiguration *XCConfigurationList::addBuildConfiguration(const QString &name) ++{ ++ foreach (XCBuildConfiguration *config, d->buildConfigurations) { ++ if (config->name() == name) ++ return config; ++ } ++ ++ XCBuildConfiguration *buildConfiguration = new XCBuildConfiguration(); ++ buildConfiguration->setName(name); ++ d->buildConfigurations.append(buildConfiguration); ++ return buildConfiguration; ++} ++ ++void XCConfigurationList::removeBuildConfiguration(const QString &name) ++{ ++ for (int i = 0; i < d->buildConfigurations.size(); ++i) ++ { ++ if (d->buildConfigurations[i]->name() == name) ++ { ++ XCBuildConfiguration *configuration = d->buildConfigurations.takeAt(i); ++ if (d->defaultBuildConfiguration == configuration) ++ d->defaultBuildConfiguration = NULL; ++ delete configuration; ++ break; ++ } ++ } ++} ++ ++void XCConfigurationList::setDefaultBuildConfiguration(const QString &name) ++{ ++ foreach (XCBuildConfiguration *configuration, d->buildConfigurations) ++ { ++ if (configuration->name() == name) ++ { ++ d->defaultBuildConfiguration = configuration; ++ break; ++ } ++ } ++} ++ ++QString XCConfigurationList::comment() const ++{ ++ QString parentIsa; ++ QString parentName; ++ ++ PBXTarget *target = dynamic_cast(parent()); ++ PBXProject *project = dynamic_cast(parent()); ++ ++ if (target) ++ { ++ parentIsa = target->isa(); ++ parentName = target->name(); ++ } ++ else if (project) ++ { ++ parentIsa = project->isa(); ++ parentName = project->name(); ++ } ++ ++ return QString(QLatin1String("Build configuration list for %1 \"%2\"")).arg(parentIsa).arg(parentName); ++} +diff --git a/src/lib/corelib/generators/xcode/xcconfigurationlist.h b/src/lib/corelib/generators/xcode/xcconfigurationlist.h +new file mode 100644 +index 0000000..b693478 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcconfigurationlist.h +@@ -0,0 +1,67 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCCONFIGURATIONLIST_H ++#define XCCONFIGURATIONLIST_H ++ ++#include "pbxobject.h" ++#include ++ ++class XCBuildConfiguration; ++ ++class XCConfigurationListPrivate; ++ ++class XCConfigurationList : public PBXObject ++{ ++ Q_OBJECT ++public: ++ explicit XCConfigurationList(PBXObject *parent = 0); ++ ~XCConfigurationList(); ++ ++ QString isa() const; ++ PBXObjectMap toMap() const; ++ ++ QList buildConfigurations() const; ++ ++ /*! ++ * Adds a build configuration named \p name if one with that name does not already exist. ++ * Returns the new or existing build configuration. ++ */ ++ XCBuildConfiguration *addBuildConfiguration(const QString &name); ++ void removeBuildConfiguration(const QString &name); ++ void setDefaultBuildConfiguration(const QString &name); ++ ++ QString comment() const; ++ ++private: ++ XCConfigurationListPrivate *d; ++}; ++ ++#endif // XCCONFIGURATIONLIST_H +diff --git a/src/lib/corelib/generators/xcode/xcode.pri b/src/lib/corelib/generators/xcode/xcode.pri +new file mode 100644 +index 0000000..76ada9e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcode.pri +@@ -0,0 +1,59 @@ ++HEADERS += \ ++ $$PWD/opensteppropertylist.h \ ++ $$PWD/pbx.h \ ++ $$PWD/pbxbuildfile.h \ ++ $$PWD/pbxbuildphase.h \ ++ $$PWD/pbxcontainer.h \ ++ $$PWD/pbxcontaineritemproxy.h \ ++ $$PWD/pbxfileencoding.h \ ++ $$PWD/pbxfilereference.h \ ++ $$PWD/pbxfiletype.h \ ++ $$PWD/pbxframeworksbuildphase.h \ ++ $$PWD/pbxgroup.h \ ++ $$PWD/pbxlegacytarget.h \ ++ $$PWD/pbxnativetarget.h \ ++ $$PWD/pbxobject.h \ ++ $$PWD/pbxproducttype.h \ ++ $$PWD/pbxproject.h \ ++ $$PWD/pbxreference.h \ ++ $$PWD/pbxsourcesbuildphase.h \ ++ $$PWD/pbxsourcetree.h \ ++ $$PWD/pbxtarget.h \ ++ $$PWD/pbxtargetdependency.h \ ++ $$PWD/xcbuildconfiguration.h \ ++ $$PWD/xcconfigurationlist.h \ ++ $$PWD/xcodegenerator.h \ ++ $$PWD/xcodenativegenerator.h \ ++ $$PWD/xcodesimplegenerator.h \ ++ $$PWD/xcscheme.h \ ++ $$PWD/xcsettings.h \ ++ $$PWD/xcodebuildsettingmapping.h ++ ++SOURCES += \ ++ $$PWD/opensteppropertylist.cpp \ ++ $$PWD/pbxbuildfile.cpp \ ++ $$PWD/pbxbuildphase.cpp \ ++ $$PWD/pbxcontainer.cpp \ ++ $$PWD/pbxcontaineritemproxy.cpp \ ++ $$PWD/pbxfilereference.cpp \ ++ $$PWD/pbxfiletype.cpp \ ++ $$PWD/pbxframeworksbuildphase.cpp \ ++ $$PWD/pbxgroup.cpp \ ++ $$PWD/pbxlegacytarget.cpp \ ++ $$PWD/pbxnativetarget.cpp \ ++ $$PWD/pbxobject.cpp \ ++ $$PWD/pbxproducttype.cpp \ ++ $$PWD/pbxproject.cpp \ ++ $$PWD/pbxreference.cpp \ ++ $$PWD/pbxsourcesbuildphase.cpp \ ++ $$PWD/pbxsourcetree.cpp \ ++ $$PWD/pbxtarget.cpp \ ++ $$PWD/pbxtargetdependency.cpp \ ++ $$PWD/xcbuildconfiguration.cpp \ ++ $$PWD/xcconfigurationlist.cpp \ ++ $$PWD/xcodegenerator.cpp \ ++ $$PWD/xcodenativegenerator.cpp \ ++ $$PWD/xcodesimplegenerator.cpp \ ++ $$PWD/xcscheme.cpp \ ++ $$PWD/xcsettings.cpp \ ++ $$PWD/xcodebuildsettingmapping.cpp +diff --git a/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp +new file mode 100644 +index 0000000..458bf8f +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.cpp +@@ -0,0 +1,366 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodebuildsettingmapping.h" ++#include "xcodegenerator.h" ++ ++#include ++#include "pbx.h" ++ ++#include ++ ++#include ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++static QVariant _xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group, const QString &moduleName); ++ ++static QVariant xcodeExecutablePrefix(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeExecutableSuffix(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeInfoPlistOutputEncoding(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeArchitecture(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodePreprocessorDefinitions(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeResourcesTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeSdkRoot(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeSupportedPlatforms(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeDylibVersion(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeProductName(const qbs::Project &project, const ProductData &product, const GroupData &group); ++static QVariant xcodeUseHeadermap(const qbs::Project &project, const ProductData &product, const GroupData &group); ++ ++static QVariant qbsProjectModuleProperty(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project) ++{ ++ QMapIterator module(project.projectConfiguration()); ++ while (module.hasNext()) { ++ module.next(); ++ QString qbsModName = qbsModuleName; ++ if (module.key() == qbsModName.replace(QLatin1String("."), QLatin1String("/"))) { ++ QMapIterator property(module.value().toMap()); ++ while (property.hasNext()) { ++ property.next(); ++ if (qbsPropertyName == property.key()) { ++ return property.value(); ++ } ++ } ++ } ++ } ++ ++ return QVariant(); ++} ++ ++static QVariant qbsModuleProperty(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project, const qbs::ProductData &product, const qbs::GroupData &group) ++{ ++ if (product.isValid()) { ++ return (group.isValid() ? group.properties() : product.moduleProperties()).getModuleProperty(qbsModuleName, qbsPropertyName); ++ } else { ++ return qbsProjectModuleProperty(qbsModuleName, qbsPropertyName, project); ++ } ++ return QVariant(); ++} ++ ++static QVariantList qbsModuleProperties(const QString &qbsModuleName, const QString &qbsPropertyName, const qbs::Project &project, const qbs::ProductData &product, const qbs::GroupData &group) ++{ ++ if (product.isValid()) { ++ return (group.isValid() ? group.properties() : product.moduleProperties()).getModuleProperties(qbsModuleName, qbsPropertyName); ++ } else { ++ return qbsProjectModuleProperty(qbsModuleName, qbsPropertyName, project).toList(); ++ } ++ return QVariantList(); ++} ++ ++void XcodeBuildSettingMapping::applyToProject(PBXProject *xcodeProject, ++ const qbs::Project &project) const { ++ applyToConfiguration(xcodeProject->buildConfigurationList(), project); ++} ++ ++void XcodeBuildSettingMapping::applyToTarget(PBXTarget *xcodeTarget, ++ const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData) const { ++ applyToConfiguration(xcodeTarget->buildConfigurationList(), project, productData, groupData); ++} ++ ++void XcodeBuildSettingMapping::applyToConfiguration(XCConfigurationList *xcodeConfigurationList, ++ const Project &project, ++ const ProductData &productData, ++ const GroupData &groupData) const { ++ foreach (XCBuildConfiguration *xcodeConfiguration, xcodeConfigurationList->buildConfigurations()) ++ applyToConfiguration(xcodeConfiguration, project, productData, groupData); ++} ++ ++void XcodeBuildSettingMapping::applyToConfiguration(XCBuildConfiguration *xcodeConfiguration, ++ const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData) const { ++ QVariant xcodeValue; ++ if (function) { ++ xcodeValue = function(project, productData, groupData); ++ } else if (isList) { ++ QVariantList list; ++ ++ foreach (const QString &qbsName, qbsNames) { ++ list << qbsModuleProperties(qbsModule, qbsName, project, productData, groupData); ++ } ++ ++ if (!list.isEmpty()) { ++ list.append(QLatin1String("$(inherited)")); ++ xcodeValue = list; ++ } ++ } else { ++ xcodeValue = qbsModuleProperty(qbsModule, qbsNames.first(), project, productData, groupData); ++ } ++ ++ // TODO: Figure out what Xcode *really* does... I think it's this ++ bool shouldSerializeAsList = serializedAsList; ++ if (xcodeValue.type() == QVariant::List || xcodeValue.type() == QVariant::StringList) { ++ const QStringList l = xcodeValue.toStringList(); ++ if (l.size() <= 1) { ++ shouldSerializeAsList = false; // || containsQuotedStrings ??? lineLength? ++ } ++ } ++ ++ if (!shouldSerializeAsList && (xcodeValue.type() == QVariant::List ++ || xcodeValue.type() == QVariant::StringList)) { ++ xcodeValue = xcodeValue.toStringList().join(QLatin1Char(' ')); ++ } ++ ++ if (!xcodeValue.isNull()) { ++ xcodeValue = XcodeGenerator::xcodeInsertPlaceholdersInValue(project, xcodeValue); ++ xcodeConfiguration->setBuildSetting(xcodeName, xcodeValue); ++ } ++} ++ ++/*! ++ * \brief Mapping of Xcode build settings to qbs module and property names or functions. ++ */ ++QList XcodeBuildSettingMapping::defaultBuildSettingsMap() ++{ ++ const QString cpp = QLatin1String("cpp"); ++ ++ QList settings; ++ settings += XcodeBuildSettingMapping(QLatin1String("APPLICATION_EXTENSION_API_ONLY"), cpp, QLatin1String("requireAppExtensionSafeApi")); ++ settings += XcodeBuildSettingMapping(QLatin1String("ARCHS"), &xcodeArchitecture, true); ++ settings += XcodeBuildSettingMapping(QLatin1String("CLANG_ENABLE_OBJC_ARC"), cpp, QLatin1String("automaticReferenceCounting")); ++ settings += XcodeBuildSettingMapping(QLatin1String("CREATE_INFOPLIST_SECTION_IN_BINARY"), cpp, QLatin1String("embedInfoPlist")); ++ settings += XcodeBuildSettingMapping(QLatin1String("DYLIB_CURRENT_VERSION"), &xcodeDylibVersion, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("DYLIB_INSTALL_NAME_BASE"), cpp, QLatin1String("installNamePrefix")); ++ settings += XcodeBuildSettingMapping(QLatin1String("EXECUTABLE_EXTENSION"), &xcodeExecutableSuffix, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("EXECUTABLE_PREFIX"), &xcodeExecutablePrefix, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("FRAMEWORK_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("frameworkPaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("GCC_PREFIX_HEADER"), cpp, QLatin1String("precompiledHeader")); ++ settings += XcodeBuildSettingMapping(QLatin1String("GCC_PREPROCESSOR_DEFINITIONS"), &xcodePreprocessorDefinitions, true); ++ settings += XcodeBuildSettingMapping(QLatin1String("HEADER_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("includePaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_EXPAND_BUILD_SETTINGS"), cpp, QLatin1String("processInfoPlist")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_FILE"), cpp, QLatin1String("infoPlistFile")); ++ settings += XcodeBuildSettingMapping(QLatin1String("INFOPLIST_OUTPUT_FORMAT"), &xcodeInfoPlistOutputEncoding, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("IPHONEOS_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumIosVersion")); ++ settings += XcodeBuildSettingMapping(QLatin1String("LD_RUNPATH_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("rpaths"), false); ++ settings += XcodeBuildSettingMapping(QLatin1String("LIBRARY_SEARCH_PATHS"), cpp, QStringList() << QLatin1String("libraryPaths")); ++ settings += XcodeBuildSettingMapping(QLatin1String("MACOSX_DEPLOYMENT_TARGET"), cpp, QLatin1String("minimumOsxVersion")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_CFLAGS"), cpp, QStringList() << QLatin1String("cFlags") << QLatin1String("objcFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_CPLUSPLUSFLAGS"), cpp, QStringList() << QLatin1String("cxxFlags") << QLatin1String("objcxxFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("OTHER_LDFLAGS"), cpp, QStringList() << QLatin1String("linkerFlags")); ++ settings += XcodeBuildSettingMapping(QLatin1String("PRODUCT_NAME"), &xcodeProductName, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("RESOURCES_TARGETED_DEVICE_FAMILY"), &xcodeResourcesTargetedDeviceFamily, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("SDKROOT"), &xcodeSdkRoot, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("SUPPORTED_PLATFORMS"), &xcodeSupportedPlatforms, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("TARGETED_DEVICE_FAMILY"), &xcodeTargetedDeviceFamily, false); ++ settings += XcodeBuildSettingMapping(QLatin1String("USE_HEADERMAP"), &xcodeUseHeadermap, false); ++ return settings; ++} ++ ++QVariant xcodeExecutablePrefix(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ switch (XcodeGenerator::xcodeProductType(product)) ++ { ++ case PBX::Application: ++ case PBX::Tool: ++ case PBX::Bundle: ++ case PBX::Framework: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("executablePrefix"), project, product, group).toString(); ++ case PBX::LibraryDynamic: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("dynamicLibraryPrefix"), project, product, group).toString(); ++ case PBX::LibraryStatic: ++ return qbsModuleProperty(QLatin1String("cpp"), QLatin1String("staticLibraryPrefix"), project, product, group).toString(); ++ default: ++ return QString(); ++ } ++} ++ ++QVariant xcodeExecutableSuffix(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ QString suffix; ++ switch (XcodeGenerator::xcodeProductType(product)) ++ { ++ case PBX::Application: ++ case PBX::Tool: ++ case PBX::Bundle: ++ case PBX::Framework: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("executableSuffix"), project, product, group).toString(); ++ break; ++ case PBX::LibraryDynamic: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("dynamicLibrarySuffix"), project, product, group).toString(); ++ break; ++ case PBX::LibraryStatic: ++ suffix = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("staticLibrarySuffix"), project, product, group).toString(); ++ break; ++ default: ++ break; ++ } ++ ++ if (suffix.startsWith(QChar('.'))) ++ suffix.remove(0, 1); ++ ++ return suffix; ++} ++ ++QVariant xcodeInfoPlistOutputEncoding(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString format = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("infoPlistFormat"), project, product, group).toString(); ++ if (format == QLatin1String("xml1")) ++ return QLatin1String("XML"); ++ else if (format == QLatin1String("binary1")) ++ return QLatin1String("binary"); ++ ++ // If we don't know what the format is, return the original string (which may be invalid) ++ // "same-as-input" is valid ++ return format; ++} ++ ++QVariant xcodeArchitecture(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString architecture = qbsModuleProperty(QLatin1String("qbs"), QLatin1String("architecture"), project, product, group).toString(); ++ if (architecture == QLatin1String("x86")) ++ return QLatin1String("i386"); ++ return architecture; ++} ++ ++QVariant xcodePreprocessorDefinitions(const qbs::Project &project, const ProductData &product, const GroupData &group) ++{ ++ QStringList defs; ++ Q_FOREACH (const QVariant &def, qbsModuleProperties(QLatin1String("cpp"), QLatin1String("defines"), project, product, group)) { ++ // Preprocessor definitions need to be double escaped since Xcode ignores quoted strings ++ defs.append(def.toString().replace(QLatin1String("\""), QLatin1String("\\\""))); ++ } ++ return defs; ++} ++ ++QVariant xcodeSdkRoot(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ const QString sdkName = qbsModuleProperty(QLatin1String("cpp"), QLatin1String("xcodeSdkName"), project, product, group).toString(); ++ if (!sdkName.isEmpty()) ++ return sdkName; ++ ++ const QString sysroot = qbsModuleProperty(QLatin1String("qbs"), QLatin1String("sysroot"), project, product, group).toString(); ++ if (!sysroot.isEmpty()) ++ return sysroot; ++ ++ const QVariantList targetOS = qbsModuleProperties(QLatin1String("qbs"), QLatin1String("targetOS"), project, product, group); ++ if (targetOS.contains(QLatin1String("osx"))) ++ return QLatin1String("macosx"); ++ else if (targetOS.contains(QLatin1String("ios"))) ++ return QLatin1String("iphoneos"); ++ else ++ throw ErrorInfo(Tr::tr("Unsupported platform for Xcode project")); ++} ++ ++QVariant xcodeSupportedPlatforms(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ QStringList supportedPlatforms; ++ const QVariantList targetOS = qbsModuleProperties(QLatin1String("qbs"), QLatin1String("targetOS"), project, product, group); ++ if (targetOS.contains(QLatin1String("osx"))) { ++ supportedPlatforms.append(QLatin1String("macosx")); ++ } else if (targetOS.contains(QLatin1String("ios"))) { ++ if (targetOS.contains(QLatin1String("ios-simulator"))) { ++ supportedPlatforms.append(QLatin1String("iphonesimulator")); ++ } ++ supportedPlatforms.append(QLatin1String("iphoneos")); ++ } ++ return supportedPlatforms; ++} ++ ++static inline int targetDeviceFamilyIdentifierFromName(const QString &name) ++{ ++ if (name == "iphone") ++ return 1; ++ if (name == "ipad") ++ return 2; ++ return 0; ++} ++ ++QVariant _xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group, const QString &moduleName) ++{ ++ QStringList targetedDeviceFamily; ++ const QVariantList targetDevices = qbsModuleProperties(moduleName, QLatin1String("targetDevices"), project, product, group); ++ Q_FOREACH (const QVariant &targetDevice, targetDevices) { ++ int devId = targetDeviceFamilyIdentifierFromName(targetDevice.toString()); ++ if (devId != 0) { ++ targetedDeviceFamily.append(QString::number(devId)); ++ } ++ } ++ return targetedDeviceFamily.join(QLatin1Char(',')); ++} ++ ++QVariant xcodeResourcesTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ return _xcodeTargetedDeviceFamily(project, product, group, QLatin1String("ib")); ++} ++ ++QVariant xcodeTargetedDeviceFamily(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ return _xcodeTargetedDeviceFamily(project, product, group, QLatin1String("xcode")); ++} ++ ++QVariant xcodeDylibVersion(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ Q_UNUSED(project); ++ Q_UNUSED(group); ++ if (product.type().contains(QLatin1String("dynamiclibrary"))) ++ return product.version(); ++ return QString(); ++} ++ ++QVariant xcodeProductName(const Project &project, const ProductData &product, const GroupData &group) ++{ ++ Q_UNUSED(project); ++ Q_UNUSED(group); ++ if (!product.targetName().isEmpty()) ++ return product.targetName(); ++ return product.name(); ++} ++ ++QVariant xcodeUseHeadermap(const Project &, const ProductData &, const GroupData &) ++{ ++ return QVariant(false); // We never want to use headermaps in qbs-generated projects ++} ++ ++} // namespace qbs +diff --git a/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h +new file mode 100644 +index 0000000..39474fb +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodebuildsettingmapping.h +@@ -0,0 +1,96 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCODECONFIGURATIONSETTING_H ++#define XCODECONFIGURATIONSETTING_H ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++class PBXProject; ++class PBXTarget; ++class XCBuildConfiguration; ++class XCConfigurationList; ++ ++namespace qbs { ++ ++/*! ++ * \brief Represents the mapping of an Xcode build setting name to a qbs module and property name. ++ */ ++struct XcodeBuildSettingMapping { ++ typedef QVariant (*XcodeBuildSettingValueFunction)(const qbs::Project &project, ++ const qbs::ProductData &productData, ++ const qbs::GroupData &groupData); ++ ++ QString xcodeName; ++ QString qbsModule; ++ QStringList qbsNames; ++ bool isList; ++ bool serializedAsList; ++ XcodeBuildSettingValueFunction function; // overrides previous 3 ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, const QString &qbsModule, ++ const QString &qbsName, bool serializedAsList = false) ++ : xcodeName(xcodeName), qbsModule(qbsModule), qbsNames(qbsName), isList(false), ++ serializedAsList(serializedAsList), function(NULL) {} ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, const QString &qbsModule, ++ const QStringList &qbsNames, bool serializedAsList = true) ++ : xcodeName(xcodeName), qbsModule(qbsModule), qbsNames(qbsNames), isList(true), ++ serializedAsList(serializedAsList), function(NULL) {} ++ ++ XcodeBuildSettingMapping(const QString &xcodeName, XcodeBuildSettingValueFunction function, ++ bool serializedAsList) ++ : xcodeName(xcodeName), isList(serializedAsList), ++ serializedAsList(serializedAsList), function(function) {} ++ ++ void applyToProject(PBXProject *xcodeProject, const Project &project) const; ++ void applyToTarget(PBXTarget *xcodeTarget, ++ const Project &project, ++ const ProductData &productData, const GroupData &groupData) const; ++ void applyToConfiguration(XCConfigurationList *xcodeConfigurationList, ++ const Project &project, ++ const ProductData &productData = ProductData(), ++ const GroupData &groupData = GroupData()) const; ++ void applyToConfiguration(XCBuildConfiguration *xcodeConfiguration, ++ const Project &project, ++ const ProductData &productData = ProductData(), ++ const GroupData &groupData = GroupData()) const; ++ ++ static QList defaultBuildSettingsMap(); ++}; ++ ++} // namespace qbs ++ ++#endif // XCODECONFIGURATIONSETTING_H +diff --git a/src/lib/corelib/generators/xcode/xcodegenerator.cpp b/src/lib/corelib/generators/xcode/xcodegenerator.cpp +new file mode 100644 +index 0000000..4bbcb40 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodegenerator.cpp +@@ -0,0 +1,643 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodebuildsettingmapping.h" ++#include "xcodegenerator.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include "pbx.h" ++ ++#include ++#include ++#include ++#include ++ ++static const QString kQbsRunnerFileName = QLatin1String("qbs"); ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++XcodeGenerator::XcodeGenerator() ++{ ++} ++ ++static QString buildVariant(const qbs::Project &project) ++{ ++ return project.projectConfiguration()[QLatin1String("qbs")].toMap()[QLatin1String("buildVariant")].toString(); ++} ++ ++static QString buildVariant(const qbs::ProductData &product) ++{ ++ return product.moduleProperties().getModuleProperty(QLatin1String("qbs"), QLatin1String("buildVariant")).toString(); ++} ++ ++void XcodeGenerator::setupGenerator() ++{ ++ QSet profileNames; ++ QSet projectNames; ++ QSet qbsProjectFiles; ++ QSet buildDirectories; ++ ++ foreach (const qbs::Project &proj, projects()) { ++ profileNames << proj.profile(); ++ projectNames << proj.projectData().name(); ++ qbsProjectFiles << proj.projectData().location().filePath(); ++ ++ QDir baseBuildDirectory(proj.projectData().buildDirectory()); ++ baseBuildDirectory.cdUp(); ++ buildDirectories << baseBuildDirectory.absolutePath(); ++ } ++ ++ QBS_CHECK(!profileNames.isEmpty()); ++ QBS_CHECK(projectNames.size() == 1); ++ QBS_CHECK(qbsProjectFiles.size() == 1); ++ QBS_CHECK(buildDirectories.size() == 1); ++ ++ m_multipleProfiles = profileNames.size() > 1; ++ m_projectName = projectNames.toList().first(); ++ m_qbsProjectFile = qbsProjectFiles.toList().first(); ++ m_baseBuildDirectory = buildDirectories.toList().first(); ++ ++ QBS_CHECK(m_qbsProjectFile.isAbsolute() && m_qbsProjectFile.exists()); ++ QBS_CHECK(m_baseBuildDirectory.isAbsolute() && m_baseBuildDirectory.exists()); ++ ++ m_productGroups.clear(); ++} ++ ++static inline TargetArtifact runnableOrPrimaryTargetArtifactForProduct(const qbs::ProductData &qbsProductData) { ++ // Easy in this case... ++ if (qbsProductData.targetArtifacts().size() == 1) { ++ return qbsProductData.targetArtifacts().first(); ++ } ++ ++ const QStringList types = QStringList() ++ << QLatin1String("bundle") ++ << QLatin1String("application") ++ << QLatin1String("dynamiclibrary") ++ << QLatin1String("staticlibrary") ++ << QLatin1String("loadablemodule"); ++ ++ Q_FOREACH (const TargetArtifact &ta, qbsProductData.targetArtifacts()) { ++ Q_FOREACH (const QString &type, types) { ++ if (qbsProductData.type().contains(type) ++ && ta.fileTags().contains(type)) { ++ return ta; ++ } ++ } ++ } ++ ++ return TargetArtifact(); ++} ++ ++static inline QString installedFilePathForTargetArtifact(const qbs::Project &project, ++ const qbs::ProductData &product, ++ const qbs::InstallOptions &installOptions, ++ const TargetArtifact &ta) { ++ const QList &installables ++ = project.installableFilesForProduct(product, installOptions); ++ foreach (const InstallableFile &file, installables) { ++ if (file.sourceFilePath() == ta.filePath()) ++ return file.targetFilePath(); ++ } ++ return ta.filePath(); ++} ++ ++void XcodeGenerator::generate(const InstallOptions &installOptions) ++{ ++ // TODO: Move to base class and call ProjectGenerator::setupGenerator() ++ setupGenerator(); ++ ++ const QString xcodeWrapperName = m_projectName + QLatin1String(".xcodeproj"); ++ if (!m_baseBuildDirectory.cd(xcodeWrapperName)) ++ if (!m_baseBuildDirectory.mkdir(xcodeWrapperName) || !m_baseBuildDirectory.cd(xcodeWrapperName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode project wrapper directory")); ++ ++ const QString xcodeWorkspaceWrapperName = QLatin1String("project.xcworkspace"); ++ const QString sharedWorkspaceDataDirName = QLatin1String("xcshareddata"); ++ ++ QDir sharedWorkspaceDataDir = m_baseBuildDirectory; ++ if (!sharedWorkspaceDataDir.cd(xcodeWorkspaceWrapperName)) ++ if (!sharedWorkspaceDataDir.mkdir(xcodeWorkspaceWrapperName) || !sharedWorkspaceDataDir.cd(xcodeWorkspaceWrapperName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode workspace wrapper directory")); ++ ++ if (!sharedWorkspaceDataDir.cd(sharedWorkspaceDataDirName)) ++ if (!sharedWorkspaceDataDir.mkdir(sharedWorkspaceDataDirName) || !sharedWorkspaceDataDir.cd(sharedWorkspaceDataDirName)) ++ throw ErrorInfo(Tr::tr("failed to make Xcode workspace shared data directory")); ++ ++ const QString sharedWorkspaceSettingsFilePath = sharedWorkspaceDataDir.absoluteFilePath(QLatin1String("WorkspaceSettings.xcsettings")); ++ XCSettings sharedWorkspaceSettings; ++ sharedWorkspaceSettings.setAutocreateSchemes(false); ++ if (!sharedWorkspaceSettings.serialize(sharedWorkspaceSettingsFilePath)) { ++ throw ErrorInfo(Tr::tr("Failed to generate workspace settings %1").arg(sharedWorkspaceSettingsFilePath)); ++ } ++ ++ // Create a shell script to invoke the qbs binary ++ // This is necessary because qbs hangs when invoked directly from Xcode ++ // TODO: Why? ++ const QString &qbsRunnerFilePath = m_baseBuildDirectory.absoluteFilePath(kQbsRunnerFileName); ++ QFile qbsRunner(qbsRunnerFilePath); ++ if (qbsRunner.open(QIODevice::WriteOnly)) { ++ // The runner script, in addition to invoking qbs itself, ++ // adds symlinks from the Xcode target directory to the qbs build directory ++ // This way, products in the Xcode files listing show up properly ++ QTextStream ts(&qbsRunner); ++ ts << QLatin1String("#!/bin/bash\n") ++ << QLatin1String("set -e\n") ++ << QLatin1String("[ -x \"$QBS\" ] || exit 1\n") ++ << QLatin1String("\"$QBS\" \"$@\"\n") ++ << QLatin1String("if [ ! -e \"$TARGET_BUILD_DIR/$PRODUCT_NAME/$FULL_PRODUCT_NAME\" ] && [ -e \"$QBS_TARGET_PATH\" ] ; then\n") ++ << QLatin1String("mkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME\"\n") ++ << QLatin1String("ln -sf \"$QBS_TARGET_PATH\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME/$FULL_PRODUCT_NAME\"\n") ++ << QLatin1String("fi\n"); ++ } ++ ++ PBXProject xcodeProject(m_baseBuildDirectory.absoluteFilePath(QLatin1String("project.pbxproj"))); ++ xcodeProject.setName(m_projectName); ++ ++ // Only potentially add absolute paths if the qbs source directory and build directory differ; ++ // this makes the Xcode project file relocatable (and thus version trackable) if generated in-source ++ const QString qbsSourceDirectory = m_qbsProjectFile.absolutePath(); ++ if (m_baseBuildDirectory.absolutePath() != qbsSourceDirectory) { ++ // TODO: Make it relative anyways ++ xcodeProject.setProjectDirPath(qbsSourceDirectory); ++ xcodeProject.rootGroup()->setPath(xcodeProject.projectDirPath()); ++ } ++ ++ foreach (const qbs::Project &project, projects()) { ++ XCBuildConfiguration *xcconfig = xcodeProject.buildConfigurationList()->addBuildConfiguration(xcodeConfigurationName(project)); ++ xcodeProject.buildConfigurationList()->setDefaultBuildConfiguration(xcconfig->name()); ++ ++ // TODO: Ideally should go into a configuration file instead of in the project file itself ++ // TODO: Is there a better way to find the qbs binary to invoke? For example, someone could use libqbscore to invoke generators... ++ xcconfig->setBuildSetting(QLatin1String("QBS"), QCoreApplication::applicationFilePath()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROFILE"), project.profile()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROJECT_DIRECTORY"), xcodeInsertPlaceholdersInValue(project, qbsSourceDirectory)); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROJECT_FILE_NAME"), m_qbsProjectFile.fileName()); ++ ++ // or baseBuildDirectory + profileName + '-' + buildVariant ++ xcconfig->setBuildSetting(QLatin1String("__QBS_BASE_BUILD_DIRECTORY"), QLatin1String("$(PROJECT_FILE_PATH)/..")); ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_DIRECTORY"), QLatin1String("$(__QBS_BASE_BUILD_DIRECTORY:standardizepath)")); ++ ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_VARIANT"), buildVariant(project)); ++ ++ foreach (const XcodeBuildSettingMapping &setting, XcodeBuildSettingMapping::defaultBuildSettingsMap()) { ++ setting.applyToConfiguration(xcconfig, project); ++ } ++ ++ // Add all the Qbs products as Xcode targets ++ addProjectRecursive(project, project.projectData(), installOptions, xcodeProject, xcodeProject.rootGroup()); ++ ++ // Do some per-target ops ++ foreach (const qbs::ProductData &qbsProductData, project.projectData().allProducts()) { ++ PBXTarget *qbsXcodeTarget = xcodeProject.targetNamed(qbsProductData.name()); ++ if (!qbsXcodeTarget) ++ throw new qbs::ErrorInfo(Tr::tr("could not find PBXTarget for qbs product '%1'").arg(qbsProductData.name())); ++ ++ // Set up target dependencies ++ foreach (const QString &dependencyName, qbsProductData.dependencies()) { ++ PBXTargetDependency *dependentXcodeTarget = new PBXTargetDependency(&xcodeProject); ++ dependentXcodeTarget->setTarget(xcodeProject.targetNamed(dependencyName)); ++ if (!dependentXcodeTarget->target()) ++ throw new qbs::ErrorInfo(Tr::tr("could not find PBXTarget for qbs product '%1'").arg(dependencyName)); ++ ++ qbsXcodeTarget->targetDependencies().append(dependentXcodeTarget); ++ } ++ ++ // Set up a scheme for the target ++ static const QString xcshareddata = QLatin1String("xcshareddata"); ++ static const QString xcschemes = QLatin1String("xcschemes"); ++ QDir schemesDirectory(m_baseBuildDirectory); ++ if (!schemesDirectory.cd(xcshareddata)) { ++ if (!schemesDirectory.mkdir(xcshareddata) || !schemesDirectory.cd(xcshareddata)) { ++ throw ErrorInfo(Tr::tr("failed to make Xcode project shared data directory")); ++ } ++ } ++ if (!schemesDirectory.cd(xcschemes)) { ++ if (!schemesDirectory.mkdir(xcschemes) || !schemesDirectory.cd(xcschemes)) { ++ throw ErrorInfo(Tr::tr("failed to make Xcode project shared schemes directory")); ++ } ++ } ++ ++ const QString schemeFilePath(schemesDirectory.absoluteFilePath(QString(QLatin1String("%1.xcscheme")).arg(qbsXcodeTarget->name()))); ++ XCScheme xcscheme; ++ xcscheme.setParallelizeBuildables(false); // this must be turned off because it conflicts with qbs build directory locking ++ xcscheme.setProject(&xcodeProject); ++ xcscheme.setTarget(qbsXcodeTarget); ++ ++ if (dynamic_cast(qbsXcodeTarget)) { ++ xcscheme.setCustomExecutableFilePath(installedFilePathForTargetArtifact(project, qbsProductData, installOptions, runnableOrPrimaryTargetArtifactForProduct(qbsProductData))); ++ } ++ ++ if (!xcscheme.serialize(schemeFilePath)) { ++ throw ErrorInfo(Tr::tr("Failed to generate scheme %1").arg(schemeFilePath)); ++ } ++ } ++ } ++ ++ if (xcodeProject.writeToFileSystemProjectFile(true, true, true)) ++ qDebug() << "Generated" << qPrintable(xcodeWrapperName); ++ else ++ throw ErrorInfo(Tr::tr("Failed to generate %1").arg(xcodeWrapperName)); ++} ++ ++QString makePathRelativeTo(const QString &path, const QString &basePath) ++{ ++ QString rootPath(basePath); ++ if (!rootPath.endsWith(QLatin1Char('/'))) ++ rootPath += QLatin1Char('/'); ++ ++ QString filePath(path); ++ if (filePath.startsWith(rootPath)) ++ filePath.remove(0, rootPath.size()); ++ ++ return filePath; ++} ++ ++void XcodeGenerator::addProjectRecursive(const Project &project, const ProjectData &projectData, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup) ++{ ++ foreach (const ProjectData &subProjectData, projectData.subProjects()) ++ { ++ PBXGroup *baseGroup = PBXGroup::groupWithName(subProjectData.name(), xcodeGroup); ++ baseGroup->setSourceTree(PBX::Group); ++ ++ // Add the qbs project file for this project ++ foreach (PBXFileReference *ref, baseGroup->addFiles(QStringList() << makePathRelativeTo(m_qbsProjectFile.absoluteFilePath(), xcodeProject.projectDirPath()), false, false)) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ ++ addProjectRecursive(project, subProjectData, installOptions, xcodeProject, baseGroup); ++ } ++ ++ foreach (const ProductData &product, projectData.products()) ++ { ++ addProduct(project, product, installOptions, xcodeProject, xcodeGroup); ++ } ++} ++ ++static inline QVariant flattenXcconfigList(const QStringList &list) { ++ if (list.isEmpty()) ++ return QString(); ++ if (list.size() == 1) ++ return list.first(); ++ return list; ++} ++ ++void XcodeGenerator::addProduct(const Project &project, const ProductData &product, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup) ++{ ++ PBXTarget *xcodeTarget = xcodeTargetForProduct(&xcodeProject, product); ++ xcodeTarget->setName(product.name()); ++ xcodeTarget->setProductType(xcodeProductType(product)); ++ ++ PBXLegacyTarget *xcodeLegacyTarget = dynamic_cast(xcodeTarget); ++ if (xcodeLegacyTarget) { ++ xcodeLegacyTarget->setBuildWorkingDirectory(XcodeGenerator::xcodeInsertPlaceholdersInValue(project, xcodeProject.projectDirPath()).toString()); ++ xcodeLegacyTarget->setBuildToolPath(QLatin1String("/bin/bash")); ++ ++ QStringList buildArguments; ++ buildArguments << QLatin1String("\"$(PROJECT_FILE_PATH)\"/") + kQbsRunnerFileName; ++ buildArguments << QLatin1String("\"$(ACTION)\""); ++ buildArguments << QLatin1String("-f"); ++ ++ // Can't use xcodeInsertPlaceholdersInValue because we want to do a little acrobatics to get quoting 100% right... ++ const QDir sourceDirectory(xcodeProject.projectDirPath()); ++ QString resultingFilePath = m_qbsProjectFile.absoluteFilePath(); ++ if (resultingFilePath.startsWith(sourceDirectory.absolutePath())) { ++ resultingFilePath.replace(0, sourceDirectory.absolutePath().size(), QString()); ++ buildArguments << QLatin1String("\"$(SRCROOT)\"") + shellQuote(resultingFilePath); ++ } else { ++ buildArguments << shellQuote(resultingFilePath); ++ } ++ ++ buildArguments << QLatin1String("-d"); ++ buildArguments << QLatin1String("\"$(CONFIGURATION_BUILD_DIR)\""); ++ buildArguments << QLatin1String("-p"); ++ buildArguments << QLatin1String("\"$(TARGET_NAME)\""); // target and product name are opposites in qbs and Xcode ++ buildArguments << QLatin1String("\"$(QBS_BUILD_VARIANT)\""); ++ buildArguments << QLatin1String("\"profile:$(QBS_PROFILE)\""); ++ ++ xcodeLegacyTarget->setBuildArgumentsString(buildArguments.join(QLatin1String(" "))); ++ xcodeLegacyTarget->setPassBuildSettingsInEnvironment(true); ++ } ++ ++ XCBuildConfiguration *xcconfig = xcodeTarget->buildConfigurationList()->addBuildConfiguration(xcodeConfigurationName(product)); ++ xcodeTarget->buildConfigurationList()->setDefaultBuildConfiguration(xcconfig->name()); ++ ++ // TODO: If a product with the same name was already added, don't add its files AGAIN ++ // Create a root PBX group for the target's files and other groups ++ PBXGroup *xcodeProductGroup = m_productGroups.value(product.name()); ++ const bool productFilesAlreadyAdded = !!xcodeProductGroup; ++ if (!productFilesAlreadyAdded) { ++ m_productGroups.insert(product.name(), xcodeProductGroup = PBXGroup::groupWithName(product.name(), xcodeGroup)); ++ ++ // Add the qbs project file for this product ++ foreach (PBXFileReference *ref, xcodeProductGroup->addFiles(QStringList() << makePathRelativeTo(product.location().filePath(), xcodeProject.projectDirPath()), false, false)) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ } ++ ++ QSet excludedSources; ++ ++ // Set up all the groups ++ foreach (const GroupData &groupData, product.groups()) ++ { ++ PBXGroup *group = xcodeProductGroup; ++ if (groupData.name() == product.name()) { ++ // This group has the same name as the product itself so we'll just add the files ++ // directly to the "product" group we created earlier instead of creating a new one ++ foreach (const XcodeBuildSettingMapping &setting, XcodeBuildSettingMapping::defaultBuildSettingsMap()) { ++ setting.applyToConfiguration(xcconfig, project, product, groupData); ++ } ++ ++ xcodeTarget->setProductName(xcodeTarget->buildSetting(QLatin1String("PRODUCT_NAME"), buildVariant(product)).toString()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_PROFILE"), product.profile()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_BUILD_VARIANT"), buildVariant(product)); ++ } else { ++ // Create a group for this group ++ group = PBXGroup::groupWithName(groupData.name(), xcodeProductGroup); ++ } ++ ++ // Add the source files to the group ++ group->setSourceTree(PBX::Group); ++ QList fileRefs; ++ if (!productFilesAlreadyAdded) ++ fileRefs = addGroupFiles(&xcodeProject, group, groupData); ++ ++ // If the group is enabled, then we'll actually BUILD them in addition to merely listing them ++ if (groupData.isEnabled()) { ++ foreach (PBXFileReference *ref, fileRefs) { ++ // Skip header files... wish there was a better way ++ if (ref->path().endsWith(QLatin1String(".h")) || ++ ref->path().endsWith(QLatin1String(".hh"))) { ++ continue; ++ } ++ ++ xcodeTarget->defaultSourceCodeBuildPhase()->addReference(ref); ++ } ++ } else { ++ foreach (PBXFileReference *ref, fileRefs) ++ excludedSources.insert(ref->path()); ++ } ++ } ++ ++ xcconfig->setBuildSetting(QLatin1String("EXCLUDED_SOURCE_FILE_NAMES"), flattenXcconfigList(QStringList(excludedSources.toList()))); ++ ++ QString sysroot = product.moduleProperties().getModuleProperty(QLatin1String("cpp"), QLatin1String("sysroot")).toString(); ++ QStringList frameworkPaths; ++ frameworkPaths += product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("frameworkPaths")); ++ frameworkPaths += product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("systemFrameworkPaths")); ++ frameworkPaths += sysroot + QLatin1String("/Library/Frameworks"); ++ frameworkPaths += sysroot + QLatin1String("/System/Library/Frameworks"); ++ frameworkPaths += QLatin1String("/Library/Frameworks"); ++ frameworkPaths += QLatin1String("/System/Library/Frameworks"); ++ const QStringList frameworkNames = product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("frameworks")); ++ const QStringList weakFrameworkNames = product.moduleProperties().getModulePropertiesAsStringList(QLatin1String("cpp"), QLatin1String("weakFrameworks")); ++ ++ // TODO TODO TODO dynamicLibraries and weakDynamicLibraries? ++ ++ // A framework can't be strongly AND weakly linked... TODO: fail more gracefully ++ QBS_CHECK(frameworkNames.toSet().intersect(weakFrameworkNames.toSet()).isEmpty()); ++ const QStringList allFrameworkNames = QStringList() << frameworkNames << weakFrameworkNames; ++ ++ Q_FOREACH (const QString &frameworkName, allFrameworkNames) { ++ // Whether a full path equivalent for the framework was found ++ bool foundFramework = false; ++ ++ Q_FOREACH (const QString &frameworkPath, frameworkPaths) { ++ QString candidateFrameworkPath = QFileInfo(frameworkPath + QLatin1String("/") + frameworkName + QLatin1String(".framework")).canonicalFilePath(); ++ if (QFileInfo(candidateFrameworkPath).exists()) { ++ QBS_CHECK(!candidateFrameworkPath.isEmpty()); ++ ++ const QString sysrootedCandidateFrameworkPath = candidateFrameworkPath.mid(sysroot.size() + 1 /* for the path separator */); ++ ++ // Check for an existing reference (could happen if a framework is specified multiple times) ++ PBXFileReference *existingReference = Q_NULLPTR; ++ Q_FOREACH (PBXReference *ref, xcodeProject.frameworksRefGroup()->children()) { ++ if (PBXFileReference *fileRef = dynamic_cast(ref)) { ++ if ((fileRef->sourceTree() == PBX::SdkRoot && fileRef->path() == sysrootedCandidateFrameworkPath) || ++ (fileRef->sourceTree() == PBX::Absolute && fileRef->path() == candidateFrameworkPath)) { ++ existingReference = fileRef; ++ break; ++ } ++ } ++ } ++ ++ QList refs; ++ ++ // Create a new file reference since one wasn't already found in the Frameworks group ++ if (!existingReference) { ++ refs = xcodeProject.frameworksRefGroup()->addFiles(QStringList() << candidateFrameworkPath, false, false); ++ Q_FOREACH (PBXFileReference *frameworkRef, refs) { ++ if (!sysroot.isEmpty() && frameworkRef->path().startsWith(sysroot)) { ++ frameworkRef->setPath(sysrootedCandidateFrameworkPath); ++ frameworkRef->setSourceTree(PBX::SdkRoot); ++ } ++ } ++ } else { ++ refs.append(existingReference); ++ } ++ ++ // Add the framework to the Frameworks build phase ++ Q_FOREACH (PBXFileReference *frameworkRef, refs) { ++ xcodeTarget->defaultFrameworksBuildPhase()->addReference(frameworkRef); ++ } ++ ++ foundFramework = true; ++ break; ++ } ++ } ++ ++ // Not a normal case, and will cause a build failure, but is better than silently ignoring it... ++ if (!foundFramework) { ++ Q_FOREACH (PBXFileReference *frameworkRef, xcodeProject.frameworksRefGroup()->addFiles(QStringList() << frameworkName + QLatin1String(".framework"), false, false)) { ++ QBS_CHECK(!frameworkRef->path().isEmpty()); ++ if (PBXBuildFile *frameworkBuildRef = xcodeTarget->defaultFrameworksBuildPhase()->addReference(frameworkRef)) { ++ const bool isWeaklyLinked = weakFrameworkNames.contains(frameworkName); ++ frameworkBuildRef->setWeakLinkedLibrary(isWeaklyLinked); ++ } ++ } ++ } ++ } ++ ++ // Add a reference for the main target artifact in root "Products" group ++ TargetArtifact artifact = runnableOrPrimaryTargetArtifactForProduct(product); ++ QString realArtifactPath = installedFilePathForTargetArtifact(project, product, installOptions, artifact); ++ if (!realArtifactPath.isEmpty()) { ++ // "simple" generator ++ if (!xcodeLegacyTarget) { ++ // Chop off the Qbs build dir from the artifact path, because they will actually end ++ // up in Xcode's build directory, not the build directory Qbs would use ++ const QString buildDirectory = project.projectData().buildDirectory(); ++ if (realArtifactPath.startsWith(buildDirectory)) ++ realArtifactPath.remove(0, buildDirectory.size()); ++ ++ if (realArtifactPath.startsWith(QLatin1Char('/'))) ++ realArtifactPath.remove(0, 1); ++ } else { ++ realArtifactPath = xcodeInsertPlaceholdersInValue(project, realArtifactPath).toString(); ++ } ++ ++ QBS_CHECK(!realArtifactPath.isEmpty()); ++ ++ QList refs = xcodeProject.productRefGroup()->addFiles(QStringList() << realArtifactPath, false, false); ++ foreach (PBXFileReference *ref, refs) ++ { ++ if (!xcodeLegacyTarget) { ++ ref->setSourceTree(PBX::BuildProductDir); ++ ++ // This causes Xcode to force the file reference to a relative path relative to the build products dir ++ // Therefore, we must symlink artifacts in the Xcode build directory to the ones in the qbs build directory ++ // NOTE: This will crash Xcode if set for a PBXLegacyTarget (claiming an empty string global hex ID) ++ xcodeTarget->setProductReference(ref); ++ } ++ ++ // TODO: Technically this should be composed of other variables based on the product type ++ // $(WRAPPER_NAME) for bundles, $(EXECUTABLE_NAME) otherwise? ++ xcconfig->setBuildSetting(QLatin1String("FULL_PRODUCT_NAME"), QFileInfo(realArtifactPath).fileName()); ++ xcconfig->setBuildSetting(QLatin1String("QBS_TARGET_PATH"), xcodeInsertPlaceholdersInValue(project, realArtifactPath)); ++ } ++ } ++ ++ xcodeProject.addTarget(xcodeTarget); ++} ++ ++QList XcodeGenerator::addGroupFiles(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData) ++{ ++ QStringList relativeFilePaths; ++ foreach (QString filePath, groupData.allFilePaths()) { ++ relativeFilePaths += makePathRelativeTo(filePath, xcodeProject->projectDirPath()); ++ } ++ ++ // Add all the files in the group as file references so they show up in the project tree ++ QList fileRefs = xcodeGroup->addFiles(relativeFilePaths, false, false); ++ foreach (PBXFileReference *ref, fileRefs) { ++ if (!ref->path().startsWith(QLatin1Char('/'))) { ++ ref->setSourceTree(PBX::Group); ++ } ++ } ++ ++ return fileRefs; ++} ++ ++PBXTarget *XcodeGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ Q_UNUSED(xcodeProject); ++ PBXTarget *target = xcodeProject->targetNamed(product.name()); ++ ++ // Native targets without a type won't build, so use a legacy target in this case ++ if (!target && xcodeProductType(product) == 0) { ++ return new PBXLegacyTarget(xcodeProject); ++ } ++ ++ return target; ++} ++ ++/*! ++ * Returns the Xcode product type identifier corresponding to the Qbs product type name. ++ */ ++PBX::PBXProductType XcodeGenerator::xcodeProductType(const ProductData &product) ++{ ++ const QStringList productType = product.type(); ++ const bool isBundle = product.moduleProperties().getModuleProperty(QLatin1String("bundle"), QLatin1String("isBundle")).toBool(); ++ ++ if (productType.contains(QLatin1String("application"))) ++ return isBundle ? PBX::Application : PBX::Tool; ++ if (productType.contains(QLatin1String("dynamiclibrary"))) ++ return isBundle ? PBX::Framework : PBX::LibraryDynamic; ++ if (productType.contains(QLatin1String("staticlibrary"))) ++ return isBundle ? PBX::StaticFramework : PBX::LibraryStatic; ++ if (productType.contains(QLatin1String("bundle"))) ++ return PBX::Bundle; ++ ++ return (PBX::PBXProductType)0; ++} ++ ++static QString _xcodeConfigurationName(QString variantName, const QString &profileName, bool includeProfileName) ++{ ++ QBS_CHECK(!variantName.isEmpty()); ++ variantName.replace(0, 1, variantName[0].toUpper()); ++ if (includeProfileName) { ++ variantName += QLatin1String("_") + profileName; ++ } ++ return variantName; ++} ++ ++QString XcodeGenerator::xcodeConfigurationName(const Project &project) ++{ ++ return _xcodeConfigurationName(buildVariant(project), project.profile(), m_multipleProfiles); ++} ++ ++QString XcodeGenerator::xcodeConfigurationName(const ProductData &product) ++{ ++ return _xcodeConfigurationName(buildVariant(product), product.profile(), m_multipleProfiles); ++} ++ ++/*! ++ * \brief If the value is a path or list of paths, ++ * returns it with the prefixes of paths replaced by $(SRCROOT), $(PROJECT_FILE_PATH)/.., etc., ++ * as appropriate. ++ * If the value is not a path, returns the original value unmodified. ++ */ ++QVariant XcodeGenerator::xcodeInsertPlaceholdersInValue(const qbs::Project &project, const QVariant &variant) ++{ ++ if (variant.type() == QVariant::List) { ++ QVariantList list; ++ foreach (const QVariant &v, variant.toList()) ++ list.append(xcodeInsertPlaceholdersInValue(project, v)); ++ return list; ++ } ++ ++ // If the value is a path and it begins with the value of SRCROOT or PROJECT_FILE_PATH/.., replace it ++ if (variant.type() == QVariant::String) { ++ // This should end up being the same as PBXProject::projectDirPath(), but if projectDirPath ++ // is the empty string (for example, when the xcodeproj resides in the qbs source directory, ++ // things would break, so prefer the Qbs value (plus, it saves a parameter to this function) ++ const QDir sourceDirectory = QFileInfo(project.projectData().location().filePath()).absolutePath(); ++ if (variant.toString().startsWith(sourceDirectory.absolutePath())) ++ return variant.toString().replace(0, sourceDirectory.absolutePath().size(), QLatin1String("$(SRCROOT)")); ++ ++ const QDir buildDirectory(project.projectData().buildDirectory()); ++ Q_ASSERT(buildDirectory.isAbsolute() && buildDirectory.exists()); ++ if (variant.toString().startsWith(buildDirectory.absolutePath())) ++ return variant.toString().replace(0, buildDirectory.absolutePath().size(), QLatin1String("$(QBS_BUILD_DIRECTORY)/$(QBS_PROFILE)-$(QBS_BUILD_VARIANT)")); ++ } ++ ++ return variant; ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodegenerator.h b/src/lib/corelib/generators/xcode/xcodegenerator.h +new file mode 100644 +index 0000000..765174a +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodegenerator.h +@@ -0,0 +1,81 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef QBS_XCODEGENERATOR_H ++#define QBS_XCODEGENERATOR_H ++ ++#include ++#include ++#include "pbxproducttype.h" ++ ++#include ++ ++class PBXFileReference; ++class PBXGroup; ++class PBXProject; ++class PBXTarget; ++ ++namespace qbs { ++ ++class ProductData; ++struct XcodeBuildSettingMapping; ++ ++class XcodeGenerator : public qbs::ProjectGenerator ++{ ++public: ++ virtual void generate(const InstallOptions &installOptions); ++ virtual void addProjectRecursive(const Project &project, const ProjectData &projectData, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup); ++ virtual void addProduct(const Project &project, const ProductData &product, const InstallOptions &installOptions, PBXProject &xcodeProject, PBXGroup *xcodeGroup); ++ virtual QList addGroupFiles(PBXProject *xcodeProject, PBXGroup *xcodeGroup, const qbs::GroupData &groupData); ++ ++ virtual PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++ ++ QString xcodeConfigurationName(const Project &project); ++ QString xcodeConfigurationName(const ProductData &product); ++ ++ static QVariant xcodeInsertPlaceholdersInValue(const qbs::Project &project, const QVariant &variant); ++ ++ static PBX::PBXProductType xcodeProductType(const ProductData &product); ++ ++protected: ++ XcodeGenerator(); ++ ++ // TODO: Move to base class ++ virtual void setupGenerator(); ++ bool m_multipleProfiles; ++ QString m_projectName; ++ QFileInfo m_qbsProjectFile; ++ QDir m_baseBuildDirectory; ++ QMap m_productGroups; ++}; ++ ++} ++ ++#endif // QBS_XCODEGENERATOR_H +diff --git a/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp b/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp +new file mode 100644 +index 0000000..7654b8f +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodenativegenerator.cpp +@@ -0,0 +1,58 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodenativegenerator.h" ++ ++#include "pbx.h" ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++XcodeNativeGenerator::XcodeNativeGenerator() ++{ ++} ++ ++QString XcodeNativeGenerator::generatorName() const ++{ ++ return QLatin1String("xcode"); ++} ++ ++void XcodeNativeGenerator::generate(const InstallOptions &installOptions) ++{ ++ XcodeGenerator::generate(installOptions); ++} ++ ++PBXTarget *XcodeNativeGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ return XcodeGenerator::xcodeTargetForProduct(xcodeProject, product) ?: new PBXLegacyTarget(xcodeProject); ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodenativegenerator.h b/src/lib/corelib/generators/xcode/xcodenativegenerator.h +new file mode 100644 +index 0000000..a04f8df +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodenativegenerator.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef QBS_XCODENATIVEGENERATOR_H ++#define QBS_XCODENATIVEGENERATOR_H ++ ++#include "xcodegenerator.h" ++#include ++ ++namespace qbs { ++ ++class XcodeNativeGenerator : public XcodeGenerator ++{ ++public: ++ XcodeNativeGenerator(); ++ ++ QString generatorName() const; ++ ++ void generate(const InstallOptions &installOptions); ++ PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++}; ++ ++} ++ ++#endif // QBS_XCODENATIVEGENERATOR_H +diff --git a/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp b/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp +new file mode 100644 +index 0000000..e1bceca +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodesimplegenerator.cpp +@@ -0,0 +1,58 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcodesimplegenerator.h" ++ ++#include "pbx.h" ++ ++namespace qbs { ++ ++using namespace Internal; ++ ++XcodeSimpleGenerator::XcodeSimpleGenerator() ++{ ++} ++ ++QString XcodeSimpleGenerator::generatorName() const ++{ ++ return QLatin1String("xcode-simple"); ++} ++ ++void XcodeSimpleGenerator::generate(const InstallOptions &installOptions) ++{ ++ XcodeGenerator::generate(installOptions); ++} ++ ++PBXTarget *XcodeSimpleGenerator::xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product) ++{ ++ return XcodeGenerator::xcodeTargetForProduct(xcodeProject, product) ?: new PBXNativeTarget(xcodeProject); ++} ++ ++} +diff --git a/src/lib/corelib/generators/xcode/xcodesimplegenerator.h b/src/lib/corelib/generators/xcode/xcodesimplegenerator.h +new file mode 100644 +index 0000000..66f6419 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcodesimplegenerator.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef QBS_XCODESIMPLEGENERATOR_H ++#define QBS_XCODESIMPLEGENERATOR_H ++ ++#include "xcodegenerator.h" ++#include ++ ++namespace qbs { ++ ++class XcodeSimpleGenerator : public XcodeGenerator ++{ ++public: ++ XcodeSimpleGenerator(); ++ ++ QString generatorName() const; ++ ++ void generate(const InstallOptions &installOptions); ++ PBXTarget *xcodeTargetForProduct(PBXProject *xcodeProject, const ProductData &product); ++}; ++ ++} ++ ++#endif // QBS_XCODESIMPLEGENERATOR_H +diff --git a/src/lib/corelib/generators/xcode/xcscheme.cpp b/src/lib/corelib/generators/xcode/xcscheme.cpp +new file mode 100644 +index 0000000..dbcb994 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcscheme.cpp +@@ -0,0 +1,179 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "pbxobject.h" ++#include "pbxproject.h" ++#include "pbxtarget.h" ++#include "xcscheme.h" ++#include ++#include ++#include ++ ++static const QString yes = QLatin1String("YES"); ++static const QString no = QLatin1String("NO"); ++ ++class XCSchemePrivate ++{ ++public: ++ XCSchemePrivate(); ++ PBXProject *project; ++ PBXTarget *target; ++ bool parallelizeBuildables; ++ bool buildImplicitDependencies; ++ QString customExecutableFilePath; ++}; ++ ++XCSchemePrivate::XCSchemePrivate() ++ : project() ++ , target() ++ , parallelizeBuildables(true) ++ , buildImplicitDependencies(true) ++{ ++} ++ ++XCScheme::XCScheme(QObject *parent) : ++ QObject(parent), d(new XCSchemePrivate) ++{ ++} ++ ++XCScheme::~XCScheme() ++{ ++ delete d; ++} ++ ++PBXProject *XCScheme::project() const ++{ ++ return d->project; ++} ++ ++void XCScheme::setProject(PBXProject *project) ++{ ++ d->project = project; ++} ++ ++PBXTarget *XCScheme::target() const ++{ ++ return d->target; ++} ++ ++void XCScheme::setTarget(PBXTarget *target) ++{ ++ d->target = target; ++} ++ ++bool XCScheme::parallelizeBuildables() const ++{ ++ return d->parallelizeBuildables; ++} ++ ++void XCScheme::setParallelizeBuildables(bool parallelize) ++{ ++ d->parallelizeBuildables = parallelize; ++} ++ ++bool XCScheme::buildImplicitDependencies() const ++{ ++ return d->buildImplicitDependencies; ++} ++ ++void XCScheme::setBuildImplicitDependencies(bool build) ++{ ++ d->buildImplicitDependencies = build; ++} ++ ++QString XCScheme::customExecutableFilePath() const ++{ ++ return d->customExecutableFilePath; ++} ++ ++void XCScheme::setCustomExecutableFilePath(const QString &customExecutableFilePath) ++{ ++ d->customExecutableFilePath = customExecutableFilePath; ++} ++ ++bool XCScheme::serialize(const QString &filePath) ++{ ++ QFile file(filePath); ++ if (file.open(QIODevice::WriteOnly)) { ++ QXmlStreamWriter writer(&file); ++ writer.setAutoFormatting(true); ++ writer.setAutoFormattingIndent(2); ++ ++ writer.writeStartDocument(); ++ writer.writeStartElement(QLatin1String("Scheme")); ++ ++ // now the "actions" ++ writer.writeStartElement(QLatin1String("BuildAction")); ++ writer.writeAttribute(QLatin1String("parallelizeBuildables"), d->parallelizeBuildables ? yes : no); ++ writer.writeAttribute(QLatin1String("buildImplicitDependencies"), d->buildImplicitDependencies ? yes : no); ++ writer.writeStartElement(QLatin1String("BuildActionEntries")); ++ writer.writeStartElement(QLatin1String("BuildActionEntry")); ++ writer.writeAttribute(QLatin1String("buildForTesting"), yes); ++ writer.writeAttribute(QLatin1String("buildForRunning"), yes); ++ writer.writeAttribute(QLatin1String("buildForProfiling"), yes); ++ writer.writeAttribute(QLatin1String("buildForArchiving"), yes); ++ writer.writeAttribute(QLatin1String("buildForAnalyzing"), yes); ++ writer.writeStartElement(QLatin1String("BuildableReference")); ++ writer.writeAttribute(QLatin1String("BuildableIdentifier"), QLatin1String("primary")); ++ ++ QByteArray bytes; ++ bytes.append(QLatin1String("BlueprintIdentifier:")); ++ bytes.append(filePath); ++ ++ writer.writeAttribute(QLatin1String("BlueprintIdentifier"), PBXObject::createIdentifier(bytes)); ++ if (d->target) { ++ writer.writeAttribute(QLatin1String("BuildableName"), d->target->name()); ++ writer.writeAttribute(QLatin1String("BlueprintName"), d->target->name()); ++ } ++ if (d->project) { ++ const QString relativePath = QDir(d->project->projectDirPath()).relativeFilePath(d->project->projectWrapperPath()); ++ writer.writeAttribute(QLatin1String("ReferencedContainer"), QString(QLatin1String("container:%1")).arg(relativePath)); ++ } ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ ++ if (!d->customExecutableFilePath.isEmpty()) { ++ writer.writeStartElement(QLatin1String("LaunchAction")); ++ writer.writeStartElement(QLatin1String("PathRunnable")); ++ writer.writeAttribute(QLatin1String("FilePath"), d->customExecutableFilePath); ++ writer.writeEndElement(); ++ writer.writeEndElement(); ++ } ++ ++ writer.writeEndElement(); ++ writer.writeEndDocument(); ++ ++ return file.error() == QFile::NoError; ++ } ++ ++ return false; ++} +diff --git a/src/lib/corelib/generators/xcode/xcscheme.h b/src/lib/corelib/generators/xcode/xcscheme.h +new file mode 100644 +index 0000000..270cca3 +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcscheme.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCSCHEME_H ++#define XCSCHEME_H ++ ++#include ++ ++class PBXProject; ++class PBXTarget; ++ ++class XCSchemePrivate; ++ ++class XCScheme : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit XCScheme(QObject *parent = 0); ++ virtual ~XCScheme(); ++ ++ PBXProject *project() const; ++ void setProject(PBXProject *project); ++ ++ PBXTarget *target() const; ++ void setTarget(PBXTarget *target); ++ ++ bool parallelizeBuildables() const; ++ void setParallelizeBuildables(bool parallelize); ++ ++ bool buildImplicitDependencies() const; ++ void setBuildImplicitDependencies(bool build); ++ ++ QString customExecutableFilePath() const; ++ void setCustomExecutableFilePath(const QString &customExecutableFilePath); ++ ++ bool serialize(const QString &filePath); ++ ++private: ++ XCSchemePrivate *d; ++}; ++ ++#endif // XCSCHEME_H +diff --git a/src/lib/corelib/generators/xcode/xcsettings.cpp b/src/lib/corelib/generators/xcode/xcsettings.cpp +new file mode 100644 +index 0000000..d34c86e +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcsettings.cpp +@@ -0,0 +1,95 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#include "xcsettings.h" ++ ++#include ++#include ++#include ++ ++class XCSettingsPrivate { ++public: ++ XCSettingsPrivate() ++ : autocreateSchemes() ++ { ++ } ++ ++ bool autocreateSchemes; ++}; ++ ++XCSettings::XCSettings(QObject *parent) ++ : QObject(parent) ++ , d(new XCSettingsPrivate) ++{ ++} ++ ++XCSettings::~XCSettings() ++{ ++ delete d; ++} ++ ++bool XCSettings::autocreateSchemes() const ++{ ++ return d->autocreateSchemes; ++} ++ ++void XCSettings::setAutocreateSchemes(bool autocreateSchemes) ++{ ++ d->autocreateSchemes = autocreateSchemes; ++} ++ ++bool XCSettings::serialize(const QString &filePath) ++{ ++ QFile file(filePath); ++ if (file.open(QIODevice::WriteOnly)) { ++ QXmlStreamWriter writer(&file); ++ writer.setAutoFormatting(true); ++ writer.setAutoFormattingIndent(-1); ++ ++ writer.writeStartDocument(); ++ writer.writeDTD(QLatin1String("")); ++ ++ writer.writeStartElement(QLatin1String("plist")); ++ writer.writeAttribute(QLatin1String("version"), QLatin1String("1.0")); ++ writer.writeStartElement(QLatin1String("dict")); ++ ++ writer.writeTextElement(QLatin1String("key"), QLatin1String("IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded")); ++ writer.writeEmptyElement(d->autocreateSchemes ? QLatin1String("true") : QLatin1String("false")); ++ ++ writer.writeEndElement(); // ++ writer.writeEndElement(); // ++ writer.writeEndDocument(); ++ ++ return file.error() == QFile::NoError; ++ } ++ ++ return false; ++} ++ +diff --git a/src/lib/corelib/generators/xcode/xcsettings.h b/src/lib/corelib/generators/xcode/xcsettings.h +new file mode 100644 +index 0000000..e6f2c5d +--- /dev/null ++++ b/src/lib/corelib/generators/xcode/xcsettings.h +@@ -0,0 +1,54 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Copyright (C) 2015 Jake Petroules. ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the Qt Build Suite. ++** ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++****************************************************************************/ ++ ++#ifndef XCSETTINGS_H ++#define XCSETTINGS_H ++ ++#include ++ ++class XCSettingsPrivate; ++ ++class XCSettings : public QObject ++{ ++ Q_OBJECT ++public: ++ explicit XCSettings(QObject *parent = 0); ++ virtual ~XCSettings(); ++ ++ bool autocreateSchemes() const; ++ void setAutocreateSchemes(bool autocreateSchemes); ++ ++ bool serialize(const QString &filePath); ++ ++private: ++ XCSettingsPrivate *d; ++}; ++ ++#endif // XCSETTINGS_H +diff --git a/src/lib/corelib/tools/projectgeneratormanager.cpp b/src/lib/corelib/tools/projectgeneratormanager.cpp +index 4c62fc0..f5d0f81 100644 +--- a/src/lib/corelib/tools/projectgeneratormanager.cpp ++++ b/src/lib/corelib/tools/projectgeneratormanager.cpp +@@ -39,6 +39,9 @@ + #include + #include + ++#include ++#include ++ + namespace qbs { + + using namespace Internal; +@@ -60,6 +63,8 @@ ProjectGeneratorManager *ProjectGeneratorManager::instance() + ProjectGeneratorManager::ProjectGeneratorManager() + { + QList > generators; ++ generators << QSharedPointer::create(); ++ generators << QSharedPointer::create(); + foreach (QSharedPointer generator, generators) { + m_generators[generator->generatorName()] = generator; + } +-- +2.3.5 + diff --git a/mingw-w64-qbs/0091-Disable-WIP-Xcode-generator.1.4.patch b/mingw-w64-qbs/0091-Disable-WIP-Xcode-generator.1.4.patch new file mode 100644 index 0000000000..a084ce083e --- /dev/null +++ b/mingw-w64-qbs/0091-Disable-WIP-Xcode-generator.1.4.patch @@ -0,0 +1,43 @@ +From b44370455f1bd381034cedd1c128d20fcb9ec674 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 28 Apr 2015 23:39:29 +0100 +Subject: [PATCH 10/10] Disable WIP: Xcode generator + +.. due to linking errors since it was turned +into a plugin: + +undefined reference to 'qbs::XcodeNativeGenerator::XcodeNativeGenerator()' +undefined reference to 'qbs::XcodeSimpleGenerator::XcodeSimpleGenerator()' + +I've not got the time to investigate and fix this +and Jake probably will soon enough anyway. +--- + src/lib/corelib/tools/projectgeneratormanager.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/lib/corelib/tools/projectgeneratormanager.cpp b/src/lib/corelib/tools/projectgeneratormanager.cpp +index f5d0f81..4c62fc0 100644 +--- a/src/lib/corelib/tools/projectgeneratormanager.cpp ++++ b/src/lib/corelib/tools/projectgeneratormanager.cpp +@@ -39,9 +39,6 @@ + #include + #include + +-#include +-#include +- + namespace qbs { + + using namespace Internal; +@@ -63,8 +60,6 @@ ProjectGeneratorManager *ProjectGeneratorManager::instance() + ProjectGeneratorManager::ProjectGeneratorManager() + { + QList > generators; +- generators << QSharedPointer::create(); +- generators << QSharedPointer::create(); + foreach (QSharedPointer generator, generators) { + m_generators[generator->generatorName()] = generator; + } +-- +2.3.5 + diff --git a/mingw-w64-qbs/PKGBUILD b/mingw-w64-qbs/PKGBUILD index 2e616464f8..b6e5a4fc31 100644 --- a/mingw-w64-qbs/PKGBUILD +++ b/mingw-w64-qbs/PKGBUILD @@ -1,11 +1,30 @@ # Maintainer: Alexey Pavlov # Maintainer: Ray Donnelly +# The patches for this package are developed inside the -git package. +# This is for three reasons: +# 1. Upstreaming is easier. +# 2. The Qt devs often forget to release Qbs at the same time as Qt Creator. +# 3. Commit messages are retained (though efforts are made for that via git init) + +# TODO :: Patch this for clang support: +# qbs setup-toolchains --type clang /mingw64/bin/clang.exe clang +# .. will add a profile to %AppData%/QtProject/qbs.ini that contains: +# qt-project\qbs\profiles\clang\qbs\toolchain=clang, llvm, gcc +# .. but is missing: +# qt-project\qbs\profiles\clang\qbs\targetOS=windows +# then in share/qbs/modules/cpp/windows-mingw.qbs we need to change +# condition: qbs.targetOS.contains("windows") && qbs.toolchain.contains("mingw") +# .. to: +# condition: qbs.targetOS.contains("windows") \ +# && (qbs.toolchain.contains("mingw") || qbs.toolchain.contains("gcc")) + _realname=qbs +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.2 +pkgver=1.4.3 pkgrel=1 -_pkgfqn="${_realname}-${pkgver}.src" +_pkgfqn="${_realname}-src-${pkgver}" pkgdesc='Qt Build Suite' url='http://qt-project.org' arch=('any') @@ -13,60 +32,82 @@ depends=("${MINGW_PACKAGE_PREFIX}-qt5") makedepends=("git") options=('docs' 'staticlibs') # '!strip' 'debug') source=("http://download.qt-project.org/official_releases/qbs/${pkgver}/${_pkgfqn}.tar.gz" - #${_realname}-${pkgver}::"git://gitorious.org/qt-labs/qbs.git#tag=v$pkgver" + #${_realname}-${pkgver}::"git://gitorious.org/qt-labs/qbs.git#tag=v${pkgver}" "manifest" - "0001-add-hostosinfo.h-to-installed-headers.patch" - "0002-WIP-Xcode-generator.patch" - "0003-add-generator-header-installs.patch" - "0005-shared-vs-static-extension.patch" - "0006-probe-pretend-msys-is-mingw.patch") -sha256sums=('03ce02bc1e5d6985e79318a7e49b95052166de5fe464c9149ce2828368292a9f' + "0003-add-generator-header-installs.1.4.patch" + "0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch" + "0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch" + "0006-Add-some-missing-files.1.4.patch" + "0008-add-many-files-to-installed-headers.1.4.patch" + "0090-WIP-Xcode-generator.1.4.patch" + "0091-Disable-WIP-Xcode-generator.1.4.patch") +sha256sums=('0c47291ac578c1fc8f2bd6ab20fbeeb58630c4c6ddc085f6081ae570f825f787' '838098b25a8044176b3139b4003594570c62a8d64f5470fbbd769f3bf44e0855' - 'b791b90bd4e49fd0188167c308a3da1773ddc6740d88c385e4f5d811ef0bb117' - '6a4a18fbd710f35ba2515b793b07471fd9d4d954e169e4f5ee6067a22c13f8a3' - '036c5452f19eebfc3c39982b47191e4c4e7ae2ba0e0b23dc818105189f54b441' - 'd6193c98284e3b228a5f2143e95da53768d08d6b229fe71fda6941de2f8f0409' - 'b96dfb92a385cdecfb7795b17292694942f50183613e40564cbe545556a090d6') + '18f1bfe2434ccf97e1366a96b83bdc41bbd4399185bb701d061710b292a5ad59' + '6daa43c65e4ac440470687a31c74ab6d4bdcfa0fb3c195678e62a9f800356b1a' + '1a9499215f4fc8fc9a530a984fe7248ad55720a383ceb0984ad7afb25abda7d6' + '40d53fca4e80ab63baa8649bae43882daf2c91de22412c71dec712ac59f4a39e' + 'f00efb4af427e4de5edb0c46196f0c6192294559c92a309eea6dfd81c0d302c3' + '576d7a6875fc20f4360edea765f8134493ad64a5941afbd92732e841e055b854' + 'ef46ff74aac8aa267a8397d4c02a9481554c45f41748ef8b04ac7ef152d52f22') prepare() { - cd ${_realname}-${pkgver} + cd ${_pkgfqn} [ -d src/plugins/generator ] && rm -rf src/plugins/generator rm -rf src/lib/corelib/api/generator.* rm -rf src/lib/corelib/tools/generat* - patch -p1 < "${srcdir}"/0001-add-hostosinfo.h-to-installed-headers.patch - patch -p1 < "${srcdir}"/0002-WIP-Xcode-generator.patch - patch -p1 < "${srcdir}"/0003-add-generator-header-installs.patch - patch -p1 < "${srcdir}"/0005-shared-vs-static-extension.patch - patch -p1 < "${srcdir}"/0006-probe-pretend-msys-is-mingw.patch + if [ -d .git ]; then + git reset --hard $(git rev-list --max-parents=0 --abbrev-commit HEAD) + else + git init . + git add -A + git commit -m "Initial git import" + fi + + git am "${srcdir}"/0003-add-generator-header-installs.1.4.patch + git am "${srcdir}"/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch + git am "${srcdir}"/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch + git am "${srcdir}"/0006-Add-some-missing-files.1.4.patch + git am "${srcdir}"/0008-add-many-files-to-installed-headers.1.4.patch + #git am "${srcdir}"/0090-WIP-Xcode-generator.1.4.patch + #git am "${srcdir}"/0091-Disable-WIP-Xcode-generator.1.4.patch } build() { -local _config -if check_option "debug" "n"; then - _config="release" -else - _config="debug" -fi - cd ${srcdir}/${_realname}-${pkgver} + local _config + if check_option "debug" "n"; then + _config="release" + else + _config="debug" + fi + cd ${srcdir}/${_pkgfqn} [ -d build-${CARCH} ] && rm -rf build-${CARCH} mkdir build-${CARCH} cd build-${CARCH} - ${MINGW_PREFIX}/bin/qmake.exe ../qbs.pro \ + + export MSYS2_ARG_CONV_EXCL="QBS_INSTALL_PREFIX=" + ${MINGW_PREFIX}/bin/qmake.exe \ + QBS_INSTALL_PREFIX="${MINGW_PREFIX}" \ CONFIG+=${_config} \ - CONFIG+=qbs_enable_project_file_updates + CONFIG+=qbs_enable_project_file_updates \ + ../qbs.pro + + # Because xcodeprojectgenerator has a build order problem. make make docs } package() { - cd ${srcdir}/${_realname}-${pkgver}/build-${CARCH} - make INSTALL_ROOT=${pkgdir}${MINGW_PREFIX} install - make INSTALL_ROOT=${pkgdir}${MINGW_PREFIX} install_docs + cd ${srcdir}/${_pkgfqn}/build-${CARCH} + + export MSYS2_ARG_CONV_EXCL="QBS_INSTALL_PREFIX=" + make INSTALL_ROOT=${pkgdir} install + make INSTALL_ROOT=${pkgdir} install_docs rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.dll - for file in qbs-setup-madde-platforms qbs-setup-qt; do - cp ${srcdir}/manifest ${pkgdir}${MINGW_PREFIX}/bin/${file}.exe.manifest + for ff in qbs-setup-toolchains qbs-setup-qt; do + cp ${srcdir}/manifest ${pkgdir}${MINGW_PREFIX}/bin/${ff}.exe.manifest done } diff --git a/mingw-w64-qca-qt4-git/PKGBUILD b/mingw-w64-qca-qt4-git/PKGBUILD new file mode 100644 index 0000000000..d1025f84cc --- /dev/null +++ b/mingw-w64-qca-qt4-git/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: AlexWMF + +_realname=qca +pkgbase=mingw-w64-${_realname}-qt4-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4-git" +pkgver=2220.66b9754 +pkgrel=1 +pkgdesc="Qt Cryptographic Architecture (mingw-w64)" +arch=('any') +url="http://delta.affinix.com/qca/" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") +depends=("${MINGW_PACKAGE_PREFIX}-ca-certificates" + "${MINGW_PACKAGE_PREFIX}-cyrus-sasl" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gnupg" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-nss" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-qt4") +install=${_realname}-qt4-git-${CARCH}.install +source=("${_realname}"::"git://anongit.kde.org/qca.git" + "cyrus_sasl_linking.patch" + "find_nss_cmake.patch" + "qt4-custom-dirs.patch" + "qca-mingw-pkg-config.patch" + "qca-mingw-custom-certificates.patch") +md5sums=('SKIP' + '89d537c0b449408685ff48f401239544' + '2ce45122eba6d2518f773bc4c5934e32' + '6c216a022e6791e108d3be06eb8ff2bf' + 'ab16edc15378a7221da06de0e989ed09' + 'c6c5d9b2c071e44dd909d9313d8625df') + +pkgver() { + cd ${srcdir}/${_realname} + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_realname}" + patch -p1 -i ${srcdir}/cyrus_sasl_linking.patch + patch -p1 -i ${srcdir}/find_nss_cmake.patch + patch -p1 -i ${srcdir}/qt4-custom-dirs.patch + patch -p1 -i ${srcdir}/qca-mingw-pkg-config.patch + patch -p1 -i ${srcdir}/qca-mingw-custom-certificates.patch +} + +build() { + cd ${srcdir} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;DQC_CERTSTORE_PATH=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=False \ + -DQT4_BUILD=ON \ + -DQCA_SUFFIX=qt4 \ + -DQCA_SYSTEMSTORE_PATH=../ssl/certs/ca-bundle.crt \ + -DQCA_INSTALL_IN_QT_PREFIX=ON \ + ../${_realname} + + make ${MAKEFLAGS} +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-qca-qt4-git/cyrus_sasl_linking.patch b/mingw-w64-qca-qt4-git/cyrus_sasl_linking.patch new file mode 100644 index 0000000000..50ee0ab841 --- /dev/null +++ b/mingw-w64-qca-qt4-git/cyrus_sasl_linking.patch @@ -0,0 +1,13 @@ +--- qca/plugins/qca-cyrus-sasl/qca-cyrus-sasl.cpp.orig 2014-12-13 15:14:30.695884500 +0300 ++++ qca/plugins/qca-cyrus-sasl/qca-cyrus-sasl.cpp 2014-12-13 15:14:48.425898600 +0300 +@@ -24,10 +24,7 @@ + #include + #include + +-extern "C" +-{ + #include +-} + + #include + #include diff --git a/mingw-w64-qca-qt4-git/find_nss_cmake.patch b/mingw-w64-qca-qt4-git/find_nss_cmake.patch new file mode 100644 index 0000000000..af95fa64de --- /dev/null +++ b/mingw-w64-qca-qt4-git/find_nss_cmake.patch @@ -0,0 +1,15 @@ +--- qca/cmake/modules/FindNss.cmake.orig 2014-12-13 15:22:53.153623400 +0300 ++++ qca/cmake/modules/FindNss.cmake 2014-12-13 15:24:46.642114600 +0300 +@@ -17,10 +17,8 @@ + SET(NSS_FOUND TRUE) + + else() +- if(NOT WIN32) +- find_package(PkgConfig) +- pkg_search_module(NSS nss) +- endif(NOT WIN32) ++ find_package(PkgConfig) ++ pkg_search_module(NSS nss) + + if (NSS_FOUND) + if (NOT Nss_FIND_QUIETLY) diff --git a/mingw-w64-qca-qt4-git/qca-mingw-custom-certificates.patch b/mingw-w64-qca-qt4-git/qca-mingw-custom-certificates.patch new file mode 100644 index 0000000000..cb15b31e88 --- /dev/null +++ b/mingw-w64-qca-qt4-git/qca-mingw-custom-certificates.patch @@ -0,0 +1,72 @@ +--- qca/CMakeLists.txt.orig 2015-07-16 11:01:38.665447700 +0300 ++++ qca/CMakeLists.txt 2015-07-16 11:19:17.252578400 +0300 +@@ -277,10 +277,11 @@ + endif (APPLE) + + message(STATUS "Checking for certstore..") ++if(NOT QCA_SYSTEMSTORE_PATH) + # fixme add OR mac +-if( WIN32 ) ++if( MSVC ) + # USE BUILTIN +-else ( WIN32 ) ++else ( MSVC ) + if ( DEFINED ENV{QC_CERTSTORE_PATH} ) + if(EXISTS $ENV{QC_CERTSTORE_PATH}) + set( qca_CERTSTORE $ENV{QC_CERTSTORE_PATH}) +@@ -302,7 +303,9 @@ + endif(EXISTS ${_current_try}) + endforeach (_current_try) + endif( DEFINED ENV{QC_CERTSTORE_PATH} ) +-endif(WIN32) ++else() ++ set( qca_CERTSTORE ${QCA_SYSTEMSTORE_PATH}) ++endif(MSVC) + + if (qca_CERTSTORE) + message(STATUS "Found system certstore") +@@ -316,6 +317,10 @@ + endif (qca_CERTSTORE) + message(STATUS "certstore path: " ${qca_CERTSTORE}) + add_definitions( -DQCA_SYSTEMSTORE_PATH="${qca_CERTSTORE}" ) ++else() ++message(STATUS "certstore path: " ${QCA_SYSTEMSTORE_PATH}) ++add_definitions( -DQCA_SYSTEMSTORE_PATH="${qca_CERTSTORE}" ) ++endif() + + + set( private_HEADERS ${qca_INCLUDEDIR}/QtCrypto/qca_plugin.h ${qca_INCLUDEDIR}/QtCrypto/qca_systemstore.h ) +--- qca/src/CMakeLists.txt.orig 2015-07-16 11:09:16.212688400 +0300 ++++ qca/src/CMakeLists.txt 2015-07-16 11:16:34.878817400 +0300 +@@ -52,7 +52,7 @@ + support/syncthread.cpp + ) + +-IF (WIN32) ++IF (WIN32 AND NOT MINGW) + SET( nonmoc_SOURCES ${nonmoc_SOURCES} qca_systemstore_win.cpp ) + elseif(APPLE) + set( nonmoc_SOURCES ${nonmoc_SOURCES} qca_systemstore_mac.cpp) +--- qca/src/qca_systemstore_flatfile.cpp.orig 2015-07-16 11:16:51.678137300 +0300 ++++ qca/src/qca_systemstore_flatfile.cpp 2015-07-16 11:35:28.073486600 +0300 +@@ -21,6 +21,7 @@ + #include "qca_systemstore.h" + + #include ++#include + + namespace QCA { + +@@ -32,7 +32,12 @@ + + CertificateCollection qca_get_systemstore(const QString &provider) + { ++#ifdef Q_OS_WIN ++ QString certstore = QString("%1%2").arg(QCoreApplication::applicationDirPath()).arg(QCA_SYSTEMSTORE_PATH); ++ return CertificateCollection::fromFlatTextFile(certstore, 0, provider); ++#else + return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); ++#endif + } + + } diff --git a/mingw-w64-qca-qt4-git/qca-mingw-pkg-config.patch b/mingw-w64-qca-qt4-git/qca-mingw-pkg-config.patch new file mode 100644 index 0000000000..a6634b22d8 --- /dev/null +++ b/mingw-w64-qca-qt4-git/qca-mingw-pkg-config.patch @@ -0,0 +1,20 @@ +--- qca/CMakeLists.txt.orig 2015-07-16 11:01:38.665447700 +0300 ++++ qca/CMakeLists.txt 2015-07-16 11:19:17.252578400 +0300 +@@ -222,7 +222,7 @@ + endif() + endforeach() + +-if(NOT WIN32) ++if(NOT MSVC) + if(OSX_FRAMEWORK) + set(PKGCONFIG_CFLAGS "-F\${libdir} -I\${libdir}/${QCA_LIB_NAME}.framework/Headers") + set(PKGCONFIG_LIBS "-F\${libdir} -framework ${QCA_LIB_NAME}") +@@ -236,7 +236,7 @@ + if(NOT DEVELOPER_MODE) + install(FILES "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}" DESTINATION ${PKGCONFIG_INSTALL_PREFIX}) + endif() +-endif(NOT WIN32) ++endif(NOT MSVC) + + # strip CMAKE_INSTALL_PREFIX in all paths + if(USE_RELATIVE_PATHS) diff --git a/mingw-w64-qca-qt4-git/qca-qt4-git-i686.install b/mingw-w64-qca-qt4-git/qca-qt4-git-i686.install new file mode 100644 index 0000000000..ff86c83741 --- /dev/null +++ b/mingw-w64-qca-qt4-git/qca-qt4-git-i686.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/Qca/*.cmake; do + sed -s "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca-qt4-git/qca-qt4-git-x86_64.install b/mingw-w64-qca-qt4-git/qca-qt4-git-x86_64.install new file mode 100644 index 0000000000..8ffc42c5bc --- /dev/null +++ b/mingw-w64-qca-qt4-git/qca-qt4-git-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/Qca/*.cmake; do + sed -s "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca-qt4-git/qt4-custom-dirs.patch b/mingw-w64-qca-qt4-git/qt4-custom-dirs.patch new file mode 100644 index 0000000000..76ccf2db40 --- /dev/null +++ b/mingw-w64-qca-qt4-git/qt4-custom-dirs.patch @@ -0,0 +1,60 @@ +--- qca/CMakeLists.txt.orig 2014-12-13 15:22:53.153623400 +0300 ++++ qca/CMakeLists.txt 2014-12-13 15:24:46.642114600 +0300 +@@ -73,6 +73,16 @@ + # properly set up compile flags (QT_DEBUG/QT_NO_DEBUG, ...) + include(${QT_USE_FILE}) + setup_qt4_dirs() ++ if(MINGW) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_LIBRARY_DIR}" OUTPUT_VARIABLE QT_LIBRARY_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PREFIX_DIR}" OUTPUT_VARIABLE QT_PREFIX_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PLUGINS_DIR}" OUTPUT_VARIABLE QT_PLUGINS_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_BINARY_DIR}" OUTPUT_VARIABLE QT_BINARY_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_HEADERS_DIR}" OUTPUT_VARIABLE QT_HEADERS_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DOC_DIR}" OUTPUT_VARIABLE QT_DOC_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DATA_DIR}" OUTPUT_VARIABLE QT_DATA_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_ARCHDATA_DIR}" OUTPUT_VARIABLE QT_ARCHDATA_DIR ) ++ endif() + set(QCA_QT_PC_VERSION "QtCore") + endif() + +@@ -183,7 +183,7 @@ + set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}" CACHE PATH "Directory where qca plugins will install") + set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install") + set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install") +- set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install") ++ set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/qt4/mkspecs/features" CACHE PATH "Directory where qca feature file will install") + if(NOT QCA_SUFFIX) + set(QCA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca public headers will install") + set(QCA_PRIVATE_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca headers will install") +--- qca/cmake/modules/QcaMacro.cmake.orig 2015-07-16 12:12:02.018070200 +0300 ++++ qca/cmake/modules/QcaMacro.cmake 2015-07-16 12:12:16.385633300 +0300 +@@ -20,14 +20,29 @@ + EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DOCS" OUTPUT_VARIABLE QT_DOC_DIR ) + EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DATA" OUTPUT_VARIABLE QT_DATA_DIR ) + EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_ARCHDATA" OUTPUT_VARIABLE QT_ARCHDATA_DIR ) ++ ++ if(MINGW) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_LIBRARY_DIR}" OUTPUT_VARIABLE QT_LIBRARY_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PREFIX_DIR}" OUTPUT_VARIABLE QT_PREFIX_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PLUGINS_DIR}" OUTPUT_VARIABLE QT_PLUGINS_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_BINARY_DIR}" OUTPUT_VARIABLE QT_BINARY_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_HEADERS_DIR}" OUTPUT_VARIABLE QT_HEADERS_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DOC_DIR}" OUTPUT_VARIABLE QT_DOC_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DATA_DIR}" OUTPUT_VARIABLE QT_DATA_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_ARCHDATA_DIR}" OUTPUT_VARIABLE QT_ARCHDATA_DIR ) ++ endif() ++ + SET( QT_MKSPECS_DIR "${QT_ARCHDATA_DIR}/mkspecs" ) + ENDMACRO(SETUP_QT5_DIRS) + ELSE (Qt5Core_FOUND) + # Cmake FindQt4 module doesn't provide QT_INSTALL_PREFIX and QT_INSTALL_DATA vars + # It will be done here + MACRO(SETUP_QT4_DIRS) + _qt4_query_qmake(QT_INSTALL_PREFIX QT_PREFIX_DIR) + _qt4_query_qmake(QT_INSTALL_DATA QT_DATA_DIR) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PREFIX_DIR}" OUTPUT_VARIABLE QT_PREFIX_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DATA_DIR}" OUTPUT_VARIABLE QT_DATA_DIR ) ++ SET( QT_MKSPECS_DIR "${QT_PREFIX_DIR}/share/qt4/mkspecs" ) + ENDMACRO(SETUP_QT4_DIRS) + ENDIF() + diff --git a/mingw-w64-qca-qt5-git/PKGBUILD b/mingw-w64-qca-qt5-git/PKGBUILD new file mode 100644 index 0000000000..a4fc9358d1 --- /dev/null +++ b/mingw-w64-qca-qt5-git/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: AlexWMF + +_realname=qca +pkgbase=mingw-w64-${_realname}-qt5-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git" +pkgver=2219.4fd11c4 +pkgrel=1 +pkgdesc="Qt Cryptographic Architecture (mingw-w64)" +arch=('any') +url="http://delta.affinix.com/qca/" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") +depends=("${MINGW_PACKAGE_PREFIX}-ca-certificates" + "${MINGW_PACKAGE_PREFIX}-cyrus-sasl" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-gnupg" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-nss" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-qt5") +install=${_realname}-qt5-git-${CARCH}.install +source=("${_realname}"::"git://anongit.kde.org/qca.git" + "cyrus_sasl_linking.patch" + "find_nss_cmake.patch" + "qt5-custom-dirs.patch" + "qca-mingw-pkg-config.patch" + "qca-mingw-custom-certificates.patch") +md5sums=('SKIP' + '89d537c0b449408685ff48f401239544' + '2ce45122eba6d2518f773bc4c5934e32' + 'd7aa8839528f2ec51d2a1d39fa0e38f4' + 'ab16edc15378a7221da06de0e989ed09' + 'c6c5d9b2c071e44dd909d9313d8625df') + +pkgver() { + cd ${srcdir}/${_realname} + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_realname}" + patch -p1 -i ${srcdir}/cyrus_sasl_linking.patch + patch -p1 -i ${srcdir}/find_nss_cmake.patch + patch -p1 -i ${srcdir}/qt5-custom-dirs.patch + patch -p1 -i ${srcdir}/qca-mingw-pkg-config.patch + patch -p1 -i ${srcdir}/qca-mingw-custom-certificates.patch +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + #QC_CERTSTORE_PATH=${MINGW_PREFIX}/ssl/certs/ca-bundle.crt + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;DQC_CERTSTORE_PATH=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=False \ + -DQT4_BUILD=OFF \ + -DQCA_SUFFIX=qt5 \ + -DQCA_SYSTEMSTORE_PATH=../ssl/certs/ca-bundle.crt \ + -DQCA_INSTALL_IN_QT_PREFIX=ON \ + ../${_realname} + + make ${MAKEFLAGS} +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-qca-qt5-git/cyrus_sasl_linking.patch b/mingw-w64-qca-qt5-git/cyrus_sasl_linking.patch new file mode 100644 index 0000000000..50ee0ab841 --- /dev/null +++ b/mingw-w64-qca-qt5-git/cyrus_sasl_linking.patch @@ -0,0 +1,13 @@ +--- qca/plugins/qca-cyrus-sasl/qca-cyrus-sasl.cpp.orig 2014-12-13 15:14:30.695884500 +0300 ++++ qca/plugins/qca-cyrus-sasl/qca-cyrus-sasl.cpp 2014-12-13 15:14:48.425898600 +0300 +@@ -24,10 +24,7 @@ + #include + #include + +-extern "C" +-{ + #include +-} + + #include + #include diff --git a/mingw-w64-qca-qt5-git/find_nss_cmake.patch b/mingw-w64-qca-qt5-git/find_nss_cmake.patch new file mode 100644 index 0000000000..af95fa64de --- /dev/null +++ b/mingw-w64-qca-qt5-git/find_nss_cmake.patch @@ -0,0 +1,15 @@ +--- qca/cmake/modules/FindNss.cmake.orig 2014-12-13 15:22:53.153623400 +0300 ++++ qca/cmake/modules/FindNss.cmake 2014-12-13 15:24:46.642114600 +0300 +@@ -17,10 +17,8 @@ + SET(NSS_FOUND TRUE) + + else() +- if(NOT WIN32) +- find_package(PkgConfig) +- pkg_search_module(NSS nss) +- endif(NOT WIN32) ++ find_package(PkgConfig) ++ pkg_search_module(NSS nss) + + if (NSS_FOUND) + if (NOT Nss_FIND_QUIETLY) diff --git a/mingw-w64-qca-qt5-git/qca-mingw-custom-certificates.patch b/mingw-w64-qca-qt5-git/qca-mingw-custom-certificates.patch new file mode 100644 index 0000000000..cb15b31e88 --- /dev/null +++ b/mingw-w64-qca-qt5-git/qca-mingw-custom-certificates.patch @@ -0,0 +1,72 @@ +--- qca/CMakeLists.txt.orig 2015-07-16 11:01:38.665447700 +0300 ++++ qca/CMakeLists.txt 2015-07-16 11:19:17.252578400 +0300 +@@ -277,10 +277,11 @@ + endif (APPLE) + + message(STATUS "Checking for certstore..") ++if(NOT QCA_SYSTEMSTORE_PATH) + # fixme add OR mac +-if( WIN32 ) ++if( MSVC ) + # USE BUILTIN +-else ( WIN32 ) ++else ( MSVC ) + if ( DEFINED ENV{QC_CERTSTORE_PATH} ) + if(EXISTS $ENV{QC_CERTSTORE_PATH}) + set( qca_CERTSTORE $ENV{QC_CERTSTORE_PATH}) +@@ -302,7 +303,9 @@ + endif(EXISTS ${_current_try}) + endforeach (_current_try) + endif( DEFINED ENV{QC_CERTSTORE_PATH} ) +-endif(WIN32) ++else() ++ set( qca_CERTSTORE ${QCA_SYSTEMSTORE_PATH}) ++endif(MSVC) + + if (qca_CERTSTORE) + message(STATUS "Found system certstore") +@@ -316,6 +317,10 @@ + endif (qca_CERTSTORE) + message(STATUS "certstore path: " ${qca_CERTSTORE}) + add_definitions( -DQCA_SYSTEMSTORE_PATH="${qca_CERTSTORE}" ) ++else() ++message(STATUS "certstore path: " ${QCA_SYSTEMSTORE_PATH}) ++add_definitions( -DQCA_SYSTEMSTORE_PATH="${qca_CERTSTORE}" ) ++endif() + + + set( private_HEADERS ${qca_INCLUDEDIR}/QtCrypto/qca_plugin.h ${qca_INCLUDEDIR}/QtCrypto/qca_systemstore.h ) +--- qca/src/CMakeLists.txt.orig 2015-07-16 11:09:16.212688400 +0300 ++++ qca/src/CMakeLists.txt 2015-07-16 11:16:34.878817400 +0300 +@@ -52,7 +52,7 @@ + support/syncthread.cpp + ) + +-IF (WIN32) ++IF (WIN32 AND NOT MINGW) + SET( nonmoc_SOURCES ${nonmoc_SOURCES} qca_systemstore_win.cpp ) + elseif(APPLE) + set( nonmoc_SOURCES ${nonmoc_SOURCES} qca_systemstore_mac.cpp) +--- qca/src/qca_systemstore_flatfile.cpp.orig 2015-07-16 11:16:51.678137300 +0300 ++++ qca/src/qca_systemstore_flatfile.cpp 2015-07-16 11:35:28.073486600 +0300 +@@ -21,6 +21,7 @@ + #include "qca_systemstore.h" + + #include ++#include + + namespace QCA { + +@@ -32,7 +32,12 @@ + + CertificateCollection qca_get_systemstore(const QString &provider) + { ++#ifdef Q_OS_WIN ++ QString certstore = QString("%1%2").arg(QCoreApplication::applicationDirPath()).arg(QCA_SYSTEMSTORE_PATH); ++ return CertificateCollection::fromFlatTextFile(certstore, 0, provider); ++#else + return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); ++#endif + } + + } diff --git a/mingw-w64-qca-qt5-git/qca-mingw-pkg-config.patch b/mingw-w64-qca-qt5-git/qca-mingw-pkg-config.patch new file mode 100644 index 0000000000..a6634b22d8 --- /dev/null +++ b/mingw-w64-qca-qt5-git/qca-mingw-pkg-config.patch @@ -0,0 +1,20 @@ +--- qca/CMakeLists.txt.orig 2015-07-16 11:01:38.665447700 +0300 ++++ qca/CMakeLists.txt 2015-07-16 11:19:17.252578400 +0300 +@@ -222,7 +222,7 @@ + endif() + endforeach() + +-if(NOT WIN32) ++if(NOT MSVC) + if(OSX_FRAMEWORK) + set(PKGCONFIG_CFLAGS "-F\${libdir} -I\${libdir}/${QCA_LIB_NAME}.framework/Headers") + set(PKGCONFIG_LIBS "-F\${libdir} -framework ${QCA_LIB_NAME}") +@@ -236,7 +236,7 @@ + if(NOT DEVELOPER_MODE) + install(FILES "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}" DESTINATION ${PKGCONFIG_INSTALL_PREFIX}) + endif() +-endif(NOT WIN32) ++endif(NOT MSVC) + + # strip CMAKE_INSTALL_PREFIX in all paths + if(USE_RELATIVE_PATHS) diff --git a/mingw-w64-qca-qt5-git/qca-qt5-git-i686.install b/mingw-w64-qca-qt5-git/qca-qt5-git-i686.install new file mode 100644 index 0000000000..ff86c83741 --- /dev/null +++ b/mingw-w64-qca-qt5-git/qca-qt5-git-i686.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/Qca/*.cmake; do + sed -s "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca-qt5-git/qca-qt5-git-x86_64.install b/mingw-w64-qca-qt5-git/qca-qt5-git-x86_64.install new file mode 100644 index 0000000000..8ffc42c5bc --- /dev/null +++ b/mingw-w64-qca-qt5-git/qca-qt5-git-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/Qca/*.cmake; do + sed -s "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca-qt5-git/qt5-custom-dirs.patch b/mingw-w64-qca-qt5-git/qt5-custom-dirs.patch new file mode 100644 index 0000000000..57d92e121b --- /dev/null +++ b/mingw-w64-qca-qt5-git/qt5-custom-dirs.patch @@ -0,0 +1,42 @@ +--- qca/CMakeLists.txt.orig 2014-12-13 15:22:53.153623400 +0300 ++++ qca/CMakeLists.txt 2014-12-13 15:24:46.642114600 +0300 +@@ -183,7 +183,7 @@ + set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}" CACHE PATH "Directory where qca plugins will install") + set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install") + set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install") +- set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install") ++ set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/qt5/mkspecs/features" CACHE PATH "Directory where qca feature file will install") + if(NOT QCA_SUFFIX) + set(QCA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca public headers will install") + set(QCA_PRIVATE_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca headers will install") +--- qca/cmake/modules/QcaMacro.cmake.orig 2014-12-13 15:22:53.153623400 +0300 ++++ qca/cmake/modules/QcaMacro.cmake 2014-12-13 15:24:46.642114600 +0300 +@@ -28,6 +28,7 @@ + MACRO(SETUP_QT4_DIRS) + _qt4_query_qmake(QT_INSTALL_PREFIX QT_PREFIX_DIR) + _qt4_query_qmake(QT_INSTALL_DATA QT_DATA_DIR) ++ SET( QT_MKSPECS_DIR "${QT_INSTALL_PREFIX}/share/qt5/mkspecs" ) + ENDMACRO(SETUP_QT4_DIRS) + ENDIF() + +--- qca/cmake/modules/QcaMacro.cmake.orig 2015-07-16 12:12:02.018070200 +0300 ++++ qca/cmake/modules/QcaMacro.cmake 2015-07-16 12:12:16.385633300 +0300 +@@ -20,6 +20,18 @@ + EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DOCS" OUTPUT_VARIABLE QT_DOC_DIR ) + EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DATA" OUTPUT_VARIABLE QT_DATA_DIR ) + EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_ARCHDATA" OUTPUT_VARIABLE QT_ARCHDATA_DIR ) ++ ++ if(MINGW) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_LIBRARY_DIR}" OUTPUT_VARIABLE QT_LIBRARY_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PREFIX_DIR}" OUTPUT_VARIABLE QT_PREFIX_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_PLUGINS_DIR}" OUTPUT_VARIABLE QT_PLUGINS_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_BINARY_DIR}" OUTPUT_VARIABLE QT_BINARY_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_HEADERS_DIR}" OUTPUT_VARIABLE QT_HEADERS_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DOC_DIR}" OUTPUT_VARIABLE QT_DOC_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_DATA_DIR}" OUTPUT_VARIABLE QT_DATA_DIR ) ++ EXEC_PROGRAM( "cygpath" ARGS "-u ${QT_ARCHDATA_DIR}" OUTPUT_VARIABLE QT_ARCHDATA_DIR ) ++ endif() ++ + SET( QT_MKSPECS_DIR "${QT_ARCHDATA_DIR}/mkspecs" ) + ENDMACRO(SETUP_QT5_DIRS) + ELSE (Qt5Core_FOUND) diff --git a/mingw-w64-qemu/001-time-functions.patch b/mingw-w64-qemu/001-time-functions.patch index 64fc322250..aad399ff43 100644 --- a/mingw-w64-qemu/001-time-functions.patch +++ b/mingw-w64-qemu/001-time-functions.patch @@ -1,6 +1,6 @@ --- qemu-2.1.2/include/sysemu/os-win32.h.orig 2014-10-28 10:55:39.691000000 +0300 +++ qemu-2.1.2/include/sysemu/os-win32.h 2014-10-28 10:56:00.439000000 +0300 -@@ -75,6 +75,7 @@ +@@ -75,11 +75,13 @@ /* Declaration of ffs() is missing in MinGW's strings.h. */ int ffs(int i); @@ -8,11 +8,9 @@ /* Missing POSIX functions. Don't use MinGW-w64 macros. */ #undef gmtime_r struct tm *gmtime_r(const time_t *timep, struct tm *result); -@@ -82,6 +83,7 @@ + #undef localtime_r struct tm *localtime_r(const time_t *timep, struct tm *result); - - char *strtok_r(char *str, const char *delim, char **saveptr); +#endif + static inline void os_setup_signal_handling(void) {} - static inline void os_daemonize(void) {} diff --git a/mingw-w64-qemu/PKGBUILD b/mingw-w64-qemu/PKGBUILD index 5088b0ea4b..834f4808ae 100644 --- a/mingw-w64-qemu/PKGBUILD +++ b/mingw-w64-qemu/PKGBUILD @@ -1,44 +1,46 @@ # Maintainer: Martell Malone _realname=qemu - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" - -pkgver=2.1.2 +pkgver=2.4.0 pkgrel=1 pkgdesc="A generic and open source processor emulator (mingw-w64)" arch=('any') license=('GPL2' 'LGPL2') url="http://qemu.org" -makedepends=('perl' 'python2' 'bison') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-python2" + 'perl' 'bison') depends=("${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-libjpeg" "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libssh2" + "${MINGW_PACKAGE_PREFIX}-libssh2" #"${MINGW_PACKAGE_PREFIX}-libusb" "${MINGW_PACKAGE_PREFIX}-lzo2" - "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-pixman" "${MINGW_PACKAGE_PREFIX}-snappy" "${MINGW_PACKAGE_PREFIX}-SDL2") source=(http://wiki.qemu.org/download/${_realname}-${pkgver}.tar.bz2 001-time-functions.patch) -md5sums=('0ff197c4ed4b695620bc4734e77c888f' - '455e088562ac76945feb9252baa1a9fd') +md5sums=('186ee8194140a484a455f8e3c74589f4' + 'f663b8a1e192f5169604b565fad938de') options=('!strip' 'debug') - _pkgfqn="${_realname}-${pkgver}" noextract=(${_pkgfqn}.tar.bz2) + prepare() { - cd $startdir/ - [ -d ${srcdir}/${_pkgfqn} ] && rm -rf ${srcdir}/${_pkgfqn} - tar -xjf ${startdir}/${_pkgfqn}.tar.bz2 -C $srcdir || true - + [[ -d ${srcdir}/${_pkgfqn} ]] && rm -rf ${srcdir}/${_pkgfqn} + tar -xjf ${srcdir}/${_pkgfqn}.tar.bz2 -C ${srcdir} || true + cd ${srcdir}/${_pkgfqn} patch -p1 -i ${srcdir}/001-time-functions.patch } build() { - export CC=${MINGW_PREFIX}/bin/gcc export CXX=${MINGW_PREFIX}/bin/g++ @@ -50,9 +52,9 @@ build() { extra_config+=("--disable-strip") fi - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ - --host-cc=$CC \ + --host-cc=${CC} \ --python=${MINGW_PREFIX}/bin/python2 \ --datadir=${MINGW_PREFIX}/etc/qemu \ --mandir=${MINGW_PREFIX}/share/qemu \ @@ -63,7 +65,8 @@ build() { --enable-lzo \ --enable-snappy \ --disable-docs \ - --disable-gtk \ + --enable-gtk \ + --with-gtkabi=3.0 \ --disable-xen \ --disable-smartcard-nss \ --disable-vnc-sasl \ @@ -71,7 +74,6 @@ build() { --disable-libusb \ --disable-bluez \ --disable-spice \ - --target-list=x86_64-softmmu,arm-softmmu,i386-softmmu \ "${extra_config[@]}" make diff --git a/mingw-w64-qhull-git/mingw-cmake.patch b/mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch similarity index 68% rename from mingw-w64-qhull-git/mingw-cmake.patch rename to mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch index a8b405f2cb..d82047fc89 100644 --- a/mingw-w64-qhull-git/mingw-cmake.patch +++ b/mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch @@ -1,6 +1,17 @@ ---- qhull/CMakeLists.txt.orig 2014-04-06 09:50:11.840200000 +0400 -+++ qhull/CMakeLists.txt 2014-04-06 09:53:38.181400000 +0400 -@@ -58,7 +58,7 @@ +From d9d43d26305f28e40b4b292edbe53c678f38c149 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 26 Jan 2015 10:24:48 +0000 +Subject: [PATCH 1/2] MSYS2: Adopt FHS layout in cmake + +--- + CMakeLists.txt | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 98dbc70..7ec7e5b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,7 @@ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) endif() if(MAN_INSTALL_DIR) else() @@ -9,7 +20,7 @@ set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/man/man1) else() set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man/man1) -@@ -66,7 +66,7 @@ +@@ -66,7 +66,7 @@ else() endif() if(DOC_INSTALL_DIR) else() @@ -18,7 +29,7 @@ set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/doc) else() set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull) -@@ -423,9 +423,9 @@ +@@ -423,9 +423,9 @@ install(TARGETS ${qhull_TARGETS_INSTALL} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) @@ -31,3 +42,6 @@ install(FILES html/qhull.man DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1) install(FILES html/rbox.man DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1) install(FILES ${doc_FILES} DESTINATION ${DOC_INSTALL_DIR}) +-- +2.2.2 + diff --git a/mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch b/mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch new file mode 100644 index 0000000000..d366c1b9ef --- /dev/null +++ b/mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch @@ -0,0 +1,28 @@ +From 77ffc8ce76b0de8ef36e51b3b0e5ffc3a9bb7a88 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 26 Jan 2015 10:24:31 +0000 +Subject: [PATCH 2/2] MinGW-w64: 64-bit ptr_intT fix + +Change #if _MSC_VER to #if defined(_WIN32) since +the former works for Visual Studio only whereas +the latter also works for GCC and Clang. +--- + src/libqhull/mem.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libqhull/mem.h b/src/libqhull/mem.h +index ad89de8..857aa5f 100644 +--- a/src/libqhull/mem.h ++++ b/src/libqhull/mem.h +@@ -78,7 +78,7 @@ Trace short and quick memory allocations at T5 + Qhull uses int instead of size_t except for system calls such as malloc, qsort, qh_malloc, etc. + This matches Qt convention and is easier to work with. + */ +-#if _MSC_VER && defined(_WIN64) ++#if defined(_WIN32) && defined(_WIN64) + typedef long long ptr_intT; + #else + typedef long ptr_intT; +-- +2.2.2 + diff --git a/mingw-w64-qhull-git/PKGBUILD b/mingw-w64-qhull-git/PKGBUILD index 50cca253ab..e2906066c2 100644 --- a/mingw-w64-qhull-git/PKGBUILD +++ b/mingw-w64-qhull-git/PKGBUILD @@ -1,60 +1,57 @@ # Maintainer: Alexey Pavlov # Contributor: Jürgen Pfeifer +# Contributor: Ray Donnelly _realname=qhull - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgrel=1 pkgver=r113.60d5581 +pkgrel=3 provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgdesc="A general dimension code for computing convex hulls and related structures (mingw-w64)" arch=('any') -url="http://www.${_realname}.org/" +url="http://www.qhull.org/" license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}") options=('strip' 'staticlibs') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -makedepends=("git" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake") -source=("$_realname"::"git://gitorious.org/qhull/qhull.git" - mingw-cmake.patch) +makedepends=("git" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake") +source=(#"${_realname}"::"git://gitorious.org/qhull/qhull.git" + "${_realname}"::"git+https://github.com/manctl/qhull.git" + "0001-MSYS2-Adopt-FHS-layout-in-cmake.patch" + "0002-MinGW-w64-64-bit-ptr_intT-fix.patch") sha1sums=('SKIP' - '6a574af41f6b1b8bacf3fab144c52b0a2bfb4fa4') + 'bfd74f4b8e69100d75e8777554cca2d32b4bad94' + '5494fe7a909fda8842ee1a7c2771cdefb52eda6f') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}"/${_realname} printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd $srcdir/$_realname - patch -p1 -i $srcdir/mingw-cmake.patch + cd "${srcdir}"/${_realname} + git am "${srcdir}"/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch + git am "${srcdir}"/0002-MinGW-w64-64-bit-ptr_intT-fix.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G "MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=ON \ - $srcdir/$_realname + ../${_realname} + make } package() { - cd "$srcdir/build-${CARCH}" - make install # DESTDIR="$pkgdir" + cd "${srcdir}"/build-${CARCH} + make DESTDIR="${pkgdir}" install pushd ${pkgdir}${MINGW_PREFIX}/lib >/dev/null if [ -f lib${_realname}static.a ]; then mv -f lib${_realname}static.a lib${_realname}.a @@ -63,7 +60,7 @@ package() { mv -f lib${_realname}static_p.a lib${_realname}_p.a fi popd >/dev/null - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -pf ${srcdir}/${_realname}/COPYING* \ + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + cp -pf "${srcdir}"/${_realname}/COPYING* \ ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname } diff --git a/mingw-w64-qjson-qt4/PKGBUILD b/mingw-w64-qjson-qt4/PKGBUILD index b9129fefb6..2aa6477c2d 100644 --- a/mingw-w64-qjson-qt4/PKGBUILD +++ b/mingw-w64-qjson-qt4/PKGBUILD @@ -2,43 +2,36 @@ # Contributor: AlexWMF _realname=qjson +pkgbase=mingw-w64-${_realname}-qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4" pkgver=0.8.1 -pkgrel=1 +pkgrel=3 pkgdesc="QJson is a qt-based library that maps JSON data to QVariant objects (mingw-w64)" arch=('any') license=('GPL') url="http://qjson.sourceforge.net" depends=("${MINGW_PACKAGE_PREFIX}-qt4") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") - +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") +install=${_realname}-qt4-${CARCH}.install options=(!strip staticlibs !buildflags) - source=(${_realname}-${pkgver}.tar.gz::"https://github.com/flavio/${_realname}/archive/${pkgver}.tar.gz") md5sums=('4eef13da988edf8f91c260a3e1baeea9') build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ ${srcdir}/${_realname}-${pkgver} - make # VERBOSE=1 + make # VERBOSE=1 } package() { - cd $srcdir/build-${MINGW_CHOST} - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - for f in ${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}/*.cmake; do - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${f} - done + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-qjson-qt4/qjson-qt4-i686.install b/mingw-w64-qjson-qt4/qjson-qt4-i686.install new file mode 100644 index 0000000000..9558fd01f1 --- /dev/null +++ b/mingw-w64-qjson-qt4/qjson-qt4-i686.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/qjson/*.cmake; do + sed -s "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qjson-qt4/qjson-qt4-x86_64.install b/mingw-w64-qjson-qt4/qjson-qt4-x86_64.install new file mode 100644 index 0000000000..6c971d1c95 --- /dev/null +++ b/mingw-w64-qjson-qt4/qjson-qt4-x86_64.install @@ -0,0 +1,12 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/qjson/*.cmake; do + sed -s "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qrupdate-svn/PKGBUILD b/mingw-w64-qrupdate-svn/PKGBUILD index a30c94a890..3adb607efb 100644 --- a/mingw-w64-qrupdate-svn/PKGBUILD +++ b/mingw-w64-qrupdate-svn/PKGBUILD @@ -4,29 +4,28 @@ _realname=qrupdate pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}-svn pkgver=r28 -pkgrel=2 -pkgdesc="qrupdate is a Fortran library for fast updates of QR and Cholesky decompositions." +pkgrel=4 +pkgdesc="qrupdate is a Fortran library for fast updates of QR and Cholesky decompositions (mingw-w64)" arch=('any') provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") url="http://qrupdate.sourceforge.net/" options=('strip' 'staticlibs') license=('GPL' 'LGPL') -groups=("${MINGW_PACKAGE_PREFIX}") makedepends=("subversion" - "${MINGW_PACKAGE_PREFIX}-gcc-fortran") + "${MINGW_PACKAGE_PREFIX}-gcc-fortran") depends=("${MINGW_PACKAGE_PREFIX}-openblas") -source=("$_realname::svn+http://svn.code.sf.net/p/qrupdate/code") +source=("${_realname}::svn+http://svn.code.sf.net/p/qrupdate/code") md5sums=('SKIP') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" local ver="$(svnversion)" printf "r%s" "${ver//[[:alpha:]]}" } build() { mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - cp -pR ../$_realname/* . + cp -pR ../${_realname}/* . make FPICFLAGS="" lib gfortran -shared -o lib${_realname}.dll -Wl,--out-implib,lib${_realname}.dll.a src/*.o -lopenblas -lgfortran } @@ -37,7 +36,7 @@ package() { mkdir -p ${pkgdir}${MINGW_PREFIX}/lib cp -pf lib${_realname}.dll ${pkgdir}${MINGW_PREFIX}/bin cp -pf lib${_realname}*.a ${pkgdir}${MINGW_PREFIX}/lib - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} cp -pf ${srcdir}/${_realname}/COPYING* \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} } diff --git a/mingw-w64-qscintilla/PKGBUILD b/mingw-w64-qscintilla/PKGBUILD new file mode 100644 index 0000000000..a969a27fc9 --- /dev/null +++ b/mingw-w64-qscintilla/PKGBUILD @@ -0,0 +1,143 @@ +# Maintainer: Alexey Pavlov + +_realname=qscintilla +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-python2-${_realname}" + "${MINGW_PACKAGE_PREFIX}-python3-${_realname}" + "${MINGW_PACKAGE_PREFIX}-python-${_realname}-common") +pkgver=2.9 +pkgrel=1 +pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class" +arch=('any') +license=("GPL") +url="http://www.riverbankcomputing.co.uk/software/qscintilla/intro" +depends=("${MINGW_PACKAGE_PREFIX}-qt5") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-python2-pyqt5" + "${MINGW_PACKAGE_PREFIX}-python3-pyqt5") +options=(!strip staticlibs !buildflags) +source=("http://downloads.sourceforge.net/pyqt/QScintilla-gpl-${pkgver}.tar.gz" + 'configure.py-objdir-support.diff' + 'run-command-via-sh.patch' + 'qmake-install-paths.patch') +md5sums=('24659879edf9786f41a9b9268ce3c817' + '7bc3d12ed0cb63970f2fcb18286da2d5' + '2349092e279c02963fc4e5a3cf4b1c63' + '3bcc03bba331e21294f541078c0d9f3e') + +prepare() { + cd QScintilla-gpl-${pkgver} + patch -p1 -i "${srcdir}"/configure.py-objdir-support.diff + patch -p1 -i "${srcdir}"/run-command-via-sh.patch + patch -p1 -i "${srcdir}"/qmake-install-paths.patch + + sed -e "s|%INSTALL_PREFIX%|$(cygpath -wm ${pkgdir})|g" \ + -i Qt4Qt5/qscintilla.pro \ + -i designer-Qt4Qt5/designer.pro +} + +build() { + cd ${srcdir}/QScintilla-gpl-${pkgver}/Qt4Qt5 + ${MINGW_PREFIX}/bin/qmake qscintilla.pro + make + + cd ../designer-Qt4Qt5 + QMAKEFEATURES=../Qt4Qt5/features ${MINGW_PREFIX}/bin/qmake designer.pro INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5/release + make + + cd ../ + cp -rf Python Python2 +} + +package_qscintilla() { + pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class" + depends=("${MINGW_PACKAGE_PREFIX}-qt5") + + cd QScintilla-gpl-${pkgver}/Qt4Qt5 + make install + + cd ../designer-Qt4Qt5 + make install + + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin + mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/ +} + +package_python-qscintilla-common() { + pkgdesc="Common python qscintilla bindings files shared between python3-qscintilla and python2-qscintilla" + depends=("${MINGW_PACKAGE_PREFIX}-qscintilla") + + cd QScintilla-gpl-${pkgver}/Python + make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install + + # Provided by python-qscintilla + rm -rf "${pkgdir}${MINGW_PREFIX}"/lib +} + +package_python3-qscintilla() { + pkgdesc="Python 3.x bindings for QScintilla2" + depends=("${MINGW_PACKAGE_PREFIX}-python-qscintilla-common" "${MINGW_PACKAGE_PREFIX}-python3-pyqt5") + + cd QScintilla-gpl-${pkgver}/Python + QMAKEFEATURES=../Qt4Qt5/features \ + ${MINGW_PREFIX}/bin/python3 configure.py \ + --pyqt=PyQt5 \ + --qsci-incdir=../Qt4Qt5/ \ + --qsci-libdir=../Qt4Qt5/release/ + + make + make INSTALL_ROOT=${pkgdir} install + + rm -rf "${pkgdir}${MINGW_PREFIX}"/share +} + +package_python2-qscintilla() { + pkgdesc="Python 2.x bindings for QScintilla2" + depends=("${MINGW_PACKAGE_PREFIX}-python-qscintilla-common" "${MINGW_PACKAGE_PREFIX}-python2-pyqt5") + + cd QScintilla-gpl-${pkgver}/Python2 + QMAKEFEATURES=../Qt4Qt5/features \ + ${MINGW_PREFIX}/bin/python2 configure.py \ + --pyqt=PyQt5 \ + --qsci-incdir=../Qt4Qt5/ \ + --qsci-libdir=../Qt4Qt5/release/ + + make + make INSTALL_ROOT=${pkgdir} install + + rm -rf "${pkgdir}${MINGW_PREFIX}"/share +} + +### Wrappers + +package_mingw-w64-i686-qscintilla() { + package_qscintilla +} + +package_mingw-w64-i686-python-qscintilla-common() { + package_python-qscintilla-common +} + +package_mingw-w64-i686-python2-qscintilla() { + package_python2-qscintilla +} + +package_mingw-w64-i686-python3-qscintilla() { + package_python3-qscintilla +} + +package_mingw-w64-x86_64-qscintilla() { + package_qscintilla +} + +package_mingw-w64-x86_64-python-qscintilla-common() { + package_python-qscintilla-common +} + +package_mingw-w64-x86_64-python2-qscintilla() { + package_python2-qscintilla +} + +package_mingw-w64-x86_64-python3-qscintilla() { + package_python3-qscintilla +} diff --git a/mingw-w64-qscintilla/configure.py-objdir-support.diff b/mingw-w64-qscintilla/configure.py-objdir-support.diff new file mode 100644 index 0000000000..e0d4923f8f --- /dev/null +++ b/mingw-w64-qscintilla/configure.py-objdir-support.diff @@ -0,0 +1,40 @@ +02_configure.dpatch by Torsten Marek +Updated for Qscintilla 2.8.2 configure.py changes by Scott Kitterman + +patch the configure script for the Python bindings to support object dir +builds +Index: qscintilla2-2.8.3+dfsg/Python/configure.py +=================================================================== +--- qscintilla2-2.8.3+dfsg.orig/Python/configure.py 2014-07-05 10:02:02.318834374 -0400 ++++ qscintilla2-2.8.3+dfsg/Python/configure.py 2014-07-05 10:02:02.306834375 -0400 +@@ -32,6 +32,7 @@ + import optparse + import sys + ++src_dir = os.path.dirname(os.path.abspath(__file__)) + + ############################################################################### + # You shouldn't need to modify anything above this line. +@@ -210,6 +212,8 @@ + "The QScintilla version number could not be determined by " + "reading %s." % sciglobal) + ++ return # Debian: do not check for the installed version, we're good this way. ++ + lib_dir = target_configuration.qsci_lib_dir + if lib_dir is None: + lib_dir = target_configuration.qt_lib_dir +@@ -264,7 +268,12 @@ + the target configuration. + """ + +- return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip' ++ if target_configuration.pyqt_package == 'PyQt5': ++ return os.path.join(src_dir, 'sip/qscimod5.sip') ++ else: ++ return os.path.join(src_dir, 'sip/qscimod4.sip') ++ ++ #return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip' + + def get_sip_installs(self, target_configuration): + """ Return a tuple of the installation directory of the module's .sip diff --git a/mingw-w64-qscintilla/qmake-install-paths.patch b/mingw-w64-qscintilla/qmake-install-paths.patch new file mode 100644 index 0000000000..5014995627 --- /dev/null +++ b/mingw-w64-qscintilla/qmake-install-paths.patch @@ -0,0 +1,65 @@ +--- QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro.orig 2014-12-16 16:07:45.081200000 +0300 ++++ QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro 2014-12-16 16:11:15.116800000 +0300 +@@ -32,6 +32,7 @@ + CONFIG += qt warn_off release thread exceptions + INCLUDEPATH += . ../include ../lexlib ../src + ++PREFIX = %INSTALL_PREFIX% + DEFINES += QSCINTILLA_MAKE_DLL SCINTILLA_QT SCI_LEXER + greaterThan(QT_MAJOR_VERSION, 3) { + CONFIG(staticlib) { +@@ -55,25 +56,29 @@ + #DEFINES += SCI_NAMESPACE + + # Handle both Qt v4 and v3. +-target.path = $$[QT_INSTALL_LIBS] ++winpath = $$system(cygpath -u $$[QT_INSTALL_LIBS]) ++target.path = $$PREFIX$$winpath + isEmpty(target.path) { + target.path = $(QTDIR)/lib + } + +-header.path = $$[QT_INSTALL_HEADERS] ++winpath = $$system(cygpath -u $$[QT_INSTALL_HEADERS]) ++header.path = $$PREFIX$$winpath + header.files = Qsci + isEmpty(header.path) { + header.path = $(QTDIR)/include/Qsci + header.files = Qsci/qsci*.h + } + +-trans.path = $$[QT_INSTALL_TRANSLATIONS] ++winpath = $$system(cygpath -u $$[QT_INSTALL_TRANSLATIONS]) ++trans.path = $$PREFIX$$winpath + trans.files = qscintilla_*.qm + isEmpty(trans.path) { + trans.path = $(QTDIR)/translations + } + +-qsci.path = $$[QT_INSTALL_DATA] ++winpath = $$system(cygpath -u $$[QT_INSTALL_DATA]) ++qsci.path = $$PREFIX$$winpath + qsci.files = ../qsci + isEmpty(qsci.path) { + qsci.path = $(QTDIR) +@@ -82,7 +87,8 @@ + INSTALLS += header trans qsci target + + greaterThan(QT_MAJOR_VERSION, 3) { +- features.path = $$[QT_INSTALL_DATA]/mkspecs/features ++ winpath = $$system(cygpath -u $$[QT_INSTALL_DATA]/mkspecs/features) ++ features.path = $$PREFIX$$winpath + features.files = $$PWD/features/qscintilla2.prf + INSTALLS += features + } +--- QScintilla-gpl-2.8.4/designer-Qt4Qt5/designer.pro.orig 2014-07-11 00:03:19.000000000 +0300 ++++ QScintilla-gpl-2.8.4/designer-Qt4Qt5/designer.pro 2014-12-16 16:53:40.823600000 +0300 +@@ -22,5 +22,7 @@ + HEADERS = qscintillaplugin.h + SOURCES = qscintillaplugin.cpp + +-target.path = $$[QT_INSTALL_PLUGINS]/designer ++PREFIX = %INSTALL_PREFIX% ++winpath = $$system(cygpath -u $$[QT_INSTALL_PLUGINS]/designer) ++target.path = $$PREFIX$$winpath + INSTALLS += target diff --git a/mingw-w64-qscintilla/run-command-via-sh.patch b/mingw-w64-qscintilla/run-command-via-sh.patch new file mode 100644 index 0000000000..6e27f20aea --- /dev/null +++ b/mingw-w64-qscintilla/run-command-via-sh.patch @@ -0,0 +1,127 @@ +--- QScintilla-gpl-2.8.4/Python/configure.py.orig 2014-12-16 11:14:41.265000000 +0300 ++++ QScintilla-gpl-2.8.4/Python/configure.py 2014-12-16 13:01:42.418000000 +0300 +@@ -30,6 +30,7 @@ + import os + import optparse + import sys ++from sysconfig import _POSIX_BUILD + + src_dir = os.path.dirname(os.path.abspath(__file__)) + +@@ -182,6 +183,9 @@ + else: + target_configuration.qsci_sip_dir = target_configuration.pyqt_sip_dir + ++ if "MSYSTEM" in os.environ: ++ target_configuration.qsci_sip_dir = os.popen(' '.join(['cygpath', '--unix', target_configuration.qsci_sip_dir])).readline().strip() ++ + if options.qsci_no_sip_files: + target_configuration.qsci_sip_dir = '' + +@@ -639,13 +643,19 @@ + self.inc_dir = sysconfig.get_python_inc(plat_specific=1) + self.module_dir = sysconfig.get_python_lib(plat_specific=1) + +- if sys.platform == 'win32': ++ if sys.platform == 'win32' and not _POSIX_BUILD: + self.data_dir = sys.prefix + self.lib_dir = sys.prefix + '\\libs' + else: + self.data_dir = sys.prefix + '/share' + self.lib_dir = sys.prefix + '/lib' + ++ if _POSIX_BUILD and "MSYSTEM" in os.environ: ++ self.inc_dir = os.popen(' '.join(['cygpath', '--unix', self.inc_dir])).readline().strip() ++ self.module_dir = os.popen(' '.join(['cygpath', '--unix', self.module_dir])).readline().strip() ++ self.data_dir = os.popen(' '.join(['cygpath', '--unix', self.data_dir])).readline().strip() ++ self.lib_dir = os.popen(' '.join(['cygpath', '--unix', self.lib_dir])).readline().strip() ++ + + class _TargetQtConfiguration: + """ A container for the target Qt configuration. """ +@@ -697,7 +707,9 @@ + + # The default qmake spec. + if self.py_platform == 'win32': +- if self.py_version >= 0x030300: ++ if _POSIX_BUILD: ++ self.qmake_spec = "win32-g++" ++ elif self.py_version >= 0x030300: + self.qmake_spec = 'win32-msvc2010' + elif self.py_version >= 0x020600: + self.qmake_spec = 'win32-msvc2008' +@@ -709,6 +721,18 @@ + # Use the Qt default. (We may update it for MacOS/X later.) + self.qmake_spec = '' + ++ # Get the details of the Python interpreter library. ++ py_major = self.py_version >> 16 ++ py_minor = (self.py_version >> 8) & 0x0ff ++ if sys.platform == 'win32' and not _POSIX_BUILD: ++ pylib_lib = 'python%d%d' % (py_major, py_minor) ++ pylib_dir = self.py_lib_dir ++ else: ++ abi = getattr(sys, 'abiflags', '') ++ pylib_lib = 'python%d.%d%s' % (py_major, py_minor, abi) ++ ++ self.py_pylib_lib = pylib_lib ++ + # Remaining values. + self.pyqt_sip_flags = None + self.pyqt_version_str = '' +@@ -797,6 +821,8 @@ + self.py_inc_dir = parser.get(section, 'py_inc_dir', self.py_inc_dir) + self.py_pylib_dir = parser.get(section, 'py_pylib_dir', + self.py_pylib_dir) ++ self.py_pylib_lib = parser.get(section, 'py_pylib_lib', ++ self.py_pylib_lib) + + self.sip_inc_dir = self.py_inc_dir + +@@ -973,6 +999,11 @@ + self.qt_inc_dir = qt_config.QT_INSTALL_HEADERS + self.qt_lib_dir = qt_config.QT_INSTALL_LIBS + ++ if "MSYSTEM" in os.environ: ++ self.api_dir = os.popen(' '.join(['cygpath', '--unix', self.api_dir])).readline().strip() ++ self.qt_inc_dir = os.popen(' '.join(['cygpath', '--unix', self.qt_inc_dir])).readline().strip() ++ self.qt_lib_dir = os.popen(' '.join(['cygpath', '--unix', self.qt_lib_dir])).readline().strip() ++ + if self.sysroot == '': + self.sysroot = getattr(qt_config, 'QT_SYSROOT', '') + +@@ -1121,7 +1152,7 @@ + default=None, action='store', metavar="FLAGS", + help="the sip flags used to build PyQt [default: query PyQt]") + +- if sys.platform != 'win32': ++ if sys.platform != 'win32' or _POSIX_BUILD: + p.add_option('--qmake', '-q', dest='qmake', type='string', + default=None, action='callback', + callback=optparser_store_abspath_exe, metavar="FILE", +@@ -1363,14 +1394,14 @@ + win32 { + PY_MODULE = %s.pyd + target.files = %s.pyd +- LIBS += -L%s ++ LIBS += -L%s -l%s + } else { + PY_MODULE = %s.so + target.files = %s.so + } + + target.CONFIG = no_check_exist +-''' % (mname, mname, quote(target_config.py_pylib_dir), mname, mname)) ++''' % (mname, mname, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname, mname)) + + pro.write(''' + target.path = %s +@@ -1523,6 +1554,8 @@ + to run. verbose is set if the output is to be displayed. + """ + ++ if "MSYSTEM" in os.environ: ++ cmd = 'sh.exe -c "%s"' % cmd.replace("\\", "/") + if verbose: + sys.stdout.write(cmd + "\n") + diff --git a/mingw-w64-qt-installer-framework/0002-add-installation-stuff-to-pro-files.patch b/mingw-w64-qt-installer-framework/0002-add-installation-stuff-to-pro-files.patch index 7a83c6f1f9..b300f55c1e 100644 --- a/mingw-w64-qt-installer-framework/0002-add-installation-stuff-to-pro-files.patch +++ b/mingw-w64-qt-installer-framework/0002-add-installation-stuff-to-pro-files.patch @@ -1,7 +1,7 @@ -From 15813ebd2ff591a5d3c855f128926aa5c3029f7a Mon Sep 17 00:00:00 2001 +From 272c7a0dbc676966c2ea660f81f08aacc5ae5f95 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 6 May 2014 11:11:50 +0100 -Subject: [PATCH 2/5] add installation stuff to pro files +Subject: [PATCH 2/9] add installation stuff to pro files --- src/sdk/sdk.pro | 2 ++ @@ -11,7 +11,7 @@ Subject: [PATCH 2/5] add installation stuff to pro files 4 files changed, 11 insertions(+) diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro -index 4168923..7742add 100644 +index 8e78b12..68fb234 100644 --- a/src/sdk/sdk.pro +++ b/src/sdk/sdk.pro @@ -1,6 +1,8 @@ @@ -24,10 +24,10 @@ index 4168923..7742add 100644 include(../../installerfw.pri) diff --git a/tools/archivegen/archivegen.pro b/tools/archivegen/archivegen.pro -index 135c340..e94c03c 100644 +index 719b35a..fc4ab70 100644 --- a/tools/archivegen/archivegen.pro +++ b/tools/archivegen/archivegen.pro -@@ -15,3 +15,6 @@ SOURCES += archive.cpp \ +@@ -16,3 +16,6 @@ SOURCES += archive.cpp \ HEADERS += ../common/repositorygen.h macx:include(../../no_app_bundle.pri) @@ -35,10 +35,10 @@ index 135c340..e94c03c 100644 +target.path = $$PREFIX/bin +INSTALLS += target diff --git a/tools/binarycreator/binarycreator.pro b/tools/binarycreator/binarycreator.pro -index 7492647..053d16c 100644 +index 248c243..7255f1d 100644 --- a/tools/binarycreator/binarycreator.pro +++ b/tools/binarycreator/binarycreator.pro -@@ -18,3 +18,6 @@ HEADERS = rcc/rcc.h +@@ -19,3 +19,6 @@ HEADERS = rcc/rcc.h RESOURCES += binarycreator.qrc macx:include(../../no_app_bundle.pri) @@ -57,5 +57,5 @@ index e6ee447..52f53ce 100644 +target.path = $$PREFIX/bin +INSTALLS += target -- -2.0.0 +2.4.4 diff --git a/mingw-w64-qt-installer-framework/0003-add-recursive-option-to-rmdir-operation.patch b/mingw-w64-qt-installer-framework/0003-add-recursive-option-to-rmdir-operation.patch index 6b974cdab0..188c84497f 100644 --- a/mingw-w64-qt-installer-framework/0003-add-recursive-option-to-rmdir-operation.patch +++ b/mingw-w64-qt-installer-framework/0003-add-recursive-option-to-rmdir-operation.patch @@ -1,41 +1,39 @@ -From 5e9f73436fdc118b714236c947f3a40c40bd0c55 Mon Sep 17 00:00:00 2001 +From fa1576743936e71571db5d69ded9b8871f4b9364 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 7 May 2014 17:09:33 +0100 -Subject: [PATCH 3/5] add recursive option to rmdir operation +Subject: [PATCH 3/9] add recursive option to rmdir operation --- - src/libs/kdtools/kdupdaterupdateoperations.cpp | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + src/libs/kdtools/updateoperations.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -diff --git a/src/libs/kdtools/kdupdaterupdateoperations.cpp b/src/libs/kdtools/kdupdaterupdateoperations.cpp -index be123fe..ba8376c 100644 ---- a/src/libs/kdtools/kdupdaterupdateoperations.cpp -+++ b/src/libs/kdtools/kdupdaterupdateoperations.cpp -@@ -546,9 +546,9 @@ bool RmdirOperation::performOperation() +diff --git a/src/libs/kdtools/updateoperations.cpp b/src/libs/kdtools/updateoperations.cpp +index 9446790..39c8b4d 100644 +--- a/src/libs/kdtools/updateoperations.cpp ++++ b/src/libs/kdtools/updateoperations.cpp +@@ -539,7 +539,8 @@ void RmdirOperation::backup() + bool RmdirOperation::performOperation() { // Requires only one parameter. That is the name of the file to remove. - const QStringList args = this->arguments(); -- if (args.count() != 1) { -+ if (args.count() < 1 || args.count() > 2) { - setError(InvalidArguments); -- setErrorString(tr("Invalid arguments: %1 arguments given, 1 expected.").arg(args.count())); -+ setErrorString(tr("Invalid arguments: %1 arguments given, 1 or 2 expected.").arg(args.count())); +- if (!checkArgumentCount(1)) ++ // A second optional parameter of true indicates recursive deletion. ++ if (!checkArgumentCount(1) && !checkArgumentCount(2)) + return false; + + const QString firstArg = arguments().at(0); +@@ -551,8 +552,11 @@ bool RmdirOperation::performOperation() return false; } -@@ -559,8 +559,11 @@ bool RmdirOperation::performOperation() - return false; - } - -+ bool isRecursive = (args.count() == 2 && args.last() == QLatin1String("true")) ? true : false; ++ bool isRecursive = (arguments().count() == 2 && arguments().last() == QLatin1String("true")) ? true : false; + errno = 0; -- const bool removed = dir.rmdir(args.first()); +- const bool removed = dir.rmdir(firstArg); + const bool removed = isRecursive ? dir.removeRecursively() -+ : dir.rmdir(args.first()); ++ : dir.rmdir(firstArg); setValue(QLatin1String("removed"), removed); if (!removed) { setError(UserDefinedError); -- -2.0.0 +2.4.4 diff --git a/mingw-w64-qt-installer-framework/0004-add-dirExists-fuction.patch b/mingw-w64-qt-installer-framework/0004-add-dirExists-fuction.patch index 6e582523fb..b4c4938cec 100644 --- a/mingw-w64-qt-installer-framework/0004-add-dirExists-fuction.patch +++ b/mingw-w64-qt-installer-framework/0004-add-dirExists-fuction.patch @@ -1,7 +1,7 @@ -From e28ea0afaf1261cc005c80090011d675a3b51bff Mon Sep 17 00:00:00 2001 +From 07d6206d14e9c992d1c0ded3bc4229d613df42df Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 8 May 2014 12:01:54 +0100 -Subject: [PATCH 4/5] add dirExists() fuction +Subject: [PATCH 4/9] add dirExists() fuction --- src/libs/installer/packagemanagercore.cpp | 11 +++++++++++ @@ -9,10 +9,10 @@ Subject: [PATCH 4/5] add dirExists() fuction 2 files changed, 12 insertions(+) diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp -index 7b93a65..b6f4573 100644 +index 1bb800b..99ad454 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp -@@ -718,6 +718,17 @@ bool PackageManagerCore::fileExists(const QString &filePath) const +@@ -785,6 +785,17 @@ bool PackageManagerCore::fileExists(const QString &filePath) const return QFileInfo(filePath).exists(); } @@ -31,10 +31,10 @@ index 7b93a65..b6f4573 100644 /*! diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h -index a3f2b7e..4f30cb6 100644 +index 5160b05..a89fc7c 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h -@@ -179,6 +179,7 @@ public: +@@ -190,6 +190,7 @@ public: Q_INVOKABLE bool isFileExtensionRegistered(const QString &extension) const; Q_INVOKABLE bool fileExists(const QString &filePath) const; @@ -43,5 +43,5 @@ index a3f2b7e..4f30cb6 100644 public: ScriptEngine *componentScriptEngine() const; -- -2.0.0 +2.4.4 diff --git a/mingw-w64-qt-installer-framework/0005-Fix-RunProgram-variable-substitution.patch b/mingw-w64-qt-installer-framework/0005-Fix-RunProgram-variable-substitution.patch index 11be0a331f..f6fc6672dc 100644 --- a/mingw-w64-qt-installer-framework/0005-Fix-RunProgram-variable-substitution.patch +++ b/mingw-w64-qt-installer-framework/0005-Fix-RunProgram-variable-substitution.patch @@ -1,7 +1,7 @@ -From 5df843efbc4bb1a6529e9a941a6f44d36ba7978f Mon Sep 17 00:00:00 2001 +From 56ab98f010e91f6dba841e5cd02ab493aedf1219 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 16 Jun 2014 20:32:48 +0100 -Subject: [PATCH 5/5] Fix RunProgram variable substitution +Subject: [PATCH 5/9] Fix RunProgram variable substitution Patch from https://bugreports.qt-project.org/browse/QTIFW-397 Using @TargetDir@/blah.exe would use only the @@ -11,20 +11,20 @@ default value of TargetDir, and ignored any user modification. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp -index 5a7ed98..c2c70e3 100644 +index d25e9f4..8138fbb 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp -@@ -2380,8 +2380,9 @@ void FinishedPage::leaving() - +@@ -3057,8 +3057,9 @@ void FinishedPage::leaving() + */ void FinishedPage::handleFinishClicked() { + // Applied patch from https://bugreports.qt-project.org/browse/QTIFW-397 const QString program = - packageManagerCore()->replaceVariables(packageManagerCore()->value(scRunProgram)); + packageManagerCore()->replaceVariables(packageManagerCore()->settings().runProgram()); - const QStringList args = packageManagerCore()->replaceVariables( - packageManagerCore()->value(scRunProgramArguments)).split(QLatin1Char(' '), - QString::SkipEmptyParts); + + const QStringList args = packageManagerCore()->replaceVariables(packageManagerCore() + ->values(scRunProgramArguments)); -- -2.0.0 +2.4.4 diff --git a/mingw-w64-qt-installer-framework/0006-Don-t-remove-files-that-live-outside-of-path.patch b/mingw-w64-qt-installer-framework/0006-Don-t-remove-files-that-live-outside-of-path.patch new file mode 100644 index 0000000000..0919cd0183 --- /dev/null +++ b/mingw-w64-qt-installer-framework/0006-Don-t-remove-files-that-live-outside-of-path.patch @@ -0,0 +1,49 @@ +From 0f2722ace0d2586a9fdac371e8841c4f07049ecb Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 30 Mar 2015 13:46:51 +0100 +Subject: [PATCH 6/9] Don't remove files that live outside of path + +If a file is symlinked outside of path in QInstaller::removeFiles +then it gets removed regardless. This will cause e.g. users' HOME +directories to get removed on MSYS2. +--- + src/libs/installer/fileutils.cpp | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/src/libs/installer/fileutils.cpp b/src/libs/installer/fileutils.cpp +index 00c289f..81a00bb 100644 +--- a/src/libs/installer/fileutils.cpp ++++ b/src/libs/installer/fileutils.cpp +@@ -179,7 +179,29 @@ void QInstaller::removeFiles(const QString &path, bool ignoreErrors) + const QFileInfoList entries = QDir(path).entryInfoList(QDir::AllEntries | QDir::Hidden); + foreach (const QFileInfo &fi, entries) { + if (fi.isSymLink() || fi.isFile()) { ++ // Don't remove symlinks that point outside of path ++ // as this can delete for example, the HOME folder. ++ QFileInfo toRoot(fi); ++ QString prevToRoot; ++ bool symLinksOutsidePath = false; ++ do ++ { ++ if (toRoot.isSymLink()) { ++ QString symLinkTarget = toRoot.symLinkTarget(); ++ if (symLinkTarget.indexOf(path) != 0) { ++ symLinksOutsidePath = true; ++ break; ++ } ++ } ++ prevToRoot = toRoot.absoluteFilePath(); ++ toRoot = QFileInfo(toRoot.dir().absolutePath()); ++ } while (toRoot.exists() && toRoot.dir().absolutePath() != prevToRoot); + QFile f(fi.filePath()); ++ if (symLinksOutsidePath) { ++ qDebug() << "Not removing " << f.fileName() ++ << " as it symlinks outside path " << path; ++ continue; ++ } + if (!f.remove()) { + const QString errorMessage = QCoreApplication::translate("QInstaller", + "Cannot remove file \"%1\": %2").arg( +-- +2.4.4 + diff --git a/mingw-w64-qt-installer-framework/0007-Don-t-prevent-qmake-linking-qmltooling-plugin.patch b/mingw-w64-qt-installer-framework/0007-Don-t-prevent-qmake-linking-qmltooling-plugin.patch new file mode 100644 index 0000000000..1af6818266 --- /dev/null +++ b/mingw-w64-qt-installer-framework/0007-Don-t-prevent-qmake-linking-qmltooling-plugin.patch @@ -0,0 +1,46 @@ +From 58ef2828c799243134bbcac881cd15a71907b19b Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 1 Apr 2015 15:01:08 +0100 +Subject: [PATCH 7/9] Don't prevent qmake linking qmltooling plugin + +Since it seems to be necessary. For now, I've removed the +deliberate exclusion for win32 only, but I can't see why +qmltooling wouldn't be necessary on all platforms. If Qt5 +had been built with QT_QML_NO_DEBUGGER defined then this +wouldn't have been an issue, but being able to debug QML +isn't something I'd like to disable. +--- + src/sdk/sdk.pro | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro +index 68fb234..1285109 100644 +--- a/src/sdk/sdk.pro ++++ b/src/sdk/sdk.pro +@@ -18,7 +18,22 @@ CONFIG(static, static|shared) { + # prevent qmake from automatically linking in imageformats, bearer, qmltooling plugins + QTPLUGIN.imageformats = - + QTPLUGIN.bearer = - +- QTPLUGIN.qmltooling = - ++ # .. except link qmltooling on Windows ++ # though most likely all plaforms need ++ # this since without it the link fails ++ # g++ -Wl,-s -static -Wl,-subsystem,windows -mthreads -o ../../bin/installerbase.exe object_script.installerbase.Release \ ++ # -lmingw32 -LC:/msys64/mingw64/qt5-static/lib -lqtmain -LC:/repo/mingw-w64-qt-installer-framework/src/build-x86_64/lib \ ++ # -linstaller -l7z -lQt5WinExtras -lQt5UiTools -lQt5Widgets -lQt5Concurrent -lQt5Qml -lQt5Network -ldnsapi -lssl -lcrypto -lcrypt32 -lQt5Xml \ ++ # -LC:/msys64/mingw64/qt5-static/share/qt5/plugins/platforms -lqwindows -lwinspool -lshlwapi -lQt5PlatformSupport -lQt5Gui \ ++ # -lcomdlg32 -loleaut32 -limm32 -lwinmm -lglu32 -lopengl32 -lgdi32 -lqtharfbuzzng -lQt5Core -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr ++ # C:/msys64/mingw64/qt5-static/lib\libQt5Qml.a(qqmldebugserver.o):qqmldebugserver.cpp:(.text+0x4f95): undefined reference to `QTcpServerConnection::QTcpServerConnection()' ++ # .. the above link command line needs the following appended to it to work: ++ # -LC:/msys64/mingw64/qt5-static/share/qt5/plugins/qmltooling qmldbg_tcp ++ # From qt5: qtdeclarative/src/qml/debugger/qqmldebugserver.cpp:289 ++ # if defined(QT_STATIC) && ! defined(QT_QML_NO_DEBUGGER) ++ # .. = new QTcpServerConnection; .. ++ # .. so maybe we should look into defining QT_QML_NO_DEBUGGER, but I think I'd rather be able to debug QML than not. ++ !win32:QTPLUGIN.qmltooling = - + } + + DESTDIR = $$IFW_APP_PATH +-- +2.4.4 + diff --git a/mingw-w64-qt-installer-framework/0008-Use-QTPLUGIN-qminimal-on-Windows-too.patch b/mingw-w64-qt-installer-framework/0008-Use-QTPLUGIN-qminimal-on-Windows-too.patch new file mode 100644 index 0000000000..2895484176 --- /dev/null +++ b/mingw-w64-qt-installer-framework/0008-Use-QTPLUGIN-qminimal-on-Windows-too.patch @@ -0,0 +1,27 @@ +From 3a25fdf13e4978827769ac5626d5910dcec7acb6 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 16 Jun 2015 23:14:23 +0100 +Subject: [PATCH 8/9] Use QTPLUGIN += qminimal on Windows too + +Fixes: http://sourceforge.net/p/msys2/tickets/149/ +See also: https://bugreports.qt.io/browse/QTIFW-166 +--- + src/sdk/sdk.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro +index 1285109..871df89 100644 +--- a/src/sdk/sdk.pro ++++ b/src/sdk/sdk.pro +@@ -10,7 +10,7 @@ QT += network qml xml widgets + # add the minimal plugin in static build to be able to start the installer headless with: + # installer-binary -platform minimal + # using QT += qpa_minimal_plugin would result in a minimal only compiled version +-!win32:CONFIG(static, static|shared) { ++CONFIG(static, static|shared) { + QTPLUGIN += qminimal + } + +-- +2.4.4 + diff --git a/mingw-w64-qt-installer-framework/0009-Add-explicit-platform-commandline-option.patch b/mingw-w64-qt-installer-framework/0009-Add-explicit-platform-commandline-option.patch new file mode 100644 index 0000000000..c9ddae69b9 --- /dev/null +++ b/mingw-w64-qt-installer-framework/0009-Add-explicit-platform-commandline-option.patch @@ -0,0 +1,42 @@ +From 1811044eeb1d4481f0c65c9863f60c58649220f8 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Thu, 25 Jun 2015 10:49:42 +0100 +Subject: [PATCH 9/9] Add explicit '--platform' commandline option + +To prevent 'Unknown option: platform' when running +in headless mode (--platform minimal) +--- + src/sdk/commandlineparser.cpp | 4 ++++ + src/sdk/constants.h | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp +index 842edde..0b8eaa6 100644 +--- a/src/sdk/commandlineparser.cpp ++++ b/src/sdk/commandlineparser.cpp +@@ -116,6 +116,10 @@ CommandLineParser::CommandLineParser() + "not started by the client application in that case, you need to start it on your own."), + QLatin1String("socketname,key"))); + ++ m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Platform), ++ QLatin1String("Use specified platform plugin. The 'minimal' platform plugin can be used " ++ "to run in headless mode."), QLatin1String("platform-plugin"))); ++ + m_parser.addPositionalArgument(QLatin1String(CommandLineOptions::KeyValue), + QLatin1String("Key Value pair to be set.")); + } +diff --git a/src/sdk/constants.h b/src/sdk/constants.h +index db3f8af..544e28f 100644 +--- a/src/sdk/constants.h ++++ b/src/sdk/constants.h +@@ -57,6 +57,7 @@ const char AddTmpRepository[] = "addTempRepository"; + const char SetTmpRepository[] = "setTempRepository"; + const char StartServer[] = "startserver"; + const char StartClient[] = "startclient"; ++const char Platform[] = "platform"; + + } // namespace CommandLineOptions + +-- +2.4.4 + diff --git a/mingw-w64-qt-installer-framework/PKGBUILD b/mingw-w64-qt-installer-framework/PKGBUILD index ee14a7bbe7..2653c4bd2f 100644 --- a/mingw-w64-qt-installer-framework/PKGBUILD +++ b/mingw-w64-qt-installer-framework/PKGBUILD @@ -3,26 +3,34 @@ _realname=installer-framework pkgname="${MINGW_PACKAGE_PREFIX}-qt-${_realname}-git" pkgdesc="The Qt Installer Framework used for the Qt SDK installer" -pkgver=r2283.0d529d9 +pkgver=r2776.823efa4 pkgrel=1 arch=('any') url='http://qt-project.org/' license=('GPL3' 'LGPL' 'FDL' 'custom') provides=("${MINGW_PACKAGE_PREFIX}-qt-${_realname}") makedepends=("${MINGW_PACKAGE_PREFIX}-qt5-static" "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-make") + "${MINGW_PACKAGE_PREFIX}-make" "git") options=('strip' 'staticlibs') #options=('!strip' 'debug' 'staticlibs') -source=("${_realname}"::"git://gitorious.org/${_realname}/${_realname}.git" +source=("${_realname}"::"git+https://github.com/qtproject/${_realname}.git" "0002-add-installation-stuff-to-pro-files.patch" "0003-add-recursive-option-to-rmdir-operation.patch" "0004-add-dirExists-fuction.patch" - "0005-Fix-RunProgram-variable-substitution.patch") + "0005-Fix-RunProgram-variable-substitution.patch" + "0006-Don-t-remove-files-that-live-outside-of-path.patch" + "0007-Don-t-prevent-qmake-linking-qmltooling-plugin.patch" + "0008-Use-QTPLUGIN-qminimal-on-Windows-too.patch" + "0009-Add-explicit-platform-commandline-option.patch") md5sums=('SKIP' - '614046f9d32cf592c98856c195bbbba6' - 'd4ca5e1b2a30a26eaf37d69c24444587' - '61d67ae4eee1a326fad6c0f8d2d33b7a' - 'f3a40ff3dd9f010f67101cfc41bb6fb1') + '2a6ebf7460b60488728dc976409bbc1f' + 'e7ec9f85b265e12edd88dbac670cacc0' + '7964a8f4946739059c9e916f128ef278' + '7681a82af85139c89af9575d0ea78709' + 'aa1b10d38971efef4efcecef20ddd196' + 'ad2e2c618928ca79bce11439ce35dccf' + 'c33e7c41a9af9deb5ab5db3c760c05c4' + 'ce3a8b7804cd3b1acb57989f18ff4478') pkgver() { cd "$srcdir"/${_realname} @@ -36,21 +44,31 @@ prepare() { git am "${srcdir}"/0004-add-dirExists-fuction.patch # Apply patch from https://bugreports.qt-project.org/browse/QTIFW-397 git am "${srcdir}"/0005-Fix-RunProgram-variable-substitution.patch + # This requires ../mingw-w64-qt5-static/0044-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch + # to fix the problem for junction points. Together they fix: + # https://github.com/msys2/msys2.github.io/issues/4 + git am "${srcdir}"/0006-Don-t-remove-files-that-live-outside-of-path.patch + git am "${srcdir}"/0007-Don-t-prevent-qmake-linking-qmltooling-plugin.patch + git am "${srcdir}"/0008-Use-QTPLUGIN-qminimal-on-Windows-too.patch + git am "${srcdir}"/0009-Add-explicit-platform-commandline-option.patch } build() { local _config - cd "${srcdir}"/${_realname} + cd "${srcdir}" + [ -d build-${CARCH} ] && rm -rf build-${CARCH} + mv ${_realname} build-${CARCH} if check_option "debug" "n"; then _config="release" else _config="debug" fi + cd build-${CARCH} ${MINGW_PREFIX}/qt5-static/bin/qmake.exe installerfw.pro CONFIG+="${_config}" CONFIG+=no_testcase_installs make } package() { - cd "${srcdir}"/${_realname} + cd "${srcdir}"/build-${CARCH} make INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" install } diff --git a/mingw-w64-qt-solutions-git/PKGBUILD b/mingw-w64-qt-solutions-git/PKGBUILD index 1836c77fad..30a7a7ffeb 100644 --- a/mingw-w64-qt-solutions-git/PKGBUILD +++ b/mingw-w64-qt-solutions-git/PKGBUILD @@ -10,7 +10,7 @@ pkgdesc='Qt5 various components (mingw-w64)' url='https://qt.gitorious.org/qt-solutions' arch=('any') depends=("${MINGW_PACKAGE_PREFIX}-qt5") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git") options=('docs' 'staticlibs' '!strip') # 'debug' '!strip' source=("${_realname}"::"git+https://github.com/Alexpux/qt-solutions.git") sha256sums=('SKIP') @@ -50,11 +50,11 @@ package() { cd ${srcdir}/${_realname}/${cur} cp -f lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin cp -f lib/*.a ${pkgdir}${MINGW_PREFIX}/lib - + local _headers=( $(find ${srcdir}/${_realname}/${cur}/src -maxdepth 1 -type f ! \( -iname "*.cpp" -o -iname "*.pri" \) ) ) cp -f ${_headers[@]} ${pkgdir}${MINGW_PREFIX}/include/ #find src -maxdepth 1 -type f ! /( -iname "*.cpp" -o -iname "*.pri"/) -exec cp -p '{}' "${pkgdir}${MINGW_PREFIX}"/include/'{}' ';' - + done } diff --git a/mingw-w64-qt4/PKGBUILD b/mingw-w64-qt4/PKGBUILD old mode 100755 new mode 100644 index b486ac98f3..8ab37bce1d --- a/mingw-w64-qt4/PKGBUILD +++ b/mingw-w64-qt4/PKGBUILD @@ -2,7 +2,7 @@ _realname=qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.8.6 +pkgver=4.8.7 pkgrel=3 arch=('any') url='http://qt-project.org/' @@ -10,37 +10,44 @@ install=qt4-${CARCH}.install license=('GPL3' 'LGPL' 'FDL' 'custom') conflicts=("${MINGW_PACKAGE_PREFIX}-qt5") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-dbus" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libmng" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-pcre" - "${MINGW_PACKAGE_PREFIX}-qtbinpatcher" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-dbus" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libmng" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-pcre" + "${MINGW_PACKAGE_PREFIX}-qtbinpatcher" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("bison" - "flex" - "gperf" - "m4" - "perl" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-libmariadbclient" - "${MINGW_PACKAGE_PREFIX}-libfbclient" - "${MINGW_PACKAGE_PREFIX}-make" - "${MINGW_PACKAGE_PREFIX}-postgresql" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-ruby" - #"${MINGW_PACKAGE_PREFIX}-perl" - #"${MINGW_PACKAGE_PREFIX}-gperf" + "flex" + "gperf" + "lndir" + "m4" + "perl" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-firebird2" + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" + "${MINGW_PACKAGE_PREFIX}-postgresql" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-ruby" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + #"${MINGW_PACKAGE_PREFIX}-perl" + #"${MINGW_PACKAGE_PREFIX}-gperf" ) +optdepends=($([[ "$_variant" == "-shared" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ + "${MINGW_PACKAGE_PREFIX}-libfbclient" \ + "${MINGW_PACKAGE_PREFIX}-postgresql") + ) groups=("${MINGW_PACKAGE_PREFIX}-qt4") options=('!strip' 'staticlibs') _pkgfqn="qt-everywhere-opensource-src-${pkgver}" @@ -57,29 +64,42 @@ source=("http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${pkgv qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch qt-4.8.x-win32-g++-mkspec-optimization.patch - qt-merge-static-and-shared-library-trees.patch + qt4-merge-static-and-shared-library-trees.patch + qt4-use-correct-pkg-config-static-flags.patch + qt4-fix-linking-against-static-dbus.patch qt-4.8.6-use-force-with-shell-commands.patch - qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch) -md5sums=('2edbe4d6c2eff33ef91732602f3518eb' + qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch + qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch + qt4-build-debug-qmake.patch + qt-4.8.7-mingw-configure.patch + qt-4.8.7-mingw-unix-tests.patch + qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch) +md5sums=('d990ee66bf7ab0c785589776f35ba6ad' '3795e9f26a38045b69bb411f307905ac' '63dc5a13265ed82b2ba3abd0aa7a59f7' '3fe6e419c1f21c59062db1f562c1f9bf' '30800db1953d8d47963620462fb38be9' '91d01b6d31887f78c7933c04544c5758' - 'f74b6c4e87cfc0961c351c9578bcf0e6' + '1c4ab3c6e503c9bd5bfd220313b49317' 'ea506301c29218c94ff78c92ce5498b3' 'b3499c08acecc386de972f02d11378da' '713796980a83ecbc3317f5e20255747b' 'a6761724e2f471aba142c24333d6419a' 'd13a1f5befd2f6326d3b4587d53dd47b' 'f515f8ee7dd03ad1b8bd335b3b93e0c6' - '840db5a7630dc40d82ed3891f372b4dc' + 'f627d9e2628f267dff3e1472ccc93efc' + 'd079529640f644d441bf953908efb324' + '33958b73e555aa50387bee9edd2deb83' 'a6fb8d1869e43e13c177c9fca7c579a6' - '7a9096c06a025c065a75c747752485f9') + '68657fc5b131e2c5e3532b61e2c3da42' + '562ababd98ecca9e3a6cbc9b70e8f7f9' + '49c33922e8f3c506cb7cc15cbe9b4a0a' + 'de870877cb94f64a57c81d52ce6327e5' + 'fc3b3f45db0eda55d429310faf529ae9' + 'cd1be38b3166cde16e29f255d092ecd4') prepare() { - cd ${_pkgfqn} - + cd ${srcdir}/${_pkgfqn} patch -p1 -i ${srcdir}/qt-4.6-demo-plugandpaint.patch patch -p1 -i ${srcdir}/qt-4.8.0-fix-include-windows-h.patch patch -p1 -i ${srcdir}/qt-4.8.0-fix-javascript-jit-on-mingw-x86_64.patch @@ -91,87 +111,123 @@ prepare() { patch -p1 -i ${srcdir}/qt-4.8.3-assistant-4.8.2+gcc-4.7.patch patch -p1 -i ${srcdir}/qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch patch -p1 -i ${srcdir}/qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch - patch -p1 -i ${srcdir}/qt-4.8.x-win32-g++-mkspec-optimization.patch - #patch -p1 -i ${srcdir}/qt-merge-static-and-shared-library-trees.patch + #patch -p1 -i ${srcdir}/qt-4.8.x-win32-g++-mkspec-optimization.patch + patch -p1 -i ${srcdir}/qt4-merge-static-and-shared-library-trees.patch + patch -p1 -i ${srcdir}/qt4-use-correct-pkg-config-static-flags.patch + patch -p1 -i ${srcdir}/qt4-fix-linking-against-static-dbus.patch patch -p1 -i ${srcdir}/qt-4.8.6-use-force-with-shell-commands.patch - patch -p0 -i ${srcdir}/qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch + patch -p1 -i ${srcdir}/qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch + patch -p1 -i ${srcdir}/qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch + patch -p1 -i ${srcdir}/qt-4.8.7-mingw-configure.patch + patch -p1 -i ${srcdir}/qt-4.8.7-mingw-unix-tests.patch + patch -p1 -i ${srcdir}/qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch + + if check_option "debug" "y"; then + patch -p1 -i ${srcdir}/qt4-build-debug-qmake.patch + fi + #cd ${srcdir} + #mkdir ${CARCH} + #lndir ${srcdir}/${_pkgfqn} ${srcdir}/${CARCH} + #cd ${CARCH} + local _optim= case ${MINGW_CHOST} in i686*) - _optim="-march=i686 -mtune=core2" + _optim+=" -march=i686 -mtune=core2" ;; x86_64*) - _optim="-march=nocona -mtune=core2" + _optim+=" -march=nocona -mtune=core2" ;; esac local STATIC_LD= - sed -e "s|%OPTIMIZE_OPT%|${_optim}|g" -i mkspecs/win32-g++/qmake.conf - sed -e "s|%STATICFLAGS%|${STATIC_LD}|g" -i mkspecs/win32-g++/qmake.conf - + + sed -i "s|^QMAKE_CFLAGS =\(.*\)$|QMAKE_CFLAGS = \1 ${_optim} |g" mkspecs/win32-g++/qmake.conf + sed -i "s|^QMAKE_LFLAGS =\(.*\)$|QMAKE_LFLAGS = \1 ${STATIC_LD}|g" mkspecs/win32-g++/qmake.conf + cd ${srcdir} - mv ${_pkgfqn} ${CARCH} + mv ${_pkgfqn} ${_realname}-${pkgver} } build() { - cd $srcdir/${CARCH} - touch .gitignore + cd ${srcdir}/${_realname}-${pkgver} mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - local QTDIR_WIN=$(pwd -W) - popd > /dev/null + local QTDIR_WIN=$(cygpath -wm ${pkgdir}${MINGW_PREFIX}) - INCLUDE="${MINGW_PREFIX}/${MINGW_CHOST}/include:${MINGW_PREFIX}/include:${MINGW_PREFIX}/include/mariadb" - local pkg_conf_inc=$(pkg-config --cflags-only-I libxml-2.0 dbus-1) - pkg_conf_inc=${pkg_conf_inc//-I/ } - for _inc in ${pkg_conf_inc}; do - INCLUDE="${INCLUDE}:${_inc}" - done - - export INCLUDE - export CPATH="${INCLUDE}" - export LIB="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib" - export LIBRARY_PATH="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib" + local pkg_conf_inc="-I ${MINGW_PREFIX}/include/mariadb" + #pkg_conf_inc=$(pkg-config --dont-define-prefix --cflags-only-I libxml-2.0 dbus-1) export PATH=${srcdir}/${CARCH}/bin:${srcdir}/${CARCH}/lib:${PATH} - ./configure.exe \ - -prefix ${QTDIR_WIN} \ + ./configure \ + -prefix ${pkgdir}${MINGW_PREFIX} \ + -datadir ${pkgdir}${MINGW_PREFIX}/share/qt4 \ + -docdir ${pkgdir}${MINGW_PREFIX}/share/qt4/doc \ + -headerdir ${pkgdir}${MINGW_PREFIX}/include/qt4 \ + -plugindir ${pkgdir}${MINGW_PREFIX}/share/qt4/plugins \ + -importdir ${pkgdir}${MINGW_PREFIX}/share/qt4/imports \ + -translationdir ${pkgdir}${MINGW_PREFIX}/share/qt4/translations \ + -sysconfdir ${pkgdir}${MINGW_PREFIX}/etc \ + -examplesdir ${pkgdir}${MINGW_PREFIX}/share/qt4/examples \ + -demosdir ${pkgdir}${MINGW_PREFIX}/share/qt4/demos \ -opensource \ -confirm-license \ -debug-and-release \ -platform win32-g++ \ + -xplatform win32-g++ \ -plugin-sql-ibase \ -plugin-sql-mysql \ -plugin-sql-psql \ + -plugin-sql-sqlite \ -plugin-sql-odbc \ -fontconfig \ -openssl \ -dbus \ -shared \ -iconv \ + -qt3support \ + -optimized-qmake \ + -exceptions \ + -fast \ + -force-pkg-config \ + -little-endian \ + -xmlpatterns \ + -multimedia \ + -audio-backend \ + -phonon \ + -phonon-backend \ + -javascript-jit \ + -system-libmng \ + -system-libtiff \ + -system-libpng \ + -system-libjpeg \ + -system-sqlite \ + -system-zlib \ + -native-gestures \ + -s60 \ + -largefile \ + -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon \ -nomake tests \ -nomake demos \ - -nomake examples + -nomake examples \ + -verbose \ + ${pkg_conf_inc} # Fix building - cp -rf mkspecs ${QTDIR_WIN}/ + #cp -rf mkspecs ${pkgdir}${MINGW_PREFIX}/ - ${MINGW_PREFIX}/bin/mingw32-make ${MAKEFLAGS} + make } package() { - - cd ${srcdir}/${CARCH} - + cd ${srcdir}/${_realname}-${pkgver} export PATH=${srcdir}/${CARCH}/bin:${PATH} - - ${MINGW_PREFIX}/bin/mingw32-make ${MAKEFLAGS} install - + make install + rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.dll + plain "Install private headers" - local PRIVATE_HEADERS=( phonon Qt3Support @@ -198,76 +254,76 @@ package() { for priv_headers in ${PRIVATE_HEADERS[@]} do - mkdir -p ${pkgdir}${MINGW_PREFIX}/include/${priv_headers} - mkdir -p ${pkgdir}${MINGW_PREFIX}/include/${priv_headers}/private + mkdir -p ${pkgdir}${MINGW_PREFIX}/include/Qt4/${priv_headers} + mkdir -p ${pkgdir}${MINGW_PREFIX}/include/Qt4/${priv_headers}/private done plain "----> Qt3Support" - cp -rfv `find src/qt3support -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt3Support/private - cp -rfv `find src/qt3support -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt3Support/private + cp -rfv `find src/qt3support -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/Qt3Support/private + cp -rfv `find src/qt3support -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/Qt3Support/private plain "----> QtCore" - cp -rfv `find src/corelib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtCore/private - cp -rfv `find src/corelib -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/QtCore/private + cp -rfv `find src/corelib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtCore/private + cp -rfv `find src/corelib -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtCore/private plain "----> QtDBus" - cp -rfv `find src/dbus -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtDBus/private + cp -rfv `find src/dbus -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDBus/private plain "----> QtDeclarative" - cp -rfv `find src/declarative -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtDeclarative/private + cp -rfv `find src/declarative -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDeclarative/private plain "----> QtDesigner" - cp -rfv `find tools/designer/src/lib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtDesigner/private - cp -rfv `find tools/designer/src/lib -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/QtDesigner/private + cp -rfv `find tools/designer/src/lib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDesigner/private + cp -rfv `find tools/designer/src/lib -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDesigner/private plain "----> QtGui" - cp -rfv `find src/gui -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtGui/private - cp -rfv `find src/gui -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtGui/private + cp -rfv `find src/gui -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtGui/private + cp -rfv `find src/gui -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtGui/private plain "----> QtHelp" - cp -rfv `find tools/assistant -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtHelp/private + cp -rfv `find tools/assistant -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtHelp/private plain "----> QtMeeGoGraphicsSystemHelper" - cp -rfv `find tools/qmeegographicssystemhelper -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtMeeGoGraphicsSystemHelper/private + cp -rfv `find tools/qmeegographicssystemhelper -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtMeeGoGraphicsSystemHelper/private plain "----> QtMultimedia" - cp -rfv `find src/multimedia -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtMultimedia/private + cp -rfv `find src/multimedia -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtMultimedia/private plain "----> QtNetwork" - cp -rfv `find src/network -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtNetwork/private + cp -rfv `find src/network -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtNetwork/private plain "----> QtOpenGl" - cp -rfv `find src/opengl -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtOpenGl/private + cp -rfv `find src/opengl -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtOpenGl/private plain "----> QtOpenVG" - cp -rfv `find src/openvg -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtOpenVG/private + cp -rfv `find src/openvg -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtOpenVG/private plain "----> QtScript" - cp -rfv `find src/script -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtScript/private + cp -rfv `find src/script -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtScript/private plain "----> QtScriptTools" - cp -rfv `find src/scripttools -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtScriptTools/private + cp -rfv `find src/scripttools -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtScriptTools/private plain "----> QtSql" - cp -rfv `find src/sql -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtSql/private + cp -rfv `find src/sql -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtSql/private plain "----> QtSvg" - cp -rfv `find src/svg -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtSvg/private + cp -rfv `find src/svg -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtSvg/private plain "----> QtTest" - cp -rfv `find src/testlib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtTest/private + cp -rfv `find src/testlib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtTest/private plain "----> QtUiTools" - cp -rfv `find tools/designer/src/uitools -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtUiTools/private + cp -rfv `find tools/designer/src/uitools -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtUiTools/private plain "----> QtWebkit" - cp -rfv `find src/3rdparty/webkit -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtWebkit/private + cp -rfv `find src/3rdparty/webkit -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtWebkit/private plain "----> QtXmlPatterns" - cp -rfv `find src/xmlpatterns -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/QtXmlPatterns/private + cp -rfv `find src/xmlpatterns -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtXmlPatterns/private plain "----> phonon" - cp -rfv `find src/3rdparty/phonon/phonon -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/phonon/private + cp -rfv `find src/3rdparty/phonon/phonon -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/phonon/private plain "---> Done install private headers" diff --git a/mingw-w64-qt4/mingw-w64-i686-x86_64-intrinsics.patch b/mingw-w64-qt4/mingw-w64-i686-x86_64-intrinsics.patch deleted file mode 100644 index 884c421b17..0000000000 --- a/mingw-w64-qt4/mingw-w64-i686-x86_64-intrinsics.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp -index 540b615..1ce1e00 100644 ---- a/src/corelib/tools/qsimd.cpp -+++ b/src/corelib/tools/qsimd.cpp -@@ -47,7 +47,7 @@ - #include - #endif - --#if defined(Q_OS_WIN64) && !defined(Q_CC_GNU) -+#if defined(Q_OS_WIN64) || defined(Q_OS_WIN32) - #include - #endif - diff --git a/mingw-w64-qt4/qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch b/mingw-w64-qt4/qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch index 52590a6a7b..fa3f1d9bdc 100644 --- a/mingw-w64-qt4/qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch +++ b/mingw-w64-qt4/qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch @@ -1,5 +1,5 @@ ---- qmake/generators/makefile.cpp.orig 2014-07-28 00:26:53.515911500 +0300 -+++ qmake/generators/makefile.cpp 2014-07-28 00:29:44.271678100 +0300 +--- a/qmake/generators/makefile.cpp.orig 2014-07-28 00:26:53.515911500 +0300 ++++ b/qmake/generators/makefile.cpp 2014-07-28 00:29:44.271678100 +0300 @@ -3151,7 +3151,7 @@ ret.prepend(project->first("DESTDIR")); ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir)); @@ -9,3 +9,14 @@ } QString +--- a/src/qbase.pri 2015-05-28 16:20:44.113119800 +0300 ++++ b/src/qbase.pri 2015-05-28 16:21:39.712559300 +0300 +@@ -21,7 +21,7 @@ + #sure the same version is used + VERSIONS_LIST = $$split(VERSION, ".") + QT_LIBS_OVERRIDE = $$member(VERSIONS_LIST, 0) +- for(lib, $$list(qtcore qtgui qtnetwork qtxml qtopengl qtsql qt3support)) { ++ for(lib, $$list(qtcore qtdbus qtgui qtnetwork qtxml qtopengl qtsql qtwebkit qt3support)) { + eval(QMAKE_$${upper($$lib)}_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) + eval(QMAKE_$${upper($$lib)}D_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) + } diff --git a/mingw-w64-qt4/qt-4.8.0-fix-mysql-driver-build.patch b/mingw-w64-qt4/qt-4.8.0-fix-mysql-driver-build.patch old mode 100755 new mode 100644 diff --git a/mingw-w64-qt4/qt-4.8.0-use-fbclient-instead-gds32.patch b/mingw-w64-qt4/qt-4.8.0-use-fbclient-instead-gds32.patch index 324a71d7eb..3ac47c4b9c 100644 --- a/mingw-w64-qt4/qt-4.8.0-use-fbclient-instead-gds32.patch +++ b/mingw-w64-qt4/qt-4.8.0-use-fbclient-instead-gds32.patch @@ -5,6 +5,6 @@ !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { win32-borland:LIBS += gds32.lib - else:LIBS += -lgds32_ms -+ else:LIBS += -lfbclient_ms ++ else:LIBS += -lfbclient } } diff --git a/mingw-w64-qt4/qt-4.8.5-fix-data-corruption-in-readData.patch b/mingw-w64-qt4/qt-4.8.5-fix-data-corruption-in-readData.patch deleted file mode 100644 index a933254e5e..0000000000 --- a/mingw-w64-qt4/qt-4.8.5-fix-data-corruption-in-readData.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 1f40ed553e618c3b0511c7db4b4fd26c2d2b65bf Mon Sep 17 00:00:00 2001 -From: Peter Hartmann -Date: Thu, 25 Jul 2013 12:05:29 -0400 -Subject: [PATCH] QHttpMultiPart: fix data corruption in readData method - -When readData() is called repeatedly, we need to keep track which -part of the multipart message we are currently reading from. -Hereby we also need to take the boundary size into account, and not -only the size of the multipart; otherwise we would skip a not -completely read part. This would then later lead to advancing the -read pointer by negative indexes and data loss. - -Task-number: QTBUG-32534 -Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0 -Reviewed-by: Jonathan Liu -Reviewed-by: Shane Kearns -(cherry picked from qtbase/af96c6fed931564c95037539f07e9c8e33c69529) -Reviewed-by: Thiago Macieira ---- - src/network/access/qhttpmultipart.cpp | 3 +- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp -index 635129a..b25e917 100644 ---- a/src/network/access/qhttpmultipart.cpp -+++ b/src/network/access/qhttpmultipart.cpp -@@ -488,7 +488,8 @@ qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize) - - // skip the parts we have already read - while (index < multiPart->parts.count() && -- readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size()) -+ readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size() -+ + multiPart->boundary.count() + 6) // 6 == 2 boundary dashes, \r\n after boundary, \r\n after multipart - index++; - - // read the data --- -1.7.1 diff --git a/mingw-w64-qt4/qt-4.8.6-use-force-with-shell-commands.patch b/mingw-w64-qt4/qt-4.8.6-use-force-with-shell-commands.patch old mode 100755 new mode 100644 diff --git a/mingw-w64-qt4/qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch b/mingw-w64-qt4/qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch new file mode 100644 index 0000000000..243ef69265 --- /dev/null +++ b/mingw-w64-qt4/qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch @@ -0,0 +1,132 @@ +--- qt-everywhere-opensource-src-4.8.7/src/gui/image/qmnghandler.cpp 2015-05-07 15:14:44.000000000 +0100 ++++ qt4-4.8.7/src/gui/image/qmnghandler.cpp 2015-07-15 10:44:14.858545100 +0100 +@@ -45,7 +45,12 @@ + #include "qvariant.h" + #include "qcolor.h" + +-#define MNG_USE_SO ++#if defined(Q_OS_WIN) ++ #define MNG_USE_DLL ++#else ++ #define MNG_USE_SO ++#endif ++ + #include + + QT_BEGIN_NAMESPACE +@@ -82,7 +87,7 @@ + QMngHandler *q_ptr; + }; + +-static mng_bool myerror(mng_handle /*hMNG*/, ++static mng_bool MNG_DECL myerror(mng_handle /*hMNG*/, + mng_int32 iErrorcode, + mng_int8 /*iSeverity*/, + mng_chunkid iChunkname, +@@ -101,7 +106,7 @@ + return TRUE; + } + +-static mng_ptr myalloc(mng_size_t iSize) ++static mng_ptr MNG_DECL myalloc(mng_size_t iSize) + { + #if defined(Q_OS_WINCE) + mng_ptr ptr = malloc(iSize); +@@ -112,24 +117,24 @@ + #endif + } + +-static void myfree(mng_ptr pPtr, mng_size_t /*iSize*/) ++static void MNG_DECL myfree(mng_ptr pPtr, mng_size_t /*iSize*/) + { + free(pPtr); + } + +-static mng_bool myopenstream(mng_handle) ++static mng_bool MNG_DECL myopenstream(mng_handle) + { + return MNG_TRUE; + } + +-static mng_bool myclosestream(mng_handle hMNG) ++static mng_bool MNG_DECL myclosestream(mng_handle hMNG) + { + QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); + pMydata->haveReadAll = true; + return MNG_TRUE; + } + +-static mng_bool myreaddata(mng_handle hMNG, ++static mng_bool MNG_DECL myreaddata(mng_handle hMNG, + mng_ptr pBuf, + mng_uint32 iSize, + mng_uint32p pRead) +@@ -138,7 +143,7 @@ + return pMydata->readData(pBuf, iSize, pRead); + } + +-static mng_bool mywritedata(mng_handle hMNG, ++static mng_bool MNG_DECL mywritedata(mng_handle hMNG, + mng_ptr pBuf, + mng_uint32 iSize, + mng_uint32p pWritten) +@@ -147,7 +152,7 @@ + return pMydata->writeData(pBuf, iSize, pWritten); + } + +-static mng_bool myprocessheader(mng_handle hMNG, ++static mng_bool MNG_DECL myprocessheader(mng_handle hMNG, + mng_uint32 iWidth, + mng_uint32 iHeight) + { +@@ -155,14 +160,14 @@ + return pMydata->processHeader(iWidth, iHeight); + } + +-static mng_ptr mygetcanvasline(mng_handle hMNG, ++static mng_ptr MNG_DECL mygetcanvasline(mng_handle hMNG, + mng_uint32 iLinenr) + { + QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); + return (mng_ptr)pMydata->image.scanLine(iLinenr); + } + +-static mng_bool myrefresh(mng_handle /*hMNG*/, ++static mng_bool MNG_DECL myrefresh(mng_handle /*hMNG*/, + mng_uint32 /*iX*/, + mng_uint32 /*iY*/, + mng_uint32 /*iWidth*/, +@@ -171,13 +176,13 @@ + return MNG_TRUE; + } + +-static mng_uint32 mygettickcount(mng_handle hMNG) ++static mng_uint32 MNG_DECL mygettickcount(mng_handle hMNG) + { + QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); + return pMydata->elapsed++; + } + +-static mng_bool mysettimer(mng_handle hMNG, ++static mng_bool MNG_DECL mysettimer(mng_handle hMNG, + mng_uint32 iMsecs) + { + QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); +@@ -186,7 +191,7 @@ + return MNG_TRUE; + } + +-static mng_bool myprocessterm(mng_handle hMNG, ++static mng_bool MNG_DECL myprocessterm(mng_handle hMNG, + mng_uint8 iTermaction, + mng_uint8 /*iIteraction*/, + mng_uint32 /*iDelay*/, +@@ -198,7 +203,7 @@ + return MNG_TRUE; + } + +-static mng_bool mytrace(mng_handle, ++static mng_bool MNG_DECL mytrace(mng_handle, + mng_int32 iFuncnr, + mng_int32 iFuncseq, + mng_pchar zFuncname) diff --git a/mingw-w64-qt4/qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch b/mingw-w64-qt4/qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch new file mode 100644 index 0000000000..42806a14dd --- /dev/null +++ b/mingw-w64-qt4/qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch @@ -0,0 +1,11 @@ +--- a/qmake/generators/win32/mingw_make.cpp 2014-10-19 12:16:07.387600000 +0400 ++++ b/qmake/generators/win32/mingw_make.cpp 2014-10-19 12:16:07.387600000 +0400 +@@ -280,7 +280,7 @@ + processVars(); + + if (!project->values("RES_FILE").isEmpty()) { +- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE")); ++ project->values("OBJECTS") += escapeFilePaths(project->values("RES_FILE")); + } + + // LIBS defined in Profile comes first for gcc diff --git a/mingw-w64-qt4/qt-4.8.7-mingw-configure.patch b/mingw-w64-qt4/qt-4.8.7-mingw-configure.patch new file mode 100644 index 0000000000..a5207f3196 --- /dev/null +++ b/mingw-w64-qt4/qt-4.8.7-mingw-configure.patch @@ -0,0 +1,280 @@ +--- qt-everywhere-opensource-src-4.8.7/configure.orig 2015-05-07 17:14:56.000000000 +0300 ++++ qt-everywhere-opensource-src-4.8.7/configure 2015-06-03 15:18:52.103556600 +0300 +@@ -48,9 +48,19 @@ + relconf=`basename $0` + # the directory of this script is the "source tree" + relpath=`dirname $0` +-relpath=`(cd "$relpath"; /bin/pwd)` ++if [ -n "$MSYSTEM" ]; then ++ relpath=$(cygpath -ma "$relpath") ++ relpath=${relpath%/} ++else ++ relpath=`(cd "$relpath"; /bin/pwd)` ++fi + # the current directory is the "build tree" or "object tree" +-outpath=`/bin/pwd` ++if [ -n "$MSYSTEM" ]; then ++ outpath=$(cygpath -ma $(/bin/pwd)) ++ outpath=${outpath%/} ++else ++ outpath=`/bin/pwd` ++fi + + #license file location + LICENSE_FILE="$QT_LICENSE_FILE" +@@ -753,6 +763,7 @@ + CFG_ZLIB=auto + CFG_SYMBIAN_DEFFILES=auto + CFG_S60=auto ++CFG_NATIVE_GESTURES=auto + CFG_SQLITE=qt + CFG_GIF=auto + CFG_TIFF=auto +@@ -1144,7 +1155,7 @@ + VAL=no + ;; + #Qt style yes options +- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu) ++ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-native-gestures|-usedeffiles|-icu) + VAR=`echo $1 | sed "s,^-\(.*\),\1,"` + VAL=yes + ;; +@@ -1376,7 +1387,11 @@ + CFG_PSQL_CONFIG="$VAL" + ;; + prefix) +- QT_INSTALL_PREFIX="$VAL" ++ if [ -n "$MSYSTEM" ]; then ++ QT_INSTALL_PREFIX=$(cygpath -ma "$VAL") ++ else ++ QT_INSTALL_PREFIX="$VAL" ++ fi + ;; + hostprefix) + QT_HOST_PREFIX="$VAL" +@@ -1988,6 +2003,13 @@ + UNKNOWN_OPT=yes + fi + ;; ++ native-gestures) ++ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then ++ CFG_NATIVE_GESTURES="$VAL" ++ else ++ UNKNOWN_OPT=yes ++ fi ++ ;; + usedeffiles) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_SYMBIAN_DEFFILES="$VAL" +@@ -2966,6 +2988,12 @@ + - Also available for Reliant UNIX: reliant-cds-64 + " + ;; ++ MSYS*:* | MINGW*:*) ++ PLATFORM=win32-g++ ++ if [ -z "$XPLATFORM" ]; then ++ XPLATFORM="win32-g++" ++ fi ++ ;; + CYGWIN*:*) + PLATFORM=cygwin-g++ + ;; +@@ -3139,6 +3167,13 @@ + + if [ -z "${CFG_HOST_ARCH}" ]; then + case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in ++ MINGW*:*:*) ++ MACHINE_GCC=`(gcc -dumpmachine) 2>/dev/null` ++ CFG_HOST_ARCH=${MACHINE_GCC%%-*} ++ if [ "$OPT_VERBOSE" = "yes" ]; then ++ echo " MINGW/MSYS ($CFG_HOST_ARCH)" ++ fi ++ ;; + GNU:*:*) + CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'` + case "$CFG_HOST_ARCH" in +@@ -3754,6 +3794,8 @@ + if [ -z "$QT_INSTALL_SETTINGS" ]; then #default + if [ "$PLATFORM_MAC" = "yes" ]; then + QT_INSTALL_SETTINGS=/Library/Preferences/Qt ++ elif [ "$XPLATFORM_MINGW" = "yes" ]; then ++ QT_INSTALL_SETTINGS="$QT_INSTALL_PREFIX/etc" + else + QT_INSTALL_SETTINGS=/etc/xdg + fi +@@ -4545,6 +4587,15 @@ + EOF + fi + ++if [ "$XPLATFORM_MINGW" = "yes" ]; then ++ cat << EOF ++ ++Qt for Windows only: ++ -no-native-gestures ............ Do not use native gestures on Windows 7. ++ + -native-gestures ............... Use native gestures on Windows 7. ++EOF ++fi ++ + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then + cat << EOF + +@@ -4943,7 +4994,15 @@ + + #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured + rm -rf mkspecs/default +- ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default ++ if [ "$XPLATFORM_MINGW" = "yes" ]; then ++ mkdir -p mkspecs/default ++ _spec=$(echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,") ++ echo "QMAKESPEC_ORIGINAL=$XQMAKESPEC" > mkspecs/default/qmake.conf ++ echo "include(../${_spec}/qmake.conf)" >> mkspecs/default/qmake.conf ++ echo "#include \"../${_spec}/qplatformdefs.conf\"" > mkspecs/default/qplatformdefs.h ++ else ++ ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default ++ fi + # fix makefiles + for mkfile in GNUmakefile Makefile; do + EXTRA_LFLAGS= +@@ -4953,7 +5012,11 @@ + # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then + # (cd qmake && qmake) >/dev/null 2>&1 && continue + # fi +- in_mkfile="${mkfile}.unix" ++ if [ "$PLATFORM" = "win32-g++" ]; then ++ in_mkfile="${mkfile}.win32-g++-sh" ++ else ++ in_mkfile="${mkfile}.unix" ++ fi + fi + in_mkfile="$relpath/qmake/$in_mkfile" + mkfile="$outpath/qmake/$mkfile" +@@ -5362,7 +5425,7 @@ + fi + + # check IPC support +-if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then ++if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then + # Raptor does not support configure tests. + if ! compileTest unix/ipc_sysv "ipc_sysv" ; then + # SYSV IPC is not supported - check POSIX IPC +@@ -5415,6 +5478,13 @@ + CFG_LARGEFILE=yes + fi + ++if [ "$CFG_NATIVE_GESTURES" = auto ]; then ++ if [ "$XPLATFORM_MINGW" = "yes" ]; then ++ CFG_NATIVE_GESTURES=yes ++ else ++ CFG_NATIVE_GESTURES=no ++ fi ++fi + + if [ "$CFG_S60" = "auto" ]; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then +@@ -5579,7 +5649,7 @@ + if [ "$CFG_SQL_psql" != "no" ]; then + [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config` + # Be careful not to use native pg_config when cross building. +- if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then ++ if [ -x "$CFG_PSQL_CONFIG" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then + QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null` + QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null` + fi +@@ -6699,6 +6769,24 @@ + + fi # QWS + ++if [ "$XPLATFORM_MINGW" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then ++ # auto-detect FontConfig support ++ if [ "$CFG_FONTCONFIG" != "no" ]; then ++ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then ++ QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null` ++ QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null` ++ else ++ QT_CFLAGS_FONTCONFIG= ++ QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig" ++ fi ++ if compileTest x11/fontconfig "FontConfig" $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then ++ QT_CONFIG="$QT_CONFIG fontconfig" ++ QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG" ++ QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG" ++ fi ++ fi ++fi # MINGW ++ + EGL_VARIANT=none + # EGL Support + if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then +@@ -7398,7 +7486,7 @@ + QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" + QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" + fi +-if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then ++if [ "$CFG_LARGEFILE" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG largefile" + fi + if [ "$CFG_STL" = "no" ]; then +@@ -7669,6 +7757,10 @@ + # Follow default behavior of configure.exe by overriding with "rtti" + # (also on Symbian). + QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti" ++ ++ if [ "$CFG_NATIVE_GESTURES" = "yes" ]; then ++ QTCONFIG_CONFIG="$QTCONFIG_CONFIG native-gestures" ++ fi + fi + + if [ "$CFG_ALSA" = "yes" ]; then +@@ -8263,6 +8355,15 @@ + ;; + esac + ++if [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_SHARED" = "yes" ]; then ++ cat >>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" + [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new" + +-if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then ++if [ "$CFG_LARGEFILE" = "yes" ]; then + echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new" + fi + +@@ -8508,7 +8609,7 @@ + [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV" + [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB" + [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK" +-if [ "$XPLATFORM_SYMBIAN" = "no" ]; then ++if [ "$XPLATFORM_SYMBIAN" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then + # Do not apply following negative X11/Unix/Mac only flags on Symbian, so that + # configuration matches with the one generated by configure executable tool + [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS" +@@ -9010,6 +9111,7 @@ + fi + echo "Support for S60 ........ $CFG_S60" + echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" ++echo "Use native gestures .... $CFG_NATIVE_GESTURES" + echo "STL support ............ $CFG_STL" + echo "PCH support ............ $CFG_PRECOMPILE" + echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}" +@@ -9058,6 +9160,10 @@ + fi + echo "zlib support ........... $CFG_ZLIB" + echo "Session management ..... $CFG_SM" ++if [ "$XPLATFORM_MINGW" = "yes" ]; then ++ echo "Freetype2 support ...... $CFG_LIBFREETYPE" ++ echo "FontConfig support ..... $CFG_FONTCONFIG" ++fi + if [ "$PLATFORM_QWS" = "yes" ]; then + echo "Embedded support ....... $CFG_EMBEDDED" + if [ "$CFG_QWS_FREETYPE" = "auto" ]; then diff --git a/mingw-w64-qt4/qt-4.8.7-mingw-unix-tests.patch b/mingw-w64-qt4/qt-4.8.7-mingw-unix-tests.patch new file mode 100644 index 0000000000..f1a9b01e40 --- /dev/null +++ b/mingw-w64-qt4/qt-4.8.7-mingw-unix-tests.patch @@ -0,0 +1,49 @@ +--- a/config.tests/unix/ibase/ibase.pro 2015-05-27 14:49:31.512616600 +0300 ++++ b/config.tests/unix/ibase/ibase.pro 2015-05-27 14:49:38.480009800 +0300 +@@ -1,4 +1,4 @@ + SOURCES = ibase.cpp + CONFIG -= qt dylib + mac:CONFIG -= app_bundle +-LIBS += -lgds ++LIBS += -lfbclient +--- a/config.tests/unix/endian.test 2015-05-27 15:39:33.702970300 +0300 ++++ b/config.tests/unix/endian.test 2015-05-27 15:44:28.057531900 +0300 +@@ -11,7 +11,7 @@ + + # build and run a test program + test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian" +-"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QMAKE_CXXFLAGS*=$SYSROOT" "LIBS*=$SYSROOT" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1 ++"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=" "CONFIG-=debug_and_release" "QMAKE_CXXFLAGS*=$SYSROOT" "LIBS*=$SYSROOT" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1 + cd "$OUTDIR/config.tests/unix/endian" + + +--- a/config.tests/unix/makeabs 2015-05-28 10:41:35.515153200 +0300 ++++ b/config.tests/unix/makeabs 2015-05-28 10:55:00.222674400 +0300 +@@ -4,6 +4,7 @@ + RES="$FILE" + + CUT_ARG="-b1" ++CUT_ARG2="-b2" + if [ `uname -s` = "QNX" ]; then + # QNX does not understand "-b1" + CUT_ARG="-c1" +@@ -11,6 +12,8 @@ + + if [ `echo $FILE | cut $CUT_ARG` = "/" ]; then + true ++elif [ `echo $FILE | cut $CUT_ARG2` = ":" ]; then ++ true + else + RES="$PWD/$FILE" + test -d "$RES" && RES="$RES/" +@@ -21,5 +24,10 @@ + + RES=`echo "$RES" | sed "s,//,/,g" | sed "s,/$,,"` + fi ++ ++if [[ -n "$MSYSTEM" ]]; then ++ RES=$(cygpath -wm $RES) ++fi ++ + echo $RES #return + diff --git a/mingw-w64-qt4/qt-merge-static-and-shared-library-trees.patch b/mingw-w64-qt4/qt-merge-static-and-shared-library-trees.patch deleted file mode 100644 index 4abf972ee9..0000000000 --- a/mingw-w64-qt4/qt-merge-static-and-shared-library-trees.patch +++ /dev/null @@ -1,306 +0,0 @@ ---- usr/i686-w64-mingw32/sys-root/mingw/include/QtCore/qconfig.h.orig 2011-12-25 21:03:37.022018831 +0100 -+++ usr/i686-w64-mingw32/sys-root/mingw/include/QtCore/qconfig.h 2011-12-25 21:13:50.704976445 +0100 -@@ -26,6 +26,14 @@ - - #ifndef QT_BOOTSTRAPPED - -+#if defined(QT_NODLL) -+#if defined(QT_BUILTIN_GIF_READER) && defined(QT_NO_BUILTIN_GIF_READER) -+# undef QT_BUILTIN_GIF_READER -+#elif !defined(QT_BUILTIN_GIF_READER) && !defined(QT_NO_BUILTIN_GIF_READER) -+# define QT_BUILTIN_GIF_READER 1 -+#endif -+#endif -+ - #if defined(QT_NO_ALSA) && defined(QT_ALSA) - # undef QT_NO_ALSA - #elif !defined(QT_NO_ALSA) && !defined(QT_ALSA) -@@ -80,6 +88,7 @@ - # define QT_NO_ICD - #endif - -+#if !defined(QT_NODLL) - #if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG) - # undef QT_NO_IMAGEFORMAT_JPEG - #elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG) -@@ -97,6 +106,7 @@ - #elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF) - # define QT_NO_IMAGEFORMAT_TIFF - #endif -+#endif - - #if defined(QT_NO_INOTIFY) && defined(QT_INOTIFY) - # undef QT_NO_INOTIFY -@@ -176,6 +186,14 @@ - # define QT_NO_SYSTEMSEMAPHORE - #endif - -+#if defined(QT_NODLL) -+#if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT) -+# undef QT_NO_WEBKIT -+#elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT) -+# define QT_NO_WEBKIT -+#endif -+#endif -+ - #if defined(QT_NO_ZLIB) && defined(QT_ZLIB) - # undef QT_NO_ZLIB - #elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB) ---- usr/i686-w64-mingw32/sys-root/mingw/include/Qt/qconfig.h.orig 2011-12-25 21:03:13.349289762 +0100 -+++ usr/i686-w64-mingw32/sys-root/mingw/include/Qt/qconfig.h 2011-12-25 21:06:37.386579371 +0100 -@@ -26,6 +26,14 @@ - - #ifndef QT_BOOTSTRAPPED - -+#if defined(QT_NODLL) -+#if defined(QT_BUILTIN_GIF_READER) && defined(QT_NO_BUILTIN_GIF_READER) -+# undef QT_BUILTIN_GIF_READER -+#elif !defined(QT_BUILTIN_GIF_READER) && !defined(QT_NO_BUILTIN_GIF_READER) -+# define QT_BUILTIN_GIF_READER 1 -+#endif -+#endif -+ - #if defined(QT_NO_ALSA) && defined(QT_ALSA) - # undef QT_NO_ALSA - #elif !defined(QT_NO_ALSA) && !defined(QT_ALSA) -@@ -80,6 +88,7 @@ - # define QT_NO_ICD - #endif - -+#if !defined(QT_NODLL) - #if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG) - # undef QT_NO_IMAGEFORMAT_JPEG - #elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG) -@@ -97,6 +106,7 @@ - #elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF) - # define QT_NO_IMAGEFORMAT_TIFF - #endif -+#endif - - #if defined(QT_NO_INOTIFY) && defined(QT_INOTIFY) - # undef QT_NO_INOTIFY -@@ -176,6 +186,14 @@ - # define QT_NO_SYSTEMSEMAPHORE - #endif - -+#if defined(QT_NODLL) -+#if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT) -+# undef QT_NO_WEBKIT -+#elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT) -+# define QT_NO_WEBKIT -+#endif -+#endif -+ - #if defined(QT_NO_ZLIB) && defined(QT_ZLIB) - # undef QT_NO_ZLIB - #elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB) ---- usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/qconfig.pri.orig 2011-12-25 21:09:01.616032758 +0100 -+++ usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/qconfig.pri 2011-12-25 21:12:14.685003350 +0100 -@@ -2,7 +2,11 @@ - CONFIG += cross_compile def_files_disabled exceptions rtti no_mocdepend release stl qt_no_framework - QT_ARCH = windows - QT_EDITION = OpenSource --QT_CONFIG += minimal-config small-config medium-config large-config full-config qt3support accessibility opengl shared ipv6 getaddrinfo system-jpeg system-png png system-tiff no-freetype system-zlib gnu-libiconv dbus dbus-linked openssl concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release -+contains(CONFIG, static) { -+ QT_CONFIG += minimal-config small-config medium-config large-config full-config qt3support accessibility opengl static ipv6 getaddrinfo system-jpeg jpeg mng system-png png gif system-tiff tiff no-freetype system-zlib gnu-libiconv dbus dbus-linked openssl concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release -+} else { -+ QT_CONFIG += minimal-config small-config medium-config large-config full-config qt3support accessibility opengl shared ipv6 getaddrinfo system-jpeg system-png png system-tiff no-freetype system-zlib gnu-libiconv dbus dbus-linked openssl concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release -+} - - #versioning - QT_VERSION = 4.8.5 ---- usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/win32/default_post.prf.orig 2011-12-26 02:29:56.365208473 +0100 -+++ usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/win32/default_post.prf 2011-12-26 02:31:03.650208601 +0100 -@@ -6,6 +6,10 @@ - } - } - -+contains(CONFIG, static) { -+ QMAKE_LFLAGS += -static -+} -+ - # Now load the global default_post - load(default_post) - ---- usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/qt_functions.prf.orig 2011-12-26 21:24:32.448207664 +0100 -+++ usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/qt_functions.prf 2012-04-19 16:21:25.437111396 +0200 -@@ -71,7 +71,7 @@ - export(TARGET.CAPABILITY) - } - isEmpty(LINKAGE) { -- if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { -+ if(!debug_and_release|build_pass):!static:CONFIG(debug, debug|release) { - win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d - mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug - } -@@ -83,6 +83,17 @@ - QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX} - } - LIBS += $$LINKAGE -+ win32:CONFIG(static) { -+ isEqual(LIB_NAME, QtCore) { -+ LIBS += $$QMAKE_LIBS_CORE -+ } else:isEqual(LIB_NAME, QtGui) { -+ LIBS += $$QMAKE_LIBS_GUI -+ } else:isEqual(LIB_NAME, QtNetwork) { -+ LIBS += $$QMAKE_LIBS_NETWORK -+ } else:isEqual(LIB_NAME, QtOpenGL) { -+ LIBS += $$QMAKE_LIBS_OPENGL -+ } -+ } - export(LIBS) - export(INCLUDEPATH) - export(QMAKE_FRAMEWORKPATH) ---- usr/x86_64-w64-mingw32/sys-root/mingw/include/QtCore/qconfig.h.orig 2011-12-25 21:03:37.022018831 +0100 -+++ usr/x86_64-w64-mingw32/sys-root/mingw/include/QtCore/qconfig.h 2011-12-25 21:13:50.704976445 +0100 -@@ -26,6 +26,14 @@ - - #ifndef QT_BOOTSTRAPPED - -+#if defined(QT_NODLL) -+#if defined(QT_BUILTIN_GIF_READER) && defined(QT_NO_BUILTIN_GIF_READER) -+# undef QT_BUILTIN_GIF_READER -+#elif !defined(QT_BUILTIN_GIF_READER) && !defined(QT_NO_BUILTIN_GIF_READER) -+# define QT_BUILTIN_GIF_READER 1 -+#endif -+#endif -+ - #if defined(QT_NO_ALSA) && defined(QT_ALSA) - # undef QT_NO_ALSA - #elif !defined(QT_NO_ALSA) && !defined(QT_ALSA) -@@ -80,6 +88,7 @@ - # define QT_NO_ICD - #endif - -+#if !defined(QT_NODLL) - #if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG) - # undef QT_NO_IMAGEFORMAT_JPEG - #elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG) -@@ -97,6 +106,7 @@ - #elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF) - # define QT_NO_IMAGEFORMAT_TIFF - #endif -+#endif - - #if defined(QT_NO_INOTIFY) && defined(QT_INOTIFY) - # undef QT_NO_INOTIFY -@@ -176,6 +186,14 @@ - # define QT_NO_SYSTEMSEMAPHORE - #endif - -+#if defined(QT_NODLL) -+#if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT) -+# undef QT_NO_WEBKIT -+#elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT) -+# define QT_NO_WEBKIT -+#endif -+#endif -+ - #if defined(QT_NO_ZLIB) && defined(QT_ZLIB) - # undef QT_NO_ZLIB - #elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB) ---- usr/x86_64-w64-mingw32/sys-root/mingw/include/Qt/qconfig.h.orig 2011-12-25 21:03:13.349289762 +0100 -+++ usr/x86_64-w64-mingw32/sys-root/mingw/include/Qt/qconfig.h 2011-12-25 21:06:37.386579371 +0100 -@@ -26,6 +26,14 @@ - - #ifndef QT_BOOTSTRAPPED - -+#if defined(QT_NODLL) -+#if defined(QT_BUILTIN_GIF_READER) && defined(QT_NO_BUILTIN_GIF_READER) -+# undef QT_BUILTIN_GIF_READER -+#elif !defined(QT_BUILTIN_GIF_READER) && !defined(QT_NO_BUILTIN_GIF_READER) -+# define QT_BUILTIN_GIF_READER 1 -+#endif -+#endif -+ - #if defined(QT_NO_ALSA) && defined(QT_ALSA) - # undef QT_NO_ALSA - #elif !defined(QT_NO_ALSA) && !defined(QT_ALSA) -@@ -80,6 +88,7 @@ - # define QT_NO_ICD - #endif - -+#if !defined(QT_NODLL) - #if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG) - # undef QT_NO_IMAGEFORMAT_JPEG - #elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG) -@@ -97,6 +106,7 @@ - #elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF) - # define QT_NO_IMAGEFORMAT_TIFF - #endif -+#endif - - #if defined(QT_NO_INOTIFY) && defined(QT_INOTIFY) - # undef QT_NO_INOTIFY -@@ -176,6 +186,14 @@ - # define QT_NO_SYSTEMSEMAPHORE - #endif - -+#if defined(QT_NODLL) -+#if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT) -+# undef QT_NO_WEBKIT -+#elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT) -+# define QT_NO_WEBKIT -+#endif -+#endif -+ - #if defined(QT_NO_ZLIB) && defined(QT_ZLIB) - # undef QT_NO_ZLIB - #elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB) ---- usr/x86_64-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/qconfig.pri.orig 2011-12-25 21:09:01.616032758 +0100 -+++ usr/x86_64-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/qconfig.pri 2011-12-25 21:12:14.685003350 +0100 -@@ -2,7 +2,11 @@ - CONFIG += cross_compile def_files_disabled exceptions rtti no_mocdepend release stl qt_no_framework - QT_ARCH = windows - QT_EDITION = OpenSource --QT_CONFIG += minimal-config small-config medium-config large-config full-config qt3support accessibility opengl shared ipv6 getaddrinfo system-jpeg system-png png system-tiff no-freetype system-zlib gnu-libiconv dbus dbus-linked openssl concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release -+contains(CONFIG, static) { -+ QT_CONFIG += minimal-config small-config medium-config large-config full-config qt3support accessibility opengl static ipv6 getaddrinfo system-jpeg jpeg mng system-png png gif system-tiff tiff no-freetype system-zlib gnu-libiconv dbus dbus-linked openssl concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release -+} else { -+ QT_CONFIG += minimal-config small-config medium-config large-config full-config qt3support accessibility opengl shared ipv6 getaddrinfo system-jpeg system-png png system-tiff no-freetype system-zlib gnu-libiconv dbus dbus-linked openssl concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release -+} - - #versioning - QT_VERSION = 4.8.5 ---- usr/x86_64-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/win32/default_post.prf.orig 2011-12-26 02:29:56.365208473 +0100 -+++ usr/x86_64-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/win32/default_post.prf 2011-12-26 02:31:03.650208601 +0100 -@@ -6,6 +6,10 @@ - } - } - -+contains(CONFIG, static) { -+ QMAKE_LFLAGS += -static -+} -+ - # Now load the global default_post - load(default_post) - ---- usr/x86_64-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/qt_functions.prf.orig 2011-12-26 21:24:32.448207664 +0100 -+++ usr/x86_64-w64-mingw32/sys-root/mingw/share/qt4/mkspecs/features/qt_functions.prf 2012-04-19 16:21:25.437111396 +0200 -@@ -71,7 +71,7 @@ - export(TARGET.CAPABILITY) - } - isEmpty(LINKAGE) { -- if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { -+ if(!debug_and_release|build_pass):!static:CONFIG(debug, debug|release) { - win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d - mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug - } -@@ -83,6 +83,17 @@ - QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX} - } - LIBS += $$LINKAGE -+ win32:CONFIG(static) { -+ isEqual(LIB_NAME, QtCore) { -+ LIBS += $$QMAKE_LIBS_CORE -+ } else:isEqual(LIB_NAME, QtGui) { -+ LIBS += $$QMAKE_LIBS_GUI -+ } else:isEqual(LIB_NAME, QtNetwork) { -+ LIBS += $$QMAKE_LIBS_NETWORK -+ } else:isEqual(LIB_NAME, QtOpenGL) { -+ LIBS += $$QMAKE_LIBS_OPENGL -+ } -+ } - export(LIBS) - export(INCLUDEPATH) - export(QMAKE_FRAMEWORKPATH) diff --git a/mingw-w64-qt4/qt4-build-debug-qmake.patch b/mingw-w64-qt4/qt4-build-debug-qmake.patch new file mode 100644 index 0000000000..7a44e3099a --- /dev/null +++ b/mingw-w64-qt4/qt4-build-debug-qmake.patch @@ -0,0 +1,11 @@ +--- a/qmake/Makefile.win32-g++-sh 2015-03-21 18:07:24.056403965 +0100 ++++ b/qmake/Makefile.win32-g++-sh 2015-03-21 18:09:40.642912613 +0100 +@@ -12,7 +12,7 @@ + # specific stuff for mingw g++ make + # + CXX = g++ +-CFLAGS = -c -o$@ -O \ ++CFLAGS = -c -o$@ -O0 -ggdb \ + -I. -Igenerators -Igenerators/unix \ + -Igenerators/win32 -Igenerators/mac \ + -Igenerators/symbian -Igenerators/integrity \ diff --git a/mingw-w64-qt4/qt4-fix-linking-against-static-dbus.patch b/mingw-w64-qt4/qt4-fix-linking-against-static-dbus.patch new file mode 100644 index 0000000000..53369042c7 --- /dev/null +++ b/mingw-w64-qt4/qt4-fix-linking-against-static-dbus.patch @@ -0,0 +1,14 @@ +--- a/src/dbus/qdbus_symbols_p.h 2014-08-02 12:32:15.112000000 +0200 ++++ b/src/dbus/qdbus_symbols_p.h 2014-08-02 12:33:33.286000000 +0200 +@@ -55,6 +55,11 @@ + #define QDBUS_SYMBOLS_P_H + + #include ++ ++#ifdef QT_STATIC ++#define DBUS_STATIC_BUILD ++#endif ++ + #include + + #ifndef QT_NO_DBUS diff --git a/mingw-w64-qt4/qt4-merge-static-and-shared-library-trees.patch b/mingw-w64-qt4/qt4-merge-static-and-shared-library-trees.patch new file mode 100644 index 0000000000..e8ffb9a19b --- /dev/null +++ b/mingw-w64-qt4/qt4-merge-static-and-shared-library-trees.patch @@ -0,0 +1,51 @@ +--- a/mkspecs/features/qt_functions.prf 2014-08-01 23:54:20.441986402 +0200 ++++ b/mkspecs/features/qt_functions.prf 2014-08-01 23:55:33.603172013 +0200 +@@ -83,6 +83,19 @@ + QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX} + } + LIBS += $$LINKAGE ++ ++ win32:CONFIG(static) { ++ isEqual(LIB_NAME, QtCore) { ++ LIBS += $$QMAKE_LIBS_CORE ++ } else:isEqual(LIB_NAME, QtGui) { ++ LIBS += $$QMAKE_LIBS_GUI ++ } else:isEqual(LIB_NAME, QtNetwork) { ++ LIBS += $$QMAKE_LIBS_NETWORK ++ } else:isEqual(LIB_NAME, QtOpenGL) { ++ LIBS += $$QMAKE_LIBS_OPENGL ++ } ++ } ++ + export(LIBS) + export(INCLUDEPATH) + export(QMAKE_FRAMEWORKPATH) +--- a/mkspecs/features/default_post.prf 2014-08-01 23:51:16.864011435 +0200 ++++ b/mkspecs/features/default_post.prf 2014-08-01 23:51:29.830221559 +0200 +@@ -96,6 +96,11 @@ + QMAKE_INCDIR += $$QMAKE_INCDIR_POST + QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST + ++win32:contains(CONFIG, static) { ++ DEFINES += QT_STATIC ++ QMAKE_LFLAGS += -static ++} ++ + # Let every project have a standard GNU `check' target + !contains(QMAKE_EXTRA_TARGETS, check) { + # `make check' should iterate through all subdirs +--- a/configure 2012-12-10 23:51:02.920255366 +0100 ++++ b/configure 2012-12-10 23:55:58.101753703 +0100 +@@ -6032,6 +6032,12 @@ + QT_EDITION = $Edition + QT_CONFIG += $QT_CONFIG + ++contains(CONFIG, static) { ++ CONFIG -= shared ++ QT_CONFIG += static jpeg gif ++ QT_CONFIG -= shared ++} ++ + #versioning + QT_VERSION = $QT_VERSION + QT_MAJOR_VERSION = $QT_MAJOR_VERSION diff --git a/mingw-w64-qt4/qt4-use-correct-pkg-config-static-flags.patch b/mingw-w64-qt4/qt4-use-correct-pkg-config-static-flags.patch new file mode 100644 index 0000000000..9e03964254 --- /dev/null +++ b/mingw-w64-qt4/qt4-use-correct-pkg-config-static-flags.patch @@ -0,0 +1,14 @@ +--- qt-everywhere-opensource-src-4.8.6/configure.orig 2015-03-21 18:07:24.056403965 +0100 ++++ qt-everywhere-opensource-src-4.8.6/configure 2015-03-21 18:09:40.642912613 +0100 +@@ -5098,6 +5098,11 @@ + echo "QT_BUILD_TREE = $outpath" > "$outpath/.qmake.cache.pkgconfig" + PKG_CONFIG=`"$outpath/bin/qmake" -cache "$outpath/.qmake.cache.pkgconfig" -spec "$XQMAKESPEC" "$outpath/dummy.pro" -o /dev/null 2>&1 > /dev/null | sed -n -e 's,Project MESSAGE: \(.*\),\1,p'` + rm "$outpath/.qmake.cache.pkgconfig" "$outpath/dummy.pro" ++ ++ if [ "$CFG_SHARED" = "no" ] ; then ++ PKG_CONFIG="$PKG_CONFIG --static" ++ [ "$OPT_VERBOSE" = "yes" ] && echo "Using '$PKG_CONFIG' because we're doing a static build" ++ fi + fi + if [ -z "$PKG_CONFIG" ]; then + PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null` diff --git a/mingw-w64-qt5-git/PKGBUILD b/mingw-w64-qt5-git/PKGBUILD index 31a9db4a93..3eb8b103f6 100644 --- a/mingw-w64-qt5-git/PKGBUILD +++ b/mingw-w64-qt5-git/PKGBUILD @@ -36,6 +36,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "gperf" "m4" "flex" + "git" "${MINGW_PACKAGE_PREFIX}-make") groups=("${MINGW_PACKAGE_PREFIX}-qt" "${MINGW_PACKAGE_PREFIX}-qt5") options=('!strip' 'staticlibs') @@ -92,7 +93,7 @@ prepare() { mv -f $curmod ${_realname} fi done - + cd ${_realname} plain "" diff --git a/mingw-w64-qt5-static/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch b/mingw-w64-qt5-static/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch index 59e81e2928..f8579bce65 100644 --- a/mingw-w64-qt5-static/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch +++ b/mingw-w64-qt5-static/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch @@ -6,6 +6,6 @@ diff -urN --ignore-all-space a/qtbase/src/sql/drivers/ibase/qsql_ibase.pri b/qtb } else { !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { - LIBS += -lgds32_ms -+ LIBS += -lfbclient_ms ++ LIBS += -lfbclient } } diff --git a/mingw-w64-qt5-static/0006-qt-5.3.0-win_flex-replace.patch b/mingw-w64-qt5-static/0006-qt-5.3.0-win_flex-replace.patch index 9ea7aedfd3..3849e8b06a 100644 --- a/mingw-w64-qt5-static/0006-qt-5.3.0-win_flex-replace.patch +++ b/mingw-w64-qt5-static/0006-qt-5.3.0-win_flex-replace.patch @@ -1,38 +1,43 @@ diff -urN --ignore-all-space a/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro b/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro --- a/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro 2014-05-02 23:06:13.969569900 +0100 +++ b/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro 2014-05-02 23:06:33.470685300 +0100 -@@ -41,7 +41,7 @@ +@@ -41,14 +41,14 @@ $$ANGLE_DIR/src/compiler/preprocessor/Token.cpp - # NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin --flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} -+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} + # NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin +-flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} ++flex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} flex.output = ${QMAKE_FILE_BASE}.cpp flex.input = FLEX_SOURCES flex.dependency_type = TYPE_C + flex.variable_out = GENERATED_SOURCES + QMAKE_EXTRA_COMPILERS += flex + +-bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} ++bison.commands = bison --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} + bison.output = ${QMAKE_FILE_BASE}.cpp + bison.input = BISON_SOURCES + bison.dependency_type = TYPE_C diff -urN --ignore-all-space a/qtbase/src/angle/src/compiler/translator.pro b/qtbase/src/angle/src/compiler/translator.pro --- a/qtbase/src/angle/src/compiler/translator.pro 2014-05-02 23:06:13.969569900 +0100 +++ b/qtbase/src/angle/src/compiler/translator.pro 2014-05-02 23:06:33.467685100 +0100 -@@ -132,7 +132,7 @@ - } +@@ -163,14 +163,14 @@ - # NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin --flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} -+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} + + # NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin +-flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} ++flex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} flex.output = ${QMAKE_FILE_BASE}_lex.cpp flex.input = FLEX_SOURCES flex.dependency_type = TYPE_C -diff -urN --ignore-all-space a/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf b/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf ---- a/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf 2014-05-02 23:06:28.221385000 +0100 -+++ b/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf 2014-05-02 23:06:33.474685500 +0100 -@@ -106,7 +106,6 @@ - # A newer version of flex is required on Windows. At the moment the only - # one that appears to provide binaries and is not cygwin is winflex. - FLEX = flex --win32: FLEX = win_flex + flex.variable_out = GENERATED_SOURCES + QMAKE_EXTRA_COMPILERS += flex - BIN_EXTENSION = - win32: BIN_EXTENSION = .exe +-bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \ ++bison.commands = bison --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \ + --output=${QMAKE_FILE_BASE}_tab.cpp ${QMAKE_FILE_NAME} + bison.output = ${QMAKE_FILE_BASE}_tab.h + bison.input = BISON_SOURCES diff -urN --ignore-all-space a/qtwebkit/Tools/Scripts/webkitdirs.pm b/qtwebkit/Tools/Scripts/webkitdirs.pm --- a/qtwebkit/Tools/Scripts/webkitdirs.pm 2014-05-02 23:06:28.275388100 +0100 +++ b/qtwebkit/Tools/Scripts/webkitdirs.pm 2014-05-02 23:06:33.480685800 +0100 diff --git a/mingw-w64-qt5-static/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch b/mingw-w64-qt5-static/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch index 6e894c62c6..a993071a2c 100644 --- a/mingw-w64-qt5-static/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch +++ b/mingw-w64-qt5-static/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch @@ -64,7 +64,7 @@ index 6d5764f..77e910b 100644 - + project->first("TARGET_VERSION_EXT") + ".a"); + + project->first("TARGET_VERSION_EXT") + + "." + getImportLibExtension()); - project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB")); + project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + fileVar("MINGW_IMPORT_LIB")); } diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h @@ -72,13 +72,13 @@ index 0e12679..90e78ec 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -53,6 +53,7 @@ public: - ~MingwMakefileGenerator(); - protected: QString escapeDependencyPath(const QString &path) const; + ProString escapeDependencyPath(const ProString &path) const { return MakefileGenerator::escapeDependencyPath(path); } + virtual ProString fixLibFlag(const ProString &lib); + QString getImportLibExtension(); QString getLibTarget(); + virtual QString getManifestFileForRcFile() const; bool writeMakefile(QTextStream &); - void init(); -- 1.9.0 diff --git a/mingw-w64-qt5-static/0017-qt-5.3.0-fix-examples-building.patch b/mingw-w64-qt5-static/0017-qt-5.3.0-fix-examples-building.patch index f170405155..4991954b94 100644 --- a/mingw-w64-qt5-static/0017-qt-5.3.0-fix-examples-building.patch +++ b/mingw-w64-qt5-static/0017-qt-5.3.0-fix-examples-building.patch @@ -9,8 +9,8 @@ OBJECTS_DIR = tmp MOC_DIR = tmp ---- x86_64/qtdeclarative/examples/qml/tutorials/extending/chapter6-plugins/import/import.pro.orig 2014-04-29 14:13:34.761600000 +0400 -+++ x86_64/qtdeclarative/examples/qml/tutorials/extending/chapter6-plugins/import/import.pro 2014-04-29 14:14:50.577600000 +0400 +--- x86_64/qtdeclarative/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro.orig 2014-04-29 14:13:34.761600000 +0400 ++++ x86_64/qtdeclarative/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro 2014-04-29 14:14:50.577600000 +0400 @@ -2,7 +2,7 @@ CONFIG += plugin QT += qml quick diff --git a/mingw-w64-qt5-static/0020-qt-5.3.0-use-external-angle-library.patch b/mingw-w64-qt5-static/0020-qt-5.3.0-use-external-angle-library.patch index 2984600503..b79ef19d22 100644 --- a/mingw-w64-qt5-static/0020-qt-5.3.0-use-external-angle-library.patch +++ b/mingw-w64-qt5-static/0020-qt-5.3.0-use-external-angle-library.patch @@ -1,54 +1,5 @@ ---- a/qtbase/mkspecs/win32-g++/qmake.conf.orig 2012-12-16 18:00:31.803375714 +0100 -+++ b/qtbase/mkspecs/win32-g++/qmake.conf 2012-12-16 18:00:25.883273471 +0100 -@@ -86,8 +86,8 @@ - QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 - QMAKE_LIBS_NETWORK = -lws2_32 - QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 --QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32 --QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32 -+QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lgdi32 -luser32 -+QMAKE_LIBS_OPENGL_ES2_DEBUG = -lEGL -lGLESv2 -lgdi32 -luser32 - QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 - QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain - ---- a/qtbase/src/src.pro.orig 2012-12-16 18:00:31.803375714 +0100 -+++ b/qtbase/src/src.pro 2012-12-16 18:00:25.883273471 +0100 -@@ -114,10 +114,6 @@ - SUBDIRS += src_3rdparty_harfbuzzng - src_gui.depends += src_3rdparty_harfbuzzng - } -- win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { -- SUBDIRS += src_angle -- src_gui.depends += src_angle -- } - SUBDIRS += src_gui src_platformsupport - contains(QT_CONFIG, opengl(es1|es2)?):SUBDIRS += src_openglextensions - src_plugins.depends += src_gui src_platformsupport ---- a/qtbase/src/plugins/platforms/windows/windows.pri.orig 2012-12-21 19:32:52.519838959 +0100 -+++ b/qtbase/src/plugins/platforms/windows/windows.pri 2012-12-21 19:34:11.913226062 +0100 -@@ -13,6 +13,7 @@ - !wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32 - - contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32 -+contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL - - mingw: LIBS *= -luuid - # For the dialog helpers: ---- a/qtbase/src/opengl/opengl.pro.orig 2012-12-21 19:30:29.916330288 +0100 -+++ b/qtbase/src/opengl/opengl.pro 2012-12-21 19:31:01.279878067 +0100 -@@ -15,6 +15,10 @@ - contains(QT_CONFIG, opengles2):CONFIG += opengles2 - contains(QT_CONFIG, egl):CONFIG += egl - -+win32:contains(QT_CONFIG, angle) { -+ LIBS_PRIVATE += -lGLESv2 -+} -+ - HEADERS += qgl.h \ - qgl_p.h \ - qglcolormap.h \ ---- a/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in.orig 2013-10-22 23:56:20.562965370 +0200 -+++ b/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2013-10-22 23:57:16.142476851 +0200 +--- a/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2014-12-05 09:24:36.000000000 -0700 ++++ b/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2014-12-11 10:19:51.599972209 -0700 @@ -2,9 +2,9 @@ !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) @@ -61,10 +12,10 @@ !!ENDIF _qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS}) ---- a/qtbase/src/gui/gui.pro.orig 2013-10-23 00:12:41.084984399 +0200 -+++ b/qtbase/src/gui/gui.pro 2013-10-23 00:14:29.872985611 +0200 -@@ -12,12 +12,6 @@ - platforms \ +--- a/qtbase/src/gui/gui.pro 2014-12-05 09:24:35.000000000 -0700 ++++ b/qtbase/src/gui/gui.pro 2014-12-11 10:22:37.644366784 -0700 +@@ -15,12 +15,6 @@ + iconengines \ imageformats -# This is here only because the platform plugin is no module, obviously. @@ -76,7 +27,7 @@ load(qt_module) # Code coverage with TestCocoon -@@ -30,6 +30,10 @@ +@@ -33,6 +27,10 @@ mac:!ios: LIBS_PRIVATE += -framework Cocoa @@ -87,7 +38,7 @@ CONFIG += simd optimize_full include(accessible/accessible.pri) -@@ -50,13 +50,21 @@ +@@ -55,13 +53,21 @@ contains(QT_CONFIG, angle) { CMAKE_GL_INCDIRS = $$CMAKE_INCLUDE_DIR CMAKE_ANGLE_EGL_DLL_RELEASE = libEGL.dll @@ -102,8 +53,8 @@ + win32-g++* { + CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.dll.a + CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.dll.a -+ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGL.dll.a -+ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2.dll.a ++ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.dll.a ++ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.dll.a + } else { + CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.lib + CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.lib @@ -113,3 +64,50 @@ CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 } else { +--- a/qtbase/src/opengl/opengl.pro 2014-12-05 09:24:31.000000000 -0700 ++++ b/qtbase/src/opengl/opengl.pro 2014-12-11 10:15:45.884805707 -0700 +@@ -13,6 +13,10 @@ + contains(QT_CONFIG, opengl):CONFIG += opengl + contains(QT_CONFIG, opengles2):CONFIG += opengles2 + ++win32:contains(QT_CONFIG, angle) { ++ LIBS_PRIVATE += -lGLESv2 ++} ++ + HEADERS += qgl.h \ + qgl_p.h \ + qglcolormap.h \ +--- a/qtbase/src/plugins/platforms/windows/windows.pri 2014-12-05 09:24:37.000000000 -0700 ++++ b/qtbase/src/plugins/platforms/windows/windows.pri 2014-12-11 10:13:45.228261276 -0700 +@@ -3,6 +3,7 @@ + !wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32 + + contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32 ++contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL + + mingw: LIBS *= -luuid + # For the dialog helpers: +--- a/qtbase/src/src.pro 2014-12-05 09:24:31.000000000 -0700 ++++ b/qtbase/src/src.pro 2014-12-11 10:06:14.882845813 -0700 +@@ -140,10 +140,6 @@ + SUBDIRS += src_3rdparty_harfbuzzng + src_gui.depends += src_3rdparty_harfbuzzng + } +- win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { +- SUBDIRS += src_angle +- src_gui.depends += src_angle +- } + SUBDIRS += src_gui src_platformsupport src_platformheaders + contains(QT_CONFIG, opengl(es2)?):SUBDIRS += src_openglextensions + src_plugins.depends += src_gui src_platformsupport src_platformheaders +--- a/qtbase/src/plugins/platforms/windows/qwindowseglcontext.cpp 2014-12-05 09:24:37.000000000 -0700 ++++ b/qtbase/src/plugins/platforms/windows/qwindowseglcontext.cpp 2014-12-11 20:07:27.099190408 -0700 +@@ -40,7 +40,7 @@ + + #if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC) + # define EGL_EGLEXT_PROTOTYPES +-# include ++# include + #endif + + QT_BEGIN_NAMESPACE diff --git a/mingw-w64-qt5-static/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch b/mingw-w64-qt5-static/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch index c63b8f9ac6..106b20761e 100644 --- a/mingw-w64-qt5-static/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch +++ b/mingw-w64-qt5-static/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch @@ -1,31 +1,21 @@ ---- x86_64/qtbase/src/corelib/tools/tools.pri.orig 2014-04-20 21:21:48.808906400 +0100 -+++ x86_64/qtbase/src/corelib/tools/tools.pri 2014-04-20 21:20:41.677381800 +0100 -@@ -159,11 +159,17 @@ - CONFIG(static, static|shared) { - CONFIG(debug, debug|release) { - LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd -+ DEFINES += "U_LIB_SUFFIX_C_NAME=d" - } else { - LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt - } - } else { -- LIBS_PRIVATE += -licuin -licuuc -licudt -+ CONFIG(debug, debug|release) { -+ LIBS_PRIVATE += -licuind -licuucd -licudtd -+ DEFINES += "U_LIB_SUFFIX_C_NAME=d" -+ } else { -+ LIBS_PRIVATE += -licuin -licuuc -licudt -+ } - } - } else { - LIBS_PRIVATE += -licui18n -licuuc -licudata ---- x86_64/qtbase/config.tests/unix/icu/icu.pro.orig 2014-04-20 21:24:31.107015700 +0100 -+++ x86_64/qtbase/config.tests/unix/icu/icu.pro 2014-04-20 21:24:25.573813000 +0100 -@@ -5,6 +5,7 @@ +--- x86_64/qtbase/src/3rdparty/icu_dependency.pri.orig 2014-04-20 21:24:31.107015700 +0100 ++++ x86_64/qtbase/src/3rdparty/icu_dependency.pri 2014-04-20 21:24:25.573813000 +0100 +@@ -2,11 +2,17 @@ CONFIG(static, static|shared) { CONFIG(debug, debug|release) { - LIBS += -lsicuind -lsicuucd -lsicudtd + LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd + DEFINES += "U_LIB_SUFFIX_C_NAME=d" } else { - LIBS += -lsicuin -lsicuuc -lsicudt + LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt } + } else { +- LIBS_PRIVATE += -licuin -licuuc -licudt ++ CONFIG(debug, debug|release) { ++ LIBS_PRIVATE += -licuind -licuucd -licudtd ++ DEFINES += "U_LIB_SUFFIX_C_NAME=d" ++ } else { ++ LIBS_PRIVATE += -licuin -licuuc -licudt ++ } + } + } else { + LIBS_PRIVATE += -licui18n -licuuc -licudata diff --git a/mingw-w64-qt5-static/0026-qt-5.3.1-webkit-detect-tools.patch b/mingw-w64-qt5-static/0026-qt-5.3.1-webkit-detect-tools.patch index 5bbe24193b..2ccf835a55 100644 --- a/mingw-w64-qt5-static/0026-qt-5.3.1-webkit-detect-tools.patch +++ b/mingw-w64-qt5-static/0026-qt-5.3.1-webkit-detect-tools.patch @@ -26,7 +26,7 @@ # on Linux and Mac OS X. On Windows we do have a convenience copy in # Qt5's top-level repository, so let's add that to the PATH if we can # find it. -- win32 { +- equals(QMAKE_HOST.os, Windows) { + win32:isEmpty(QMAKE_SH) { GNUTOOLS_DIR=$$[QT_HOST_DATA]/../gnuwin32/bin exists($$GNUTOOLS_DIR/gperf.exe) { diff --git a/mingw-w64-qt5-static/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch b/mingw-w64-qt5-static/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch index bdc8e42245..fe9c7af31c 100644 --- a/mingw-w64-qt5-static/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch +++ b/mingw-w64-qt5-static/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch @@ -49,24 +49,24 @@ index 790724c..eeaafcc 100644 javac.input = JAVASOURCES javac.output = $$CLASS_DIR javac.CONFIG += combine --javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEP))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} +-javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} +javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$shell_path($$join(JAVACLASSPATH, $$QMAKE_DIRLIST_SEP))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} # Force rebuild every time, because we don't know the paths of the destination files # as they depend on the code. javac.depends = FORCE diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf -index 6656d1b..40ec7cf 100644 +index 770afa3..c06cbf1 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf -@@ -22,7 +22,7 @@ debug_and_release:debug_and_release_target { - } +@@ -45,7 +45,7 @@ qtAddTargetEnv(check.commands, QT) - !isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD,^\\./?): \ -- check.commands = cd $$shell_path($$TESTRUN_CWD) && -+ check.commands = cd $$system_path($$TESTRUN_CWD) && + # This must happen after adding the environment. + !isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \ +- check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands ++ check.commands = cd $$system_path($$TESTRUN_CWD) && $$check.commands - # Allow for a custom test runner script - check.commands += $(TESTRUNNER) + # If the test is marked as insignificant, discard the exit code + insignificant_test:check.commands = -$${check.commands} diff --git a/mkspecs/features/win32/windeployqt.prf b/mkspecs/features/win32/windeployqt.prf index 22253f6..f49df47 100644 --- a/mkspecs/features/win32/windeployqt.prf diff --git a/mingw-w64-qt5-static/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch b/mingw-w64-qt5-static/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch index f52a7451e2..f7db84cd30 100644 --- a/mingw-w64-qt5-static/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch +++ b/mingw-w64-qt5-static/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch @@ -13,9 +13,9 @@ diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.p index 9a4d80e..5dd6987 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf -@@ -191,30 +191,26 @@ defineTest(qtAddRpathLink) { +@@ -191,31 +191,27 @@ defineTest(qtAddRpathLink) { - # variable, default, [suffix for variable for system() use] + # variable, default, [suffix for variable for system() use], [prepare primary variable for system() use] defineTest(qtPrepareTool) { - cmd = $$eval(QT_TOOL.$${2}.binary) - isEmpty(cmd) { @@ -40,19 +40,20 @@ index 9a4d80e..5dd6987 100644 } } QT_TOOL_ENV += $$eval(QT_TOOL.$${2}.envvars) - !isEmpty(3) { + !isEmpty(3)|!isEmpty(4) { - $$1$$3 = - for (arg, cmd): \ - $$1$$3 += $$system_quote($$arg) + $$1$$3 = $$system_path($$eval($$1)) qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) } -- $$1 = -- for (arg, cmd): \ -- $$1 += $$shell_quote($$arg) -+ $$1 = $$shell_path($$eval($$1)) - qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) - } + isEmpty(4) { +- $$1 = +- for (arg, cmd): \ +- $$1 += $$shell_quote($$arg) ++ $$1 = $$shell_path($$eval($$1)) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) + } diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 1d3e88c..f0864f9 100644 diff --git a/mingw-w64-qt5-static/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch b/mingw-w64-qt5-static/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch index 334d1243bc..fd1c32fb50 100644 --- a/mingw-w64-qt5-static/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch +++ b/mingw-w64-qt5-static/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch @@ -12,9 +12,9 @@ { A = 1, @@ -207,6 +211,10 @@ - SRV = 33, TXT = 16 }; + Q_ENUM(Type) +// Set PTR back what it previously contained. +#ifdef PTR_OLD_DEFINE +#define PTR PTR_OLD_DEFINE diff --git a/mingw-w64-qt5-static/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch b/mingw-w64-qt5-static/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch new file mode 100644 index 0000000000..2c8b066a5e --- /dev/null +++ b/mingw-w64-qt5-static/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch @@ -0,0 +1,24 @@ +--- a/qtcanvas3d/src/imports/qtcanvas3d/context3d_p.h.orig 2015-07-02 11:38:07.087024200 +0300 ++++ b/qtcanvas3d/src/imports/qtcanvas3d/context3d_p.h 2015-07-02 11:46:54.641638300 +0300 +@@ -100,6 +100,10 @@ + Q_PROPERTY(uint drawingBufferHeight READ drawingBufferHeight NOTIFY drawingBufferHeightChanged) + + public: ++#ifdef BOOL ++#define BOOL_OLD_DEFINE BOOL ++#undef BOOL ++#endif + enum glEnums { + /* ClearBufferMask */ + DEPTH_BUFFER_BIT = 0x00000100, +@@ -543,6 +547,10 @@ + COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02, + COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03 + }; ++// Set BOOL back what it previously contained. ++#ifdef BOOL_OLD_DEFINE ++#define BOOL BOOL_OLD_DEFINE ++#endif + + /* ClearBufferMask */ + ENUM_AS_PROPERTY(DEPTH_BUFFER_BIT) diff --git a/mingw-w64-qt5-static/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch b/mingw-w64-qt5-static/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch index 97e9b1caef..aeb3928ba9 100644 --- a/mingw-w64-qt5-static/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch +++ b/mingw-w64-qt5-static/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch @@ -1,21 +1,24 @@ ---- a/qtbase/mkspecs/features/create_cmake.prf 2014-10-13 17:52:38.691086600 +0100 -+++ b/qtbase/mkspecs/features/create_cmake.prf 2014-10-13 19:47:45.828532600 +0100 -@@ -133,11 +133,16 @@ - CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME +--- qt-everywhere-opensource-src-5.4.0-rc/qtbase/mkspecs/features/create_cmake.prf.orig 2014-12-01 01:49:24.066920200 +0000 ++++ qt-everywhere-opensource-src-5.4.0-rc/qtbase/mkspecs/features/create_cmake.prf 2014-12-01 01:59:39.496120700 +0000 +@@ -134,15 +134,15 @@ win32 { -- isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dll -- else: CMAKE_PlUGIN_EXT = .$${QMAKE_EXTENSION_STATICLIB} -+ isEmpty(CMAKE_STATIC_TYPE) { + isEmpty(CMAKE_STATIC_TYPE) { +- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll +- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll +- } else:mingw { +- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a +- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a +- } else { # MSVC static +- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib +- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib + CMAKE_PlUGIN_EXT = .dll + CMAKE_PlUGIN_PREFIX = + } else { + CMAKE_PlUGIN_EXT = .$${QMAKE_EXTENSION_STATICLIB} + CMAKE_PlUGIN_PREFIX = $${QMAKE_PREFIX_STATICLIB} -+ } - -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}$${CMAKE_PlUGIN_EXT} -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d$${CMAKE_PlUGIN_EXT} + } ++ + CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_PlUGIN_PREFIX}$${TARGET}$${CMAKE_PlUGIN_EXT} + CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_PlUGIN_PREFIX}$${TARGET}d$${CMAKE_PlUGIN_EXT} } else { diff --git a/mingw-w64-qt5-static/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch b/mingw-w64-qt5-static/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch index f745464156..a7e4edfb17 100644 --- a/mingw-w64-qt5-static/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch +++ b/mingw-w64-qt5-static/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch @@ -1,11 +1,11 @@ --- qtbase-opensource-src-5.3.2/qtbase/qmake/generators/win32/mingw_make.cpp.orig 2014-10-19 12:16:07.387600000 +0400 +++ qtbase-opensource-src-5.3.2/qtbase/qmake/generators/win32/mingw_make.cpp 2014-10-19 12:16:07.387600000 +0400 @@ -254,7 +254,7 @@ + processVars(); - if (!project->values("RES_FILE").isEmpty()) { -- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE")); -+ project->values("OBJECTS") += escapeFilePaths(project->values("RES_FILE")); - } +- project->values("QMAKE_LIBS") += project->values("RES_FILE"); ++ project->values("OBJECTS") += project->values("RES_FILE"); - ProStringList &configs = project->values("CONFIG"); + if (project->isActiveConfig("dll")) { + QString destDir = ""; diff --git a/mingw-w64-qt5-static/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch b/mingw-w64-qt5-static/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch index 19f1a7ab68..969fe359b3 100644 --- a/mingw-w64-qt5-static/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch +++ b/mingw-w64-qt5-static/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch @@ -1,20 +1,15 @@ ---- x86_64/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in.orig 2014-11-09 00:54:20.852201500 +0000 -+++ x86_64/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in 2014-11-09 00:55:52.437439900 +0000 -@@ -165,3 +165,17 @@ +--- qt-everywhere-opensource-src-5.3.2.orig/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in.orig 2014-11-09 00:54:20.852201500 +0000 ++++ qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in 2014-11-09 00:55:52.437439900 +0000 +@@ -165,3 +165,12 @@ set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\") _qt5_Core_check_file_exists(${_Qt5CTestMacros}) + +get_target_property(_libType Qt5::Core TYPE) -+# If WIN32_EXECUTABLE worked reliably (kconfig doesn't build with it) -+# then we'd not use AND CMAKE_HOST_WIN32 here. -+if(_libType STREQUAL \"STATIC_LIBRARY\" AND CMAKE_HOST_WIN32) ++if(_libType STREQUAL \"STATIC_LIBRARY\" AND WIN32) + set(_isExe $,EXECUTABLE>) -+# set(_isWin32 $>) -+ set(_isWin32 1) + # INTERFACE_LINK_LIBRARIES is used to pass a linker flag (-static) + # and a library (ws2_32) -+ set_target_properties(Qt5::Core PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<$:-static;ws2_32>\") ++ set_target_properties(Qt5::Core PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\") + unset(_isExe) -+ unset(_isWin32) +endif() diff --git a/mingw-w64-qt5-static/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch b/mingw-w64-qt5-static/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch new file mode 100644 index 0000000000..b53e5c2f55 --- /dev/null +++ b/mingw-w64-qt5-static/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch @@ -0,0 +1,20 @@ +--- qt-everywhere-opensource-src-5.4.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in.orig 2015-01-04 22:22:54.714460900 +0000 ++++ qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-01-04 22:34:11.801082600 +0000 +@@ -283,7 +283,16 @@ + + !!ENDIF // CMAKE_DEBUG_TYPE + +- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") ++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") ++ unset(pluginTargets) ++ if (pluginTargetsMaybe) ++ foreach(pluginTarget ${pluginTargetsMaybe}) ++ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) ++ if (matched) ++ list(APPEND pluginTargets ${pluginTarget}) ++ endif() ++ endforeach() ++ endif() + + macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) diff --git a/mingw-w64-qt5-static/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch b/mingw-w64-qt5-static/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch new file mode 100644 index 0000000000..055ac6d30e --- /dev/null +++ b/mingw-w64-qt5-static/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch @@ -0,0 +1,35 @@ +From 1f36ecb8823d607883aabfee07d9a0c03982257b Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 26 Aug 2015 12:45:43 +0100 +Subject: [PATCH 38/38] cmake: Rearrange STATIC vs INTERFACE targets + +Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) +for header-only modules when building Qt5 statically. +--- + mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index d2358ca..6b1dc95 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -222,13 +222,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + endif() + !!ENDIF + ++!!IF equals(TEMPLATE, aux) ++ add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) ++!!ELSE + !!IF !isEmpty(CMAKE_STATIC_TYPE) + add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + !!ELSE +-!!IF equals(TEMPLATE, aux) +- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) +-!!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF + !!ENDIF +-- +2.5.0 + diff --git a/mingw-w64-qt5-static/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch b/mingw-w64-qt5-static/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch new file mode 100644 index 0000000000..bdd42d50e1 --- /dev/null +++ b/mingw-w64-qt5-static/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch @@ -0,0 +1,60 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:00:26.576032700 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:00:42.742765400 +0100 +@@ -65,13 +65,13 @@ + !!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" ++ \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} + !!IF !isEmpty(CMAKE_LIB_SONAME) + \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" + !!ENDIF + # For backward compatibility with CMake < 2.8.12 +- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" ++ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + ) + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +@@ -228,6 +228,40 @@ + !!IF !isEmpty(CMAKE_STATIC_TYPE) + add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") ++# Excerpt from: ++ ++# From ae6d4c77eb338be3f2189bfaffdcd3c38cc57333 Mon Sep 17 00:00:00 2001 ++# From: Stephen Kelly ++# Date: Tue, 21 Aug 2012 13:12:57 +0200 ++# Subject: [PATCH] Make it possible to use static builds of Qt with CMake. ++# ++# Parse the prl files generated by qmake to get the link dependencies. They ++# contain all the information we need, and they are the only location with ++# all the right information. ++macro(macro_process_prl_file prl_file_location Configuration) ++ if (EXISTS \"${prl_file_location}\") ++ file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS\") ++ string(REGEX REPLACE \"QMAKE_PRL_LIBS *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) ++ string(STRIP ${static_depends} static_depends) ++ if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) ++ set(_list_sep \";\") ++ endif() ++ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_list_sep}${static_depends}\") ++ endif() ++endmacro() ++ ++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ macro_process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG) ++!!ELSE ++ macro_process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG) ++!!ENDIF ++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ macro_process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE) ++!!ELSE ++ macro_process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE) ++!!ENDIF ++ ++# Excerpt from: end + !!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF diff --git a/mingw-w64-qt5-static/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch b/mingw-w64-qt5-static/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch new file mode 100644 index 0000000000..48461ff5b4 --- /dev/null +++ b/mingw-w64-qt5-static/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch @@ -0,0 +1,32 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:06:08.512109600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:06:33.366637700 +0100 +@@ -240,9 +240,8 @@ + # all the right information. + macro(macro_process_prl_file prl_file_location Configuration) + if (EXISTS \"${prl_file_location}\") +- file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS\") +- string(REGEX REPLACE \"QMAKE_PRL_LIBS *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) +- string(STRIP ${static_depends} static_depends) ++ file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\") ++ string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) + if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) + set(_list_sep \";\") + endif() +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/qmake/generators/makefile.cpp qt-everywhere-opensource-src-5.5.0/qtbase/qmake/generators/makefile.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/qmake/generators/makefile.cpp 2015-08-26 14:29:10.131124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/qmake/generators/makefile.cpp 2015-08-26 15:06:33.375635900 +0100 +@@ -1006,6 +1006,13 @@ + for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) + t << qv(project->values((*it).toKey())); + t << endl; ++ t << "QMAKE_PRL_LIBS_FOR_CMAKE = "; ++ QString sep; ++ for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) { ++ t << sep << project->values((*it).toKey()).join(';').replace('\\', "\\\\"); ++ sep = ';'; ++ } ++ t << endl; + } + } + diff --git a/mingw-w64-qt5-static/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch b/mingw-w64-qt5-static/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch new file mode 100644 index 0000000000..dc83b1a1d2 --- /dev/null +++ b/mingw-w64-qt5-static/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch @@ -0,0 +1,13 @@ +--- qt-everywhere-opensource-src-5.4.0.orig/qtbase/mkspecs/features/create_cmake.prf.orig 2014-12-14 20:11:38.710428500 +0000 ++++ qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/features/create_cmake.prf 2014-12-14 22:16:48.451709600 +0000 +@@ -233,8 +233,8 @@ + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a + +- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl +- CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl ++ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl ++ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl + } else { + isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB} diff --git a/mingw-w64-qt5-static/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch b/mingw-w64-qt5-static/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch new file mode 100644 index 0000000000..a7d5109789 --- /dev/null +++ b/mingw-w64-qt5-static/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch @@ -0,0 +1,153 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:31:26.194016900 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:21:30.905016900 +0100 +@@ -64,14 +64,17 @@ + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) ++ if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) ++ set(_list_sep \";\") ++ endif() + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" ++ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} + !!IF !isEmpty(CMAKE_LIB_SONAME) + \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" + !!ENDIF + # For backward compatibility with CMake < 2.8.12 +- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" ++ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + ) + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +@@ -238,17 +241,31 @@ + # Parse the prl files generated by qmake to get the link dependencies. They + # contain all the information we need, and they are the only location with + # all the right information. ++ ++# .. changed so that if can be called multiple times, once for the module itself and once for each ++# plugin, each time, appending to _Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES ++ + macro(macro_process_prl_file prl_file_location Configuration) + if (EXISTS \"${prl_file_location}\") + file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\") + string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) +- if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) ++ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES) + set(_list_sep \";\") + endif() +- set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_list_sep}${static_depends}\") ++ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}${_list_sep}${static_depends}\") + endif() + endmacro() + ++macro(macro_process_plugin_prl_file prl_file_location Configuration LIB_DIRECTORY LIB_LOCATION) ++ # First add the (static) plugin itself. ++ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES) ++ set(_list_sep \";\") ++ endif() ++ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}${_list_sep}${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/${LIB_DIRECTORY}/${LIB_LOCATION}\") ++ # .. then its dependencies. ++ macro_process_prl_file(${prl_file_location} ${Configuration}) ++endmacro() ++ + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) + macro_process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG) + !!ELSE +@@ -261,6 +278,7 @@ + !!ENDIF + + # Excerpt from: end ++ + !!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF +@@ -276,6 +294,48 @@ + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY + INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE}) + ++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") ++ unset(pluginTargets) ++ if (pluginTargetsMaybe) ++ foreach(pluginTarget ${pluginTargetsMaybe}) ++ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) ++ if (matched) ++ list(APPEND pluginTargets ${pluginTarget}) ++ endif() ++ endforeach() ++ endif() ++ ++ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) ++ set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) ++ ++!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++!!ELSE ++ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++!!ENDIF ++ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) ++ set_target_properties(Qt5::${Plugin} PROPERTIES ++ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} ++ ) ++ get_filename_component(_plugindir ${PLUGIN_LOCATION} PATH) ++ get_filename_component(_plugindirname ${_plugindir} NAME) ++ get_filename_component(_pluginname ${PLUGIN_LOCATION} NAME) ++!!IF !isEmpty(CMAKE_STATIC_TYPE) ++ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY STATIC_PLUGINS ${Plugin}) ++!!ENDIF ++ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/share/qt5/plugins/${_plugindirname}/\\\\1.prl\" plugin_prl_file_location ${_pluginname}) ++!!IF !isEmpty(CMAKE_STATIC_TYPE) ++ macro_process_plugin_prl_file(${plugin_prl_file_location} ${Configuration} \"share/qt5/plugins\" ${PLUGIN_LOCATION} ) ++!!ENDIF ++ ++ endmacro() ++ ++ if (pluginTargets) ++ foreach(pluginTarget ${pluginTargets}) ++ include(${pluginTarget}) ++ endforeach() ++ endif() ++ + !!IF !equals(TEMPLATE, aux) + !!IF !isEmpty(CMAKE_RELEASE_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +@@ -356,37 +416,6 @@ + ) + !!ENDIF // TEMPLATE != aux + +- file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") +- unset(pluginTargets) +- if (pluginTargetsMaybe) +- foreach(pluginTarget ${pluginTargetsMaybe}) +- file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) +- if (matched) +- list(APPEND pluginTargets ${pluginTarget}) +- endif() +- endforeach() +- endif() +- +- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) +- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) +- +-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ELSE +- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ENDIF +- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) +- set_target_properties(Qt5::${Plugin} PROPERTIES +- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} +- ) +- endmacro() +- +- if (pluginTargets) +- foreach(pluginTarget ${pluginTargets}) +- include(${pluginTarget}) +- endforeach() +- endif() +- + + !!IF !isEmpty(CMAKE_MODULE_EXTRAS) + include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\") + diff --git a/mingw-w64-qt5-static/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch b/mingw-w64-qt5-static/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch new file mode 100644 index 0000000000..ddb7315751 --- /dev/null +++ b/mingw-w64-qt5-static/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch @@ -0,0 +1,11 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-27 12:15:50.549764900 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-27 12:32:35.136763200 +0100 +@@ -249,6 +249,7 @@ + if (EXISTS \"${prl_file_location}\") + file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\") + string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) ++ string(REGEX REPLACE \"\\\\$\\\\$\\\\[QT_INSTALL_LIBS\\\\]\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" static_depends \"${static_depends}\") + if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES) + set(_list_sep \";\") + endif() diff --git a/mingw-w64-qt5-static/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch b/mingw-w64-qt5-static/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch new file mode 100644 index 0000000000..0ee3e6be77 --- /dev/null +++ b/mingw-w64-qt5-static/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch @@ -0,0 +1,12 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtwebengine/tools/qmake/mkspecs/features/functions.prf qt-everywhere-opensource-src-5.5.0/qtwebengine/tools/qmake/mkspecs/features/functions.prf +--- qt-everywhere-opensource-src-5.5.0.orig/qtwebengine/tools/qmake/mkspecs/features/functions.prf 2015-08-26 14:34:22.019269600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtwebengine/tools/qmake/mkspecs/features/functions.prf 2015-08-26 15:34:44.547516900 +0100 +@@ -14,7 +14,7 @@ + + linux-g++*:!isGCCVersionSupported(): return(false) + !isPythonVersionSupported(): return(false) +- linux-g++*|win32-msvc2013|macx-clang: return(true) ++ linux-g++*|win32-*|macx-clang: return(true) + boot2qt: return(true) + + skipBuild("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.") diff --git a/mingw-w64-qt5-static/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch b/mingw-w64-qt5-static/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch new file mode 100644 index 0000000000..c0bdc21da3 --- /dev/null +++ b/mingw-w64-qt5-static/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch @@ -0,0 +1,8 @@ +--- qt-everywhere-opensource-src-5.4.1/qttools/src/assistant/qcollectiongenerator/qcollectiongenerator.pro.orig 2015-03-26 21:59:29.662519600 +0000 ++++ qt-everywhere-opensource-src-5.4.1/qttools/src/assistant/qcollectiongenerator/qcollectiongenerator.pro 2015-03-26 21:59:33.804756600 +0000 +@@ -1,4 +1,5 @@ + QT += network help-private ++QTPLUGIN.platforms = qminimal + TARGET = qcollectiongenerator + SOURCES += ../shared/helpgenerator.cpp \ + main.cpp \ diff --git a/mingw-w64-qt5-static/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch b/mingw-w64-qt5-static/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch new file mode 100644 index 0000000000..29810630d3 --- /dev/null +++ b/mingw-w64-qt5-static/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch @@ -0,0 +1,123 @@ +From 1d9aff66270aba6d16077f460aa85fbf161aba99 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Tue, 17 Jan 2012 14:21:05 +0100 +Subject: [PATCH] Revert "Revert "fix NTFS mount points"" + +This reverts commit 49d1b068987d0895b2429b3d87beb561d9fbcbd7 + +Because of https://github.com/msys2/msys2.github.io/issues/4 + +.. bringing back: + +fix NTFS mount points + +NTFS mount points are not treated as symlinks, because they might +not have a link target. +This is the case when a volume is mounted as a single mount point +without a drive letter. +This patch fixes building Qt in an NTFS mount point. + +Task-number: QTBUG-20431 +Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a +Reviewed-by: Thomas Hartmann +--- + src/corelib/io/qfilesystemengine_win.cpp | 10 ++++++---- + src/corelib/io/qfilesystemiterator_win.cpp | 2 +- + src/corelib/io/qfilesystemmetadata_p.h | 23 +++++++++++++++++------ + 3 files changed, 24 insertions(+), 11 deletions(-) + +diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp +index 221cea3..fa56d7c 100644 +--- a/src/corelib/io/qfilesystemengine_win.cpp ++++ b/src/corelib/io/qfilesystemengine_win.cpp +@@ -914,9 +914,10 @@ static bool tryFindFallback(const QFileSystemEntry &fname, QFileSystemMetaData & + int errorCode = GetLastError(); + if (errorCode == ERROR_ACCESS_DENIED || errorCode == ERROR_SHARING_VIOLATION) { + WIN32_FIND_DATA findData; +- if (getFindData(fname.nativeFilePath(), findData) ++ const QString nativeFilePath = fname.nativeFilePath(); ++ if (getFindData(nativeFilePath, findData) + && findData.dwFileAttributes != INVALID_FILE_ATTRIBUTES) { +- data.fillFromFindData(findData, true, fname.isDriveRoot()); ++ data.fillFromFindData(findData, true, fname.isDriveRoot(), nativeFilePath); + filledData = true; + } + } +@@ -1031,8 +1032,9 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM + data.knownFlagsMask |= QFileSystemMetaData::LinkType; + if (data.fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { + WIN32_FIND_DATA findData; +- if (getFindData(fname.nativeFilePath(), findData)) +- data.fillFromFindData(findData, true); ++ const QString nativeFilePath = fname.nativeFilePath(); ++ if (getFindData(nativeFilePath, findData)) ++ data.fillFromFindData(findData, true, false, nativeFilePath); + } + } + data.knownFlagsMask |= what; +diff --git a/src/corelib/io/qfilesystemiterator_win.cpp b/src/corelib/io/qfilesystemiterator_win.cpp +index 6351a35..6fa22ef 100644 +--- a/src/corelib/io/qfilesystemiterator_win.cpp ++++ b/src/corelib/io/qfilesystemiterator_win.cpp +@@ -138,7 +138,7 @@ bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaDa + fileEntry = QFileSystemEntry(dirPath + fileName); + metaData = QFileSystemMetaData(); + if (!fileName.endsWith(QLatin1String(".lnk"))) { +- metaData.fillFromFindData(findData, true); ++ metaData.fillFromFindData(findData, true, false, fileEntry.nativeFilePath()); + } + return true; + } +diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h +index da9576b..266111e 100644 +--- a/src/corelib/io/qfilesystemmetadata_p.h ++++ b/src/corelib/io/qfilesystemmetadata_p.h +@@ -211,7 +211,7 @@ public: + + #if defined(Q_OS_WIN) + inline void fillFromFileAttribute(DWORD fileAttribute, bool isDriveRoot = false); +- inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false); ++ inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false, const QString &nativeFullFilePath = QString()); + # ifndef Q_OS_WINRT + inline void fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo); + # endif +@@ -308,7 +308,7 @@ inline void QFileSystemMetaData::fillFromFileAttribute(DWORD fileAttribute,bool + knownFlagsMask |= FileType | DirectoryType | HiddenAttribute | ExistsAttribute; + } + +-inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot) ++inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot, const QString &nativeFullFilePath) + { + fillFromFileAttribute(findData.dwFileAttributes, isDriveRoot); + creationTime_ = findData.ftCreationTime; +@@ -326,12 +326,23 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo + knownFlagsMask |= LinkType; + entryFlags &= ~LinkType; + #if !defined(Q_OS_WINCE) +- if ((fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) +- && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) { +- entryFlags |= LinkType; ++ if (fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { ++ if (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK) { ++ entryFlags |= LinkType; ++ } else if (findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) { ++ // Junctions and mount points are implemented as NTFS reparse points. ++ // But mount points cannot be treated as symlinks because they might ++ // not have a link target. ++ wchar_t buf[50]; ++ QString path = nativeFullFilePath; ++ if (!path.endsWith(QLatin1Char('\\'))) ++ path.append(QLatin1Char('\\')); ++ BOOL isMountPoint = GetVolumeNameForVolumeMountPoint(reinterpret_cast(path.utf16()), buf, sizeof(buf) / sizeof(wchar_t)); ++ if (!isMountPoint) ++ entryFlags |= LinkType; ++ } + } + #endif +- + } + } + +-- +2.3.4 + diff --git a/mingw-w64-qt5-static/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch b/mingw-w64-qt5-static/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch new file mode 100644 index 0000000000..a822acb72e --- /dev/null +++ b/mingw-w64-qt5-static/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch @@ -0,0 +1,152 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/configureapp.cpp qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/configureapp.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/configureapp.cpp 2015-08-26 14:29:09.999124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/configureapp.cpp 2015-08-26 15:41:02.749516900 +0100 +@@ -3448,6 +3448,9 @@ + // FIXME: add detection + configStream << " QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; + configStream << " QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; ++ } else { ++ configStream << " QMAKE_DEFAULT_LIBDIRS = " << Environment::detectCompilerDefaultLibDirs() << endl; ++ configStream << " QMAKE_DEFAULT_INCDIRS = " << Environment::detectCompilerDefaultIncDirs() << endl; + } + configStream << "}" << endl; + configStream << "QT_CONFIG += " << qtConfig.join(' ') << endl; +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.cpp qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.cpp 2015-08-26 14:29:10.004624600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.cpp 2015-08-26 15:41:02.742516900 +0100 +@@ -40,6 +40,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -249,6 +251,112 @@ + #endif + }; + ++/* Returns the exit-code. */ ++int Environment::compileSomething(const QString &flags, const QString &code, QString &stdOut, QString &stdErr) ++{ ++ CompilerInfo *info = compilerInfo(detectCompiler()); ++ int returnCode = 1; ++ if (info) { ++ QTemporaryFile tmpIn("conftestXXXXXX.cpp"); ++ QString tmpOutFileName; ++ { ++ QTemporaryFile tmpOut("conftestXXXXXX.o"); ++ tmpOut.open(); ++ tmpOut.close(); ++ tmpOutFileName = tmpOut.fileName(); ++ } ++ QString tmpStdErrFileName; ++ { ++ QTemporaryFile tmpStdErr("conftestXXXXXX.stderr"); ++ tmpStdErr.open(); ++ tmpStdErr.close(); ++ tmpStdErrFileName = tmpStdErr.fileName(); ++ } ++ if (tmpIn.open()) { ++ tmpIn.write(code.toUtf8()); ++ tmpIn.close(); ++ QString cmd = info->executable + QString(" ") + flags ++ + QString(" -o ") + tmpOutFileName ++ + QString(" ") + tmpIn.fileName() + " 2>" + tmpStdErrFileName; ++ stdOut = Environment::execute(cmd, &returnCode); ++ QFile tmpStdErr(tmpStdErrFileName); ++ if (tmpStdErr.open(QIODevice::ReadOnly | QIODevice::Text)) { ++ stdErr = tmpStdErr.readAll(); ++ tmpStdErr.close(); ++ tmpStdErr.remove(); ++ } ++ QFile::remove(tmpOutFileName); ++ } ++ } ++ return returnCode; ++} ++ ++QString Environment::detectCompilerDefaultIncDirs() ++{ ++ QString stdOut; ++ QString stdErr; ++ int returnCode = Environment::compileSomething("-v ", "", stdOut, stdErr); ++ QStringList result; ++ int index = stdErr.indexOf("<...>"); ++ if (index != -1) { ++ index = stdErr.indexOf("\n", index); ++ int lastIndex = index; ++ while (lastIndex != -1) { ++ if (stdErr[lastIndex + 1] != ' ') ++ break; ++ lastIndex += 2; ++ index = stdErr.indexOf("\n", lastIndex + 1); ++ if (index != -1) { ++ const QString newPath(QDir::cleanPath(stdErr.mid(lastIndex, index - lastIndex))); ++ if (result.indexOf(newPath) == -1) ++ result.append(newPath); ++ } ++ lastIndex = index; ++ } ++ } ++ Q_UNUSED(returnCode); ++ QString resultString; ++ for (int i = 0; i < result.count(); ++i) { ++ resultString.append(result[i]); ++ if ( i != result.count() - 1) ++ resultString.append(" "); ++ } ++ return resultString; ++} ++ ++QString Environment::detectCompilerDefaultLibDirs() ++{ ++ QString stdOut; ++ QString stdErr; ++ int returnCode = Environment::compileSomething("-v ", "", stdOut, stdErr); ++ QStringList result; ++ int index = stdErr.indexOf("LIBRARY_PATH"); ++ if (index != -1) { ++ index += strlen("LIBRARY_PATH"); ++ int lastIndex = index; ++ while (lastIndex != -1) { ++ if (stdErr[lastIndex + 1] == '\n') ++ break; ++ index = stdErr.indexOf(";", lastIndex + 1); ++ if (index != -1) { ++ const QString newPath(QDir::cleanPath(stdErr.mid(lastIndex + 1, index - lastIndex - 1))); ++ if (result.indexOf(newPath) == -1) ++ result.append(newPath); ++ } ++ lastIndex = index; ++ } ++ } ++ Q_UNUSED(returnCode); ++ QString resultString; ++ for (int i = 0; i < result.count(); ++i) { ++ resultString.append(result[i]); ++ if ( i != result.count() - 1) ++ resultString.append(" "); ++ } ++ return resultString; ++} ++ ++ + /*! + Creates a commandling from \a program and it \a arguments, + escaping characters that needs it. +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.h qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.h +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.h 2015-08-26 14:29:10.018624600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.h 2015-08-26 15:41:02.735516900 +0100 +@@ -58,6 +58,10 @@ + static Compiler compilerFromQMakeSpec(const QString &qmakeSpec); + static QString gccVersion(); + ++ static int compileSomething(const QString &flags, const QString &code, QString &stdOut, QString &stdErr); ++ static QString detectCompilerDefaultIncDirs(); ++ static QString detectCompilerDefaultLibDirs(); ++ + static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv); + static QString execute(const QString &command, int *returnCode = 0); + static bool cpdir(const QString &srcDir, const QString &destDir); diff --git a/mingw-w64-qt5-static/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch b/mingw-w64-qt5-static/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch new file mode 100644 index 0000000000..7c6e68ebe4 --- /dev/null +++ b/mingw-w64-qt5-static/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch @@ -0,0 +1,75 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qmessagebox.cpp qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qmessagebox.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qmessagebox.cpp 2015-08-26 14:28:59.145124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qmessagebox.cpp 2015-08-26 15:46:50.092516900 +0100 +@@ -68,9 +68,11 @@ + #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) + HMENU qt_getWindowsSystemMenu(const QWidget *w) + { +- if (QWindow *window = QApplicationPrivate::windowForWidget(w)) +- if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)) +- return GetSystemMenu(reinterpret_cast(handle), false); ++ if (QGuiApplication::platformNativeInterface()) { ++ if (QWindow *window = QApplicationPrivate::windowForWidget(w)) ++ if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)) ++ return GetSystemMenu(reinterpret_cast(handle), false); ++ } + return 0; + } + #endif +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qwizard_win.cpp qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qwizard_win.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qwizard_win.cpp 2015-08-26 14:28:59.139624600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qwizard_win.cpp 2015-08-26 15:46:50.084516900 +0100 +@@ -288,10 +288,11 @@ + // The dynamic property takes effect when creating the platform window. + window->setProperty("_q_windowsCustomMargins", customMarginsV); + // If a platform window exists, change via native interface. +- if (QPlatformWindow *platformWindow = window->handle()) { +- QGuiApplication::platformNativeInterface()-> +- setWindowProperty(platformWindow, QStringLiteral("WindowsCustomMargins"), +- customMarginsV); ++ if (QGuiApplication::platformNativeInterface()) { ++ if (QPlatformWindow *platformWindow = window->handle()) ++ QGuiApplication::platformNativeInterface()-> ++ setWindowProperty(platformWindow, QStringLiteral("WindowsCustomMargins"), ++ customMarginsV); + } + } + } +@@ -685,6 +686,8 @@ + // wizard is a child window. + HDC QVistaHelper::backingStoreDC(const QWidget *wizard, QPoint *offset) + { ++ if (!QGuiApplication::platformNativeInterface()) ++ return static_cast(0); + HDC hdc = static_cast(QGuiApplication::platformNativeInterface()->nativeResourceForBackingStore(QByteArrayLiteral("getDC"), wizard->backingStore())); + *offset = QPoint(0, 0); + if (!wizard->windowHandle()) +@@ -699,7 +702,7 @@ + // Do not use winId() as this enforces native children of the parent + // widget when called before show() as happens when calling setWizardStyle(). + if (QWindow *window = wizard->windowHandle()) +- if (window->handle()) ++ if (window->handle() && QGuiApplication::platformNativeInterface()) + if (void *vHwnd = QGuiApplication::platformNativeInterface()->nativeResourceForWindow(QByteArrayLiteral("handle"), window)) + return static_cast(vHwnd); + qWarning().nospace() << "Failed to obtain HWND for wizard."; +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/kernel/qapplication_p.h qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/kernel/qapplication_p.h +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/kernel/qapplication_p.h 2015-08-26 14:28:59.349124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/kernel/qapplication_p.h 2015-08-26 15:46:50.098516900 +0100 +@@ -254,10 +254,12 @@ + #ifdef Q_OS_WIN + static HWND getHWNDForWidget(const QWidget *widget) + { +- if (QWindow *window = windowForWidget(widget)) +- if (window->handle()) +- return static_cast (QGuiApplication::platformNativeInterface()-> +- nativeResourceForWindow(QByteArrayLiteral("handle"), window)); ++ if (QGuiApplication::platformNativeInterface()) { ++ if (QWindow *window = windowForWidget(widget)) ++ if (window->handle()) ++ return static_cast (QGuiApplication::platformNativeInterface()-> ++ nativeResourceForWindow(QByteArrayLiteral("handle"), window)); ++ } + return 0; + } + #endif diff --git a/mingw-w64-qt5-static/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch b/mingw-w64-qt5-static/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch new file mode 100644 index 0000000000..b0f7be5757 --- /dev/null +++ b/mingw-w64-qt5-static/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch @@ -0,0 +1,11 @@ +--- qtbase/configure.orig 2015-08-25 12:42:05.631715900 +0100 ++++ qtbase/configure 2015-08-26 13:57:02.447124600 +0100 +@@ -4462,7 +4462,7 @@ + if compileTest unix/ipc_posix "ipc_posix" ; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" + else +- if [ "$XPLATFORM_ANDROID" = "no" ] ; then ++ if [ "$XPLATFORM_ANDROID" = "no" -a "$XPLATFORM_MINGW" = "no" ] ; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY" + fi + fi diff --git a/mingw-w64-qt5-static/0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch b/mingw-w64-qt5-static/0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch new file mode 100644 index 0000000000..87abbee588 --- /dev/null +++ b/mingw-w64-qt5-static/0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch @@ -0,0 +1,40 @@ +From c4f22ef225f6e4c2f1943da620a0dc6fff6296cb Mon Sep 17 00:00:00 2001 +From: Oswald Buddenhagen +Date: Tue, 13 Oct 2015 17:09:33 +0200 +Subject: [PATCH] fix the trailing-backslash-in-DESTDIR-on-mingw workaround + +at least the mingw version we use now interprets the sequence \# as a +literal hashmark, which completely defeats the previous hack. + +the new hack escapes the backslash with another backslash, which appears +to work. however, make does *not* remove the additional backslash, so +the result is a bit ugly. + +Change-Id: I591a2be443880b162094d04e5a5e624216b59311 +--- + qmake/generators/unix/unixmake2.cpp | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp +index d0cd5d2..9db64be 100644 +--- a/qmake/generators/unix/unixmake2.cpp ++++ b/qmake/generators/unix/unixmake2.cpp +@@ -269,11 +269,13 @@ + t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " " + << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl; + t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; +- // The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes +- // would be interpreted as line continuation. The lack of spacing between the value and the +- // comment is also important as otherwise quoted use of "$(DESTDIR)" would include this +- // spacing. +- t << "DESTDIR = " << fileVar("DESTDIR") << "#avoid trailing-slash linebreak\n"; ++ QString destd = fileVar("DESTDIR"); ++ // When building on non-MSys MinGW, the path ends with a backslash, which ++ // GNU make will interpret that as a line continuation. Doubling the backslash ++ // avoids the problem, at the cost of the variable containing *both* backslashes. ++ if (destd.endsWith('\\')) ++ destd += '\\'; ++ t << "DESTDIR = " << destd << endl; + if(project->isActiveConfig("compile_libtool")) + t << "TARGETL = " << fileVar("TARGET_la") << endl; + t << "TARGET = " << fileVar("TARGET") << endl; // ### mixed use! diff --git a/mingw-w64-qt5-static/PKGBUILD b/mingw-w64-qt5-static/PKGBUILD index f359af2703..b6450af575 100644 --- a/mingw-w64-qt5-static/PKGBUILD +++ b/mingw-w64-qt5-static/PKGBUILD @@ -6,6 +6,11 @@ _variant=-static #_variant=-shared +# If you want a quick turnaround during testing then +# use this. *Not* the same as _fastbuild; that's set +# always for static and never for non-static. +#_minimal="yes" + # Getting crashes that only happen in release builds? # Define this and you may have a hope of figuring out # why .. @@ -44,14 +49,6 @@ fi _realname=qt5${_namesuff} -# qt5-static must be kept in its own prefix hierarchy -# as otherwise it will conflict with qt5 itself -if [ "${_variant}" = "-static" ]; then - _qt5_prefix="${MINGW_PREFIX}/${_realname}" -else - _qt5_prefix="${MINGW_PREFIX}" -fi - # So that both configure shell script and configure.exe # are tested on MSYS2, we use both depending on variant if [ "${_variant}" = "-static" ]; then @@ -60,6 +57,20 @@ else _configure=./configure.bat fi +declare -a _minimal_config +if [ "{_configure}" = "./configure" ]; then + if [ "{$_minimal}" = "yes" ]; then + _minimal_config+=("-skip" "qtwebkit" + "-skip" "qtwebkit-examples") + fi +else + if [ "{$_minimal}" = "yes" ]; then + _minimal_config+=("-no-webkit" + "-no-script" + "-no-scripttools") + fi +fi + # When using the configure bash script, MSYS2 make is # probably a better choice as otherwise the Makefiles # can have MSYS2 paths in them. We try to handle this @@ -73,11 +84,22 @@ fi #_opengl=angle _opengl=desktop +#_opengl=dynamic _opengl_for_configure="${_opengl}" +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -_ver_base=5.3.2 +_ver_base=5.5.1 + +# qt5-static must be kept in its own prefix hierarchy +# as otherwise it will conflict with qt5 itself +if [ "${_variant}" = "-static" ]; then + _qt5_prefix="${MINGW_PREFIX}/${_realname}" +else + _qt5_prefix="${MINGW_PREFIX}" +fi + pkgver=${_ver_base//-/} -pkgrel=5 +pkgrel=4 arch=('any') pkgdesc="A cross-platform application and UI framework (mingw-w64${_namesuff})" url='http://qt-project.org/' @@ -106,7 +128,11 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-xpm-nox" \ "${MINGW_PACKAGE_PREFIX}-zlib" ) ) - +optdepends=($([[ "$_variant" == "-shared" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ + "${MINGW_PACKAGE_PREFIX}-firebird" \ + "${MINGW_PACKAGE_PREFIX}-postgresql") + ) makedepends=("bison" "diffutils" "flex" @@ -120,20 +146,21 @@ makedepends=("bison" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-make" + "${MINGW_PACKAGE_PREFIX}-ninja" $([[ "$_variant" == "-static" ]] && echo \ "${MINGW_PACKAGE_PREFIX}-dbus" \ "${MINGW_PACKAGE_PREFIX}-openssl") $([[ "$_variant" == "-shared" ]] && echo \ "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ - "${MINGW_PACKAGE_PREFIX}-libfbclient" \ + "${MINGW_PACKAGE_PREFIX}-firebird2" \ "${MINGW_PACKAGE_PREFIX}-postgresql") ) groups=("${MINGW_PACKAGE_PREFIX}-qt" "${MINGW_PACKAGE_PREFIX}-qt5") options=('!strip' 'staticlibs' 'ccache') _pkgfqn="qt-everywhere-opensource-src-${_ver_base}" -source=(#"${_pkgfqn}.tar.xz" - #http://download.qt-project.org/development_releases/qt/${pkgver%.*}/${_ver_base//RC/rc}/single/${_pkgfqn}.tar.xz +noextract=(${_pkgfqn}.tar.xz) +source=(#http://download.qt-project.org/development_releases/qt/${pkgver%.*}/${_ver_base//RC/rc}/single/${_pkgfqn}.tar.xz http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${_ver_base}/single/${_pkgfqn}.tar.xz #http://download.qt-project.org/snapshots/qt/${pkgver%.*}/${_ver_base}/2014-05-07_85/src/qt-everywhere-opensource-src-${_ver_base}.tar.xz #"qt3d"::"git://gitorious.org/qt/qt3d.git" @@ -167,49 +194,27 @@ source=(#"${_pkgfqn}.tar.xz" 0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch 0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch 0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch + 0031-qt-5.5.0-workaround-BOOL-define-conflict.patch 0031-qt-5.3.1-Fix-masm-pri-build-race-condition.patch 0032-qt-5.3.2-Disable-jitted-Regexp-for-Mingw-64-bit-94712.patch 0033-qt-5.3.2-Use-QMAKE_EXTENSION_STATICLIB-in-create_cmake-prf.patch 0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch 0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch - 0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch) -md5sums=('c4e893678e3d8388ab04d059523d1d78' - 'a2fa66089b171ebb76a6e0bda2ef4ca8' - 'e3210b753ba04762de2ed4cb9c786bf1' - '356f7fcf93869e92cd232ef70160ab58' - 'b0b5cc641cf8ebc2660fa819bede0089' - '457b97833220a81f542f529e7e0c549c' - '89b720a561c4410085a8e4a456f4a39d' - '0f2e3a2f790b07442f0964f4f2f96596' - '8ce562d034bb19aaec28ab3abe79bbab' - 'ea5f1d5bf2ea4c1d69e6b5de0765adfb' - '6914a82ad728ff0da3c959f53367384c' - 'a3d928580732a966bb20e5dd8bc25606' - '5a735ecec8b12cbd9d48015de4690b87' - '3b740ce9bca6d9019b09f6f38f07411a' - 'c0721e53378a24b8d013c7db59f14c17' - '0d7ce23a99b3f15d176c09e617a437f9' - '40ba7d8134a696d07be5be6692cfaca7' - 'f080b698ff724093e95a7b4f22b407eb' - 'e65e3ed10e2dd98d5402321657c809c4' - '9ee6524aa78b5e4fbb47f10dc3b267a4' - 'acb49bb963a23b15bc7d1a93d8896bee' - 'd64536bcf72b63d15df106e2c9913154' - '05e73ac3ead09802111cc13d8e3e28c8' - '09aaa20fe92aa3fb8eaa36f805503d7d' - 'f6cd909c1dd549dea769734f6fe7bd73' - '3b550bd6c58d09aa6729987ef16fed65' - 'c89d5c00376d64350c193c4f2459d807' - '01e8030718f088178559a28958a05350' - '288dac91744ddf4d3ac39544fb381466' - 'ede60e9e199e57052e1df95efb65d232' - '4b60988f913708dd8ee3a79a2eac4cae' - 'e009d2a1c7edc41c1f5974883d4f38b2' - '516036cb0721d1603009e01f5bd728aa' - '47e70b9a063aa99aba0096007ed5b83d' - 'c242bb998d1117544018e169bdd66136' - 'cbef002e6f4b0d043ca6a6e9d60ceca5' - 'e00dd07a067a5f5e99a7d4ef76980bc9') + 0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch + 0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch + 0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch + 0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch + 0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch + 0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch + 0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + 0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch + 0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch + 0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch + 0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch + 0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch + 0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + 0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch + 0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch) # Translates using cygpath according to the ${_make} being used # (so either mingw32-make or MSYS2 make can be used) @@ -236,33 +241,26 @@ pkg_config_qt5() { } prepare() { - # cd ${srcdir} + [[ -d ${srcdir}/${_pkgfqn} ]] && rm -rf ${srcdir}/${_pkgfqn} + tar -xJf ${srcdir}/${_pkgfqn}.tar.xz -C ${srcdir} || true + # cp -rf qt3d ${_pkgfqn}/ - cd ${_pkgfqn} + cd ${srcdir}/${_pkgfqn} # MSYS2 gperf cannot handle \r\n. find . -name "*.gperf" -exec dos2unix "{}" \; - pushd qtbase > /dev/null - rm -f mkspecs/features/ltcg.prf > /dev/null 2>&1 || true - patch -p1 -i ${srcdir}/0001-Add-link-time-optimization-support-for-Clang-GCC-and.patch - popd - patch -p1 -i ${srcdir}/0001-qt-5.3.0-oracle-driver-prompt.patch patch -p1 -i ${srcdir}/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch patch -p1 -i ${srcdir}/0003-qt-5.3.0-use-mingw-built-mysql-library.patch patch -p1 -i ${srcdir}/0005-qt-5.3.0-syncqt-fix.patch patch -p1 -i ${srcdir}/0006-qt-5.3.0-win_flex-replace.patch - # My qt-5.3.0 win32-g++ static patches are against qtbase's dev branch. + # Some patches are against qtbase's repository. pushd qtbase > /dev/null patch -p1 -i ${srcdir}/0007-qt-5.3.0-win32-g-Enable-static-builds.patch - # Despite qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch the following .a (i.e. non-import) - # static libraries end up being made: - # ActiveQt (which is always built statically), libQt5OpenGLExtensions{d}.a, libQt5PlatformSupport{d}.a - # libQt5QmlDevTools.a, libQt5UiTools{d}.a libqtmain{d}.a patch -p1 -i ${srcdir}/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch - patch -p1 -i ${srcdir}/0009-qt-5.3.0-qmlimportscanner-Ensure-the-correct-variant-is-run.patch + ###patch -p1 -i ${srcdir}/0009-qt-5.3.0-qmlimportscanner-Ensure-the-correct-variant-is-run.patch patch -p1 -i ${srcdir}/0010-qt-5.3.0-qdoc-increase-stack-size-for-win32-g-too.patch patch -p1 -i ${srcdir}/0011-qt-5.3.0-win32-g++-allow-static-dbus-1.patch # The next patch needs some work. It's moving a block of shell script un-necessarily @@ -291,7 +289,7 @@ prepare() { _opengl_for_configure=yes fi fi - + patch -p1 -i ${srcdir}/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch if [ "${_make}" = "make" ]; then patch -p1 -i ${srcdir}/0025-qt-5.3.1-force-using-make-on-msys.patch @@ -307,18 +305,43 @@ prepare() { patch -p1 -i ${srcdir}/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch popd > /dev/null + patch -p1 -i ${srcdir}/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch # See discussion at https://bugreports.qt-project.org/browse/QTBUG-41292 # I think what is possibly happening instead is that the Debug and Release # builds are happening in parallel and this causes the error. While Ossi's # suggestion (below) doesn't fix the problem entirely, it makes the chances # of it happening near 0. His take on it is that we should have different # target files for RegExpJitTables.h for each of release and debug. - patch -p1 -i ${srcdir}/0031-qt-5.3.1-Fix-masm-pri-build-race-condition.patch - patch -p1 -i ${srcdir}/0032-qt-5.3.2-Disable-jitted-Regexp-for-Mingw-64-bit-94712.patch - patch -p1 -i ${srcdir}/0033-qt-5.3.2-Use-QMAKE_EXTENSION_STATICLIB-in-create_cmake-prf.patch + ###patch -p1 -i ${srcdir}/0031-qt-5.3.1-Fix-masm-pri-build-race-condition.patch + ###patch -p1 -i ${srcdir}/0032-qt-5.3.2-Disable-jitted-Regexp-for-Mingw-64-bit-94712.patch + ###patch -p1 -i ${srcdir}/0033-qt-5.3.2-Use-QMAKE_EXTENSION_STATICLIB-in-create_cmake-prf.patch patch -p1 -i ${srcdir}/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch patch -p1 -i ${srcdir}/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch + + # Patches so that qt5-static can be used with cmake. patch -p1 -i ${srcdir}/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch + patch -p1 -i ${srcdir}/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch + + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch + popd + patch -p1 -i ${srcdir}/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch + patch -p1 -i ${srcdir}/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch + patch -p1 -i ${srcdir}/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch + patch -p1 -i ${srcdir}/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + patch -p1 -i ${srcdir}/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch + + # More odds and sods. +# patch -p1 -i ${srcdir}/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch + patch -p1 -i ${srcdir}/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch + popd > /dev/null + patch -p1 -i ${srcdir}/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch + patch -p1 -i ${srcdir}/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch + popd > /dev/null # See: https://bugreports.qt-project.org/browse/QTBUG-37902 # _ver_num=${_ver_base%%-*} @@ -353,8 +376,10 @@ prepare() { QMAKE_LFLAGS_RELEASE="-Wl,-s" fi + BIGOBJ_FLAGS="-Wa,-mbig-obj" + # Append these ones .. - sed -i "s|^QMAKE_CFLAGS .*= \(.*\)$|QMAKE_CFLAGS = \1 ${_ARCH_TUNE} ${LTCG_CFLAGS}|g" qtbase/mkspecs/win32-g++/qmake.conf + sed -i "s|^QMAKE_CFLAGS .*= \(.*\)$|QMAKE_CFLAGS = \1 ${_ARCH_TUNE} ${BIGOBJ_FLAGS} ${LTCG_CFLAGS}|g" qtbase/mkspecs/win32-g++/qmake.conf if [ -n "$OPTIM_D" ]; then sed -i "s|^QMAKE_CFLAGS_DEBUG .*= \(.*\)$|QMAKE_CFLAGS_DEBUG = \1 ${OPTIM_D}|g" qtbase/mkspecs/win32-g++/qmake.conf fi @@ -368,7 +393,7 @@ prepare() { # To keep the build folder name quite small (PATH_MAX limit) # the source folder (long) is renamed to $CARCH (i686 or x86_64) cd ${srcdir} - [ -d ${CARCH} ] && rm -rf ${CARCH} + [[ -d ${CARCH} ]] && rm -rf ${CARCH} mv ${_pkgfqn} ${CARCH} } @@ -376,10 +401,9 @@ build() { cd ${CARCH} touch qtbase/.gitignore - mkdir -p ${pkgdir}${_qt5_prefix} - pushd ${pkgdir}${_qt5_prefix} > /dev/null - QTDIR_WIN=$(pwd -W) - popd > /dev/null + local _buildpkgdir=${pkgdirbase}/${pkgname}/${_qt5_prefix} + mkdir -p ${_buildpkgdir} + local QTDIR_WIN=$(cygpath -am ${_buildpkgdir}) local _freetype2_pkgconf="" if [ "${_freetype2}" = "-system-freetype" ]; then @@ -393,8 +417,6 @@ build() { _extra_incpaths+=("${MINGW_PREFIX}/include/GLSLANG") fi _extra_incpaths+=("-I") - _extra_incpaths+=("${MINGW_PREFIX}/include/noX") - _extra_incpaths+=("-I") _extra_incpaths+=("${MINGW_PREFIX}/include/mariadb") # This *could* be used but we'd have to make sure it's correct for all variants first. @@ -459,18 +481,17 @@ build() { local -a _fastbuild_config if [ "${_fastbuild}" = "yes" ]; then - _fastbuild_config+=("-nomake") - _fastbuild_config+=("examples") + _fastbuild_config+=("-nomake" "examples") fi - # We probably want to build these always + # We probably want to build tests always # but not package them? - _fastbuild_config+=("-nomake") - _fastbuild_config+=("tests") + _fastbuild_config+=("-nomake" "tests") # Qt manages the compiler flags for release / debug configs separately, so having our own values (-O2) is harmful here .. unset CFLAGS unset CXXFLAGS unset LDFLAGS +# export NINJA_PATH=${MINGW_PREFIX}/bin/ninja.exe ${_configure} \ -prefix ${QTDIR_WIN} \ @@ -493,21 +514,37 @@ build() { "${_extra_config[@]}" \ "${_sql_config[@]}" \ "${_variant_config[@]}" \ - "${_fastbuild_config[@]}" + "${_fastbuild_config[@]}" \ + "${_minimal_config[@]}" - # I'm Keeping this around while qt5-static cmake problems persist. + # I'm Keeping this around while qt5-static cmake problems persist (hopefully not long!) # qtbase/mkspecs/modules-inst/qt_lib_core.pri - # ROOT=$(pwd -W) - # cd qtbase/ && ${ROOT}/qtbase/bin/qmake.exe ${ROOT}/qtbase/qtbase.pro -o Makefile - # cd .. - # cp -rf qtbase/src/corelib qtbase/src/corelib.pre-write-cmake - # cd qtbase/src/corelib && ${ROOT}/qtbase/bin/qmake.exe ${ROOT}/qtbase/src/corelib/corelib.pro -d -d -d -d -o Makefile - # exit 1 + # pushd src/x86_64 + # ROOT=$(pwd -W) + # pushd qtbase/ + # ${ROOT}/qtbase/bin/qmake.exe ${ROOT}/qtbase/qtbase.pro -o Makefile + # popd + # cp -rf qtbase/src/corelib qtbase/src/corelib.pre-write-cmake + # pushd qtbase/src/corelib + # ${ROOT}/qtbase/bin/qmake.exe ${ROOT}/qtbase/src/corelib/corelib.pro -d -d -d -d -o Makefile > log.txt + # popd + # popd + # . + # .. or .. (this alternative could be used when _minimal=yes) + # . + # pushd src/x86_64 + # ${_make} module-qtbase && ${_make} module-qtbase-install_subtargets + # popd + # .. do your testing. # There is a race condition / dependency problem with libqtiff and dumpdoc.exe which # can happen at -j9 so make twice (dumpdoc.exe depends on libqtiff but can get built # first). ${_make} ${MAKEFLAGS} || ${_make} ${MAKEFLAGS} + # For quicker turn-around testing qtwebengine. + # ${_make} module-qtbase + # ${_make} module-qtwebengine + # exit 1 # Fix paths # find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} + @@ -526,7 +563,7 @@ package() { cd ${CARCH} - export PATH=${pkgdir}${_qt5_prefix}/bin:${pkgdir}${MINGW_PREFIX}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH} + export PATH=${pkgdir}${_qt5_prefix}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH} ${_make} install ${_make} docs @@ -536,7 +573,7 @@ package() { "${pkgdir}${_qt5_prefix}"/share/licenses/qt5/LGPL_EXCEPTION.txt # Remove dlls from lib/ - rm -f "${pkgdir}${MINGW_PREFIX}/lib"/*.dll + rm -f "${pkgdir}${_qt5_prefix}/lib"/*.dll # Workaround for installing empty .pc files plain "---> Fix pkgconfig files..." @@ -544,7 +581,7 @@ package() { cp -f ${_pc_files[@]} ${pkgdir}${_qt5_prefix}/lib/pkgconfig/ # Fix wrong path in prl files - # find "${pkgdir}${MINGW_PREFIX}/lib" -type f -name '*.prl' \ + # find "${pkgdir}${_qt5_prefix}/lib" -type f -name '*.prl' \ # -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \; # Fix wrong qmake path in pri file @@ -592,3 +629,63 @@ package() { # export PATH=/mingw32/bin:$PATH # export PKG_CONFIG_PATH=/mingw32/lib/pkgconfig # E:/m2/repo/mingw-w64-qt5/src/i686/qtbase/bin/qmake.exe -o Makefile qml.pro + +# Plugin .cmake files that do not end with Plugin.cmake: +# E:\msys64\mingw64\qt5-static\lib\cmake\Qt5Declarative\Qt5Declarative_QTcpServerConnection.cmake +# E:\msys64\mingw64\qt5-static\lib\cmake\Qt5Location\Qt5Location_QGeoServiceProviderFactoryNokia.cmake +# E:\msys64\mingw64\qt5-static\lib\cmake\Qt5Location\Qt5Location_QGeoServiceProviderFactoryOsm.cmake +# E:\msys64\mingw64\qt5-static\lib\cmake\Qt5Positioning\Qt5Positioning_QGeoPositionInfoSourceFactoryPoll.cmake +# E:\msys64\mingw64\qt5-static\lib\cmake\Qt5Qml\Qt5Qml_QTcpServerConnection.cmake + +md5sums=('c2a249e8795d45200d997d96860d0353' + 'a2fa66089b171ebb76a6e0bda2ef4ca8' + 'e3210b753ba04762de2ed4cb9c786bf1' + '53edcf1df69ae8134a196292447ddaa3' + 'b0b5cc641cf8ebc2660fa819bede0089' + '457b97833220a81f542f529e7e0c549c' + 'f13cb61f49f572a2fafbad1a323be89f' + '0f2e3a2f790b07442f0964f4f2f96596' + 'a8f02cb5eb766e5bb8639cf8771537d2' + 'ea5f1d5bf2ea4c1d69e6b5de0765adfb' + '6914a82ad728ff0da3c959f53367384c' + 'a3d928580732a966bb20e5dd8bc25606' + '5a735ecec8b12cbd9d48015de4690b87' + '3b740ce9bca6d9019b09f6f38f07411a' + 'c0721e53378a24b8d013c7db59f14c17' + '0d7ce23a99b3f15d176c09e617a437f9' + '40ba7d8134a696d07be5be6692cfaca7' + '23f6818466f6b6646c13549110376022' + 'e65e3ed10e2dd98d5402321657c809c4' + '9ee6524aa78b5e4fbb47f10dc3b267a4' + '68b3878c96f4be33b2803e5676fe3245' + 'd64536bcf72b63d15df106e2c9913154' + '05e73ac3ead09802111cc13d8e3e28c8' + '09aaa20fe92aa3fb8eaa36f805503d7d' + 'a73080c2a48ab52ec8888745daa28c99' + '3b550bd6c58d09aa6729987ef16fed65' + '47c0f36b9de94cf878cd29b7e2b6ea1b' + '01e8030718f088178559a28958a05350' + '6d86c1358be850376ed05c2913175c50' + 'a264f298702e70007820ab2f37facffb' + '2d2e68ab042aadc3c0fd6845dbfae79a' + '7b1e5e2538b71e1e4ba006a241c853b9' + 'e009d2a1c7edc41c1f5974883d4f38b2' + '516036cb0721d1603009e01f5bd728aa' + '47e70b9a063aa99aba0096007ed5b83d' + '3049f9e43e24f7eaafb4659c72ca4789' + 'df6964dca18a315fab60adc0d7a7aedb' + 'fbf568c6ed68ab4a372e03f9b84dafe8' + 'f323f5016ab38ceb3f10673ef9ae4337' + '3323d4694a011b1048512fa27cf9768c' + '6e4a9c4850a1505a442f78d415ffadb9' + 'e49923654e2dff35e86cda6e1b566118' + 'b2269fae567d93fed03fe2affeca116c' + 'e1307c1fd57be3024a1e715c9061ebfb' + 'f63b3d50851ede0124dedccdcd7a6aed' + '27e0f474f66f05f3911c71621b24636d' + '51016015352313cdd749ae1ff3e14614' + '9bc9c1177134d0f2fd782db3f394a318' + '857309396cfdf6bfff91fe86afb947c2' + '54fe3fa20f28a546a60e8c0568ffb6d2' + 'cf3cb7b2c5a0088fbd34c94c4eccc6c9' + 'c899f62a5f6419ffebd937673863858d') diff --git a/mingw-w64-qt5-static/qt-5.3.0-static-qmake-conf.patch b/mingw-w64-qt5-static/qt-5.3.0-static-qmake-conf.patch deleted file mode 100644 index 0279579878..0000000000 --- a/mingw-w64-qt5-static/qt-5.3.0-static-qmake-conf.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urN qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/features/default_post.prf.orig qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/features/default_post.prf ---- qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/features/default_post.prf.orig 2014-02-01 20:37:37.000000000 +0000 -+++ qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/features/default_post.prf 2014-03-07 22:56:43.997614000 +0000 -@@ -53,6 +53,7 @@ - } - - dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL -+static:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB - static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB - staticlib:unix { - QMAKE_CFLAGS += $$QMAKE_CFLAGS_STATIC_LIB -diff -urN qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/win32-g++/qmake.conf.orig qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/win32-g++/qmake.conf ---- qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/win32-g++/qmake.conf.orig 2014-02-01 20:37:37.000000000 +0000 -+++ qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/win32-g++/qmake.conf 2014-03-07 22:55:45.900291100 +0000 -@@ -74,6 +74,7 @@ - QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console - QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows - QMAKE_LFLAGS_DLL = -shared -+QMAKE_LFLAGS_STATIC_LIB += -static - QMAKE_LFLAGS_CXX11 = - QMAKE_LINK_OBJECT_MAX = 10 - QMAKE_LINK_OBJECT_SCRIPT = object_script diff --git a/mingw-w64-qt5-static/qt5-i686.install b/mingw-w64-qt5-static/qt5-i686.install index 06da17aa1b..adee0008d8 100644 --- a/mingw-w64-qt5-static/qt5-i686.install +++ b/mingw-w64-qt5-static/qt5-i686.install @@ -1,8 +1,8 @@ post_install() { if [ -f "mingw32/qt5-static/bin/qmake.exe" ]; then - pushd mingw32/qt5-static/bin > /dev/null + cd mingw32/qt5-static/bin ../../bin/qtbinpatcher --verbose --nobackup - popd > /dev/null + cd - fi } diff --git a/mingw-w64-qt5-static/qt5-x86_64.install b/mingw-w64-qt5-static/qt5-x86_64.install index 4bfe899083..546e16b0e0 100644 --- a/mingw-w64-qt5-static/qt5-x86_64.install +++ b/mingw-w64-qt5-static/qt5-x86_64.install @@ -1,8 +1,8 @@ post_install() { if [ -f "mingw64/qt5-static/bin/qmake.exe" ]; then - pushd mingw64/qt5-static/bin > /dev/null + cd mingw64/qt5-static/bin ../../bin/qtbinpatcher --verbose --nobackup - popd > /dev/null + cd - fi } diff --git a/mingw-w64-qt5/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch b/mingw-w64-qt5/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch index 59e81e2928..f8579bce65 100644 --- a/mingw-w64-qt5/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch +++ b/mingw-w64-qt5/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch @@ -6,6 +6,6 @@ diff -urN --ignore-all-space a/qtbase/src/sql/drivers/ibase/qsql_ibase.pri b/qtb } else { !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { - LIBS += -lgds32_ms -+ LIBS += -lfbclient_ms ++ LIBS += -lfbclient } } diff --git a/mingw-w64-qt5/0006-qt-5.3.0-win_flex-replace.patch b/mingw-w64-qt5/0006-qt-5.3.0-win_flex-replace.patch index 9ea7aedfd3..3849e8b06a 100644 --- a/mingw-w64-qt5/0006-qt-5.3.0-win_flex-replace.patch +++ b/mingw-w64-qt5/0006-qt-5.3.0-win_flex-replace.patch @@ -1,38 +1,43 @@ diff -urN --ignore-all-space a/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro b/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro --- a/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro 2014-05-02 23:06:13.969569900 +0100 +++ b/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro 2014-05-02 23:06:33.470685300 +0100 -@@ -41,7 +41,7 @@ +@@ -41,14 +41,14 @@ $$ANGLE_DIR/src/compiler/preprocessor/Token.cpp - # NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin --flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} -+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} + # NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin +-flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} ++flex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} flex.output = ${QMAKE_FILE_BASE}.cpp flex.input = FLEX_SOURCES flex.dependency_type = TYPE_C + flex.variable_out = GENERATED_SOURCES + QMAKE_EXTRA_COMPILERS += flex + +-bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} ++bison.commands = bison --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} + bison.output = ${QMAKE_FILE_BASE}.cpp + bison.input = BISON_SOURCES + bison.dependency_type = TYPE_C diff -urN --ignore-all-space a/qtbase/src/angle/src/compiler/translator.pro b/qtbase/src/angle/src/compiler/translator.pro --- a/qtbase/src/angle/src/compiler/translator.pro 2014-05-02 23:06:13.969569900 +0100 +++ b/qtbase/src/angle/src/compiler/translator.pro 2014-05-02 23:06:33.467685100 +0100 -@@ -132,7 +132,7 @@ - } +@@ -163,14 +163,14 @@ - # NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin --flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} -+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} + + # NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin +-flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} ++flex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} flex.output = ${QMAKE_FILE_BASE}_lex.cpp flex.input = FLEX_SOURCES flex.dependency_type = TYPE_C -diff -urN --ignore-all-space a/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf b/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf ---- a/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf 2014-05-02 23:06:28.221385000 +0100 -+++ b/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf 2014-05-02 23:06:33.474685500 +0100 -@@ -106,7 +106,6 @@ - # A newer version of flex is required on Windows. At the moment the only - # one that appears to provide binaries and is not cygwin is winflex. - FLEX = flex --win32: FLEX = win_flex + flex.variable_out = GENERATED_SOURCES + QMAKE_EXTRA_COMPILERS += flex - BIN_EXTENSION = - win32: BIN_EXTENSION = .exe +-bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \ ++bison.commands = bison --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \ + --output=${QMAKE_FILE_BASE}_tab.cpp ${QMAKE_FILE_NAME} + bison.output = ${QMAKE_FILE_BASE}_tab.h + bison.input = BISON_SOURCES diff -urN --ignore-all-space a/qtwebkit/Tools/Scripts/webkitdirs.pm b/qtwebkit/Tools/Scripts/webkitdirs.pm --- a/qtwebkit/Tools/Scripts/webkitdirs.pm 2014-05-02 23:06:28.275388100 +0100 +++ b/qtwebkit/Tools/Scripts/webkitdirs.pm 2014-05-02 23:06:33.480685800 +0100 diff --git a/mingw-w64-qt5/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch b/mingw-w64-qt5/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch index 6e894c62c6..a993071a2c 100644 --- a/mingw-w64-qt5/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch +++ b/mingw-w64-qt5/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch @@ -64,7 +64,7 @@ index 6d5764f..77e910b 100644 - + project->first("TARGET_VERSION_EXT") + ".a"); + + project->first("TARGET_VERSION_EXT") + + "." + getImportLibExtension()); - project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB")); + project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + fileVar("MINGW_IMPORT_LIB")); } diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h @@ -72,13 +72,13 @@ index 0e12679..90e78ec 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -53,6 +53,7 @@ public: - ~MingwMakefileGenerator(); - protected: QString escapeDependencyPath(const QString &path) const; + ProString escapeDependencyPath(const ProString &path) const { return MakefileGenerator::escapeDependencyPath(path); } + virtual ProString fixLibFlag(const ProString &lib); + QString getImportLibExtension(); QString getLibTarget(); + virtual QString getManifestFileForRcFile() const; bool writeMakefile(QTextStream &); - void init(); -- 1.9.0 diff --git a/mingw-w64-qt5/0017-qt-5.3.0-fix-examples-building.patch b/mingw-w64-qt5/0017-qt-5.3.0-fix-examples-building.patch index f170405155..4991954b94 100644 --- a/mingw-w64-qt5/0017-qt-5.3.0-fix-examples-building.patch +++ b/mingw-w64-qt5/0017-qt-5.3.0-fix-examples-building.patch @@ -9,8 +9,8 @@ OBJECTS_DIR = tmp MOC_DIR = tmp ---- x86_64/qtdeclarative/examples/qml/tutorials/extending/chapter6-plugins/import/import.pro.orig 2014-04-29 14:13:34.761600000 +0400 -+++ x86_64/qtdeclarative/examples/qml/tutorials/extending/chapter6-plugins/import/import.pro 2014-04-29 14:14:50.577600000 +0400 +--- x86_64/qtdeclarative/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro.orig 2014-04-29 14:13:34.761600000 +0400 ++++ x86_64/qtdeclarative/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro 2014-04-29 14:14:50.577600000 +0400 @@ -2,7 +2,7 @@ CONFIG += plugin QT += qml quick diff --git a/mingw-w64-qt5/0020-qt-5.3.0-use-external-angle-library.patch b/mingw-w64-qt5/0020-qt-5.3.0-use-external-angle-library.patch index 2984600503..17a3ee6973 100644 --- a/mingw-w64-qt5/0020-qt-5.3.0-use-external-angle-library.patch +++ b/mingw-w64-qt5/0020-qt-5.3.0-use-external-angle-library.patch @@ -1,54 +1,5 @@ ---- a/qtbase/mkspecs/win32-g++/qmake.conf.orig 2012-12-16 18:00:31.803375714 +0100 -+++ b/qtbase/mkspecs/win32-g++/qmake.conf 2012-12-16 18:00:25.883273471 +0100 -@@ -86,8 +86,8 @@ - QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 - QMAKE_LIBS_NETWORK = -lws2_32 - QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 --QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32 --QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32 -+QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lgdi32 -luser32 -+QMAKE_LIBS_OPENGL_ES2_DEBUG = -lEGL -lGLESv2 -lgdi32 -luser32 - QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 - QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain - ---- a/qtbase/src/src.pro.orig 2012-12-16 18:00:31.803375714 +0100 -+++ b/qtbase/src/src.pro 2012-12-16 18:00:25.883273471 +0100 -@@ -114,10 +114,6 @@ - SUBDIRS += src_3rdparty_harfbuzzng - src_gui.depends += src_3rdparty_harfbuzzng - } -- win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { -- SUBDIRS += src_angle -- src_gui.depends += src_angle -- } - SUBDIRS += src_gui src_platformsupport - contains(QT_CONFIG, opengl(es1|es2)?):SUBDIRS += src_openglextensions - src_plugins.depends += src_gui src_platformsupport ---- a/qtbase/src/plugins/platforms/windows/windows.pri.orig 2012-12-21 19:32:52.519838959 +0100 -+++ b/qtbase/src/plugins/platforms/windows/windows.pri 2012-12-21 19:34:11.913226062 +0100 -@@ -13,6 +13,7 @@ - !wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32 - - contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32 -+contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL - - mingw: LIBS *= -luuid - # For the dialog helpers: ---- a/qtbase/src/opengl/opengl.pro.orig 2012-12-21 19:30:29.916330288 +0100 -+++ b/qtbase/src/opengl/opengl.pro 2012-12-21 19:31:01.279878067 +0100 -@@ -15,6 +15,10 @@ - contains(QT_CONFIG, opengles2):CONFIG += opengles2 - contains(QT_CONFIG, egl):CONFIG += egl - -+win32:contains(QT_CONFIG, angle) { -+ LIBS_PRIVATE += -lGLESv2 -+} -+ - HEADERS += qgl.h \ - qgl_p.h \ - qglcolormap.h \ ---- a/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in.orig 2013-10-22 23:56:20.562965370 +0200 -+++ b/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2013-10-22 23:57:16.142476851 +0200 +--- a/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2014-12-05 09:24:36.000000000 -0700 ++++ b/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2014-12-11 10:19:51.599972209 -0700 @@ -2,9 +2,9 @@ !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) @@ -61,11 +12,11 @@ !!ENDIF _qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS}) ---- a/qtbase/src/gui/gui.pro.orig 2013-10-23 00:12:41.084984399 +0200 -+++ b/qtbase/src/gui/gui.pro 2013-10-23 00:14:29.872985611 +0200 -@@ -12,12 +12,6 @@ - platforms \ - imageformats +--- a/qtbase/src/gui/gui.pro 2014-12-05 09:24:35.000000000 -0700 ++++ b/qtbase/src/gui/gui.pro 2014-12-11 10:22:37.644366784 -0700 +@@ -17,12 +17,6 @@ + imageformats \ + egldeviceintegrations -# This is here only because the platform plugin is no module, obviously. -win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { @@ -76,7 +27,7 @@ load(qt_module) # Code coverage with TestCocoon -@@ -30,6 +30,10 @@ +@@ -33,6 +27,10 @@ mac:!ios: LIBS_PRIVATE += -framework Cocoa @@ -87,7 +38,7 @@ CONFIG += simd optimize_full include(accessible/accessible.pri) -@@ -50,13 +50,21 @@ +@@ -55,13 +53,21 @@ contains(QT_CONFIG, angle) { CMAKE_GL_INCDIRS = $$CMAKE_INCLUDE_DIR CMAKE_ANGLE_EGL_DLL_RELEASE = libEGL.dll @@ -102,8 +53,8 @@ + win32-g++* { + CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.dll.a + CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.dll.a -+ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGL.dll.a -+ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2.dll.a ++ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.dll.a ++ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.dll.a + } else { + CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.lib + CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.lib @@ -113,3 +64,50 @@ CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 } else { +--- a/qtbase/src/opengl/opengl.pro 2014-12-05 09:24:31.000000000 -0700 ++++ b/qtbase/src/opengl/opengl.pro 2014-12-11 10:15:45.884805707 -0700 +@@ -13,6 +13,10 @@ + contains(QT_CONFIG, opengl):CONFIG += opengl + contains(QT_CONFIG, opengles2):CONFIG += opengles2 + ++win32:contains(QT_CONFIG, angle) { ++ LIBS_PRIVATE += -lGLESv2 ++} ++ + HEADERS += qgl.h \ + qgl_p.h \ + qglcolormap.h \ +--- a/qtbase/src/plugins/platforms/windows/windows.pri 2014-12-05 09:24:37.000000000 -0700 ++++ b/qtbase/src/plugins/platforms/windows/windows.pri 2014-12-11 10:13:45.228261276 -0700 +@@ -3,6 +3,7 @@ + !wince: LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32 + + contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32 ++contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL + + mingw: LIBS *= -luuid + # For the dialog helpers: +--- a/qtbase/src/src.pro 2014-12-05 09:24:31.000000000 -0700 ++++ b/qtbase/src/src.pro 2014-12-11 10:06:14.882845813 -0700 +@@ -155,10 +155,6 @@ + SUBDIRS += src_3rdparty_harfbuzzng + src_gui.depends += src_3rdparty_harfbuzzng + } +- win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { +- SUBDIRS += src_angle +- src_gui.depends += src_angle +- } + contains(QT_CONFIG, freetype) { + SUBDIRS += src_3rdparty_freetype + src_platformsupport.depends += src_3rdparty_freetype +--- a/qtbase/src/plugins/platforms/windows/qwindowseglcontext.cpp 2014-12-05 09:24:37.000000000 -0700 ++++ b/qtbase/src/plugins/platforms/windows/qwindowseglcontext.cpp 2014-12-11 20:07:27.099190408 -0700 +@@ -39,7 +39,7 @@ + #include + + #if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC) +-# include ++# include + #endif + + QT_BEGIN_NAMESPACE diff --git a/mingw-w64-qt5/0021-qt-5.3.0-qtwebkit-dont-use-bundled-angle-libraries.patch b/mingw-w64-qt5/0021-qt-5.3.0-qtwebkit-dont-use-bundled-angle-libraries.patch index feda0c7006..3b7466edd0 100644 --- a/mingw-w64-qt5/0021-qt-5.3.0-qtwebkit-dont-use-bundled-angle-libraries.patch +++ b/mingw-w64-qt5/0021-qt-5.3.0-qtwebkit-dont-use-bundled-angle-libraries.patch @@ -1,6 +1,6 @@ --- a/qtwebkit/WebKit.pro.orig 2013-01-04 01:50:18.373246956 +0100 +++ b/qtwebkit/WebKit.pro 2013-01-04 01:50:23.777286725 +0100 -@@ -18,11 +18,11 @@ +@@ -18,12 +18,6 @@ JavaScriptCore.makefile = Makefile.JavaScriptCore SUBDIRS += JavaScriptCore @@ -9,25 +9,21 @@ - ANGLE.makefile = Makefile.ANGLE - SUBDIRS += ANGLE -} -+#use?(3D_GRAPHICS) { -+# ANGLE.file = Source/ThirdParty/ANGLE/ANGLE.pro -+# ANGLE.makefile = Makefile.ANGLE -+# SUBDIRS += ANGLE -+#} - - WebCore.file = Source/WebCore/WebCore.pro - WebCore.makefile = Makefile.WebCore +- + use?(leveldb):!use?(system_leveldb) { + leveldb.file = Source/ThirdParty/leveldb/leveldb.pro + leveldb.makefile = Makefile.leveldb --- a/qtwebkit/Source/WebCore/Target.pri.orig 2013-01-04 01:58:25.145960916 +0100 +++ b/qtwebkit/Source/WebCore/Target.pri 2013-01-04 01:58:53.245166218 +0100 -@@ -4160,7 +4160,7 @@ +@@ -4194,7 +4194,7 @@ platform/graphics/texmap/coordinated/CoordinatedTile.cpp \ platform/graphics/texmap/coordinated/UpdateAtlas.cpp - INCLUDEPATH += $$PWD/platform/graphics/gpu + INCLUDEPATH += $$PWD/platform/graphics/gpu /mingw64/include/GLSLANG - contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) { - !contains(QT_CONFIG, opengles2) { + contains(QT_CONFIG, opengl) { + contains(QT_CONFIG, opengles2) { --- a/qtwebkit/Tools/qmake/mkspecs/modules/angle.prf.orig 2013-01-04 02:25:16.357429590 +0100 +++ b/qtwebkit/Tools/qmake/mkspecs/modules/angle.prf 2013-01-04 02:25:29.383533741 +0100 @@ -4,6 +4,3 @@ @@ -46,7 +42,7 @@ -use?(3D_GRAPHICS): WEBKIT += angle +use?(3D_GRAPHICS) { + WEBKIT += angle -+# INCLUDEPATH += /mingw64/include/GLSLANG ++ INCLUDEPATH += /mingw64/include/GLSLANG +} have?(qtpositioning):enable?(GEOLOCATION) { @@ -60,7 +56,7 @@ -use?(3D_GRAPHICS): WEBKIT += angle +use?(3D_GRAPHICS) { + WEBKIT += angle -+# INCLUDEPATH += /mingw64/include/GLSLANG ++ INCLUDEPATH += /mingw64/include/GLSLANG +} use?(PLUGIN_BACKEND_XLIB) { @@ -92,7 +88,7 @@ CONFIG(debug, debug|release):contains(QT_CONFIG, angle) { LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG } else { -+# INCLUDEPATH += /mingw64/include/GLSLANG ++ INCLUDEPATH += /mingw64/include/GLSLANG LIBS += $$QMAKE_LIBS_OPENGL_ES2 } } else { diff --git a/mingw-w64-qt5/0022-qt5-qtwebkit-fix-compatibility-with-latest-angle.patch b/mingw-w64-qt5/0022-qt5-qtwebkit-fix-compatibility-with-latest-angle.patch new file mode 100644 index 0000000000..4c622f0a6a --- /dev/null +++ b/mingw-w64-qt5/0022-qt5-qtwebkit-fix-compatibility-with-latest-angle.patch @@ -0,0 +1,147 @@ +--- a/qtwebkit/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h.orig 2014-12-29 22:48:34.532357391 +0100 ++++ b/qtwebkit/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h 2014-12-29 23:01:26.254334924 +0100 +@@ -34,14 +34,19 @@ + #elif PLATFORM(WIN) + #include "GLSLANG/ShaderLang.h" + #else ++#ifdef __MINGW32__ ++#include "GLSLANG/ShaderLang.h" ++#include "angle_gl.h" ++#else + #include "ShaderLang.h" ++#endif + #endif + + namespace WebCore { + + enum ANGLEShaderType { +- SHADER_TYPE_VERTEX = SH_VERTEX_SHADER, +- SHADER_TYPE_FRAGMENT = SH_FRAGMENT_SHADER, ++ SHADER_TYPE_VERTEX = GL_VERTEX_SHADER, ++ SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER, + }; + + enum ANGLEShaderSymbolType { +@@ -53,17 +54,17 @@ + ANGLEShaderSymbolType symbolType; + String name; + String mappedName; +- ShDataType dataType; ++ sh::GLenum dataType; + int size; + bool isArray; + + bool isSampler() const + { + return symbolType == SHADER_SYMBOL_TYPE_UNIFORM +- && (dataType == SH_SAMPLER_2D +- || dataType == SH_SAMPLER_CUBE +- || dataType == SH_SAMPLER_2D_RECT_ARB +- || dataType == SH_SAMPLER_EXTERNAL_OES); ++ && (dataType == GL_SAMPLER_2D ++ || dataType == GL_SAMPLER_CUBE ++ || dataType == GL_SAMPLER_2D_RECT_ARB ++ || dataType == GL_SAMPLER_EXTERNAL_OES); + } + }; + +@@ -71,7 +71,7 @@ + class ANGLEWebKitBridge { + public: + +- ANGLEWebKitBridge(ShShaderOutput = SH_GLSL_OUTPUT, ShShaderSpec = SH_WEBGL_SPEC); ++ ANGLEWebKitBridge(ShShaderOutput = SH_GLSL_COMPATIBILITY_OUTPUT, ShShaderSpec = SH_WEBGL_SPEC); + ~ANGLEWebKitBridge(); + + ShBuiltInResources getResources() { return m_resources; } +--- a/qtwebkit/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp.orig 2014-12-29 23:37:30.636783007 +0100 ++++ b/qtwebkit/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp 2014-12-30 12:00:39.524299653 +0100 +@@ -42,7 +42,7 @@ + inline static ANGLEGetInfoType getValidationResultValue(const ShHandle compiler, ShShaderInfo shaderInfo) + { + ANGLEGetInfoType value = 0; +- ShGetInfo(compiler, shaderInfo, &value); ++ ShGetInfo(compiler, (ShShaderInfo) shaderInfo, &value); + return value; + } + +@@ -51,11 +51,11 @@ + ShShaderInfo symbolMaxNameLengthType; + + switch (symbolType) { +- case SH_ACTIVE_ATTRIBUTES: +- symbolMaxNameLengthType = SH_ACTIVE_ATTRIBUTE_MAX_LENGTH; ++ case GL_ACTIVE_ATTRIBUTES: ++ symbolMaxNameLengthType = (ShShaderInfo) GL_ACTIVE_ATTRIBUTE_MAX_LENGTH; + break; +- case SH_ACTIVE_UNIFORMS: +- symbolMaxNameLengthType = SH_ACTIVE_UNIFORM_MAX_LENGTH; ++ case GL_ACTIVE_UNIFORMS: ++ symbolMaxNameLengthType = (ShShaderInfo) GL_ACTIVE_UNIFORM_MAX_LENGTH; + break; + default: + ASSERT_NOT_REACHED(); +@@ -79,14 +79,16 @@ + for (ANGLEGetInfoType i = 0; i < numSymbols; ++i) { + ANGLEShaderSymbol symbol; + ANGLEGetInfoType nameLength = 0; ++ ShPrecisionType precision = SH_PRECISION_UNDEFINED; ++ int staticUse = 0; + switch (symbolType) { +- case SH_ACTIVE_ATTRIBUTES: ++ case GL_ACTIVE_ATTRIBUTES: + symbol.symbolType = SHADER_SYMBOL_TYPE_ATTRIBUTE; +- ShGetActiveAttrib(compiler, i, &nameLength, &symbol.size, &symbol.dataType, nameBuffer.data(), mappedNameBuffer.data()); ++ ShGetVariableInfo(compiler, SH_ACTIVE_ATTRIBUTES, i, &nameLength, &symbol.size, &symbol.dataType, &precision, &staticUse, nameBuffer.data(), mappedNameBuffer.data()); + break; +- case SH_ACTIVE_UNIFORMS: ++ case GL_ACTIVE_UNIFORMS: + symbol.symbolType = SHADER_SYMBOL_TYPE_UNIFORM; +- ShGetActiveUniform(compiler, i, &nameLength, &symbol.size, &symbol.dataType, nameBuffer.data(), mappedNameBuffer.data()); ++ ShGetVariableInfo(compiler, SH_ACTIVE_UNIFORMS, i, &nameLength, &symbol.size, &symbol.dataType, &precision, &staticUse, nameBuffer.data(), mappedNameBuffer.data()); + break; + default: + ASSERT_NOT_REACHED(); +@@ -170,8 +172,8 @@ + bool ANGLEWebKitBridge::compileShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog, Vector& symbols, int extraCompileOptions) + { + if (!builtCompilers) { +- m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, m_shaderSpec, m_shaderOutput, &m_resources); +- m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, m_shaderSpec, m_shaderOutput, &m_resources); ++ m_fragmentCompiler = ShConstructCompiler(GL_FRAGMENT_SHADER, m_shaderSpec, m_shaderOutput, &m_resources); ++ m_vertexCompiler = ShConstructCompiler(GL_VERTEX_SHADER, m_shaderSpec, m_shaderOutput, &m_resources); + if (!m_fragmentCompiler || !m_vertexCompiler) { + cleanupCompilers(); + return false; +@@ -189,7 +191,7 @@ + + const char* const shaderSourceStrings[] = { shaderSource }; + +- bool validateSuccess = ShCompile(compiler, shaderSourceStrings, 1, SH_OBJECT_CODE | SH_ATTRIBUTES_UNIFORMS | extraCompileOptions); ++ bool validateSuccess = ShCompile(compiler, shaderSourceStrings, 1, SH_OBJECT_CODE | SH_VARIABLES | extraCompileOptions); + if (!validateSuccess) { + int logSize = getValidationResultValue(compiler, SH_INFO_LOG_LENGTH); + if (logSize > 1) { +@@ -211,9 +213,9 @@ + translatedShaderSource = translationBuffer.get(); + } + +- if (!getSymbolInfo(compiler, SH_ACTIVE_ATTRIBUTES, symbols)) ++ if (!getSymbolInfo(compiler, (ShShaderInfo) GL_ACTIVE_ATTRIBUTES, symbols)) + return false; +- if (!getSymbolInfo(compiler, SH_ACTIVE_UNIFORMS, symbols)) ++ if (!getSymbolInfo(compiler, (ShShaderInfo) GL_ACTIVE_UNIFORMS, symbols)) + return false; + + return true; +--- a/qtwebkit/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.orig 2014-12-30 12:11:43.450097601 +0100 ++++ b/qtwebkit/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp 2014-12-30 12:13:46.812361166 +0100 +@@ -172,7 +172,7 @@ + + String translatedShaderSource; + String shaderInfoLog; +- int extraCompileOptions = SH_MAP_LONG_VARIABLE_NAMES | SH_CLAMP_INDIRECT_ARRAY_BOUNDS; ++ int extraCompileOptions = SH_CLAMP_INDIRECT_ARRAY_BOUNDS; + + if (m_requiresBuiltInFunctionEmulation) + extraCompileOptions |= SH_EMULATE_BUILT_IN_FUNCTIONS; diff --git a/mingw-w64-qt5/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch b/mingw-w64-qt5/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch index c63b8f9ac6..106b20761e 100644 --- a/mingw-w64-qt5/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch +++ b/mingw-w64-qt5/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch @@ -1,31 +1,21 @@ ---- x86_64/qtbase/src/corelib/tools/tools.pri.orig 2014-04-20 21:21:48.808906400 +0100 -+++ x86_64/qtbase/src/corelib/tools/tools.pri 2014-04-20 21:20:41.677381800 +0100 -@@ -159,11 +159,17 @@ - CONFIG(static, static|shared) { - CONFIG(debug, debug|release) { - LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd -+ DEFINES += "U_LIB_SUFFIX_C_NAME=d" - } else { - LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt - } - } else { -- LIBS_PRIVATE += -licuin -licuuc -licudt -+ CONFIG(debug, debug|release) { -+ LIBS_PRIVATE += -licuind -licuucd -licudtd -+ DEFINES += "U_LIB_SUFFIX_C_NAME=d" -+ } else { -+ LIBS_PRIVATE += -licuin -licuuc -licudt -+ } - } - } else { - LIBS_PRIVATE += -licui18n -licuuc -licudata ---- x86_64/qtbase/config.tests/unix/icu/icu.pro.orig 2014-04-20 21:24:31.107015700 +0100 -+++ x86_64/qtbase/config.tests/unix/icu/icu.pro 2014-04-20 21:24:25.573813000 +0100 -@@ -5,6 +5,7 @@ +--- x86_64/qtbase/src/3rdparty/icu_dependency.pri.orig 2014-04-20 21:24:31.107015700 +0100 ++++ x86_64/qtbase/src/3rdparty/icu_dependency.pri 2014-04-20 21:24:25.573813000 +0100 +@@ -2,11 +2,17 @@ CONFIG(static, static|shared) { CONFIG(debug, debug|release) { - LIBS += -lsicuind -lsicuucd -lsicudtd + LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd + DEFINES += "U_LIB_SUFFIX_C_NAME=d" } else { - LIBS += -lsicuin -lsicuuc -lsicudt + LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt } + } else { +- LIBS_PRIVATE += -licuin -licuuc -licudt ++ CONFIG(debug, debug|release) { ++ LIBS_PRIVATE += -licuind -licuucd -licudtd ++ DEFINES += "U_LIB_SUFFIX_C_NAME=d" ++ } else { ++ LIBS_PRIVATE += -licuin -licuuc -licudt ++ } + } + } else { + LIBS_PRIVATE += -licui18n -licuuc -licudata diff --git a/mingw-w64-qt5/0025-qt-5.3.1-force-using-make-on-msys.patch b/mingw-w64-qt5/0025-qt-5.3.1-force-using-make-on-msys.patch old mode 100755 new mode 100644 diff --git a/mingw-w64-qt5/0026-qt-5.3.1-webkit-detect-tools.patch b/mingw-w64-qt5/0026-qt-5.3.1-webkit-detect-tools.patch old mode 100755 new mode 100644 index 5bbe24193b..2ccf835a55 --- a/mingw-w64-qt5/0026-qt-5.3.1-webkit-detect-tools.patch +++ b/mingw-w64-qt5/0026-qt-5.3.1-webkit-detect-tools.patch @@ -26,7 +26,7 @@ # on Linux and Mac OS X. On Windows we do have a convenience copy in # Qt5's top-level repository, so let's add that to the PATH if we can # find it. -- win32 { +- equals(QMAKE_HOST.os, Windows) { + win32:isEmpty(QMAKE_SH) { GNUTOOLS_DIR=$$[QT_HOST_DATA]/../gnuwin32/bin exists($$GNUTOOLS_DIR/gperf.exe) { diff --git a/mingw-w64-qt5/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch b/mingw-w64-qt5/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch index bdc8e42245..fe9c7af31c 100644 --- a/mingw-w64-qt5/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch +++ b/mingw-w64-qt5/0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch @@ -49,24 +49,24 @@ index 790724c..eeaafcc 100644 javac.input = JAVASOURCES javac.output = $$CLASS_DIR javac.CONFIG += combine --javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEP))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} +-javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} +javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$shell_path($$join(JAVACLASSPATH, $$QMAKE_DIRLIST_SEP))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} # Force rebuild every time, because we don't know the paths of the destination files # as they depend on the code. javac.depends = FORCE diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf -index 6656d1b..40ec7cf 100644 +index 770afa3..c06cbf1 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf -@@ -22,7 +22,7 @@ debug_and_release:debug_and_release_target { - } +@@ -45,7 +45,7 @@ qtAddTargetEnv(check.commands, QT) - !isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD,^\\./?): \ -- check.commands = cd $$shell_path($$TESTRUN_CWD) && -+ check.commands = cd $$system_path($$TESTRUN_CWD) && + # This must happen after adding the environment. + !isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \ +- check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands ++ check.commands = cd $$system_path($$TESTRUN_CWD) && $$check.commands - # Allow for a custom test runner script - check.commands += $(TESTRUNNER) + # If the test is marked as insignificant, discard the exit code + insignificant_test:check.commands = -$${check.commands} diff --git a/mkspecs/features/win32/windeployqt.prf b/mkspecs/features/win32/windeployqt.prf index 22253f6..f49df47 100644 --- a/mkspecs/features/win32/windeployqt.prf diff --git a/mingw-w64-qt5/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch b/mingw-w64-qt5/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch index f52a7451e2..f7db84cd30 100644 --- a/mingw-w64-qt5/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch +++ b/mingw-w64-qt5/0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch @@ -13,9 +13,9 @@ diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.p index 9a4d80e..5dd6987 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf -@@ -191,30 +191,26 @@ defineTest(qtAddRpathLink) { +@@ -191,31 +191,27 @@ defineTest(qtAddRpathLink) { - # variable, default, [suffix for variable for system() use] + # variable, default, [suffix for variable for system() use], [prepare primary variable for system() use] defineTest(qtPrepareTool) { - cmd = $$eval(QT_TOOL.$${2}.binary) - isEmpty(cmd) { @@ -40,19 +40,20 @@ index 9a4d80e..5dd6987 100644 } } QT_TOOL_ENV += $$eval(QT_TOOL.$${2}.envvars) - !isEmpty(3) { + !isEmpty(3)|!isEmpty(4) { - $$1$$3 = - for (arg, cmd): \ - $$1$$3 += $$system_quote($$arg) + $$1$$3 = $$system_path($$eval($$1)) qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) } -- $$1 = -- for (arg, cmd): \ -- $$1 += $$shell_quote($$arg) -+ $$1 = $$shell_path($$eval($$1)) - qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) - } + isEmpty(4) { +- $$1 = +- for (arg, cmd): \ +- $$1 += $$shell_quote($$arg) ++ $$1 = $$shell_path($$eval($$1)) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) + } diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 1d3e88c..f0864f9 100644 diff --git a/mingw-w64-qt5/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch b/mingw-w64-qt5/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch index 334d1243bc..fd1c32fb50 100644 --- a/mingw-w64-qt5/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch +++ b/mingw-w64-qt5/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch @@ -12,9 +12,9 @@ { A = 1, @@ -207,6 +211,10 @@ - SRV = 33, TXT = 16 }; + Q_ENUM(Type) +// Set PTR back what it previously contained. +#ifdef PTR_OLD_DEFINE +#define PTR PTR_OLD_DEFINE diff --git a/mingw-w64-qt5/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch b/mingw-w64-qt5/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch new file mode 100644 index 0000000000..2c8b066a5e --- /dev/null +++ b/mingw-w64-qt5/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch @@ -0,0 +1,24 @@ +--- a/qtcanvas3d/src/imports/qtcanvas3d/context3d_p.h.orig 2015-07-02 11:38:07.087024200 +0300 ++++ b/qtcanvas3d/src/imports/qtcanvas3d/context3d_p.h 2015-07-02 11:46:54.641638300 +0300 +@@ -100,6 +100,10 @@ + Q_PROPERTY(uint drawingBufferHeight READ drawingBufferHeight NOTIFY drawingBufferHeightChanged) + + public: ++#ifdef BOOL ++#define BOOL_OLD_DEFINE BOOL ++#undef BOOL ++#endif + enum glEnums { + /* ClearBufferMask */ + DEPTH_BUFFER_BIT = 0x00000100, +@@ -543,6 +547,10 @@ + COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02, + COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03 + }; ++// Set BOOL back what it previously contained. ++#ifdef BOOL_OLD_DEFINE ++#define BOOL BOOL_OLD_DEFINE ++#endif + + /* ClearBufferMask */ + ENUM_AS_PROPERTY(DEPTH_BUFFER_BIT) diff --git a/mingw-w64-qt5/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch b/mingw-w64-qt5/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch index 97e9b1caef..aeb3928ba9 100644 --- a/mingw-w64-qt5/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch +++ b/mingw-w64-qt5/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch @@ -1,21 +1,24 @@ ---- a/qtbase/mkspecs/features/create_cmake.prf 2014-10-13 17:52:38.691086600 +0100 -+++ b/qtbase/mkspecs/features/create_cmake.prf 2014-10-13 19:47:45.828532600 +0100 -@@ -133,11 +133,16 @@ - CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME +--- qt-everywhere-opensource-src-5.4.0-rc/qtbase/mkspecs/features/create_cmake.prf.orig 2014-12-01 01:49:24.066920200 +0000 ++++ qt-everywhere-opensource-src-5.4.0-rc/qtbase/mkspecs/features/create_cmake.prf 2014-12-01 01:59:39.496120700 +0000 +@@ -134,15 +134,15 @@ win32 { -- isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dll -- else: CMAKE_PlUGIN_EXT = .$${QMAKE_EXTENSION_STATICLIB} -+ isEmpty(CMAKE_STATIC_TYPE) { + isEmpty(CMAKE_STATIC_TYPE) { +- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll +- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll +- } else:mingw { +- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a +- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a +- } else { # MSVC static +- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib +- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib + CMAKE_PlUGIN_EXT = .dll + CMAKE_PlUGIN_PREFIX = + } else { + CMAKE_PlUGIN_EXT = .$${QMAKE_EXTENSION_STATICLIB} + CMAKE_PlUGIN_PREFIX = $${QMAKE_PREFIX_STATICLIB} -+ } - -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}$${CMAKE_PlUGIN_EXT} -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d$${CMAKE_PlUGIN_EXT} + } ++ + CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_PlUGIN_PREFIX}$${TARGET}$${CMAKE_PlUGIN_EXT} + CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_PlUGIN_PREFIX}$${TARGET}d$${CMAKE_PlUGIN_EXT} } else { diff --git a/mingw-w64-qt5/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch b/mingw-w64-qt5/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch index f745464156..a7e4edfb17 100644 --- a/mingw-w64-qt5/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch +++ b/mingw-w64-qt5/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch @@ -1,11 +1,11 @@ --- qtbase-opensource-src-5.3.2/qtbase/qmake/generators/win32/mingw_make.cpp.orig 2014-10-19 12:16:07.387600000 +0400 +++ qtbase-opensource-src-5.3.2/qtbase/qmake/generators/win32/mingw_make.cpp 2014-10-19 12:16:07.387600000 +0400 @@ -254,7 +254,7 @@ + processVars(); - if (!project->values("RES_FILE").isEmpty()) { -- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE")); -+ project->values("OBJECTS") += escapeFilePaths(project->values("RES_FILE")); - } +- project->values("QMAKE_LIBS") += project->values("RES_FILE"); ++ project->values("OBJECTS") += project->values("RES_FILE"); - ProStringList &configs = project->values("CONFIG"); + if (project->isActiveConfig("dll")) { + QString destDir = ""; diff --git a/mingw-w64-qt5/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch b/mingw-w64-qt5/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch new file mode 100644 index 0000000000..969fe359b3 --- /dev/null +++ b/mingw-w64-qt5/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch @@ -0,0 +1,15 @@ +--- qt-everywhere-opensource-src-5.3.2.orig/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in.orig 2014-11-09 00:54:20.852201500 +0000 ++++ qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in 2014-11-09 00:55:52.437439900 +0000 +@@ -165,3 +165,12 @@ + set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\") + + _qt5_Core_check_file_exists(${_Qt5CTestMacros}) ++ ++get_target_property(_libType Qt5::Core TYPE) ++if(_libType STREQUAL \"STATIC_LIBRARY\" AND WIN32) ++ set(_isExe $,EXECUTABLE>) ++ # INTERFACE_LINK_LIBRARIES is used to pass a linker flag (-static) ++ # and a library (ws2_32) ++ set_target_properties(Qt5::Core PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\") ++ unset(_isExe) ++endif() diff --git a/mingw-w64-qt5/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch b/mingw-w64-qt5/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch new file mode 100644 index 0000000000..b53e5c2f55 --- /dev/null +++ b/mingw-w64-qt5/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch @@ -0,0 +1,20 @@ +--- qt-everywhere-opensource-src-5.4.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in.orig 2015-01-04 22:22:54.714460900 +0000 ++++ qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-01-04 22:34:11.801082600 +0000 +@@ -283,7 +283,16 @@ + + !!ENDIF // CMAKE_DEBUG_TYPE + +- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") ++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") ++ unset(pluginTargets) ++ if (pluginTargetsMaybe) ++ foreach(pluginTarget ${pluginTargetsMaybe}) ++ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) ++ if (matched) ++ list(APPEND pluginTargets ${pluginTarget}) ++ endif() ++ endforeach() ++ endif() + + macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) diff --git a/mingw-w64-qt5/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch b/mingw-w64-qt5/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch new file mode 100644 index 0000000000..055ac6d30e --- /dev/null +++ b/mingw-w64-qt5/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch @@ -0,0 +1,35 @@ +From 1f36ecb8823d607883aabfee07d9a0c03982257b Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 26 Aug 2015 12:45:43 +0100 +Subject: [PATCH 38/38] cmake: Rearrange STATIC vs INTERFACE targets + +Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) +for header-only modules when building Qt5 statically. +--- + mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index d2358ca..6b1dc95 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -222,13 +222,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + endif() + !!ENDIF + ++!!IF equals(TEMPLATE, aux) ++ add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) ++!!ELSE + !!IF !isEmpty(CMAKE_STATIC_TYPE) + add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + !!ELSE +-!!IF equals(TEMPLATE, aux) +- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) +-!!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF + !!ENDIF +-- +2.5.0 + diff --git a/mingw-w64-qt5/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch b/mingw-w64-qt5/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch new file mode 100644 index 0000000000..bdd42d50e1 --- /dev/null +++ b/mingw-w64-qt5/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch @@ -0,0 +1,60 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:00:26.576032700 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:00:42.742765400 +0100 +@@ -65,13 +65,13 @@ + !!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" ++ \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} + !!IF !isEmpty(CMAKE_LIB_SONAME) + \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" + !!ENDIF + # For backward compatibility with CMake < 2.8.12 +- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" ++ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + ) + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +@@ -228,6 +228,40 @@ + !!IF !isEmpty(CMAKE_STATIC_TYPE) + add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") ++# Excerpt from: ++ ++# From ae6d4c77eb338be3f2189bfaffdcd3c38cc57333 Mon Sep 17 00:00:00 2001 ++# From: Stephen Kelly ++# Date: Tue, 21 Aug 2012 13:12:57 +0200 ++# Subject: [PATCH] Make it possible to use static builds of Qt with CMake. ++# ++# Parse the prl files generated by qmake to get the link dependencies. They ++# contain all the information we need, and they are the only location with ++# all the right information. ++macro(macro_process_prl_file prl_file_location Configuration) ++ if (EXISTS \"${prl_file_location}\") ++ file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS\") ++ string(REGEX REPLACE \"QMAKE_PRL_LIBS *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) ++ string(STRIP ${static_depends} static_depends) ++ if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) ++ set(_list_sep \";\") ++ endif() ++ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_list_sep}${static_depends}\") ++ endif() ++endmacro() ++ ++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ macro_process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG) ++!!ELSE ++ macro_process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG) ++!!ENDIF ++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ macro_process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE) ++!!ELSE ++ macro_process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE) ++!!ENDIF ++ ++# Excerpt from: end + !!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF diff --git a/mingw-w64-qt5/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch b/mingw-w64-qt5/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch new file mode 100644 index 0000000000..48461ff5b4 --- /dev/null +++ b/mingw-w64-qt5/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch @@ -0,0 +1,32 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:06:08.512109600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:06:33.366637700 +0100 +@@ -240,9 +240,8 @@ + # all the right information. + macro(macro_process_prl_file prl_file_location Configuration) + if (EXISTS \"${prl_file_location}\") +- file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS\") +- string(REGEX REPLACE \"QMAKE_PRL_LIBS *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) +- string(STRIP ${static_depends} static_depends) ++ file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\") ++ string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) + if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) + set(_list_sep \";\") + endif() +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/qmake/generators/makefile.cpp qt-everywhere-opensource-src-5.5.0/qtbase/qmake/generators/makefile.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/qmake/generators/makefile.cpp 2015-08-26 14:29:10.131124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/qmake/generators/makefile.cpp 2015-08-26 15:06:33.375635900 +0100 +@@ -1006,6 +1006,13 @@ + for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) + t << qv(project->values((*it).toKey())); + t << endl; ++ t << "QMAKE_PRL_LIBS_FOR_CMAKE = "; ++ QString sep; ++ for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) { ++ t << sep << project->values((*it).toKey()).join(';').replace('\\', "\\\\"); ++ sep = ';'; ++ } ++ t << endl; + } + } + diff --git a/mingw-w64-qt5/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch b/mingw-w64-qt5/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch new file mode 100644 index 0000000000..dc83b1a1d2 --- /dev/null +++ b/mingw-w64-qt5/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch @@ -0,0 +1,13 @@ +--- qt-everywhere-opensource-src-5.4.0.orig/qtbase/mkspecs/features/create_cmake.prf.orig 2014-12-14 20:11:38.710428500 +0000 ++++ qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/features/create_cmake.prf 2014-12-14 22:16:48.451709600 +0000 +@@ -233,8 +233,8 @@ + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a + +- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl +- CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl ++ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl ++ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl + } else { + isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB} diff --git a/mingw-w64-qt5/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch b/mingw-w64-qt5/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch new file mode 100644 index 0000000000..a7d5109789 --- /dev/null +++ b/mingw-w64-qt5/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch @@ -0,0 +1,153 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:31:26.194016900 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-26 15:21:30.905016900 +0100 +@@ -64,14 +64,17 @@ + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) ++ if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) ++ set(_list_sep \";\") ++ endif() + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" ++ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} + !!IF !isEmpty(CMAKE_LIB_SONAME) + \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" + !!ENDIF + # For backward compatibility with CMake < 2.8.12 +- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" ++ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}\" + ) + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +@@ -238,17 +241,31 @@ + # Parse the prl files generated by qmake to get the link dependencies. They + # contain all the information we need, and they are the only location with + # all the right information. ++ ++# .. changed so that if can be called multiple times, once for the module itself and once for each ++# plugin, each time, appending to _Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES ++ + macro(macro_process_prl_file prl_file_location Configuration) + if (EXISTS \"${prl_file_location}\") + file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\") + string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) +- if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES) ++ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES) + set(_list_sep \";\") + endif() +- set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_list_sep}${static_depends}\") ++ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}${_list_sep}${static_depends}\") + endif() + endmacro() + ++macro(macro_process_plugin_prl_file prl_file_location Configuration LIB_DIRECTORY LIB_LOCATION) ++ # First add the (static) plugin itself. ++ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES) ++ set(_list_sep \";\") ++ endif() ++ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}${_list_sep}${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/${LIB_DIRECTORY}/${LIB_LOCATION}\") ++ # .. then its dependencies. ++ macro_process_prl_file(${prl_file_location} ${Configuration}) ++endmacro() ++ + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) + macro_process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG) + !!ELSE +@@ -261,6 +278,7 @@ + !!ENDIF + + # Excerpt from: end ++ + !!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF +@@ -276,6 +294,48 @@ + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY + INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE}) + ++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") ++ unset(pluginTargets) ++ if (pluginTargetsMaybe) ++ foreach(pluginTarget ${pluginTargetsMaybe}) ++ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) ++ if (matched) ++ list(APPEND pluginTargets ${pluginTarget}) ++ endif() ++ endforeach() ++ endif() ++ ++ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) ++ set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) ++ ++!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++!!ELSE ++ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++!!ENDIF ++ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) ++ set_target_properties(Qt5::${Plugin} PROPERTIES ++ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} ++ ) ++ get_filename_component(_plugindir ${PLUGIN_LOCATION} PATH) ++ get_filename_component(_plugindirname ${_plugindir} NAME) ++ get_filename_component(_pluginname ${PLUGIN_LOCATION} NAME) ++!!IF !isEmpty(CMAKE_STATIC_TYPE) ++ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY STATIC_PLUGINS ${Plugin}) ++!!ENDIF ++ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/share/qt5/plugins/${_plugindirname}/\\\\1.prl\" plugin_prl_file_location ${_pluginname}) ++!!IF !isEmpty(CMAKE_STATIC_TYPE) ++ macro_process_plugin_prl_file(${plugin_prl_file_location} ${Configuration} \"share/qt5/plugins\" ${PLUGIN_LOCATION} ) ++!!ENDIF ++ ++ endmacro() ++ ++ if (pluginTargets) ++ foreach(pluginTarget ${pluginTargets}) ++ include(${pluginTarget}) ++ endforeach() ++ endif() ++ + !!IF !equals(TEMPLATE, aux) + !!IF !isEmpty(CMAKE_RELEASE_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +@@ -356,37 +416,6 @@ + ) + !!ENDIF // TEMPLATE != aux + +- file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") +- unset(pluginTargets) +- if (pluginTargetsMaybe) +- foreach(pluginTarget ${pluginTargetsMaybe}) +- file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) +- if (matched) +- list(APPEND pluginTargets ${pluginTarget}) +- endif() +- endforeach() +- endif() +- +- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) +- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) +- +-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ELSE +- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ENDIF +- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) +- set_target_properties(Qt5::${Plugin} PROPERTIES +- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} +- ) +- endmacro() +- +- if (pluginTargets) +- foreach(pluginTarget ${pluginTargets}) +- include(${pluginTarget}) +- endforeach() +- endif() +- + + !!IF !isEmpty(CMAKE_MODULE_EXTRAS) + include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\") + diff --git a/mingw-w64-qt5/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch b/mingw-w64-qt5/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch new file mode 100644 index 0000000000..ddb7315751 --- /dev/null +++ b/mingw-w64-qt5/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch @@ -0,0 +1,11 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-27 12:15:50.549764900 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2015-08-27 12:32:35.136763200 +0100 +@@ -249,6 +249,7 @@ + if (EXISTS \"${prl_file_location}\") + file(STRINGS \"${prl_file_location}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\") + string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings} ) ++ string(REGEX REPLACE \"\\\\$\\\\$\\\\[QT_INSTALL_LIBS\\\\]\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" static_depends \"${static_depends}\") + if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES) + set(_list_sep \";\") + endif() diff --git a/mingw-w64-qt5/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch b/mingw-w64-qt5/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch new file mode 100644 index 0000000000..0ee3e6be77 --- /dev/null +++ b/mingw-w64-qt5/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch @@ -0,0 +1,12 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtwebengine/tools/qmake/mkspecs/features/functions.prf qt-everywhere-opensource-src-5.5.0/qtwebengine/tools/qmake/mkspecs/features/functions.prf +--- qt-everywhere-opensource-src-5.5.0.orig/qtwebengine/tools/qmake/mkspecs/features/functions.prf 2015-08-26 14:34:22.019269600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtwebengine/tools/qmake/mkspecs/features/functions.prf 2015-08-26 15:34:44.547516900 +0100 +@@ -14,7 +14,7 @@ + + linux-g++*:!isGCCVersionSupported(): return(false) + !isPythonVersionSupported(): return(false) +- linux-g++*|win32-msvc2013|macx-clang: return(true) ++ linux-g++*|win32-*|macx-clang: return(true) + boot2qt: return(true) + + skipBuild("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.") diff --git a/mingw-w64-qt5/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch b/mingw-w64-qt5/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch new file mode 100644 index 0000000000..c0bdc21da3 --- /dev/null +++ b/mingw-w64-qt5/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch @@ -0,0 +1,8 @@ +--- qt-everywhere-opensource-src-5.4.1/qttools/src/assistant/qcollectiongenerator/qcollectiongenerator.pro.orig 2015-03-26 21:59:29.662519600 +0000 ++++ qt-everywhere-opensource-src-5.4.1/qttools/src/assistant/qcollectiongenerator/qcollectiongenerator.pro 2015-03-26 21:59:33.804756600 +0000 +@@ -1,4 +1,5 @@ + QT += network help-private ++QTPLUGIN.platforms = qminimal + TARGET = qcollectiongenerator + SOURCES += ../shared/helpgenerator.cpp \ + main.cpp \ diff --git a/mingw-w64-qt5/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch b/mingw-w64-qt5/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch new file mode 100644 index 0000000000..29810630d3 --- /dev/null +++ b/mingw-w64-qt5/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch @@ -0,0 +1,123 @@ +From 1d9aff66270aba6d16077f460aa85fbf161aba99 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Tue, 17 Jan 2012 14:21:05 +0100 +Subject: [PATCH] Revert "Revert "fix NTFS mount points"" + +This reverts commit 49d1b068987d0895b2429b3d87beb561d9fbcbd7 + +Because of https://github.com/msys2/msys2.github.io/issues/4 + +.. bringing back: + +fix NTFS mount points + +NTFS mount points are not treated as symlinks, because they might +not have a link target. +This is the case when a volume is mounted as a single mount point +without a drive letter. +This patch fixes building Qt in an NTFS mount point. + +Task-number: QTBUG-20431 +Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a +Reviewed-by: Thomas Hartmann +--- + src/corelib/io/qfilesystemengine_win.cpp | 10 ++++++---- + src/corelib/io/qfilesystemiterator_win.cpp | 2 +- + src/corelib/io/qfilesystemmetadata_p.h | 23 +++++++++++++++++------ + 3 files changed, 24 insertions(+), 11 deletions(-) + +diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp +index 221cea3..fa56d7c 100644 +--- a/src/corelib/io/qfilesystemengine_win.cpp ++++ b/src/corelib/io/qfilesystemengine_win.cpp +@@ -914,9 +914,10 @@ static bool tryFindFallback(const QFileSystemEntry &fname, QFileSystemMetaData & + int errorCode = GetLastError(); + if (errorCode == ERROR_ACCESS_DENIED || errorCode == ERROR_SHARING_VIOLATION) { + WIN32_FIND_DATA findData; +- if (getFindData(fname.nativeFilePath(), findData) ++ const QString nativeFilePath = fname.nativeFilePath(); ++ if (getFindData(nativeFilePath, findData) + && findData.dwFileAttributes != INVALID_FILE_ATTRIBUTES) { +- data.fillFromFindData(findData, true, fname.isDriveRoot()); ++ data.fillFromFindData(findData, true, fname.isDriveRoot(), nativeFilePath); + filledData = true; + } + } +@@ -1031,8 +1032,9 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM + data.knownFlagsMask |= QFileSystemMetaData::LinkType; + if (data.fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { + WIN32_FIND_DATA findData; +- if (getFindData(fname.nativeFilePath(), findData)) +- data.fillFromFindData(findData, true); ++ const QString nativeFilePath = fname.nativeFilePath(); ++ if (getFindData(nativeFilePath, findData)) ++ data.fillFromFindData(findData, true, false, nativeFilePath); + } + } + data.knownFlagsMask |= what; +diff --git a/src/corelib/io/qfilesystemiterator_win.cpp b/src/corelib/io/qfilesystemiterator_win.cpp +index 6351a35..6fa22ef 100644 +--- a/src/corelib/io/qfilesystemiterator_win.cpp ++++ b/src/corelib/io/qfilesystemiterator_win.cpp +@@ -138,7 +138,7 @@ bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaDa + fileEntry = QFileSystemEntry(dirPath + fileName); + metaData = QFileSystemMetaData(); + if (!fileName.endsWith(QLatin1String(".lnk"))) { +- metaData.fillFromFindData(findData, true); ++ metaData.fillFromFindData(findData, true, false, fileEntry.nativeFilePath()); + } + return true; + } +diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h +index da9576b..266111e 100644 +--- a/src/corelib/io/qfilesystemmetadata_p.h ++++ b/src/corelib/io/qfilesystemmetadata_p.h +@@ -211,7 +211,7 @@ public: + + #if defined(Q_OS_WIN) + inline void fillFromFileAttribute(DWORD fileAttribute, bool isDriveRoot = false); +- inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false); ++ inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false, const QString &nativeFullFilePath = QString()); + # ifndef Q_OS_WINRT + inline void fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo); + # endif +@@ -308,7 +308,7 @@ inline void QFileSystemMetaData::fillFromFileAttribute(DWORD fileAttribute,bool + knownFlagsMask |= FileType | DirectoryType | HiddenAttribute | ExistsAttribute; + } + +-inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot) ++inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot, const QString &nativeFullFilePath) + { + fillFromFileAttribute(findData.dwFileAttributes, isDriveRoot); + creationTime_ = findData.ftCreationTime; +@@ -326,12 +326,23 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo + knownFlagsMask |= LinkType; + entryFlags &= ~LinkType; + #if !defined(Q_OS_WINCE) +- if ((fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) +- && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) { +- entryFlags |= LinkType; ++ if (fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { ++ if (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK) { ++ entryFlags |= LinkType; ++ } else if (findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) { ++ // Junctions and mount points are implemented as NTFS reparse points. ++ // But mount points cannot be treated as symlinks because they might ++ // not have a link target. ++ wchar_t buf[50]; ++ QString path = nativeFullFilePath; ++ if (!path.endsWith(QLatin1Char('\\'))) ++ path.append(QLatin1Char('\\')); ++ BOOL isMountPoint = GetVolumeNameForVolumeMountPoint(reinterpret_cast(path.utf16()), buf, sizeof(buf) / sizeof(wchar_t)); ++ if (!isMountPoint) ++ entryFlags |= LinkType; ++ } + } + #endif +- + } + } + +-- +2.3.4 + diff --git a/mingw-w64-qt5/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch b/mingw-w64-qt5/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch new file mode 100644 index 0000000000..a822acb72e --- /dev/null +++ b/mingw-w64-qt5/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch @@ -0,0 +1,152 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/configureapp.cpp qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/configureapp.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/configureapp.cpp 2015-08-26 14:29:09.999124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/configureapp.cpp 2015-08-26 15:41:02.749516900 +0100 +@@ -3448,6 +3448,9 @@ + // FIXME: add detection + configStream << " QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; + configStream << " QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; ++ } else { ++ configStream << " QMAKE_DEFAULT_LIBDIRS = " << Environment::detectCompilerDefaultLibDirs() << endl; ++ configStream << " QMAKE_DEFAULT_INCDIRS = " << Environment::detectCompilerDefaultIncDirs() << endl; + } + configStream << "}" << endl; + configStream << "QT_CONFIG += " << qtConfig.join(' ') << endl; +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.cpp qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.cpp 2015-08-26 14:29:10.004624600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.cpp 2015-08-26 15:41:02.742516900 +0100 +@@ -40,6 +40,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -249,6 +251,112 @@ + #endif + }; + ++/* Returns the exit-code. */ ++int Environment::compileSomething(const QString &flags, const QString &code, QString &stdOut, QString &stdErr) ++{ ++ CompilerInfo *info = compilerInfo(detectCompiler()); ++ int returnCode = 1; ++ if (info) { ++ QTemporaryFile tmpIn("conftestXXXXXX.cpp"); ++ QString tmpOutFileName; ++ { ++ QTemporaryFile tmpOut("conftestXXXXXX.o"); ++ tmpOut.open(); ++ tmpOut.close(); ++ tmpOutFileName = tmpOut.fileName(); ++ } ++ QString tmpStdErrFileName; ++ { ++ QTemporaryFile tmpStdErr("conftestXXXXXX.stderr"); ++ tmpStdErr.open(); ++ tmpStdErr.close(); ++ tmpStdErrFileName = tmpStdErr.fileName(); ++ } ++ if (tmpIn.open()) { ++ tmpIn.write(code.toUtf8()); ++ tmpIn.close(); ++ QString cmd = info->executable + QString(" ") + flags ++ + QString(" -o ") + tmpOutFileName ++ + QString(" ") + tmpIn.fileName() + " 2>" + tmpStdErrFileName; ++ stdOut = Environment::execute(cmd, &returnCode); ++ QFile tmpStdErr(tmpStdErrFileName); ++ if (tmpStdErr.open(QIODevice::ReadOnly | QIODevice::Text)) { ++ stdErr = tmpStdErr.readAll(); ++ tmpStdErr.close(); ++ tmpStdErr.remove(); ++ } ++ QFile::remove(tmpOutFileName); ++ } ++ } ++ return returnCode; ++} ++ ++QString Environment::detectCompilerDefaultIncDirs() ++{ ++ QString stdOut; ++ QString stdErr; ++ int returnCode = Environment::compileSomething("-v ", "", stdOut, stdErr); ++ QStringList result; ++ int index = stdErr.indexOf("<...>"); ++ if (index != -1) { ++ index = stdErr.indexOf("\n", index); ++ int lastIndex = index; ++ while (lastIndex != -1) { ++ if (stdErr[lastIndex + 1] != ' ') ++ break; ++ lastIndex += 2; ++ index = stdErr.indexOf("\n", lastIndex + 1); ++ if (index != -1) { ++ const QString newPath(QDir::cleanPath(stdErr.mid(lastIndex, index - lastIndex))); ++ if (result.indexOf(newPath) == -1) ++ result.append(newPath); ++ } ++ lastIndex = index; ++ } ++ } ++ Q_UNUSED(returnCode); ++ QString resultString; ++ for (int i = 0; i < result.count(); ++i) { ++ resultString.append(result[i]); ++ if ( i != result.count() - 1) ++ resultString.append(" "); ++ } ++ return resultString; ++} ++ ++QString Environment::detectCompilerDefaultLibDirs() ++{ ++ QString stdOut; ++ QString stdErr; ++ int returnCode = Environment::compileSomething("-v ", "", stdOut, stdErr); ++ QStringList result; ++ int index = stdErr.indexOf("LIBRARY_PATH"); ++ if (index != -1) { ++ index += strlen("LIBRARY_PATH"); ++ int lastIndex = index; ++ while (lastIndex != -1) { ++ if (stdErr[lastIndex + 1] == '\n') ++ break; ++ index = stdErr.indexOf(";", lastIndex + 1); ++ if (index != -1) { ++ const QString newPath(QDir::cleanPath(stdErr.mid(lastIndex + 1, index - lastIndex - 1))); ++ if (result.indexOf(newPath) == -1) ++ result.append(newPath); ++ } ++ lastIndex = index; ++ } ++ } ++ Q_UNUSED(returnCode); ++ QString resultString; ++ for (int i = 0; i < result.count(); ++i) { ++ resultString.append(result[i]); ++ if ( i != result.count() - 1) ++ resultString.append(" "); ++ } ++ return resultString; ++} ++ ++ + /*! + Creates a commandling from \a program and it \a arguments, + escaping characters that needs it. +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.h qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.h +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.h 2015-08-26 14:29:10.018624600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.h 2015-08-26 15:41:02.735516900 +0100 +@@ -58,6 +58,10 @@ + static Compiler compilerFromQMakeSpec(const QString &qmakeSpec); + static QString gccVersion(); + ++ static int compileSomething(const QString &flags, const QString &code, QString &stdOut, QString &stdErr); ++ static QString detectCompilerDefaultIncDirs(); ++ static QString detectCompilerDefaultLibDirs(); ++ + static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv); + static QString execute(const QString &command, int *returnCode = 0); + static bool cpdir(const QString &srcDir, const QString &destDir); diff --git a/mingw-w64-qt5/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch b/mingw-w64-qt5/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch new file mode 100644 index 0000000000..7c6e68ebe4 --- /dev/null +++ b/mingw-w64-qt5/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch @@ -0,0 +1,75 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qmessagebox.cpp qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qmessagebox.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qmessagebox.cpp 2015-08-26 14:28:59.145124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qmessagebox.cpp 2015-08-26 15:46:50.092516900 +0100 +@@ -68,9 +68,11 @@ + #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) + HMENU qt_getWindowsSystemMenu(const QWidget *w) + { +- if (QWindow *window = QApplicationPrivate::windowForWidget(w)) +- if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)) +- return GetSystemMenu(reinterpret_cast(handle), false); ++ if (QGuiApplication::platformNativeInterface()) { ++ if (QWindow *window = QApplicationPrivate::windowForWidget(w)) ++ if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)) ++ return GetSystemMenu(reinterpret_cast(handle), false); ++ } + return 0; + } + #endif +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qwizard_win.cpp qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qwizard_win.cpp +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/dialogs/qwizard_win.cpp 2015-08-26 14:28:59.139624600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/dialogs/qwizard_win.cpp 2015-08-26 15:46:50.084516900 +0100 +@@ -288,10 +288,11 @@ + // The dynamic property takes effect when creating the platform window. + window->setProperty("_q_windowsCustomMargins", customMarginsV); + // If a platform window exists, change via native interface. +- if (QPlatformWindow *platformWindow = window->handle()) { +- QGuiApplication::platformNativeInterface()-> +- setWindowProperty(platformWindow, QStringLiteral("WindowsCustomMargins"), +- customMarginsV); ++ if (QGuiApplication::platformNativeInterface()) { ++ if (QPlatformWindow *platformWindow = window->handle()) ++ QGuiApplication::platformNativeInterface()-> ++ setWindowProperty(platformWindow, QStringLiteral("WindowsCustomMargins"), ++ customMarginsV); + } + } + } +@@ -685,6 +686,8 @@ + // wizard is a child window. + HDC QVistaHelper::backingStoreDC(const QWidget *wizard, QPoint *offset) + { ++ if (!QGuiApplication::platformNativeInterface()) ++ return static_cast(0); + HDC hdc = static_cast(QGuiApplication::platformNativeInterface()->nativeResourceForBackingStore(QByteArrayLiteral("getDC"), wizard->backingStore())); + *offset = QPoint(0, 0); + if (!wizard->windowHandle()) +@@ -699,7 +702,7 @@ + // Do not use winId() as this enforces native children of the parent + // widget when called before show() as happens when calling setWizardStyle(). + if (QWindow *window = wizard->windowHandle()) +- if (window->handle()) ++ if (window->handle() && QGuiApplication::platformNativeInterface()) + if (void *vHwnd = QGuiApplication::platformNativeInterface()->nativeResourceForWindow(QByteArrayLiteral("handle"), window)) + return static_cast(vHwnd); + qWarning().nospace() << "Failed to obtain HWND for wizard."; +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/kernel/qapplication_p.h qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/kernel/qapplication_p.h +--- qt-everywhere-opensource-src-5.5.0.orig/qtbase/src/widgets/kernel/qapplication_p.h 2015-08-26 14:28:59.349124600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtbase/src/widgets/kernel/qapplication_p.h 2015-08-26 15:46:50.098516900 +0100 +@@ -254,10 +254,12 @@ + #ifdef Q_OS_WIN + static HWND getHWNDForWidget(const QWidget *widget) + { +- if (QWindow *window = windowForWidget(widget)) +- if (window->handle()) +- return static_cast (QGuiApplication::platformNativeInterface()-> +- nativeResourceForWindow(QByteArrayLiteral("handle"), window)); ++ if (QGuiApplication::platformNativeInterface()) { ++ if (QWindow *window = windowForWidget(widget)) ++ if (window->handle()) ++ return static_cast (QGuiApplication::platformNativeInterface()-> ++ nativeResourceForWindow(QByteArrayLiteral("handle"), window)); ++ } + return 0; + } + #endif diff --git a/mingw-w64-qt5/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch b/mingw-w64-qt5/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch new file mode 100644 index 0000000000..b0f7be5757 --- /dev/null +++ b/mingw-w64-qt5/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch @@ -0,0 +1,11 @@ +--- qtbase/configure.orig 2015-08-25 12:42:05.631715900 +0100 ++++ qtbase/configure 2015-08-26 13:57:02.447124600 +0100 +@@ -4462,7 +4462,7 @@ + if compileTest unix/ipc_posix "ipc_posix" ; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" + else +- if [ "$XPLATFORM_ANDROID" = "no" ] ; then ++ if [ "$XPLATFORM_ANDROID" = "no" -a "$XPLATFORM_MINGW" = "no" ] ; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY" + fi + fi diff --git a/mingw-w64-qt5/0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch b/mingw-w64-qt5/0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch new file mode 100644 index 0000000000..87abbee588 --- /dev/null +++ b/mingw-w64-qt5/0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch @@ -0,0 +1,40 @@ +From c4f22ef225f6e4c2f1943da620a0dc6fff6296cb Mon Sep 17 00:00:00 2001 +From: Oswald Buddenhagen +Date: Tue, 13 Oct 2015 17:09:33 +0200 +Subject: [PATCH] fix the trailing-backslash-in-DESTDIR-on-mingw workaround + +at least the mingw version we use now interprets the sequence \# as a +literal hashmark, which completely defeats the previous hack. + +the new hack escapes the backslash with another backslash, which appears +to work. however, make does *not* remove the additional backslash, so +the result is a bit ugly. + +Change-Id: I591a2be443880b162094d04e5a5e624216b59311 +--- + qmake/generators/unix/unixmake2.cpp | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp +index d0cd5d2..9db64be 100644 +--- a/qmake/generators/unix/unixmake2.cpp ++++ b/qmake/generators/unix/unixmake2.cpp +@@ -269,11 +269,13 @@ + t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " " + << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl; + t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; +- // The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes +- // would be interpreted as line continuation. The lack of spacing between the value and the +- // comment is also important as otherwise quoted use of "$(DESTDIR)" would include this +- // spacing. +- t << "DESTDIR = " << fileVar("DESTDIR") << "#avoid trailing-slash linebreak\n"; ++ QString destd = fileVar("DESTDIR"); ++ // When building on non-MSys MinGW, the path ends with a backslash, which ++ // GNU make will interpret that as a line continuation. Doubling the backslash ++ // avoids the problem, at the cost of the variable containing *both* backslashes. ++ if (destd.endsWith('\\')) ++ destd += '\\'; ++ t << "DESTDIR = " << destd << endl; + if(project->isActiveConfig("compile_libtool")) + t << "TARGETL = " << fileVar("TARGET_la") << endl; + t << "TARGET = " << fileVar("TARGET") << endl; // ### mixed use! diff --git a/mingw-w64-qt5/0051-qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch b/mingw-w64-qt5/0051-qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch new file mode 100644 index 0000000000..75489c1cba --- /dev/null +++ b/mingw-w64-qt5/0051-qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch @@ -0,0 +1,21 @@ +--- a/qtwebkit/Source/WebKit/qt/Api/qwebkitglobal.h 2013-01-06 19:14:49.225087412 +0100 ++++ b/qtwebkit/Source/WebKit/qt/Api/qwebkitglobal.h 2013-01-06 19:15:02.498182976 +0100 +@@ -24,7 +24,6 @@ + #include + #include + +-#ifndef QT_STATIC + # if !defined(QT_BUILD_WEBKITWIDGETS_LIB) && defined(BUILDING_WEBKIT) + # define QWEBKIT_EXPORT Q_DECL_EXPORT + # else +@@ -37,10 +36,6 @@ + # else + # define QWEBKITWIDGETS_EXPORT Q_DECL_IMPORT + # endif +-#else +-# define QWEBKITWIDGETS_EXPORT +-# define QWEBKIT_EXPORT +-#endif + + QWEBKIT_EXPORT QString qWebKitVersion(); + QWEBKIT_EXPORT int qWebKitMajorVersion(); diff --git a/mingw-w64-qt5/0120-qt5-qtwebkit-use-correct-icu-libs.patch b/mingw-w64-qt5/0120-qt5-qtwebkit-use-correct-icu-libs.patch new file mode 100644 index 0000000000..1667177330 --- /dev/null +++ b/mingw-w64-qt5/0120-qt5-qtwebkit-use-correct-icu-libs.patch @@ -0,0 +1,11 @@ +--- a/qtwebkit/Source/WTF/WTF.pri 2015-03-23 19:21:26.013831236 +0100 ++++ b/qtwebkit/Source/WTF/WTF.pri 2015-03-23 19:22:46.668582720 +0100 +@@ -14,7 +14,7 @@ + INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH + LIBS += -licucore + } else:!use?(wchar_unicode): { +- win32 { ++ win32:!mingw { + CONFIG(static, static|shared) { + CONFIG(debug, debug|release) { + LIBS += -lsicuind -lsicuucd -lsicudtd diff --git a/mingw-w64-qt5/0121-qt5-qtwebkit-dont-depend-on-icu.patch b/mingw-w64-qt5/0121-qt5-qtwebkit-dont-depend-on-icu.patch new file mode 100644 index 0000000000..1c7a65e92f --- /dev/null +++ b/mingw-w64-qt5/0121-qt5-qtwebkit-dont-depend-on-icu.patch @@ -0,0 +1,267 @@ +--- a/qtwebkit/Tools/qmake/mkspecs/features/configure.prf.orig 2013-01-04 18:56:36.785550268 +0100 ++++ b/qtwebkit/Tools/qmake/mkspecs/features/configure.prf 2013-01-04 18:58:20.047373664 +0100 +@@ -120,9 +120,9 @@ + } + + # Sanity checks that would prevent us from building the whole project altogether. +- !android:!mac:!config_icu { +- addReasonForSkippingBuild("ICU is required.") +- } ++# !android:!mac:!config_icu { ++# addReasonForSkippingBuild("ICU is required.") ++# } + production_build:blackberry { + addReasonForSkippingBuild("Build not supported on BB10 yet.") + } +--- a/qtwebkit/Source/WTF/wtf/Platform.h.orig 2013-01-04 19:28:53.735934784 +0100 ++++ b/qtwebkit/Source/WTF/wtf/Platform.h 2013-01-04 19:28:13.856641177 +0100 +@@ -580,9 +580,13 @@ + # define WTF_USE_WCHAR_UNICODE 1 + #endif + ++#if OS(WINDOWS) && PLATFORM(QT) ++#define WTF_USE_QT4_UNICODE 1 ++#else + #if !USE(WCHAR_UNICODE) + #define WTF_USE_ICU_UNICODE 1 + #endif ++#endif + + #if PLATFORM(MAC) && !PLATFORM(IOS) + #if CPU(X86_64) +--- a/qtwebkit/Source/WebCore/platform/text/TextAllInOne.cpp.orig 2013-01-04 21:55:38.574265749 +0100 ++++ b/qtwebkit/Source/WebCore/platform/text/TextAllInOne.cpp 2013-01-04 20:51:54.156245445 +0100 +@@ -27,7 +27,11 @@ + + #include "TextBoundaries.cpp" + #include "TextBreakIterator.cpp" ++#if USE(QT4_UNICODE) ++#include "TextBreakIteratorQt.cpp" ++#else + #include "TextBreakIteratorICU.cpp" ++#endif + #include "TextCodec.cpp" + #include "TextCodecICU.cpp" + #include "TextCodecLatin1.cpp" +@@ -35,6 +39,10 @@ + #include "TextCodecUTF8.cpp" + #include "TextCodecUserDefined.cpp" + #include "TextEncoding.cpp" ++#if USE(QT4_UNICODE) ++#include "TextEncodingDetectorNone.cpp" ++#else + #include "TextEncodingDetectorICU.cpp" ++#endif + #include "TextEncodingRegistry.cpp" + #include "TextStream.cpp" +--- /dev/null 2012-12-26 00:21:52.105366365 +0100 ++++ b/qtwebkit/Source/WebCore/platform/text/TextBreakIteratorQt.cpp 2012-05-31 00:58:54.000000000 +0200 +@@ -0,0 +1,175 @@ ++/* ++ * Copyright (C) 2006 Lars Knoll ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public License ++ * along with this library; see the file COPYING.LIB. If not, write to ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ * ++ */ ++ ++#include "config.h" ++#include "TextBreakIterator.h" ++ ++#include ++#include ++#include ++#include ++ ++// #define DEBUG_TEXT_ITERATORS ++#ifdef DEBUG_TEXT_ITERATORS ++#define DEBUG qDebug ++#else ++#define DEBUG if (1) {} else qDebug ++#endif ++ ++using namespace WTF; ++using namespace std; ++ ++namespace WebCore { ++ ++ class TextBreakIterator : public QTextBoundaryFinder { ++ public: ++ TextBreakIterator(QTextBoundaryFinder::BoundaryType type, const QString& string) ++ : QTextBoundaryFinder(type, string) ++ { } ++ TextBreakIterator() ++ : QTextBoundaryFinder() ++ { } ++ }; ++ ++ TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* characters, int length) ++ { ++ if (!characters || !length) ++ return 0; ++ ++ if (iterator.isValid() && type == iterator.type() && iterator.string() == QString::fromRawData(reinterpret_cast(characters), length)) { ++ iterator.toStart(); ++ return &iterator; ++ } ++ ++ iterator = TextBreakIterator(type, QString(reinterpret_cast(characters), length)); ++ return &iterator; ++ } ++ ++ TextBreakIterator* wordBreakIterator(const UChar* string, int length) ++ { ++ static TextBreakIterator staticWordBreakIterator; ++ return setUpIterator(staticWordBreakIterator, QTextBoundaryFinder::Word, string, length); ++ } ++ ++ static TextBreakIterator* nonSharedCharacterBreakIterator; ++ ++ NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator(const UChar* buffer, int length) ++ { ++ m_iterator = nonSharedCharacterBreakIterator; ++ bool createdIterator = m_iterator && weakCompareAndSwap(reinterpret_cast(&nonSharedCharacterBreakIterator), m_iterator, 0); ++ if (!createdIterator) ++ m_iterator = new TextBreakIterator(); ++ if (!setUpIterator(*m_iterator, QTextBoundaryFinder::Grapheme, buffer, length)) { ++ delete m_iterator; ++ m_iterator = 0; ++ } ++ } ++ ++ NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator() ++ { ++ if (!weakCompareAndSwap(reinterpret_cast(&nonSharedCharacterBreakIterator), 0, m_iterator)) ++ delete m_iterator; ++ } ++ ++ TextBreakIterator* cursorMovementIterator(const UChar* string, int length) ++ { ++ static TextBreakIterator staticCursorMovementIterator; ++ return setUpIterator(staticCursorMovementIterator, QTextBoundaryFinder::Grapheme, string, length); ++ } ++ ++ static TextBreakIterator* staticLineBreakIterator; ++ ++ TextBreakIterator* acquireLineBreakIterator(const UChar* string, int length, const AtomicString&) ++ { ++ TextBreakIterator* lineBreakIterator = 0; ++ if (staticLineBreakIterator) { ++ setUpIterator(*staticLineBreakIterator, QTextBoundaryFinder::Line, string, length); ++ std::swap(staticLineBreakIterator, lineBreakIterator); ++ } ++ ++ if (!lineBreakIterator && string && length) ++ lineBreakIterator = new TextBreakIterator(QTextBoundaryFinder::Line, QString(reinterpret_cast(string), length)); ++ ++ return lineBreakIterator; ++ } ++ ++ void releaseLineBreakIterator(TextBreakIterator* iterator) ++ { ++ ASSERT(iterator); ++ ++ if (!staticLineBreakIterator) ++ staticLineBreakIterator = iterator; ++ else ++ delete iterator; ++ } ++ ++ TextBreakIterator* sentenceBreakIterator(const UChar* string, int length) ++ { ++ static TextBreakIterator staticSentenceBreakIterator; ++ return setUpIterator(staticSentenceBreakIterator, QTextBoundaryFinder::Sentence, string, length); ++ ++ } ++ ++ int textBreakFirst(TextBreakIterator* bi) ++ { ++ bi->toStart(); ++ DEBUG() << "textBreakFirst" << bi->position(); ++ return bi->position(); ++ } ++ ++ int textBreakNext(TextBreakIterator* bi) ++ { ++ int pos = bi->toNextBoundary(); ++ DEBUG() << "textBreakNext" << pos; ++ return pos; ++ } ++ ++ int textBreakPreceding(TextBreakIterator* bi, int pos) ++ { ++ bi->setPosition(pos); ++ int newpos = bi->toPreviousBoundary(); ++ DEBUG() << "textBreakPreceding" << pos << newpos; ++ return newpos; ++ } ++ ++ int textBreakFollowing(TextBreakIterator* bi, int pos) ++ { ++ bi->setPosition(pos); ++ int newpos = bi->toNextBoundary(); ++ DEBUG() << "textBreakFollowing" << pos << newpos; ++ return newpos; ++ } ++ ++ int textBreakCurrent(TextBreakIterator* bi) ++ { ++ return bi->position(); ++ } ++ ++ bool isTextBreak(TextBreakIterator*, int) ++ { ++ return true; ++ } ++ ++ bool isWordTextBreak(TextBreakIterator*) ++ { ++ return true; ++ } ++ ++} +--- a/qtwebkit/Source/WebCore/platform/ThreadGlobalData.cpp ++++ b/qtwebkit/Source/WebCore/platform/ThreadGlobalData.cpp +@@ -37,6 +37,8 @@ + + #if USE(ICU_UNICODE) + #include "TextCodecICU.h" ++#elif USE(QT4_UNICODE) ++#include "qt/TextCodecQt.h" + #endif + + #if PLATFORM(MAC) +--- a/qtwebkit/Source/WebCore/platform/text/TextBreakIteratorQt.cpp.orig 2013-12-04 00:08:41.281004481 +0100 ++++ b/qtwebkit/Source/WebCore/platform/text/TextBreakIteratorQt.cpp 2013-12-04 00:07:52.878531508 +0100 +@@ -96,7 +96,7 @@ + + static TextBreakIterator* staticLineBreakIterator; + +- TextBreakIterator* acquireLineBreakIterator(const UChar* string, int length, const AtomicString&) ++ TextBreakIterator* acquireLineBreakIterator(const UChar* string, int length, const AtomicString&, const UChar* priorContext, unsigned priorContextLength) + { + TextBreakIterator* lineBreakIterator = 0; + if (staticLineBreakIterator) { +--- a/qtwebkit/Tools/qmake/mkspecs/features/features.prf.orig 2014-12-29 23:30:47.372582743 +0100 ++++ b/qtwebkit/Tools/qmake/mkspecs/features/features.prf 2014-12-29 23:31:08.021797817 +0100 +@@ -142,7 +142,7 @@ + # IndexedDB requires leveldb + enable?(indexed_database): WEBKIT_CONFIG += use_leveldb + +- !config_icu:!mac: WEBKIT_CONFIG += use_wchar_unicode ++# !config_icu:!mac: WEBKIT_CONFIG += use_wchar_unicode + + export(WEBKIT_CONFIG) + export(CONFIGURE_WARNINGS) diff --git a/mingw-w64-qt5/0122-revert-qt4-unicode-removal.patch b/mingw-w64-qt5/0122-revert-qt4-unicode-removal.patch new file mode 100644 index 0000000000..fc45b6b56c --- /dev/null +++ b/mingw-w64-qt5/0122-revert-qt4-unicode-removal.patch @@ -0,0 +1,808 @@ +From 92b3cd3b0d01ca2f03e184cb16b75b31ab9a3ee6 Mon Sep 17 00:00:00 2001 +From: hausmann@webkit.org +Date: Wed, 30 Jan 2013 12:27:34 +0000 +Subject: [PATCH] [Qt] Remove QT4_UNICODE related code paths + https://bugs.webkit.org/show_bug.cgi?id=108316 + +Reviewed by Kenneth Rohde Christiansen. + +Source/WebCore: + +Get rid of QT4_UNICODE and any related code paths. The Qt port +requires Qt5 and ICU these days. This also allows for the removal +of TextCodecQt. + +* Target.pri: +* platform/KURL.cpp: +(WebCore::appendEncodedHostname): +* platform/graphics/SurrogatePairAwareTextIterator.cpp: +(WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks): +* platform/text/TextEncoding.cpp: +(WebCore::TextEncoding::encode): +* platform/text/TextEncodingRegistry.cpp: +(WebCore::extendTextCodecMaps): +* platform/text/qt/TextCodecQt.cpp: Removed. +* platform/text/qt/TextCodecQt.h: Removed. + +Source/WebKit/blackberry: + +* WebCoreSupport/AboutDataUseFeatures.in: The feature macro has been removed. + +Source/WTF: + +Get rid of QT4_UNICODE and any related code paths. The Qt port +requires Qt5 and ICU these days. + +* WTF.gypi: +* WTF.pro: +* wtf/unicode/Unicode.h: +* wtf/unicode/qt4/UnicodeQt4.h: Removed. + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141255 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Source/WTF/ChangeLog | 15 + + Source/WTF/WTF.gypi | 1 - + Source/WTF/WTF.pro | 1 - + Source/WTF/wtf/unicode/Unicode.h | 4 +- + Source/WTF/wtf/unicode/qt4/UnicodeQt4.h | 377 -------------------- + Source/WebCore/ChangeLog | 23 ++ + Source/WebCore/Target.pri | 2 - + Source/WebCore/platform/KURL.cpp | 5 - + .../graphics/SurrogatePairAwareTextIterator.cpp | 5 - + Source/WebCore/platform/text/TextEncoding.cpp | 6 - + .../WebCore/platform/text/TextEncodingRegistry.cpp | 8 - + Source/WebCore/platform/text/qt/TextCodecQt.cpp | 160 --------- + Source/WebCore/platform/text/qt/TextCodecQt.h | 54 --- + Source/WebKit/blackberry/ChangeLog | 9 + + .../WebCoreSupport/AboutDataUseFeatures.in | 1 - + 15 files changed, 48 insertions(+), 623 deletions(-) + delete mode 100644 Source/WTF/wtf/unicode/qt4/UnicodeQt4.h + delete mode 100644 Source/WebCore/platform/text/qt/TextCodecQt.cpp + delete mode 100644 Source/WebCore/platform/text/qt/TextCodecQt.h + +diff --git a/Source/WTF/WTF.pro b/Source/WTF/WTF.pro +index c929c68..727d78b 100644 +--- a/Source/WTF/WTF.pro ++++ b/Source/WTF/WTF.pro +@@ -178,7 +178,6 @@ HEADERS += \ + unicode/CharacterNames.h \ + unicode/Collator.h \ + unicode/icu/UnicodeIcu.h \ +- unicode/qt4/UnicodeQt4.h \ + unicode/ScriptCodesFromICU.h \ + unicode/Unicode.h \ + unicode/UnicodeMacrosFromICU.h \ +diff --git a/Source/WTF/wtf/unicode/Unicode.h b/Source/WTF/wtf/unicode/Unicode.h +index 9260211..11fee6b 100644 +--- a/Source/WTF/wtf/unicode/Unicode.h ++++ b/Source/WTF/wtf/unicode/Unicode.h +@@ -30,8 +30,6 @@ + + #if USE(ICU_UNICODE) + #include +-#elif USE(QT4_UNICODE) +-#include "qt4/UnicodeQt4.h" + #elif USE(WCHAR_UNICODE) + #include + #else +diff --git a/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h b/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h +deleted file mode 100644 +index a2d1ad4..0000000 +--- a/Source/WTF/wtf/unicode/qt4/UnicodeQt4.h ++++ /dev/null +@@ -1,377 +0,0 @@ +-/* +- * Copyright (C) 2006 George Staikos +- * Copyright (C) 2006 Alexey Proskuryakov +- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Library General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public License +- * along with this library; see the file COPYING.LIB. If not, write to +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02110-1301, USA. +- * +- */ +- +-#ifndef WTF_UNICODE_QT4_H +-#define WTF_UNICODE_QT4_H +- +-#include +-#include +- +-#include +-#include +- +-#include +- +-#include +-#if USE(ICU_UNICODE) +-#include +-#endif +- +-QT_BEGIN_NAMESPACE +-namespace QUnicodeTables { +- struct Properties { +- ushort category : 8; +- ushort line_break_class : 8; +- ushort direction : 8; +- ushort combiningClass :8; +- ushort joining : 2; +- signed short digitValue : 6; /* 5 needed */ +- ushort unicodeVersion : 4; +- ushort lowerCaseSpecial : 1; +- ushort upperCaseSpecial : 1; +- ushort titleCaseSpecial : 1; +- ushort caseFoldSpecial : 1; /* currently unused */ +- signed short mirrorDiff : 16; +- signed short lowerCaseDiff : 16; +- signed short upperCaseDiff : 16; +- signed short titleCaseDiff : 16; +- signed short caseFoldDiff : 16; +- }; +- Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4); +- Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2); +-} +-QT_END_NAMESPACE +- +-// ugly hack to make UChar compatible with JSChar in API/JSStringRef.h +-#if defined(Q_OS_WIN) || (COMPILER(RVCT) && !OS(LINUX)) +-typedef wchar_t UChar; +-#else +-typedef uint16_t UChar; +-#endif +- +-#if !USE(ICU_UNICODE) +-typedef uint32_t UChar32; +-#endif +- +-namespace WTF { +-namespace Unicode { +- +-enum Direction { +- LeftToRight = QChar::DirL, +- RightToLeft = QChar::DirR, +- EuropeanNumber = QChar::DirEN, +- EuropeanNumberSeparator = QChar::DirES, +- EuropeanNumberTerminator = QChar::DirET, +- ArabicNumber = QChar::DirAN, +- CommonNumberSeparator = QChar::DirCS, +- BlockSeparator = QChar::DirB, +- SegmentSeparator = QChar::DirS, +- WhiteSpaceNeutral = QChar::DirWS, +- OtherNeutral = QChar::DirON, +- LeftToRightEmbedding = QChar::DirLRE, +- LeftToRightOverride = QChar::DirLRO, +- RightToLeftArabic = QChar::DirAL, +- RightToLeftEmbedding = QChar::DirRLE, +- RightToLeftOverride = QChar::DirRLO, +- PopDirectionalFormat = QChar::DirPDF, +- NonSpacingMark = QChar::DirNSM, +- BoundaryNeutral = QChar::DirBN +-}; +- +-enum DecompositionType { +- DecompositionNone = QChar::NoDecomposition, +- DecompositionCanonical = QChar::Canonical, +- DecompositionCompat = QChar::Compat, +- DecompositionCircle = QChar::Circle, +- DecompositionFinal = QChar::Final, +- DecompositionFont = QChar::Font, +- DecompositionFraction = QChar::Fraction, +- DecompositionInitial = QChar::Initial, +- DecompositionIsolated = QChar::Isolated, +- DecompositionMedial = QChar::Medial, +- DecompositionNarrow = QChar::Narrow, +- DecompositionNoBreak = QChar::NoBreak, +- DecompositionSmall = QChar::Small, +- DecompositionSquare = QChar::Square, +- DecompositionSub = QChar::Sub, +- DecompositionSuper = QChar::Super, +- DecompositionVertical = QChar::Vertical, +- DecompositionWide = QChar::Wide +-}; +- +-enum CharCategory { +- NoCategory = 0, +- Mark_NonSpacing = U_MASK(QChar::Mark_NonSpacing), +- Mark_SpacingCombining = U_MASK(QChar::Mark_SpacingCombining), +- Mark_Enclosing = U_MASK(QChar::Mark_Enclosing), +- Number_DecimalDigit = U_MASK(QChar::Number_DecimalDigit), +- Number_Letter = U_MASK(QChar::Number_Letter), +- Number_Other = U_MASK(QChar::Number_Other), +- Separator_Space = U_MASK(QChar::Separator_Space), +- Separator_Line = U_MASK(QChar::Separator_Line), +- Separator_Paragraph = U_MASK(QChar::Separator_Paragraph), +- Other_Control = U_MASK(QChar::Other_Control), +- Other_Format = U_MASK(QChar::Other_Format), +- Other_Surrogate = U_MASK(QChar::Other_Surrogate), +- Other_PrivateUse = U_MASK(QChar::Other_PrivateUse), +- Other_NotAssigned = U_MASK(QChar::Other_NotAssigned), +- Letter_Uppercase = U_MASK(QChar::Letter_Uppercase), +- Letter_Lowercase = U_MASK(QChar::Letter_Lowercase), +- Letter_Titlecase = U_MASK(QChar::Letter_Titlecase), +- Letter_Modifier = U_MASK(QChar::Letter_Modifier), +- Letter_Other = U_MASK(QChar::Letter_Other), +- Punctuation_Connector = U_MASK(QChar::Punctuation_Connector), +- Punctuation_Dash = U_MASK(QChar::Punctuation_Dash), +- Punctuation_Open = U_MASK(QChar::Punctuation_Open), +- Punctuation_Close = U_MASK(QChar::Punctuation_Close), +- Punctuation_InitialQuote = U_MASK(QChar::Punctuation_InitialQuote), +- Punctuation_FinalQuote = U_MASK(QChar::Punctuation_FinalQuote), +- Punctuation_Other = U_MASK(QChar::Punctuation_Other), +- Symbol_Math = U_MASK(QChar::Symbol_Math), +- Symbol_Currency = U_MASK(QChar::Symbol_Currency), +- Symbol_Modifier = U_MASK(QChar::Symbol_Modifier), +- Symbol_Other = U_MASK(QChar::Symbol_Other) +-}; +- +- +-// FIXME: handle surrogates correctly in all methods +- +-inline UChar32 toLower(UChar32 ch) +-{ +- return QChar::toLower(uint32_t(ch)); +-} +- +-inline int toLower(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error) +-{ +- const UChar *e = src + srcLength; +- const UChar *s = src; +- UChar *r = result; +- uint rindex = 0; +- +- // this avoids one out of bounds check in the loop +- if (s < e && QChar(*s).isLowSurrogate()) { +- if (r) +- r[rindex] = *s++; +- ++rindex; +- } +- +- int needed = 0; +- while (s < e && (rindex < uint(resultLength) || !r)) { +- uint c = *s; +- if (QChar(c).isLowSurrogate() && QChar(*(s - 1)).isHighSurrogate()) +- c = QChar::surrogateToUcs4(*(s - 1), c); +- const QUnicodeTables::Properties *prop = QUnicodeTables::properties(c); +- if (prop->lowerCaseSpecial) { +- QString qstring; +- if (c < 0x10000) { +- qstring += QChar(c); +- } else { +- qstring += QChar(*(s-1)); +- qstring += QChar(*s); +- } +- qstring = qstring.toLower(); +- for (int i = 0; i < qstring.length(); ++i) { +- if (rindex >= uint(resultLength)) { +- needed += qstring.length() - i; +- break; +- } +- if (r) +- r[rindex] = qstring.at(i).unicode(); +- ++rindex; +- } +- } else { +- if (r) +- r[rindex] = *s + prop->lowerCaseDiff; +- ++rindex; +- } +- ++s; +- } +- if (s < e) +- needed += e - s; +- *error = (needed != 0); +- if (rindex < uint(resultLength)) +- r[rindex] = 0; +- return rindex + needed; +-} +- +-inline UChar32 toUpper(UChar32 c) +-{ +- return QChar::toUpper(uint32_t(c)); +-} +- +-inline int toUpper(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error) +-{ +- const UChar *e = src + srcLength; +- const UChar *s = src; +- UChar *r = result; +- int rindex = 0; +- +- // this avoids one out of bounds check in the loop +- if (s < e && QChar(*s).isLowSurrogate()) { +- if (r) +- r[rindex] = *s++; +- ++rindex; +- } +- +- int needed = 0; +- while (s < e && (rindex < resultLength || !r)) { +- uint c = *s; +- if (QChar(c).isLowSurrogate() && QChar(*(s - 1)).isHighSurrogate()) +- c = QChar::surrogateToUcs4(*(s - 1), c); +- const QUnicodeTables::Properties *prop = QUnicodeTables::properties(c); +- if (prop->upperCaseSpecial) { +- QString qstring; +- if (c < 0x10000) { +- qstring += QChar(c); +- } else { +- qstring += QChar(*(s-1)); +- qstring += QChar(*s); +- } +- qstring = qstring.toUpper(); +- for (int i = 0; i < qstring.length(); ++i) { +- if (rindex >= resultLength) { +- needed += qstring.length() - i; +- break; +- } +- if (r) +- r[rindex] = qstring.at(i).unicode(); +- ++rindex; +- } +- } else { +- if (r) +- r[rindex] = *s + prop->upperCaseDiff; +- ++rindex; +- } +- ++s; +- } +- if (s < e) +- needed += e - s; +- *error = (needed != 0); +- if (rindex < resultLength) +- r[rindex] = 0; +- return rindex + needed; +-} +- +-inline int toTitleCase(UChar32 c) +-{ +- return QChar::toTitleCase(uint32_t(c)); +-} +- +-inline UChar32 foldCase(UChar32 c) +-{ +- return QChar::toCaseFolded(uint32_t(c)); +-} +- +-inline int foldCase(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error) +-{ +- // FIXME: handle special casing. Easiest with some low level API in Qt +- *error = false; +- if (resultLength < srcLength) { +- *error = true; +- return srcLength; +- } +- for (int i = 0; i < srcLength; ++i) +- result[i] = QChar::toCaseFolded(ushort(src[i])); +- return srcLength; +-} +- +-inline bool isArabicChar(UChar32 c) +-{ +- return c >= 0x0600 && c <= 0x06FF; +-} +- +-inline bool isPrintableChar(UChar32 c) +-{ +- const uint test = U_MASK(QChar::Other_Control) | +- U_MASK(QChar::Other_NotAssigned); +- return !(U_MASK(QChar::category(uint32_t(c))) & test); +-} +- +-inline bool isSeparatorSpace(UChar32 c) +-{ +- return QChar::category(uint32_t(c)) == QChar::Separator_Space; +-} +- +-inline bool isPunct(UChar32 c) +-{ +- const uint test = U_MASK(QChar::Punctuation_Connector) | +- U_MASK(QChar::Punctuation_Dash) | +- U_MASK(QChar::Punctuation_Open) | +- U_MASK(QChar::Punctuation_Close) | +- U_MASK(QChar::Punctuation_InitialQuote) | +- U_MASK(QChar::Punctuation_FinalQuote) | +- U_MASK(QChar::Punctuation_Other); +- return U_MASK(QChar::category(uint32_t(c))) & test; +-} +- +-inline bool isLower(UChar32 c) +-{ +- return QChar::category(uint32_t(c)) == QChar::Letter_Lowercase; +-} +- +-inline bool hasLineBreakingPropertyComplexContext(UChar32) +-{ +- // FIXME: Implement this to return whether the character has line breaking property SA (Complex Context). +- return false; +-} +- +-inline UChar32 mirroredChar(UChar32 c) +-{ +- return QChar::mirroredChar(uint32_t(c)); +-} +- +-inline uint8_t combiningClass(UChar32 c) +-{ +- return QChar::combiningClass(uint32_t(c)); +-} +- +-inline DecompositionType decompositionType(UChar32 c) +-{ +- return (DecompositionType)QChar::decompositionTag(c); +-} +- +-inline int umemcasecmp(const UChar* a, const UChar* b, int len) +-{ +- // handle surrogates correctly +- for (int i = 0; i < len; ++i) { +- uint c1 = QChar::toCaseFolded(ushort(a[i])); +- uint c2 = QChar::toCaseFolded(ushort(b[i])); +- if (c1 != c2) +- return c1 - c2; +- } +- return 0; +-} +- +-inline Direction direction(UChar32 c) +-{ +- return (Direction)QChar::direction(uint32_t(c)); +-} +- +-inline CharCategory category(UChar32 c) +-{ +- return (CharCategory) U_MASK(QChar::category(uint32_t(c))); +-} +- +-} // namespace Unicode +-} // namespace WTF +- +-#endif // WTF_UNICODE_QT4_H +diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri +index 44f02b6..0e3cd5f 100644 +--- a/Source/WebCore/Target.pri ++++ b/Source/WebCore/Target.pri +@@ -2357,7 +2357,6 @@ HEADERS += \ + platform/text/DecodeEscapeSequences.h \ + platform/text/Hyphenation.h \ + platform/text/QuotedPrintable.h \ +- platform/text/qt/TextCodecQt.h \ + platform/text/RegularExpression.h \ + platform/text/SegmentedString.h \ + platform/text/TextBoundaries.h \ +@@ -2927,7 +2926,6 @@ SOURCES += \ + platform/qt/TemporaryLinkStubsQt.cpp \ + platform/text/qt/TextBoundariesQt.cpp \ + platform/text/qt/TextBreakIteratorInternalICUQt.cpp \ +- platform/text/qt/TextCodecQt.cpp \ + platform/qt/WidgetQt.cpp + + use?(LIBXML2) { +diff --git a/Source/WebCore/platform/KURL.cpp b/Source/WebCore/platform/KURL.cpp +index a1e0114..01a408c 100644 +--- a/Source/WebCore/platform/KURL.cpp ++++ b/Source/WebCore/platform/KURL.cpp +@@ -40,8 +40,6 @@ + + #if USE(ICU_UNICODE) + #include +-#elif USE(QT4_UNICODE) +-#include + #endif + + // FIXME: This file makes too much use of the + operator on String. +@@ -1498,9 +1496,6 @@ + hostnameBufferLength, UIDNA_ALLOW_UNASSIGNED, 0, &error); + if (error == U_ZERO_ERROR) + buffer.append(hostnameBuffer, numCharactersConverted); +-#elif USE(QT4_UNICODE) +- QByteArray result = QUrl::toAce(String(str, strLen)); +- buffer.append(result.constData(), result.length()); + #endif + } + +diff --git a/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp b/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp +index 11da4b9..e7eb43b 100644 +--- a/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp ++++ b/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp +@@ -90,11 +90,6 @@ UChar32 SurrogatePairAwareTextIterator::normalizeVoicingMarks() + int32_t resultLength = unorm_normalize(m_characters, 2, UNORM_NFC, UNORM_UNICODE_3_2, &normalizedCharacters[0], 2, &uStatus); + if (resultLength == 1 && !uStatus) + return normalizedCharacters[0]; +-#elif USE(QT4_UNICODE) +- QString tmp(reinterpret_cast(m_characters), 2); +- QString res = tmp.normalized(QString::NormalizationForm_C, QChar::Unicode_3_2); +- if (res.length() == 1) +- return res.at(0).unicode(); + #endif + } + +diff --git a/Source/WebCore/platform/text/TextEncoding.cpp b/Source/WebCore/platform/text/TextEncoding.cpp +index f28cd67..6c9a24d 100644 +--- a/Source/WebCore/platform/text/TextEncoding.cpp ++++ b/Source/WebCore/platform/text/TextEncoding.cpp +@@ -37,8 +37,6 @@ + + #if USE(ICU_UNICODE) + #include +-#elif USE(QT4_UNICODE) +-#include + #endif + + namespace WebCore { +@@ -103,10 +101,6 @@ + sourceLength = normalizedLength; + } + return newTextCodec(*this)->encode(source, sourceLength, handling); +-#elif USE(QT4_UNICODE) +- QString str(reinterpret_cast(characters), length); +- str = str.normalized(QString::NormalizationForm_C); +- return newTextCodec(*this)->encode(reinterpret_cast(str.utf16()), str.length(), handling); + #elif OS(WINDOWS) && USE(WCHAR_UNICODE) + // normalization will be done by Windows CE API + OwnPtr textCodec = newTextCodec(*this); +diff --git a/Source/WebCore/platform/text/TextEncodingRegistry.cpp b/Source/WebCore/platform/text/TextEncodingRegistry.cpp +index 2790227..1d12202 100644 +--- a/Source/WebCore/platform/text/TextEncodingRegistry.cpp ++++ b/Source/WebCore/platform/text/TextEncodingRegistry.cpp +@@ -42,9 +42,6 @@ + #if USE(ICU_UNICODE) + #include "TextCodecICU.h" + #endif +-#if USE(QT4_UNICODE) +-#include "qt/TextCodecQt.h" +-#endif + #if PLATFORM(MAC) + #include "TextCodecMac.h" + #endif +@@ -296,11 +293,6 @@ static void extendTextCodecMaps() + TextCodecICU::registerCodecs(addToTextCodecMap); + #endif + +-#if USE(QT4_UNICODE) +- TextCodecQt::registerEncodingNames(addToTextEncodingNameMap); +- TextCodecQt::registerCodecs(addToTextCodecMap); +-#endif +- + #if PLATFORM(MAC) + TextCodecMac::registerEncodingNames(addToTextEncodingNameMap); + TextCodecMac::registerCodecs(addToTextCodecMap); +diff --git a/Source/WebCore/platform/text/qt/TextCodecQt.cpp b/Source/WebCore/platform/text/qt/TextCodecQt.cpp +deleted file mode 100644 +index 6a36e1a..0000000 +--- a/Source/WebCore/platform/text/qt/TextCodecQt.cpp ++++ /dev/null +@@ -1,160 +0,0 @@ +-/* +- * Copyright (C) 2006 Lars Knoll +- * Copyright (C) 2008 Holger Hans Peter Freyther +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * +- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY +- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +- +-#include "config.h" +-#if USE(QT4_UNICODE) +-#include "TextCodecQt.h" +- +-#include +-#include +-#include +- +-namespace WebCore { +- +-static QSet *unique_names = 0; +- +-static const char *getAtomicName(const QByteArray &name) +-{ +- if (!unique_names) +- unique_names = new QSet; +- +- unique_names->insert(name); +- return unique_names->find(name)->constData(); +-} +- +-void TextCodecQt::registerEncodingNames(EncodingNameRegistrar registrar) +-{ +- QList mibs = QTextCodec::availableMibs(); +- +- for (int i = 0; i < mibs.size(); ++i) { +- QTextCodec *c = QTextCodec::codecForMib(mibs.at(i)); +- const char *name = getAtomicName(c->name()); +- registrar(name, name); +- QList aliases = c->aliases(); +- for (int i = 0; i < aliases.size(); ++i) { +- const char *a = getAtomicName(aliases.at(i)); +- registrar(a, name); +- } +- } +-} +- +-static PassOwnPtr newTextCodecQt(const TextEncoding& encoding, const void*) +-{ +- return adoptPtr(new TextCodecQt(encoding)); +-} +- +-void TextCodecQt::registerCodecs(TextCodecRegistrar registrar) +-{ +- QList mibs = QTextCodec::availableMibs(); +- +- for (int i = 0; i < mibs.size(); ++i) { +- QTextCodec *c = QTextCodec::codecForMib(mibs.at(i)); +- const char *name = getAtomicName(c->name()); +- registrar(name, newTextCodecQt, 0); +- } +-} +- +-TextCodecQt::TextCodecQt(const TextEncoding& encoding) +- : m_encoding(encoding) +-{ +- m_codec = QTextCodec::codecForName(m_encoding.name()); +-} +- +-TextCodecQt::~TextCodecQt() +-{ +-} +- +- +-String TextCodecQt::decode(const char* bytes, size_t length, bool flush, bool /*stopOnError*/, bool& sawError) +-{ +- // We chop input buffer to smaller buffers to avoid excessive memory consumption +- // when the input buffer is big. This helps reduce peak memory consumption in +- // mobile devices where system RAM is limited. +- static const int MaxInputChunkSize = 1024 * 1024; +- const char* buf = bytes; +- const char* end = buf + length; +- String unicode(""); // a non-null string is expected +- +- while (buf < end) { +- int size = end - buf; +- size = qMin(size, MaxInputChunkSize); +- QString decoded = m_codec->toUnicode(buf, size, &m_state); +- unicode.append(reinterpret_cast_ptr(decoded.unicode()), decoded.length()); +- buf += size; +- } +- +- sawError = m_state.invalidChars != 0; +- +- if (flush) { +- m_state.flags = QTextCodec::DefaultConversion; +- m_state.remainingChars = 0; +- m_state.invalidChars = 0; +- } +- +- return unicode; +-} +- +-CString TextCodecQt::encode(const UChar* characters, size_t length, UnencodableHandling handling) +-{ +- QTextCodec::ConverterState state; +- state.flags = QTextCodec::ConversionFlags(QTextCodec::ConvertInvalidToNull | QTextCodec::IgnoreHeader); +- +- if (!length) +- return ""; +- +- QByteArray ba = m_codec->fromUnicode(reinterpret_cast(characters), length, &state); +- +- // If some characters are unencodable, escape them as specified by handling +- // We append one valid encoded chunk to a QByteArray at a time. When we encounter an unencodable chunk we +- // escape it with getUnencodableReplacement, append it, then move to the next chunk. +- if (state.invalidChars) { +- state.invalidChars = 0; +- state.remainingChars = 0; +- int len = 0; +- ba.clear(); +- for (size_t pos = 0; pos < length; ++pos) { +- QByteArray tba = m_codec->fromUnicode(reinterpret_cast(characters), ++len, &state); +- if (state.remainingChars) +- continue; +- if (state.invalidChars) { +- UnencodableReplacementArray replacement; +- getUnencodableReplacement(characters[0], handling, replacement); +- tba.replace('\0', replacement); +- state.invalidChars = 0; +- } +- ba.append(tba); +- characters += len; +- len = 0; +- state.remainingChars = 0; +- } +- } +- +- return CString(ba.constData(), ba.length()); +-} +- +- +-} // namespace WebCore +-#endif +diff --git a/Source/WebCore/platform/text/qt/TextCodecQt.h b/Source/WebCore/platform/text/qt/TextCodecQt.h +deleted file mode 100644 +index f28f0bb..0000000 +--- a/Source/WebCore/platform/text/qt/TextCodecQt.h ++++ /dev/null +@@ -1,54 +0,0 @@ +-/* +- * Copyright (C) 2006 Lars Knoll +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * +- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY +- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +- +-#ifndef TextCodecQt_h +-#define TextCodecQt_h +- +-#include "TextCodec.h" +-#include "TextEncoding.h" +-#include +- +-namespace WebCore { +- +- class TextCodecQt : public TextCodec { +- public: +- static void registerEncodingNames(EncodingNameRegistrar); +- static void registerCodecs(TextCodecRegistrar); +- +- TextCodecQt(const TextEncoding&); +- virtual ~TextCodecQt(); +- +- virtual String decode(const char*, size_t length, bool flush, bool stopOnError, bool& sawError); +- virtual CString encode(const UChar*, size_t length, UnencodableHandling); +- +- private: +- TextEncoding m_encoding; +- QTextCodec *m_codec; +- QTextCodec::ConverterState m_state; +- }; +- +-} // namespace WebCore +- +-#endif // TextCodecICU_h +-- +1.7.1 + diff --git a/mingw-w64-qt5/0123-webkit-commit-151422.patch b/mingw-w64-qt5/0123-webkit-commit-151422.patch new file mode 100644 index 0000000000..5a9b5b8711 --- /dev/null +++ b/mingw-w64-qt5/0123-webkit-commit-151422.patch @@ -0,0 +1,46 @@ +Index: a/qtwebkit/Source/WebCore/rendering/RenderText.cpp +=================================================================== +--- a/qtwebkit/Source/WebCore/rendering/RenderText.cpp (revision 151327) ++++ b/qtwebkit/Source/WebCore/rendering/RenderText.cpp (revision 151422) +@@ -101,5 +101,5 @@ + + unsigned length = string->length(); +- const UChar* characters = string->characters(); ++ const StringImpl& stringImpl = *string->impl(); + + if (length >= numeric_limits::max()) +@@ -110,8 +110,8 @@ + for (unsigned i = 1; i < length + 1; i++) { + // Replace   with a real space since ICU no longer treats   as a word separator. +- if (characters[i - 1] == noBreakSpace) ++ if (stringImpl[i - 1] == noBreakSpace) + stringWithPrevious[i] = ' '; + else +- stringWithPrevious[i] = characters[i - 1]; ++ stringWithPrevious[i] = stringImpl[i - 1]; + } + +@@ -120,5 +120,6 @@ + return; + +- StringBuffer data(length); ++ StringBuilder result; ++ result.reserveCapacity(length); + + int32_t endOfWord; +@@ -126,10 +127,10 @@ + for (endOfWord = textBreakNext(boundary); endOfWord != TextBreakDone; startOfWord = endOfWord, endOfWord = textBreakNext(boundary)) { + if (startOfWord) // Ignore first char of previous string +- data[startOfWord - 1] = characters[startOfWord - 1] == noBreakSpace ? noBreakSpace : toTitleCase(stringWithPrevious[startOfWord]); ++ result.append(stringImpl[startOfWord - 1] == noBreakSpace ? noBreakSpace : toTitleCase(stringWithPrevious[startOfWord])); + for (int i = startOfWord + 1; i < endOfWord; i++) +- data[i - 1] = characters[i - 1]; +- } +- +- *string = String::adopt(data); ++ result.append(stringImpl[i - 1]); ++ } ++ ++ *string = result.toString(); + } + diff --git a/mingw-w64-qt5/PKGBUILD b/mingw-w64-qt5/PKGBUILD index cd572ea3b3..30146c3b10 100644 --- a/mingw-w64-qt5/PKGBUILD +++ b/mingw-w64-qt5/PKGBUILD @@ -5,6 +5,10 @@ # as {mingw-w64-qt5/PKGBUILD,mingw-w64-qt5-static/PKGBUILD} #_variant=-static _variant=-shared +# If you want a quick turnaround during testing then +# use this. *Not* the same as _fastbuild; that's set +# always for static and never for non-static. +#_minimal="yes" # Getting crashes that only happen in release builds? # Define this and you may have a hope of figuring out @@ -27,11 +31,13 @@ if [ "${_variant}" = "-static" ]; then _fastbuild="yes" # _ltcg="yes" _ltcg="no" + _use_icu=no else _namesuff= _freetype2="-system-freetype" _fastbuild="no" _ltcg="no" + _use_icu=yes fi # Thiago's patch doesn't contain the configure script changes @@ -42,16 +48,6 @@ if [ "${_ltcg}" = "yes" ]; then LTCG_LFLAGS="-flto-partition=1to1 -flto -ffat-lto-objects" fi -_realname=qt5${_namesuff} - -# qt5-static must be kept in its own prefix hierarchy -# as otherwise it will conflict with qt5 itself -if [ "${_variant}" = "-static" ]; then - _qt5_prefix="${MINGW_PREFIX}/${_realname}" -else - _qt5_prefix="${MINGW_PREFIX}" -fi - # So that both configure shell script and configure.exe # are tested on MSYS2, we use both depending on variant if [ "${_variant}" = "-static" ]; then @@ -60,6 +56,20 @@ else _configure=./configure.bat fi +declare -a _minimal_config +if [ "{_configure}" = "./configure" ]; then + if [ "{$_minimal}" = "yes" ]; then + _minimal_config+=("-skip" "qtwebkit" + "-skip" "qtwebkit-examples") + fi +else + if [ "{$_minimal}" = "yes" ]; then + _minimal_config+=("-no-webkit" + "-no-script" + "-no-scripttools") + fi +fi + # When using the configure bash script, MSYS2 make is # probably a better choice as otherwise the Makefiles # can have MSYS2 paths in them. We try to handle this @@ -72,10 +82,23 @@ else fi #_opengl=angle -_opengl=desktop +#_opengl=desktop +_opengl=dynamic _opengl_for_configure="${_opengl}" + +_realname=qt5${_namesuff} +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -_ver_base=5.3.2 +_ver_base=5.5.1 + +# qt5-static must be kept in its own prefix hierarchy +# as otherwise it will conflict with qt5 itself +if [ "${_variant}" = "-static" ]; then + _qt5_prefix="${MINGW_PREFIX}/${_realname}" +else + _qt5_prefix="${MINGW_PREFIX}" +fi + pkgver=${_ver_base//-/} pkgrel=4 arch=('any') @@ -90,8 +113,6 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-fontconfig" \ "${MINGW_PACKAGE_PREFIX}-freetype" \ "${MINGW_PACKAGE_PREFIX}-harfbuzz" \ - "${MINGW_PACKAGE_PREFIX}-icu" \ - "${MINGW_PACKAGE_PREFIX}-icu-debug-libs" \ "${MINGW_PACKAGE_PREFIX}-jasper" \ "${MINGW_PACKAGE_PREFIX}-libjpeg" \ "${MINGW_PACKAGE_PREFIX}-libmng" \ @@ -105,8 +126,17 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-sqlite3" \ "${MINGW_PACKAGE_PREFIX}-xpm-nox" \ "${MINGW_PACKAGE_PREFIX}-zlib" ) + $([[ "$_opengl" != "desktop" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-angleproject-git" ) + $([[ "$_variant" == "-shared" && "$_use_icu" == "yes" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-icu" \ + "${MINGW_PACKAGE_PREFIX}-icu-debug-libs" ) ) - +optdepends=($([[ "$_variant" == "-shared" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ + "${MINGW_PACKAGE_PREFIX}-firebird" \ + "${MINGW_PACKAGE_PREFIX}-postgresql") + ) makedepends=("bison" "diffutils" "flex" @@ -120,20 +150,21 @@ makedepends=("bison" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-make" + "${MINGW_PACKAGE_PREFIX}-ninja" $([[ "$_variant" == "-static" ]] && echo \ "${MINGW_PACKAGE_PREFIX}-dbus" \ "${MINGW_PACKAGE_PREFIX}-openssl") $([[ "$_variant" == "-shared" ]] && echo \ "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ - "${MINGW_PACKAGE_PREFIX}-libfbclient" \ + "${MINGW_PACKAGE_PREFIX}-firebird2" \ "${MINGW_PACKAGE_PREFIX}-postgresql") ) groups=("${MINGW_PACKAGE_PREFIX}-qt" "${MINGW_PACKAGE_PREFIX}-qt5") options=('!strip' 'staticlibs' 'ccache') _pkgfqn="qt-everywhere-opensource-src-${_ver_base}" -source=(#"${_pkgfqn}.tar.xz" - #http://download.qt-project.org/development_releases/qt/${pkgver%.*}/${_ver_base//RC/rc}/single/${_pkgfqn}.tar.xz +noextract=(${_pkgfqn}.tar.xz) +source=(#http://download.qt-project.org/development_releases/qt/${pkgver%.*}/${_ver_base//RC/rc}/single/${_pkgfqn}.tar.xz http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${_ver_base}/single/${_pkgfqn}.tar.xz #http://download.qt-project.org/snapshots/qt/${pkgver%.*}/${_ver_base}/2014-05-07_85/src/qt-everywhere-opensource-src-${_ver_base}.tar.xz #"qt3d"::"git://gitorious.org/qt/qt3d.git" @@ -159,6 +190,7 @@ source=(#"${_pkgfqn}.tar.xz" 0020-qt-5.3.0-use-external-angle-library.patch 0021-qt-5.3.0-qtwebkit-dont-use-bundled-angle-libraries.patch 0022-qt-5.3.0-qtwebkit-angle-update-for-angleproject-76985f-and-51b4a0.patch + 0022-qt5-qtwebkit-fix-compatibility-with-latest-angle.patch 0023-qt-5.3.0-env-set-external-angle.patch 0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch 0025-qt-5.3.1-force-using-make-on-msys.patch @@ -167,47 +199,32 @@ source=(#"${_pkgfqn}.tar.xz" 0028-qt-5.3.1-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch 0029-qt-5.3.1-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch 0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch + 0031-qt-5.5.0-workaround-BOOL-define-conflict.patch 0031-qt-5.3.1-Fix-masm-pri-build-race-condition.patch 0032-qt-5.3.2-Disable-jitted-Regexp-for-Mingw-64-bit-94712.patch 0033-qt-5.3.2-Use-QMAKE_EXTENSION_STATICLIB-in-create_cmake-prf.patch 0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch - 0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch) -md5sums=('c4e893678e3d8388ab04d059523d1d78' - 'a2fa66089b171ebb76a6e0bda2ef4ca8' - 'e3210b753ba04762de2ed4cb9c786bf1' - '356f7fcf93869e92cd232ef70160ab58' - 'b0b5cc641cf8ebc2660fa819bede0089' - '457b97833220a81f542f529e7e0c549c' - '89b720a561c4410085a8e4a456f4a39d' - '0f2e3a2f790b07442f0964f4f2f96596' - '8ce562d034bb19aaec28ab3abe79bbab' - 'ea5f1d5bf2ea4c1d69e6b5de0765adfb' - '6914a82ad728ff0da3c959f53367384c' - 'a3d928580732a966bb20e5dd8bc25606' - '5a735ecec8b12cbd9d48015de4690b87' - '3b740ce9bca6d9019b09f6f38f07411a' - 'c0721e53378a24b8d013c7db59f14c17' - '0d7ce23a99b3f15d176c09e617a437f9' - '40ba7d8134a696d07be5be6692cfaca7' - 'f080b698ff724093e95a7b4f22b407eb' - 'e65e3ed10e2dd98d5402321657c809c4' - '9ee6524aa78b5e4fbb47f10dc3b267a4' - 'acb49bb963a23b15bc7d1a93d8896bee' - 'd64536bcf72b63d15df106e2c9913154' - '05e73ac3ead09802111cc13d8e3e28c8' - '09aaa20fe92aa3fb8eaa36f805503d7d' - 'f6cd909c1dd549dea769734f6fe7bd73' - '3b550bd6c58d09aa6729987ef16fed65' - 'c89d5c00376d64350c193c4f2459d807' - '01e8030718f088178559a28958a05350' - '288dac91744ddf4d3ac39544fb381466' - 'ede60e9e199e57052e1df95efb65d232' - '4b60988f913708dd8ee3a79a2eac4cae' - 'e009d2a1c7edc41c1f5974883d4f38b2' - '516036cb0721d1603009e01f5bd728aa' - '47e70b9a063aa99aba0096007ed5b83d' - 'c242bb998d1117544018e169bdd66136' - 'cbef002e6f4b0d043ca6a6e9d60ceca5') + 0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch + 0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch + 0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch + 0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch + 0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch + 0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch + 0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch + 0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + 0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch + 0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch + 0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch + 0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch + 0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch + 0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + 0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch + 0050-qt-5.5.1-fix-the-trailing-backslash-in-DESTDIR-on-mingw-worka.patch + 0051-qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch + 0120-qt5-qtwebkit-use-correct-icu-libs.patch + 0121-qt5-qtwebkit-dont-depend-on-icu.patch + 0122-revert-qt4-unicode-removal.patch + 0123-webkit-commit-151422.patch) # Translates using cygpath according to the ${_make} being used # (so either mingw32-make or MSYS2 make can be used) @@ -234,33 +251,26 @@ pkg_config_qt5() { } prepare() { - # cd ${srcdir} + [[ -d ${srcdir}/${_pkgfqn} ]] && rm -rf ${srcdir}/${_pkgfqn} + tar -xJf ${srcdir}/${_pkgfqn}.tar.xz -C ${srcdir} || true + # cp -rf qt3d ${_pkgfqn}/ - cd ${_pkgfqn} + cd ${srcdir}/${_pkgfqn} # MSYS2 gperf cannot handle \r\n. find . -name "*.gperf" -exec dos2unix "{}" \; - pushd qtbase > /dev/null - rm -f mkspecs/features/ltcg.prf > /dev/null 2>&1 || true - patch -p1 -i ${srcdir}/0001-Add-link-time-optimization-support-for-Clang-GCC-and.patch - popd - patch -p1 -i ${srcdir}/0001-qt-5.3.0-oracle-driver-prompt.patch patch -p1 -i ${srcdir}/0002-qt-5.3.0-use-fbclient-instead-of-gds32.patch patch -p1 -i ${srcdir}/0003-qt-5.3.0-use-mingw-built-mysql-library.patch patch -p1 -i ${srcdir}/0005-qt-5.3.0-syncqt-fix.patch patch -p1 -i ${srcdir}/0006-qt-5.3.0-win_flex-replace.patch - # My qt-5.3.0 win32-g++ static patches are against qtbase's dev branch. + # Some patches are against qtbase's repository. pushd qtbase > /dev/null patch -p1 -i ${srcdir}/0007-qt-5.3.0-win32-g-Enable-static-builds.patch - # Despite qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch the following .a (i.e. non-import) - # static libraries end up being made: - # ActiveQt (which is always built statically), libQt5OpenGLExtensions{d}.a, libQt5PlatformSupport{d}.a - # libQt5QmlDevTools.a, libQt5UiTools{d}.a libqtmain{d}.a patch -p1 -i ${srcdir}/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch - patch -p1 -i ${srcdir}/0009-qt-5.3.0-qmlimportscanner-Ensure-the-correct-variant-is-run.patch + ###patch -p1 -i ${srcdir}/0009-qt-5.3.0-qmlimportscanner-Ensure-the-correct-variant-is-run.patch patch -p1 -i ${srcdir}/0010-qt-5.3.0-qdoc-increase-stack-size-for-win32-g-too.patch patch -p1 -i ${srcdir}/0011-qt-5.3.0-win32-g++-allow-static-dbus-1.patch # The next patch needs some work. It's moving a block of shell script un-necessarily @@ -276,20 +286,24 @@ prepare() { patch -p1 -i ${srcdir}/0016-qt-5.3.0-win32-g++-use-qpa-genericunixfontdatabase.patch patch -p1 -i ${srcdir}/0017-qt-5.3.0-fix-examples-building.patch - if [ "${_opengl}" = "angle" ]; then + if [ "${_opengl}" != "desktop" ]; then # Hacks to use external ANGLE libraries. # These patches needs more work - they're unfinished and break desktop OpenGL # patch -p1 -i ${srcdir}/0018-qt-5.3.0-add-angle-support.patch # patch -p1 -i ${srcdir}/0019-qt-5.3.0-qtwebkit-angle-build-fix.patch patch -p1 -i ${srcdir}/0020-qt-5.3.0-use-external-angle-library.patch patch -p1 -i ${srcdir}/0021-qt-5.3.0-qtwebkit-dont-use-bundled-angle-libraries.patch - patch -p1 -i ${srcdir}/0022-qt-5.3.0-qtwebkit-angle-update-for-angleproject-76985f-and-51b4a0.patch + #patch -p1 -i ${srcdir}/0022-qt-5.3.0-qtwebkit-angle-update-for-angleproject-76985f-and-51b4a0.patch + patch -p1 -i ${srcdir}/0022-qt5-qtwebkit-fix-compatibility-with-latest-angle.patch patch -p1 -i ${srcdir}/0023-qt-5.3.0-env-set-external-angle.patch if [ "${_configure}" = "./configure" ]; then _opengl_for_configure=yes fi + + # Make sure the bundled copy of the ANGLE libraries isn't used + rm -rf qtwebkit/Source/ThirdParty/ANGLE fi - + patch -p1 -i ${srcdir}/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch if [ "${_make}" = "make" ]; then patch -p1 -i ${srcdir}/0025-qt-5.3.1-force-using-make-on-msys.patch @@ -305,18 +319,61 @@ prepare() { patch -p1 -i ${srcdir}/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch popd > /dev/null + patch -p1 -i ${srcdir}/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch + # See discussion at https://bugreports.qt-project.org/browse/QTBUG-41292 # I think what is possibly happening instead is that the Debug and Release # builds are happening in parallel and this causes the error. While Ossi's # suggestion (below) doesn't fix the problem entirely, it makes the chances # of it happening near 0. His take on it is that we should have different # target files for RegExpJitTables.h for each of release and debug. - patch -p1 -i ${srcdir}/0031-qt-5.3.1-Fix-masm-pri-build-race-condition.patch - patch -p1 -i ${srcdir}/0032-qt-5.3.2-Disable-jitted-Regexp-for-Mingw-64-bit-94712.patch - patch -p1 -i ${srcdir}/0033-qt-5.3.2-Use-QMAKE_EXTENSION_STATICLIB-in-create_cmake-prf.patch + ###patch -p1 -i ${srcdir}/0031-qt-5.3.1-Fix-masm-pri-build-race-condition.patch + ###patch -p1 -i ${srcdir}/0032-qt-5.3.2-Disable-jitted-Regexp-for-Mingw-64-bit-94712.patch + ###patch -p1 -i ${srcdir}/0033-qt-5.3.2-Use-QMAKE_EXTENSION_STATICLIB-in-create_cmake-prf.patch patch -p1 -i ${srcdir}/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch patch -p1 -i ${srcdir}/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch + # Patches so that qt5-static can be used with cmake. + patch -p1 -i ${srcdir}/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch + patch -p1 -i ${srcdir}/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch + + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch + popd + + patch -p1 -i ${srcdir}/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch + patch -p1 -i ${srcdir}/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch + patch -p1 -i ${srcdir}/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch + patch -p1 -i ${srcdir}/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + patch -p1 -i ${srcdir}/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch + + # More odds and sods. +# patch -p1 -i ${srcdir}/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch + patch -p1 -i ${srcdir}/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch + + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch + popd > /dev/null + + patch -p1 -i ${srcdir}/0047-qt-5.4.1-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch + patch -p1 -i ${srcdir}/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0049-qt-5.5.0-win32-g++-dont-define-QT_NO_SYSTEMSEMAPHORE-QT_NO_SHAREDMEMORY.patch + popd > /dev/null + + patch -p1 -i ${srcdir}/0051-qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch + + # Skip using ICU + if [ "$_use_icu" == "no" ]; then + patch -p1 -i ${srcdir}/0120-qt5-qtwebkit-use-correct-icu-libs.patch + patch -p1 -i ${srcdir}/0121-qt5-qtwebkit-dont-depend-on-icu.patch + pushd qtwebkit > /dev/null + patch -p1 -R -i ${srcdir}/0122-revert-qt4-unicode-removal.patch + popd > /dev/null + patch -p1 -i ${srcdir}/0123-webkit-commit-151422.patch + + fi + # See: https://bugreports.qt-project.org/browse/QTBUG-37902 # _ver_num=${_ver_base%%-*} # sed -i "s/^MODULE_VERSION = .*$/MODULE_VERSION = ${_ver_num}/g" qtenginio/.qmake.conf @@ -350,8 +407,10 @@ prepare() { QMAKE_LFLAGS_RELEASE="-Wl,-s" fi + BIGOBJ_FLAGS="-Wa,-mbig-obj" + # Append these ones .. - sed -i "s|^QMAKE_CFLAGS .*= \(.*\)$|QMAKE_CFLAGS = \1 ${_ARCH_TUNE} ${LTCG_CFLAGS}|g" qtbase/mkspecs/win32-g++/qmake.conf + sed -i "s|^QMAKE_CFLAGS .*= \(.*\)$|QMAKE_CFLAGS = \1 ${_ARCH_TUNE} ${BIGOBJ_FLAGS} ${LTCG_CFLAGS}|g" qtbase/mkspecs/win32-g++/qmake.conf if [ -n "$OPTIM_D" ]; then sed -i "s|^QMAKE_CFLAGS_DEBUG .*= \(.*\)$|QMAKE_CFLAGS_DEBUG = \1 ${OPTIM_D}|g" qtbase/mkspecs/win32-g++/qmake.conf fi @@ -365,7 +424,7 @@ prepare() { # To keep the build folder name quite small (PATH_MAX limit) # the source folder (long) is renamed to $CARCH (i686 or x86_64) cd ${srcdir} - [ -d ${CARCH} ] && rm -rf ${CARCH} + [[ -d ${CARCH} ]] && rm -rf ${CARCH} mv ${_pkgfqn} ${CARCH} } @@ -373,10 +432,9 @@ build() { cd ${CARCH} touch qtbase/.gitignore - mkdir -p ${pkgdir}${_qt5_prefix} - pushd ${pkgdir}${_qt5_prefix} > /dev/null - QTDIR_WIN=$(pwd -W) - popd > /dev/null + local _buildpkgdir=${pkgdirbase}/${pkgname}/${_qt5_prefix} + mkdir -p ${_buildpkgdir} + local QTDIR_WIN=$(cygpath -am ${_buildpkgdir}) local _freetype2_pkgconf="" if [ "${_freetype2}" = "-system-freetype" ]; then @@ -384,14 +442,12 @@ build() { fi local -a _extra_incpaths=($(pkg_config_qt5 --cflags-only-I dbus-1 libxml-2.0 ${_freetype2_pkgconf})) - if [ "${_opengl}" = "angle" ]; then + if [ "${_opengl}" != "desktop" ]; then export EXTERNAL_ANGLE=1 _extra_incpaths+=("-I") _extra_incpaths+=("${MINGW_PREFIX}/include/GLSLANG") fi _extra_incpaths+=("-I") - _extra_incpaths+=("${MINGW_PREFIX}/include/noX") - _extra_incpaths+=("-I") _extra_incpaths+=("${MINGW_PREFIX}/include/mariadb") # This *could* be used but we'd have to make sure it's correct for all variants first. @@ -445,29 +501,32 @@ build() { _variant_config+=("-qt-libpng") _variant_config+=("-qt-libjpeg") _variant_config+=("-qt-harfbuzz") - _variant_config+=("-no-icu") else _variant_config+=("-shared") _variant_config+=("-openssl") - _variant_config+=("-icu") _variant_config+=("-fontconfig") _variant_config+=("-system-harfbuzz") fi + if [ "$_use_icu" == "yes" ]; then + _variant_config+=("-icu") + else + _variant_config+=("-no-icu") + fi + local -a _fastbuild_config if [ "${_fastbuild}" = "yes" ]; then - _fastbuild_config+=("-nomake") - _fastbuild_config+=("examples") + _fastbuild_config+=("-nomake" "examples") fi - # We probably want to build these always + # We probably want to build tests always # but not package them? - _fastbuild_config+=("-nomake") - _fastbuild_config+=("tests") + _fastbuild_config+=("-nomake" "tests") # Qt manages the compiler flags for release / debug configs separately, so having our own values (-O2) is harmful here .. unset CFLAGS unset CXXFLAGS unset LDFLAGS +# export NINJA_PATH=${MINGW_PREFIX}/bin/ninja.exe ${_configure} \ -prefix ${QTDIR_WIN} \ @@ -490,12 +549,36 @@ build() { "${_extra_config[@]}" \ "${_sql_config[@]}" \ "${_variant_config[@]}" \ - "${_fastbuild_config[@]}" + "${_fastbuild_config[@]}" \ + "${_minimal_config[@]}" + # I'm Keeping this around while qt5-static cmake problems persist (hopefully not long!) + # qtbase/mkspecs/modules-inst/qt_lib_core.pri + # pushd src/x86_64 + # ROOT=$(pwd -W) + # pushd qtbase/ + # ${ROOT}/qtbase/bin/qmake.exe ${ROOT}/qtbase/qtbase.pro -o Makefile + # popd + # cp -rf qtbase/src/corelib qtbase/src/corelib.pre-write-cmake + # pushd qtbase/src/corelib + # ${ROOT}/qtbase/bin/qmake.exe ${ROOT}/qtbase/src/corelib/corelib.pro -d -d -d -d -o Makefile > log.txt + # popd + # popd + # . + # .. or .. (this alternative could be used when _minimal=yes) + # . + # pushd src/x86_64 + # ${_make} module-qtbase && ${_make} module-qtbase-install_subtargets + # popd + # .. do your testing. # There is a race condition / dependency problem with libqtiff and dumpdoc.exe which # can happen at -j9 so make twice (dumpdoc.exe depends on libqtiff but can get built # first). ${_make} ${MAKEFLAGS} || ${_make} ${MAKEFLAGS} + # For quicker turn-around testing qtwebengine. + # ${_make} module-qtbase + # ${_make} module-qtwebengine + # exit 1 # Fix paths # find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} + @@ -514,7 +597,7 @@ package() { cd ${CARCH} - export PATH=${pkgdir}${_qt5_prefix}/bin:${pkgdir}${MINGW_PREFIX}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH} + export PATH=${pkgdir}${_qt5_prefix}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH} ${_make} install ${_make} docs @@ -524,7 +607,7 @@ package() { "${pkgdir}${_qt5_prefix}"/share/licenses/qt5/LGPL_EXCEPTION.txt # Remove dlls from lib/ - rm -f "${pkgdir}${MINGW_PREFIX}/lib"/*.dll + rm -f "${pkgdir}${_qt5_prefix}/lib"/*.dll # Workaround for installing empty .pc files plain "---> Fix pkgconfig files..." @@ -532,12 +615,19 @@ package() { cp -f ${_pc_files[@]} ${pkgdir}${_qt5_prefix}/lib/pkgconfig/ # Fix wrong path in prl files - # find "${pkgdir}${MINGW_PREFIX}/lib" -type f -name '*.prl' \ + # find "${pkgdir}${_qt5_prefix}/lib" -type f -name '*.prl' \ # -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \; # Fix wrong qmake path in pri file # sed -i "s|${srcdir}/${CARCH}/qtbase|/usr|" \ # "${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri + + # Fix paths in qconfig.pri and qmodule.pri: + # $(cygpath -m ${MINGW_PREFIX}) -> $(cygpath -m ${pkgdir}${MINGW_PREFIX}) + MINGW_PREFIX_WIN=$(cygpath -m ${_qt5_prefix}) + PKGDIR_MINGW_PREFIX_WIN=$(cygpath -m ${pkgdir}${_qt5_prefix}) + find "${pkgdir}${_qt5_prefix}/share/qt5" -type f -name '*.pri' \ + -exec sed -i -e "s|${MINGW_PREFIX_WIN}|${PKGDIR_MINGW_PREFIX_WIN}|g" {} \; } # return 0 @@ -580,3 +670,62 @@ package() { # export PATH=/mingw32/bin:$PATH # export PKG_CONFIG_PATH=/mingw32/lib/pkgconfig # E:/m2/repo/mingw-w64-qt5/src/i686/qtbase/bin/qmake.exe -o Makefile qml.pro + +md5sums=('c2a249e8795d45200d997d96860d0353' + 'a2fa66089b171ebb76a6e0bda2ef4ca8' + 'e3210b753ba04762de2ed4cb9c786bf1' + '53edcf1df69ae8134a196292447ddaa3' + 'b0b5cc641cf8ebc2660fa819bede0089' + '457b97833220a81f542f529e7e0c549c' + 'f13cb61f49f572a2fafbad1a323be89f' + '0f2e3a2f790b07442f0964f4f2f96596' + 'a8f02cb5eb766e5bb8639cf8771537d2' + 'ea5f1d5bf2ea4c1d69e6b5de0765adfb' + '6914a82ad728ff0da3c959f53367384c' + 'a3d928580732a966bb20e5dd8bc25606' + '5a735ecec8b12cbd9d48015de4690b87' + '3b740ce9bca6d9019b09f6f38f07411a' + 'c0721e53378a24b8d013c7db59f14c17' + '0d7ce23a99b3f15d176c09e617a437f9' + '40ba7d8134a696d07be5be6692cfaca7' + '23f6818466f6b6646c13549110376022' + 'e65e3ed10e2dd98d5402321657c809c4' + '9ee6524aa78b5e4fbb47f10dc3b267a4' + '3fb1f1952db35187c9a3f6d1dae6de95' + 'd2c9850612a7cc3be02f5ec652d2dac6' + '05e73ac3ead09802111cc13d8e3e28c8' + 'eb9a805ed7bfaaf6573b5001bb5cae25' + '09aaa20fe92aa3fb8eaa36f805503d7d' + 'a73080c2a48ab52ec8888745daa28c99' + '3b550bd6c58d09aa6729987ef16fed65' + '47c0f36b9de94cf878cd29b7e2b6ea1b' + '01e8030718f088178559a28958a05350' + '6d86c1358be850376ed05c2913175c50' + 'a264f298702e70007820ab2f37facffb' + '2d2e68ab042aadc3c0fd6845dbfae79a' + '7b1e5e2538b71e1e4ba006a241c853b9' + 'e009d2a1c7edc41c1f5974883d4f38b2' + '516036cb0721d1603009e01f5bd728aa' + '47e70b9a063aa99aba0096007ed5b83d' + '3049f9e43e24f7eaafb4659c72ca4789' + 'df6964dca18a315fab60adc0d7a7aedb' + 'fbf568c6ed68ab4a372e03f9b84dafe8' + 'f323f5016ab38ceb3f10673ef9ae4337' + '3323d4694a011b1048512fa27cf9768c' + '6e4a9c4850a1505a442f78d415ffadb9' + 'e49923654e2dff35e86cda6e1b566118' + 'b2269fae567d93fed03fe2affeca116c' + 'e1307c1fd57be3024a1e715c9061ebfb' + 'f63b3d50851ede0124dedccdcd7a6aed' + '27e0f474f66f05f3911c71621b24636d' + '51016015352313cdd749ae1ff3e14614' + '9bc9c1177134d0f2fd782db3f394a318' + '857309396cfdf6bfff91fe86afb947c2' + '54fe3fa20f28a546a60e8c0568ffb6d2' + 'cf3cb7b2c5a0088fbd34c94c4eccc6c9' + 'c899f62a5f6419ffebd937673863858d' + 'f9c0a01f91fbdde0b42dfe00ee60bcfd' + 'cc8f9702088ca4a7e14122eeab518f70' + '9dd3cae439b1f0279efe3175a5dc5267' + '4e374836f26853b4d82be0e87aa584a5' + '6b7e9657d8e0b085d09457e25a508046') diff --git a/mingw-w64-qtbinpatcher/001-minimize-files-touching.patch b/mingw-w64-qtbinpatcher/001-minimize-files-touching.patch index 745aa8874b..5aa9c7fae7 100644 --- a/mingw-w64-qtbinpatcher/001-minimize-files-touching.patch +++ b/mingw-w64-qtbinpatcher/001-minimize-files-touching.patch @@ -1,31 +1,49 @@ ---- qtbinpatcher-2.1.0/QtBinPatcher.cpp.orig 2014-10-19 21:58:34.945200000 +0400 -+++ qtbinpatcher-2.1.0/QtBinPatcher.cpp 2014-10-19 22:33:35.582800000 +0400 -@@ -256,7 +256,7 @@ +--- qtbinpatcher-2.1.4/QtBinPatcher.cpp.orig 2015-04-28 13:25:04.642600000 +0300 ++++ qtbinpatcher-2.1.4/QtBinPatcher.cpp 2015-04-28 13:32:03.050200000 +0300 +@@ -255,32 +255,34 @@ + // Files for patching in Qt4. static const TElement Elements4[] = { { "/lib/", "*.prl", false }, - { "/demos/shared/", "libdemo_shared.prl", false }, -- { "/lib/pkgconfig/", "*.pc", false }, -+ { "/lib/pkgconfig/", "Qt*.pc", false }, +- { "/demos/shared/", "libdemo_shared.prl", false }, ++ { "/share/qt4/demos/shared/", "libdemo_shared.prl", false }, + { "/lib/pkgconfig/", "Qt*.pc", false }, + { "/lib/pkgconfig/", "phonon*.pc", false }, #if defined(OS_WINDOWS) - { "/mkspecs/default/", "qmake.conf", false }, +- { "/mkspecs/default/", "qmake.conf", false }, ++ { "/share/qt4/mkspecs/default/", "qmake.conf", false }, { "/", ".qmake.cache", false } -@@ -268,9 +268,8 @@ + #elif defined(OS_LINUX) + { "/lib/pkgconfig/", "qt*.pc", false }, + { "/lib/", "*.la", false }, + { "/mkspecs/", "qconfig.pri", false } + #endif + }; // Files for patching in Qt5. static const TElement Elements5[] = { - { "/", "*.la", true }, - { "/", "*.prl", true }, -- { "/", "*.pc", true }, -+ { "/lib/pkgconfig/", "Qt*.pc", true }, - { "/", "*.pri", true }, - { "/lib/cmake/Qt5LinguistTools/", "Qt5LinguistToolsConfig.cmake", false }, - { "/mkspecs/default-host/", "qmake.conf", false }, -@@ -278,6 +277,8 @@ - { "/mkspecs/default/", "qmake.conf", false }, - { "/", ".qmake.cache", false }, - { "/lib/", "prl.txt", false } -+#elif defined(OS_LINUX) -+ { "/lib/", "*.la", true } +- { "/", "*.prl", true }, +- { "/lib/pkgconfig/", "Qt5*.pc", true }, +- { "/lib/pkgconfig/", "Enginio*.pc", true }, +- { "/", "*.pri", true }, +- { "/lib/cmake/Qt5LinguistTools/", "Qt5LinguistToolsConfig.cmake", false }, +- { "/mkspecs/default-host/", "qmake.conf", false }, ++#if !defined(OS_WINDOWS) ++ { "/", "*.la", true }, ++#endif ++ { "/lib/", "*.prl", true }, ++ { "/lib/pkgconfig/", "Qt5*.pc", true }, ++ { "/lib/pkgconfig/", "Enginio*.pc", true }, ++ { "/share/qt5/", "*.pri", true }, ++ { "/lib/cmake/Qt5LinguistTools/", "Qt5LinguistToolsConfig.cmake", false }, ++ { "/share/qt5/mkspecs/default-host/", "qmake.conf", false }, + #ifdef OS_WINDOWS +- { "/mkspecs/default/", "qmake.conf", false }, +- { "/", ".qmake.cache", false }, +- { "/lib/", "prl.txt", false } ++ { "/share/qt5/mkspecs/default/", "qmake.conf", false }, ++ { "/", ".qmake.cache", false }, ++ { "/lib/", "prl.txt", false } #endif }; diff --git a/mingw-w64-qtbinpatcher/PKGBUILD b/mingw-w64-qtbinpatcher/PKGBUILD index e1c892681c..5e4207d8b6 100644 --- a/mingw-w64-qtbinpatcher/PKGBUILD +++ b/mingw-w64-qtbinpatcher/PKGBUILD @@ -2,7 +2,7 @@ _realname=qtbinpatcher pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.1.1 +pkgver=2.2.0 pkgrel=1 pkgdesc="Patcher for Qt libraries (mingw-w64)" arch=('any') @@ -10,11 +10,11 @@ url="http://tver-soft.org" license=("GPL") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") options=('staticlibs' 'strip') -source=(http://tver-soft.org/dl/${_realname}-${pkgver}.tar.bz2 - #"http://sourceforge.net/projects/qtx64/files/external-binaries/qtbinpatcher/2.1.0/qtbinpatcher-2.1.0.tar.bz2/download" +source=(${_realname}-${pkgver}.tar.gz::https://github.com/tver-soft/QtBinPatcher/archive/v${pkgver}.tar.gz + #http://tver-soft.org/dl/${_realname}-${pkgver}.tar.bz2 001-minimize-files-touching.patch) -md5sums=('c2bc47fd86bf24481926731500eba890' - 'd9579dbed80111b16e299619e4970091') +md5sums=('cb170f2c4f304a23d734ac3717e9950c' + 'c3c99f967b7c619d351740f155adc012') prepare() { cd ${srcdir}/${_realname}-${pkgver} @@ -25,7 +25,7 @@ build() { [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - + ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ diff --git a/mingw-w64-qtcreator/0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch b/mingw-w64-qtcreator/0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch deleted file mode 100644 index c62d9694a7..0000000000 --- a/mingw-w64-qtcreator/0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 06615843df1541e67686f6a016f0c81e154c1869 Mon Sep 17 00:00:00 2001 -From: Tobias Hunger -Date: Tue, 23 Sep 2014 13:05:00 +0200 -Subject: [PATCH] Qbs: Do not crash when using simplified project view - -Root cause is trying to set the display name on a FolderNode that -is not in the tree yet. - -Allow setting the displayname in the constructor and use that new -constructor where it makes sense. - -Task-number: QTCREATORBUG-12897 -Change-Id: I907e48cac837966e38524bfe88a87ef17d93f0b2 -Reviewed-by: Daniel Teske ---- - src/plugins/projectexplorer/projectnodes.cpp | 6 ++++-- - src/plugins/projectexplorer/projectnodes.h | 3 ++- - src/plugins/qbsprojectmanager/qbsnodes.cpp | 9 +++++---- - 3 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp -index c0a8a8e..b3bc123 100644 ---- a/src/plugins/projectexplorer/projectnodes.cpp -+++ b/src/plugins/projectexplorer/projectnodes.cpp -@@ -247,10 +247,12 @@ bool FileNode::isGenerated() const - - \sa ProjectExplorer::FileNode, ProjectExplorer::ProjectNode - */ --FolderNode::FolderNode(const QString &folderPath, NodeType nodeType) : -+FolderNode::FolderNode(const QString &folderPath, NodeType nodeType, const QString &displayName) : - Node(nodeType, folderPath), -- m_displayName(QDir::toNativeSeparators(folderPath)) -+ m_displayName(displayName) - { -+ if (m_displayName.isEmpty()) -+ m_displayName = QDir::toNativeSeparators(folderPath); - } - - FolderNode::~FolderNode() -diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h -index 8212e71..233f930 100644 ---- a/src/plugins/projectexplorer/projectnodes.h -+++ b/src/plugins/projectexplorer/projectnodes.h -@@ -162,7 +162,8 @@ private: - class PROJECTEXPLORER_EXPORT FolderNode : public Node { - Q_OBJECT - public: -- explicit FolderNode(const QString &folderPath, NodeType nodeType = FolderNodeType); -+ explicit FolderNode(const QString &folderPath, NodeType nodeType = FolderNodeType, -+ const QString &displayName = QString()); - virtual ~FolderNode(); - - QString displayName() const; -diff --git a/src/plugins/qbsprojectmanager/qbsnodes.cpp b/src/plugins/qbsprojectmanager/qbsnodes.cpp -index ee63fbd..48af5cd 100644 ---- a/src/plugins/qbsprojectmanager/qbsnodes.cpp -+++ b/src/plugins/qbsprojectmanager/qbsnodes.cpp -@@ -527,14 +527,15 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root, - break; - } - if (!fn) { -- fn = new FolderNode(c->path()); -+ fn = new FolderNode(c->path(), ProjectExplorer::FolderNodeType, -+ displayNameFromPath(c->path(), baseDir)); - root->addFolderNodes(QList() << fn); - } else { - foldersToRemove.removeOne(fn); - if (updateExisting) - fn->emitNodeUpdated(); -+ fn->setDisplayName(displayNameFromPath(c->path(), baseDir)); - } -- fn->setDisplayName(displayNameFromPath(c->path(), baseDir)); - - setupFolder(fn, c, c->path(), updateExisting); - } -@@ -811,9 +812,9 @@ QbsProjectNode *QbsProjectNode::findProjectNode(const QString &name) - QbsRootProjectNode::QbsRootProjectNode(QbsProject *project) : - QbsProjectNode(project->projectFilePath().toString()), - m_project(project), -- m_buildSystemFiles(new ProjectExplorer::FolderNode(project->projectDirectory().toString())) -+ m_buildSystemFiles(new ProjectExplorer::FolderNode(project->projectDirectory().toString(), -+ ProjectExplorer::FolderNodeType, tr("Qbs files"))) - { -- m_buildSystemFiles->setDisplayName(tr("Qbs files")); - addFolderNodes(QList() << m_buildSystemFiles); - } - --- -2.1.2 - diff --git a/mingw-w64-qtcreator/0001-autotools-Allow-builds-to-be-done-in-buildDir.patch b/mingw-w64-qtcreator/0001-autotools-Allow-builds-to-be-done-in-buildDir.patch deleted file mode 100644 index f56444649f..0000000000 --- a/mingw-w64-qtcreator/0001-autotools-Allow-builds-to-be-done-in-buildDir.patch +++ /dev/null @@ -1,229 +0,0 @@ -From cd011cb7638ed6699c88451982ca3a052fa12eae Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Sun, 24 Aug 2014 20:33:40 +0100 -Subject: [PATCH] autotools: Allow builds to be done in buildDir - -configure is called using a relative path from buildDir -to the project directory and the configure command line -is updated to reflect changes to buildDir. - -Change-Id: Ia9e8eef446efd21b6dcedef4668ff03adfd8a20c ---- - .../autotoolsprojectmanager/autogenstep.cpp | 18 +++++++------ - .../autotoolsprojectmanager/autoreconfstep.cpp | 10 ++++--- - .../autotoolsbuildconfiguration.cpp | 14 ++++++++++ - .../autotoolsbuildconfiguration.h | 3 +++ - .../autotoolsprojectmanager/configurestep.cpp | 31 ++++++++++++++++++---- - .../autotoolsprojectmanager/configurestep.h | 2 ++ - 6 files changed, 61 insertions(+), 17 deletions(-) - -diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.cpp b/src/plugins/autotoolsprojectmanager/autogenstep.cpp -index 33a4e13..28faed3 100644 ---- a/src/plugins/autotoolsprojectmanager/autogenstep.cpp -+++ b/src/plugins/autotoolsprojectmanager/autogenstep.cpp -@@ -158,8 +158,9 @@ bool AutogenStep::init() - ProcessParameters *pp = processParameters(); - pp->setMacroExpander(bc->macroExpander()); - pp->setEnvironment(bc->environment()); -- pp->setWorkingDirectory(bc->buildDirectory().toString()); -- pp->setCommand(QLatin1String("autogen.sh")); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ pp->setWorkingDirectory(projectDir); -+ pp->setCommand(QLatin1String("./autogen.sh")); - pp->setArguments(additionalArguments()); - pp->resolveAll(); - -@@ -171,10 +172,10 @@ void AutogenStep::run(QFutureInterface &interface) - BuildConfiguration *bc = buildConfiguration(); - - // Check whether we need to run autogen.sh -- const QString buildDir = bc->buildDirectory().toString(); -- const QFileInfo configureInfo(buildDir + QLatin1String("/configure")); -- const QFileInfo configureAcInfo(buildDir + QLatin1String("/configure.ac")); -- const QFileInfo makefileAmInfo(buildDir + QLatin1String("/Makefile.am")); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ const QFileInfo configureInfo(projectDir + QLatin1String("/configure")); -+ const QFileInfo configureAcInfo(projectDir + QLatin1String("/configure.ac")); -+ const QFileInfo makefileAmInfo(projectDir + QLatin1String("/Makefile.am")); - - if (!configureInfo.exists() - || configureInfo.lastModified() < configureAcInfo.lastModified() -@@ -276,8 +277,9 @@ void AutogenStepConfigWidget::updateDetails() - ProcessParameters param; - param.setMacroExpander(bc->macroExpander()); - param.setEnvironment(bc->environment()); -- param.setWorkingDirectory(bc->buildDirectory().toString()); -- param.setCommand(QLatin1String("autogen.sh")); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ param.setWorkingDirectory(projectDir); -+ param.setCommand(QLatin1String("./autogen.sh")); - param.setArguments(m_autogenStep->additionalArguments()); - m_summaryText = param.summary(displayName()); - emit updateSummary(); -diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp -index f046b26..584cff8 100644 ---- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp -+++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp -@@ -157,7 +157,8 @@ bool AutoreconfStep::init() - ProcessParameters *pp = processParameters(); - pp->setMacroExpander(bc->macroExpander()); - pp->setEnvironment(bc->environment()); -- pp->setWorkingDirectory(bc->buildDirectory().toString()); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ pp->setWorkingDirectory(projectDir); - pp->setCommand(QLatin1String("autoreconf")); - pp->setArguments(additionalArguments()); - pp->resolveAll(); -@@ -170,8 +171,8 @@ void AutoreconfStep::run(QFutureInterface &interface) - BuildConfiguration *bc = buildConfiguration(); - - // Check whether we need to run autoreconf -- const QString buildDir = bc->buildDirectory().toString(); -- const QFileInfo configureInfo(buildDir + QLatin1String("/configure")); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ const QFileInfo configureInfo(projectDir + QLatin1String("/configure")); - - if (!configureInfo.exists()) - m_runAutoreconf = true; -@@ -270,7 +271,8 @@ void AutoreconfStepConfigWidget::updateDetails() - ProcessParameters param; - param.setMacroExpander(bc->macroExpander()); - param.setEnvironment(bc->environment()); -- param.setWorkingDirectory(bc->buildDirectory().toString()); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ param.setWorkingDirectory(projectDir); - param.setCommand(QLatin1String("autoreconf")); - param.setArguments(m_autoreconfStep->additionalArguments()); - m_summaryText = param.summary(displayName()); -diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp -index 76acb72..aa593c1 100644 ---- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp -+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp -@@ -223,3 +223,17 @@ BuildConfiguration::BuildType AutotoolsBuildConfiguration::buildType() const - // TODO: Should I return something different from Unknown? - return Unknown; - } -+ -+void AutotoolsBuildConfiguration::setBuildDirectory(const Utils::FileName &directory) -+{ -+ if (directory == buildDirectory()) -+ return; -+ BuildConfiguration::setBuildDirectory(directory); -+ ProjectExplorer::BuildStepList *bsl = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); -+ foreach (BuildStep *bs, bsl->steps()) { -+ ConfigureStep *cs = qobject_cast(bs); -+ if (cs) { -+ cs->notifyBuildDirectoryChanged(); -+ } -+ } -+} -diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h -index b0ef03d..fdb4a07 100644 ---- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h -+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h -@@ -60,6 +60,9 @@ protected: - AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, AutotoolsBuildConfiguration *source); - - friend class AutotoolsBuildSettingsWidget; -+ -+private: -+ void setBuildDirectory(const Utils::FileName &directory); - }; - - class AutotoolsBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory -diff --git a/src/plugins/autotoolsprojectmanager/configurestep.cpp b/src/plugins/autotoolsprojectmanager/configurestep.cpp -index 2f51863..06acfb9 100644 ---- a/src/plugins/autotoolsprojectmanager/configurestep.cpp -+++ b/src/plugins/autotoolsprojectmanager/configurestep.cpp -@@ -54,6 +54,20 @@ using namespace ProjectExplorer; - const char CONFIGURE_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.ConfigureStep.AdditionalArguments"; - const char CONFIGURE_STEP_ID[] = "AutotoolsProjectManager.ConfigureStep"; - -+///////////////////// -+// Helper Function -+///////////////////// -+static QString projectDirRelativeToBuildDir(BuildConfiguration *bc) { -+ const QDir buildDir(bc->buildDirectory().toString()); -+ QString projDirToBuildDir = buildDir.relativeFilePath( -+ bc->target()->project()->projectDirectory().toString()); -+ if (projDirToBuildDir.isEmpty()) -+ return QLatin1String("./"); -+ if (!projDirToBuildDir.endsWith(QLatin1Char('/'))) -+ projDirToBuildDir.append(QLatin1Char('/')); -+ return projDirToBuildDir; -+} -+ - //////////////////////////////// - // ConfigureStepFactory Class - //////////////////////////////// -@@ -159,7 +173,7 @@ bool ConfigureStep::init() - pp->setMacroExpander(bc->macroExpander()); - pp->setEnvironment(bc->environment()); - pp->setWorkingDirectory(bc->buildDirectory().toString()); -- pp->setCommand(QLatin1String("configure")); -+ pp->setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure")); - pp->setArguments(additionalArguments()); - pp->resolveAll(); - -@@ -171,9 +185,9 @@ void ConfigureStep::run(QFutureInterface& interface) - BuildConfiguration *bc = buildConfiguration(); - - //Check whether we need to run configure -- QString buildDir = bc->buildDirectory().toString(); -- const QFileInfo configureInfo(buildDir +QLatin1String("/configure")); -- const QFileInfo configStatusInfo(buildDir + QLatin1String("/config.status")); -+ const QString projectDir(bc->target()->project()->projectDirectory().toString()); -+ const QFileInfo configureInfo(projectDir + QLatin1String("/configure")); -+ const QFileInfo configStatusInfo(bc->buildDirectory().toString() + QLatin1String("/config.status")); - - if (!configStatusInfo.exists() - || configStatusInfo.lastModified() < configureInfo.lastModified()) { -@@ -212,6 +226,11 @@ void ConfigureStep::setAdditionalArguments(const QString &list) - emit additionalArgumentsChanged(list); - } - -+void ConfigureStep::notifyBuildDirectoryChanged() -+{ -+ emit buildDirectoryChanged(); -+} -+ - QString ConfigureStep::additionalArguments() const - { - return m_additionalArguments; -@@ -255,6 +274,8 @@ ConfigureStepConfigWidget::ConfigureStepConfigWidget(ConfigureStep *configureSte - configureStep, SLOT(setAdditionalArguments(QString))); - connect(configureStep, SIGNAL(additionalArgumentsChanged(QString)), - this, SLOT(updateDetails())); -+ connect(configureStep, SIGNAL(buildDirectoryChanged(void)), -+ this, SLOT(updateDetails())); - } - - QString ConfigureStepConfigWidget::displayName() const -@@ -275,7 +296,7 @@ void ConfigureStepConfigWidget::updateDetails() - param.setMacroExpander(bc->macroExpander()); - param.setEnvironment(bc->environment()); - param.setWorkingDirectory(bc->buildDirectory().toString()); -- param.setCommand(QLatin1String("configure")); -+ param.setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure")); - param.setArguments(m_configureStep->additionalArguments()); - m_summaryText = param.summary(displayName()); - emit updateSummary(); -diff --git a/src/plugins/autotoolsprojectmanager/configurestep.h b/src/plugins/autotoolsprojectmanager/configurestep.h -index 40ae1d0..99366d6 100644 ---- a/src/plugins/autotoolsprojectmanager/configurestep.h -+++ b/src/plugins/autotoolsprojectmanager/configurestep.h -@@ -103,9 +103,11 @@ public: - - public slots: - void setAdditionalArguments(const QString &list); -+ void notifyBuildDirectoryChanged(); - - signals: - void additionalArgumentsChanged(const QString &); -+ void buildDirectoryChanged(); - - protected: - ConfigureStep(ProjectExplorer::BuildStepList *bsl, ConfigureStep *bs); --- -2.1.0 - diff --git a/mingw-w64-qtcreator/0001-autotools-Remove-broken-unchanged-check.patch b/mingw-w64-qtcreator/0001-autotools-Remove-broken-unchanged-check.patch deleted file mode 100644 index ba266716d9..0000000000 --- a/mingw-w64-qtcreator/0001-autotools-Remove-broken-unchanged-check.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7e5fbdd1bb67c2a53101548063f130d7a4d9b14f Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Wed, 10 Sep 2014 00:17:42 +0100 -Subject: [PATCH 1/2] autotools: Remove broken 'unchanged' check - -Before m_buildDirectory gets changed buildDirectory() returns -a default of the projectDir and notifyBuildDirectoryChanged() -would not get called until the build directory was editted. - -Change-Id: Ie31fb2722c663cd0f998458d536181f47c83a37d ---- - src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp -index aa593c1..dca4766 100644 ---- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp -+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp -@@ -226,8 +226,6 @@ BuildConfiguration::BuildType AutotoolsBuildConfiguration::buildType() const - - void AutotoolsBuildConfiguration::setBuildDirectory(const Utils::FileName &directory) - { -- if (directory == buildDirectory()) -- return; - BuildConfiguration::setBuildDirectory(directory); - ProjectExplorer::BuildStepList *bsl = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); - foreach (BuildStep *bs, bsl->steps()) { --- -2.1.0 - diff --git a/mingw-w64-qtcreator/0001-autotools-Set-a-default-buildDir.patch b/mingw-w64-qtcreator/0001-autotools-Set-a-default-buildDir.patch new file mode 100644 index 0000000000..9199a61c3f --- /dev/null +++ b/mingw-w64-qtcreator/0001-autotools-Set-a-default-buildDir.patch @@ -0,0 +1,33 @@ +From 3047101050991dca283360853c8f3403501d50d1 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 10 Sep 2014 00:17:42 +0100 +Subject: [PATCH 1/2] autotools: Set a default buildDir + +So that the un-changed optimisation in setBuildDirectory works +correctly. + +Change-Id: Ie31fb2722c663cd0f998458d536181f47c83a37d +--- + src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp +index f17b1d7..29d3095 100644 +--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp ++++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp +@@ -64,7 +64,11 @@ using namespace ProjectExplorer::Constants; + ////////////////////////////////////// + AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(Target *parent) + : BuildConfiguration(parent, Core::Id(AUTOTOOLS_BC_ID)) +-{ } ++{ ++ // / is used so the un-changed check in setBuildDirectory() works correctly. ++ // The leading / is to avoid the relative the path expansion in BuildConfiguration::buildDirectory. ++ BuildConfiguration::setBuildDirectory(Utils::FileName::fromString(QString::fromLatin1("/"))); ++} + + NamedWidget *AutotoolsBuildConfiguration::createConfigWidget() + { +-- +2.4.0 + diff --git a/mingw-w64-qtcreator/0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch b/mingw-w64-qtcreator/0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch deleted file mode 100644 index 37a2b34c33..0000000000 --- a/mingw-w64-qtcreator/0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 592fb8305313bfc67131bb6cc169bd9175c0c336 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Mon, 8 Sep 2014 23:59:30 +0100 -Subject: [PATCH] debugger: Don't skip first char after "This GDB was - configured as \"" - -sizeof(needle) includes the \0 terminator, so the first letter of the -target triplet was being skipped too. This caused the architecture to -be mis-detected and (for us on MSYS2) the 32bit GDB to be selected in -64bit Kits." - -Change-Id: Id54bc320baf6cc604f2d41fa7ff05aca0756a296 ---- - src/plugins/debugger/debuggeritem.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp -index f95d2e3..fe49240 100644 ---- a/src/plugins/debugger/debuggeritem.cpp -+++ b/src/plugins/debugger/debuggeritem.cpp -@@ -110,7 +110,7 @@ void DebuggerItem::reinitializeFromFile() - // or "i686-linux-gnu" - int pos1 = ba.indexOf(needle); - if (pos1 != -1) { -- pos1 += int(sizeof(needle)); -+ pos1 += int(sizeof(needle)-1); - int pos2 = ba.indexOf('"', pos1 + 1); - QByteArray target = ba.mid(pos1, pos2 - pos1); - int pos3 = target.indexOf("--target="); --- -2.1.0 - diff --git a/mingw-w64-qtcreator/0002-autotools-Use-summaryInWorkdir.patch b/mingw-w64-qtcreator/0002-autotools-Use-summaryInWorkdir.patch deleted file mode 100644 index ec4886bc24..0000000000 --- a/mingw-w64-qtcreator/0002-autotools-Use-summaryInWorkdir.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b25518e13179bc6553bd8b0d9a0f554bcf7bd288 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Wed, 10 Sep 2014 00:20:34 +0100 -Subject: [PATCH 2/2] autotools: Use summaryInWorkdir() - -.. for the configure step. Though IMHO displaying the relative -path would look better. - -Change-Id: If5ec2597d8c4ae064281f848104a8eb99f2c5d1f ---- - src/plugins/autotoolsprojectmanager/configurestep.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/plugins/autotoolsprojectmanager/configurestep.cpp b/src/plugins/autotoolsprojectmanager/configurestep.cpp -index 06acfb9..f97f094 100644 ---- a/src/plugins/autotoolsprojectmanager/configurestep.cpp -+++ b/src/plugins/autotoolsprojectmanager/configurestep.cpp -@@ -298,6 +298,6 @@ void ConfigureStepConfigWidget::updateDetails() - param.setWorkingDirectory(bc->buildDirectory().toString()); - param.setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure")); - param.setArguments(m_configureStep->additionalArguments()); -- m_summaryText = param.summary(displayName()); -+ m_summaryText = param.summaryInWorkdir(displayName()); - emit updateSummary(); - } --- -2.1.0 - diff --git a/mingw-w64-qtcreator/PKGBUILD b/mingw-w64-qtcreator/PKGBUILD index 407b34ca67..ee9037c084 100644 --- a/mingw-w64-qtcreator/PKGBUILD +++ b/mingw-w64-qtcreator/PKGBUILD @@ -2,13 +2,12 @@ # Maintainer: Ray Donnelly _realname=qt-creator +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -# WIP for 3.? -__pre=-beta1 -_base_ver=3.3.0 -#_base_ver=3.2.2 +__pre= +_base_ver=3.5.1 pkgver=${_base_ver}${_pre} -pkgrel=1 +pkgrel=2 pkgdesc='Cross-patform IDE (mingw-w64)' url='http://qt-project.org' install=qt-creator-${CARCH}.install @@ -28,85 +27,72 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-gdb: for the debugger" #'bzr: for bazaar support' ) _pkgfqn="${_realname}-opensource-src-${_base_ver}${__pre}" -source=(http://download.qt-project.org/development_releases/qtcreator/${_base_ver%.*}/${_base_ver}${__pre}/${_pkgfqn}.tar.gz - #http://download.qt-project.org/official_releases/qtcreator/${pkgver%.*}/${pkgver}/${_pkgfqn}.tar.gz - 0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch - 0001-autotools-Allow-builds-to-be-done-in-buildDir.patch - 0001-autotools-Remove-broken-unchanged-check.patch - 0002-autotools-Use-summaryInWorkdir.patch - 0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch +source=(#http://download.qt-project.org/development_releases/qtcreator/${_base_ver%.*}/${_base_ver}${__pre}/${_pkgfqn}.tar.gz + http://download.qt-project.org/official_releases/qtcreator/${pkgver%.*}/${pkgver}/${_pkgfqn}.tar.gz qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch qt-creator-3.2.0-qbs-CONFIG-add-qbs_enable_project_file_updates.patch - qt-creator-3.2.0-qbs-fileName-to-filePath.patch qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch qt-creator-3.2.0-i[3456]86-and-x86-have-32bit-wordWidth.patch - qt-creator-3.3.0-abi-msys-is-Windows.patch) + qt-creator-3.3.0-MinGW-w64-MIB_TCP_STATE-not-defined-until-Vista.patch + qt-creator-3.5.0-shellquote-declspec-dllexport-for-unix-shell.patch + qt-creator-3.5.0-Hacky-fix-for-__GNUC_PREREQ-usage.patch + qt-creator-3.5.1-Use-systemEnvironment-For-Start-and-Debug-External-Application.patch) noextract=(${_pkgfqn}.tar.gz) -sha256sums=('96ed5896f384d0032d01870ddac51a07e936c71e5dca0c8032e23416259005e2' - '18f59946054e667b56276f53ec544d4786c3c249fee6c0bd9b0b565ed4b7cf2d' - '6c34b2bad7a24c5922d237dc67fcced14e83d65116f77cd84aa80ae2ebd4aad9' - '2f45ff4c2806c90c36f19da07707fef213e50fbf8825fe169e1bce6349efacee' - '22253cf29a2c8effebb1cc8313a0f350cf993d7fc404763063e6bd8444fa61f1' - '12aef50d3c90dfd5bcd9ac98ebd89d29a23d2420e8adf9c65d818ee2219ef21b' - '45b9fc82c7a9364450420920adcdb04a3b67eeb96f64733166da757a5ab91013' - '04715f44a2921306538500978b4e1425a17b5c2552c5f5b6561836858448d4ba' - '18479a8a8eac63ae7e8dac2f3b18a3345f8e78779cc8b56fde4dc58f0fd4ada6' +sha256sums=('5925ac818a08be919094e0f28fb4c5d8896765e0975d54d353e4c50f13d63e65' + 'b4eba129997fef75b811d0ba3ef573db23ba13e43f9dbdb0c27164ee551ba08d' + '96c14f54577bf6cadf5c12018745666a9e99cd8d6a876c29a28b13599a8cb368' + '68133c95b70c1b54e55ab4c8b31023afe4ab9a33667e4510bda64c828b95e91e' '1a1738379b0413484fd1ff3521b6bc85d034f5f964311d963dd044b4966b274b' - '8244e66b1604d10951f1b32be3269ef453c47e9eb1b80c30be79a124b697ae0a' - '835c32b31000d2ef5c0e4a1f4f7872ecce77c19ea7cf25b5956f79bfe79094f2' - '809c0499b881866424fa4d3e0d2e3ce402b127221c070a35da4b135818a79eeb' + '2915cd4bf08643057129c26c0ce28caee14586fdf6a164a96e36ce0b37966427' + '0b0bba8bda0fd8247563e3827f58fe73baed17b09b9de6ea28375b7f1afa3ee1' '79fc4d2ef02ff8f458b1b330c683c2a86397f056369c90176a9ddbeba3b719fd' - 'c4cae708825102d538e1ecb9a88ecb216d366feb779553a2e91f97c4b78f8427') + 'b4cf07e2772b2ec6710ee7df6463feddb4195d65fa59e6c6095fbc0cb240417e' + '802376acf3bc4546db60efdc026b348c4d09485b532a8db31d51d9e3fb74cecc' + '06ff443b53c6f49ff5f2f62d39485ea5a78e5a332bf11082a0e2e4d25dd29f38' + '7cb146d011da934e374343630023e6dbe83f8bfba615b7fe2b51dd2599253c76') + prepare() { - cd $startdir/ - [ -d ${srcdir}/${_pkgfqn} ] && rm -rf ${srcdir}/${_pkgfqn} - tar -xzf ${startdir}/${_pkgfqn}.tar.gz -C $srcdir || true + [[ -d ${srcdir}/${_pkgfqn} ]] && rm -rf ${srcdir}/${_pkgfqn} + tar -xzf ${srcdir}/${_pkgfqn}.tar.gz -C $srcdir || true cd ${srcdir}/${_pkgfqn} -# Not needed for > 3.2.2 -# patch -p1 -i "${srcdir}"/0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch - -# Attempting to upstream: https://codereview.qt-project.org/#/c/93073/ -# patch -p1 -i "${srcdir}"/0001-autotools-Allow-builds-to-be-done-in-buildDir.patch - -# Attempting to upstream: https://codereview.qt-project.org/#/c/94366/ - patch -p1 -i "${srcdir}"/0001-autotools-Remove-broken-unchanged-check.patch -# patch -p1 -i "${srcdir}"/0002-autotools-Use-summaryInWorkdir.patch -# Already upstreamed: https://codereview.qt-project.org/#/c/94248/ -# patch -p1 -i "${srcdir}"/0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch patch -p1 -i "${srcdir}"/qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch patch -p1 -i "${srcdir}"/qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch patch -p1 -i "${srcdir}"/qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch patch -p1 -i "${srcdir}"/qt-creator-3.2.0-qbs-CONFIG-add-qbs_enable_project_file_updates.patch -# This one is only needed if you want to use qbs-git instead of qbs. -# patch -p1 -i "${srcdir}"/qt-creator-3.2.0-qbs-fileName-to-filePath.patch + patch -p1 -i "${srcdir}"/qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch patch -p1 -i "${srcdir}"/qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch patch -p1 -i "${srcdir}"/qt-creator-3.2.0-i[3456]86-and-x86-have-32bit-wordWidth.patch - patch -p1 -i "${srcdir}"/qt-creator-3.3.0-abi-msys-is-Windows.patch + patch -p1 -i "${srcdir}"/qt-creator-3.3.0-MinGW-w64-MIB_TCP_STATE-not-defined-until-Vista.patch + + patch -p1 -i "${srcdir}"/qt-creator-3.5.0-shellquote-declspec-dllexport-for-unix-shell.patch + # Arguably mingw-w64 headers should define __GNUC_PREREQ (_mingw.h defines __MINGW_GNUC_PREREQ) + # .. otherwise perhaps GCC should define this always (on GNU/Linux, glibc's features.h defines it) + patch -p1 -i "${srcdir}"/qt-creator-3.5.0-Hacky-fix-for-__GNUC_PREREQ-usage.patch + patch -p1 -i "${srcdir}"/qt-creator-3.5.1-Use-systemEnvironment-For-Start-and-Debug-External-Application.patch # Use system installed qbs rm -rf src/shared/qbs } build() { - [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} export LLVM_INSTALL_DIR=${MINGW_PREFIX} export QBS_INSTALL_DIR=${MINGW_PREFIX} - export LLVM_STATIC=1 if check_option "debug" "y"; then _config_variant=debug else _config_variant=release fi ${MINGW_PREFIX}/bin/qmake.exe ../${_pkgfqn}/qtcreator.pro CONFIG+=${_config_variant} - make + make ${_config_variant} make docs } @@ -114,15 +100,16 @@ package() { cd ${srcdir}/build-${MINGW_CHOST} make INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" install make INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" install_docs - + install -Dm644 ${srcdir}/${_pkgfqn}/LGPL_EXCEPTION.TXT ${pkgdir}${MINGW_PREFIX}/share/licenses/qtcreator/LGPL_EXCEPTION.TXT } # Please leave this block here as I use # it to quickly make and test changes. # return 0 +# Debugger ProjectExplorer # ALLGOOD="yes" -# PLUGINS="Debugger ProjectExplorer AutotoolsProjectManager" +# PLUGINS="Debugger" # for PLUGIN in $PLUGINS; do # PLUGINLC=$(echo ${PLUGIN} | tr 'A-Z' 'a-z') # pushd src/build-x86_64-w64-mingw32/src/plugins/${PLUGINLC} @@ -140,9 +127,11 @@ package() { # for PLUGIN in $PLUGINS; do # PLUGINLC=$(echo ${PLUGIN} | tr 'A-Z' 'a-z') # pushd src/build-x86_64-w64-mingw32/src/plugins/${PLUGINLC} +# PATH=/mingw64/bin:$PATH make # cp ../../../lib/qtcreator/plugins/${PLUGIN}d.dll /mingw64/lib/qtcreator/plugins/ # popd # done -# /mingw64/bin/qtcreator & +# PATH=/mingw64/bin:$PATH /mingw64/bin/qtcreator & # ) # fi +# diff --git a/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch b/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch index 5a1b9db8eb..35cbdf86d5 100644 --- a/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch +++ b/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch @@ -5,6 +5,6 @@ \"Version\" : \"$$QTCREATOR_VERSION\", \"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\", - \"Platform\" : \"OS X.*\", - \"Vendor\" : \"Digia Plc\", - \"Copyright\" : \"(C) 2014 Digia Plc\", + \"Vendor\" : \"The Qt Company Ltd\", + \"Copyright\" : \"(C) 2015 The Qt Company Ltd\", \"License\" : [ \"Commercial Usage\", diff --git a/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch b/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch index 97bd4f5ffd..601a6d623a 100644 --- a/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch +++ b/mingw-w64-qtcreator/qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch @@ -1,55 +1,20 @@ ---- qt-creator-opensource-src-3.2.0-rc1/src/plugins/clangcodemodel/clang_installation.pri.orig 2014-08-01 10:17:30.000000000 +0100 -+++ qt-creator-opensource-src-3.2.0-rc1/src/plugins/clangcodemodel/clang_installation.pri 2014-08-17 20:14:44.611209200 +0100 -@@ -50,7 +50,7 @@ - error("Cannot find clang shared library at $${LLVM_INSTALL_DIR}") +--- qt-creator-opensource-src-3.5.0-beta1/src/shared/clang/clang_installation.pri.orig 2015-07-07 14:02:27.000000000 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/shared/clang/clang_installation.pri 2015-07-08 16:29:43.546384900 +0100 +@@ -40,7 +40,7 @@ + } } -win32 { +win32:!win32-g++ { LLVM_INCLUDEPATH = "$$LLVM_INSTALL_DIR/include" - CLANG_LIB_PATH = $$findClangOnWindows() - CLANG_LIB = clang -@@ -61,7 +61,7 @@ - LLVM_VERSION = 3.4 + LLVM_LIBDIR = $$findClangOnWindows() + isEmpty(LLVM_LIBDIR): error("Cannot find clang shared library at $${LLVM_INSTALL_DIR}") +@@ -53,7 +53,7 @@ + LLVM_LIBS += -ladvapi32 -lshell32 } -unix { +unix|win32-g++ { - LLVM_CONFIG = $$findLLVMConfig() - - LLVM_VERSION = $$system($$LLVM_CONFIG --version) -@@ -93,7 +93,33 @@ - } - - LLVM_LIBS = -L$${LLVM_LIBDIR} -- LLVM_LIBS += -l$${CLANG_LIB} -+ -+ LLVM_STATIC = $$(LLVM_STATIC) -+ isEqual($$(LLVM_STATIC), 0): { -+ LLVM_LIBS += -l$${CLANG_LIB} -+ } else { -+ # Since there is no clang-config .. -+ LLVM_LIBS += -Wl,--start-group -+ CLANG_LIBS = $$files($${LLVM_LIBDIR}/libclang*) -+ for (CLANG_LIB, CLANG_LIBS) { -+ CLANG_LIB = $$basename(CLANG_LIB) -+ CLANG_LIB ~= s,^$$QMAKE_PREFIX_STATICLIB,, -+ CLANG_LIB ~= s,\.$$QMAKE_EXTENSION_STATICLIB\$,, -+ LLVM_LIBS += -l$${CLANG_LIB} -+ } -+ # We might want to try "$$LLVM_CONFIG --libs analysis" instead. -+ LLVM_LIBS += $$system($$LLVM_CONFIG --libs) -+ LLVM_LIBS += $$system($$LLVM_CONFIG --system-libs) -+ LLVM_LIBS += -Wl,--end-group -+ } -+} -+ -+# llvm-config --ldflags could be used here, but -+# that lists lots of unnecessary libraries: -+# llvm-config.exe --ldflags -+# -LC:\msys64\mingw64/lib -lz -lffi -lncurses -lshell32 -lpsapi -limagehlp -lm -+win32 { -+ LLVM_LIBS += -limagehlp - } - - DEFINES += CLANG_VERSION=\\\"$${LLVM_VERSION}\\\" + llvm_config = $$LLVM_INSTALL_DIR/bin/llvm-config + exists($$llvm_config) { + #message("llvm-config found, querying it for paths and version") diff --git a/mingw-w64-qtcreator/qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch b/mingw-w64-qtcreator/qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch index bdfd8bff0d..5c60e5da44 100644 --- a/mingw-w64-qtcreator/qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch +++ b/mingw-w64-qtcreator/qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch @@ -31,13 +31,13 @@ + } return Core::ICore::resourcePath() + QLatin1String("/qbs"); } - + @@ -167,7 +173,7 @@ { const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR); if (!qbsInstallDir.isEmpty()) - return qbsInstallDir + QLatin1String("/lib/"); + return resourcesBaseDirectory() + QLatin1String("/lib/"); - if (Utils::HostOsInfo::isMacHost()) + if (HostOsInfo::isMacHost()) return QDir::cleanPath(QCoreApplication::applicationDirPath() + QLatin1String("/../PlugIns")); diff --git a/mingw-w64-qtcreator/qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch b/mingw-w64-qtcreator/qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch index 3715c1f784..9dde3a7698 100644 --- a/mingw-w64-qtcreator/qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch +++ b/mingw-w64-qtcreator/qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch @@ -1,7 +1,7 @@ -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autogenstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autogenstep.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autogenstep.cpp 2014-08-23 23:40:48.876515200 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autogenstep.cpp 2014-08-23 23:41:22.947841700 +0100 -@@ -33,6 +33,7 @@ +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autogenstep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autogenstep.cpp +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autogenstep.cpp 2015-04-14 19:57:23.551710900 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autogenstep.cpp 2015-04-14 19:57:53.638531400 +0100 +@@ -34,6 +34,7 @@ #include "autotoolsproject.h" #include "autotoolsbuildconfiguration.h" #include "autotoolsprojectconstants.h" @@ -9,7 +9,7 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag #include #include -@@ -157,11 +158,12 @@ +@@ -158,11 +159,12 @@ ProcessParameters *pp = processParameters(); pp->setMacroExpander(bc->macroExpander()); @@ -25,7 +25,7 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag pp->resolveAll(); return AbstractProcessStep::init(); -@@ -276,11 +278,12 @@ +@@ -277,11 +279,12 @@ ProcessParameters param; param.setMacroExpander(bc->macroExpander()); @@ -41,10 +41,10 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag m_summaryText = param.summary(displayName()); emit updateSummary(); } -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp 2014-08-23 23:40:48.875515000 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp 2014-08-23 23:41:22.971344700 +0100 -@@ -33,6 +33,7 @@ +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp 2015-04-14 19:57:23.552210900 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp 2015-04-14 19:57:53.676036200 +0100 +@@ -34,6 +34,7 @@ #include "autotoolsproject.h" #include "autotoolsbuildconfiguration.h" #include "autotoolsprojectconstants.h" @@ -52,7 +52,7 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag #include #include -@@ -156,11 +157,12 @@ +@@ -157,11 +158,12 @@ ProcessParameters *pp = processParameters(); pp->setMacroExpander(bc->macroExpander()); @@ -84,9 +84,9 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag m_summaryText = param.summary(displayName()); emit updateSummary(); } -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro 2014-08-23 23:40:48.872514600 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro 2014-08-23 23:41:22.971844700 +0100 +diff -urN qt-creator-opensource-src-3.4.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro qt-creator-opensource-src-3.4.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro +--- qt-creator-opensource-src-3.4.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro 2015-04-21 16:56:56.000000000 +0100 ++++ qt-creator-opensource-src-3.4.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro 2015-04-24 00:37:06.163960200 +0100 @@ -14,7 +14,8 @@ autoreconfstep.h\ configurestep.h\ @@ -97,18 +97,17 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag SOURCES = autotoolsprojectplugin.cpp\ autotoolsopenprojectwizard.cpp\ autotoolsmanager.cpp\ -@@ -28,5 +29,6 @@ +@@ -28,4 +29,5 @@ autoreconfstep.cpp\ configurestep.cpp\ makefileparserthread.cpp\ - makefileparser.cpp + makefileparser.cpp\ + shellprocessparameters.cpp - RESOURCES += autotoolsproject.qrc -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs 2014-08-23 23:40:48.872514600 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs 2014-08-23 23:41:22.972844800 +0100 -@@ -43,5 +43,7 @@ +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs 2015-04-14 19:57:23.592716100 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs 2015-04-14 19:57:53.873561300 +0100 +@@ -41,5 +41,7 @@ "makefileparserthread.h", "makestep.cpp", "makestep.h", @@ -116,9 +115,9 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag + "shellprocessparameters.h", ] } -diff -urN qt-creator-opensource-src-3.3.0-beta1/src/plugins/autotoolsprojectmanager/configurestep.cpp qt-creator-opensource-src-3.3.0-beta1/src/plugins/autotoolsprojectmanager/configurestep.cpp ---- qt-creator-opensource-src-3.3.0-beta1/src/plugins/autotoolsprojectmanager/configurestep.cpp.orig 2014-10-29 08:44:30.000000000 +0000 -+++ qt-creator-opensource-src-3.3.0-beta1/src/plugins/autotoolsprojectmanager/configurestep.cpp 2014-10-31 21:09:11.552127200 +0000 +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/configurestep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/configurestep.cpp +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/configurestep.cpp 2015-04-14 19:57:23.594216300 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/configurestep.cpp 2015-04-14 19:57:53.912566200 +0100 @@ -34,6 +34,7 @@ #include "autotoolsproject.h" #include "autotoolsbuildconfiguration.h" @@ -157,10 +156,10 @@ diff -urN qt-creator-opensource-src-3.3.0-beta1/src/plugins/autotoolsprojectmana m_summaryText = param.summaryInWorkdir(displayName()); emit updateSummary(); } -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/makestep.cpp qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/makestep.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/makestep.cpp 2014-08-23 23:40:48.875015000 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/makestep.cpp 2014-08-23 23:41:22.975845200 +0100 -@@ -33,6 +33,7 @@ +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/makestep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/makestep.cpp +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/makestep.cpp 2015-04-14 19:57:23.637221700 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/makestep.cpp 2015-04-14 19:57:53.927568100 +0100 +@@ -34,6 +34,7 @@ #include "autotoolsproject.h" #include "autotoolsprojectconstants.h" #include "autotoolsbuildconfiguration.h" @@ -168,7 +167,7 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag #include #include -@@ -187,10 +188,8 @@ +@@ -188,10 +189,8 @@ // Force output to english for the parsers. Do this here and not in the toolchain's // addToEnvironment() to not screw up the users run environment. env.set(QLatin1String("LC_ALL"), QLatin1String("C")); @@ -180,7 +179,7 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag pp->resolveAll(); setOutputParser(new GnuMakeParser()); -@@ -311,10 +310,8 @@ +@@ -312,10 +311,8 @@ ProcessParameters param; param.setMacroExpander(bc->macroExpander()); @@ -192,10 +191,10 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag m_summaryText = param.summary(displayName()); } else { m_summaryText = QLatin1String("") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String(""); -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp 2014-08-23 23:41:22.977345400 +0100 -@@ -0,0 +1,86 @@ +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp 2015-04-14 20:04:01.013682100 +0100 +@@ -0,0 +1,89 @@ +/************************************************************************** +** +** Copyright (C) 2014 Ray Donnelly. @@ -246,8 +245,11 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag + + QLatin1String("\\..\\..\\usr\\bin")).absoluteFilePath(); + QString sh_exe = QFileInfo(sh_dir + + QLatin1String("\\sh.exe")).absoluteFilePath(); ++ QString sh_dir_native = QDir::toNativeSeparators(sh_dir); + Utils::Environment envCopy(env); -+ envCopy.prependOrSetPath(sh_dir); ++ if (!env.path().contains(sh_dir) && !env.path().contains(sh_dir_native)) { ++ envCopy.prependOrSetPath(sh_dir); ++ } + procParams->setEnvironment(envCopy); + procParams->setCommand(sh_exe); + procParams->setArguments(QLatin1String("-c \"") @@ -282,9 +284,9 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag + makeCommand, + args); +} -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.h qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/shellprocessparameters.h ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/shellprocessparameters.h 2014-08-23 23:41:22.978345500 +0100 +diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.h qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.h +--- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.h 1970-01-01 01:00:00.000000000 +0100 ++++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.h 2015-04-14 19:57:53.980574800 +0100 @@ -0,0 +1,49 @@ +/************************************************************************** +** diff --git a/mingw-w64-qtcreator/qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch b/mingw-w64-qtcreator/qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch index cac027d8ea..4d5b2e19a3 100644 --- a/mingw-w64-qtcreator/qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch +++ b/mingw-w64-qtcreator/qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch @@ -15,20 +15,6 @@ diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanag m_runAutogen = true; } -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.mimetypes.xml qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.mimetypes.xml ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.mimetypes.xml 2014-08-18 08:52:02.000000000 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.mimetypes.xml 2014-09-01 23:57:49.459715700 +0100 -@@ -2,7 +2,8 @@ - - - -- Automake based Makefile -- -+ Autoconf or Automake based Makefile -+ -+ - - diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/makefileparser.cpp qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/makefileparser.cpp --- qt-creator-opensource-src-3.2.0.orig/src/plugins/autotoolsprojectmanager/makefileparser.cpp 2014-08-18 08:52:02.000000000 +0100 +++ qt-creator-opensource-src-3.2.0/src/plugins/autotoolsprojectmanager/makefileparser.cpp 2014-09-01 23:16:11.672850400 +0100 diff --git a/mingw-w64-qtcreator/qt-creator-3.2.0-qbs-fileName-to-filePath.patch b/mingw-w64-qtcreator/qt-creator-3.2.0-qbs-fileName-to-filePath.patch deleted file mode 100644 index aabc12a52f..0000000000 --- a/mingw-w64-qtcreator/qt-creator-3.2.0-qbs-fileName-to-filePath.patch +++ /dev/null @@ -1,207 +0,0 @@ -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsbuildstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsbuildstep.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsbuildstep.cpp 2014-08-19 12:50:15.621530300 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsbuildstep.cpp 2014-08-19 13:30:13.985530300 +0100 -@@ -221,7 +221,7 @@ - // Report errors: - foreach (const qbs::ErrorItem &item, m_job->error().items()) - createTaskAndOutput(ProjectExplorer::Task::Error, item.description(), -- item.codeLocation().fileName(), item.codeLocation().line()); -+ item.codeLocation().filePath(), item.codeLocation().line()); - - QbsProject *pro = static_cast(project()); - -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbscleanstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbscleanstep.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbscleanstep.cpp 2014-08-19 12:50:15.630530300 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbscleanstep.cpp 2014-08-19 13:30:13.989530300 +0100 -@@ -181,7 +181,7 @@ - // Report errors: - foreach (const qbs::ErrorItem &item, m_job->error().items()) { - createTaskAndOutput(ProjectExplorer::Task::Error, item.description(), -- item.codeLocation().fileName(), item.codeLocation().line()); -+ item.codeLocation().filePath(), item.codeLocation().line()); - } - - QTC_ASSERT(m_fi, return); -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsinstallstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsinstallstep.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsinstallstep.cpp 2014-08-19 12:50:15.608530300 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsinstallstep.cpp 2014-08-19 13:30:13.992530300 +0100 -@@ -191,7 +191,7 @@ - // Report errors: - foreach (const qbs::ErrorItem &item, m_job->error().items()) { - createTaskAndOutput(ProjectExplorer::Task::Error, item.description(), -- item.codeLocation().fileName(), item.codeLocation().line()); -+ item.codeLocation().filePath(), item.codeLocation().line()); - } - - QTC_ASSERT(m_fi, return); -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbslogsink.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbslogsink.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbslogsink.cpp 2014-08-19 12:50:15.666530300 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbslogsink.cpp 2014-08-19 13:30:13.995530300 +0100 -@@ -72,7 +72,7 @@ - foreach (const qbs::ErrorItem &item, warning.items()) - emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning, - item.description(), -- Utils::FileName::fromString(item.codeLocation().fileName()), -+ Utils::FileName::fromString(item.codeLocation().filePath()), - item.codeLocation().line(), - ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); - } -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsnodes.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsnodes.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsnodes.cpp 2014-08-19 12:50:15.616530300 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsnodes.cpp 2014-08-19 13:30:13.999530300 +0100 -@@ -348,7 +348,7 @@ - - setIcon(m_groupIcon); - -- QbsFileNode *idx = new QbsFileNode(grp->location().fileName(), -+ QbsFileNode *idx = new QbsFileNode(grp->location().filePath(), - ProjectExplorer::ProjectFileType, false, - grp->location().line()); - addFileNodes(QList() << idx); -@@ -428,7 +428,7 @@ - m_productPath = productPath; - m_qbsGroupData = grp; - -- setPath(grp->location().fileName()); -+ setPath(grp->location().filePath()); - setDisplayName(grp->name()); - - QbsFileNode *idx = 0; -@@ -438,7 +438,7 @@ - break; - } - QTC_ASSERT(idx, return); -- idx->setPathAndLine(grp->location().fileName(), grp->location().line()); -+ idx->setPathAndLine(grp->location().filePath(), grp->location().line()); - - setupFiles(this, grp->allFilePaths(), productPath, updateExisting); - -@@ -545,14 +545,14 @@ - // -------------------------------------------------------------------- - - QbsProductNode::QbsProductNode(const qbs::ProductData &prd) : -- QbsBaseProjectNode(prd.location().fileName()) -+ QbsBaseProjectNode(prd.location().filePath()) - { - if (m_productIcon.isNull()) - m_productIcon = generateIcon(QString::fromLatin1(Constants::QBS_PRODUCT_OVERLAY_ICON)); - - setIcon(m_productIcon); - -- ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().fileName(), -+ ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().filePath(), - ProjectExplorer::ProjectFileType, false, - prd.location().line()); - addFileNodes(QList() << idx); -@@ -627,8 +627,8 @@ - bool updateExisting = productWasEnabled != productIsEnabled; - - setDisplayName(prd.name()); -- setPath(prd.location().fileName()); -- const QString &productPath = QFileInfo(prd.location().fileName()).absolutePath(); -+ setPath(prd.location().filePath()); -+ const QString &productPath = QFileInfo(prd.location().filePath()).absolutePath(); - - // Find the QbsFileNode we added earlier: - QbsFileNode *idx = 0; -@@ -638,7 +638,7 @@ - break; - } - QTC_ASSERT(idx, return); -- idx->setPathAndLine(prd.location().fileName(), prd.location().line()); -+ idx->setPathAndLine(prd.location().filePath(), prd.location().line()); - - QList toAdd; - QList toRemove = subProjectNodes(); -@@ -726,7 +726,7 @@ - foreach (const qbs::ProjectData &subData, prjData.subProjects()) { - QbsProjectNode *qn = findProjectNode(subData.name()); - if (!qn) { -- QbsProjectNode *subProject = new QbsProjectNode(subData.location().fileName()); -+ QbsProjectNode *subProject = new QbsProjectNode(subData.location().filePath()); - subProject->update(subData); - toAdd << subProject; - } else { -@@ -831,13 +831,13 @@ - static QSet referencedBuildSystemFiles(const qbs::ProjectData &data) - { - QSet result; -- result.insert(data.location().fileName()); -+ result.insert(data.location().filePath()); - foreach (const qbs::ProjectData &subProject, data.subProjects()) - result.unite(referencedBuildSystemFiles(subProject)); - foreach (const qbs::ProductData &product, data.products()) { -- result.insert(product.location().fileName()); -+ result.insert(product.location().filePath()); - foreach (const qbs::GroupData &group, product.groups()) -- result.insert(group.location().fileName()); -+ result.insert(group.location().filePath()); - } - - return result; -diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsproject.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsproject.cpp ---- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsproject.cpp 2014-08-19 12:50:15.650530300 +0100 -+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsproject.cpp 2014-08-19 13:30:14.004530300 +0100 -@@ -165,14 +165,14 @@ - - static void collectFilesForProject(const qbs::ProjectData &project, QSet &result) - { -- result.insert(project.location().fileName()); -+ result.insert(project.location().filePath()); - foreach (const qbs::ProductData &prd, project.products()) { - foreach (const qbs::GroupData &grp, prd.groups()) { - foreach (const QString &file, grp.allFilePaths()) - result.insert(file); -- result.insert(grp.location().fileName()); -+ result.insert(grp.location().filePath()); - } -- result.insert(prd.location().fileName()); -+ result.insert(prd.location().filePath()); - } - foreach (const qbs::ProjectData &subProject, project.subProjects()) - collectFilesForProject(subProject, result); -@@ -229,7 +229,7 @@ - { - QTC_ASSERT(m_qbsProject.isValid(), return false); - QStringList allPaths = groupData.allFilePaths(); -- const QString productFilePath = productData.location().fileName(); -+ const QString productFilePath = productData.location().filePath(); - ChangeExpector expector(productFilePath, m_qbsDocuments); - foreach (const QString &path, filePaths) { - qbs::ErrorInfo err = m_qbsProject.addFiles(productData, groupData, QStringList() << path); -@@ -254,7 +254,7 @@ - { - QTC_ASSERT(m_qbsProject.isValid(), return false); - QStringList allPaths = groupData.allFilePaths(); -- const QString productFilePath = productData.location().fileName(); -+ const QString productFilePath = productData.location().filePath(); - ChangeExpector expector(productFilePath, m_qbsDocuments); - foreach (const QString &path, filePaths) { - qbs::ErrorInfo err -@@ -546,7 +546,7 @@ - foreach (const qbs::ErrorItem &item, e.items()) - TaskHub::addTask(Task::Error, item.description(), - ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM, -- FileName::fromString(item.codeLocation().fileName()), -+ FileName::fromString(item.codeLocation().filePath()), - item.codeLocation().line()); - - } -@@ -690,7 +690,7 @@ - part->project = this; - part->displayName = grp.name(); - part->projectFile = QString::fromLatin1("%1:%2:%3") -- .arg(grp.location().fileName()) -+ .arg(grp.location().filePath()) - .arg(grp.location().line()) - .arg(grp.location().column()); - part->evaluateToolchain(ToolChainKitInformation::toolChain(k), -@@ -761,7 +761,7 @@ - if (!ta.isExecutable()) - continue; - applications.list << ProjectExplorer::BuildTargetInfo(Utils::FileName::fromString(ta.filePath()), -- Utils::FileName::fromString(productData.location().fileName())); -+ Utils::FileName::fromString(productData.location().filePath())); - } - } - activeTarget()->setApplicationTargets(applications); diff --git a/mingw-w64-qtcreator/qt-creator-3.3.0-MinGW-w64-MIB_TCP_STATE-not-defined-until-Vista.patch b/mingw-w64-qtcreator/qt-creator-3.3.0-MinGW-w64-MIB_TCP_STATE-not-defined-until-Vista.patch new file mode 100644 index 0000000000..f3c0624440 --- /dev/null +++ b/mingw-w64-qtcreator/qt-creator-3.3.0-MinGW-w64-MIB_TCP_STATE-not-defined-until-Vista.patch @@ -0,0 +1,12 @@ +diff -urN qt-creator-opensource-src-3.3.0.orig/src/libs/utils/tcpportsgatherer.cpp qt-creator-opensource-src-3.3.0/src/libs/utils/tcpportsgatherer.cpp +--- qt-creator-opensource-src-3.3.0.orig/src/libs/utils/tcpportsgatherer.cpp 2015-01-17 17:41:08.077068900 +0000 ++++ qt-creator-opensource-src-3.3.0/src/libs/utils/tcpportsgatherer.cpp 2015-01-17 17:41:47.081521900 +0000 +@@ -47,7 +47,7 @@ + #if defined(Q_OS_WIN) && defined(Q_CC_MINGW) + + // Missing declarations for MinGW 32. +-#if __GNUC__ == 4 && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 2) ++#if (__GNUC__ == 4 && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 2)) || (_WIN32_WINNT < 0x0600) + typedef enum { } MIB_TCP_STATE; + #endif + diff --git a/mingw-w64-qtcreator/qt-creator-3.3.0-abi-msys-is-Windows.patch b/mingw-w64-qtcreator/qt-creator-3.3.0-abi-msys-is-Windows.patch deleted file mode 100644 index e2c8a5fcb9..0000000000 --- a/mingw-w64-qtcreator/qt-creator-3.3.0-abi-msys-is-Windows.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- qt-creator-opensource-src-3.3.0-beta1/src/plugins/projectexplorer/abi.cpp.orig 2014-10-31 20:26:14.246865700 +0000 -+++ qt-creator-opensource-src-3.3.0-beta1/src/plugins/projectexplorer/abi.cpp 2014-10-31 22:51:06.558037400 +0000 -@@ -497,7 +497,8 @@ - if (flavor == Abi::UnknownFlavor) - flavor = Abi::FreeBsdFlavor; - format = Abi::ElfFormat; -- } else if (p == QLatin1String("mingw32") || p == QLatin1String("win32") || p == QLatin1String("mingw32msvc")) { -+ } else if (p == QLatin1String("mingw32") || p == QLatin1String("win32") -+ || p == QLatin1String("mingw32msvc") || p == QLatin1String("msys")) { - arch = Abi::X86Architecture; - os = Abi::WindowsOS; - flavor = Abi::WindowsMSysFlavor; diff --git a/mingw-w64-qtcreator/qt-creator-3.5.0-Hacky-fix-for-__GNUC_PREREQ-usage.patch b/mingw-w64-qtcreator/qt-creator-3.5.0-Hacky-fix-for-__GNUC_PREREQ-usage.patch new file mode 100644 index 0000000000..9828cc4c79 --- /dev/null +++ b/mingw-w64-qtcreator/qt-creator-3.5.0-Hacky-fix-for-__GNUC_PREREQ-usage.patch @@ -0,0 +1,80 @@ +diff -urN qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/projectpartsdonotexistexception.h qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/projectpartsdonotexistexception.h +--- qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/projectpartsdonotexistexception.h 2015-08-02 00:11:35.019827900 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/projectpartsdonotexistexception.h 2015-08-02 00:13:59.523677600 +0100 +@@ -35,6 +35,12 @@ + + #include + ++#if defined(__GNUC__) && !defined(__clang__) && !defined(_GNUC_PREREQ) ++# if defined(__MINGW64_VERSION_MAJOR) ++# define __GNUC_PREREQ __MINGW_GNUC_PREREQ ++# endif ++#endif ++ + namespace ClangBackEnd { + + class ProjectPartDoNotExistException : public std::exception +diff -urN qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitdoesnotexistexception.h qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitdoesnotexistexception.h +--- qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitdoesnotexistexception.h 2015-08-02 00:11:35.019827900 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitdoesnotexistexception.h 2015-08-02 00:13:55.365649500 +0100 +@@ -33,6 +33,12 @@ + + #include + ++#if defined(__GNUC__) && !defined(__clang__) && !defined(_GNUC_PREREQ) ++# if defined(__MINGW64_VERSION_MAJOR) ++# define __GNUC_PREREQ __MINGW_GNUC_PREREQ ++# endif ++#endif ++ + namespace ClangBackEnd { + + class TranslationUnitDoesNotExistException : public std::exception +diff -urN qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitfilenotexitexception.h qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitfilenotexitexception.h +--- qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitfilenotexitexception.h 2015-08-02 00:11:35.020328000 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitfilenotexitexception.h 2015-08-02 00:13:51.642676800 +0100 +@@ -35,6 +35,12 @@ + + #include + ++#if defined(__GNUC__) && !defined(__clang__) && !defined(_GNUC_PREREQ) ++# if defined(__MINGW64_VERSION_MAJOR) ++# define __GNUC_PREREQ __MINGW_GNUC_PREREQ ++# endif ++#endif ++ + namespace ClangBackEnd { + + class TranslationUnitFileNotExitsException : public std::exception +diff -urN qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitisnullexception.h qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitisnullexception.h +--- qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitisnullexception.h 2015-08-02 00:11:35.021328100 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitisnullexception.h 2015-08-02 00:13:48.855322800 +0100 +@@ -35,6 +35,12 @@ + + #include + ++#if defined(__GNUC__) && !defined(__clang__) && !defined(_GNUC_PREREQ) ++# if defined(__MINGW64_VERSION_MAJOR) ++# define __GNUC_PREREQ __MINGW_GNUC_PREREQ ++# endif ++#endif ++ + namespace ClangBackEnd { + + class TranslationUnitIsNullException : public std::exception +diff -urN qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitparseerrorexception.h qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitparseerrorexception.h +--- qt-creator-opensource-src-3.5.0-beta1.orig/src/tools/clangbackend/ipcsource/translationunitparseerrorexception.h 2015-08-02 00:11:35.020828000 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/tools/clangbackend/ipcsource/translationunitparseerrorexception.h 2015-08-02 00:13:45.302371700 +0100 +@@ -35,6 +35,12 @@ + + #include + ++#if defined(__GNUC__) && !defined(__clang__) && !defined(_GNUC_PREREQ) ++# if defined(__MINGW64_VERSION_MAJOR) ++# define __GNUC_PREREQ __MINGW_GNUC_PREREQ ++# endif ++#endif ++ + namespace ClangBackEnd { + + class TranslationUnitParseErrorException : public std::exception diff --git a/mingw-w64-qtcreator/qt-creator-3.5.0-shellquote-declspec-dllexport-for-unix-shell.patch b/mingw-w64-qtcreator/qt-creator-3.5.0-shellquote-declspec-dllexport-for-unix-shell.patch new file mode 100644 index 0000000000..8490551b14 --- /dev/null +++ b/mingw-w64-qtcreator/qt-creator-3.5.0-shellquote-declspec-dllexport-for-unix-shell.patch @@ -0,0 +1,11 @@ +--- qt-creator-opensource-src-3.5.0-beta1/src/libs/3rdparty/sqlite/sqlite.pri.orig 2015-07-07 14:02:27.000000000 +0100 ++++ qt-creator-opensource-src-3.5.0-beta1/src/libs/3rdparty/sqlite/sqlite.pri 2015-07-08 18:22:04.719461900 +0100 +@@ -7,7 +7,7 @@ + + SOURCES += $$PWD/sqlite3.c + +-win32:DEFINES += SQLITE_API=__declspec(dllexport) ++win32:DEFINES += $$shell_quote(SQLITE_API=__declspec(dllexport)) + unix:DEFINES += SQLITE_API=\"__attribute__((visibility(\\\"default\\\")))\" + + gcc { diff --git a/mingw-w64-qtcreator/qt-creator-3.5.1-Use-systemEnvironment-For-Start-and-Debug-External-Application.patch b/mingw-w64-qtcreator/qt-creator-3.5.1-Use-systemEnvironment-For-Start-and-Debug-External-Application.patch new file mode 100644 index 0000000000..ae3a3a7b27 --- /dev/null +++ b/mingw-w64-qtcreator/qt-creator-3.5.1-Use-systemEnvironment-For-Start-and-Debug-External-Application.patch @@ -0,0 +1,10 @@ +--- qt-creator-opensource-src-3.5.1/src/plugins/debugger/debuggerplugin.cpp.orig 2015-12-13 23:13:54.758957800 +0000 ++++ qt-creator-opensource-src-3.5.1/src/plugins/debugger/debuggerplugin.cpp 2015-12-13 23:13:56.742161300 +0000 +@@ -1297,6 +1297,7 @@ + void DebuggerPluginPrivate::startAndDebugApplication() + { + DebuggerRunParameters rp; ++ rp.environment = Environment::systemEnvironment(); + Kit *kit; + if (StartApplicationDialog::run(ICore::dialogParent(), &rp, &kit)) + createAndScheduleRun(rp, kit); diff --git a/mingw-w64-qtcreator/qt-creator-i686.install b/mingw-w64-qtcreator/qt-creator-i686.install index 1ff2df884f..640ea3fbf9 100644 --- a/mingw-w64-qtcreator/qt-creator-i686.install +++ b/mingw-w64-qtcreator/qt-creator-i686.install @@ -79,19 +79,19 @@ post_install() { _mingw_variant_idsuffix="_x86_64" fi - ./sdktool.exe rmQt "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" > /dev/null 2>&1 || true + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" > /dev/null 2>&1 || true ./sdktool.exe addQt \ - "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ - "--name" "Qt 5.3${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ + "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ + "--name" "Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ "--type" "Qt4ProjectManager.QtVersion.Desktop" \ "--qmake" "/${_mingw_variant}${_library_variant_prefix}/bin/qmake.exe" - ./sdktool.exe rmKit "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" > /dev/null 2>&1 || true + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" > /dev/null 2>&1 || true ./sdktool.exe addKit \ - "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" \ - "--name" "Desktop Qt 5.3${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ + "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" \ + "--name" "Desktop Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ "--toolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64${_mingw_variant_idsuffix}" \ - "--qt" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ + "--qt" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ "--debuggerengine" "1" \ "--debugger" "/${_mingw_variant}/bin/gdb.exe" \ "--devicetype" "Desktop" diff --git a/mingw-w64-qtcreator/qt-creator-x86_64.install b/mingw-w64-qtcreator/qt-creator-x86_64.install index a19d052a51..6f84940d40 100644 --- a/mingw-w64-qtcreator/qt-creator-x86_64.install +++ b/mingw-w64-qtcreator/qt-creator-x86_64.install @@ -79,19 +79,19 @@ post_install() { _mingw_variant_idsuffix="_x86_64" fi - ./sdktool.exe rmQt "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" > /dev/null 2>&1 || true + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" > /dev/null 2>&1 || true ./sdktool.exe addQt \ - "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ - "--name" "Qt 5.3${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ + "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ + "--name" "Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ "--type" "Qt4ProjectManager.QtVersion.Desktop" \ "--qmake" "/${_mingw_variant}${_library_variant_prefix}/bin/qmake.exe" - ./sdktool.exe rmKit "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" > /dev/null 2>&1 || true + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" > /dev/null 2>&1 || true ./sdktool.exe addKit \ - "--id" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" \ - "--name" "Desktop Qt 5.3${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ + "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" \ + "--name" "Desktop Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ "--toolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64${_mingw_variant_idsuffix}" \ - "--qt" "qt.53.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ + "--qt" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ "--debuggerengine" "1" \ "--debugger" "/${_mingw_variant}/bin/gdb.exe" \ "--devicetype" "Desktop" diff --git a/mingw-w64-quantlib/PKGBUILD b/mingw-w64-quantlib/PKGBUILD new file mode 100644 index 0000000000..e8a79eb114 --- /dev/null +++ b/mingw-w64-quantlib/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Alexey Pavlov + +_realname=quantlib +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.7 +pkgrel=1 +pkgdesc="QuantLib - A free/open-source library for quantitative finance (mingw-w64)" +arch=('any') +url='http://quantlib.org' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-boost" "automake" "autoconf" "libtool") +options=('staticlibs' 'strip') +source=(http://downloads.sourceforge.net/project/quantlib/QuantLib/${pkgver}/QuantLib-${pkgver}.tar.gz + no-undefined.patch) +md5sums=('e000a7505e01c7da51a2009fc9397703' + 'c928f002736dcdce347906e129950547') + +prepare() { + cd QuantLib-${pkgver} + patch -p1 -i ${srcdir}/no-undefined.patch + + ./autogen.sh +} + +build() { + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + ../QuantLib-${pkgver}/configure \ + --disable-dependency-tracking \ + --enable-static \ + --enable-shared \ + --enable-intraday \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE.TXT "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE +} diff --git a/mingw-w64-quantlib/no-undefined.patch b/mingw-w64-quantlib/no-undefined.patch new file mode 100644 index 0000000000..85867488bc --- /dev/null +++ b/mingw-w64-quantlib/no-undefined.patch @@ -0,0 +1,11 @@ +--- QuantLib-1.6.2/ql/Makefile.am.orig 2015-09-22 13:03:34.307586400 +0300 ++++ QuantLib-1.6.2/ql/Makefile.am 2015-09-22 13:03:46.796337400 +0300 +@@ -79,7 +79,7 @@ + timegrid.cpp + + lib_LTLIBRARIES = libQuantLib.la +-libQuantLib_la_LDFLAGS = -version-info 0:0:0 ++libQuantLib_la_LDFLAGS = -no-undefined -version-info 0:0:0 + + libQuantLib_la_LIBADD = \ + cashflows/libCashFlows.la \ diff --git a/mingw-w64-quarter-hg/PKGBUILD b/mingw-w64-quarter-hg/PKGBUILD index fff20f63ee..8162bff1d3 100644 --- a/mingw-w64-quarter-hg/PKGBUILD +++ b/mingw-w64-quarter-hg/PKGBUILD @@ -52,7 +52,7 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR=${pkgdir} install - + # Workaround - need to build MSYS2 with separate /usr [[ -d ${pkgdir}/usr ]] && { cp -rf ${pkgdir}/usr${MINGW_PREFIX}/* ${pkgdir}${MINGW_PREFIX}/ diff --git a/mingw-w64-quassel/0001-MinGW-w64-Adopt-FHS-Layout.patch b/mingw-w64-quassel/0001-MinGW-w64-Adopt-FHS-Layout.patch new file mode 100644 index 0000000000..76eba780a0 --- /dev/null +++ b/mingw-w64-quassel/0001-MinGW-w64-Adopt-FHS-Layout.patch @@ -0,0 +1,12 @@ +diff -Nru -x '*~' quassel-0.12.2.orig/cmake/QuasselInstallDirs.cmake quassel-0.12.2/cmake/QuasselInstallDirs.cmake +--- quassel-0.12.2/cmake/QuasselInstallDirs.cmake.orig 2015-04-23 22:47:17.000000000 +0200 ++++ quassel-0.12.2/cmake/QuasselInstallDirs.cmake 2015-04-28 10:05:30.094112600 +0200 +@@ -14,7 +14,7 @@ + # we make use of its settings. + + if (NOT WITH_KDE) +- if (WIN32) ++ if (WIN32 AND NOT MINGW) + # On Windows, we have to guess good paths + # We must check if the variables are already defined on the command line + if (NOT DEFINED CMAKE_INSTALL_BINDIR) diff --git a/mingw-w64-quassel/0002-Include-QDataStream-in-peer.h.patch b/mingw-w64-quassel/0002-Include-QDataStream-in-peer.h.patch new file mode 100644 index 0000000000..83187f0733 --- /dev/null +++ b/mingw-w64-quassel/0002-Include-QDataStream-in-peer.h.patch @@ -0,0 +1,10 @@ +--- quassel-0.12.2/src/common/peer.h.orig 2015-07-24 16:19:22.370062500 +0100 ++++ quassel-0.12.2/src/common/peer.h 2015-07-24 16:19:22.365062500 +0100 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #include "authhandler.h" + #include "protocol.h" diff --git a/mingw-w64-quassel/0003-Fix-Q_ASSERT-scopes.patch b/mingw-w64-quassel/0003-Fix-Q_ASSERT-scopes.patch new file mode 100644 index 0000000000..186766790c --- /dev/null +++ b/mingw-w64-quassel/0003-Fix-Q_ASSERT-scopes.patch @@ -0,0 +1,24 @@ +--- quassel-0.12.2/src/client/treemodel.cpp.orig 2015-04-23 21:47:17.000000000 +0100 ++++ quassel-0.12.2/src/client/treemodel.cpp 2015-07-24 16:25:11.185062500 +0100 +@@ -556,9 +556,9 @@ + ChildStatus cs = _childStatus; + #ifndef QT_NO_DEBUG + QModelIndex parent = indexByItem(parentItem); +-#endif + Q_ASSERT(cs.parent == parent); + Q_ASSERT(rowCount(parent) == cs.childCount + cs.end - cs.start + 1); ++#endif + + _aboutToRemoveOrInsert = false; + for (int i = cs.start; i <= cs.end; i++) { +@@ -605,9 +605,9 @@ + #ifndef QT_NO_DEBUG + ChildStatus cs = _childStatus; + QModelIndex parent = indexByItem(parentItem); +-#endif + Q_ASSERT(cs.parent == parent); + Q_ASSERT(rowCount(parent) == cs.childCount - cs.end + cs.start - 1); ++#endif + _aboutToRemoveOrInsert = false; + + endRemoveRows(); diff --git a/mingw-w64-quassel/0004-use-pkg-config-mingw.patch b/mingw-w64-quassel/0004-use-pkg-config-mingw.patch new file mode 100644 index 0000000000..9dba185f10 --- /dev/null +++ b/mingw-w64-quassel/0004-use-pkg-config-mingw.patch @@ -0,0 +1,22 @@ +--- quassel-0.12.2/cmake/FindQCA2.cmake.orig 2015-07-24 23:39:01.451283000 +0300 ++++ quassel-0.12.2/cmake/FindQCA2.cmake 2015-07-24 23:39:06.568092000 +0300 +@@ -24,7 +24,7 @@ + else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) + + +- if (NOT WIN32) ++ if (NOT MSVC) + find_package(PkgConfig) + pkg_check_modules(PC_QCA2 QUIET qca2) + set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER}) +--- quassel-0.12.2/cmake/FindQCA2-QT5.cmake.orig 2015-07-24 23:38:36.241638800 +0300 ++++ quassel-0.12.2/cmake/FindQCA2-QT5.cmake 2015-07-24 23:38:44.634453500 +0300 +@@ -37,7 +37,7 @@ + else (QCA2-QT5_INCLUDE_DIR AND QCA2-QT5_LIBRARIES) + + +- if (NOT WIN32) ++ if (NOT MSVC) + find_package(PkgConfig) + pkg_check_modules(PC_QCA2-QT5 QUIET qca2-qt5) + set(QCA2-QT5_DEFINITIONS ${PC_QCA2-QT5_CFLAGS_OTHER}) diff --git a/mingw-w64-quassel/PKGBUILD b/mingw-w64-quassel/PKGBUILD new file mode 100644 index 0000000000..aed6a363cd --- /dev/null +++ b/mingw-w64-quassel/PKGBUILD @@ -0,0 +1,67 @@ +# $Id$ +# Maintainer (ArchLinux): Vesa Kaihlavirta +# Maintainer (ArchLinux): Jaroslav Lichtblau +# Maintainer (MSYS2): Ray Donnelly + +_realname=quassel +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.12.2 +pkgrel=3 +pkgdesc="Next-generation distributed IRC client (mingw-w64)" +arch=('any') +url="http://quassel-irc.org/" +license=('GPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-qca-qt5-git" + #"${MINGW_PACKAGE_PREFIX}-extra-cmake-modules" #TODO: only needed with WITH_KDE=ON + "${MINGW_PACKAGE_PREFIX}-Snorenotify") +source=(http://quassel-irc.org/pub/${_realname}-${pkgver}.tar.bz2 + "0001-MinGW-w64-Adopt-FHS-Layout.patch" + "0002-Include-QDataStream-in-peer.h.patch" + "0003-Fix-Q_ASSERT-scopes.patch" + "0004-use-pkg-config-mingw.patch") +sha256sums=('6bd6f79ecb88fb857bea7e89c767a3bd0f413ff01bae9298dd2e563478947897' + '12b82e72c2d3a42872104906bad73f48c9b944506d086c0bcd710af904c9fcd8' + '2cd9ba35f7857f7bc1bd3f9870d5a2b0e091ce8e99839a8c3f2727ef4990689c' + '6becd9f82ca9b2a22ecf39fd85c93ffa354c63421d6222800b8fb809e50a104a' + '0e5d8f78d4f3009b88f536040b659436d67a94975718c1cf973530b79993ab70') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/0001-MinGW-w64-Adopt-FHS-Layout.patch + patch -p1 -i "${srcdir}"/0002-Include-QDataStream-in-peer.h.patch + patch -p1 -i "${srcdir}"/0003-Fix-Q_ASSERT-scopes.patch + patch -p1 -i "${srcdir}"/0004-use-pkg-config-mingw.patch +} + +build() { + cd "${srcdir}" + [ -d build-${CARCH} ] && rm -rf build-${CARCH} + mkdir build-${CARCH} && cd "${srcdir}"/build-${CARCH} + + # -DWIN32_LEAN_AND_MEAN=1 because "interface" is used in: + # /mingw64/include/QtDBus/qdbusconnection.h + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_CXX_FLAGS="${CFLAGS} -DWIN32_LEAN_AND_MEAN=1" \ + -DUSE_QT5=ON \ + -DWITH_KDE=OFF \ + -DCMAKE_BUILD_TYPE="Release" \ + -DWANT_CORE=ON \ + -DWANT_QTCLIENT=ON \ + -DWANT_MONO=ON \ + -Wno-dev \ + ../${_realname}-${pkgver} + + make +} + +package() { + cd "${srcdir}"/build-${CARCH} + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-qwt-qt4/PKGBUILD b/mingw-w64-qwt-qt4/PKGBUILD index 9b3aaf43ab..036bf1a0da 100644 --- a/mingw-w64-qwt-qt4/PKGBUILD +++ b/mingw-w64-qwt-qt4/PKGBUILD @@ -2,27 +2,29 @@ # Contributor: AlexWMF _realname=qwt +pkgbase=mingw-w64-${_realname}-qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4" -pkgver=6.1.0 -pkgrel=1 -pkgdesc="Qt Widgets for Technical Applications" +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=6.1.2 +pkgrel=2 +pkgdesc="Qt Widgets for Technical Applications for Qt4 (mingw-w64)" arch=('any') -license=("custom:$pkgname") +license=("custom:${_realname}") url="http://qwt.sourceforge.net/" depends=("${MINGW_PACKAGE_PREFIX}-qt4") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-make") options=(!strip staticlibs !buildflags) -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.bz2" \ +install=${_realname}-qt4-${CARCH}.install +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.bz2" "qwtconfig-msys2.pri") -md5sums=('aef0437b37f191067a6a9dc01c30ba64' - 'b0c93b559ba7aa08284f24f5c38093cb') +md5sums=('9c88db1774fa7e3045af063bbde44d7d' + 'ea5a595a3153d7330921e309b7e42e3d') prepare() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - + local _buildpkgdir=${pkgdirbase}/${pkgname}${MINGW_PREFIX} + mkdir -p ${_buildpkgdir} + local PREFIX_WIN=$(cygpath -am ${_buildpkgdir}) + cd ${srcdir}/${_realname}-${pkgver} # copy our config file to the right place cp ${srcdir}/qwtconfig-msys2.pri qwtconfig.pri @@ -34,20 +36,18 @@ build() { cd ${srcdir}/${_realname}-${pkgver} ${MINGW_PREFIX}/bin/qmake qwt.pro - make ${MAKEFLAGS} # VERBOSE=1 + make # VERBOSE=1 } package() { cd ${srcdir}/${_realname}-${pkgver} make -j1 install - + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin/ mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/mkspecs/features/qwtconfig.pri + -i ${pkgdir}${MINGW_PREFIX}/share/qt4/mkspecs/features/qwtconfig.pri } diff --git a/mingw-w64-qwt-qt4/qwt-qt4-i686.install b/mingw-w64-qwt-qt4/qwt-qt4-i686.install new file mode 100644 index 0000000000..7846cd06c1 --- /dev/null +++ b/mingw-w64-qwt-qt4/qwt-qt4-i686.install @@ -0,0 +1,10 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + sed -s "s|/mingw32|${_prefix}|g" -i mingw32/share/qt4/mkspecs/features/qwtconfig.pri +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qwt-qt4/qwt-qt4-x86_64.install b/mingw-w64-qwt-qt4/qwt-qt4-x86_64.install new file mode 100644 index 0000000000..79bc4f1f17 --- /dev/null +++ b/mingw-w64-qwt-qt4/qwt-qt4-x86_64.install @@ -0,0 +1,10 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + sed -s "s|/mingw32|${_prefix}|g" -i mingw64/share/qt4/mkspecs/features/qwtconfig.pri +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qwt-qt4/qwtconfig-msys2.pri b/mingw-w64-qwt-qt4/qwtconfig-msys2.pri index 1d7ee23469..a62fea224f 100644 --- a/mingw-w64-qwt-qt4/qwtconfig-msys2.pri +++ b/mingw-w64-qwt-qt4/qwtconfig-msys2.pri @@ -9,7 +9,7 @@ QWT_VER_MAJ = 6 QWT_VER_MIN = 1 -QWT_VER_PAT = 0 +QWT_VER_PAT = 2 QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT} ###################################################################### @@ -27,7 +27,7 @@ QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib # Designer plugin ###################################################################### -QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer +QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/share/qt4/plugins/designer ###################################################################### # Features @@ -41,7 +41,7 @@ QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer # with every Qt upgrade. ###################################################################### -QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/mkspecs/features +QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/share/qt4/mkspecs/features ###################################################################### # Build the static/shared libraries. diff --git a/mingw-w64-qwt-qt5/PKGBUILD b/mingw-w64-qwt-qt5/PKGBUILD index 5af1b8b90d..2853f7f5d0 100644 --- a/mingw-w64-qwt-qt5/PKGBUILD +++ b/mingw-w64-qwt-qt5/PKGBUILD @@ -4,26 +4,23 @@ _realname=qwt pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt5" -pkgver=6.1.1 -pkgrel=1 -pkgdesc="Qt Widgets for Technical Applications" +pkgver=6.1.2 +pkgrel=2 +pkgdesc="Qt Widgets for Technical Applications (mingw-w64)" arch=('any') license=("custom:$pkgname") url="http://qwt.sourceforge.net/" depends=("${MINGW_PACKAGE_PREFIX}-qt5") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=(!strip staticlibs !buildflags) -source=("http://downloads.sourceforge.net/${_realname}/${_realname}-$pkgver.tar.bz2" \ +source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.bz2" "qwtconfig-msys2.pri") -md5sums=('fe4bdd561ef5584924e72e15bcf46b9e' - 'cb2fcbe950fd61056ef13069c824d700') +md5sums=('9c88db1774fa7e3045af063bbde44d7d' + '2bb4059cc41cba7e9e18d921e3fe8a0d') prepare() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + cd ${srcdir}/${_realname}-${pkgver} # copy our config file to the right place cp ${srcdir}/qwtconfig-msys2.pri qwtconfig.pri @@ -35,20 +32,18 @@ build() { cd ${srcdir}/${_realname}-${pkgver} ${MINGW_PREFIX}/bin/qmake qwt.pro - make ${MAKEFLAGS} # VERBOSE=1 + make ${MAKEFLAGS} # VERBOSE=1 } package() { cd ${srcdir}/${_realname}-${pkgver} make -j1 install - + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin/ mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/mkspecs/features/qwtconfig.pri + -i ${pkgdir}${MINGW_PREFIX}/share/qt5/mkspecs/features/qwtconfig.pri } diff --git a/mingw-w64-qwt-qt5/qwtconfig-msys2.pri b/mingw-w64-qwt-qt5/qwtconfig-msys2.pri index 5e07f648a7..a5e595d30f 100644 --- a/mingw-w64-qwt-qt5/qwtconfig-msys2.pri +++ b/mingw-w64-qwt-qt5/qwtconfig-msys2.pri @@ -27,7 +27,7 @@ QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib # Designer plugin ###################################################################### -QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer +QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/share/qt5/plugins/designer ###################################################################### # Features @@ -41,7 +41,7 @@ QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer # with every Qt upgrade. ###################################################################### -QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/mkspecs/features +QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/share/qt5/mkspecs/features ###################################################################### # Build the static/shared libraries. diff --git a/mingw-w64-qxmpp-qt4/PKGBUILD b/mingw-w64-qxmpp-qt4/PKGBUILD index 026a1e934c..8960d0f9f5 100644 --- a/mingw-w64-qxmpp-qt4/PKGBUILD +++ b/mingw-w64-qxmpp-qt4/PKGBUILD @@ -2,36 +2,31 @@ # Contributor: AlexWMF _realname=qxmpp - +pkgbase=mingw-w64-${_realname}-qt4 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt4" -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=0.8.0 -pkgrel=1 -pkgdesc="Cross-platform C++ XMPP client and server library" +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=0.8.3 +pkgrel=2 +pkgdesc="Cross-platform C++ XMPP client and server library (mingw-w64)" arch=('any') license=("LGPL") -url="http://code.google.com/p/qxmpp" -depends=("${MINGW_PACKAGE_PREFIX}-qt4" - "${MINGW_PACKAGE_PREFIX}-speex" - "${MINGW_PACKAGE_PREFIX}-libtheora" - "${MINGW_PACKAGE_PREFIX}-libvpx") - -makedepends=("${MINGW_PACKAGE_PREFIX}-qt4") - - -options=(!strip staticlibs !buildflags) - +url="https://github.com/qxmpp-project/qxmpp" +depends=("${MINGW_PACKAGE_PREFIX}-libtheora" + "${MINGW_PACKAGE_PREFIX}-libvpx" + "${MINGW_PACKAGE_PREFIX}-qt4" + "${MINGW_PACKAGE_PREFIX}-speex") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-make") +options=(!strip staticlibs) source=("${_realname}-$pkgver".tar.gz::"https://github.com/qxmpp-project/${_realname}/archive/v${pkgver}.tar.gz") -md5sums=('04e532c807e749a24a7eafefdc31f6d4') +md5sums=('e945edf90eafbc8fcaaa9dde1a7b357a') build() { cd ${srcdir}/${_realname}-${pkgver} - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + + local _buildpkgdir=${pkgdirbase}/${pkgname}${MINGW_PREFIX} + mkdir -p ${_buildpkgdir} + local PREFIX_WIN=$(cygpath -am ${_buildpkgdir}) ${MINGW_PREFIX}/bin/qmake \ PREFIX=${PREFIX_WIN} \ @@ -41,7 +36,7 @@ build() { "CONFIG+=release" \ qxmpp.pro - make ${MAKEFLAGS} # VERBOSE=1 + make # VERBOSE=1 } package() { @@ -49,16 +44,10 @@ package() { make install mkdir -p ${pkgdir}${MINGW_PREFIX}/bin/ mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEP=`pwd -W` - popd > /dev/null - - echo "PREFIX_DEP=${PREFIX_DEP}" + + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + local PREFIX_DEP=$(cygpath -am ${MINGW_PREFIX}) + sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/qxmpp.pc sed -s "s|${PREFIX_DEP}|${MINGW_PREFIX}|gi" \ diff --git a/mingw-w64-qxmpp/PKGBUILD b/mingw-w64-qxmpp/PKGBUILD index 56b3a8edc1..a97ef2b9ac 100644 --- a/mingw-w64-qxmpp/PKGBUILD +++ b/mingw-w64-qxmpp/PKGBUILD @@ -2,35 +2,28 @@ # Contributor: AlexWMF _realname=qxmpp - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" - -pkgver=0.8.0 -pkgrel=1 +pkgver=0.8.3 +pkgrel=2 pkgdesc="Cross-platform C++ XMPP client and server library" arch=('any') license=("LGPL") -url="http://code.google.com/p/qxmpp" -depends=("${MINGW_PACKAGE_PREFIX}-qt5" - "${MINGW_PACKAGE_PREFIX}-speex" - "${MINGW_PACKAGE_PREFIX}-libtheora" - "${MINGW_PACKAGE_PREFIX}-libvpx") - +url="https://github.com/qxmpp-project/qxmpp" +depends=("${MINGW_PACKAGE_PREFIX}-libtheora" + "${MINGW_PACKAGE_PREFIX}-libvpx" + "${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-speex") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") - - -options=(!strip staticlibs !buildflags) - -source=("${_realname}-$pkgver".tar.gz::"https://github.com/qxmpp-project/${_realname}/archive/v${pkgver}.tar.gz") -md5sums=('04e532c807e749a24a7eafefdc31f6d4') +options=(!strip staticlibs) +source=("${_realname}-${pkgver}".tar.gz::"https://github.com/qxmpp-project/${_realname}/archive/v${pkgver}.tar.gz") +md5sums=('e945edf90eafbc8fcaaa9dde1a7b357a') build() { cd ${srcdir}/${_realname}-${pkgver} - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + + local _buildpkgdir=${pkgdirbase}/${pkgname}${MINGW_PREFIX} + mkdir -p ${_buildpkgdir} + local PREFIX_WIN=$(cygpath -am ${_buildpkgdir}) ${MINGW_PREFIX}/bin/qmake \ PREFIX=${PREFIX_WIN} \ @@ -40,7 +33,7 @@ build() { "CONFIG+=release" \ qxmpp.pro - make ${MAKEFLAGS} # VERBOSE=1 + make # VERBOSE=1 } package() { @@ -48,15 +41,10 @@ package() { make install mkdir -p ${pkgdir}${MINGW_PREFIX}/bin/ mv "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}"/bin/ - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEP=`pwd -W` - popd > /dev/null - + + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + local PREFIX_DEP=$(cygpath -am ${MINGW_PREFIX}) + echo "PREFIX_DEP=${PREFIX_DEP}" sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/qxmpp.pc diff --git a/mingw-w64-ragel/PKGBUILD b/mingw-w64-ragel/PKGBUILD new file mode 100644 index 0000000000..8e99d2c6d7 --- /dev/null +++ b/mingw-w64-ragel/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Ebrahim Byagowi + +_realname=ragel +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=6.9 +pkgrel=2 +pkgdesc="Compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code (mingw-w64)" +arch=('any') +url="http://www.colm.net/open-source/ragel/" +license=('GPL') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://www.colm.net/files/${_realname}/${_realname}-${pkgver}.tar.gz") +md5sums=('0c3110d7f17f7af4d9cb774443898dc1') + +build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p "build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + + make DESTDIR="${pkgdir}" install + install -m0644 -D ${srcdir}/${_realname}-${pkgver}/ragel.vim "${pkgdir}${MINGW_PREFIX}"/share/vim/vimfiles/syntax/ragel.vim +} diff --git a/mingw-w64-rapidjson/0001-Use-relative-paths-for-doxygen-outputs.patch b/mingw-w64-rapidjson/0001-Use-relative-paths-for-doxygen-outputs.patch new file mode 100644 index 0000000000..845bd36742 --- /dev/null +++ b/mingw-w64-rapidjson/0001-Use-relative-paths-for-doxygen-outputs.patch @@ -0,0 +1,53 @@ +From c10dfc56a7e02000cfcbbef5f72c668e47b40ee7 Mon Sep 17 00:00:00 2001 +From: Benedikt Bitterli +Date: Sun, 22 Nov 2015 12:01:59 +0100 +Subject: [PATCH 1/4] Use relative paths for doxygen outputs + +--- + doc/CMakeLists.txt | 2 ++ + doc/Doxyfile.in | 2 +- + doc/Doxyfile.zh-cn.in | 2 +- + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index c1f165a..60e0e30 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -7,6 +7,8 @@ ELSE() + file(GLOB MARKDOWN_DOC ${CMAKE_CURRENT_LIST_DIR}/../doc/*.md) + list(APPEND MARKDOWN_DOC ${CMAKE_CURRENT_LIST_DIR}/../readme.md) + ++ file(RELATIVE_PATH DOC_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}) ++ + CONFIGURE_FILE(Doxyfile.in Doxyfile @ONLY) + CONFIGURE_FILE(Doxyfile.zh-cn.in Doxyfile.zh-cn @ONLY) + +diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in +index b806205..ffed423 100644 +--- a/doc/Doxyfile.in ++++ b/doc/Doxyfile.in +@@ -58,7 +58,7 @@ PROJECT_LOGO = + # entered, it will be relative to the location where doxygen was started. If + # left blank the current directory will be used. + +-OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ ++OUTPUT_DIRECTORY = @DOC_OUTPUT_DIRECTORY@ + + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- + # directories (in 2 levels) under the output directory of each output format and +diff --git a/doc/Doxyfile.zh-cn.in b/doc/Doxyfile.zh-cn.in +index 873022a..10d3c47 100644 +--- a/doc/Doxyfile.zh-cn.in ++++ b/doc/Doxyfile.zh-cn.in +@@ -58,7 +58,7 @@ PROJECT_LOGO = + # entered, it will be relative to the location where doxygen was started. If + # left blank the current directory will be used. + +-OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ ++OUTPUT_DIRECTORY = @DOC_OUTPUT_DIRECTORY@ + + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- + # directories (in 2 levels) under the output directory of each output format and +-- +2.5.0 + diff --git a/mingw-w64-rapidjson/0002-Add-CMake-check-for-MinGW.patch b/mingw-w64-rapidjson/0002-Add-CMake-check-for-MinGW.patch new file mode 100644 index 0000000000..2f9df2443e --- /dev/null +++ b/mingw-w64-rapidjson/0002-Add-CMake-check-for-MinGW.patch @@ -0,0 +1,34 @@ +From 270786a12f18b7639cac4e59f36388d14cad7811 Mon Sep 17 00:00:00 2001 +From: Benedikt Bitterli +Date: Sun, 22 Nov 2015 12:25:29 +0100 +Subject: [PATCH 2/4] Add CMake check for MinGW + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 51ee620..b333c86 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,7 @@ SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The direct + SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install") + SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation") + +-IF(UNIX OR CYGWIN) ++IF(UNIX OR CYGWIN OR MINGW) + SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}") + ELSEIF(WIN32) + SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake") +@@ -69,7 +69,7 @@ if(RAPIDJSON_BUILD_TESTS) + endif() + + # pkg-config +-IF (UNIX OR CYGWIN) ++IF (UNIX OR CYGWIN OR MINGW) + CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc + @ONLY) +-- +2.5.0 + diff --git a/mingw-w64-rapidjson/0003-Exclude-CMakeLists.txt-from-install-targets.patch b/mingw-w64-rapidjson/0003-Exclude-CMakeLists.txt-from-install-targets.patch new file mode 100644 index 0000000000..bb66ed1802 --- /dev/null +++ b/mingw-w64-rapidjson/0003-Exclude-CMakeLists.txt-from-install-targets.patch @@ -0,0 +1,24 @@ +From 0c3b35390aa8c9203e48fb938fea4ba59a43f7ea Mon Sep 17 00:00:00 2001 +From: Benedikt Bitterli +Date: Sun, 22 Nov 2015 12:25:51 +0100 +Subject: [PATCH 3/4] Exclude CMakeLists.txt from install targets + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b333c86..17e347c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,6 +92,7 @@ install(DIRECTORY example/ + # Following patterns are for excluding the intermediate/object files + # from an install of in-source CMake build. + PATTERN "CMakeFiles" EXCLUDE ++ PATTERN "CMakeLists.txt" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE) + +-- +2.5.0 + diff --git a/mingw-w64-rapidjson/0004-CMake-Install-compiled-example-executables.patch b/mingw-w64-rapidjson/0004-CMake-Install-compiled-example-executables.patch new file mode 100644 index 0000000000..20ef3a0475 --- /dev/null +++ b/mingw-w64-rapidjson/0004-CMake-Install-compiled-example-executables.patch @@ -0,0 +1,26 @@ +From e4aa0e45776290a8464d2e45488b6fbebd7fcaf4 Mon Sep 17 00:00:00 2001 +From: Benedikt Bitterli +Date: Sun, 22 Nov 2015 12:26:15 +0100 +Subject: [PATCH 4/4] CMake: Install compiled example executables + +--- + example/CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt +index 8063d89..eb3e318 100644 +--- a/example/CMakeLists.txt ++++ b/example/CMakeLists.txt +@@ -27,6 +27,9 @@ endif() + + foreach (example ${EXAMPLES}) + add_executable(${example} ${example}/${example}.cpp) ++ install(TARGETS ${example} ++ COMPONENT examples ++ DESTINATION "${DOC_INSTALL_DIR}/examples/${example}") + endforeach() + + add_custom_target(examples ALL DEPENDS ${EXAMPLES}) +-- +2.5.0 + diff --git a/mingw-w64-rapidjson/PKGBUILD b/mingw-w64-rapidjson/PKGBUILD new file mode 100644 index 0000000000..24f3cb67c2 --- /dev/null +++ b/mingw-w64-rapidjson/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Benedikt Bitterli + +_realname=rapidjson +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0.2 +pkgrel=1 +pkgdesc='A fast JSON parser/generator for C++ with both SAX/DOM style API (mingw-w64)' +arch=('any') +url='https://github.com/miloyip/rapidjson' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen") +source=("http://github.com/miloyip/rapidjson/archive/v${pkgver}.tar.gz" + '0001-Use-relative-paths-for-doxygen-outputs.patch' + '0002-Add-CMake-check-for-MinGW.patch' + '0003-Exclude-CMakeLists.txt-from-install-targets.patch' + '0004-CMake-Install-compiled-example-executables.patch') +md5sums=('97cc60d01282a968474c97f60714828c' + '4f6c83130d517302b74383730341d9ae' + 'ae201b7e81b57c568917db335f7f46d2' + 'd9853e85b04cf025efe39c9ac1b4e60b' + '3c6c5a1a6d3b5f896efe02ab2fda54dc') + +prepare() { + cd "${_realname}-${pkgver}" + patch -p1 -i "${srcdir}/0001-Use-relative-paths-for-doxygen-outputs.patch" + patch -p1 -i "${srcdir}/0002-Add-CMake-check-for-MinGW.patch" + patch -p1 -i "${srcdir}/0003-Exclude-CMakeLists.txt-from-install-targets.patch" + patch -p1 -i "${srcdir}/0004-CMake-Install-compiled-example-executables.patch" +} + +build() { + [[ -d "build-${CARCH}" ]] && rm -rf "build-${CARCH}" + mkdir "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" + + MSYS2_ARG_CONV_EXCL='-DCMAKE_INSTALL_PREFIX=' \ + ${MINGW_PREFIX}/bin/cmake \ + -G'MSYS Makefiles' \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + "../${_realname}-${pkgver}" + + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + make install DESTDIR="${pkgdir}" +} diff --git a/mingw-w64-readline/PKGBUILD b/mingw-w64-readline/PKGBUILD index af4c9791e1..6e2ef46dd3 100644 --- a/mingw-w64-readline/PKGBUILD +++ b/mingw-w64-readline/PKGBUILD @@ -2,39 +2,46 @@ _realname=readline pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -_basever=6.2 -_patchlevel=005 -pkgver=$_basever.$_patchlevel -pkgrel=3 +_basever=6.3 +_patchlevel=008 +pkgver=${_basever}.${_patchlevel} +pkgrel=1 pkgdesc="MinGW port of readline for editing typed command lines (mingw-w64)" arch=('any') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" #"${MINGW_PACKAGE_PREFIX}-ncurses" #"${MINGW_PACKAGE_PREFIX}-pdcurses" - "${MINGW_PACKAGE_PREFIX}-termcap" - ) + "${MINGW_PACKAGE_PREFIX}-termcap") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('staticlibs' 'strip') license=('GPL') url="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" -source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${_basever}.tar.gz"{,.sig}) +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${_basever}.tar.gz"{,.sig} + readline-6.3-mingw.patch) if [ $_patchlevel -gt 00 ]; then for (( p=1; p<=$((10#${_patchlevel})); p++ )); do source=(${source[@]} http://ftp.gnu.org/gnu/${_realname}/${_realname}-$_basever-patches/readline${_basever//./}-$(printf "%03d" $p){,.sig}) done fi -md5sums=('67948acb2ca081f23359d0256e9a271c' +md5sums=('33c8fb279e981274f485fd91da77e94a' 'SKIP' - '83287d52a482f790dfb30ec0a8746669' + '5a2ccb64ee7d2e7d27651b383bc65e58' + '4343f5ea9b0f42447f102fb61576b398' 'SKIP' - '0665020ea118e8434bd145fb71f452cc' + '700295212f7e2978577feaee584afddb' 'SKIP' - 'c9d5d79718856e711667dede87cb7622' + 'af4963862f5156fbf9111c2c6fa86ed7' 'SKIP' - 'c08e787f50579ce301075c523fa660a4' + '11f9def89803a5052db3ba72394ce14f' 'SKIP' - 'd20eb0134cc3ff8956c218f0df8e1be1' + '93721c31cd225393f80cb3aadb165544' + 'SKIP' + '71dc6ecce66d1489b96595f55d142a52' + 'SKIP' + '062a08ed60679d3c4878710b3d595b65' + 'SKIP' + 'ee1c04072154826870848d8b218d7b04' 'SKIP') prepare() { @@ -42,14 +49,16 @@ prepare() { for (( p=1; p<=$((10#${_patchlevel})); p++ )); do msg "applying patch readline${_basever//./}-$(printf "%03d" $p)" - patch -Np0 -i $srcdir/readline${_basever//./}-$(printf "%03d" $p) + patch -Np0 -i ${srcdir}/readline${_basever//./}-$(printf "%03d" $p) done + patch -Np1 -i ${srcdir}/readline-6.3-mingw.patch # Remove RPATH from shared objects (FS#14366) sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} ../${_realname}-${_basever}/configure \ --prefix=${MINGW_PREFIX} \ diff --git a/mingw-w64-readline/readline-6.3-mingw.patch b/mingw-w64-readline/readline-6.3-mingw.patch new file mode 100644 index 0000000000..e1a2483c5f --- /dev/null +++ b/mingw-w64-readline/readline-6.3-mingw.patch @@ -0,0 +1,129 @@ +--- readline-6.3-orig/colors.c 2013-03-20 11:19:08.000000000 -0400 ++++ readline-6.3/colors.c 2015-07-20 12:44:31.821014500 -0400 +@@ -37,6 +37,10 @@ + #include "posixstat.h" // stat related macros (S_ISREG, ...) + #include // S_ISUID + ++#ifndef S_ISDIR ++#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ++#endif ++ + // strlen() + #if defined (HAVE_STRING_H) + # include +@@ -151,12 +155,17 @@ + if (S_ISREG (mode)) + { + colored_filetype = C_FILE; +- ++#ifdef S_ISUID + if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) + colored_filetype = C_SETUID; +- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) ++ else ++#endif ++#ifdef S_ISGID ++ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) + colored_filetype = C_SETGID; +- else if (is_colored (C_CAP) && 0) //f->has_capability) ++ else ++#endif ++ if (is_colored (C_CAP) && 0) //f->has_capability) + colored_filetype = C_CAP; + else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) + colored_filetype = C_EXEC; +@@ -180,15 +189,19 @@ + colored_filetype = C_STICKY; + #endif + } ++ #ifdef S_ISLNK + else if (S_ISLNK (mode)) + colored_filetype = ((linkok == 0 + && (!strncmp (_rl_color_indicator[C_LINK].string, "target", 6) + || _rl_color_indicator[C_ORPHAN].string)) + ? C_ORPHAN : C_LINK); ++ #endif + else if (S_ISFIFO (mode)) + colored_filetype = C_FIFO; ++ #ifdef S_ISSOCK + else if (S_ISSOCK (mode)) + colored_filetype = C_SOCK; ++#endif + else if (S_ISBLK (mode)) + colored_filetype = C_BLK; + else if (S_ISCHR (mode)) +--- readline-6.3-orig/signals.c 2014-01-10 15:06:48.000000000 -0500 ++++ readline-6.3/signals.c 2015-07-20 12:33:07.437472100 -0400 +@@ -216,7 +216,9 @@ + /* FALLTHROUGH */ + + case SIGTERM: ++#if defined (SIGHUP) + case SIGHUP: ++#endif + #if defined (SIGTSTP) + case SIGTSTP: + case SIGTTOU: +@@ -397,7 +399,9 @@ + + sigaddset (&bset, SIGINT); + sigaddset (&bset, SIGTERM); ++#ifdef SIGHUP + sigaddset (&bset, SIGHUP); ++#endif + #if defined (SIGQUIT) + sigaddset (&bset, SIGQUIT); + #endif +@@ -426,7 +430,9 @@ + + rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int); + rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term); ++#ifdef SIGHUP + rl_maybe_set_sighandler (SIGHUP, rl_signal_handler, &old_hup); ++#endif + #if defined (SIGQUIT) + rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit); + #endif +@@ -491,7 +497,9 @@ + overhead */ + rl_maybe_restore_sighandler (SIGINT, &old_int); + rl_maybe_restore_sighandler (SIGTERM, &old_term); ++#ifdef SIGHUP + rl_maybe_restore_sighandler (SIGHUP, &old_hup); ++#endif + #if defined (SIGQUIT) + rl_maybe_restore_sighandler (SIGQUIT, &old_quit); + #endif +--- readline-6.3-orig/input.c 2014-01-10 15:07:08.000000000 -0500 ++++ readline-6.3/input.c 2015-07-20 12:37:16.112005600 -0400 +@@ -532,18 +532,28 @@ + Otherwise (not EINTR), some error occurred, also signifying EOF. */ + if (errno != EINTR) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); +- else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) ++ else if ( ++ #ifdef SIGHUP ++ _rl_caught_signal == SIGHUP || ++ #endif ++ _rl_caught_signal == SIGTERM) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); + /* keyboard-generated signals of interest */ +- else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) ++ else if (_rl_caught_signal == SIGINT ++ #ifdef SIGQUIT ++ || _rl_caught_signal == SIGQUIT ++ #endif ++ ) + RL_CHECK_SIGNALS (); ++#ifdef SIGALRM + /* non-keyboard-generated signals of interest */ + else if (_rl_caught_signal == SIGALRM + #if defined (SIGVTALRM) + || _rl_caught_signal == SIGVTALRM + #endif + ) + RL_CHECK_SIGNALS (); ++#endif + + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); diff --git a/mingw-w64-readline/readline62-001 b/mingw-w64-readline/readline62-001 deleted file mode 100644 index d4563c3b11..0000000000 --- a/mingw-w64-readline/readline62-001 +++ /dev/null @@ -1,46 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 6.2 -Patch-ID: readline62-001 - -Bug-Reported-by: Clark J. Wang -Bug-Reference-ID: -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00157.html - -Bug-Description: - -The readline vi-mode `cc', `dd', and `yy' commands failed to modify the -entire line. - -[This patch intentionally does not modify patchlevel] - -Patch (apply with `patch -p0'): - -*** ../readline-6.2-patched/vi_mode.c 2010-11-20 19:51:39.000000000 -0500 ---- vi_mode.c 2011-02-17 20:24:25.000000000 -0500 -*************** -*** 1115,1119 **** - _rl_vi_last_motion = c; - RL_UNSETSTATE (RL_STATE_VIMOTION); -! return (0); - } - #if defined (READLINE_CALLBACKS) ---- 1115,1119 ---- - _rl_vi_last_motion = c; - RL_UNSETSTATE (RL_STATE_VIMOTION); -! return (vidomove_dispatch (m)); - } - #if defined (READLINE_CALLBACKS) -*** ../readline-6.2-patched/callback.c 2010-06-06 12:18:58.000000000 -0400 ---- callback.c 2011-02-17 20:43:28.000000000 -0500 -*************** -*** 149,152 **** ---- 149,155 ---- - /* Should handle everything, including cleanup, numeric arguments, - and turning off RL_STATE_VIMOTION */ -+ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) -+ _rl_internal_char_cleanup (); -+ - return; - } diff --git a/mingw-w64-readline/readline62-001.sig b/mingw-w64-readline/readline62-001.sig deleted file mode 100644 index d614baf3d0..0000000000 Binary files a/mingw-w64-readline/readline62-001.sig and /dev/null differ diff --git a/mingw-w64-readline/readline62-002 b/mingw-w64-readline/readline62-002 deleted file mode 100644 index 3dc260400b..0000000000 --- a/mingw-w64-readline/readline62-002 +++ /dev/null @@ -1,57 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 6.2 -Patch-ID: readline62-002 - -Bug-Reported-by: Vincent Sheffer -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2011-08/msg00000.html - -Bug-Description: - -The readline shared library helper script needs to be updated for Mac OS X -10.7 (Lion, darwin11). - -Patch (apply with `patch -p0'): - -*** ../readline-6.2-patched/support/shobj-conf 2009-10-28 09:20:21.000000000 -0400 ---- support/shobj-conf 2011-08-27 13:25:23.000000000 -0400 -*************** -*** 158,162 **** - - # Darwin/MacOS X -! darwin[89]*|darwin10*) - SHOBJ_STATUS=supported - SHLIB_STATUS=supported ---- 172,176 ---- - - # Darwin/MacOS X -! darwin[89]*|darwin1[012]*) - SHOBJ_STATUS=supported - SHLIB_STATUS=supported -*************** -*** 187,191 **** - - case "${host_os}" in -! darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' - SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' - ;; ---- 201,205 ---- - - case "${host_os}" in -! darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS='' - SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' - ;; - -*** ../readline-6.2-patched/patchlevel 2010-01-14 10:15:52.000000000 -0500 ---- patchlevel 2011-11-17 11:09:35.000000000 -0500 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 1 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 2 diff --git a/mingw-w64-readline/readline62-002.sig b/mingw-w64-readline/readline62-002.sig deleted file mode 100644 index f93e32473b..0000000000 Binary files a/mingw-w64-readline/readline62-002.sig and /dev/null differ diff --git a/mingw-w64-readline/readline62-003 b/mingw-w64-readline/readline62-003 deleted file mode 100644 index 0462242e0c..0000000000 --- a/mingw-w64-readline/readline62-003 +++ /dev/null @@ -1,76 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 6.2 -Patch-ID: readline62-003 - -Bug-Reported-by: Max Horn -Bug-Reference-ID: <20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html - -Bug-Description: - -A change between readline-6.1 and readline-6.2 to prevent the readline input -hook from being called too frequently had the side effect of causing delays -when reading pasted input on systems such as Mac OS X. This patch fixes -those delays while retaining the readline-6.2 behavior. - -Patch (apply with `patch -p0'): - -*** ../readline-6.2-patched/input.c 2010-05-30 18:33:01.000000000 -0400 ---- input.c 2012-06-25 21:08:42.000000000 -0400 -*************** -*** 410,414 **** - rl_read_key () - { -! int c; - - rl_key_sequence_length++; ---- 412,416 ---- - rl_read_key () - { -! int c, r; - - rl_key_sequence_length++; -*************** -*** 430,441 **** - while (rl_event_hook) - { -! if (rl_gather_tyi () < 0) /* XXX - EIO */ - { - rl_done = 1; - return ('\n'); - } - RL_CHECK_SIGNALS (); -- if (rl_get_char (&c) != 0) -- break; - if (rl_done) /* XXX - experimental */ - return ('\n'); ---- 432,447 ---- - while (rl_event_hook) - { -! if (rl_get_char (&c) != 0) -! break; -! -! if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ - { - rl_done = 1; - return ('\n'); - } -+ else if (r == 1) /* read something */ -+ continue; -+ - RL_CHECK_SIGNALS (); - if (rl_done) /* XXX - experimental */ - return ('\n'); -*** ../readline-6.2-patched/patchlevel 2010-01-14 10:15:52.000000000 -0500 ---- patchlevel 2011-11-17 11:09:35.000000000 -0500 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 2 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 3 diff --git a/mingw-w64-readline/readline62-003.sig b/mingw-w64-readline/readline62-003.sig deleted file mode 100644 index 5d4d3efc42..0000000000 Binary files a/mingw-w64-readline/readline62-003.sig and /dev/null differ diff --git a/mingw-w64-readline/readline62-004 b/mingw-w64-readline/readline62-004 deleted file mode 100644 index 5f3ba9bb32..0000000000 --- a/mingw-w64-readline/readline62-004 +++ /dev/null @@ -1,108 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 6.2 -Patch-ID: readline62-004 - -Bug-Reported-by: Jakub Filak -Bug-Reference-ID: -Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=813289 - -Bug-Description: - -Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy' -commands leads to an infinite loop. - -Patch (apply with `patch -p0'): - -*** ../readline-6.2-patched/vi_mode.c 2011-02-25 11:17:02.000000000 -0500 ---- vi_mode.c 2012-06-02 12:24:47.000000000 -0400 -*************** -*** 1235,1243 **** - r = rl_domove_motion_callback (_rl_vimvcxt); - } -! else if (vi_redoing) - { - _rl_vimvcxt->motion = _rl_vi_last_motion; - r = rl_domove_motion_callback (_rl_vimvcxt); - } - #if defined (READLINE_CALLBACKS) - else if (RL_ISSTATE (RL_STATE_CALLBACK)) ---- 1297,1313 ---- - r = rl_domove_motion_callback (_rl_vimvcxt); - } -! else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ - { - _rl_vimvcxt->motion = _rl_vi_last_motion; - r = rl_domove_motion_callback (_rl_vimvcxt); - } -+ else if (vi_redoing) /* handle redoing `dd' here */ -+ { -+ _rl_vimvcxt->motion = _rl_vi_last_motion; -+ rl_mark = rl_end; -+ rl_beg_of_line (1, key); -+ RL_UNSETSTATE (RL_STATE_VIMOTION); -+ r = vidomove_dispatch (_rl_vimvcxt); -+ } - #if defined (READLINE_CALLBACKS) - else if (RL_ISSTATE (RL_STATE_CALLBACK)) -*************** -*** 1317,1325 **** - r = rl_domove_motion_callback (_rl_vimvcxt); - } -! else if (vi_redoing) - { - _rl_vimvcxt->motion = _rl_vi_last_motion; - r = rl_domove_motion_callback (_rl_vimvcxt); - } - #if defined (READLINE_CALLBACKS) - else if (RL_ISSTATE (RL_STATE_CALLBACK)) ---- 1387,1403 ---- - r = rl_domove_motion_callback (_rl_vimvcxt); - } -! else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ - { - _rl_vimvcxt->motion = _rl_vi_last_motion; - r = rl_domove_motion_callback (_rl_vimvcxt); - } -+ else if (vi_redoing) /* handle redoing `cc' here */ -+ { -+ _rl_vimvcxt->motion = _rl_vi_last_motion; -+ rl_mark = rl_end; -+ rl_beg_of_line (1, key); -+ RL_UNSETSTATE (RL_STATE_VIMOTION); -+ r = vidomove_dispatch (_rl_vimvcxt); -+ } - #if defined (READLINE_CALLBACKS) - else if (RL_ISSTATE (RL_STATE_CALLBACK)) -*************** -*** 1378,1381 **** ---- 1456,1472 ---- - r = rl_domove_motion_callback (_rl_vimvcxt); - } -+ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ -+ { -+ _rl_vimvcxt->motion = _rl_vi_last_motion; -+ r = rl_domove_motion_callback (_rl_vimvcxt); -+ } -+ else if (vi_redoing) /* handle redoing `yy' here */ -+ { -+ _rl_vimvcxt->motion = _rl_vi_last_motion; -+ rl_mark = rl_end; -+ rl_beg_of_line (1, key); -+ RL_UNSETSTATE (RL_STATE_VIMOTION); -+ r = vidomove_dispatch (_rl_vimvcxt); -+ } - #if defined (READLINE_CALLBACKS) - else if (RL_ISSTATE (RL_STATE_CALLBACK)) -*** ../readline-6.2-patched/patchlevel 2010-01-14 10:15:52.000000000 -0500 ---- patchlevel 2011-11-17 11:09:35.000000000 -0500 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 3 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 4 diff --git a/mingw-w64-readline/readline62-004.sig b/mingw-w64-readline/readline62-004.sig deleted file mode 100644 index f5d5d9eaef..0000000000 Binary files a/mingw-w64-readline/readline62-004.sig and /dev/null differ diff --git a/mingw-w64-readline/readline62-005 b/mingw-w64-readline/readline62-005 deleted file mode 100644 index 113f196f68..0000000000 --- a/mingw-w64-readline/readline62-005 +++ /dev/null @@ -1,72 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 6.2 -Patch-ID: readline62-005 - -Bug-Reported-by: ludwig.schwardt@gmail.com -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2013-11/msg00000.html - -Bug-Description: - -The readline shared library helper script needs to be updated for Mac OS X -10.9 (Mavericks, darwin13). - -Patch (apply with `patch -p0'): - -*** ../readline-6.2-patched/support/shobj-conf 2011-11-23 19:26:47.000000000 -0500 ---- support/shobj-conf 2013-11-15 08:09:51.000000000 -0500 -*************** -*** 158,162 **** - - # Darwin/MacOS X -! darwin[89]*|darwin1[012]*) - SHOBJ_STATUS=supported - SHLIB_STATUS=supported ---- 172,176 ---- - - # Darwin/MacOS X -! darwin[89]*|darwin1[0123]*) - SHOBJ_STATUS=supported - SHLIB_STATUS=supported -*************** -*** 164,168 **** - SHOBJ_CFLAGS='-fno-common' - -! SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' - - SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' ---- 178,184 ---- - SHOBJ_CFLAGS='-fno-common' - -! # SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' -! # we can finally kill Mac OS X 10.3 -! SHOBJ_LD='${CC}' - - SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' -*************** -*** 187,191 **** - - case "${host_os}" in -! darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS='' - SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' - ;; ---- 203,207 ---- - - case "${host_os}" in -! darwin[789]*|darwin1[0123]*) SHOBJ_LDFLAGS='' - SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' - ;; - -*** ../readline-6.2-patched/patchlevel 2010-01-14 10:15:52.000000000 -0500 ---- patchlevel 2011-11-17 11:09:35.000000000 -0500 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 4 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 5 diff --git a/mingw-w64-readline/readline62-005.sig b/mingw-w64-readline/readline62-005.sig deleted file mode 100644 index 925f9a1647..0000000000 Binary files a/mingw-w64-readline/readline62-005.sig and /dev/null differ diff --git a/mingw-w64-readline/readline63-001 b/mingw-w64-readline/readline63-001 new file mode 100644 index 0000000000..bae6a2f52f --- /dev/null +++ b/mingw-w64-readline/readline63-001 @@ -0,0 +1,43 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-001 + +Bug-Reported-by: Daan van Rossum +Bug-Reference-ID: <20140307072523.GA14250@flash.uchicago.edu> +Bug-Reference-URL: + +Bug-Description: + +The `.' command in vi mode cannot undo multi-key commands beginning with +`c', `d', and `y' (command plus motion specifier). + +Patch (apply with `patch -p0'): + +*** ../readline-6.3/readline.c 2013-10-28 14:58:06.000000000 -0400 +--- readline.c 2014-03-07 15:20:33.000000000 -0500 +*************** +*** 965,969 **** + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && +! rl_key_sequence_length == 1 && /* XXX */ + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); +--- 965,969 ---- + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && +! _rl_dispatching_keymap == vi_movement_keymap && + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 5 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 1 diff --git a/mingw-w64-readline/readline63-001.sig b/mingw-w64-readline/readline63-001.sig new file mode 100644 index 0000000000..2c93daab60 Binary files /dev/null and b/mingw-w64-readline/readline63-001.sig differ diff --git a/mingw-w64-readline/readline63-002 b/mingw-w64-readline/readline63-002 new file mode 100644 index 0000000000..0e79f13f6c --- /dev/null +++ b/mingw-w64-readline/readline63-002 @@ -0,0 +1,44 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-002 + +Bug-Reported-by: Anatol Pomozov +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html + +Bug-Description: + +When in callback mode, some readline commands can cause readline to seg +fault by passing invalid contexts to callback functions. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3/readline.c 2013-10-28 14:58:06.000000000 -0400 +--- readline.c 2014-03-10 14:15:02.000000000 -0400 +*************** +*** 745,749 **** + + RL_CHECK_SIGNALS (); +! if (r == 0) /* success! */ + { + _rl_keyseq_chain_dispose (); +--- 745,750 ---- + + RL_CHECK_SIGNALS (); +! /* We only treat values < 0 specially to simulate recursion. */ +! if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */ + { + _rl_keyseq_chain_dispose (); +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 1 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 2 diff --git a/mingw-w64-readline/readline63-002.sig b/mingw-w64-readline/readline63-002.sig new file mode 100644 index 0000000000..9337cf8bcb Binary files /dev/null and b/mingw-w64-readline/readline63-002.sig differ diff --git a/mingw-w64-readline/readline63-003 b/mingw-w64-readline/readline63-003 new file mode 100644 index 0000000000..d2cad94f97 --- /dev/null +++ b/mingw-w64-readline/readline63-003 @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-003 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +There are debugging functions in the readline release that are theoretically +exploitable as security problems. They are not public functions, but have +global linkage. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3/util.c 2013-09-02 13:36:12.000000000 -0400 +--- util.c 2014-03-20 10:25:53.000000000 -0400 +*************** +*** 477,480 **** +--- 479,483 ---- + } + ++ #if defined (DEBUG) + #if defined (USE_VARARGS) + static FILE *_rl_tracefp; +*************** +*** 539,542 **** +--- 542,546 ---- + } + #endif ++ #endif /* DEBUG */ + + +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 2 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 3 diff --git a/mingw-w64-readline/readline63-003.sig b/mingw-w64-readline/readline63-003.sig new file mode 100644 index 0000000000..68b836ca99 Binary files /dev/null and b/mingw-w64-readline/readline63-003.sig differ diff --git a/mingw-w64-readline/readline63-004 b/mingw-w64-readline/readline63-004 new file mode 100644 index 0000000000..3cd89e3a03 --- /dev/null +++ b/mingw-w64-readline/readline63-004 @@ -0,0 +1,45 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-004 + +Bug-Reported-by: Egmont Koblinger +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00153.html + +Bug-Description: + +The signal handling changes to bash and readline (to avoid running any code +in a signal handler context) cause the cursor to be placed on the wrong +line of a multi-line command after a ^C interrupts editing. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/display.c 2013-12-27 13:10:56.000000000 -0500 +--- display.c 2014-03-27 11:52:45.000000000 -0400 +*************** +*** 2678,2682 **** + if (_rl_echoing_p) + { +! _rl_move_vert (_rl_vis_botlin); + _rl_vis_botlin = 0; + fflush (rl_outstream); +--- 2678,2683 ---- + if (_rl_echoing_p) + { +! if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */ +! _rl_move_vert (_rl_vis_botlin); + _rl_vis_botlin = 0; + fflush (rl_outstream); +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 3 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 4 diff --git a/mingw-w64-readline/readline63-004.sig b/mingw-w64-readline/readline63-004.sig new file mode 100644 index 0000000000..a12de10292 Binary files /dev/null and b/mingw-w64-readline/readline63-004.sig differ diff --git a/mingw-w64-readline/readline63-005 b/mingw-w64-readline/readline63-005 new file mode 100644 index 0000000000..8a63738490 --- /dev/null +++ b/mingw-w64-readline/readline63-005 @@ -0,0 +1,58 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-005 + +Bug-Reported-by: Juergen Daubert +Bug-Reference-ID: <20140303180430.GA7346@jue.netz> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00002.html + +Bug-Description: + +There are still applications using the deprecated Function/VFunction/etc. +typedefs in rltypedefs.h. This patch restores the typedefs, but attempts +to mark them as deprecated using gcc/clang attributes. Thanks to Max Horn +for the suggestion. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/rltypedefs.h 2011-03-26 14:53:31.000000000 -0400 +--- rltypedefs.h 2014-04-10 11:30:45.000000000 -0400 +*************** +*** 27,30 **** +--- 27,49 ---- + #endif + ++ /* Old-style, attempt to mark as deprecated in some way people will notice. */ ++ ++ #if !defined (_FUNCTION_DEF) ++ # define _FUNCTION_DEF ++ ++ #if defined(__GNUC__) || defined(__clang__) ++ typedef int Function () __attribute__ ((deprecated)); ++ typedef void VFunction () __attribute__ ((deprecated)); ++ typedef char *CPFunction () __attribute__ ((deprecated)); ++ typedef char **CPPFunction () __attribute__ ((deprecated)); ++ #else ++ typedef int Function (); ++ typedef void VFunction (); ++ typedef char *CPFunction (); ++ typedef char **CPPFunction (); ++ #endif ++ ++ #endif /* _FUNCTION_DEF */ ++ + /* New style. */ + +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 4 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 5 diff --git a/mingw-w64-readline/readline63-005.sig b/mingw-w64-readline/readline63-005.sig new file mode 100644 index 0000000000..92cf26a966 Binary files /dev/null and b/mingw-w64-readline/readline63-005.sig differ diff --git a/mingw-w64-readline/readline63-006 b/mingw-w64-readline/readline63-006 new file mode 100644 index 0000000000..a3f09304ab --- /dev/null +++ b/mingw-w64-readline/readline63-006 @@ -0,0 +1,63 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-006 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00069.html + +Bug-Description: + +Using reverse-i-search when horizontal scrolling is enabled does not redisplay +the entire line containing the successful search results. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/display.c 2014-04-08 18:19:36.000000000 -0400 +--- display.c 2014-04-20 18:32:52.000000000 -0400 +*************** +*** 1638,1642 **** + the spot of first difference is before the end of the invisible chars, + lendiff needs to be adjusted. */ +! if (current_line == 0 && !_rl_horizontal_scroll_mode && + current_invis_chars != visible_wrap_offset) + { +--- 1638,1642 ---- + the spot of first difference is before the end of the invisible chars, + lendiff needs to be adjusted. */ +! if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */ + current_invis_chars != visible_wrap_offset) + { +*************** +*** 1826,1831 **** + _rl_last_c_pos += bytes_to_insert; + + if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new))) +! goto clear_rest_of_line; + } + } +--- 1826,1836 ---- + _rl_last_c_pos += bytes_to_insert; + ++ /* XXX - we only want to do this if we are at the end of the line ++ so we move there with _rl_move_cursor_relative */ + if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new))) +! { +! _rl_move_cursor_relative (ne-new, new); +! goto clear_rest_of_line; +! } + } + } +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 5 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 6 diff --git a/mingw-w64-readline/readline63-006.sig b/mingw-w64-readline/readline63-006.sig new file mode 100644 index 0000000000..36685e6ea6 Binary files /dev/null and b/mingw-w64-readline/readline63-006.sig differ diff --git a/mingw-w64-readline/readline63-007 b/mingw-w64-readline/readline63-007 new file mode 100644 index 0000000000..1b657924d9 --- /dev/null +++ b/mingw-w64-readline/readline63-007 @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-007 + +Bug-Reported-by: John Lenton +Bug-Reference-ID: +Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476 + +Bug-Description: + +Readline should allow SIGALRM and SIGVTALRM (if available) to `interrupt' +rl_getc and cause the handler to run when not in a signal handling context. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/input.c 2014-01-10 15:07:08.000000000 -0500 +--- input.c 2014-05-30 16:20:56.000000000 -0400 +*************** +*** 535,540 **** +--- 538,551 ---- + else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); ++ /* keyboard-generated signals of interest */ + else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) + RL_CHECK_SIGNALS (); ++ /* non-keyboard-generated signals of interest */ ++ else if (_rl_caught_signal == SIGALRM ++ #if defined (SIGVTALRM) ++ || _rl_caught_signal == SIGVTALRM ++ #endif ++ ) ++ RL_CHECK_SIGNALS (); + + if (rl_signal_event_hook) +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 6 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 7 diff --git a/mingw-w64-readline/readline63-007.sig b/mingw-w64-readline/readline63-007.sig new file mode 100644 index 0000000000..81f8472b1c Binary files /dev/null and b/mingw-w64-readline/readline63-007.sig differ diff --git a/mingw-w64-readline/readline63-008 b/mingw-w64-readline/readline63-008 new file mode 100644 index 0000000000..691016f755 --- /dev/null +++ b/mingw-w64-readline/readline63-008 @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-008 + +Bug-Reported-by: Jared Yanovich +Bug-Reference-ID: <20140625225019.GJ17044@nightderanger.psc.edu> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00070.html + +Bug-Description: + +When the readline `revert-all-at-newline' option is set, pressing newline +when the current line is one retrieved from history results in a double free +and a segmentation fault. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/misc.c 2012-09-01 18:03:11.000000000 -0400 +--- misc.c 2014-06-30 13:41:19.000000000 -0400 +*************** +*** 462,465 **** +--- 462,466 ---- + /* Set up rl_line_buffer and other variables from history entry */ + rl_replace_from_history (entry, 0); /* entry->line is now current */ ++ entry->data = 0; /* entry->data is now current undo list */ + /* Undo all changes to this history entry */ + while (rl_undo_list) +*************** +*** 469,473 **** + FREE (entry->line); + entry->line = savestring (rl_line_buffer); +- entry->data = 0; + } + entry = previous_history (); +--- 470,473 ---- +*** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 7 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 8 diff --git a/mingw-w64-readline/readline63-008.sig b/mingw-w64-readline/readline63-008.sig new file mode 100644 index 0000000000..8f788e00e0 Binary files /dev/null and b/mingw-w64-readline/readline63-008.sig differ diff --git a/mingw-w64-readosm/PKGBUILD b/mingw-w64-readosm/PKGBUILD index ed2b3c8d4b..407ab6ab65 100644 --- a/mingw-w64-readosm/PKGBUILD +++ b/mingw-w64-readosm/PKGBUILD @@ -3,7 +3,7 @@ _realname=readosm pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.0b +pkgver=1.0.0e pkgrel=1 pkgdesc="Library to extract valid data from within an Open Street Map input file (mingw-w64)" arch=('any') @@ -12,10 +12,11 @@ license=('MPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' '!libtool') -source=("http://www.gaia-gis.it/gaia-sins/${_realname}-sources/${_realname}-$pkgver.tar.gz") -sha256sums=('ed7e0d17fbfc7574b097e2358a143788eba23e0477e7108237f4b0aac3d85710') +source=("http://www.gaia-gis.it/gaia-sins/${_realname}-sources/${_realname}-${pkgver}.tar.gz") +sha256sums=('1fd839e05b411db6ba1ca6199bf3334ab9425550a58e129c07ad3c6d39299acf') build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" diff --git a/mingw-w64-recode/PKGBUILD b/mingw-w64-recode/PKGBUILD index 323a2f46fa..e8b8b33efc 100644 --- a/mingw-w64-recode/PKGBUILD +++ b/mingw-w64-recode/PKGBUILD @@ -3,7 +3,7 @@ _realname=recode pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=3.6 -pkgrel=4 +pkgrel=5 pkgdesc="Converts files between various character sets and usages (mingw-w64)" arch=('any') url="http://recode.progiciels-bpi.ca/index.html" @@ -76,17 +76,20 @@ prepare() { } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + export ac_cv_func_malloc_0_nonnull=yes export jm_cv_func_working_malloc=yes export jm_cv_func_working_realloc=yes - ${srcdir}/pinard-Recode-2127b34/configure \ + ../pinard-Recode-2127b34/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --mandir=${MINGW_PREFIX}/share/man \ --infodir=${MINGW_PREFIX}/share/info \ --without-included-gettext + make } diff --git a/mingw-w64-remake-git/PKGBUILD b/mingw-w64-remake-git/PKGBUILD new file mode 100644 index 0000000000..d75a37701b --- /dev/null +++ b/mingw-w64-remake-git/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Ray Donnelly + +_realname=remake +_autotools=yes +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +_ver_base=4.1 +pkgver=4.1.2943.f059924 +pkgrel=1 +pkgdesc="Enhanced GNU Make - tracing, error reporting, debugging, profiling and more (mingw-w64)" +arch=('any') +url="https://github.com/rocky/remake" +license=('GPL3') +provides=("${MINGW_PACKAGE_PREFIX}-remake") +conflicts=("${MINGW_PACKAGE_PREFIX}-remake") +options=('debug' '!strip') +depends=("${MINGW_PACKAGE_PREFIX}-gettext" + "${MINGW_PACKAGE_PREFIX}-readline") +makedepends=('git' + 'wget') +source=("${_realname}"::"git+https://github.com/rocky/${_realname}#branch=master" + 'make-getopt.patch' + 'make-linebuf-mingw.patch') +md5sums=('SKIP' + '3969663ca1f6c182b37632fabeca52bb' + '7747139a747a9fe21b1099375ce72052') + +pkgver() { + cd "${srcdir}"/${_realname} + printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${srcdir}/${_realname} + patch -p1 -i ${srcdir}/make-getopt.patch + patch -p1 -i ${srcdir}/make-linebuf-mingw.patch + if [[ "${_autotools}" = "yes" ]]; then + autoreconf -fi + fi +} + +build() { + if [[ "${_autotools}" = "yes" ]]; then + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --without-libintl-prefix \ + --without-libiconv-prefix \ + ac_cv_dos_paths=yes + make -j1 scm-update do-po-update all remake + else + cmd /c 'build_w32.bat --without-guile gcc' + fi +} + +package() { + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} + if [[ "${_autotools}" = "yes" ]]; then + cd ${srcdir}/build-${MINGW_CHOST} + cp -f make.exe ${pkgdir}${MINGW_PREFIX}/bin/mingw32-remake.exe + else + cd ${srcdir}/${_realname} + cp -f gnumake.exe ${pkgdir}${MINGW_PREFIX}/bin/mingw32-remake.exe + cp -f libgnumake-1.dll.a ${pkgdir}${MINGW_PREFIX}/lib/ + cp -f gnumake.h ${pkgdir}${MINGW_PREFIX}/include/ + fi +} diff --git a/mingw-w64-remake-git/make-getopt.patch b/mingw-w64-remake-git/make-getopt.patch new file mode 100644 index 0000000000..5b9f81188c --- /dev/null +++ b/mingw-w64-remake-git/make-getopt.patch @@ -0,0 +1,23 @@ +Fixes the following warnings: + +getopt.c: In function '_getopt_initialize': +getopt.c:382: warning: unused parameter 'argc' +getopt.c:382: warning: unused parameter 'argv' + +Index: getopt.c +=================================================================== +RCS file: /sources/make/make/getopt.c,v +retrieving revision 1.22 +diff -u -p -r1.22 getopt.c +--- make-3.82.orig/getopt.c 25 Oct 2009 18:56:45 -0000 1.22 ++++ make-3.82/getopt.c 5 Jul 2010 20:05:22 -0000 +@@ -436,6 +436,9 @@ _getopt_initialize (int argc, char *cons + } + else + nonoption_flags_len = 0; ++#else ++ (void)argc; ++ (void)argv; + #endif + + return optstring; diff --git a/mingw-w64-remake-git/make-linebuf-mingw.patch b/mingw-w64-remake-git/make-linebuf-mingw.patch new file mode 100644 index 0000000000..ce93fa0c66 --- /dev/null +++ b/mingw-w64-remake-git/make-linebuf-mingw.patch @@ -0,0 +1,14 @@ +--- make.orig/main.c ++++ make/main.c +@@ -971,8 +971,11 @@ + + #endif + ++/* setlocale interferes with line buffering if using parallel make on MinGW */ ++#ifndef __MINGW32__ + /* Set up gettext/internationalization support. */ + setlocale (LC_ALL, ""); ++#endif + /* The cast to void shuts up compiler warnings on systems that + disable NLS. */ + (void)bindtextdomain (PACKAGE, LOCALEDIR); diff --git a/mingw-w64-rtmpdump-git/0012-no-sbin.patch b/mingw-w64-rtmpdump-git/0012-no-sbin.patch new file mode 100644 index 0000000000..3c6cf059e7 --- /dev/null +++ b/mingw-w64-rtmpdump-git/0012-no-sbin.patch @@ -0,0 +1,26 @@ +--- rtmpdump/Makefile.orig 2015-04-10 09:39:49.033600000 +0300 ++++ rtmpdump/Makefile 2015-04-10 09:42:55.350600000 +0300 +@@ -25,11 +25,9 @@ + LDFLAGS=-Wall $(XLDFLAGS) + + bindir=$(prefix)/bin +-sbindir=$(prefix)/sbin + mandir=$(prefix)/share/man + + BINDIR=$(DESTDIR)$(bindir) +-SBINDIR=$(DESTDIR)$(sbindir) + MANDIR=$(DESTDIR)$(mandir) + + LIBS_posix= +@@ -59,9 +57,9 @@ + $(PROGS): $(LIBRTMP) + + install: $(PROGS) +- -mkdir -p $(BINDIR) $(SBINDIR) $(MANDIR)/man1 $(MANDIR)/man8 ++ -mkdir -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man8 + cp rtmpdump$(EXT) $(BINDIR) +- cp rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(SBINDIR) ++ cp rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(BINDIR) + cp rtmpdump.1 $(MANDIR)/man1 + cp rtmpgw.8 $(MANDIR)/man8 + @cd librtmp; $(MAKE) install diff --git a/mingw-w64-rtmpdump-git/0013-no-extra-dll.patch b/mingw-w64-rtmpdump-git/0013-no-extra-dll.patch new file mode 100644 index 0000000000..0574bb5638 --- /dev/null +++ b/mingw-w64-rtmpdump-git/0013-no-extra-dll.patch @@ -0,0 +1,8 @@ +--- rtmpdump/librtmp/Makefile.orig 2015-04-10 09:42:13.667400000 +0300 ++++ rtmpdump/librtmp/Makefile 2015-04-10 09:51:38.129000000 +0300 +@@ -117,5 +117,4 @@ + install_so: librtmp$(SO_EXT) install_base + cp librtmp$(SO_EXT) $(SODIR) + $(INSTALL_IMPLIB) +- cd $(SODIR); ln -sf librtmp$(SO_EXT) librtmp.$(SOX) + diff --git a/mingw-w64-rtmpdump-git/PKGBUILD b/mingw-w64-rtmpdump-git/PKGBUILD index 6770465106..a10462900e 100644 --- a/mingw-w64-rtmpdump-git/PKGBUILD +++ b/mingw-w64-rtmpdump-git/PKGBUILD @@ -1,31 +1,38 @@ # Maintainer: Alexey Pavlov _realname=rtmpdump - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r494.79459a2 -pkgrel=1 +pkgver=r499.a107cef +pkgrel=3 pkgdesc="A tool to download rtmp streams (mingw-w64)" arch=('any') url="http://rtmpdump.mplayerhq.hu/" license=('GPL2' 'LGPL2.1') provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "git") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-openssl") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "git") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-nettle" + "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' 'staticlibs') source=("$_realname::git+git://git.ffmpeg.org/rtmpdump" - 0001-mingw.mingw.patch - 0002-no-fPIC.mingw.patch - 0003-better-w32-threading.all.patch - 0004-gnu_printf.all.patch - 0005-fix-unused-var-warning.all.patch - 0006-deprecated-gnutls-type.all.patch - 0007-cast-appropriately-for-nettle.all.patch - 0008-unused-variable-warning-fix.all.patch - 0009-correct-cast.all.patch - 0010-unused-variable-fix.all.patch - 0011-fix-parallel-install.all.patch) + 0001-mingw.mingw.patch + 0002-no-fPIC.mingw.patch + 0003-better-w32-threading.all.patch + 0004-gnu_printf.all.patch + 0005-fix-unused-var-warning.all.patch + 0006-deprecated-gnutls-type.all.patch + 0007-cast-appropriately-for-nettle.all.patch + 0008-unused-variable-warning-fix.all.patch + 0009-correct-cast.all.patch + 0010-unused-variable-fix.all.patch + 0011-fix-parallel-install.all.patch + 0012-no-sbin.patch + 0013-no-extra-dll.patch) md5sums=('SKIP' '7328df954e79584ec823b6c9fa99ae3b' '3db9a091da6004a3d3f6e8a19be41ba1' @@ -37,7 +44,9 @@ md5sums=('SKIP' '24789e1365e8331e795faa87a3c4fd3b' '3e6dca173d7aee3f520e587e3b6ffbe5' '1c60c612bc75cf001f9819e735291c2d' - '79cb1025e9c84f1bcda1e0c039dbf849') + '79cb1025e9c84f1bcda1e0c039dbf849' + '89c27956be34a69ad9e6b8ab75104033' + '3aac220f5b416d03808a9bc49ef135f2') pkgver() { cd "$srcdir/$_realname" @@ -57,6 +66,8 @@ prepare() { patch -p1 -i ${srcdir}/0009-correct-cast.all.patch patch -p1 -i ${srcdir}/0010-unused-variable-fix.all.patch patch -p1 -i ${srcdir}/0011-fix-parallel-install.all.patch + patch -p1 -i ${srcdir}/0012-no-sbin.patch + patch -p1 -i ${srcdir}/0013-no-extra-dll.patch } build() { @@ -69,7 +80,4 @@ package() { cd "${srcdir}/build-${MINGW_CHOST}" mkdir -p ${pkgdir}${MINGW_PREFIX}/lib make CC=gcc LD=ld AR=ar SYS=mingw prefix=${MINGW_PREFIX} mandir=${MINGW_PREFIX}/share/man DESTDIR="$pkgdir" install - - mv ${pkgdir}${MINGW_PREFIX}/sbin/* ${pkgdir}${MINGW_PREFIX}/bin/ - rm -r ${pkgdir}${MINGW_PREFIX}/sbin } diff --git a/mingw-w64-rubberband/01-mingw-shared.patch b/mingw-w64-rubberband/01-mingw-shared.patch new file mode 100644 index 0000000000..ae4a3ce4a6 --- /dev/null +++ b/mingw-w64-rubberband/01-mingw-shared.patch @@ -0,0 +1,46 @@ +--- rubberband-1.8.1/Makefile.in.orig 2015-05-23 19:57:54.441800000 +0300 ++++ rubberband-1.8.1/Makefile.in 2015-05-23 20:06:52.485800000 +0300 +@@ -12,19 +12,22 @@ + MKDIR := mkdir + AR := ar + +-DYNAMIC_EXTENSION := .so ++LIBRARY_NAME := librubberband ++DYNAMIC_EXTENSION := .dll + DYNAMIC_FULL_VERSION := .2.1.0 +-DYNAMIC_ABI_VERSION := .2 +-DYNAMIC_LIBNAME := librubberband$(DYNAMIC_EXTENSION) +-DYNAMIC_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,-soname=$(DYNAMIC_LIBNAME)$(DYNAMIC_ABI_VERSION) ++DYNAMIC_ABI_VERSION := 2 ++DYNAMIC_LIBNAME := $(LIBRARY_NAME)-${DYNAMIC_ABI_VERSION}$(DYNAMIC_EXTENSION) ++IMP_LIBNAME := $(LIBRARY_NAME)$(DYNAMIC_EXTENSION).a ++DYNAMIC_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,--out-implib,lib/$(IMP_LIBNAME) + VAMP_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,--version-script=vamp/vamp-plugin.map + LADSPA_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,--version-script=ladspa/ladspa-plugin.map + + PROGRAM_TARGET := bin/rubberband + STATIC_TARGET := lib/librubberband.a +-DYNAMIC_TARGET := lib/$(DYNAMIC_LIBNAME) +-VAMP_TARGET := lib/vamp-rubberband$(DYNAMIC_EXTENSION) +-LADSPA_TARGET := lib/ladspa-rubberband$(DYNAMIC_EXTENSION) ++DYNAMIC_TARGET := bin/$(DYNAMIC_LIBNAME) ++IMPL_TARGET := lib/$(IMP_LIBNAME) ++VAMP_TARGET := bin/vamp-rubberband$(DYNAMIC_EXTENSION) ++LADSPA_TARGET := bin/ladspa-rubberband$(DYNAMIC_EXTENSION) + + INSTALL_BINDIR := @prefix@/bin + INSTALL_INCDIR := @prefix@/include/rubberband +@@ -148,11 +151,9 @@ + cp $(PROGRAM_TARGET) $(DESTDIR)$(INSTALL_BINDIR) + cp $(PUBLIC_INCLUDES) $(DESTDIR)$(INSTALL_INCDIR) + cp $(STATIC_TARGET) $(DESTDIR)$(INSTALL_LIBDIR) +- rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(DYNAMIC_LIBNAME)$(DYNAMIC_ABI_VERSION) ++ cp $(IMPL_TARGET) $(DESTDIR)$(INSTALL_LIBDIR) + rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(DYNAMIC_LIBNAME) +- cp $(DYNAMIC_TARGET) $(DESTDIR)$(INSTALL_LIBDIR)/$(DYNAMIC_LIBNAME)$(DYNAMIC_FULL_VERSION) +- test -n "$(DYNAMIC_FULL_VERSION)" && ln -s $(DYNAMIC_LIBNAME)$(DYNAMIC_FULL_VERSION) $(DESTDIR)$(INSTALL_LIBDIR)/$(DYNAMIC_LIBNAME)$(DYNAMIC_ABI_VERSION) +- test -n "$(DYNAMIC_FULL_VERSION)" && ln -s $(DYNAMIC_LIBNAME)$(DYNAMIC_FULL_VERSION) $(DESTDIR)$(INSTALL_LIBDIR)/$(DYNAMIC_LIBNAME) ++ cp $(DYNAMIC_TARGET) $(DESTDIR)$(INSTALL_BINDIR)/$(DYNAMIC_LIBNAME) + cp $(VAMP_TARGET) $(DESTDIR)$(INSTALL_VAMPDIR) + cp vamp/vamp-rubberband.cat $(DESTDIR)$(INSTALL_VAMPDIR) + cp $(LADSPA_TARGET) $(DESTDIR)$(INSTALL_LADSPADIR) diff --git a/mingw-w64-rubberband/PKGBUILD b/mingw-w64-rubberband/PKGBUILD new file mode 100644 index 0000000000..8d4de8d25c --- /dev/null +++ b/mingw-w64-rubberband/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Jeff Hubbard + +_realname=rubberband +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.8.1 +pkgrel=2 +pkgdesc="High quality software library for audio time-stretching and pitch-shifting. (mingw-w64)" +arch=('any') +url="http://breakfastquay.com/rubberband/" +license=("GPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-fftw" + "${MINGW_PACKAGE_PREFIX}-libsamplerate" + "${MINGW_PACKAGE_PREFIX}-libsndfile" + "${MINGW_PACKAGE_PREFIX}-ladspa-sdk" + "${MINGW_PACKAGE_PREFIX}-vamp-plugin-sdk") +source=("http://code.breakfastquay.com/attachments/download/34/${_realname}-${pkgver}.tar.bz2" + 01-mingw-shared.patch) +md5sums=('6c2b4e18a714bcc297d0db81a10f9348' + 'a8afbacb354ee668d1a2aa4035dc0914') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/01-mingw-shared.patch +} + +build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + cp -rf "${_realname}-${pkgver}" "build-${MINGW_CHOST}" + cd build-${MINGW_CHOST} + + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-ruby/0003-fix-check-types.patch b/mingw-w64-ruby/0003-fix-check-types.patch index 6369a03d7b..d8f8fae83f 100644 --- a/mingw-w64-ruby/0003-fix-check-types.patch +++ b/mingw-w64-ruby/0003-fix-check-types.patch @@ -4,8 +4,8 @@ ac_cv_func_malloc_usable_size=no { test "$target_cpu" = x64 && ac_cv_func___builtin_setjmp=no; } AC_CHECK_TYPE([NET_LUID], [], [], -- [@%:@include -- @%:@include ]) +- [@%:@include +- @%:@include ]) + [@%:@include + @%:@include + @%:@include ]) diff --git a/mingw-w64-ruby/PKGBUILD b/mingw-w64-ruby/PKGBUILD index 10bcd79bf9..d3ca00a75a 100644 --- a/mingw-w64-ruby/PKGBUILD +++ b/mingw-w64-ruby/PKGBUILD @@ -1,8 +1,12 @@ # Maintainer: Alexey Pavlov +# Before building package need CD into directory with drive letter, like +# cd /c/build/mingw-w64-ruby + _realname=ruby +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.1.5 +pkgver=2.2.3 pkgrel=1 pkgdesc="An object-oriented language for quick and easy programming (mingw-w64)" arch=('any') @@ -10,28 +14,28 @@ url="http://www.ruby-lang.org/en" license=("BSD, custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gdbm" - "${MINGW_PACKAGE_PREFIX}-libyaml" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-tk" - "${MINGW_PACKAGE_PREFIX}-ncurses" - "${MINGW_PACKAGE_PREFIX}-libffi") + "${MINGW_PACKAGE_PREFIX}-gdbm" + "${MINGW_PACKAGE_PREFIX}-libyaml" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-tk") options=('staticlibs' 'strip') -source=("http://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/ruby-${pkgver}.tar.bz2" +source=("http://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/${_realname}-${pkgver}.tar.bz2" 0001-mingw-w64-time-functions.patch 0002-use-gnu-printf.patch 0003-fix-check-types.patch) -md5sums=('a7c3e5fec47eff23091b566e9e1dac1b' +md5sums=('f49a734729a71774d4a94a9a603114b2' '4256c35613e6dc15c164015ae8977d4a' '6d54f98b9e3a0d0077e9348dc7f69482' - '09bde4c15842b6a8aa372ad8ad1a8af7') + 'f9170e918fa7b7118d241d238d7a0e3b') prepare() { - cd ${srcdir}/ruby-${pkgver} + cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-mingw-w64-time-functions.patch patch -p1 -i ${srcdir}/0002-use-gnu-printf.patch patch -p1 -i ${srcdir}/0003-fix-check-types.patch - + autoreconf -fi } @@ -42,20 +46,21 @@ build() { CFLAGS+=" -I${MINGW_PREFIX}/include/ncurses ${FFI_INC}" CXXFLAGS+=" -I${MINGW_PREFIX}/include/ncurses ${FFI_INC}" - mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/ruby-${pkgver}/configure \ + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} - make + + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make - GNUMakefile DESTDIR="${pkgdir}" install-nodoc - for script in {erb,gem,irb,rake,rdoc,ri,testrb}; do + make -f GNUMakefile DESTDIR="${pkgdir}" install-nodoc + for script in {erb,gem,irb,rake,rdoc,ri}; do install ${srcdir}/ruby-${pkgver}/bin/${script} \ ${pkgdir}${MINGW_PREFIX}/bin/ done diff --git a/mingw-w64-rust/PKGBUILD b/mingw-w64-rust/PKGBUILD index c280604d84..70f868ea5b 100644 --- a/mingw-w64-rust/PKGBUILD +++ b/mingw-w64-rust/PKGBUILD @@ -1,46 +1,46 @@ # Maintainer: Alexey Pavlov _realname=rust - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.9 +pkgver=1.2.0 pkgrel=1 pkgdesc="A safe, concurrent, practical language from Mozilla (mingw-w64)" arch=('any') url="http://www.rust-lang.org/" license=('custom:MIT' 'Apache') -#depends=('shared-mime-info') -makedepends=('git' - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-llvm" - 'curl' - "${MINGW_PACKAGE_PREFIX}-libffi" - 'python2' - ) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("git" + "bison" + "flex" + "${MINGW_PACKAGE_PREFIX}-curl" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-llvm" + "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-python2") options=('!makeflags' 'staticlibs') #install=rust.install -source=(http://static.rust-lang.org/dist/rust-${pkgver}.tar.gz - add-libffi-to-link.patch) -md5sums=('0c38a99666e0a13d4617a06e1d44b8da' - '9fa3227f99947d14c773ea0804736efa') +source=(https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz) +sha256sums=('ea6eb983daf2a073df57186a58f0d4ce0e85c711bec13c627a8c85d51b6a6d78') prepare() { - cd ${srcdir}/${_realname}-$pkgver - sed -e "s|CFG_WINDOWSY_\$(1)|0|g" -i mk/rustllvm.mk - patch -p1 -i ${srcdir}/add-libffi-to-link.patch + cd ${srcdir}/${_realname}c-$pkgver + #sed -e "s|CFG_WINDOWSY_\$(1)|0|g" -i mk/rustllvm.mk } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" #export CFG_LLVM_ROOT=${MINGW_PREFIX} cd "${srcdir}/build-${MINGW_CHOST}" - ../${_realname}-$pkgver/configure \ + ../${_realname}c-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ - --llvm-root=${MINGW_PREFIX} - + --llvm-root=${MINGW_PREFIX} \ + --release-channel=stable + #--enable-local-rust use an installed rustc rather than downloading a snapshot #--local-rust-root=[/usr/local] set prefix for local rust binary #--enable-clang prefer clang to gcc for building the runtime @@ -49,6 +49,9 @@ build() { } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR=${pkgdir} install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + rm -f ${pkgdir}${MINGW_PREFIX}/bin/libgcc*.dll + rm -f ${pkgdir}${MINGW_PREFIX}/bin/libstd*.dll } diff --git a/mingw-w64-rust/add-libffi-to-link.patch b/mingw-w64-rust/add-libffi-to-link.patch deleted file mode 100644 index 920ff771e8..0000000000 --- a/mingw-w64-rust/add-libffi-to-link.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rust-0.9/src/librustc/back/link.rs.orig 2014-01-19 21:12:14.717800000 +0400 -+++ rust-0.9/src/librustc/back/link.rs 2014-01-19 21:12:54.170200000 +0400 -@@ -1071,6 +1071,8 @@ - // DWARF stack unwinding will not work. - // This behavior may be overriden by --link-args "-static-libgcc" - args.push(~"-shared-libgcc"); -+ // LLVM builded with libffi -+ args.push(~"-lffi"); - } - - add_local_native_libraries(&mut args, sess); diff --git a/mingw-w64-rxspencer/PKGBUILD b/mingw-w64-rxspencer/PKGBUILD new file mode 100644 index 0000000000..7619f6f3d0 --- /dev/null +++ b/mingw-w64-rxspencer/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Andrea Zagli + +_realname=rxspencer +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=alpha3.8.g6 +pkgrel=2 +pkgdesc="Henry Spencer's BSD regular expression library modified to allow building as a shared library (mingw-w64)" +arch=('any') +url="https://garyhouston.github.io/regex/" +options=('strip' 'staticlibs') +license=('custom') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/garyhouston/${_realname}/archive/${pkgver}.tar.gz) +noextract=(${_realname}-${pkgver}.tar.gz) +sha256sums=('2176def84f876b3abd845543e3b2f6bca8c5a2c7e8bd4e9034f179e67d754a4d') + +prepare() { + tar --exclude=ltmain.sh -zxf ${_realname}-${pkgver}.tar.gz + + cd "${srcdir}"/${_realname}-${pkgver} + autoreconf -f -i +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + mkdir ${pkgdir}/${MINGW_PREFIX}/bin + mv ${pkgdir}${MINGW_PREFIX}/lib/librxspencer-0.dll ${pkgdir}/${MINGW_PREFIX}/bin + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYRIGHT" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYRIGHT" +} diff --git a/mingw-w64-schroedinger/PKGBUILD b/mingw-w64-schroedinger/PKGBUILD index dc0eb53666..74a7905155 100644 --- a/mingw-w64-schroedinger/PKGBUILD +++ b/mingw-w64-schroedinger/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=schroedinger - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.0.11 -pkgrel=2 +pkgrel=3 pkgdesc="An implemenation of the Dirac video codec in ANSI C code (mingw-w64)" arch=('any') url="http://www.diracvideo.org/" @@ -13,8 +12,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-orc") options=('strip' 'staticlibs') source=("http://www.diracvideo.org/download/schroedinger/${_realname}-${pkgver}.tar.gz" - 0001-builddir-not-srcdir.all.patch - 0002-link-testsuite-to-orc-tmp.mingw.patch) + 0001-builddir-not-srcdir.all.patch + 0002-link-testsuite-to-orc-tmp.mingw.patch) md5sums=('da6af08e564ca1157348fb8d92efc891' '2a98d3929c8e4106768d437cc0ce58fb' 'e073b0580ca3e8171a2266aa529472bd') @@ -27,6 +26,7 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure \ @@ -35,6 +35,7 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --with-opengl=${MINGW_PREFIX} + make } diff --git a/mingw-w64-scite/0001-Use-POSIX-tools-in-makefiles.patch b/mingw-w64-scite/0001-Use-POSIX-tools-in-makefiles.patch new file mode 100644 index 0000000000..2ea8209271 --- /dev/null +++ b/mingw-w64-scite/0001-Use-POSIX-tools-in-makefiles.patch @@ -0,0 +1,81 @@ +From 4591a15982077c8a1d4c9505aeb1025722129562 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 12 Feb 2015 12:57:31 +0100 +Subject: [PATCH 1/3] Use POSIX tools in makefiles + +--- + scintilla/gtk/makefile | 2 +- + scite/win32/makefile | 24 +++--------------------- + 2 files changed, 4 insertions(+), 22 deletions(-) + +diff --git a/scintilla/gtk/makefile b/scintilla/gtk/makefile +index cdf1aa1..0d4397e 100644 +--- a/scintilla/gtk/makefile ++++ b/scintilla/gtk/makefile +@@ -32,7 +32,7 @@ endif + endif + + ifdef windir +-DEL = del /q ++DEL = rm -f + COMPLIB=..\bin\scintilla.a + else + DEL = rm -f +diff --git a/scite/win32/makefile b/scite/win32/makefile +index daffb70..e5ccb62 100644 +--- a/scite/win32/makefile ++++ b/scite/win32/makefile +@@ -10,24 +10,6 @@ WINDRES ?= windres + ifeq ($(OS),Windows_NT) + CC = gcc + DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del) +- COPY = xcopy /Y +- VER = cmd /c ver +- # Discover Windows version by running 'VER' command and parsing output +- # For Windows 2000 looks like:Microsoft Windows 2000 [Version 5.00.2195] +- WINVERWORDS:=$(wordlist 1,2,$(subst ., ,$(lastword $(shell $(VER))))) +- WINVER:=$(firstword $(WINVERWORDS)).$(lastword $(WINVERWORDS)) +- # Windows NT 4 and Windows 2000 do not support themes so turn off +-ifeq '$(WINVER)' '4.0' +- VERSION_DEFINES:=-DDISABLE_THEMES -DWIN_TARGET=0x0400 +-else +-ifeq '$(WINVER)' '5.00' +- VERSION_DEFINES:=-DDISABLE_THEMES +-else +- UXLIB:=-luxtheme +-endif +-endif +-else +- DEL = rm -f + COPY = cp -a + UXLIB:=-luxtheme + endif +@@ -163,14 +145,14 @@ embedded: ../src/Embedded.properties + + ../bin/Scintilla.dll: ../../scintilla/bin/Scintilla.dll + ifeq ($(OS),Windows_NT) +- $(COPY) $(subst /,\, $< $(@D)) ++ $(COPY) $^ $(@D) + else + $(COPY) $^ $(@D) + endif + + ../bin/SciLexer.dll: ../../scintilla/bin/SciLexer.dll + ifeq ($(OS),Windows_NT) +- $(COPY) $(subst /,\, $< $(@D)) ++ $(COPY) $^ $(@D) + else + $(COPY) $^ $(@D) + endif +@@ -178,7 +160,7 @@ endif + # Using '/' rather than '\' as that allows make to match the next rule + ../bin/%.properties: ../src/%.properties + ifeq ($(OS),Windows_NT) +- $(COPY) $(subst /,\, $< $(@D)) ++ $(COPY) $^ $(@D) + else + $(COPY) $^ $(@D) + endif +-- +2.3.0 + diff --git a/mingw-w64-scite/0002-Prefix-library-names.patch b/mingw-w64-scite/0002-Prefix-library-names.patch new file mode 100644 index 0000000000..9b8efd29d1 --- /dev/null +++ b/mingw-w64-scite/0002-Prefix-library-names.patch @@ -0,0 +1,90 @@ +From b65e62d86dd1d7f054dd6604d76dac1660d66027 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 12 Feb 2015 13:03:03 +0100 +Subject: [PATCH 2/3] Prefix library names + +--- + scintilla/gtk/makefile | 4 ++-- + scintilla/win32/makefile | 4 ++-- + scite/win32/SciTEWin.cxx | 2 +- + scite/win32/makefile | 6 +++--- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/scintilla/gtk/makefile b/scintilla/gtk/makefile +index 0d4397e..026f358 100644 +--- a/scintilla/gtk/makefile ++++ b/scintilla/gtk/makefile +@@ -33,10 +33,10 @@ endif + + ifdef windir + DEL = rm -f +-COMPLIB=..\bin\scintilla.a ++COMPLIB=..\bin\libScintillaGtk.a + else + DEL = rm -f +-COMPLIB=../bin/scintilla.a ++COMPLIB=../bin/libScintillaGtk.a + endif + + vpath %.h ../src ../include ../lexlib +diff --git a/scintilla/win32/makefile b/scintilla/win32/makefile +index 806e585..7550b4a 100644 +--- a/scintilla/win32/makefile ++++ b/scintilla/win32/makefile +@@ -13,8 +13,8 @@ endif + RANLIB ?= ranlib + WINDRES ?= windres + +-COMPONENT = ../bin/Scintilla.dll +-LEXCOMPONENT = ../bin/SciLexer.dll ++COMPONENT = ../bin/libScintilla.dll ++LEXCOMPONENT = ../bin/libSciLexer.dll + LEXLIB = Lexers.a + + vpath %.h ../src ../include ../lexlib +diff --git a/scite/win32/SciTEWin.cxx b/scite/win32/SciTEWin.cxx +index 22959cb..16c21a8 100644 +--- a/scite/win32/SciTEWin.cxx ++++ b/scite/win32/SciTEWin.cxx +@@ -2166,7 +2166,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) { + Scintilla_RegisterClasses(hInstance); + #else + +- HMODULE hmod = ::LoadLibrary(TEXT("SciLexer.DLL")); ++ HMODULE hmod = ::LoadLibrary(TEXT("libSciLexer.dll")); + if (hmod == NULL) + ::MessageBox(NULL, TEXT("The Scintilla DLL could not be loaded. SciTE will now close"), + TEXT("Error loading Scintilla"), MB_OK | MB_ICONERROR); +diff --git a/scite/win32/makefile b/scite/win32/makefile +index e5ccb62..5125190 100644 +--- a/scite/win32/makefile ++++ b/scite/win32/makefile +@@ -95,7 +95,7 @@ OTHER_OBJS = $(SHAREDOBJS) $(LUA_OBJS) SciTERes.o SciTEWin.o + + OBJS = Credits.o $(OTHER_OBJS) + +-DLLS=../bin/Scintilla.dll ../bin/SciLexer.dll ++DLLS=../bin/libScintilla.dll ../bin/libSciLexer.dll + + #++Autogenerated -- run ../scripts/RegenerateSource.py to regenerate + #**LEXPROPS=\\\n\(../bin/\* \) +@@ -143,14 +143,14 @@ deps: + + embedded: ../src/Embedded.properties + +-../bin/Scintilla.dll: ../../scintilla/bin/Scintilla.dll ++../bin/libScintilla.dll: ../../scintilla/bin/libScintilla.dll + ifeq ($(OS),Windows_NT) + $(COPY) $^ $(@D) + else + $(COPY) $^ $(@D) + endif + +-../bin/SciLexer.dll: ../../scintilla/bin/SciLexer.dll ++../bin/libSciLexer.dll: ../../scintilla/bin/libSciLexer.dll + ifeq ($(OS),Windows_NT) + $(COPY) $^ $(@D) + else +-- +2.3.0 + diff --git a/mingw-w64-scite/0003-Use-FHS.patch b/mingw-w64-scite/0003-Use-FHS.patch new file mode 100644 index 0000000000..6f6c4f4035 --- /dev/null +++ b/mingw-w64-scite/0003-Use-FHS.patch @@ -0,0 +1,76 @@ +From 6c7abcc75da8f667bf769bacff331e19d4a4dff2 Mon Sep 17 00:00:00 2001 +From: David Macek +Date: Thu, 12 Feb 2015 13:04:15 +0100 +Subject: [PATCH 3/3] Use FHS + +--- + scite/src/SciTEIO.cxx | 7 ------- + scite/win32/SciTEWin.cxx | 25 ++++++++++++++++++++++++- + 2 files changed, 24 insertions(+), 8 deletions(-) + +diff --git a/scite/src/SciTEIO.cxx b/scite/src/SciTEIO.cxx +index 34abc6e..5da0040 100644 +--- a/scite/src/SciTEIO.cxx ++++ b/scite/src/SciTEIO.cxx +@@ -42,14 +42,7 @@ + #include "SciTEBase.h" + #include "Utf8_16.h" + +-#if defined(GTK) + const GUI::gui_char propUserFileName[] = GUI_TEXT(".SciTEUser.properties"); +-#elif defined(__APPLE__) +-const GUI::gui_char propUserFileName[] = GUI_TEXT("SciTEUser.properties"); +-#else +-// Windows +-const GUI::gui_char propUserFileName[] = GUI_TEXT("SciTEUser.properties"); +-#endif + const GUI::gui_char propGlobalFileName[] = GUI_TEXT("SciTEGlobal.properties"); + const GUI::gui_char propAbbrevFileName[] = GUI_TEXT("abbrev.properties"); + +diff --git a/scite/win32/SciTEWin.cxx b/scite/win32/SciTEWin.cxx +index 16c21a8..4929de9 100644 +--- a/scite/win32/SciTEWin.cxx ++++ b/scite/win32/SciTEWin.cxx +@@ -413,8 +413,29 @@ static FilePath GetSciTEPath(FilePath home) { + return FilePath(); + // Remove the SciTE.exe + GUI::gui_char *lastSlash = wcsrchr(path, pathSepChar); +- if (lastSlash) ++ if (lastSlash) { + *lastSlash = '\0'; ++ } ++ // MSYS2: go to $(bindir)/../share/scite ++ lastSlash = wcsrchr(path, pathSepChar); ++ if (lastSlash) { ++ if (lastSlash - path + sizeof("share/scite") >= MAX_PATH) { ++ return FilePath(path); // don't risk overflow, return early ++ } ++ *(lastSlash++) = pathSepChar; ++ *(lastSlash++) = 's'; ++ *(lastSlash++) = 'h'; ++ *(lastSlash++) = 'a'; ++ *(lastSlash++) = 'r'; ++ *(lastSlash++) = 'e'; ++ *(lastSlash++) = pathSepChar; ++ *(lastSlash++) = 's'; ++ *(lastSlash++) = 'c'; ++ *(lastSlash++) = 'i'; ++ *(lastSlash++) = 't'; ++ *(lastSlash++) = 'e'; ++ *(lastSlash++) = '\0'; ++ } + return FilePath(path); + } + } +@@ -432,6 +453,8 @@ FilePath SciTEWin::GetSciteDefaultHome() { + FilePath SciTEWin::GetSciteUserHome() { + GUI::gui_char *home = _wgetenv(GUI_TEXT("SciTE_HOME")); + if (!home) ++ home = _wgetenv(GUI_TEXT("HOME")); ++ if (!home) + home = _wgetenv(GUI_TEXT("USERPROFILE")); + return GetSciTEPath(home); + } +-- +2.3.0 + diff --git a/mingw-w64-scite/PKGBUILD b/mingw-w64-scite/PKGBUILD new file mode 100644 index 0000000000..c673d51913 --- /dev/null +++ b/mingw-w64-scite/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: David Macek + +_realname=scite +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-defaults") +pkgver=3.6.2 +pkgrel=1 +arch=('any') +url='http://www.scintilla.org/SciTE.html' +license=('custom:scite') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=("http://downloads.sourceforge.net/scintilla/${_realname}${pkgver//./}.tgz" + "0001-Use-POSIX-tools-in-makefiles.patch" + "0002-Prefix-library-names.patch" + "0003-Use-FHS.patch") +md5sums=('7317b16f10ef1ceaf4347fc1fed35b4d' + 'd4bd88fa3e173d26d9cacaef12b1d6f9' + '2a9ec192f43f82d4b26b4a6667de350a' + '17011da4ced7269d787433b599a1ae92') + +prepare() { + cd "${srcdir}" + patch -p1 -i "${srcdir}"/0001-Use-POSIX-tools-in-makefiles.patch + patch -p1 -i "${srcdir}"/0002-Prefix-library-names.patch + patch -p1 -i "${srcdir}"/0003-Use-FHS.patch + +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p "${srcdir}"/build-${MINGW_CHOST} + cp -r "${srcdir}"/{scite,scintilla} "${srcdir}"/build-${MINGW_CHOST} + cd "${srcdir}"/build-${MINGW_CHOST} + + GTK3=1 CC="${MINGW_PREFIX}/bin/gcc" CXX="${MINGW_PREFIX}/bin/g++" make -C scintilla/gtk + CC="${MINGW_PREFIX}/bin/gcc" CXX="${MINGW_PREFIX}/bin/g++" make -C scintilla/win32 + # GTK3=1 make -C scite/gtk + CC="${MINGW_PREFIX}/bin/gcc" CXX="${MINGW_PREFIX}/bin/g++" make -C scite/win32 + +} + +package_mingw-w64-scite() { + pkgdesc="Editor with facilities for building and running programs (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gtk3") + optdepends=("${MINGW_PACKAGE_PREFIX}-${_realname}-defaults: Default language files") + + cd "${srcdir}"/build-${MINGW_CHOST} + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/bin + cp scintilla/bin/lib{Scintilla,SciLexer}.dll "${pkgdir}"${MINGW_PREFIX}/bin + cp scite/bin/SciTE.exe "${pkgdir}"${MINGW_PREFIX}/bin + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/lib + cp scintilla/bin/libScintillaGtk.a "${pkgdir}"${MINGW_PREFIX}/lib + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/include/scintilla + cp scintilla/include/{*.h,*.iface} "${pkgdir}"${MINGW_PREFIX}/include/scintilla + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/share/scite + cp scite/bin/SciTEGlobal.properties "${pkgdir}"${MINGW_PREFIX}/share/scite + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/share/doc/scite + cp scite/doc/{*.png,*.jpg,*.html} "${pkgdir}"${MINGW_PREFIX}/share/doc/scite + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/share/man/man1 + cp scite/doc/scite.1 "${pkgdir}"${MINGW_PREFIX}/share/man/man1/SciTE.1 + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/share/licenses/scite + cp scintilla/License.txt "${pkgdir}"${MINGW_PREFIX}/share/licenses/scite/LICENSE-scintilla + cp scite/License.txt "${pkgdir}"${MINGW_PREFIX}/share/licenses/scite/LICENSE-scite + cp scite/lua/COPYRIGHT "${pkgdir}"${MINGW_PREFIX}/share/licenses/scite/LICENSE-lua +} + +package_mingw-w64-scite-defaults() { + pkgdesc="Default language files for the SciTE editor (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}=${pkgver}") + + cd "${srcdir}"/build-${MINGW_CHOST} + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/share/scite + cp scite/bin/*.properties "${pkgdir}"${MINGW_PREFIX}/share/scite + rm -f "${pkgdir}"${MINGW_PREFIX}/share/scite/SciTEGlobal.properties +} + +package_mingw-w64-i686-scite() { + package_mingw-w64-scite +} + +package_mingw-w64-i686-scite-defaults() { + package_mingw-w64-scite-defaults +} + +package_mingw-w64-x86_64-scite() { + package_mingw-w64-scite +} + +package_mingw-w64-x86_64-scite-defaults() { + package_mingw-w64-scite-defaults +} diff --git a/mingw-w64-sed/PKGBUILD b/mingw-w64-sed/PKGBUILD new file mode 100644 index 0000000000..446319470f --- /dev/null +++ b/mingw-w64-sed/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Alexey Pavlov +# Contributor: Paul Moore + +_realname=sed +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=4.2.2 +pkgrel=2 +pkgdesc="Sed is a stream editor (mingw-w64)" +arch=('any') +url='http://www.gnu.org/software/sed/' +license=('GPL3') +options=('strip' '!libtool' 'staticlibs') +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.gz" + msvc_invalid_parameter_handler.patch) +md5sums=('4111de4faa3b9848a0686b2f260c5056' + 'a648d571107f917f1b039a88ff45cf4a') + +prepare() { + cd $srcdir/${_realname}-${pkgver} + patch -p0 -i ${srcdir}/msvc_invalid_parameter_handler.patch +} + +build() { + cd $srcdir/${_realname}-${pkgver} + ./configure --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make install DESTDIR="${pkgdir}" + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-sed/msvc_invalid_parameter_handler.patch b/mingw-w64-sed/msvc_invalid_parameter_handler.patch new file mode 100644 index 0000000000..8869b0210b --- /dev/null +++ b/mingw-w64-sed/msvc_invalid_parameter_handler.patch @@ -0,0 +1,13 @@ +--- config_h.in.orig 2012-12-22 14:24:31.000000000 +0000 ++++ config_h.in 2015-04-10 20:37:22.039226300 +0100 +@@ -473,7 +473,9 @@ + + /* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +-#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER ++/* Commented out due to a gnulib bug - see ++ http://lists.gnu.org/archive/html/bug-sed/2015-01/msg00003.html */ ++/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ + + /* Define to 1 if you have the `nl_langinfo' function. */ + #undef HAVE_NL_LANGINFO diff --git a/mingw-w64-sfml-git/PKGBUILD b/mingw-w64-sfml-git/PKGBUILD deleted file mode 100644 index 1fb062f12f..0000000000 --- a/mingw-w64-sfml-git/PKGBUILD +++ /dev/null @@ -1,68 +0,0 @@ -# Maintainer: Alexey Pavlov - -_realname=sfml - -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -_ver_base=2.1.0 -pkgver=2.1.0.1570.749cbb2 -pkgrel=1 -pkgdesc="A simple, fast, cross-platform, and object-oriented multimedia API (mingw-w64)" -arch=('any') -url="http://www.sfml-dev.org/" -license=("zlib") -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -depends=("${MINGW_PACKAGE_PREFIX}-libsndfile" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-openal" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-freetype" - ) -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "git" "${MINGW_PACKAGE_PREFIX}-gcc") -source=("${_realname}"::"git+https://github.com/LaurentGomila/SFML.git" - mingw-w64-msys2.patch) -md5sums=('SKIP' - 'c247c5b6590ac65a88a87a3fa544b6aa') - -pkgver() { - cd "$srcdir/$_realname" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare() { - cd ${srcdir}/$_realname - patch -p1 -i ${srcdir}/mingw-w64-msys2.patch -} - -build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - - [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} - mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - ${MINGW_PREFIX}/bin/cmake.exe \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ - -DSFML_BUILD_EXAMPLES=1 \ - -DSFML_BUILD_DOC=1 \ - -DSFML_INSTALL_PKGCONFIG_FILES=ON \ - ../$_realname - - make - make doc -} - -package() { - cd build-${MINGW_CHOST} - - make install - - install -Dm644 "${pkgdir}${MINGW_PREFIX}/share/cmake/Modules/FindSFML.cmake" "${pkgdir}${MINGW_PREFIX}/share/cmake-2.8/Modules/FindSFML.cmake" - install -Dm644 ${srcdir}/${_realname}/license.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" -} diff --git a/mingw-w64-sfml/PKGBUILD b/mingw-w64-sfml/PKGBUILD new file mode 100644 index 0000000000..4f8b349abd --- /dev/null +++ b/mingw-w64-sfml/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Alexey Pavlov + +_realname=sfml +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.3.2 +pkgrel=2 +pkgdesc="A simple, fast, cross-platform, and object-oriented multimedia API (mingw-w64)" +arch=('any') +url="http://www.sfml-dev.org/" +license=("zlib") +replaces="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +depends=("${MINGW_PACKAGE_PREFIX}-flac" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libvorbis" + "${MINGW_PACKAGE_PREFIX}-openal") +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "unzip") +source=(http://www.sfml-dev.org/files/SFML-${pkgver}-sources.zip + mingw-w64-msys2.patch) +md5sums=('7f152bab6afc8ccbddaf51d6da318201' + 'a8fbc9c9acfc813381df9e0020b211d9') +noextract=(SFML-${pkgver}-sources.zip) + +prepare() { + unzip SFML-${pkgver}-sources.zip + cd ${srcdir}/SFML-${pkgver} + patch -p1 -i ${srcdir}/mingw-w64-msys2.patch +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -r build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DSFML_BUILD_EXAMPLES=1 \ + -DSFML_BUILD_DOC=1 \ + -DSFML_INSTALL_PKGCONFIG_FILES=ON \ + ../SFML-${pkgver} + + make + make doc +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install + + install -Dm644 "${pkgdir}${MINGW_PREFIX}/share/SFML/cmake/Modules/FindSFML.cmake" "${pkgdir}${MINGW_PREFIX}/share/cmake-3.2/Modules/FindSFML.cmake" + install -Dm644 ${srcdir}/SFML-${pkgver}/license.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-sfml-git/mingw-w64-msys2.patch b/mingw-w64-sfml/mingw-w64-msys2.patch similarity index 95% rename from mingw-w64-sfml-git/mingw-w64-msys2.patch rename to mingw-w64-sfml/mingw-w64-msys2.patch index 58a58af130..8c34ccfa36 100644 --- a/mingw-w64-sfml-git/mingw-w64-msys2.patch +++ b/mingw-w64-sfml/mingw-w64-msys2.patch @@ -43,13 +43,13 @@ --- sfml/src/SFML/Graphics/CMakeLists.txt.orig 2014-05-22 12:05:20.637400000 +0400 +++ sfml/src/SFML/Graphics/CMakeLists.txt 2014-05-22 12:27:28.124000000 +0400 @@ -92,7 +92,7 @@ - endif() + include_directories("${PROJECT_SOURCE_DIR}/extlibs/headers/stb_image") # let CMake know about our additional graphics libraries paths -if(SFML_OS_WINDOWS) +if(SFML_OS_WINDOWS AND NOT MINGW) - set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/libfreetype/windows") - set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/libfreetype/windows/freetype") + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/jpeg") + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/freetype2") elseif(SFML_OS_MACOSX) --- sfml/doc/CMakeLists.txt.orig 2014-05-22 12:05:19.717000000 +0400 +++ sfml/doc/CMakeLists.txt 2014-05-22 12:31:16.499200000 +0400 @@ -69,7 +69,7 @@ # define the install directory for miscellaneous files if(SFML_OS_WINDOWS OR SFML_OS_IOS) - set(INSTALL_MISC_DIR .) -+ set(INSTALL_MISC_DIR share) ++ set(INSTALL_MISC_DIR share/SFML) elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX) set(INSTALL_MISC_DIR share/SFML) elseif(SFML_OS_ANDROID) diff --git a/mingw-w64-shapelib/PKGBUILD b/mingw-w64-shapelib/PKGBUILD index be5016a8c5..e297ab22ce 100644 --- a/mingw-w64-shapelib/PKGBUILD +++ b/mingw-w64-shapelib/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=shapelib - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.0 -pkgrel=1 +pkgrel=2 pkgdesc="simple C API for reading and writing ESRI Shapefiles (mingw-w64)" arch=('any') url="http://shapelib.maptools.org/" @@ -13,8 +12,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-proj") options=(strip staticlibs) source=("http://download.osgeo.org/shapelib/${_realname}-${pkgver}.tar.gz" - shapelib_autotools.patch - shapelib_backports.patch) + shapelib_autotools.patch + shapelib_backports.patch) sha1sums=('599fde6f69424fa55da281506b297f3976585b85' 'a0eb9196591e5f5841b2de09e29bf04a40cd475d' '4ae20269dd1c62679fd132baf7c1cc194af89f7f') @@ -29,19 +28,21 @@ prepare() { build() { #export lt_cv_deplibs_check_method='pass_all' + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-shared-mime-info/PKGBUILD b/mingw-w64-shared-mime-info/PKGBUILD index 82c1ae49fa..f45bbeab2a 100644 --- a/mingw-w64-shared-mime-info/PKGBUILD +++ b/mingw-w64-shared-mime-info/PKGBUILD @@ -1,22 +1,28 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=shared-mime-info pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3 -pkgrel=1 +pkgver=1.4 +pkgrel=2 pkgdesc="Freedesktop.org Shared MIME Info (mingw-w64)" arch=('any') -license=('GPL') +license=(GPL2) depends=("${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-glib2") makedepends=('intltool' "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-gettext") install=${_realname}-${CARCH}.install url="http://freedesktop.org/Software/shared-mime-info" source=(http://freedesktop.org/~hadess/${_realname}-${pkgver}.tar.xz program.manifest) -md5sums=('743720bc4803dd69f55449013d350f31' +md5sums=('16c02f7b658fff2a9c207406d388ea31' '39a5e7ad433d8d83d2c8ac6779dce0d8') options=(!makeflags) +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + autoreconf -fiv +} + build() { mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} @@ -24,7 +30,9 @@ build() { --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --disable-update-mimedb + --disable-update-mimedb \ + --disable-default-make-check + make } @@ -45,4 +53,5 @@ package() { sed -e "s|%PROGNAME%|GNU.update-mime-database|g" \ -e "s|%ARCH%|${_arch}|g" \ -i ${pkgdir}${MINGW_PREFIX}/bin/update-mime-database.exe.manifest + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" } diff --git a/mingw-w64-shiboken-qt4/PKGBUILD b/mingw-w64-shiboken-qt4/PKGBUILD new file mode 100644 index 0000000000..866f42b3a4 --- /dev/null +++ b/mingw-w64-shiboken-qt4/PKGBUILD @@ -0,0 +1,160 @@ +# Maintainer: Alexey Pavlov +# Contributor: Xin Sun + +_realname=shiboken +pkgbase=mingw-w64-${_realname}-qt4 +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}-qt4 ${MINGW_PACKAGE_PREFIX}-python{2,3}-${_realname}-qt4) +pkgver=1.2.2 +pkgrel=3 +arch=('any') +url="http://pyside.github.io/docs/pyside/" +license=("LGPL") +install=${_realname}-${CARCH}.install +source=(https://pypi.python.org/packages/source/P/PySide/PySide-${pkgver}.tar.gz + shiboken.patch + shiboken-python-3.5-support.patch) +md5sums=('c45bc400c8a86d6b35f34c29e379e44d' + '79cbe9b06107a431693c401944e78c3b' + 'ae4143a3c7fbed309ab2a39432c93208') +makedepends=("${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-qt4" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake") +options=('staticlibs' 'strip') + +prepare() { + cd ${srcdir}/PySide-${pkgver} + patch -p1 -i ${srcdir}/shiboken.patch + patch -p1 -i ${srcdir}/shiboken-python-3.5-support.patch +} + +build() { + for pyv in python2 python3; do + local _conf= + if [ "${pyv}" = "python3" ]; then + _conf="-DUSE_PYTHON3=yes" + fi + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + cp -rf PySide-${pkgver} build-${MINGW_CHOST}-${pyv} + pushd ${srcdir}/build-${MINGW_CHOST}-${pyv}/sources/shiboken > /dev/null + + export MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ${_conf} \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/${pyv}.exe \ + + make + + popd > /dev/null + done + +} + +fix_paths() { + local prefixwin=$(cygpath -am ${MINGW_PREFIX}) + local prefixinst=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + + local _files=$(find ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver} -type f -iname "*.cmake" -o -iname "*.pc") + for f in ${_files}; do + plain "Patching ${f}..." + sed -e "s|${prefixwin}|${MINGW_PREFIX}|g" \ + -e "s|${prefixinst}|${MINGW_PREFIX}|g" \ + -i ${f} + done +} + +package_shiboken() { + pkgdesc="CPython bindings generator for C++ libraries (mingw-w64)" + makedepends=("${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python3/sources/shiboken + make DESTDIR=${pkgdir} install + + cd ${srcdir}/build-${MINGW_CHOST}-python2/sources/shiboken/data + #install -Dm644 ShibokenConfig-python2.7.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ + #install -Dm644 shiboken.pc ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/Shiboken-py2.pc + + rm ${pkgdir}${MINGW_PREFIX}/bin/*.dll + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/python* + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/libshiboken* + rm -rf ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig*python*.cmake + + fix_paths +} + +package_python2-shiboken() { + pkgdesc="Support library for Python2 bindings (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-shiboken-qt4" + "${MINGW_PACKAGE_PREFIX}-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python2/sources/shiboken + make DESTDIR=${pkgdir} install + + cd data + install -Dm644 ShibokenConfig-python2.7.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ + mv ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/shiboken{,-py2}.pc + + rm ${pkgdir}${MINGW_PREFIX}/bin/*.exe + rm -rf ${pkgdir}${MINGW_PREFIX}/{include,share} + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfigVersion.cmake + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig.cmake + + fix_paths +} + +package_python3-shiboken() { + pkgdesc="Support library for Python3 bindings (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-shiboken-qt4" + "${MINGW_PACKAGE_PREFIX}-qt4") + + cd ${srcdir}/build-${MINGW_CHOST}-python3/sources/shiboken + make DESTDIR=${pkgdir} install + + rm ${pkgdir}${MINGW_PREFIX}/bin/*.exe + rm -rf ${pkgdir}${MINGW_PREFIX}/{include,share} + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfigVersion.cmake + rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig.cmake + + fix_paths +} + +# Wrappers +package_mingw-w64-i686-shiboken-qt4() { + package_shiboken +} + +package_mingw-w64-i686-python2-shiboken-qt4() { + package_python2-shiboken +} + +package_mingw-w64-i686-python3-shiboken-qt4() { + package_python3-shiboken +} + +package_mingw-w64-x86_64-shiboken-qt4() { + package_shiboken +} + +package_mingw-w64-x86_64-python2-shiboken-qt4() { + package_python2-shiboken +} + +package_mingw-w64-x86_64-python3-shiboken-qt4() { + package_python3-shiboken +} diff --git a/mingw-w64-shiboken-qt4/shiboken-i686.install b/mingw-w64-shiboken-qt4/shiboken-i686.install new file mode 100644 index 0000000000..d5c739ecc5 --- /dev/null +++ b/mingw-w64-shiboken-qt4/shiboken-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + for f in mingw32/lib/cmake/Shiboken-*/*.cmake; do + # Do sed twice if we already process one of the files + sed -e "s|${_prefix}|/mingw32|g" -i ${f} + sed -e "s|/mingw32|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-shiboken-qt4/shiboken-python-3.5-support.patch b/mingw-w64-shiboken-qt4/shiboken-python-3.5-support.patch new file mode 100644 index 0000000000..ccc165eeb3 --- /dev/null +++ b/mingw-w64-shiboken-qt4/shiboken-python-3.5-support.patch @@ -0,0 +1,11 @@ +--- PySide-1.2.2/sources/shiboken/cmake/Modules/FindPython3Libs.cmake.orig 2015-10-12 08:54:03.937879900 +0300 ++++ PySide-1.2.2/sources/shiboken/cmake/Modules/FindPython3Libs.cmake 2015-10-12 08:54:16.297442700 +0300 +@@ -27,7 +27,7 @@ + # Search for the python framework on Apple. + # CMAKE_FIND_FRAMEWORKS(Python) + +-FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0) ++FOREACH(_CURRENT_VERSION 3.5 3.4 3.3 3.2 3.1 3.0) + IF(_CURRENT_VERSION GREATER 3.1) + SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "") + ELSE() diff --git a/mingw-w64-shiboken-qt4/shiboken-x86_64.install b/mingw-w64-shiboken-qt4/shiboken-x86_64.install new file mode 100644 index 0000000000..6c5578ead7 --- /dev/null +++ b/mingw-w64-shiboken-qt4/shiboken-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + for f in mingw64/lib/cmake/Shiboken-*/*.cmake; do + # Do sed twice if we already process one of the files + sed -e "s|${_prefix}|/mingw64|g" -i ${f} + sed -e "s|/mingw64|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-shiboken-qt4/shiboken.patch b/mingw-w64-shiboken-qt4/shiboken.patch new file mode 100644 index 0000000000..5ff9bca1dc --- /dev/null +++ b/mingw-w64-shiboken-qt4/shiboken.patch @@ -0,0 +1,68 @@ +--- PySide-1.2.2/sources/shiboken/CMakeLists.txt.orig 2015-06-26 11:25:44.610800000 +0300 ++++ PySide-1.2.2/sources/shiboken/CMakeLists.txt 2015-06-26 11:27:46.225600000 +0300 +@@ -49,6 +49,9 @@ + if(MSVC) + set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") + else() ++ if(MINGW) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -D_WINDOWS") ++ endif() + if(CMAKE_HOST_UNIX AND NOT CYGWIN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") + endif() +--- PySide-1.2.2/sources/shiboken/libshiboken/basewrapper.cpp.orig 2015-06-26 11:25:44.610800000 +0300 ++++ PySide-1.2.2/sources/shiboken/libshiboken/basewrapper.cpp 2015-06-26 11:27:46.225600000 +0300 +@@ -770,7 +770,7 @@ + Py_hash_t hash(PyObject* pyObj) + { + assert(Shiboken::Object::checkType(pyObj)); +- return reinterpret_cast(pyObj); ++ return reinterpret_cast(pyObj); + } + + static void setSequenceOwnership(PyObject* pyObj, bool owner) +--- PySide-1.2.2/sources/shiboken/shibokenmodule/CMakeLists.txt.orig 2015-06-26 07:00:25.341400000 +0300 ++++ PySide-1.2.2/sources/shiboken/shibokenmodule/CMakeLists.txt 2015-06-26 07:00:39.974200000 +0300 +@@ -9,7 +9,7 @@ + ) + + add_custom_command(OUTPUT ${sample_SRC} +-COMMAND ${shibokengenerator_BINARY_DIR}/shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} ++COMMAND ${shibokengenerator_BINARY_DIR}/shiboken.exe --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Running generator for 'shiboken'..." + ) +--- PySide-1.2.2/sources/shiboken/tests/libsample/objecttype.h.orig 2015-06-26 10:11:42.262200000 +0300 ++++ PySide-1.2.2/sources/shiboken/tests/libsample/objecttype.h 2015-06-26 10:15:29.335800000 +0300 +@@ -70,7 +70,7 @@ + Str objectName() const; + void setObjectName(const Str& name); + +- inline unsigned long identifier() const { return reinterpret_cast(this); } ++ inline unsigned long identifier() const { return reinterpret_cast(this); } + + bool causeEvent(Event::EventType eventType); + +--- PySide-1.2.2/sources/shiboken/tests/libsample/transform.cpp.orig 2015-06-26 07:02:00.766600000 +0300 ++++ PySide-1.2.2/sources/shiboken/tests/libsample/transform.cpp 2015-06-26 07:02:07.271800000 +0300 +@@ -27,7 +27,9 @@ + #ifdef _WIN32 + #include + #include ++#ifndef __MINGW64_VERSION_MAJOR + static inline bool isfinite(double a) { return _finite(a); } ++#endif + #else + #include + #endif +--- PySide-1.2.2/sources/shiboken/generator/shiboken/overloaddata.cpp.orig 2015-06-26 10:00:46.779800000 +0300 ++++ PySide-1.2.2/sources/shiboken/generator/shiboken/overloaddata.cpp 2015-06-26 10:02:01.441400000 +0300 +@@ -882,7 +882,7 @@ + + s << "}" << endl; + } else { +- QString argId = QString("arg_%1").arg((ulong)this); ++ QString argId = QString("arg_%1").arg((uintptr_t)this); + s << argId << ';' << endl; + + s << indent << '"' << argId << "\" [shape=\"plaintext\" style=\"filled,bold\" margin=\"0\" fontname=\"freemono\" fillcolor=\"white\" penwidth=1 "; diff --git a/mingw-w64-shishi-git/004-fix-download-po.patch b/mingw-w64-shishi-git/004-fix-download-po.patch new file mode 100644 index 0000000000..ec3aa00aba --- /dev/null +++ b/mingw-w64-shishi-git/004-fix-download-po.patch @@ -0,0 +1,11 @@ +--- shishi/cfg.mk.orig 2015-04-10 12:35:41.979200000 +0300 ++++ shishi/cfg.mk 2015-04-10 12:35:45.130400000 +0300 +@@ -64,7 +64,7 @@ + for f in `ls po/*.po | grep -v quot.po`; do \ + cp $$f $$f.in; \ + done +- git add po/*.po.in ++ git add -f po/LINGUAS po/*.po.in + git commit -m "Sync with TP." po/LINGUAS po/*.po.in + + bootstrap: autoreconf diff --git a/mingw-w64-shishi-git/PKGBUILD b/mingw-w64-shishi-git/PKGBUILD index 8bfff01243..d2fee37539 100644 --- a/mingw-w64-shishi-git/PKGBUILD +++ b/mingw-w64-shishi-git/PKGBUILD @@ -4,58 +4,58 @@ _realname=shishi pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=r3570.9d2b6c8 -pkgrel=1 +pkgver=r3583.485d3bd +pkgrel=2 pkgdesc="a GNU implementation of the Kerberos 5 network security system (mingw-w64)" arch=('any') url="https://www.gnu.org/software/shishi/" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "wget") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gettext" "wget" "git") options=('strip' 'staticlibs') depends=("${MINGW_PACKAGE_PREFIX}-gnutls" - "${MINGW_PACKAGE_PREFIX}-libidn" - "${MINGW_PACKAGE_PREFIX}-libgcrypt" - "${MINGW_PACKAGE_PREFIX}-libgpg-error" - "${MINGW_PACKAGE_PREFIX}-libtasn1" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-libgpg-error" + "${MINGW_PACKAGE_PREFIX}-libtasn1" ) source=("${_realname}"::"git+git://git.savannah.gnu.org/shishi.git" - 001-fix-search-libgcrypt.patch - 002-gnulib.patch - 003-no-shishid.patch) + "001-fix-search-libgcrypt.patch" + "003-no-shishid.patch" + "004-fix-download-po.patch" + ) md5sums=('SKIP' 'f2b2114a4dddb11e240df88086d9d33e' - '2aaba8e55f17fd7f0be22f81a61f8d74' - 'b5af8571cc41670bd017d5fe7e4b48d9') + 'b5af8571cc41670bd017d5fe7e4b48d9' + '2a3d4a60719b801adf5835898c049420') pkgver() { - cd "$srcdir/$_realname" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd ${_realname} patch -p1 -i ${srcdir}/001-fix-search-libgcrypt.patch - patch -p1 -i ${srcdir}/002-gnulib.patch patch -p1 -i ${srcdir}/003-no-shishid.patch - cp -rf build-aux/snippet ${srcdir}/ - rm -f aclocal.m4 + patch -p1 -i ${srcdir}/004-fix-download-po.patch + WANT_AUTOMAKE=latest autoreconf -fi - cp -rf ${srcdir}/snippet build-aux/ - cd .. - - cp -rf ${_realname} build-${MINGW_CHOST} + make update-po } build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd build-${MINGW_CHOST} - ./configure \ + + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-shared \ --enable-static - make update-po + make -j1 } diff --git a/mingw-w64-silc-toolkit/001-remove-outdated-mno-cygwin-gcc-option.patch b/mingw-w64-silc-toolkit/001-remove-outdated-mno-cygwin-gcc-option.patch new file mode 100644 index 0000000000..3f97b7469c --- /dev/null +++ b/mingw-w64-silc-toolkit/001-remove-outdated-mno-cygwin-gcc-option.patch @@ -0,0 +1,49 @@ +diff -aur old/configure 001/configure +--- old/configure 2014-05-13 03:20:24.000000000 -0300 ++++ 001/configure 2014-12-17 16:52:24.986328100 -0200 +@@ -1505,7 +1505,7 @@ + --with-gmp[=DIR] use GMP instead of SILC Math [search in DIR/lib and DIR/include] + --with-iconv[=DIR] use libiconv [search in DIR/include and DIR/lib] + --with-pthreads[=DIR] use POSIX threads [search in DIR/include and DIR/lib] +- --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin) ++ --with-win32 compile native WIN32 (MinGW) code + --with-simdir=DIR directory for SIM modules [PREFIX/modules] + + Some influential environment variables: +@@ -15310,7 +15310,6 @@ + $as_echo "#define SILC_WIN32 /**/" >>confdefs.h + + win32_support=true +- CFLAGS="-mno-cygwin $CFLAGS" + LIBS="$LIBS -lwsock32" + + else +diff -aur old/configure.ac 001/configure.ac +--- old/configure.ac 2014-05-13 03:20:24.000000000 -0300 ++++ 001/configure.ac 2014-12-17 16:52:11.393554600 -0200 +@@ -1228,12 +1228,11 @@ + # + AC_MSG_CHECKING(whether to compile native WIN32 code) + AC_ARG_WITH(win32, +- [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)], ++ [ --with-win32 compile native WIN32 (MinGW) code], + [ + AC_MSG_RESULT(yes) + AC_DEFINE([SILC_WIN32], [], [SILC_WIN32]) + win32_support=true +- CFLAGS="-mno-cygwin $CFLAGS" + LIBS="$LIBS -lwsock32" + ], + [ +diff -aur old/win32/silcdefs.h 001/win32/silcdefs.h +--- old/win32/silcdefs.h 2014-05-05 02:29:05.000000000 -0300 ++++ 001/win32/silcdefs.h 2014-12-17 16:51:50.421875000 -0200 +@@ -103,7 +103,7 @@ + /* #undef Rfclose */ + /* #undef Rgethostbyname */ + +-/* Native WIN32 compilation (-mno-cygwin GCC option) under cygwin, though ++/* Native WIN32 compilation under cygwin, though + the code compiles with any native WIN32 compiler. */ + #ifndef SILC_WIN32 + #define SILC_WIN32 1 diff --git a/mingw-w64-silc-toolkit/002-fixes-for-64-bit.patch b/mingw-w64-silc-toolkit/002-fixes-for-64-bit.patch new file mode 100644 index 0000000000..f0812f5fcd --- /dev/null +++ b/mingw-w64-silc-toolkit/002-fixes-for-64-bit.patch @@ -0,0 +1,21 @@ +diff -aur 001/lib/silcutil/win32/silcwin32schedule.c 002/lib/silcutil/win32/silcwin32schedule.c +--- 001/lib/silcutil/win32/silcwin32schedule.c 2014-12-17 16:54:49.695312500 -0200 ++++ 002/lib/silcutil/win32/silcwin32schedule.c 2014-12-17 16:53:15.266601500 -0200 +@@ -130,7 +130,7 @@ + static LRESULT CALLBACK + silc_schedule_wnd_proc(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam) + { +- SilcSchedule schedule = (SilcSchedule)GetWindowLongPtr(hwnd, GWL_USERDATA); ++ SilcSchedule schedule = (SilcSchedule)GetWindowLongPtr(hwnd, GWLP_USERDATA); + SilcWin32Scheduler internal; + SilcUInt32 fd; + SilcTaskFd task; +@@ -268,7 +268,7 @@ + } + + /* Set the scheduler as the window's context */ +- SetWindowLongPtr(internal->window, GWL_USERDATA, (void *)schedule); ++ SetWindowLongPtr(internal->window, GWLP_USERDATA, (void *)schedule); + SetWindowPos(internal->window, HWND_BOTTOM, 0, 0, 0, 0, SWP_FRAMECHANGED); + + internal->wakeup_sema = CreateSemaphore(NULL, 0, 100, NULL); diff --git a/mingw-w64-silc-toolkit/003-fix-references-to-slash-usr.patch b/mingw-w64-silc-toolkit/003-fix-references-to-slash-usr.patch new file mode 100644 index 0000000000..bc38f96c37 --- /dev/null +++ b/mingw-w64-silc-toolkit/003-fix-references-to-slash-usr.patch @@ -0,0 +1,32 @@ +diff -aur 002/configure 003/configure +--- 002/configure 2014-12-17 16:53:14.776367100 -0200 ++++ 003/configure 2014-12-17 16:59:46.995117100 -0200 +@@ -14624,9 +14624,9 @@ + _ACEOF + + LIBS="$LIBS -liconv" +- LDFLAGS="$LDFLAGS -L/usr/lib" +- CFLAGS="$CFLAGS -I/usr/include" +- CPPLAGS="$CPPFLAGS -I/usr/include" ++ LDFLAGS="$LDFLAGS -L${prefix}/lib" ++ CFLAGS="$CFLAGS -I${prefix}/include" ++ CPPLAGS="$CPPFLAGS -I${prefix}/include" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 + $as_echo_n "checking for iconv in -liconv... " >&6; } +diff -aur 002/configure.ac 003/configure.ac +--- 002/configure.ac 2014-12-17 16:53:04.545898400 -0200 ++++ 003/configure.ac 2014-12-17 17:00:02.793945300 -0200 +@@ -869,9 +869,9 @@ + AC_CHECK_HEADERS(iconv.h, + [ + LIBS="$LIBS -liconv" +- LDFLAGS="$LDFLAGS -L/usr/lib" +- CFLAGS="$CFLAGS -I/usr/include" +- CPPLAGS="$CPPFLAGS -I/usr/include" ++ LDFLAGS="$LDFLAGS -L${prefix}/lib" ++ CFLAGS="$CFLAGS -I${prefix}/include" ++ CPPLAGS="$CPPFLAGS -I${prefix}/include" + + AC_MSG_CHECKING(for iconv in -liconv) + AC_TRY_LINK( diff --git a/mingw-w64-silc-toolkit/004-link-with-regex-and-silc.patch b/mingw-w64-silc-toolkit/004-link-with-regex-and-silc.patch new file mode 100644 index 0000000000..6293f1b96b --- /dev/null +++ b/mingw-w64-silc-toolkit/004-link-with-regex-and-silc.patch @@ -0,0 +1,16 @@ +diff -aur 003/lib/Makefile.am 004/lib/Makefile.am +--- 003/lib/Makefile.am 2014-12-17 16:55:40.332031200 -0200 ++++ 004/lib/Makefile.am 2014-12-17 17:48:30.896484300 -0200 +@@ -44,9 +44,9 @@ + endif + + if SILC_WIN32 +-SILC_LINK_LIBS=$(LIBS) +-SILCCLIENT_LINK_LIBS=$(LIBS) -lsilc +-SILCSERVER_LIBS=$(LIBS) -lsilc ++SILC_LINK_LIBS=$(LIBS) -lregex ++SILCCLIENT_LINK_LIBS=$(LIBS) -lsilc -lregex ++SILCSERVER_LIBS=$(LIBS) -lsilc -lregex + else + SILC_LINK_LIBS=$(LIBS) + SILCCLIENT_LINK_LIBS=libsilc.la diff --git a/mingw-w64-silc-toolkit/005-fix-some-compiler-check.patch b/mingw-w64-silc-toolkit/005-fix-some-compiler-check.patch new file mode 100644 index 0000000000..10d9866f6b --- /dev/null +++ b/mingw-w64-silc-toolkit/005-fix-some-compiler-check.patch @@ -0,0 +1,12 @@ +diff -aur 003/includes/silcwin32.h 004/includes/silcwin32.h +--- 003/includes/silcwin32.h 2014-12-17 16:55:41.595703100 -0200 ++++ 004/includes/silcwin32.h 2014-12-17 17:46:48.268554600 -0200 +@@ -71,7 +71,7 @@ + #undef sleep + #define sleep(x) Sleep((x) * 1000) + +-#if _MSC_VER < 1300 ++#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + #define SetWindowLongPtr SetWindowLong + #define GetWindowLongPtr GetWindowLong + #endif /* _MSC_VER < 1300 */ diff --git a/mingw-w64-silc-toolkit/006-disable-dllimport-for-silcske.patch b/mingw-w64-silc-toolkit/006-disable-dllimport-for-silcske.patch new file mode 100644 index 0000000000..c034607091 --- /dev/null +++ b/mingw-w64-silc-toolkit/006-disable-dllimport-for-silcske.patch @@ -0,0 +1,13 @@ +Author: David Macek +--- x/lib/silcske/silcske.c 2014-12-24 04:06:52.876999300 +0100 ++++ x/lib/silcske/silcske.c 2014-12-24 04:06:35.083627900 +0100 +@@ -18,6 +18,9 @@ + */ + /* $Id$ */ + ++/* let's disable dllimport in silccrypt, see includes/silcwin32.h */ ++#define DLL ++ + #include "silc.h" + #include "silcske.h" + #include "groups_internal.h" diff --git a/mingw-w64-silc-toolkit/PKGBUILD b/mingw-w64-silc-toolkit/PKGBUILD new file mode 100644 index 0000000000..f4c5ac7c51 --- /dev/null +++ b/mingw-w64-silc-toolkit/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Renato Silva +# Contributor: David Macek + +_realname=silc-toolkit +pkgname=(${MINGW_PACKAGE_PREFIX}-${_realname}) +pkgver=1.1.12 +pkgrel=2 +url="http://silcnet.org/" +pkgdesc="Secure Internet Live Conferencing (mingw-w64)" +license=('GPL2' 'BSD') +arch=('any') +depends=(${MINGW_PACKAGE_PREFIX}-libsystre) +makedepends=(${MINGW_PACKAGE_PREFIX}-gcc) +options=('staticlibs' '!emptydirs') +source=(#https://github.com/silc/silc/archive/${_realname//-/.}.${pkgver}.tar.gz + "https://downloads.sourceforge.net/project/silc/silc/toolkit/sources/silc-toolkit-${pkgver}.tar.gz" + 001-remove-outdated-mno-cygwin-gcc-option.patch + 002-fixes-for-64-bit.patch + 003-fix-references-to-slash-usr.patch + 004-link-with-regex-and-silc.patch + 005-fix-some-compiler-check.patch + 006-disable-dllimport-for-silcske.patch) +md5sums=('321536224d4dee2423a3fd05af651eff' + 'f726a755bdd53473cbf8721e7f948714' + '9df1cb6241c269a194cb4ef6b2bc0504' + '2bf45e2323f154aa8b56c4465e83f144' + 'd8099a0d6e97bc790d587a4a12f380cd' + '58509bbd8c6070845e22ebabec3e957a' + '914cb7a97cd8dcbff35e84090a840536') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + patch -p1 -i "${srcdir}"/001-remove-outdated-mno-cygwin-gcc-option.patch + patch -p1 -i "${srcdir}"/002-fixes-for-64-bit.patch + patch -p1 -i "${srcdir}"/003-fix-references-to-slash-usr.patch + patch -p1 -i "${srcdir}"/004-link-with-regex-and-silc.patch + patch -p1 -i "${srcdir}"/005-fix-some-compiler-check.patch + patch -p1 -i "${srcdir}"/006-disable-dllimport-for-silcske.patch + autoreconf -sif +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + cp -rf ${_realname}-${pkgver} build-${MINGW_CHOST} + #mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + #cd "${srcdir}/${_realname}-${pkgver}" + ./configure \ + --prefix=${MINGW_PREFIX} \ + --with-simdir=${MINGW_PREFIX}/lib/silc/modules \ + --with-win32 + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + # Licenses + install -Dm644 COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + install -Dm644 GPL ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/GPL + install -Dm644 BSD ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/BSD +} diff --git a/mingw-w64-simage-hg/PKGBUILD b/mingw-w64-simage-hg/PKGBUILD index 8e02f74915..20af5a0536 100644 --- a/mingw-w64-simage-hg/PKGBUILD +++ b/mingw-w64-simage-hg/PKGBUILD @@ -1,26 +1,25 @@ # Maintainer: Alexey Pavlov _realname=simage - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-hg" -pkgver=r671.2dab4dadbb2e +pkgver=r672.8ea3f7b43f03 pkgrel=1 pkgdesc="Provides support for loading and saving images, sound and video (mingw-w64)" arch=('any') license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libsndfile" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-giflib" - "${MINGW_PACKAGE_PREFIX}-libvorbis" - "${MINGW_PACKAGE_PREFIX}-jasper" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libsndfile" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-giflib" + "${MINGW_PACKAGE_PREFIX}-libvorbis" + "${MINGW_PACKAGE_PREFIX}-jasper" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("mercurial" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") url=('https://bitbucket.org/Coin3D/simage/overview') -source=("${_realname}"::"hg+https://bitbucket.org/Alexpux/simage") +source=("${_realname}"::"hg+https://bitbucket.org/msys2/simage") options=(!strip staticlibs) md5sums=('SKIP') diff --git a/mingw-w64-sip/0001-mingw-python.patch b/mingw-w64-sip/0001-mingw-python.patch index 76a1c4a7eb..e7f36e530d 100644 --- a/mingw-w64-sip/0001-mingw-python.patch +++ b/mingw-w64-sip/0001-mingw-python.patch @@ -20,7 +20,7 @@ diff -uNr sip-4.16.2/configure.py sip-4.16.2-mingw/configure.py build_platform = "win32-msvc2010" elif py_version >= 0x020600: build_platform = "win32-msvc2008" -@@ -211,16 +214,28 @@ +@@ -211,16 +214,29 @@ plat_py_inc_dir = sysconfig.get_python_inc() plat_py_conf_inc_dir = os.path.dirname(sysconfig.get_config_h_filename()) @@ -46,6 +46,7 @@ diff -uNr sip-4.16.2/configure.py sip-4.16.2-mingw/configure.py + plat_bin_dir = temp_sys_exec_prefix + "/bin" + temp_sys_prefix = os.popen(' '.join(['cygpath', '--unix', sys.prefix])).readline().strip() + plat_sip_dir = temp_sys_prefix + "/share/sip" ++ plat_py_venv_inc_dir = os.popen(' '.join(['cygpath', '--unix', plat_py_venv_inc_dir])).readline().strip() + else: + plat_py_lib_dir = lib_dir + "/config" + plat_bin_dir = sys.exec_prefix + "/bin" diff --git a/mingw-w64-sip/PKGBUILD b/mingw-w64-sip/PKGBUILD index fa80c9df9d..9de5673bde 100644 --- a/mingw-w64-sip/PKGBUILD +++ b/mingw-w64-sip/PKGBUILD @@ -2,21 +2,21 @@ # Contributor: Alexey Pavlov _realname=sip +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=4.16.4 -pkgrel=1 -pkgdesc="Tool to create Python bindings for C and C++ libraries" +pkgver=4.16.9 +pkgrel=2 +pkgdesc="Tool to create Python bindings for C and C++ libraries (mingw-w64)" arch=('any') license=('GPL') url="http://www.riverbankcomputing.co.uk/software/sip" makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python3") - + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3") source=("http://downloads.sourceforge.net/project/pyqt/${_realname}/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.gz" "0001-mingw-python.patch") -md5sums=('a9840670a064dbf8f63a8f653776fec9' - 'a01b87229009bacfeb440366dd932648') +md5sums=('7a1dfff4e6fade0e4adee2c4e3d3aa9a' + '0f812155edb59dd9dcb7bd187c5646ae') prepare() { cd "${srcdir}"/${_realname}-${pkgver} @@ -27,9 +27,9 @@ prepare() { build() { for builddir in python{2,3}-${MINGW_CHOST}; do - [[ -d $builddir ]] && rm -rf $builddir - cp -r ${_realname}-${pkgver} $builddir - pushd $builddir + [[ -d $builddir ]] && rm -rf ${builddir} + cp -r ${_realname}-${pkgver} ${builddir} + pushd ${builddir} ${MINGW_PREFIX}/bin/${builddir%-${MINGW_CHOST}} configure.py \ CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" make @@ -38,7 +38,7 @@ build() { } package_sip() { - pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries" + pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") cd python2-${MINGW_CHOST} @@ -48,20 +48,20 @@ package_sip() { } package_python3-sip() { - pkgdesc="Python 3.x SIP bindings for C and C++ libraries" + pkgdesc="Python 3.x SIP bindings for C and C++ libraries (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-sip" "${MINGW_PACKAGE_PREFIX}-python3") cd python3-${MINGW_CHOST} make DESTDIR="${pkgdir}" install -C siplib - install -Dm644 sipconfig.py "${pkgdir}${MINGW_PREFIX}"/lib/python3.4/site-packages/sipconfig.py - install -Dm644 sipdistutils.py "${pkgdir}${MINGW_PREFIX}"/lib/python3.4/site-packages/sipdistutils.py + install -Dm644 sipconfig.py "${pkgdir}${MINGW_PREFIX}"/lib/python3.5/site-packages/sipconfig.py + install -Dm644 sipdistutils.py "${pkgdir}${MINGW_PREFIX}"/lib/python3.5/site-packages/sipdistutils.py install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-sip/LICENSE" } package_python2-sip() { - pkgdesc="Python 2.x SIP bindings for C and C++ libraries" + pkgdesc="Python 2.x SIP bindings for C and C++ libraries (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-sip" "${MINGW_PACKAGE_PREFIX}-python2") cd python2-${MINGW_CHOST} diff --git a/mingw-w64-smpeg/PKGBUILD b/mingw-w64-smpeg/PKGBUILD new file mode 100644 index 0000000000..4c7fef03e8 --- /dev/null +++ b/mingw-w64-smpeg/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Alexey Pavlov + +_realname=smpeg +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.4.5 +pkgrel=1 +pkgdesc="SDL MPEG Player Library (mingw-w64)" +arch=('any') +url="http://icculus.org/smpeg/" +license=("LGPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "subversion") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-SDL") +options=('staticlibs' 'strip') +source=("${_realname}::svn://svn.icculus.org/smpeg/tags/release_${pkgver//./_}" + no-undefined.patch) +md5sums=('SKIP' + '8e1eaecfc0b97029bfc724610fcc7c7f') + +prepare() { + cd "${srcdir}"/${_realname} + patch -p1 -i ${srcdir}/no-undefined.patch + ./autogen.sh +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}/" + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --mandir=${MINGW_PREFIX}/share/man \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install + + # hacky way of resolving conflicts + rm ${pkgdir}${MINGW_PREFIX}/bin/plaympeg + rm -r ${pkgdir}${MINGW_PREFIX}/share/man +} diff --git a/mingw-w64-smpeg/no-undefined.patch b/mingw-w64-smpeg/no-undefined.patch new file mode 100644 index 0000000000..15e7afe4b3 --- /dev/null +++ b/mingw-w64-smpeg/no-undefined.patch @@ -0,0 +1,11 @@ +--- smpeg/Makefile.am.orig 2015-11-03 10:14:21.774927000 +0300 ++++ smpeg/Makefile.am 2015-11-03 10:14:35.328927000 +0300 +@@ -62,7 +62,7 @@ + + libsmpeg_la_LDFLAGS = \ + -release $(LT_RELEASE) \ +- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) ++ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + + EXTRA_DIST = \ + CHANGES \ diff --git a/mingw-w64-smpeg2/PKGBUILD b/mingw-w64-smpeg2/PKGBUILD index baa3d04caa..6c2f1a9882 100644 --- a/mingw-w64-smpeg2/PKGBUILD +++ b/mingw-w64-smpeg2/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=smpeg2 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.0 -pkgrel=2 +pkgrel=4 pkgdesc="SDL2 MPEG Player Library (mingw-w64)" arch=('any') url="http://icculus.org/smpeg/" @@ -21,22 +22,24 @@ prepare() { } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}/configure \ + cd "${srcdir}/build-${MINGW_CHOST}/" + ../${_realname}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --mandir=${MINGW_PREFIX}/share/man \ --enable-shared \ --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - + make DESTDIR="${pkgdir}" install + # hacky way of resolving conflicts rm ${pkgdir}${MINGW_PREFIX}/bin/plaympeg rm -r ${pkgdir}${MINGW_PREFIX}/share/man diff --git a/mingw-w64-snappy/002-am_prog-ar.patch b/mingw-w64-snappy/002-am_prog-ar.patch new file mode 100644 index 0000000000..4e4f054217 --- /dev/null +++ b/mingw-w64-snappy/002-am_prog-ar.patch @@ -0,0 +1,10 @@ +--- snappy-1.1.3/configure.ac.orig 2015-07-21 22:22:01.325936400 +0300 ++++ snappy-1.1.3/configure.ac 2015-07-21 22:22:14.231674600 +0300 +@@ -12,6 +12,7 @@ + + # These are flags passed to automake (though they look like gcc flags!) + AM_INIT_AUTOMAKE([-Wall]) ++AM_PROG_AR + + LT_INIT + AC_SUBST([LIBTOOL_DEPS]) diff --git a/mingw-w64-snappy/PKGBUILD b/mingw-w64-snappy/PKGBUILD index bb060967df..32c5a32dc1 100644 --- a/mingw-w64-snappy/PKGBUILD +++ b/mingw-w64-snappy/PKGBUILD @@ -2,40 +2,42 @@ _realname=snappy pkgname="$MINGW_PACKAGE_PREFIX-${_realname}" -pkgver=1.1.1 +pkgver=1.1.3 pkgrel=1 pkgdesc="A fast C++ compressor/decompressor library (mingw-w64)" arch=('any') license=('New BSD License') -url="http://snappy.googlecode.com" +url="hhttps://github.com/google/snappy" depends=("$MINGW_PACKAGE_PREFIX-gcc-libs") makedepends=("$MINGW_PACKAGE_PREFIX-gcc" "make") -checkdepends=("$MINGW_PACKAGE_PREFIX-zlib" - "$MINGW_PACKAGE_PREFIX-lzo2") -source=("http://snappy.googlecode.com/files/${_realname}-$pkgver.tar.gz" - 001-no-undefined.patch) -md5sums=('8887e3b7253b22a31f5486bca3cbc1c2' - '8df88ce30eafb903bb9e51a57b947da7') +checkdepends=("$MINGW_PACKAGE_PREFIX-lzo2" + "$MINGW_PACKAGE_PREFIX-zlib") +source=(https://github.com/google/snappy/releases/download/${pkgver}/${_realname}-${pkgver}.tar.gz + 001-no-undefined.patch + 002-am_prog-ar.patch) +md5sums=('7358c82f133dc77798e4c2062a749b73' + '8df88ce30eafb903bb9e51a57b947da7' + '4c366576689cd1ad73f9daeb4cba40e7') prepare() { - pushd ${_realname}-$pkgver > /dev/null + cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-no-undefined.patch + patch -p1 -i ${srcdir}/002-am_prog-ar.patch autoreconf -fi - popd > /dev/null - +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - ../${_realname}-$pkgver/configure \ + ../${_realname}-${pkgver}/configure \ --prefix="$MINGW_PREFIX" \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} -} - -build() { - cd "build-${MINGW_CHOST}" + make } @@ -46,5 +48,5 @@ check() { package() { cd "build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-snoregrowl/PKGBUILD b/mingw-w64-snoregrowl/PKGBUILD index ed8684e854..afbdb13d34 100644 --- a/mingw-w64-snoregrowl/PKGBUILD +++ b/mingw-w64-snoregrowl/PKGBUILD @@ -3,39 +3,32 @@ _realname=SnoreGrowl pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.4.0 -pkgrel=1 -pkgdesc="A C and C++ library providing an api to use Growl notifications, based on the GNTP protocol. (mingw-w64)" +pkgrel=2 +pkgdesc="A C and C++ library providing an api to use Growl notifications, based on the GNTP protocol (mingw-w64)" arch=('any') license=("BSD") url="https://github.com/Snorenotify/Snorenotify" makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake") + "${MINGW_PACKAGE_PREFIX}-cmake") options=(!strip staticlibs !buildflags) source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/Snorenotify/${_realname}/archive/v${pkgver}.tar.gz") +md5sums=('15b76b9e7626706b69574b6ec7928d6c') build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ - ${srcdir}/${_realname}-${pkgver} + ../${_realname}-${pkgver} - make # VERBOSE=1 + make # VERBOSE=1 } package() { - cd $srcdir/build-${MINGW_CHOST} - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - for f in ${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}/*.cmake; do - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${f} - done + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install } -md5sums=('15b76b9e7626706b69574b6ec7928d6c') diff --git a/mingw-w64-snorenotify/PKGBUILD b/mingw-w64-snorenotify/PKGBUILD index ee4ce7c92b..2b7f19bb07 100644 --- a/mingw-w64-snorenotify/PKGBUILD +++ b/mingw-w64-snorenotify/PKGBUILD @@ -2,9 +2,9 @@ _realname=Snorenotify pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.5.1 +pkgver=0.5.3 pkgrel=1 -pkgdesc="Snorenotify is a multi platform Qt notification framework. Using a plugin system it is possible to create notifications with many different notification systems on Windows, Mac OS and Unix. (mingw-w64)" +pkgdesc="Snorenotify is a multi platform Qt notification framework. Using a plugin system it is possible to create notifications with many different notification systems on Windows, Mac OS and Unix (mingw-w64)" arch=('any') license=("LGPL3") url="https://github.com/Snorenotify/Snorenotify" @@ -14,32 +14,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") options=(!strip staticlibs !buildflags) -source=("${_realname}-$pkgver".tar.gz::"https://github.com/${_realname}/${_realname}/archive/v${pkgver}.tar.gz") -md5sums=('a2707aa9f20e8cb90ca4375c3528715b') +source=("${_realname}-${pkgver}".tar.gz::"https://github.com/${_realname}/${_realname}/archive/v${pkgver}.tar.gz") +md5sums=('094fe35757a4cc3d55fdfad32275e83e') build() { - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_QT4=OFF \ - ${srcdir}/${_realname}-${pkgver} + ../${_realname}-${pkgver} - make # VERBOSE=1 + make # VERBOSE=1 } package() { - cd $srcdir/build-${MINGW_CHOST} - make install + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR=${pkgdir} install - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - for f in ${pkgdir}${MINGW_PREFIX}/lib/cmake/libsnoreQt5/*.cmake; do - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${f} - done } diff --git a/mingw-w64-solid-qt5/PKGBUILD b/mingw-w64-solid-qt5/PKGBUILD new file mode 100644 index 0000000000..4a4c8cbaf4 --- /dev/null +++ b/mingw-w64-solid-qt5/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer (MSYS2): Ray Donnelly + +_variant=-static +#_variant=-shared +source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 +_kde_f5_init_package "${_variant}" "solid" +pkgver=5.12.0 +pkgrel=1 +arch=('any') +url=('https://projects.kde.org/projects/frameworks/${_basename}') +pkgdesc="Plugins to allow QImage to support extra file formats (mingw-w64-qt5${_namesuff})" +license=('LGPL') +makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules") +depends=() +_kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" "${MINGW_PACKAGE_PREFIX}-bzip2" +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz") +md5sums=('534592c079fb90cfe8734f91d90c8fbd') + +prepare() { + cd "${srcdir}"/${_basename}-${pkgver} +} + +build() { + local -a extra_config + mkdir -p build-${CARCH}${_variant} + cd build-${CARCH}${_variant} + if [ "${_variant}" = "-static" ]; then + extra_config+=( -DBUILD_SHARED_LIBS=NO ) + QT5_PREFIX=${MINGW_PREFIX}/qt5-static + export PATH=${QT5_PREFIX}/bin:"$PATH" + else + QT5_PREFIX=${MINGW_PREFIX} + fi + + MSYS2_ARG_CONV_EXCL=-DCMAKE_INSTALL_PREFIX= \ + cmake ../${_basename}-${pkgver} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${QT5_PREFIX} \ + -DLIB_INSTALL_DIR=lib \ + -DECM_MKSPECS_INSTALL_DIR=${QT5_PREFIX} \ + -DQt5_DIR=${QT5_PREFIX}/lib/cmake/Qt5 \ + -DBUILD_TESTING=OFF \ + -DECM_DIR=${MINGW_PREFIX}/share/ECM \ + "${extra_config[@]}" \ + -G'MSYS Makefiles' + make +} + +package() { + cd build-${CARCH}${_variant} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-soundtouch/0001-no-undefined-on.mingw.patch b/mingw-w64-soundtouch/0001-no-undefined-on.mingw.patch index f7a0a072b8..26e7abdefe 100644 --- a/mingw-w64-soundtouch/0001-no-undefined-on.mingw.patch +++ b/mingw-w64-soundtouch/0001-no-undefined-on.mingw.patch @@ -1,10 +1,11 @@ --- soundtouch/source/SoundTouch/Makefile.am.orig 2012-09-16 18:22:55 +0400 +++ soundtouch/source/SoundTouch/Makefile.am 2012-09-16 18:23:19 +0400 -@@ -39,6 +39,7 @@ - noinst_LTLIBRARIES=libSoundTouchMMX.la libSoundTouchSSE.la - libSoundTouchMMX_la_SOURCES=mmx_optimized.cpp - libSoundTouchSSE_la_SOURCES=sse_optimized.cpp -+libSoundTouch_la_LDFLAGS=-no-undefined +@@ -66,7 +66,7 @@ + endif - # We enable optimizations by default. - # If MMX is supported compile with -mmmx. + # Modify the default 0.0.0 to LIB_SONAME.0.0 +-libSoundTouch_la_LDFLAGS=-version-info @LIB_SONAME@ ++libSoundTouch_la_LDFLAGS=-no-undefined -version-info @LIB_SONAME@ + + # other linking flags to add + # noinst_LTLIBRARIES = libSoundTouchOpt.la diff --git a/mingw-w64-soundtouch/0003-fix-docdir.mingw.patch b/mingw-w64-soundtouch/0003-fix-docdir.mingw.patch index b19286c2a0..8cd5803088 100644 --- a/mingw-w64-soundtouch/0003-fix-docdir.mingw.patch +++ b/mingw-w64-soundtouch/0003-fix-docdir.mingw.patch @@ -1,21 +1,9 @@ --- soundtouch/config/am_include.mk.orig 2012-12-28 20:56:45.000000000 +0000 +++ soundtouch/config/am_include.mk 2013-07-31 15:01:37.806263400 +0000 -@@ -28,7 +28,3 @@ - ## in case a user decides to build in a separate directory from the base package - ## directory. Using absolute, or relative paths is a bad idea. - INCLUDES=-I$(top_srcdir)/include -- +@@ -28,6 +28,3 @@ + ## by automake, so it's ok to have @MACROS@ that will be set by configure + + AM_CPPFLAGS=-I$(top_srcdir)/include - -# doc directory -pkgdocdir=$(prefix)/doc/@PACKAGE@ ---- soundtouch/Makefile.am.orig 2012-12-28 20:56:45.000000000 +0000 -+++ soundtouch/Makefile.am 2013-07-31 15:06:06.219347500 +0000 -@@ -28,7 +28,7 @@ - - - # list files that are documentation to be packaged in a release tarball and installed --pkgdoc_DATA=COPYING.TXT README.html -+dist_doc_DATA=COPYING.TXT README.html - - # extra data files that are to be pacakged in a release tarball and installed into the data directory - #pkgdata_DATA= diff --git a/mingw-w64-soundtouch/PKGBUILD b/mingw-w64-soundtouch/PKGBUILD index 8ada7b698f..508fcb5b9f 100644 --- a/mingw-w64-soundtouch/PKGBUILD +++ b/mingw-w64-soundtouch/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=soundtouch +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.8.0 +pkgver=1.9.2 pkgrel=1 pkgdesc="An audio processing library (mingw-w64)" arch=('any') @@ -14,20 +15,21 @@ options=('strip' 'staticlibs') source=(http://www.surina.net/soundtouch/${_realname}-${pkgver}.tar.gz 0001-no-undefined-on.mingw.patch 0003-fix-docdir.mingw.patch) -md5sums=('d02c6c91cb13901ca273a2b4b143ce41' - 'f472d0b637cc0a3491435ff3409ed3cc' - '44fda585b032a555d7fffb4b13a3b159') +md5sums=('2d1ab4abb54640e8e308e36e309c94a6' + '610545bf3ad3b143668240783a8b89fe' + 'fedef380bc99b2adbecfba32f1b83672') prepare() { cd "${srcdir}/${_realname}" sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac patch -p1 -i ${srcdir}/0001-no-undefined-on.mingw.patch patch -p1 -i ${srcdir}/0003-fix-docdir.mingw.patch - + ./bootstrap } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}/configure \ @@ -36,6 +38,7 @@ build() { --host=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } diff --git a/mingw-w64-sparsehash/PKGBUILD b/mingw-w64-sparsehash/PKGBUILD index 3d84438449..c41270b777 100644 --- a/mingw-w64-sparsehash/PKGBUILD +++ b/mingw-w64-sparsehash/PKGBUILD @@ -4,17 +4,18 @@ _realname=sparsehash pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.2 -pkgrel=2 +pkgrel=3 pkgdesc="Library that contains several hash-map implementations, including implementations that optimize for space or speed (mingw-w64)" arch=("any") url="http://code.google.com/p/sparsehash" license=('BSD') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' '!libtool') -source=("http://sparsehash.googlecode.com/files/${_realname}-$pkgver.tar.gz") +source=("http://sparsehash.googlecode.com/files/${_realname}-${pkgver}.tar.gz") md5sums=('1db92ed7f257d9b5f14a309d75e8a1d4') build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" @@ -22,13 +23,14 @@ build() { --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ - --prefix=${MINGW_PREFIX} + --prefix=${MINGW_PREFIX} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}" install install -D -m644 ../${_realname}-${pkgver}/COPYING ${MINGW_PREFIX}/share/licenses/${_realname}/COPYING } diff --git a/mingw-w64-spatialite-tools/PKGBUILD b/mingw-w64-spatialite-tools/PKGBUILD index e3ce94165b..6476118686 100644 --- a/mingw-w64-spatialite-tools/PKGBUILD +++ b/mingw-w64-spatialite-tools/PKGBUILD @@ -4,8 +4,8 @@ _realname=spatialite-tools pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.2.0 -pkgrel=2 +pkgver=4.3.0 +pkgrel=1 pkgdesc='Set of CLI tools for spatialite (mingw-w64)' arch=('any') url='https://www.gaia-gis.it/fossil/spatialite-tools/index' @@ -13,10 +13,16 @@ license=('MPL') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libspatialite" "${MINGW_PACKAGE_PREFIX}-readosm" "${MINGW_PACKAGE_PREFIX}-libiconv") options=('!libtool') -source=("https://www.gaia-gis.it/gaia-sins/${_realname}-sources/${_realname}-$pkgver.tar.gz") -sha256sums=('890c4cdab5b6b450df4f98341110dd79df20b3cc3af4fecd6e4a06cfc718cdbc') +source=("https://www.gaia-gis.it/gaia-sins/${_realname}-sources/${_realname}-${pkgver}.tar.gz") +sha256sums=('f739859bc04f38735591be2f75009b98a2359033675ae310dffc3114a17ccf89') + +prepare() { + cd ${_realname}-${pkgver} + autoreconf -fiv +} build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} mkdir -p "${srcdir}/build-${MINGW_CHOST}" LDFLAGS+=" -liconv" cd "${srcdir}/build-${MINGW_CHOST}" @@ -25,6 +31,7 @@ build() { --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} + make } diff --git a/mingw-w64-speex/01-mingw-winmm.patch b/mingw-w64-speex/01-mingw-winmm.patch new file mode 100644 index 0000000000..1ec8741763 --- /dev/null +++ b/mingw-w64-speex/01-mingw-winmm.patch @@ -0,0 +1,33 @@ +--- speex-1.2rc2/configure.ac.orig 2015-02-13 22:00:58.022200000 +0300 ++++ speex-1.2rc2/configure.ac 2015-02-13 22:03:41.947000000 +0300 +@@ -198,6 +198,15 @@ + uclinux) LDFLAGS="-Wl,-elf2flt=-s100000 $LDFLAGS";; + esac + ++case $host_os in ++ mingw*) ++ WINMM_LIBS="-lwinmm" ++ ;; ++ *) WINMM_LIBS= ++ ;; ++esac ++AC_SUBST(WINMM_LIBS) ++ + AC_ARG_ENABLE(fixed-point-debug, [ --enable-fixed-point-debug Debug fixed-point implementation], + [if test "$enableval" = yes; then + AC_DEFINE([FIXED_DEBUG], , [Debug fixed-point implementation]) +--- speex-1.2rc2/src/Makefile.am.orig 2015-02-13 22:04:00.745000000 +0300 ++++ speex-1.2rc2/src/Makefile.am 2015-02-13 22:04:12.367000000 +0300 +@@ -20,9 +20,9 @@ + + speexenc_SOURCES = speexenc.c wav_io.c skeleton.c + speexenc_LDADD = $(top_builddir)/libspeex/libspeex.la \ +- $(OGG_LIBS) @FFT_LIBS@ @SPEEXDSP_LIBS@ ++ $(OGG_LIBS) @FFT_LIBS@ @SPEEXDSP_LIBS@ @WINMM_LIBS@ + + speexdec_SOURCES = speexdec.c wav_io.c + speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la \ +- $(OGG_LIBS) @FFT_LIBS@ ++ $(OGG_LIBS) @FFT_LIBS@ @WINMM_LIBS@ + + diff --git a/mingw-w64-speex/PKGBUILD b/mingw-w64-speex/PKGBUILD index 27b2e6bdd2..095fea15ea 100644 --- a/mingw-w64-speex/PKGBUILD +++ b/mingw-w64-speex/PKGBUILD @@ -1,32 +1,38 @@ # Maintainer: Alexey Pavlov _realname=speex - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.2rc1 +pkgver=1.2rc2 pkgrel=2 pkgdesc="A free codec for free speech (mingw-w64)" arch=('any') license=('BSD') url="http://www.speex.org/" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libogg") +depends=("${MINGW_PACKAGE_PREFIX}-libogg" "${MINGW_PACKAGE_PREFIX}-speexdsp") options=('strip' '!libtool' 'staticlibs') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -source=(http://downloads.us.xiph.org/releases/${_realname}/${_realname}-$pkgver.tar.gz) -md5sums=('c4438b22c08e5811ff10e2b06ee9b9ae') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=(http://downloads.us.xiph.org/releases/${_realname}/${_realname}-${pkgver}.tar.gz + 01-mingw-winmm.patch) +md5sums=('6ae7db3bab01e1d4b86bacfa8ca33e81' + '8edb0120f01d93e8202a97ebb1f5fc24') prepare() { cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/01-mingw-winmm.patch + + autoreconf -fiv } build() { - export lt_cv_deplibs_check_method='pass_all' + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --disable-static + --enable-shared \ + --enable-static make } @@ -34,5 +40,5 @@ build() { package() { cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install - install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE" + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-speexdsp/PKGBUILD b/mingw-w64-speexdsp/PKGBUILD new file mode 100644 index 0000000000..e07453e9c6 --- /dev/null +++ b/mingw-w64-speexdsp/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Alexey Pavlov + +_realname=speexdsp +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.2rc3 +pkgrel=2 +pkgdesc="DSP library derived from Speex (mingw-w64)" +arch=('any') +license=('BSD') +url="http://www.speex.org/" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +options=('strip' '!libtool' 'staticlibs') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +source=(http://downloads.us.xiph.org/releases/speex/${_realname}-${pkgver}.tar.gz) +md5sums=('70d9d31184f7eb761192fd1ef0b73333') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} +} + +build() { + #export lt_cv_deplibs_check_method='pass_all' + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-shared \ + --enable-static + + make +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-spice-gtk/001-win.patch b/mingw-w64-spice-gtk/001-win.patch new file mode 100644 index 0000000000..4cd2752eba --- /dev/null +++ b/mingw-w64-spice-gtk/001-win.patch @@ -0,0 +1,10 @@ +--- ./src/Makefile.am.orig 2014-12-06 11:07:51.611626700 +0100 ++++ ./src/Makefile.am 2014-12-06 11:19:08.186671400 +0100 +@@ -608,6 +608,7 @@ + INTROSPECTION_GIRS = + INTROSPECTION_SCANNER_ARGS = --warn-all --accept-unprefixed --add-include-path=$(builddir) $(PREFIX_ARGS) + INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + glib_introspection_files = \ diff --git a/mingw-w64-spice-gtk/003-python-linking.patch b/mingw-w64-spice-gtk/003-python-linking.patch new file mode 100644 index 0000000000..49764811b7 --- /dev/null +++ b/mingw-w64-spice-gtk/003-python-linking.patch @@ -0,0 +1,30 @@ +--- spice-gtk-0.27/m4/check_python.m4.orig 2015-01-15 22:23:32.249800000 +0300 ++++ spice-gtk-0.27/m4/check_python.m4 2015-01-15 22:27:08.513400000 +0300 +@@ -30,10 +30,13 @@ + py_prefix=`$PYTHON -c "import sys; print sys.prefix"` + py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` + PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" ++ PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}" + if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" ++ PYTHON_LIBS="-L${py_exec_prefix}/lib -lpython${PYTHON_VERSION}" + fi + AC_SUBST(PYTHON_INCLUDES) ++ AC_SUBST(PYTHON_LIBS) + dnl check if the headers exist: + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +--- spice-gtk-0.27/src/Makefile.am.orig 2014-12-11 16:33:28.000000000 +0300 ++++ spice-gtk-0.27/src/Makefile.am 2015-01-15 22:26:03.273400000 +0300 +@@ -562,9 +562,9 @@ + install_pyexecLTLIBRARIES = install-pyexecLTLIBRARIES + $(install_pyexecLTLIBRARIES): install-libLTLIBRARIES + +-SpiceClientGtk_la_LIBADD = libspice-client-gtk-2.0.la libspice-client-glib-2.0.la $(PYGTK_LIBS) ++SpiceClientGtk_la_LIBADD = libspice-client-gtk-2.0.la libspice-client-glib-2.0.la $(PYGTK_LIBS) $(PYTHON_LIBS) + SpiceClientGtk_la_CFLAGS = $(GTK_CFLAGS) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) $(WARN_PYFLAGS) +-SpiceClientGtk_la_LDFLAGS = -module -avoid-version -fPIC ++SpiceClientGtk_la_LDFLAGS = -module -avoid-version -no-undefined + SpiceClientGtk_la_SOURCES = spice-client-gtk-module.c + nodist_SpiceClientGtk_la_SOURCES = spice-client-gtk-module.defs.c + diff --git a/mingw-w64-spice-gtk/PKGBUILD b/mingw-w64-spice-gtk/PKGBUILD new file mode 100644 index 0000000000..8f0ed30342 --- /dev/null +++ b/mingw-w64-spice-gtk/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Andrea Zagli + +_realname=spice-gtk +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.29 +pkgrel=1 +arch=('any') +pkgdesc="GTK3 widget for SPICE clients (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-cyrus-sasl" + "${MINGW_PACKAGE_PREFIX}-dbus-glib" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-lz4" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-phodav" + "${MINGW_PACKAGE_PREFIX}-pixman" + "${MINGW_PACKAGE_PREFIX}-spice-protocol" + "${MINGW_PACKAGE_PREFIX}-usbredir" + "${MINGW_PACKAGE_PREFIX}-vala") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + #"${MINGW_PACKAGE_PREFIX}-python2-pygtk" + "${MINGW_PACKAGE_PREFIX}-python2") +options=('strip' 'staticlibs') +license=("GPL 2") +url="http://www.spice-space.org" +source=(http://www.spice-space.org/download/gtk/${_realname}-${pkgver}.tar.bz2 + 001-win.patch + 003-python-linking.patch) +sha256sums=('44c7e22713246a2054c3c3b6e0280fd4c1fdbd2c8d33e5eb95bcda4748d5e973' + 'f2a623c7268ef7c5a0a2084a4698b0d7c7c0e6fd067f2419c21d95c5b3fdf2d6' + 'bd4f60a9ff6c00f588d36721b22f1abeb3edf91c9f81916c80aaa71bafc755a0') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-win.patch + patch -p1 -i ${srcdir}/003-python-linking.patch + + autoreconf -isf +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --enable-introspection \ + --enable-vala \ + --enable-lz4 \ + --with-gtk=3.0 \ + --without-python \ + --with-audio=no + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-spice-protocol/PKGBUILD b/mingw-w64-spice-protocol/PKGBUILD new file mode 100644 index 0000000000..3205bb8b81 --- /dev/null +++ b/mingw-w64-spice-protocol/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Andrea Zagli + +_realname=spice-protocol +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.12.8 +pkgrel=1 +arch=('any') +pkgdesc="SPICE protocol headers (mingw-w64)" +options=('strip' 'staticlibs') +license=("GPL 2") +url="http://www.spice-space.org" +source=(http://www.spice-space.org/download/releases/${_realname}-${pkgver}.tar.bz2) +sha256sums=('116d57a1893c08f8f7801579dffb4c1568a4fb4566aa75c84a2685f150aae67c') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-sqlheavy/000-libvala.patch b/mingw-w64-sqlheavy/000-libvala.patch new file mode 100644 index 0000000000..719b2c4d94 --- /dev/null +++ b/mingw-w64-sqlheavy/000-libvala.patch @@ -0,0 +1,53 @@ +diff -rup sqlheavy-0.1.1-org/configure.ac sqlheavy-0.1.1/configure.ac +--- sqlheavy-0.1.1-org/configure.ac 2012-04-30 14:40:31.000000000 +0800 ++++ sqlheavy-0.1.1/configure.ac 2015-10-22 15:49:22.821930100 +0800 +@@ -69,7 +69,7 @@ AC_SUBST(GMODULE_LIBS) + PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $SQLITE3_REQUIRED) + AC_SUBST(SQLITE3_CFLAGS) + AC_SUBST(SQLITE3_LIBS) +-VALA_PACKAGE=libvala-0.16 ++VALA_PACKAGE=libvala-0.30 + PKG_CHECK_MODULES(VALA, $VALA_PACKAGE >= $VALA_REQUIRED) + AC_SUBST(VALA_PACKAGE) + AC_SUBST(VALA_CFLAGS) +@@ -114,6 +114,5 @@ AC_CONFIG_FILES([Makefile + gtk/sqlheavygtk-$SQLHEAVY_API_VERSION.deps + sqlheavy/Makefile + sqlheavy-$SQLHEAVY_API_VERSION.pc +- sqlheavygtk-$SQLHEAVY_API_VERSION.pc +- utils/Makefile]) ++ sqlheavygtk-$SQLHEAVY_API_VERSION.pc]) + AC_OUTPUT +diff -rup sqlheavy-0.1.1-org/Makefile.am sqlheavy-0.1.1/Makefile.am +--- sqlheavy-0.1.1-org/Makefile.am 2012-04-30 14:31:00.000000000 +0800 ++++ sqlheavy-0.1.1/Makefile.am 2015-10-22 15:56:23.703930100 +0800 +@@ -4,7 +4,6 @@ SUBDIRS = \ + sqlheavy \ + gtk \ + examples \ +- utils \ + docs \ + data \ + $(NULL) +diff -rup sqlheavy-0.1.1-org/Makefile.in sqlheavy-0.1.1/Makefile.in +--- sqlheavy-0.1.1-org/Makefile.in 2012-04-30 14:48:24.000000000 +0800 ++++ sqlheavy-0.1.1/Makefile.in 2015-10-22 15:59:59.598930100 +0800 +@@ -288,7 +288,6 @@ SUBDIRS = \ + sqlheavy \ + gtk \ + examples \ +- utils \ + docs \ + data \ + $(NULL) +diff -rup sqlheavy-0.1.1-org/sqlheavy/Makefile.am sqlheavy-0.1.1/sqlheavy/Makefile.am +--- sqlheavy-0.1.1-org/sqlheavy/Makefile.am 2012-04-30 14:31:00.000000000 +0800 ++++ sqlheavy-0.1.1/sqlheavy/Makefile.am 2015-10-22 15:54:41.399930100 +0800 +@@ -72,6 +72,7 @@ libsqlheavy@SQLHEAVY_API_VERSION@_la_CFL + $(NULL) + + libsqlheavy@SQLHEAVY_API_VERSION@_la_LDFLAGS = \ ++ -no-undefined \ + $(GIO_LIBS) \ + $(GLIB_LIBS) \ + $(GMODULE_LIBS) \ diff --git a/mingw-w64-sqlheavy/PKGBUILD b/mingw-w64-sqlheavy/PKGBUILD new file mode 100644 index 0000000000..eafc9b05cb --- /dev/null +++ b/mingw-w64-sqlheavy/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Ricky Wu + +_realname=sqlheavy +pkgbase=mingw-w64-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} +pkgver=0.1.1 +pkgrel=1 +pkgdesc="GNOME Docking Library (mingw-w64)" +arch=('any') +license=('LGPL 2') +url="http://www.gnome.org/" +depends=("${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-libxml2") +makedepends=("intltool" + "gtk-doc") +options=('strip' 'staticlibs') +source=(https://sqlheavy.googlecode.com/files/sqlheavy-0.1.1.tar.xz + 000-libvala.patch) +sha256sums=('34cbe104f5df9a20ea26aa8acca2b6d1a73035448aa854162c598e90f4e6ff80' + 'ba2f1eed43f926df573ec299b973929499e1da78c0f15157a4ec4ae40057afa1') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/000-libvala.patch + + autoreconf -f -i +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + cp -rf ../${_realname}-${pkgver}/* . + + ./configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-sqlite-analyzer/LICENSE b/mingw-w64-sqlite-analyzer/LICENSE new file mode 100644 index 0000000000..6985d5b8b5 --- /dev/null +++ b/mingw-w64-sqlite-analyzer/LICENSE @@ -0,0 +1,25 @@ +All of the code and documentation in SQLite has been dedicated to the public +domain by the authors. All code authors, and representatives of the companies +they work for, have signed affidavits dedicating their contributions to the +public domain and originals of those signed affidavits are stored in a firesafe +at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, +compile, sell, or distribute the original SQLite code, either in source code +form or as a compiled binary, for any purpose, commercial or non-commercial, +and by any means. + +The previous paragraph applies to the deliverable code and documentation in +SQLite - those parts of the SQLite library that you actually bundle and ship +with a larger application. Some scripts used as part of the build process (for +example the "configure" scripts generated by autoconf) might fall under other +open-source licenses. Nothing from these build scripts ever reaches the final +deliverable SQLite library, however, and so the licenses associated with those +scripts should not be a factor in assessing your rights to copy and use the +SQLite library. + +All of the deliverable code in SQLite has been written from scratch. No code has +been taken from other projects or from the open internet. Every line of code can +be traced back to its original author, and all of those authors have public +domain dedications on file. So the SQLite code base is clean and is +uncontaminated with licensed code from other projects. + +Source: http://www.sqlite.org/copyright.html diff --git a/mingw-w64-sqlite-analyzer/PKGBUILD b/mingw-w64-sqlite-analyzer/PKGBUILD new file mode 100644 index 0000000000..13f63b932d --- /dev/null +++ b/mingw-w64-sqlite-analyzer/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: David Macek + +_realname=sqlite-analyzer +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.9.2 +pkgrel=1 +pkgdesc="An analysis program SQLite database files (mingw-w64)" +url="http://www.sqlite.org/" +arch=('any') +license=(PublicDomain) +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-tcl") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-fossil") +source=("LICENSE") +md5sums=('99ad5d4fba7d423c054b7bc74133253a') + +prepare() { + if [ ! -f sqlite.fossil ]; then + fossil clone http://www.sqlite.org/cgi/src sqlite.fossil + fi + if [ ! -f .fslckout ]; then + fossil open sqlite.fossil + fi + fossil update version-${pkgver} +} + +build() { + mkdir -p "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${CARCH}" + CFLAGS+=" -fexceptions -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" + ../configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --enable-threadsafe + make sqlite3_analyzer.exe +} + +package() { + cd ${srcdir}/build-${CARCH} + install -Dm755 .libs/sqlite3_analyzer.exe "${pkgdir}${MINGW_PREFIX}/bin/sqlite3_analyzer.exe" + install -Dm644 "${srcdir}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-sqlite3/LICENSE b/mingw-w64-sqlite3/LICENSE new file mode 100644 index 0000000000..6985d5b8b5 --- /dev/null +++ b/mingw-w64-sqlite3/LICENSE @@ -0,0 +1,25 @@ +All of the code and documentation in SQLite has been dedicated to the public +domain by the authors. All code authors, and representatives of the companies +they work for, have signed affidavits dedicating their contributions to the +public domain and originals of those signed affidavits are stored in a firesafe +at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, +compile, sell, or distribute the original SQLite code, either in source code +form or as a compiled binary, for any purpose, commercial or non-commercial, +and by any means. + +The previous paragraph applies to the deliverable code and documentation in +SQLite - those parts of the SQLite library that you actually bundle and ship +with a larger application. Some scripts used as part of the build process (for +example the "configure" scripts generated by autoconf) might fall under other +open-source licenses. Nothing from these build scripts ever reaches the final +deliverable SQLite library, however, and so the licenses associated with those +scripts should not be a factor in assessing your rights to copy and use the +SQLite library. + +All of the deliverable code in SQLite has been written from scratch. No code has +been taken from other projects or from the open internet. Every line of code can +be traced back to its original author, and all of those authors have public +domain dedications on file. So the SQLite code base is clean and is +uncontaminated with licensed code from other projects. + +Source: http://www.sqlite.org/copyright.html diff --git a/mingw-w64-sqlite3/PKGBUILD b/mingw-w64-sqlite3/PKGBUILD index 96c2d0637c..ca58efa196 100644 --- a/mingw-w64-sqlite3/PKGBUILD +++ b/mingw-w64-sqlite3/PKGBUILD @@ -1,23 +1,29 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=sqlite3 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -_amalgamationver=3080700 -pkgver=3.8.7.0 +_amalgamationver=3090200 +pkgver=3.9.2.0 pkgrel=1 pkgdesc="A C library that implements an SQL database engine (mingw-w64)" arch=('any') -license=("custom:Public Domain") -groups=("${MINGW_PACKAGE_PREFIX}") +license=(PublicDomain) url="http://www.sqlite.org" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-ncurses" "${MINGW_PACKAGE_PREFIX}-readline") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-tcl") -source=("http://www.sqlite.org/2014/sqlite-autoconf-$_amalgamationver.tar.gz") -sha1sums=('8b773b006db46f3ffcbabe065e927823d13bf5c0') -options=('!strip' 'staticlibs') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-readline") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=("http://www.sqlite.org/2015/sqlite-autoconf-${_amalgamationver}.tar.gz" + LICENSE) +sha1sums=('dae1ae5297fece9671ae0c434a7ecd0cda09c76a' + 'e2aa07adae13aed713860b74165d3325a18c6792') +options=('!strip' 'staticlibs' '!buildflags') build() { - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} CFLAGS+=" -fexceptions -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" ../sqlite-autoconf-${_amalgamationver}/configure \ --prefix=${MINGW_PREFIX} \ @@ -25,10 +31,12 @@ build() { --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --enable-threadsafe + make } package() { - cd ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-stxxl-git/PKGBUILD b/mingw-w64-stxxl-git/PKGBUILD index fb1a40a15c..a2597e99b2 100644 --- a/mingw-w64-stxxl-git/PKGBUILD +++ b/mingw-w64-stxxl-git/PKGBUILD @@ -2,8 +2,8 @@ _realname=stxxl pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=1.4.0.349.g20bfe2b -pkgrel=1 +pkgver=1.4.1.343.gf7389c7 +pkgrel=2 pkgdesc="Standard Template Library for Extra Large Data Sets (mingw-w64)" arch=('any') url="http://stxxl.sourceforge.net/" @@ -18,7 +18,7 @@ md5sums=('SKIP' '401d99e0a4852603054606a815e9a949') pkgver() { - cd "$_realname" + cd "${_realname}" git describe --tags | sed 's|-|.|g' } @@ -31,28 +31,26 @@ prepare() { build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_GNU_PARALLEL=ON \ - -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=ON \ ../${_realname} + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make install - + make DESTDIR=${pkgdir} install + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" install -Dm644 ../${_realname}/LICENSE_1_0.txt \ "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE_1_0.txt" - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - local PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/stxxl.pc } diff --git a/mingw-w64-suitesparse/0001-Win32-Do-not-link-librt.patch b/mingw-w64-suitesparse/0001-Win32-Do-not-link-librt.patch new file mode 100644 index 0000000000..9ede18ef0a --- /dev/null +++ b/mingw-w64-suitesparse/0001-Win32-Do-not-link-librt.patch @@ -0,0 +1,240 @@ +diff -urN SuiteSparse.orig/GPUQREngine/Demo/Makefile SuiteSparse/GPUQREngine/Demo/Makefile +--- SuiteSparse.orig/GPUQREngine/Demo/Makefile 2015-02-01 12:07:54.875166100 +0000 ++++ SuiteSparse/GPUQREngine/Demo/Makefile 2015-02-01 12:09:29.881730400 +0000 +@@ -8,7 +8,7 @@ + ../../SuiteSparse_GPURuntime/Lib/libSuiteSparse_GPURuntime.a \ + ../../CHOLMOD/Lib/libcholmod.a \ + ../../SuiteSparse_config/libsuitesparseconfig.a \ +- $(CUDART_LIB) $(CUBLAS_LIB) -lm -lrt ++ $(CUDART_LIB) $(CUBLAS_LIB) -lm + + INC = -I../../SuiteSparse_GPURuntime/Include -I../Include \ + -I../../SuiteSparse_config -I../../CHOLMOD/Include +diff -urN SuiteSparse.orig/KLU/Tcov/Makefile SuiteSparse/KLU/Tcov/Makefile +--- SuiteSparse.orig/KLU/Tcov/Makefile 2015-02-01 12:07:54.916671400 +0000 ++++ SuiteSparse/KLU/Tcov/Makefile 2015-02-01 12:09:35.275415300 +0000 +@@ -23,7 +23,7 @@ + ../../CAMD/Lib/libcamd.a ../../CCOLAMD/Lib/libccolamd.a \ + ../../metis-4.0/libmetis.a \ + ../../SuiteSparse_config/libsuitesparseconfig.a \ +- $(LAPACK) $(BLAS) $(CUDART_LIB) $(CUBLAS_LIB) -lm -lrt ++ $(LAPACK) $(BLAS) $(CUDART_LIB) $(CUBLAS_LIB) -lm + + I = -I../../SuiteSparse_config -I../../AMD/Include -I../../COLAMD/Include \ + -I../../BTF/Include -I../../CHOLMOD/Include -I../../CAMD/Include \ +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config.mk 2015-02-01 12:07:55.130698600 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk 2015-02-01 12:10:51.118546200 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_backslash.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_backslash.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_backslash.mk 2015-02-01 12:07:55.131198600 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_backslash.mk 2015-02-01 12:12:19.955827100 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk 2015-02-01 12:07:55.131198600 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk 2015-02-01 12:10:36.268660500 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk 2015-02-01 12:07:55.131698700 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk 2015-02-01 12:11:08.608767200 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk 2015-02-01 12:07:55.131698700 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk 2015-02-01 12:11:49.473956400 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk 2015-02-01 12:07:55.132198800 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk 2015-02-01 12:12:02.795148000 +0000 +@@ -91,9 +91,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_linux.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_linux.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_linux.mk 2015-02-01 12:07:55.132198800 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_linux.mk 2015-02-01 12:12:27.206247800 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_Mac.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_Mac.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_Mac.mk 2015-02-01 12:07:55.132698800 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_Mac.mk 2015-02-01 12:12:12.022319700 +0000 +@@ -90,9 +90,9 @@ + F77LIB = + + # C and Fortran libraries. Remove -lrt if you don't have it. +- LIB = -lm -lrt ++# LIB = -lm -lrt + # Using the following requires CF = ... -DNTIMER on POSIX C systems. +-# LIB = -lm ++ LIB = -lm + + # For "make install" + INSTALL_LIB = /usr/local/lib +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.1 SuiteSparse/UMFPACK/Tcov/Make.1 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.1 2015-02-02 11:16:00.669134800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.1 2015-02-02 11:16:54.447426900 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.2 SuiteSparse/UMFPACK/Tcov/Make.2 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.2 2015-02-02 11:16:00.669134800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.2 2015-02-02 11:16:56.771588500 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.3 SuiteSparse/UMFPACK/Tcov/Make.3 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.3 2015-02-02 11:16:00.669134800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.3 2015-02-02 11:17:00.795975700 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O3 -fPIC + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.4 SuiteSparse/UMFPACK/Tcov/Make.4 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.4 2015-02-02 11:16:00.669134800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.4 2015-02-02 11:17:04.245221900 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O3 -fPIC + UMFPACK_CONFIG = -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.5 SuiteSparse/UMFPACK/Tcov/Make.5 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.5 2015-02-02 11:16:00.669134800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.5 2015-02-02 11:17:08.800954600 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING -DNRECIPROCAL +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.6 SuiteSparse/UMFPACK/Tcov/Make.6 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.6 2015-02-02 11:16:00.669134800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.6 2015-02-02 11:17:13.386884200 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DTESTING -DNTIMER +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.7 SuiteSparse/UMFPACK/Tcov/Make.7 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.7 2015-02-02 11:16:00.623939400 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.7 2015-02-02 11:17:17.614050600 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING -DNO_DIVIDE_BY_ZERO +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.8 SuiteSparse/UMFPACK/Tcov/Make.8 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.8 2015-02-02 11:16:00.624939300 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.8 2015-02-02 11:17:22.796719000 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DTESTING -DNO_DIVIDE_BY_ZERO +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm -lrt ++LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f diff --git a/mingw-w64-suitesparse/0002-Win32-Add-strip-trailing-cr-to-diff-for-crlf.patch b/mingw-w64-suitesparse/0002-Win32-Add-strip-trailing-cr-to-diff-for-crlf.patch new file mode 100644 index 0000000000..bc1c22a1c0 --- /dev/null +++ b/mingw-w64-suitesparse/0002-Win32-Add-strip-trailing-cr-to-diff-for-crlf.patch @@ -0,0 +1,398 @@ +diff -urN SuiteSparse.orig/AMD/Demo/Makefile SuiteSparse/AMD/Demo/Makefile +--- SuiteSparse.orig/AMD/Demo/Makefile 2015-02-01 12:31:49.150295900 +0000 ++++ SuiteSparse/AMD/Demo/Makefile 2015-02-01 12:38:28.692531400 +0000 +@@ -28,22 +28,22 @@ + amd_demo: amd_demo.c library $(INC) + $(C) -o amd_demo amd_demo.c ../Lib/libamd.a $(LIB2) + ./amd_demo > my_amd_demo.out +- - diff amd_demo.out my_amd_demo.out ++ - diff --strip-trailing-cr amd_demo.out my_amd_demo.out + + amd_l_demo: amd_l_demo.c library $(INC) + $(C) -o amd_l_demo amd_l_demo.c ../Lib/libamd.a $(LIB2) + ./amd_l_demo > my_amd_l_demo.out +- - diff amd_l_demo.out my_amd_l_demo.out ++ - diff --strip-trailing-cr amd_l_demo.out my_amd_l_demo.out + + amd_demo2: amd_demo2.c library $(INC) + $(C) -o amd_demo2 amd_demo2.c ../Lib/libamd.a $(LIB2) + ./amd_demo2 > my_amd_demo2.out +- - diff amd_demo2.out my_amd_demo2.out ++ - diff --strip-trailing-cr amd_demo2.out my_amd_demo2.out + + amd_simple: amd_simple.c library $(INC) + $(C) -o amd_simple amd_simple.c ../Lib/libamd.a $(LIB2) + ./amd_simple > my_amd_simple.out +- - diff amd_simple.out my_amd_simple.out ++ - diff --strip-trailing-cr amd_simple.out my_amd_simple.out + + #------------------------------------------------------------------------------ + # compile the Fortran demo +@@ -57,13 +57,13 @@ + $(F77) $(F77FLAGS) -o amd_f77demo amd_f77demo.f ../Lib/libamdf77.a \ + $(F77LIB) + ./amd_f77demo > my_amd_f77demo.out +- - diff amd_f77demo.out my_amd_f77demo.out ++ - diff --strip-trailing-cr amd_f77demo.out my_amd_f77demo.out + + amd_f77simple: amd_f77simple.f f77lib + $(F77) $(F77FLAGS) -o amd_f77simple amd_f77simple.f \ + ../Lib/libamdf77.a $(F77LIB) + ./amd_f77simple > my_amd_f77simple.out +- - diff amd_f77simple.out my_amd_f77simple.out ++ - diff --strip-trailing-cr amd_f77simple.out my_amd_f77simple.out + + amd_f77wrapper.o: amd_f77wrapper.c + $(C) -DDINT -c amd_f77wrapper.c +@@ -72,7 +72,7 @@ + $(F77) $(F77FLAGS) -o amd_f77cross amd_f77cross.f amd_f77wrapper.o \ + ../Lib/libamd.a $(F77LIB) + ./amd_f77cross > my_amd_f77cross.out +- - diff amd_f77cross.out my_amd_f77cross.out ++ - diff --strip-trailing-cr amd_f77cross.out my_amd_f77cross.out + + #------------------------------------------------------------------------------ + # Remove all but the files in the original distribution +diff -urN SuiteSparse.orig/CAMD/Demo/Makefile SuiteSparse/CAMD/Demo/Makefile +--- SuiteSparse.orig/CAMD/Demo/Makefile 2015-02-01 12:31:49.024780000 +0000 ++++ SuiteSparse/CAMD/Demo/Makefile 2015-02-01 12:42:35.739902400 +0000 +@@ -25,22 +25,22 @@ + camd_demo: camd_demo.c library $(INC) + $(C) -o camd_demo camd_demo.c ../Lib/libcamd.a $(LIB2) + ./camd_demo > my_camd_demo.out +- - diff camd_demo.out my_camd_demo.out ++ - diff --strip-trailing-cr camd_demo.out my_camd_demo.out + + camd_l_demo: camd_l_demo.c library $(INC) + $(C) -o camd_l_demo camd_l_demo.c ../Lib/libcamd.a $(LIB2) + ./camd_l_demo > my_camd_l_demo.out +- - diff camd_l_demo.out my_camd_l_demo.out ++ - diff --strip-trailing-cr camd_l_demo.out my_camd_l_demo.out + + camd_demo2: camd_demo2.c library $(INC) + $(C) -o camd_demo2 camd_demo2.c ../Lib/libcamd.a $(LIB2) + ./camd_demo2 > my_camd_demo2.out +- - diff camd_demo2.out my_camd_demo2.out ++ - diff --strip-trailing-cr camd_demo2.out my_camd_demo2.out + + camd_simple: camd_simple.c library $(INC) + $(C) -o camd_simple camd_simple.c ../Lib/libcamd.a $(LIB2) + ./camd_simple > my_camd_simple.out +- - diff camd_simple.out my_camd_simple.out ++ - diff --strip-trailing-cr camd_simple.out my_camd_simple.out + + #------------------------------------------------------------------------------ + # Remove all but the files in the original distribution +diff -urN SuiteSparse.orig/CCOLAMD/Demo/Makefile SuiteSparse/CCOLAMD/Demo/Makefile +--- SuiteSparse.orig/CCOLAMD/Demo/Makefile 2015-02-01 12:31:49.037281600 +0000 ++++ SuiteSparse/CCOLAMD/Demo/Makefile 2015-02-01 12:38:28.694031500 +0000 +@@ -25,12 +25,12 @@ + ccolamd_example: ccolamd_example.c library + $(C) -o ccolamd_example ccolamd_example.c ../Lib/libccolamd.a $(LIB2) + - ./ccolamd_example > my_ccolamd_example.out +- - diff ccolamd_example.out my_ccolamd_example.out ++ - diff --strip-trailing-cr ccolamd_example.out my_ccolamd_example.out + + ccolamd_l_example: ccolamd_l_example.c library + $(C) -o ccolamd_l_example ccolamd_l_example.c ../Lib/libccolamd.a $(LIB2) + - ./ccolamd_l_example > my_ccolamd_l_example.out +- - diff ccolamd_l_example.out my_ccolamd_l_example.out ++ - diff --strip-trailing-cr ccolamd_l_example.out my_ccolamd_l_example.out + + #------------------------------------------------------------------------------ + # Remove all but the files in the original distribution +diff -urN SuiteSparse.orig/CHOLMOD/Tcov/Makefile SuiteSparse/CHOLMOD/Tcov/Makefile +--- SuiteSparse.orig/CHOLMOD/Tcov/Makefile 2015-02-01 12:31:48.385198800 +0000 ++++ SuiteSparse/CHOLMOD/Tcov/Makefile 2015-02-01 12:38:28.696031800 +0000 +@@ -408,7 +408,7 @@ + $(V) ./cmread Matrix/2diag.tri > tmp/2diag.out + $(V) ./cmread Matrix/r5lo > tmp/r5lo.out + $(V) ./cmread Matrix/r5lo2 > tmp/r5lo2.out +- - diff tmp/r5lo.out tmp/r5lo2.out ++ - diff --strip-trailing-cr tmp/r5lo.out tmp/r5lo2.out + $(V) ./cmread Matrix/cs.mtx > tmp/cs.out + $(V) ./cmread Matrix/2lo.tri > tmp/2lo.out + $(V) ./cmread Matrix/2.tri > tmp/2.out +@@ -442,7 +442,7 @@ + $(V) ./clread Matrix/2diag.tri > tmp/l_2diag.out + $(V) ./clread Matrix/r5lo > tmp/l_r5lo.out + $(V) ./clread Matrix/r5lo2 > tmp/l_r5lo2.out +- - diff tmp/r5lo.out tmp/r5lo2.out ++ - diff --strip-trailing-cr tmp/r5lo.out tmp/r5lo2.out + $(V) ./clread Matrix/cs.mtx > tmp/l_cs.out + $(V) ./clread Matrix/2lo.tri > tmp/l_l_2lo.out + $(V) ./clread Matrix/2.tri > tmp/l_2.out +diff -urN SuiteSparse.orig/COLAMD/Demo/Makefile SuiteSparse/COLAMD/Demo/Makefile +--- SuiteSparse.orig/COLAMD/Demo/Makefile 2015-02-01 12:31:48.391199500 +0000 ++++ SuiteSparse/COLAMD/Demo/Makefile 2015-02-01 12:38:28.697532000 +0000 +@@ -25,12 +25,12 @@ + colamd_example: colamd_example.c library + $(C) -o colamd_example colamd_example.c ../Lib/libcolamd.a $(LIB2) + - ./colamd_example > my_colamd_example.out +- - diff colamd_example.out my_colamd_example.out ++ - diff --strip-trailing-cr colamd_example.out my_colamd_example.out + + colamd_l_example: colamd_l_example.c library + $(C) -o colamd_l_example colamd_l_example.c ../Lib/libcolamd.a $(LIB2) + - ./colamd_l_example > my_colamd_l_example.out +- - diff colamd_l_example.out my_colamd_l_example.out ++ - diff --strip-trailing-cr colamd_l_example.out my_colamd_l_example.out + + #------------------------------------------------------------------------------ + # Remove all but the files in the original distribution +diff -urN SuiteSparse.orig/LDL/Demo/Makefile SuiteSparse/LDL/Demo/Makefile +--- SuiteSparse.orig/LDL/Demo/Makefile 2015-02-01 12:31:48.829755200 +0000 ++++ SuiteSparse/LDL/Demo/Makefile 2015-02-01 12:38:28.701532500 +0000 +@@ -26,48 +26,48 @@ + ldlmain: ldlmain.c library + $(C) ldlmain.c ../Lib/libldl.a -o ldlmain $(LIB2) + - ./ldlmain > my_ldlmain.out +- - diff ldlmain.out my_ldlmain.out ++ - diff --strip-trailing-cr ldlmain.out my_ldlmain.out + + ldllmain: ldlmain.c library + $(C) -DLDL_LONG ldlmain.c ../Lib/libldl.a -o ldllmain $(LIB2) + - ./ldllmain > my_ldllmain.out +- - diff ldlmain.out my_ldllmain.out ++ - diff --strip-trailing-cr ldlmain.out my_ldllmain.out + + ldlsimple: ldlsimple.c library + $(C) ldlsimple.c ../Lib/libldl.a -o ldlsimple $(LIB2) + - ./ldlsimple > my_ldlsimple.out +- - diff ldlsimple.out my_ldlsimple.out ++ - diff --strip-trailing-cr ldlsimple.out my_ldlsimple.out + + ldllsimple: ldlsimple.c library + $(C) $(I) -DLDL_LONG ldlsimple.c ../Lib/libldl.a -o ldllsimple $(LIB2) + - ./ldllsimple > my_ldllsimple.out +- - diff ldlsimple.out my_ldllsimple.out ++ - diff --strip-trailing-cr ldlsimple.out my_ldllsimple.out + + ldlamd: ldlmain.c library + - $(C) -I../../AMD/Include -DUSE_AMD \ + ldlmain.c ../../AMD/Lib/libamd.a ../Lib/libldl.a -o ldlamd $(LIB2) + - ./ldlamd > my_ldlamd.out +- - diff ldlamd.out my_ldlamd.out ++ - diff --strip-trailing-cr ldlamd.out my_ldlamd.out + + ldllamd: ldlmain.c library + - $(C) -DLDL_LONG $(I) -I../../AMD/Include -DUSE_AMD \ + ldlmain.c ../../AMD/Lib/libamd.a ../Lib/libldl.a -o ldllamd $(LIB2) + - ./ldllamd > my_ldllamd.out +- - diff ldllamd.out my_ldllamd.out ++ - diff --strip-trailing-cr ldllamd.out my_ldllamd.out + + run: + - ./ldlsimple > my_ldlsimple.out +- - diff ldlsimple.out my_ldlsimple.out ++ - diff --strip-trailing-cr ldlsimple.out my_ldlsimple.out + - ./ldllsimple > my_ldllsimple.out +- - diff ldlsimple.out my_ldllsimple.out ++ - diff --strip-trailing-cr ldlsimple.out my_ldllsimple.out + - ./ldlmain > my_ldlmain.out +- - diff ldlmain.out my_ldlmain.out ++ - diff --strip-trailing-cr ldlmain.out my_ldlmain.out + - ./ldllmain > my_ldllmain.out +- - diff ldlmain.out my_ldllmain.out ++ - diff --strip-trailing-cr ldlmain.out my_ldllmain.out + - ./ldlamd > my_ldlamd.out +- - diff ldlamd.out my_ldlamd.out ++ - diff --strip-trailing-cr ldlamd.out my_ldlamd.out + - ./ldllamd > my_ldllamd.out +- - diff ldllamd.out my_ldllamd.out ++ - diff --strip-trailing-cr ldllamd.out my_ldllamd.out + + + #------------------------------------------------------------------------------- +diff -urN SuiteSparse.orig/MATLAB_Tools/SFMULT/Makefile SuiteSparse/MATLAB_Tools/SFMULT/Makefile +--- SuiteSparse.orig/MATLAB_Tools/SFMULT/Makefile 2015-02-01 12:31:48.874260900 +0000 ++++ SuiteSparse/MATLAB_Tools/SFMULT/Makefile 2015-02-01 12:38:28.703032700 +0000 +@@ -3,23 +3,23 @@ + diffs: kernel_diffs kernel_usage_diffs structure_diffs + + kernel_diffs: +- - diff sfmult_anxnyt_k.c sfmult_anxtyt_k.c +- - diff sfmult_atxtyn_k.c sfmult_atxtyt_k.c +- - diff sfmult_vector_1.c sfmult_vector_k.c ++ - diff --strip-trailing-cr sfmult_anxnyt_k.c sfmult_anxtyt_k.c ++ - diff --strip-trailing-cr sfmult_atxtyn_k.c sfmult_atxtyt_k.c ++ - diff --strip-trailing-cr sfmult_vector_1.c sfmult_vector_k.c + + # each of these pairs use the same sfmult_A*_X*_Y*_[234] kernels + kernel_usage_diffs: +- - diff sfmult_anxtyn.c sfmult_anxtyt.c +- - diff sfmult_anxnyn.c sfmult_anxnyt.c +- - diff sfmult_atxnyn.c sfmult_atxtyn.c +- - diff sfmult_atxnyt.c sfmult_atxtyt.c ++ - diff --strip-trailing-cr sfmult_anxtyn.c sfmult_anxtyt.c ++ - diff --strip-trailing-cr sfmult_anxnyn.c sfmult_anxnyt.c ++ - diff --strip-trailing-cr sfmult_atxnyn.c sfmult_atxtyn.c ++ - diff --strip-trailing-cr sfmult_atxnyt.c sfmult_atxtyt.c + + # each of these pairs use the same outer structure but different kernels + structure_diffs: +- - diff sfmult_anxnyn.c sfmult_anxtyn.c +- - diff sfmult_anxnyt.c sfmult_anxtyt.c +- - diff sfmult_atxnyn.c sfmult_atxnyt.c +- - diff sfmult_atxtyn.c sfmult_atxtyt.c ++ - diff --strip-trailing-cr sfmult_anxnyn.c sfmult_anxtyn.c ++ - diff --strip-trailing-cr sfmult_anxnyt.c sfmult_anxtyt.c ++ - diff --strip-trailing-cr sfmult_atxnyn.c sfmult_atxnyt.c ++ - diff --strip-trailing-cr sfmult_atxtyn.c sfmult_atxtyt.c + + OBJ = \ + sfmult_anxnyn.o \ +diff -urN SuiteSparse.orig/SuiteSparse_config/Makefile SuiteSparse/SuiteSparse_config/Makefile +--- SuiteSparse.orig/SuiteSparse_config/Makefile 2015-02-01 12:31:49.012778500 +0000 ++++ SuiteSparse/SuiteSparse_config/Makefile 2015-02-01 12:38:28.705032900 +0000 +@@ -42,7 +42,7 @@ + $(RM) $(INSTALL_INCLUDE)/SuiteSparse_config.h + + dif: +- - diff SuiteSparse_config.mk SuiteSparse_config_linux.mk +- - diff SuiteSparse_config_linux.mk SuiteSparse_config_GPU_gcc.mk +- - diff SuiteSparse_config_GPU_gcc.mk SuiteSparse_config_GPU_icc.mk +- - diff SuiteSparse_config_GPU_icc.mk SuiteSparse_config_GPU_icc10.mk ++ - diff --strip-trailing-cr SuiteSparse_config.mk SuiteSparse_config_linux.mk ++ - diff --strip-trailing-cr SuiteSparse_config_linux.mk SuiteSparse_config_GPU_gcc.mk ++ - diff --strip-trailing-cr SuiteSparse_config_GPU_gcc.mk SuiteSparse_config_GPU_icc.mk ++ - diff --strip-trailing-cr SuiteSparse_config_GPU_icc.mk SuiteSparse_config_GPU_icc10.mk +diff -urN SuiteSparse.orig/UMFPACK/Demo/Makefile SuiteSparse/UMFPACK/Demo/Makefile +--- SuiteSparse.orig/UMFPACK/Demo/Makefile 2015-02-01 12:31:49.053283600 +0000 ++++ SuiteSparse/UMFPACK/Demo/Makefile 2015-02-01 12:38:28.706533100 +0000 +@@ -139,13 +139,13 @@ + run: umfpack_di_demo umfpack_zi_demo umfpack_dl_demo umfpack_zl_demo umfpack_simple + ./umfpack_simple + ./umfpack_di_demo > my_umfpack_di_demo.out +- - diff umfpack_di_demo.out my_umfpack_di_demo.out ++ - diff --strip-trailing-cr umfpack_di_demo.out my_umfpack_di_demo.out + ./umfpack_dl_demo > my_umfpack_dl_demo.out +- - diff umfpack_dl_demo.out my_umfpack_dl_demo.out ++ - diff --strip-trailing-cr umfpack_dl_demo.out my_umfpack_dl_demo.out + ./umfpack_zi_demo > my_umfpack_zi_demo.out +- - diff umfpack_zi_demo.out my_umfpack_zi_demo.out ++ - diff --strip-trailing-cr umfpack_zi_demo.out my_umfpack_zi_demo.out + ./umfpack_zl_demo > my_umfpack_zl_demo.out +- - diff umfpack_zl_demo.out my_umfpack_zl_demo.out ++ - diff --strip-trailing-cr umfpack_zl_demo.out my_umfpack_zl_demo.out + + #------------------------------------------------------------------------------- + # create a demo program that reads in Harwell/Boeing matrices, and run it +@@ -196,17 +196,17 @@ + $(F77) $(F77FLAGS) -o umf4hb umf4hb.f umf4_f77wrapper.o \ + $(UMFPACK) $(LIBS) + - ./umf4hb < HB/west0067.rua > my_umf4hb.out +- - diff my_umf4hb.out umf4hb.out ++ - diff --strip-trailing-cr my_umf4hb.out umf4hb.out + $(F77) $(F77FLAGS) -o umf4zhb umf4zhb.f umf4_f77zwrapper.o \ + $(UMFPACK) $(LIBS) + - ./umf4zhb < HB/qc324.cua > my_umf4zhb.out +- - diff my_umf4zhb.out umf4zhb.out ++ - diff --strip-trailing-cr my_umf4zhb.out umf4zhb.out + + fortran64: $(UMFPACK) umf4hb64.f umf4_f77wrapper64.o umf4_f77zwrapper64.o $(UMFPACK) + $(F77) $(F77FLAGS) -o umf4hb64 umf4hb64.f umf4_f77wrapper64.o \ + $(UMFPACK) $(LIBS) + - ./umf4hb64 < HB/west0067.rua > my_umf4hb64.out +- - diff my_umf4hb64.out umf4hb64.out ++ - diff --strip-trailing-cr my_umf4hb64.out umf4hb64.out + + umf4_f77wrapper.o: umf4_f77wrapper.c $(INC) + $(C) -c umf4_f77wrapper.c -o umf4_f77wrapper.o +diff -urN SuiteSparse.orig/UMFPACK/Tcov/AMD_Demo_Makefile SuiteSparse/UMFPACK/Tcov/AMD_Demo_Makefile +--- SuiteSparse.orig/UMFPACK/Tcov/AMD_Demo_Makefile 2015-02-01 12:31:49.130793500 +0000 ++++ SuiteSparse/UMFPACK/Tcov/AMD_Demo_Makefile 2015-02-01 12:38:28.709033500 +0000 +@@ -27,22 +27,22 @@ + amd_demo: amd_demo.c library $(INC) + $(C) -o amd_demo amd_demo.c ../Lib/libamd.a $(LIB2) + ./amd_demo > my_amd_demo.out +- - diff amd_demo.out my_amd_demo.out ++ - diff --strip-trailing-cr amd_demo.out my_amd_demo.out + + amd_l_demo: amd_l_demo.c library $(INC) + $(C) -o amd_l_demo amd_l_demo.c ../Lib/libamd.a $(LIB2) + ./amd_l_demo > my_amd_l_demo.out +- - diff amd_l_demo.out my_amd_l_demo.out ++ - diff --strip-trailing-cr amd_l_demo.out my_amd_l_demo.out + + amd_demo2: amd_demo2.c library $(INC) + $(C) -o amd_demo2 amd_demo2.c ../Lib/libamd.a $(LIB2) + ./amd_demo2 > my_amd_demo2.out +- - diff amd_demo2.out my_amd_demo2.out ++ - diff --strip-trailing-cr amd_demo2.out my_amd_demo2.out + + amd_simple: amd_simple.c library $(INC) + $(C) -o amd_simple amd_simple.c ../Lib/libamd.a $(LIB2) + ./amd_simple > my_amd_simple.out +- - diff amd_simple.out my_amd_simple.out ++ - diff --strip-trailing-cr amd_simple.out my_amd_simple.out + + #------------------------------------------------------------------------------ + # compile the Fortran demo +@@ -56,13 +56,13 @@ + $(F77) $(F77FLAGS) -o amd_f77demo amd_f77demo.f ../Lib/libamdf77.a \ + $(F77LIB) + ./amd_f77demo > my_amd_f77demo.out +- - diff amd_f77demo.out my_amd_f77demo.out ++ - diff --strip-trailing-cr amd_f77demo.out my_amd_f77demo.out + + amd_f77simple: amd_f77simple.f f77lib + $(F77) $(F77FLAGS) -o amd_f77simple amd_f77simple.f \ + ../Lib/libamdf77.a $(F77LIB) + ./amd_f77simple > my_amd_f77simple.out +- - diff amd_f77simple.out my_amd_f77simple.out ++ - diff --strip-trailing-cr amd_f77simple.out my_amd_f77simple.out + + amd_f77wrapper.o: amd_f77wrapper.c + $(C) -DDINT -c amd_f77wrapper.c +@@ -71,7 +71,7 @@ + $(F77) $(F77FLAGS) -o amd_f77cross amd_f77cross.f amd_f77wrapper.o \ + ../Lib/libamd.a $(F77LIB) + ./amd_f77cross > my_amd_f77cross.out +- - diff amd_f77cross.out my_amd_f77cross.out ++ - diff --strip-trailing-cr amd_f77cross.out my_amd_f77cross.out + + #------------------------------------------------------------------------------ + # Remove all but the files in the original distribution +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Demo_Makefile SuiteSparse/UMFPACK/Tcov/Demo_Makefile +--- SuiteSparse.orig/UMFPACK/Tcov/Demo_Makefile 2015-02-01 12:31:49.125292800 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Demo_Makefile 2015-02-01 12:38:28.711033700 +0000 +@@ -100,13 +100,13 @@ + run: umfpack_di_demo umfpack_zi_demo umfpack_dl_demo umfpack_zl_demo umfpack_simple + ./umfpack_simple + ./umfpack_di_demo > my_umfpack_di_demo.out +- - diff umfpack_di_demo.out my_umfpack_di_demo.out ++ - diff --strip-trailing-cr umfpack_di_demo.out my_umfpack_di_demo.out + ./umfpack_dl_demo > my_umfpack_dl_demo.out +- - diff umfpack_dl_demo.out my_umfpack_dl_demo.out ++ - diff --strip-trailing-cr umfpack_dl_demo.out my_umfpack_dl_demo.out + ./umfpack_zi_demo > my_umfpack_zi_demo.out +- - diff umfpack_zi_demo.out my_umfpack_zi_demo.out ++ - diff --strip-trailing-cr umfpack_zi_demo.out my_umfpack_zi_demo.out + ./umfpack_zl_demo > my_umfpack_zl_demo.out +- - diff umfpack_zl_demo.out my_umfpack_zl_demo.out ++ - diff --strip-trailing-cr umfpack_zl_demo.out my_umfpack_zl_demo.out + + #------------------------------------------------------------------------------- + # create a demo program that reads in Harwell/Boeing matrices, and run it +@@ -156,17 +156,17 @@ + $(F77) $(F77FLAGS) -o umf4hb umf4hb.f umf4_f77wrapper.o \ + $(UMFPACK) $(LIBS) + - ./umf4hb < HB/west0067.rua > my_umf4hb.out +- - diff my_umf4hb.out umf4hb.out ++ - diff --strip-trailing-cr my_umf4hb.out umf4hb.out + $(F77) $(F77FLAGS) -o umf4zhb umf4zhb.f umf4_f77zwrapper.o \ + $(UMFPACK) $(LIBS) + - ./umf4zhb < HB/qc324.cua > my_umf4zhb.out +- - diff my_umf4zhb.out umf4zhb.out ++ - diff --strip-trailing-cr my_umf4zhb.out umf4zhb.out + + fortran64: $(UMFPACK) umf4hb64.f umf4_f77wrapper64.o umf4_f77zwrapper64.o $(UMFPACK) + $(F77) $(F77FLAGS) -o umf4hb64 umf4hb64.f umf4_f77wrapper64.o \ + $(UMFPACK) $(LIBS) + - ./umf4hb64 < HB/west0067.rua > my_umf4hb64.out +- - diff my_umf4hb64.out umf4hb64.out ++ - diff --strip-trailing-cr my_umf4hb64.out umf4hb64.out + + umf4_f77wrapper.o: umf4_f77wrapper.c $(INC) + $(C) -c umf4_f77wrapper.c -o umf4_f77wrapper.o diff --git a/mingw-w64-suitesparse/0003-MSYS2-Use-OpenBLAS.patch b/mingw-w64-suitesparse/0003-MSYS2-Use-OpenBLAS.patch new file mode 100644 index 0000000000..87df609d37 --- /dev/null +++ b/mingw-w64-suitesparse/0003-MSYS2-Use-OpenBLAS.patch @@ -0,0 +1,192 @@ +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config.mk 2015-02-02 11:05:04.040693500 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk 2015-02-02 11:09:14.108472900 +0000 +@@ -120,7 +120,8 @@ + + # This is probably slow ... it might connect to the Standard Reference BLAS: + # BLAS = -lblas -lgfortran +- LAPACK = -llapack ++# LAPACK = -llapack ++ LAPACK = -lopenblas + + # MKL + # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_backslash.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_backslash.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_backslash.mk 2015-02-02 11:05:04.040693500 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_backslash.mk 2015-02-02 11:12:15.788422500 +0000 +@@ -120,7 +120,10 @@ + + # This is probably slow ... it might connect to the Standard Reference BLAS: + # BLAS = -lblas -lgfortran +- LAPACK = -llapack ++# LAPACK = -llapack ++# MSYS2 (OpenBlas): ++ BLAS = -lopenblas -lgfortran ++ LAPACK = + + # MKL + # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk 2015-02-02 11:05:04.040693500 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk 2015-02-02 11:12:27.724116500 +0000 +@@ -119,8 +119,11 @@ + # naming the BLAS and LAPACK library (*.a or *.so) files. + + # This is probably slow ... it might connect to the Standard Reference BLAS: +- BLAS = -lblas -lgfortran +- LAPACK = -llapack ++# BLAS = -lblas -lgfortran ++# LAPACK = -llapack ++# MSYS2 (OpenBlas): ++ BLAS = -lopenblas -lgfortran ++ LAPACK = + + # MKL + # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk 2015-02-02 11:05:04.056292900 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk 2015-02-02 11:11:52.351422900 +0000 +@@ -119,8 +119,11 @@ + # naming the BLAS and LAPACK library (*.a or *.so) files. + + # This is probably slow ... it might connect to the Standard Reference BLAS: +- BLAS = -lblas -lgfortran +- LAPACK = -llapack ++# BLAS = -lblas -lgfortran ++# LAPACK = -llapack ++# MSYS2 (OpenBlas): ++ BLAS = -lopenblas -lgfortran ++ LAPACK = + + # MKL + # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_linux.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_linux.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_linux.mk 2015-02-02 11:05:04.040693500 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_linux.mk 2015-02-02 11:12:53.612852900 +0000 +@@ -119,8 +119,11 @@ + # naming the BLAS and LAPACK library (*.a or *.so) files. + + # This is probably slow ... it might connect to the Standard Reference BLAS: +- BLAS = -lblas -lgfortran +- LAPACK = -llapack ++# BLAS = -lblas -lgfortran ++# LAPACK = -llapack ++# MSYS2 (OpenBlas): ++ BLAS = -lopenblas -lgfortran ++ LAPACK = + + # MKL + # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_Mac.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_Mac.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_Mac.mk 2015-02-02 11:05:04.056292900 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_Mac.mk 2015-02-02 11:12:24.713393700 +0000 +@@ -119,8 +119,11 @@ + # naming the BLAS and LAPACK library (*.a or *.so) files. + + # This is probably slow ... it might connect to the Standard Reference BLAS: +- BLAS = -lblas -lgfortran +- LAPACK = -llapack ++# BLAS = -lblas -lgfortran ++# LAPACK = -llapack ++# MSYS2 (OpenBlas): ++ BLAS = -lopenblas -lgfortran ++ LAPACK = + + # MKL + # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.1 SuiteSparse/UMFPACK/Tcov/Make.1 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.1 2015-02-02 11:28:15.621136000 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.1 2015-02-02 11:28:48.408007000 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.2 SuiteSparse/UMFPACK/Tcov/Make.2 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.2 2015-02-02 11:28:15.621136000 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.2 2015-02-02 11:28:55.199794500 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.3 SuiteSparse/UMFPACK/Tcov/Make.3 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.3 2015-02-02 11:28:15.636735500 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.3 2015-02-02 11:29:04.855885000 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O3 -fPIC + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.4 SuiteSparse/UMFPACK/Tcov/Make.4 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.4 2015-02-02 11:28:15.636735500 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.4 2015-02-02 11:29:12.271647500 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O3 -fPIC + UMFPACK_CONFIG = -DTESTING +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.5 SuiteSparse/UMFPACK/Tcov/Make.5 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.5 2015-02-02 11:28:15.636735500 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.5 2015-02-02 11:29:21.351556500 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING -DNRECIPROCAL +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.6 SuiteSparse/UMFPACK/Tcov/Make.6 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.6 2015-02-02 11:28:15.621136000 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.6 2015-02-02 11:29:26.796782000 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DTESTING -DNTIMER +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.7 SuiteSparse/UMFPACK/Tcov/Make.7 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.7 2015-02-02 11:28:15.636735500 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.7 2015-02-02 11:29:33.366171500 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING -DNO_DIVIDE_BY_ZERO +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f +diff -urN SuiteSparse.orig/UMFPACK/Tcov/Make.8 SuiteSparse/UMFPACK/Tcov/Make.8 +--- SuiteSparse.orig/UMFPACK/Tcov/Make.8 2015-02-02 11:28:15.636735500 +0000 ++++ SuiteSparse/UMFPACK/Tcov/Make.8 2015-02-02 11:29:42.117491000 +0000 +@@ -5,7 +5,7 @@ + CC = gcc + CF = -O0 -g -ftest-coverage -fprofile-arcs -O0 + UMFPACK_CONFIG = -DTESTING -DNO_DIVIDE_BY_ZERO +-LIB = -llapack -lblas -lgfortran -lgfortranbegin -lm ++LIB = -lopenblas -lgfortran -lgfortranbegin -lm + + RANLIB = ranlib + MV = mv -f diff --git a/mingw-w64-suitesparse/0004-Allow-env-specified-INSTALL_LIB-and-INSTALL_INCLUDE.patch b/mingw-w64-suitesparse/0004-Allow-env-specified-INSTALL_LIB-and-INSTALL_INCLUDE.patch new file mode 100644 index 0000000000..b62744bebc --- /dev/null +++ b/mingw-w64-suitesparse/0004-Allow-env-specified-INSTALL_LIB-and-INSTALL_INCLUDE.patch @@ -0,0 +1,112 @@ +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config.mk 2015-02-02 11:58:09.197010700 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk 2015-02-02 11:58:22.877684500 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_backslash.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_backslash.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_backslash.mk 2015-02-02 11:58:09.197010700 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_backslash.mk 2015-02-02 11:58:49.074477700 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk 2015-02-02 11:58:09.197010700 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_debug.mk 2015-02-02 11:58:16.263538900 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk 2015-02-02 11:58:09.212610100 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_gcc.mk 2015-02-02 11:58:31.806541300 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk 2015-02-02 11:58:09.212610100 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc.mk 2015-02-02 11:58:35.828587100 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk 2015-02-02 11:58:09.197010700 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_GPU_icc10.mk 2015-02-02 11:58:40.463608900 +0000 +@@ -96,8 +96,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_linux.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_linux.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_linux.mk 2015-02-02 11:58:09.212610100 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_linux.mk 2015-02-02 11:58:53.365312700 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make +diff -urN SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_Mac.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config_Mac.mk +--- SuiteSparse.orig/SuiteSparse_config/SuiteSparse_config_Mac.mk 2015-02-02 11:58:09.212610100 +0000 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config_Mac.mk 2015-02-02 11:58:45.330621700 +0000 +@@ -95,8 +95,8 @@ + LIB = -lm + + # For "make install" +-INSTALL_LIB = /usr/local/lib +-INSTALL_INCLUDE = /usr/local/include ++INSTALL_LIB ?= /usr/local/lib ++INSTALL_INCLUDE ?= /usr/local/include + + # Which version of MAKE you are using (default is "make") + # MAKE = make diff --git a/mingw-w64-suitesparse/PKGBUILD b/mingw-w64-suitesparse/PKGBUILD new file mode 100644 index 0000000000..339e9ce755 --- /dev/null +++ b/mingw-w64-suitesparse/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Ray Donnelly + +_realname=SuiteSparse +pkgname=("${MINGW_PACKAGE_PREFIX}-suitesparse") +pkgver=4.4.4 +pkgrel=1 +pkgdesc='A suite of sparse matrix algorithms (mingw-w64)' +license=('GPL') +arch=('any') +source=("http://faculty.cse.tamu.edu/davis/${_realname}/${_realname}-${pkgver}.tar.gz" + "0001-Win32-Do-not-link-librt.patch" + "0002-Win32-Add-strip-trailing-cr-to-diff-for-crlf.patch" + "0003-MSYS2-Use-OpenBLAS.patch" + "0004-Allow-env-specified-INSTALL_LIB-and-INSTALL_INCLUDE.patch") +depends=("${MINGW_PACKAGE_PREFIX}-openblas") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-fortran") +options=('staticlibs') +md5sums=('e0af74476935c9ff6d971df8bb6b82fc' + '3f8ff96bbe6d21ea40d13768d7838cae' + '1773305ad707db5b88d253ea914b975b' + '4aea7bb0e0784b604d3be30acc657876' + '8fe69f053f4e49768568efc57961523b') + +prepare() { + cd "${srcdir}"/${_realname} + patch -p1 -i "${srcdir}"/0001-Win32-Do-not-link-librt.patch + patch -p1 -i "${srcdir}"/0002-Win32-Add-strip-trailing-cr-to-diff-for-crlf.patch + patch -p1 -i "${srcdir}"/0003-MSYS2-Use-OpenBLAS.patch + patch -p1 -i "${srcdir}"/0004-Allow-env-specified-INSTALL_LIB-and-INSTALL_INCLUDE.patch +} + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + cp -rf "${srcdir}"/${_realname} build-${CARCH} + cd "${srcdir}"/build-${CARCH} + + # Make twice due to missing dependencies + # between CHOLMOD/Lib and kluldemo + for _dir in ${PWD}/CHOLMOD/Lib ${PWD}; do + pushd ${_dir} + # https://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html says + # "On 64-bit Windows systems, use -DLONGBLAS="long long" instead.", but that seems wrong. If 64-bit indexing + # is wanted, then long long should be used on 32-bit Windows too I expect (unless LONGBLAS refers to pointer + # size in some instances?) + CFLAGS='-DLONGBLAS="long long"' \ + CXXFLAGS='-DLONGBLAS="long long"' \ + CC=gcc CXX=g++ \ + make + popd + done +} + +package() { + cd "${srcdir}"/build-${CARCH} + + mkdir -p "${pkgdir}"${MINGW_PREFIX}/{lib,include} + make install \ + INSTALL_LIB="${pkgdir}"${MINGW_PREFIX}/lib \ + INSTALL_INCLUDE="${pkgdir}"${MINGW_PREFIX}/include + + # Remove all the version-named static libraries. They'd be symlinks + # on other systems. + find "${pkgdir}"${MINGW_PREFIX} -name "*.*.*.*.a" -exec rm -f {} \; +} diff --git a/mingw-w64-swig/001-relocate.patch b/mingw-w64-swig/001-relocate.patch index ad58afd554..2d82c022ea 100644 Binary files a/mingw-w64-swig/001-relocate.patch and b/mingw-w64-swig/001-relocate.patch differ diff --git a/mingw-w64-swig/PKGBUILD b/mingw-w64-swig/PKGBUILD index 29bf636a3c..22d4a7497a 100644 --- a/mingw-w64-swig/PKGBUILD +++ b/mingw-w64-swig/PKGBUILD @@ -2,8 +2,8 @@ _realname=swig pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.0.2 -pkgrel=3 +pkgver=3.0.6 +pkgrel=1 pkgdesc="Generate scripting interfaces to C/C++ code" arch=('any') url="http://www.swig.org/" @@ -17,13 +17,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-ruby") source=(http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz 001-relocate.patch) -sha1sums=('e695a14acf39b25f3ea2d7303e23e39dfe284e31' - 'c392b470a198f3d54b81c2342b164ec499144486') +sha1sums=('901dd1888581289b5fdc6c0f4452109652bcf244' + '2df8f0deca96ffa2a3625070e31483ba10817ec5') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-relocate.patch - + ./autogen.sh } diff --git a/mingw-w64-szip/PKGBUILD b/mingw-w64-szip/PKGBUILD index 0ce3fd42c9..962931d10b 100644 --- a/mingw-w64-szip/PKGBUILD +++ b/mingw-w64-szip/PKGBUILD @@ -2,20 +2,17 @@ # Contributor: Xin Sun _realname=szip - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.1 -pkgrel=1 -pkgdesc="Extended-Rice lossless compression algorithm implementation" +pkgrel=3 +pkgdesc="Extended-Rice lossless compression algorithm implementation (mingw-w64)" arch=('any') url="http://www.hdfgroup.org/doc_resource/SZIP/" -source=( - "http://www.hdfgroup.org/ftp/lib-external/szip/${pkgver}/src/szip-${pkgver}.tar.gz" - "szip-hdf5.patch" - "szip-default-import-suffix.patch" - "szip-fix-install-docs.patch" - "szip-fix-cmake-macros.patch" - ) +source=("http://www.hdfgroup.org/ftp/lib-external/szip/${pkgver}/src/szip-${pkgver}.tar.gz" + "szip-hdf5.patch" + "szip-default-import-suffix.patch" + "szip-fix-install-docs.patch" + "szip-fix-cmake-macros.patch") md5sums=('902f831bcefb69c6b635374424acbead' '2ac1108913387e1f7b4749a18cc353a3' '574aff51b619b306fc8cac05a600d89b' @@ -30,27 +27,46 @@ prepare() { patch -p1 -i ${srcdir}/szip-default-import-suffix.patch patch -p1 -i ${srcdir}/szip-fix-install-docs.patch patch -p1 -i ${srcdir}/szip-fix-cmake-macros.patch - + # rename X.dll to X-0.dll echo "IF (BUILD_SHARED_LIBS)" >> CMakeLists.txt echo "SET_TARGET_PROPERTIES (\${SZIP_LIB_TARGET} PROPERTIES SUFFIX -0.dll)">> CMakeLists.txt + echo "ELSE ()" >> CMakeLists.txt + echo "SET_TARGET_PROPERTIES (\${SZIP_LIB_TARGET} PROPERTIES PREFIX \"\")" >> CMakeLists.txt echo "ENDIF ()" >> CMakeLists.txt } build() { - [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} - mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + # Build static version + [[ -d ${srcdir}/build-static-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-static-${MINGW_CHOST} + mkdir -p ${srcdir}/build-static-${MINGW_CHOST} && cd ${srcdir}/build-static-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ - -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ ../${_realname}-${pkgver} make + + # Build shared version + [[ -d ${srcdir}/build-shared-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-shared-${MINGW_CHOST} + mkdir -p ${srcdir}/build-shared-${MINGW_CHOST} && cd ${srcdir}/build-shared-${MINGW_CHOST} + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake.exe \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + ../${_realname}-${pkgver} + make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 install + cd "${srcdir}/build-static-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + cd "${srcdir}/build-shared-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-taglib/PKGBUILD b/mingw-w64-taglib/PKGBUILD index 629c970202..930fac911b 100644 --- a/mingw-w64-taglib/PKGBUILD +++ b/mingw-w64-taglib/PKGBUILD @@ -1,31 +1,27 @@ # Maintainer: Alexey Pavlov _realname=taglib - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.9.1 -pkgrel=3 +pkgver=1.10beta +pkgrel=1 pkgdesc="A Library for reading and editing the meta-data of several popular audio formats (mingw-w64)" arch=('any') url="http://taglib.github.com" license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-cppunit") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-cppunit") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-zlib") options=('strip' 'staticlibs') source=(http://taglib.github.io/releases/${_realname}-${pkgver}.tar.gz - fix-finding-cppunit.patch - fix-redefinition-NOMINMAX.patch - mingw-pkg-config.patch) -md5sums=('0d35df96822bbd564c5504cb3c2e4d86' - '35acd6a8db64597d01eff718a4279e41' - '55421ca09d4f9d8bc426362d529b95aa' - 'e4c69d1ca60ec85b20776339f9094d3a') + fix-finding-cppunit.patch) +md5sums=('201cc2f937abe42794855496beda55e3' + '35acd6a8db64597d01eff718a4279e41') prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/fix-finding-cppunit.patch - patch -p1 -i ${srcdir}/fix-redefinition-NOMINMAX.patch - patch -p1 -i ${srcdir}/mingw-pkg-config.patch } build() { @@ -33,12 +29,13 @@ build() { mkdir -p "${srcdir}/build-shared-${MINGW_CHOST}" cd "${srcdir}/build-shared-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DENABLE_STATIC:BOOL=OFF \ - -DWITH_ASF:BOOL=ON \ - -DWITH_MP4:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DENABLE_STATIC=OFF \ + -DWITH_ASF=ON \ + -DWITH_MP4=ON \ ../${_realname}-${pkgver} make @@ -47,12 +44,13 @@ build() { mkdir -p "${srcdir}/build-static-${MINGW_CHOST}" cd "${srcdir}/build-static-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DENABLE_STATIC:BOOL=ON \ - -DWITH_ASF:BOOL=ON \ - -DWITH_MP4:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DENABLE_STATIC=ON \ + -DWITH_ASF=ON \ + -DWITH_MP4=ON \ ../${_realname}-${pkgver} make @@ -60,14 +58,8 @@ build() { package() { cd "${srcdir}/build-static-${MINGW_CHOST}" - make install + make DESTDIR=${pkgdir} install cd "${srcdir}/build-shared-${MINGW_CHOST}" - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/taglib.pc + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-taglib/fix-redefinition-NOMINMAX.patch b/mingw-w64-taglib/fix-redefinition-NOMINMAX.patch deleted file mode 100644 index 4ec61d8c67..0000000000 --- a/mingw-w64-taglib/fix-redefinition-NOMINMAX.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- taglib-1.9.1/taglib/toolkit/trefcounter.h.orig 2014-04-20 20:30:13.837600000 +0400 -+++ taglib-1.9.1/taglib/toolkit/trefcounter.h 2014-04-20 20:31:11.167600000 +0400 -@@ -33,7 +33,6 @@ - # include - # define TAGLIB_ATOMIC_MAC - #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) --# define NOMINMAX - # include - # define TAGLIB_ATOMIC_WIN - #elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 401) \ diff --git a/mingw-w64-taglib/mingw-pkg-config.patch b/mingw-w64-taglib/mingw-pkg-config.patch deleted file mode 100644 index 14486bb2ab..0000000000 --- a/mingw-w64-taglib/mingw-pkg-config.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt.orig 2014-07-21 12:17:03.751000000 +0400 -+++ b/CMakeLists.txt 2014-07-21 12:17:10.973800000 +0400 -@@ -76,7 +76,7 @@ - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config.cmd DESTINATION ${BIN_INSTALL_DIR}) - endif() - --if(NOT WIN32 AND NOT BUILD_FRAMEWORK) -+if(NOT WIN32 AND NOT BUILD_FRAMEWORK OR MINGW) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc ) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) - endif() diff --git a/mingw-w64-tcl/010-dont-link-shared-with--static-libgcc.patch b/mingw-w64-tcl/010-dont-link-shared-with--static-libgcc.patch index 0e9a8a84fe..81e9114eb9 100644 --- a/mingw-w64-tcl/010-dont-link-shared-with--static-libgcc.patch +++ b/mingw-w64-tcl/010-dont-link-shared-with--static-libgcc.patch @@ -1,6 +1,6 @@ -diff -urN tcl8.6.3.orig/pkgs/itcl4.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/itcl4.0.2/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/itcl4.0.2/tclconfig/tcl.m4 2014-08-26 16:23:03.000000000 +0100 -+++ tcl8.6.3/pkgs/itcl4.0.2/tclconfig/tcl.m4 2014-11-03 21:10:40.124589900 +0000 +diff -urN tcl8.6.4.orig/pkgs/itcl4.0.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/itcl4.0.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/itcl4.0.3/tclconfig/tcl.m4 2014-08-26 16:23:03.000000000 +0100 ++++ tcl8.6.4/pkgs/itcl4.0.3/tclconfig/tcl.m4 2014-11-03 21:10:40.124589900 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -8,12 +8,12 @@ diff -urN tcl8.6.3.orig/pkgs/itcl4.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/itcl4.0.2/ - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/sqlite3.8.7.1/configure tcl8.6.3/pkgs/sqlite3.8.7.1/configure ---- tcl8.6.3.orig/pkgs/sqlite3.8.7.1/configure 2014-08-15 15:09:19.000000000 +0100 -+++ tcl8.6.3/pkgs/sqlite3.8.7.1/configure 2014-11-03 21:10:50.245375100 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/sqlite3.8.8.3/configure tcl8.6.4/pkgs/sqlite3.8.8.3/configure +--- tcl8.6.4.orig/pkgs/sqlite3.8.8.3/configure 2014-08-15 15:09:19.000000000 +0100 ++++ tcl8.6.4/pkgs/sqlite3.8.8.3/configure 2014-11-03 21:10:50.245375100 +0000 @@ -8710,9 +8710,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -21,12 +21,12 @@ diff -urN tcl8.6.3.orig/pkgs/sqlite3.8.7.1/configure tcl8.6.3/pkgs/sqlite3.8.7.1 - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/sqlite3.8.7.1/tclconfig/tcl.m4 tcl8.6.3/pkgs/sqlite3.8.7.1/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/sqlite3.8.7.1/tclconfig/tcl.m4 2014-08-26 16:23:05.000000000 +0100 -+++ tcl8.6.3/pkgs/sqlite3.8.7.1/tclconfig/tcl.m4 2014-11-03 21:53:20.090664400 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/sqlite3.8.8.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/sqlite3.8.8.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/sqlite3.8.8.3/tclconfig/tcl.m4 2014-08-26 16:23:05.000000000 +0100 ++++ tcl8.6.4/pkgs/sqlite3.8.8.3/tclconfig/tcl.m4 2014-11-03 21:53:20.090664400 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -34,12 +34,12 @@ diff -urN tcl8.6.3.orig/pkgs/sqlite3.8.7.1/tclconfig/tcl.m4 tcl8.6.3/pkgs/sqlite - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/tdbc1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbc1.0.2/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/tdbc1.0.2/tclconfig/tcl.m4 2014-08-14 18:25:28.000000000 +0100 -+++ tcl8.6.3/pkgs/tdbc1.0.2/tclconfig/tcl.m4 2014-11-03 21:53:17.562843400 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/tdbc1.0.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/tdbc1.0.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/tdbc1.0.3/tclconfig/tcl.m4 2014-08-14 18:25:28.000000000 +0100 ++++ tcl8.6.4/pkgs/tdbc1.0.3/tclconfig/tcl.m4 2014-11-03 21:53:17.562843400 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -47,12 +47,12 @@ diff -urN tcl8.6.3.orig/pkgs/tdbc1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbc1.0.2/ - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4 2014-08-26 16:23:06.000000000 +0100 -+++ tcl8.6.3/pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4 2014-11-03 21:53:14.185914500 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/tdbcmysql1.0.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/tdbcmysql1.0.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/tdbcmysql1.0.3/tclconfig/tcl.m4 2014-08-26 16:23:06.000000000 +0100 ++++ tcl8.6.4/pkgs/tdbcmysql1.0.3/tclconfig/tcl.m4 2014-11-03 21:53:14.185914500 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -60,12 +60,12 @@ diff -urN tcl8.6.3.orig/pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbcm - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 2014-08-26 16:23:06.000000000 +0100 -+++ tcl8.6.3/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 2014-11-03 21:11:17.741366700 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4 2014-08-26 16:23:06.000000000 +0100 ++++ tcl8.6.4/pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4 2014-11-03 21:11:17.741366700 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -73,12 +73,12 @@ diff -urN tcl8.6.3.orig/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbcod - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/tdbcpostgres1.0.2/configure tcl8.6.3/pkgs/tdbcpostgres1.0.2/configure ---- tcl8.6.3.orig/pkgs/tdbcpostgres1.0.2/configure 2014-08-14 18:59:04.000000000 +0100 -+++ tcl8.6.3/pkgs/tdbcpostgres1.0.2/configure 2014-11-03 21:11:28.422723000 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/tdbcpostgres1.0.3/configure tcl8.6.4/pkgs/tdbcpostgres1.0.3/configure +--- tcl8.6.4.orig/pkgs/tdbcpostgres1.0.3/configure 2014-08-14 18:59:04.000000000 +0100 ++++ tcl8.6.4/pkgs/tdbcpostgres1.0.3/configure 2014-11-03 21:11:28.422723000 +0000 @@ -9234,9 +9234,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -86,12 +86,12 @@ diff -urN tcl8.6.3.orig/pkgs/tdbcpostgres1.0.2/configure tcl8.6.3/pkgs/tdbcpostg - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 2014-08-26 16:23:06.000000000 +0100 -+++ tcl8.6.3/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 2014-11-03 21:11:35.450615500 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4 2014-08-26 16:23:06.000000000 +0100 ++++ tcl8.6.4/pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4 2014-11-03 21:11:35.450615500 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -99,12 +99,12 @@ diff -urN tcl8.6.3.orig/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/td - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 2014-08-26 16:23:07.000000000 +0100 -+++ tcl8.6.3/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 2014-11-03 21:11:42.045452900 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4 tcl8.6.4/pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4 2014-08-26 16:23:07.000000000 +0100 ++++ tcl8.6.4/pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4 2014-11-03 21:11:42.045452900 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -112,12 +112,12 @@ diff -urN tcl8.6.3.orig/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 tcl8.6.3/pkgs/td - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/pkgs/thread2.7.1/tclconfig/tcl.m4 tcl8.6.3/pkgs/thread2.7.1/tclconfig/tcl.m4 ---- tcl8.6.3.orig/pkgs/thread2.7.1/tclconfig/tcl.m4 2014-08-26 16:23:07.000000000 +0100 -+++ tcl8.6.3/pkgs/thread2.7.1/tclconfig/tcl.m4 2014-11-03 21:11:50.460521500 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/pkgs/thread2.7.2/tclconfig/tcl.m4 tcl8.6.4/pkgs/thread2.7.2/tclconfig/tcl.m4 +--- tcl8.6.4.orig/pkgs/thread2.7.2/tclconfig/tcl.m4 2014-08-26 16:23:07.000000000 +0100 ++++ tcl8.6.4/pkgs/thread2.7.2/tclconfig/tcl.m4 2014-11-03 21:11:50.460521500 +0000 @@ -3354,9 +3354,6 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi @@ -125,12 +125,12 @@ diff -urN tcl8.6.3.orig/pkgs/thread2.7.1/tclconfig/tcl.m4 tcl8.6.3/pkgs/thread2. - if test "$GCC" = "yes"; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" - fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" -diff -urN tcl8.6.3.orig/win/tcl.m4 tcl8.6.3/win/tcl.m4 ---- tcl8.6.3.orig/win/tcl.m4 2014-08-26 16:23:09.000000000 +0100 -+++ tcl8.6.3/win/tcl.m4 2014-11-03 21:12:59.195749700 +0000 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" +diff -urN tcl8.6.4.orig/win/tcl.m4 tcl8.6.4/win/tcl.m4 +--- tcl8.6.4.orig/win/tcl.m4 2014-08-26 16:23:09.000000000 +0100 ++++ tcl8.6.4/win/tcl.m4 2014-11-03 21:12:59.195749700 +0000 @@ -635,7 +635,6 @@ if test "${GCC}" = "yes" ; then diff --git a/mingw-w64-tcl/PKGBUILD b/mingw-w64-tcl/PKGBUILD index 04cd2f3175..6cce0c5665 100644 --- a/mingw-w64-tcl/PKGBUILD +++ b/mingw-w64-tcl/PKGBUILD @@ -3,8 +3,8 @@ _realname=tcl pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=8.6.3 -pkgrel=1 +pkgver=8.6.4 +pkgrel=2 pkgdesc="The Tcl scripting language (mingw-w64)" arch=('any') depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-zlib") @@ -22,7 +22,7 @@ source=("http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.g 009-fix-using-gnu-print.patch 010-dont-link-shared-with--static-libgcc.patch) -md5sums=('db382feca91754b7f93da16dc4cdad1f' +md5sums=('d7cbb91f1ded1919370a30edd1534304' '04e6b9f4e67ff4d23e60b2aa56777d5a' 'f9fd38a4bac21c094e48f7f1585d5412' '312640178d8e976aa64c634c92685fc0' @@ -30,7 +30,7 @@ md5sums=('db382feca91754b7f93da16dc4cdad1f' 'cf2dbfd13418aac404e8b532e7cabe98' 'f700b69022005a8d6fa3a4d5929af5ed' '7fddcb8c90dec92dfbd55672c7ee6c84' - 'a84fd6d6dec1f127818b870fbe43ea2f') + '1a4ca13317204bbd3f4776051fd87f44') prepare() { cd "${srcdir}/tcl${pkgver}" @@ -47,30 +47,35 @@ prepare() { } build() { + local extra_config= if check_option "debug" "y"; then - extra_config+=( --enable-symbols ) + extra_config="--enable-symbols" fi + local enable64bit= + [[ "${MINGW_CHOST}" = "x86_64-w64-mingw32" ]] && enable64bit='--enable-64bit' + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} - cp -rf "$srcdir/tcl$pkgver/" "${srcdir}/build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} cd "${srcdir}/build-${MINGW_CHOST}" - [ "${MINGW_CHOST}" = "x86_64-w64-mingw32" ] && enable64bit='--enable-64bit' - "${srcdir}"/${_realname}${pkgver}/win/configure \ + ${srcdir}/tcl${pkgver}/win/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-threads \ - "${extra_config[@]}" \ - $enable64bit + ${extra_config} \ + ${enable64bit} + make -j1 } package() { + local debug_suffix= if check_option "debug" "y"; then debug_suffix="g" fi cd "${srcdir}/build-${MINGW_CHOST}" cp tclsh86${debug_suffix}.exe tclsh.exe - #PATH=.:$PATH + #PATH=.:$PATH make install INSTALL_ROOT="$pkgdir" cp "${pkgdir}${MINGW_PREFIX}/bin/tclsh86${debug_suffix}.exe" "${pkgdir}${MINGW_PREFIX}/bin/tclsh.exe" @@ -80,8 +85,8 @@ package() { local _libver=${pkgver%.*} _libver=${_libver//./} - local _odbc_ver=1.0.2 - local _itcl_ver=4.0.2 + local _odbc_ver=1.0.3 + local _itcl_ver=4.0.3 sed \ -e "s|^\(TCL_BUILD_LIB_SPEC\)='.*|\1='-Wl,${MINGW_PREFIX}/lib/libtcl${_libver}.dll.a'|" \ -e "s|^\(TCL_SRC_DIR\)='.*'|\1='${MINGW_PREFIX}/include/tcl${pkgver%.*}/tcl-private'|" \ @@ -114,10 +119,11 @@ package() { # Install private headers mkdir -p "${pkgdir}${MINGW_PREFIX}/include/tcl${pkgver%.*}/tcl-private/"{generic,win} + cd ${srcdir}/tcl${pkgver} find generic win -name "*.h" -exec cp -p '{}' "${pkgdir}${MINGW_PREFIX}"/include/tcl${pkgver%.*}/tcl-private/'{}' ';' ( cd "${pkgdir}${MINGW_PREFIX}/include" - for i in *.h ; do - cp -f $i ${pkgdir}${MINGW_PREFIX}/include/tcl${pkgver%.*}/tcl-private/generic/ + for header in *.h ; do + cp -f ${header} ${pkgdir}${MINGW_PREFIX}/include/tcl${pkgver%.*}/tcl-private/generic/ done ) chmod a-x "${pkgdir}${MINGW_PREFIX}/lib/tcl${pkgver%.*}/encoding/"*.enc diff --git a/mingw-w64-tcllib/PKGBUILD b/mingw-w64-tcllib/PKGBUILD index faf2a83d24..7999da1c0a 100644 --- a/mingw-w64-tcllib/PKGBUILD +++ b/mingw-w64-tcllib/PKGBUILD @@ -4,15 +4,15 @@ _realname=tcllib pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.16 -pkgrel=1 +pkgver=1.17 +pkgrel=2 pkgdesc="Set of pure-Tcl extensions." arch=('any') url="http://core.tcl.tk/tcllib/" license=('bsd') depends=("${MINGW_PACKAGE_PREFIX}-tcl") source=(https://github.com/tcltk/tcllib/archive/tcllib_${pkgver/./_}.tar.gz) -md5sums=('6ebc460a3f5bfb09eb722bf123165c24') +md5sums=('fdeb9efd3a9da6361ef2451f2e5dc6b1') package(){ cd ${srcdir}/tcllib-tcllib_${pkgver/./_} diff --git a/mingw-w64-tclvfs/001-fix-detect-mingw.patch b/mingw-w64-tclvfs/001-fix-detect-mingw.patch new file mode 100644 index 0000000000..696375872d --- /dev/null +++ b/mingw-w64-tclvfs/001-fix-detect-mingw.patch @@ -0,0 +1,11 @@ +--- tclvfs/configure.orig 2015-08-01 02:38:12.000000000 +0200 ++++ tclvfs/configure 2015-08-01 02:40:06.818379500 +0200 +@@ -1351,7 +1351,7 @@ + echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6 + fi + case "`uname -s`" in +- *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) ++ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW*) + # Extract the first word of "cygpath", so it can be a program name with args. + set dummy cygpath; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 diff --git a/mingw-w64-tclvfs/PKGBUILD b/mingw-w64-tclvfs/PKGBUILD index a5498c8a1d..7c7ea9dd95 100644 --- a/mingw-w64-tclvfs/PKGBUILD +++ b/mingw-w64-tclvfs/PKGBUILD @@ -3,7 +3,7 @@ _realname=tclvfs pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}-cvs pkgver=20130425 -pkgrel=1 +pkgrel=3 pkgdesc="Virtual Filesystem support for Tcl" arch=('any') url="http://sourceforge.net/projects/tclvfs/" @@ -12,33 +12,42 @@ depends=("${MINGW_PACKAGE_PREFIX}-tcl") makedepends=('cvs') provides=("${MINGW_PACKAGE_PREFIX}-tclvfs") conflicts=("${MINGW_PACKAGE_PREFIX}-tclvfs") -md5sums=() #generate with 'makepkg -g' +source=('001-fix-detect-mingw.patch') +md5sums=('b5fc3a7f8960989987bcd367abf5cf0f') #generate with 'makepkg -g' _cvsroot=":pserver:anonymous:@tclvfs.cvs.sourceforge.net:/cvsroot/tclvfs" _cvsmod="${_realname}" -_build="$srcdir/$_cvsmod-build${CARCH}" +_build="${srcdir}/$_cvsmod-build${CARCH}" prepare() { - cd "$srcdir" + cd "${srcdir}" msg "Connecting to $_cvsmod.sourceforge.net CVS server...." if [ -d $_cvsmod/CVS ]; then cd $_cvsmod cvs -z3 update -d else - cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod + cvs -z3 -d $_cvsroot co -D ${pkgver} -f $_cvsmod fi msg "CVS checkout done or server timeout" + + cd "${srcdir}/tclvfs" + + # If "configure" has been patched by a previous build, revert it or + # `patch' will fail: + cvs update -C configure + + patch -p1 -i ${srcdir}/001-fix-detect-mingw.patch } build() { msg "Starting build..." - rm -rf "$_build" - cp -r "$srcdir/$_cvsmod" "$_build" + rm -rf "${_build}" + cp -r "${srcdir}/${_cvsmod}" "$_build" - cd "$_build" + cd "${_build}" ./configure \ --prefix=${MINGW_PREFIX} \ --mandir=${MINGW_PREFIX}/share/man @@ -46,6 +55,6 @@ build() { } package() { - cd "$_build" - make DESTDIR="$pkgdir" install + cd "${_build}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-tclx/001-fix-detect-mingw.patch b/mingw-w64-tclx/001-fix-detect-mingw.patch new file mode 100644 index 0000000000..c73afccb61 --- /dev/null +++ b/mingw-w64-tclx/001-fix-detect-mingw.patch @@ -0,0 +1,11 @@ +--- tclx8.4/configure.orig 2015-07-31 17:24:18.840987200 +0200 ++++ tclx8.4/configure 2015-07-31 17:24:41.606710900 +0200 +@@ -1345,7 +1345,7 @@ + echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6 + fi + case "`uname -s`" in +- *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) ++ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW*) + # Extract the first word of "cygpath", so it can be a program name with args. + set dummy cygpath; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 diff --git a/mingw-w64-tclx/PKGBUILD b/mingw-w64-tclx/PKGBUILD index 4b813f1819..a52f8832a5 100644 --- a/mingw-w64-tclx/PKGBUILD +++ b/mingw-w64-tclx/PKGBUILD @@ -4,39 +4,44 @@ _realname=tclx pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" _majorminor=8.4 pkgver=${_majorminor}.1 -pkgrel=1 +pkgrel=3 pkgdesc="Extends Tcl by providing new operating system interface commands, extended file control and many other." arch=('any') url="http://tclx.sourceforge.net/" license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-tcl") -source=("http://sourceforge.net/projects/tclx/files/TclX/$pkgver/${_realname}${pkgver}.tar.bz2" - 'random.c') +source=("http://sourceforge.net/projects/tclx/files/TclX/${pkgver}/${_realname}${pkgver}.tar.bz2" + '001-fix-detect-mingw.patch' + 'random.c') md5sums=('ac983708f23cf645c07058148f48440c' + 'e9774e0d34ff0662042d1b1bb0106bee' '59ad67a4a330de9062b594c37ea4d198') prepare() { local dst=${srcdir}/${_realname}${_majorminor}/compat mkdir -p ${dst} cp random.c ${dst} + + cd ${srcdir}/${_realname}${_majorminor} + patch -p1 -i ${srcdir}/001-fix-detect-mingw.patch } build() { mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - [ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ] && enable64bit='--enable-64bit' + [[ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ]] && enable64bit='--enable-64bit' CFLAGS="-DUSE_INTERP_ERRORLINE $CFLAGS" \ - "${srcdir}"/${_realname}${_majorminor}/configure \ - --prefix=${MINGW_PREFIX} \ - $enable64bit + ../${_realname}${_majorminor}/configure \ + --prefix=${MINGW_PREFIX} \ + $enable64bit make } package() { cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}" install local licdir=${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} mkdir -p ${licdir} diff --git a/mingw-w64-termcap/PKGBUILD b/mingw-w64-termcap/PKGBUILD index cb24df979e..daff63c433 100644 --- a/mingw-w64-termcap/PKGBUILD +++ b/mingw-w64-termcap/PKGBUILD @@ -2,10 +2,8 @@ _realname=termcap pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -#conflicts=("${MINGW_PACKAGE_PREFIX}-ncurses") -#provides=("${MINGW_PACKAGE_PREFIX}-ncurses") pkgver=1.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="Terminal feature database (mingw-w64)" arch=('any') url="ftp://ftp.gnu.org/gnu/termcap/" @@ -25,12 +23,12 @@ build() { [ -d ${srcdir}/build-${MINGW_CHOST} ] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir ${srcdir}/build-${MINGW_CHOST} cd ${srcdir}/build-${MINGW_CHOST} - + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} + --target=${MINGW_CHOST} make # Build a shared library. No need for -fPIC on Windows. @@ -43,7 +41,7 @@ build() { package() { cd ${srcdir}/build-${MINGW_CHOST} make install prefix="${pkgdir}${MINGW_PREFIX}" exec_prefix="${pkgdir}${MINGW_PREFIX}" oldincludedir= - rm -r "$pkgdir"${MINGW_PREFIX}/info/ + rm -r "${pkgdir}"${MINGW_PREFIX}/info/ mkdir -p "${pkgdir}"${MINGW_PREFIX}/{bin,lib} install -m 0755 libtermcap-0.dll "${pkgdir}${MINGW_PREFIX}/bin" install -m 0644 libtermcap.dll.a "${pkgdir}${MINGW_PREFIX}/lib" diff --git a/mingw-w64-tesseract-ocr-eng/PKGBUILD b/mingw-w64-tesseract-ocr-eng/PKGBUILD index 1c5bec8b33..caf5228ff3 100644 --- a/mingw-w64-tesseract-ocr-eng/PKGBUILD +++ b/mingw-w64-tesseract-ocr-eng/PKGBUILD @@ -1,27 +1,43 @@ # Maintainer: Alexey Pavlov # Maintainer: Ray Donnelly -# The traineddata files from the source should be unpacked in tesseract ocr's tessdata directory -# this source tar.gz does not contain any makefile +# The traineddata and related files for english should be placed in tesseract ocr's tessdata directory + _realname=tesseract-ocr-eng pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.03.298e31465a44 +pkgver=3.04.rc1.master pkgrel=1 -pkgdesc="English language data (3.02) for Tesseract OCR engine (mingw-w64)" +pkgdesc="English language data for Tesseract OCR engine (mingw-w64)" arch=('any') -url="https://code.google.com/p/tesseract-ocr/" +url="https://github.com/tesseract-ocr/tessdata" license=("Apache License 2.0") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs ${MINGW_PACKAGE_PREFIX}-tesseract-ocr ${MINGW_PACKAGE_PREFIX}-zlib) options=('!libtool' 'strip') -source=("https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz" +source=("https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.bigrams" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.fold" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.lm" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.nn" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.params" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.size" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.cube.word-freq" + "https://github.com/tesseract-ocr/tessdata/blob/master/eng.tesseract_cube.nn" ) -sha256sums=('989ed4c3a5b246d7353893e466c353099d8b73a1' +sha256sums=('SKIP' +'SKIP' +'SKIP' +'SKIP' +'SKIP' +'SKIP' +'SKIP' +'SKIP' +'SKIP' ) prepare() { - cd "$srcdir/${_realname}-298e31465a44" + cd "$srcdir/${_realname}-master" } build() { @@ -30,13 +46,13 @@ build() { cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-298e31465a44/configure \ + ${srcdir}/${_realname}-master/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ LIBLEPT_HEADERSDIR=${MINGW_PREFIX}/include \ - + make } diff --git a/mingw-w64-tesseract-ocr-osd/PKGBUILD b/mingw-w64-tesseract-ocr-osd/PKGBUILD index 2084619be8..7d2d9a7639 100644 --- a/mingw-w64-tesseract-ocr-osd/PKGBUILD +++ b/mingw-w64-tesseract-ocr-osd/PKGBUILD @@ -1,26 +1,26 @@ # Maintainer: Alexey Pavlov # Maintainer: Ray Donnelly # The traineddata files from the source should be unpacked in tesseract ocr's tessdata directory -# this source tar.gz does not contain any makefile + _realname=tesseract-ocr-osd pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.03.298e31465a44 +pkgver=3.04.rc1 pkgrel=1 -pkgdesc=" Orientation & Script Detection Data data (3.01) for Tesseract OCR engine (mingw-w64)" +pkgdesc="Orientation & Script Detection Data data for Tesseract OCR engine" arch=('any') -url="https://code.google.com/p/tesseract-ocr/" +url="https://github.com/tesseract-ocr/tessdata" license=("Apache License 2.0") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs ${MINGW_PACKAGE_PREFIX}-tesseract-ocr ${MINGW_PACKAGE_PREFIX}-zlib) options=('!libtool' 'strip') -source=("https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.osd.tar.gz") -sha256sums=('a559801a42be8a3dc15ae2ec27da99bd8b0b85ac') +source=("https://github.com/tesseract-ocr/tessdata/blob/master/osd.traineddata") +sha256sums=('SKIP') prepare() { - cd "$srcdir/${_realname}-298e31465a44" + cd "$srcdir/${_realname}-master" } build() { @@ -29,13 +29,13 @@ build() { cd "${srcdir}/build-${MINGW_CHOST}" - ${srcdir}/${_realname}-298e31465a44/configure \ + ${srcdir}/${_realname}-master/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ LIBLEPT_HEADERSDIR=${MINGW_PREFIX}/include \ - + make } diff --git a/mingw-w64-tesseract-ocr/0001-Fix-broken_MSC_VER-checks.patch b/mingw-w64-tesseract-ocr/0001-Fix-broken_MSC_VER-checks.patch deleted file mode 100644 index 9ee19febb2..0000000000 --- a/mingw-w64-tesseract-ocr/0001-Fix-broken_MSC_VER-checks.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- tesseract-ocr-298e31465a44/ccutil/platform.h.orig 2014-08-25 21:33:43.758846200 +0100 -+++ tesseract-ocr-298e31465a44/ccutil/platform.h 2014-08-25 21:34:23.670129000 +0100 -@@ -28,10 +28,12 @@ - #define ultoa _ultoa - #endif /* __GNUC__ */ - #define SIGNED -+#if defined(_MSC_VER) - #define snprintf _snprintf - #if (_MSC_VER <= 1400) - #define vsnprintf _vsnprintf --#endif /* _WIN32 */ -+#endif /* (_MSC_VER <= 1400) */ -+#endif /* defined(_MSC_VER) */ - #else - #define __UNIX__ - #include diff --git a/mingw-w64-tesseract-ocr/0002-Use-intptr_t-for-pointer-cast-target.patch b/mingw-w64-tesseract-ocr/0002-Use-intptr_t-for-pointer-cast-target.patch deleted file mode 100644 index b189c5f8fe..0000000000 --- a/mingw-w64-tesseract-ocr/0002-Use-intptr_t-for-pointer-cast-target.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tesseract-ocr-298e31465a44/cube/tess_lang_mod_edge.h.orig 2010-11-23 18:34:14.000000000 +0000 -+++ tesseract-ocr-298e31465a44/cube/tess_lang_mod_edge.h 2014-08-25 21:42:01.540317700 +0100 -@@ -177,7 +177,7 @@ - // to quickly lookup exisiting edges to converge during search - inline unsigned int Hash() const { - return static_cast(((start_edge_ | end_edge_) ^ -- ((reinterpret_cast(dawg_)))) ^ -+ ((reinterpret_cast(dawg_)))) ^ - ((unsigned int)edge_mask_) ^ - class_id_); - } diff --git a/mingw-w64-tesseract-ocr/PKGBUILD b/mingw-w64-tesseract-ocr/PKGBUILD index d0e7e6690f..3c24dfe5eb 100644 --- a/mingw-w64-tesseract-ocr/PKGBUILD +++ b/mingw-w64-tesseract-ocr/PKGBUILD @@ -3,30 +3,28 @@ _realname=tesseract-ocr pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.03.298e31465a44 +pkgver=3.04.00 pkgrel=1 pkgdesc="Tesseract OCR (mingw-w64)" arch=('any') -url="https://code.google.com/p/tesseract-ocr/" +url="https://github.com/tesseract-ocr/tesseract" license=("Apache License 2.0") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=(${MINGW_PACKAGE_PREFIX}-gcc-libs - ${MINGW_PACKAGE_PREFIX}-leptonica - ${MINGW_PACKAGE_PREFIX}-icu - ${MINGW_PACKAGE_PREFIX}-cairo - ${MINGW_PACKAGE_PREFIX}-pango - ${MINGW_PACKAGE_PREFIX}-zlib) +depends=(${MINGW_PACKAGE_PREFIX}-cairo + ${MINGW_PACKAGE_PREFIX}-gcc-libs + ${MINGW_PACKAGE_PREFIX}-icu + ${MINGW_PACKAGE_PREFIX}-leptonica + ${MINGW_PACKAGE_PREFIX}-pango + ${MINGW_PACKAGE_PREFIX}-zlib) options=('!libtool' 'strip') -source=("https://tesseract-ocr.googlecode.com/archive/298e31465a445e54defedd076217ff24b1af3fc2.tar.gz" - "0001-Fix-broken_MSC_VER-checks.patch" - "0002-Use-intptr_t-for-pointer-cast-target.patch") -sha256sums=('SKIP' - '69e00058dd7c32c2c205dc1247b07edd43b3ba30faa4af67b646a8f7b58c6494' - '5a74ecf3d06f950064b7d570166629497940d491c85dda5b65defa66f65d47aa') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/tesseract-ocr/tesseract/archive/${pkgver}.tar.gz + build-fixes.patch) +sha256sums=('7e6e48b625e1fba9bc825a4ef8c39f12c60aae1084939133b3c6a00f8f8dc38c' + '34cf8e6f1c13e123b872d92e678972edc9f62cd335f5fe4baa313d2184044a3f') + prepare() { - cd "$srcdir/${_realname}-298e31465a44" - patch -p1 -i "${srcdir}"/0001-Fix-broken_MSC_VER-checks.patch - patch -p1 -i "${srcdir}"/0002-Use-intptr_t-for-pointer-cast-target.patch + cd "${srcdir}/tesseract-${pkgver}" + patch -p1 -i ${srcdir}/build-fixes.patch ./autogen.sh } @@ -39,14 +37,14 @@ build() { extra_config+=( --enable-debug ) fi - ${srcdir}/${_realname}-298e31465a44/configure \ + ../tesseract-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ LIBLEPT_HEADERSDIR=${MINGW_PREFIX}/include \ "${extra_config[@]}" - + make } @@ -57,7 +55,7 @@ check() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install make training - make DESTDIR="$pkgdir" training-install + make DESTDIR="${pkgdir}" training-install } diff --git a/mingw-w64-tesseract-ocr/build-fixes.patch b/mingw-w64-tesseract-ocr/build-fixes.patch new file mode 100644 index 0000000000..e9ed3234d5 --- /dev/null +++ b/mingw-w64-tesseract-ocr/build-fixes.patch @@ -0,0 +1,11 @@ +--- tesseract-3.04.00/ccutil/Makefile.am.orig 2015-07-14 22:28:59.961600000 +0300 ++++ tesseract-3.04.00/ccutil/Makefile.am 2015-07-14 22:29:49.101600000 +0300 +@@ -42,7 +42,7 @@ + params.cpp universalambigs.cpp + + if T_WIN +-AM_CPPFLAGS += -I$(top_srcdir)/vs2008/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\" ++AM_CPPFLAGS += -I$(top_srcdir)/vs2010/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\" + noinst_HEADERS += ../vs2010/port/strtok_r.h + libtesseract_ccutil_la_SOURCES += ../vs2010/port/strtok_r.cpp + endif diff --git a/mingw-w64-tinyformat/PKGBUILD b/mingw-w64-tinyformat/PKGBUILD new file mode 100644 index 0000000000..26c3351503 --- /dev/null +++ b/mingw-w64-tinyformat/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: Benedikt Bitterli + +_realname=tinyformat +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.0.1 +pkgrel=1 +pkgdesc="A minimal type safe printf() replacement (mingw-w64)" +arch=('any') +license=('boost') +url="https://github.com/c42f/tinyformat" +source=(${_realname}-${pkgver}.tar.gz::"http://github.com/c42f/tinyformat/archive/Release-${pkgver}.tar.gz") +md5sums=('b1c1e6206e4152ae021813ac40a0e015') + +package() { + cd "${srcdir}/${_realname}-Release-${pkgver}" + install -Dm644 tinyformat.h "${pkgdir}${MINGW_PREFIX}/include/tinyformat.h" +} diff --git a/mingw-w64-tinyxml/PKGBUILD b/mingw-w64-tinyxml/PKGBUILD index af6e089d6a..00b7224f33 100644 --- a/mingw-w64-tinyxml/PKGBUILD +++ b/mingw-w64-tinyxml/PKGBUILD @@ -1,10 +1,9 @@ # Maintainer: Alexey Pavlov _realname=tinyxml - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.6.2 -pkgrel=2 +pkgrel=3 pkgdesc="Simple, small, C++ XML parser that can be easily integrated into other programs (mingw-w64)" arch=('any') url="http://www.grinninglizard.com/tinyxml" @@ -13,18 +12,18 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' 'staticlibs') source=("http://downloads.sourceforge.net/tinyxml/tinyxml_${pkgver//./_}.tar.gz" - "entity.patch" - "tinyxml-2.5.3-stl.patch" - "tinyxml.pc") + "entity.patch" + "tinyxml-2.5.3-stl.patch" + "tinyxml.pc") sha256sums=('15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593' 'ef493209b0a51160171fd834a7ecdddd02679463b85fb89a2ea254213e47f99b' '3baf2c4dbc2c8f54a151dac8860113d2f549174f83ed85d552b094dfaebb52af' '60bcff16486698f4d2f076f5a3c6e5566e098e3d0d30f1bdbbe7012d3d36c095') prepare() { - cd "$srcdir/tinyxml" - patch -p0 -i "$srcdir"/entity.patch - patch -p1 -i "$srcdir"/tinyxml-2.5.3-stl.patch + cd "${srcdir}/tinyxml" + patch -p0 -i "${srcdir}"/entity.patch + patch -p1 -i "${srcdir}"/tinyxml-2.5.3-stl.patch } build() { @@ -32,7 +31,7 @@ build() { cp -r "${srcdir}/tinyxml/"* "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" for file in $(ls *.cpp | grep -v xmltest); do - g++ -c -Wall -Wno-unknown-pragmas -Wno-format -O3 $file + g++ -c -Wall -Wno-unknown-pragmas -Wno-format -O3 ${file} done ar rcs -o libtinyxml.a $(ls *.o) g++ -shared -o libtinyxml-0.dll -Xlinker --out-implib -Xlinker libtinyxml.dll.a $(ls *.o) diff --git a/mingw-w64-tinyxml2/PKGBUILD b/mingw-w64-tinyxml2/PKGBUILD index 59bfcf3351..fd7ddbd669 100644 --- a/mingw-w64-tinyxml2/PKGBUILD +++ b/mingw-w64-tinyxml2/PKGBUILD @@ -2,7 +2,7 @@ _realname=tinyxml2 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.2.0 +pkgver=3.0.0 pkgrel=1 pkgdesc="Simple, small, C++ XML parser that can be easily integrated into other programs (mingw-w64)" arch=('any') @@ -11,35 +11,45 @@ license=("zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=('strip' 'staticlibs') -source=(https://github.com/leethomason/tinyxml2/archive/${pkgver}.tar.gz) -md5sums=('3c7a9191c8f26e4f056a89902ac848b1') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/leethomason/tinyxml2/archive/${pkgver}.tar.gz) +md5sums=('26584d2c1666aea5e664c105eb4e8153') prepare() { - cd "$srcdir/${_realname}-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} - [[ -d $srcdir/build-${MINGW_CHOST} ]] && rm -rf $srcdir/build-${MINGW_CHOST} - mkdir $srcdir/build-${MINGW_CHOST} - cd $srcdir/build-${MINGW_CHOST} - + msg "Build shared version..." + mkdir shared && cd shared + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_STATIC_LIBS:BOOL=ON \ - ../${_realname}-$pkgver + -DBUILD_SHARED_LIBS=ON \ + ../../${_realname}-${pkgver} + make + + cd ${srcdir}/build-${MINGW_CHOST} + msg "Build static version..." + mkdir static && cd static + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + ../../${_realname}-${pkgver} make } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - make install + cd "${srcdir}/build-${MINGW_CHOST}/shared" + make DESTDIR=${pkgdir} install - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/tinyxml2.pc + cp ${srcdir}/build-${MINGW_CHOST}/static/libtinyxml2.a ${pkgdir}${MINGW_PREFIX}/lib/ } diff --git a/mingw-w64-tk/PKGBUILD b/mingw-w64-tk/PKGBUILD index b83d5534a7..4c63d932d7 100644 --- a/mingw-w64-tk/PKGBUILD +++ b/mingw-w64-tk/PKGBUILD @@ -3,22 +3,22 @@ _realname=tk pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=8.6.3 -pkgrel=1 +pkgver=8.6.4 +pkgrel=2 pkgdesc="A windowing toolkit for use with tcl (mingw-w64)" arch=('any') url="http://tcl.sourceforge.net" license=("custom") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -depends=("${MINGW_PACKAGE_PREFIX}-tcl>=$pkgver") +depends=("${MINGW_PACKAGE_PREFIX}-tcl>=${pkgver}") options=('staticlibs') # '!strip' 'debug') -source=("http://downloads.sourceforge.net/sourceforge/tcl/tk${pkgver}-src.tar.gz" +source=("http://downloads.sourceforge.net/sourceforge/tcl/${_realname}${pkgver}-src.tar.gz" 002-implib-name.mingw.patch 003-fix-forbidden-colon-in-paths.mingw.patch 004-install-man.mingw.patch 006-prevent-tclStubsPtr-segfault.patch 008-dont-link-shared-with--static-libgcc.patch) -sha1sums=('244ddc0f64cc3d429c9d86135d0bbe2cf06c9360' +sha1sums=('ad24c59ac2e7453d1ed2bad0d7d18a01eabc5226' 'f198c1a47f4adf9dbca628889267a8740482fe69' '5029b27e01826f640fb17daf6f96c13d3f0de293' 'a96a89cea2823a8f1857885aa8d71d96a829e06b' @@ -26,7 +26,7 @@ sha1sums=('244ddc0f64cc3d429c9d86135d0bbe2cf06c9360' '51e26a818036453d4424c9a697aa75a4a796977c') prepare() { - cd "$srcdir/tk$pkgver" + cd "${srcdir}/${_realname}${pkgver}" patch -p1 -i "${srcdir}"/002-implib-name.mingw.patch patch -p1 -i "${srcdir}"/003-fix-forbidden-colon-in-paths.mingw.patch patch -p1 -i "${srcdir}"/004-install-man.mingw.patch @@ -37,43 +37,51 @@ prepare() { } build() { + local extra_config= if check_option "debug" "y"; then - extra_config+=( --enable-symbols ) + extra_config="--enable-symbols" fi + local enable64bit= + [[ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ]] && enable64bit='--enable-64bit' + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} - cp -rf "$srcdir/tk$pkgver/" "${srcdir}/build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} cd "${srcdir}/build-${MINGW_CHOST}" - [ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ] && enable64bit='--enable-64bit' - "${srcdir}"/${_realname}${pkgver}/win/configure \ + ${srcdir}/tk${pkgver}/win/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ --with-tcl=${MINGW_PREFIX}/lib \ - "${extra_config[@]}" \ - $enable64bit + ${extra_config} \ + ${enable64bit} + make } package() { + local debug_suffix= if check_option "debug" "y"; then debug_suffix="g" fi cd "${srcdir}/build-${MINGW_CHOST}" - make install INSTALL_ROOT="$pkgdir" + make install INSTALL_ROOT="${pkgdir}" cp "${pkgdir}${MINGW_PREFIX}/bin/wish86${debug_suffix}.exe" "${pkgdir}${MINGW_PREFIX}/bin/wish.exe" find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm find "${pkgdir}${MINGW_PREFIX}" -name '*.sh' -o -name '*.dll' -o -name '*.exe' | xargs -rtl1 chmod 755 ln -s "${pkgdir}${MINGW_PREFIX}/lib/libtk86${debug_suffix}.dll.a" "${pkgdir}${MINGW_PREFIX}/lib/libtk.dll.a" mkdir -p "${pkgdir}${MINGW_PREFIX}/include/tk${pkgver%.*}/tk-private/"{generic/ttk,win} + + cd ${srcdir}/tk${pkgver} find generic win -name "*.h" -exec cp -p '{}' "${pkgdir}${MINGW_PREFIX}"/include/tk${pkgver%.*}/tk-private/'{}' ';' ( cd "${pkgdir}${MINGW_PREFIX}/include" - for i in *.h ; do - cp -f $i ${pkgdir}${MINGW_PREFIX}/include/tk${pkgver%.*}/tk-private/generic/ + for header in *.h ; do + cp -f ${header} ${pkgdir}${MINGW_PREFIX}/include/tk${pkgver%.*}/tk-private/generic/ done ) chmod a-x "${pkgdir}${MINGW_PREFIX}/lib/"*/pkgIndex.tcl - + local _libver=${pkgver%.*} _libver=${_libver//./} sed -i \ diff --git a/mingw-w64-tkimg/PKGBUILD b/mingw-w64-tkimg/PKGBUILD index b66a53c55b..3d1c0ee832 100644 --- a/mingw-w64-tkimg/PKGBUILD +++ b/mingw-w64-tkimg/PKGBUILD @@ -1,22 +1,24 @@ # Based on the Arch package +# Don't building with installed jbigkit package as we build tiff without jbigkit support _pkgname=tkimg pkgname=${MINGW_PACKAGE_PREFIX}-$_pkgname _pkgver=1.4 pkgver=${_pkgver}.2 -pkgrel=1 -pkgdesc="Adds support to Tk for many other Image formats: BMP, XBM, XPM, GIF, PNG, JPEG, TIFF and postscript." +pkgrel=3 +pkgdesc="Adds support to Tk for many other Image formats: BMP, XBM, XPM, GIF, PNG, JPEG, TIFF and postscript (mingw-64)" url="http://tkimg.sourceforge.net" arch=('any') license=('BSD') -depends=("${MINGW_PACKAGE_PREFIX}-zlib" +depends=(#"${MINGW_PACKAGE_PREFIX}-jbigkit" "${MINGW_PACKAGE_PREFIX}-libjpeg" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-tk") + "${MINGW_PACKAGE_PREFIX}-tk" + "${MINGW_PACKAGE_PREFIX}-zlib") # Uses dtplite for generating the man pages: makedepends=("${MINGW_PACKAGE_PREFIX}-tcllib") -source=("http://downloads.sourceforge.net/tkimg/$_pkgname$pkgver.tar.gz" +source=("http://downloads.sourceforge.net/tkimg/${_pkgname}${pkgver}.tar.gz" 001-compile-tif_jbig.patch 002-dtplite_tcl.patch) md5sums=('c42b46692a55c402c97e8f2a896bc2d4' @@ -25,7 +27,7 @@ md5sums=('c42b46692a55c402c97e8f2a896bc2d4' prepare() { cd "${srcdir}/${_pkgname}${_pkgver}" - patch -Np1 -i "${srcdir}/001-compile-tif_jbig.patch" + #patch -Np1 -i "${srcdir}/001-compile-tif_jbig.patch" patch -Np1 -i "${srcdir}/002-dtplite_tcl.patch" } @@ -40,12 +42,13 @@ build() { ../${_pkgname}${_pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --mandir=${MINGW_PREFIX}/share/man \ + --disable-jbig \ "${extra_config[@]}" make } package() { cd "${srcdir}/build-${CARCH}" - make INSTALL_ROOT="$pkgdir" install + make INSTALL_ROOT="${pkgdir}" install rm -f ${pkgdir}/${MINGW_PREFIX}/lib/*.sh } diff --git a/mingw-w64-tklib/PKGBUILD b/mingw-w64-tklib/PKGBUILD index bb90fe4c48..887e92ffdd 100644 --- a/mingw-w64-tklib/PKGBUILD +++ b/mingw-w64-tklib/PKGBUILD @@ -3,31 +3,31 @@ _realname=tklib pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgver=0.6 -pkgrel=2 -pkgdesc='A companion to Tcllib, for Tk related packages.' +pkgrel=3 +pkgdesc="A companion to Tcllib, for Tk related packages (mingw-w64)" arch=('any') url='http://core.tcl.tk/tklib/home' license=('BSD') depends=("${MINGW_PACKAGE_PREFIX}-tk" "${MINGW_PACKAGE_PREFIX}-tcllib") source=("https://github.com/tcltk/tklib/archive/tklib_${pkgver/./_}.tar.gz" - '001-no-dateentry-test-code.patch') -md5sums=('233c195515505d43a72680269cbcbaed' + '001-no-dateentry-test-code.patch') +md5sums=('7e4b9915ed2ef8ad4516f818c4f11a90' 'dd548d2d73f784ee2eac5d3f1baadb6d') prepare() { - cd ${srcdir}/tklib-tklib_${pkgver/./_} - patch -Np1 -i "${srcdir}/001-no-dateentry-test-code.patch" + cd ${srcdir}/tklib-tklib_${pkgver/./_} + patch -Np1 -i "${srcdir}/001-no-dateentry-test-code.patch" } build() { - cd ${srcdir}/tklib-tklib_${pkgver/./_} - ./configure --prefix="${MINGW_PREFIX}" - make all + cd ${srcdir}/tklib-tklib_${pkgver/./_} + ./configure --prefix="${MINGW_PREFIX}" + make all } package() { - cd ${srcdir}/tklib-tklib_${pkgver/./_} - make DESTDIR="${pkgdir}" install - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/ - cp license.terms ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + cd ${srcdir}/tklib-tklib_${pkgver/./_} + make DESTDIR="${pkgdir}" install + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/ + cp license.terms ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING } diff --git a/mingw-w64-tktable/001-fix-detect-mingw.patch b/mingw-w64-tktable/001-fix-detect-mingw.patch new file mode 100644 index 0000000000..7be6466a5e --- /dev/null +++ b/mingw-w64-tktable/001-fix-detect-mingw.patch @@ -0,0 +1,11 @@ +--- Tktable2.10/tclconfig/tcl.m4.orig 2015-07-29 09:08:46.206702700 +0300 ++++ Tktable2.10/tclconfig/tcl.m4 2015-07-29 09:08:53.774459400 +0300 +@@ -2952,7 +2952,7 @@ + AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) + fi + case "`uname -s`" in +- *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) ++ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW*) + AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) + EXEEXT=".exe" + TEA_PLATFORM="windows" diff --git a/mingw-w64-tktable/PKGBUILD b/mingw-w64-tktable/PKGBUILD index b26d796a7d..dee625c7a8 100644 --- a/mingw-w64-tktable/PKGBUILD +++ b/mingw-w64-tktable/PKGBUILD @@ -6,22 +6,32 @@ _realname=tktable pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" _pkgnameactual=Tktable pkgver=2.10 -pkgrel=2 -pkgdesc="A full-featured 2D table widget for Tk." -arch=('any') +pkgrel=4 +pkgdesc="A full-featured 2D table widget for Tk (mingw-w64)" +arch=('any') url="http://tktable.sourceforge.net/" license=('custom') depends=("${MINGW_PACKAGE_PREFIX}-tk") -source=("http://sourceforge.net/projects/tktable/files/${_realname}/$pkgver/${_pkgnameactual}${pkgver}.tar.gz") -md5sums=('ecdd96b39ad49b820bf084eb1c786f66') +source=("http://sourceforge.net/projects/tktable/files/${_realname}/${pkgver}/${_pkgnameactual}${pkgver}.tar.gz" + 001-fix-detect-mingw.patch) +md5sums=('ecdd96b39ad49b820bf084eb1c786f66' + 'c1759a7b591ad70516166137dcbe3864') + +prepare() { + cd ${_pkgnameactual}${pkgver} + patch -p1 -i ${srcdir}/001-fix-detect-mingw.patch + + autoreconf -fiv +} build() { + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" - [ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ] && enable64bit='--enable-64bit' + [[ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ]] && enable64bit='--enable-64bit' - "${srcdir}"/${_pkgnameactual}${pkgver}/configure \ + ../${_pkgnameactual}${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ $enable64bit make @@ -29,5 +39,5 @@ build() { package() { cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-tolua/PKGBUILD b/mingw-w64-tolua/PKGBUILD index 810567a73f..fe7386adba 100644 --- a/mingw-w64-tolua/PKGBUILD +++ b/mingw-w64-tolua/PKGBUILD @@ -1,13 +1,12 @@ # Maintainer: Alexey Pavlov _realname=tolua - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=5.2.0 -pkgrel=2 -pkgdesc="A tool that greatly simplifies the integration of C/C++ code with Lua. (mingw-w64)" +pkgrel=3 +pkgdesc="A tool that greatly simplifies the integration of C/C++ code with Lua (mingw-w64)" arch=('any') -url="http://www.tecgraf.puc-rio.br/~celes/tolua/" +url="http://www.tecgraf.puc-rio.br/~celes/tolua/" license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-lua") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") diff --git a/mingw-w64-tools-git/PKGBUILD b/mingw-w64-tools-git/PKGBUILD index 88a1ad0091..9988bec0b6 100644 --- a/mingw-w64-tools-git/PKGBUILD +++ b/mingw-w64-tools-git/PKGBUILD @@ -1,38 +1,47 @@ # Maintainer: Alexey Pavlov +# Contributor: Martell Malone _realname=tools - +pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" replaces="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -_ver_base=4.0.0 -pkgver=4.0.0.4328.a913346 +pkgver=5.0.0.4592.90b8472 pkgrel=1 pkgdesc="MinGW-w64 tools" arch=('any') url="http://mingw-w64.sourceforge.net" license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain" "${MINGW_PACKAGE_PREFIX}") +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") makedepends=("git" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-libmangle") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -options=('strip' 'staticlibs' '!emptydirs') -source=("${_realname}"::"git://git.code.sf.net/p/mingw-w64/mingw-w64") +options=('staticlibs' '!emptydirs') +source=("mingw-w64"::"git://git.code.sf.net/p/mingw-w64/mingw-w64") md5sums=('SKIP') -_tools="gendef genidl genpeimg widl" # genstubdll +_tools="gendef genlib genidl genpeimg widl" # genstubdll pkgver() { - cd "$srcdir/${_realname}" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/mingw-w64" + local _major=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MAJOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _minor=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MINOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _rev=0 + printf "%s.%s.%s.%s.%s" ${_major} ${_minor} ${_rev} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/mingw-w64" + #git am "${srcdir}/0001-widl-Relocate-DEFAULT_INCLUDE_DIR.patch" } build() { local cur= for cur in ${_tools}; do plain "Building ${cur} ..." + [[ -d ${srcdir}/${MINGW_CHOST}-${cur} ]] && rm -rf ${srcdir}/${MINGW_CHOST}-${cur} mkdir -p ${srcdir}/${MINGW_CHOST}-${cur} cd ${srcdir}/${MINGW_CHOST}-${cur} - ${srcdir}/${_realname}/mingw-w64-tools/${cur}/configure \ + ${srcdir}/mingw-w64/mingw-w64-tools/${cur}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -47,8 +56,8 @@ package() { plain "Installing ${cur} ..." cd ${srcdir}/${MINGW_CHOST}-${cur} make DESTDIR=${pkgdir} install - if [[ -f "${srcdir}/${_realname}/mingw-w64-tools//${cur}"/COPYING ]]; then - install -Dm644 ${srcdir}/${_realname}/mingw-w64-tools/${cur}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/mingw-w64-tools/COPYING.${cur} + if [[ -f "${srcdir}/mingw-w64/mingw-w64-tools/${cur}"/COPYING ]]; then + install -Dm644 ${srcdir}/mingw-w64/mingw-w64-tools/${cur}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/mingw-w64-tools/COPYING.${cur} fi done } diff --git a/mingw-w64-tor/PKGBUILD b/mingw-w64-tor/PKGBUILD new file mode 100644 index 0000000000..185a47bf8f --- /dev/null +++ b/mingw-w64-tor/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Haroogan + +_realname='tor' +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.2.7.6 +pkgrel=1 +pkgdesc="Anonymizing overlay network (mingw-w64)" +url="http://www.torproject.org/" +license=('BSD') +arch=('any') +depends=("${MINGW_PACKAGE_PREFIX}-libevent" + "${MINGW_PACKAGE_PREFIX}-openssl" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-ca-certificates") +options=('strip') +source=("http://dist.torproject.org/${_realname}-${pkgver}.tar.gz"{,.asc}) +sha256sums=('493a8679f904503048114aca6467faef56861206bab8283d858f37141d95105d' + 'SKIP') +validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA') # Nick Mathewson + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + + cd "build-${MINGW_CHOST}" + + CPPFLAGS="-isystem ${MINGW_PREFIX}/include" + CFLAGS="-pipe -O3 -fomit-frame-pointer -funroll-loops" + LDFLAGS="-s -Wl,-s" + "${srcdir}/${_realname}-${pkgver}/configure" \ + --prefix="${MINGW_PREFIX}" \ + --build="${MINGW_CHOST}" \ + --disable-bufferevents \ + --disable-seccomp \ + --disable-libscrypt + + make +} + +package() { + cd "build-${MINGW_CHOST}" + + make DESTDIR="${pkgdir}" install + + cd "${srcdir}/${_realname}-${pkgver}" + + install -D "LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + install -d "${pkgdir}${MINGW_PREFIX}/var/lib/tor" +} diff --git a/mingw-w64-totem-pl-parser/001-win.patch b/mingw-w64-totem-pl-parser/001-win.patch new file mode 100644 index 0000000000..2dc2e5d963 --- /dev/null +++ b/mingw-w64-totem-pl-parser/001-win.patch @@ -0,0 +1,46 @@ +--- ./plparse/Makefile.am.orig 2014-01-13 10:17:47.000000000 +0100 ++++ ./plparse/Makefile.am 2015-05-22 09:08:18.937762300 +0200 +@@ -194,6 +194,7 @@ + INTROSPECTION_GIRS = + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --add-include-path=$(builddir) --warn-all + INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + + if HAVE_INTROSPECTION + introspection_sources = \ +--- ./plparse/plparser.symbols.orig 2011-09-18 12:33:29.000000000 +0200 ++++ ./plparse/plparser.symbols 2015-05-22 09:08:18.939763900 +0200 +@@ -4,7 +4,6 @@ + totem_cd_get_human_readable_name + totem_cd_has_medium + totem_cd_mrl_from_type +-totem_disc_media_type_get_type + totem_disc_media_type_quark + totem_pl_parser_add_ignored_mimetype + totem_pl_parser_add_ignored_scheme +@@ -14,7 +13,6 @@ + totem_pl_parser_error_get_type + totem_pl_parser_error_quark + totem_pl_parser_get_type +-totemplparser_marshal_VOID__STRING_STRING_STRING + totem_pl_parser_new + totem_pl_parser_parse + totem_pl_parser_parse_async +--- ./plparse/totem-pl-parser.c.orig 2015-02-17 15:27:48.000000000 +0100 ++++ ./plparse/totem-pl-parser.c 2015-05-22 09:08:18.942765600 +0200 +@@ -662,8 +662,14 @@ + static gpointer + totem_pl_parser_real_init_i18n (gpointer data) + { +- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); ++ gchar *dir; ++ gchar *path; ++ dir = g_win32_get_package_installation_directory_of_module (NULL); ++ path = g_build_filename (dir, "share", "locale", NULL); ++ bindtextdomain (GETTEXT_PACKAGE, path); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); ++ g_free (path); ++ g_free (dir); + return NULL; + } + diff --git a/mingw-w64-totem-pl-parser/PKGBUILD b/mingw-w64-totem-pl-parser/PKGBUILD new file mode 100644 index 0000000000..219d38bb5c --- /dev/null +++ b/mingw-w64-totem-pl-parser/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Andrea Zagli + +_realname=totem-pl-parser +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.10.5 +pkgrel=2 +arch=('any') +pkgdesc="Simple GObject-based library to parse and save a host of playlist formats (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gmime" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-libarchive" + "${MINGW_PACKAGE_PREFIX}-libgcrypt") +makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-vala" + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "gtk-doc") +license=("LGPL 2") +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-win.patch) +sha256sums=('a746580f61b678029dadaa824a6923445afd944d12c40c5fccb27159799c8137' + 'f7aa9fec9fdeb8671bcd145b5900e1beb9b8615cb42354b91efe54fef01a247e') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-win.patch + + autoreconf -f -i +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + mkdir -p docs/reference/html + cp -rf ../${_realname}-${pkgver}/docs/reference/html/* docs/reference/html + + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB" +} diff --git a/mingw-w64-twolame/PKGBUILD b/mingw-w64-twolame/PKGBUILD index 6661c5782a..512837b11c 100644 --- a/mingw-w64-twolame/PKGBUILD +++ b/mingw-w64-twolame/PKGBUILD @@ -3,14 +3,14 @@ _realname=twolame pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.3.13 -pkgrel=1 -pkgdesc="An optimized MPEG Audio Layer 2 (MP2) encoder" +pkgrel=2 +pkgdesc="An optimized MPEG Audio Layer 2 (MP2) encoder (mingw-w64)" arch=('any') license=('LGPL') url="http://www.twolame.org/" options=('staticlibs' 'strip') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config") + "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-libsndfile") source=("http://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz" 0001-mingw32-does-not-need-handholding.all.patch @@ -32,11 +32,12 @@ prepare() { patch -p1 -i ${srcdir}/0003-binary-stdin.all.patch patch -p1 -i ${srcdir}/0004-no-need-for-dllexport.mingw.patch patch -p1 -i ${srcdir}/0005-silent.mingw.patch - + WANT_AUTOMAKE=latest autoreconf -fi } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} ../${_realname}-${pkgver}/configure \ @@ -45,6 +46,7 @@ build() { --host=${MINGW_CHOST} \ --enable-shared \ --enable-static + make } diff --git a/mingw-w64-uchardet-git/PKGBUILD b/mingw-w64-uchardet-git/PKGBUILD new file mode 100644 index 0000000000..37d2315654 --- /dev/null +++ b/mingw-w64-uchardet-git/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: James Ross-Gowan + +_realname=uchardet +pkgbase="mingw-w64-${_realname}-git" +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=0.0.1.28.84e292d +pkgrel=1 +pkgdesc="An encoding detector library ported from Mozilla (mingw-w64)" +arch=('any') +url='https://github.com/BYVoid/uchardet' +license=('MPL') +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("git" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-gcc") +source=("${_realname}"::"git+https://github.com/BYVoid/uchardet.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + local major=$(sed -n 's/^ *set *( *UCHARDET_VERSION_MAJOR *\([0-9][0-9]*\) *).*/\1/p' CMakeLists.txt) + local minor=$(sed -n 's/^ *set *( *UCHARDET_VERSION_MINOR *\([0-9][0-9]*\) *).*/\1/p' CMakeLists.txt) + local rev=$(sed -n 's/^ *set *( *UCHARDET_VERSION_REVISION *\([0-9][0-9]*\) *).*/\1/p' CMakeLists.txt) + printf '%s.%s.%s.%s.%s' $major $minor $rev "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -r "${srcdir}/build-${MINGW_CHOST}" + mkdir "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + ../${_realname} + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="$pkgdir" install +} diff --git a/mingw-w64-uhttpmock/PKGBUILD b/mingw-w64-uhttpmock/PKGBUILD index a060514101..dc67efa50e 100644 --- a/mingw-w64-uhttpmock/PKGBUILD +++ b/mingw-w64-uhttpmock/PKGBUILD @@ -1,15 +1,17 @@ # Maintainer: Andrea Zagli _realname=uhttpmock +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.3.0 -pkgrel=2 +pkgver=0.5.0 +pkgrel=1 arch=('any') pkgdesc="uhttpmock is a HTTP web service mocking project for projects which use libsoup (mingw-w64)" depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-libsoup") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-vala" "pkg-config" "make" "libtool" @@ -19,10 +21,10 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" options=('strip' 'staticlibs' '!debug') license=("LGPL 2.1") url="http://tecnocode.co.uk/" -source=(http://tecnocode.co.uk/downloads/${_realname}/${_realname}-$pkgver.tar.xz +source=(http://tecnocode.co.uk/downloads/${_realname}/${_realname}-${pkgver}.tar.xz 0001-wsock.patch 0002-give-cc-to-gir-scanner.all.patch) -sha256sums=('d33cdf6c6852975162a9d758870edea17449db5ca9dc0e4e0a5831a47fbe8bfe' +sha256sums=('26da182a2db2579c5ba4dad9096d52099e0766228c295cfbaed6de4046f7d16e' '61a3563903d979a93514e09582400ed0647e3029a0632d5c6fbbd0f0589ba809' 'd12318d529f768ddfb2107e249d9c181e009dc1e62fdcced4c3397ead36e4845') @@ -30,11 +32,12 @@ prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-wsock.patch patch -p1 -i ${srcdir}/0002-give-cc-to-gir-scanner.all.patch - + autoreconf -fi } build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} @@ -43,11 +46,12 @@ build() { --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ - --libexecdir=${MINGW_PREFIX}/lib + --libexecdir=${MINGW_PREFIX}/lib{ + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make DESTDIR=$pkgdir install + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install } diff --git a/mingw-w64-unbound/PKGBUILD b/mingw-w64-unbound/PKGBUILD index 19943df7e5..6fd34dcc4f 100644 --- a/mingw-w64-unbound/PKGBUILD +++ b/mingw-w64-unbound/PKGBUILD @@ -56,7 +56,7 @@ package() { find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm install -Dm644 ${srcdir}/${_realname}-${pkgver}/doc/example.conf.in "${pkgdir}${MINGW_PREFIX}/etc/unbound/unbound.conf.example" install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" - + for ff in anchor-update unbound-service-install unbound-service-remove; do install -Dm755 ${ff}.exe "${pkgdir}${MINGW_PREFIX}/bin/" install -Dm644 ${srcdir}/manifest ${pkgdir}${MINGW_PREFIX}/bin/${ff}.exe.manifest diff --git a/mingw-w64-universal-ctags-git/PKGBUILD b/mingw-w64-universal-ctags-git/PKGBUILD new file mode 100644 index 0000000000..9f84def18d --- /dev/null +++ b/mingw-w64-universal-ctags-git/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Oscar Fuentes + +_realname=ctags +pkgbase=mingw-w64-universal-${_realname}-git +pkgname="${MINGW_PACKAGE_PREFIX}-universal-${_realname}-git" +pkgver=r2635.80256f4 +pkgrel=1 +pkgdesc="A maintained Ctags implementation (mingw-w64)" +arch=('any') +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +url="https://github.com/universal-ctags/ctags" +license=("GPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libiconv") +options=('staticlibs' 'strip') +source=("git+https://github.com/universal-ctags/ctags.git") +md5sums=('SKIP') + +pkgver() { + cd "${_realname}" + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${srcdir}/${_realname} + autoreconf -fiv +} + +build() { + rm -rf ${srcdir}/build-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --disable-etags \ + --disable-external-sort \ + --enable-iconv + make +} + +package() { + cd "${srcdir}/build-${CARCH}" + make prefix="${pkgdir}${MINGW_PREFIX}" install +} diff --git a/mingw-w64-usbmuxd/PKGBUILD b/mingw-w64-usbmuxd/PKGBUILD index 01f920db08..b9bdb13d60 100644 --- a/mingw-w64-usbmuxd/PKGBUILD +++ b/mingw-w64-usbmuxd/PKGBUILD @@ -5,7 +5,6 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.1.0 pkgrel=1 pkgdesc='A socket daemon to multiplex connections from and to iOS devices (mingw-w64)' -groups=("${MINGW_PACKAGE_PREFIX}" "xdev") arch=('any') url='http://www.libimobiledevice.org/' license=('GPL2+') diff --git a/mingw-w64-usbredir/PKGBUILD b/mingw-w64-usbredir/PKGBUILD new file mode 100644 index 0000000000..80421ae9e8 --- /dev/null +++ b/mingw-w64-usbredir/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Andrea Zagli + +_realname=usbredir +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.7 +pkgrel=2 +arch=('any') +pkgdesc="Parser for the usbredir protocol (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-libusb") +options=('strip' 'staticlibs') +license=("GPL 2") +url="http://www.spice-space.org" +source=(http://www.spice-space.org/download/usbredir/${_realname}-${pkgver}.tar.bz2) +sha256sums=('0a63a0712b5dc62be9cca44f97270fea5d1ec1fe7dde0c11dc74a01c8e2006aa') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} +} + +build() { + [[ -d "${srcdir}"/build-${MINGW_CHOST} ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} + + make +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install +} diff --git a/mingw-w64-usbview-git/.gitignore b/mingw-w64-usbview-git/.gitignore new file mode 100644 index 0000000000..cdebe405b4 --- /dev/null +++ b/mingw-w64-usbview-git/.gitignore @@ -0,0 +1 @@ +/wds diff --git a/mingw-w64-usbview-git/01-uvcview-includes.patch b/mingw-w64-usbview-git/01-uvcview-includes.patch new file mode 100644 index 0000000000..d2db0e7281 --- /dev/null +++ b/mingw-w64-usbview-git/01-uvcview-includes.patch @@ -0,0 +1,23 @@ +--- a/uvcview.h ++++ b/uvcview.h +@@ -34,10 +34,10 @@ Revision History: + #include + #include + #include +-#include + #include + #include + #include ++#include + #include + #include + #include +@@ -50,6 +50,8 @@ Revision History: + #include + #include + #include ++#include ++#include + + // This is mostly a private USB Audio descriptor header + #include "usbdesc.h" diff --git a/mingw-w64-usbview-git/03-resource-fix.patch b/mingw-w64-usbview-git/03-resource-fix.patch new file mode 100644 index 0000000000..ad55d41a98 --- /dev/null +++ b/mingw-w64-usbview-git/03-resource-fix.patch @@ -0,0 +1,22 @@ +Only in C++fix: out.so +diff -u -r C++/uvcview.rc C++fix/uvcview.rc +--- C++/uvcview.rc 2015-04-23 08:52:46.193018500 -0700 ++++ C++fix/uvcview.rc 2015-04-23 08:53:32.858881400 -0700 +@@ -84,7 +84,7 @@ + BEGIN + MENUITEM "&Refresh\tF5", ID_REFRESH + MENUITEM SEPARATOR +- MENUITEM "Save Current &View ..." ID_SAVE ++ MENUITEM "Save Current &View ...", ID_SAVE + MENUITEM "Save As (&txt) ...", ID_SAVEALL + MENUITEM "Save As (&xml) ...\tF2", ID_SAVEXML + MENUITEM SEPARATOR +@@ -130,7 +130,7 @@ + BEGIN + IDS_STANDARD_FONT "Courier" + IDS_STANDARD_FONT_HEIGHT "\13" +- IDS_STANDARD_FONT_WIDTH "\8" ++ IDS_STANDARD_FONT_WIDTH "\08" + END + + STRINGTABLE DISCARDABLE diff --git a/mingw-w64-usbview-git/04-redefinition.patch b/mingw-w64-usbview-git/04-redefinition.patch new file mode 100644 index 0000000000..35bfccbdaa --- /dev/null +++ b/mingw-w64-usbview-git/04-redefinition.patch @@ -0,0 +1,21 @@ +--- a/usbdesc.h ++++ b/usbdesc.h +@@ -81,7 +81,6 @@ Revision History: + #define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07 + #define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08 + #define USB_OTG_DESCRIPTOR_TYPE 0x09 +-#define USB_DEBUG_DESCRIPTOR_TYPE 0x0A + #define USB_IAD_DESCRIPTOR_TYPE 0x0B + + // +--- a/uvcdesc.h ++++ b/uvcdesc.h +@@ -14,8 +14,6 @@ + #define ___UVCDESC_H___ + + +-// USB Video Device Class Code +-#define USB_DEVICE_CLASS_VIDEO 0x0E + + // Video sub-classes + #define SUBCLASS_UNDEFINED 0x00 diff --git a/mingw-w64-usbview-git/05-connection-statuses.patch b/mingw-w64-usbview-git/05-connection-statuses.patch new file mode 100644 index 0000000000..d64a030217 --- /dev/null +++ b/mingw-w64-usbview-git/05-connection-statuses.patch @@ -0,0 +1,11 @@ +--- a/uvcview.h ++++ b/uvcview.h +@@ -382,7 +382,7 @@ + // ENUM.C + // + +-PCHAR ConnectionStatuses[]; ++extern PCHAR ConnectionStatuses[]; + + // + // DISPVID.C diff --git a/mingw-w64-usbview-git/PKGBUILD b/mingw-w64-usbview-git/PKGBUILD new file mode 100644 index 0000000000..e0f4524c99 --- /dev/null +++ b/mingw-w64-usbview-git/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer: David Grayson + +_realname=usbview +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +provides="${MINGW_PACKAGE_PREFIX}-${_realname}" +conflicts="${MINGW_PACKAGE_PREFIX}-${_realname}" +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=39.5b815f8 +pkgrel=1 +pkgdesc='GUI for browsing all USB controllers and connected USB devices on your computer (mingw-w64)' +arch=('any') +url='' +license=('custom') +makedepends=( + "${MINGW_PACKAGE_PREFIX}-gcc" + 'patch' +) +depends=() +options=('strip') +source=( + "wds::git+https://github.com/Microsoft/Windows-driver-samples" + 'my_xmlhelper.c' + '01-uvcview-includes.patch' + '03-resource-fix.patch' + '04-redefinition.patch' + '05-connection-statuses.patch' +) + +sha256sums=('SKIP' + 'c753691eea14e4cd267cc9a8e1afbf97648e9fda57cf68011384e4a5b1421c2e' + '36173cc353ca4901c23f971980a1ff59c007b952dd602d4faa5a34c7d7fc3518' + '2be3167e95f8d5d8abf91e43a49fac4593b8264df5c20478f476bdbe1bae89a3' + '017bcb16508f6496e227dce96bd547ed1be20f2712742a05bafd4460924d3aad' + 'edcbf4392677934b21234e57a0094ce46f34053b51509719b186a18d7bdddc8e') + +pkgver() { + cd "${srcdir}/wds" + printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/wds/usb/usbview" + + # strsafe.h must be after tchar.h in mingw-w64. + # sal.h and usbspec.h are needed. + patch -p1 -i "${srcdir}/01-uvcview-includes.patch" + + # We exclude the XML stuff because it requires Visual C++ (.NET). + rm usbschema.hpp xmlhelper.cpp + cp "${srcdir}/my_xmlhelper.c" . + + # Fix some syntax errors that windres complains about + patch -p1 -i "${srcdir}/03-resource-fix.patch" + + # Fix warnings about macro redefinitions. + patch -p1 -i "${srcdir}/04-redefinition.patch" + + # Fix bad definition of array without a length. + patch -p1 -i "${srcdir}/05-connection-statuses.patch" +} + +build() { + cd "${srcdir}" + mkdir -p "build-${MINGW_CHOST}/include" + cd "build-${MINGW_CHOST}" + + # Make sure mingw-w64's usb.h takes precedence over libusb-compat's. + cp ${MINGW_PREFIX}/${MINGW_CHOST}/include/usb.h include + + windres ../wds/usb/usbview/uvcview.rc rc.so + + gcc -mwindows --std=c99 ${CFLAGS} ${LDFLAGS} \ + -Iinclude \ + -DNTDDI_VERSION=0x06020000 -D_WIN32_WINNT=0x0602 \ + -DSTRSAFE_NO_DEPRECATE \ + ../wds/usb/usbview/*.c rc.so \ + -lcomctl32 -lcomdlg32 -lsetupapi -lshell32 -lshlwapi -lole32 -lgdi32 \ + -o usbview.exe +} + +package() { + cd "${srcdir}/wds" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" + cd "${srcdir}/build-${MINGW_CHOST}" + mkdir "${pkgdir}${MINGW_PREFIX}/bin" + install -Dm755 usbview.exe "${pkgdir}${MINGW_PREFIX}/bin" +} diff --git a/mingw-w64-usbview-git/my_xmlhelper.c b/mingw-w64-usbview-git/my_xmlhelper.c new file mode 100644 index 0000000000..0cdf29140b --- /dev/null +++ b/mingw-w64-usbview-git/my_xmlhelper.c @@ -0,0 +1,47 @@ +#include "xmlhelper.h" + +EXTERN_C HRESULT InitXmlHelper() +{ + return 0; +} + +EXTERN_C HRESULT ReleaseXmlWriter() +{ + return 0; +} + +EXTERN_C HRESULT SaveXml(LPTSTR szfileName, DWORD dwCreationDisposition) +{ + MessageBox(NULL, + "Sorry, XML saving is not supported in this build.", + "XML not supported", + MB_OK | MB_ICONEXCLAMATION); + return 0; +} + +EXTERN_C HRESULT XmlAddHostController( + PSTR hcName, + PUSBHOSTCONTROLLERINFO hcInfo + ) +{ + return 0; +} + +EXTERN_C HRESULT XmlAddRootHub(PSTR rhName, PUSBROOTHUBINFO rhInfo) +{ + return 0; +} + +EXTERN_C HRESULT XmlAddExternalHub(PSTR ehName, PUSBEXTERNALHUBINFO ehInfo) +{ + return 0; +} + +EXTERN_C HRESULT XmlAddUsbDevice(PSTR devName, PUSBDEVICEINFO deviceInfo) +{ + return 0; +} + +EXTERN_C VOID XmlNotifyEndOfNodeList(PVOID pContext) +{ +} diff --git a/mingw-w64-v8/0005-Use-gnuish-ccflags-for-gcc-on-Windows.patch b/mingw-w64-v8/0005-Use-gnuish-ccflags-for-gcc-on-Windows.patch new file mode 100644 index 0000000000..a32f639fe6 --- /dev/null +++ b/mingw-w64-v8/0005-Use-gnuish-ccflags-for-gcc-on-Windows.patch @@ -0,0 +1,12 @@ +--- v8-git-mirror-4.2.47/build/standalone.gypi.orig 2015-02-03 03:26:35.000000000 +0000 ++++ v8-git-mirror-4.2.47/build/standalone.gypi 2015-02-13 11:40:44.605828900 +0000 +@@ -364,6 +364,9 @@ + '_HAS_EXCEPTIONS=0', + ], + }], ++ ['gcc_version!="unknown"', { ++ 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-std=gnu++0x' ], ++ }], + ], + 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], + 'msvs_disabled_warnings': [4355, 4800], diff --git a/mingw-w64-v8/0006-localtime_s-is-not-needed-for-mingw-w64.patch b/mingw-w64-v8/0006-localtime_s-is-not-needed-for-mingw-w64.patch new file mode 100644 index 0000000000..f0c7972e52 --- /dev/null +++ b/mingw-w64-v8/0006-localtime_s-is-not-needed-for-mingw-w64.patch @@ -0,0 +1,20 @@ +--- v8-git-mirror-4.2.47/src/base/platform/platform-win32.cc.orig 2015-02-13 12:32:02.012827200 +0000 ++++ v8-git-mirror-4.2.47/src/base/platform/platform-win32.cc 2015-02-13 12:33:09.326827200 +0000 +@@ -42,9 +42,6 @@ + __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier)); + } + +-#endif // __MINGW64_VERSION_MAJOR +- +- + int localtime_s(tm* out_tm, const time_t* time) { + tm* posix_local_time_struct = localtime(time); + if (posix_local_time_struct == NULL) return 1; +@@ -52,6 +49,7 @@ + return 0; + } + ++#endif // __MINGW64_VERSION_MAJOR + + int fopen_s(FILE** pFile, const char* filename, const char* mode) { + *pFile = fopen(filename, mode); diff --git a/mingw-w64-v8/PKGBUILD b/mingw-w64-v8/PKGBUILD index ff2cda8532..0513998b60 100644 --- a/mingw-w64-v8/PKGBUILD +++ b/mingw-w64-v8/PKGBUILD @@ -2,9 +2,9 @@ # Maintainer: Ray Donnelly _realname=v8 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.27.34.6 +#pkgver=3.27.34.6 +pkgver=4.2.47 pkgrel=1 pkgdesc="Fast and modern Javascript engine (mingw-w64)" arch=('any') @@ -13,29 +13,35 @@ license=("BSD") makedepends=("gyp-svn") depends=("${MINGW_PACKAGE_PREFIX}-readline" "${MINGW_PACKAGE_PREFIX}-icu") -options=('!emptydirs !strip') -source=("https://github.com/v8/v8/archive/${pkgver}.tar.gz" +options=('!emptydirs' '!strip') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/v8/v8-git-mirror/archive/${pkgver}.tar.gz" "0000-Disable-USING_V8_SHARED-for-v8_snapshot-static-lib.patch" "0001-Include-win32-headers-h-before-undef-MemoryBarrier.patch" "0002-OS-TotalPhysicalMemory-needed-for-MinGW-w64-too.patch" "0003-Use-soname_version.dll-not-so.soname_version-on-Windows.patch" "0004-Create-an-import-library-on-Windows.patch" + "0005-Use-gnuish-ccflags-for-gcc-on-Windows.patch" + "0006-localtime_s-is-not-needed-for-mingw-w64.patch" "v8.pc") -md5sums=('2e9069c38a985150e6d4d7af2f38689d' +md5sums=('0e0924cfdda62964217101279a831b42' 'd13060d09d6a8cbf3da5d0ec773f8e57' 'f341d18574cc16df53287fe9cccdf75b' '26a61fe54cee6bd135d9b8633d4413d2' 'cc9c6d019cc3ac025d2ec76507a68ba1' '4e444573e7cfba10b12e56a02c6503ff' + 'f447bd43d7bb79f7a6b0fcf5dfdb24e1' + '8ff44dfc33ebefe3f328a42e0e2c2030' '02a39154c246e03d8f8e745454c1619c') prepare() { - cd ${srcdir}/v8-${pkgver} + cd "${srcdir}"/v8-git-mirror-${pkgver} patch -p1 -i ${srcdir}/0000-Disable-USING_V8_SHARED-for-v8_snapshot-static-lib.patch patch -p1 -i ${srcdir}/0001-Include-win32-headers-h-before-undef-MemoryBarrier.patch - patch -p1 -i ${srcdir}/0002-OS-TotalPhysicalMemory-needed-for-MinGW-w64-too.patch +# patch -p1 -i ${srcdir}/0002-OS-TotalPhysicalMemory-needed-for-MinGW-w64-too.patch patch -p1 -i ${srcdir}/0003-Use-soname_version.dll-not-so.soname_version-on-Windows.patch patch -p1 -i ${srcdir}/0004-Create-an-import-library-on-Windows.patch + patch -p1 -i ${srcdir}/0005-Use-gnuish-ccflags-for-gcc-on-Windows.patch + patch -p1 -i ${srcdir}/0006-localtime_s-is-not-needed-for-mingw-w64.patch msg 'Fixing: python -> python2' #find -type f -exec sed -e 's_^#!/usr/bin/env python$_&2_' -e 's_^\(#!/usr/bin/env python2\).[45]$_\1_' -e 's_^#!/usr/bin/python$_&2_' -e "s_'python'_'python2'_" -i {} \; @@ -64,7 +70,7 @@ build() { _arch=x64 ;; esac - cd "${srcdir}/v8-${pkgver}" + cd "${srcdir}"/v8-git-mirror-${pkgver} GYP_GENERATORS=make \ $PYTHON build/gyp_v8 \ @@ -74,6 +80,7 @@ build() { -Dcomponent=shared_library \ -Dsoname_version=${pkgver} \ -Dv8_target_arch=${_arch} \ + -Dgcc_version=49 \ --generator-output=out \ -f make diff --git a/mingw-w64-vala/001-change-pkg-config-invocations.mingw.patch b/mingw-w64-vala/001-change-pkg-config-invocations.mingw.patch new file mode 100644 index 0000000000..23c4959e07 --- /dev/null +++ b/mingw-w64-vala/001-change-pkg-config-invocations.mingw.patch @@ -0,0 +1,14 @@ +--- vala-0.27.1/vapigen/vapigen.m4.orig 2015-01-14 14:51:42.117600000 +0300 ++++ vala-0.27.1/vapigen/vapigen.m4 2015-01-14 14:52:07.297000000 +0300 +@@ -85,9 +85,9 @@ + VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name` + VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen + AS_IF([test "x$2" = "x"], [ +- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name` ++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --dont-define-prefix --variable=vapidir $vapigen_pkg_name` + ], [ +- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name` ++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --dont-define-prefix --variable=vapidir_versioned $vapigen_pkg_name` + ]) + ]) + diff --git a/mingw-w64-vala/PKGBUILD b/mingw-w64-vala/PKGBUILD index 741036e21e..a8632a5582 100644 --- a/mingw-w64-vala/PKGBUILD +++ b/mingw-w64-vala/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Alexey Pavlov _realname=vala +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.26.1 +pkgver=0.30.0 pkgrel=1 pkgdesc="Compiler for the GObject type system (mingw-w64)" arch=('any') @@ -12,18 +13,21 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-libxslt") depends=("${MINGW_PACKAGE_PREFIX}-glib2") -source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz) -sha256sums=('8407abb19ab3a58bbfc0d288abb47666ef81f76d0540258c03965e7545f59e6b') +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz + 001-change-pkg-config-invocations.mingw.patch) +sha256sums=('61f0337b000f7ed6ef8c1fea87e0047d9bd7c0f91dd9c5b4eb70fd3fb883dedf' + 'c588a3a69097aae30ada1d543001d5029865b1dd1f46132d9e60d12e1833b325') prepare() { cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-change-pkg-config-invocations.mingw.patch autoreconf -ivf } build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -33,8 +37,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install - - mv -f ${pkgdir}${MINGW_PREFIX}/share/pkgconfig/* ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ - rm -rf ${pkgdir}${MINGW_PREFIX}/share/pkgconfig + make -j1 DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-vamp-plugin-sdk/01-mingw-shared.patch b/mingw-w64-vamp-plugin-sdk/01-mingw-shared.patch new file mode 100644 index 0000000000..0777facecd --- /dev/null +++ b/mingw-w64-vamp-plugin-sdk/01-mingw-shared.patch @@ -0,0 +1,88 @@ +--- vamp-plugin-sdk-2.5/Makefile.in.orig 2015-05-23 19:25:00.787000000 +0300 ++++ vamp-plugin-sdk-2.5/Makefile.in 2015-05-23 19:40:27.022800000 +0300 +@@ -53,8 +53,8 @@ + + # File extension for a dynamically loadable object + # +-PLUGIN_EXT = .so +-#PLUGIN_EXT = .dll ++#PLUGIN_EXT = .so ++PLUGIN_EXT = .dll + #PLUGIN_EXT = .dylib + + # Libraries required for the host. +@@ -77,15 +77,13 @@ + INSTALL_PLUGINS = $(INSTALL_PREFIX)/lib/vamp + INSTALL_BINARIES = $(INSTALL_PREFIX)/bin + +-INSTALL_SDK_LIBNAME = libvamp-sdk.so.2.5.0 +-INSTALL_SDK_LINK_ABI = libvamp-sdk.so.2 +-INSTALL_SDK_LINK_DEV = libvamp-sdk.so ++INSTALL_SDK_LIBNAME = libvamp-sdk$(PLUGIN_EXT) ++INSTALL_SDK_LINK_ABI = libvamp-sdk.dll.a + INSTALL_SDK_STATIC = libvamp-sdk.a + INSTALL_SDK_LA = libvamp-sdk.la + +-INSTALL_HOSTSDK_LIBNAME = libvamp-hostsdk.so.3.5.0 +-INSTALL_HOSTSDK_LINK_ABI = libvamp-hostsdk.so.3 +-INSTALL_HOSTSDK_LINK_DEV = libvamp-hostsdk.so ++INSTALL_HOSTSDK_LIBNAME = libvamp-hostsdk$(PLUGIN_EXT) ++INSTALL_HOSTSDK_LINK_ABI = libvamp-hostsdk.dll.a + INSTALL_HOSTSDK_STATIC = libvamp-hostsdk.a + INSTALL_HOSTSDK_LA = libvamp-hostsdk.la + +@@ -94,8 +92,8 @@ + # Flags required to tell the compiler to create a dynamically loadable object + # + DYNAMIC_LDFLAGS = -static-libgcc -shared -Wl,-Bsymbolic +-SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_SDK_LINK_ABI) +-HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_HOSTSDK_LINK_ABI) ++SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--out-implib,$(INSTALL_SDK_LINK_ABI) ++HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--out-implib,$(INSTALL_HOSTSDK_LINK_ABI) + + # Additional flags for making a plugin. This version script tells the + # GNU linker to make all symbols in the library hidden except for the +@@ -278,16 +276,10 @@ + cp $(HOSTSDK_HEADERS) $(DESTDIR)$(INSTALL_HOSTSDK_HEADERS) + cp $(SDK_STATIC) $(DESTDIR)$(INSTALL_SDK_LIBS) + cp $(HOSTSDK_STATIC) $(DESTDIR)$(INSTALL_SDK_LIBS) +- cp $(SDK_DYNAMIC) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LIBNAME) +- cp $(HOSTSDK_DYNAMIC) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LIBNAME) +- rm -f $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI) +- ln -s $(INSTALL_SDK_LIBNAME) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI) +- rm -f $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_ABI) +- ln -s $(INSTALL_HOSTSDK_LIBNAME) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_ABI) +- rm -f $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV) +- ln -s $(INSTALL_SDK_LIBNAME) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV) +- rm -f $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_DEV) +- ln -s $(INSTALL_HOSTSDK_LIBNAME) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_DEV) ++ cp $(SDK_DYNAMIC) $(DESTDIR)$(INSTALL_BINARIES) ++ cp $(HOSTSDK_DYNAMIC) $(DESTDIR)$(INSTALL_BINARIES) ++ cp $(INSTALL_SDK_LINK_ABI) $(DESTDIR)$(INSTALL_SDK_LIBS) ++ cp $(INSTALL_HOSTSDK_LINK_ABI) $(DESTDIR)$(INSTALL_SDK_LIBS) + sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(PCDIR)/vamp.pc.in \ + > $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp.pc + sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(PCDIR)/vamp-sdk.pc.in \ +@@ -296,13 +288,11 @@ + > $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp-hostsdk.pc + sed -e "s,%LIBNAME%,$(INSTALL_SDK_LIBNAME),g" \ + -e "s,%LINK_ABI%,$(INSTALL_SDK_LINK_ABI),g" \ +- -e "s,%LINK_DEV%,$(INSTALL_SDK_LINK_DEV),g" \ + -e "s,%STATIC%,$(INSTALL_SDK_STATIC),g" \ + -e "s,%LIBS%,$(INSTALL_SDK_LIBS),g" $(SDK_LA).in \ + > $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LA) + sed -e "s,%LIBNAME%,$(INSTALL_HOSTSDK_LIBNAME),g" \ + -e "s,%LINK_ABI%,$(INSTALL_HOSTSDK_LINK_ABI),g" \ +- -e "s,%LINK_DEV%,$(INSTALL_HOSTSDK_LINK_DEV),g" \ + -e "s,%STATIC%,$(INSTALL_HOSTSDK_STATIC),g" \ + -e "s,%LIBS%,$(INSTALL_SDK_LIBS),g" $(HOSTSDK_LA).in \ + > $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LA) +--- vamp-plugin-sdk-2.5/pkgconfig/vamp-hostsdk.pc.in.orig 2015-05-23 19:42:28.313200000 +0300 ++++ vamp-plugin-sdk-2.5/pkgconfig/vamp-hostsdk.pc.in 2015-05-23 19:42:31.714000000 +0300 +@@ -6,5 +6,5 @@ + Name: vamp-hostsdk + Version: 2.5 + Description: Development library for Vamp audio analysis plugin hosts +-Libs: -L${libdir} -lvamp-hostsdk -ldl ++Libs: -L${libdir} -lvamp-hostsdk + Cflags: -I${includedir} diff --git a/mingw-w64-vamp-plugin-sdk/PKGBUILD b/mingw-w64-vamp-plugin-sdk/PKGBUILD new file mode 100644 index 0000000000..7f2ec705f4 --- /dev/null +++ b/mingw-w64-vamp-plugin-sdk/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Jeff Hubbard + +_realname=vamp-plugin-sdk +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=2.5 +pkgrel=2 +pkgdesc="Vamp plugins extract descriptive information from audio data (mingw-w64)" +arch=('any') +url="http://www.vamp-plugins.org/" +license=("BSD") +options=('!buildflags') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libsndfile") +source=("http://code.soundsoftware.ac.uk/attachments/download/690/vamp-plugin-sdk-${pkgver}.tar.gz" + 01-mingw-shared.patch) +md5sums=('199872997f74951f6769b982bf0d0646' + '286ace365aff641d248fe2a0fa85d811') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + patch -p1 -i ${srcdir}/01-mingw-shared.patch +} + +build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + cp -rf "${_realname}-${pkgver}" "build-${MINGW_CHOST}" + cd build-${MINGW_CHOST} + + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-vcdimager/PKGBUILD b/mingw-w64-vcdimager/PKGBUILD index 177975eb6f..d81f538360 100644 --- a/mingw-w64-vcdimager/PKGBUILD +++ b/mingw-w64-vcdimager/PKGBUILD @@ -3,7 +3,7 @@ _realname=vcdimager pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.7.24 -pkgrel=1 +pkgrel=2 pkgdesc="A full-featured mastering suite for authoring disassembling and analyzing Video CD's and Super Video CD's (mingw-w64)" arch=("any") url="http://www.vcdimager.org/" @@ -25,23 +25,25 @@ prepare() { patch -p1 -i "$srcdir/001-vcdimager-0.7.24-libcdio-0.83.patch" patch -p1 -i "$srcdir/002-no-undefined.patch" patch -p1 -i "$srcdir/003-static-vcd-lib.patch" - + autoreconf -fvi } build() { - cd ${_realname}-${pkgver} - ./configure \ + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --enable-static \ --enable-shared + make } package() { - cd ${_realname}-${pkgver} + cd build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-virt-viewer-git/PKGBUILD b/mingw-w64-virt-viewer-git/PKGBUILD new file mode 100644 index 0000000000..5e4a7c741b --- /dev/null +++ b/mingw-w64-virt-viewer-git/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Andrea Zagli + +_realname=virt-viewer +_base_ver=2.0.0 +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=2.0.0.934.824c4b9 +pkgrel=1 +arch=('any') +pkgdesc="Displaying the graphical console of a virtual machine (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-spice-gtk" + "${MINGW_PACKAGE_PREFIX}-gtk-vnc" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-opus") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-gtk-doc" + "${MINGW_PACKAGE_PREFIX}-icoutils" + "git") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="https://fedorapeople.org/" +source=("${_realname}"::"git+git://fedorapeople.org/home/fedora/fidencio/public_git/${_realname}.git") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$_realname" + printf "%s.%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd $srcdir/${_realname} +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}/autogen.sh \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --with-spice-gtk \ + --with-gtk=3.0 + + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install +} diff --git a/mingw-w64-vlc-git/0001-Use-libdir-for-plugins-on-msys2.patch b/mingw-w64-vlc-git/0001-Use-libdir-for-plugins-on-msys2.patch new file mode 100644 index 0000000000..016ce080b8 --- /dev/null +++ b/mingw-w64-vlc-git/0001-Use-libdir-for-plugins-on-msys2.patch @@ -0,0 +1,33 @@ +From ee483345ea9e4dd8bc9bf2859123c70b73e07005 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Tue, 25 Nov 2014 21:20:09 +0000 +Subject: [PATCH] Use libdir for plugins on msys2 + +--- + src/win32/dirs.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/win32/dirs.c b/src/win32/dirs.c +index 0ec1087..1d74501 100644 +--- a/src/win32/dirs.c ++++ b/src/win32/dirs.c +@@ -63,7 +63,15 @@ char *config_GetLibDir (void) + goto error; + *file = L'\0'; + +- return FromWide (wpath); ++ file = wcsrchr (wpath, L'\\'); ++ if (file == NULL) ++ goto error; ++ *file = L'\0'; ++ ++ wchar_t wpathlib[MAX_PATH]; ++ wsprintf(wpathlib,L"%s\\lib\\vlc", wpath); ++ ++ return FromWide (wpathlib); + error: + abort (); + #endif +-- +2.1.3 + diff --git a/mingw-w64-vlc-git/0001-fix-redeclare.patch b/mingw-w64-vlc-git/0001-fix-redeclare.patch deleted file mode 100644 index 7516b0af7a..0000000000 --- a/mingw-w64-vlc-git/0001-fix-redeclare.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- vlc/modules/codec/mft.c.orig 2014-09-25 16:26:05.454200000 +0500 -+++ vlc/modules/codec/mft.c 2014-09-25 16:43:53.934800000 +0500 -@@ -172,7 +172,9 @@ - { 0, NULL } - }; - -+#ifndef __MINGW64_VERSION_MAJOR - DEFINE_GUID(MFAudioFormat_Dolby_AC3, 0xe06d802c, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea); -+#endif - /* - * We cannot use the FOURCC code for audio either since the - * WAVE_FORMAT value is used to create the GUID. diff --git a/mingw-w64-vlc-git/0002-MinGW-w64-lfind-s-_NumOfElements-is-an-unsigned-int.patch b/mingw-w64-vlc-git/0002-MinGW-w64-lfind-s-_NumOfElements-is-an-unsigned-int.patch new file mode 100644 index 0000000000..e443eed9cb --- /dev/null +++ b/mingw-w64-vlc-git/0002-MinGW-w64-lfind-s-_NumOfElements-is-an-unsigned-int.patch @@ -0,0 +1,30 @@ +From 7f418509106b416366f7d549ee3035c9b905acca Mon Sep 17 00:00:00 2001 +From: martell +Date: Sat, 22 Nov 2014 22:15:33 +0000 +Subject: [PATCH 2/6] MinGW-w64: lfind's _NumOfElements is an unsigned int + +--- + modules/access/dtv/access.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c +index 95b1dd7..915a4e4 100644 +--- a/modules/access/dtv/access.c ++++ b/modules/access/dtv/access.c +@@ -728,7 +728,12 @@ static const char *var_InheritModulation (vlc_object_t *obj, const char *var) + if (mod == NULL) + return ""; + +- size_t n = sizeof (modulation_vlc) / sizeof (modulation_vlc[0]); ++#ifdef __MINGW32__ ++ unsigned int n; ++#else ++ size_t_n; ++#endif ++ n = sizeof (modulation_vlc) / sizeof (modulation_vlc[0]); + const char *const *p = lfind (mod, modulation_vlc, &n, sizeof (mod), modcmp); + if (p != NULL) + { +-- +2.1.3 + diff --git a/mingw-w64-vlc-git/0002-msvcrt-lfind.patch b/mingw-w64-vlc-git/0002-msvcrt-lfind.patch deleted file mode 100644 index 90e1bbb89b..0000000000 --- a/mingw-w64-vlc-git/0002-msvcrt-lfind.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- vlc/modules/access/dtv/access.c 2014-10-15 18:15:34.494531200 +0100 -+++ vlc/modules/access/dtv/access.c 2014-10-15 18:24:55.339493900 +0100 -@@ -727,8 +727,13 @@ - char *mod = var_InheritString (obj, var); - if (mod == NULL) - return ""; -- -- size_t n = sizeof (modulation_vlc) / sizeof (modulation_vlc[0]); -+ -+#ifdef __MINGW32__ -+ unsigned int n; -+#else -+ size_t_n; -+#endif -+ n = sizeof (modulation_vlc) / sizeof (modulation_vlc[0]); - const char *const *p = lfind (mod, modulation_vlc, &n, sizeof (mod), modcmp); - if (p != NULL) - { diff --git a/mingw-w64-vlc-git/0003-MinGW-w64-don-t-pass-static-to-pkg-config-if-SYS-min.patch b/mingw-w64-vlc-git/0003-MinGW-w64-don-t-pass-static-to-pkg-config-if-SYS-min.patch new file mode 100644 index 0000000000..acf5441cd6 --- /dev/null +++ b/mingw-w64-vlc-git/0003-MinGW-w64-don-t-pass-static-to-pkg-config-if-SYS-min.patch @@ -0,0 +1,26 @@ +From 8e9e0aabdb6008188d77f40871b338c277248c67 Mon Sep 17 00:00:00 2001 +From: martell +Date: Sat, 22 Nov 2014 22:15:35 +0000 +Subject: [PATCH 3/6] MinGW-w64: don't pass --static to pkg-config if SYS = + mingw32 + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b8ccc8a..d576265 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -802,7 +802,7 @@ PKG_PROG_PKG_CONFIG() + + dnl On some OS we need static linking + AS_IF([test -n "${PKG_CONFIG}" ],[ +- AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[ ++ AS_IF([test "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[ + PKG_CONFIG="${PKG_CONFIG} --static" + ]) + ]) +-- +2.1.3 + diff --git a/mingw-w64-vlc-git/0003-fix-prog-find-2.2.patch b/mingw-w64-vlc-git/0003-fix-prog-find-2.2.patch deleted file mode 100644 index 2182d0a967..0000000000 --- a/mingw-w64-vlc-git/0003-fix-prog-find-2.2.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- vlc/configure.ac 2014-10-15 17:37:29.940938700 +0100 -+++ vlc/configure.ac 2014-10-15 17:40:44.490919400 +0100 -@@ -3716,9 +3716,9 @@ - ]) - QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)" - QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)" -- AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin]) -- AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin]) -- AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin]) -+ AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) -+ AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) -+ AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) - ], [ - PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [ - AS_IF([test -n "${enable_qt}"],[ -@@ -3729,9 +3729,9 @@ - enable_qt="no" - ]) - QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)" -- AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) -+ AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) - AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) -- AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) -+ AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) - ]) - ]) - AS_IF([test "${enable_qt}" != "no"], [ diff --git a/mingw-w64-vlc-git/0011-prefer-static-libs.patch b/mingw-w64-vlc-git/0004-Revert-Win32-prefer-the-static-libraries-when-creati.patch similarity index 53% rename from mingw-w64-vlc-git/0011-prefer-static-libs.patch rename to mingw-w64-vlc-git/0004-Revert-Win32-prefer-the-static-libraries-when-creati.patch index ce419254b8..e4db2c493b 100644 --- a/mingw-w64-vlc-git/0011-prefer-static-libs.patch +++ b/mingw-w64-vlc-git/0004-Revert-Win32-prefer-the-static-libraries-when-creati.patch @@ -1,57 +1,58 @@ -From 417b6eb0f09dc73984a7dba2aa42c9d8683d5294 Mon Sep 17 00:00:00 2001 -From: Jean-Baptiste Kempf -Date: Sat, 11 Oct 2014 17:53:45 +0200 -Subject: [PATCH] Win32: prefer the static libraries when creating the dlls +From 77590c2990e91ff7abddb73ad058e10bdce69d09 Mon Sep 17 00:00:00 2001 +From: martell +Date: Sat, 22 Nov 2014 22:15:37 +0000 +Subject: [PATCH 5/6] Revert "Win32: prefer the static libraries when creating + the dlls" -This should avoid the issues of packaging libgcc_s_sjlj-1.dll, -libwinpthread-1.dll and the like. +This reverts commit 417b6eb0f09dc73984a7dba2aa42c9d8683d5294. --- - lib/Makefile.am | 3 ++- - modules/common.am | 3 ++- - src/Makefile.am | 3 ++- - 3 files changed, 6 insertions(+), 3 deletions(-) + lib/Makefile.am | 3 +-- + modules/common.am | 3 +-- + src/Makefile.am | 3 +-- + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am -index c53fe08..be1b6be 100644 +index be1b6be..c53fe08 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am -@@ -64,7 +64,8 @@ libvlc_la_LDFLAGS = \ +@@ -64,8 +64,7 @@ libvlc_la_LDFLAGS = \ libvlc_la_DEPENDENCIES = libvlc.sym if HAVE_WIN32 libvlc_la_DEPENDENCIES += ../src/libvlc_win32_rc.$(OBJEXT) --libvlc_la_LDFLAGS += -Wl,../src/libvlc_win32_rc.$(OBJEXT) -avoid-version -+libvlc_la_LDFLAGS += -Wl,../src/libvlc_win32_rc.$(OBJEXT) -avoid-version \ -+ -Wc,--static -Wc,-static-libgcc +-libvlc_la_LDFLAGS += -Wl,../src/libvlc_win32_rc.$(OBJEXT) -avoid-version \ +- -Wc,--static -Wc,-static-libgcc ++libvlc_la_LDFLAGS += -Wl,../src/libvlc_win32_rc.$(OBJEXT) -avoid-version endif if HAVE_OS2 libvlc_la_LDFLAGS += -avoid-version diff --git a/modules/common.am b/modules/common.am -index 9bb5143..c3b3f8e 100644 +index c3b3f8e..9bb5143 100644 --- a/modules/common.am +++ b/modules/common.am -@@ -33,7 +33,8 @@ AM_LDFLAGS = \ +@@ -33,8 +33,7 @@ AM_LDFLAGS = \ -no-undefined \ $(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE) if HAVE_WIN32 --AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo -+AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo \ -+ -Wc,--static -Wc,-static-libgcc +-AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo \ +- -Wc,--static -Wc,-static-libgcc ++AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo endif SUFFIXES = .asm diff --git a/src/Makefile.am b/src/Makefile.am -index 1e113c9..4472271 100644 +index e200669..9d724c9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -190,7 +190,8 @@ libvlccore_la_LIBADD = $(LIBS_libvlccore) \ +@@ -190,8 +190,7 @@ libvlccore_la_LIBADD = $(LIBS_libvlccore) \ libvlccore_la_DEPENDENCIES = libvlccore.sym if HAVE_WIN32 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT) --libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -+libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version \ -+ -Wc,--static -Wc,-static-libgcc +-libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version \ +- -Wc,--static -Wc,-static-libgcc ++libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version endif if HAVE_OS2 libvlccore_la_LDFLAGS += -avoid-version -- -1.7.10.4 +2.1.3 + diff --git a/mingw-w64-vlc-git/0004-skip-pthread-time-declares.patch b/mingw-w64-vlc-git/0004-skip-pthread-time-declares.patch deleted file mode 100644 index 4ea44a5180..0000000000 --- a/mingw-w64-vlc-git/0004-skip-pthread-time-declares.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- vlc/modules/gui/qt4/Makefile.am 2014-10-16 20:03:35.772278000 +0100 -+++ vlc/modules/gui/qt4/Makefile.am 2014-10-16 20:04:00.121609700 +0100 -@@ -20,7 +20,7 @@ libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' - if HAVE_OS2 - else - if HAVE_WIN32 --libqt4_plugin_la_LIBADD += -lole32 -+libqt4_plugin_la_LIBADD += -lole32 -lcomctl32 -luuid - else - libqt4_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11 - endif ---- vlc/modules/gui/qt4/qt4.cpp 2014-10-17 03:50:18.069299400 +0100 -+++ vlc/modules/gui/qt4/qt4.cpp 2014-10-17 03:48:50.365549900 +0100 -@@ -52,8 +52,10 @@ - #ifdef _WIN32 /* For static builds */ - #include - #if HAS_QT5 -- Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) -- Q_IMPORT_PLUGIN(AccessibleFactory) -+ #ifdef QT_STATICPLUGIN -+ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) -+ Q_IMPORT_PLUGIN(AccessibleFactory) -+ #endif - #else - Q_IMPORT_PLUGIN(qjpeg) - Q_IMPORT_PLUGIN(qtaccessiblewidgets) -#@@ -13,7 +13,7 @@ -# # - Add it to DEPS_res -# -# SUFFIXES += .ui .h .hpp .moc.cpp -#- -#+QT_CFLAGS += -DNO_TIME_PLZ -DQT_STATICPLUGIN -# libqt4_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt4) -# libqt4_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt4) -# libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' -# diff --git a/mingw-w64-vlc-git/0005-disablestatic.patch b/mingw-w64-vlc-git/0005-disablestatic.patch deleted file mode 100644 index 180754393a..0000000000 --- a/mingw-w64-vlc-git/0005-disablestatic.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vlc/configure.ac 2014-10-16 20:59:47.263961300 +0100 -+++ vlc/configure.ac 2014-10-16 21:00:06.283393300 +0100 -@@ -786,7 +786,7 @@ - - dnl On some OS we need static linking - AS_IF([test -n "${PKG_CONFIG}" ],[ -- AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[ -+ AS_IF([test "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[ - PKG_CONFIG="${PKG_CONFIG} --static" - ]) - ]) diff --git a/mingw-w64-vlc-git/0006-fix-time-mingw-include.patch b/mingw-w64-vlc-git/0006-fix-time-mingw-include.patch deleted file mode 100644 index 0726af889e..0000000000 --- a/mingw-w64-vlc-git/0006-fix-time-mingw-include.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h -index c3d5fac..390cbcd 100644 ---- a/include/vlc_fixups.h -+++ b/include/vlc_fixups.h -@@ -26,7 +26,7 @@ - #ifndef LIBVLC_FIXUPS_H - # define LIBVLC_FIXUPS_H 1 - --#if !defined (HAVE_GMTIME_R) || !defined (HAVE_LOCALTIME_R) -+#if !defined (HAVE_GMTIME_R) || !defined (HAVE_LOCALTIME_R) || defined (__MINGW32__) - # include /* time_t */ - #endif - diff --git a/mingw-w64-vlc-git/0010-fix_REENTRANT-2.2.patch b/mingw-w64-vlc-git/0010-fix_REENTRANT-2.2.patch deleted file mode 100644 index 9cfc978de3..0000000000 --- a/mingw-w64-vlc-git/0010-fix_REENTRANT-2.2.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8dcec7992236b8d2528ab088554766058d71505c Mon Sep 17 00:00:00 2001 -From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= -Date: Wed, 23 Jul 2014 19:27:01 +0300 -Subject: [PATCH] configure: do not redefine _REENTRANT - -This fixes warnings with PulseAudio and with MingW. ---- - configure.ac | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index de07e28..b847f57 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -56,7 +56,11 @@ AC_PROG_CC_C99 - AC_USE_SYSTEM_EXTENSIONS - AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.]) - AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.]) --AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.]) -+AH_TOP([ -+#ifndef _REENTRANT -+# define _REENTRANT -+#endif -+]) - AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.]) - AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.]) - AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of .]) --- -1.7.10.4 - diff --git a/mingw-w64-vlc-git/0011-Add-include-on-WINSTORE-for-QueueTimer-functions.patch b/mingw-w64-vlc-git/0011-Add-include-on-WINSTORE-for-QueueTimer-functions.patch new file mode 100644 index 0000000000..e529257eb1 --- /dev/null +++ b/mingw-w64-vlc-git/0011-Add-include-on-WINSTORE-for-QueueTimer-functions.patch @@ -0,0 +1,24 @@ +From e956727cf7fbe8fdd164a92cdc582cc839a2ec7d Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Thu, 5 Mar 2015 01:01:53 +0000 +Subject: [PATCH] Add include on WINSTORE for QueueTimer functions + + +diff --git a/src/win32/thread.c b/src/win32/thread.c +index 2f94fab..0f62610 100644 +--- a/src/win32/thread.c ++++ b/src/win32/thread.c +@@ -46,6 +46,10 @@ static vlc_cond_t super_variable; + + /*** Common helpers ***/ + #if VLC_WINSTORE_APP ++#include ++#ifndef TLS_OUT_OF_INDEXES ++#define TLS_OUT_OF_INDEXES (~0u) ++#endif + static bool isCancelled(void); + #endif + +-- +2.3.1 + diff --git a/mingw-w64-vlc-git/0012-Only-build-correct-modules-for-WINSTORE.patch b/mingw-w64-vlc-git/0012-Only-build-correct-modules-for-WINSTORE.patch new file mode 100644 index 0000000000..82c1480efc --- /dev/null +++ b/mingw-w64-vlc-git/0012-Only-build-correct-modules-for-WINSTORE.patch @@ -0,0 +1,366 @@ +From 79025b6c3eb3c75426fb5fa2519061c89f37abca Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Mon, 18 May 2015 17:31:15 +0100 +Subject: [PATCH] Only build correct modules for WINSTORE + +--- +Must look at libdirectsound and libmft. +They should be buildable but are not +Must find out why :) + +diff --git a/Makefile.am b/Makefile.am +index 3c7831a..3448956 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -982,6 +982,7 @@ dist_noinst_SCRIPTS += test/run_vlc.sh + # Installing plugins cache + ############################################################################### + install-exec-hook: ++if !HAVE_WINSTORE + if test "$(build)" = "$(host)"; then \ + PATH="$(DESTDIR)$(bindir):$$PATH" \ + LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \ +@@ -990,7 +991,7 @@ install-exec-hook: + else \ + echo "Cross-compilation: cache generation skipped!" ; \ + fi +- ++endif + uninstall-hook: + rm -f -- "$(DESTDIR)$(vlclibdir)/plugins/plugins.dat" + +diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am +index 5ded5f5..5290525 100644 +--- a/modules/access/Makefile.am ++++ b/modules/access/Makefile.am +@@ -267,8 +267,10 @@ if HAVE_DARWIN + libcdda_plugin_la_LIBADD += -liconv + libcdda_plugin_la_LDFLAGS += -Wl,-framework,IOKit,-framework,CoreFoundation + endif ++if !HAVE_WINSTORE + EXTRA_LTLIBRARIES += libcdda_plugin.la + access_LTLIBRARIES += $(LTLIBcdda) ++endif + + libvcd_plugin_la_SOURCES = access/vcd/vcd.c access/vcd/cdrom.c access/vcd/cdrom.h access/vcd/cdrom_internals.h + libvcd_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' +@@ -276,8 +278,10 @@ if HAVE_DARWIN + libvcd_plugin_la_LIBADD = -liconv + libvcd_plugin_la_LDFLAGS += -Wl,-framework,IOKit,-framework,CoreFoundation + endif ++if !HAVE_WINSTORE + EXTRA_LTLIBRARIES += libvcd_plugin.la + access_LTLIBRARIES += $(LTLIBvcd) ++endif + + libvcdx_plugin_la_SOURCES = \ + access/vcdx/access.h access/vcdx/access.c \ +@@ -422,8 +426,10 @@ if HAVE_WIN32 + libsmb_plugin_la_LIBADD += -lmpr + endif + libsmb_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' ++if !HAVE_WINSTORE + access_LTLIBRARIES += $(LTLIBsmb) + EXTRA_LTLIBRARIES += libsmb_plugin.la ++endif + + libdsm_plugin_la_SOURCES = access/dsm/access.c access/dsm/sd.c + libdsm_plugin_la_CFLAGS = $(AM_CFLAGS) $(DSM_CFLAGS) +diff --git a/modules/audio_filter/Makefile.am b/modules/audio_filter/Makefile.am +index c7b866e..fa6972e 100644 +--- a/modules/audio_filter/Makefile.am ++++ b/modules/audio_filter/Makefile.am +@@ -1,22 +1,45 @@ + audio_filterdir = $(pluginsdir)/audio_filter ++audio_filter_LTLIBRARIES = + + libaudiobargraph_a_plugin_la_SOURCES = audio_filter/audiobargraph_a.c + libaudiobargraph_a_plugin_la_LIBADD = $(LIBM) ++if !HAVE_WINSTORE ++audio_filter_LTLIBRARIES += libaudiobargraph_a_plugin.la ++endif ++ + libchorus_flanger_plugin_la_SOURCES = audio_filter/chorus_flanger.c + libchorus_flanger_plugin_la_LIBADD = $(LIBM) ++audio_filter_LTLIBRARIES += libchorus_flanger_plugin.la ++ + libcompressor_plugin_la_SOURCES = audio_filter/compressor.c + libcompressor_plugin_la_LIBADD = $(LIBM) ++audio_filter_LTLIBRARIES += libcompressor_plugin.la ++ + libequalizer_plugin_la_SOURCES = audio_filter/equalizer.c \ + audio_filter/equalizer_presets.h + libequalizer_plugin_la_LIBADD = $(LIBM) ++audio_filter_LTLIBRARIES += libequalizer_plugin.la ++ + libkaraoke_plugin_la_SOURCES = audio_filter/karaoke.c ++audio_filter_LTLIBRARIES += libkaraoke_plugin.la ++ + libnormvol_plugin_la_SOURCES = audio_filter/normvol.c + libnormvol_plugin_la_LIBADD = $(LIBM) ++audio_filter_LTLIBRARIES += libnormvol_plugin.la ++ + libgain_plugin_la_SOURCES = audio_filter/gain.c ++audio_filter_LTLIBRARIES += libgain_plugin.la ++ + libparam_eq_plugin_la_SOURCES = audio_filter/param_eq.c + libparam_eq_plugin_la_LIBADD = $(LIBM) ++audio_filter_LTLIBRARIES += libparam_eq_plugin.la ++ + libscaletempo_plugin_la_SOURCES = audio_filter/scaletempo.c ++audio_filter_LTLIBRARIES += libscaletempo_plugin.la ++ + libstereo_widen_plugin_la_SOURCES = audio_filter/stereo_widen.c ++audio_filter_LTLIBRARIES += libstereo_widen_plugin.la ++ + libspatializer_plugin_la_SOURCES = \ + audio_filter/spatializer/allpass.cpp \ + audio_filter/spatializer/allpass.hpp \ +@@ -29,19 +52,8 @@ libspatializer_plugin_la_SOURCES = \ + audio_filter/spatializer/revmodel.hpp \ + audio_filter/spatializer/spatializer.cpp + libspatializer_plugin_la_LIBADD = $(LIBM) ++audio_filter_LTLIBRARIES += libspatializer_plugin.la + +-audio_filter_LTLIBRARIES = \ +- libaudiobargraph_a_plugin.la \ +- libchorus_flanger_plugin.la \ +- libcompressor_plugin.la \ +- libequalizer_plugin.la \ +- libkaraoke_plugin.la \ +- libnormvol_plugin.la \ +- libgain_plugin.la \ +- libparam_eq_plugin.la \ +- libscaletempo_plugin.la \ +- libspatializer_plugin.la \ +- libstereo_widen_plugin.la + + # Channel mixers + libdolby_surround_decoder_plugin_la_SOURCES = \ +diff --git a/modules/audio_output/Makefile.am b/modules/audio_output/Makefile.am +index 589e5fe..a0441b2 100644 +--- a/modules/audio_output/Makefile.am ++++ b/modules/audio_output/Makefile.am +@@ -72,11 +72,14 @@ endif + endif + + libdirectsound_plugin_la_SOURCES = audio_output/directsound.c \ ++libdirectsound_plugin_la_CFLAGS = $(AM_CFLAGS) + audio_output/windows_audio_common.h + libdirectsound_plugin_la_LIBADD = -lole32 + if HAVE_DIRECTX ++if !HAVE_WINSTORE + aout_LTLIBRARIES += libdirectsound_plugin.la + endif ++endif + + libkai_plugin_la_SOURCES = audio_output/kai.c + libkai_plugin_la_LIBADD = $(KAI_LIBS) +@@ -94,8 +97,10 @@ libwaveout_plugin_la_SOURCES = audio_output/waveout.c \ + audio_output/windows_audio_common.h + libwaveout_plugin_la_LIBADD = -lwinmm + if HAVE_WIN32 ++if !HAVE_WINSTORE + aout_LTLIBRARIES += libwaveout_plugin.la + endif ++endif + + libauhal_plugin_la_SOURCES = audio_output/auhal.c \ + audio_output/TPCircularBuffer.h audio_output/TPCircularBuffer.c +diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am +index f173c0e..a29fab6 100644 +--- a/modules/codec/Makefile.am ++++ b/modules/codec/Makefile.am +@@ -348,8 +348,10 @@ libdxva2_plugin_la_SOURCES = \ + codec/avcodec/dxva2.c packetizer/h264_nal.c packetizer/h264_nal.h + libdxva2_plugin_la_LIBADD = -lole32 -lshlwapi -luuid + if HAVE_AVCODEC_DXVA2 ++if !HAVE_WINSTORE + codec_LTLIBRARIES += libdxva2_plugin.la + endif ++endif + + libvda_plugin_la_SOURCES = \ + video_chroma/copy.c video_chroma/copy.h \ +@@ -481,8 +483,10 @@ codec_LTLIBRARIES += $(LTLIBtwolame) + libcrystalhd_plugin_la_SOURCES = codec/crystalhd.c packetizer/h264_nal.c packetizer/h264_nal.h + libcrystalhd_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' + libcrystalhd_plugin_la_LIBADD = $(LIBS_crystalhd) ++if !HAVE_WINSTORE + EXTRA_LTLIBRARIES += libcrystalhd_plugin.la + codec_LTLIBRARIES += $(LTLIBcrystalhd) ++endif + + libqsv_plugin_la_SOURCES = codec/qsv.c + libqsv_plugin_la_CFLAGS = $(AM_CFLAGS) $(MFX_CFLAGS) +@@ -498,21 +502,27 @@ libdmo_plugin_la_SOURCES = codec/dmo/dmo.c codec/dmo/dmo.h codec/dmo/buffer.c + libqsv_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) + libdmo_plugin_la_LIBADD = $(LIBM) + if HAVE_WIN32 ++if !HAVE_WINSTORE + libdmo_plugin_la_LIBADD += -lole32 -luuid + codec_LTLIBRARIES += libdmo_plugin.la + endif ++endif + + libmft_plugin_la_SOURCES = codec/mft.c packetizer/h264_nal.c packetizer/h264_nal.h + if HAVE_WIN32 ++if !HAVE_WINSTORE + libmft_plugin_la_LIBADD = -lole32 -luuid -lmfuuid -lmfplat + codec_LTLIBRARIES += libmft_plugin.la + endif ++endif + + libquicktime_plugin_la_SOURCES = codec/quicktime.c + libquicktime_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' + libquicktime_plugin_la_LIBADD = $(LIBM) ++if !HAVE_WINSTORE + EXTRA_LTLIBRARIES += libquicktime_plugin.la + codec_LTLIBRARIES += $(LTLIBquicktime) ++endif + + libgstdecode_plugin_la_SOURCES = codec/gstdecode.c + libgstdecode_plugin_la_CFLAGS = $(AM_CFLAGS) $(GST_VIDEO_CFLAGS) $(GST_APP_CFLAGS) +diff --git a/modules/control/Makefile.am b/modules/control/Makefile.am +index 06f258c..8f56eae 100644 +--- a/modules/control/Makefile.am ++++ b/modules/control/Makefile.am +@@ -1,20 +1,28 @@ + controldir = $(pluginsdir)/control ++control_LTLIBRARIES = + + libdummy_plugin_la_SOURCES = control/dummy.c control/intromsg.h ++control_LTLIBRARIES += libdummy_plugin.la ++ + libgestures_plugin_la_SOURCES = control/gestures.c ++control_LTLIBRARIES += libgestures_plugin.la ++ + libhotkeys_plugin_la_SOURCES = control/hotkeys.c + libhotkeys_plugin_la_LIBADD = $(LIBM) ++control_LTLIBRARIES += libhotkeys_plugin.la ++ + libnetsync_plugin_la_SOURCES = control/netsync.c + libnetsync_plugin_la_LIBADD = $(SOCKET_LIBS) ++if !HAVE_WINSTORE ++control_LTLIBRARIES += libnetsync_plugin.la ++endif ++ + liboldrc_plugin_la_SOURCES = control/oldrc.c control/intromsg.h + liboldrc_plugin_la_LIBADD = $(SOCKET_LIBS) $(LIBM) + +-control_LTLIBRARIES = \ +- libdummy_plugin.la \ +- libgestures_plugin.la \ +- libhotkeys_plugin.la \ +- libnetsync_plugin.la \ +- liboldrc_plugin.la ++if !HAVE_WINSTORE ++control_LTLIBRARIES += liboldrc_plugin.la ++endif + + liblirc_plugin_la_SOURCES = control/lirc.c + liblirc_plugin_la_LIBADD = -llirc_client +@@ -64,8 +72,8 @@ libntservice_plugin_la_SOURCES = control/ntservice.c + libwin_hotkeys_plugin_la_SOURCES = control/globalhotkeys/win32.c + libwin_msg_plugin_la_SOURCES = control/win_msg.c + if HAVE_WIN32 +-control_LTLIBRARIES += libntservice_plugin.la + if !HAVE_WINSTORE ++control_LTLIBRARIES += libntservice_plugin.la + control_LTLIBRARIES += libwin_hotkeys_plugin.la libwin_msg_plugin.la + endif + endif +diff --git a/modules/services_discovery/Makefile.am b/modules/services_discovery/Makefile.am +index 11fca94..42096ce 100644 +--- a/modules/services_discovery/Makefile.am ++++ b/modules/services_discovery/Makefile.am +@@ -11,7 +11,9 @@ sd_LTLIBRARIES += libpodcast_plugin.la + libsap_plugin_la_SOURCES = services_discovery/sap.c + libsap_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_sap) + libsap_plugin_la_LIBADD = $(LIBS_sap) $(SOCKET_LIBS) ++if !HAVE_WINSTORE + sd_LTLIBRARIES += libsap_plugin.la ++endif + + libbonjour_plugin_la_SOURCES = services_discovery/bonjour.c + libbonjour_plugin_la_CFLAGS = $(AM_CFLAGS) $(BONJOUR_CFLAGS) +@@ -61,8 +63,10 @@ endif + + libwindrive_plugin_la_SOURCES = services_discovery/windrive.c + if HAVE_WIN32 ++if !HAVE_WINSTORE + sd_LTLIBRARIES += libwindrive_plugin.la + endif ++endif + + libos2drive_plugin_la_SOURCES = services_discovery/os2drive.c + if HAVE_OS2 +diff --git a/modules/video_filter/Makefile.am b/modules/video_filter/Makefile.am +index dc2b5b4..882758d 100644 +--- a/modules/video_filter/Makefile.am ++++ b/modules/video_filter/Makefile.am +@@ -128,8 +128,10 @@ libatmo_plugin_la_SOURCES = video_filter/atmo/atmo.cpp \ + video_filter/atmo/FnordlichtConnection.cpp video_filter/atmo/FnordlichtConnection.h \ + video_filter/atmo/AtmoPacketQueue.cpp video_filter/atmo/AtmoPacketQueue.h + libatmo_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(video_filterdir)' ++if !HAVE_WINSTORE + video_filter_LTLIBRARIES += $(LTLIBatmo) + EXTRA_LTLIBRARIES += libatmo_plugin.la ++endif + + libdeinterlace_plugin_la_SOURCES = \ + video_filter/deinterlace/deinterlace.c video_filter/deinterlace/deinterlace.h \ +diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am +index 5aaeafb..943ad6a 100644 +--- a/modules/video_output/Makefile.am ++++ b/modules/video_output/Makefile.am +@@ -166,8 +166,10 @@ libdirect2d_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_direct2d + libdirect2d_plugin_la_LIBADD = -lgdi32 -lole32 -luuid + libdirect2d_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' ++if !HAVE_WINSTORE + vout_LTLIBRARIES += $(LTLIBdirect2d) + EXTRA_LTLIBRARIES += libdirect2d_plugin.la ++endif + + libdirect3d9_plugin_la_SOURCES = video_output/msw/direct3d9.c \ + video_output/msw/common.c video_output/msw/common.h \ +@@ -178,8 +180,10 @@ libdirect3d9_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_direct3d9 + libdirect3d9_plugin_la_LIBADD = -lgdi32 -lole32 -luuid + libdirect3d9_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' ++if !HAVE_WINSTORE + vout_LTLIBRARIES += $(LTLIBdirect3d9) + EXTRA_LTLIBRARIES += libdirect3d9_plugin.la ++endif + + libdirect3d11_plugin_la_SOURCES = video_output/msw/direct3d11.c \ + video_output/msw/common.c video_output/msw/common.h \ +@@ -205,8 +209,10 @@ libdirectdraw_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_directdraw + libdirectdraw_plugin_la_LIBADD = -luser32 -lgdi32 -lole32 -luuid + if HAVE_DIRECTX ++if !HAVE_WINSTORE + vout_LTLIBRARIES += libdirectdraw_plugin.la + endif ++endif + + libglwin32_plugin_la_SOURCES = video_output/msw/glwin32.c \ + video_output/opengl.c video_output/opengl.h \ +diff --git a/modules/video_splitter/Makefile.am b/modules/video_splitter/Makefile.am +index f0e023c..f6f952b 100644 +--- a/modules/video_splitter/Makefile.am ++++ b/modules/video_splitter/Makefile.am +@@ -12,7 +12,9 @@ libpanoramix_plugin_la_SOURCES = video_splitter/panoramix.c + libpanoramix_plugin_la_CFLAGS = $(AM_CFLAGS) + libpanoramix_plugin_la_LIBADD = $(LIBM) + if HAVE_WIN32 ++if !HAVE_WINSTORE + splitter_LTLIBRARIES += libpanoramix_plugin.la ++endif + else + if HAVE_XCB_RANDR + libpanoramix_plugin_la_CFLAGS += $(XCB_RANDR_CFLAGS) +-- +2.4.1 + diff --git a/mingw-w64-vlc-git/0013-remove-AllocConsole-reference-for-WINSTORE.patch b/mingw-w64-vlc-git/0013-remove-AllocConsole-reference-for-WINSTORE.patch new file mode 100644 index 0000000000..1ede81edea --- /dev/null +++ b/mingw-w64-vlc-git/0013-remove-AllocConsole-reference-for-WINSTORE.patch @@ -0,0 +1,23 @@ +From e4b28e32b706666286d861dbc0a93f796ad968e0 Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Tue, 10 Mar 2015 19:36:25 +0000 +Subject: [PATCH] remove AllocConsole reference for WINSTORE + + +diff --git a/modules/control/intromsg.h b/modules/control/intromsg.h +index 7af9520..a946a0a 100644 +--- a/modules/control/intromsg.h ++++ b/modules/control/intromsg.h +@@ -23,7 +23,9 @@ static inline void intf_consoleIntroMsg(intf_thread_t *intf) + { + if (getenv( "PWD" ) == NULL) /* detect Cygwin shell or Wine */ + { ++#if !VLC_WINSTORE_APP + AllocConsole(); ++#endif + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + freopen("CONIN$", "r", stdin); +-- +2.3.1 + diff --git a/mingw-w64-vlc-git/0014-Remove-some-legacy-mingw.org-header-defines.patch b/mingw-w64-vlc-git/0014-Remove-some-legacy-mingw.org-header-defines.patch new file mode 100644 index 0000000000..5d15f64286 --- /dev/null +++ b/mingw-w64-vlc-git/0014-Remove-some-legacy-mingw.org-header-defines.patch @@ -0,0 +1,205 @@ +From 111305d5178ce8c34e284d32975f9f8ec49f194b Mon Sep 17 00:00:00 2001 +From: Martell Malone +Date: Wed, 27 May 2015 18:21:59 +0100 +Subject: [PATCH] Remove some legacy mingw.org header defines + + +diff --git a/include/vlc_windows_interfaces.h b/include/vlc_windows_interfaces.h +index e4c41f2..3cbfd20 100644 +--- a/include/vlc_windows_interfaces.h ++++ b/include/vlc_windows_interfaces.h +@@ -39,190 +39,7 @@ + /* rpcndr.h defines small not only for idl */ + #undef small + +-/* mingw.org fails to define this */ +-#ifndef __ITaskbarList3_INTERFACE_DEFINED__ +-#define __ITaskbarList3_INTERFACE_DEFINED__ +-const GUID CLSID_TaskbarList ={ 0x56FDF344,0xFD6D,0x11d0,{0x95,0x8A,0x00,0x60,0x97,0xC9,0xA0,0x90}}; +-const GUID IID_ITaskbarList3 = { 0xea1afb91,0x9e28,0x4b86,{0x90,0xe9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf}}; +- +- +-typedef enum TBPFLAG +-{ +- TBPF_NOPROGRESS = 0, +- TBPF_INDETERMINATE = 0x1, +- TBPF_NORMAL = 0x2, +- TBPF_ERROR = 0x4, +- TBPF_PAUSED = 0x8 +-} TBPFLAG; +- +-typedef struct tagTHUMBBUTTON +-{ +- DWORD dwMask; +- UINT iId; +- UINT iBitmap; +- HICON hIcon; +- // WCHAR pszTip[ 260 ]; +- wchar_t pszTip[ 260 ]; +- DWORD dwFlags; +-} THUMBBUTTON; +- +-typedef struct tagTHUMBBUTTON *LPTHUMBBUTTON; +- +-typedef enum THUMBBUTTONMASK { +- THB_BITMAP = 0x1, +- THB_ICON = 0x2, +- THB_TOOLTIP = 0x4, +- THB_FLAGS = 0x8 +-} THUMBBUTTONMASK; +- +-typedef enum THUMBBUTTONFLAGS { +- THBF_ENABLED = 0x0, +- THBF_DISABLED = 0x1, +- THBF_DISMISSONCLICK = 0x2, +- THBF_NOBACKGROUND = 0x4, +- THBF_HIDDEN = 0x8, +- THBF_NONINTERACTIVE = 0x10 +-} THUMBBUTTONFLAGS; +- +-#ifdef __cplusplus +-interface ITaskbarList : public IUnknown { +-public: +- virtual HRESULT WINAPI HrInit(void) = 0; +- virtual HRESULT WINAPI AddTab(HWND hwnd) = 0; +- virtual HRESULT WINAPI DeleteTab(HWND hwnd) = 0; +- virtual HRESULT WINAPI ActivateTab(HWND hwnd) = 0; +- virtual HRESULT WINAPI SetActiveAlt(HWND hwnd) = 0; +-}; +- +-interface ITaskbarList2 : public ITaskbarList { +-public: +- virtual HRESULT WINAPI MarkFullscreenWindow(HWND hwnd,WINBOOL fFullscreen) = 0; +-}; +- +-interface ITaskbarList3 : public ITaskbarList2 +-{ +- virtual HRESULT STDMETHODCALLTYPE SetProgressValue( +- HWND hwnd, +- ULONGLONG ullCompleted, +- ULONGLONG ullTotal) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE SetProgressState( +- HWND hwnd, +- TBPFLAG tbpFlags) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE RegisterTab( +- HWND hwndTab, +- HWND hwndMDI) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE UnregisterTab( +- HWND hwndTab) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE SetTabOrder( +- HWND hwndTab, +- HWND hwndInsertBefore) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE SetTabActive( +- HWND hwndTab, +- HWND hwndMDI, +- DWORD dwReserved) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons( +- HWND hwnd, +- UINT cButtons, +- LPTHUMBBUTTON pButton) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons( +- HWND hwnd, +- UINT cButtons, +- LPTHUMBBUTTON pButton) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList( +- HWND hwnd, +- HIMAGELIST himl) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon( +- HWND hwnd, +- HICON hIcon, +- LPCWSTR pszDescription) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip( +- HWND hwnd, +- LPCWSTR pszTip) = 0; +- +- virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip( +- HWND hwnd, +- RECT *prcClip) = 0; +- +-}; +- +-#else /* !__cplusplus */ +- +-struct ITaskbarList3Vtbl; +-struct ITaskbarList3 { struct ITaskbarList3Vtbl* lpVtbl; }; +-typedef struct ITaskbarList3 ITaskbarList3; +- +-struct ITaskbarList3Vtbl +-{ +- +- long ( WINAPI *QueryInterface )(ITaskbarList3 * This, REFIID riid, void **ppvObject); +- +- long ( WINAPI *AddRef )(ITaskbarList3 *This); +- +- long ( WINAPI *Release )(ITaskbarList3 *This); +- +- long ( WINAPI *HrInit )(ITaskbarList3 *This); +- +- long ( WINAPI *AddTab )(ITaskbarList3 *This, HWND hwnd); +- +- long ( WINAPI *DeleteTab )(ITaskbarList3 *This, HWND hwnd); +- +- long ( WINAPI *ActivateTab )(ITaskbarList3 *This, HWND hwnd); +- +- long ( WINAPI *SetActiveAlt )(ITaskbarList3 *This, HWND hwnd); +- +- long ( WINAPI *MarkFullscreenWindow )(ITaskbarList3 *This, HWND hwnd, +- BOOL fFullscreen); +- +- long ( WINAPI *SetProgressValue )(ITaskbarList3 *This, HWND hwnd, +- ULONGLONG ullCompleted, ULONGLONG ullTotal); +- +- long ( WINAPI *SetProgressState )(ITaskbarList3 *This, HWND hwnd, +- TBPFLAG tbpFlags); +- +- long ( WINAPI *RegisterTab )( ITaskbarList3 *This, HWND hwndTab, HWND hwndMDI); +- +- long ( WINAPI *UnregisterTab )(ITaskbarList3 *This, HWND hwndTab); +- +- long ( WINAPI *SetTabOrder )(ITaskbarList3 *This, HWND hwndTab, +- HWND hwndInsertBefore); +- +- long ( WINAPI *SetTabActive )(ITaskbarList3 *This, HWND hwndTab, +- HWND hwndMDI, DWORD dwReserved); +- +- long ( WINAPI *ThumbBarAddButtons )(ITaskbarList3 *This, HWND hwnd, +- UINT cButtons, LPTHUMBBUTTON pButton); +- +- long ( WINAPI *ThumbBarUpdateButtons )(ITaskbarList3 *This, HWND hwnd, +- UINT cButtons, LPTHUMBBUTTON pButton); +- +- long ( WINAPI *ThumbBarSetImageList )(ITaskbarList3 *This, HWND hwnd, +- HIMAGELIST himl); +- +- long ( WINAPI *SetOverlayIcon )(ITaskbarList3 *This, HWND hwnd, +- HICON hIcon, LPCWSTR pszDescription); +- +- long ( WINAPI *SetThumbnailTooltip )(ITaskbarList3 *This, HWND hwnd, +- LPCWSTR pszTip); +- +- long ( WINAPI *SetThumbnailClip )(ITaskbarList3 *This, HWND hwnd, +- RECT *prcClip); +- +-}; +- +-#endif /* __cplusplus */ +-#endif /* __ITaskbarList3_INTERFACE_DEFINED__ */ +- +-/* mingw-w64 also fails to define these as of 2.0.1 */ ++/* mingw-w64 fails to define this as of 2.0.1 */ + + #ifndef THBN_CLICKED + # define THBN_CLICKED 0x1800 +-- +2.4.1 + diff --git a/mingw-w64-vlc-git/PKGBUILD b/mingw-w64-vlc-git/PKGBUILD index a88a67e901..cd724e0919 100644 --- a/mingw-w64-vlc-git/PKGBUILD +++ b/mingw-w64-vlc-git/PKGBUILD @@ -1,7 +1,8 @@ # Maintainer: Martell Malone # Contributor: Alexey Pavlov +# Contributor: Ray Donnelly -#_variant=winrt +#_variant=winrt #desktop _variant=desktop _realname=vlc @@ -9,7 +10,7 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") _ver_base=2.2 -pkgver=3.0.0.59104.701fc0c +pkgver=3.0.0.61503.1d43e72 pkgrel=1 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" arch=('any') @@ -48,10 +49,11 @@ depends=("${MINGW_PACKAGE_PREFIX}-a52dec" "${MINGW_PACKAGE_PREFIX}-libtheora" "${MINGW_PACKAGE_PREFIX}-libvpx" "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-lua51" "${MINGW_PACKAGE_PREFIX}-opencv" "${MINGW_PACKAGE_PREFIX}-opus" "${MINGW_PACKAGE_PREFIX}-portaudio" + "${MINGW_PACKAGE_PREFIX}-protobuf" "${MINGW_PACKAGE_PREFIX}-schroedinger" "${MINGW_PACKAGE_PREFIX}-speex" "${MINGW_PACKAGE_PREFIX}-taglib" @@ -66,13 +68,16 @@ depends=("${MINGW_PACKAGE_PREFIX}-a52dec" #"${MINGW_PACKAGE_PREFIX}-zvbi" #"${MINGW_PACKAGE_PREFIX}-libupnp" #"${MINGW_PACKAGE_PREFIX}-libtar" - ) makedepends=( "${MINGW_PACKAGE_PREFIX}-gcc" "pkg-config" "${MINGW_PACKAGE_PREFIX}-ncurses" "git" + "autoconf" + "automake" + "libtool" + "make" # 'libkate' # 'live-media' # 'libnotify' @@ -108,23 +113,23 @@ makedepends=( options=('strip' '!emptydirs') source=(#"${_realname}-${_ver_base}"::"git://git.videolan.org/${_realname}/${_realname}-${_ver_base}.git" "${_realname}"::"git://git.videolan.org/${_realname}.git" - 0001-fix-redeclare.patch - 0002-msvcrt-lfind.patch - 0003-fix-prog-find-2.2.patch - 0004-skip-pthread-time-declares.patch - 0005-disablestatic.patch - 0006-fix-time-mingw-include.patch - 0010-fix_REENTRANT-2.2.patch - 0011-prefer-static-libs.patch) + 0001-Use-libdir-for-plugins-on-msys2.patch + 0002-MinGW-w64-lfind-s-_NumOfElements-is-an-unsigned-int.patch + 0003-MinGW-w64-don-t-pass-static-to-pkg-config-if-SYS-min.patch + 0004-Revert-Win32-prefer-the-static-libraries-when-creati.patch + 0011-Add-include-on-WINSTORE-for-QueueTimer-functions.patch + 0012-Only-build-correct-modules-for-WINSTORE.patch + 0013-remove-AllocConsole-reference-for-WINSTORE.patch + 0014-Remove-some-legacy-mingw.org-header-defines.patch) md5sums=('SKIP' - 'a546326fd9beb9a04e066bad6c1945c9' - 'e1d4601bec65f1287f87a66b13f98226' - '6f5658882060d0a33c8ba45186fcaf69' - '76ad5b8bf5850cc47e11580fd3bbc179' - '1e544f65bd17b5af5b862098412f99f7' - '6e7eb88c80751432a9e1214ea567f8ba' - 'd858696f47e0688b4706d598fd7e42ed' - 'bc2038d61add89c423dc7145cdc6c843') + 'b6a010849631177493135b3ad7c5f784' + '13f5a8bf897b253e0d9626a5ae79bc8d' + 'c53c41b440eb42e7a2cda9109a1651c4' + '8cd35991a69b14a1c3ab3b6faa9f15bc' + '3ab07dce68513b6d37321f36141a8340' + '4c286b5d83b67e6c0ca15c16b9376fc4' + '0b3303af4b3d68cf5317f025975adb32' + '0301207ee4fa1ce5dc510d6ee402adaa') pkgver() { cd $_realname @@ -139,14 +144,20 @@ pkgver() { prepare() { cd "${srcdir}"/${_realname} - patch -Np1 -i "${srcdir}/0001-fix-redeclare.patch" - patch -p1 -i "${srcdir}/0002-msvcrt-lfind.patch" - #patch -p1 -i "${srcdir}/0003-fix-prog-find-2.2.patch" - patch -p1 -i "${srcdir}/0004-skip-pthread-time-declares.patch" - patch -p1 -i "${srcdir}/0005-disablestatic.patch" - patch -p1 -i "${srcdir}/0006-fix-time-mingw-include.patch" - #patch -p1 -i "${srcdir}/0010-fix_REENTRANT-2.2.patch" - patch -Rp1 -i "${srcdir}/0011-prefer-static-libs.patch" +if [ "${_variant}" != "winrt" ]; then + git am "${srcdir}"/0001-Use-libdir-for-plugins-on-msys2.patch +fi + + git am "${srcdir}"/0002-MinGW-w64-lfind-s-_NumOfElements-is-an-unsigned-int.patch + git am "${srcdir}"/0003-MinGW-w64-don-t-pass-static-to-pkg-config-if-SYS-min.patch + git am "${srcdir}"/0004-Revert-Win32-prefer-the-static-libraries-when-creati.patch + +if [ "${_variant}" == "winrt" ]; then + git am "${srcdir}"/0011-Add-include-on-WINSTORE-for-QueueTimer-functions.patch + git am "${srcdir}"/0012-Only-build-correct-modules-for-WINSTORE.patch + git am "${srcdir}"/0013-remove-AllocConsole-reference-for-WINSTORE.patch + git am "${srcdir}"/0014-Remove-some-legacy-mingw.org-header-defines.patch +fi ./bootstrap @@ -168,13 +179,10 @@ build() { if [ "${_variant}" = "winrt" ]; then #WinRT - EXTRA_CPPFLAGS+=" -D_WIN32_WINNT=0x602 -DWINVER=0x602 -DWINSTORECOMPAT -D_UNICODE -DUNICODE -DHAVE_WINRT" - - #todo: ask about CFLAGS. i.e building in full WinRT mode not compat - #CFLAGS+=" -D_WIN32_WINNT=0x602 -DWINVER=0x602 -DWINSTORECOMPAT -D_UNICODE -DUNICODE -DHAVE_WINRT" - #CFLAGS+=" -DNDEBUG -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DHAVE_WINRT" + EXTRA_CPPFLAGS+="-D_WIN32_WINNT=0x602 -DWINVER=0x602 -DWINSTORECOMPAT -D_UNICODE -DUNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DHAVE_WINRT" + EXTRA_CFLAGS+="-DNDEBUG ${EXTRA_CPPFLAGS}" EXTRA_LDFLAGS+=" -lnormaliz -lwinstorecompat -lruntimeobject" - + ${MINGW_CHOST}-gcc -dumpspecs | sed -e 's/-lmingwex/-lwinstorecompat -lmingwex -lwinstorecompat -lole32 -lruntimeobject/' -e 's/-lmsvcrt/-lmsvcr110/' > newspecfile NEWSPECFILE="`pwd`/newspecfile" @@ -182,6 +190,7 @@ if [ "${_variant}" = "winrt" ]; then echo "$NEWSPECFILE" #WinRT + CFLAGS="${EXTRA_CFLAGS}" \ CPPFLAGS="${EXTRA_CPPFLAGS}" \ LDFLAGS="${EXTRA_LDFLAGS}" \ CC="${MINGW_CHOST}-gcc -specs=$NEWSPECFILE" \ @@ -225,8 +234,11 @@ if [ "${_variant}" = "winrt" ]; then --disable-taglib \ --disable-ncurses \ --disable-dbus \ - LUAC==${MINGW_PREFIX}/bin/luac LUA_LIBS="`pkg-config --libs lua`" \ - RCC==${MINGW_PREFIX}/bin/rcc + --disable-lua + + # Having some issues with lua 5.2, disable for now + #LUAC==${MINGW_PREFIX}/bin/luac51 LUA_LIBS="`pkg-config --libs lua`" \ + #RCC==${MINGW_PREFIX}/bin/rcc #todo: look at direct for winRT # --disable-dirac @@ -248,8 +260,11 @@ else --disable-sdl \ --disable-telx \ --enable-nls \ - LUAC==${MINGW_PREFIX}/bin/luac LUA_LIBS="`pkg-config --libs lua`" \ - RCC==${MINGW_PREFIX}/bin/rcc + --disable-lua + + # Having some issues with lua 5.2, disable for now + #LUAC==${MINGW_PREFIX}/bin/luac51 LUA_LIBS="`pkg-config --libs lua`" \ + #RCC==${MINGW_PREFIX}/bin/rcc fi @@ -268,5 +283,5 @@ package() { done #todo: patch vlc for plugins to be in share directory - mv ${pkgdir}/${MINGW_PREFIX}/lib/vlc/plugins ${pkgdir}/${MINGW_PREFIX}/bin + #mv ${pkgdir}/${MINGW_PREFIX}/lib/vlc/plugins ${pkgdir}/${MINGW_PREFIX}/bin } diff --git a/mingw-w64-vtk/PKGBUILD b/mingw-w64-vtk/PKGBUILD index f281b5a30c..152881cd49 100644 --- a/mingw-w64-vtk/PKGBUILD +++ b/mingw-w64-vtk/PKGBUILD @@ -1,54 +1,58 @@ # Maintainer: Sergey Popov _realname=vtk +pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.1.0 -pkgrel=2 +pkgver=6.3.0 +pkgrel=1 pkgdesc="A software system for 3D computer graphics, image processing and visualization (mingw-w64)" arch=('any') url="http://www.vtk.org/" -license=("BSD" "GPL") +license=("BSD") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-hdf5" - "${MINGW_PACKAGE_PREFIX}-intel-tbb" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libogg" - "${MINGW_PACKAGE_PREFIX}-libtheora" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-ffmpeg" - "${MINGW_PACKAGE_PREFIX}-qt5") + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-hdf5" + "${MINGW_PACKAGE_PREFIX}-intel-tbb" + "${MINGW_PACKAGE_PREFIX}-jsoncpp" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libogg" + "${MINGW_PACKAGE_PREFIX}-libtheora" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-qt5" + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-postgresql" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-tk") -optdepends=("${MINGW_PACKAGE_PREFIX}-python2: Python bindings" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" + "${MINGW_PACKAGE_PREFIX}-postgresql" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-tk") +optdepends=("${MINGW_PACKAGE_PREFIX}-boost: InfovisBoost and InfovisBoostGraphAlgorithms modules" + "${MINGW_PACKAGE_PREFIX}-libmariadbclient: interface to MariaDB" + "${MINGW_PACKAGE_PREFIX}-postgresql: interface to PostgreSQL" + "${MINGW_PACKAGE_PREFIX}-python2: Python bindings" "${MINGW_PACKAGE_PREFIX}-python2-matplotlib: Matplotlib renderer" "${MINGW_PACKAGE_PREFIX}-tk: TCL bindings, Python Tk widgets") -source=(https://github.com/Kitware/VTK/archive/v$pkgver.tar.gz - vtk-mingw-w64.patch - win64-ptr-cast.patch) -md5sums=('452362f336173018ec9dd9815c18f603' - '1491fe59e872e60e29b5bcdb8ce490a4' - '4305d95a5e99f99b108ea45f167f8e4b') - -VTK_SUFFIX=$(echo "${pkgver}" | sed 's|\([0-9]*\.[0-9]*\).*$|\1|') +source=(#${_realname}-${pkgver}.tar.gz::"https://github.com/Kitware/VTK/archive/v${pkgver}.tar.gz" + http://www.vtk.org/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz + "vtk-mingw-w64.patch") +md5sums=('0231ca4840408e9dd60af48b314c5b6d' + '1534dad8934905a0a54870ab4273dad0') prepare() { cd "${srcdir}/${_realname}-${pkgver}" patch -Np1 -i "$srcdir/vtk-mingw-w64.patch" - patch -Np1 -i "$srcdir/win64-ptr-cast.patch" } build() { - CXXFLAGS+=" -std=gnu++11" + CFLAGS+=" ${CPPFLAGS}" + CXXFLAGS+=" ${CPPFLAGS} -std=gnu++11" [[ "$CARCH" = 'i686' ]] && { _cmakeopts=('-DVTK_USE_64BIT_IDS=OFF') } @@ -59,11 +63,12 @@ build() { [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - ${MINGW_PREFIX}/bin/cmake.exe \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;-DVTK_INSTALL_QT_PLUGIN_DIR=;-DVTK_INSTALL_TCL_DIR=" \ + ${MINGW_PREFIX}/bin/cmake.exe -Wno-dev \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - -DVTK_INSTALL_QT_PLUGIN_DIR=${pkgdir}${MINGW_PREFIX}/share/qt5/plugins/designer \ - -DVTK_INSTALL_TCL_DIR=${pkgdir}${MINGW_PREFIX}/lib/vtk-${VTK_SUFFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DVTK_INSTALL_QT_PLUGIN_DIR=${MINGW_PREFIX}/share/qt5/plugins/designer \ + -DVTK_INSTALL_TCL_DIR=${MINGW_PREFIX}/lib/vtk-${pkgver%.*} \ -DBUILD_DOCUMENTATION=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTING=OFF \ @@ -81,7 +86,7 @@ build() { -DVTK_USE_SYSTEM_GL2PS=OFF \ -DVTK_USE_SYSTEM_HDF5=ON \ -DVTK_USE_SYSTEM_JPEG=ON \ - -DVTK_USE_SYSTEM_JSONCPP=OFF \ + -DVTK_USE_SYSTEM_JSONCPP=ON \ -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ -DVTK_USE_SYSTEM_LIBXML2=ON \ -DVTK_USE_SYSTEM_NETCDF=OFF \ @@ -91,10 +96,15 @@ build() { -DVTK_USE_SYSTEM_ZLIB=ON \ -DVTK_USE_VIDEO_FOR_WINDOWS=ON \ -DModule_vtkIOFFMPEG=ON \ - -DModule_vtkIOMySQL=OFF \ + -DModule_vtkIOMySQL=ON \ + -DMYSQL_INCLUDE_DIRECTORIES=${MINGW_PREFIX}/include/mariadb \ + -DMYSQL_LIBRARY=${MINGW_PREFIX}/lib/libmariadb.dll.a \ + -DModule_vtkInfovisBoost=ON \ + -DModule_vtkInfovisBoostGraphAlgorithms=ON \ -DModule_vtkIOODBC=OFF \ -DModule_vtkIOPostgreSQL=ON \ -DModule_vtkPythonInterpreter=ON \ + -DModule_vtkFiltersReebGraph=ON \ -DModule_vtkRenderingFreeTypeFontConfig=ON \ -DModule_vtkRenderingMatplotlib=ON \ -DVTK_WRAP_JAVA=OFF \ @@ -116,17 +126,15 @@ build() { package() { cd "${srcdir}/build-${CARCH}" - make -j1 install + make -j1 DESTDIR=${pkgdir} install - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null + #local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX}) - pushd ${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}-${VTK_SUFFIX} > /dev/null + pushd ${pkgdir}${MINGW_PREFIX}/lib/cmake/${_realname}-${pkgver%.*} > /dev/null sed -s 's|Qt5::|Qt5|g' -i ./VTKTargets*.cmake - sed -s "s|${PREFIX_DEPS}|\${_IMPORT_PREFIX}|g" -i ./VTKTargets.cmake - find . -name '*.cmake' -exec \ - sed -s "s|${PREFIX_DEPS}|\${VTK_INSTALL_PREFIX}|g" -i {} \; + #sed -s "s|${PREFIX_DEPS}|\${_IMPORT_PREFIX}|g" -i ./VTKTargets.cmake + #find . -name '*.cmake' -exec \ + # sed -s "s|${PREFIX_DEPS}|\${VTK_INSTALL_PREFIX}|g" -i {} \; popd > /dev/null install -Dm644 ${srcdir}/${_realname}-${pkgver}/Copyright.txt \ diff --git a/mingw-w64-vtk/vtk-mingw-w64.patch b/mingw-w64-vtk/vtk-mingw-w64.patch index 6aa607aacc..c0d96ff43e 100644 --- a/mingw-w64-vtk/vtk-mingw-w64.patch +++ b/mingw-w64-vtk/vtk-mingw-w64.patch @@ -36,41 +36,6 @@ diff -Naur VTK-6.1.0.a/Common/Core/vtkConditionVariable.h VTK-6.1.0.b/Common/Cor # else // 0 typedef struct { -diff -Naur VTK-6.1.0.a/Common/Core/vtkWin32Header.h VTK-6.1.0.b/Common/Core/vtkWin32Header.h ---- VTK-6.1.0.a/Common/Core/vtkWin32Header.h 2014-01-21 23:22:59.000000000 +0700 -+++ VTK-6.1.0.b/Common/Core/vtkWin32Header.h 2014-09-21 00:06:12.505562700 +0700 -@@ -87,16 +87,18 @@ - # define VTK_WORKAROUND_WINDOWS_MANGLE - #endif - --#if defined(_MSC_VER) // Visual studio --#pragma warning ( disable : 4311 ) --#pragma warning ( disable : 4312 ) -+#if defined(_MSC_VER) || defined(__MINGW32__) -+# ifdef _MSC_VER -+# pragma warning ( disable : 4311 ) -+# pragma warning ( disable : 4312 ) -+# endif - # define vtkGetWindowLong GetWindowLongPtr - # define vtkSetWindowLong SetWindowLongPtr - # define vtkLONG LONG_PTR - # define vtkGWL_WNDPROC GWLP_WNDPROC - # define vtkGWL_HINSTANCE GWLP_HINSTANCE - # define vtkGWL_USERDATA GWLP_USERDATA --#else // non-Visual studio -+#else - # define vtkGetWindowLong GetWindowLong - # define vtkSetWindowLong SetWindowLong - # define vtkLONG LONG -@@ -109,7 +111,7 @@ - # define vtkGWL_HINSTANCE GWL_HINSTANCE - # define vtkGWL_USERDATA GWL_USERDATA - # endif --#endif // -+#endif - - #endif - diff -Naur VTK-6.1.0.a/Filters/General/vtkMultiThreshold.h VTK-6.1.0.b/Filters/General/vtkMultiThreshold.h --- VTK-6.1.0.a/Filters/General/vtkMultiThreshold.h 2014-01-21 23:22:59.000000000 +0700 +++ VTK-6.1.0.b/Filters/General/vtkMultiThreshold.h 2014-09-21 05:32:57.474083800 +0700 diff --git a/mingw-w64-vtk/win64-ptr-cast.patch b/mingw-w64-vtk/win64-ptr-cast.patch deleted file mode 100644 index c95197e422..0000000000 --- a/mingw-w64-vtk/win64-ptr-cast.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/IO/Video/vtkWin32VideoSource.cxx b/IO/Video/vtkWin32VideoSource.cxx -index c75434c..611520c 100644 ---- a/IO/Video/vtkWin32VideoSource.cxx -+++ b/IO/Video/vtkWin32VideoSource.cxx -@@ -339,7 +339,7 @@ void vtkWin32VideoSource::Initialize() - } - - // set user data for callbacks -- if (!capSetUserData(this->Internal->CapWnd,(long)this)) -+ if (!capSetUserData(this->Internal->CapWnd,(vtkLONG)this)) - { - vtkErrorMacro(<< "Initialize: couldn't set user data for callback"\ - << " (" << GetLastError() << ")"); diff --git a/mingw-w64-w32pth/PKGBUILD b/mingw-w64-w32pth/PKGBUILD index 8ce6b7948b..9154937a08 100644 --- a/mingw-w64-w32pth/PKGBUILD +++ b/mingw-w64-w32pth/PKGBUILD @@ -1,20 +1,18 @@ # Maintainer: Alexey Pavlov _realname=w32pth - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.5 pkgrel=2 pkgdesc="An emulation of PTH for MS Windows (mingw-w64)" arch=('any') license=("LGPL") -groups=("${MINGW_PACKAGE_PREFIX}") url="http://www.gnupg.org" makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs') source=("ftp://ftp.g10code.com/g10code/w32pth/w32pth-${pkgver}.tar.bz2" - w32pth-2.0.4-deffile.patch - w32pth-2.0.4-mingw.patch) + w32pth-2.0.4-deffile.patch + w32pth-2.0.4-mingw.patch) sha1sums=('d648b98ce215f81e901f3f982470d37c704433a6' '8e64fa8432e990a4b0e5bedb62cebad64a8d7197' '27ac166bfe7761e56e6d6333b8af7b08c11fe5db') diff --git a/mingw-w64-waf/PKGBUILD b/mingw-w64-waf/PKGBUILD index f382f07c51..adc0da8a8f 100644 --- a/mingw-w64-waf/PKGBUILD +++ b/mingw-w64-waf/PKGBUILD @@ -3,31 +3,28 @@ _realname=waf pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.7.15 +pkgver=1.8.9 pkgrel=1 pkgdesc="General-purpose build system modelled after Scons (mingw-w64)" arch=('any') license=('BSD') -url="http://code.google.com/p/waf/" +url="https://waf.io/" makedepends=("setconf") depends=("${MINGW_PACKAGE_PREFIX}-python3") options=('!emptydirs') -source=("http://${_realname}.googlecode.com/files/${_realname}-$pkgver.tar.bz2" - waflib.patch) -sha256sums=('49780032ed2ac0e118030af329cbd5883d2b9cb9831fc632a3e7b2bfd99d3f1e' - 'c7a7f938483db968e33bd1cdccb71cae199fd67afbc2baa1ec25e2ad4243e9bd') +source=("https://github.com/waf-project/${_realname}/archive/${_realname}-${pkgver}.tar.gz") +sha256sums=('166e7a52066d9dd3a6ab8349b65fd49a162ad94ac40c8b2ccdbb256c7faf2b9c') prepare() { - cd "${_realname}-$pkgver" - patch -p1 -i ${srcdir}/waflib.patch + cd "${_realname}-${_realname}-$pkgver" # Extracting license - head -n 30 waf | tail -n 25 > LICENSE + head -n 30 waf-light | tail -n 25 > LICENSE # Python 3 fix - sed -i '0,/env python/s//python3/' waf + sed -i '0,/env python/s//python3/' waf-light } build() { - cd ${_realname}-$pkgver + cd "${_realname}-${_realname}-$pkgver" plain "Configure ..." ${MINGW_PREFIX}/bin/python3 ./waf-light configure --prefix=${MINGW_PREFIX} plain "Make waf ..." @@ -35,7 +32,7 @@ build() { } package() { - cd "${_realname}-$pkgver" + cd "${_realname}-${_realname}-$pkgver" ${MINGW_PREFIX}/bin/python3 ./waf-light install -f --destdir="$pkgdir" \ --tools='compat,compat15,ocaml,go,cython,scala,erlang,cuda,gcj,boost,pep8,eclipse' @@ -52,6 +49,6 @@ package() { mv "${pkgdir}${MINGW_PREFIX}/bin/.waf3-$pkgver-"* "${pkgdir}${MINGW_PREFIX}/lib/waf/" setconf "${pkgdir}${MINGW_PREFIX}/bin/waf" base '"${MINGW_PREFIX}/lib/waf"' - install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE" + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-waf/waflib.patch b/mingw-w64-waf/waflib.patch deleted file mode 100644 index 297644901c..0000000000 --- a/mingw-w64-waf/waflib.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- waf-1.7.15/waflib/Node.py.orig 2014-02-20 07:45:31.970800000 +0400 -+++ waf-1.7.15/waflib/Node.py 2013-12-19 02:49:19.000000000 +0400 -@@ -258,7 +258,9 @@ - lst = [x for x in split_path(lst) if x and x != '.'] - - cur = self -+ print ("find_node(self,lst) lst is %s" % (lst)) - for x in lst: -+ print ("considering x = %s" % (x)) - if x == '..': - cur = cur.parent or cur - continue -@@ -278,9 +276,11 @@ - - # optimistic: create the node first then look if it was correct to do so - cur = self.__class__(x, cur) -+ print ("cur.abspath() = %s" % (cur.abspath())) - try: - os.stat(cur.abspath()) - except OSError: -+ print ("os.stat failed?") - cur.evict() - return None - -@@ -403,11 +399,12 @@ - pass - # think twice before touching this (performance + complexity + correctness) - -+ print ("OS separator = %s" % (os.sep)) - if os.sep == '/': - if not self.parent: -- val = os.sep -+ val = (sys.platform!='win32') and os.sep or "" - elif not self.parent.name: -- val = os.sep + self.name -+ val = ((sys.platform!='win32') and os.sep or "") + self.name - else: - val = self.parent.abspath() + os.sep + self.name - else: diff --git a/mingw-w64-wavpack/PKGBUILD b/mingw-w64-wavpack/PKGBUILD index 61bd7a1b99..de986139f4 100644 --- a/mingw-w64-wavpack/PKGBUILD +++ b/mingw-w64-wavpack/PKGBUILD @@ -1,9 +1,9 @@ # Maintainer: Alexey Pavlov _realname=wavpack - +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.70.0 +pkgver=4.75.2 pkgrel=1 pkgdesc="Audio compression format with lossless, lossy and hybrid compression modes (mingw-w64)" arch=('any') @@ -13,27 +13,27 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") options=(!libtool strip staticlibs) source=(http://www.wavpack.com/${_realname}-${pkgver}.tar.bz2) -sha1sums=('7bf2022c988c19067196ee1fdadc919baacf46d1') +sha1sums=('9025eab39f9db05f39f88db70891a2421d124435') prepare() { cd ${srcdir}/${_realname}-${pkgver} } build() { - mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" - cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" - ./configure \ + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ - --enable-mmx + --enable-shared \ + --enable-static + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } diff --git a/mingw-w64-webkitgtk2/PKGBUILD b/mingw-w64-webkitgtk2/PKGBUILD index 69d31191d1..6d998d155d 100644 --- a/mingw-w64-webkitgtk2/PKGBUILD +++ b/mingw-w64-webkitgtk2/PKGBUILD @@ -53,7 +53,7 @@ prepare() { patch -p1 -i ${srcdir}/webkitgtk-1.10.2-windows.patch patch -p1 -i ${srcdir}/bison3.patch sed -e "s|-licui18n|-licuin|g" -i configure.ac - + rm -rf autom4te.cache touch README INSTALL gtkdocize --copy > /dev/null 2>&1 @@ -64,7 +64,7 @@ build() { # Suppress a *lot* of gcc 4.8 warnings CPPFLAGS+=" -Wno-unused-local-typedefs" export lt_cv_deplibs_check_method='pass_all' - + mkdir -p "${srcdir}/build-${MINGW_CHOST}" [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" @@ -81,7 +81,7 @@ build() { --enable-filters --enable-video \ --with-font-backend=freetype --enable-3D-transforms \ --enable-geolocation --enable-web-sockets --enable-mathml - + make } diff --git a/mingw-w64-webkitgtk3/0001-webkitgtk-remove-reference-to-nonexisting-header.mingw.patch b/mingw-w64-webkitgtk3/0001-webkitgtk-remove-reference-to-nonexisting-header.mingw.patch deleted file mode 100644 index 36efd3ee2d..0000000000 --- a/mingw-w64-webkitgtk3/0001-webkitgtk-remove-reference-to-nonexisting-header.mingw.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- webkitgtk-2.2.3/Source/WTF/wtf/Platform.h.orig 2013-12-04 19:44:46.333861578 +0100 -+++ webkitgtk-2.2.3/Source/WTF/wtf/Platform.h 2013-12-04 19:44:52.559923235 +0100 -@@ -627,11 +627,6 @@ - #define HAVE_SYS_TIMEB_H 1 - #define HAVE_ALIGNED_MALLOC 1 - #define HAVE_ISDEBUGGERPRESENT 1 -- --#if !PLATFORM(QT) --#include --#endif -- - #endif - - #if OS(WINDOWS) diff --git a/mingw-w64-webkitgtk3/0002-webkitgtk-mingw-use-gcc-asm.mingw.patch b/mingw-w64-webkitgtk3/0002-webkitgtk-mingw-use-gcc-asm.mingw.patch deleted file mode 100644 index fe47e4a124..0000000000 --- a/mingw-w64-webkitgtk3/0002-webkitgtk-mingw-use-gcc-asm.mingw.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webkitgtk-2.2.3/Source/WTF/wtf/Atomics.h.orig 2013-12-04 19:49:26.788630335 +0100 -+++ webkitgtk-2.2.3/Source/WTF/wtf/Atomics.h 2013-12-04 19:50:17.217126505 +0100 -@@ -278,7 +278,7 @@ - inline bool weakCompareAndSwap(uint8_t* location, uint8_t expected, uint8_t newValue) - { - #if ENABLE(COMPARE_AND_SWAP) --#if !OS(WINDOWS) && (CPU(X86) || CPU(X86_64)) -+#if COMPILER(GCC) && (CPU(X86) || CPU(X86_64)) - unsigned char result; - asm volatile( - "lock; cmpxchgb %3, %2\n\t" diff --git a/mingw-w64-webkitgtk3/0003-webkit-dont-build-dump-render-tree.mingw.patch b/mingw-w64-webkitgtk3/0003-webkit-dont-build-dump-render-tree.mingw.patch deleted file mode 100644 index 3a4ba7f8b2..0000000000 --- a/mingw-w64-webkitgtk3/0003-webkit-dont-build-dump-render-tree.mingw.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Tools/GNUmakefile.am -+++ b/Tools/GNUmakefile.am -@@ -3,7 +3,6 @@ - - if ENABLE_WEBKIT1 - noinst_PROGRAMS += \ -- Programs/DumpRenderTree \ - Programs/GtkLauncher - endif - diff --git a/mingw-w64-webkitgtk3/0004-webkitgtk-mingw-dont-declare-readwritebarrier.mingw.patch b/mingw-w64-webkitgtk3/0004-webkitgtk-mingw-dont-declare-readwritebarrier.mingw.patch deleted file mode 100644 index 8944d2bf3a..0000000000 --- a/mingw-w64-webkitgtk3/0004-webkitgtk-mingw-dont-declare-readwritebarrier.mingw.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webkitgtk-2.2.3/Source/WTF/wtf/Atomics.h.orig 2013-12-04 19:53:50.995225126 +0100 -+++ webkitgtk-2.2.3/Source/WTF/wtf/Atomics.h 2013-12-04 19:56:24.103724030 +0100 -@@ -65,7 +65,7 @@ - #if OS(WINDOWS) - #if OS(WINCE) - #include --#else -+#elif !COMPILER(MINGW) - extern "C" void _ReadWriteBarrier(void); - #pragma intrinsic(_ReadWriteBarrier) - #endif diff --git a/mingw-w64-webkitgtk3/0005-webkitgtk-mingw-compile-fix.mingw.patch b/mingw-w64-webkitgtk3/0005-webkitgtk-mingw-compile-fix.mingw.patch deleted file mode 100644 index 3d8525e31f..0000000000 --- a/mingw-w64-webkitgtk3/0005-webkitgtk-mingw-compile-fix.mingw.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webkitgtk-2.2.3/Source/WTF/wtf/threads/BinarySemaphore.cpp.orig 2013-12-04 20:08:56.016394944 +0100 -+++ webkitgtk-2.2.3/Source/WTF/wtf/threads/BinarySemaphore.cpp 2013-12-04 20:09:22.055655312 +0100 -@@ -26,7 +26,7 @@ - #include "config.h" - #include "BinarySemaphore.h" - --#if !PLATFORM(WIN) -+#if !OS(WINDOWS) - - namespace WTF { - diff --git a/mingw-w64-webkitgtk3/0006-webkitgtk-mingw-prevent-no-error-name-conflict.mingw.patch b/mingw-w64-webkitgtk3/0006-webkitgtk-mingw-prevent-no-error-name-conflict.mingw.patch deleted file mode 100644 index 64b052be63..0000000000 --- a/mingw-w64-webkitgtk3/0006-webkitgtk-mingw-prevent-no-error-name-conflict.mingw.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- webkitgtk-2.2.3/Source/WebCore/platform/graphics/GraphicsContext3D.h.orig 2013-12-04 22:08:10.625202381 +0100 -+++ webkitgtk-2.2.3/Source/WebCore/platform/graphics/GraphicsContext3D.h 2013-12-04 22:16:51.331228349 +0100 -@@ -43,9 +43,11 @@ - #endif - - // FIXME: Find a better way to avoid the name confliction for NO_ERROR. --#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) -+#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(GTK) && OS(WINDOWS)) - #undef NO_ERROR --#elif PLATFORM(GTK) -+#endif -+ -+#if PLATFORM(GTK) - // This define is from the X11 headers, but it's used below, so we must undefine it. - #undef VERSION - #endif diff --git a/mingw-w64-webkitgtk3/0007-webkitgtk-mingw-fix-includes.mingw.patch b/mingw-w64-webkitgtk3/0007-webkitgtk-mingw-fix-includes.mingw.patch deleted file mode 100644 index 2f17df958e..0000000000 --- a/mingw-w64-webkitgtk3/0007-webkitgtk-mingw-fix-includes.mingw.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- webkitgtk-2.2.3/Source/Platform/GNUmakefile.am.orig 2013-12-04 22:54:03.522928222 +0100 -+++ webkitgtk-2.2.3/Source/Platform/GNUmakefile.am 2013-12-04 22:54:28.684175941 +0100 -@@ -55,7 +55,8 @@ - -I$(srcdir)/Source/WebCore/platform/network/gtk \ - -I$(srcdir)/Source/WebCore/platform/network/soup \ - -I$(srcdir)/Source/WebCore/platform/text \ -- -I$(srcdir)/Source/WebCore/platform/text/transcoder -+ -I$(srcdir)/Source/WebCore/platform/text/transcoder \ -+ -I$(srcdir)/Source/WebCore/platform/win - - noinst_LTLIBRARIES += \ - libPlatform.la \ diff --git a/mingw-w64-webkitgtk3/0008-webkit-fix-angle-windows-compilation.mingw.patch b/mingw-w64-webkitgtk3/0008-webkit-fix-angle-windows-compilation.mingw.patch deleted file mode 100644 index c44dd1ccba..0000000000 --- a/mingw-w64-webkitgtk3/0008-webkit-fix-angle-windows-compilation.mingw.patch +++ /dev/null @@ -1,82 +0,0 @@ ---- /dev/null 2013-12-01 23:52:53.623612457 +0100 -+++ webkitgtk-2.2.3/Source/ThirdParty/ANGLE/src/compiler/ossource_win.cpp 2013-12-04 23:17:33.367830698 +0100 -@@ -0,0 +1,58 @@ -+// -+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+// -+ -+#include "compiler/osinclude.h" -+// -+// This file contains contains the window's specific functions -+// -+ -+#if !defined(ANGLE_OS_WIN) -+#error Trying to build a windows specific file in a non windows build. -+#endif -+ -+ -+// -+// Thread Local Storage Operations -+// -+OS_TLSIndex OS_AllocTLSIndex() -+{ -+ DWORD dwIndex = TlsAlloc(); -+ if (dwIndex == TLS_OUT_OF_INDEXES) { -+ assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); -+ return OS_INVALID_TLS_INDEX; -+ } -+ -+ return dwIndex; -+} -+ -+ -+bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -+{ -+ if (nIndex == OS_INVALID_TLS_INDEX) { -+ assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); -+ return false; -+ } -+ -+ if (TlsSetValue(nIndex, lpvValue)) -+ return true; -+ else -+ return false; -+} -+ -+ -+bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -+{ -+ if (nIndex == OS_INVALID_TLS_INDEX) { -+ assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); -+ return false; -+ } -+ -+ if (TlsFree(nIndex)) -+ return true; -+ else -+ return false; -+} -+ ---- webkitgtk-2.2.3/Source/ThirdParty/ANGLE/GNUmakefile.am.orig 2013-12-04 23:12:01.034574086 +0100 -+++ webkitgtk-2.2.3/Source/ThirdParty/ANGLE/GNUmakefile.am 2013-12-04 23:19:09.719774371 +0100 -@@ -80,7 +80,6 @@ - Source/ThirdParty/ANGLE/src/compiler/MMap.h \ - Source/ThirdParty/ANGLE/src/compiler/NodeSearch.h \ - Source/ThirdParty/ANGLE/src/compiler/osinclude.h \ -- Source/ThirdParty/ANGLE/src/compiler/ossource_posix.cpp \ - Source/ThirdParty/ANGLE/src/compiler/OutputESSL.cpp \ - Source/ThirdParty/ANGLE/src/compiler/OutputESSL.h \ - Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.cpp \ -@@ -161,3 +160,10 @@ - Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.h \ - Source/ThirdParty/ANGLE/src/third_party/compiler/ArrayBoundsClamper.cpp \ - Source/ThirdParty/ANGLE/src/third_party/compiler/ArrayBoundsClamper.h -+ -+if TARGET_WIN32 -+libANGLE_la_SOURCES += Source/ThirdParty/ANGLE/src/compiler/ossource_win.cpp -+else -+libANGLE_la_SOURCES += Source/ThirdParty/ANGLE/src/compiler/ossource_posix.cpp -+endif -+ diff --git a/mingw-w64-webkitgtk3/0009-webkitgtk-mingw-m-pi.mingw.patch b/mingw-w64-webkitgtk3/0009-webkitgtk-mingw-m-pi.mingw.patch deleted file mode 100644 index 7be53467f3..0000000000 --- a/mingw-w64-webkitgtk3/0009-webkitgtk-mingw-m-pi.mingw.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- webkitgtk-2.2.3/Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp.orig 2013-12-05 08:22:08.604832230 +0100 -+++ webkitgtk-2.2.3/Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp 2013-12-05 08:23:27.257593978 +0100 -@@ -44,6 +44,11 @@ - #endif - #endif - -+#if COMPILER(MINGW) && !defined(M_PI) -+// M_PI is only defined in MinGW in non-c++11 builds -+#define M_PI 3.14159265358979323846 -+#endif -+ - namespace WTF { - - std::ostream& operator<<(std::ostream& out, const MediaTime& val) diff --git a/mingw-w64-webkitgtk3/0010-webkitgtk-prevent-multiple-plugins-definitions.mingw.patch b/mingw-w64-webkitgtk3/0010-webkitgtk-prevent-multiple-plugins-definitions.mingw.patch deleted file mode 100644 index 709a706943..0000000000 --- a/mingw-w64-webkitgtk3/0010-webkitgtk-prevent-multiple-plugins-definitions.mingw.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/Source/WebCore/GNUmakefile.list.am.orig 2013-12-05 18:16:06.814020249 +0100 -+++ b/Source/WebCore/GNUmakefile.list.am 2013-12-05 19:08:48.105560181 +0100 -@@ -6261,22 +6261,25 @@ - Source/WebCore/platform/graphics/glx/GLContextGLX.h - endif # END USE_GLX - else -+if !TARGET_WIN32 - webcore_sources += \ - Source/WebCore/plugins/PluginPackageNone.cpp \ - Source/WebCore/plugins/PluginViewNone.cpp -+endif # END !TARGET_WIN32 - endif # END TARGET_X11 - -+if USE_OPENGL -+platformgtk_sources += \ -+ Source/WebCore/platform/graphics/GLContext.cpp \ -+ Source/WebCore/platform/graphics/GLContext.h \ -+ Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp \ -+ Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h -+endif # END USE_OPENGL -+ - if TARGET_X11_OR_WAYLAND - platformgtk_sources += \ - Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h \ - Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp --if USE_OPENGL --platformgtk_sources += \ -- Source/WebCore/platform/graphics/GLContext.cpp \ -- Source/WebCore/platform/graphics/GLContext.h \ -- Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp \ -- Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h --endif # END USE_OPENGL - if USE_EGL - webcoregtk_sources += \ - Source/WebCore/platform/graphics/egl/GLContextEGL.cpp \ diff --git a/mingw-w64-webkitgtk3/0011-webkitgtk-mingw-opengl.mingw.patch b/mingw-w64-webkitgtk3/0011-webkitgtk-mingw-opengl.mingw.patch deleted file mode 100644 index b238a65d42..0000000000 --- a/mingw-w64-webkitgtk3/0011-webkitgtk-mingw-opengl.mingw.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- webkitgtk-2.2.3/Source/autotools/FindDependencies.m4.orig 2013-12-05 21:46:18.648151386 +0100 -+++ webkitgtk-2.2.3/Source/autotools/FindDependencies.m4 2013-12-05 21:48:03.347173354 +0100 -@@ -436,6 +436,9 @@ - if test "$enable_gles2" = "yes"; then - acceleration_description="$acceleration_description (gles2" - OPENGL_LIBS="-lGLESv2" -+ elif test "$os_win32" = "yes"; then -+ acceleration_description="$acceleration_description (gl" -+ OPENGL_LIBS="-lopengl32" - else - acceleration_description="$acceleration_description (gl" - OPENGL_LIBS="-lGL" -@@ -450,7 +453,9 @@ - - # Check whether dlopen() is in the core libc like on FreeBSD, or in a separate - # libdl like on GNU/Linux (in which case we want to link to libdl). -- AC_CHECK_FUNC([dlopen], [], [AC_CHECK_LIB([dl], [dlopen], [OPENGL_LIBS="$OPENGL_LIBS -ldl"])]) -+ if test "$os_win32" = "no"; then -+ AC_CHECK_FUNC([dlopen], [], [AC_CHECK_LIB([dl], [dlopen], [OPENGL_LIBS="$OPENGL_LIBS -ldl"])]) -+ fi - - acceleration_description="$acceleration_description)" - fi ---- webkitgtk-2.2.3/Source/WebCore/platform/graphics/OpenGLShims.cpp.orig 2013-12-05 21:50:59.704893040 +0100 -+++ webkitgtk-2.2.3/Source/WebCore/platform/graphics/OpenGLShims.cpp 2013-12-05 21:52:14.032617235 +0100 -@@ -22,7 +22,7 @@ - #define DISABLE_SHIMS - #include "OpenGLShims.h" - --#if !PLATFORM(QT) && !PLATFORM(WIN) -+#if !PLATFORM(QT) && !OS(WINDOWS) - #include - #endif - -@@ -44,10 +44,10 @@ - return reinterpret_cast(context->getProcAddress(procName)); - return 0; - } --#elif PLATFORM(WIN) -+#elif OS(WINDOWS) - static void* getProcAddress(const char* procName) - { -- return GetProcAddress(GetModuleHandleA("libGLESv2"), procName); -+ return reinterpret_cast(GetProcAddress(GetModuleHandleA("libGLESv2"), procName)); - } - #else - typedef void* (*glGetProcAddressType) (const char* procName); diff --git a/mingw-w64-webkitgtk3/0012-webkitgtk-dont-build-test-webkit-api.mingw.patch b/mingw-w64-webkitgtk3/0012-webkitgtk-dont-build-test-webkit-api.mingw.patch deleted file mode 100644 index cae56466d0..0000000000 --- a/mingw-w64-webkitgtk3/0012-webkitgtk-dont-build-test-webkit-api.mingw.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- webkitgtk-2.2.5/Tools/TestWebKitAPI/GNUmakefile.am.orig 2014-03-05 07:24:20.597608800 +0000 -+++ webkitgtk-2.2.5/Tools/TestWebKitAPI/GNUmakefile.am 2014-03-05 07:29:56.239729900 +0000 -@@ -114,7 +114,6 @@ - noinst_PROGRAMS += \ - Programs/TestWebKitAPI/WTF/TestWTF \ - Programs/TestWebKitAPI/JavaScriptCore/TestJavaScriptCore \ -- Programs/TestWebKitAPI/WebCore/TestWebCore \ - Programs/TestWebKitAPI/WebCoreGtk/TestWebCoreGtk - - if ENABLE_WEBKIT1 diff --git a/mingw-w64-webkitgtk3/0013-webkitgtk-redo-commit-148663.mingw.patch b/mingw-w64-webkitgtk3/0013-webkitgtk-redo-commit-148663.mingw.patch deleted file mode 100644 index 607ecbcccc..0000000000 --- a/mingw-w64-webkitgtk3/0013-webkitgtk-redo-commit-148663.mingw.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- webkitgtk-2.2.3/Source/JavaScriptCore/jit/JITStubsX86_64.h.orig 2013-12-14 15:36:33.948695738 +0100 -+++ webkitgtk-2.2.3/Source/JavaScriptCore/jit/JITStubsX86_64.h 2013-12-14 15:57:48.788612387 +0100 -@@ -43,7 +43,7 @@ - - namespace JSC { - --#if COMPILER(GCC) -+#if COMPILER(GCC) && !OS(WINDOWS) - - // These ASSERTs remind you that, if you change the layout of JITStackFrame, you - // need to change the assembly trampolines below to match. -@@ -289,7 +289,86 @@ - ); - #endif // USE(MASM_PROBE) - --#endif // COMPILER(GCC) -+#elif COMPILER(GCC) && OS(WINDOWS) -+ -+// These ASSERTs remind you that, if you change the layout of JITStackFrame, you -+// need to change the assembly trampolines below to match. -+COMPILE_ASSERT(offsetof(struct JITStackFrame, code) % 16 == 0x0, JITStackFrame_maintains_16byte_stack_alignment); -+COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x58, JITStackFrame_stub_argument_space_matches_ctiTrampoline); -+ -+asm ( -+".text\n" -+".globl " SYMBOL_STRING(ctiTrampoline) "\n" -+HIDE_SYMBOL(ctiTrampoline) "\n" -+SYMBOL_STRING(ctiTrampoline) ":" "\n" -+ // Dump register parameters to their home address -+ "movq %r9, 0x20(%rsp)" "\n" -+ "movq %r8, 0x18(%rsp)" "\n" -+ "movq %rdx, 0x10(%rsp)" "\n" -+ "movq %rcx, 0x8(%rsp)" "\n" -+ -+ "pushq %rbp" "\n" -+ "movq %rsp, %rbp" "\n" -+ "pushq %r12" "\n" -+ "pushq %r13" "\n" -+ "pushq %r14" "\n" -+ "pushq %r15" "\n" -+ "pushq %rbx" "\n" -+ -+ // Decrease rsp to point to the start of our JITStackFrame -+ "subq $0x58, %rsp" "\n" -+ "movq $512, %r12" "\n" -+ "movq $0xFFFF000000000000, %r14" "\n" -+ "movq $0xFFFF000000000002, %r15" "\n" -+ "movq %r8, %r13" "\n" -+ "call *%rcx" "\n" -+ "addq $0x58, %rsp" "\n" -+ "popq %rbx" "\n" -+ "popq %r15" "\n" -+ "popq %r14" "\n" -+ "popq %r13" "\n" -+ "popq %r12" "\n" -+ "popq %rbp" "\n" -+ "ret" "\n" -+".globl " SYMBOL_STRING(ctiTrampolineEnd) "\n" -+HIDE_SYMBOL(ctiTrampolineEnd) "\n" -+SYMBOL_STRING(ctiTrampolineEnd) ":" "\n" -+); -+ -+asm ( -+".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -+HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" -+SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" -+ "movq %rsp, %rcx" "\n" -+ "call " LOCAL_REFERENCE(cti_vm_throw) "\n" -+ "int3" "\n" -+); -+ -+asm ( -+".globl " SYMBOL_STRING(ctiVMHandleException) "\n" -+HIDE_SYMBOL(ctiVMHandleException) "\n" -+SYMBOL_STRING(ctiVMHandleException) ":" "\n" -+ "movq %r13, %rdi" "\n" -+ "call " LOCAL_REFERENCE(cti_vm_handle_exception) "\n" -+ // When cti_vm_handle_exception returns, rax has callFrame and rdx has handler address -+ "jmp *%rdx" "\n" -+); -+ -+asm ( -+".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -+HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" -+SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" -+ "addq $0x58, %rsp" "\n" -+ "popq %rbx" "\n" -+ "popq %r15" "\n" -+ "popq %r14" "\n" -+ "popq %r13" "\n" -+ "popq %r12" "\n" -+ "popq %rbp" "\n" -+ "ret" "\n" -+); -+ -+#endif // COMPILER(GCC) && !OS(WINDOWS) - - #if COMPILER(MSVC) - diff --git a/mingw-w64-webkitgtk3/0014-webkitgtk-workaround-conflicting-htonl-on-win64.mingw.patch b/mingw-w64-webkitgtk3/0014-webkitgtk-workaround-conflicting-htonl-on-win64.mingw.patch deleted file mode 100644 index dcfb9626bb..0000000000 --- a/mingw-w64-webkitgtk3/0014-webkitgtk-workaround-conflicting-htonl-on-win64.mingw.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- webkitgtk-2.2.3/Source/WTF/wtf/ByteOrder.h.orig 2013-12-11 22:37:44.176510725 +0100 -+++ webkitgtk-2.2.3/Source/WTF/wtf/ByteOrder.h 2013-12-11 22:52:27.280475698 +0100 -@@ -49,17 +49,17 @@ - inline uint16_t ntohs(uint16_t x) { return x; } - inline uint16_t htons(uint16_t x) { return x; } - inline uint32_t ntohl(uint32_t x) { return x; } --inline uint32_t htonl(uint32_t x) { return x; } -+inline u_long htonl(u_long x) { return x; } - #elif CPU(MIDDLE_ENDIAN) - inline uint16_t ntohs(uint16_t x) { return x; } - inline uint16_t htons(uint16_t x) { return x; } - inline uint32_t ntohl(uint32_t x) { return WTF::wswap32(x); } --inline uint32_t htonl(uint32_t x) { return WTF::wswap32(x); } -+inline u_long htonl(u_long x) { return WTF::wswap32(x); } - #else - inline uint16_t ntohs(uint16_t x) { return WTF::bswap16(x); } - inline uint16_t htons(uint16_t x) { return WTF::bswap16(x); } - inline uint32_t ntohl(uint32_t x) { return WTF::bswap32(x); } --inline uint32_t htonl(uint32_t x) { return WTF::bswap32(x); } -+inline u_long htonl(u_long x) { return WTF::bswap32(x); } - #endif - - #endif // OS(WINDOWS) diff --git a/mingw-w64-webkitgtk3/0015-use-gstatbuf.all.patch b/mingw-w64-webkitgtk3/0015-use-gstatbuf.all.patch deleted file mode 100644 index db6d31fcf2..0000000000 --- a/mingw-w64-webkitgtk3/0015-use-gstatbuf.all.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webkitgtk-2.2.5/Source/WebCore/platform/gtk/FileSystemGtk.cpp.orig 2014-02-17 11:24:05.000000000 +0000 -+++ webkitgtk-2.2.5/Source/WebCore/platform/gtk/FileSystemGtk.cpp 2014-03-05 09:17:20.497546700 +0000 -@@ -148,7 +148,7 @@ - if (filename.isNull()) - return false; - -- struct stat statResult; -+ GStatBuf statResult; - gint result = g_stat(filename.data(), &statResult); - if (result) - return false; diff --git a/mingw-w64-webkitgtk3/0016-non-volatile-refc-in-audio.mingw.patch b/mingw-w64-webkitgtk3/0016-non-volatile-refc-in-audio.mingw.patch deleted file mode 100644 index f0a0635e4b..0000000000 --- a/mingw-w64-webkitgtk3/0016-non-volatile-refc-in-audio.mingw.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- webkitgtk-2.2.5/Source/WebCore/Modules/webaudio/AudioNode.h.orig 2014-02-17 11:24:03.000000000 +0000 -+++ webkitgtk-2.2.5/Source/WebCore/Modules/webaudio/AudioNode.h 2014-03-05 16:49:58.061619400 +0000 -@@ -212,8 +212,13 @@ - double m_lastNonSilentTime; - - // Ref-counting -+#if OS(WINCE) || COMPILER(MINGW) -+ int m_normalRefCount; -+ int m_connectionRefCount; -+#else - volatile int m_normalRefCount; - volatile int m_connectionRefCount; -+#endif - - bool m_isMarkedForDeletion; - bool m_isDisabled; diff --git a/mingw-w64-webkitgtk3/0017-make-sure-correct-gcc-is-used.mingw.patch b/mingw-w64-webkitgtk3/0017-make-sure-correct-gcc-is-used.mingw.patch deleted file mode 100644 index 107b07311a..0000000000 --- a/mingw-w64-webkitgtk3/0017-make-sure-correct-gcc-is-used.mingw.patch +++ /dev/null @@ -1,285 +0,0 @@ ---- webkitgtk-2.2.5/Source/WebCore/GNUmakefile.am.orig 2014-02-17 11:24:03.000000000 +0000 -+++ webkitgtk-2.2.5/Source/WebCore/GNUmakefile.am 2014-03-06 03:36:36.981456500 +0000 -@@ -415,11 +415,11 @@ - - .SECONDARY: - DerivedSources/WebCore/JS%.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm $(supplemental_dependency_file) $(idl_attributes_file) -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --generator JS --idlAttributesFile $(idl_attributes_file) --supplementalDependencyFile $(supplemental_dependency_file) $< -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --generator JS --idlAttributesFile $(idl_attributes_file) --supplementalDependencyFile $(supplemental_dependency_file) $< - - .SECONDARY: - DerivedSources/WebCore/JSInternalSettingsGenerated.h: DerivedSources/WebCore/InternalSettingsGenerated.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm $(supplemental_dependency_file) $(idl_attributes_file) -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --generator JS --idlAttributesFile $(idl_attributes_file) --supplementalDependencyFile $(supplemental_dependency_file) $< -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --generator JS --idlAttributesFile $(idl_attributes_file) --supplementalDependencyFile $(supplemental_dependency_file) $< - - # See https://bugs.webkit.org/show_bug.cgi?id=76388 - # We need to introduce a manual dependency to prevent non-generated sources from ---- webkitgtk-2.2.5/Source/WebCore/bindings/gobject/GNUmakefile.am.orig 2014-02-17 11:24:03.000000000 +0000 -+++ webkitgtk-2.2.5/Source/WebCore/bindings/gobject/GNUmakefile.am 2014-03-06 03:37:20.327460800 +0000 -@@ -491,7 +491,7 @@ - # Filter out SVG and IndexedDB for now - gdom_feature_defines := $(filter-out ENABLE_INDEXED_DATABASE=1, $(filter-out ENABLE_SVG%, $(feature_defines))) ENABLE_INDEXED_DATABASE=0 - DerivedSources/webkitdom/WebKitDOM%.cpp DerivedSources/webkitdom/WebKitDOM%.h DerivedSources/webkitdom/WebKitDOM%Private.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm $(WebCore)/bindings/gobject/GNUmakefile.am $(supplemental_dependency_file) -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/Modules --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/fileapi --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKITDOM)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject --supplementalDependencyFile $(supplemental_dependency_file) $< -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/Modules --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/fileapi --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKITDOM)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject --supplementalDependencyFile $(supplemental_dependency_file) $< - - libwebkitdomincludedir = $(libwebkitgtkincludedir)/webkitdom - nodist_libwebkitdominclude_HEADERS = \ ---- webkitgtk-2.2.5/Tools/WebKitTestRunner/GNUmakefile.am.orig 2014-02-17 11:24:14.000000000 +0000 -+++ webkitgtk-2.2.5/Tools/WebKitTestRunner/GNUmakefile.am 2014-03-06 03:38:06.219288300 +0000 -@@ -153,7 +153,7 @@ - Source/WebCore/bindings/scripts/generate-bindings.pl - - DerivedSources/InjectedBundle/JS%.cpp: Tools/WebKitTestRunner/InjectedBundle/Bindings/%.idl $(code_generation_dependencies) -- $(AM_V_GEN)$(PERL) \ -+ $(AM_V_GEN)CC=$(CC) $(PERL) \ - -I $(srcdir)/Source/WebCore/bindings/scripts \ - -I $(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings \ - $(srcdir)/Source/WebCore/bindings/scripts/generate-bindings.pl \ ---- webkitgtk-2.2.5/Source/WebCore/GNUmakefile.am.orig 2014-03-06 03:39:25.219320000 +0000 -+++ webkitgtk-2.2.5/Source/WebCore/GNUmakefile.am 2014-03-06 03:52:00.890778100 +0000 -@@ -143,13 +143,13 @@ - $(GENSOURCES_WEBCORE)/XPathGrammar.h: $(GENSOURCES_WEBCORE)/XPathGrammar.cpp - $(GENSOURCES_WEBCORE)/XPathGrammar.cpp: $(WebCore)/xml/XPathGrammar.y - $(AM_V_GEN) -- $(AM_V_at)perl $(WebCore)/css/makegrammar.pl --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix xpathyy $< -+ $(AM_V_at)CC=$(CC) perl $(WebCore)/css/makegrammar.pl --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix xpathyy $< - - # MathML tag and attribute names, and element factory - DerivedSources/WebCore/MathMLElementFactory.h: DerivedSources/WebCore/MathMLElementFactory.cpp - DerivedSources/WebCore/MathMLNames.h: DerivedSources/WebCore/MathMLNames.cpp - DerivedSources/WebCore/MathMLElementFactory.cpp DerivedSources/WebCore/MathMLNames.cpp: $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/mathml/mathtags.in $(WebCore)/mathml/mathattrs.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --attrs $(WebCore)/mathml/mathattrs.in --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --attrs $(WebCore)/mathml/mathattrs.in --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" - - # ---- - # SVG Support -@@ -195,13 +195,13 @@ - DerivedSources/WebCore/SVGNames.cpp: DerivedSources/WebCore/SVGElementFactory.cpp - DerivedSources/WebCore/JSSVGElementWrapperFactory.cpp: DerivedSources/WebCore/SVGElementFactory.cpp - DerivedSources/WebCore/SVGElementFactory.cpp: $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/svg/svgtags.in $(WebCore)/svg/svgattrs.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --extraDefines "$(feature_defines)" --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --extraDefines "$(feature_defines)" --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" - - # end SVG Features - - DerivedSources/WebCore/XLinkNames.h: DerivedSources/WebCore/XLinkNames.cpp - DerivedSources/WebCore/XLinkNames.cpp : $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/svg/xlinkattrs.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in --outputDir "$(GENSOURCES_WEBCORE)" - - if USE_TEXTURE_MAPPER_GL - webcore_cppflags += \ -@@ -227,7 +227,7 @@ - DerivedSources/WebCore/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/makeprop.pl - $(AM_V_GEN) - $(AM_V_at)cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in -- $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makeprop.pl" --defines "$(feature_defines)" -+ $(AM_V_at)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makeprop.pl" --defines "$(feature_defines)" - $(AM_V_at)mv CSSPropertyNames* $(GENSOURCES_WEBCORE) - - # Lower case all the values, as CSS values are case-insensitive -@@ -235,27 +235,27 @@ - DerivedSources/WebCore/CSSValueKeywords.h: $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/makevalues.pl - $(AM_V_GEN) - $(AM_V_at)cat $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in -- $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makevalues.pl" --defines "$(feature_defines)" -+ $(AM_V_at)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makevalues.pl" --defines "$(feature_defines)" - $(AM_V_at)mv CSSValueKeywords* $(GENSOURCES_WEBCORE) - - # XML Viewer CSS - DerivedSources/WebCore/XMLViewerCSS.h: $(WebCore)/xml/XMLViewer.css -- $(AM_V_GEN)$(PERL) $(WebCore)/inspector/xxd.pl XMLViewer_css $(WebCore)/xml/XMLViewer.css $(GENSOURCES_WEBCORE)/XMLViewerCSS.h -+ $(AM_V_GEN)CC=$(CC) $(PERL) $(WebCore)/inspector/xxd.pl XMLViewer_css $(WebCore)/xml/XMLViewer.css $(GENSOURCES_WEBCORE)/XMLViewerCSS.h - - # XML Viewer JS - DerivedSources/WebCore/XMLViewerJS.h: $(WebCore)/xml/XMLViewer.js -- $(AM_V_GEN)$(PERL) $(WebCore)/inspector/xxd.pl XMLViewer_js $(WebCore)/xml/XMLViewer.js $(GENSOURCES_WEBCORE)/XMLViewerJS.h -+ $(AM_V_GEN)CC=$(CC) $(PERL) $(WebCore)/inspector/xxd.pl XMLViewer_js $(WebCore)/xml/XMLViewer.js $(GENSOURCES_WEBCORE)/XMLViewerJS.h - - # HTML entity names - DerivedSources/WebCore/HTMLEntityTable.cpp: $(WebCore)/html/parser/HTMLEntityNames.in $(WebCore)/html/parser/create-html-entity-table -- $(AM_V_GEN)$(PYTHON) $(WebCore)/html/parser/create-html-entity-table -o $(GENSOURCES_WEBCORE)/HTMLEntityTable.cpp $(WebCore)/html/parser/HTMLEntityNames.in -+ $(AM_V_GEN)CC=$(CC) $(PYTHON) $(WebCore)/html/parser/create-html-entity-table -o $(GENSOURCES_WEBCORE)/HTMLEntityTable.cpp $(WebCore)/html/parser/HTMLEntityNames.in - - # CSS grammar - - DerivedSources/WebCore/CSSGrammar.h: $(GENSOURCES_WEBCORE)/CSSGrammar.cpp - DerivedSources/WebCore/CSSGrammar.cpp: $(WebCore)/css/CSSGrammar.y.in - $(AM_V_GEN) -- $(AM_V_at)perl -I $(WebCore)/bindings/scripts $(WebCore)/css/makegrammar.pl --extraDefines "$(feature_defines)" --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix cssyy $< -+ $(AM_V_at)CC=$(CC) perl -I $(WebCore)/bindings/scripts $(WebCore)/css/makegrammar.pl --extraDefines "$(feature_defines)" --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix cssyy $< - - # user agent style sheets - USER_AGENT_STYLE_SHEETS = \ -@@ -287,11 +287,11 @@ - - DerivedSources/WebCore/UserAgentStyleSheetsData.cpp: DerivedSources/WebCore/UserAgentStyleSheets.h - DerivedSources/WebCore/UserAgentStyleSheets.h: $(WebCore)/css/make-css-file-arrays.pl $(WebCore)/bindings/scripts/preprocessor.pm $(USER_AGENT_STYLE_SHEETS) -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --defines "$(feature_defines)" $@ DerivedSources/WebCore/UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS) -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --defines "$(feature_defines)" $@ DerivedSources/WebCore/UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS) - - DerivedSources/WebCore/PlugInsResourcesData.cpp: DerivedSources/WebCore/PlugInsResources.h - DerivedSources/WebCore/PlugInsResources.h: $(WebCore)/css/make-css-file-arrays.pl $(WebCore)/bindings/scripts/preprocessor.pm $(PLUG_INS_RESOURCES) -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --defines "$(feature_defines)" $@ DerivedSources/WebCore/PlugInsResourcesData.cpp $(PLUG_INS_RESOURCES) -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --defines "$(feature_defines)" $@ DerivedSources/WebCore/PlugInsResourcesData.cpp $(PLUG_INS_RESOURCES) - - - # HTML tag and attribute names -@@ -300,36 +300,36 @@ - DerivedSources/WebCore/HTMLElementFactory.h: DerivedSources/WebCore/HTMLNames.cpp - DerivedSources/WebCore/HTMLNames.cpp: DerivedSources/WebCore/HTMLNames.h - DerivedSources/WebCore/HTMLNames.h: $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/html/HTMLTagNames.in $(WebCore)/html/HTMLAttributeNames.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --extraDefines "$(feature_defines)" --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --extraDefines "$(feature_defines)" --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" - - - DerivedSources/WebCore/XMLNSNames.cpp DerivedSources/WebCore/XMLNSNames.h: $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/xml/xmlnsattrs.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlnsattrs.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlnsattrs.in --outputDir "$(GENSOURCES_WEBCORE)" - - DerivedSources/WebCore/XMLNames.cpp DerivedSources/WebCore/XMLNames.h: $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/xml/xmlattrs.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in --outputDir "$(GENSOURCES_WEBCORE)" - - DerivedSources/WebCore/EventFactory.cpp DerivedSources/WebCore/EventHeaders.h DerivedSources/WebCore/EventInterfaces.h: $(WebCore)/dom/make_event_factory.pl $(WebCore)/dom/EventNames.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/dom/EventNames.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/dom/EventNames.in --outputDir "$(GENSOURCES_WEBCORE)" - - DerivedSources/WebCore/EventTargetHeaders.h DerivedSources/WebCore/EventTargetInterfaces.h: $(WebCore)/dom/make_event_factory.pl $(WebCore)/dom/EventTargetFactory.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/dom/EventTargetFactory.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/dom/EventTargetFactory.in --outputDir "$(GENSOURCES_WEBCORE)" - - DerivedSources/WebCore/ExceptionCodeDescription.cpp DerivedSources/WebCore/ExceptionCodeDescription.h DerivedSources/WebCore/ExceptionHeaders.h DerivedSources/WebCore/ExceptionInterfaces.h: $(WebCore)/dom/make_dom_exceptions.pl $(WebCore)/dom/DOMExceptions.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/dom/DOMExceptions.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/dom/DOMExceptions.in --outputDir "$(GENSOURCES_WEBCORE)" - - DerivedSources/WebCore/SettingsMacros.h DerivedSources/WebCore/InternalSettingsGenerated.idl DerivedSources/WebCore/InternalSettingsGenerated.cpp DerivedSources/WebCore/InternalSettingsGenerated.h: $(WebCore)/page/make_settings.pl $(WebCore)/page/Settings.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/page/Settings.in --outputDir "$(GENSOURCES_WEBCORE)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --input $(WebCore)/page/Settings.in --outputDir "$(GENSOURCES_WEBCORE)" - - dom_binding_idls += \ - DerivedSources/WebCore/InternalSettingsGenerated.idl - - # All Web Inspector generated files are created with this one call to CodeGeneratorInspector.py - DerivedSources/WebCore/InspectorProtocolVersion.h : $(WebCore)/inspector/Inspector.json $(WebCore)/inspector/generate-inspector-protocol-version -- $(AM_V_GEN)$(PYTHON) $(WebCore)/inspector/generate-inspector-protocol-version -o $(GENSOURCES_WEBCORE)/InspectorProtocolVersion.h $(WebCore)/inspector/Inspector.json -+ $(AM_V_GEN)CC=$(CC) $(PYTHON) $(WebCore)/inspector/generate-inspector-protocol-version -o $(GENSOURCES_WEBCORE)/InspectorProtocolVersion.h $(WebCore)/inspector/Inspector.json - - DerivedSources/WebCore/InspectorBackendDispatcher.cpp: $(WebCore)/inspector/Inspector.json $(WebCore)/inspector/CodeGeneratorInspector.py -- $(AM_V_GEN)$(PYTHON) $(WebCore)/inspector/CodeGeneratorInspector.py $< --output_h_dir $(GENSOURCES_WEBCORE) --output_cpp_dir $(GENSOURCES_WEBCORE) --output_js_dir $(GENSOURCES_WEBCORE) -+ $(AM_V_GEN)CC=$(CC) $(PYTHON) $(WebCore)/inspector/CodeGeneratorInspector.py $< --output_h_dir $(GENSOURCES_WEBCORE) --output_cpp_dir $(GENSOURCES_WEBCORE) --output_js_dir $(GENSOURCES_WEBCORE) - DerivedSources/WebCore/InspectorTypeBuilder.h: DerivedSources/WebCore/InspectorTypeBuilder.cpp - DerivedSources/WebCore/InspectorTypeBuilder.cpp: DerivedSources/WebCore/InspectorFrontend.h - DerivedSources/WebCore/InspectorFrontend.h: DerivedSources/WebCore/InspectorFrontend.cpp -@@ -337,11 +337,11 @@ - DerivedSources/WebCore/InspectorBackendCommands.js: DerivedSources/WebCore/InspectorBackendDispatcher.h - DerivedSources/WebCore/InspectorBackendDispatcher.h: DerivedSources/WebCore/InspectorBackendDispatcher.cpp - DerivedSources/WebCore/InspectorOverlayPage.h: $(WebCore)/inspector/InspectorOverlayPage.html -- $(AM_V_GEN)$(PERL) $(WebCore)/inspector/xxd.pl InspectorOverlayPage_html $(WebCore)/inspector/InspectorOverlayPage.html $(GENSOURCES_WEBCORE)/InspectorOverlayPage.h -+ $(AM_V_GEN)CC=$(CC) $(PERL) $(WebCore)/inspector/xxd.pl InspectorOverlayPage_html $(WebCore)/inspector/InspectorOverlayPage.html $(GENSOURCES_WEBCORE)/InspectorOverlayPage.h - DerivedSources/WebCore/InjectedScriptCanvasModuleSource.h: $(WebCore)/inspector/InjectedScriptCanvasModuleSource.js -- $(AM_V_GEN)$(PERL) $(WebCore)/inspector/xxd.pl InjectedScriptCanvasModuleSource_js $(WebCore)/inspector/InjectedScriptCanvasModuleSource.js $(GENSOURCES_WEBCORE)/InjectedScriptCanvasModuleSource.h -+ $(AM_V_GEN)CC=$(CC) $(PERL) $(WebCore)/inspector/xxd.pl InjectedScriptCanvasModuleSource_js $(WebCore)/inspector/InjectedScriptCanvasModuleSource.js $(GENSOURCES_WEBCORE)/InjectedScriptCanvasModuleSource.h - DerivedSources/WebCore/InjectedScriptSource.h: $(WebCore)/inspector/InjectedScriptSource.js -- $(AM_V_GEN)$(PERL) $(WebCore)/inspector/xxd.pl InjectedScriptSource_js $(WebCore)/inspector/InjectedScriptSource.js $(GENSOURCES_WEBCORE)/InjectedScriptSource.h -+ $(AM_V_GEN)CC=$(CC) $(PERL) $(WebCore)/inspector/xxd.pl InjectedScriptSource_js $(WebCore)/inspector/InjectedScriptSource.js $(GENSOURCES_WEBCORE)/InjectedScriptSource.h - - if ENABLE_WEB_AUDIO - # Installing HRTF database wav files -@@ -405,7 +405,7 @@ - $(AM_V_GEN) - $(AM_V_at)echo -n > $(idl_files_list) - $(AM_V_at)($(foreach idl, $(dom_binding_idls), echo $(idl) &&) echo -n) >> $(idl_files_list) -- $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/preprocess-idls.pl --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --idlFilesList $(idl_files_list) --windowConstructorsFile $(window_constructors_file) --workerGlobalScopeConstructorsFile $(workerglobalscope_constructors_file) --sharedWorkerGlobalScopeConstructorsFile $(sharedworkerglobalscope_constructors_file) --dedicatedWorkerGlobalScopeConstructorsFile $(dedicatedworkerglobalscope_constructors_file) --supplementalDependencyFile $@ -+ $(AM_V_at)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/preprocess-idls.pl --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --idlFilesList $(idl_files_list) --windowConstructorsFile $(window_constructors_file) --workerGlobalScopeConstructorsFile $(workerglobalscope_constructors_file) --sharedWorkerGlobalScopeConstructorsFile $(sharedworkerglobalscope_constructors_file) --dedicatedWorkerGlobalScopeConstructorsFile $(dedicatedworkerglobalscope_constructors_file) --supplementalDependencyFile $@ - - .PHONY: $(window_constructors_file) $(workerglobalscope_constructors_file) $(sharedworkerglobalscope_constructors_file) $(dedicatedworkerglobalscope_constructors_file) - ---- webkitgtk-2.2.5/Source/WebCore/bindings/gobject/GNUmakefile.am.orig 2014-03-06 03:39:25.220820200 +0000 -+++ webkitgtk-2.2.5/Source/WebCore/bindings/gobject/GNUmakefile.am 2014-03-06 03:52:55.371196200 +0000 -@@ -466,10 +466,10 @@ - gdom_class_list := $(subst WebKitDOM,, $(filter-out %Private, $(basename $(notdir $(webkitgtk_gdom_built_sources))))) - gdom_class_list += Custom EventTarget Object - DerivedSources/webkitdom/webkitdom.h: $(WebCore)/bindings/scripts/gobject-generate-headers.pl $(WebCore)/bindings/gobject/GNUmakefile.am -- $(AM_V_GEN)echo $(gdom_class_list) | $(PERL) $< gdom > $@ -+ $(AM_V_GEN)echo $(gdom_class_list) | CC=$(CC) $(PERL) $< gdom > $@ - - DerivedSources/webkitdom/webkitdomdefines.h: $(WebCore)/bindings/scripts/gobject-generate-headers.pl $(WebCore)/bindings/gobject/GNUmakefile.am -- $(AM_V_GEN)echo $(gdom_class_list) | $(PERL) $< defines > $@ -+ $(AM_V_GEN)echo $(gdom_class_list) | CC=$(CC) $(PERL) $< defines > $@ - - # Because WebCore/bindings/gobject/WebKitDOMObject.h is static source but is also a distributed header - # required by other distributed headers (both static and auto-generated), need to move this to the ---- webkitgtk-2.2.5/Tools/TestWebKitAPI/GNUmakefile.am.orig 2014-03-06 03:39:24.734758500 +0000 -+++ webkitgtk-2.2.5/Tools/TestWebKitAPI/GNUmakefile.am 2014-03-06 03:53:30.491155900 +0000 -@@ -917,11 +917,11 @@ - - - stamp-testwebkitapi-webcore-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_WebCore_TestWebCore_SOURCES) -- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI/Tests/WebCore $(GENSOURCES_WEBCORE)/include gtk \ -+ $(AM_V_GEN)CC=$(CC) $(PERL) $< $(srcdir)/Tools/TestWebKitAPI/Tests/WebCore $(GENSOURCES_WEBCORE)/include gtk \ - && echo timestamp > $(@F) - - stamp-testwebkitapi-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_WebKit2_TestWebKit2_SOURCES) $(Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES) -- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk \ -+ $(AM_V_GEN)CC=$(CC) $(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk \ - && echo timestamp > $(@F) - - BUILT_SOURCES += $(top_builddir)/stamp-testwebkitapi-webcore-forwarding-headers ---- webkitgtk-2.2.5/Tools/WebKitTestRunner/GNUmakefile.am.orig 2014-03-06 03:39:25.221820300 +0000 -+++ webkitgtk-2.2.5/Tools/WebKitTestRunner/GNUmakefile.am 2014-03-06 03:54:14.746775700 +0000 -@@ -1,6 +1,6 @@ - - stamp-webkittestrunner-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_WebKitTestRunner_SOURCES) $(Libraries_libTestRunnerInjectedBundle_la_SOURCES) -- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include gtk \ -+ $(AM_V_GEN)CC=$(CC) $(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include gtk \ - && echo timestamp > $(@F) - - BUILT_SOURCES += $(top_builddir)/stamp-webkittestrunner-forwarding-headers ---- webkitgtk-2.2.5/Source/JavaScriptCore/GNUmakefile.am.orig 2014-02-17 11:24:02.000000000 +0000 -+++ webkitgtk-2.2.5/Source/JavaScriptCore/GNUmakefile.am 2014-03-06 03:55:05.726249200 +0000 -@@ -81,24 +81,24 @@ - $(shell mkdir -p DerivedSources/JavaScriptCore) - - DerivedSources/JavaScriptCore/Lexer.lut.h: $(srcdir)/Source/JavaScriptCore/create_hash_table $(srcdir)/Source/JavaScriptCore/parser/Keywords.table -- $(AM_V_GEN)$(PERL) $^ > $@ -+ $(AM_V_GEN)CC=$(CC) $(PERL) $^ > $@ - - DerivedSources/JavaScriptCore/%.lut.h: $(srcdir)/Source/JavaScriptCore/create_hash_table $(srcdir)/Source/JavaScriptCore/runtime/%.cpp -- $(AM_V_GEN)$(PERL) $^ -i > $@ -+ $(AM_V_GEN)CC=$(CC) $(PERL) $^ -i > $@ - - DerivedSources/JavaScriptCore/RegExpJitTables.h: $(srcdir)/Source/JavaScriptCore/create_regex_tables -- $(AM_V_GEN)$(PYTHON) $^ > $@ -+ $(AM_V_GEN)CC=$(CC) $(PYTHON) $^ > $@ - - DerivedSources/JavaScriptCore/KeywordLookup.h: $(srcdir)/Source/JavaScriptCore/KeywordLookupGenerator.py $(srcdir)/Source/JavaScriptCore/parser/Keywords.table -- $(AM_V_GEN)$(PYTHON) $^ > $@ -+ $(AM_V_GEN)CC=$(CC) $(PYTHON) $^ > $@ - - DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h: $(javascriptcore_sources) $(llint_nosources) $(offlineasm_nosources) -- $(AM_V_GEN)$(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm $@ -+ $(AM_V_GEN)CC=$(CC) $(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm $@ - - $(Programs_LLIntOffsetsExtractor_OBJECTS): DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h - - DerivedSources/JavaScriptCore/LLIntAssembly.h: Programs/LLIntOffsetsExtractor$(EXEEXT) -- $(AM_V_GEN)$(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/asm.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor$(EXEEXT) $@ -+ $(AM_V_GEN)CC=$(CC) $(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/asm.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor$(EXEEXT) $@ - - $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_OBJECTS): DerivedSources/JavaScriptCore/LLIntAssembly.h - ---- webkitgtk-2.2.5/Source/Platform/GNUmakefile.am.orig 2014-03-06 03:39:24.590740200 +0000 -+++ webkitgtk-2.2.5/Source/Platform/GNUmakefile.am 2014-03-06 03:55:39.352519200 +0000 -@@ -123,8 +123,8 @@ - $(LIBSOUP_CFLAGS) - - DerivedSources/Platform/ColorData.cpp: $(WebCore)/platform/ColorData.gperf $(WebCore)/make-hash-tools.pl -- $(AM_V_GEN)$(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES_PLATFORM) $(WebCore)/platform/ColorData.gperf -+ $(AM_V_GEN)CC=$(CC) $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES_PLATFORM) $(WebCore)/platform/ColorData.gperf - - DerivedSources/Platform/WebKitFontFamilyNames.cpp: DerivedSources/Platform/WebKitFontFamilyNames.h - DerivedSources/Platform/WebKitFontFamilyNames.h: $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/css/WebKitFontFamilyNames.in -- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --fonts $(WebCore)/css/WebKitFontFamilyNames.in --outputDir "$(GENSOURCES_PLATFORM)" -+ $(AM_V_GEN)CC=$(CC) $(PERL) -I$(WebCore)/bindings/scripts $< --fonts $(WebCore)/css/WebKitFontFamilyNames.in --outputDir "$(GENSOURCES_PLATFORM)" diff --git a/mingw-w64-webkitgtk3/0018-use-la-libs-for-g-i.all.patch b/mingw-w64-webkitgtk3/0018-use-la-libs-for-g-i.all.patch deleted file mode 100644 index ef2f1e244b..0000000000 --- a/mingw-w64-webkitgtk3/0018-use-la-libs-for-g-i.all.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- webkitgtk-2.2.5/Source/WebKit/gtk/GNUmakefile.am.orig 2014-02-17 11:24:13.000000000 +0000 -+++ webkitgtk-2.2.5/Source/WebKit/gtk/GNUmakefile.am 2014-03-07 02:38:18.647631200 +0000 -@@ -301,8 +301,8 @@ - --include=Gtk-@GTK_API_VERSION@ \ - --include=JavaScriptCore-@WEBKITGTK_API_VERSION@ \ - --include=Soup-2.4 \ -- --library=webkitgtk-@WEBKITGTK_API_VERSION@ \ -- --library=javascriptcoregtk-@WEBKITGTK_API_VERSION@ \ -+ --library=libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ -+ --library=libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ - --libtool="$(LIBTOOL)" \ - --pkg=gobject-2.0 \ - --pkg=gtk+-@GTK_API_VERSION@ \ diff --git a/mingw-w64-webkitgtk3/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch b/mingw-w64-webkitgtk3/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch new file mode 100644 index 0000000000..71867999ce --- /dev/null +++ b/mingw-w64-webkitgtk3/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch @@ -0,0 +1,29 @@ +From 0505839dc1793406aa37bc95ee51ea361e9508a0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= + =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= +Date: Tue, 14 Apr 2015 14:53:29 +0000 +Subject: [PATCH 20/20] [W32] Fixup dummy HeapStatistics implementation + +GCC warns that exitWithFailure is marked as noreturn, but it does return: +../webkitgtk-2.4.8/Source/JavaScriptCore/heap/HeapStatistics.cpp:135:1: warning: 'noreturn' function does return + +Call exit(-1) to indicate that no, there is no returning from here. +--- + Source/JavaScriptCore/heap/HeapStatistics.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Source/JavaScriptCore/heap/HeapStatistics.cpp b/Source/JavaScriptCore/heap/HeapStatistics.cpp +index f23def7..ba441f0 100644 +--- a/Source/JavaScriptCore/heap/HeapStatistics.cpp ++++ b/Source/JavaScriptCore/heap/HeapStatistics.cpp +@@ -132,6 +132,7 @@ void HeapStatistics::logStatistics() + + void HeapStatistics::exitWithFailure() + { ++ exit(-1); + } + + void HeapStatistics::reportSuccess() +-- +1.8.5.3 + diff --git a/mingw-w64-webkitgtk3/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch b/mingw-w64-webkitgtk3/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch new file mode 100644 index 0000000000..2300a2291b --- /dev/null +++ b/mingw-w64-webkitgtk3/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch @@ -0,0 +1,68 @@ +From f90a814ad83d7c6279eaf1fc59d3d373ba7af259 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= + =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= +Date: Tue, 14 Apr 2015 17:50:25 +0000 +Subject: [PATCH 21/21] [W32] Change printf format atribute to gnu_printf, + MinGW compatibility + +"printf" means "gnu_printf" when compiling for non-Windows and means +"ms_printf" when compiling for Windows. The code, however, does seems to be +assuming gnu_printf (judging by the use of %z and %l). + +Fix this by explicitly specifying gnu_printf format style. +To ensure that gnu-compatible printf implementation is used, compile +with -D__USE_MINGW_ANSI_STDIO=1, it will automagically turn all *printf() +invocations into __mingw_*printf(), which are gnu-compatible. + +Only one function that won't be turned is _vsnprintf(). Ifdef its use and +call vsnprintf() instead when __USE_MINGW_ANSI_STDIO != 0. +--- + Source/WTF/wtf/Assertions.cpp | 11 ++++++++++- + Source/WTF/wtf/Assertions.h | 4 ++-- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp +index a370302..d846777 100644 +--- a/Source/WTF/wtf/Assertions.cpp ++++ b/Source/WTF/wtf/Assertions.cpp +@@ -116,12 +116,21 @@ static void vprintf_stderr_common(const char* format, va_list args) + size_t size = 1024; + + do { ++ int printed; + char* buffer = (char*)malloc(size); + + if (buffer == NULL) + break; + +- if (_vsnprintf(buffer, size, format, args) != -1) { ++#if defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0 ++ /* vsnprintf is a macro for __mingw_vsnprintf */ ++ printed = vsnprintf(buffer, size, format, args); ++#else ++ /* _vsnprintf is always _vsnprintf from MS CRT */ ++ printed = _vsnprintf(buffer, size, format, args); ++#endif ++ ++ if (printed != -1) { + #if OS(WINCE) + // WinCE only supports wide chars + wchar_t* wideBuffer = (wchar_t*)malloc(size * sizeof(wchar_t)); +diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h +index 4d968b8..cb7c7e4 100644 +--- a/Source/WTF/wtf/Assertions.h ++++ b/Source/WTF/wtf/Assertions.h +@@ -85,8 +85,8 @@ + /* WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute + emits a warning when %@ is used in the format string. Until is resolved we can't include + the attribute when being used from Objective-C code in case it decides to use %@. */ +-#if COMPILER(GCC) && !defined(__OBJC__) +-#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments))) ++#if COMPILER(GCC) && !defined(__OBJC__) && (!OS(WINDOWS) || (defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0)) ++#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(gnu_printf, formatStringArgument, extraArguments))) + #else + #define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) + #endif +-- +1.8.5.3 + diff --git a/mingw-w64-webkitgtk3/0021-use-configured-python-for-this.all.patch b/mingw-w64-webkitgtk3/0021-use-configured-python-for-this.all.patch deleted file mode 100644 index f00308386c..0000000000 --- a/mingw-w64-webkitgtk3/0021-use-configured-python-for-this.all.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webkitgtk-2.2.5/Tools/GNUmakefile.am.orig 2014-03-06 21:39:54.549599500 +0000 -+++ webkitgtk-2.2.5/Tools/GNUmakefile.am 2014-03-07 03:09:13.386653100 +0000 -@@ -340,7 +340,7 @@ - endif - - docs-build.stamp: $(docs_build_stamp_list) -- CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc -+ CC=$(CC) $(PYTHON) $(srcdir)/Tools/gtk/generate-gtkdoc - @touch docs-build.stamp - - clean-local: doc-clean-local diff --git a/mingw-w64-webkitgtk3/0022-gl-casts.patch b/mingw-w64-webkitgtk3/0022-gl-casts.patch new file mode 100644 index 0000000000..d926c0cd2b --- /dev/null +++ b/mingw-w64-webkitgtk3/0022-gl-casts.patch @@ -0,0 +1,11 @@ +--- webkitgtk-2.4.9/Source/WebCore/platform/graphics/GLContext.cpp.orig 2015-07-12 20:33:29.627600000 +0300 ++++ webkitgtk-2.4.9/Source/WebCore/platform/graphics/GLContext.cpp 2015-07-12 20:33:36.054800000 +0300 +@@ -159,7 +159,7 @@ + return glxContext.release(); + #endif + #if USE(EGL) +- if (OwnPtr eglContext = GLContextEGL::createContext(windowHandle, sharingContext)) ++ if (OwnPtr eglContext = GLContextEGL::createContext((EGLNativeWindowType)windowHandle, sharingContext)) + return eglContext.release(); + #endif + return nullptr; diff --git a/mingw-w64-webkitgtk3/0023-use-path-instead-of-ld-library-path-on.mingw.patch b/mingw-w64-webkitgtk3/0023-use-path-instead-of-ld-library-path-on.mingw.patch deleted file mode 100644 index 316f78073b..0000000000 --- a/mingw-w64-webkitgtk3/0023-use-path-instead-of-ld-library-path-on.mingw.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- webkitgtk-2.2.5/Tools/gtk/gtkdoc.py.orig 2014-03-07 03:54:22.115118000 +0000 -+++ webkitgtk-2.2.5/Tools/gtk/gtkdoc.py 2014-03-07 03:58:35.546299600 +0000 -@@ -312,11 +312,18 @@ - ldflags = self.ldflags - if self.library_path: - ldflags = ' "-L%s" ' % self.library_path + ldflags -- current_ld_library_path = env.get('LD_LIBRARY_PATH') -- if current_ld_library_path: -- env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path) -+ if os.name == 'nt' or sys.platform == 'cygwin': -+ current_path = env.get('PATH') -+ if current_path: -+ env['RUN'] = 'PATH="%s:%s" ' % (self.library_path, current_path) -+ else: -+ env['RUN'] = 'PATH="%s" ' % self.library_path - else: -- env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path -+ current_ld_library_path = env.get('LD_LIBRARY_PATH') -+ if current_ld_library_path: -+ env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path) -+ else: -+ env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path - - if ldflags: - env['LDFLAGS'] = '%s %s' % (ldflags, env.get('LDFLAGS', '')) diff --git a/mingw-w64-webkitgtk3/0024-use-stabs-to-get-smaller-debug-builds.mingw.patch b/mingw-w64-webkitgtk3/0024-use-stabs-to-get-smaller-debug-builds.mingw.patch deleted file mode 100644 index 5fb964f7fe..0000000000 --- a/mingw-w64-webkitgtk3/0024-use-stabs-to-get-smaller-debug-builds.mingw.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- webkitgtk-2.2.5/Source/autotools/SetupCompilerFlags.m4.orig 2014-02-17 11:24:13.000000000 +0000 -+++ webkitgtk-2.2.5/Source/autotools/SetupCompilerFlags.m4 2014-03-07 12:21:56.378818300 +0000 -@@ -32,8 +32,8 @@ - CXXFLAGS="$CXXFLAGS -g1" - CFLAGS="$CFLAGS -g1" - elif test "$enable_debug_symbols" != "no"; then -- CXXFLAGS="$CXXFLAGS -g" -- CFLAGS="$CFLAGS -g" -+ CXXFLAGS="$CXXFLAGS -gstabs" -+ CFLAGS="$CFLAGS -gstabs" - fi - - # Add the appropriate 'O' level for optimized builds. diff --git a/mingw-w64-webkitgtk3/0025-webkitgtk-2.2.5-icu-libraries.patch b/mingw-w64-webkitgtk3/0025-webkitgtk-2.2.5-icu-libraries.patch deleted file mode 100644 index 18fcd5a9ba..0000000000 --- a/mingw-w64-webkitgtk3/0025-webkitgtk-2.2.5-icu-libraries.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webkitgtk-2.2.5/Source/autotools/FindDependencies.m4.orig 2014-03-07 22:47:16.704400000 +0400 -+++ webkitgtk-2.2.5/Source/autotools/FindDependencies.m4 2014-03-07 22:50:52.967200000 +0400 -@@ -110,7 +110,7 @@ - ;; - *-*-mingw*) - UNICODE_CFLAGS="" -- UNICODE_LIBS="-licui18n -licuuc" -+ UNICODE_LIBS="-licuin -licuuc" - AC_CHECK_HEADERS([unicode/uchar.h], [], [AC_MSG_ERROR([Could not find ICU headers.])]) - ;; - *) diff --git a/mingw-w64-webkitgtk3/0026-webkitgtk-mingw-gnu-print.patch b/mingw-w64-webkitgtk3/0026-webkitgtk-mingw-gnu-print.patch deleted file mode 100644 index 2028e23bc5..0000000000 --- a/mingw-w64-webkitgtk3/0026-webkitgtk-mingw-gnu-print.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- webkitgtk-2.2.5/Tools/TestWebKitAPI/Tests/WTF/IntegerToStringConversion.cpp.orig 2014-03-08 18:03:07.528800000 +0400 -+++ webkitgtk-2.2.5/Tools/TestWebKitAPI/Tests/WTF/IntegerToStringConversion.cpp 2014-03-08 18:05:39.769200000 +0400 -@@ -42,7 +42,7 @@ - const char PrintfFormatTrait::format[] = "%ld"; - - template<> struct PrintfFormatTrait { static const char format[]; }; --#if OS(WINDOWS) && !PLATFORM(QT) -+#if OS(WINDOWS) && !PLATFORM(QT) && !defined(__USE_MINGW_ANSI_STDIO) - const char PrintfFormatTrait::format[] = "%I64i"; - #else - const char PrintfFormatTrait::format[] = "%lli"; -@@ -58,7 +58,7 @@ - const char PrintfFormatTrait::format[] = "%lu"; - - template<> struct PrintfFormatTrait { static const char format[]; }; --#if OS(WINDOWS) && !PLATFORM(QT) -+#if OS(WINDOWS) && !PLATFORM(QT) && !defined(__USE_MINGW_ANSI_STDIO) - const char PrintfFormatTrait::format[] = "%I64u"; - #else - const char PrintfFormatTrait::format[] = "%llu"; ---- webkitgtk-2.2.5/Source/WebCore/loader/FTPDirectoryParser.cpp.orig 2014-03-08 18:53:11.563600000 +0400 -+++ webkitgtk-2.2.5/Source/WebCore/loader/FTPDirectoryParser.cpp 2014-03-08 18:55:30.965200000 +0400 -@@ -188,7 +188,7 @@ - if (pos < linelen && line[pos] == ',') - { - unsigned long long seconds = 0; --#if OS(WINDOWS) -+#if OS(WINDOWS) && !defined(__USE_MINGW_ANSI_STDIO) - sscanf(p + 1, "%I64u", &seconds); - #else - sscanf(p + 1, "%llu", &seconds); ---- webkitgtk-2.2.5/Source/WebCore/loader/icon/IconDatabase.cpp.orig 2014-03-08 19:04:04.267000000 +0400 -+++ webkitgtk-2.2.5/Source/WebCore/loader/icon/IconDatabase.cpp 2014-03-08 19:04:17.386600000 +0400 -@@ -1711,7 +1711,7 @@ - SQLiteStatement pageDeleteSQL(m_syncDB, "DELETE FROM PageURL WHERE rowid = (?);"); - pageDeleteSQL.prepare(); - for (size_t i = 0; i < numToDelete; ++i) { --#if OS(WINDOWS) -+#if OS(WINDOWS) && !defined(__USE_MINGW_ANSI_STDIO) - LOG(IconDatabase, "Pruning page with rowid %I64i from disk", static_cast(pageIDsToDelete[i])); - #else - LOG(IconDatabase, "Pruning page with rowid %lli from disk", static_cast(pageIDsToDelete[i])); ---- webkitgtk-2.2.5/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp.orig 2014-03-08 19:07:17.561400000 +0400 -+++ webkitgtk-2.2.5/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2014-03-08 19:07:28.621800000 +0400 -@@ -767,7 +767,7 @@ - } - - if (error) --#if OS(WINDOWS) -+#if OS(WINDOWS) && !defined(__USE_MINGW_ANSI_STDIO) - LOG_ERROR("Failed to set quota %I64u in tracker database for origin %s", quota, origin->databaseIdentifier().ascii().data()); - #else - LOG_ERROR("Failed to set quota %llu in tracker database for origin %s", quota, origin->databaseIdentifier().ascii().data()); ---- webkitgtk-2.2.5/Source/WebCore/platform/sql/SQLiteDatabase.cpp.orig 2014-03-08 19:09:22.623000000 +0400 -+++ webkitgtk-2.2.5/Source/WebCore/platform/sql/SQLiteDatabase.cpp 2014-03-08 19:09:26.913000000 +0400 -@@ -178,7 +178,7 @@ - SQLiteStatement statement(*this, "PRAGMA max_page_count = " + String::number(newMaxPageCount)); - statement.prepare(); - if (statement.step() != SQLResultRow) --#if OS(WINDOWS) -+#if OS(WINDOWS) && !defined(__USE_MINGW_ANSI_STDIO) - LOG_ERROR("Failed to set maximum size of database to %I64i bytes", static_cast(size)); - #else - LOG_ERROR("Failed to set maximum size of database to %lli bytes", static_cast(size)); diff --git a/mingw-w64-webkitgtk3/0027-webkitgtk-windows-fix-egl.patch b/mingw-w64-webkitgtk3/0027-webkitgtk-windows-fix-egl.patch deleted file mode 100644 index a0fd52199d..0000000000 --- a/mingw-w64-webkitgtk3/0027-webkitgtk-windows-fix-egl.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- webkitgtk-2.2.5/Source/WebCore/platform/graphics/GLContext.h.orig 2013-12-11 22:37:44.176510725 +0100 -+++ webkitgtk-2.2.5/Source/WebCore/platform/graphics/GLContext.h 2013-12-11 22:52:27.280475698 +0100 -@@ -25,8 +25,8 @@ - #include - #include - --#if USE(EGL) && !PLATFORM(GTK) --#include "eglplatform.h" -+#if USE(EGL) -+#include - typedef EGLNativeWindowType GLNativeWindowType; - #else - typedef uint64_t GLNativeWindowType; diff --git a/mingw-w64-webkitgtk3/0028-Use-after-free-in-WTF-threading-code.patch b/mingw-w64-webkitgtk3/0028-Use-after-free-in-WTF-threading-code.patch deleted file mode 100644 index d79f5f6e89..0000000000 --- a/mingw-w64-webkitgtk3/0028-Use-after-free-in-WTF-threading-code.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- webkitgtk-2.2.5/Source/WTF/wtf/ThreadingWin.cpp.orig 2014-02-17 11:24:03.000000000 +0000 -+++ webkitgtk-2.2.5/Source/WTF/wtf/ThreadingWin.cpp 2014-03-12 07:21:46.144842200 +0000 -@@ -212,8 +212,10 @@ - - static unsigned __stdcall wtfThreadEntryPoint(void* param) - { -- OwnPtr invocation = adoptPtr(static_cast(param)); -- invocation->function(invocation->data); -+ { -+ OwnPtr invocation = adoptPtr(static_cast(param)); -+ invocation->function(invocation->data); -+ } - - #if !USE(PTHREADS) && OS(WINDOWS) - // Do the TLS cleanup. diff --git a/mingw-w64-webkitgtk3/0029-pass-python-and-cflags-to-girscanner.patch b/mingw-w64-webkitgtk3/0029-pass-python-and-cflags-to-girscanner.patch deleted file mode 100644 index f01c1a07e3..0000000000 --- a/mingw-w64-webkitgtk3/0029-pass-python-and-cflags-to-girscanner.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- webkitgtk-2.2.5/GNUmakefile.in.orig 2014-03-28 14:01:52.271600000 +0400 -+++ webkitgtk-2.2.5/GNUmakefile.in 2014-03-28 14:06:34.709600000 +0400 -@@ -78633,7 +78633,9 @@ - - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@WebKit2-@WEBKITGTK_API_VERSION@.gir: $(G_IR_SCANNER) libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ $(AM_V_GEN) \ -+@ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ CC=$(CC) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ CFLAGS="$(CFLAGS) -Wno-deprecated-declarations" \ -+@ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ $(PYTHON) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ $(G_IR_SCANNER) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ --quiet \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ --warn-all \ -@@ -78656,6 +78658,8 @@ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ --add-include-path=$(WebKit2) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ --add-include-path=$(top_builddir) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ --c-include="webkit2/webkit2.h" \ -+@ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ $(GTK_CFLAGS) \ -+@ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ $(LIBSOUP_CFLAGS) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ -I$(srcdir)/Source \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ -I$(WebKit2) \ - @ENABLE_INTROSPECTION_TRUE@@ENABLE_WEBKIT2_TRUE@ -I$(GENSOURCES) \ ---- webkitgtk-2.2.5/Source/WebKit/gtk/GNUmakefile.am.orig 2014-03-28 14:02:42.675200000 +0400 -+++ webkitgtk-2.2.5/Source/WebKit/gtk/GNUmakefile.am 2014-03-28 14:05:16.538000000 +0400 -@@ -289,7 +289,9 @@ - if ENABLE_INTROSPECTION - WebKit-@WEBKITGTK_API_VERSION@.gir: $(G_IR_SCANNER) JavaScriptCore-@WEBKITGTK_API_VERSION@.gir libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la - $(AM_V_GEN) \ -+ CC=$(CC) \ - CFLAGS="$(CFLAGS) -Wno-deprecated-declarations" \ -+ $(PYTHON) \ - $(G_IR_SCANNER) \ - --quiet \ - --warn-all \ -@@ -313,6 +315,8 @@ - --add-include-path=$(top_builddir) \ - --c-include="webkit/webkit.h" \ - -DBUILDING_WEBKIT \ -+ $(GTK_CFLAGS) \ -+ $(LIBSOUP_CFLAGS) \ - -I$(srcdir)/Source \ - -I$(WebKit) \ - -I$(GENSOURCES) \ ---- webkitgtk-2.2.5/Source/WebKit2/GNUmakefile.am.orig 2014-03-28 14:03:01.629200000 +0400 -+++ webkitgtk-2.2.5/Source/WebKit2/GNUmakefile.am 2014-03-28 14:05:00.111200000 +0400 -@@ -281,7 +281,9 @@ - - WebKit2-@WEBKITGTK_API_VERSION@.gir: $(G_IR_SCANNER) libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la - $(AM_V_GEN) \ -+ CC=$(CC) \ - CFLAGS="$(CFLAGS) -Wno-deprecated-declarations" \ -+ $(PYTHON) \ - $(G_IR_SCANNER) \ - --quiet \ - --warn-all \ -@@ -304,6 +306,8 @@ - --add-include-path=$(WebKit2) \ - --add-include-path=$(top_builddir) \ - --c-include="webkit2/webkit2.h" \ -+ $(GTK_CFLAGS) \ -+ $(LIBSOUP_CFLAGS) \ - -I$(srcdir)/Source \ - -I$(WebKit2) \ - -I$(GENSOURCES) \ diff --git a/mingw-w64-webkitgtk3/0101-webkitgtk-2.4.3-gcc-asm.all.patch b/mingw-w64-webkitgtk3/0101-webkitgtk-2.4.3-gcc-asm.all.patch new file mode 100644 index 0000000000..66d0ca104f --- /dev/null +++ b/mingw-w64-webkitgtk3/0101-webkitgtk-2.4.3-gcc-asm.all.patch @@ -0,0 +1,26 @@ +--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp ++++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp +@@ -487,7 +487,12 @@ JSValue CLoop::execute(CallFrame* callFrame, Opcode entryOpcode, bool isInitiali + rBasePC.vp = codeBlock->instructions().begin(); + #endif // USE(JSVALUE64) + ++#if ENABLE(COMPUTED_GOTO_OPCODES) + goto llint_generic_return_point; ++#else ++ /* (most probably) causes null pointer dereference: ++ * NEXT_INSTRUCTION(); */ ++#endif + + } // END doReturnHelper. + +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -794,7 +794,7 @@ + #endif + + /* Configure the interpreter */ +-#if COMPILER(GCC) ++#if COMPILER(GCC) && !OS(WINDOWS) + #define HAVE_COMPUTED_GOTO 1 + #endif + diff --git a/mingw-w64-webkitgtk3/PKGBUILD b/mingw-w64-webkitgtk3/PKGBUILD index bcb8e79431..0f9a1f6ce1 100644 --- a/mingw-w64-webkitgtk3/PKGBUILD +++ b/mingw-w64-webkitgtk3/PKGBUILD @@ -1,110 +1,66 @@ # Maintainer: Alexey Pavlov _realname=webkitgtk +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}2" "${MINGW_PACKAGE_PREFIX}-${_realname}3") -pkgver=2.2.8 -pkgrel=1 +pkgver=2.4.9 +pkgrel=3 pkgdesc="GTK+ Web content engine library (mingw-w64)" arch=('any') url="http://webkitgtk.org/" license=("custom") -options=('!libtool' 'strip' '!debug' 'staticlibs') +options=('!libtool' 'strip' '!debug' 'staticlibs' 'buildflags') makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-gobject-introspection" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-gtk2" - "${MINGW_PACKAGE_PREFIX}-gtk3" - "bison" - "flex" - "gperf" - "libtool" - "gtk-doc" - "perl" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-ruby" - ) -depends=( - "${MINGW_PACKAGE_PREFIX}-angleproject" - "${MINGW_PACKAGE_PREFIX}-cairo" - "${MINGW_PACKAGE_PREFIX}-enchant" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-glib2" - "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" - "${MINGW_PACKAGE_PREFIX}-gstreamer" - "${MINGW_PACKAGE_PREFIX}-geoclue" - "${MINGW_PACKAGE_PREFIX}-harfbuzz" - "${MINGW_PACKAGE_PREFIX}-icu" - "${MINGW_PACKAGE_PREFIX}-libidn" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libsoup" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-pango" - "${MINGW_PACKAGE_PREFIX}-xz" - ) + "${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-gtk2" + "${MINGW_PACKAGE_PREFIX}-gtk3" + "bison" + "flex" + "gperf" + "libtool" + "gtk-doc" + "perl" + "python2" + "${MINGW_PACKAGE_PREFIX}-ruby" + ) +depends=("${MINGW_PACKAGE_PREFIX}-angleproject" + "${MINGW_PACKAGE_PREFIX}-cairo" + "${MINGW_PACKAGE_PREFIX}-enchant" + "${MINGW_PACKAGE_PREFIX}-fontconfig" + "${MINGW_PACKAGE_PREFIX}-freetype" + "${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" + "${MINGW_PACKAGE_PREFIX}-gstreamer" + "${MINGW_PACKAGE_PREFIX}-geoclue" + "${MINGW_PACKAGE_PREFIX}-harfbuzz" + "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-libjpeg" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-pango" + "${MINGW_PACKAGE_PREFIX}-xz" + ) source=(http://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz - 0001-webkitgtk-remove-reference-to-nonexisting-header.mingw.patch - 0002-webkitgtk-mingw-use-gcc-asm.mingw.patch - 0003-webkit-dont-build-dump-render-tree.mingw.patch - 0004-webkitgtk-mingw-dont-declare-readwritebarrier.mingw.patch - 0005-webkitgtk-mingw-compile-fix.mingw.patch - 0006-webkitgtk-mingw-prevent-no-error-name-conflict.mingw.patch - 0007-webkitgtk-mingw-fix-includes.mingw.patch - 0008-webkit-fix-angle-windows-compilation.mingw.patch - 0009-webkitgtk-mingw-m-pi.mingw.patch - 0010-webkitgtk-prevent-multiple-plugins-definitions.mingw.patch - 0011-webkitgtk-mingw-opengl.mingw.patch - 0012-webkitgtk-dont-build-test-webkit-api.mingw.patch - 0013-webkitgtk-redo-commit-148663.mingw.patch - 0014-webkitgtk-workaround-conflicting-htonl-on-win64.mingw.patch - 0015-use-gstatbuf.all.patch - 0016-non-volatile-refc-in-audio.mingw.patch - 0017-make-sure-correct-gcc-is-used.mingw.patch - 0018-use-la-libs-for-g-i.all.patch - 0021-use-configured-python-for-this.all.patch - 0023-use-path-instead-of-ld-library-path-on.mingw.patch - 0024-use-stabs-to-get-smaller-debug-builds.mingw.patch - 0025-webkitgtk-2.2.5-icu-libraries.patch - 0026-webkitgtk-mingw-gnu-print.patch - 0027-webkitgtk-windows-fix-egl.patch - 0028-Use-after-free-in-WTF-threading-code.patch - 0029-pass-python-and-cflags-to-girscanner.patch) + 0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch + 0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch + 0022-gl-casts.patch + 0101-webkitgtk-2.4.3-gcc-asm.all.patch) prepare() { cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/0001-webkitgtk-remove-reference-to-nonexisting-header.mingw.patch - patch -p1 -i ${srcdir}/0002-webkitgtk-mingw-use-gcc-asm.mingw.patch - patch -p1 -i ${srcdir}/0003-webkit-dont-build-dump-render-tree.mingw.patch - patch -p1 -i ${srcdir}/0004-webkitgtk-mingw-dont-declare-readwritebarrier.mingw.patch - patch -p1 -i ${srcdir}/0005-webkitgtk-mingw-compile-fix.mingw.patch - patch -p1 -i ${srcdir}/0006-webkitgtk-mingw-prevent-no-error-name-conflict.mingw.patch - patch -p1 -i ${srcdir}/0007-webkitgtk-mingw-fix-includes.mingw.patch - patch -p1 -i ${srcdir}/0008-webkit-fix-angle-windows-compilation.mingw.patch - patch -p1 -i ${srcdir}/0009-webkitgtk-mingw-m-pi.mingw.patch - patch -p1 -i ${srcdir}/0010-webkitgtk-prevent-multiple-plugins-definitions.mingw.patch - patch -p1 -i ${srcdir}/0011-webkitgtk-mingw-opengl.mingw.patch - patch -p1 -i ${srcdir}/0012-webkitgtk-dont-build-test-webkit-api.mingw.patch - patch -p1 -i ${srcdir}/0013-webkitgtk-redo-commit-148663.mingw.patch - patch -p1 -i ${srcdir}/0014-webkitgtk-workaround-conflicting-htonl-on-win64.mingw.patch - patch -p1 -i ${srcdir}/0015-use-gstatbuf.all.patch - patch -p1 -i ${srcdir}/0016-non-volatile-refc-in-audio.mingw.patch - patch -p1 -i ${srcdir}/0017-make-sure-correct-gcc-is-used.mingw.patch - patch -p1 -i ${srcdir}/0018-use-la-libs-for-g-i.all.patch - patch -p1 -i ${srcdir}/0021-use-configured-python-for-this.all.patch - patch -p1 -i ${srcdir}/0023-use-path-instead-of-ld-library-path-on.mingw.patch - patch -p1 -i ${srcdir}/0024-use-stabs-to-get-smaller-debug-builds.mingw.patch - patch -p1 -i ${srcdir}/0025-webkitgtk-2.2.5-icu-libraries.patch - patch -p1 -i ${srcdir}/0026-webkitgtk-mingw-gnu-print.patch - patch -p1 -i ${srcdir}/0027-webkitgtk-windows-fix-egl.patch - patch -p1 -i ${srcdir}/0028-Use-after-free-in-WTF-threading-code.patch - patch -p1 -i ${srcdir}/0029-pass-python-and-cflags-to-girscanner.patch + patch -p1 -i ${srcdir}/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch + patch -p1 -i ${srcdir}/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch + patch -p1 -i ${srcdir}/0022-gl-casts.patch + patch -p1 -i ${srcdir}/0101-webkitgtk-2.4.3-gcc-asm.all.patch + + # autoreconf --verbose --install -I Source/autotools - autoreconf --verbose --install -I Source/autotools - rm -rf ${srcdir}/build-gtk{2,3} mkdir -p ${srcdir}/build-gtk{2,3} } @@ -113,7 +69,7 @@ _build() { _ver="$1"; shift cd ${srcdir}/build-${_ver} - export PYTHON=${MINGW_PREFIX}/bin/python2 + export PYTHON=/usr/bin/python2 export RUBY=${MINGW_PREFIX}/bin/ruby ../${_realname}-${pkgver}/configure \ @@ -121,11 +77,10 @@ _build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --disable-debug \ - --enable-debug-symbols \ --enable-introspection \ --disable-credential-storage \ --disable-accelerated-compositing \ - --enable-jit \ + --enable-debug-symbols=min \ --disable-webkit2 \ --disable-glibtest \ --disable-static \ @@ -134,18 +89,28 @@ _build() { --enable-spellcheck \ --enable-optimizations \ --enable-geolocation \ - --with-target=win32 \ + --disable-x11-target \ + --enable-win32-target \ --enable-gles2=no \ --enable-egl=no \ "$@" - PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${srcdir}/build-${_ver}/SourceJavaScriptCore \ - make V=1 all stamp-po + make } build() { - _build gtk3 --disable-gtk-doc --disable-webkit2 --with-gtk=3.0 - _build gtk2 --disable-gtk-doc --disable-webkit2 --with-gtk=2.0 + local _jit_flag= + case ${MINGW_CHOST} in + i686*) + _jit_flag="-enable-jit" + ;; + x86_64*) + _jit_flag="-disable-jit" + ;; + esac + + _build gtk3 --disable-gtk-doc --disable-webkit2 --with-gtk=3.0 ${_jit_flag} + _build gtk2 --disable-gtk-doc --disable-webkit2 --with-gtk=2.0 ${_jit_flag} } package_webkitgtk2() { @@ -153,7 +118,7 @@ package_webkitgtk2() { depends+=(${MINGW_PACKAGE_PREFIX}-gtk2) #provides=("${MINGW_PACKAGE_PREFIX}-libwebkit2=${pkgver}") cd "${srcdir}/build-gtk2" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } @@ -162,7 +127,7 @@ package_webkitgtk3() { optdepends+=("${MINGW_PACKAGE_PREFIX}-gtk2: Netscape plugin support") #provides=("${MINGW_PACKAGE_PREFIX}-webkitgtk3=${pkgver}" "${MINGW_PACKAGE_PREFIX}-libwebkit3=${pkgver}") cd "${srcdir}/build-gtk3" - make -j1 DESTDIR="$pkgdir" install + make -j1 DESTDIR="${pkgdir}" install find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm } @@ -182,30 +147,8 @@ package_mingw-w64-x86_64-webkitgtk3() { package_webkitgtk3 } -md5sums=('047f13fabc67003c9019e75a494c3faf' - '7408cd3f6624076ffb41c7b4364faee5' - 'b353ef80d7cab43524aaf5bf510d1778' - '15587d5007fabb1700e2ed4a04085c30' - 'fd7ffaa30ddb9146f56a74602bb5ce9d' - 'd09eb8edbf720c331d01a58f65eaa0a6' - '288b3d33b3a9826fa5dc3ce748ef1b11' - '29ab03a44da205dcd38156d63dfee22b' - '8f9b6a0ef1da6a8b26d7e23c2ca03e31' - '05fe8cc73be6493d8e2269b900d03cfb' - '49505091057a55fb26cc0a837f472c4a' - 'be25ec74f31e48e9b177e551290ded7f' - '84190dfb3082e2a46bf924c179f6f02e' - '2d8c6f57eed675032748dfbbc2e3e022' - 'b3668d854977f02686db56b0036e14bc' - 'e05eca1b6fe088dcef0f72971f8540e1' - 'c8e10c09e64e7ea9e53de01748e35190' - '166ae22cb089e0861525004ec9eb9820' - '054075647ddf38b5e2b2f8226a5043f0' - '1f1901b881d992261cf97e1c14939667' - 'ab2a01c8c34bdec57a6b4fa71d9ccdaf' - '84417e71df0b4ebe919ef89cdeedd380' - '78e8c4c15f52ebf42f0aa66fe28acc22' - '615feb1233082dadc2f63faa01ce778f' - '292b9380c711202a166c05d84af61fa7' - '290c2221a0caebe24650f09e08a9f4dd' - '9dfc2658031dbc73606495450690e08d') +md5sums=('312fd29eb7f5970660c6a64b8bf8420e' + '23cda04f494c76bd0eb8575b24b05f26' + '36cfb85d11164a489ab9616035827760' + '80c93a26be41e5eca4845c2c6fb78ca7' + 'e36f95bd1d0ffaf52046e584a7094b56') diff --git a/mingw-w64-wget/PKGBUILD b/mingw-w64-wget/PKGBUILD new file mode 100644 index 0000000000..0395ac0c98 --- /dev/null +++ b/mingw-w64-wget/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Alexey Pavlov +# Contributor: Paul Moore + +_realname=wget +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.16.3 +pkgrel=1 +pkgdesc='Wget retrieves files using HTTP, HTTPS and FTP (mingw-w64)' +arch=('any') +url='http://www.gnu.org/software/wget/' + +license=('GPL3') + +depends=("${MINGW_PACKAGE_PREFIX}-pcre" + "${MINGW_PACKAGE_PREFIX}-libidn" + "${MINGW_PACKAGE_PREFIX}-openssl" + ) + +source=("http://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.xz") +md5sums=('d2e4455781a70140ae83b54ca594ce21') +options=('strip' '!libtool' 'staticlibs') + +prepare() { + cd $srcdir/${_realname}-${pkgver} +} + +build() { + cd $srcdir/${_realname}-${pkgver} + ./configure --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --with-ssl=openssl + + make +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make install DESTDIR="${pkgdir}" + + # Licenses + install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README" + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/mingw-w64-win7appid/.gitignore b/mingw-w64-win7appid/.gitignore new file mode 100644 index 0000000000..393b3e189c --- /dev/null +++ b/mingw-w64-win7appid/.gitignore @@ -0,0 +1 @@ +Win7AppId.cpp diff --git a/mingw-w64-win7appid/LICENSE.txt b/mingw-w64-win7appid/LICENSE.txt new file mode 100644 index 0000000000..6d8c24631b --- /dev/null +++ b/mingw-w64-win7appid/LICENSE.txt @@ -0,0 +1,16 @@ +The author of the Win7AppId project neglected to include a proper license with the project, but the website links to http://opensource.org/licenses/BSD-3-Clause which has this template: + +---- + +Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/mingw-w64-win7appid/PKGBUILD b/mingw-w64-win7appid/PKGBUILD new file mode 100644 index 0000000000..c804b1c2a6 --- /dev/null +++ b/mingw-w64-win7appid/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: David Grayson + +_realname=win7appid +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.1 +pkgrel=3 +pkgdesc='Windows 7 (and up) shortcut application id tool' +arch=('any') +url='https://code.google.com/p/win7appid' +license=('custom') +makedepends=("gzip" + "${MINGW_PACKAGE_PREFIX}-gcc") +options=('strip') +source=( + "https://win7appid.googlecode.com/svn/trunk/Win7AppId.cpp" + "win7appid.1" + "LICENSE.txt" +) + +sha256sums=( + 'e6b5d9e5586d1a1e0c7911b951e00a964a80b94db21e74cdc327e523fecb9fa3' + 'SKIP' + 'SKIP' +) + +prepare() { + gzip < win7appid.1 > win7appid.1.gz +} + +build() { + mkdir -p "build-${MINGW_CHOST}" + cd "build-${MINGW_CHOST}" + + g++ -O1 -municode -DWIN32_LEAN_AND_MEAN=1 -DUNICODE -D_UNICODE \ + ../*.cpp -lole32 \ + -o win7appid.exe +} + +package() { + r="${pkgdir}${MINGW_PREFIX}" + mkdir -p "${r}/share/licenses/${_realname}" \ + "${r}/share/man/man1" "${r}/bin" + + install -m644 LICENSE.txt -t "${r}/share/licenses/${_realname}" + install -m644 win7appid.1.gz -t "${r}/share/man/man1" + + cd "build-${MINGW_CHOST}" + install -m755 win7appid.exe -t "${r}/bin" +} diff --git a/mingw-w64-win7appid/win7appid.1 b/mingw-w64-win7appid/win7appid.1 new file mode 100644 index 0000000000..5174e14403 --- /dev/null +++ b/mingw-w64-win7appid/win7appid.1 @@ -0,0 +1,39 @@ +.TH win7appid 1 +.SH NAME +win7appid - Windows 7 (and up) shortcut application id tool +.SH SYNOPSIS +.B win7appid \fIshortcut\fP [\fInew_app_id\fP] +.SH DESCRIPTION +.P +This is a fairly basic console application for setting the application id (System.AppUserModel.ID property) of a Windows 7 shortcut. +.P +In Windows 7, taskbar items are grouped by a string known as the application id or AppId. This can be set in the shortcut that launches a program, or by the application itself. For more information, see: +.P +.nf +.RS +http://msdn.microsoft.com/en-us/library/dd378459%28VS.85%29.aspx +.RE +.fi +.P +This tool allows you to pin an application and then have another application's windows group under the same icon without modifying the applications themselves. It only works if you can launch both apps via a shortcut, child processes will have the default behaviour of having their own taskbar entry. +.P +If the \fInew_app_id\fP is omitted, it simply prints the current app id. +.SH EXAMPLE +.P +I made the tool so I could pin a shortcut to start a Putty session with X forwarding, start gnome-terminal and have it's X window (running under Xming) group under the pinned icon. +.P +I issued the commands: +.P +.nf +.RS +Win7AppId xming.lnk putty-xming +Win7AppId puttysession.lnk putty-xming +.RE +.fi +.P +And then put the xming shortcut in my Startup folder and pinned puttysession to the taskbar. +.SH AUTHOR +.nf +David Roe (didroe) +https://code.google.com/p/win7appid/ +.fi diff --git a/mingw-w64-windows-default-manifest/PKGBUILD b/mingw-w64-windows-default-manifest/PKGBUILD index 81b81637eb..e5f2a41d17 100644 --- a/mingw-w64-windows-default-manifest/PKGBUILD +++ b/mingw-w64-windows-default-manifest/PKGBUILD @@ -3,7 +3,7 @@ _realname=windows-default-manifest pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=6.4 -pkgrel=1 +pkgrel=2 pkgdesc='Default Windows application manifest (mingw-w64)' url='http://cygwin.com/' arch=('any') diff --git a/mingw-w64-wineditline/003-dont-link-with-def.patch b/mingw-w64-wineditline/003-dont-link-with-def.patch new file mode 100644 index 0000000000..3600971a3b --- /dev/null +++ b/mingw-w64-wineditline/003-dont-link-with-def.patch @@ -0,0 +1,11 @@ +--- wineditline-2.101/src/CMakeLists.txt.orig 2014-12-01 22:42:00.102800000 +0300 ++++ wineditline-2.101/src/CMakeLists.txt 2014-12-01 22:42:09.494000000 +0300 +@@ -2,7 +2,7 @@ + include_directories("${PROJECT_BINARY_DIR}") + include(GenerateExportHeader) + add_library(edit_static STATIC editline.c fn_complete.c history.c) +-add_library(edit SHARED editline.c fn_complete.c history.c libedit.def) ++add_library(edit SHARED editline.c fn_complete.c history.c) + set_target_properties(edit PROPERTIES PREFIX "") + GENERATE_EXPORT_HEADER(edit + BASE_NAME edit diff --git a/mingw-w64-wineditline/PKGBUILD b/mingw-w64-wineditline/PKGBUILD index 902e00a2af..10cf21afed 100644 --- a/mingw-w64-wineditline/PKGBUILD +++ b/mingw-w64-wineditline/PKGBUILD @@ -3,7 +3,7 @@ _realname=wineditline pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=2.101 -pkgrel=2 +pkgrel=4 pkgdesc="port of the NetBSD Editline library (mingw-w64)" arch=('any') license=('BSD') @@ -12,23 +12,30 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") options=('staticlibs') source=("http://sourceforge.net/projects/mingweditline/files/${_realname}-${pkgver}.tar.bz2" '001-fix-installing.patch' - '002-fix-exports.patch') + '002-fix-exports.patch' + '003-dont-link-with-def.patch') md5sums=('1e9e09b38898367da4f9aa2c287ae79d' '2837bc5d5ce4e826b4d9bccf1bc978d3' - '966d8b0b0d96e6879a5c100a49322271') + '966d8b0b0d96e6879a5c100a49322271' + '6a879ef5f7f5dcbcba5e01c3f03fcaeb') prepare() { cd ${_realname}-${pkgver} patch -p1 -i ${srcdir}/001-fix-installing.patch patch -p1 -i ${srcdir}/002-fix-exports.patch + patch -p1 -i ${srcdir}/003-dont-link-with-def.patch + + rm -rf bin32 bin64 lib32 lib64 } build() { mkdir -p build-${MINGW_CHOST} cd build-${MINGW_CHOST} + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ ../${_realname}-${pkgver} make @@ -36,5 +43,7 @@ build() { package() { cd ${srcdir}/build-${MINGW_CHOST} - make install + make DESTDIR=${pkgdir} install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-winico/PKGBUILD b/mingw-w64-winico/PKGBUILD index baa7fd9d53..7a1f6b2242 100644 --- a/mingw-w64-winico/PKGBUILD +++ b/mingw-w64-winico/PKGBUILD @@ -3,13 +3,13 @@ _realname=winico pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.6 -pkgrel=1 -pkgdesc='Tk extension for Windows for enhanced icon handling and manipulation of an icon in the Windows taskbar and system tray.' -arch=('any') +pkgrel=2 +pkgdesc="Tk extension for Windows for enhanced icon handling and manipulation of an icon in the Windows taskbar and system tray (mingw-w64)" +arch=('any') url="http://tktable.sourceforge.net/" license=('custom') depends=("${MINGW_PACKAGE_PREFIX}-tk") -source=("http://sourceforge.net/projects/tktable/files/${_realname}/$pkgver/${_realname}${pkgver/./}src.zip" +source=("http://sourceforge.net/projects/tktable/files/${_realname}/${pkgver}/${_realname}${pkgver/./}src.zip" 001-Fix-GCL_ICON.patch 002-Fix-pointer-cast.patch) md5sums=('e8351b14564e9a893757388a10fd2305' diff --git a/mingw-w64-winpthreads-git/PKGBUILD b/mingw-w64-winpthreads-git/PKGBUILD index 680bcb1172..06e64dd327 100644 --- a/mingw-w64-winpthreads-git/PKGBUILD +++ b/mingw-w64-winpthreads-git/PKGBUILD @@ -1,38 +1,49 @@ # Maintainer: Alexey Pavlov # Contributor: Martell Malone +# Contributor: Renato Silva _realname=winpthreads +pkgbase=mingw-w64-${_realname}-git pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git" "${MINGW_PACKAGE_PREFIX}-libwinpthread-git") -_ver_base=4.0.0 -pkgver=4.0.0.4336.6a4cb01 +pkgver=5.0.0.4573.628fdbf pkgrel=1 pkgdesc="MinGW-w64 winpthreads library" -arch=('any') url="http://mingw-w64.sourceforge.net" -license=('custom') -groups=("${MINGW_PACKAGE_PREFIX}-toolchain" "${MINGW_PACKAGE_PREFIX}") -makedepends=("subversion" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-binutils" "${MINGW_PACKAGE_PREFIX}-crt" "${MINGW_PACKAGE_PREFIX}-headers") +# The main license of `winpthreads' is MIT, but parts of this library are +# derived from the "POSIX Threads for Microsoft Windows" library, which is +# licensed under BSD [1]. +license=('MIT' 'BSD') +arch=('any') +groups=("${MINGW_PACKAGE_PREFIX}-toolchain") +makedepends=("git" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-binutils" + "${MINGW_PACKAGE_PREFIX}-crt-git" + "${MINGW_PACKAGE_PREFIX}-headers-git") options=('strip' '!buildflags' 'staticlibs' '!emptydirs' '!debug') -source=("${_realname}"::"git://git.code.sf.net/p/mingw-w64/mingw-w64" +source=("mingw-w64"::"git://git.code.sf.net/p/mingw-w64/mingw-w64" "0001-Define-__-de-register_frame_info-in-fake-libgcc_s.patch") md5sums=('SKIP' '74a4dab06a8fa113407a6e11fdb3c962') pkgver() { - cd "${srcdir}/${_realname}" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/mingw-w64" + local _major=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MAJOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _minor=$(head -n 16 mingw-w64-headers/crt/_mingw_mac.h | grep '__MINGW64_VERSION_MINOR' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + local _rev=0 + printf "%s.%s.%s.%s.%s" ${_major} ${_minor} ${_rev} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "${srcdir}/${_realname}" + cd "${srcdir}/mingw-w64" git am "${srcdir}"/0001-Define-__-de-register_frame_info-in-fake-libgcc_s.patch - cd "${srcdir}"/${_realname}/mingw-w64-libraries/winpthreads + cd "${srcdir}"/mingw-w64/mingw-w64-libraries/winpthreads autoreconf -vfi } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p "${srcdir}"/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - declare -a extra_config if check_option "debug" "y"; then @@ -41,7 +52,7 @@ build() { extra_config+=("CXXFLAGS=") fi - "${srcdir}"/${_realname}/mingw-w64-libraries/winpthreads/configure \ + ../mingw-w64/mingw-w64-libraries/winpthreads/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -62,6 +73,12 @@ build() { make } +_install_licenses() { + # TODO: any more license files? + install -Dm644 ${srcdir}/mingw-w64/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/$1/COPYING + install -Dm644 ${srcdir}/mingw-w64/mingw-w64-libraries/winpthreads/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/$1/mingw-w64-libraries/winpthreads/COPYING +} + package_winpthreads() { depends=("${MINGW_PACKAGE_PREFIX}-crt-git" "${MINGW_PACKAGE_PREFIX}-libwinpthread-git=${pkgver}") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") @@ -70,13 +87,13 @@ package_winpthreads() { cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR=${pkgdir} install - + mkdir -p ${pkgdir}${MINGW_PREFIX}/${MINGW_CHOST} mv ${pkgdir}${MINGW_PREFIX}/include ${pkgdir}${MINGW_PREFIX}/${MINGW_CHOST}/ mv ${pkgdir}${MINGW_PREFIX}/lib ${pkgdir}${MINGW_PREFIX}/${MINGW_CHOST}/ rm -rf ${pkgdir}${MINGW_PREFIX}/bin - - install -Dm644 ${srcdir}/${_realname}/mingw-w64-libraries/winpthreads/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + + _install_licenses ${_realname} } package_libwinpthread() { @@ -86,9 +103,11 @@ package_libwinpthread() { cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR=${pkgdir} install - + rm -rf ${pkgdir}${MINGW_PREFIX}/include rm -rf ${pkgdir}${MINGW_PREFIX}/lib + + _install_licenses libwinpthread } # Wrappers for package functions @@ -110,3 +129,5 @@ package_mingw-w64-x86_64-winpthreads-git() { package_mingw-w64-x86_64-libwinpthread-git() { package_libwinpthread } + +# [1] http://locklessinc.com/articles/pthreads_on_windows/ diff --git a/mingw-w64-winsparkle-git/001-compile-fixes.patch b/mingw-w64-winsparkle-git/001-compile-fixes.patch new file mode 100644 index 0000000000..3aa895407e --- /dev/null +++ b/mingw-w64-winsparkle-git/001-compile-fixes.patch @@ -0,0 +1,11 @@ +diff -aur 000/src/ui.cpp 001/src/ui.cpp +--- 000/src/ui.cpp 2015-04-12 07:10:48.388636400 -0300 ++++ 001/src/ui.cpp 2015-04-12 07:12:39.286851600 -0300 +@@ -1339,7 +1339,6 @@ + SignalReady(); + + // Run the app: +- wxMSWDisableSettingHighDPIAware(); + wxEntry(ms_hInstance); + } + diff --git a/mingw-w64-winsparkle-git/Makefile b/mingw-w64-winsparkle-git/Makefile new file mode 100644 index 0000000000..ed88e0cad7 --- /dev/null +++ b/mingw-w64-winsparkle-git/Makefile @@ -0,0 +1,24 @@ +# GCC makefile for WinSparkle +# Copyright (C) 2015 Renato Silva +# This file is licensed under the same terms as WinSparkle + +all: static dll + +objects: + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE appcast.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE appcontroller.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE dll_api.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE dllmain.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE download.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE error.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE settings.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE threads.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE updatechecker.cpp -I../include + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE ui.cpp -I../include $(shell wx-config --cflags) + gcc -std=c++11 -c -mthreads -D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -DBUILDING_WIN_SPARKLE updatedownloader.cpp -I../include $(shell wx-config --cflags) + +static: objects + ar rcs libwinsparkle.a *.o + +dll: objects + gcc -shared -mthreads -o libwinsparkle.dll *.o -Wl,--out-implib,libwinsparkle.dll.a -lstdc++ $(shell wx-config --libs core) -lexpat -lwininet -lversion -lole32 -loleaut32 -lrpcrt4 -luuid diff --git a/mingw-w64-winsparkle-git/PKGBUILD b/mingw-w64-winsparkle-git/PKGBUILD new file mode 100644 index 0000000000..0cc45eb738 --- /dev/null +++ b/mingw-w64-winsparkle-git/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Renato Silva _realname=wintab-sdk - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.4 -pkgrel=1 +pkgrel=2 pkgdesc="Wintab Interface Specification (mingw-w64)" arch=('any') url="http://www.wacomeng.com/windows/docs/Wintab_v140.htm" diff --git a/mingw-w64-wslay/PKGBUILD b/mingw-w64-wslay/PKGBUILD new file mode 100644 index 0000000000..525aea0d7d --- /dev/null +++ b/mingw-w64-wslay/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Martell Malone + +_realname=wslay +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=1.0.0 +pkgrel=2 +pkgdesc="The WebSocket library in C (mingw-w64)" +arch=('any') +url="https://github.com/tatsuhiro-t/wslay" +license=("custom") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +options=('staticlibs' 'strip') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/tatsuhiro-t/wslay/archive/release-${pkgver}.tar.gz") +sha256sums=('874c4a6aa15b596846ff3a3ef848b8a6e6f4ca579a1657df9b318a06ac6c79a6') + +prepare() { + cd "${srcdir}/${_realname}-release-${pkgver}" + autoreconf -fi +} + +build() { + [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}-release-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} + make -C lib +} + +package() { + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" -C lib install +} diff --git a/mingw-w64-wxPython/001-mingw-python.patch b/mingw-w64-wxPython/001-mingw-python.patch index d6b5958373..8e62061407 100644 --- a/mingw-w64-wxPython/001-mingw-python.patch +++ b/mingw-w64-wxPython/001-mingw-python.patch @@ -44,6 +44,19 @@ lflags = lflags.split() # if wx-config --libs output does not start with -L, wx is +@@ -663,9 +663,11 @@ + newLFLAGS = [] + for flag in lflags: + if flag[:2] == '-L': +- libdirs.append(flag[2:]) ++ libdirs.append(os.popen(' '.join(['cygpath', '-am', flag[2:]])).readline().strip()) + elif flag[:2] == '-l': + libs.append(flag[2:]) ++ elif flag[:1] == '/': ++ libs.append(os.popen(' '.join(['cygpath', '-am', flag])).readline().strip()) + else: + newLFLAGS.append(flag) + return removeDuplicates(newLFLAGS) @@ -856,14 +861,16 @@ # gcc needs '.res' and '.rc' compiled to object files !!! try: diff --git a/mingw-w64-wxPython/PKGBUILD b/mingw-w64-wxPython/PKGBUILD index 647ba8d70c..bee310197e 100644 --- a/mingw-w64-wxPython/PKGBUILD +++ b/mingw-w64-wxPython/PKGBUILD @@ -2,16 +2,15 @@ _realname=wxPython pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.0.1.1 +pkgver=3.0.2.0 _editraver=0.7.20 -pkgrel=3 +pkgrel=4 pkgdesc="A wxWidgets GUI toolkit for Python (mingw-w64)" arch=('any') license=("custom:wxWindows") -groups=("${MINGW_PACKAGE_PREFIX}") url="http://www.wxpython.org/" depends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-wxWidgets") + "${MINGW_PACKAGE_PREFIX}-wxWidgets") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") options=('strip' 'staticlibs' 'buildflags') source=(http://downloads.sourceforge.net/wxpython/${_realname}-src-${pkgver}.tar.bz2 @@ -19,8 +18,8 @@ source=(http://downloads.sourceforge.net/wxpython/${_realname}-src-${pkgver}.tar 001-mingw-python.patch 002-system-includes.patch 003-fix-cast-error.patch) -sha1sums=('d2c4719015d7c499a9765b1e5107fdf37a32abfb' - 'b189dac25d4354ba3cca93e6108fb279dea0e2b7' +sha1sums=('5053f3fa04f4eb3a9d4bfd762d963deb7fa46866' + '0c664ca61e64b35e88527c2a545b9cff0a3b25fc' 'fb96353201fb0b529a71e70710986246b2978e94' '9fa4ac1988fec999feca090f8a8360807664f987') @@ -29,7 +28,7 @@ prepare() { patch -p1 -i ${srcdir}/001-mingw-python.patch patch -p1 -i ${srcdir}/002-system-includes.patch patch -p1 -i ${srcdir}/003-fix-cast-error.patch - + #cd ${srcdir} find . -type f -exec sed -i 's/env python/env python2/' {} \; #sed -i 's/sys.exit(1)//' Editra-${_editraver}/setup.py @@ -67,17 +66,15 @@ package() { cd "${srcdir}/wxPython-src-${pkgver}/wxPython" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-headers=;-install-data=" \ ${MINGW_PREFIX}/bin/python2 setup.py NO_HEADERS=0 WXPORT=msw BUILD_ACTIVEX=0 UNICODE=1 COMPILER=mingw32 \ - install --prefix=${MINGW_PREFIX} --root="$pkgdir" - + install --prefix=${MINGW_PREFIX} --root="${pkgdir}" + install -D -m644 ../docs/licence.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" - - pushd ${MINGW_PREFIX} > /dev/null - local _dir=`pwd -W` - popd > /dev/null + + local _dir=$(cygpath -am ${MINGW_PREFIX}) for _f in ${pkgdir}${MINGW_PREFIX}/bin/*; do sed -e "s|${_dir}|${MINGW_PREFIX}|g" -i ${_f} done - + #cd "${srcdir}/Editra-${_editraver}" #MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ #${MINGW_PREFIX}/bin/python2 setup.py install --root="${pkgdir}" --prefix=${MINGW_PREFIX} diff --git a/mingw-w64-wxwidgets/PKGBUILD b/mingw-w64-wxwidgets/PKGBUILD index ef27bac8d8..4b2dbbe029 100644 --- a/mingw-w64-wxwidgets/PKGBUILD +++ b/mingw-w64-wxwidgets/PKGBUILD @@ -1,60 +1,116 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva +# Contributor: Zach Bacon <11doctorwhocanada@gmail.com> +# Contributor: Ray Donnelly _realname=wxWidgets pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgbase=mingw-w64-${_realname} pkgver=3.0.2 -pkgrel=2 +pkgrel=12 pkgdesc="A C++ library that lets developers create applications for Windows, Linux and UNIX (mingw-w64)" arch=('any') license=("custom:wxWindows") -groups=("${MINGW_PACKAGE_PREFIX}") url="http://www.wxwidgets.org/" depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-xz" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-cppunit") + "${MINGW_PACKAGE_PREFIX}-cppunit" + "${MINGW_PACKAGE_PREFIX}-expat" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-xz" + "${MINGW_PACKAGE_PREFIX}-zlib" + ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python2") options=('strip' 'staticlibs' 'buildflags') source=(http://downloads.sourceforge.net/wxwindows/wxWidgets-${pkgver}.tar.bz2 - "wxWidgets-3.0.0-gcc-codelight.patch") -sha1sums=('1f69b4aa101fe3d7b4cd8aea855f073270161489' - '05a3471dcf735d86defe0df00dcb8e9ff0698290') + "wxWidgets-3.0.0-gcc-codelight.patch" + "wxWidgets-3.0.2-msw-dc-orientation-fix.patch" + "wxWidgets-3.0.2-relax-abi-compatibility-gcc.patch" + "wxWidgets-3.0.2-relocate-prefix-in-bin-wx-config.patch") +sha1sums=('6461eab4428c0a8b9e41781b8787510484dea800' + '05a3471dcf735d86defe0df00dcb8e9ff0698290' + '99999865476ce03bb75e8244806f3585fe9e71e2' + '62dcd59adde91925e5c51422e192c035978cdedd' + '44e2e55fc4340d91a0c8f31b1f98e4e4ac6f2eaf') prepare() { - cd ${srcdir}/${_realname}-${pkgver} - patch -p1 -i ${srcdir}/wxWidgets-3.0.0-gcc-codelight.patch + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/wxWidgets-3.0.0-gcc-codelight.patch + patch -p1 -i "${srcdir}"/wxWidgets-3.0.2-msw-dc-orientation-fix.patch + patch -p1 -i "${srcdir}"/wxWidgets-3.0.2-relax-abi-compatibility-gcc.patch + patch -p1 -i "${srcdir}"/wxWidgets-3.0.2-relocate-prefix-in-bin-wx-config.patch } build() { - [[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH} - mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + #CXXFLAGS+=" -std=gnu++11" + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ - --with-msw \ - --disable-mslu \ --enable-shared \ --enable-iniconf \ --enable-iff \ --enable-permissive \ - --disable-monolithic \ - --disable-mediactrl \ --enable-unicode \ + --enable-graphics_ctx \ --enable-accessibility \ - --disable-precomp-headers + --disable-mediactrl \ + --disable-monolithic \ + --disable-mslu \ + --disable-precomp-headers \ + --with-msw \ + --with-opengl + + make #VERBOSE=1 + + #CXXFLAGS+=" -std=gnu++11" + [[ -d "${srcdir}"/build-${CARCH}-static ]] && rm -rf "${srcdir}"/build-${CARCH}-static + mkdir -p "${srcdir}"/build-${CARCH}-static && cd "${srcdir}"/build-${CARCH}-static + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --enable-static \ + --disable-shared \ + --enable-iniconf \ + --enable-iff \ + --enable-permissive \ + --enable-unicode \ + --enable-graphics_ctx \ + --enable-accessibility \ + --disable-mediactrl \ + --disable-monolithic \ + --disable-mslu \ + --disable-precomp-headers \ + --with-msw \ + --with-opengl + make #VERBOSE=1 } package() { - cd ${srcdir}/build-${CARCH} + cd "${srcdir}"/build-${CARCH}-static make DESTDIR="${pkgdir}" install + mv ${pkgdir}${MINGW_PREFIX}/bin/wx-config{,-static} + cd "${srcdir}"/build-${CARCH} + make DESTDIR="${pkgdir}" install + mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin + + # License files + cd "${srcdir}"/${_realname}-${pkgver}/docs + install -Dm644 preamble.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/preamble.txt" + install -Dm644 licence.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/licence.txt" + install -Dm644 licendoc.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/licendoc.txt" + install -Dm644 lgpl.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/lgpl.txt" + install -Dm644 gpl.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gpl.txt" + install -Dm644 xserver.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/xserver.txt" } diff --git a/mingw-w64-wxwidgets/wxWidgets-3.0.2-msw-dc-orientation-fix.patch b/mingw-w64-wxwidgets/wxWidgets-3.0.2-msw-dc-orientation-fix.patch new file mode 100644 index 0000000000..28969f62db --- /dev/null +++ b/mingw-w64-wxwidgets/wxWidgets-3.0.2-msw-dc-orientation-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp +index abd8956..d9168af 100644 +--- a/src/msw/dc.cpp ++++ b/src/msw/dc.cpp +@@ -2007,7 +2007,7 @@ void wxMSWDCImpl::RealizeScaleAndOrigin() + // Becaue only devExtX/logExtX ratio and devExtY/logExtY ratio are counted + // we can reduce the fractions to avoid large absolute numbers + // and possible arithmetic overflows. +- unsigned int gcd = CalcGCD(abs(devExtX), abs(logExtX)); ++ int gcd = CalcGCD(abs(devExtX), abs(logExtX)); + devExtX /= gcd; + logExtX /= gcd; + gcd = CalcGCD(abs(devExtY), abs(logExtY)); diff --git a/mingw-w64-wxwidgets/wxWidgets-3.0.2-relax-abi-compatibility-gcc.patch b/mingw-w64-wxwidgets/wxWidgets-3.0.2-relax-abi-compatibility-gcc.patch new file mode 100644 index 0000000000..d73a23e319 --- /dev/null +++ b/mingw-w64-wxwidgets/wxWidgets-3.0.2-relax-abi-compatibility-gcc.patch @@ -0,0 +1,35 @@ +From ad21cc332ac906b9ae8f238ab135cbe410e78eba Mon Sep 17 00:00:00 2001 +From: Nathan Ridge +Date: Fri, 19 Jun 2015 01:44:55 -0400 +Subject: [PATCH] Relax the ABI compatibility requirements for GCC. + +Allow a library and an application to differ in __GXX_ABI_VERSION +within the range 1002-1008. The ABI changes made in this range +do not affect wxWidgets. +--- + include/wx/build.h | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/include/wx/build.h b/include/wx/build.h +index 473e0c9..75b4f80 100644 +--- a/include/wx/build.h ++++ b/include/wx/build.h +@@ -52,8 +52,17 @@ + // GCC and Intel C++ share same C++ ABI (and possibly others in the future), + // check if compiler versions are compatible: + #if defined(__GXX_ABI_VERSION) ++ // The changes between ABI versions 1002 through 1008 (documented at ++ // https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html ++ // under -fabi-version) don't affect wxWidgets, so we allow a library ++ // and an application to differ within that range. ++ #if ((__GXX_ABI_VERSION >= 1002) && (__GXX_ABI_VERSION <= 1008)) ++ #define wxGXX_EFFECTIVE_ABI_VERSION 1002 ++ #else ++ #define wxGXX_EFFECTIVE_ABI_VERSION __GXX_ABI_VERSION ++ #endif + #define __WX_BO_COMPILER \ +- ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION) ++ ",compiler with C++ ABI " __WX_BO_STRINGIZE(wxGXX_EFFECTIVE_ABI_VERSION) + #elif defined(__GNUG__) + #define __WX_BO_COMPILER ",GCC " \ + __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__) diff --git a/mingw-w64-wxwidgets/wxWidgets-3.0.2-relocate-prefix-in-bin-wx-config.patch b/mingw-w64-wxwidgets/wxWidgets-3.0.2-relocate-prefix-in-bin-wx-config.patch new file mode 100644 index 0000000000..96307ad9f3 --- /dev/null +++ b/mingw-w64-wxwidgets/wxWidgets-3.0.2-relocate-prefix-in-bin-wx-config.patch @@ -0,0 +1,12 @@ +--- wxWidgets-3.0.2/wx-config.in.orig 2015-12-12 14:49:36.241974800 +0000 ++++ wxWidgets-3.0.2/wx-config.in 2015-12-12 14:53:06.242503400 +0000 +@@ -401,6 +401,9 @@ + + # Determine the base directories we require. + prefix=${input_option_prefix-${this_prefix:-@prefix@}} ++if [ "x${MSYSTEM}" = "xMINGW32" ] || [ "x${MSYSTEM}" = "xMINGW64" ]; then ++ prefix=$(cygpath -m ${prefix}) ++fi + exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}} + wxconfdir="@libdir@/wx/config" + diff --git a/mingw-w64-x264/PKGBUILD b/mingw-w64-x264/PKGBUILD index 309de4af94..1e05bc17b4 100644 --- a/mingw-w64-x264/PKGBUILD +++ b/mingw-w64-x264/PKGBUILD @@ -2,13 +2,13 @@ _realname=x264 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=r2479.dd79a61 +pkgver=r2538.121396c pkgrel=1 pkgdesc="Library for encoding H264/AVC video streams (mingw-w64)" arch=('any') url="http://www.videolan.org/developers/x264.html" license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "yasm") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "yasm" "git") depends=("${MINGW_PACKAGE_PREFIX}-libwinpthread" "${MINGW_PACKAGE_PREFIX}-l-smash") options=('strip' 'staticlibs') @@ -31,6 +31,7 @@ prepare() { } build() { + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}/configure \ @@ -44,5 +45,5 @@ build() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-x265/PKGBUILD b/mingw-w64-x265/PKGBUILD index bc64747f3d..9e59f2afe8 100644 --- a/mingw-w64-x265/PKGBUILD +++ b/mingw-w64-x265/PKGBUILD @@ -1,9 +1,11 @@ # Maintainer: Alexey Pavlov +# Contributor: Yuta Nakai _realname=x265 +pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.4 -pkgrel=1 +pkgver=1.8 +pkgrel=2 pkgdesc='Open Source H265/HEVC video encoder (mingw-w64)' arch=('any') license=('GPL') @@ -11,32 +13,54 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=('yasm' "${MINGW_PACKAGE_PREFIX}-cmake") options=('strip') url='https://bitbucket.org/multicoreware/x265' -source=($url/get/$pkgver.tar.bz2 - install-shared-library.patch) -md5sums=('b37bf7bd05b198c9dd9155d60e1f7100' - 'c1dc65fc3191d6bafdd3576235ade5ae') - -prepare() { - cd multicoreware-x265-* - patch -p1 -i ${srcdir}/install-shared-library.patch -} +source=("${_realname}-${pkgver}.tar.bz2"::"${url}/get/${pkgver}.tar.bz2") +md5sums=('e3a008a74b8f44612cac4ec2f537b0f8') build() { - cd multicoreware-x265-*/build/msys + # Build 8 bit-depth lib and exe. + cd "${srcdir}"/multicoreware-x265-*/build/msys + if [ -d 8bit ]; then + rm -fr 8bit + fi + mkdir -p 8bit + cd 8bit + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G "MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${pkgdir}${MINGW_PREFIX} \ - ../../source + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ../../../source + make + + # Build 10 bit-depth dll for x265_api_get. + if [ -d ../10bit ]; then + rm -fr ../10bit + fi + mkdir -p ../10bit + cd ../10bit + + if [ "${CARCH}" = 'i686' ]; then + _ENABLE_ASM=OFF + else + _ENABLE_ASM=ON + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G "MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DHIGH_BIT_DEPTH=ON \ + -DENABLE_ASSEMBLY=${_ENABLE_ASM} \ + -DENABLE_CLI=OFF \ + ../../../source make } package() { - cd multicoreware-x265-*/build/msys - make install - - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ - -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/x265.pc + cd "${srcdir}"/multicoreware-x265-*/build/msys/8bit + make DESTDIR=${pkgdir} install + + # Install 10 bit-depth dll. + cd "${srcdir}"/multicoreware-x265-*/build/msys/10bit + install -m 755 libx265.dll "${pkgdir}"/${MINGW_PREFIX}/bin/libx265_main10.dll } diff --git a/mingw-w64-x265/install-shared-library.patch b/mingw-w64-x265/install-shared-library.patch deleted file mode 100644 index 6052301b5d..0000000000 --- a/mingw-w64-x265/install-shared-library.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- multicoreware-x265-cea97c4d7945/source/CMakeLists.txt.orig 2014-05-07 11:27:46.256400000 +0400 -+++ multicoreware-x265-cea97c4d7945/source/CMakeLists.txt 2014-05-07 11:42:00.618600000 +0400 -@@ -267,6 +267,7 @@ - # shared library is not installed if a tag is not found - set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG} SOVERSION ${X265_BUILD}) - install(TARGETS x265-shared -+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) - endif() diff --git a/mingw-w64-xalan-c/PKGBUILD b/mingw-w64-xalan-c/PKGBUILD index 78e2dd78fb..64afe1d08f 100644 --- a/mingw-w64-xalan-c/PKGBUILD +++ b/mingw-w64-xalan-c/PKGBUILD @@ -1,19 +1,18 @@ # Maintainer: Alexey Pavlov _realname=xalan-c - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.11 -pkgrel=2 +pkgrel=3 pkgdesc="An XSLT processing library (mingw-w64)" arch=('any') url="http://xalan.apache.org/xalan-c" license=('APACHE') -makedepends=("sed" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-xerces-c=3.1.1" "${MINGW_PACKAGE_PREFIX}-tools") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-xerces-c=3.1.1") +makedepends=("sed" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-xerces-c=3.1.2" "${MINGW_PACKAGE_PREFIX}-tools") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-xerces-c=3.1.2") options=('!libtool' 'strip') -source=(http://apache.mirror.iphh.net/xalan/xalan-c/sources/xalan_c-$pkgver-src.tar.gz - mingw-w64-fix.patch) +source=(http://apache.mirror.iphh.net/xalan/xalan-c/sources/xalan_c-${pkgver}-src.tar.gz + mingw-w64-fix.patch) md5sums=('9227d3e7ab375da3c643934b33a585b8' '8be81685b5b6a0dda95a14d54ff888f4') @@ -33,7 +32,7 @@ build() { CPPFLAGS+="" CFLAGS+=" -DNDEBUG -mthreads" LDFLAGS+=" -mthreads" - LIBS+=" -mthreads" + LIBS+=" -mthreads" export XALANCROOT="${srcdir}"/${_realname}-${pkgver}/c export ICUROOT=${MINGW_PREFIX} @@ -60,7 +59,7 @@ package() { CPPFLAGS+="" CFLAGS+=" -DNDEBUG -mthreads" LDFLAGS+=" -mthreads" - LIBS+=" -mthreads" + LIBS+=" -mthreads" export XALANCROOT="${srcdir}"/${_realname}-${pkgver}/c export ICUROOT=${MINGW_PREFIX} diff --git a/mingw-w64-xerces-c/001-no-undefined.patch b/mingw-w64-xerces-c/001-no-undefined.patch new file mode 100644 index 0000000000..a6e18fefb7 --- /dev/null +++ b/mingw-w64-xerces-c/001-no-undefined.patch @@ -0,0 +1,11 @@ +--- xerces-c-3.1.2/src/Makefile.am.orig 2015-04-03 09:08:15.128000000 +0300 ++++ xerces-c-3.1.2/src/Makefile.am 2015-04-03 09:08:23.848400000 +0300 +@@ -33,7 +33,7 @@ + # + AM_CPPFLAGS = + +-libxerces_c_la_LDFLAGS = -release ${INTERFACE_VER_D} ++libxerces_c_la_LDFLAGS = -release ${INTERFACE_VER_D} -no-undefined + + # This sets {install}/include as target for the headers + libxerces_c_ladir = ${includedir} diff --git a/mingw-w64-xerces-c/PKGBUILD b/mingw-w64-xerces-c/PKGBUILD index 71a74e6505..44537899cf 100644 --- a/mingw-w64-xerces-c/PKGBUILD +++ b/mingw-w64-xerces-c/PKGBUILD @@ -1,19 +1,27 @@ # Maintainer: Alexey Pavlov _realname=xerces-c - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.1.1 +pkgver=3.1.2 pkgrel=2 -pkgdesc="A validating XML parser written in a portable subset of C++. (mingw-w64)" +pkgdesc="A validating XML parser written in a portable subset of C++ (mingw-w64)" arch=('any') url="http://xerces.apache.org/xerces-c" license=("APACHE") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") # "${MINGW_PACKAGE_PREFIX}-curl" "${MINGW_PACKAGE_PREFIX}-icu" options=('staticlibs' 'strip') -source=("http://mirrors.sonic.net/apache/xerces/c/3/sources/xerces-c-$pkgver.tar.gz") -md5sums=('6a8ec45d83c8cfb1584c5a5345cb51ae') +source=("http://mirrors.sonic.net/apache/xerces/c/3/sources/xerces-c-${pkgver}.tar.gz" + 001-no-undefined.patch) +md5sums=('9eb1048939e88d6a7232c67569b23985' + '65846bed6ac34fdcc2dfbaf6245f37f6') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/001-no-undefined.patch + + autoreconf -fiv +} build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" @@ -23,11 +31,11 @@ build() { --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} - make libxerces_c_la_LDFLAGS="-release 3.1 -no-undefined" + + make } package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install - find "${pkgdir}${MINGW_PREFIX}" -name '*.bat' -o -name '*.def' -o -name '*.exp' | xargs -rtl1 rm + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-xmlada-gpl/PKGBUILD b/mingw-w64-xmlada-gpl/PKGBUILD index d0628df211..237e8c742f 100644 --- a/mingw-w64-xmlada-gpl/PKGBUILD +++ b/mingw-w64-xmlada-gpl/PKGBUILD @@ -3,48 +3,45 @@ # Pathnames in this project can get quite long, so at least on Windows # I recommend to use a short BUILDDIR setting to avoid problems # -_basename=xmlada -_realname=${_basename}-gpl + +_realname=xmlada-gpl pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgrel=1 pkgver=2014 pkgdesc="A full XML suite for Ada" arch=('any') -provides=("${MINGW_PACKAGE_PREFIX}-${_basename}") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname%-*}") url="http://libre.adacore.com/libre/tools/xmlada/" license=('GPL3') -depends=("gcc-ada") -source=(http://downloads.dragonlace.net/src/${_realname}-${pkgver}-src.tar.gz) -md5sums=('1aaa49885ec280a3242823f659460dff') -options=('strip') -groups=("${MINGW_PACKAGE_PREFIX}") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc-ada") depends=("${MINGW_PACKAGE_PREFIX}-gcc-ada") +source=(http://downloads.dragonlace.net/src/${_realname}-${pkgver}-src.tar.gz) +md5sums=('98c96b8c6a877617ec4da3ef6a03288a') +options=('strip') build() { - cd $srcdir/$_basename-$pkgver-src + cd ${srcdir}/${_realname:0:6}-${pkgver}-src ./configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-shared - make + make } package() { - mkdir -p $pkgdir$MINGW_PREFIX/include/xmlada - mkdir -p $pkgdir$MINGW_PREFIX/lib/xmlada/static - mkdir -p $pkgdir$MINGW_PREFIX/lib/xmlada/relocatable - mkdir -p $pkgdir$MINGW_PREFIX/lib/gnat/xmlada + mkdir -p ${pkgdir}${MINGW_PREFIX}/include/xmlada + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/xmlada/static + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/xmlada/relocatable + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/gnat/xmlada - cd ${srcdir}/$_basename-$pkgver-src - make prefix=$pkgdir$MINGW_PREFIX INSTALL=cp install + cd ${srcdir}/${_realname:0:6}-${pkgver}-src + make prefix=${pkgdir}${MINGW_PREFIX} INSTALL=cp install rm -rf ${pkgdir}${MINGW_PREFIX}/share/examples rm -rf ${pkgdir}${MINGW_PREFIX}/share/doc # Copy License Files - mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname - cp -pf ${srcdir}/${_basename}-$pkgver-src/COPYING* \ - ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname + cp -pf ${srcdir}/${_realname:0:6}-${pkgver}-src/COPYING* \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname} } diff --git a/mingw-w64-xmlstarlet/PKGBUILD b/mingw-w64-xmlstarlet/PKGBUILD new file mode 100644 index 0000000000..16ca7c41a7 --- /dev/null +++ b/mingw-w64-xmlstarlet/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Renato Silva + +_name=xmlstarlet +pkgdesc="Command-line XML toolkit" +pkgver=r678.9a470e3 +pkgrel=2 +arch=('any') +license=('MIT') +url="http://xmlstar.sourceforge.net" +pkgname=(${MINGW_PACKAGE_PREFIX}-${_name}-git) +provides=(${MINGW_PACKAGE_PREFIX}-${_name}) +conflicts=(${MINGW_PACKAGE_PREFIX}-${_name}) +md5sums=('SKIP') +source=(${_name}::"git://git.code.sourceforge.net/p/xmlstar/code") +depends=(${MINGW_PACKAGE_PREFIX}-libxml2 + ${MINGW_PACKAGE_PREFIX}-libxslt) +makedepends=(${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-libiconv git) + +prepare() { + cd "${srcdir}/${_name}" + autoreconf -sif +} + +pkgver() { + cd "${srcdir}/${_name}" + printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD) +} + +build() { + cd "${srcdir}/${_name}" + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --with-libxml-prefix=${MINGW_PREFIX} \ + --with-libxslt-prefix=${MINGW_PREFIX} \ + --with-libiconv-prefix=${MINGW_PREFIX} + # --enable-static-libs # To link with libxml/libxslt statically + + make +} + +package() { + cd "${srcdir}/${_name}" + make DESTDIR="${pkgdir}" install + local license_dir="${pkgdir}${MINGW_PREFIX}/share/licenses/${_name}" + mkdir -p "${license_dir}" + cp -v Copyright "${license_dir}/Copyright" + mv -v "${pkgdir}${MINGW_PREFIX}/bin/xml.exe" "${pkgdir}${MINGW_PREFIX}/bin/xmlstarlet.exe" +} diff --git a/mingw-w64-xpdf/PKGBUILD b/mingw-w64-xpdf/PKGBUILD new file mode 100644 index 0000000000..a18fffc806 --- /dev/null +++ b/mingw-w64-xpdf/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Johannes Schindelin + +_realname=xpdf +pkgbase="mingw-w64-${_realname}" +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-poppler") +pkgver=3.04 +pkgrel=1 +pkgdesc="Utilities for PDF files (mingw-w64)" +arch=('any') +license=('GPL2+') +url="http://foolabs.com/xpdf/" +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +depends=("${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-libpng") +options=('strip') +source=("ftp://ftp.foolabs.com/pub/xpdf/xpdf-${pkgver}.tar.gz") +sha1sums=('b9b1dbb0335742a09d0442c60fd02f4f934618bd') + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --with-freetype2-includes=$(pkg-config --dont-define-prefix --variable=includedir freetype2) + + make +} + +package() { + cd ${srcdir}/build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-xpm-nox/PKGBUILD b/mingw-w64-xpm-nox/PKGBUILD index 1c68ae0877..95b6e1745b 100644 --- a/mingw-w64-xpm-nox/PKGBUILD +++ b/mingw-w64-xpm-nox/PKGBUILD @@ -3,7 +3,7 @@ _realname=xpm-nox pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=4.2.0 -pkgrel=3 +pkgrel=4 pkgdesc="X Pixmap library not using X (mingw-w64)" arch=('any') url="ftp://koala.inria.fr/pub/xpm" @@ -26,7 +26,7 @@ prepare() { build() { cp -r "${srcdir}"/${_realname}-${pkgver} "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - + make prefix=${MINGW_PREFIX} CC=${MINGW_CHOST}-gcc } diff --git a/mingw-w64-xpm-nox/xpm-nox-4.2.0.tar.bz2 b/mingw-w64-xpm-nox/xpm-nox-4.2.0.tar.bz2 new file mode 100644 index 0000000000..889d629b2c Binary files /dev/null and b/mingw-w64-xpm-nox/xpm-nox-4.2.0.tar.bz2 differ diff --git a/mingw-w64-xvidcore/PKGBUILD b/mingw-w64-xvidcore/PKGBUILD index f7a3dd12bd..82270b82a6 100644 --- a/mingw-w64-xvidcore/PKGBUILD +++ b/mingw-w64-xvidcore/PKGBUILD @@ -1,25 +1,28 @@ # Maintainer: Alexey Pavlov _realname=xvidcore - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.3.3 -pkgrel=1 +pkgver=1.3.4 +pkgrel=2 pkgdesc="XviD is an open source MPEG-4 video codec (mingw-w64)" arch=('any') license=('GPL') url="http://www.xvid.org/" options=('strip' '!libtool' 'staticlibs') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-yasm") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-yasm") source=(http://downloads.xvid.org/downloads/${_realname}-${pkgver}.tar.bz2) -md5sums=('f0a77572ac4694038e8519726b2883d9') +md5sums=('5e68b84e3286b7bbaa95ddc34f0fcace') prepare() { cd ${srcdir}/${_realname} } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} cp -rf ${srcdir}/${_realname} ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST}/build/generic ./configure \ --prefix=${MINGW_PREFIX} \ diff --git a/mingw-w64-xxhash-svn/PKGBUILD b/mingw-w64-xxhash-svn/PKGBUILD deleted file mode 100644 index 0bf6572e42..0000000000 --- a/mingw-w64-xxhash-svn/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Maintainer: Martell Malone - -_realname=xxhash -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" -pkgver=r37 -pkgrel=1 -pkgdesc="Extremely fast non-cryptographic hash algorithm (mingw-w64)" -arch=('any') -url="http://code.google.com/p/xxhash" -license=("LGPL") -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "subversion") - -source=("${_realname}"::"svn+http://xxhash.googlecode.com/svn/trunk/" - "Makefile") - -md5sums=('SKIP' - 'SKIP') - -pkgver() { - cd "${_realname}" - local ver="$(svnversion)" - printf "r%s" "${ver//[[:alpha:]]}" -} - -prepare() { - cd "${srcdir}/${_realname}" - rm -f Makefile - cp ${srcdir}/Makefile ${srcdir}/${_realname} -} - -build() { - cd "$srcdir/${_realname}" - make xxhash -} - -package() { - cd "${srcdir}/${_realname}" - mkdir -p ${pkgdir}${MINGW_PREFIX}/include - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib - mv libxxhash.a ${pkgdir}${MINGW_PREFIX}/lib - cp xxhash.h ${pkgdir}${MINGW_PREFIX}/include -} diff --git a/mingw-w64-xxhash-svn/Makefile b/mingw-w64-xxhash/Makefile similarity index 100% rename from mingw-w64-xxhash-svn/Makefile rename to mingw-w64-xxhash/Makefile diff --git a/mingw-w64-xxhash/PKGBUILD b/mingw-w64-xxhash/PKGBUILD new file mode 100644 index 0000000000..242e588c86 --- /dev/null +++ b/mingw-w64-xxhash/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Martell Malone + +_realname=xxhash +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=r40 +pkgrel=1 +pkgdesc="Extremely fast non-cryptographic hash algorithm (mingw-w64)" +arch=('any') +url="https://github.com/Cyan4973/xxHash" +license=("LGPL") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +source=(${_realname}-${pkgver}.tar.gz::https://github.com/Cyan4973/xxHash/archive/${pkgver}.tar.gz + "Makefile") +md5sums=('7d8261c48b9d1a0182adaa45c8d1e1ac' + 'a5073262f2edde9102ffb3ef4ffd8fc3') + +prepare() { + cd "${srcdir}/xxHash-${pkgver}" + rm -f Makefile + cp ${srcdir}/Makefile ${srcdir}/xxHash-${pkgver}/ +} + +build() { + cd "${srcdir}/xxHash-${pkgver}" + make xxhash +} + +package() { + cd "${srcdir}/xxHash-${pkgver}" + mkdir -p ${pkgdir}${MINGW_PREFIX}/include + mkdir -p ${pkgdir}${MINGW_PREFIX}/lib + mv libxxhash.a ${pkgdir}${MINGW_PREFIX}/lib + cp xxhash.h ${pkgdir}${MINGW_PREFIX}/include +} diff --git a/mingw-w64-xz-git/PKGBUILD b/mingw-w64-xz-git/PKGBUILD new file mode 100644 index 0000000000..0d31c249f8 --- /dev/null +++ b/mingw-w64-xz-git/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Alexey Pavlov +# Contributor: Renato Silva + +_realname=xz +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +_ver_base=5.2.1 +pkgver=5.2.1 +pkgrel=1 +pkgdesc="Library and command line tools for XZ and LZMA compressed files (mingw-w64)" +arch=('any') +url="http://tukaani.org/xz" + +# TODO: check situation with getopt_long mentioned in COPYING for possible +# removal of LGPL from this field +license=(partial:'PublicDomain' partial:'LGPL2.1+' partial:'GPL2+') + +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") +options=('staticlibs' 'strip') +source=("git+http://git.tukaani.org/xz.git") +sha256sums=('SKIP') + +pkgver() { + cd ${srcdir}/${_realname} + printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${srcdir}/${_realname} + + ./autogen.sh +} + +build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --disable-rpath \ + --disable-lzma-links + + make + +} + +check() { + cd ${srcdir}/build-${CARCH} + make check +} + + +package() { + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install + + install -Dm644 ${srcdir}/${_realname}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + install -Dm644 ${srcdir}/${_realname}/COPYING.GPLv2 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.GPLv2 + install -Dm644 ${srcdir}/${_realname}/COPYING.GPLv3 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.GPLv3 + install -Dm644 ${srcdir}/${_realname}/COPYING.LGPLv2.1 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LGPLv2.1 +} diff --git a/mingw-w64-xz/PKGBUILD b/mingw-w64-xz/PKGBUILD index f8f2953db1..fc1988dd5c 100644 --- a/mingw-w64-xz/PKGBUILD +++ b/mingw-w64-xz/PKGBUILD @@ -1,32 +1,44 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva _realname=xz pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=5.0.7 -pkgrel=1 +pkgver=5.2.1 +pkgrel=3 pkgdesc="Library and command line tools for XZ and LZMA compressed files (mingw-w64)" arch=('any') url="http://tukaani.org/xz" -license=("custom" "GPL" "LGPL") + +# TODO: check situation with getopt_long mentioned in COPYING for possible +# removal of LGPL from this field +license=(partial:'PublicDomain' partial:'LGPL2.1+' partial:'GPL2+') + makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gettext") options=('staticlibs' 'strip') -source=("$url/xz-${pkgver}.tar.gz") -md5sums=('60449e1c9c0eabefc9c3166e325636e5') +source=("${url}/${_realname}-${pkgver}.tar.gz") +md5sums=('3e44c766c3fb4f19e348e646fcd5778a') build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${CARCH} && cd ${srcdir}/build-${CARCH} - ../xz-$pkgver/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --disable-rpath \ --disable-lzma-links + make } package() { cd "${srcdir}/build-${CARCH}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING.GPLv2 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.GPLv2 + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING.GPLv3 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.GPLv3 + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING.LGPLv2.1 ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LGPLv2.1 } diff --git a/mingw-w64-yaml-cpp/PKGBUILD b/mingw-w64-yaml-cpp/PKGBUILD index a517ea63e6..5e2833428d 100644 --- a/mingw-w64-yaml-cpp/PKGBUILD +++ b/mingw-w64-yaml-cpp/PKGBUILD @@ -1,61 +1,46 @@ # Maintainer: Alexey Pavlov _realname=yaml-cpp - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.5.1 -pkgrel=2 +pkgver=0.5.2 +pkgrel=1 pkgdesc="A YAML parser and emitter in C++ matching the YAML 1.2 spec (mingw-w64)" arch=('any') -url="https://code.google.com/p/yaml-cpp/" +url="https://github.com/jbeder/yaml-cpp" license=("MIT") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-boost") + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2") options=('staticlibs' 'strip') -source=(http://yaml-cpp.googlecode.com/files/${_realname}-${pkgver}.tar.gz - mingw-install-pkgconfig.patch) -md5sums=('0fa47a5ed8fedefab766592785c85ee7' +source=(${_realname}-${pkgver}.tar.gz::https://github.com/jbeder/yaml-cpp/archive/release-${pkgver}.tar.gz + mingw-install-pkgconfig.patch) +md5sums=('2728af8a15e2b2c407730c45b99b274b' 'acf096cb06ee28ecb730a8e0b0cf044d') prepare() { - cd ${srcdir}/${_realname}-${pkgver} + cd ${srcdir}/${_realname}-release-${pkgver} patch -p1 -i ${srcdir}/mingw-install-pkgconfig.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - - mkdir $srcdir/build-${MINGW_CHOST} - - cd "$srcdir/build-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ - ../${_realname}-${pkgver} \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=OFF \ - ../${_realname}-${pkgver} + ../${_realname}-release-${pkgver} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make -j1 install - install -Dm644 ${srcdir}/${_realname}-${pkgver}/license.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - cd ${pkgdir}${MINGW_PREFIX} - sed -i "s|$PREFIX_WIN|$MINGW_PREFIX|g" lib/pkgconfig/yaml-cpp.pc + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + install -Dm644 ${srcdir}/${_realname}-release-${pkgver}/license.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-yaml-cpp0.3/PKGBUILD b/mingw-w64-yaml-cpp0.3/PKGBUILD index 6b36442fb6..6bf6ae9142 100644 --- a/mingw-w64-yaml-cpp0.3/PKGBUILD +++ b/mingw-w64-yaml-cpp0.3/PKGBUILD @@ -1,62 +1,46 @@ # Maintainer: Alexey Pavlov _realname=yaml-cpp0.3 - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.3.0 pkgrel=2 pkgdesc="A YAML parser and emitter in C++ matching the YAML 1.2 spec (mingw-w64) - old version" arch=('any') -url="https://code.google.com/p/yaml-cpp/" +url="https://github.com/jbeder/yaml-cpp" license=("MIT") provides=("${MINGW_PACKAGE_PREFIX}-yaml-cpp") conflicts=("${MINGW_PACKAGE_PREFIX}-yaml-cpp") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-boost") + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-pkg-config") options=('staticlibs' 'strip') -source=(http://yaml-cpp.googlecode.com/files/yaml-cpp-${pkgver}.tar.gz - mingw-install-pkgconfig.patch) -md5sums=('9aa519205a543f9372bf4179071c8ac6' +source=(yaml-cpp-${pkgver}.tar.gz::https://github.com/jbeder/yaml-cpp/archive/release-${pkgver}.tar.gz + mingw-install-pkgconfig.patch) +md5sums=('0c0496b195299e956056430444e237b9' 'acf096cb06ee28ecb730a8e0b0cf044d') prepare() { - cd ${srcdir}/yaml-cpp + cd ${srcdir}/yaml-cpp-release-${pkgver} patch -p1 -i ${srcdir}/mingw-install-pkgconfig.patch } build() { - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null + [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" + mkdir -p ${srcdir}/build-${MINGW_CHOST} + cd ${srcdir}/build-${MINGW_CHOST} - pushd ${MINGW_PREFIX} > /dev/null - export PREFIX_DEPS=`pwd -W` - popd > /dev/null - - mkdir $srcdir/build-${MINGW_CHOST} - - cd "$srcdir/build-${MINGW_CHOST}" + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ - ../yaml-cpp-${pkgver} \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DBUILD_SHARED_LIBS=OFF \ - ../yaml-cpp + ../yaml-cpp-release-${pkgver} + make } package() { - cd "$srcdir/build-${MINGW_CHOST}" - make -j1 install - - mkdir -p ${pkgdir}${MINGW_PREFIX} - pushd ${pkgdir}${MINGW_PREFIX} > /dev/null - export PREFIX_WIN=`pwd -W` - popd > /dev/null - - cd ${pkgdir}${MINGW_PREFIX} - sed -i "s|$PREFIX_WIN|$MINGW_PREFIX|g" lib/pkgconfig/yaml-cpp.pc + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR=${pkgdir} install + install -Dm644 ${srcdir}/yaml-cpp-release-${pkgver}/license.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-yasm/PKGBUILD b/mingw-w64-yasm/PKGBUILD index 88addcfce3..57d45a9c7f 100644 --- a/mingw-w64-yasm/PKGBUILD +++ b/mingw-w64-yasm/PKGBUILD @@ -3,14 +3,14 @@ _realname=yasm pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.0 -pkgrel=1 +pkgrel=2 pkgdesc="A rewrite of NASM to allow for multiple syntax supported (NASM, TASM, GAS, etc.) (mingw-w64)" arch=('any') license=('BSD' 'GPL2' 'LGPL2.1' 'PerlArtistic') url="http://www.tortall.net/projects/yasm/" depends=("${MINGW_PACKAGE_PREFIX}-gettext") options=('strip' '!libtool' 'staticlibs') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "python2") source=(http://www.tortall.net/projects/yasm/releases/${_realname}-${pkgver}.tar.gz) sha1sums=('b7574e9f0826bedef975d64d3825f75fbaeef55e') @@ -19,8 +19,9 @@ prepare() { } build() { + [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - ${srcdir}/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} diff --git a/mingw-w64-zeromq/PKGBUILD b/mingw-w64-zeromq/PKGBUILD new file mode 100644 index 0000000000..07d0f66504 --- /dev/null +++ b/mingw-w64-zeromq/PKGBUILD @@ -0,0 +1,36 @@ +# From Greblus: http://blog.greblus.net/2014/11/18/msys2mingw-w64-cython-i-ipython-notebook/ + +_realname=zeromq +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=4.1.3 +pkgrel=1 +pkgdesc="Fast messaging system built on sockets, C and C++ bindings. aka 0MQ, ZMQ (mingw-w64)" +arch=('any') +url="http://www.zeromq.org" +license=("LGPL") +depends=("${MINGW_PACKAGE_PREFIX}-libsodium") +makedepends=('') +options=('staticlibs' '!strip' '!buildflags') +source=("http://download.zeromq.org/${_realname}-${pkgver}.tar.gz") +md5sums=('d0824317348cfb44b8692e19cc73dc3a') + +build() { + [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} + mkdir -p ${srcdir}/build-${CARCH} + cd ${srcdir}/build-${CARCH} + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --with-libsodium + + make +} + +package() { + mkdir -p "${pkgdir}${MINGW_PREFIX}/bin" + + cd "${srcdir}/build-${CARCH}" + make DESTDIR="${pkgdir}" install +} diff --git a/mingw-w64-zlib/010-unzip-add-function-unzOpenBuffer.patch b/mingw-w64-zlib/010-unzip-add-function-unzOpenBuffer.patch index 025a649dbd..abe3d96b3f 100644 --- a/mingw-w64-zlib/010-unzip-add-function-unzOpenBuffer.patch +++ b/mingw-w64-zlib/010-unzip-add-function-unzOpenBuffer.patch @@ -34,7 +34,7 @@ index ce02265..bb72a66 100644 #ifdef STDC # include @@ -581,6 +582,16 @@ extern unzFile ZEXPORT unzOpen64(const void *path) - return unzOpenInternal(path, NULL, 1); + return unzOpenInternal(path, NULL); } +extern unzFile ZEXPORT unzOpenBuffer(const void* buffer, uLong size) @@ -44,7 +44,7 @@ index ce02265..bb72a66 100644 + zlib_filefunc64_32_def memory_file; + sprintf(path, "%llx %lx", (unsigned long long)buffer, (unsigned long)size); + fill_memory_filefunc(&memory_file, &FileMemory); -+ return unzOpenInternal(path, &memory_file, 0); ++ return unzOpenInternal(path, &memory_file); +} + extern int ZEXPORT unzClose(unzFile file) diff --git a/mingw-w64-zlib/013-fix-largefile-support.patch b/mingw-w64-zlib/013-fix-largefile-support.patch new file mode 100644 index 0000000000..492af539d0 --- /dev/null +++ b/mingw-w64-zlib/013-fix-largefile-support.patch @@ -0,0 +1,12 @@ +diff -Naur zlib-1.2.8-pure/zconf.h.in zlib-1.2.8/zconf.h.in +--- zlib-1.2.8-pure/zconf.h.in 2013-04-28 23:57:11.000000000 +0100 ++++ zlib-1.2.8/zconf.h.in 2015-03-15 22:45:37.900299300 +0000 +@@ -481,7 +481,7 @@ + # define z_off_t long + #endif + +-#if !defined(_WIN32) && defined(Z_LARGE64) ++#if (defined(_WIN32) && defined(__GNUC__) && defined(_LARGEFILE64_SOURCE)) || defined(Z_LARGE64) + # define z_off64_t off64_t + #else + # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) diff --git a/mingw-w64-zlib/PKGBUILD b/mingw-w64-zlib/PKGBUILD index 9abf2b34ca..5cf2ce3a85 100644 --- a/mingw-w64-zlib/PKGBUILD +++ b/mingw-w64-zlib/PKGBUILD @@ -1,16 +1,19 @@ # Maintainer: Alexey Pavlov # Contributor: Martell Malone +# Contributor: Renato Silva +# Contributor: Ray Donnelly _realname=zlib +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.2.8 -pkgrel=5 +pkgrel=9 pkgdesc="Compression library implementing the deflate compression method found in gzip and PKZIP (mingw-w64)" arch=('any') -groups=("${MINGW_PACKAGE_PREFIX}") -license=('custom') +license=(ZLIB) url="http://www.zlib.net/" depends=("${MINGW_PACKAGE_PREFIX}-bzip2") +makedepends=('git') options=('staticlibs') source=("http://zlib.net/current/${_realname}-${pkgver}.tar.gz" "git://github.com/nmoinvaz/minizip.git" @@ -21,7 +24,8 @@ source=("http://zlib.net/current/${_realname}-${pkgver}.tar.gz" 05-fix-a-typo.mingw.patch 010-unzip-add-function-unzOpenBuffer.patch 011-Add-no-undefined-to-link-to-enable-build-shared-vers.patch - 012-Add-bzip2-library-to-pkg-config-file.patch) + 012-Add-bzip2-library-to-pkg-config-file.patch + 013-fix-largefile-support.patch) md5sums=('44d667c142d7cda120332623eab69f40' 'SKIP' '63affd37e371768c6adc6e6561e66daf' @@ -29,15 +33,16 @@ md5sums=('44d667c142d7cda120332623eab69f40' 'bb6c8eeb7f03978982406bca35f62ca3' '94f53bd0a4a4068bcedc195004e70316' '076b81ef097c6916cb81daa3ba8c3afa' - 'b6eaeb043f07dd3f50f355bb7f5dca3f' + '97b34cd7acb242436d567d1ba109686d' '68587b18a860e32753554a89450698b9' - '10dcd6aeb87d3e4da236f217de953d52') + '10dcd6aeb87d3e4da236f217de953d52' + '717b2c8b8e4e7bc4d9356e25b66161d6') prepare() { # Replace minizip with external rm -rf ${srcdir}/${_realname}-${pkgver}/contrib/minizip cp -r ${srcdir}/minizip/ ${srcdir}/${_realname}-${pkgver}/contrib - + cd ${srcdir}/${_realname}-${pkgver} grep -A 24 '^ Copyright' zlib.h > LICENSE @@ -47,6 +52,8 @@ prepare() { #patch -p2 -i ${srcdir}/04-wrong-w8-check.mingw.patch #patch -p2 -i ${srcdir}/05-fix-a-typo.mingw.patch + patch -p1 -i ${srcdir}/013-fix-largefile-support.patch + cd ${srcdir}/${_realname}-${pkgver}/contrib/minizip git am ${srcdir}/010-unzip-add-function-unzOpenBuffer.patch git am ${srcdir}/011-Add-no-undefined-to-link-to-enable-build-shared-vers.patch @@ -58,7 +65,7 @@ build() { cd ${srcdir}/${_realname}-${pkgver} CHOST=${MINGW_CHOST} ./configure --prefix=${MINGW_PREFIX} --shared make -j1 all - + # build minizip pushd contrib/minizip > /dev/null autoreconf -fi @@ -85,4 +92,5 @@ package() { pushd contrib/minizip > /dev/null make install DESTDIR="${pkgdir}" popd > /dev/null + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" } diff --git a/mingw-w64-zziplib/PKGBUILD b/mingw-w64-zziplib/PKGBUILD index 3d752665a3..a828926e01 100644 --- a/mingw-w64-zziplib/PKGBUILD +++ b/mingw-w64-zziplib/PKGBUILD @@ -1,19 +1,21 @@ # Maintainer: Alexey Pavlov _realname=zziplib - pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.13.62 -pkgrel=3 +pkgrel=4 pkgdesc="A lightweight library that offers the ability to easily extract data from files archived in a single zip file (mingw-w64)" arch=('any') url="http://zziplib.sourceforge.net" license=("LGPL, MPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "python2" "${MINGW_PACKAGE_PREFIX}-SDL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-SDL" + "python2") depends=( "${MINGW_PACKAGE_PREFIX}-zlib") optdepends=("${MINGW_PACKAGE_PREFIX}-SDL: SDL_rwops for ZZipLib") options=('staticlibs' 'strip') -source=("http://downloads.sourceforge.net/zziplib/zziplib-${pkgver}.tar.bz2" +source=("http://downloads.sourceforge.net/zziplib/${_realname}-${pkgver}.tar.bz2" "configure.patch" "mingw-mmap-workaround.patch") md5sums=('5fe874946390f939ee8f4abe9624b96c' @@ -21,7 +23,7 @@ md5sums=('5fe874946390f939ee8f4abe9624b96c' '9307404f1699849cb0f2eaf5e0217d92') prepare() { - cd "$srcdir/zziplib-$pkgver" + cd "${srcdir}/${_realname}-${pkgver}" patch -Np1 -i $srcdir/configure.patch patch -Np1 -i $srcdir/mingw-mmap-workaround.patch } @@ -31,12 +33,13 @@ build() { export PERL=/usr/bin/perl mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "${srcdir}/build-${MINGW_CHOST}" - "${srcdir}"/${_realname}-${pkgver}/configure \ + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --with-zlib=${MINGW_PREFIX} \ --enable-sdl + make } @@ -47,5 +50,5 @@ check() { package() { cd "${srcdir}/build-${MINGW_CHOST}" - make DESTDIR="$pkgdir" install + make DESTDIR="${pkgdir}" install }