698N/AThis is a case study of migrating one library (libtecla) from ON to Userland.
698N/AI (JBeck) was able to figure out a fair amount on my own, but had to rely on
698N/ANorm for a great deal more, so thought it would be worthwhile to document what
698N/Awe went through, to save others time in the future.
698N/A* Initially just four files were needed:
698N/A * Makefile, which in this case I copied from libsndfile as it seemed to be
698N/A* Coming from ON, there were already "Solarified" man pages available, so we
698N/A specified the "--without-man-pages" configure option in the Makefile, and
698N/A appended directories to their search paths when looking for content:
698N/A PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
698N/A* Because one of the man pages (enhance.1) had been translated, and there
698N/A were thus multiple files with the same name, we tweaked the names of the
698N/A translated files, and used the tweaked names in the package manifest. We
698N/A attributes: the former causes pkgmogrify to take the last part of the file
698N/A action's path attribute (basename) and set the 'hash' value to the basename
698N/A so that it can be located at the top level of one of the search directories,
698N/A while the latter causes the userland-mangler to ignore the file, since as
698N/A mentioned above these man pages come pre-Solarified, whereas the default
698N/A for Userland is running a file mangler on some of the files to be packaged.
698N/A This file mangler adds ATTRIBUTES and NOTES sections to man pages with
698N/A 'stability', 'availability', project and source urls. It also strips the
698N/A CDDL from files right now. More functionality may be added over time.
698N/A* On the package manifest fmri action, ON's macros:
698N/A $(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
698N/A needed to be changed to comparable Userland macros:
698N/A $(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
698N/A* These ON attributes needed to be removed:
698N/A coded URL in ON to $(COMPONENT_PROJECT_URL) in Userland.
698N/A* These needed to be added (note your actual year and ARC case number should
698N/A be used instead of "YYYY" and "CCC" respectively):
698N/A* The $(ARCH64) macro used by ON needed to be changed to $(MACH64).
698N/A needed to be changed to:
698N/A Note that "MIT-like" applies to this library; others will have different
698N/A* Apparently this is unusual, but libtecla's Makefile structure did not have
698N/A* Again this is apparently unusual, but libtecla's Makefile structure had
698N/A LD_RUN_PATH include the working directory, which resulted in build paths
698N/A* ldd was showing libthread despite it not being explicitly listed; this
698N/A turned out to be because Userland sets -mt by default, so we had to unset
698N/A studio_MT in the Makefile.