aboutsummaryrefslogtreecommitdiff
path: root/ports/sassc
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2021-01-20 07:16:21 +0100
committerGitHub <noreply@github.com>2021-01-19 22:16:21 -0800
commitd7cd6f52be3423b7aed66e61dc297cef066f305d (patch)
treefa7f413621a205c0139450843c7bae735d521492 /ports/sassc
parentcff97f99e574bb81a7c4bc5da12133d57e9ae783 (diff)
downloadvcpkg-d7cd6f52be3423b7aed66e61dc297cef066f305d.tar.gz
vcpkg-d7cd6f52be3423b7aed66e61dc297cef066f305d.zip
[libsass/sassc] add new port/tool (#15752)
* add libsass and sassc * add version information
Diffstat (limited to 'ports/sassc')
-rw-r--r--ports/sassc/CONTROL6
-rw-r--r--ports/sassc/portfile.cmake34
-rw-r--r--ports/sassc/remove_compiler_flags.patch12
3 files changed, 52 insertions, 0 deletions
diff --git a/ports/sassc/CONTROL b/ports/sassc/CONTROL
new file mode 100644
index 000000000..b2fc8e63f
--- /dev/null
+++ b/ports/sassc/CONTROL
@@ -0,0 +1,6 @@
+Source: sassc
+Version: 3.6.1
+Port-Version: 0
+Description: SassC is a wrapper around libsass (http://github.com/sass/libsass) used to generate a useful command-line application that can be installed and packaged for several operating systems.
+Homepage: https://github.com/sass/sassc
+Build-Depends: libsass, getopt
diff --git a/ports/sassc/portfile.cmake b/ports/sassc/portfile.cmake
new file mode 100644
index 000000000..764873d04
--- /dev/null
+++ b/ports/sassc/portfile.cmake
@@ -0,0 +1,34 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO sass/sassc
+ REF 46748216ba0b60545e814c07846ca10c9fefc5b6 # 3.6.1
+ SHA512 98c5943ec485251fd5e3f41bcfe80dbbc6e2f334d4b6947895d3821b30009c40fb7cb944403304cede70360a5dd0ac103262644ef37a56e0fa76163657fbcc32
+ HEAD_REF master
+ PATCHES remove_compiler_flags.patch
+)
+
+find_library(LIBSASS_DEBUG sass PATHS "${CURRENT_INSTALLED_DIR}/debug/lib/" NO_DEFAULT_PATH)
+find_library(LIBSASS_RELEASE sass PATHS "${CURRENT_INSTALLED_DIR}/lib/" NO_DEFAULT_PATH)
+if(VCPKG_TARGET_IS_WINDOWS)
+ set(ENV{LIBS} "$ENV{LIBS} -lgetopt")
+endif()
+vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ AUTOCONFIG
+ OPTIONS
+ --with-libsass-include='${CURRENT_INSTALLED_DIR}/include'
+ OPTIONS_DEBUG
+ --with-libsass-lib='${LIBSASS_DEBUG}'
+ OPTIONS_RELEASE
+ --with-libsass-lib='${LIBSASS_RELEASE}'
+)
+vcpkg_install_make(MAKEFILE GNUmakefile)
+vcpkg_fixup_pkgconfig()
+vcpkg_copy_pdbs()
+
+vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file
diff --git a/ports/sassc/remove_compiler_flags.patch b/ports/sassc/remove_compiler_flags.patch
new file mode 100644
index 000000000..c5f644276
--- /dev/null
+++ b/ports/sassc/remove_compiler_flags.patch
@@ -0,0 +1,12 @@
+diff --git a/GNUmakefile.am b/GNUmakefile.am
+index 58e8aecd1..da6a7db98 100644
+--- a/GNUmakefile.am
++++ b/GNUmakefile.am
+@@ -1,6 +1,6 @@
+ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script
+
+-AM_COPT = -Wall -O2
++AM_COPT =
+ AM_COVLDFLAGS =
+
+ if ENABLE_COVERAGE