aboutsummaryrefslogtreecommitdiffstats
path: root/cad/repsnapper/Makefile
blob: 45ea1aa5a912afd2f3f94535dcb9f25b500652fc (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
# Created by: Martin Dieringer <martin.dieringe@gmx.de>
# $FreeBSD$

PORTNAME=   repsnapper
PORTVERSION=    2.2.0b3
CATEGORIES= cad
MASTER_SITES=   https://codeload.github.com/timschmidt/repsnapper/tar.gz/
DISTNAME=   ${PORTVERSION}
EXTRACT_SUFX=   #
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= martin.dieringer@gmx.de
COMMENT=    Controller and GCode generator for RepRap 3D printers

LICENSE=    GPLv2 BSD MIT
LICENSE_COMB=   multi

BUILD_DEPENDS=  p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser
LIB_DEPENDS=    libgtkglextmm-x11-1.2.so:${PORTSDIR}/x11-toolkits/gtkglextmm \
        libgtkmm-2.4.so:${PORTSDIR}/x11-toolkits/gtkmm24 \
        libglademm-2.4.so:${PORTSDIR}/devel/libglademm24 \
        libcairomm-1.0.so:${PORTSDIR}/graphics/cairomm \
        libzip.so:${PORTSDIR}/archivers/libzip \
        libatkmm-1.6.so:${PORTSDIR}/accessibility/atkmm \
        libglibmm-2.4.so:${PORTSDIR}/devel/glibmm \
        libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs \
        libsigc-2.0.so:${PORTSDIR}/devel/libsigc++20 \
        libpcre.so:${PORTSDIR}/devel/pcre \
        libdrm.so:${PORTSDIR}/graphics/libdrm \
        libpng15.so:${PORTSDIR}/graphics/png \
        libfreetype.so:${PORTSDIR}/print/freetype2 \
        libexpat.so:${PORTSDIR}/textproc/expat2 \
        libxml++-2.6.so:${PORTSDIR}/textproc/libxml++26 \
        libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
        libpangomm-1.4.so:${PORTSDIR}/x11-toolkits/pangomm

USES=       gmake pkgconfig iconv
USE_GNOME=  gdkpixbuf2 gtk20 libxml2
USE_GL=     gl
USE_AUTOTOOLS=  automake libtool
USE_XORG=   ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
        xext xfixes xi xinerama xmu xrandr xrender xt xxf86vm

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=    --disable-nls
PLIST_SUB+= NLS="@comment "
.endif

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
INSTALL_TARGET= install-strip
CONFIGURE_ARGS= --prefix=${PREFIX}

pre-configure:
    cd ${WRKSRC} && ./autogen.sh

post-configure:
    @${REINPLACE_CMD} 's|src/repsnapper.conf||' \
        ${WRKSRC}/Makefile
    @${REINPLACE_CMD} 's|DATADIRNAME = lib|DATADIRNAME = share|' \
        ${WRKSRC}/po/Makefile

post-install:
    ${MKDIR} ${PREFIX}/etc/xdg/repsnapper
    ${INSTALL_DATA} ${WRKSRC}/src/repsnapper.conf \
        ${PREFIX}/etc/xdg/repsnapper/repsnapper.conf.sample
    @if [ ! -f ${PREFIX}/etc/xdg/repsnapper/repsnapper.conf ]; then \
        ${CP} -p ${PREFIX}/etc/xdg/repsnapper/repsnapper.conf.sample \
            ${PREFIX}/etc/xdg/repsnapper/repsnapper.conf ; \
    fi

.include <bsd.port.mk>