├── BROKEN.txt ├── README.md ├── TODO ├── base ├── build.sh ├── busybox │ ├── build.sh │ ├── config │ ├── config.old │ ├── patch_lineedit.c │ └── patch_sync.c ├── installer │ ├── etc_profile │ ├── install-using-busybox.sh │ └── install.sh ├── kbox_shell │ ├── build.sh │ └── src │ │ ├── Makefile │ │ └── kbox_shell.c ├── libfakechroot │ ├── build.sh │ ├── patch_config.h │ ├── patch_glob.c │ └── patch_libfakechroot.c └── unzip60 │ ├── README │ ├── build.sh │ └── unzip60.zip ├── docs ├── build_order.txt ├── prerequisites.txt └── public_html │ ├── _bottom.html │ ├── _top.html │ ├── kbox86_diary.html │ ├── kbox_bugs.html │ ├── kbox_c.html │ ├── kbox_diary.html │ ├── kbox_downloads.html │ ├── kbox_faq.html │ ├── kbox_how_it_works.html │ ├── kbox_index.html │ ├── kbox_installation.html │ ├── kbox_java.html │ ├── kbox_logo.gif │ ├── kbox_main.css │ └── kbox_status.html ├── env.sh ├── env_arm.sh ├── env_i686.sh ├── misc ├── kpkg ├── kpkg-help.txt └── sources ├── packages ├── andplay │ ├── build.sh │ ├── control │ └── packageinfo.html ├── android-audio-sink │ ├── build.sh │ ├── control │ └── packageinfo.html ├── android-elf-cleaner │ ├── BROKEN │ ├── build.sh │ ├── control │ └── packageinfo.html ├── bash │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_config.h │ └── patch_parse.y ├── bc │ ├── build.sh │ ├── control │ ├── libmath.h │ └── packageinfo.html ├── cboard │ ├── BROKEN │ └── build.sh ├── coreutils │ ├── build.sh │ ├── control │ ├── dump │ ├── packageinfo.html │ ├── patch_dd.c │ ├── patch_pinky.c │ └── patch_shred.c ├── curl │ ├── build.sh │ ├── cacert.pem │ ├── control │ └── packageinfo.html ├── dbcmd │ ├── build.sh │ ├── control │ └── packageinfo.html ├── dropbear │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_cli_auth.c │ ├── patch_config.h │ └── patch_loginrec.c ├── epub2txt │ ├── build.sh │ ├── control │ └── packageinfo.html ├── espeak │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_Makefile │ ├── patch_Makefile.2 │ ├── patch_speech.h │ └── scripts │ │ ├── say │ │ └── sayfile ├── file │ ├── build.sh │ ├── control │ └── packageinfo.html ├── frobtads │ ├── build.sh │ ├── control │ └── packageinfo.html ├── frotz │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_Makefile │ └── patch_ux_init.c ├── ftp │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_cmds.c │ └── patch_ftp_var.h ├── gawk │ ├── build.sh │ ├── control │ ├── packageinfo.html │ └── patch_pwcat.c ├── gcc │ └── packageinfo.html ├── git │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_Makefile │ └── patch_Makefile2 ├── glkterm │ ├── build.sh │ └── patch_Makefile ├── glulxe │ ├── build.sh │ ├── control │ ├── packageinfo.html │ └── patch_Makefile ├── gnuchess │ ├── build.sh │ ├── control │ └── packageinfo.html ├── gnupg │ ├── build.sh │ ├── control │ ├── packageinfo.html │ └── patch_config.h ├── grep │ ├── build.sh │ ├── control │ └── packageinfo.html ├── groff │ ├── build.sh │ ├── control │ ├── dump │ ├── packageinfo.html │ └── x.x ├── hexedit │ ├── build.sh │ ├── control │ └── packageinfo.html ├── htop │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_CRT.c │ └── patch_Makefile ├── java-support │ ├── Makefile.kbox │ ├── bin │ │ ├── dex │ │ ├── dx │ │ └── javac │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── properties │ │ ├── javac.properties │ │ └── tools.properties │ └── src │ │ ├── com │ │ ├── android │ │ │ └── dx │ │ │ │ ├── Version.java │ │ │ │ ├── cf │ │ │ │ ├── attrib │ │ │ │ │ ├── AttAnnotationDefault.java │ │ │ │ │ ├── AttCode.java │ │ │ │ │ ├── AttConstantValue.java │ │ │ │ │ ├── AttDeprecated.java │ │ │ │ │ ├── AttEnclosingMethod.java │ │ │ │ │ ├── AttExceptions.java │ │ │ │ │ ├── AttInnerClasses.java │ │ │ │ │ ├── AttLineNumberTable.java │ │ │ │ │ ├── AttLocalVariableTable.java │ │ │ │ │ ├── AttLocalVariableTypeTable.java │ │ │ │ │ ├── AttRuntimeInvisibleAnnotations.java │ │ │ │ │ ├── AttRuntimeInvisibleParameterAnnotations.java │ │ │ │ │ ├── AttRuntimeVisibleAnnotations.java │ │ │ │ │ ├── AttRuntimeVisibleParameterAnnotations.java │ │ │ │ │ ├── AttSignature.java │ │ │ │ │ ├── AttSourceFile.java │ │ │ │ │ ├── AttSynthetic.java │ │ │ │ │ ├── BaseAnnotations.java │ │ │ │ │ ├── BaseAttribute.java │ │ │ │ │ ├── BaseLocalVariables.java │ │ │ │ │ ├── BaseParameterAnnotations.java │ │ │ │ │ ├── InnerClassList.java │ │ │ │ │ ├── RawAttribute.java │ │ │ │ │ └── package.html │ │ │ │ ├── code │ │ │ │ │ ├── BaseMachine.java │ │ │ │ │ ├── BasicBlocker.java │ │ │ │ │ ├── ByteBlock.java │ │ │ │ │ ├── ByteBlockList.java │ │ │ │ │ ├── ByteCatchList.java │ │ │ │ │ ├── ByteOps.java │ │ │ │ │ ├── BytecodeArray.java │ │ │ │ │ ├── ConcreteMethod.java │ │ │ │ │ ├── ExecutionStack.java │ │ │ │ │ ├── Frame.java │ │ │ │ │ ├── LineNumberList.java │ │ │ │ │ ├── LocalVariableList.java │ │ │ │ │ ├── LocalsArray.java │ │ │ │ │ ├── LocalsArraySet.java │ │ │ │ │ ├── Machine.java │ │ │ │ │ ├── Merger.java │ │ │ │ │ ├── OneLocalsArray.java │ │ │ │ │ ├── ReturnAddress.java │ │ │ │ │ ├── Ropper.java │ │ │ │ │ ├── RopperMachine.java │ │ │ │ │ ├── SimException.java │ │ │ │ │ ├── Simulator.java │ │ │ │ │ ├── SwitchList.java │ │ │ │ │ ├── ValueAwareMachine.java │ │ │ │ │ └── package.html │ │ │ │ ├── cst │ │ │ │ │ ├── ConstantPoolParser.java │ │ │ │ │ └── ConstantTags.java │ │ │ │ ├── direct │ │ │ │ │ ├── AnnotationParser.java │ │ │ │ │ ├── AttributeFactory.java │ │ │ │ │ ├── AttributeListParser.java │ │ │ │ │ ├── ClassPathOpener.java │ │ │ │ │ ├── CodeObserver.java │ │ │ │ │ ├── DirectClassFile.java │ │ │ │ │ ├── FieldListParser.java │ │ │ │ │ ├── MemberListParser.java │ │ │ │ │ ├── MethodListParser.java │ │ │ │ │ ├── StdAttributeFactory.java │ │ │ │ │ └── package.html │ │ │ │ └── iface │ │ │ │ │ ├── Attribute.java │ │ │ │ │ ├── AttributeList.java │ │ │ │ │ ├── ClassFile.java │ │ │ │ │ ├── Field.java │ │ │ │ │ ├── FieldList.java │ │ │ │ │ ├── Member.java │ │ │ │ │ ├── Method.java │ │ │ │ │ ├── MethodList.java │ │ │ │ │ ├── ParseException.java │ │ │ │ │ ├── ParseObserver.java │ │ │ │ │ ├── StdAttributeList.java │ │ │ │ │ ├── StdField.java │ │ │ │ │ ├── StdFieldList.java │ │ │ │ │ ├── StdMember.java │ │ │ │ │ ├── StdMethod.java │ │ │ │ │ ├── StdMethodList.java │ │ │ │ │ └── package.html │ │ │ │ ├── command │ │ │ │ ├── DxConsole.java │ │ │ │ ├── Main.java │ │ │ │ ├── UsageException.java │ │ │ │ ├── annotool │ │ │ │ │ ├── AnnotationLister.java │ │ │ │ │ └── Main.java │ │ │ │ ├── dexer │ │ │ │ │ └── Main.java │ │ │ │ └── dump │ │ │ │ │ ├── Args.java │ │ │ │ │ ├── BaseDumper.java │ │ │ │ │ ├── BlockDumper.java │ │ │ │ │ ├── ClassDumper.java │ │ │ │ │ ├── DotDumper.java │ │ │ │ │ ├── Main.java │ │ │ │ │ └── SsaDumper.java │ │ │ │ ├── dex │ │ │ │ ├── cf │ │ │ │ │ ├── AttributeTranslator.java │ │ │ │ │ ├── CfOptions.java │ │ │ │ │ ├── CfTranslator.java │ │ │ │ │ ├── CodeStatistics.java │ │ │ │ │ ├── OptimizerOptions.java │ │ │ │ │ └── package.html │ │ │ │ ├── code │ │ │ │ │ ├── ArrayData.java │ │ │ │ │ ├── BlockAddresses.java │ │ │ │ │ ├── CatchBuilder.java │ │ │ │ │ ├── CatchHandlerList.java │ │ │ │ │ ├── CatchTable.java │ │ │ │ │ ├── CodeAddress.java │ │ │ │ │ ├── CstInsn.java │ │ │ │ │ ├── DalvCode.java │ │ │ │ │ ├── DalvInsn.java │ │ │ │ │ ├── DalvInsnList.java │ │ │ │ │ ├── DalvOps.java │ │ │ │ │ ├── Dop.java │ │ │ │ │ ├── Dops.java │ │ │ │ │ ├── FixedSizeInsn.java │ │ │ │ │ ├── HighRegisterPrefix.java │ │ │ │ │ ├── InsnFormat.java │ │ │ │ │ ├── LocalEnd.java │ │ │ │ │ ├── LocalList.java │ │ │ │ │ ├── LocalSnapshot.java │ │ │ │ │ ├── LocalStart.java │ │ │ │ │ ├── OddSpacer.java │ │ │ │ │ ├── OutputCollector.java │ │ │ │ │ ├── OutputFinisher.java │ │ │ │ │ ├── PositionList.java │ │ │ │ │ ├── RopToDop.java │ │ │ │ │ ├── RopTranslator.java │ │ │ │ │ ├── SimpleInsn.java │ │ │ │ │ ├── StdCatchBuilder.java │ │ │ │ │ ├── SwitchData.java │ │ │ │ │ ├── TargetInsn.java │ │ │ │ │ ├── VariableSizeInsn.java │ │ │ │ │ ├── ZeroSizeInsn.java │ │ │ │ │ └── form │ │ │ │ │ │ ├── Form10t.java │ │ │ │ │ │ ├── Form10x.java │ │ │ │ │ │ ├── Form11n.java │ │ │ │ │ │ ├── Form11x.java │ │ │ │ │ │ ├── Form12x.java │ │ │ │ │ │ ├── Form20t.java │ │ │ │ │ │ ├── Form21c.java │ │ │ │ │ │ ├── Form21h.java │ │ │ │ │ │ ├── Form21s.java │ │ │ │ │ │ ├── Form21t.java │ │ │ │ │ │ ├── Form22b.java │ │ │ │ │ │ ├── Form22c.java │ │ │ │ │ │ ├── Form22s.java │ │ │ │ │ │ ├── Form22t.java │ │ │ │ │ │ ├── Form22x.java │ │ │ │ │ │ ├── Form23x.java │ │ │ │ │ │ ├── Form30t.java │ │ │ │ │ │ ├── Form31c.java │ │ │ │ │ │ ├── Form31i.java │ │ │ │ │ │ ├── Form31t.java │ │ │ │ │ │ ├── Form32x.java │ │ │ │ │ │ ├── Form35c.java │ │ │ │ │ │ ├── Form3rc.java │ │ │ │ │ │ ├── Form51l.java │ │ │ │ │ │ └── SpecialFormat.java │ │ │ │ └── file │ │ │ │ │ ├── AnnotationItem.java │ │ │ │ │ ├── AnnotationSetItem.java │ │ │ │ │ ├── AnnotationSetRefItem.java │ │ │ │ │ ├── AnnotationUtils.java │ │ │ │ │ ├── AnnotationsDirectoryItem.java │ │ │ │ │ ├── CatchStructs.java │ │ │ │ │ ├── ClassDataItem.java │ │ │ │ │ ├── ClassDefItem.java │ │ │ │ │ ├── ClassDefsSection.java │ │ │ │ │ ├── CodeItem.java │ │ │ │ │ ├── DebugInfoConstants.java │ │ │ │ │ ├── DebugInfoDecoder.java │ │ │ │ │ ├── DebugInfoEncoder.java │ │ │ │ │ ├── DebugInfoItem.java │ │ │ │ │ ├── DexFile.java │ │ │ │ │ ├── EncodedArrayItem.java │ │ │ │ │ ├── EncodedField.java │ │ │ │ │ ├── EncodedMember.java │ │ │ │ │ ├── EncodedMethod.java │ │ │ │ │ ├── FieldAnnotationStruct.java │ │ │ │ │ ├── FieldIdItem.java │ │ │ │ │ ├── FieldIdsSection.java │ │ │ │ │ ├── HeaderItem.java │ │ │ │ │ ├── HeaderSection.java │ │ │ │ │ ├── IdItem.java │ │ │ │ │ ├── IndexedItem.java │ │ │ │ │ ├── Item.java │ │ │ │ │ ├── ItemType.java │ │ │ │ │ ├── MapItem.java │ │ │ │ │ ├── MemberIdItem.java │ │ │ │ │ ├── MemberIdsSection.java │ │ │ │ │ ├── MethodAnnotationStruct.java │ │ │ │ │ ├── MethodIdItem.java │ │ │ │ │ ├── MethodIdsSection.java │ │ │ │ │ ├── MixedItemSection.java │ │ │ │ │ ├── OffsettedItem.java │ │ │ │ │ ├── ParameterAnnotationStruct.java │ │ │ │ │ ├── ProtoIdItem.java │ │ │ │ │ ├── ProtoIdsSection.java │ │ │ │ │ ├── Section.java │ │ │ │ │ ├── Statistics.java │ │ │ │ │ ├── StringDataItem.java │ │ │ │ │ ├── StringIdItem.java │ │ │ │ │ ├── StringIdsSection.java │ │ │ │ │ ├── TypeIdItem.java │ │ │ │ │ ├── TypeIdsSection.java │ │ │ │ │ ├── TypeListItem.java │ │ │ │ │ ├── UniformItemSection.java │ │ │ │ │ ├── UniformListItem.java │ │ │ │ │ └── ValueEncoder.java │ │ │ │ ├── rop │ │ │ │ ├── annotation │ │ │ │ │ ├── Annotation.java │ │ │ │ │ ├── AnnotationVisibility.java │ │ │ │ │ ├── Annotations.java │ │ │ │ │ ├── AnnotationsList.java │ │ │ │ │ └── NameValuePair.java │ │ │ │ ├── code │ │ │ │ │ ├── AccessFlags.java │ │ │ │ │ ├── BasicBlock.java │ │ │ │ │ ├── BasicBlockList.java │ │ │ │ │ ├── ConservativeTranslationAdvice.java │ │ │ │ │ ├── CstInsn.java │ │ │ │ │ ├── DexTranslationAdvice.java │ │ │ │ │ ├── Exceptions.java │ │ │ │ │ ├── FillArrayDataInsn.java │ │ │ │ │ ├── Insn.java │ │ │ │ │ ├── InsnList.java │ │ │ │ │ ├── LocalItem.java │ │ │ │ │ ├── LocalVariableExtractor.java │ │ │ │ │ ├── LocalVariableInfo.java │ │ │ │ │ ├── PlainCstInsn.java │ │ │ │ │ ├── PlainInsn.java │ │ │ │ │ ├── RegOps.java │ │ │ │ │ ├── RegisterSpec.java │ │ │ │ │ ├── RegisterSpecList.java │ │ │ │ │ ├── RegisterSpecSet.java │ │ │ │ │ ├── Rop.java │ │ │ │ │ ├── RopMethod.java │ │ │ │ │ ├── Rops.java │ │ │ │ │ ├── SourcePosition.java │ │ │ │ │ ├── SwitchInsn.java │ │ │ │ │ ├── ThrowingCstInsn.java │ │ │ │ │ ├── ThrowingInsn.java │ │ │ │ │ ├── TranslationAdvice.java │ │ │ │ │ └── package.html │ │ │ │ ├── cst │ │ │ │ │ ├── Constant.java │ │ │ │ │ ├── ConstantPool.java │ │ │ │ │ ├── CstAnnotation.java │ │ │ │ │ ├── CstArray.java │ │ │ │ │ ├── CstBaseMethodRef.java │ │ │ │ │ ├── CstBoolean.java │ │ │ │ │ ├── CstByte.java │ │ │ │ │ ├── CstChar.java │ │ │ │ │ ├── CstDouble.java │ │ │ │ │ ├── CstEnumRef.java │ │ │ │ │ ├── CstFieldRef.java │ │ │ │ │ ├── CstFloat.java │ │ │ │ │ ├── CstInteger.java │ │ │ │ │ ├── CstInterfaceMethodRef.java │ │ │ │ │ ├── CstKnownNull.java │ │ │ │ │ ├── CstLiteral32.java │ │ │ │ │ ├── CstLiteral64.java │ │ │ │ │ ├── CstLiteralBits.java │ │ │ │ │ ├── CstLong.java │ │ │ │ │ ├── CstMemberRef.java │ │ │ │ │ ├── CstMethodRef.java │ │ │ │ │ ├── CstNat.java │ │ │ │ │ ├── CstShort.java │ │ │ │ │ ├── CstString.java │ │ │ │ │ ├── CstType.java │ │ │ │ │ ├── CstUtf8.java │ │ │ │ │ ├── StdConstantPool.java │ │ │ │ │ ├── TypedConstant.java │ │ │ │ │ ├── Zeroes.java │ │ │ │ │ └── package.html │ │ │ │ ├── package-info.java │ │ │ │ └── type │ │ │ │ │ ├── Prototype.java │ │ │ │ │ ├── StdTypeList.java │ │ │ │ │ ├── Type.java │ │ │ │ │ ├── TypeBearer.java │ │ │ │ │ ├── TypeList.java │ │ │ │ │ └── package.html │ │ │ │ ├── ssa │ │ │ │ ├── BasicRegisterMapper.java │ │ │ │ ├── ConstCollector.java │ │ │ │ ├── DeadCodeRemover.java │ │ │ │ ├── DomFront.java │ │ │ │ ├── Dominators.java │ │ │ │ ├── InterferenceRegisterMapper.java │ │ │ │ ├── LiteralOpUpgrader.java │ │ │ │ ├── LocalVariableExtractor.java │ │ │ │ ├── LocalVariableInfo.java │ │ │ │ ├── MoveParamCombiner.java │ │ │ │ ├── NormalSsaInsn.java │ │ │ │ ├── Optimizer.java │ │ │ │ ├── PhiInsn.java │ │ │ │ ├── PhiTypeResolver.java │ │ │ │ ├── RegisterMapper.java │ │ │ │ ├── SCCP.java │ │ │ │ ├── SetFactory.java │ │ │ │ ├── SsaBasicBlock.java │ │ │ │ ├── SsaConverter.java │ │ │ │ ├── SsaInsn.java │ │ │ │ ├── SsaMethod.java │ │ │ │ ├── SsaRenamer.java │ │ │ │ ├── _tests │ │ │ │ │ └── _DomFront.java │ │ │ │ ├── back │ │ │ │ │ ├── FirstFitAllocator.java │ │ │ │ │ ├── FirstFitLocalCombiningAllocator.java │ │ │ │ │ ├── IdenticalBlockCombiner.java │ │ │ │ │ ├── InterferenceGraph.java │ │ │ │ │ ├── LivenessAnalyzer.java │ │ │ │ │ ├── NullRegisterAllocator.java │ │ │ │ │ ├── RegisterAllocator.java │ │ │ │ │ └── SsaToRop.java │ │ │ │ └── package-info.java │ │ │ │ └── util │ │ │ │ ├── AnnotatedOutput.java │ │ │ │ ├── BitIntSet.java │ │ │ │ ├── Bits.java │ │ │ │ ├── ByteArray.java │ │ │ │ ├── ByteArrayAnnotatedOutput.java │ │ │ │ ├── ExceptionWithContext.java │ │ │ │ ├── FileUtils.java │ │ │ │ ├── FixedSizeList.java │ │ │ │ ├── Hex.java │ │ │ │ ├── HexParser.java │ │ │ │ ├── IndentingWriter.java │ │ │ │ ├── IntIterator.java │ │ │ │ ├── IntList.java │ │ │ │ ├── IntSet.java │ │ │ │ ├── LabeledItem.java │ │ │ │ ├── LabeledList.java │ │ │ │ ├── Leb128Utils.java │ │ │ │ ├── ListIntSet.java │ │ │ │ ├── MutabilityControl.java │ │ │ │ ├── MutabilityException.java │ │ │ │ ├── Output.java │ │ │ │ ├── ToHuman.java │ │ │ │ ├── TwoColumnOutput.java │ │ │ │ ├── Warning.java │ │ │ │ ├── Writers.java │ │ │ │ ├── _tests │ │ │ │ ├── _BitIntSet.java │ │ │ │ ├── _Bits.java │ │ │ │ ├── _IntList.java │ │ │ │ └── _ListIntSet.java │ │ │ │ └── package.html │ │ └── sun │ │ │ ├── source │ │ │ ├── tree │ │ │ │ ├── AnnotationTree.java │ │ │ │ ├── ArrayAccessTree.java │ │ │ │ ├── ArrayTypeTree.java │ │ │ │ ├── AssertTree.java │ │ │ │ ├── AssignmentTree.java │ │ │ │ ├── BinaryTree.java │ │ │ │ ├── BlockTree.java │ │ │ │ ├── BreakTree.java │ │ │ │ ├── CaseTree.java │ │ │ │ ├── CatchTree.java │ │ │ │ ├── ClassTree.java │ │ │ │ ├── CompilationUnitTree.java │ │ │ │ ├── CompoundAssignmentTree.java │ │ │ │ ├── ConditionalExpressionTree.java │ │ │ │ ├── ContinueTree.java │ │ │ │ ├── DoWhileLoopTree.java │ │ │ │ ├── EmptyStatementTree.java │ │ │ │ ├── EnhancedForLoopTree.java │ │ │ │ ├── ErroneousTree.java │ │ │ │ ├── ExpressionStatementTree.java │ │ │ │ ├── ExpressionTree.java │ │ │ │ ├── ForLoopTree.java │ │ │ │ ├── IdentifierTree.java │ │ │ │ ├── IfTree.java │ │ │ │ ├── ImportTree.java │ │ │ │ ├── InstanceOfTree.java │ │ │ │ ├── LabeledStatementTree.java │ │ │ │ ├── LineMap.java │ │ │ │ ├── LiteralTree.java │ │ │ │ ├── MemberSelectTree.java │ │ │ │ ├── MethodInvocationTree.java │ │ │ │ ├── MethodTree.java │ │ │ │ ├── ModifiersTree.java │ │ │ │ ├── NewArrayTree.java │ │ │ │ ├── NewClassTree.java │ │ │ │ ├── ParameterizedTypeTree.java │ │ │ │ ├── ParenthesizedTree.java │ │ │ │ ├── PrimitiveTypeTree.java │ │ │ │ ├── ReturnTree.java │ │ │ │ ├── Scope.java │ │ │ │ ├── StatementTree.java │ │ │ │ ├── SwitchTree.java │ │ │ │ ├── SynchronizedTree.java │ │ │ │ ├── ThrowTree.java │ │ │ │ ├── Tree.java │ │ │ │ ├── TreeVisitor.java │ │ │ │ ├── TryTree.java │ │ │ │ ├── TypeCastTree.java │ │ │ │ ├── TypeParameterTree.java │ │ │ │ ├── UnaryTree.java │ │ │ │ ├── VariableTree.java │ │ │ │ ├── WhileLoopTree.java │ │ │ │ ├── WildcardTree.java │ │ │ │ └── package-info.java │ │ │ └── util │ │ │ │ ├── JavacTask.java │ │ │ │ ├── SimpleTreeVisitor.java │ │ │ │ ├── SourcePositions.java │ │ │ │ ├── TaskEvent.java │ │ │ │ ├── TaskListener.java │ │ │ │ ├── TreePath.java │ │ │ │ ├── TreePathScanner.java │ │ │ │ ├── TreeScanner.java │ │ │ │ ├── Trees.java │ │ │ │ └── package-info.java │ │ │ └── tools │ │ │ └── javac │ │ │ ├── Launcher.java │ │ │ ├── Main.java │ │ │ ├── Server.java │ │ │ ├── api │ │ │ ├── JavacScope.java │ │ │ ├── JavacTaskImpl.java │ │ │ ├── JavacTool.java │ │ │ ├── JavacTrees.java │ │ │ └── WrappingJavaFileManager.java │ │ │ ├── code │ │ │ ├── Attribute.java │ │ │ ├── BoundKind.java │ │ │ ├── Flags.java │ │ │ ├── Kinds.java │ │ │ ├── Lint.java │ │ │ ├── Scope.java │ │ │ ├── Source.java │ │ │ ├── Symbol.java │ │ │ ├── Symtab.java │ │ │ ├── Type.java │ │ │ ├── TypeTags.java │ │ │ └── Types.java │ │ │ ├── comp │ │ │ ├── Annotate.java │ │ │ ├── Attr.java │ │ │ ├── AttrContext.java │ │ │ ├── AttrContextEnv.java │ │ │ ├── Check.java │ │ │ ├── ConstFold.java │ │ │ ├── Enter.java │ │ │ ├── Env.java │ │ │ ├── Flow.java │ │ │ ├── Infer.java │ │ │ ├── Lower.java │ │ │ ├── MemberEnter.java │ │ │ ├── Resolve.java │ │ │ ├── Todo.java │ │ │ └── TransTypes.java │ │ │ ├── file │ │ │ ├── BaseFileObject.java │ │ │ ├── CacheFSInfo.java │ │ │ ├── FSInfo.java │ │ │ ├── JavacFileManager.java │ │ │ ├── Paths.java │ │ │ ├── RegularFileObject.java │ │ │ ├── RelativePath.java │ │ │ ├── SymbolArchive.java │ │ │ ├── ZipArchive.java │ │ │ ├── ZipFileIndex.java │ │ │ └── ZipFileIndexArchive.java │ │ │ ├── jvm │ │ │ ├── ByteCodes.java │ │ │ ├── CRTFlags.java │ │ │ ├── CRTable.java │ │ │ ├── ClassFile.java │ │ │ ├── ClassReader.java │ │ │ ├── ClassWriter.java │ │ │ ├── Code.java │ │ │ ├── Gen.java │ │ │ ├── Items.java │ │ │ ├── Pool.java │ │ │ ├── Target.java │ │ │ └── UninitializedType.java │ │ │ ├── main │ │ │ ├── CommandLine.java │ │ │ ├── JavaCompiler.java │ │ │ ├── JavacOption.java │ │ │ ├── Main.java │ │ │ ├── OptionName.java │ │ │ └── RecognizedOptions.java │ │ │ ├── model │ │ │ ├── AnnotationProxyMaker.java │ │ │ ├── FilteredMemberList.java │ │ │ ├── JavacElements.java │ │ │ ├── JavacSourcePosition.java │ │ │ └── JavacTypes.java │ │ │ ├── parser │ │ │ ├── DocCommentScanner.java │ │ │ ├── EndPosParser.java │ │ │ ├── Keywords.java │ │ │ ├── Lexer.java │ │ │ ├── Parser.java │ │ │ ├── Scanner.java │ │ │ └── Token.java │ │ │ ├── processing │ │ │ ├── AnnotationProcessingError.java │ │ │ ├── JavacFiler.java │ │ │ ├── JavacMessager.java │ │ │ ├── JavacProcessingEnvironment.java │ │ │ ├── JavacRoundEnvironment.java │ │ │ ├── PrintingProcessor.java │ │ │ └── ServiceProxy.java │ │ │ ├── resources │ │ │ ├── compiler.properties │ │ │ ├── compiler_ja.properties │ │ │ ├── compiler_zh_CN.properties │ │ │ ├── javac.properties │ │ │ ├── javac_ja.properties │ │ │ ├── javac_zh_CN.properties │ │ │ ├── legacy.properties │ │ │ ├── version.properties │ │ │ └── version.properties-template │ │ │ ├── services │ │ │ └── javax.tools.JavaCompilerTool │ │ │ ├── sym │ │ │ └── CreateSymbols.java │ │ │ ├── tree │ │ │ ├── JCTree.java │ │ │ ├── Pretty.java │ │ │ ├── TreeCopier.java │ │ │ ├── TreeInfo.java │ │ │ ├── TreeMaker.java │ │ │ ├── TreeScanner.java │ │ │ └── TreeTranslator.java │ │ │ └── util │ │ │ ├── Abort.java │ │ │ ├── BaseFileManager.java │ │ │ ├── Bits.java │ │ │ ├── ByteBuffer.java │ │ │ ├── ClientCodeException.java │ │ │ ├── CloseableURLClassLoader.java │ │ │ ├── Constants.java │ │ │ ├── Context.java │ │ │ ├── Convert.java │ │ │ ├── DiagnosticFormatter.java │ │ │ ├── FatalError.java │ │ │ ├── JCDiagnostic.java │ │ │ ├── LayoutCharacters.java │ │ │ ├── List.java │ │ │ ├── ListBuffer.java │ │ │ ├── Log.java │ │ │ ├── MandatoryWarningHandler.java │ │ │ ├── Messages.java │ │ │ ├── Name.java │ │ │ ├── Options.java │ │ │ ├── Pair.java │ │ │ ├── Position.java │ │ │ ├── PropagatedException.java │ │ │ └── Warner.java │ │ └── javax │ │ ├── annotation │ │ └── processing │ │ │ ├── AbstractProcessor.java │ │ │ ├── Completion.java │ │ │ ├── Completions.java │ │ │ ├── Filer.java │ │ │ ├── FilerException.java │ │ │ ├── Messager.java │ │ │ ├── ProcessingEnvironment.java │ │ │ ├── Processor.java │ │ │ ├── RoundEnvironment.java │ │ │ ├── SupportedAnnotationTypes.java │ │ │ ├── SupportedOptions.java │ │ │ ├── SupportedSourceVersion.java │ │ │ └── package-info.java │ │ ├── lang │ │ └── model │ │ │ ├── SourceVersion.java │ │ │ ├── element │ │ │ ├── AnnotationMirror.java │ │ │ ├── AnnotationValue.java │ │ │ ├── AnnotationValueVisitor.java │ │ │ ├── Element.java │ │ │ ├── ElementKind.java │ │ │ ├── ElementVisitor.java │ │ │ ├── ExecutableElement.java │ │ │ ├── Modifier.java │ │ │ ├── Name.java │ │ │ ├── NestingKind.java │ │ │ ├── PackageElement.java │ │ │ ├── TypeElement.java │ │ │ ├── TypeParameterElement.java │ │ │ ├── UnknownAnnotationValueException.java │ │ │ ├── UnknownElementException.java │ │ │ ├── VariableElement.java │ │ │ └── package-info.java │ │ │ ├── overview.html │ │ │ ├── package-info.java │ │ │ ├── type │ │ │ ├── ArrayType.java │ │ │ ├── DeclaredType.java │ │ │ ├── ErrorType.java │ │ │ ├── ExecutableType.java │ │ │ ├── MirroredTypeException.java │ │ │ ├── MirroredTypesException.java │ │ │ ├── NoType.java │ │ │ ├── NullType.java │ │ │ ├── PrimitiveType.java │ │ │ ├── ReferenceType.java │ │ │ ├── TypeKind.java │ │ │ ├── TypeMirror.java │ │ │ ├── TypeVariable.java │ │ │ ├── TypeVisitor.java │ │ │ ├── UnknownTypeException.java │ │ │ ├── WildcardType.java │ │ │ └── package-info.java │ │ │ └── util │ │ │ ├── AbstractAnnotationValueVisitor6.java │ │ │ ├── AbstractElementVisitor6.java │ │ │ ├── AbstractTypeVisitor6.java │ │ │ ├── ElementFilter.java │ │ │ ├── ElementKindVisitor6.java │ │ │ ├── ElementScanner6.java │ │ │ ├── Elements.java │ │ │ ├── SimpleAnnotationValueVisitor6.java │ │ │ ├── SimpleElementVisitor6.java │ │ │ ├── SimpleTypeVisitor6.java │ │ │ ├── TypeKindVisitor6.java │ │ │ ├── Types.java │ │ │ └── package-info.java │ │ └── tools │ │ ├── Diagnostic.java │ │ ├── DiagnosticCollector.java │ │ ├── DiagnosticListener.java │ │ ├── FileObject.java │ │ ├── ForwardingFileObject.java │ │ ├── ForwardingJavaFileManager.java │ │ ├── ForwardingJavaFileObject.java │ │ ├── JavaCompiler.java │ │ ├── JavaFileManager.java │ │ ├── JavaFileObject.java │ │ ├── OptionChecker.java │ │ ├── SimpleJavaFileObject.java │ │ ├── StandardJavaFileManager.java │ │ ├── StandardLocation.java │ │ ├── Tool.java │ │ ├── ToolProvider.java │ │ ├── overview.html │ │ └── package-info.java ├── kbox-login │ ├── build.sh │ ├── control │ └── packageinfo.html ├── kcalc │ ├── build.sh │ ├── control │ └── packageinfo.html ├── kcrypt │ ├── build.sh │ ├── control │ └── packageinfo.html ├── lftp │ ├── BROKEN │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_Resolver.cc │ ├── patch_config.h │ └── patch_nl_langinfo.c ├── libevent │ ├── build.sh │ └── patch_evutil_rand.c ├── lynx │ ├── build.sh │ ├── conftest │ ├── control │ └── packageinfo.html ├── make │ ├── build.sh │ ├── control │ ├── current │ └── packageinfo.html ├── mc │ ├── BROKEN │ ├── build.sh │ ├── patch_cons.hander.c │ ├── patch_editcmd.c │ └── patch_filegui.c ├── nano │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_config.h │ └── patch_configure ├── ncurses │ ├── build.sh │ ├── build.sh.orig │ ├── control │ ├── linux │ └── packageinfo.html ├── nmap │ └── packageinfo.html ├── openssl │ ├── build.sh │ ├── control │ └── packageinfo.html ├── perl │ ├── build.sh │ ├── control │ └── packageinfo.html ├── python3 │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_posixmodule.c │ ├── patch_pwdmodule.c │ └── patch_pythonrun.c ├── readline │ ├── build.sh │ ├── control │ └── packageinfo.html ├── rsync │ ├── build.sh │ ├── control │ └── packageinfo.html ├── solunar_cmdline │ ├── build.sh │ ├── control │ └── packageinfo.html ├── tar │ ├── build.sh │ ├── control │ └── packageinfo.html ├── uconv │ ├── build.sh │ ├── control │ └── packageinfo.html ├── unrar │ ├── build.sh │ ├── control │ ├── packageinfo.html │ ├── patch_consio.cpp │ └── patch_ulinks.cpp ├── vifm │ ├── BROKEN │ ├── build.sh │ ├── control │ ├── patch_cmd_completion.c │ ├── patch_configure │ └── patch_utils_nix.c ├── vim │ ├── build.sh │ ├── control │ ├── packageinfo.html │ └── patch_mbyte.c ├── zip │ ├── build.sh │ ├── control │ ├── packageinfo.html │ └── patch_Makefile └── zsh │ ├── build.sh │ ├── control │ └── packageinfo.html └── scripts └── makewebsite.sh /TODO: -------------------------------------------------------------------------------- 1 | Bugs and missing features are now tracked on github: 2 | 3 | https://github.com/kbox4/source/issues 4 | -------------------------------------------------------------------------------- /base/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../env.sh 4 | 5 | BUILD_DIR=$STAGING/kbox4-base-installer 6 | 7 | (cd busybox; ./build.sh) 8 | if [[ $? -ne 0 ]] ; then 9 | echo busybox build failed ... stopping 10 | exit 1 11 | fi 12 | (cd kbox_shell; ./build.sh) 13 | if [[ $? -ne 0 ]] ; then 14 | echo kbox_shell build failed ... stopping 15 | exit 1 16 | fi 17 | (cd libfakechroot; ./build.sh) 18 | if [[ $? -ne 0 ]] ; then 19 | echo libfakechroot build failed ... stopping 20 | exit 1 21 | fi 22 | (cd unzip60; ./build.sh) 23 | if [[ $? -ne 0 ]] ; then 24 | echo unzip60 build failed ... stopping 25 | exit 1 26 | fi 27 | 28 | mkdir -p $BUILD_DIR 29 | 30 | mkdir -p $DIST 31 | ZIP=/tmp/kbox4-base-installer.zip 32 | TARGET=$DIST/kbox4-install-base-$DEB_ARCH 33 | 34 | cp installer/* $BUILD_DIR 35 | 36 | cp $STAGING/kbox_shell-0.0.1/kbox_shell $BUILD_DIR/ 37 | android-elf-cleaner $BUILD_DIR/kbox_shell 38 | 39 | cp $STAGING/fakechroot-2.16/libfakechroot.so $BUILD_DIR/ 40 | android-elf-cleaner $BUILD_DIR/libfakechroot.so 41 | 42 | cp $STAGING/busybox-1.26.2/busybox $BUILD_DIR/ 43 | android-elf-cleaner $BUILD_DIR/busybox 44 | 45 | (cd $STAGING; echo "\$AUTORUN\$>./kbox4-base-installer/install.sh" | zip -z -r $ZIP kbox4-base-installer) 46 | cat $STAGING/unzip60/unzipsfx $ZIP > $TARGET 47 | 48 | android-elf-cleaner $TARGET 49 | 50 | rm $ZIP 51 | 52 | -------------------------------------------------------------------------------- /base/busybox/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=busybox-1.26.2 4 | 5 | . ../../env.sh 6 | 7 | BUILD_DIR=$STAGING/$VERSION 8 | TARGET=$BUILD_DIR/busybox 9 | 10 | if [ -f $TARGET ]; then 11 | echo $TARGET exists -- delete it to rebuild 12 | exit 0; 13 | fi 14 | 15 | if [ ! -d $BUILD_DIR ]; then 16 | mkdir -p $STAGING/tarballs 17 | TARBALL=$STAGING/tarballs/$VERSION.tar.bz2 18 | if [ ! -f $TARBALL ]; then 19 | echo "Downloading $VERSION" 20 | wget -O $TARBALL https://busybox.net/downloads/${VERSION}.tar.bz2 21 | else 22 | echo "Using cached $TARBALL" 23 | fi 24 | mkdir -p $STAGING 25 | (cd $STAGING; tar xfvj $TARBALL) 26 | else 27 | echo "Building cached $VERSION" 28 | fi 29 | 30 | cp config $BUILD_DIR/.config 31 | echo CONFIG_CROSS_COMPILER_PREFIX=\"$CC_PREFIX\" >> ${BUILD_DIR}/.config 32 | 33 | echo "Patching source" 34 | patch -R $BUILD_DIR/libbb/lineedit.c patch_lineedit.c 35 | patch -R $BUILD_DIR/coreutils/sync.c patch_sync.c 36 | 37 | echo "Running make" 38 | (cd $BUILD_DIR; make) 39 | -------------------------------------------------------------------------------- /base/busybox/patch_lineedit.c: -------------------------------------------------------------------------------- 1 | 683d682 2 | < #ifndef ANDROID 3 | 692c691 4 | < #endif 5 | --- 6 | > 7 | -------------------------------------------------------------------------------- /base/busybox/patch_sync.c: -------------------------------------------------------------------------------- 1 | 87,88c87 2 | < printf ("Warning: syncfs() is not implemented\n"); 3 | < //syncfs(fd); 4 | --- 5 | > syncfs(fd); 6 | -------------------------------------------------------------------------------- /base/installer/etc_profile: -------------------------------------------------------------------------------- 1 | # Customize environment here, if necessary 2 | 3 | HOME=/home/kbox 4 | PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/android_root/system/bin 5 | TERMINFO=/usr/share/terminfo 6 | MANPATH=/usr/share/man 7 | GROFF_FONT_PATH=/usr/share/groff/current/font 8 | GROFF_TMAC_PATH=/usr/share/groff/current/tmac 9 | TMPDIR=/tmp 10 | TERM=linux 11 | ANDROID_DATA=/data 12 | ANDROID_ROOT=/system 13 | PS1="\W\$ " 14 | 15 | export HOME PATH TERMINFO MANPATH GROFF_FONT_PATH GROFF_TMAC_PATH TMPDIR TERM PS1 ANDROID_DATA ANDROID_ROOT 16 | 17 | # Finish with 'cd'. This is a bug fix -- do not remove this line 18 | cd 19 | 20 | -------------------------------------------------------------------------------- /base/installer/install.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # This install.sh is auto-run when the self-extracting installer has finished. 3 | # It just starts busybox with the 'real' install script 4 | ./kbox4-base-installer/busybox bash -c ./kbox4-base-installer/install-using-busybox.sh 5 | 6 | -------------------------------------------------------------------------------- /base/kbox_shell/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=kbox_shell-0.0.1 4 | 5 | . ../../env.sh 6 | 7 | BUILD_DIR=$STAGING/$VERSION 8 | TARGET=$BUILD_DIR/kbox_shell 9 | 10 | if [ -f $TARGET ]; then 11 | echo $TARGET exists -- delete it to rebuild 12 | exit 0; 13 | fi 14 | 15 | mkdir -p $BUILD_DIR 16 | cp -pr src/* $BUILD_DIR 17 | 18 | echo "Running make" 19 | (cd $BUILD_DIR; make) 20 | -------------------------------------------------------------------------------- /base/kbox_shell/src/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(CC) -fpie -fpic -pie -s -o kbox_shell kbox_shell.c 3 | 4 | clean: 5 | rm -f kbox_shell 6 | -------------------------------------------------------------------------------- /base/libfakechroot/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=fakechroot-2.16 4 | . ../../env.sh 5 | 6 | BUILD_DIR=$STAGING/$VERSION 7 | TARGET=$BUILD_DIR/libfakechroot.so 8 | 9 | if [ -f $TARGET ]; then 10 | echo "$TARGET exists -- delete it to rebuild" 11 | exit 0; 12 | fi 13 | 14 | if [ ! -d $BUILD_DIR ]; then 15 | mkdir -p $STAGING/tarballs 16 | TARBALL=$STAGING/tarballs/$VERSION.tar.gz 17 | if [ ! -f $TARBALL ]; then 18 | echo "Downloading $VERSION" 19 | wget -O $TARBALL https://github.com/downloads/dex4er/fakechroot/${VERSION}.tar.gz 20 | else 21 | echo "Using cached $TARBALL" 22 | fi 23 | mkdir -p $STAGING 24 | (cd $STAGING; tar xfvz $TARBALL) 25 | else 26 | echo "Building cached $VERSION" 27 | fi 28 | 29 | (cd $BUILD_DIR; CC=$CC ./configure --host $CONFIG_HOST --build $CONFIG_BUILD) 30 | 31 | #echo "Patching source" 32 | patch -R $BUILD_DIR/config.h patch_config.h 33 | patch -R $BUILD_DIR/src/glob.c patch_glob.c 34 | patch -R $BUILD_DIR/src/libfakechroot.c patch_libfakechroot.c 35 | 36 | #echo "Running make" 37 | (cd $BUILD_DIR; make) 38 | 39 | #echo "Linking SO" 40 | (cd $BUILD_DIR; $CC -s -pie -shared -fPIC -o $TARGET -Wl,-soname,libfakechroot.so -Wl,--whole-archive $BUILD_DIR/src/.libs/libfakechroot.a -Wl,--no-whole-archive) 41 | 42 | -------------------------------------------------------------------------------- /base/libfakechroot/patch_config.h: -------------------------------------------------------------------------------- 1 | 236c236 2 | < //#define HAVE_FTW 1 3 | --- 4 | > #define HAVE_FTW 1 5 | 239c239 6 | < //#define HAVE_FTW64 1 7 | --- 8 | > #define HAVE_FTW64 1 9 | -------------------------------------------------------------------------------- /base/libfakechroot/patch_glob.c: -------------------------------------------------------------------------------- 1 | 20d19 2 | < #ifdef DUMMY_NOCOMPILE 3 | 56,58d54 4 | < 5 | < #endif 6 | < 7 | -------------------------------------------------------------------------------- /base/libfakechroot/patch_libfakechroot.c: -------------------------------------------------------------------------------- 1 | 82c82 2 | < exit(atoi(pointer)); 3 | --- 4 | > _Exit(atoi(pointer)); 5 | 122d121 6 | < #define NEW 7 | 125d123 8 | < #ifdef OLD 9 | 127c125 10 | < if (!(w->nextfunc = dlsym(RTLD_NEXT, w->name))) { 11 | --- 12 | > if (!(w->nextfunc = dlsym(RTLD_NEXT, w->name))) {; 13 | 132,140d129 14 | < return w->nextfunc; 15 | < #else 16 | < char *msg; 17 | < if (!(w->nextfunc = dlsym(strcmp(w->name, "dlopen")?RTLD_NEXT : RTLD_DEFAULT, w->name))) { 18 | < msg = dlerror(); 19 | < fprintf(stderr, "%s: %s: %s\n", PACKAGE, w->name, msg != NULL ? msg : "unresolved symbol"); 20 | < exit(EXIT_FAILURE); 21 | < } 22 | < #endif 23 | -------------------------------------------------------------------------------- /base/unzip60/README: -------------------------------------------------------------------------------- 1 | This directory contains a tarball of the unzip source code, which is unsatisfactory. 2 | However, later versions (that 2009) of unzip60 don't build using the Google Android 3 | NDK, because they require the iconv library. Conceivably we might base a build on the 4 | old MSDOS makefile or something like that, but it seemed an awful lot of work for 5 | a minor component of the system. 6 | -------------------------------------------------------------------------------- /base/unzip60/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=unzip60 4 | 5 | . ../../env.sh 6 | 7 | BUILD_DIR=$STAGING/$VERSION 8 | TARGET=$BUILD_DIR/unzipsfx 9 | 10 | if [ -f $TARGET ]; then 11 | echo $TARGET exists -- delete it to rebuild 12 | exit 0; 13 | fi 14 | 15 | CWD=`pwd` 16 | if [ ! -d $BUILD_DIR ]; then 17 | mkdir -p $STAGING/tarballs 18 | TARBALL=$STAGING/tarballs/$VERSION.zip 19 | if [ ! -f $TARBALL ]; then 20 | echo "Unpacking $VERSION" 21 | (cd $STAGING; pwd; unzip $CWD/unzip60.zip) 22 | else 23 | echo "Using cached $TARBALL" 24 | fi 25 | mkdir -p $STAGING 26 | (cd $STAGING; unzip $TARBALL) 27 | else 28 | echo "Building cached $VERSION" 29 | fi 30 | 31 | cp $BUILD_DIR/unix/Makefile $BUILD_DIR/Makefile 32 | 33 | echo "Running make" 34 | (cd $BUILD_DIR; LOCAL_UNZIP="-fpic -fpie -DCHEAP_SFX_AUTORUN" cc=$CC CC=$CC make generic) 35 | 36 | -------------------------------------------------------------------------------- /base/unzip60/unzip60.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kbox4/source/fe05a91b719f525e453e713468db7e084c7a27c1/base/unzip60/unzip60.zip -------------------------------------------------------------------------------- /docs/build_order.txt: -------------------------------------------------------------------------------- 1 | KBOX page build order 2 | 3 | Depenencies will be satisfied if the packages are built in the following order. 4 | Note that almost everything depends on ncurses, readline, and openssl. 5 | 6 | ncurses 7 | readline 8 | file 9 | vim 10 | openssl 11 | dropbear 12 | rsync 13 | curl 14 | solunar_cmdline 15 | andplay 16 | dbcmd 17 | kcalc 18 | kcrypt 19 | frotz 20 | glkterm (does not create a package, just builds a static library for glulxe) 21 | glulxe 22 | unrar 23 | make 24 | git 25 | gnuchess 26 | coreutils 27 | tar 28 | perl 29 | android-audio-sink 30 | espeak 31 | frobtads 32 | python 33 | zsh 34 | bash 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/prerequisites.txt: -------------------------------------------------------------------------------- 1 | Building the complete KBOX distribution requires a positively huge amount of software on 2 | the build machine. To make matters worse, some packages can only be built if the 3 | corresponding software _with the same version_ is present on the build machine. "file" 4 | and "python" (Python 3), at least, fall into this category -- they both bootstrap 5 | themselves using an existing installation. 6 | 7 | It is impossible to list the requirements for the build of every package, so here 8 | is the list for the complete system (so far as I am able to determine it); most 9 | of these have their own dependencies, which I haven't listed. 10 | 11 | flex 12 | bison 13 | curl 14 | wget 15 | makeinfo 16 | make 17 | a properly-configure Android NDK with stand-alone toolchain created 18 | perl 19 | xz 20 | file 21 | diff 22 | patch 23 | texinfo and its dependencies 24 | gcc/g++ (for the host machine. This is in addition to the NDK) 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/public_html/_bottom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/public_html/_top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KBOX -- Linux utilities for Android without rooting 6 | 7 | 8 | 9 | 10 |
11 | 12 | 29 | 30 |
31 | 32 |
33 | -------------------------------------------------------------------------------- /docs/public_html/kbox86_diary.html: -------------------------------------------------------------------------------- 1 | • Software  2 | • The KBOX86 project
3 |

