Gentoo Archives: gentoo-commits

From: ILMostro <ilmostro7@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/ag-ops:master commit in: dev-lua/lpeg/files/, dev-lua/lpeg/
Date: Tue, 11 Sep 2018 22:58:56
Message-Id: 1535525649.b0ae69c58cbfe0583d1faccd768a18e5164093b5.ILMostro@gentoo
1 commit: b0ae69c58cbfe0583d1faccd768a18e5164093b5
2 Author: ILMostro <ilmostro7 <AT> gmail <DOT> com>
3 AuthorDate: Wed Aug 29 06:54:09 2018 +0000
4 Commit: ILMostro <ilmostro7 <AT> gmail <DOT> com>
5 CommitDate: Wed Aug 29 06:54:09 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/user/ag-ops.git/commit/?id=b0ae69c5
7
8 dev-lua/lpeg: added to project from portage
9
10 dev-lua/lpeg/Manifest | 4 ++
11 dev-lua/lpeg/files/lpeg-0.12.1-makefile.patch | 37 +++++++++++++++++++
12 dev-lua/lpeg/lpeg-1.0.1.ebuild | 53 +++++++++++++++++++++++++++
13 dev-lua/lpeg/metadata.xml | 8 ++++
14 4 files changed, 102 insertions(+)
15
16 diff --git a/dev-lua/lpeg/Manifest b/dev-lua/lpeg/Manifest
17 new file mode 100644
18 index 0000000..0fee4f5
19 --- /dev/null
20 +++ b/dev-lua/lpeg/Manifest
21 @@ -0,0 +1,4 @@
22 +AUX lpeg-0.12.1-makefile.patch 820 BLAKE2B 8706c3ee0588efc0c3d072d713cf1a8b0ca7653c6701eafe9ec9b3e5284a2ff8b7f989fb65425840da0513e719fe5fa820deb4814d3e838dd5b33651eb4e3c4e SHA512 8f49c6c3b1575cc77d0d9d6c8b75098889af1f8fda58fee1f58150669909e6c4ecbd953738e9c917adcbb1bddc16debe5564b70694d6983295439e06e26782d6
23 +DIST lpeg-1.0.1.tar.gz 71527 BLAKE2B 5f19d308572f2d7a5ff11d7aa33f437ec682994d0a396a322764cf12a4cb659c66ce6ffaf0c76f6a250a7d767b6545478dd3bb760150b9f88be41fac9dafde0d SHA512 7b43fbee7eff443000986684bc56bba6d2796a31cf860740746c70e155bdea1b62a46b93f97e2747e3ef0f63e965148778ac2985d0f2d83e1e37ec4ebbabf4aa
24 +EBUILD lpeg-1.0.1.ebuild 1246 BLAKE2B 3bd53964f81605c56758395984aaaf815a50bef2e03346a5dc658ac46d98d76c16f18df8af7a2224995206d49397cff0281b750a6b1aabc90a8e40ae2497cc06 SHA512 5a364050082fba5a1e1aa598d0892cbbe915b540981d99807b461346f98671ad8707286467243cc1f1f04014d455df747891dc23376e4ecabd13fc4408e6d0b5
25 +MISC metadata.xml 257 BLAKE2B fd30d59ebbc18529dbfe65cbec91247e5ad57a53f834d3abc85cbc18af964033e42dda00052b47281a9a85964b190a83c2c8a6eb30f4a9d38894de51d41d9de8 SHA512 06c87d68775d3b524abb426701b16341156bd54f2553b7a0f14a62ca5492c20bf9ff1719084e225ae5fc44c5b518a71258e1138e19551bfcfe828a11dffb12c4
26
27 diff --git a/dev-lua/lpeg/files/lpeg-0.12.1-makefile.patch b/dev-lua/lpeg/files/lpeg-0.12.1-makefile.patch
28 new file mode 100644
29 index 0000000..a0be055
30 --- /dev/null
31 +++ b/dev-lua/lpeg/files/lpeg-0.12.1-makefile.patch
32 @@ -0,0 +1,37 @@
33 +--- lpeg-0.12.1/makefile
34 ++++ lpeg-0.12.1/makefile
35 +@@ -1,7 +1,7 @@
36 + LIBNAME = lpeg
37 + LUADIR = ../lua/
38 +
39 +-COPT = -O2
40 ++#COPT = -O2
41 + # COPT = -DLPEG_DEBUG -g
42 +
43 + CWARNS = -Wall -Wextra -pedantic \
44 +@@ -22,21 +22,21 @@
45 + # -Wunreachable-code \
46 +
47 +
48 +-CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
49 ++CFLAGS += $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
50 + CC = gcc
51 +
52 + FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
53 +
54 + # For Linux
55 + linux:
56 +- make lpeg.so "DLLFLAGS = -shared -fPIC"
57 ++ $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC"
58 +
59 + # For Mac OS
60 + macosx:
61 +- make lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
62 ++ $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
63 +
64 + lpeg.so: $(FILES)
65 +- env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
66 ++ env $(CC) $(DLLFLAGS) $(LDFLAGS) $(FILES) -o lpeg.so
67 +
68 + $(FILES): makefile
69 +
70
71 diff --git a/dev-lua/lpeg/lpeg-1.0.1.ebuild b/dev-lua/lpeg/lpeg-1.0.1.ebuild
72 new file mode 100644
73 index 0000000..1578b53
74 --- /dev/null
75 +++ b/dev-lua/lpeg/lpeg-1.0.1.ebuild
76 @@ -0,0 +1,53 @@
77 +# Copyright 1999-2018 Gentoo Foundation
78 +# Distributed under the terms of the GNU General Public License v2
79 +
80 +EAPI=6
81 +
82 +inherit flag-o-matic toolchain-funcs
83 +
84 +DESCRIPTION="Parsing Expression Grammars for Lua"
85 +HOMEPAGE="http://www.inf.puc-rio.br/~roberto/lpeg/"
86 +SRC_URI="http://www.inf.puc-rio.br/~roberto/${PN}/${P}.tar.gz"
87 +
88 +LICENSE="MIT"
89 +SLOT="0"
90 +KEYWORDS="amd64 arm arm64 hppa ~mips ppc ppc64 x86"
91 +IUSE="debug doc luajit"
92 +
93 +RDEPEND="
94 + !luajit? ( >=dev-lang/lua-5.1:= )
95 + luajit? ( dev-lang/luajit:2= )"
96 +
97 +DEPEND="
98 + ${RDEPEND}
99 + virtual/pkgconfig"
100 +
101 +DOCS=( "HISTORY" )
102 +HTML_DOCS=( "lpeg.html" "re.html" )
103 +PATCHES=( "${FILESDIR}"/${PN}-0.12.1-makefile.patch )
104 +
105 +src_prepare() {
106 + default
107 + use debug && append-cflags -DLPEG_DEBUG
108 +}
109 +
110 +src_compile() {
111 + emake CC="$(tc-getCC)" \
112 + LUADIR="$($(tc-getPKG_CONFIG) --variable includedir $(usex luajit 'luajit' 'lua'))"
113 +}
114 +
115 +src_test() {
116 + $(usex luajit 'luajit' 'lua') test.lua || die
117 +}
118 +
119 +src_install() {
120 + local instdir
121 + instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
122 + exeinto "${instdir#${EPREFIX}}"
123 + doexe lpeg.so
124 + instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
125 + insinto "${instdir#${EPREFIX}}"
126 + doins re.lua
127 +
128 + use doc && einstalldocs
129 +}
130
131 diff --git a/dev-lua/lpeg/metadata.xml b/dev-lua/lpeg/metadata.xml
132 new file mode 100644
133 index 0000000..3601f13
134 --- /dev/null
135 +++ b/dev-lua/lpeg/metadata.xml
136 @@ -0,0 +1,8 @@
137 +<?xml version="1.0" encoding="UTF-8"?>
138 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
139 +<pkgmetadata>
140 + <maintainer type="project">
141 + <email>vim@g.o</email>
142 + <name>Gentoo Vim Project</name>
143 + </maintainer>
144 + </pkgmetadata>