summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD57
-rw-r--r--fix-glade-typo.patch21
-rw-r--r--fix-swig-len.patch20
-rw-r--r--p4vasp_home.patch61
-rw-r--r--pass-hardening-flags.patch26
-rw-r--r--purge-ext.patch2
-rw-r--r--python2-call.patch24
-rw-r--r--set-title-and-icon.patch15
-rw-r--r--sort-applet-list.patch15
10 files changed, 191 insertions, 68 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f2e07a6f6db..fa4708bc96f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = p4vasp
pkgdesc = A visualization suite for the Vienna Ab-initio Simulation Package (VASP)
pkgver = 0.3.30
- pkgrel = 1
+ pkgrel = 2
url = http://www.p4vasp.at/
arch = x86_64
license = GPL2
@@ -15,17 +15,27 @@ pkgbase = p4vasp
source = http://www.p4vasp.at/files/p4vasp-0.3.30.tgz
source = p4vasp.desktop
source = p4vasp.png
+ source = fix-glade-typo.patch
+ source = fix-swig-len.patch
+ source = sort-applet-list.patch
source = python2-call.patch
source = purge-ext.patch
source = swig.patch
source = p4vasp_home.patch
+ source = pass-hardening-flags.patch
+ source = set-title-and-icon.patch
md5sums = 3af30cc650cf4623b145138f92436b23
md5sums = f6cd7d2771e3e8cb83238542b486471b
md5sums = 071dea8ea3223048466933a6e175a262
- md5sums = d3c2a5db23b3f8d32d1317bd7a8bf931
- md5sums = 04f68eff94b1fb3a049e45c32b318bb4
+ md5sums = c5389531b9c747eda241c16641928827
+ md5sums = c614721ae39e1eb5b18ec8f215f2fd6a
+ md5sums = 6934484e7d8c28a178b37c9cba4924d4
+ md5sums = 1009761795bdc56979e261abf339d70f
+ md5sums = ce1d2c9fa5d3b1361e3e466374f92995
md5sums = 33d9191f7a2e46ae9a292f07d67720a0
- md5sums = 78f6b4e79bd20b370d47d025f9554b19
+ md5sums = bcdb6b0204ec2134ae5582051587f9a4
+ md5sums = 50d2eebce743fa82462748e57cc3b397
+ md5sums = e853d1c9b9ac3e75811f4ea48858009d
pkgname = p4vasp
diff --git a/PKGBUILD b/PKGBUILD
index 8d6985b1b8d..a61c649f268 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=p4vasp
pkgver=0.3.30
-pkgrel=1
+pkgrel=2
pkgdesc="A visualization suite for the Vienna Ab-initio Simulation Package (VASP)"
url="http://www.p4vasp.at/"
license=('GPL2')
@@ -14,46 +14,63 @@ options=(!strip staticlibs)
source=("http://www.p4vasp.at/files/${pkgname}-${pkgver}.tgz"
"${pkgname}.desktop"
"${pkgname}.png"
+ 'fix-glade-typo.patch'
+ 'fix-swig-len.patch'
+ 'sort-applet-list.patch'
'python2-call.patch'
'purge-ext.patch'
'swig.patch'
- 'p4vasp_home.patch')
+ 'p4vasp_home.patch'
+ 'pass-hardening-flags.patch'
+ 'set-title-and-icon.patch')
md5sums=('3af30cc650cf4623b145138f92436b23'
'f6cd7d2771e3e8cb83238542b486471b'
'071dea8ea3223048466933a6e175a262'
- 'd3c2a5db23b3f8d32d1317bd7a8bf931'
- '04f68eff94b1fb3a049e45c32b318bb4'
+ 'c5389531b9c747eda241c16641928827'
+ 'c614721ae39e1eb5b18ec8f215f2fd6a'
+ '6934484e7d8c28a178b37c9cba4924d4'
+ '1009761795bdc56979e261abf339d70f'
+ 'ce1d2c9fa5d3b1361e3e466374f92995'
'33d9191f7a2e46ae9a292f07d67720a0'
- '78f6b4e79bd20b370d47d025f9554b19')
+ 'bcdb6b0204ec2134ae5582051587f9a4'
+ '50d2eebce743fa82462748e57cc3b397'
+ 'e853d1c9b9ac3e75811f4ea48858009d')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
+ patch -p0 -i "$srcdir/fix-glade-typo.patch"
+ patch -p0 -i "$srcdir/fix-swig-len.patch"
+ patch -p0 -i "$srcdir/sort-applet-list.patch"
patch -p0 -i "$srcdir/python2-call.patch"
patch -p0 -i "$srcdir/purge-ext.patch"
patch -p0 -i "$srcdir/swig.patch"
patch -p0 -i "$srcdir/p4vasp_home.patch"
+ patch -p0 -i "$srcdir/pass-hardening-flags.patch"
+ patch -p0 -i "$srcdir/set-title-and-icon.patch"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR="/opt/$pkgname" p4vasp
- make DESTDIR="/opt/$pkgname" launcher
+ make P4VASP_HOME=/usr/share/$pkgname \
+ PYTHON_HOME=/usr/lib/python2.7 \
+ PYINCLUDE=/usr/include/python2.7
}
package() {
cd "$srcdir/$pkgname-$pkgver"
- ls /opt
- make DESTDIR="$pkgdir/opt/$pkgname" install
- ## copy launcher
- install -d "$pkgdir/usr/bin/"
- ## install -D -m755 "$srcdir/vesta-exec" "$pkgdir/usr/bin/$pkgname"
- install -D -m755 "$pkgdir/opt/p4vasp/bin/p4v" "$pkgdir/usr/bin"
- ## # Install Desktop File and Icon
- install -D -m644 "$srcdir/$pkgname.desktop" \
- "$pkgdir/usr/share/applications/$pkgname.desktop"
- install -D -m644 "$srcdir/$pkgname.png" \
- "$pkgdir/usr/share/icons/$pkgname-icon.png"
+ #install
+ make P4VASP_HOME="$pkgdir"/usr/share/"$pkgname" \
+ PYTHON_HOME=/usr/lib/python2.7 \
+ PYINCLUDE=/usr/include/python2.7 \
+ SITE_PACKAGES="$pkgdir"/usr/lib/python2.7/site-packages \
+ INCLUDEDIR="$pkgdir"/usr/include \
+ LIBDIR="$pkgdir"/usr/lib \
+ BINDIR="$pkgdir"/usr/bin install
+ # Install Desktop File and Icon
+ install -D -m644 "$srcdir"/"$pkgname".desktop \
+ "$pkgdir"/usr/share/applications/"$pkgname".desktop
+ install -D -m644 "$srcdir"/"$pkgname".png \
+ "$pkgdir"/usr/share/icons/"$pkgname"-icon.png
+ rm -v "$pkgdir"/usr/share/"$pkgname"/uninstall.sh
}
-
-
diff --git a/fix-glade-typo.patch b/fix-glade-typo.patch
new file mode 100644
index 00000000000..6aaf3f85bfa
--- /dev/null
+++ b/fix-glade-typo.patch
@@ -0,0 +1,21 @@
+Description: Fix a typo in glade file name
+ Prevents the following warning when selecting
+ 'Electronic / View k-points' from the menu:
+ (p4v.py:7261): libglade-WARNING **: could not find glade file
+ '/usr/share/p4vasp/data/glade2/Applet.glade'
+Author: Graham Inggs <ginggs@debian.org>
+Forwarded: yes
+Last-Update: 2015-11-16
+--- lib/p4vasp/applet/Applet.py
++++ lib/p4vasp/applet/Applet.py
+@@ -151,8 +151,8 @@
+
+ def __init__(self):
+ self.name=self.__class__.__name__
+- self.gladefile="Applet.glade"
+- self.gladename="Applet"
++ self.gladefile="applet.glade"
++ self.gladename="applet_frame"
+ self.panel=None
+ # self.appletnode=None
+ self.system=None
diff --git a/fix-swig-len.patch b/fix-swig-len.patch
new file mode 100644
index 00000000000..2c5516dcfa2
--- /dev/null
+++ b/fix-swig-len.patch
@@ -0,0 +1,20 @@
+Description: swig >2.0.4 returns a long but __len__() should return an int
+ Fix the following error when showing 'Bands' or 'DOS and Bands':
+ TypeError: __len__() should return an int
+Author: Graham Inggs <ginggs@debian.org>
+Forwarded: yes
+Last-Update: 2015-11-16
+--- lib/p4vasp/FArray.py
++++ lib/p4vasp/FArray.py
+@@ -74,9 +74,8 @@
+ else:
+ cp4vasp.FArray2D.__init__(self,n,m)
+
+- __len__=cp4vasp.FArray2D.sizeX
+-
+-
++ def __len__(self):
++ return int(cp4vasp.FArray2D.sizeX(self))
+ def __getitem__(self,i):
+ return FArray1D(pointer=self.getArray(i))
+ def __setitem__(self,i,l):
diff --git a/p4vasp_home.patch b/p4vasp_home.patch
index df9d3e53d6d..c22b11854b0 100644
--- a/p4vasp_home.patch
+++ b/p4vasp_home.patch
@@ -1,50 +1,25 @@
---- Makefile 2018-05-16 15:30:58.974859448
-+++ Makefile 2018-05-16 15:36:00.684482264
-@@ -14,6 +14,11 @@
- ######################################################################
-
- -include install/Configuration.mk
-+P4VASP_HOME = $(DESTDIR)
-+SITE_PACKAGES = $(P4VASP_HOME)/python-packages
-+INCLUDEDIR = $(P4VASP_HOME)/include
-+LIBDIR = $(P4VASP_HOME)/lib
-+BINDIR = $(P4VASP_HOME)/bin
-
- P4VCONFIG = lib/p4vasp/config.py
- VINFO = vinfo.py
-@@ -50,7 +55,7 @@
+--- Makefile 2018-05-16 17:24:55.841286901 +0200
++++ Makefile 2018-05-16 17:28:02.736120648 +0200
+@@ -50,7 +50,7 @@
cd odpdom && $(MAKE) libODP.a
cd src && $(MAKE)
p4vasp_config:
- echo "p4vasp_home='$(P4VASP_HOME)'" >$(P4VCONFIG)
-+ echo "p4vasp_home='/opt/p4vasp'" >$(P4VCONFIG)
++ echo "p4vasp_home='/usr/share/p4vasp'" >$(P4VCONFIG)
cat $(VINFO) >> $(P4VCONFIG)
devver:
echo "name ='p4vasp-devel'" > $(VINFO)
-@@ -146,7 +151,7 @@
- clean: clean_p4vasp clean_odpdom
- cleanall: cleanall_p4vasp cleanall_odpdom cleanall_doc
-
--install_pythonpkg:p4vasp
-+install_pythonpkg:
- mkdir -p $(SITE_PACKAGES)/p4vasp
- cd lib; cp -R p4vasp $(SITE_PACKAGES); cd ..
- chmod -R 755 $(SITE_PACKAGES)/p4vasp
-@@ -160,7 +165,7 @@
- chmod -R 755 $(SITE_PACKAGES)/p4vasp/piddle
- cd src; install -m755 cp4vasp.py _cp4vasp.so $(SITE_PACKAGES); cd ..
-
--install_gui:install_pythonpkg uninstallsh launcher
-+install_gui:install_pythonpkg
- mkdir -p $(P4VASP_HOME)
- cp -R data $(P4VASP_HOME)
- cp -R utils $(P4VASP_HOME)
-@@ -203,7 +208,7 @@
- chmod -R 755 $(P4VASP_HOME)/doc/intro
- chmod 644 $(P4VASP_HOME)/doc/intro/*
-
--install_devel:install_pythonpkg
-+install_devel:
- mkdir -p $(LIBDIR)
- mkdir -p $(INCLUDEDIR)/ODP
- mkdir -p $(INCLUDEDIR)/p4vasp
+@@ -63,11 +63,9 @@
+ launcher:
+ echo "#!`which sh`" >$(P4V)
+ echo "export LD_PRELOAD=libstdc++.so.6" >>$(P4V)
+- echo "export PYTHONPATH=\$$PYTHONPATH:"$(SITE_PACKAGES) >>$(P4V)
+- echo "#export APPMENU_DISPLAY_BOTH=1" >>$(P4V)
+ echo "export UBUNTU_MENUPROXY=0" >>$(P4V)
+- echo "export P4VASP_HOME="$(P4VASP_HOME) >> $(P4V)
+- echo "exec python2 "$(BINDIR)"/p4v.py \"\$$@\"" >>$(P4V)
++ echo "export P4VASP_HOME=/usr/share/p4vasp" >> $(P4V)
++ echo "exec /usr/bin/python2 /usr/bin/p4v.py \"\$$$$@@\"" >>$(P4V)
+ appletlist:
+ cd install && python2 makeappletlist.py
+ bashrc:setenvironment
diff --git a/pass-hardening-flags.patch b/pass-hardening-flags.patch
new file mode 100644
index 00000000000..bbf65d83329
--- /dev/null
+++ b/pass-hardening-flags.patch
@@ -0,0 +1,26 @@
+Description: Pass hardening CFLAGS, CPPFLAGS and LDFLAGS
+Note: adapted by karamaz0v from debian patch to use after applying Arch python2-call.patch
+Author: Graham Inggs <ginggs@debian.org>
+Forwarded: Yes
+Last-Update: 2017-12-02
+--- odpdom/Makefile
++++ odpdom/Makefile
+@@ -10,7 +10,7 @@
+ # -DNO_THROW
+
+ PYINCLUDE=`python2 -c "import sys;import os.path;print os.path.join(sys.prefix,\"include\",\"python\"+sys.version[:3])"`
+-CFLAGS += -fpic -g $(FLAGS) -I$(PYINCLUDE) -Iinclude
++CFLAGS += -fpic -g $(CPPFLAGS) $(FLAGS) -I$(PYINCLUDE) -Iinclude
+
+ SWIGFLAGS = -python -c++ $(FLAGS)
+
+--- src/Configuration.mk
++++ src/Configuration.mk
+@@ -1,6 +1,6 @@
+ LIBS= -L../odpdom -lODP $(shell fltk-config --use-gl --ldflags) -lGLU -lGL -lm -lpthread
+ CFLAGS?= -g -Wall
+-CFLAGS+= -fpic $(FLAGS) $(shell fltk-config --cxxflags) -I$(PYINCLUDE) \
++CFLAGS+= -fpic $(CPPFLAGS) $(FLAGS) $(shell fltk-config --cxxflags) -I$(PYINCLUDE) \
+ -Iinclude -I../odpdom/include
+ PYINCLUDE=`python2 -c "import sys;import os.path;print os.path.join(sys.prefix,\"include\",\"python\"+sys.version[:3])"`
+ LDFLAGS+= -shared -L.
diff --git a/purge-ext.patch b/purge-ext.patch
index fd0c1fc8f74..e19d3ad8b4b 100644
--- a/purge-ext.patch
+++ b/purge-ext.patch
@@ -1,5 +1,5 @@
Description: Don't build convenience libraries in ext
-Note: adapted by karamaz0v from debian patch to use after applying python2-call.patch
+Note: adapted by karamaz0v from debian patch to use after applying Arch python2-call.patch
Author: Stefano Rivera <stefanor@ubuntu.com>
Author: Graham Inggs <graham@nerve.org.za>
Forwarded: not-needed
diff --git a/python2-call.patch b/python2-call.patch
index fe442059c01..d4c84e643b7 100644
--- a/python2-call.patch
+++ b/python2-call.patch
@@ -734,3 +734,27 @@ Last-Update: 2014-03-02
from p4vasp.Structure import *
from sys import argv
+--- lib/p4vasp/applet/PhononDispersionApplet.py 2015-10-06 21:52:37.000000000 +0200
++++ lib/p4vasp/applet/PhononDispersionApplet.py 2018-05-16 18:03:58.028967774 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+
+ # p4vasp is a GUI-program and a library for processing outputs of the
+ # Vienna Ab-inition Simulation Package (VASP)
+--- lib/p4vasp/PhononsCalculation.py 2015-10-06 21:52:37.000000000 +0200
++++ lib/p4vasp/PhononsCalculation.py 2018-05-16 18:07:01.127203455 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+
+ import p4vasp.matrix as p4m
+ import numpy as np
+--- lib/p4vasp/applet/PhononApplet.py 2015-10-06 21:52:37.000000000 +0200
++++ lib/p4vasp/applet/PhononApplet.py 2018-05-16 18:07:54.730018418 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+
+ # p4vasp is a GUI-program and a library for processing outputs of the
+ # Vienna Ab-inition Simulation Package (VASP)
diff --git a/set-title-and-icon.patch b/set-title-and-icon.patch
new file mode 100644
index 00000000000..13b95662841
--- /dev/null
+++ b/set-title-and-icon.patch
@@ -0,0 +1,15 @@
+Description: Set main window title and icon
+Author: Graham Inggs <ginggs@debian.org>
+Forwarded: not-needed
+Last-Update: 2017-12-02
+--- p4v.py
++++ p4v.py
+@@ -268,6 +268,8 @@
+ setMessageDriver(FrameMessageDriver(xml,"p4vasp.log"))
+ w.show_all()
+ systemlist().addSystemListListener(self)
++ w.set_title("p4vasp")
++ w.set_icon_from_file("/usr/share/icons/p4vasp-icon.png")
+ return self.root_widget
+
+ def connect_signals(self,x):
diff --git a/sort-applet-list.patch b/sort-applet-list.patch
new file mode 100644
index 00000000000..119d9516b37
--- /dev/null
+++ b/sort-applet-list.patch
@@ -0,0 +1,15 @@
+Description: sort applet list to make build reproducible
+Bug-Debian: https://bugs.debian.org/803140
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Last-Update: 2015-10-27
+--- install/makeappletlist.py
++++ install/makeappletlist.py
+@@ -10,7 +10,7 @@
+ l.append(s)
+ l.append(s)
+ modules.append(".".join(l))
+- return modules
++ return sorted(modules)
+
+ f=open(join("..","lib","p4vasp","applet","appletlist.py"),"w")
+ f.write("def appletlist():\n")