[dd3271]: apr-util / libaprutil1-1.4.1-1.cygport Maximize Restore History

Download this file

libaprutil1-1.4.1-1.cygport    99 lines (76 with data), 2.2 kB

ORIG_PN="apr-util"

DESCRIPTION="Apache Portable Runtime Utilities"
HOMEPAGE="http://apr.apache.org/"
SRC_URI="mirror://apache/apr/${ORIG_PN}-${PV}.tar.bz2"

PATCH_URI="$(grep -v '^#' series)"
#PATCH_URI=

PKG_NAMES="${PN} ${PN}-devel aprutil1"
PKG_HINTS="setup devel transition"
PKG_CONTENTS[0]="usr/share/doc/ usr/bin/*.dll usr/lib/apr-util-1/"
PKG_CONTENTS[1]="usr/bin/*-config usr/include/ usr/lib/lib* usr/lib/pkgconfig/"
PKG_CONTENTS[2]=""

CYGCONF_ARGS="
  --with-apr=/usr
  --with-berkeley-db=/usr
  --with-dbm=db45
  --with-expat=/usr
  --with-gdbm=/usr
  --with-ldap=ldap
  --with-pgsql=/usr
  --with-sqlite3=/usr
"

# Build with debugging
if false; then
  inform "Debugging build"
  CFLAGS="-O0 -g"
  CXXFLAGS="-O0 -g"
  RESTRICT=strip
fi

MAKEOPTS+=" -j1"

src_install() {
  cd ${B}
  cyginstall

  rm -f ${D}/usr/lib/aprutil.exp
}

# An alternate version of __list_deps that outputs dependencies
# by package.
#
# To use, uncomment the below src_test definition and run cygport *.cygport test.

#src_test() { my_list_deps; }

my_list_deps() {
  local d
  local nativelibs netlibs netimps
  local os_path="${PATH}"

  pushd ${D}


  # This prevents a package from listing itself as a dependency if
  # already installed
  unset PATH

  for d in ${DEPS_PATH//:/ }
   do
   PATH+="${D}${d}:${d}:"
  done

  export PATH+="${D}/usr/bin:${os_path}";

  pkg_list=(${PKG_LISTS:-${PKG_NAMES}});

  for ((n = 0; n < ${#pkg_list[*]}; ++n)); do
    echo ${pkg_list[n]};
    if [ -z "${PKG_CONTENTS[$n]}" ]; then
      echo '  empty'
      continue
    fi

	# *.so: Apache2 modules, OCaml stublibs, Ruby modules
	# *.oct: Octave modules
	# *.cmxs: OCaml natdynlink modules: http://gallium.inria.fr/~frisch/ndl.txt
    nativelibs=$(find ${PKG_CONTENTS[$n]} -executable \( -name '*.exe' -o -name '*.dll' -o -name '*.so' -o -name '*.oct' -o -name '*.cmxs' \) \
      -exec objdump -p '{}' + | grep "DLL Name:" | sort -u | \
      cut -d ' ' -f 3 | sed -e '/^[A-Z32]*\.[Dd][Ll][Ll]$/d' -e '/^mscoree\.dll$/d' | \
      xargs -r which || true)
    echo $nativelibs | sort -u | xargs -r cygcheck -f | sort -fu | sed 's!^!  !';
  done

  popd

  PATH="${os_path}"
}

# Local Variables:
# fill-column: 72
# mode: sh
# sh-indentation: 2
# End: