]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - library-bundler
tools: fix compilation on some systems
[xonotic/netradiant.git] / library-bundler
index 756ebf89a25b6869e127ee86c286046c796c89d7..54056c41fe527b803fc399d9ab42898931bcf1ee 100755 (executable)
@@ -39,7 +39,7 @@ Common::getPath () {
                if [ "${file_path}" = '-' ]
                then
                        tr '\n' '\0' \
-                       | xargs -0 -n1 -P1 -I{} \
+                       | xargs -0 -P1 -I{} \
                                cygpath --unix '{}'
                else
                        cygpath --unix "${file_path}"
@@ -103,6 +103,11 @@ Multi::excludeLdd () {
                                        | egrep -q '/libatk|/libgdk|/libgtk|/libgio|/libglib|/libgmodule|/libgobject|/libcairo|/libpango|/libfontconfig|/libfreetype'
                                then
                                        Common::noOp
+                               # FreeBSD specific
+                               elif echo "${ldd_line}" \
+                                       | egrep -q '/libc++|/libgxxrt'
+                               then
+                                       Common::noOp
                                else
                                        echo "${ldd_line}"
                                fi
@@ -328,6 +333,9 @@ Multi::bundleLibFromFile () {
 }
 
 Multi::cleanUp () {
+       # Remove from bundle things that useless to be distributed,
+       # like headers or static libraries, also remove
+       # empty directories.
        find "${bundle_dir}/lib" \
                -type f \
                -name '*.a' \
@@ -341,8 +349,8 @@ Multi::cleanUp () {
        find "${bundle_dir}/lib" \
                -depth \
                -type d \
-               -exec rmdir {} \; \
-       || true
+               -empty \
+               -exec rmdir {} \;
 }
 
 Linux::getRpath () {
@@ -440,7 +448,7 @@ Windows::listLibForManifest () {
                -name '*.dll' \
                -exec basename {} \; \
        | tr '\n' '\0' \
-       | xargs -0 -n1 -P1 -I{} \
+       | xargs -0 -P1 -I{} \
                printf '  <file name="{}"/>\n'
 }