38a9e2a432
This fixes the build on architechtures where MACHINE and MACHINE_ARCH to differ. But put it in the -common port so it shared between both versions of py-gobject3. [1] Work around python plist issue [2] PR: 188856 [1], 195342 [2], 195738 [2], 195748 [2] Sumbitted by: sbruno [1], mva[2]
78 lines
2.4 KiB
Makefile
78 lines
2.4 KiB
Makefile
# Created by: Gustau Perez i Querol <gustau.perez@gmail.com>
|
|
# $FreeBSD$
|
|
# $MCom: ports/trunk/devel/pygobject3-common/Makefile 19953 2014-10-15 08:51:31Z gusi $
|
|
|
|
PORTNAME= gobject
|
|
PORTVERSION= 3.14.0
|
|
PORTREVISION?= 0
|
|
CATEGORIES= devel python
|
|
MASTER_SITES= GNOME
|
|
MASTER_SITE_SUBDIR= sources/pygobject/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
|
|
PKGNAMEPREFIX?= py
|
|
PKGNAMESUFFIX?= 3-common
|
|
DISTNAME= pygobject-${PORTVERSION}
|
|
DIST_SUBDIR= gnome3
|
|
|
|
MAINTAINER= gnome@FreeBSD.org
|
|
COMMENT= Common files for the Python bindings for GObject
|
|
|
|
LICENSE= LGPL21
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
SLAVE_PORT?= no
|
|
|
|
USES= gmake libtool pathfix pkgconfig tar:xz
|
|
GNU_CONFIGURE= yes
|
|
INSTALL_TARGET= install-strip
|
|
|
|
# this port doesn't work with py-gobject < 2.28.6_2, clungle below
|
|
CONFLICTS= py*-gtk-0* py*-gobject-2.*.[0-6] py*-gobject-2.*.[7-9] \
|
|
py*-gobject-2.*.6_1
|
|
|
|
PLIST_SUB= ARCH=${ARCH} UNAME_R=${UNAME_R} VERSION=${PORTVERSION} \
|
|
OPSYS=${OPSYS:tl} UNAME_M=${UNAME_M}
|
|
|
|
# Override PYTHON_VERSION from DEPENDS_ARGS
|
|
MAKE_ARGS= PYTHON_VERSION=${PYTHON_VER}
|
|
|
|
.if ${SLAVE_PORT} == no
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pycairo.pc:${PORTSDIR}/graphics/py-cairo
|
|
USES+= python:build
|
|
USE_GNOME= glib20:build introspection:build
|
|
NO_BUILD= yes
|
|
|
|
do-install:
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/include/pygobject-3.0/
|
|
${INSTALL_DATA} ${WRKSRC}/gi/pygobject.h \
|
|
${STAGEDIR}${PREFIX}/include/pygobject-3.0/pygobject.h
|
|
${INSTALL_DATA} ${WRKSRC}/pygobject-3.0.pc \
|
|
${STAGEDIR}${PREFIX}/libdata/pkgconfig/pygobject-3.0.pc
|
|
.else
|
|
USE_GNOME+= glib20 introspection
|
|
LIB_DEPENDS+= libffi.so:${PORTSDIR}/devel/libffi
|
|
RUN_DEPENDS+= pygobject3-common>=0:${PORTSDIR}/devel/pygobject3-common
|
|
|
|
.if ${SLAVE_PORT} == python2
|
|
USES+= python:2
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pycairo.pc:${PORTSDIR}/graphics/py-cairo
|
|
RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pycairo.pc:${PORTSDIR}/graphics/py-cairo
|
|
.endif
|
|
|
|
.if ${SLAVE_PORT} == python3
|
|
USES+= python:3
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/py3cairo.pc:${PORTSDIR}/graphics/py3-cairo
|
|
RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/py3cairo.pc:${PORTSDIR}/graphics/py3-cairo
|
|
PLIST_SUB+= PYTVER=${PYTHON_VER:S/.//}
|
|
.endif
|
|
|
|
post-install:
|
|
@${RM} -rf ${STAGEDIR}${PREFIX}/include/pygobject-3.0 \
|
|
${STAGEDIR}${PREFIX}/libdata/pkgconfig/pygobject-3.0.pc
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
UNAME_R!= ${UNAME} -r
|
|
UNAME_M!= ${UNAME} -m
|
|
|
|
.include <bsd.port.post.mk>
|