4 | 5 | KBOX logo 6 |

KBOX86 development diary

7 |
8 |

9 | 10 |

April 2017

11 | 12 | 13 |

April 26

14 | 15 | I have finalled started work on a KBOX version for Android x86 (32-bit) 16 | systems. 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/public_html/kbox_downloads.html: -------------------------------------------------------------------------------- 1 |

Downloads

2 | 3 | Please read the installation page 4 | before downloading any of this software. 5 |

6 |

11 | -------------------------------------------------------------------------------- /docs/public_html/kbox_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kbox4/source/fe05a91b719f525e453e713468db7e084c7a27c1/docs/public_html/kbox_logo.gif -------------------------------------------------------------------------------- /docs/public_html/kbox_main.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | margin: 10px 0px 0px 0px; 4 | padding: 0 5 | } 6 | 7 | a {text-decoration: none} 8 | a:link {color: #00A080} 9 | a:visited{color: #00A080} 10 | a:active {color: red} 11 | a:hover {color: red} 12 | 13 | #page_text 14 | { 15 | padding-right: 10px; 16 | padding-left: 10px; 17 | } 18 | 19 | #menu 20 | { 21 | padding-left: 10px; 22 | padding-right: 50px; 23 | } 24 | 25 | 26 | .menucell 27 | { 28 | /*background-color: #EEEEEE; 29 | width: 12%; 30 | text-align: center; 31 | padding: 5px;*/ 32 | } 33 | 34 | @media only screen and (min-width: 630px) 35 | { 36 | #page_text_wrapper 37 | { 38 | /* 39 | margin: 0px 150px 0px 150px; 40 | padding: 1px 50px 50px 50px; 41 | background-color: white; 42 | border-left: 1px solid black; 43 | border-right: 1px solid black; 44 | */ 45 | float: left; 46 | width: 700px; 47 | 48 | } 49 | 50 | #menu_wrapper 51 | { 52 | float: left; 53 | width: 160px; 54 | } 55 | } 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /env.sh: -------------------------------------------------------------------------------- 1 | # Android NDK instalation directory and related bits 2 | # Stand-alone toolchain 3 | NDK=/home/kevin/lib/android-14-toolchain-x86/ 4 | 5 | # Full NDK installation directory 6 | NDK_HOME=/home/kevin/lib/android-ndk-r14b 7 | 8 | # Ordinary (Java-based) Android SDK 9 | ANDROID_SDK=/home/kevin/lib/android-sdk-linux 10 | # The version of the builds tools under the SDK build-tools directory 11 | SDK_BUILD_TOOLS_VERSION=19.0.1 12 | 13 | SYSROOT=$NDK/sysroot/ 14 | ANDROID_PLATFORM_NAME=i686-linux-android 15 | ANDROID_PLATFORM_DIR=$NDK_HOME/platforms/android-16/arch-x86 16 | CC_PREFIX=${NDK}/bin/i686-linux-android- 17 | 18 | # Utilities in the android NDK toolchain -- it should not be necessary 19 | # to change these 20 | CC=${CC_PREFIX}gcc 21 | CXX=${CC_PREFIX}g++ 22 | STRIP=${CC_PREFIX}strip 23 | 24 | # Specify the staging directory, where downloadeds will be unpacked and processed 25 | STAGING=/home/kevin/lib/kbox4_staging/i686 26 | 27 | # Where to put the built binaries and packages 28 | DIST=/home/kevin/lib/kbox4_dist/ 29 | 30 | # The value of the "arch" attribute, to put in .deb packages, etc. Not used 31 | # in build configuration (see CONFIG_HOST) 32 | DEB_ARCH=i686 33 | 34 | # These settings are passed as the --host and --build switches of configure scripts 35 | # Some configure scripts need a long host (which is to say, target) name, and some a 36 | # short one -- there doesn't seem to be much consistency here. 37 | CONFIG_HOST=i686 38 | CONFIG_FULLHOST=i686-linux-android 39 | CONFIG_BUILD=i686 40 | 41 | export CC 42 | -------------------------------------------------------------------------------- /env_arm.sh: -------------------------------------------------------------------------------- 1 | # Android NDK instalation directory and related bits 2 | # Stand-alone toolchain 3 | NDK=/home/kevin/lib/android-14-toolchain-arm/ 4 | 5 | # Full NDK installation directory 6 | NDK_HOME=/home/kevin/lib/android-ndk-r14b 7 | 8 | # Ordinary (Java-based) Android SDK 9 | ANDROID_SDK=/home/kevin/lib/android-sdk-linux 10 | # The version of the builds tools under the SDK build-tools directory 11 | SDK_BUILD_TOOLS_VERSION=19.0.1 12 | 13 | SYSROOT=$NDK/sysroot/ 14 | ANDROID_PLATFORM_NAME=arm-linux-androideabi 15 | ANDROID_PLATFORM_DIR=$NDK/platforms/android-16/arch-arm 16 | CC_PREFIX=${NDK}/bin/arm-linux-androideabi- 17 | 18 | # Utilities in the android NDK toolchain -- it should not be necessary 19 | # to change these 20 | CC=${CC_PREFIX}gcc 21 | CXX=${CC_PREFIX}g++ 22 | STRIP=${CC_PREFIX}strip 23 | 24 | # Specify the staging directory, where downloadeds will be unpacked and processed 25 | STAGING=/home/kevin/lib/kbox4_staging/ 26 | 27 | # Where to put the built binaries and packages 28 | DIST=/home/kevin/lib/kbox4_dist/ 29 | 30 | # The value of the "arch" attribute, to put in .deb packages, etc. Not used 31 | # in build configuration (see CONFIG_HOST) 32 | DEB_ARCH=arm 33 | 34 | # These settings are passed as the --host and --build switches of configure scripts 35 | # Some configure scripts need a long host (which is to say, target) name, and some a 36 | # short one -- there doesn't seem to be much consistency here. 37 | CONFIG_HOST=arm 38 | CONFIG_FULLHOST=arm-linux-androideabi 39 | CONFIG_BUILD=i686 40 | 41 | export CC 42 | -------------------------------------------------------------------------------- /env_i686.sh: -------------------------------------------------------------------------------- 1 | # Android NDK instalation directory and related bits 2 | # Stand-alone toolchain 3 | NDK=/home/kevin/lib/android-14-toolchain-x86/ 4 | 5 | # Full NDK installation directory 6 | NDK_HOME=/home/kevin/lib/android-ndk-r14b 7 | 8 | # Ordinary (Java-based) Android SDK 9 | ANDROID_SDK=/home/kevin/lib/android-sdk-linux 10 | # The version of the builds tools under the SDK build-tools directory 11 | SDK_BUILD_TOOLS_VERSION=19.0.1 12 | 13 | SYSROOT=$NDK/sysroot/ 14 | ANDROID_PLATFORM_NAME=i686-linux-android 15 | ANDROID_PLATFORM_DIR=$NDK_HOME/platforms/android-16/arch-x86 16 | CC_PREFIX=${NDK}/bin/i686-linux-android- 17 | 18 | # Utilities in the android NDK toolchain -- it should not be necessary 19 | # to change these 20 | CC=${CC_PREFIX}gcc 21 | CXX=${CC_PREFIX}g++ 22 | STRIP=${CC_PREFIX}strip 23 | 24 | # Specify the staging directory, where downloadeds will be unpacked and processed 25 | STAGING=/home/kevin/lib/kbox4_staging/i686 26 | 27 | # Where to put the built binaries and packages 28 | DIST=/home/kevin/lib/kbox4_dist/ 29 | 30 | # The value of the "arch" attribute, to put in .deb packages, etc. Not used 31 | # in build configuration (see CONFIG_HOST) 32 | DEB_ARCH=i686 33 | 34 | # These settings are passed as the --host and --build switches of configure scripts 35 | # Some configure scripts need a long host (which is to say, target) name, and some a 36 | # short one -- there doesn't seem to be much consistency here. 37 | CONFIG_HOST=i686 38 | CONFIG_FULLHOST=i686-linux-android 39 | CONFIG_BUILD=i686 40 | 41 | export CC 42 | -------------------------------------------------------------------------------- /misc/kpkg-help.txt: -------------------------------------------------------------------------------- 1 | * Install: 2 | 3 | - cp `kpkg` in /bin with exec perm 4 | - cp `sources` in etc 5 | 6 | * Usage: (kpkg --help) 7 | 8 | /bin/kpkg CMD PATTERN 9 | CMD: 10 | -l list remote package in /etc/sources 11 | -d download remote package 12 | -c Resume interrupted download 13 | -i download and install remote package 14 | /bin/kpkg CMD PACKAGE.deb 15 | CMD: 16 | -i install PACKAGE.deb 17 | -u unpack PACKAGE.deb to PACKAGE/ folder 18 | /bin/kpkg CMD FOLDER 19 | CMD: 20 | -n create package tree in FOLDER/ 21 | -s sync FOLDER/data with installed files 22 | -p pack FOLDER/ to FOLDER.deb 23 | -------------------------------------------------------------------------------- /packages/andplay/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=0.0.3 4 | VVERSION=$VERSION 5 | SUFFIX=tar.gz 6 | NAME=andplay 7 | DOWNLOAD_URL=https://github.com/kevinboone/andplay/archive/$VVERSION.$SUFFIX 8 | 9 | . ../../env.sh 10 | 11 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 12 | TARGET=$BUILD_DIR/$NAME 13 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 14 | 15 | if [ -f $DEB ]; then 16 | echo $DEB exists -- delete it to rebuild 17 | exit 0; 18 | fi 19 | 20 | if [ ! -d $BUILD_DIR ]; then 21 | mkdir -p $STAGING/tarballs 22 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 23 | if [ ! -f $TARBALL ]; then 24 | echo "Downloading $VERSION" 25 | wget -O $TARBALL $DOWNLOAD_URL 26 | else 27 | echo "Using cached $TARBALL" 28 | fi 29 | mkdir -p $STAGING 30 | (cd $STAGING; tar xfvz $TARBALL) 31 | else 32 | echo "Building cached $NAME-$VERSION" 33 | fi 34 | 35 | echo "Running make" 36 | 37 | mkdir -p $BUILD_DIR/image/ 38 | 39 | (cd $BUILD_DIR; make CC=$CC DESTDIR=`pwd`/image all install) 40 | 41 | 42 | echo "Building package" 43 | mkdir -p $BUILD_DIR/out 44 | 45 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 46 | 47 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 48 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 49 | echo "2.0" > $BUILD_DIR/out/debian-binary 50 | rm -f $DEB 51 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 52 | cp -p $DEB $DIST/ 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /packages/andplay/control: -------------------------------------------------------------------------------- 1 | Package: andplay 2 | Version: %VERSION% 3 | Section: media 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A command-line audio player. 8 | -------------------------------------------------------------------------------- /packages/andplay/packageinfo.html: -------------------------------------------------------------------------------- 1 | andplay is a command-line audio player for Android. It was developed for 2 | use with the KBOX 3 | command-line environment, but should work with plain Android as well. 4 |

5 | andplay is really just a way to invoke Android's built-in media player, 6 | but from the command line. It will only play audio, but 7 | -- and this is probably the one thing it might actually be usful for 8 | -- it will play the audio soundtracks from video files. 9 |

10 | To use andplay, just specify one or more files on the command line. 11 | 12 | -------------------------------------------------------------------------------- /packages/android-audio-sink/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #https://github.com/kevinboone/android-audio-sink/archive/0.0.1.tar.gz 3 | 4 | VERSION=0.0.2 5 | VVERSION=$VERSION 6 | SUFFIX=tar.gz 7 | NAME=android-audio-sink 8 | DOWNLOAD_URL=https://github.com/kevinboone/android-audio-sink/archive/$VVERSION.$SUFFIX 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; tar xfvz $TARBALL) 32 | else 33 | echo "Building cached $NAME-$VERSION" 34 | fi 35 | 36 | echo "Running make" 37 | 38 | mkdir -p $BUILD_DIR/image/ 39 | 40 | (cd $BUILD_DIR; make CC=$CC DESTDIR=`pwd`/image all install) 41 | 42 | if [[ $? -ne 0 ]] ; then 43 | echo make install failed ... stopping 44 | exit 1 45 | fi 46 | 47 | 48 | echo "Building package" 49 | mkdir -p $BUILD_DIR/out 50 | 51 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 52 | 53 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 54 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 55 | echo "2.0" > $BUILD_DIR/out/debian-binary 56 | rm -f $DEB 57 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 58 | cp -p $DEB $DIST/ 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /packages/android-audio-sink/control: -------------------------------------------------------------------------------- 1 | Package: android-audio-sink 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A helper for audio playback from the command line -- used by some KBOX utilities that play audio. At present, the Android C API has no access to the audio hardware, so we need a helper to make the necessary OpenSLES API calls for audio. 8 | 9 | -------------------------------------------------------------------------------- /packages/android-audio-sink/packageinfo.html: -------------------------------------------------------------------------------- 1 | android-audio-sink is a utility that accepts a stream of audio data, of various types, 2 | as standard input, and streams it to Android's built in media player. Its purpose is to 3 | assist in porting to Android applications that play audio. See the documentation for 4 | espeak for an example of how this might work. 5 | -------------------------------------------------------------------------------- /packages/android-elf-cleaner/BROKEN: -------------------------------------------------------------------------------- 1 | Although this builds, it doesn't work on Android. The author says it 2 | needs g++ 5.x, and the NDK g++ is 4.9. 3 | 4 | -------------------------------------------------------------------------------- /packages/android-elf-cleaner/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #http://github.com/kost/android-elf-cleaner/archive/master.zip 3 | 4 | VERSION=1.0 5 | VVERSION=$VERSION 6 | SUFFIX=zip 7 | NAME=android-elf-cleaner 8 | DOWNLOAD_URL=http://github.com/kost/$NAME/archive/master.zip 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/${NAME}-master 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; unzip $TARBALL) 32 | else 33 | echo "Building cached $VERSION" 34 | fi 35 | 36 | 37 | echo "Running make" 38 | 39 | (cd $BUILD_DIR; make CC=$CC CXX=$CXX CFLAGS="-fpic -fpie" LDFLAGS="-pie -s") 40 | 41 | if [[ $? -ne 0 ]] ; then 42 | echo make failed ... stopping 43 | exit 1 44 | fi 45 | 46 | mkdir -p $BUILD_DIR/image/usr/bin 47 | cp -p $BUILD_DIR/android-elf-cleaner $BUILD_DIR/image/usr/bin 48 | 49 | echo "Building package" 50 | mkdir -p $BUILD_DIR/out 51 | 52 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 53 | 54 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 55 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 56 | echo "2.0" > $BUILD_DIR/out/debian-binary 57 | rm -f $DEB 58 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 59 | cp -p $DEB $DIST/ 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /packages/android-elf-cleaner/control: -------------------------------------------------------------------------------- 1 | Package: android-elf-cleaner 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A utility to remove unnecessary symbols left in Android binaries by the Google NDK compiler, which produce irritating "unused DT entry" messages. 8 | -------------------------------------------------------------------------------- /packages/android-elf-cleaner/packageinfo.html: -------------------------------------------------------------------------------- 1 | This is a utility for removing unnecessary symbol table entries left in 2 | KBOX binaries by the Google NDK C compiler. These symbols cause 3 | error messages of the form "unused DT entry: type XXX"; they are 4 | harmless, but irritating. It should be run on the binary that shows 5 | the error and not, for example, on a script that runs the binary, or 6 | a symbolic link to it. Files are modified in place. 7 | -------------------------------------------------------------------------------- /packages/bash/control: -------------------------------------------------------------------------------- 1 | Package: bash 2 | Version: %VERSION% 3 | Section: shells 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The BASH shell. This replaces the Busybox emulation of BASH in /bin/bash, but does not replace /bin/sh (because it can't). To replace /bin/sh you will need to exit the KBOX environment. To have BASH the default shell without replacing /bin/sh, pass it on the kbox_shell command line, e.g., "kbox_shell -c /usr/bin/bash" 8 | -------------------------------------------------------------------------------- /packages/bash/packageinfo.html: -------------------------------------------------------------------------------- 1 | Bash is probably the most popular Linux command-line shell. The Busybox 2 | shell does a pretty good job of behaving like bash, but the real thing 3 | is better. 4 |

5 | This package replaces the Busybox implementation in /bin/bash, but it does 6 | not replace the one in /bin/sh (it would be necessary to exit the KBOX 7 | environment to do this.) To make Bash the default shell without modifying 8 | /bin/sh, add it as a command to kbox_shell in the terminal 9 | emulator's settings: kbox_shell -c /bin/bash. 10 | -------------------------------------------------------------------------------- /packages/bash/patch_config.h: -------------------------------------------------------------------------------- 1 | 951c951 2 | < #define HAVE_GRP_H 1 3 | --- 4 | > //#define HAVE_GRP_H 1 5 | -------------------------------------------------------------------------------- /packages/bash/patch_parse.y: -------------------------------------------------------------------------------- 1 | 135c135 2 | < extern int errno; 3 | --- 4 | > //extern int errno; 5 | -------------------------------------------------------------------------------- /packages/bc/control: -------------------------------------------------------------------------------- 1 | Package: bc 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: readline 7 | Description: An arbitary-precision calculator. 8 | -------------------------------------------------------------------------------- /packages/bc/packageinfo.html: -------------------------------------------------------------------------------- 1 | bc is an arbitrary-precision calculator. This version has line-editing 2 | support provided by libreadline. 3 | -------------------------------------------------------------------------------- /packages/cboard/BROKEN: -------------------------------------------------------------------------------- 1 | This can't be build until we have an implementation of glob(), among other 2 | things. 3 | -------------------------------------------------------------------------------- /packages/coreutils/control: -------------------------------------------------------------------------------- 1 | Package: coreutils 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: Basic Linux utilities for file handling and similar operations. These are the full versions of the utilities for which busybox provides minimal versions. This package contains the man pages for the coreutils utilities -- these man pages may well not correspond to the busybox version. It is expected that KBOX users install coreutils once the system is basically functional, as the busybox versions of the standard utilities lack important functionality that may be important in some applications. 8 | -------------------------------------------------------------------------------- /packages/coreutils/packageinfo.html: -------------------------------------------------------------------------------- 1 | Basic Linux utilities for file handling and similar operations. These are the 2 | full versions of the utilities for which Busybox provides minimal versions. 3 | This package also contains the man pages for the utilities, which 4 | often have somewhat different usage to the Busybox versions. 5 |

6 | It is expected that KBOX users will probably want to install 7 | coreutils once the system is basically functional, as the Busybox 8 | versions of the standard utilities lack important functionality that may be 9 | important in some applications. 10 | -------------------------------------------------------------------------------- /packages/coreutils/patch_dd.c: -------------------------------------------------------------------------------- 1 | 1686c1686 2 | < # include 3 | --- 4 | > # include 5 | -------------------------------------------------------------------------------- /packages/coreutils/patch_pinky.c: -------------------------------------------------------------------------------- 1 | 244c244 2 | < char *const comma = strchr (pw->pw_gecos, ','); 3 | --- 4 | > char *const comma = strchr ("kbox", ','); 5 | 250c250 6 | < result = create_fullname (pw->pw_gecos, pw->pw_name); 7 | --- 8 | > result = create_fullname ("kbox", pw->pw_name); 9 | 325c325 10 | < char *const comma = strchr (pw->pw_gecos, ','); 11 | --- 12 | > char *const comma = strchr ("kbox", ','); 13 | 331c331 14 | < result = create_fullname (pw->pw_gecos, pw->pw_name); 15 | --- 16 | > result = create_fullname ("kbox", pw->pw_name); 17 | -------------------------------------------------------------------------------- /packages/coreutils/patch_shred.c: -------------------------------------------------------------------------------- 1 | 84c84 2 | < # include 3 | --- 4 | > # include 5 | -------------------------------------------------------------------------------- /packages/curl/control: -------------------------------------------------------------------------------- 1 | Package: curl 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A utility for downloading files using HTTP(S) and other protocols. 8 | -------------------------------------------------------------------------------- /packages/curl/packageinfo.html: -------------------------------------------------------------------------------- 1 | A utility to fetch files using HTTP(s) and similar protocols. This package 2 | includes a set of trusted CA certificates from Mozilla, in 3 | /usr/share/certificates/cacert.pem. 4 | 5 | -------------------------------------------------------------------------------- /packages/dbcmd/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=0.0.2 4 | VVERSION=$VERSION 5 | SUFFIX=tar.gz 6 | NAME=dbcmd 7 | DOWNLOAD_URL=https://github.com/kevinboone/$NAME/archive/$VVERSION.$SUFFIX 8 | 9 | #https://github.com/kevinboone/dbcmd/archive/v0.0.2.tar.gz 10 | 11 | . ../../env.sh 12 | 13 | BUILD_DIR=$STAGING/$NAME-$VERSION 14 | TARGET=$BUILD_DIR/$NAME 15 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 16 | 17 | if [ -f $DEB ]; then 18 | echo $DEB exists -- delete it to rebuild 19 | exit 0; 20 | fi 21 | 22 | if [ ! -d $BUILD_DIR ]; then 23 | mkdir -p $STAGING/tarballs 24 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 25 | if [ ! -f $TARBALL ]; then 26 | echo "Downloading $VERSION" 27 | wget -O $TARBALL $DOWNLOAD_URL 28 | else 29 | echo "Using cached $TARBALL" 30 | fi 31 | mkdir -p $STAGING 32 | (cd $STAGING; tar xfvz $TARBALL) 33 | else 34 | echo "Building cached $VERSION" 35 | fi 36 | 37 | #echo patching 38 | 39 | #patch $BUILD_DIR/src/token.c patch_token.c 40 | 41 | mkdir -p $BUILD_DIR/image/usr 42 | 43 | echo "Running make" 44 | (cd $BUILD_DIR; make CC=$CC DESTDIR=image/usr EXTRA_LIBS="-lssl -lcrypto -lz" all install) 45 | 46 | if [[ $? -ne 0 ]] ; then 47 | echo make failed ... stopping 48 | exit 1 49 | fi 50 | 51 | echo "Building package" 52 | mkdir -p $BUILD_DIR/out 53 | 54 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 55 | 56 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 57 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 58 | echo "2.0" > $BUILD_DIR/out/debian-binary 59 | rm -f $DEB 60 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 61 | cp -p $DEB $DIST/ 62 | 63 | -------------------------------------------------------------------------------- /packages/dbcmd/control: -------------------------------------------------------------------------------- 1 | Package: dbcmd 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: curl 7 | Description: A simple command-line utility for synchronizing files with the Dropbox server. For more information see http://kevinboone.net/README_dbcmd.html. 8 | -------------------------------------------------------------------------------- /packages/dbcmd/packageinfo.html: -------------------------------------------------------------------------------- 1 | A simple (and rather experimental) utility for synchronizing files with the Dropbox 2 | server at the command line. For more information, see 3 | here. 4 | -------------------------------------------------------------------------------- /packages/dropbear/control: -------------------------------------------------------------------------------- 1 | Package: dropbear-client 2 | Version: 2016.74 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The Dropbear SSH client 8 | -------------------------------------------------------------------------------- /packages/dropbear/packageinfo.html: -------------------------------------------------------------------------------- 1 | A simple SSH client. 2 | -------------------------------------------------------------------------------- /packages/dropbear/patch_cli_auth.c: -------------------------------------------------------------------------------- 1 | 34a35,99 2 | > /*========================================================================= 3 | > Added by KB 4 | > =========================================================================*/ 5 | > 6 | > typedef int bool; 7 | > #define false 0 8 | > #define __fsetlocking(stream,type) 9 | > #define TCSASOFT 0 10 | > 11 | > 12 | > char *getpass (const char *prompt) 13 | > { 14 | > FILE *tty; 15 | > FILE *in, *out; 16 | > struct termios s, t; 17 | > bool tty_changed = false; 18 | > static char buf[256]; 19 | > static size_t bufsize; 20 | > ssize_t nread; 21 | > 22 | > tty = fopen ("/dev/tty", "w+"); 23 | > if (tty == NULL) 24 | > { 25 | > in = stdin; 26 | > out = stderr; 27 | > } 28 | > else 29 | > { 30 | > /* We do the locking ourselves. */ 31 | > __fsetlocking (tty, FSETLOCKING_BYCALLER); 32 | > 33 | > out = in = tty; 34 | > } 35 | > 36 | > 37 | > if (tcgetattr (fileno (in), &t) == 0) 38 | > { 39 | > /* Save the old one. */ 40 | > s = t; 41 | > /* Tricky, tricky. */ 42 | > t.c_lflag &= ~(ECHO | ISIG); 43 | > tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0); 44 | > } 45 | > 46 | > fputs (prompt, out); 47 | > fflush (out); 48 | > 49 | > buf[0] = 0; 50 | > fgets (buf, sizeof (buf) - 1, in); 51 | > buf[strlen(buf) - 1] = 0; // CHOMP EOL 52 | > 53 | > if (tty_changed) 54 | > tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s); 55 | > 56 | > printf ("\n"); 57 | > return buf; 58 | > } 59 | > 60 | > 61 | > /*========================================================================= 62 | > End added by KB 63 | > =========================================================================*/ 64 | > 65 | > 66 | > 67 | 351a417,420 68 | > 69 | > 70 | > 71 | > 72 | -------------------------------------------------------------------------------- /packages/dropbear/patch_config.h: -------------------------------------------------------------------------------- 1 | 110c110 2 | < #define HAVE_GETPASS 1 3 | --- 4 | > /* #undef HAVE_GETPASS */ 5 | 6 | -------------------------------------------------------------------------------- /packages/dropbear/patch_loginrec.c: -------------------------------------------------------------------------------- 1 | 497c497 2 | < ut->ut_type = 8; 3 | --- 4 | > ut->ut_type = DEAD_PROCESS; 5 | 6 | -------------------------------------------------------------------------------- /packages/epub2txt/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=0.1.4 4 | VVERSION=$VERSION 5 | SUFFIX=tar.gz 6 | NAME=epub2txt 7 | DOWNLOAD_URL=https://github.com/kevinboone/epub2txt/archive/$VVERSION.$SUFFIX 8 | 9 | . ../../env.sh 10 | 11 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 12 | TARGET=$BUILD_DIR/$NAME 13 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 14 | 15 | if [ -f $DEB ]; then 16 | echo $DEB exists -- delete it to rebuild 17 | exit 0; 18 | fi 19 | 20 | if [ ! -d $BUILD_DIR ]; then 21 | mkdir -p $STAGING/tarballs 22 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 23 | if [ ! -f $TARBALL ]; then 24 | echo "Downloading $VERSION" 25 | wget -O $TARBALL $DOWNLOAD_URL 26 | else 27 | echo "Using cached $TARBALL" 28 | fi 29 | mkdir -p $STAGING 30 | (cd $STAGING; tar xfvz $TARBALL) 31 | else 32 | echo "Building cached $NAME-$VERSION" 33 | fi 34 | 35 | echo "Running make" 36 | 37 | mkdir -p $BUILD_DIR/image/ 38 | 39 | (cd $BUILD_DIR; make CC=$CC LDFLAGS="-pie" CFLAGS="-fpie -fpic" DESTDIR=`pwd`/image all install) 40 | 41 | 42 | echo "Building package" 43 | mkdir -p $BUILD_DIR/out 44 | 45 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 46 | 47 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 48 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 49 | echo "2.0" > $BUILD_DIR/out/debian-binary 50 | rm -f $DEB 51 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 52 | cp -p $DEB $DIST/ 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /packages/epub2txt/control: -------------------------------------------------------------------------------- 1 | Package: epub2txt 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: Extracts text from EPUB documents. See http://kevinboone.net/README_epub2txt.html for more information. 8 | -------------------------------------------------------------------------------- /packages/epub2txt/packageinfo.html: -------------------------------------------------------------------------------- 1 | A utility for extracting text from EPUB e-books. For more information, see 2 | here. 3 | -------------------------------------------------------------------------------- /packages/espeak/control: -------------------------------------------------------------------------------- 1 | Package: espeak 2 | Version: %VERSION% 3 | Section: media 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A lightweight text-to-speech engine that uses only phoneme synthesis. On KBOX, use this with android-audio-sink 8 | -------------------------------------------------------------------------------- /packages/espeak/packageinfo.html: -------------------------------------------------------------------------------- 1 | A text-to-speech engine based on phoneme synthesis. Because there is no direct 2 | access to audio hardware on a non-rooted Android device, this utility requires 3 | the assistance of android-audio-sink to capture and play 4 | the audio stream. The scripts /usr/bin/say and 5 | /usr/bin/sayfile demonstrate how to pipe the audio data into 6 | android-audio-sink. Note that android-audio-sink 7 | is not stated as a dependency, because espeak will work 8 | without it, for (say) writing the audio data to a file. 9 | -------------------------------------------------------------------------------- /packages/espeak/patch_Makefile: -------------------------------------------------------------------------------- 1 | 30c30 2 | < AUDIO = portaudio 3 | --- 4 | > #AUDIO = portaudio 5 | 86c86 6 | < LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS) 7 | --- 8 | > LIBS1=-lstdc++ $(LIB_AUDIO) $(EXTRA_LIBS) 9 | 90c90 10 | < LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread 11 | --- 12 | > LIBS2=-lstdc++ $(LIB_AUDIO) 13 | -------------------------------------------------------------------------------- /packages/espeak/patch_Makefile.2: -------------------------------------------------------------------------------- 1 | 86c86 2 | < LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS) 3 | --- 4 | > LIBS1=-lstdc++ $(LIB_AUDIO) $(EXTRA_LIBS) 5 | 90c90 6 | < LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread 7 | --- 8 | > LIBS2=-lstdc++ $(LIB_AUDIO) 9 | -------------------------------------------------------------------------------- /packages/espeak/patch_speech.h: -------------------------------------------------------------------------------- 1 | 50c50 2 | < #define USE_ASYNC 3 | --- 4 | > //#define USE_ASYNC 5 | -------------------------------------------------------------------------------- /packages/espeak/scripts/say: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | pad=" " 3 | line="" 4 | for arg in "$@" 5 | do 6 | line=${line}${pad}${arg} 7 | done 8 | echo $line 9 | espeak -w stdout "$line" | android-audio-sink 10 | -------------------------------------------------------------------------------- /packages/espeak/scripts/sayfile: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | espeak -w stdout -f $1 | android-audio-sink 3 | -------------------------------------------------------------------------------- /packages/file/control: -------------------------------------------------------------------------------- 1 | Package: file 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A command-line utility to guess the contents of a file. 8 | -------------------------------------------------------------------------------- /packages/file/packageinfo.html: -------------------------------------------------------------------------------- 1 | This is the standard file utility, for guessing the 2 | contents of a file by inspection. 3 | -------------------------------------------------------------------------------- /packages/frobtads/control: -------------------------------------------------------------------------------- 1 | Package: frobtads 2 | Version: %VERSION% 3 | Section: games 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: ncurses,curl 7 | Description: An interpreter for TADS2/TADS3 interactive fiction games. 8 | -------------------------------------------------------------------------------- /packages/frobtads/packageinfo.html: -------------------------------------------------------------------------------- 1 | An interpreter for TADS2 and TADS3 interactive fiction games. 2 | -------------------------------------------------------------------------------- /packages/frotz/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #https://sourceforge.net/projects/frotz/files/frotz/frotz-2.44.tar.gz/download 4 | 5 | VERSION=2.44 6 | VVERSION=$VERSION 7 | SUFFIX=tar.gz 8 | NAME=frotz 9 | DOWNLOAD_URL=https://sourceforge.net/projects/frotz/files/$NAME-$VVERSION.$SUFFIX/download 10 | 11 | . ../../env.sh 12 | 13 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 14 | TARGET=$BUILD_DIR/$NAME 15 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 16 | 17 | if [ -f $DEB ]; then 18 | echo $DEB exists -- delete it to rebuild 19 | exit 0; 20 | fi 21 | 22 | if [ ! -d $BUILD_DIR ]; then 23 | mkdir -p $STAGING/tarballs 24 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 25 | if [ ! -f $TARBALL ]; then 26 | echo "Downloading $VERSION" 27 | wget -O $TARBALL $DOWNLOAD_URL 28 | else 29 | echo "Using cached $TARBALL" 30 | fi 31 | mkdir -p $STAGING 32 | (cd $STAGING; tar xfvz $TARBALL) 33 | else 34 | echo "Building cached $NAME-$VERSION" 35 | fi 36 | 37 | echo "Patching" 38 | 39 | patch $BUILD_DIR/Makefile patch_Makefile 40 | patch $BUILD_DIR/src/curses/ux_init.c patch_ux_init.c 41 | 42 | echo "Running make" 43 | 44 | mkdir -p $BUILD_DIR/image/ 45 | 46 | (cd $BUILD_DIR; make STRIP=$STRIP PREFIX=/usr CONFIG_DIR=/etc CC=$CC LDFLAGS="-pie" CFLAGS="-fpie -fpic" DESTDIR=`pwd`/image all install) 47 | 48 | echo "Building package" 49 | mkdir -p $BUILD_DIR/out 50 | 51 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 52 | 53 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 54 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 55 | echo "2.0" > $BUILD_DIR/out/debian-binary 56 | rm -f $DEB 57 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 58 | cp -p $DEB $DIST/ 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /packages/frotz/control: -------------------------------------------------------------------------------- 1 | Package: frotz 2 | Version: %VERSION% 3 | Section: games 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: ncurses 7 | Description: An interpreter for z-code (Infocom) interactive fiction games. 8 | -------------------------------------------------------------------------------- /packages/frotz/packageinfo.html: -------------------------------------------------------------------------------- 1 | An interpreter for z-code (Infocom) interactive fiction games. 2 | -------------------------------------------------------------------------------- /packages/frotz/patch_ux_init.c: -------------------------------------------------------------------------------- 1 | 285c285 2 | < p = rindex(f_setup.story_name, '.'); 3 | --- 4 | > p = strchr(f_setup.story_name, '.'); 5 | -------------------------------------------------------------------------------- /packages/ftp/control: -------------------------------------------------------------------------------- 1 | Package: ftp 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: Traditional FTP client from the 1980s. 8 | -------------------------------------------------------------------------------- /packages/ftp/packageinfo.html: -------------------------------------------------------------------------------- 1 | The notorious NetKit ftp client from the 1980s. 2 | -------------------------------------------------------------------------------- /packages/ftp/patch_cmds.c: -------------------------------------------------------------------------------- 1 | 47a48 2 | > #include 3 | 91a93,133 4 | > 5 | > /*======================================================================== 6 | > mygetpass 7 | > =========================================================================*/ 8 | > char *getpass (const char *prompt) 9 | > { 10 | > char password[64]; 11 | > memset (password, 0, sizeof (password)); 12 | > 13 | > struct termios oflags, nflags; 14 | > 15 | > tcgetattr(fileno(stdin), &oflags); 16 | > nflags = oflags; 17 | > nflags.c_lflag &= ~ECHO; 18 | > // nflags.c_lflag |= ECHONL; 19 | > tcsetattr(fileno(stdin), TCSANOW, &nflags); 20 | > 21 | > fprintf(stderr, prompt); 22 | > fflush (stdout); 23 | > FILE *f = fopen ("/dev/tty", "r"); 24 | > if (f) 25 | > { 26 | > fgets(password, sizeof(password), f); 27 | > fclose (f); 28 | > } 29 | > else 30 | > fgets(password, sizeof(password), stdin); 31 | > 32 | > if (strlen (password) > 0) 33 | > password[strlen(password) - 1] = 0; // remove \n 34 | > 35 | > fseek (stderr, 0, SEEK_CUR); 36 | > 37 | > tcsetattr(fileno(stdin), TCSANOW, &oflags); 38 | > 39 | > printf ("\n"); 40 | > 41 | > return strdup (password); 42 | > } 43 | > 44 | > 45 | -------------------------------------------------------------------------------- /packages/ftp/patch_ftp_var.h: -------------------------------------------------------------------------------- 1 | 43a44,50 2 | > #define MAXHOSTNAMELEN 256 3 | > #define index strchr 4 | > #define rindex strrchr 5 | > #define L_SET SEEK_SET 6 | > #define L_INCR SEEK_CUR 7 | > char *getpass (const char *prompt); 8 | > 9 | -------------------------------------------------------------------------------- /packages/gawk/control: -------------------------------------------------------------------------------- 1 | Package: gawk 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The AWK text processing programming language. This implementation replaces the Busybox version. 8 | -------------------------------------------------------------------------------- /packages/gawk/packageinfo.html: -------------------------------------------------------------------------------- 1 | GNU implementation of the traditional text-processing programming language. 2 | -------------------------------------------------------------------------------- /packages/gawk/patch_pwcat.c: -------------------------------------------------------------------------------- 1 | 26,39c26 2 | < struct passwd *p; 3 | < 4 | < while ((p = getpwent()) != NULL) 5 | < #ifdef HAVE_STRUCT_PASSWD_PW_PASSWD 6 | < printf("%s:%s:%ld:%ld:%s:%s:%s\n", 7 | < p->pw_name, p->pw_passwd, (long) p->pw_uid, 8 | < (long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); 9 | < #else 10 | < printf("%s:*:%ld:%ld:%s:%s\n", 11 | < p->pw_name, (long) p->pw_uid, 12 | < (long) p->pw_gid, p->pw_dir, p->pw_shell); 13 | < #endif 14 | < 15 | < endpwent(); 16 | --- 17 | > printf ("There is no password database on Android\n"); 18 | -------------------------------------------------------------------------------- /packages/gcc/packageinfo.html: -------------------------------------------------------------------------------- 1 | The GNU C/C++ compiler, contributed by Cyd Hasleton. 2 | 3 | -------------------------------------------------------------------------------- /packages/git/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #https://github.com/git/git/archive/v2.13.0.tar.gz 3 | 4 | VERSION=2.13.0 5 | VVERSION=v$VERSION 6 | SUFFIX=tar.gz 7 | NAME=git 8 | DOWNLOAD_URL=https://github.com/git/git/archive/$VVERSION.$SUFFIX 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/$NAME-$VERSION 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; tar xfvz $TARBALL) 32 | else 33 | echo "Building cached $VERSION" 34 | fi 35 | 36 | echo "Patching..." 37 | patch $BUILD_DIR/Makefile patch_Makefile 38 | patch $BUILD_DIR/Makefile patch_Makefile2 39 | 40 | echo "Running make" 41 | 42 | (cd $BUILD_DIR; make CC=$CC CFLAGS="-fpie -fpic" LDFLAGS="-pie") 43 | 44 | if [[ $? -ne 0 ]] ; then 45 | echo make failed ... stopping 46 | exit 1 47 | fi 48 | 49 | mkdir -p $BUILD_DIR/image/ 50 | 51 | echo "Running make install" 52 | (cd $BUILD_DIR; make CC=$CC CFLAGS="-fpie -fpic" LDFLAGS="-pie" prefix="/usr" DESTDIR=image install) 53 | 54 | echo "Building package" 55 | mkdir -p $BUILD_DIR/out 56 | 57 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 58 | 59 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 60 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 61 | echo "2.0" > $BUILD_DIR/out/debian-binary 62 | rm -f $DEB 63 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 64 | cp -p $DEB $DIST/ 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /packages/git/control: -------------------------------------------------------------------------------- 1 | Package: git 2 | Version: %VERSION% 3 | Section: development 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: Source code control system. 8 | -------------------------------------------------------------------------------- /packages/git/packageinfo.html: -------------------------------------------------------------------------------- 1 | A source code management system. 2 | -------------------------------------------------------------------------------- /packages/git/patch_Makefile: -------------------------------------------------------------------------------- 1 | 47c47,48 2 | < # 3 | --- 4 | > NO_EXPAT=1 5 | > 6 | 57c58,59 7 | < # 8 | --- 9 | > NO_GETTEXT=1 10 | > 11 | 107c109,110 12 | < # 13 | --- 14 | > NO_GECOS_IN_PWENT=1 15 | > 16 | 216c219,220 17 | < # 18 | --- 19 | > NO_ICONV=1 20 | > 21 | 241c245 22 | < # 23 | --- 24 | > NO_NSEC=1 25 | 471c475 26 | < PTHREAD_LIBS = -lpthread 27 | --- 28 | > PTHREAD_LIBS = -lcurl -lssl -lcrypto 29 | 1526c1530 30 | < EXTLIBS += -lrt 31 | --- 32 | > # EXTLIBS += -lrt 33 | -------------------------------------------------------------------------------- /packages/git/patch_Makefile2: -------------------------------------------------------------------------------- 1 | 313c313,314 2 | < # 3 | --- 4 | > NO_INSTALL_HARDLINKS=1 5 | > 6 | -------------------------------------------------------------------------------- /packages/glkterm/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #http://www.eblong.com/zarf/glk/glkterm-104.tar.gz 4 | 5 | VERSION=1.0.4 6 | VVERSION=$VERSION 7 | SUFFIX=tar.gz 8 | NAME=glkterm 9 | DOWNLOAD_URL=http://www.eblong.com/zarf/glk/glkterm-104.$SUFFIX 10 | 11 | . ../../env.sh 12 | 13 | BUILD_DIR=$STAGING/${NAME} 14 | TARGET=$BUILD_DIR/$NAME 15 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 16 | 17 | if [ -f $DEB ]; then 18 | echo $DEB exists -- delete it to rebuild 19 | exit 0; 20 | fi 21 | 22 | if [ ! -d $BUILD_DIR ]; then 23 | mkdir -p $STAGING/tarballs 24 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 25 | if [ ! -f $TARBALL ]; then 26 | echo "Downloading $VERSION" 27 | wget -O $TARBALL $DOWNLOAD_URL 28 | else 29 | echo "Using cached $TARBALL" 30 | fi 31 | mkdir -p $STAGING 32 | (cd $STAGING; tar xfvz $TARBALL) 33 | else 34 | echo "Building cached $NAME-$VERSION" 35 | fi 36 | 37 | echo Patching 38 | 39 | patch $BUILD_DIR/Makefile patch_Makefile 40 | 41 | echo "Running make" 42 | 43 | (cd $BUILD_DIR; make CC=$CC) 44 | 45 | 46 | echo "Populating sysroot" 47 | cp -p $BUILD_DIR/libglkterm.a $SYSROOT/usr/lib/ 48 | cp -p $BUILD_DIR/glk.h $SYSROOT/usr/include/ 49 | cp -p $BUILD_DIR/glkstart.h $SYSROOT/usr/include/ 50 | cp -p $BUILD_DIR/Make.glkterm $SYSROOT/usr/include/ 51 | 52 | 53 | -------------------------------------------------------------------------------- /packages/glkterm/patch_Makefile: -------------------------------------------------------------------------------- 1 | 16c16 2 | < #INCLUDEDIRS = -I/usr/5include 3 | --- 4 | > INCLUDEDIRS = -I/usr/include/ncurses 5 | 22c22 6 | < CFLAGS = $(OPTIONS) $(INCLUDEDIRS) 7 | --- 8 | > CFLAGS = $(OPTIONS) $(INCLUDEDIRS) -fpie -fpic 9 | -------------------------------------------------------------------------------- /packages/glulxe/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #http://www.eblong.com/zarf/glulx/glulxe-054.tar.gz 4 | 5 | VERSION=0.5.4 6 | VVERSION=$VERSION 7 | SUFFIX=tar.gz 8 | NAME=glulxe 9 | DOWNLOAD_URL=http://www.eblong.com/zarf/glulx/glulxe-054.$SUFFIX 10 | 11 | . ../../env.sh 12 | 13 | BUILD_DIR=$STAGING/${NAME} 14 | TARGET=$BUILD_DIR/$NAME 15 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 16 | 17 | if [ -f $DEB ]; then 18 | echo $DEB exists -- delete it to rebuild 19 | exit 0; 20 | fi 21 | 22 | if [ ! -d $BUILD_DIR ]; then 23 | mkdir -p $STAGING/tarballs 24 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 25 | if [ ! -f $TARBALL ]; then 26 | echo "Downloading $VERSION" 27 | wget -O $TARBALL $DOWNLOAD_URL 28 | else 29 | echo "Using cached $TARBALL" 30 | fi 31 | mkdir -p $STAGING 32 | (cd $STAGING; tar xfvz $TARBALL) 33 | else 34 | echo "Building cached $NAME-$VERSION" 35 | fi 36 | 37 | 38 | echo "Patching" 39 | 40 | patch $BUILD_DIR/Makefile patch_Makefile 41 | 42 | echo "Running make" 43 | 44 | (cd $BUILD_DIR; make CC=$CC OPTIONS="-g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-unused -DOS_UNIX -fpie -fpic -pie") 45 | 46 | mkdir -p $BUILD_DIR/image/usr/bin 47 | $STRIP $BUILD_DIR/glulxe 48 | cp -p $BUILD_DIR/glulxe $BUILD_DIR/image/usr/bin 49 | 50 | echo "Building package" 51 | mkdir -p $BUILD_DIR/out 52 | 53 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 54 | 55 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 56 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 57 | echo "2.0" > $BUILD_DIR/out/debian-binary 58 | rm -f $DEB 59 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 60 | cp -p $DEB $DIST/ 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /packages/glulxe/control: -------------------------------------------------------------------------------- 1 | Package: glulxe 2 | Version: %VERSION% 3 | Section: games 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: An interpreter for Glulx interactive fiction games. 8 | -------------------------------------------------------------------------------- /packages/glulxe/packageinfo.html: -------------------------------------------------------------------------------- 1 | An interpreter for Glulx interactive fiction games. 2 | 3 | -------------------------------------------------------------------------------- /packages/glulxe/patch_Makefile: -------------------------------------------------------------------------------- 1 | 10,12c10,12 2 | < GLKINCLUDEDIR = ../cheapglk 3 | < GLKLIBDIR = ../cheapglk 4 | < GLKMAKEFILE = Make.cheapglk 5 | --- 6 | > #GLKINCLUDEDIR = ../cheapglk 7 | > #GLKLIBDIR = ../cheapglk 8 | > #GLKMAKEFILE = Make.cheapglk 9 | 14,16c14,16 10 | < #GLKINCLUDEDIR = ../glkterm 11 | < #GLKLIBDIR = ../glkterm 12 | < #GLKMAKEFILE = Make.glkterm 13 | --- 14 | > GLKINCLUDEDIR = ../glkterm 15 | > GLKLIBDIR = ../glkterm 16 | > GLKMAKEFILE = Make.glkterm 17 | -------------------------------------------------------------------------------- /packages/gnuchess/control: -------------------------------------------------------------------------------- 1 | Package: gnuchess 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The GNU chess engine. In most cases, this needs to be used with a front-end program, such as cboard. 8 | -------------------------------------------------------------------------------- /packages/gnuchess/packageinfo.html: -------------------------------------------------------------------------------- 1 | The notoriously strong GNU chess engine. This takes input at the command 2 | line and, unless you have a staggeringly good memory, or a separate 3 | user interface, it needs to be used in conjunction with a chess board. 4 | -------------------------------------------------------------------------------- /packages/gnupg/control: -------------------------------------------------------------------------------- 1 | Package: gnupg 2 | Version: %VERSION% 3 | Section: security 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: GNU Privacy Guard -- encryption and key management utility. 8 | -------------------------------------------------------------------------------- /packages/gnupg/packageinfo.html: -------------------------------------------------------------------------------- 1 | GNU Privacy Guard -- an encryption/signing utility and key manager. 2 | -------------------------------------------------------------------------------- /packages/gnupg/patch_config.h: -------------------------------------------------------------------------------- 1 | 511c511 2 | < #define HAVE_USELOCALE 1 3 | --- 4 | > //#define HAVE_USELOCALE 1 5 | 813c813 6 | < #define USE_SHM_COPROCESSING 1 7 | --- 8 | > //#define USE_SHM_COPROCESSING 1 9 | -------------------------------------------------------------------------------- /packages/grep/control: -------------------------------------------------------------------------------- 1 | Package: grep 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The GNU grep utility. This offers more functionality that the Busybox version, and replaces it on installation. 8 | -------------------------------------------------------------------------------- /packages/grep/packageinfo.html: -------------------------------------------------------------------------------- 1 | The GNU implementation of the standard grep utility. This version replaces the 2 | one provided by Busybox. 3 | -------------------------------------------------------------------------------- /packages/groff/control: -------------------------------------------------------------------------------- 1 | Package: groff 2 | Version: %VERSION% 3 | Section: libraries 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: Traditional Unix text formatting system; required for reading man pages. 8 | -------------------------------------------------------------------------------- /packages/groff/packageinfo.html: -------------------------------------------------------------------------------- 1 | The GNU implementation of the tradition Unix text formatting engine. 2 | This utility is required for displaying man pages. 3 | -------------------------------------------------------------------------------- /packages/groff/x.x: -------------------------------------------------------------------------------- 1 | .SH hello 2 | 3 | Hello \fIthere\fR blah 4 | 5 | -------------------------------------------------------------------------------- /packages/hexedit/control: -------------------------------------------------------------------------------- 1 | Package: hexedit 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A utility for editing files in hexadecimal format. 8 | -------------------------------------------------------------------------------- /packages/hexedit/packageinfo.html: -------------------------------------------------------------------------------- 1 | A console-based hexadecimal editor. In its present form this utility 2 | has limited usefulness on Android, because it is controlled by 3 | function keys (F1, F2...), which are hard to generate with an Android 4 | keyboard, physical or on-screen. 5 | 6 | -------------------------------------------------------------------------------- /packages/htop/control: -------------------------------------------------------------------------------- 1 | Package: htop 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: An interactive process manager. 8 | -------------------------------------------------------------------------------- /packages/htop/packageinfo.html: -------------------------------------------------------------------------------- 1 | An interactive process manager. 2 | -------------------------------------------------------------------------------- /packages/htop/patch_CRT.c: -------------------------------------------------------------------------------- 1 | 19c19 2 | < #include 3 | --- 4 | > //#include 5 | -------------------------------------------------------------------------------- /packages/htop/patch_Makefile: -------------------------------------------------------------------------------- 1 | 365c365 2 | < LIBS = -lncurses -ltinfo -lm -lncurses 3 | --- 4 | > LIBS = -lncurses -lm -lncurses 5 | -------------------------------------------------------------------------------- /packages/java-support/bin/dex: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | dalvikvm -cp /usr/share/java-support/dx.dex com.android.dx.command.Main "$@" 3 | 4 | -------------------------------------------------------------------------------- /packages/java-support/bin/dx: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | dalvikvm -cp /usr/share/java-support/dx.dex com.android.dx.command.Main "$@" 3 | 4 | -------------------------------------------------------------------------------- /packages/java-support/bin/javac: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | dalvikvm -cp /usr/share/java-support/tools.dex com.sun.tools.javac.Main "$@" 3 | 4 | -------------------------------------------------------------------------------- /packages/java-support/control: -------------------------------------------------------------------------------- 1 | Package: java-support 2 | Version: %VERSION% 3 | Section: development 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: Various utilities for Java support under KBOX. 8 | -------------------------------------------------------------------------------- /packages/java-support/packageinfo.html: -------------------------------------------------------------------------------- 1 | A Java compiler (mercilessly torn from OpenJDK) and a build of the 2 | Google dx utility for KBOX. This rather experimental 3 | package allows Java programs to be compiled and executed at the 4 | command line on KBOX. For more information, see 5 | here. 6 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/Version.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx; 18 | 19 | /** 20 | * Version number for dx. 21 | */ 22 | public class Version { 23 | /** {@code non-null;} version string */ 24 | public static final String VERSION = "1.4"; 25 | } 26 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttDeprecated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | /** 20 | * Attribute class for standard {@code Deprecated} attributes. 21 | */ 22 | public final class AttDeprecated extends BaseAttribute { 23 | /** {@code non-null;} attribute name for attributes of this type */ 24 | public static final String ATTRIBUTE_NAME = "Deprecated"; 25 | 26 | /** 27 | * Constructs an instance. 28 | */ 29 | public AttDeprecated() { 30 | super(ATTRIBUTE_NAME); 31 | } 32 | 33 | /** {@inheritDoc} */ 34 | public int byteLength() { 35 | return 6; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttLocalVariableTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.cf.code.LocalVariableList; 20 | 21 | /** 22 | * Attribute class for standard {@code LocalVariableTable} attributes. 23 | */ 24 | public final class AttLocalVariableTable extends BaseLocalVariables { 25 | /** {@code non-null;} attribute name for attributes of this type */ 26 | public static final String ATTRIBUTE_NAME = "LocalVariableTable"; 27 | 28 | /** 29 | * Constructs an instance. 30 | * 31 | * @param localVariables {@code non-null;} list of local variable entries 32 | */ 33 | public AttLocalVariableTable(LocalVariableList localVariables) { 34 | super(ATTRIBUTE_NAME, localVariables); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttLocalVariableTypeTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.cf.code.LocalVariableList; 20 | 21 | /** 22 | * Attribute class for standard {@code LocalVariableTypeTable} attributes. 23 | */ 24 | public final class AttLocalVariableTypeTable extends BaseLocalVariables { 25 | /** {@code non-null;} attribute name for attributes of this type */ 26 | public static final String ATTRIBUTE_NAME = "LocalVariableTypeTable"; 27 | 28 | /** 29 | * Constructs an instance. 30 | * 31 | * @param localVariables {@code non-null;} list of local variable entries 32 | */ 33 | public AttLocalVariableTypeTable(LocalVariableList localVariables) { 34 | super(ATTRIBUTE_NAME, localVariables); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttRuntimeInvisibleAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.rop.annotation.Annotations; 20 | 21 | /** 22 | * Attribute class for standard {@code RuntimeInvisibleAnnotations} 23 | * attributes. 24 | */ 25 | public final class AttRuntimeInvisibleAnnotations extends BaseAnnotations { 26 | /** {@code non-null;} attribute name for attributes of this type */ 27 | public static final String ATTRIBUTE_NAME = "RuntimeInvisibleAnnotations"; 28 | 29 | /** 30 | * Constructs an instance. 31 | * 32 | * @param annotations {@code non-null;} the list of annotations 33 | * @param byteLength {@code >= 0;} attribute data length in the original 34 | * classfile (not including the attribute header) 35 | */ 36 | public AttRuntimeInvisibleAnnotations(Annotations annotations, 37 | int byteLength) { 38 | super(ATTRIBUTE_NAME, annotations, byteLength); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttRuntimeInvisibleParameterAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.rop.annotation.AnnotationsList; 20 | 21 | /** 22 | * Attribute class for standard 23 | * {@code RuntimeInvisibleParameterAnnotations} attributes. 24 | */ 25 | public final class AttRuntimeInvisibleParameterAnnotations 26 | extends BaseParameterAnnotations { 27 | /** {@code non-null;} attribute name for attributes of this type */ 28 | public static final String ATTRIBUTE_NAME = 29 | "RuntimeInvisibleParameterAnnotations"; 30 | 31 | /** 32 | * Constructs an instance. 33 | * 34 | * @param parameterAnnotations {@code non-null;} the parameter annotations 35 | * @param byteLength {@code >= 0;} attribute data length in the original 36 | * classfile (not including the attribute header) 37 | */ 38 | public AttRuntimeInvisibleParameterAnnotations( 39 | AnnotationsList parameterAnnotations, int byteLength) { 40 | super(ATTRIBUTE_NAME, parameterAnnotations, byteLength); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttRuntimeVisibleAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.rop.annotation.Annotations; 20 | 21 | /** 22 | * Attribute class for standard {@code RuntimeVisibleAnnotations} 23 | * attributes. 24 | */ 25 | public final class AttRuntimeVisibleAnnotations extends BaseAnnotations { 26 | /** {@code non-null;} attribute name for attributes of this type */ 27 | public static final String ATTRIBUTE_NAME = "RuntimeVisibleAnnotations"; 28 | 29 | /** 30 | * Constructs an instance. 31 | * 32 | * @param annotations {@code non-null;} the list of annotations 33 | * @param byteLength {@code >= 0;} attribute data length in the original 34 | * classfile (not including the attribute header) 35 | */ 36 | public AttRuntimeVisibleAnnotations(Annotations annotations, 37 | int byteLength) { 38 | super(ATTRIBUTE_NAME, annotations, byteLength); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttRuntimeVisibleParameterAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.rop.annotation.AnnotationsList; 20 | 21 | /** 22 | * Attribute class for standard {@code RuntimeVisibleParameterAnnotations} 23 | * attributes. 24 | */ 25 | public final class AttRuntimeVisibleParameterAnnotations 26 | extends BaseParameterAnnotations { 27 | /** {@code non-null;} attribute name for attributes of this type */ 28 | public static final String ATTRIBUTE_NAME = 29 | "RuntimeVisibleParameterAnnotations"; 30 | 31 | /** 32 | * Constructs an instance. 33 | * 34 | * @param annotations {@code non-null;} the parameter annotations 35 | * @param byteLength {@code >= 0;} attribute data length in the original 36 | * classfile (not including the attribute header) 37 | */ 38 | public AttRuntimeVisibleParameterAnnotations( 39 | AnnotationsList annotations, int byteLength) { 40 | super(ATTRIBUTE_NAME, annotations, byteLength); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/AttSynthetic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | /** 20 | * Attribute class for standard {@code Synthetic} attributes. 21 | */ 22 | public final class AttSynthetic extends BaseAttribute { 23 | /** {@code non-null;} attribute name for attributes of this type */ 24 | public static final String ATTRIBUTE_NAME = "Synthetic"; 25 | 26 | /** 27 | * Constructs an instance. 28 | */ 29 | public AttSynthetic() { 30 | super(ATTRIBUTE_NAME); 31 | } 32 | 33 | /** {@inheritDoc} */ 34 | public int byteLength() { 35 | return 6; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/BaseAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.attrib; 18 | 19 | import com.android.dx.cf.iface.Attribute; 20 | 21 | /** 22 | * Base implementation of {@link Attribute}, which directly stores 23 | * the attribute name but leaves the rest up to subclasses. 24 | */ 25 | public abstract class BaseAttribute implements Attribute { 26 | /** {@code non-null;} attribute name */ 27 | private final String name; 28 | 29 | /** 30 | * Constructs an instance. 31 | * 32 | * @param name {@code non-null;} attribute name 33 | */ 34 | public BaseAttribute(String name) { 35 | if (name == null) { 36 | throw new NullPointerException("name == null"); 37 | } 38 | 39 | this.name = name; 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | public String getName() { 44 | return name; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/attrib/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of containers and utilities for all the standard Java 3 | attribute types.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • com.android.dx.cf.iface
  • 8 |
  • com.android.dx.rop.pool
  • 9 |
  • com.android.dx.util
  • 10 |
11 | 12 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/code/SimException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.code; 18 | 19 | import com.android.dx.util.ExceptionWithContext; 20 | 21 | /** 22 | * Exception from simulation. 23 | */ 24 | public class SimException 25 | extends ExceptionWithContext { 26 | public SimException(String message) { 27 | super(message); 28 | } 29 | 30 | public SimException(Throwable cause) { 31 | super(cause); 32 | } 33 | 34 | public SimException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/code/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of classes having to do with Java simulation, such as 3 | is needed for verification or stack-to-register conversion.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • com.android.dx.rop.pool
  • 8 |
  • com.android.dx.util
  • 9 |
10 | 11 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/direct/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of cf.iface.* based on a direct representation 3 | of class files as byte[]s.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • com.android.dx.cf.attrib
  • 8 |
  • com.android.dx.cf.iface
  • 9 |
  • com.android.dx.rop.pool
  • 10 |
  • com.android.dx.util
  • 11 |
12 | 13 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/Attribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | /** 20 | * Interface representing attributes of class files (directly or indirectly). 21 | */ 22 | public interface Attribute { 23 | /** 24 | * Get the name of the attribute. 25 | * 26 | * @return {@code non-null;} the name 27 | */ 28 | public String getName(); 29 | 30 | /** 31 | * Get the total length of the attribute in bytes, including the 32 | * header. Since the header is always six bytes, the result of 33 | * this method is always at least {@code 6}. 34 | * 35 | * @return {@code >= 6;} the total length, in bytes 36 | */ 37 | public int byteLength(); 38 | } 39 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/Field.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | import com.android.dx.rop.cst.TypedConstant; 20 | 21 | /** 22 | * Interface representing fields of class files. 23 | */ 24 | public interface Field 25 | extends Member { 26 | /** 27 | * Get the constant value for this field, if any. This only returns 28 | * non-{@code null} for a {@code static final} field which 29 | * includes a {@code ConstantValue} attribute. 30 | * 31 | * @return {@code null-ok;} the constant value, or {@code null} if this 32 | * field isn't a constant 33 | */ 34 | public TypedConstant getConstantValue(); 35 | } 36 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/FieldList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | /** 20 | * Interface for lists of fields. 21 | */ 22 | public interface FieldList 23 | { 24 | /** 25 | * Get whether this instance is mutable. Note that the 26 | * {@code FieldList} interface itself doesn't provide any means 27 | * of mutation, but that doesn't mean that there isn't a non-interface 28 | * way of mutating an instance. 29 | * 30 | * @return {@code true} iff this instance is somehow mutable 31 | */ 32 | public boolean isMutable(); 33 | 34 | /** 35 | * Get the number of fields in the list. 36 | * 37 | * @return the size 38 | */ 39 | public int size(); 40 | 41 | /** 42 | * Get the {@code n}th field. 43 | * 44 | * @param n {@code n >= 0, n < size();} which field 45 | * @return {@code non-null;} the field in question 46 | */ 47 | public Field get(int n); 48 | } 49 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/Method.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | import com.android.dx.rop.type.Prototype; 20 | 21 | /** 22 | * Interface representing methods of class files. 23 | */ 24 | public interface Method 25 | extends Member 26 | { 27 | /** 28 | * Get the effective method descriptor, which includes, if 29 | * necessary, a first {@code this} parameter. 30 | * 31 | * @return {@code non-null;} the effective method descriptor 32 | */ 33 | public Prototype getEffectiveDescriptor(); 34 | } 35 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/MethodList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | /** 20 | * Interface for lists of methods. 21 | */ 22 | public interface MethodList { 23 | /** 24 | * Get whether this instance is mutable. Note that the 25 | * {@code MethodList} interface itself doesn't provide any means 26 | * of mutation, but that doesn't mean that there isn't a non-interface 27 | * way of mutating an instance. 28 | * 29 | * @return {@code true} iff this instance is somehow mutable 30 | */ 31 | public boolean isMutable(); 32 | 33 | /** 34 | * Get the number of methods in the list. 35 | * 36 | * @return the size 37 | */ 38 | public int size(); 39 | 40 | /** 41 | * Get the {@code n}th method. 42 | * 43 | * @param n {@code n >= 0, n < size();} which method 44 | * @return {@code non-null;} the method in question 45 | */ 46 | public Method get(int n); 47 | } 48 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/ParseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | import com.android.dx.util.ExceptionWithContext; 20 | 21 | /** 22 | * Exception from parsing. 23 | */ 24 | public class ParseException 25 | extends ExceptionWithContext { 26 | public ParseException(String message) { 27 | super(message); 28 | } 29 | 30 | public ParseException(Throwable cause) { 31 | super(cause); 32 | } 33 | 34 | public ParseException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/StdFieldList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | import com.android.dx.util.FixedSizeList; 20 | 21 | /** 22 | * Standard implementation of {@link FieldList}, which directly stores 23 | * an array of {@link Field} objects and can be made immutable. 24 | */ 25 | public final class StdFieldList extends FixedSizeList implements FieldList { 26 | /** 27 | * Constructs an instance. All indices initially contain {@code null}. 28 | * 29 | * @param size the size of the list 30 | */ 31 | public StdFieldList(int size) { 32 | super(size); 33 | } 34 | 35 | /** {@inheritDoc} */ 36 | public Field get(int n) { 37 | return (Field) get0(n); 38 | } 39 | 40 | /** 41 | * Sets the field at the given index. 42 | * 43 | * @param n {@code >= 0, < size();} which field 44 | * @param field {@code null-ok;} the field object 45 | */ 46 | public void set(int n, Field field) { 47 | set0(n, field); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/StdMethodList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.cf.iface; 18 | 19 | import com.android.dx.util.FixedSizeList; 20 | 21 | /** 22 | * Standard implementation of {@link MethodList}, which directly stores 23 | * an array of {@link Method} objects and can be made immutable. 24 | */ 25 | public final class StdMethodList extends FixedSizeList implements MethodList { 26 | /** 27 | * Constructs an instance. All indices initially contain {@code null}. 28 | * 29 | * @param size the size of the list 30 | */ 31 | public StdMethodList(int size) { 32 | super(size); 33 | } 34 | 35 | /** {@inheritDoc} */ 36 | public Method get(int n) { 37 | return (Method) get0(n); 38 | } 39 | 40 | /** 41 | * Sets the method at the given index. 42 | * 43 | * @param n {@code >= 0, < size();} which method 44 | * @param method {@code null-ok;} the method object 45 | */ 46 | public void set(int n, Method method) { 47 | set0(n, method); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/cf/iface/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Interfaces and base classes for dealing with class files. This package 3 | doesn't have any parsing but does have basic container implementations.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • com.android.dx.rop.pool
  • 8 |
  • com.android.dx.util
  • 9 |
10 | 11 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/command/DxConsole.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.command; 18 | 19 | import java.io.PrintStream; 20 | 21 | /** 22 | * Provides standard and error PrintStream object to output information.
23 | * By default the PrintStream objects link to {@code System.out} and 24 | * {@code System.err} but they can be changed to link to other 25 | * PrintStream. 26 | */ 27 | public class DxConsole { 28 | /** 29 | * Standard output stream. Links to {@code System.out} by default. 30 | */ 31 | public static PrintStream out = System.out; 32 | 33 | /** 34 | * Error output stream. Links to {@code System.err} by default. 35 | */ 36 | public static PrintStream err = System.err; 37 | } 38 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/command/UsageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.command; 18 | 19 | /** 20 | * Simple exception class used to communicate that the command-line tool 21 | * should print the usage message. 22 | */ 23 | public class UsageException extends RuntimeException { 24 | // This space intentionally left blank. 25 | } 26 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/command/dump/Args.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.command.dump; 18 | 19 | /** 20 | * contains command line parsedArgs values 21 | */ 22 | class Args { 23 | /** whether to run in debug mode */ 24 | boolean debug = false; 25 | 26 | /** whether to dump raw bytes where salient */ 27 | boolean rawBytes = false; 28 | 29 | /** whether to dump information about basic blocks */ 30 | boolean basicBlocks = false; 31 | 32 | /** whether to dump regiserized blocks */ 33 | boolean ropBlocks = false; 34 | 35 | /** whether to dump SSA-form blocks */ 36 | boolean ssaBlocks = false; 37 | 38 | /** Step in SSA processing to stop at, or null for all */ 39 | String ssaStep = null; 40 | 41 | /** whether to run SSA optimizations */ 42 | boolean optimize = false; 43 | 44 | /** whether to be strict about parsing classfiles*/ 45 | boolean strictParse = false; 46 | 47 | /** max width for columnar output */ 48 | int width = 0; 49 | 50 | /** whether to dump flow-graph in "dot" format */ 51 | boolean dotDump = false; 52 | 53 | /** if non-null, an explicit method to dump */ 54 | String method; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/dex/cf/CfOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.dex.cf; 18 | 19 | import com.android.dx.dex.code.PositionList; 20 | 21 | import java.io.PrintStream; 22 | 23 | /** 24 | * A class to contain options passed into dex.cf 25 | */ 26 | public class CfOptions { 27 | /** how much source position info to preserve */ 28 | public int positionInfo = PositionList.LINES; 29 | 30 | /** whether to keep local variable information */ 31 | public boolean localInfo = false; 32 | 33 | /** whether strict file-name-vs-class-name checking should be done */ 34 | public boolean strictNameCheck = true; 35 | 36 | /** whether to do SSA/register optimization */ 37 | public boolean optimize = false; 38 | 39 | /** filename containing list of methods to optimize */ 40 | public String optimizeListFile = null; 41 | 42 | /** filename containing list of methods not to optimize */ 43 | public String dontOptimizeListFile = null; 44 | 45 | /** whether to print statistics to stdout at end of compile cycle */ 46 | public boolean statistics; 47 | 48 | /** where to issue warnings to */ 49 | public PrintStream warn = System.err; 50 | } 51 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/dex/cf/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Classes for translating Java classfiles into Dalvik classes.

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • com.android.dx.cf.code
  • 7 |
  • com.android.dx.cf.direct
  • 8 |
  • com.android.dx.cf.iface
  • 9 |
  • com.android.dx.dex.code
  • 10 |
  • com.android.dx.dex.file
  • 11 |
  • com.android.dx.rop.code
  • 12 |
  • com.android.dx.rop.cst
  • 13 |
  • com.android.dx.util
  • 14 |
15 | 16 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/dex/code/CatchBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.dex.code; 18 | 19 | import com.android.dx.rop.type.Type; 20 | 21 | import java.util.HashSet; 22 | 23 | /** 24 | * Interface for the construction of {@link CatchTable} instances. 25 | */ 26 | public interface CatchBuilder { 27 | /** 28 | * Builds and returns the catch table for this instance. 29 | * 30 | * @return {@code non-null;} the constructed table 31 | */ 32 | public CatchTable build(); 33 | 34 | /** 35 | * Gets whether this instance has any catches at all (either typed 36 | * or catch-all). 37 | * 38 | * @return whether this instance has any catches at all 39 | */ 40 | public boolean hasAnyCatches(); 41 | 42 | /** 43 | * Gets the set of catch types associated with this instance. 44 | * 45 | * @return {@code non-null;} the set of catch types 46 | */ 47 | public HashSet getCatchTypes(); 48 | } 49 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/dex/code/VariableSizeInsn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.dex.code; 18 | 19 | import com.android.dx.rop.code.RegisterSpecList; 20 | import com.android.dx.rop.code.SourcePosition; 21 | 22 | /** 23 | * Pseudo-instruction base class for variable-sized instructions. 24 | */ 25 | public abstract class VariableSizeInsn extends DalvInsn { 26 | /** 27 | * Constructs an instance. The output address of this instance is initially 28 | * unknown ({@code -1}). 29 | * 30 | * @param position {@code non-null;} source position 31 | * @param registers {@code non-null;} source registers 32 | */ 33 | public VariableSizeInsn(SourcePosition position, 34 | RegisterSpecList registers) { 35 | super(Dops.SPECIAL_FORMAT, position, registers); 36 | } 37 | 38 | /** {@inheritDoc} */ 39 | @Override 40 | public final DalvInsn withOpcode(Dop opcode) { 41 | throw new RuntimeException("unsupported"); 42 | } 43 | 44 | /** {@inheritDoc} */ 45 | @Override 46 | public final DalvInsn withRegisterOffset(int delta) { 47 | return withRegisters(getRegisters().withOffset(delta)); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/dex/file/MemberIdsSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.dex.file; 18 | 19 | /** 20 | * Member (field or method) refs list section of a {@code .dex} file. 21 | */ 22 | public abstract class MemberIdsSection extends UniformItemSection { 23 | /** 24 | * Constructs an instance. The file offset is initially unknown. 25 | * 26 | * @param name {@code null-ok;} the name of this instance, for annotation 27 | * purposes 28 | * @param file {@code non-null;} file that this instance is part of 29 | */ 30 | public MemberIdsSection(String name, DexFile file) { 31 | super(name, file, 4); 32 | } 33 | 34 | /** {@inheritDoc} */ 35 | @Override 36 | protected void orderItems() { 37 | int idx = 0; 38 | 39 | for (Object i : items()) { 40 | ((MemberIdItem) i).setIndex(idx); 41 | idx++; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/rop/annotation/AnnotationVisibility.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.rop.annotation; 18 | 19 | import com.android.dx.util.ToHuman; 20 | 21 | /** 22 | * Visibility scope of an annotation. 23 | */ 24 | public enum AnnotationVisibility implements ToHuman { 25 | RUNTIME("runtime"), 26 | BUILD("build"), 27 | SYSTEM("system"), 28 | EMBEDDED("embedded"); 29 | 30 | /** {@code non-null;} the human-oriented string representation */ 31 | private final String human; 32 | 33 | /** 34 | * Constructs an instance. 35 | * 36 | * @param human {@code non-null;} the human-oriented string representation 37 | */ 38 | private AnnotationVisibility(String human) { 39 | this.human = human; 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | public String toHuman() { 44 | return human; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/rop/code/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Classes relating to a register-based opcode system.

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • com.android.dx.util
  • 7 |
8 | 9 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/rop/cst/CstMethodRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.rop.cst; 18 | 19 | /** 20 | * Constants of type {@code CONSTANT_Methodref_info}. 21 | */ 22 | public final class CstMethodRef 23 | extends CstBaseMethodRef { 24 | /** 25 | * Constructs an instance. 26 | * 27 | * @param definingClass {@code non-null;} the type of the defining class 28 | * @param nat {@code non-null;} the name-and-type 29 | */ 30 | public CstMethodRef(CstType definingClass, CstNat nat) { 31 | super(definingClass, nat); 32 | } 33 | 34 | /** {@inheritDoc} */ 35 | @Override 36 | public String typeName() { 37 | return "method"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/rop/cst/TypedConstant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.rop.cst; 18 | 19 | import com.android.dx.rop.type.TypeBearer; 20 | 21 | /** 22 | * Base class for constants which implement {@link TypeBearer}. 23 | */ 24 | public abstract class TypedConstant 25 | extends Constant implements TypeBearer { 26 | /** 27 | * {@inheritDoc} 28 | * 29 | * This implentation always returns {@code this}. 30 | */ 31 | public final TypeBearer getFrameType() { 32 | return this; 33 | } 34 | 35 | /** {@inheritDoc} */ 36 | public final int getBasicType() { 37 | return getType().getBasicType(); 38 | } 39 | 40 | /** {@inheritDoc} */ 41 | public final int getBasicFrameType() { 42 | return getType().getBasicFrameType(); 43 | } 44 | 45 | /** {@inheritDoc} */ 46 | public final boolean isConstant() { 47 | return true; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/rop/cst/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Interfaces and implementation of things related to the constant pool.

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • com.android.dx.rop.type
  • 7 |
  • com.android.dx.util
  • 8 |
9 | 10 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/rop/type/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of classes that represent types (classes or primitives).

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • com.android.dx.util
  • 7 |
8 | 9 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/ssa/_tests/_DomFront.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.ssa._tests; 18 | 19 | import junit.framework.TestCase; 20 | 21 | /** 22 | * Test the class {@code com.android.dx.ssa.DomFront}. 23 | */ 24 | public class _DomFront 25 | extends TestCase { 26 | 27 | public void test_one() { 28 | 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/IntIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.util; 18 | 19 | /** 20 | * An iterator for a list of ints. 21 | */ 22 | public interface IntIterator { 23 | 24 | /** 25 | * Checks to see if the iterator has a next value. 26 | * 27 | * @return true if next() will succeed 28 | */ 29 | boolean hasNext(); 30 | 31 | /** 32 | * Returns the next value in the iterator. 33 | * 34 | * @return next value 35 | * @throws java.util.NoSuchElementException if no next element exists 36 | */ 37 | int next(); 38 | } 39 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/LabeledItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.util; 18 | 19 | /** 20 | * An item that has an integer label. 21 | */ 22 | public interface LabeledItem { 23 | 24 | /* 25 | * Gets the label of this block. 26 | * 27 | * @return {@code >= 0;} the label 28 | */ 29 | public int getLabel(); 30 | } 31 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/MutabilityException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.util; 18 | 19 | /** 20 | * Exception due to a mutability problem. 21 | */ 22 | public class MutabilityException 23 | extends ExceptionWithContext { 24 | public MutabilityException(String message) { 25 | super(message); 26 | } 27 | 28 | public MutabilityException(Throwable cause) { 29 | super(cause); 30 | } 31 | 32 | public MutabilityException(String message, Throwable cause) { 33 | super(message, cause); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/ToHuman.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.util; 18 | 19 | /** 20 | * Simple interface for objects that can return a "human" (as opposed to 21 | * a complete but often hard to read) string form. 22 | */ 23 | public interface ToHuman { 24 | /** 25 | * Return the "human" string form of this instance. This is 26 | * generally less "debuggy" than {@code toString()}. 27 | * 28 | * @return {@code non-null;} the human string form 29 | */ 30 | public String toHuman(); 31 | } 32 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/Warning.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.util; 18 | 19 | /** 20 | * Exception which is meant to indicate a non-fatal warning. 21 | */ 22 | public class Warning extends RuntimeException { 23 | /** 24 | * Constructs an instance. 25 | * 26 | * @param message human-oriented message 27 | */ 28 | public Warning(String message) { 29 | super(message); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/Writers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.dx.util; 18 | 19 | import java.io.PrintWriter; 20 | import java.io.Writer; 21 | 22 | /** 23 | * Utilities for dealing with {@code Writer}s. 24 | */ 25 | public final class Writers { 26 | /** 27 | * This class is uninstantiable. 28 | */ 29 | private Writers() { 30 | // This space intentionally left blank. 31 | } 32 | 33 | /** 34 | * Makes a {@code PrintWriter} for the given {@code Writer}, 35 | * returning the given writer if it already happens to be the right 36 | * class. 37 | * 38 | * @param writer {@code non-null;} writer to (possibly) wrap 39 | * @return {@code non-null;} an appropriate instance 40 | */ 41 | public static PrintWriter printWriterFor(Writer writer) { 42 | if (writer instanceof PrintWriter) { 43 | return (PrintWriter) writer; 44 | } 45 | 46 | return new PrintWriter(writer); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /packages/java-support/src/com/android/dx/util/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes for class file access/manipulation.

3 | 4 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ArrayAccessTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for an array access expression. 30 | * 31 | * For example: 32 | *
33 |  *   expression [ index ]
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 15.13" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface ArrayAccessTree extends ExpressionTree { 43 | ExpressionTree getExpression(); 44 | ExpressionTree getIndex(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ArrayTypeTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for an array type. 30 | * 31 | * For example: 32 | *
33 |  *   type []
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 10.1" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface ArrayTypeTree extends Tree { 43 | Tree getType(); 44 | } 45 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/AssignmentTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for an assignment expression. 30 | * 31 | * For example: 32 | *
33 |  *   variable = expression
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 15.26.1" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface AssignmentTree extends ExpressionTree { 43 | ExpressionTree getVariable(); 44 | ExpressionTree getExpression(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/BreakTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | import javax.lang.model.element.Name; 29 | 30 | /** 31 | * A tree node for a 'break' statement. 32 | * 33 | * For example: 34 | *
35 |  *   break;
36 |  *
37 |  *   break label ;
38 |  * 
39 | * 40 | * @see "The Java Language Specification, 3rd ed, section 14.15" 41 | * 42 | * @author Peter von der Ahé 43 | * @author Jonathan Gibbons 44 | * @since 1.6 45 | */ 46 | public interface BreakTree extends StatementTree { 47 | Name getLabel(); 48 | } 49 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/CatchTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a 'catch' block in a 'try' statement. 30 | * 31 | * For example: 32 | *
33 |  *   catch ( parameter )
34 |  *       block
35 |  * 
36 | * 37 | * @see "The Java Language Specification, 3rd ed, section 14.20" 38 | * 39 | * @author Peter von der Ahé 40 | * @author Jonathan Gibbons 41 | * @since 1.6 42 | */ 43 | public interface CatchTree extends Tree { 44 | VariableTree getParameter(); 45 | BlockTree getBlock(); 46 | } 47 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ContinueTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | import javax.lang.model.element.Name; 29 | 30 | /** 31 | * A tree node for a 'continue' statement. 32 | * 33 | * For example: 34 | *
35 |  *   continue;
36 |  *   continue label ;
37 |  * 
38 | * 39 | * @see "The Java Language Specification, 3rd ed, section 14.16" 40 | * 41 | * @author Peter von der Ahé 42 | * @author Jonathan Gibbons 43 | * @since 1.6 44 | */ 45 | public interface ContinueTree extends StatementTree { 46 | Name getLabel(); 47 | } 48 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/EmptyStatementTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for an empty (skip) statement. 30 | * 31 | * For example: 32 | *
33 |  *    ;
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 14.6" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface EmptyStatementTree extends StatementTree {} 43 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ErroneousTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | import java.util.List; 29 | 30 | /** 31 | * A tree node to stand in for a malformed expression. 32 | * 33 | * @author Peter von der Ahé 34 | * @author Jonathan Gibbons 35 | * @since 1.6 36 | */ 37 | public interface ErroneousTree extends ExpressionTree { 38 | List getErrorTrees(); 39 | } 40 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ExpressionStatementTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for an expression statement. 30 | * 31 | * For example: 32 | *
33 |  *   expression ;
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 14.8" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface ExpressionStatementTree extends StatementTree { 43 | ExpressionTree getExpression(); 44 | } 45 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ExpressionTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node used as the base class for the different types of 30 | * expressions. 31 | * 32 | * @see "The Java Language Specification, 3rd ed, chapter 15" 33 | * 34 | * @author Peter von der Ahé 35 | * @author Jonathan Gibbons 36 | * @since 1.6 37 | */ 38 | public interface ExpressionTree extends Tree {} 39 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/IdentifierTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | import javax.lang.model.element.Name; 29 | 30 | /** 31 | * A tree node for an identifier expression. 32 | * 33 | * For example: 34 | *
35 |  *   name
36 |  * 
37 | * 38 | * @see "The Java Language Specification, 3rd ed, section 6.5.6.1" 39 | * 40 | * @author Peter von der Ahé 41 | * @author Jonathan Gibbons 42 | * @since 1.6 43 | */ 44 | public interface IdentifierTree extends ExpressionTree { 45 | Name getName(); 46 | } 47 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/InstanceOfTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for an 'instanceof' expression. 30 | * 31 | * For example: 32 | *
33 |  *   expression instanceof type
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 15.20.2" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface InstanceOfTree extends ExpressionTree { 43 | ExpressionTree getExpression(); 44 | Tree getType(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/LiteralTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a literal expression. 30 | * Use {@link #getKind getKind} to determine the kind of literal. 31 | * 32 | * For example: 33 | *
34 |  *   value
35 |  * 
36 | * 37 | * @see "The Java Language Specification, 3rd ed, section 15.28" 38 | * 39 | * @author Peter von der Ahé 40 | * @author Jonathan Gibbons 41 | * @since 1.6 42 | */ 43 | public interface LiteralTree extends ExpressionTree { 44 | Object getValue(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ParenthesizedTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a parenthesized expression. Note: parentheses 30 | * not be preserved by the parser. 31 | * 32 | * For example: 33 | *
34 |  *   ( expression )
35 |  * 
36 | * 37 | * @see "The Java Language Specification, 3rd ed, section 15.8.5" 38 | * 39 | * @author Peter von der Ahé 40 | * @author Jonathan Gibbons 41 | * @since 1.6 42 | */ 43 | public interface ParenthesizedTree extends ExpressionTree { 44 | ExpressionTree getExpression(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/PrimitiveTypeTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | import javax.lang.model.type.TypeKind; 29 | 30 | /** 31 | * A tree node for a primitive type. 32 | * 33 | * For example: 34 | *
35 |  *   primitiveTypeKind
36 |  * 
37 | * 38 | * @see "The Java Language Specification, 3rd ed, section 4.2" 39 | * 40 | * @author Peter von der Ahé 41 | * @author Jonathan Gibbons 42 | * @since 1.6 43 | */ 44 | public interface PrimitiveTypeTree extends Tree { 45 | TypeKind getPrimitiveTypeKind(); 46 | } 47 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ReturnTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a 'return' statement. 30 | * 31 | * For example: 32 | *
33 |  *   return;
34 |  *   return expression;
35 |  * 
36 | * 37 | * @see "The Java Language Specification, 3rd ed, section 14.17" 38 | * 39 | * @author Peter von der Ahé 40 | * @author Jonathan Gibbons 41 | * @since 1.6 42 | */ 43 | public interface ReturnTree extends StatementTree { 44 | ExpressionTree getExpression(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/StatementTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node used as the base class for the different kinds of 30 | * statements. 31 | * 32 | * @see "The Java Language Specification, 3rd ed, chapter 14" 33 | * 34 | * @author Peter von der Ahé 35 | * @author Jonathan Gibbons 36 | * @since 1.6 37 | */ 38 | public interface StatementTree extends Tree {} 39 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/SynchronizedTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a 'synchronized' statement. 30 | * 31 | * For example: 32 | *
33 |  *   synchronized ( expression )
34 |  *       block
35 |  * 
36 | * 37 | * @see "The Java Language Specification, 3rd ed, section 14.19" 38 | * 39 | * @author Peter von der Ahé 40 | * @author Jonathan Gibbons 41 | * @since 1.6 42 | */ 43 | public interface SynchronizedTree extends StatementTree { 44 | ExpressionTree getExpression(); 45 | BlockTree getBlock(); 46 | } 47 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/ThrowTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a 'throw' statement. 30 | * 31 | * For example: 32 | *
33 |  *   throw expression;
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 14.18" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface ThrowTree extends StatementTree { 43 | ExpressionTree getExpression(); 44 | } 45 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/TypeCastTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a type cast expression. 30 | * 31 | * For example: 32 | *
33 |  *   ( type ) expression
34 |  * 
35 | * 36 | * @see "The Java Language Specification, 3rd ed, section 15.16" 37 | * 38 | * @author Peter von der Ahé 39 | * @author Jonathan Gibbons 40 | * @since 1.6 41 | */ 42 | public interface TypeCastTree extends ExpressionTree { 43 | Tree getType(); 44 | ExpressionTree getExpression(); 45 | } 46 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/WhileLoopTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.tree; 27 | 28 | /** 29 | * A tree node for a 'while' loop statement. 30 | * 31 | * For example: 32 | *
33 |  *   while ( condition )
34 |  *     statement
35 |  * 
36 | * 37 | * 38 | * @see "The Java Language Specification, 3rd ed, section 14.12" 39 | * 40 | * @author Peter von der Ahé 41 | * @author Jonathan Gibbons 42 | * @since 1.6 43 | */ 44 | public interface WhileLoopTree extends StatementTree { 45 | ExpressionTree getCondition(); 46 | StatementTree getStatement(); 47 | } 48 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/tree/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * Provides interfaces to represent source code as abstract syntax 28 | * trees (AST). 29 | * 30 | * @author Peter von der Ahé 31 | * @author Jonathan Gibbons 32 | * @since 1.6 33 | */ 34 | package com.sun.source.tree; 35 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/util/TaskListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.source.util; 27 | 28 | 29 | /** 30 | * Provides a listener to monitor the activity of the JDK Java Compiler, javac. 31 | * 32 | * @author Jonathan Gibbons 33 | * @since 1.6 34 | */ 35 | public interface TaskListener 36 | { 37 | public void started(TaskEvent e); 38 | 39 | public void finished(TaskEvent e); 40 | } 41 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/source/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | /** 27 | * Provides utilities for operations on abstract syntax trees (AST). 28 | * 29 | * @author Peter von der Ahé 30 | * @author Jonathan Gibbons 31 | * @since 1.6 32 | */ 33 | package com.sun.source.util; 34 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/tools/javac/code/BoundKind.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package com.sun.tools.javac.code; 27 | 28 | 29 | public enum BoundKind { 30 | EXTENDS("? extends "), 31 | SUPER("? super "), 32 | UNBOUND("?"); 33 | 34 | private final String name; 35 | 36 | BoundKind(String name) { 37 | this.name = name; 38 | } 39 | 40 | public String toString() { return name; } 41 | } 42 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/tools/javac/resources/version.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # This code is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License version 2 only, as 7 | # published by the Free Software Foundation. Oracle designates this 8 | # particular file as subject to the "Classpath" exception as provided 9 | # by Oracle in the LICENSE file that accompanied this code. 10 | # 11 | # This code is distributed in the hope that it will be useful, but WITHOUT 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | # version 2 for more details (a copy is included in the LICENSE file that 15 | # accompanied this code). 16 | # 17 | # You should have received a copy of the GNU General Public License version 18 | # 2 along with this work; if not, write to the Free Software Foundation, 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | # or visit www.oracle.com if you need additional information or have any 23 | # questions. 24 | # 25 | 26 | jdk=$(JDK_VERSION) 27 | full=$(FULL_VERSION) 28 | release=$(RELEASE) 29 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/tools/javac/resources/version.properties-template: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # This code is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License version 2 only, as 7 | # published by the Free Software Foundation. Oracle designates this 8 | # particular file as subject to the "Classpath" exception as provided 9 | # by Oracle in the LICENSE file that accompanied this code. 10 | # 11 | # This code is distributed in the hope that it will be useful, but WITHOUT 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | # version 2 for more details (a copy is included in the LICENSE file that 15 | # accompanied this code). 16 | # 17 | # You should have received a copy of the GNU General Public License version 18 | # 2 along with this work; if not, write to the Free Software Foundation, 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | # or visit www.oracle.com if you need additional information or have any 23 | # questions. 24 | # 25 | 26 | jdk=$(JDK_VERSION) 27 | full=$(FULL_VERSION) 28 | release=$(RELEASE) 29 | -------------------------------------------------------------------------------- /packages/java-support/src/com/sun/tools/javac/services/javax.tools.JavaCompilerTool: -------------------------------------------------------------------------------- 1 | com.sun.tools.javac.api.Tool 2 | -------------------------------------------------------------------------------- /packages/java-support/src/javax/lang/model/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 28 | 29 | 30 | 31 | 32 | 33 | Packages used to model various aspects of the Java programming language. 34 | 35 | @since 1.6 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /packages/java-support/src/javax/lang/model/type/NullType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package javax.lang.model.type; 27 | 28 | 29 | /** 30 | * Represents the null type. 31 | * This is the type of the expression {@code null}, 32 | * 33 | * @author Joseph D. Darcy 34 | * @author Scott Seligman 35 | * @author Peter von der Ahé 36 | * @since 1.6 37 | */ 38 | 39 | public interface NullType extends ReferenceType { 40 | } 41 | -------------------------------------------------------------------------------- /packages/java-support/src/javax/lang/model/type/PrimitiveType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package javax.lang.model.type; 27 | 28 | 29 | /** 30 | * Represents a primitive type. These include 31 | * {@code boolean}, {@code byte}, {@code short}, {@code int}, 32 | * {@code long}, {@code char}, {@code float}, and {@code double}. 33 | * 34 | * @author Joseph D. Darcy 35 | * @author Scott Seligman 36 | * @author Peter von der Ahé 37 | * @since 1.6 38 | */ 39 | public interface PrimitiveType extends TypeMirror { 40 | } 41 | -------------------------------------------------------------------------------- /packages/java-support/src/javax/lang/model/type/ReferenceType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package javax.lang.model.type; 27 | 28 | 29 | /** 30 | * Represents a reference type. 31 | * These include class and interface types, array types, type variables, 32 | * and the null type. 33 | * 34 | * @author Joseph D. Darcy 35 | * @author Scott Seligman 36 | * @author Peter von der Ahé 37 | * @since 1.6 38 | */ 39 | public interface ReferenceType extends TypeMirror { 40 | } 41 | -------------------------------------------------------------------------------- /packages/java-support/src/javax/tools/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | The Java™ programming language compiler API is a set of interfaces that describes the 5 | functions provided by a compiler. This API has three 6 | main objectives: 7 |

8 | 9 |
    10 | 11 |
  • Allow invocation of a compiler from a program using 12 | standardized interfaces.
  • 13 | 14 |
  • Provide interfaces enabling the compiler to report diagnostics in a 15 | structured way.
  • 16 | 17 |
  • Provide interfaces enabling clients of the compiler to override 18 | how file objects are found. "File objects" is a file 19 | abstraction.
  • 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/kbox-login/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=0.0.1 4 | VVERSION=$VERSION 5 | SUFFIX=tar.gz 6 | NAME=kbox-login 7 | DOWNLOAD_URL=https://github.com/kevinboone/kbox-login/archive/$VVERSION.$SUFFIX 8 | 9 | . ../../env.sh 10 | 11 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 12 | TARGET=$BUILD_DIR/$NAME 13 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 14 | 15 | if [ -f $DEB ]; then 16 | echo $DEB exists -- delete it to rebuild 17 | exit 0; 18 | fi 19 | 20 | if [ ! -d $BUILD_DIR ]; then 21 | mkdir -p $STAGING/tarballs 22 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 23 | if [ ! -f $TARBALL ]; then 24 | echo "Downloading $VERSION" 25 | wget -O $TARBALL $DOWNLOAD_URL 26 | else 27 | echo "Using cached $TARBALL" 28 | fi 29 | mkdir -p $STAGING 30 | (cd $STAGING; tar xfvz $TARBALL) 31 | else 32 | echo "Building cached $NAME-$VERSION" 33 | fi 34 | 35 | echo "Running make" 36 | 37 | mkdir -p $BUILD_DIR/image/ 38 | 39 | (cd $BUILD_DIR; make CC=$CC DESTDIR=`pwd`/image all install) 40 | 41 | 42 | echo "Building package" 43 | mkdir -p $BUILD_DIR/out 44 | 45 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 46 | 47 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 48 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 49 | echo "2.0" > $BUILD_DIR/out/debian-binary 50 | rm -f $DEB 51 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 52 | cp -p $DEB $DIST/ 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /packages/kbox-login/control: -------------------------------------------------------------------------------- 1 | Package: kbox-login 2 | Version: %VERSION% 3 | Section: security 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A login helper, for use with utilities that expect to be able to invoke /bin/login. 8 | -------------------------------------------------------------------------------- /packages/kbox-login/packageinfo.html: -------------------------------------------------------------------------------- 1 | A rudimentary implementation of a login utility. Android has no concept of 2 | users -- at least at the Linux level -- so "logging in" makes little sense. 3 | However, some utilities expect to be able to invoke the login program, 4 | so this package provides one. The single user defined in the file 5 | /etc/kbox-password, and defaults to user kbox 6 | with the same password. 7 | 8 | -------------------------------------------------------------------------------- /packages/kcalc/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #https://github.com/kevinboone/kcalc/archive/8.0.tar.gz 3 | 4 | VERSION=8.0 5 | VVERSION=$VERSION 6 | SUFFIX=tar.gz 7 | NAME=kcalc 8 | DOWNLOAD_URL=https://github.com/kevinboone/kcalc/archive/$VVERSION.$SUFFIX 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; tar xfvz $TARBALL) 32 | else 33 | echo "Building cached $NAME-$VERSION" 34 | fi 35 | 36 | echo "Running make" 37 | 38 | mkdir -p $BUILD_DIR/image/ 39 | 40 | (cd $BUILD_DIR; make CC=$CC DESTDIR=`pwd`/image all install) 41 | 42 | 43 | echo "Building package" 44 | mkdir -p $BUILD_DIR/out 45 | 46 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 47 | 48 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 49 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 50 | echo "2.0" > $BUILD_DIR/out/debian-binary 51 | rm -f $DEB 52 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 53 | cp -p $DEB $DIST/ 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /packages/kcalc/control: -------------------------------------------------------------------------------- 1 | Package: kcalc 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: readline 7 | Description: A command-line calculator, based on Lua. 8 | -------------------------------------------------------------------------------- /packages/kcalc/packageinfo.html: -------------------------------------------------------------------------------- 1 | A command-line calculator and math library based on Lua. kcalc is designed 2 | to fill the gap between trivial four-function calculators, and 3 | math heavyweights like Octave. For more information, see 4 | here. 5 | -------------------------------------------------------------------------------- /packages/kcrypt/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #https://github.com/kevinboone/solunar_cmdline/archive/0.1.3a.tar.gz 3 | 4 | VERSION=6.0a 5 | VVERSION=$VERSION 6 | SUFFIX=tar.gz 7 | NAME=kcrypt 8 | DOWNLOAD_URL=https://github.com/kevinboone/kcrypt/archive/$VVERSION.$SUFFIX 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/kcrypt-${VERSION} 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; tar xfvz $TARBALL) 32 | else 33 | echo "Building cached $NAME-$VERSION" 34 | fi 35 | 36 | echo "Running make" 37 | 38 | mkdir -p $BUILD_DIR/image/ 39 | 40 | (cd $BUILD_DIR; make CC=$CC LDFLAGS="-pie" CFLAGS="-fpie -fpic" DESTDIR=`pwd`/image all install) 41 | 42 | 43 | echo "Building package" 44 | mkdir -p $BUILD_DIR/out 45 | 46 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 47 | 48 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 49 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 50 | echo "2.0" > $BUILD_DIR/out/debian-binary 51 | rm -f $DEB 52 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 53 | cp -p $DEB $DIST/ 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /packages/kcrypt/control: -------------------------------------------------------------------------------- 1 | Package: kcrypt 2 | Version: %VERSION% 3 | Section: security 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A command-line file encryptor/obfusctor, based on the IDEA algorithm. 8 | -------------------------------------------------------------------------------- /packages/kcrypt/packageinfo.html: -------------------------------------------------------------------------------- 1 | kcrypt is a file encryption and obfuscation utility, originally written twenty 2 | years ago for Windows. It can operate on a directory full of files, 3 | and mangle their filenames as well as encrypting them. Original filenames 4 | are restored on decryption. 5 |

6 | On Linux, such operations are usually better handled using encrypted 7 | filesystems. However, I have resurrected the utility for KBOX, because 8 | non-rooted devices don't have access to encrypted filesystems. 9 |

10 | For more information, see here. 11 | -------------------------------------------------------------------------------- /packages/lftp/BROKEN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kbox4/source/fe05a91b719f525e453e713468db7e084c7a27c1/packages/lftp/BROKEN -------------------------------------------------------------------------------- /packages/lftp/control: -------------------------------------------------------------------------------- 1 | Package: lftp 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A modern FTP client. 8 | -------------------------------------------------------------------------------- /packages/lftp/packageinfo.html: -------------------------------------------------------------------------------- 1 | A modern FTP client, with FTPS support. 2 | 3 | -------------------------------------------------------------------------------- /packages/lftp/patch_Resolver.cc: -------------------------------------------------------------------------------- 1 | 95a96,104 2 | > int mblen (const char *s, size_t n) 3 | > { 4 | > if (!s) return 0; 5 | > if (!*s) return -1; 6 | > int c = 0; 7 | > while ((*s & 0xC0) == 0x80 && c < n) { c++; s++; } 8 | > return c; 9 | > } 10 | > 11 | 375,379c384,388 12 | < #ifdef HAVE_DN_EXPAND // newer resolver versions have dn_expand and dn_skipname 13 | < if(store) 14 | < dn_expand(answer,scan+len,scan,store,store_len); 15 | < return dn_skipname(scan,scan+len); 16 | < #else // ...older don't. 17 | --- 18 | > //#ifdef HAVE_DN_EXPAND // newer resolver versions have dn_expand and dn_skipname 19 | > // if(store) 20 | > // dn_expand(answer,scan+len,scan,store,store_len); 21 | > // return dn_skipname(scan,scan+len); 22 | > //#else // ...older don't. 23 | 436c445 24 | < #endif // DN_EXPAND 25 | --- 26 | > //#endif // DN_EXPAND 27 | -------------------------------------------------------------------------------- /packages/lftp/patch_config.h: -------------------------------------------------------------------------------- 1 | 375c375 2 | < #define HAVE_DECL_DN_EXPAND 1 3 | --- 4 | > #define HAVE_DECL_DN_EXPAND 0 5 | 536c536 6 | < #define HAVE_DN_EXPAND 1 7 | --- 8 | > #define HAVE_DN_EXPAND 0 9 | -------------------------------------------------------------------------------- /packages/libevent/patch_evutil_rand.c: -------------------------------------------------------------------------------- 1 | 198,199c198,199 2 | < arc4random_addrandom((unsigned char*)buf, 3 | < n>(size_t)INT_MAX ? INT_MAX : (int)n); 4 | --- 5 | > //arc4random_addrandom((unsigned char*)buf, 6 | > // n>(size_t)INT_MAX ? INT_MAX : (int)n); 7 | -------------------------------------------------------------------------------- /packages/lynx/conftest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kbox4/source/fe05a91b719f525e453e713468db7e084c7a27c1/packages/lynx/conftest -------------------------------------------------------------------------------- /packages/lynx/control: -------------------------------------------------------------------------------- 1 | Package: lynx 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A text-mode web browser. 8 | -------------------------------------------------------------------------------- /packages/lynx/packageinfo.html: -------------------------------------------------------------------------------- 1 | A console-mode, text-only Web browser. 2 | -------------------------------------------------------------------------------- /packages/make/control: -------------------------------------------------------------------------------- 1 | Package: make 2 | Version: %VERSION% 3 | Section: development 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: GNU make utility. 8 | -------------------------------------------------------------------------------- /packages/make/current: -------------------------------------------------------------------------------- 1 | 4.2 -------------------------------------------------------------------------------- /packages/make/packageinfo.html: -------------------------------------------------------------------------------- 1 | The GNU implementation of the traditional Unix dependency management utility. 2 | This is used as part of the build process of almost every C/C++ application 3 | for Linux. 4 | 5 | -------------------------------------------------------------------------------- /packages/mc/BROKEN: -------------------------------------------------------------------------------- 1 | Not working yet, because there is a dependency on glib. After that is fixed, 2 | there are many references to user/ground functions that will need to be 3 | removed. 4 | 5 | -------------------------------------------------------------------------------- /packages/mc/patch_cons.hander.c: -------------------------------------------------------------------------------- 1 | 208c208 2 | < mc_conssaver = concat_dir_and_file (SAVERDIR, "cons.saver"); 3 | --- 4 | > mc_conssaver = concat_dir_and_file ("/usr/libexec/mc", "cons.saver"); 5 | -------------------------------------------------------------------------------- /packages/mc/patch_editcmd.c: -------------------------------------------------------------------------------- 1 | 1522c1522 2 | < edit->stat1.st_mode |= S_IWRITE; 3 | --- 4 | > edit->stat1.st_mode |= S_IWUSR; 5 | -------------------------------------------------------------------------------- /packages/mc/patch_filegui.c: -------------------------------------------------------------------------------- 1 | 125,131c125,132 2 | < MSDOS_SUPER_MAGIC = 0x4d44, 3 | < NTFS_SB_MAGIC = 0x5346544e, 4 | < FUSE_MAGIC = 0x65735546, 5 | < PROC_SUPER_MAGIC = 0x9fa0, 6 | < SMB_SUPER_MAGIC = 0x517B, 7 | < NCP_SUPER_MAGIC = 0x564c, 8 | < USBDEVICE_SUPER_MAGIC = 0x9fa2 9 | --- 10 | > //MSDOS_SUPER_MAGIC = 0x4d44, 11 | > //NTFS_SB_MAGIC = 0x5346544e, 12 | > //FUSE_MAGIC = 0x65735546, 13 | > //PROC_SUPER_MAGIC = 0x9fa0, 14 | > //SMB_SUPER_MAGIC = 0x517B, 15 | > //NCP_SUPER_MAGIC = 0x564c, 16 | > //USBDEVICE_SUPER_MAGIC = 0x9fa2 17 | > x=0 18 | -------------------------------------------------------------------------------- /packages/nano/control: -------------------------------------------------------------------------------- 1 | Package: nano 2 | Version: %VERSION% 3 | Section: editors 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The GNU Nano text editor. 8 | -------------------------------------------------------------------------------- /packages/nano/packageinfo.html: -------------------------------------------------------------------------------- 1 | GNU Nano -- a lightweight and straightforward text editor. 2 | 3 | -------------------------------------------------------------------------------- /packages/nano/patch_config.h: -------------------------------------------------------------------------------- 1 | 640c640 2 | < #define HAVE_PWD_H 1 3 | --- 4 | > //#define HAVE_PWD_H 1 5 | -------------------------------------------------------------------------------- /packages/nano/patch_configure: -------------------------------------------------------------------------------- 1 | 34333,34334c34333,34334 2 | < { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5 3 | < ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5 4 | --- 5 | > { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurseswNONONO\""; } >&5 6 | > ($PKG_CONFIG --exists --print-errors "ncurseswNONONO") 2>&5 7 | -------------------------------------------------------------------------------- /packages/ncurses/control: -------------------------------------------------------------------------------- 1 | Package: ncurses 2 | Version: %VERSION% 3 | Section: libraries 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The standard screen-handling library and utilities. This package contains the development bits as well as the binaries, but not ther terminal database -- only the minimal definitions needed for use with a Linux console. 8 | -------------------------------------------------------------------------------- /packages/ncurses/linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kbox4/source/fe05a91b719f525e453e713468db7e084c7a27c1/packages/ncurses/linux -------------------------------------------------------------------------------- /packages/ncurses/packageinfo.html: -------------------------------------------------------------------------------- 1 | The standard library for manipulating a console, used by many utilties. 2 | This version includes the development header files and static libraries, 3 | for those who want to build ncurses-based applications directly on 4 | an Android device. 5 | 6 | -------------------------------------------------------------------------------- /packages/nmap/packageinfo.html: -------------------------------------------------------------------------------- 1 | A network scanner and security analysis tool. Contributed by David Martinez. 2 | -------------------------------------------------------------------------------- /packages/openssl/control: -------------------------------------------------------------------------------- 1 | Package: openssl 2 | Version: %VERSION% 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: OpenSSL SSL library and utilities. This package contains the runtime libraries and the development components. 8 | -------------------------------------------------------------------------------- /packages/openssl/packageinfo.html: -------------------------------------------------------------------------------- 1 | OpenSSL is the standard library for handling SSL-encrypted communication, 2 | which is used by many other utilities. Some Android versions have an 3 | implementation of OpenSSL and, if it works, it is generally better 4 | not to install the KBOX package. Consequently, OpenSSL 5 | is not listed as a formal dependency by any KBOX package, even though 6 | most of them use it. 7 |

8 | Unfortunately, later Android versions 9 | use a Google variant of OpenSSL called "BoringSSL", which is almost 10 | but not quite compatible with OpenSSL. If you get "undefined 11 | symbol" errors and such-like when trying to run a utility that uses 12 | SSL, then you probably need to install this package. However, you 13 | should bear in mind that this can cause compatibity problems (only 14 | in KBOX) when running programs (such as the Android Java JVM) 15 | from within KBOX. Because the Google "BoringSSL" libraries have the same 16 | names as the almost-equivalent SSL libraries, this incompatibility 17 | is hard to avoid. 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/perl/control: -------------------------------------------------------------------------------- 1 | Package: perl 2 | Version: %VERSION% 3 | Section: development 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The Perl interpreter and runtime environment. 8 | -------------------------------------------------------------------------------- /packages/perl/packageinfo.html: -------------------------------------------------------------------------------- 1 | The Perl programming language and runtime system. This is a reasonably 2 | complete build, but some functions have no real purpose on Android, and 3 | may behave oddly. 4 | 5 | -------------------------------------------------------------------------------- /packages/python3/control: -------------------------------------------------------------------------------- 1 | Package: python3 2 | Version: %VERSION% 3 | Section: development 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The Python3 programming language and runtime environment. 8 | -------------------------------------------------------------------------------- /packages/python3/packageinfo.html: -------------------------------------------------------------------------------- 1 | The Python 3 programming language and runtime system. This is a reasonably 2 | complete build, but some modules do not even build on Android 3 | (the OSS sound module, for example, which has no corresponding hardware). 4 | Of the modules that do build, some (user/password handling, for example) 5 | will not do anything useful, because there is no underlying implementation 6 | in the Android platform. 7 | 8 | -------------------------------------------------------------------------------- /packages/python3/patch_posixmodule.c: -------------------------------------------------------------------------------- 1 | 2719c2719 2 | < flags |= AT_EACCESS; 3 | --- 4 | > flags |= 0; 5 | 6072,6073c6072,6073 6 | < ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */ 7 | < ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */ 8 | --- 9 | > //ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */ 10 | > //ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */ 11 | 6075c6075 12 | < ioctl(slave_fd, I_PUSH, "ttcompat"); /* push ttcompat */ 13 | --- 14 | > //ioctl(slave_fd, I_PUSH, "ttcompat"); /* push ttcompat */ 15 | -------------------------------------------------------------------------------- /packages/python3/patch_pwdmodule.c: -------------------------------------------------------------------------------- 1 | 75c75 2 | < SETS(setIndex++, p->pw_gecos); 3 | --- 4 | > SETS(setIndex++, "kbox"); 5 | -------------------------------------------------------------------------------- /packages/python3/patch_pythonrun.c: -------------------------------------------------------------------------------- 1 | 257d256 2 | < #ifdef MS_WINDOWS 3 | 258a258 4 | > #ifdef MS_WINDOWS 5 | 269c269,270 6 | < PyErr_SetNone(PyExc_NotImplementedError); 7 | --- 8 | > PyOS_snprintf(codepage, sizeof(codepage), "utf-8"); 9 | > return get_codec_name(codepage); 10 | 271a273 11 | > return NULL; 12 | -------------------------------------------------------------------------------- /packages/readline/control: -------------------------------------------------------------------------------- 1 | Package: readline 2 | Version: %VERSION% 3 | Section: libraries 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: ncurses 7 | Description: The standard GNU line editing library, used by many other utilities. 8 | -------------------------------------------------------------------------------- /packages/readline/packageinfo.html: -------------------------------------------------------------------------------- 1 | This library is used by many others to provide line editing and line 2 | history functions. This package includes the development headers and 3 | static libraries, for those who want to build applications directly 4 | on an Android device. 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/rsync/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VNUM=3.1.2 4 | VERSION=rsync-$VNUM 5 | 6 | . ../../env.sh 7 | 8 | BUILD_DIR=$STAGING/$VERSION 9 | TARGET=$BUILD_DIR/rsync 10 | DEB=$BUILD_DIR/${VERSION}_kbox4_${DEB_ARCH}.deb 11 | 12 | if [ -f $DEB ]; then 13 | echo $DEB exists -- delete it to rebuild 14 | exit 0; 15 | fi 16 | 17 | if [ ! -d $BUILD_DIR ]; then 18 | mkdir -p $STAGING/tarballs 19 | TARBALL=$STAGING/tarballs/$VERSION.tar.gz 20 | if [ ! -f $TARBALL ]; then 21 | echo "Downloading $VERSION" 22 | wget -O $TARBALL https://download.samba.org/pub/rsync/src/${VERSION}.tar.gz 23 | else 24 | echo "Using cached $TARBALL" 25 | fi 26 | mkdir -p $STAGING 27 | (cd $STAGING; tar xfvz $TARBALL) 28 | else 29 | echo "Building cached $VERSION" 30 | fi 31 | 32 | 33 | echo Running configure... 34 | 35 | (cd $BUILD_DIR; CC=$CC CFLAGS="-fpie -fpic" LDFLAGS="-pie" ./configure --host $CONFIG_HOST --with-included-popt --with-included-zlib --prefix=/usr) 36 | 37 | #echo "Running make" 38 | (cd $BUILD_DIR; make) 39 | 40 | if [[ $? -ne 0 ]] ; then 41 | echo make failed ... stopping 42 | exit 1 43 | fi 44 | 45 | mkdir -p $BUILD_DIR/out 46 | mkdir -p $BUILD_DIR/image/ 47 | rm -rf $BUILD_DIR/image/* 48 | 49 | (cd $BUILD_DIR; DESTDIR=image/ make install) 50 | 51 | if [[ $? -ne 0 ]] ; then 52 | echo make install failed ... stopping 53 | exit 1 54 | fi 55 | 56 | sed -e s/%ARCH%/$DEB_ARCH/ control > $BUILD_DIR/control 57 | 58 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 59 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 60 | echo "2.0" > $BUILD_DIR/out/debian-binary 61 | rm -f $DEB 62 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 63 | cp -p $DEB $DIST/ 64 | 65 | -------------------------------------------------------------------------------- /packages/rsync/control: -------------------------------------------------------------------------------- 1 | Package: rsync 2 | Version: 3.1.2 3 | Section: networking 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: dropbear-client 7 | Description: File synchronization utility 8 | -------------------------------------------------------------------------------- /packages/rsync/packageinfo.html: -------------------------------------------------------------------------------- 1 | The standard file synchronization utility. This package contains both the 2 | client and the server, but it is unlikely that any recent Android 3 | device will allow incoming connections; so the server probably will 4 | not be usable. 5 | 6 | -------------------------------------------------------------------------------- /packages/solunar_cmdline/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #https://github.com/kevinboone/solunar_cmdline/archive/0.1.3a.tar.gz 3 | 4 | VERSION=0.1.3b 5 | VVERSION=$VERSION 6 | SUFFIX=tar.gz 7 | NAME=solunar 8 | DOWNLOAD_URL=https://github.com/kevinboone/solunar_cmdline/archive/$VVERSION.$SUFFIX 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/solunar_cmdline-${VERSION} 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; tar xfvz $TARBALL) 32 | else 33 | echo "Building cached $NAME-$VERSION" 34 | fi 35 | 36 | echo "Running make" 37 | 38 | mkdir -p $BUILD_DIR/image/ 39 | 40 | (cd $BUILD_DIR; make CC=$CC LDFLAGS="-pie" CFLAGS="-fpie -fpic" DESTDIR=`pwd`/image all install) 41 | 42 | 43 | echo "Building package" 44 | mkdir -p $BUILD_DIR/out 45 | 46 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 47 | 48 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 49 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 50 | echo "2.0" > $BUILD_DIR/out/debian-binary 51 | rm -f $DEB 52 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 53 | cp -p $DEB $DIST/ 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /packages/solunar_cmdline/control: -------------------------------------------------------------------------------- 1 | Package: solunar 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A command-line utility for calculating sun and moon rise and set times, and related astronomical information. 8 | -------------------------------------------------------------------------------- /packages/solunar_cmdline/packageinfo.html: -------------------------------------------------------------------------------- 1 | Calculate sun and moon rise and set times, and other astronomical 2 | events. For more information, see 3 | here. 4 | -------------------------------------------------------------------------------- /packages/tar/control: -------------------------------------------------------------------------------- 1 | Package: tar 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The GNU tar utility. This offers more functionality that the Busybox version, and replaces it on installation. It will pipe compressed archives into and output gzip, bzip2, etc., if these other utilities are available. 8 | -------------------------------------------------------------------------------- /packages/tar/packageinfo.html: -------------------------------------------------------------------------------- 1 | The GNU tar utility. This version replaces the Busybox tar, and is much 2 | more sophisticated. 3 | 4 | -------------------------------------------------------------------------------- /packages/uconv/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=0.0.1 4 | VVERSION=$VERSION 5 | SUFFIX=tar.gz 6 | NAME=uconv 7 | DOWNLOAD_URL=https://github.com/kevinboone/uconv/archive/$VVERSION.$SUFFIX 8 | 9 | . ../../env.sh 10 | 11 | BUILD_DIR=$STAGING/${NAME}-${VERSION} 12 | TARGET=$BUILD_DIR/$NAME 13 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 14 | 15 | if [ -f $DEB ]; then 16 | echo $DEB exists -- delete it to rebuild 17 | exit 0; 18 | fi 19 | 20 | if [ ! -d $BUILD_DIR ]; then 21 | mkdir -p $STAGING/tarballs 22 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 23 | if [ ! -f $TARBALL ]; then 24 | echo "Downloading $VERSION" 25 | wget -O $TARBALL $DOWNLOAD_URL 26 | else 27 | echo "Using cached $TARBALL" 28 | fi 29 | mkdir -p $STAGING 30 | (cd $STAGING; tar xfvz $TARBALL) 31 | else 32 | echo "Building cached $NAME-$VERSION" 33 | fi 34 | 35 | echo "Running make" 36 | 37 | mkdir -p $BUILD_DIR/image/ 38 | 39 | (cd $BUILD_DIR; make CC=$CC LDFLAGS="-pie" CFLAGS="-fpie -fpic" DESTDIR=`pwd`/image all install) 40 | 41 | 42 | echo "Building package" 43 | mkdir -p $BUILD_DIR/out 44 | 45 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 46 | 47 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 48 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 49 | echo "2.0" > $BUILD_DIR/out/debian-binary 50 | rm -f $DEB 51 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 52 | cp -p $DEB $DIST/ 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /packages/uconv/control: -------------------------------------------------------------------------------- 1 | Package: uconv 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A flexible, command-line unit converter. See http://kevinboone.net/README_uconv.html for more details. 8 | -------------------------------------------------------------------------------- /packages/uconv/packageinfo.html: -------------------------------------------------------------------------------- 1 | A flexible and reasonably intelligent unit converted. 2 | See here 3 | for more information. 4 | -------------------------------------------------------------------------------- /packages/unrar/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #http://www.rarlab.com/rar/unrarsrc-5.5.3.tar.gz 3 | 4 | VERSION=5.5.3 5 | VVERSION=$VERSION 6 | SUFFIX=tar.gz 7 | NAME=unrar 8 | DOWNLOAD_URL=http://www.rarlab.com/rar/unrarsrc-$VVERSION.$SUFFIX 9 | 10 | . ../../env.sh 11 | 12 | BUILD_DIR=$STAGING/${NAME} 13 | TARGET=$BUILD_DIR/$NAME 14 | DEB=$BUILD_DIR/$NAME-${VERSION}_kbox4_${DEB_ARCH}.deb 15 | 16 | if [ -f $DEB ]; then 17 | echo $DEB exists -- delete it to rebuild 18 | exit 0; 19 | fi 20 | 21 | if [ ! -d $BUILD_DIR ]; then 22 | mkdir -p $STAGING/tarballs 23 | TARBALL=$STAGING/tarballs/$NAME-$VERSION.$SUFFIX 24 | if [ ! -f $TARBALL ]; then 25 | echo "Downloading $VERSION" 26 | wget -O $TARBALL $DOWNLOAD_URL 27 | else 28 | echo "Using cached $TARBALL" 29 | fi 30 | mkdir -p $STAGING 31 | (cd $STAGING; tar xfvz $TARBALL) 32 | else 33 | echo "Building cached $NAME-$VERSION" 34 | fi 35 | 36 | echo Patching 37 | 38 | patch $BUILD_DIR/consio.cpp patch_consio.cpp 39 | patch $BUILD_DIR/ulinks.cpp patch_ulinks.cpp 40 | 41 | echo "Running make" 42 | 43 | mkdir -p $BUILD_DIR/image/ 44 | 45 | (cd $BUILD_DIR; make CC=$CC CXX=$CXX LDFLAGS="-pie" CXXFLAGS="-fpie -fpic" DESTDIR=`pwd`/image STRIP=$STRIP all install) 46 | 47 | echo "Building package" 48 | mkdir -p $BUILD_DIR/out 49 | 50 | sed -e s/%ARCH%/$DEB_ARCH/ control | sed -e s/%VERSION%/$VERSION/ > $BUILD_DIR/control 51 | 52 | (cd $BUILD_DIR; tar cfz out/data.tar.gz -C image ".") 53 | (cd $BUILD_DIR; tar cfz out/control.tar.gz ./control) 54 | echo "2.0" > $BUILD_DIR/out/debian-binary 55 | rm -f $DEB 56 | ar rcs $DEB $BUILD_DIR/out/debian-binary $BUILD_DIR/out/data.tar.gz $BUILD_DIR/out/control.tar.gz 57 | cp -p $DEB $DIST/ 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /packages/unrar/control: -------------------------------------------------------------------------------- 1 | Package: unrar 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A decompressor and extractor for files with RAR compression. 8 | -------------------------------------------------------------------------------- /packages/unrar/packageinfo.html: -------------------------------------------------------------------------------- 1 | A decompressor for compressed RAR archives. 2 | 3 | -------------------------------------------------------------------------------- /packages/unrar/patch_consio.cpp: -------------------------------------------------------------------------------- 1 | 0a1 2 | > #include 3 | 2a4,44 4 | > 5 | > /*======================================================================== 6 | > mygetpass 7 | > =========================================================================*/ 8 | > char *getpass (const char *prompt) 9 | > { 10 | > char password[64]; 11 | > memset (password, 0, sizeof (password)); 12 | > 13 | > struct termios oflags, nflags; 14 | > 15 | > tcgetattr(fileno(stdin), &oflags); 16 | > nflags = oflags; 17 | > nflags.c_lflag &= ~ECHO; 18 | > // nflags.c_lflag |= ECHONL; 19 | > tcsetattr(fileno(stdin), TCSANOW, &nflags); 20 | > 21 | > fprintf(stderr, prompt); 22 | > fflush (stdout); 23 | > FILE *f = fopen ("/dev/tty", "r"); 24 | > if (f) 25 | > { 26 | > fgets(password, sizeof(password), f); 27 | > fclose (f); 28 | > } 29 | > else 30 | > fgets(password, sizeof(password), stdin); 31 | > 32 | > if (strlen (password) > 0) 33 | > password[strlen(password) - 1] = 0; // remove \n 34 | > 35 | > fseek (stderr, 0, SEEK_CUR); 36 | > 37 | > tcsetattr(fileno(stdin), TCSANOW, &oflags); 38 | > 39 | > printf ("\n"); 40 | > 41 | > return strdup (password); 42 | > } 43 | > 44 | > 45 | -------------------------------------------------------------------------------- /packages/unrar/patch_ulinks.cpp: -------------------------------------------------------------------------------- 1 | 20,36d19 2 | < #ifdef USE_LUTIMES 3 | < #ifdef UNIX_TIME_NS 4 | < timespec times[2]; 5 | < times[0].tv_sec=fta->GetUnix(); 6 | < times[0].tv_nsec=fta->IsSet() ? long(fta->GetUnixNS()%1000000000) : UTIME_NOW; 7 | < times[1].tv_sec=ftm->GetUnix(); 8 | < times[1].tv_nsec=ftm->IsSet() ? long(ftm->GetUnixNS()%1000000000) : UTIME_NOW; 9 | < utimensat(AT_FDCWD,LinkNameA,times,AT_SYMLINK_NOFOLLOW); 10 | < #else 11 | < struct timeval tv[2]; 12 | < tv[0].tv_sec=fta->GetUnix(); 13 | < tv[0].tv_usec=long(fta->GetUnixNS()%1000000000/1000); 14 | < tv[1].tv_sec=ftm->GetUnix(); 15 | < tv[1].tv_usec=long(ftm->GetUnixNS()%1000000000/1000); 16 | < lutimes(LinkNameA,tv); 17 | < #endif 18 | < #endif 19 | -------------------------------------------------------------------------------- /packages/vifm/BROKEN: -------------------------------------------------------------------------------- 1 | This package builds, but the program segfaults just after redrawing the display 2 | after invoking vi. I had to stub out a lot of user/group handling stuff 3 | just to get the program to build at all, but I don't think that's the 4 | problem. Something else is returning NULL on Android when it isn't 5 | expected. Without proper debugging tools, I suspect it will be impossible 6 | to figure out what :/ 7 | -------------------------------------------------------------------------------- /packages/vifm/control: -------------------------------------------------------------------------------- 1 | Package: vifm 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A console-mode file manager with vi-like key bindings. 8 | -------------------------------------------------------------------------------- /packages/vifm/patch_cmd_completion.c: -------------------------------------------------------------------------------- 1 | 1010,1011c1010,1011 2 | < setpwent(); 3 | < while((pw = getpwent()) != NULL) 4 | --- 5 | > //setpwent(); 6 | > while((pw = NULL) != NULL) 7 | 1013,1016c1013,1016 8 | < if(strncmp(pw->pw_name, str, len) == 0) 9 | < { 10 | < vle_compl_add_match(pw->pw_name, ""); 11 | < } 12 | --- 13 | > // if(strncmp(pw->pw_name, str, len) == 0) 14 | > // { 15 | > // vle_compl_add_match(pw->pw_name, ""); 16 | > // } 17 | 1026c1026 18 | < size_t len = strlen(str); 19 | --- 20 | > // size_t len = strlen(str); 21 | 1028,1029c1028,1029 22 | < setgrent(); 23 | < while((gr = getgrent()) != NULL) 24 | --- 25 | > // setgrent(); 26 | > while((gr = NULL) != NULL) 27 | 1031,1034c1031,1034 28 | < if(strncmp(gr->gr_name, str, len) == 0) 29 | < { 30 | < vle_compl_add_match(gr->gr_name, ""); 31 | < } 32 | --- 33 | > // if(strncmp(gr->gr_name, str, len) == 0) 34 | > // { 35 | > // vle_compl_add_match(gr->gr_name, ""); 36 | > // } 37 | -------------------------------------------------------------------------------- /packages/vifm/patch_utils_nix.c: -------------------------------------------------------------------------------- 1 | 844c844 2 | < if(getgrgid_r(last_gid, &group_b, buf, sizeof(buf), &group_buf) == 0 && 3 | --- 4 | > if(0 == 0 && 5 | -------------------------------------------------------------------------------- /packages/vim/control: -------------------------------------------------------------------------------- 1 | Package: vim 2 | Version: %VERSION% 3 | Section: editors 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: ncurses 7 | Description: A text editor. 8 | -------------------------------------------------------------------------------- /packages/vim/packageinfo.html: -------------------------------------------------------------------------------- 1 | The complete Vim editor, including syntax highlighting and tutorial files. 2 | This version is installed as /usr/bin/vim; it does 3 | not replace the simplified vi provided by Busybox, but 4 | coexists with it. 5 | -------------------------------------------------------------------------------- /packages/vim/patch_mbyte.c: -------------------------------------------------------------------------------- 1 | 03c703 2 | < # if defined(MACOS) || defined(__amigaos4__) 3 | --- 4 | > # if defined(MACOS) || defined(__amigaos4__) || defined (__BIONIC__) //KB 5 | 6 | -------------------------------------------------------------------------------- /packages/zip/control: -------------------------------------------------------------------------------- 1 | Package: zip 2 | Version: %VERSION% 3 | Section: utilities 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: A file compression utility. The corresponding unzip is built into Busybox, so does not have to be installed separately. 8 | -------------------------------------------------------------------------------- /packages/zip/packageinfo.html: -------------------------------------------------------------------------------- 1 | File compression utility; the corresponding unzip is built into 2 | Busybox, so does not need a separate package. 3 | -------------------------------------------------------------------------------- /packages/zip/patch_Makefile: -------------------------------------------------------------------------------- 1 | 62c62 2 | < LFLAGS1 = 3 | --- 4 | > LFLAGS1 = -pie 5 | 128c128 6 | < $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) 7 | --- 8 | > $(BIND) -pie -s -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) 9 | 130c130 10 | < $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2) 11 | --- 12 | > $(BIND) -pie -s -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2) 13 | 132c132 14 | < $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2) 15 | --- 16 | > $(BIND) -pie -s -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2) 17 | 134c134 18 | < $(BIND) -o zipsplit$E $(LFLAGS1) $(OBJS) $(LFLAGS2) 19 | --- 20 | > $(BIND) -pie -s -o zipsplit$E $(LFLAGS1) $(OBJS) $(LFLAGS2) 21 | -------------------------------------------------------------------------------- /packages/zsh/control: -------------------------------------------------------------------------------- 1 | Package: zsh 2 | Version: %VERSION% 3 | Section: shells 4 | Priority: optional 5 | Architecture: %ARCH% 6 | Depends: 7 | Description: The Z shell (without the documentation package) 8 | -------------------------------------------------------------------------------- /packages/zsh/packageinfo.html: -------------------------------------------------------------------------------- 1 | A powerful (and correspondingly large and complex) command-line shell. 2 | --------------------------------------------------------------------------------