This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-0-14
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit bf0d7e6115fc67899c8c453b82a4b2cae9fa4e77
Author: Alan M. Carroll <[email protected]>
AuthorDate: Fri Feb 28 13:43:42 2020 -0600

    Scons build fixes.
---
 swoc++/swoc++-shared.part | 23 +++++++++++++++++++++++
 swoc++/swoc++-static.part | 26 ++++++++------------------
 swoc++/swoc++.part        | 13 +++++--------
 3 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/swoc++/swoc++-shared.part b/swoc++/swoc++-shared.part
new file mode 100644
index 0000000..d83c08b
--- /dev/null
+++ b/swoc++/swoc++-shared.part
@@ -0,0 +1,23 @@
+Import("*")
+PartName("shared")
+PartVersion("1.0.14")
+
+src_files = env.get("src_files")
+
+env.AppendUnique(
+    CCFLAGS=['-std=c++17' ],
+    CPPPATH=["include"],
+)
+
+# build the library
+out = env.SharedLibrary("libswoc++", src_files)
+env.InstallLib(out)
+
+# Export the package config.
+pc_file = env.Substfile("libswoc++.pc", "libswoc++.pc.in"
+    , SUBST_DICT = {
+        "pkg_prefix": env.Dir("$INSTALL_ROOT").abspath
+      , "pkg_version": "$PART_VERSION"
+    })
+
+env.InstallPkgConfig(pc_file)
diff --git a/swoc++/swoc++-static.part b/swoc++/swoc++-static.part
index 2dfbb85..2698b2b 100644
--- a/swoc++/swoc++-static.part
+++ b/swoc++/swoc++-static.part
@@ -1,18 +1,8 @@
 Import("*")
-PartName("libswoc")
-PartVersion("1.0.13")
+PartName("static")
+PartVersion("1.0.14")
 
-files = [
-    "src/ArenaWriter.cc",
-    "src/bw_format.cc",
-    "src/bw_ip_format.cc",
-    "src/Errata.cc",
-    "src/MemArena.cc",
-    "src/RBTree.cc",
-    "src/swoc_file.cc",
-    "src/swoc_ip.cc",
-    "src/TextView.cc",
-]
+src_files = env.get("src_files")
 
 env.AppendUnique(
     CCFLAGS=['-std=c++17' ],
@@ -20,15 +10,15 @@ env.AppendUnique(
 )
 
 # build the library
-out = env.StaticLibrary("libswoc++",files)
+out = env.StaticLibrary("libswoc++", src_files)
 env.InstallLib(out)
-# export the include directory
-env.InstallInclude(
-    Pattern(src_dir="include/",includes=["*.h"]),
-    )
+
+# Export the package config.
 pc_file = env.Substfile("libswoc++.pc", "libswoc++.pc.in"
     , SUBST_DICT = {
         "pkg_prefix": env.Dir("$INSTALL_ROOT").abspath
       , "pkg_version": "$PART_VERSION"
     })
+
+
 env.InstallPkgConfig(pc_file)
diff --git a/swoc++/swoc++.part b/swoc++/swoc++.part
index c89da05..9a092f2 100644
--- a/swoc++/swoc++.part
+++ b/swoc++/swoc++.part
@@ -2,7 +2,7 @@ Import("*")
 PartName("libswoc")
 PartVersion("1.0.14")
 
-files = [
+src_files = [
     "src/ArenaWriter.cc",
     "src/bw_format.cc",
     "src/bw_ip_format.cc",
@@ -20,15 +20,12 @@ env.AppendUnique(
 )
 
 # build the library
-out = env.Library("libswoc++",files)
+out = env.SharedLibrary("libswoc++",files)
 env.InstallLib(out)
 # export the include directory
 env.InstallInclude(
     Pattern(src_dir="include/",includes=["*.h"]),
     )
-pc_file = env.Substfile("libswoc++.pc", "libswoc++.pc.in"
-    , SUBST_DICT = {
-        "pkg_prefix": env.Dir("$INSTALL_ROOT").abspath
-      , "pkg_version": "$PART_VERSION"
-    })
-env.InstallPkgConfig(pc_file)
+
+env.Part("swoc++-static.part", package_group="libswoc", "src_files"=src_files)
+env.Part("swoc++-shared.part", package_group="libswoc" "src_files"=src_files)

Reply via email to