aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fm/nemo/Makefile
blob: 6168c2a11d7166ffe2ed7e7b144dc92dad08ce56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Created by: Gustau Perez i Querol <gustau.perez@gmail.com>
# $FreeBSD$

PORTNAME=   nemo
PORTVERSION=    2.4.5
PORTREVISION=   1
CATEGORIES= x11-fm gnome
DIST_SUBDIR=    gnome3

MAINTAINER= gnome@FreeBSD.org
COMMENT=    File manager for the Cinnamon desktop

BUILD_DEPENDS=  gnome-icon-theme>=0:misc/gnome-icon-theme \
        gtkdocize:textproc/gtk-doc \
        ${PYTHON_PKGNAMEPREFIX}polib>=0:devel/py-polib@${PY_FLAVOR} \
        gnome-autogen.sh:devel/gnome-common \
        gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
LIB_DEPENDS=    libexif.so:graphics/libexif \
        libcinnamon-desktop.so:x11/cinnamon-desktop \
        libnotify.so:devel/libnotify \
        libexempi.so:textproc/exempi
RUN_DEPENDS=    gnome-icon-theme>=0:misc/gnome-icon-theme \
        gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas

USES=       autoreconf:build desktop-file-utils gettext gmake libtool pathfix \
        pkgconfig python:2.7 shared-mime-info
USE_GNOME=  gnomedesktop3 gnomeprefix intlhack introspection:build \
        libxml2 pygobject3
USE_GITHUB= yes
GH_ACCOUNT= linuxmint
GNU_CONFIGURE=  yes
INSTALLS_ICONS= yes
USE_LDCONFIG=   yes
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib -lpthread
INSTALL_TARGET= install-strip
CONFIGURE_ARGS= --enable-static --disable-packagekit

GLIB_SCHEMAS=   org.nemo.gschema.xml

OPTIONS_SUB=            yes
OPTIONS_DEFINE=         TRACKER
OPTIONS_DEFAULT=        TRACKER
TRACKER_CONFIGURE_ENABLE=   tracker
TRACKER_LIB_DEPENDS=        libtracker-sparql-1.0.so:sysutils/tracker
TRACKER_DESC=           Integration with tracker

post-patch:
    @${MKDIR} ${WRKSRC}/files${PREFIX}

    @${MV} ${WRKSRC}/files/usr/share ${WRKSRC}/files${PREFIX}

    @${REINPLACE_CMD} -e 's|0.16|1.0|g' \
        ${WRKSRC}/configure.in

    @${REINPLACE_CMD} -e 's|find|find ${WRKSRC}/files|g' \
        ${WRKSRC}/files/Makefile.in

    @${REINPLACE_CMD} -e 's|-DGTK_DISABLE_DEPRECATED||g' \
        ${WRKSRC}/configure.in

    @${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
        ${WRKSRC}/src/nemo-properties-window.c

    @${REINPLACE_CMD} -e 's|"-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"|""|g' \
        ${WRKSRC}/configure.in

    @${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g ;\
        s|@INTROSPECTION_TYPELIBDIR@|$$(libdir)/girepository-1.0|g ;\
        s|@INTROSPECTION_GIRDIR@|$$(datadir)/gir-1.0|g' \
        ${WRKSRC}/libnemo-extension/Makefile.am

    @${REINPLACE_CMD} -e 's|x-gnome-saved-search|x-nemo-saved-search|g' \
        ${WRKSRC}/data/nemo.xml.in \
        ${WRKSRC}/libnemo-private/nemo-file-utilities.h

    @${FIND} ${WRKSRC} -name \* | ${XARGS} ${EGREP} -l "#!.*\/usr\/bin\/python" | \
        ${XARGS} ${REINPLACE_CMD} -I "" -e "s|#!.*python.*|#!${PYTHON_CMD}|g"

    @${REINPLACE_CMD} 's|\"/usr|\"${PREFIX}|g' \
        ${WRKSRC}/data/merge_action_strings

    @${REINPLACE_CMD} 's|"files", "usr"|"files", "${PREFIX}".strip("/")|g' \
        ${WRKSRC}/data/merge_action_strings

pre-configure:
    cd ${WRKSRC} && ${SETENV} NOCONFIGURE=yes ${SH} ./autogen.sh

.include <bsd.port.mk>