summaryrefslogtreecommitdiff
path: root/libcurl/README-DEV
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-01-11 23:51:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-22 18:04:37 +0300
commit23b1a0ab70f190dbbb33dabb18ec039c7d85d6b3 (patch)
treec86693607a9be05c53a44ce311d8f83638cbda03 /libcurl/README-DEV
parented9a6438ec4b50ee897ac01296034de84167f2fe (diff)
Add implementation
Diffstat (limited to 'libcurl/README-DEV')
-rw-r--r--libcurl/README-DEV39
1 files changed, 39 insertions, 0 deletions
diff --git a/libcurl/README-DEV b/libcurl/README-DEV
new file mode 100644
index 0000000..cea97e1
--- /dev/null
+++ b/libcurl/README-DEV
@@ -0,0 +1,39 @@
+This document describes how libcurl was packaged for build2. In particular,
+this understanding will be useful when upgrading to a new upstream version.
+See ../README-DEV for general notes on curl packaging.
+
+Symlink the required upstream directories into libcurl/:
+
+$ ln -s ../../upstream/{lib,include} libcurl
+
+Create libcurl/curl_config.h using as a base the upstream's auto-generated
+header and/or the corresponding .m4 and configure.ac files.
+
+Some macro values cannot be easily determined at the preprocessing time. We
+define them based on the supported platform tests and add libcurl/assert.c,
+containing compile-time assertions for the macros in question.
+
+Copy the upstream's libtool-generated for MacOS libcurl-symbols.expsym file
+and comment out (with #) the _curl_jmpenv symbol in it since it causes the
+'cannot export hidden symbol' linked warning on MacOS.
+
+Note that re-creating libcurl/curl_config.h from scratch every time we upgrade
+to a new upstream version would be a real pain. Instead we can only (un)define
+the newly introduced macros, comparing the already defined and currently used
+macro sets. For the comparison we can use config-win32.h and auto-generated on
+Linux upstream's curl_config.h:
+
+$ for m in `cat <upstream-build-dir>/lib/curl_config.h libcurl/lib/config-win32.h | \
+ sed -n 's/^.*#\s*\(define\|undef\)\s\{1,\}\([_A-Z0-9]\{1,\}\)\(\s.*\)\{0,1\}$/\2/p' | \
+ sort -u`; do
+ if grep -q -e "\b$m\b" `find -L . ../curl -name '*.h' -a ! -name curl_config.h -a ! -name 'config-*.h' -o -name '*.c'`; then
+ echo "$m"
+ fi
+ done >used-macros
+
+$ cat libcurl/curl_config.h | \
+ sed -n 's/^.*#\s*\(define\|undef\)\s\{1,\}\([_A-Z0-9]\{1,\}\)\(\s.*\)\{0,1\}$/\2/p' | \
+ sort -u >defined-macros
+
+$ diff defined-macros used-macros | grep '<' >remove-macros
+$ diff defined-macros used-macros | grep '>' >add-macros