From 31b86f30bbbe73b249028895a9e0543098076c2c Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Wed, 1 Feb 2012 16:25:13 -0500
Subject: [PATCH] PATH-194 WIP adding header file packaging

Gives us the packaging we need for viewer headers as an autobuild package
so that llphysicsextensions can use its headers.
---
 package_physicsextensions.sh  |  46 +++++++++++
 package_physicsextensions.xml | 145 ++++++++++++++++++++++++++++++++++
 2 files changed, 191 insertions(+)
 create mode 100644 package_physicsextensions.sh
 create mode 100644 package_physicsextensions.xml

diff --git a/package_physicsextensions.sh b/package_physicsextensions.sh
new file mode 100644
index 00000000000..9260dd03ce1
--- /dev/null
+++ b/package_physicsextensions.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+cd "$(dirname "$0")"
+
+# turn on verbose debugging output for parabuild logs.
+set -x
+# make errors fatal
+set -e
+
+if [ -z "$AUTOBUILD" ] ; then
+    fail
+fi
+
+if [ "$OSTYPE" = "cygwin" ] ; then
+    export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
+fi
+
+# load autbuild provided shell functions and variables
+eval "$("$AUTOBUILD" source_environment)"
+
+projectDir="$(pwd)"
+
+#directories we need the headers from
+projects="llcommon llimage llmath llrender"
+
+source="$projectDir/indra"
+
+stage="$projectDir/stage/include"
+mkdir -p $stage
+
+for project in $projects
+do
+	dstIncludeDir="$stage/$project"
+	mkdir -p $dstIncludeDir
+	headers="$source/$project/*.h"
+	cp $headers "$dstIncludeDir"
+done
+	
+# Copy the license files into place for packaging
+srcLicenseDir="$projectDir/doc"
+dstLicenseDir="$projectDir/stage/LICENSES"
+
+mkdir -p "$dstLicenseDir"
+cp "$srcLicenseDir/LGPL-licence.txt" "$dstLicenseDir/LGPL-licence.txt"
+
+pass
diff --git a/package_physicsextensions.xml b/package_physicsextensions.xml
new file mode 100644
index 00000000000..3c79b34f694
--- /dev/null
+++ b/package_physicsextensions.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" ?>
+<llsd>
+<map>
+    <key>package_description</key>
+    <map>
+      <key>description</key>
+      <string>include files referenced in the llphysicsextensions</string>
+      <key>license</key>
+      <string>LGPL</string>
+      <key>license_file</key>
+      <string>LICENSES/LGPL-licence.txt</string>
+      <key>name</key>
+      <string>pathfinding_includes</string>
+      <key>platforms</key>
+      <map>
+        <key>common</key>
+        <map>
+          <key>configurations</key>
+          <map>
+            <key>Default</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>bash</string>
+                <key>options</key>
+                <array>
+                  <string>-c ../package_physicsextensions.sh</string>
+                </array>
+              </map>
+              <key>configure</key>
+              <map>
+              </map>
+              <key>default</key>
+              <string>True</string>
+              <key>name</key>
+              <string>Default</string>
+            </map>
+          </map>
+          <key>name</key>
+          <string>common</string>
+        </map>
+        <key>darwin</key>
+        <map>
+          <key>build_directory</key>
+          <string>stage</string>
+          <key>configurations</key>
+          <map>
+            <key>common</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>bash</string>
+                <key>options</key>
+                <array>
+                  <string>-c ../package_physicsextensions.sh</string>
+                </array>
+              </map>
+              <key>default</key>
+              <string>true</string>
+              <key>manifest</key>
+              <array>
+                <string>include/</string>
+                <string>LICENSES</string>
+              </array>
+              <key>name</key>
+              <string>common</string>
+            </map>
+          </map>
+          <key>name</key>
+          <string>darwin</string>
+        </map>
+        <key>linux</key>
+        <map>
+          <key>build_directory</key>
+          <string>stage</string>
+          <key>configurations</key>
+          <map>
+            <key>common</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>bash</string>
+                <key>options</key>
+                <array>
+                  <string>-c ../package_physicsextensions.sh</string>
+                </array>
+              </map>
+              <key>default</key>
+              <string>true</string>
+              <key>manifest</key>
+              <array>
+                <string>include/</string>
+                <string>LICENSES</string>
+              </array>
+              <key>name</key>
+              <string>common</string>
+            </map>
+          </map>
+          <key>name</key>
+          <string>linux</string>
+        </map>
+        <key>windows</key>
+        <map>
+          <key>build_directory</key>
+          <string>stage</string>
+          <key>configurations</key>
+          <map>
+            <key>common</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>bash</string>
+                <key>options</key>
+                <array>
+                  <string>-c ../package_physicsextensions.sh</string>
+                </array>
+              </map>
+              <key>default</key>
+              <string>true</string>
+              <key>manifest</key>
+              <array>
+                <string>include/</string>
+                <string>LICENSES</string>
+              </array>
+              <key>name</key>
+              <string>common</string>
+            </map>
+          </map>
+          <key>name</key>
+          <string>windows</string>
+        </map>
+      </map>
+      <key>version</key>
+      <string>1.0</string>
+    </map>
+    <key>type</key>
+    <string>autobuild</string>
+    <key>version</key>
+    <string>1.2</string>
+  </map>
+</llsd>
-- 
GitLab