svn commit: r364290 - in head/sysutils/libretto-config: . files
Vanilla I. Shu
vanilla at FreeBSD.org
Thu Aug 7 15:31:24 UTC 2014
Author: vanilla
Date: Thu Aug 7 15:31:22 2014
New Revision: 364290
URL: http://svnweb.freebsd.org/changeset/ports/364290
QAT: https://qat.redports.org/buildarchive/r364290/
Log:
1: add USE_GCC=any to unbreak build.
2: stagify.
3: rename patch-xx
Added:
head/sysutils/libretto-config/files/patch-Makefile
- copied, changed from r364266, head/sysutils/libretto-config/files/patch-aa
head/sysutils/libretto-config/files/patch-libapm-e.man
- copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ad
head/sysutils/libretto-config/files/patch-libapm-j.man
- copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ae
head/sysutils/libretto-config/files/patch-libapm.c
- copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ab
head/sysutils/libretto-config/files/patch-libapm.h
- copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ac
Deleted:
head/sysutils/libretto-config/files/patch-aa
head/sysutils/libretto-config/files/patch-ab
head/sysutils/libretto-config/files/patch-ac
head/sysutils/libretto-config/files/patch-ad
head/sysutils/libretto-config/files/patch-ae
Modified:
head/sysutils/libretto-config/Makefile
Modified: head/sysutils/libretto-config/Makefile
==============================================================================
--- head/sysutils/libretto-config/Makefile Thu Aug 7 15:29:13 2014 (r364289)
+++ head/sysutils/libretto-config/Makefile Thu Aug 7 15:31:22 2014 (r364290)
@@ -15,26 +15,17 @@ ONLY_FOR_ARCHS= i386
WRKSRC= ${WRKDIR}/libapm
-PLIST_FILES= sbin/libretto-config
-MAN8= ${PORTNAME}.8
-MANLANG= . ja
-
+USE_GCC= any
OPTIONS_DEFINE= DOCS
PORTDOCS= *
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
post-install:
-# install japanese manpage also :-)
- ${INSTALL_MAN} ${WRKSRC}/libapm-j.man ${PREFIX}/man/ja/man8/${PORTNAME}.8
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README-e.1st ${DOCSDIR}/README.1st
- ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-e.txt ${DOCSDIR}/APM-EXBIOS.txt
- @${MKDIR} ${DOCSDIR}/ja
- ${INSTALL_DATA} ${WRKSRC}/README-j.1st ${DOCSDIR}/ja/README.1st
- ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-j.txt ${DOCSDIR}/ja/APM-EXBIOS.txt
-.endif
+ ${INSTALL_MAN} ${WRKSRC}/libapm-j.man ${STAGEDIR}${PREFIX}/man/ja/man8/${PORTNAME}.8
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README-e.1st ${STAGEDIR}${DOCSDIR}/README.1st
+ ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-e.txt ${STAGEDIR}${DOCSDIR}/APM-EXBIOS.txt
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/ja
+ ${INSTALL_DATA} ${WRKSRC}/README-j.1st ${STAGEDIR}${DOCSDIR}/ja/README.1st
+ ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-j.txt ${STAGEDIR}${DOCSDIR}/ja/APM-EXBIOS.txt
.include <bsd.port.mk>
Copied and modified: head/sysutils/libretto-config/files/patch-Makefile (from r364266, head/sysutils/libretto-config/files/patch-aa)
==============================================================================
--- head/sysutils/libretto-config/files/patch-aa Thu Aug 7 12:42:37 2014 (r364266, copy source)
+++ head/sysutils/libretto-config/files/patch-Makefile Thu Aug 7 15:31:22 2014 (r364290)
@@ -39,12 +39,12 @@
install.bin:
- install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR)
-+ install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR)/$(PROGRAM_NAME)
++ install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(DESTDIR)$(BINDIR)/$(PROGRAM_NAME)
install.man:
- - mkdir $(MANDIR)/man$(MANSECT)
- install -c -m 644 libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/libapm.$(MANSECT)
-
-+ ${BSD_INSTALL_MAN} libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/$(PROGRAM_NAME).$(MANSECT)
++ ${BSD_INSTALL_MAN} libapm-${MANLANG}.man $(DESTDIR)$(MANDIR)/man$(MANSECT)/$(PROGRAM_NAME).$(MANSECT)
+
+libapm.o: libapm.h libapm.c
Copied: head/sysutils/libretto-config/files/patch-libapm-e.man (from r364266, head/sysutils/libretto-config/files/patch-ad)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/libretto-config/files/patch-libapm-e.man Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ad)
@@ -0,0 +1,154 @@
+--- libapm-e.man.orig Fri Jun 19 04:02:48 1998
++++ libapm-e.man Thu Aug 2 17:34:01 2001
+@@ -1,80 +1,98 @@
+ .\" Written Tue May 12 19:30:00 1998 by ISHIOKA Takashi
+ .\" (ishioka at ppp01.infopepper.or.jp )
+-.TH libapm l "" "TOSHIBA Libretto only" ""
++.TH libretto-config 8 "" "TOSHIBA Libretto only" ""
+ .SH NAME
+-libapm \- TOSHIBA Libretto BIOS Setup Program
++libretto-config \- TOSHIBA Libretto BIOS Setup Program
+ .SH SYNOPSIS
+
+-.B libapm
+-{\-v,\-\-Version}
+-{\-h,\-\-Help}
++.B libretto-config
++{\-v}
++{\-h}
+
+-.B libapm
+-{\-P,\-\-PowerUp (boot,hibernation)}
+-{\-T,\-\-StandbyTime (0,5,10,15,30,45,60)}
+-{\-a,\-\-AutoOff (disable,10,20,30,40,50,60)}
+-{\-S,\-\-PanelSwitch (disable,enable)}
+-{\-A,\-\-PowerOn (disable,<time>)}
+-{\-L,\-\-LcdPower (0,1,2,3)}
+-{\-V,\-\-Volume (0,1,2,3)}
+-{\-O,\-\-Off (suspend|hibernation)}
++.B libretto-config
++{\-P (boot,hibernation)}
++{\-T (0,5,10,15,30,45,60)}
++{\-a (disable,10,20,30,40,50,60)}
++{\-S (disable,enable)}
++{\-A (disable,<time>)}
++{\-L (0,1,2,3)}
++{\-V (0,1,2,3)}
++{\-O (suspend|hibernation)}
+
+ .SH DESCRIPTION
+-.B libapm
+-configures the setting of Toshiba Libretto.
++.B libretto-config
++configures the BIOS settings of a Toshiba Libretto notebook computer.
+ Changes are done immediately and rebooting is not neccesary.
+
+ .SH OPTIONS
+ .TP
+-.B \-P,\-\-PowerUp (boot,hibernation)
+-sets the Hibernation function.
+-If hibernation is specified, the hibernation function is enabled.
+-If boot is specified, it is disabled.
++.B \-P (boot,hibernation)
++sets Hibernation mode.
++The ``boot'' argument disables hibernation.
++Hibernation mode writes volatile memory
++to disk at power off.
++Without hibernation,
++the Libretto's power-down actions are destructive;
++there is no saving of machine state.
+ .TP
+-.B \-T,\-\-StandbyTime (0,5,10,15,30,45,60)
+-sets the Standby time.
+-If the Stanby time is specified, the power is not cut after hibernation
+-for that time in order to resume quickly from hibernation.
+-You can select the time from 0, 5, 10, 15, 30, 45, 60 minutes.
+-This function is valid if the hibernation function is enabled.
++.B \-T (0,5,10,15,30,45,60)
++sets a Standby Time.
++If a standby time is specified,
++power is not cut after hibernation
++for the specified time
++to allow a quick resume.
++A time of 0, 5, 10, 15, 30, 45 or 60 minutes
++may be selected.
+ .TP
+-.B \-a,\-\-AutoOff (disable,10,20,30,40,50,60)
+-sets the time to the Auto Power Off.
+-You can select the time from disable, 10, 20, 30, 40, 50, 60 minutes.
+-This function is valid if the hibernation function is enabled.
++.B \-a (disable,10,20,30,40,50,60)
++sets the time to Auto Power Off.
++A time of 10, 20, 30, 40, 50 or 60 minutes
++may be selected,
++or the word ``disabled'' may be used
++if Auto Power Off is not needed.
+ .TP
+-.B \-S,\-\-PanelSwitch (disable,enable)
+-sets the Panel Switch funtion. If enabled, hibernation is done by
+-closing the panel and vice versa.
+-This function is valid if the hibernation function is enabled.
++.B \-S (disable,enable)
++sets the Panel Switch function.
++If enabled,
++hibernation or power-down may be done
++by closing the front panel
++and the machine may be restarted
++by opening it.
+ .TP
+-.B \-A,\-\-PowerOn (disable,<time>)
+-sets the Power On timer.
+-The format of the <time> is hh:mm. If time is specified, power is
+-automatically turned on at the time.
++.B \-A (disable,<time>)
++sets the Power On Timer.
++If <time> is specified,
++power is automatically turned on
++at that time.
++The format of the <time> is hh:mm,
++and a value of ``disable''
++turns off the power on timer.
+ .TP
+-.B \-L,\-\-LcdPower (0,1,2,3)
+-sets the brightness of the LCD.
+-0 is the darkest and 3 is the brightest.
++.B \-L (0,1,2,3)
++sets the brightness of the display LCD.
++0 is the dimmest and 3 is the brightest.
+ .TP
+-.B \-V,\-\-Volume (0,1,2,3)
+-sets the volume of beep sound.
+-0 is off, 1 is minimum and 3 is maximum.
++.B \-V (0,1,2,3)
++sets the volume of keyboard bell (system speaker).
++0 is off, 1 is quietest and 3 is loudest.
+ .TP
+-.B \-O,\-\-Off (suspend|hibernation)
+-sets the suspend/hibernation mode. (100CT Only)
++.B \-O (suspend|hibernation)
++sets the suspend/hibernation mode. (100CT/110CT Only)
+ .TP
+-.B \-v,\-\-Version
++.B \-v
+ displays the version of this program.
+ .TP
+-.B \-h,\-\-Help
+-displays the simple usage.
++.B \-h
++displays a simple usage message.
++
++.SH NOTES
++This program has no warranty at all.
++It may or may not contain bugs.
+
+ .SH BUGS
+-Completely no warranty. It may or may not contain any bugs.
+-Operation on the machines but Toshiba Libretto is uncertain.
+-A part of function might work on Toshiba's other notebook machines.
+-You must have root privilege to run this program.
++Operation on any machines except Toshiba Libretto is unknown.
++Operation on other Toshiba notebook computer is uncertain.
++Superuser privelige is required to use this program.
+
+ .SH AUTHORS
+ .TP
Copied: head/sysutils/libretto-config/files/patch-libapm-j.man (from r364266, head/sysutils/libretto-config/files/patch-ae)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/libretto-config/files/patch-libapm-j.man Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ae)
@@ -0,0 +1,110 @@
+--- libapm-j.man.orig Thu Jun 4 13:16:43 1998
++++ libapm-j.man Thu Nov 26 12:40:28 1998
+@@ -1,38 +1,38 @@
+ .\" Written Tue May 12 19:30:00 1998 by ISHIOKA Takashi
+ .\" Changes Thu Jun 3 12:10:28 1998
+ .\" (ishioka at ppp01.infopepper.or.jp )
+-.TH libapm l "" "TOSHIBA Libretto only" ""
++.TH libretto-config 8 "" "TOSHIBA Libretto only" ""
+ .SH ̾Á°
+-libapm \- Åì¼ÇLibretto¤ÎÅŸ»´ÉÍý¥×¥í¥°¥é¥à
++libretto-config \- Åì¼ÇLibretto¤ÎÅŸ»´ÉÍý¥×¥í¥°¥é¥à
+ .SH ½ñ¼°
+
+-.B libapm
+-{\-v,\-\-Version}
+-{\-h,\-\-Help}
++.B libretto-config
++{\-v}
++{\-h}
+
+-.B libapm
+-{\-P,\-\-PowerUp (boot,hibernation)}
+-{\-T,\-\-StandbyTime (0,5,10,15,30,45,60,unlimit)}
+-{\-a,\-\-AutoOff (disable,10,20,30,40,50,60)}
+-{\-S,\-\-PanelSwitch (disable,enable)}
+-{\-A,\-\-AlarmOn (disable,<time>)}
+-{\-L,\-\-LcdPower (0,1,2,3)}
+-{\-V,\-\-Volume (0,1,2,3)}
+-{\-O,\-\-Off (suspend|hibernation)}
++.B libretto-config
++{\-P (boot,hibernation)}
++{\-T (0,5,10,15,30,45,60,unlimit)}
++{\-a (disable,10,20,30,40,50,60)}
++{\-S (disable,enable)}
++{\-A (disable,<time>)}
++{\-L (0,1,2,3)}
++{\-V (0,1,2,3)}
++{\-O (suspend|hibernation)}
+
+ .SH ÀâÌÀ
+-.B libapm
++.B libretto-config
+ ¤ÏÅì¼ÇLibretto ¤Î¥·¥¹¥Æ¥àÀßÄê¤òÊѹ¹¤·¤Þ¤¹¡£
+ Êѹ¹¤Ï¨ºÂ¤ËÈ¿±Ç¤µ¤ì¥ê¥Ö¡¼¥È¤ÎɬÍפϤ¢¤ê¤Þ¤»¤ó¡£
+
+ .SH ¥ª¥×¥·¥ç¥ó
+ .TP
+-.B \-P,\-\-PowerUp (boot,hibernation)
++.B \-P (boot,hibernation)
+ ¤Ï ¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥óµ¡Ç½¤òÀßÄꤷ¤Þ¤¹¡£
+ hibernation¤ò»ØÄꤹ¤ë¤È¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥óµ¡Ç½¤¬Í¸ú¤Ë¤Ê¤ê¡¢
+ boot¤ò»ØÄꤹ¤ë¤È¤½¤ì¤¬Ìµ¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£
+ .TP
+-.B \-T,\-\-StandbyTime (0,5,10,15,30,45,60,unlimit)
++.B \-T (0,5,10,15,30,45,60,unlimit)
+ ¤Ï¡¢¥¹¥¿¥ó¥Ð¥¤»þ´Ö(ñ°Ì¤Ïʬ)¤òÀßÄꤷ¤Þ¤¹¡£
+ ¥¹¥¿¥ó¥Ð¥¤»þ´Ö¤È¤Ï¡¢¥µ¥¹¥Ú¥ó¥É¤Ë¤è¤Ã¤Æ¥Ï¡¼¥É¥Ç¥£¥¹¥¯¤Ø¤ÎÊݸ½èÍý¤ò
+ ½ªÎ»¤·¤¿¸å¡¢´°Á´¤ËÅŸ»¤òÀÚ¤ë¤Þ¤Ç¤Î»þ´Ö¤Ç¤¹¡£
+@@ -40,43 +40,43 @@
+ unlimit ¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢´°Á´¤ËÅŸ»¤òÀÚ¤é¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£
+ ¤³¤Îµ¡Ç½¤Ï¡¢¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥óµ¡Ç½¤¬Í¸ú¤Ê¾ì¹ç¤Î¤ßÆ°ºî¤·¤Þ¤¹¡£
+ .TP
+-.B \-a,\-\-AutoOff (disable,10,20,30,40,50,60)
++.B \-a (disable,10,20,30,40,50,60)
+ ¥·¥¹¥Æ¥à¼«Æ°¥ª¥Õ»þ´Ö(ñ°Ì¤Ïʬ)¤òÀßÄꤷ¤Þ¤¹¡£
+ »ØÄê¤Ç¤¤ë»þ´Ö¤Ï disable,10,20,30,40,50,60 ¤Ç¤¹.
+ ¤³¤Îµ¡Ç½¤Ï¡¢¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥óµ¡Ç½¤¬Í¸ú¤Ê¾ì¹ç¤Î¤ßÆ°ºî¤·¤Þ¤¹¡£
+ .TP
+-.B \-S,\-\-PanelSwitch (disable,enable)
++.B \-S (disable,enable)
+ ¤Ï¡¢¥Ñ¥Í¥ë¤òÊĤ¸¤¿¤È¤¤Ë¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥ó¤·¡¢³«¤¤¤¿¤È¤¤Ë¥ì¥¸¥å¡¼¥à¤¹¤ë
+ ¥Ñ¥Í¥ë¥¹¥¤¥Ã¥Á¤Îµ¡Ç½¤òÀßÄꤷ¤Þ¤¹¡£
+ enable ¤ò»ØÄꤹ¤ë¤È¥Ñ¥Í¥ë¥¹¥¤¥Ã¥Á¤Îµ¡Ç½¤¬Í¸ú¤Ë¤Ê¤ê¡¢
+ disable ¤ò»ØÄꤹ¤ë¤È¤½¤Îµ¡Ç½¤Ï̵¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£
+ ¤³¤Îµ¡Ç½¤Ï¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥óµ¡Ç½¤¬Í¸ú¤Ê¾ì¹ç¤Î¤ßÆ°ºî¤·¤Þ¤¹¡£
+ .TP
+-.B \-A,\-\-AlarmOn (disable,<time>)
++.B \-A (disable,<time>)
+ ¤Ï¡¢¥¿¥¤¥Þ¥ª¥óµ¡Ç½¤òÀßÄꤷ¤Þ¤¹¡£
+ <time> ¤È¤·¤Æ hh:mm ¤Î·Á¤Ç»þ¹ï¤òÍ¿¤¨¤ë¤È¡¢¤½¤Î»þ¹ï¤Ë¼«Æ°Åª¤ËÅŸ»¤¬Æþ¤ê
+ ¤Þ¤¹¡£disable ¤ò»ØÄꤹ¤ë¤È¤½¤Îµ¡Ç½¤¬Ìµ¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£
+ .TP
+-.B \-L,\-\-LcdPower (0,1,2,3)
++.B \-L (0,1,2,3)
+ ¤Ï¡¢LCD ¤Îµ±ÅÙ¤òÀßÄꤷ¤Þ¤¹¡£
+ 0,1,2,3 ¤ÎÃͤ¬»ØÄê¤Ç¤¤Þ¤¹¡£
+ 0 ¤¬ºÇ¤â°Å¤¯¡¢¿ô»ú¤¬Â礤¯¤Ê¤ë¤Ë½¾¤¤¡¢
+ ¤è¤êÌÀ¤ë¤¯¤Ê¤ê¤Þ¤¹¡£
+ .TP
+-.B \-V,\-\-Volume (0,1,2,3)
++.B \-V (0,1,2,3)
+ ¤Ï¡¢¥Ó¡¼¥×²»¤ÎÀßÄê¤ò¤·¤Þ¤¹¡£
+ 0,1,2,3 ¤ÎÃͤ¬»ØÄê¤Ç¤¤Þ¤¹¡£
+ 0¤Ç¥ª¥Õ¡¢1¤¬ºÇ¤â¾®¤µ¤Ê²»¤Ç¡¢¿ô»ú¤¬Â礤¯¤Ê¤ë¤Ë½¾¤¤¡¢
+ ¤è¤êÂ礤ʲ»¤Ë¤Ê¤ê¤Þ¤¹¡£
+ .TP
+-.B \-O,\-\-Off (suspend|hibernation)
++.B \-O (suspend|hibernation)
+ ÅŸ»¤òÀÚ¤ë¤È¤¤Ë suspend¾õÂ֤ˤ¹¤ë¤«¡¢¥Ï¥¤¥Ð¥Í¡¼¥·¥ç¥óµ¡Ç½¤ò»È¤¦¤«¤ò
+ ÀßÄꤷ¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï Libretto100°Ê¹ß¤Îµ¡¼ï¤Î¤ß¤Ç͸ú¤Ç¤¹¡£
+ .TP
+-.B \-v,\-\-Version
++.B \-v
+ ¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£
+ .TP
+-.B \-h,\-\-Help
++.B \-h
+ ´Êñ¤Ê¥Ø¥ë¥×¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£
+
+ .SH ¥Ð¥°
Copied: head/sysutils/libretto-config/files/patch-libapm.c (from r364266, head/sysutils/libretto-config/files/patch-ab)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/libretto-config/files/patch-libapm.c Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ab)
@@ -0,0 +1,207 @@
+
+$FreeBSD$
+
+--- libapm.c.orig Fri Jun 19 02:28:23 1998
++++ libapm.c Sun Aug 22 23:31:55 2004
+@@ -8,12 +8,19 @@
+ /* */
+ /***********************************************************/
+
++#undef HAVE_GETOPT_LONG
++#ifdef __linux__
++#define HAVE_GETOPT_LONG 1
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <string.h>
+ #include <ctype.h>
++#ifdef HAVE_GETOPT_LONG
+ #include <getopt.h>
++#endif
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/mman.h>
+@@ -63,6 +70,7 @@
+ int r;
+ char c;
+
++#ifdef HAVE_GETOPT_LONG
+ struct option longopts[] = {
+ { "Help", 0, 0, 'h' },
+ { "Version", 0, 0, 'v' },
+@@ -78,6 +86,7 @@
+ #endif /* CMOS_ACCESS */
+ {0, 0, 0, 0}
+ };
++#endif
+
+ if( 0 != geteuid() ){
+ printf("%s: Only root can execute !!\n", argv[0]);
+@@ -98,8 +107,12 @@
+
+ get_status();
+
++#ifdef HAVE_GETOPT_LONG
+ while ((c = getopt_long(argc,argv,
+ "hvP:T:a:S:A:L:V:O:", longopts, NULL)) != -1) {
++#else
++ while ((c = getopt(argc,argv, "hvP:T:a:S:A:L:V:O:")) != -1) {
++#endif
+ switch (c) {
+ case 'h':
+ usage();
+@@ -189,7 +202,7 @@
+ case '?':
+ usage();
+ break;
+- default:
++ default: break;
+ }
+ }
+ #ifdef DEBUG
+@@ -215,29 +228,60 @@
+ void usage(void)
+ {
+ #ifdef CMOS_ACCESS
+- printf("
+-usage: libapm [-v --Version]
+- [-h --Help]
+- [-P --PowerUp {boot,hibernation}]
+- [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]
+- [-a --AutoOff {disable,10,20,30,40,50,60}]
+- [-S --PanelSwitch {disable,enable}]
+- [-A --AlarmOn {disable,<time>}]
+- [-L --LcdPower {0,1,2,3}]
++# ifdef HAVE_GETOPT_LONG
++ printf("\n\
++usage: libretto-config [-v --Version]\n\
++ [-h --Help]\n\
++ [-P --PowerUp {boot,hibernation}]\n\
++ [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]\n\
++ [-a --AutoOff {disable,10,20,30,40,50,60}]\n\
++ [-S --PanelSwitch {disable,enable}]\n\
++ [-A --AlarmOn {disable,<time>}]\n\
++ [-L --LcdPower {0,1,2,3}]\n\
+ \n");
+-#else
+- printf("
+-usage: libapm [-v --Version]
+- [-h --Help]
+- [-P --PowerUp {boot,hibernation}]
+- [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]
+- [-a --AutoOff {disable,10,20,30,40,50,60}]
+- [-S --PanelSwitch {disable,enable}]
+- [-A --AlarmOn {disable,<time>}]
+- [-L --LcdPower {0,1,2,3}]
+- [-V --Volume {0,1,2,3}]
+- [-O --Off {suspend|hibernation} Use Only >= Libretto100]
++# else /* not HAVE_GETOPT_LONG */
++ printf("\n\
++usage: libretto-config [-v : Version]\n\
++ [-h : Help]\n\
++ [-P {boot,hibernation} : PowerUp]\n\
++ [-T {0,5,10,15,30,45,60,unlimit} : StandbyTime]\n\
++ [-a {disable,10,20,30,40,50,60} : AutoOff]\n\
++ [-S {disable,enable} : PanelSwitch]\n\
++ [-A {disable,<time>} : AlarmOn]\n\
++ [-L {0,1,2,3} : LcdPower]\n\
++ \n");
++# endif /* HAVE_GETOPT_LONG */
++
++#else /* not CMOS_ACCESS */
++
++# ifdef HAVE_GETOPT_LONG
++ printf("\
++usage: libretto-config [-v --Version]\n\
++ [-h --Help]\n\
++ [-P --PowerUp {boot,hibernation}]\n\
++ [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]\n\
++ [-a --AutoOff {disable,10,20,30,40,50,60}]\n\
++ [-S --PanelSwitch {disable,enable}]\n\
++ [-A --AlarmOn {disable,<time>}]\n\
++ [-L --LcdPower {0,1,2,3}]\n\
++ [-V --Volume {0,1,2,3}]\n\
++ [-O --Off {suspend|hibernation} Use Only >= Libretto100]\n\
+ \n");
++# else /* not HAVE_GETOPT_LONG */
++ printf("\
++usage: libretto-config [-v : Version]\n\
++ [-h : Help]\n\
++ [-P {boot,hibernation} : PowerUp]\n\
++ [-T {0,5,10,15,30,45,60,unlimit} : StandbyTime]\n\
++ [-a {disable,10,20,30,40,50,60} : AutoOff]\n\
++ [-S {disable,enable} : PanelSwitch]\n\
++ [-A {disable,<time>} : AlarmOn]\n\
++ [-L {0,1,2,3} : LcdPower]\n\
++ [-V {0,1,2,3} : Volume]\n\
++ [-O {suspend|hibernation} : Off (Use Only>=Libretto100)]\n\
++ \n");
++# endif /* HAVE_GETOPT_LONG */
++
+ #endif /* CMOS_ACCESS */
+ exit(1);
+ }
+@@ -246,7 +290,11 @@
+ void init(void)
+ {
+ /* SMI port */
++#ifdef __linux__
+ ioperm(0xb2, 1, 1);
++#else
++ open("/dev/io", O_RDWR, 0);
++#endif
+ }
+ #endif /* CMOS_ACCESS */
+
+@@ -754,29 +802,29 @@
+ #endif /* CMOS_ACCESS */
+
+ #ifndef CMOS_ACCESS
+- printf("
+-Power Management for Libretto V%-8s
+-+-----------------------------------------------------------+
+-| 0) Power-up Mode : %-32s|
+-| 1) Standby Time : %-32s|
+-| 2) System Auto Off : %-32s|
+-| 3) Panel Power On/Off : %-32s|
+-| 4) Alarm Power On : %-32s|
+-| 5) LCD Power : %-32s|
+-| 6) Volume : %-32s|
+-| 7) Off (Suspend/Hiber): %-32s|
++ printf("\
++Power Management for Libretto V%-8s\n\
+++-----------------------------------------------------------+\n\
++| 0) Power-up Mode : %-32s|\n\
++| 1) Standby Time : %-32s|\n\
++| 2) System Auto Off : %-32s|\n\
++| 3) Panel Power On/Off : %-32s|\n\
++| 4) Alarm Power On : %-32s|\n\
++| 5) LCD Power : %-32s|\n\
++| 6) Volume : %-32s|\n\
++| 7) Off (Suspend/Hiber): %-32s|\n\
+ +-----------------------------------------------------------+\n\n",
+ version, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);
+ #else
+- printf("
+-Power Management for Libretto V%-8s
+-+-----------------------------------------------------------+
+-| 0) Power-up Mode : %-32s|
+-| 1) Standby Time : %-32s|
+-| 2) System Auto Off : %-32s|
+-| 3) Panel Power On/Off : %-32s|
+-| 4) Alarm Power On : %-32s|
+-| 5) LCD Power : %-32s|
++ printf("\
++Power Management for Libretto V%-8s\n\
+++-----------------------------------------------------------+\n\
++| 0) Power-up Mode : %-32s|\n\
++| 1) Standby Time : %-32s|\n\
++| 2) System Auto Off : %-32s|\n\
++| 3) Panel Power On/Off : %-32s|\n\
++| 4) Alarm Power On : %-32s|\n\
++| 5) LCD Power : %-32s|\n\
+ +-----------------------------------------------------------+\n\n",
+ version, s[0], s[1], s[2], s[3], s[4], s[5]);
+ #endif /* CMOS_ACCESS */
Copied: head/sysutils/libretto-config/files/patch-libapm.h (from r364266, head/sysutils/libretto-config/files/patch-ac)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/libretto-config/files/patch-libapm.h Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ac)
@@ -0,0 +1,48 @@
+diff -urN libapm.h.orig libapm.h
+--- libapm.h.orig Tue May 12 11:05:49 1998
++++ libapm.h Thu Nov 19 13:02:03 1998
+@@ -32,34 +32,44 @@
+ #define outb(port, value) port_out(value, port)
+ #define outw(port, value) port_outw(value, port)
+
++#ifdef __linux__
+ int io_enable(void)
+ {
+ ioperm(0x70, 1, 1);
+ ioperm(0x71, 1, 1);
+ return 0;
+ }
++#endif
+
++#ifdef __linux__
+ int io_disable(void)
+ {
+ ioperm(0x70, 0, 1);
+ ioperm(0x71, 0, 1);
+ return 0;
+ }
++#endif
+
+ int get_cmos(int index)
+ {
+ int r;
+
++#ifdef __linux__
+ io_enable();
++#endif
+ outb(0x70, index);
+ r = inb(0x71);
++#ifdef __linux__
+ io_disable();
++#endif
+ return r;
+ }
+
+ int set_cmos(int index, int value)
+ {
++#ifdef __linux__
+ io_enable();
++#endif
+ outb(0x70, index);
+ outb(0x71, value);
+ return 0;
More information about the svn-ports-all
mailing list