bernardspil:portingnotes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bernardspil:portingnotes [2015/12/15 20:20] – Complete example, more structure BernardSpilbernardspil:portingnotes [2017/05/14 07:55] (current) – Add git2diff BernardSpil
Line 40: Line 40:
   - Depenencies come in two forms that we need to find (USE_MYSQL and OPT_USE are always caps but the latter allows for mixed case values) - USE_MYSQL= boolean:option - OPT_USE= mysql=option   - Depenencies come in two forms that we need to find (USE_MYSQL and OPT_USE are always caps but the latter allows for mixed case values) - USE_MYSQL= boolean:option - OPT_USE= mysql=option
   - We want to know what file this appears in, so add it again using sed   - We want to know what file this appears in, so add it again using sed
 +
 +=== More info ===
 +https://people.freebsd.org/~ak/gettext/
 +
 +====== Mk/Uses/mysql.mk ======
 +
 +==== USE_MYSQL ====
 +193 ports contain USE_MYSQL\\ 
 +''%%Mk/bsd.databases.mk%%'' defines values as ''%%client/server/embedded%%'' yet only ''%%server%%'' and ''%%embedded%%'' are handled specifically, everything else therefor is ''%%client%%''\\ 
 +Found in ports: USE_MYSQL=([45]1+|[Yy][Ee][Ss]|client|compat|embedded|server)
 +
 +| server |  12 |
 +| embedded |  1 |
 +| client |  188 |
 +| **total** |  201 |
 +
 +=== Transformations ===
 +''%%USE_MYSQL=\([  ]*\)server%%'' to ''%%USES+=\1mysql:server%%''\\ 
 +''%%USE_MYSQL=\([  ]*\)embedded%%'' to ''%%USES+=\1mysql:embedded%%''\\ 
 +''%%USE_MYSQL=\([  ]*\)([45]1+|[Yy][Ee][Ss]|client|compat)%%'' to ''%%USES+=\1mysql%%''
 +
 +==== OPT_USE= mysql ====
 +
 +Often shown as ''%%OPT_USE= mysql=yes%%''
 +
 +There may already be a OPT_USES= line in the Makefile, take that into account
 +
 +''%%OPT_USE= [Mm][Yy][Ss][Qq][Ll]=([Yy][Ee][Ss]|client|compat|server%%''
 +
 +There may be multiple OPT_USE= variables\\ 
 +''%%OPT_USE=       MYSQL=client PHP=mysql,pdo_mysql%%''
 +
 +There's a USE_OFF awell
 +''%%MYSQLD_USE_OFF=        MYSQL=client%%''
 +
 +=== Transformations ===
 +
 +\([A-Z_]*\)_USE=\([     ]*\)[Mm][Yy][Ss][Qq][Ll]=[Yy][Ee][Ss] to \1_USES=\2mysql
 +
 +==== Convert git diff ====
 +
 +git diffs need to be transformed to use in ports.
 +
 +<code>
 +--- a/src/openssl-dtls.c
 ++++ b/openssl-dtls.c
 +</code>
 +
 +needs to be transformed into
 +
 +<code>
 +--- src/openssl-dtls.c.orig
 ++++ src/openssl-dtls.c
 +</code>
 +
 +This can easily be achieved with sed
 +
 +<code>
 +sed -e 's|^--- a/\(.*\)|--- \1.orig|;s|^+++ b/|+++ |' patch-LibreSSL
 +</code>
  
  • bernardspil/portingnotes.1450210801.txt.gz
  • Last modified: 2015/12/15 20:20
  • by BernardSpil