diff --git a/docker-builder-data/build/script/packet/openblas-master.sh b/docker-builder-data/build/script/packet/openblas-master.sh index ffe8851..715bfe2 100644 --- a/docker-builder-data/build/script/packet/openblas-master.sh +++ b/docker-builder-data/build/script/packet/openblas-master.sh @@ -31,9 +31,7 @@ NO_AFFINITY = 1 COMMON_PROF = -pg EOF - if ! make -j${THREADS}; then - return 1 - fi + make -j${THREADS} libs netlib shared || return 1 } pkinstall() { diff --git a/docker-builder-data/build/script/packet/opentoonz-master.sh b/docker-builder-data/build/script/packet/opentoonz-master.sh index 03ee978..5063e9d 100644 --- a/docker-builder-data/build/script/packet/opentoonz-master.sh +++ b/docker-builder-data/build/script/packet/opentoonz-master.sh @@ -24,11 +24,13 @@ pkhook_version() { pkbuild() { local LOCAL_OPTIONS= local LOCAL_CMAKE_OPTIONS= + local LOCAL_LIB_SUFFIX=so if [ ! -z "$HOST" ]; then LOCAL_OPTIONS="--host=$HOST" fi if [ "$PLATFORM" = "win" ]; then - LOCAL_CMAKE_OPTIONS="-DCMAKE_SYSTEM_NAME=Windows" + LOCAL_CMAKE_OPTIONS="$LOCAL_CMAKE_OPTIONS -DCMAKE_SYSTEM_NAME=Windows" + LOCAL_LIB_SUFFIX="dll.a" fi if ! check_packet_function $NAME build.libtiff; then @@ -50,6 +52,8 @@ pkbuild() { -DCMAKE_PREFIX_PATH="$ENVDEPS_PACKET_DIR" \ -DCMAKE_MODULE_PATH="$ENVDEPS_NATIVE_PACKET_DIR/share/cmake-3.6.2/Modules" \ -DCMAKE_INSTALL_PREFIX="$INSTALL_PACKET_DIR" \ + -DPNG_PNG_INCLUDE_DIR="$ENVDEPS_PACKET_DIR/include" \ + -DPNG_LIBRARY="$ENVDEPS_PACKET_DIR/lib/libpng16.$LOCAL_LIB_SUFFIX" \ $LOCAL_CMAKE_OPTIONS \ $PK_CONFIGURE_OPTIONS \ ../sources; \ @@ -87,6 +91,10 @@ pkinstall() { cp "$LOCAL_DIR"/libintl*.dll "$TARGET" || return 1 cp "$LOCAL_DIR"/iconv*.dll "$TARGET" || return 1 cp "$LOCAL_DIR"/libtermcap*.dll "$TARGET" || return 1 + cp "$LOCAL_DIR"/libpcre*.dll "$TARGET" || return 1 + cp "$LOCAL_DIR"/libharfbuzz*.dll "$TARGET" || return 1 + cp "$LOCAL_DIR"/libjasper*.dll "$TARGET" || return 1 + cp "$LOCAL_DIR"/libjpeg*.dll "$TARGET" || return 1 # add icon cp "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/sources/toonz/toonz.ico" "$TARGET" || return 1 diff --git a/docker-builder-data/build/script/packet/png-1.6.26.sh b/docker-builder-data/build/script/packet/png-1.6.26.sh index 78c3550..38ad7aa 100644 --- a/docker-builder-data/build/script/packet/png-1.6.26.sh +++ b/docker-builder-data/build/script/packet/png-1.6.26.sh @@ -1,4 +1,6 @@ -DEPS="" +if [ "$PLATFORM" = "win" ]; then + DEPS="zlib-1.2.11" +fi PK_DIRNAME="libpng-1.6.26" PK_ARCHIVE="$PK_DIRNAME.tar.gz" diff --git a/docker-builder-data/build/script/packet/qt-5.7.sh b/docker-builder-data/build/script/packet/qt-5.7.sh index 083a15b..53e4560 100644 --- a/docker-builder-data/build/script/packet/qt-5.7.sh +++ b/docker-builder-data/build/script/packet/qt-5.7.sh @@ -43,7 +43,7 @@ pkbuild() { set_done $NAME build.configure fi - native_at_place make -j${THREADS} || return 1 + native_at_place make -j${THREADS} || native_at_place make ||return 1 } pkinstall() { diff --git a/docker-builder-data/build/script/packet/zlib-1.2.11.files/Makefile.mingw b/docker-builder-data/build/script/packet/zlib-1.2.11.files/Makefile.mingw new file mode 100644 index 0000000..0dfdeaa --- /dev/null +++ b/docker-builder-data/build/script/packet/zlib-1.2.11.files/Makefile.mingw @@ -0,0 +1,152 @@ +# Makefile for zlib, derived from Makefile.dj2. +# Modified for mingw32 by C. Spieler, 6/16/98. +# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. +# Last updated: Mar 2012. +# Tested under Cygwin and MinGW. + +# Copyright (C) 1995-2003 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type from the top level zlib directory: +# +# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc +# +# To use the asm code, type: +# cp contrib/asm?86/match.S ./match.S +# make LOC=-DASMV OBJA=match.o -fwin32/Makefile.gcc +# +# To install libz.a, zconf.h and zlib.h in the system directories, type: +# +# make install -fwin32/Makefile.gcc +# +# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. +# +# To install the shared lib, append SHARED_MODE=1 to the make command : +# +# make install -fwin32/Makefile.gcc SHARED_MODE=1 + +# Note: +# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN), +# the DLL name should be changed from "zlib1.dll". + +STATICLIB = libz.a +SHAREDLIB = zlib1.dll +IMPLIB = libz.dll.a + +# +# Set to 1 if shared object needs to be installed +# +SHARED_MODE=0 + +#LOC = -DASMV +#LOC = -DZLIB_DEBUG -g + +PREFIX = +#CC = $(PREFIX)gcc +CFLAGS = $(LOC) -O3 -Wall + +AS = $(CC) +ASFLAGS = $(LOC) -Wall + +LD = $(CC) +LDFLAGS = $(LOC) + +#AR = $(PREFIX)ar +ARFLAGS = rcs + +#RC = $(PREFIX)windres +RCFLAGS = --define GCC_WINDRES + +#STRIP = $(PREFIX)strip + +CP = cp -fp +# If GNU install is available, replace $(CP) with install. +INSTALL = $(CP) +RM = rm -f + +prefix ?= /usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o +OBJA = + +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +.S.o: + $(AS) $(ASFLAGS) -c -o $@ $< + +$(STATICLIB): $(OBJS) $(OBJA) + $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA) + +$(IMPLIB): $(SHAREDLIB) + +$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o + $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \ + -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o + $(STRIP) $@ + +zlibrc.o: win32/zlib1.rc + $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc + +.PHONY: install uninstall clean + +install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) + @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ + echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ + exit 1; \ + fi + -@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)' + -@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig + -if [ "$(SHARED_MODE)" = "1" ]; then \ + mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \ + $(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \ + $(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \ + fi + -$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)' + -$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)' + -$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)' + sed \ + -e 's|@prefix@|${prefix}|g' \ + -e 's|@exec_prefix@|${exec_prefix}|g' \ + -e 's|@libdir@|$(LIBRARY_PATH)|g' \ + -e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \ + -e 's|@includedir@|$(INCLUDE_PATH)|g' \ + -e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \ + zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc + +uninstall: + -if [ "$(SHARED_MODE)" = "1" ]; then \ + $(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \ + $(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \ + fi + -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h + -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h + -$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB) + +clean: + -$(RM) $(STATICLIB) + -$(RM) $(SHAREDLIB) + -$(RM) $(IMPLIB) + -$(RM) *.o + -$(RM) *.exe + -$(RM) foo.gz + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +gzclose.o: zlib.h zconf.h gzguts.h +gzlib.o: zlib.h zconf.h gzguts.h +gzread.o: zlib.h zconf.h gzguts.h +gzwrite.o: zlib.h zconf.h gzguts.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/docker-builder-data/build/script/packet/zlib-1.2.11.sh b/docker-builder-data/build/script/packet/zlib-1.2.11.sh new file mode 100644 index 0000000..fb69146 --- /dev/null +++ b/docker-builder-data/build/script/packet/zlib-1.2.11.sh @@ -0,0 +1,25 @@ +DEPS="" + +PK_DIRNAME="zlib-1.2.11" +PK_ARCHIVE="$PK_DIRNAME.tar.gz" +PK_URL="http://zlib.net/$PK_ARCHIVE" + +PK_CONFIGURE_OPTIONS_DEFAULT="--prefix=$INSTALL_PACKET_DIR --shared" +PK_LICENSE_FILES="README" + +source $INCLUDE_SCRIPT_DIR/inc-pkall-default.sh + +if [ "$PLATFORM" = "win" ]; then +pkbuild() { + cd "$BUILD_PACKET_DIR/$PK_DIRNAME" || return 1 + cp "$FILES_PACKET_DIR/Makefile.mingw" . + make -fMakefile.mingw -j${THREADS} || return 1 +} +pkinstall() { + cd "$BUILD_PACKET_DIR/$PK_DIRNAME" + BINARY_PATH="$INTALL_PACKET_DIR/bin" \ + INCLUDE_PATH="$INTALL_PACKET_DIR/include" \ + LIBRARY_PATH="$INTALL_PACKET_DIR/lib" \ + make -fMakefile.mingw install || return 1 +} +fi diff --git a/docker-builder-data/build/script/toolchain/win-common.sh b/docker-builder-data/build/script/toolchain/win-common.sh index a13be81..57a5a89 100755 --- a/docker-builder-data/build/script/toolchain/win-common.sh +++ b/docker-builder-data/build/script/toolchain/win-common.sh @@ -47,16 +47,17 @@ export TC_SIZE=/usr/bin/$TC_HOST-size export TC_STRINGS=/usr/bin/$TC_HOST-strings export TC_STRIP=/usr/bin/$TC_HOST-strip export TC_WINDMC=/usr/bin/$TC_HOST-windmc +export TC_RC=/usr/bin/$TC_HOST-windres export TC_WINDRES=/usr/bin/$TC_HOST-windres export TC_LDFLAGS=" -L/usr/$TC_HOST/sys-root/mingw/lib $INITIAL_LDFLAGS" -export TC_CFLAGS=" $TC_EXTRA_CPP_OPTIONS -I/usr/$TC_HOST/sys-root/mingw/include $INITIAL_CFLAGS" -export TC_CPPFLAGS=" $TC_EXTRA_CPP_OPTIONS -I/usr/$TC_HOST/sys-root/mingw/include $INITIAL_CPPFLAGS" -export TC_CXXFLAGS=" $TC_EXTRA_CPP_OPTIONS -I/usr/$TC_HOST/sys-root/mingw/include $INITIAL_CXXFLAGS" +export TC_CFLAGS=" $TC_EXTRA_CPP_OPTIONS $INITIAL_CFLAGS" +export TC_CPPFLAGS=" $TC_EXTRA_CPP_OPTIONS $INITIAL_CPPFLAGS" +export TC_CXXFLAGS=" $TC_EXTRA_CPP_OPTIONS $INITIAL_CXXFLAGS" export TC_PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/$TC_HOST/sys-root/mingw/lib/pkgconfig" export TC_PKG_CONFIG_LIBDIR="/usr/$TC_HOST/sys-root/mingw/lib" export TC_XDG_DATA_DIRS="$INITIAL_XDG_DATA_DIRS" -export TC_CMAKE_INCLUDE_PATH="/usr/$TC_HOST/sys-root/mingw/include:$INITIAL_CMAKE_INCLUDE_PATH" +export TC_CMAKE_INCLUDE_PATH="$INITIAL_CMAKE_INCLUDE_PATH" export TC_CMAKE_LIBRARY_PATH="/usr/$TC_HOST/sys-root/mingw/lib:$INITIAL_CMAKE_LIBRARY_PATH" unset TC_EXTRA_CPP_OPTIONS