aboutsummaryrefslogtreecommitdiffstats
path: root/science/gwyddion/Makefile
blob: 7ad9e852d953a03069a16a6c607eb0dbccb2df11 (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
# New ports collection makefile for:    gwyddion
# Date created:             2006-08-06
# Whom:                 Yeti <yeti@gwyddion.net>
#
# $FreeBSD$
#

PORTNAME=   gwyddion
PORTVERSION=    2.16
PORTREVISION=   1
CATEGORIES= science graphics
MASTER_SITES=   SF

PATCH_SITES=    ${MASTER_SITES}
PATCH_SITE_SUBDIR=  ${MASTER_SITE_SUBDIR}

MAINTAINER= yeti@gwyddion.net
COMMENT=    A gtk2 based SPM data visualization and analysis tool

LIB_DEPENDS=    gtkglext-x11-1.0.0:${PORTSDIR}/x11-toolkits/gtkglext \
        fftw3.5:${PORTSDIR}/math/fftw3

GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc \
        --disable-pascal --disable-pygwy --without-kde4-thumbnailer

MAKE_ARGS=  pkgconfigdatadir=${PREFIX}/libdata/pkgconfig

USE_GNOME=  desktopfileutils gnomemimedata gtk20 libxml2
USE_GL=     yes
USE_BZIP2=  yes
USE_GMAKE=  yes
USE_PERL5=  yes
USE_PYTHON= yes
USE_RUBY=   yes
USE_LDCONFIG=   yes
INSTALLS_ICONS= yes

MAN1=       gwyddion.1 gwyddion-thumbnailer.1
MAN3=       Gwyddion::dump.3pm

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.else
USE_GETTEXT=    yes
PLIST_SUB+= NLS=""
.endif

.if !defined(WITHOUT_GCONF) || exists(${LOCALBASE}/bin/gconftool-2)
USE_GNOME+= gconf2
GCONF_SCHEMAS=  gwyddion-thumbnailer.schemas
.endif

# Fix shared library versioning and inhibit installation of .la files manually.
# Ports libtool + ltverhack fixes versions but it installs static versions of
# modules, so one would have to hack it too.
#
# Inhibit installation of excessive API documentation.  Option
# --disable-gtk-doc disables only building, not installation of documentation
# present in the source tarball.
post-patch:
    ${REINPLACE_CMD} -e \
        '/freebsd-elf)/,/;;/ s|major="\.$$current"|major=.`expr $$current - $$age`|; \
         /freebsd-elf)/,/;;/ s|versuffix="\.$$current"|versuffix="$$major"|; \
         /# Install the pseudo-library/,/^$$/d' \
        ${WRKSRC}/ltmain.sh
    @${REINPLACE_CMD} -e '/^SUBDIRS =/,/[^\]$$/d' ${WRKSRC}/devel-docs/Makefile.in

.include <bsd.port.mk>