pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
elixir-cross-ref: Add elixir cross referencer package
Module Name: pkgsrc-wip
Committed By: Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By: ryoon
Date: Tue Oct 24 20:28:28 2017 +0900
Changeset: 4b24397ba56647f799bc92230d34b2af6b291cf5
Added Files:
elixir-cross-ref/DESCR
elixir-cross-ref/Makefile
elixir-cross-ref/PLIST
elixir-cross-ref/distinfo
elixir-cross-ref/patches/patch-data.py
elixir-cross-ref/patches/patch-script.sh
elixir-cross-ref/patches/patch-update.py
Log Message:
elixir-cross-ref: Add elixir cross referencer package
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4b24397ba56647f799bc92230d34b2af6b291cf5
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
elixir-cross-ref/DESCR | 3 ++
elixir-cross-ref/Makefile | 55 ++++++++++++++++++++++++++++
elixir-cross-ref/PLIST | 19 ++++++++++
elixir-cross-ref/distinfo | 9 +++++
elixir-cross-ref/patches/patch-data.py | 16 +++++++++
elixir-cross-ref/patches/patch-script.sh | 61 ++++++++++++++++++++++++++++++++
elixir-cross-ref/patches/patch-update.py | 25 +++++++++++++
7 files changed, 188 insertions(+)
diffs:
diff --git a/elixir-cross-ref/DESCR b/elixir-cross-ref/DESCR
new file mode 100644
index 0000000000..6299da4e7e
--- /dev/null
+++ b/elixir-cross-ref/DESCR
@@ -0,0 +1,3 @@
+Elixir is a source code cross-referencer inspired by LXR. It's
+written in Python and its main purpose is to index every release
+of the Linux kernel while keeping a minimal footprint.
diff --git a/elixir-cross-ref/Makefile b/elixir-cross-ref/Makefile
new file mode 100644
index 0000000000..ff716e9f1c
--- /dev/null
+++ b/elixir-cross-ref/Makefile
@@ -0,0 +1,55 @@
+# $NetBSD$
+
+DISTNAME= elixir-0.2
+PKGNAME= ${DISTNAME:S/elixir-/elixir-cross-ref-/}
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=free-electrons/}
+GITHUB_PROJECT= elixir
+GITHUB_TAG= v0.2
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://github.com/free-electrons/elixir/
+COMMENT= Elixir Cross Referencer
+LICENSE= gnu-agpl-v3 # Patches are from AGPLv3 version
+
+USE_LANGUAGES= # none
+USE_TOOLS+= gsed:run perl:run pax
+PYTHON_VERSIONS_ACCEPTED= 36 35
+NO_BUILD= yes
+
+REPLACE_PYTHON= data.py
+REPLACE_PYTHON+= lib.py
+REPLACE_PYTHON+= query.py
+REPLACE_PYTHON+= update.py
+REPLACE_PYTHON+= http/web.py
+
+DEPENDS+= ${PYPKGPREFIX}-jinja2-[0-9]*:../../textproc/py-jinja2
+DEPENDS+= ${PYPKGPREFIX}-pygments-[0-9]*:../../textproc/py-pygments
+DEPENDS+= ${PYPKGPREFIX}-bsddb3-[0-9]*:../../databases/py-bsddb3
+DEPENDS+= exctags-[0-9]*:../../devel/exctags
+DEPENDS+= coreutils-[0-9]*:../../sysutils/coreutils
+
+SUBST_CLASSES+= coreutils
+SUBST_STAGE.coreutils= pre-configure
+SUBST_MESSAGE.coreutils= Use GNU commands and exctags
+SUBST_FILES.coreutils= script.sh
+SUBST_SED.coreutils= -e 's,sort -V,gsort -V,g'
+SUBST_SED.coreutils+= -e 's,tac |,gtac |,g'
+SUBST_SED.coreutils+= -e 's,sed ,gsed ,g'
+SUBST_SED.coreutils+= -e 's,head ,ghead ,g'
+SUBST_SED.coreutils+= -e 's,ctags ,exctags ,g'
+
+INSTALLATION_DIRS+= share/doc/${PKGBASE}
+INSTALLATION_DIRS+= libexec/${PKGBASE}
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/COPYING \
+ ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+ ${INSTALL_DATA} ${WRKSRC}/README.md \
+ ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+ cd ${WRKSRC} && ${FIND} . -type f \! \( -name .gitignore -o \
+ -name COPYING -o -name README.md -o -name '*.orig' \) -print | \
+ pax -rw ${DESTDIR}${PREFIX}/libexec/${PKGBASE}
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/elixir-cross-ref/PLIST b/elixir-cross-ref/PLIST
new file mode 100644
index 0000000000..20f460e2bf
--- /dev/null
+++ b/elixir-cross-ref/PLIST
@@ -0,0 +1,19 @@
+@comment $NetBSD$
+libexec/elixir-cross-ref/data.py
+libexec/elixir-cross-ref/http/fonts/lxr.eot
+libexec/elixir-cross-ref/http/fonts/lxr.svg
+libexec/elixir-cross-ref/http/fonts/lxr.ttf
+libexec/elixir-cross-ref/http/fonts/lxr.woff
+libexec/elixir-cross-ref/http/header.css
+libexec/elixir-cross-ref/http/img/2penguins.svg
+libexec/elixir-cross-ref/http/script.js
+libexec/elixir-cross-ref/http/style.css
+libexec/elixir-cross-ref/http/web.py
+libexec/elixir-cross-ref/lib.py
+libexec/elixir-cross-ref/query.py
+libexec/elixir-cross-ref/script.sh
+libexec/elixir-cross-ref/templates/header.html
+libexec/elixir-cross-ref/templates/layout.html
+libexec/elixir-cross-ref/update.py
+share/doc/elixir-cross-ref/COPYING
+share/doc/elixir-cross-ref/README.md
diff --git a/elixir-cross-ref/distinfo b/elixir-cross-ref/distinfo
new file mode 100644
index 0000000000..0c6d8ba1df
--- /dev/null
+++ b/elixir-cross-ref/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (elixir-0.2.tar.gz) = fc6a6c0bad8484c9e8c814eb613155baa3b392d2
+RMD160 (elixir-0.2.tar.gz) = 333f2317925051cd127cc88d50747f2b68a0bbab
+SHA512 (elixir-0.2.tar.gz) = 132dae3348af4d868ceab6c651e2865f9b22572fb66797b769560977c29175fe8c88c76c7fba1f88de84370b4206f115be46fc8b5cf74f073350226429470439
+Size (elixir-0.2.tar.gz) = 33185 bytes
+SHA1 (patch-data.py) = 21bf89891492d0c09f45874e42c978df5ddd38cc
+SHA1 (patch-script.sh) = 3b01783c381a6a1c774a7bd35c6c56777c429a50
+SHA1 (patch-update.py) = 87cc476aa19d18e52a3458393b8826e731adea0a
diff --git a/elixir-cross-ref/patches/patch-data.py b/elixir-cross-ref/patches/patch-data.py
new file mode 100644
index 0000000000..22f742e5c6
--- /dev/null
+++ b/elixir-cross-ref/patches/patch-data.py
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Support whitespaces in filename
+https://github.com/free-electrons/elixir/commit/4845e251862de3e915a1668e7c810072d7adb373#diff-8e6afdf322bc86524af61ffc82e64ca3
+
+--- data.py.orig 2017-05-25 08:56:01.000000000 +0000
++++ data.py
+@@ -51,7 +51,7 @@ class DefList:
+ self.data = data
+
+ def iter (self, dummy=False):
+- for p in self.data.split (b','):
++ for p in self.data.split (b',',maxsplit=1):
+ p = re.search (b'(\d*)(\w)(\d*)', p)
+ id, type, line = p.groups()
+ id = int (id)
diff --git a/elixir-cross-ref/patches/patch-script.sh b/elixir-cross-ref/patches/patch-script.sh
new file mode 100644
index 0000000000..24ec39c35c
--- /dev/null
+++ b/elixir-cross-ref/patches/patch-script.sh
@@ -0,0 +1,61 @@
+$NetBSD$
+
+Support whitespaces in filename
+https://github.com/free-electrons/elixir/commit/4845e251862de3e915a1668e7c810072d7adb373#diff-8e6afdf322bc86524af61ffc82e64ca3
+
+--- script.sh.orig 2017-05-25 08:56:01.000000000 +0000
++++ script.sh
+@@ -86,6 +86,15 @@ case $cmd in
+ tac |
+ sed -r 's/^([0-9])\.([0-9]*)(.*)$/v\1 \1.\2 \1.\2\3/'
+ ;;
++ NetBSD)
++ echo "trunk"
++ ;;
++ Linux)
++ echo "master"
++ ;;
++ RIOT)
++ echo "master"
++ ;;
+ *)
+ echo "$tags" |
+ tac |
+@@ -93,7 +102,20 @@ case $cmd in
+ ;;
+ esac
+ else
+- echo "$tags"
++ case $project in
++ NetBSD)
++ echo "trunk"
++ ;;
++ Linux)
++ echo "master"
++ ;;
++ RIOT)
++ echo "master"
++ ;;
++ *)
++ echo "$tags"
++ ;;
++ esac
+ fi
+ ;;
+
+@@ -162,9 +184,12 @@ case $cmd in
+
+ parse-defs)
+ tmp=`mktemp -d`
+- git cat-file blob "$1" > $tmp/$2
+- ctags -x --c-kinds=+p-m $tmp/$2 | awk '{print $1" "$2" "$3}'
+- rm $tmp/$2
++ full_path=$tmp/$2
++ git cat-file blob "$1" > "$full_path"
++ ctags -x --c-kinds=+p-m "$full_path" |
++ grep -av "^operator " |
++ awk '{print $1" "$2" "$3}'
++ rm "$full_path"
+ rmdir $tmp
+ ;;
+
diff --git a/elixir-cross-ref/patches/patch-update.py b/elixir-cross-ref/patches/patch-update.py
new file mode 100644
index 0000000000..b3d41cc84d
--- /dev/null
+++ b/elixir-cross-ref/patches/patch-update.py
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Support whitespaces in filename
+https://github.com/free-electrons/elixir/commit/4845e251862de3e915a1668e7c810072d7adb373#diff-8e6afdf322bc86524af61ffc82e64ca3
+
+--- update.py.orig 2017-05-25 08:56:01.000000000 +0000
++++ update.py
+@@ -43,7 +43,7 @@ def updateBlobIDs (tag):
+
+ newBlobs = []
+ for blob in blobs:
+- hash, filename = blob.split (b' ')
++ hash, filename = blob.split (b' ',maxsplit=1)
+ if not db.blob.exists (hash):
+ db.blob.put (hash, idx)
+ db.hash.put (idx, hash)
+@@ -58,7 +58,7 @@ def updateVersions (tag):
+ buf = []
+
+ for blob in blobs:
+- hash, path = blob.split (b' ')
++ hash, path = blob.split (b' ',maxsplit=1)
+ idx = db.blob.get (hash)
+ buf.append ((idx, path))
+
Home |
Main Index |
Thread Index |
Old Index