aboutsummaryrefslogtreecommitdiffstats
path: root/biology/xmolwt/Makefile
blob: ae96c0cee4cd39bb8e842e31db682e5441f5ca50 (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
# Created by: Ryo MIYAMOTO <rmiya@cc.hirosaki-u.ac.jp>
# $FreeBSD$

PORTNAME=   xmolwt
PORTVERSION=    0.7
PORTREVISION=   6
CATEGORIES= biology
MASTER_SITES=   http://www.st.hirosaki-u.ac.jp/~rmiya/xmolwt/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Calculate atom weight and percent of each element for a given formula

OPTIONS_DEFINE= DOCS GTK2

USES=       gmake
MAKEFILE=   Makefile.gtk
ALL_TARGET= gmolwt

PORTDOCS=   *
PLIST_FILES=    bin/gmolwt bin/molwt

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGTK2}
USES+=      pkgconfig
USE_GNOME=  gtk20
MAKE_ENV+=  GTKCONFIG="pkg-config gtk+-2.0"
.else
USE_GNOME=  gtk12
MAKE_ENV+=  GTKCONFIG="${GTK_CONFIG}"
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        '/^CC/s| =| ?=| ; \
        /^CFLAGS/s| =| +=| ; \
        /^GTKCONFIG/s| =| ?=|' ${WRKSRC}/Makefile.gtk

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/gmolwt ${STAGEDIR}${PREFIX}/bin
    ${LN} -sf gmolwt ${STAGEDIR}${PREFIX}/bin/molwt
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    (cd ${WRKSRC} && ${INSTALL_DATA} Howtouse.* Readme Xmolwt dot.gtkrc \
        *.html *.gif ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>