summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortocic2022-09-03 14:25:13 +0300
committertocic2022-09-03 14:25:13 +0300
commit9ad90340125dc00d669e2f19d4d2843f07b25197 (patch)
tree860a1a5325bce7224350ae6a94c158d226523384
parent95b50b5952c45162d81d19a129adaa7d4ee7559e (diff)
downloadaur-9ad90340125dc00d669e2f19d4d2843f07b25197.tar.gz
Rewrite build files from scratch
The package was deleted earlier and is restored with this commit. Therefore, don't mention the previous contributor.
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore8
-rw-r--r--0001-cmake_install_module.patch14
-rw-r--r--PKGBUILD66
-rw-r--r--fix_cmake_module_path.patch12
5 files changed, 68 insertions, 56 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c1701d169873..782c87e4ae30 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,18 @@
pkgbase = thor-git
- pkgdesc = Thor, SFML based library
- pkgver = v2.0.r14.g3aee360
+ pkgdesc = SFML Extension with various game programming features, like particles, animations, vector operations
+ pkgver = 2.0.r24.g3e320cb
pkgrel = 1
- url = http://www.bromeon.ch/libraries/thor/index.html
- arch = i686
+ url = https://bromeon.ch/libraries/thor
arch = x86_64
- license = zlib
+ license = ZLIB
makedepends = cmake
makedepends = git
- depends = sfml-git
- provides = thor-sfml
- options = debug
- source = git+https://github.com/Bromeon/Thor.git
- source = 0001-cmake_install_module.patch
- sha256sums = SKIP
- sha256sums = ef23db1723fbcf1cc9eb5e0180e86826a79cc1fbac93a5790149de1aab27fbba
+ depends = sfml
+ provides = thor
+ conflicts = thor
+ source = thor-git-2.0.r24.g3e320cb::git+https://github.com/Bromeon/Thor.git#branch=master
+ source = fix_cmake_module_path.patch
+ b2sums = SKIP
+ b2sums = b1f082ce989d78abb14ad4615b1babce229f3e245409cbb820bdfd7693e9870ec86a5a586908a5b0d50576d67dd49c585928cf3f4bc94510d9615af7b64c9009
pkgname = thor-git
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..119c4b720843
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+/**
+!/**/
+
+!/.gitignore
+!/.SRCINFO
+!/PKGBUILD
+
+!/fix_cmake_module_path.patch
diff --git a/0001-cmake_install_module.patch b/0001-cmake_install_module.patch
deleted file mode 100644
index 302cc54506cd..000000000000
--- a/0001-cmake_install_module.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-reverted:
---- CMakeLists.txt.orig 2016-06-19 17:26:23.132310788 +0200
-+++ CMakeLists.txt 2016-06-19 17:30:51.779511122 +0200
-@@ -164,8 +164,9 @@
- install(DIRECTORY include
- DESTINATION .)
-
-+set(CMAKE_VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
- install(FILES cmake/Modules/FindThor.cmake
-+ DESTINATION share/cmake-${CMAKE_VERSION}/Modules/)
-- DESTINATION ./cmake/Modules/)
-
- install(FILES License.txt
- RENAME LicenseThor.txt
diff --git a/PKGBUILD b/PKGBUILD
index 35e5136317e7..956138b57dcb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,53 @@
-# Maintainer: farenjihn <valentin@finini.ch>
+# Maintainer: tocic <tocic at protonmail dot ch>
pkgname=thor-git
-pkgver=v2.0.r14.g3aee360
+pkgver=2.0.r24.g3e320cb
pkgrel=1
-pkgdesc="Thor, SFML based library"
-arch=('i686' 'x86_64')
-url="http://www.bromeon.ch/libraries/thor/index.html"
-license=('zlib')
-depends=('sfml-git')
-makedepends=('cmake' 'git')
-provides=('thor-sfml')
-options=('debug')
-
-source=("git+https://github.com/Bromeon/Thor.git"
-"0001-cmake_install_module.patch")
-
-sha256sums=('SKIP'
-'ef23db1723fbcf1cc9eb5e0180e86826a79cc1fbac93a5790149de1aab27fbba')
+pkgdesc="SFML Extension with various game programming features,
+ like particles, animations, vector operations"
+arch=("x86_64")
+url="https://bromeon.ch/libraries/thor"
+license=("ZLIB")
+depends=("sfml")
+makedepends=("cmake" "git")
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname}-${pkgver}::git+https://github.com/Bromeon/Thor.git#branch=master"
+ "fix_cmake_module_path.patch")
+b2sums=("SKIP"
+ "b1f082ce989d78abb14ad4615b1babce229f3e245409cbb820bdfd7693e9870ec86a5a586908a5b0d50576d67dd49c585928cf3f4bc94510d9615af7b64c9009")
pkgver() {
- cd "${srcdir}/Thor"
- git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+ printf "%s" \
+ $(git -C "${pkgname}-${pkgver}" describe --long --tags \
+ | sed "s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g")
}
prepare() {
- cd "${srcdir}/Thor"
- patch -p0 -i "${srcdir}/0001-cmake_install_module.patch"
+ patch --forward --strip=1 \
+ --directory="${pkgname}-${pkgver}" \
+ --input="${srcdir}/fix_cmake_module_path.patch"
}
build() {
- cd "$srcdir/Thor"
-
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebugInfo .
- make
+ cmake -B "build/" -S "${pkgname}-${pkgver}" \
+ -D THOR_BUILD_DOC:BOOL="OFF" \
+ -D THOR_BUILD_EXAMPLES:BOOL="OFF" \
+ -D THOR_SHARED_LIBS:BOOL="ON" \
+ -D CMAKE_BUILD_TYPE:STRING="Release" \
+ -D CMAKE_C_FLAGS_RELEASE:STRING="-O2 -DNDEBUG" \
+ -D CMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -DNDEBUG" \
+ -D CMAKE_INSTALL_PREFIX:PATH="/usr/" \
+ -Wno-dev
+
+ cmake --build "build/"
}
package() {
- cd "$srcdir/Thor"
-
- make DESTDIR="$pkgdir/" install
-
- install -Dm644 ./License.txt ${pkgdir}/usr/share/licenses/${pkgname}/License.txt
+ DESTDIR="${pkgdir}" cmake --install "build/"
+ mkdir --parents "${pkgdir}/usr/share/licenses/${pkgname}/"
+ cp --target-directory "${pkgdir}/usr/share/licenses/${pkgname}/" \
+ "${pkgdir}/usr/share/doc/Thor/LicenseAurora.txt" \
+ "${pkgdir}/usr/share/doc/Thor/LicenseThor.txt"
}
diff --git a/fix_cmake_module_path.patch b/fix_cmake_module_path.patch
new file mode 100644
index 000000000000..f118b03e1ad8
--- /dev/null
+++ b/fix_cmake_module_path.patch
@@ -0,0 +1,12 @@
+diff '--color=auto' --unified --recursive --text thor-git.orig/CMakeLists.txt thor-git.new/CMakeLists.txt
+--- thor-git.orig/CMakeLists.txt 2022-09-03 10:55:51.164332584 +0300
++++ thor-git.new/CMakeLists.txt 2022-09-03 11:02:53.710206314 +0300
+@@ -156,7 +156,7 @@
+ DESTINATION .)
+
+ install(FILES cmake/Modules/FindThor.cmake
+- DESTINATION ./cmake/Modules/)
++ DESTINATION ./lib/cmake/Thor/)
+
+ install(FILES License.txt
+ RENAME LicenseThor.txt