Skip to content

Commit 277873d

Browse files
committed
flex: New package. WIP
1 parent 69e0e59 commit 277873d

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

mingw-w64-flex/2.5.37-vpath.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Only necessary when other patches touch flex.skl.
2+
3+
--- origsrc/flex-2.5.37/Makefile.am 2012-08-02 12:14:45.000000000 -0500
4+
+++ src/flex-2.5.37/Makefile.am 2013-04-18 22:53:08.033219500 -0500
5+
@@ -129,7 +129,7 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)
6+
LIBS = @LIBINTL@ @LIBS@
7+
8+
skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
9+
- sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
10+
+ sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -I $(srcdir) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
11+
12+
# Explicitly describe dependencies.
13+
# You can recreate this with `gcc -I. -MM *.c'

mingw-w64-flex/PKGBUILD

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
2+
3+
_realname=flex
4+
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
5+
pkgver=2.5.39
6+
pkgrel=1
7+
pkgdesc="A tool for generating text-scanning programs"
8+
arch=('any')
9+
url="http://flex.sourceforge.net"
10+
license=('custom')
11+
depends=("${MINGW_PACKAGE_PREFIX}-m4" "${MINGW_PACKAGE_PREFIX}-libiconv" "${MINGW_PACKAGE_PREFIX}-gettext")
12+
options=('staticlibs')
13+
source=(http://downloads.sourceforge.net/sourceforge/flex/${_realname}-$pkgver.tar.bz2
14+
2.5.37-vpath.patch)
15+
md5sums=('77d44c6bb8c0705e0017ab9a84a1502b'
16+
'68f74b4a02893b4382e4fd42e1f0176a')
17+
18+
prepare() {
19+
cd $srcdir/${_realname}-$pkgver
20+
21+
#patch -p2 -i $srcdir/2.5.37-vpath.patch
22+
23+
#./autogen.sh
24+
}
25+
26+
build() {
27+
cd $srcdir/${_realname}-$pkgver
28+
./configure \
29+
--prefix=${MINGW_PREFIX} \
30+
--build=${MINGW_CHOST} \
31+
--host=${MINGW_CHOST} \
32+
--target=${MINGW_CHOST}
33+
--without-libiconv-prefix \
34+
--without-libintl-prefix \
35+
--enable-static \
36+
--disable-shared
37+
make
38+
}
39+
40+
check() {
41+
cd $srcdir/${_realname}-$pkgver
42+
43+
# these tests used features removed in bison-2.6
44+
sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in
45+
46+
make check
47+
}
48+
49+
package() {
50+
cd $srcdir/${_realname}-$pkgver
51+
52+
make DESTDIR=$pkgdir install
53+
cp -f ${pkgdir}${MINGW_PREFIX}/bin/flex.exe ${pkgdir}${MINGW_PREFIX}/bin/flex++.exe
54+
cp -f ${pkgdir}${MINGW_PREFIX}/bin/flex.exe ${pkgdir}${MINGW_PREFIX}/bin/lex.exe
55+
56+
install -Dm644 COPYING \
57+
${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/license.txt
58+
}
59+

0 commit comments

Comments
 (0)