Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add OpenCBM ports #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add OpenCBM ports #1

wants to merge 2 commits into from

Conversation

Zirias
Copy link
Owner

@Zirias Zirias commented Jun 1, 2020

  • master comms/opencbm (main program, xu1541 and xum1541 plugins)
  • slave comms/opencbm-plugin-xa1541 (plugin for parallel port cable)
  • slave comms/opencbm-kmod (kernel driver for parallel port cable)

Copy link

@MikaelUrankar MikaelUrankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what's the best approach for master / slave ports. I've looked at various and they all have
USES+= instead of 'USES= ${OCBM_USES}', it fhe master port
ditto for LICENSE, COMMENT, RUN_DEP and so on (it's done this way in games/ioquake3/Makefile)

comms/opencbm/Makefile Outdated Show resolved Hide resolved
comms/opencbm/Makefile Outdated Show resolved Hide resolved
comms/opencbm/Makefile Outdated Show resolved Hide resolved
comms/opencbm/Makefile Outdated Show resolved Hide resolved
073b833772e4325c7f680d6aeb81bc11844f03ca.diff \
3e967551e200d0c03aa4898e482626a7510acd21.diff

OCBM_LICENSE= GPLv2+

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you know it's gplv2+, all I can find is https://github.com/OpenCBM/OpenCBM/blob/master/opencbm/COPYING and https://github.com/OpenCBM/OpenCBM/blob/master/opencbm/mBSD-License.txt
You can list the license file with LICENSE_FILE= ${WRKSRC}/xxx

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the source file of the driver module itself ( in sys/freebsd/ ) -- should a source file be added as a license file?

comms/opencbm/Makefile Show resolved Hide resolved
comms/opencbm/pkg-descr Show resolved Hide resolved
comms/opencbm/pkg-plist Outdated Show resolved Hide resolved
@Zirias
Copy link
Owner Author

Zirias commented Jun 1, 2020

Regarding the overall comment, I think I might reorganize it to not really be master/slave as there's probably too little shared, but maybe use some shared make includes instead. Thanks for reviewing, indeed missed a few things :)

 * master comms/opencbm (main program, xu1541 and xum1541 plugins)
 * slave comms/opencbm-plugin-xa1541 (plugin for parallel port cable)
 * slave comms/opencbm-kmod (kernel driver for parallel port cable)
 * share only a Makefile.inc and distinfo file
 * resolve hardcoded /usr/local by patching with sed from Makefile
USES= gmake
USE_LDCONFIG= yes

MAKE_ARGS= CC=cc SUBDIRS_PLUGIN_XA1541=opencbm/lib/plugin/xa1541

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC="${CC}"

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh! sure :o

comms/opencbm-plugin-xa1541/pkg-plist Show resolved Hide resolved
OPTIONS_DEFINE= DOCS INFO
OPTIONS_DEFAULT= DOCS INFO

MAKE_ARGS= CC=cc INFODIR=${PREFIX}/share/info

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC="${CC}" INFODIR=${PREFIX}/${INFO_PATH}

@${REINPLACE_CMD} -e 's|_ETC="$$1"|_ETC="$${1:-${LOCALBASE}/etc}"|' \
-e 's|in /.*/ instead|in ${OCBM_CONFDIR}/ instead|' \
-e "s|execute 'opencbm_|execute '|" \
${WRKSRC}/opencbm/LINUX/plugin_helper_tools

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use patch files whenever possible porters handbook 4.4.3. Simple Automatic Replacements)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not possible here, as this must patch in the value of LOCALBASE, to avoid hardcoding /usr/local in a patch file

comms/opencbm/Makefile Show resolved Hide resolved
post-install:
${STRIP_CMD} ${STAGEDIR}${PLUGINBASENAME}xa1541.so.${OCBM_LIBVERSION}
@${RM} ${STAGEDIR}${PREFIX}/etc/opencbm.conf.d/00opencbm.conf
@${RM} ${STAGEDIR}${PREFIX}/etc/opencbm.conf

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can "merge" the RM lines

comms/opencbm-kmod/Makefile Show resolved Hide resolved
@Zirias
Copy link
Owner Author

Zirias commented Jun 6, 2020

Thanks for noticing the errors with hardcoded cc ... preparing a followup-PR right now to fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants