From f298f7af70da07bb548b692d32ca624a717f24e6 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Wed, 10 Sep 2014 15:00:14 +0200 Subject: [PATCH] Pacchettizzata libgda con oracle, firebird e graphviz non mingw. --- .../mingw-w64-libgda-full/001-lemon.patch | 26 ++++++ .../mingw-w64-libgda-full/002-mysql-m4.patch | 29 ++++++ .../003-give-cc-to-gir-scanner.all.patch | 22 +++++ .../004-add-missing-symbols.patch | 10 ++ .../005-hack-convert-path-back-to-unix.patch | 17 ++++ packages/mingw-w64-libgda-full/PKGBUILD | 92 +++++++++++++++++++ 6 files changed, 196 insertions(+) create mode 100644 packages/mingw-w64-libgda-full/001-lemon.patch create mode 100644 packages/mingw-w64-libgda-full/002-mysql-m4.patch create mode 100644 packages/mingw-w64-libgda-full/003-give-cc-to-gir-scanner.all.patch create mode 100644 packages/mingw-w64-libgda-full/004-add-missing-symbols.patch create mode 100644 packages/mingw-w64-libgda-full/005-hack-convert-path-back-to-unix.patch create mode 100644 packages/mingw-w64-libgda-full/PKGBUILD diff --git a/packages/mingw-w64-libgda-full/001-lemon.patch b/packages/mingw-w64-libgda-full/001-lemon.patch new file mode 100644 index 0000000..5b2cb2b --- /dev/null +++ b/packages/mingw-w64-libgda-full/001-lemon.patch @@ -0,0 +1,26 @@ +--- libgda-5.2.2-orig/libgda/sql-parser/lemon.c 2013-10-19 14:35:16.000000000 +0200 ++++ libgda-5.2.2/libgda/sql-parser/lemon.c 2014-08-17 17:46:17.097616600 +0200 +@@ -2732,11 +2732,7 @@ + filename = lemp->filename; + if (local_out_dir) { + char *ptr; +-#ifdef __WIN32__ +- for (ptr = lemp->filename + strlen (lemp->filename) - 1; (ptr > lemp->filename) && (*ptr != '\\'); ptr--); +-#else + for (ptr = lemp->filename + strlen (lemp->filename) - 1; (ptr > lemp->filename) && (*ptr != '/'); ptr--); +-#endif + if (ptr > lemp->filename) + filename = ptr + 1; + } +@@ -3019,11 +3015,7 @@ + char *path,*cp; + char c; + +-#ifdef __WIN32__ +- cp = strrchr(argv0,'\\'); +-#else + cp = strrchr(argv0,'/'); +-#endif + if( cp ){ + c = *cp; + *cp = 0; diff --git a/packages/mingw-w64-libgda-full/002-mysql-m4.patch b/packages/mingw-w64-libgda-full/002-mysql-m4.patch new file mode 100644 index 0000000..c60fcad --- /dev/null +++ b/packages/mingw-w64-libgda-full/002-mysql-m4.patch @@ -0,0 +1,29 @@ +--- libgda-5.2.2-orig/m4/mysql.m4 2013-10-19 14:35:27.000000000 +0200 ++++ libgda-5.2.2/m4/mysql.m4 2014-08-17 18:12:40.293683300 +0200 +@@ -124,12 +124,12 @@ + for d in $mysql_test_dir + do + AC_MSG_CHECKING([checking for mysql files in $d]) +- if test -a $d/include/mysql.h -a -f $d/$mysql_loclibdir/libmysql$mysql_libext ++ if test -a $d/include/mariadb/mysql.h -a -f $d/$mysql_loclibdir/libmariadb.dll.a + then + save_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -I$d/include" ++ CFLAGS="$CFLAGS -I$d/include/mariadb" + save_LIBS="$LIBS" +- LIBS="$LIBS -L$d/$mysql_loclibdir -lmysql" ++ LIBS="$LIBS -L$d/$mysql_loclibdir -lmariadb" + AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + #include +@@ -144,8 +144,8 @@ + if test "x$mysql_found" = xyes + then + AC_MSG_RESULT([found]) +- MYSQL_CFLAGS=-I$d/include +- MYSQL_LIBS="-L$d/$mysql_loclibdir -lmysql" ++ MYSQL_CFLAGS=-I$d/include/mariadb ++ MYSQL_LIBS="-L$d/$mysql_loclibdir -lmariadb" + break + fi + AC_MSG_RESULT([files found but are not useable]) diff --git a/packages/mingw-w64-libgda-full/003-give-cc-to-gir-scanner.all.patch b/packages/mingw-w64-libgda-full/003-give-cc-to-gir-scanner.all.patch new file mode 100644 index 0000000..359b71c --- /dev/null +++ b/packages/mingw-w64-libgda-full/003-give-cc-to-gir-scanner.all.patch @@ -0,0 +1,22 @@ +diff -Naur libgda-5.2.2-orig/libgda/Makefile.am libgda-5.2.2/libgda/Makefile.am +--- libgda-5.2.2-orig/libgda/Makefile.am 2013-12-20 00:52:43.000000000 +0400 ++++ libgda-5.2.2/libgda/Makefile.am 2014-08-20 19:41:13.641600000 +0400 +@@ -307,6 +307,7 @@ + --namespace Gda \ + --warn-all \ + --c-include=libgda/libgda.h ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + + psupport = \ +diff -Naur libgda-5.2.2-orig/libgda-ui/Makefile.am libgda-5.2.2/libgda-ui/Makefile.am +--- libgda-5.2.2-orig/libgda-ui/Makefile.am 2013-10-19 16:35:28.000000000 +0400 ++++ libgda-5.2.2/libgda-ui/Makefile.am 2014-08-20 19:41:40.541400000 +0400 +@@ -176,6 +176,7 @@ + if ENABLE_GDAUI_GI + -include $(INTROSPECTION_MAKEFILE) + INTROSPECTION_GIRS = ++INTROSPECTION_SCANNER_ENV = CC="$(CC)" + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) \ + --add-include-path=$(top_builddir)/libgda \ + --add-include-path=$(top_builddir)/libgda-ui \ diff --git a/packages/mingw-w64-libgda-full/004-add-missing-symbols.patch b/packages/mingw-w64-libgda-full/004-add-missing-symbols.patch new file mode 100644 index 0000000..536ce38 --- /dev/null +++ b/packages/mingw-w64-libgda-full/004-add-missing-symbols.patch @@ -0,0 +1,10 @@ +--- libgda-5.2.2/libgda/libgda.symbols.orig 2014-08-20 22:29:06.782000000 +0400 ++++ libgda-5.2.2/libgda/libgda.symbols 2014-08-20 22:29:54.564800000 +0400 +@@ -294,6 +294,7 @@ + gda_data_model_thaw + gda_data_pivot_add_data + gda_data_pivot_add_field ++ gda_data_pivot_error_quark + gda_data_pivot_get_type + gda_data_pivot_new + gda_data_pivot_populate diff --git a/packages/mingw-w64-libgda-full/005-hack-convert-path-back-to-unix.patch b/packages/mingw-w64-libgda-full/005-hack-convert-path-back-to-unix.patch new file mode 100644 index 0000000..b5100ac --- /dev/null +++ b/packages/mingw-w64-libgda-full/005-hack-convert-path-back-to-unix.patch @@ -0,0 +1,17 @@ +--- libgda-5.2.2/configure.ac.orig 2014-08-21 15:51:22.890400000 +0400 ++++ libgda-5.2.2/configure.ac 2014-08-21 15:51:55.603600000 +0400 +@@ -288,6 +288,14 @@ + GLADE_PIXMAP=`$PKG_CONFIG --variable=pixmapdir gladeui-2.0`], [have_glade=no]) + fi + ++case "$host" in ++ *-*-mingw*) ++ GLADE_CATALOG=`cygpath -u $GLADE_CATALOG` ++ GLADE_PIXMAP=`cygpath -u $GLADE_PIXMAP` ++ ;; ++esac ++ ++ + AM_CONDITIONAL(HAVE_GDKPIXBUF, test x"$have_gdkpixbuf" = "xyes") + AC_SUBST(GDKPIXBUF_CFLAGS) + AC_SUBST(GDKPIXBUF_LIBS) diff --git a/packages/mingw-w64-libgda-full/PKGBUILD b/packages/mingw-w64-libgda-full/PKGBUILD new file mode 100644 index 0000000..dc6db9b --- /dev/null +++ b/packages/mingw-w64-libgda-full/PKGBUILD @@ -0,0 +1,92 @@ +# Maintainer: Andrea Zagli + +_realname=libgda +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-full" +pkgver=5.2.2 +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}-json-glib" + "${MINGW_PACKAGE_PREFIX}-libsoup" + "${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}-postgresql" + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" + "${MINGW_PACKAGE_PREFIX}-openldap" + "${MINGW_PACKAGE_PREFIX}-pkgconf" + "libintl") +conflicts=("${MINGW_PACKAGE_PREFIX}-libgda") +options=('strip' '!debug' 'staticlibs') +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' + 'e61c10e41ea2b343c6a50d0cbf1f2912b9d9273882249a998f60cda2f4a94d4c' + '5a9959715e63a82e5bf62bb3e6ffbe4d4b587094d13b671e2a676720c765e048' + 'a0a2e3ca548feedc6502f29ff0ef5f047bf2a7dabd7722011147872a5aea733b' + '852956cb1f2cd77174b53ab56f509f4766442277d236b0e0eed5650f288d9c89' + '88718da49d5c9671f4b7c7ac4a859762012c723928f3ad7c7000bad776200596') + +prepare() { + cd ${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-lemon.patch + patch -p1 -i ${srcdir}/002-mysql-m4.patch + patch -p1 -i ${srcdir}/003-give-cc-to-gir-scanner.all.patch + patch -p1 -i ${srcdir}/004-add-missing-symbols.patch + patch -p1 -i ${srcdir}/005-hack-convert-path-back-to-unix.patch + + autoreconf -fi +} + +build() { + if [ "${CARCH}" = "i686" ]; then + local _conf='--with-oracle=/c/Users/AndreaZ/Documents/development_environment_gtk3/instantclient_10_2/sdk --with-oracle-libdir-name=lib --with-firebird=/c/Users/AndreaZ/Documents/development_environment_gtk3/firebird --with-firebird-libdir-name=bin' + export GRAPHVIZ_CFLAGS="-I/c/Users/AndreaZ/Documents/development_environment_gtk3/graphviz/include/graphviz" + export GRAPHVIZ_LIBS="-L/c/Users/AndreaZ/Documents/development_environment_gtk3/graphviz/lib/release/dll -lgvc -lcgraph -lcdt" + else + local _conf='' + fi + + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + $_envvar \ + ../${_realname}-${pkgver}/configure \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --enable-gda-gi \ + --enable-introspection \ + --enable-gtk-doc-html=no \ + --without-help \ + --enable-system-mdbtools=no \ + --enable-gi-system-install=no \ + --with-ldap=${MINGW_PREFIX} \ + --with-mysql=${MINGW_PREFIX} \ + --with-mysql-libdir-name=lib \ + $_conf + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install +} -- 2.49.0