Add pygobject2 package.
This commit is contained in:
121
mingw-w64-pygobject2/PKGBUILD
Normal file
121
mingw-w64-pygobject2/PKGBUILD
Normal file
@@ -0,0 +1,121 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=pygobject
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
pkgname=("${_mingw_suff}-python2-gobject2" "${_mingw_suff}-python3-gobject2" "${_mingw_suff}-pygobject2-devel")
|
||||
pkgver=2.28.6
|
||||
pkgrel=1
|
||||
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_suff}")
|
||||
makedepends=("${_mingw_suff}-python2" "${_mingw_suff}-python3" "${_mingw_suff}-gobject-introspection" "${_mingw_suff}-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)
|
||||
md5sums=('9415cb7f2b3a847f2310ccea258b101e'
|
||||
'5dcee45159fb9d08248d56d0e73849c7'
|
||||
'26dfa9c5e6bd11c250e9f9b485bd0a96')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
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"
|
||||
for builddir in python{2,3}-build; do
|
||||
pushd $builddir
|
||||
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
|
||||
done
|
||||
}
|
||||
|
||||
check() {
|
||||
for builddir in python{2,3}-build; do
|
||||
pushd ${srcdir}/$builddir
|
||||
PYTHON=${MINGW_PREFIX}/bin/${builddir%-build} \
|
||||
make check
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
package_python2-gobject2() {
|
||||
pkgdesc="Python 2 bindings for GObject2 (mingw-w64)"
|
||||
depends=("${_mingw_suff}-glib2" "${_mingw_suff}-libffi" "${_mingw_suff}-gobject-introspection" "${_mingw_suff}-pygobject2-devel=$pkgver")
|
||||
|
||||
cd python2-build
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
find "${pkgdir}${MINGW_PREFIX}"/share/pygobject -name '*.py' -exec \
|
||||
sed -i '1s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' {} +
|
||||
|
||||
rm -r "${pkgdir}${MINGW_PREFIX}"/share/gtk-doc
|
||||
|
||||
# Split devel stuff
|
||||
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
|
||||
}
|
||||
|
||||
package_python3-gobject2() {
|
||||
pkgdesc="Python 3 bindings for GObject2 (mingw-w64)"
|
||||
depends=("${_mingw_suff}-glib2" "${_mingw_suff}-libffi" "${_mingw_suff}-gobject-introspection" "${_mingw_suff}-pygobject2-devel=$pkgver")
|
||||
|
||||
cd python3-build
|
||||
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}}
|
||||
}
|
||||
|
||||
package_pygobject2-devel() {
|
||||
pkgdesc="Development files for the pygobject bindings"
|
||||
mv ${srcdir}/devel${MINGW_PREFIX} "${pkgdir}/"
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-pygobject2-devel() {
|
||||
package_pygobject2-devel
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-pygobject2-devel() {
|
||||
package_pygobject2-devel
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python2-gobject2() {
|
||||
package_python2-gobject2
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python3-gobject2() {
|
||||
package_python3-gobject2
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python2-gobject2() {
|
||||
package_python2-gobject2
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python3-gobject2() {
|
||||
package_python3-gobject2
|
||||
}
|
||||
154
mingw-w64-pygobject2/python-m4.patch
Normal file
154
mingw-w64-pygobject2/python-m4.patch
Normal file
@@ -0,0 +1,154 @@
|
||||
--- a/m4/python.m4 2011-06-13 20:30:25.000000000 +0400
|
||||
+++ b/m4/python.m4 2014-02-01 11:34:44.000000000 +0400
|
||||
@@ -43,16 +43,14 @@
|
||||
[AC_REQUIRE([AM_PATH_PYTHON])
|
||||
AC_MSG_CHECKING(for headers required to compile python extensions)
|
||||
dnl deduce PYTHON_INCLUDES
|
||||
-py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
|
||||
-py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
|
||||
-PYTHON_CONFIG=`which $PYTHON`-config
|
||||
-if test -x "$PYTHON_CONFIG"; then
|
||||
-PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
|
||||
-else
|
||||
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
|
||||
-if test "$py_prefix" != "$py_exec_prefix"; then
|
||||
- PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
|
||||
-fi
|
||||
+if test "x$PYTHON_INCLUDES" = x; then
|
||||
+ PYTHON_CONFIG=`which $PYTHON`-config
|
||||
+ if test -x "$PYTHON_CONFIG"; then
|
||||
+ PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
|
||||
+ else
|
||||
+ PYTHON_INCLUDES=`$PYTHON -c "import distutils.sysconfig, sys; sys.stdout.write(distutils.sysconfig.get_python_inc(True))"`
|
||||
+ PYTHON_INCLUDES="-I$PYTHON_INCLUDES"
|
||||
+ fi
|
||||
fi
|
||||
AC_SUBST(PYTHON_INCLUDES)
|
||||
dnl check if the headers exist:
|
||||
@@ -66,24 +64,30 @@
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
])
|
||||
|
||||
-# JD_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
-# ---------------------------------------------------------------------------
|
||||
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
|
||||
-# Run ACTION-IF-FALSE otherwise.
|
||||
-# This test uses sys.hexversion instead of the string equivalent.
|
||||
-# This is similar to AM_PYTHON_CHECK_VERSION, but without python 1.5.x support
|
||||
-# and with python 3.0 support.
|
||||
-AC_DEFUN([JD_PYTHON_CHECK_VERSION],
|
||||
- [prog="import sys
|
||||
-# split strings by '.' and convert to numeric. Append some zeros
|
||||
-# because we need at least 4 digits for the hex conversion.
|
||||
-# map returns an iterator in Python 3.0 and a list in 2.x
|
||||
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
|
||||
-minverhex = 0
|
||||
-# xrange is not present in Python 3.0 and range returns an iterator
|
||||
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
|
||||
-sys.exit(sys.hexversion < minverhex)"
|
||||
- AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
|
||||
+dnl a macro to check for ability to embed python
|
||||
+dnl AM_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
|
||||
+dnl function also defines PYTHON_LIBS
|
||||
+AC_DEFUN([AM_CHECK_PYTHON_LIBS],
|
||||
+[AC_REQUIRE([AM_PATH_PYTHON])
|
||||
+AC_MSG_CHECKING(for libraries required to embed python)
|
||||
+dnl deduce PYTHON_LIBS
|
||||
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
|
||||
+if test "x$PYTHON_LIBS" = x; then
|
||||
+ PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
|
||||
+fi
|
||||
+if test "x$PYTHON_LIB_LOC" = x; then
|
||||
+ PYTHON_LIB_LOC="${py_prefix}/lib"
|
||||
+fi
|
||||
+AC_SUBST(PYTHON_LIBS)
|
||||
+AC_SUBST(PYTHON_LIB_LOC)
|
||||
+dnl check if the headers exist:
|
||||
+save_LIBS="$LIBS"
|
||||
+LIBS="$LIBS $PYTHON_LIBS"
|
||||
+AC_TRY_LINK_FUNC(Py_Initialize, dnl
|
||||
+ [LIBS="$save_LIBS"; AC_MSG_RESULT(yes); $1], dnl
|
||||
+ [LIBS="$save_LIBS"; AC_MSG_RESULT(no); $2])
|
||||
+
|
||||
+])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
@@ -119,8 +123,7 @@
|
||||
dnl Find a Python interpreter. Python versions prior to 2.0 are not
|
||||
dnl supported
|
||||
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
|
||||
- [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
|
||||
-python2.1 python2.0])
|
||||
+ [python3 python3.3 python3.2 python3.1 python2 python2.7 python])
|
||||
|
||||
m4_if([$1],[],[
|
||||
dnl No version check is needed.
|
||||
@@ -134,7 +137,7 @@
|
||||
if test -n "$PYTHON"; then
|
||||
# If the user set $PYTHON, use it and don't search something else.
|
||||
AC_MSG_CHECKING([whether $PYTHON version >= $1])
|
||||
- JD_PYTHON_CHECK_VERSION([$PYTHON], [$1],
|
||||
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_ERROR(too old)])
|
||||
am_display_PYTHON=$PYTHON
|
||||
@@ -145,7 +148,7 @@
|
||||
[am_cv_pathless_PYTHON],[
|
||||
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
|
||||
test "$am_cv_pathless_PYTHON" = none && break
|
||||
- JD_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
|
||||
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
|
||||
done])
|
||||
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
|
||||
if test "$am_cv_pathless_PYTHON" = none; then
|
||||
--- a/configure.ac.orig 2014-02-23 10:45:36.212800000 +0400
|
||||
+++ b/configure.ac 2014-02-23 10:47:01.700800000 +0400
|
||||
@@ -89,36 +89,28 @@
|
||||
JD_PATH_PYTHON(python_min_ver)
|
||||
|
||||
# check if we are building for python 3
|
||||
-JD_PYTHON_CHECK_VERSION([$PYTHON], [3.0],
|
||||
+AM_PYTHON_CHECK_VERSION([$PYTHON], [3.0],
|
||||
build_py3k=true,
|
||||
build_py3k=false)
|
||||
|
||||
# if building for python 3 make sure we have the minimum version supported
|
||||
if test $build_py3k = true ; then
|
||||
AC_MSG_CHECKING([for $PYTHON >=] python3_min_ver)
|
||||
- JD_PYTHON_CHECK_VERSION([$PYTHON], python3_min_ver,
|
||||
+ AM_PYTHON_CHECK_VERSION([$PYTHON], python3_min_ver,
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_ERROR(too old)])
|
||||
fi
|
||||
|
||||
-AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
|
||||
-
|
||||
-AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
|
||||
-old_CPPFLAGS=$CPPFLAGS
|
||||
-CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
|
||||
-AC_TRY_COMPILE([#include <Python.h>],
|
||||
- [PySignal_SetWakeupFd(0);],
|
||||
- setwakeupfd_ok=yes,
|
||||
- setwakeupfd_ok=no)
|
||||
-AC_MSG_RESULT($setwakeupfd_ok)
|
||||
-if test "x$setwakeupfd_ok" != xno; then
|
||||
- AC_DEFINE(HAVE_PYSIGNAL_SETWAKEUPFD, 1,
|
||||
- [Define to 1 if PySignal_SetWakeupFd is available])
|
||||
+# - 'SO' for PyPy, CPython 2.7-3.2
|
||||
+# - 'EXT_SUFFIX' for CPython3.3+ (http://bugs.python.org/issue16754)
|
||||
+# - fallback to '.so'
|
||||
+PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfig.get_config_var; sys.stdout.write(get('EXT_SUFFIX') or get('SO') or '.so');"`
|
||||
+AC_SUBST(PYTHON_SO)
|
||||
+
|
||||
+AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
|
||||
+if test "x$os_win32" = "xyes"; then
|
||||
+ AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
|
||||
fi
|
||||
-CPPFLAGS=$old_CPPFLAGS
|
||||
-
|
||||
-PLATFORM=`$PYTHON -c "import sys; from distutils import util; sys.stdout.write(util.get_platform())"`
|
||||
-AC_SUBST(PLATFORM)
|
||||
|
||||
AC_ARG_ENABLE(thread,
|
||||
AC_HELP_STRING([--disable-thread], [Disable pygobject threading support]),,
|
||||
219
mingw-w64-pygobject2/win32-fix.patch
Normal file
219
mingw-w64-pygobject2/win32-fix.patch
Normal file
@@ -0,0 +1,219 @@
|
||||
diff -Naur a/gi/Makefile.am b/gi/Makefile.am
|
||||
--- a/gi/Makefile.am 2011-06-13 20:30:25.000000000 +0400
|
||||
+++ b/gi/Makefile.am 2014-02-23 11:03:40.784200000 +0400
|
||||
@@ -22,7 +22,8 @@
|
||||
_gi_la_LDFLAGS = \
|
||||
-module \
|
||||
-avoid-version \
|
||||
- -export-symbols-regex "init_gi|PyInit__gi"
|
||||
+ -export-symbols-regex "init_gi|PyInit__gi" \
|
||||
+ -shrext $(PYTHON_SO)
|
||||
_gi_la_LIBADD = \
|
||||
$(GI_LIBS) \
|
||||
$(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
|
||||
@@ -82,13 +83,13 @@
|
||||
# This is to ensure we have a symlink to the .so in the
|
||||
# build directory, which the Python interpreter can load
|
||||
# directly without having to know how to parse .la files.
|
||||
-.la.so:
|
||||
- test -L $@ || $(LN_S) .libs/$@ $@
|
||||
+%$(PYTHON_SO): %.la
|
||||
+ $(LN_S) -f .libs/$@ $@
|
||||
|
||||
-all-local: $(LTLIBRARIES:.la=.so)
|
||||
-check-local: $(LTLIBRARIES:.la=.so)
|
||||
+all-local: $(LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+check-local: $(LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
clean-local:
|
||||
- rm -f $(LTLIBRARIES:.la=.so)
|
||||
+ rm -f $(LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
|
||||
|
||||
|
||||
diff -Naur a/gio/Makefile.am b/gio/Makefile.am
|
||||
--- a/gio/Makefile.am 2011-06-13 20:33:49.000000000 +0400
|
||||
+++ b/gio/Makefile.am 2014-02-23 11:05:13.589200000 +0400
|
||||
@@ -25,7 +25,7 @@
|
||||
pygio_PYTHON = __init__.py
|
||||
|
||||
# linker flags
|
||||
-common_ldflags = -module -avoid-version
|
||||
+common_ldflags = -module -avoid-version -shrext $(PYTHON_SO)
|
||||
if PLATFORM_WIN32
|
||||
common_ldflags += -no-undefined
|
||||
endif
|
||||
@@ -67,7 +67,7 @@
|
||||
gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
|
||||
_gio_la_CFLAGS = $(GIO_CFLAGS)
|
||||
_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
|
||||
-_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
|
||||
+_gio_la_LIBADD = $(GIO_LIBS) $(PYTHON_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
|
||||
_gio_la_SOURCES = \
|
||||
giomodule.c \
|
||||
pygio-utils.c \
|
||||
@@ -85,7 +85,7 @@
|
||||
unix.c: $(GIOUNIX_DEFS) unix.override
|
||||
unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
|
||||
unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
|
||||
-unix_la_LIBADD = $(GIOUNIX_LIBS)
|
||||
+unix_la_LIBADD = $(GIOUNIX_LIBS) $(PYTHON_LIBS)
|
||||
unix_la_SOURCES = unixmodule.c
|
||||
nodist_unix_la_SOURCES = unix.c
|
||||
if BUILD_GIOUNIX
|
||||
@@ -108,10 +108,10 @@
|
||||
|
||||
|
||||
if BUILD_GIO
|
||||
-all: $(pkgpyexec_LTLIBRARIES:.la=.so)
|
||||
-check-local: $(pkgpyexec_LTLIBRARIES:.la=.so)
|
||||
+all: $(pkgpyexec_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+check-local: $(pkgpyexec_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
clean-local:
|
||||
- rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
|
||||
-.la.so:
|
||||
- $(LN_S) .libs/$@ $@ || true
|
||||
+ rm -f $(pkgpyexec_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+%$(PYTHON_SO): %.la
|
||||
+ $(LN_S) -f .libs/$@ $@
|
||||
endif
|
||||
diff -Naur a/glib/Makefile.am b/glib/Makefile.am
|
||||
--- a/glib/Makefile.am 2011-06-13 20:33:49.000000000 +0400
|
||||
+++ b/glib/Makefile.am 2014-02-23 11:06:35.612600000 +0400
|
||||
@@ -20,13 +20,14 @@
|
||||
option.py
|
||||
pyglib_LTLIBRARIES = _glib.la
|
||||
|
||||
-common_ldflags = -module -avoid-version
|
||||
+common_ldflags = -module -avoid-version -shrext $(PYTHON_SO)
|
||||
if PLATFORM_WIN32
|
||||
common_ldflags += -no-undefined
|
||||
endif
|
||||
|
||||
libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
|
||||
-libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
|
||||
+libpyglib_2_0_@PYTHON_BASENAME@_la_LDFLAGS = -no-undefined
|
||||
+libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS) $(PYTHON_LIBS)
|
||||
libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
|
||||
pyglib.c \
|
||||
pyglib.h \
|
||||
@@ -29,7 +30,7 @@
|
||||
|
||||
_glib_la_CFLAGS = $(GLIB_CFLAGS)
|
||||
_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
|
||||
-_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
|
||||
+_glib_la_LIBADD = $(GLIB_LIBS) $(PYTHON_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
|
||||
_glib_la_SOURCES = \
|
||||
glibmodule.c \
|
||||
pygiochannel.c \
|
||||
@@ -51,11 +52,11 @@
|
||||
_glib_la_CFLAGS += -DPLATFORM_WIN32
|
||||
endif
|
||||
|
||||
-all: $(pyglib_LTLIBRARIES:.la=.so)
|
||||
-check-local: $(pyglib_LTLIBRARIES:.la=.so)
|
||||
+all: $(pyglib_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+check-local: $(pyglib_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
clean-local:
|
||||
- rm -f $(pyglib_LTLIBRARIES:.la=.so)
|
||||
-.la.so:
|
||||
- $(LN_S) .libs/$@ $@ || true
|
||||
+ rm -f $(pyglib_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+%$(PYTHON_SO): %.la
|
||||
+ $(LN_S) -f .libs/$@ $@
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
diff -Naur a/gobject/Makefile.am b/gobject/Makefile.am
|
||||
--- a/gobject/Makefile.am 2011-06-13 20:33:49.000000000 +0400
|
||||
+++ b/gobject/Makefile.am 2014-02-23 11:08:30.106000000 +0400
|
||||
@@ -14,7 +14,7 @@
|
||||
propertyhelper.py
|
||||
pygobject_LTLIBRARIES = _gobject.la
|
||||
|
||||
-common_ldflags = -module -avoid-version
|
||||
+common_ldflags = -module -avoid-version -shrext $(PYTHON_SO)
|
||||
if PLATFORM_WIN32
|
||||
common_ldflags += -no-undefined
|
||||
endif
|
||||
@@ -35,6 +35,7 @@
|
||||
_gobject_la_LIBADD = \
|
||||
$(GLIB_LIBS) \
|
||||
$(FFI_LIBS) \
|
||||
+ $(PYTHON_LIBS) \
|
||||
$(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
|
||||
_gobject_la_SOURCES = \
|
||||
gobjectmodule.c \
|
||||
@@ -65,11 +66,11 @@
|
||||
endif
|
||||
|
||||
|
||||
-all: $(pygobject_LTLIBRARIES:.la=.so)
|
||||
-check-local: $(pygobject_LTLIBRARIES:.la=.so)
|
||||
+all: $(pygobject_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+check-local: $(pygobject_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
clean-local:
|
||||
- rm -f $(pygobject_LTLIBRARIES:.la=.so)
|
||||
-.la.so:
|
||||
- $(LN_S) .libs/$@ $@ || true
|
||||
+ rm -f $(pygobject_LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
+%$(PYTHON_SO): %.la
|
||||
+ $(LN_S) -f .libs/$@ $@
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
diff -Naur a/tests/Makefile.am b/tests/Makefile.am
|
||||
--- a/tests/Makefile.am 2011-06-13 20:33:49.000000000 +0400
|
||||
+++ b/tests/Makefile.am 2014-02-23 11:09:57.671800000 +0400
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
|
||||
libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
|
||||
-libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
|
||||
+libregress_la_LDFLAGS = -module -avoid-version -no-undefined $(GIO_LIBS) $(PYCAIRO_LIBS) -shrext $(PYTHON_SO)
|
||||
nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
|
||||
libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
|
||||
-libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
|
||||
+libgimarshallingtests_la_LDFLAGS = -module -avoid-version -no-undefined $(GLIB_LIBS) -shrext $(PYTHON_SO)
|
||||
|
||||
# This is a hack to make sure a shared library is built
|
||||
libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
|
||||
@@ -49,7 +49,7 @@
|
||||
noinst_LTLIBRARIES += testhelper.la
|
||||
|
||||
testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
|
||||
-testhelper_la_LDFLAGS = -module -avoid-version
|
||||
+testhelper_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LIBS) -shrext $(PYTHON_SO)
|
||||
testhelper_la_LIBADD = $(GLIB_LIBS)
|
||||
testhelper_la_SOURCES = \
|
||||
testhelpermodule.c \
|
||||
@@ -62,11 +62,11 @@
|
||||
$(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
|
||||
|
||||
|
||||
-.la.so:
|
||||
- test -L $@ || $(LN_S) .libs/$@ $@
|
||||
+%$(PYTHON_SO): %.la
|
||||
+ $(LN_S) -f .libs/$@ $@
|
||||
|
||||
|
||||
-all: $(LTLIBRARIES:.la=.so)
|
||||
+all: $(LTLIBRARIES:.la=$(PYTHON_SO))
|
||||
|
||||
TEST_FILES_STATIC = \
|
||||
test_gobject.py \
|
||||
@@ -109,7 +109,7 @@
|
||||
EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
|
||||
|
||||
clean-local:
|
||||
- rm -f $(LTLIBRARIES:.la=.so) file.txt~
|
||||
+ rm -f $(LTLIBRARIES:.la=$(PYTHON_SO)) file.txt~
|
||||
|
||||
DBUS_LAUNCH=$(shell which dbus-launch)
|
||||
RUN_TESTS_ENV_VARS= \
|
||||
@@ -121,7 +121,7 @@
|
||||
RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
|
||||
|
||||
# run tests in separately to avoid loading static and introspection bindings in the same process
|
||||
-check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
|
||||
+check-local: $(LTLIBRARIES:.la=$(PYTHON_SO)) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
|
||||
TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
|
||||
TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
|
||||
if BUILD_GIO
|
||||
Reference in New Issue
Block a user