### this file is sourced not run
PKGBUILD=1
PKGARCH=x86_64

# source: james

# git-master tarball
PKGVER=1.2.2023.10 # release is one year behind at this point
MD5SUM=8b7573a90e80bc49f599faa7e1de66b6
hash=e7c0c1665f1684bb3195107147aaf254c852fa44
hash7=${hash#???????}; hash7=${hash%$hash7}
TARBALL=solvespace-$PKGVER-$hash7.tar.gz
#SRC_URL=https://github.com/solvespace/solvespace/archive/$hash.tar.gz
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$TARBALL # package because of git submodule
BUNDLE=

SLACKREQ='gtk3mm libspnav libjson-c' # and opengl
SLACKDESC="solvespace: solvespace $PKGVER (3D CAD)
solvespace: 
solvespace: SOLVESPACE is a free (GPLv3) parametric 3d CAD tool.
solvespace: 
solvespace: https://solvespace.com/index.pl
solvespace: https://github.com/solvespace/solvespace
solvespace: 
solvespace: 
solvespace: 
solvespace: 
solvespace: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# -DENABLE_LTO=ON if needed, this increases build-time by a lot
	CMAKEFLAGS="$CMAKEFLAGS -DENABLE_OPENMP=ON"

	cd /tmp/solvespace* &&
	# replace this function, we don't want to carry entire git history only for this to work
	cat > cmake/GetGitCommitHash.cmake << EOF &&
function(get_git_commit_hash)
    set(GIT_COMMIT_HASH "$hash")
endfunction()
get_git_commit_hash()
EOF

	pkg_build_cmake &&
	pkg_build_slackdesc
}


