This is a first try that *might* work for cross-compiling packages with
an absolute bare minimum of requirements, if you're lucky.
I can't debug that part further, but the references should help with it.
While I can't test cross-compiling, I can tell that the cmake APKBUILDs
that are in common use are far short of what we need for cross-compiling.
Thanks,
Isaac Dunham
I am slightly in doubt if setting -DCMAKE_CXX_COMPILER is a good idea.
This made building llvm with cmake break with ccache.
I had to do this:
http://git.alpinelinux.org/cgit/aports/commit/main/llvm?id=f38ff631e3623c3a1f8983ae906c86d6c10258a3
I applied your patch as-is anyway, so we can test it.
Thanks!
-nc
---
Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org
Help: alpine-devel+help@lists.alpinelinux.org
---
+ ${CMAKE_CROSSOPTS} \\+ || return 1+ make || return 1+__EOF__+}+build_perl() {
cat >>APKBUILD<<__EOF__
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
@@ -224,6 +252,8 @@ __EOF__
case "$buildtype" in
make)
build_make;;
+ cmake)+ build_cmake;; autotools)
build_autotools;;
perl)
@@ -281,6 +311,7 @@ Options:
-l Set package license to LICENSE
-u Set package URL
-a Create autotools (use ./configure ...)
+ -C Create CMake pakckage (Assume cmake/ is there) -p Create perl package (Assume Makefile.PL is there)
-y Create python package (Assume setup.py is there)
-s Use sourceforge source URL
@@ -295,6 +326,7 @@ while getopts "acd:fhl:n:pyu:s" opt; do
case $opt in
'a') buildtype="autotools";;
'c') cpinitd=1;;
+ 'C') buildtype="cmake";; 'd') pkgdesc="$OPTARG";;
'f') force=1;;
'h') usage; exit;;
--
2.3.4