2013-07-19 02:35:52 +02:00
|
|
|
#!/bin/bash
|
2010-11-25 18:30:18 +01:00
|
|
|
|
2018-07-16 20:45:36 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
2018-11-18 22:35:18 +00:00
|
|
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
2011-01-09 21:26:03 +01:00
|
|
|
|
2018-11-18 22:35:18 +00:00
|
|
|
. config/options "${1}"
|
2010-11-25 18:30:18 +01:00
|
|
|
|
2021-02-16 19:15:04 +01:00
|
|
|
RECONF_DIR="${3}"
|
|
|
|
|
|
|
|
|
|
if [ ! -f "${RECONF_DIR}/configure.in" \
|
|
|
|
|
-a ! -f "${RECONF_DIR}/configure.ac" ]; then
|
2018-11-18 22:35:18 +00:00
|
|
|
die "configure.in or configure.ac not found"
|
2014-08-26 19:31:44 +03:00
|
|
|
fi
|
2010-11-25 18:30:18 +01:00
|
|
|
|
2021-02-16 19:15:04 +01:00
|
|
|
if [ ! -f "${RECONF_DIR}/.autoreconf-done" ]; then
|
2019-02-08 17:17:43 +00:00
|
|
|
PARENT_PKG="${2}"
|
2014-08-10 21:27:45 +03:00
|
|
|
|
2019-02-08 17:17:43 +00:00
|
|
|
# lock package during autoreconf otherwise it is racy, eg. glib:host/glib:target building concurrently
|
|
|
|
|
pkg_lock "${PKG_NAME}" "reconf" "${PARENT_PKG}"
|
2014-08-10 21:27:45 +03:00
|
|
|
|
2021-02-16 19:15:04 +01:00
|
|
|
if [ ! -f "${RECONF_DIR}/.autoreconf-done" ]; then
|
2019-02-08 17:17:43 +00:00
|
|
|
pkg_lock_status "ACTIVE" "${PKG_NAME}" "reconf"
|
|
|
|
|
|
2021-02-16 19:15:04 +01:00
|
|
|
touch "${RECONF_DIR}/NEWS" "${RECONF_DIR}/AUTHORS" "${RECONF_DIR}/ChangeLog"
|
|
|
|
|
mkdir -p "${RECONF_DIR}/m4"
|
2019-02-08 17:17:43 +00:00
|
|
|
|
|
|
|
|
build_msg "CLR_AUTORECONF" "AUTORECONF" "${PKG_NAME}" "indent"
|
|
|
|
|
|
2021-02-16 19:15:04 +01:00
|
|
|
do_autoreconf "${RECONF_DIR}"
|
|
|
|
|
touch "${RECONF_DIR}/.autoreconf-done"
|
2019-02-08 17:17:43 +00:00
|
|
|
|
|
|
|
|
pkg_lock_status "UNLOCK" "${PKG_NAME}" "reconf" "configured"
|
|
|
|
|
else
|
|
|
|
|
pkg_lock_status "UNLOCK" "${PKG_NAME}" "reconf" "already configured"
|
|
|
|
|
fi
|
2014-07-30 19:44:09 +03:00
|
|
|
fi
|