Are there any other issues with this change?

Andre raised a few several weeks ago, when this was still an RFC*. Those were all addressed in the initial patch.

* http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/72660

-- Haris


On 12/14/2015 06:25 PM, Haris Okanovic wrote:
Add ${PN}-src to PACKAGES with a default set of FILES_{PV}-src
per FHS:
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsrcSourceCode

Define a staging directory SRC_D under ${D}.

Define ENABLE_SRC_INSTALL to enable source staging via package.bbclass's
do_install_source() task. It's disabled by default, but may be
overridden by distro configs or individual recipes as needed.

This is change is part of a series which add source packages to OE.
See the following thread for more information:
http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/72660

Signed-off-by: Haris Okanovic <[email protected]>
---
  meta/conf/bitbake.conf | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 06971da..4674288 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -36,6 +36,7 @@ export systemd_unitdir = "${nonarch_base_libdir}/systemd"
  export systemd_system_unitdir = "${nonarch_base_libdir}/systemd/system"
  export nonarch_libdir = "${exec_prefix}/lib"
  export systemd_user_unitdir = "${nonarch_libdir}/systemd/user"
+srcdir = "${prefix}/src"

  # Architecture dependent paths
  export bindir = "${exec_prefix}/bin"
@@ -267,7 +268,7 @@ SOLIBSDEV = ".so"
  SOLIBSDEV_darwin = ".dylibbroken"

  PACKAGE_BEFORE_PN ?= ""
-PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale 
${PACKAGE_BEFORE_PN} ${PN}"
+PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale 
${PACKAGE_BEFORE_PN} ${PN}"
  PACKAGES_DYNAMIC = "^${PN}-locale-.*"
  FILES = ""

@@ -313,6 +314,12 @@ ALLOW_EMPTY_${PN}-dbg = "1"

  FILES_${PN}-locale = "${datadir}/locale"

+FILES_${PN}-src = "${srcdir}/${PN}"
+SRC_D = "${D}${srcdir}/${PN}"
+
+ENABLE_SRC_INSTALL = "0"
+ENABLE_SRC_INSTALL_${PN} = "${ENABLE_SRC_INSTALL}"
+
  # File manifest

  FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to