]> saetta.ns0.it Git - msys2/commitdiff
gtranslator: nuovo pacchetto WIP.
authorAndrea Zagli <azagli@libero.it>
Wed, 8 Apr 2015 09:34:20 +0000 (11:34 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 21 Apr 2018 13:13:22 +0000 (15:13 +0200)
packages/mingw-w64-gtranslator/001-win.patch [new file with mode: 0644]
packages/mingw-w64-gtranslator/PKGBUILD [new file with mode: 0644]
packages/mingw-w64-gtranslator/gtranslator-i686.install [new file with mode: 0644]
packages/mingw-w64-gtranslator/gtranslator-x86_64.install [new file with mode: 0644]

diff --git a/packages/mingw-w64-gtranslator/001-win.patch b/packages/mingw-w64-gtranslator/001-win.patch
new file mode 100644 (file)
index 0000000..8175b04
--- /dev/null
@@ -0,0 +1,160 @@
+--- ./m4/intltool.m4.orig      2015-03-15 13:17:17.000000000 +0100
++++ ./m4/intltool.m4   2015-04-06 23:00:26.906721500 +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])
+ ])
+--- ./plugins/codeview/Makefile.am.orig        2015-03-15 13:12:46.000000000 +0100
++++ ./plugins/codeview/Makefile.am     2015-04-06 23:00:27.019760500 +0200
+@@ -26,8 +26,8 @@
+       $(GTRANSLATOR_LIBS)
+-gtr-codeview-resources.c: gtr-codeview.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gtr-codeview.gresource.xml)
+-      $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source gtr-codeview.gresource.xml
++gtr-codeview-resources.c: gtr-codeview.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies $(srcdir)/gtr-codeview.gresource.xml)
++      $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/gtr-codeview.gresource.xml
+ # Plugin Info
+--- ./plugins/open-tran/Makefile.am.orig       2015-03-15 13:12:46.000000000 +0100
++++ ./plugins/open-tran/Makefile.am    2015-04-06 23:00:27.048759700 +0200
+@@ -26,8 +26,8 @@
+       $(GTRANSLATOR_LIBS)                             \
+       $(JSON_GLIB_LIBS)
+-gtr-open-tran-resources.c: gtr-open-tran.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gtr-open-tran.gresource.xml)
+-      $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source gtr-open-tran.gresource.xml
++gtr-open-tran-resources.c: gtr-open-tran.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies $(srcdir)/gtr-open-tran.gresource.xml)
++      $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/gtr-open-tran.gresource.xml
+ pixmaps_dir = $(datadir)/gtranslator/pixmaps
+--- ./plugins/translation-memory/Makefile.am.orig      2015-03-15 13:12:46.000000000 +0100
++++ ./plugins/translation-memory/Makefile.am   2015-04-06 23:00:27.061729900 +0200
+@@ -38,8 +38,8 @@
+       $(GTRANSLATOR_LIBS)                             \
+       gda/libgda.la
+-gtr-translation-memory-resources.c: gtr-translation-memory.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gtr-translation-memory.gresource.xml)
+-      $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source gtr-translation-memory.gresource.xml
++gtr-translation-memory-resources.c: gtr-translation-memory.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies $(srcdir)/gtr-translation-memory.gresource.xml)
++      $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/gtr-translation-memory.gresource.xml
+ # Plugin Info
+--- ./po/Makefile.in.in.orig   2015-03-15 13:17:17.000000000 +0100
++++ ./po/Makefile.in.in        2015-04-06 23:00:27.088759700 +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
+--- ./src/Makefile.am.orig     2015-03-15 13:12:46.000000000 +0100
++++ ./src/Makefile.am  2015-04-06 23:09:03.037314200 +0200
+@@ -4,9 +4,8 @@
+ SUBDIRS = toolbareditor
+-noinst_LTLIBRARIES = libgtranslator.la
+-
+-pkglib_LTLIBRARIES = libgtranslator-private.la
++noinst_LTLIBRARIES = libgtranslator.la \
++                     libgtranslator-private.la
+ INCLUDES = \
+       -I$(top_srcdir)                                         \
+@@ -51,13 +50,6 @@
+ BUILT_SOURCES_PRIVATE = \
+       gtr-resources.c
+-if PLATFORM_WIN32
+-gtranslator-res.o: gtranslator.rc
+-      $(WINDRES) -i gtranslator.rc --input-format=rc -o gtranslator-res.o -O coff
+-
+-gtranslator_LDADD += gtranslator-res.o
+-endif
+-
+ INST_H_FILES = \
+       gtr-application.h \
+       gtr-context.h \
+@@ -164,9 +156,9 @@
+       toolbareditor/libtoolbareditor.la \
+       $(GTRANSLATOR_LIBS)
+-libgtranslator_private_la_LIBADD = libgtranslator.la $(GTRANSLATOR_LIBS) $(GETTEXT_LIBS)
++libgtranslator_private_la_LIBADD = libgtranslator.la $(GTKSPELL_LIBS) $(GTRANSLATOR_LIBS) $(GETTEXT_LIBS)
+-libgtranslator_private_la_LDFLAGS = -avoid-version
++libgtranslator_private_la_LDFLAGS = -avoid-version -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
+ gtr-enum-types.h: gtr-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
+       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template gtr-enum-types.h.template $(INST_H_FILES)) > $@
+@@ -202,11 +194,12 @@
+ -include $(INTROSPECTION_MAKEFILE)
+ INTROSPECTION_GIRS = Gtranslator-3.0.gir
+-Gtranslator-3.0.gir: gtranslator
++Gtranslator-3.0.gir: gtranslator.exe
+ INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all --identifier-prefix=Gtr
++INTROSPECTION_SCANNER_ENV = CC="$(CC)"
+ Gtranslator_3_0_gir_NAMESPACE = Gtranslator
+ Gtranslator_3_0_gir_VERSION = 3.0
+-Gtranslator_3_0_gir_PROGRAM = $(builddir)/gtranslator
++Gtranslator_3_0_gir_PROGRAM = $(builddir)/gtranslator.exe
+ Gtranslator_3_0_gir_FILES = $(INST_H_FILES) $(libgtranslator_c_files)
+ Gtranslator_3_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
diff --git a/packages/mingw-w64-gtranslator/PKGBUILD b/packages/mingw-w64-gtranslator/PKGBUILD
new file mode 100644 (file)
index 0000000..a3bb1c7
--- /dev/null
@@ -0,0 +1,62 @@
+# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>
+
+_realname=gtranslator
+pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
+pkgver=2.91.7
+pkgrel=1
+arch=('any')
+pkgdesc="GNOME PO files editor (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}-gdl"
+         "${MINGW_PACKAGE_PREFIX}-iso-codes"
+         "${MINGW_PACKAGE_PREFIX}-gtkspell3"
+         "${MINGW_PACKAGE_PREFIX}-json-glib"
+         "${MINGW_PACKAGE_PREFIX}-libgda")
+makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config"
+             "${MINGW_PACKAGE_PREFIX}-vala"
+             "${MINGW_PACKAGE_PREFIX}-gobject-introspection"
+             "gtk-doc")
+license=("GPL 3")
+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=('2b25b45b33e4aa856953b4a5da1d98bd51a343ddb479aeae3934bfe0c3651f9d'
+            'e338b56c0bece500af0cfadeaf29e2a15cdaf2b211c7d9555a8df4a909d75e77')
+
+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 doc/reference/html
+  cp -rf ../${_realname}-${pkgver}/doc/reference/html/* doc/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" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
+}
diff --git a/packages/mingw-w64-gtranslator/gtranslator-i686.install b/packages/mingw-w64-gtranslator/gtranslator-i686.install
new file mode 100644 (file)
index 0000000..fcc957e
--- /dev/null
@@ -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/packages/mingw-w64-gtranslator/gtranslator-x86_64.install b/packages/mingw-w64-gtranslator/gtranslator-x86_64.install
new file mode 100644 (file)
index 0000000..6bcf507
--- /dev/null
@@ -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
+}