aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm/ede/Makefile
blob: 454d680b6b33914ee61711e047c66e3f854e0563 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Created by: Sergey Matveychuk <sem@ciam.ru>
# $FreeBSD$

PORTNAME=   ede
PORTVERSION=    2.1
PORTREVISION=   1
CATEGORIES= x11-wm
MASTER_SITES=   SF \
        SF/${PORTNAME}/${PORTNAME}lib/${PORTVERSION}:edelib
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
        ${EDELIB_DISTFILE}:edelib

MAINTAINER= ports@FreeBSD.org
COMMENT=    Equinox Desktop Environment

LICENSE=    GPLv2 LGPL20
LICENSE_COMB=   multi

BUILD_DEPENDS=  doxygen:${PORTSDIR}/devel/doxygen \
        jam:${PORTSDIR}/devel/jam
LIB_DEPENDS=    libdbus-1.so:${PORTSDIR}/devel/dbus \
        libcurl.so:${PORTSDIR}/ftp/curl \
        libstartup-notification-1.so:${PORTSDIR}/x11/startup-notification \
        libfltk.so:${PORTSDIR}/x11-toolkits/fltk

USES=       fam gettext iconv:translit pathfix pkgconfig \
        shared-mime-info shebangfix
SHEBANG_FILES=  doc/asciidoc/asciidoc.py
python_OLD_CMD= ${SETENV} python
python_CMD= ${PYTHON_CMD}
USE_XORG=   xcomposite xft xinerama xpm xrandr
USE_PYTHON= 2
USE_CSTD=   gnu89
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  PEKWM_CXXFLAGS="${CXXFLAGS}" \
        PKG_CONFIG_PATH="${EDELIB_WRKSRC}/pc"
CONFIGURE_ARGS= --with-edelib-path=${EDELIB_WRKSRC} \
        --with-fltk-path=${LOCALBASE}
INSTALL_ICONS=  yes
MAKE_JOBS_UNSAFE=   yes

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

CONFLICTS_INSTALL=  pekwm-[0-9]*

OPTIONS_DEFINE=     HAL

HAL_LIB_DEPENDS=    libhal.so.1:${PORTSDIR}/sysutils/hal
HAL_CONFIGURE_ENABLE=   hal

EDELIB_NAME=    edelib
EDELIB_VERSION= ${PORTVERSION}
EDELIB_DISTNAME=${EDELIB_NAME}-${EDELIB_VERSION}
EDELIB_DISTFILE=${EDELIB_DISTNAME}${EXTRACT_SUFX}
EDELIB_WRKSRC=  ${WRKDIR}/${EDELIB_DISTNAME}

post-patch:
    @${REINPLACE_CMD} -e \
        '/DEVELOPER_FLAGS=/s|-pedantic|| ; \
         /OPTIM_FLAGS=/s|-O2|-fPIC| ; \
         s|_daylight=yes|_daylight=no| ; \
         s|/usr/local/share|${LOCALBASE}/share|' \
        ${EDELIB_WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        's|$$(CC)|@CXX@| ; \
         /-lstdc++/s|^|#|' ${EDELIB_WRKSRC}/Jamconfig.in
    @${REINPLACE_CMD} -e \
        's| -liconv| ${ICONV_LIB}|' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        's|$$(CC)|@CXX@| ; \
         /panel-applets/s|EDE_DATA_DIR|libdir| ; \
         /-lstdc++/s|^|#|' ${WRKSRC}/Jamconfig.in
    @${REINPLACE_CMD} -e \
        '/desktop-links/s|^|#|' ${WRKSRC}/data/Jamfile
    @${REINPLACE_CMD} -e \
        '/-ldl/s|^|#|' ${WRKSRC}/ede-panel/Jamfile
    @${REINPLACE_CMD} -e \
        's|"\(panel-applets\)"|"../../lib/ede/\1"|' \
        ${WRKSRC}/ede-panel/Panel.cpp

pre-configure:
    @(cd ${EDELIB_WRKSRC} \
        && ${SETENV} ${CONFIGURE_ENV} ./configure \
        --prefix=${WRKDIR}/fakeroot \
        --with-fltk-path=${LOCALBASE} \
        --build=${CONFIGURE_TARGET} \
        CC="${CC}" CXX="${CXX}" \
        CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
        CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}")

pre-build:
    @(cd ${EDELIB_WRKSRC} \
        && ${LOCALBASE}/bin/jam -j${MAKE_JOBS_NUMBER} \
        && ${LOCALBASE}/bin/jam ${INSTALL_TARGET})

do-build:
    @(cd ${BUILD_WRKSRC} && ${LOCALBASE}/bin/jam -j${MAKE_JOBS_NUMBER})

do-install:
    @(cd ${INSTALL_WRKSRC} && ${SETENV} DESTDIR="${STAGEDIR}" \
        ${LOCALBASE}/bin/jam ${INSTALL_TARGET})
    @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/ede-2.1.0/manual/images
    @(cd ${WRKSRC}/doc/manual/images && ${COPYTREE_SHARE} . \
        ${STAGEDIR}${PREFIX}/share/doc/ede-2.1.0/manual/images)
.for i in ede-about ede-autostart ede-bell-conf ede-bug-report ede-crasher \
    ede-calc ede-conf ede-desktop ede-desktop-conf ede-dialog \
    ede-keyboard-conf ede-notify-daemon ede-screensaver-conf \
    ede-image-view ede-launch ede-timedate ede-tip ede-tip-compiler \
    ede-preferred-applications evoke ede-shutdown ede-panel pekwm
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${i}
.endfor
.for i in battery_monitor.so clock.so cpu_monitor.so keyboard_layout.so \
    mem_monitor.so pager.so quick_launch.so start_menu.so \
    system_tray.so taskbar.so
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ede/panel-applets/${i}
.endfor

.include <bsd.port.mk>