summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Changelog/Debian.pm2
-rw-r--r--scripts/Dpkg/Changelog/Entry/Debian.pm4
-rw-r--r--scripts/mk/architecture.mk14
-rw-r--r--scripts/mk/buildapi.mk6
-rw-r--r--scripts/mk/buildflags.mk36
-rw-r--r--scripts/mk/pkg-info.mk19
-rw-r--r--scripts/mk/vendor.mk8
-rw-r--r--scripts/po/ca.po2
-rw-r--r--scripts/po/de.po2
-rw-r--r--scripts/po/dpkg-dev.pot4
-rw-r--r--scripts/po/es.po2
-rw-r--r--scripts/po/fr.po2
-rw-r--r--scripts/po/nl.po2
-rw-r--r--scripts/po/pl.po2
-rw-r--r--scripts/po/pt.po2
-rw-r--r--scripts/po/ru.po2
-rw-r--r--scripts/po/sv.po2
17 files changed, 51 insertions, 60 deletions
diff --git a/scripts/Dpkg/Changelog/Debian.pm b/scripts/Dpkg/Changelog/Debian.pm
index e7dd7c4..051bea7 100644
--- a/scripts/Dpkg/Changelog/Debian.pm
+++ b/scripts/Dpkg/Changelog/Debian.pm
@@ -200,7 +200,7 @@ sub parse {
$self->parse_error($file, $., $error, $_);
}
$expect = NEXT_OR_EOF;
- } elsif (m/^ \-\-/) {
+ } elsif (m/^ --/) {
$self->parse_error($file, $., g_('badly formatted trailer line'), "$_");
} elsif (m/^\s{2,}(?:\S)/) {
unless ($expect eq START_CHANGES or $expect eq CHANGES_OR_TRAILER) {
diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm
index c646fcc..11c0906 100644
--- a/scripts/Dpkg/Changelog/Entry/Debian.pm
+++ b/scripts/Dpkg/Changelog/Entry/Debian.pm
@@ -70,7 +70,7 @@ my $regex_header = qr{
# day of week ($6), date-time ($7) and this into month name ($8).
my $regex_trailer = qr<
^
- \ \-\- # Trailer marker
+ \ -- # Trailer marker
\ (.*) # Maintainer name
\ \<(.*)\> # Maintainer email
(\ \ ?) # Blanks
@@ -84,7 +84,7 @@ my $regex_trailer = qr<
)
)
\s*$ # Trailing space
->xo;
+>x;
my %week_day = map { $_ => 1 } qw(Mon Tue Wed Thu Fri Sat Sun);
my @month_abbrev = qw(
diff --git a/scripts/mk/architecture.mk b/scripts/mk/architecture.mk
index 4f0559c..c2f6a05 100644
--- a/scripts/mk/architecture.mk
+++ b/scripts/mk/architecture.mk
@@ -6,16 +6,12 @@
ifndef dpkg_architecture_mk_included
dpkg_architecture_mk_included = yes
-dpkg_architecture_vars = \
-$(foreach machine,BUILD HOST TARGET,\
- $(foreach var,ARCH ARCH_ABI ARCH_LIBC ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\
- DEB_$(machine)_$(var)))
+dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1)))
-# dpkg-buildpackage sets all variables. Optimize this frequent case.
-ifneq (,$(strip $(foreach v,$(dpkg_architecture_vars),$(if $(value $(v)),,1))))
- $(foreach line,$(subst =,?=,$(shell dpkg-architecture)),$(eval $(line)))
-endif
+dpkg_architecture_setvar = export $(1) ?= $(call dpkg_lazy_eval,$(1),dpkg-architecture -q$(1))
-export $(dpkg_architecture_vars)
+$(foreach machine,BUILD HOST TARGET,\
+ $(foreach var,ARCH ARCH_ABI ARCH_LIBC ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\
+ $(eval $(call dpkg_architecture_setvar,DEB_$(machine)_$(var)))))
endif # dpkg_architecture_mk_included
diff --git a/scripts/mk/buildapi.mk b/scripts/mk/buildapi.mk
index 6b665f3..3a1f164 100644
--- a/scripts/mk/buildapi.mk
+++ b/scripts/mk/buildapi.mk
@@ -4,11 +4,7 @@ ifndef dpkg_buildapi_mk_included
dpkg_buildapi_mk_included = yes
# Default API level when not set.
-ifndef DPKG_BUILD_API
- dpkg_lazy_eval ?= $(eval $(1) = $(2)$$($(1)))
- dpkg_lazy_set ?= $(call dpkg_lazy_eval,$(1),$$(eval $(1) := $(2)))
- $(call dpkg_lazy_set,DPKG_BUILD_API,$$(shell dpkg-buildapi))
-endif
+DPKG_BUILD_API ?= $(shell dpkg-buildapi)
# We could use only built-in GNU make functions, but that seems too much
# complexity given no integer operators, given that we currently have to
diff --git a/scripts/mk/buildflags.mk b/scripts/mk/buildflags.mk
index bc04488..1159700 100644
--- a/scripts/mk/buildflags.mk
+++ b/scripts/mk/buildflags.mk
@@ -35,6 +35,8 @@ dpkg_buildflags_mk_included = yes
# This list is kept in sync with the default set of flags returned
# by dpkg-buildflags.
+dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1)))
+
DPKG_BUILDFLAGS_LIST := $(foreach var,\
ASFLAGS \
CFLAGS \
@@ -48,26 +50,26 @@ DPKG_BUILDFLAGS_LIST := $(foreach var,\
LDFLAGS \
,$(var) $(var)_FOR_BUILD)
-dpkg_buildflags_run = $(eval $(shell \
- $(foreach exported,\
- DEB_BUILD_OPTIONS \
- DEB_BUILD_MAINT_OPTIONS \
- DEB_BUILD_PATH \
- $(foreach flag,$(DPKG_BUILDFLAGS_LIST),\
- $(foreach operation,SET STRIP APPEND PREPEND,\
- DEB_$(flag)_MAINT_$(operation))),\
- $(if $(value $(exported)),\
- $(exported)="$($(exported))"))\
- dpkg-buildflags | sed 's/\([^=]*\)\(.*\)/$$(eval \1:\2)/'))
+define dpkg_buildflags_export_envvar
+ ifdef $(1)
+ DPKG_BUILDFLAGS_EXPORT_ENVVAR += $(1)="$$(value $(1))"
+ endif
+endef
+
+$(eval $(call dpkg_buildflags_export_envvar,DEB_BUILD_OPTIONS))
+$(eval $(call dpkg_buildflags_export_envvar,DEB_BUILD_MAINT_OPTIONS))
+$(eval $(call dpkg_buildflags_export_envvar,DEB_BUILD_PATH))
+$(foreach flag,$(DPKG_BUILDFLAGS_LIST),\
+ $(foreach operation,SET STRIP APPEND PREPEND,\
+ $(eval $(call dpkg_buildflags_export_envvar,DEB_$(flag)_MAINT_$(operation)))))
+
+dpkg_buildflags_setvar = $(1) = $(call dpkg_lazy_eval,$(1),$(DPKG_BUILDFLAGS_EXPORT_ENVVAR) dpkg-buildflags --get $(1))
+
+$(foreach flag,$(DPKG_BUILDFLAGS_LIST),\
+ $(eval $(call dpkg_buildflags_setvar,$(flag))))
ifdef DPKG_EXPORT_BUILDFLAGS
- # We need to compute the values right now.
- $(dpkg_buildflags_run)
export $(DPKG_BUILDFLAGS_LIST)
-else
- dpkg_lazy_eval ?= $(eval $(1) = $(2)$$($(1)))
- $(foreach v,$(DPKG_BUILDFLAGS_LIST),\
- $(call dpkg_lazy_eval,$(v),$$(dpkg_buildflags_run)))
endif
endif # dpkg_buildflags_mk_included
diff --git a/scripts/mk/pkg-info.mk b/scripts/mk/pkg-info.mk
index 37bf422..658e4f6 100644
--- a/scripts/mk/pkg-info.mk
+++ b/scripts/mk/pkg-info.mk
@@ -21,18 +21,15 @@
ifndef dpkg_pkg_info_mk_included
dpkg_pkg_info_mk_included = yes
-dpkg_parsechangelog_run = $(eval $(shell dpkg-parsechangelog | sed -n '\
- s/^Distribution: \(.*\)/$$(eval DEB_DISTRIBUTION:=\1)/p;\
- s/^Source: \(.*\)/$$(eval DEB_SOURCE:=\1)/p;\
- s/^Version: \([0-9]*:\)\{0,1\}\([^-]*\)\(\(.*\)-[^-]*\)\{0,1\}$$/\
- $$(eval DEB_VERSION:=\1\2\3)\
- $$(eval DEB_VERSION_EPOCH_UPSTREAM:=\1\2\4)\
- $$(eval DEB_VERSION_UPSTREAM_REVISION:=\2\3)\
- $$(eval DEB_VERSION_UPSTREAM:=\2\4)/p;\
- s/^Timestamp: \(.*\)/$$(eval DEB_TIMESTAMP:=\1)/p'))
+dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1)))
-# Compute all the values in one go.
-$(dpkg_parsechangelog_run)
+DEB_SOURCE = $(call dpkg_late_eval,DEB_SOURCE,dpkg-parsechangelog -SSource)
+DEB_VERSION = $(call dpkg_late_eval,DEB_VERSION,dpkg-parsechangelog -SVersion)
+DEB_VERSION_EPOCH_UPSTREAM = $(call dpkg_late_eval,DEB_VERSION_EPOCH_UPSTREAM,echo '$(DEB_VERSION)' | sed -e 's/-[^-]*$$//')
+DEB_VERSION_UPSTREAM_REVISION = $(call dpkg_late_eval,DEB_VERSION_UPSTREAM_REVISION,echo '$(DEB_VERSION)' | sed -e 's/^[0-9]*://')
+DEB_VERSION_UPSTREAM = $(call dpkg_late_eval,DEB_VERSION_UPSTREAM,echo '$(DEB_VERSION_EPOCH_UPSTREAM)' | sed -e 's/^[0-9]*://')
+DEB_DISTRIBUTION = $(call dpkg_late_eval,DEB_DISTRIBUTION,dpkg-parsechangelog -SDistribution)
+DEB_TIMESTAMP = $(call dpkg_late_eval,DEB_TIMESTAMP,dpkg-parsechangelog -STimestamp)
SOURCE_DATE_EPOCH ?= $(DEB_TIMESTAMP)
export SOURCE_DATE_EPOCH
diff --git a/scripts/mk/vendor.mk b/scripts/mk/vendor.mk
index d257edd..a8d29cb 100644
--- a/scripts/mk/vendor.mk
+++ b/scripts/mk/vendor.mk
@@ -41,10 +41,10 @@ ifndef dpkg_datadir
endif
include $(dpkg_datadir)/buildapi.mk
-dpkg_lazy_eval ?= $(eval $(1) = $(2)$$($(1)))
-dpkg_lazy_set ?= $(call dpkg_lazy_eval,$(1),$$(eval $(1) := $(2)))
-$(call dpkg_lazy_set,DEB_VENDOR,$$(shell dpkg-vendor --query Vendor))
-$(call dpkg_lazy_set,DEB_PARENT_VENDOR,$$(shell dpkg-vendor --query Parent))
+dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1)))
+
+DEB_VENDOR = $(call dpkg_late_eval,DEB_VENDOR,dpkg-vendor --query Vendor)
+DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent)
dpkg_vendor_derives_from_v0 = dpkg-vendor --derives-from $(1) && echo yes || echo no
dpkg_vendor_derives_from_v1 = $(shell $(dpkg_vendor_derives_from_v0))
diff --git a/scripts/po/ca.po b/scripts/po/ca.po
index a76d7c9..fa05c4a 100644
--- a/scripts/po/ca.po
+++ b/scripts/po/ca.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.21.18\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2024-07-21 19:57+0200\n"
"Last-Translator: Guillem Jover <guillem@debian.org>\n"
"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n"
diff --git a/scripts/po/de.po b/scripts/po/de.po
index 959dff6..ab85b9b 100644
--- a/scripts/po/de.po
+++ b/scripts/po/de.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.22.6\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2024-07-03 21:25+0200\n"
"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
diff --git a/scripts/po/dpkg-dev.pot b/scripts/po/dpkg-dev.pot
index 4e2741a..94c6410 100644
--- a/scripts/po/dpkg-dev.pot
+++ b/scripts/po/dpkg-dev.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: dpkg 1.22.9\n"
+"Project-Id-Version: dpkg 1.22.10\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/scripts/po/es.po b/scripts/po/es.po
index 7e8a128..f325dee 100644
--- a/scripts/po/es.po
+++ b/scripts/po/es.po
@@ -31,7 +31,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.16.8\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2014-12-02 20:24+0100\n"
"Last-Translator: Omar Campagne <ocampagne@gmail.com>\n"
"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n"
diff --git a/scripts/po/fr.po b/scripts/po/fr.po
index 03ea7cb..f638038 100644
--- a/scripts/po/fr.po
+++ b/scripts/po/fr.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.21.20\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2023-02-10 02:16+0100\n"
"Last-Translator: Sébastien Poher <sebastien@volted.net>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
diff --git a/scripts/po/nl.po b/scripts/po/nl.po
index 5692dce..b533265 100644
--- a/scripts/po/nl.po
+++ b/scripts/po/nl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.21.19\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2023-02-02 17:51+0100\n"
"Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n"
"Language-Team: \n"
diff --git a/scripts/po/pl.po b/scripts/po/pl.po
index a083931..cc4fb95 100644
--- a/scripts/po/pl.po
+++ b/scripts/po/pl.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.15.4\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2015-04-07 07:05+0200\n"
"Last-Translator: Łukasz Dulny <BartekChom@poczta.onet.pl>\n"
"Language-Team: Polish <debian-l10n-polish@lists.debian.org>\n"
diff --git a/scripts/po/pt.po b/scripts/po/pt.po
index 17e05a0..d799ae6 100644
--- a/scripts/po/pt.po
+++ b/scripts/po/pt.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.22.0\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2023-03-08 22:31+0000\n"
"Last-Translator: Américo Monteiro <a_monteiro@gmx.com>\n"
"Language-Team: Portuguese <>\n"
diff --git a/scripts/po/ru.po b/scripts/po/ru.po
index b061d7f..1e582c8 100644
--- a/scripts/po/ru.po
+++ b/scripts/po/ru.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.17.23\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2015-04-07 07:02+0200\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
diff --git a/scripts/po/sv.po b/scripts/po/sv.po
index 725cfd8..7194de1 100644
--- a/scripts/po/sv.po
+++ b/scripts/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg-dev 1.22.0\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2024-07-24 23:02+0200\n"
+"POT-Creation-Date: 2024-07-27 05:43+0200\n"
"PO-Revision-Date: 2024-04-28 14:34+0100\n"
"Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
"Language-Team: Svenska <tp-sv@listor.tp-sv.se>\n"