aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/ruby-qt2/Makefile.common
blob: c195913a3e63b97a6e0247918310f870eee1beb4 (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
# $FreeBSD$

# Don't forget to clear PORTREVISION's on update
RUBY_QT2_VERSION=   0.14
RUBY_QT2_PORTVERSION=   ${RUBY_QT2_VERSION}
RUBY_QT2_MASTER_SITES=  http://sfns.u-shizuoka-ken.ac.jp/geneng/horie_hp/ruby/-ruby-qt/
RUBY_QT2_DISTNAME=  ruby-qt2-${RUBY_QT2_VERSION}

RUBY_QT2_PORTDIR=   ${PORTSDIR}/x11-toolkits/ruby-qt2

RUBY_QT2_WRKSRC=    ${WRKDIR}/qt2
RUBY_QT2_CONFIGURE_ARGS= \
            --with-qt2-include=${X11BASE}/include/qt2 \
            --with-qt2-lib=${X11BASE}/lib \
            --with-x11-dir=${X11BASE} \
            --with-qt2=qt2
#           --with-qt2=qtgl
#RUBY_WITH_PTHREAD= yes

MD5_FILE=       ${RUBY_QT2_PORTDIR}/distinfo

post-patch: post-patch-cflags post-patch-c++

post-patch-cflags:
    ${RUBY} -i -pe '~ /^\$$CFLAGS\b.*/ and $$_.sub!(/-O\w*/, "")' ${WRKSRC}/extconf.rb

post-patch-c++:
    ${GREP} -Frl 'typedef VALUE (*VALUEFUNC)();' ${WRKSRC} | \
        ${XARGS} ${RUBY} -i -pe 'sub(/typedef VALUE \(\*VALUEFUNC\)\(\);/, "typedef VALUE (*VALUEFUNC)(...);")'